From 5376d5ab59372ce6629f725d8bd0aa21694b2a24 Mon Sep 17 00:00:00 2001 From: pdparchitect Date: Fri, 18 Sep 2026 15:41:51 +0000 Subject: [PATCH] chore: update version to 0.6.0 and add changelog entry for the release (+3 more) - chore: update version to 0.6.0 and add changelog entry for the release - refactor: replace CHATBOTKIT_API_SECRET with CHATBOTKIT_API_TOKEN across SDKs - feat(tests): add tests for token and deprecated secret handling in ChatBotKit - feat(decision): add DecisionClient and create method for typed question handling --- CHANGELOG.md | 52 + README.md | 21 +- chatbotkit/__init__.py | 2 +- chatbotkit/_client.py | 6 +- chatbotkit/_transport.py | 15 +- chatbotkit/decision.py | 28 + chatbotkit/partner.py | 112 - chatbotkit/platform.py | 105 - chatbotkit/types.py | 65901 ++++++++++----------- chatbotkit/user.py | 106 + examples/README.md | 6 +- examples/agent/README.md | 4 +- examples/agent/agent_from_file.py | 2 +- examples/agent/agent_with_skills.py | 2 +- examples/agent/agent_with_tools.py | 2 +- examples/agent/stateful_agent.py | 2 +- examples/agent/stateless_agent.py | 2 +- examples/sdk/README.md | 2 +- examples/sdk/conversation_chat_stream.py | 2 +- examples/sdk/create_dataset.py | 2 +- examples/sdk/list_conversations.py | 2 +- examples/sdk/list_datasets_stream.py | 2 +- pyproject.toml | 6 +- tests/test_packaging.py | 3 +- tests/test_sdk.py | 139 +- 25 files changed, 32651 insertions(+), 33875 deletions(-) create mode 100644 chatbotkit/decision.py delete mode 100644 chatbotkit/partner.py create mode 100644 chatbotkit/user.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 86e74b1..515a339 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,58 @@ All notable changes to the ChatBotKit Python SDK are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +## [0.6.0] - 2026-09-18 + +### Added + +- `token=` is the new name for the API credential, on `ChatBotKit(...)`, + `ClientOptions` and `extend(...)`. `secret=` is deprecated and still works; + `token` wins when both are set. +- `cbk.decision.create` asks a decision model typed questions (boolean, + choice, score) about a state and returns an answer with probabilities for + each. Pass a mapping for choice questions, as the generated `Question` type + cannot hold their named options. + +### Changed + +- **BREAKING:** skillset ability link fields renamed. On create/update/fetch/ + list/export, `secretId` / `fileId` / `botId` / `spaceId` are now + `linkedSecretId` / `linkedFileId` / `linkedBotId` / `linkedSpaceId`. Inline + conversation `extensions.skillsets[].abilities[]` entries use + `linkedSecretId` (and the new `linkedSpaceId`). GraphQL `Ability` relations + `secret` / `file` / `bot` / `space` are now `linkedSecret` / `linkedFile` / + `linkedBot` / `linkedSpace`. There are no compatibility aliases; upgrade + together with the platform deploy. +- Regenerated types also pick up unrelated API changes since the previous + regeneration (2026-08-19), grouped by resource: + - **BREAKING:** Dataset: `store` removed from `DatasetCreateRequest`, + `DatasetFetchResponse`, `DatasetListResponseItem` and + `DatasetListStreamItemData` (the platform now has a single vector store; + the REST API accepts and ignores `store`). + - Conversation: `expiresAt` (epoch ms, auto-delete) added to + `ConversationUpdateRequest`, `ConversationFetchResponse`, + `ConversationListResponseItem` and `ConversationListStreamItemData`. + - Memory: `expiresAt` added to `MemoryCreateRequest`, `MemoryUpdateRequest`, + `MemoryFetchResponse`, `MemoryListResponseItem` and + `MemoryListStreamItemData`. + - Task: `expiresAt` added to `TaskCreateRequest`, `TaskUpdateRequest`, + `TaskFetchResponse`, `TaskListResponseItem` and `TaskListStreamItemData`; + `resumeAt` (when a paused run resumes, null while running) added to + `TaskExecutionListResponseItem` and `TaskExecutionListStreamItemData`. + - Policy: `state` (`enabled` | `disabled`) added to `PolicyCreateRequest`, + `PolicyUpdateRequest`, `PolicyFetchResponse`, `PolicyListResponseItem` and + `PolicyListStreamItemData`. + - WhatsApp integration: `appSecret` (Meta app secret for webhook signature + validation, masked as `********` on read) added to + `IntegrationWhatsAppCreateRequest`, `IntegrationWhatsAppUpdateRequest`, + `IntegrationWhatsAppFetchResponse`, `IntegrationWhatsAppListResponseItem` + and `IntegrationWhatsAppListStreamItemData`; `idempotencyKey` added to + `WhatsappInitiateRequest`. + - GitHub integration: `allowFrom` (allowed senders) added to + `GithubIntegrationCreateRequest`. + ## [0.5.1] - 2026-07-22 ### Changed diff --git a/README.md b/README.md index 55e37d4..91f80a8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ -[![ChatBotKit](https://img.shields.io/badge/credits-ChatBotKit-blue.svg)](https://chatbotkit.com) [![CBK.AI](https://img.shields.io/badge/credits-CBK.AI-blue.svg)](https://cbk.ai) -[![Email](https://img.shields.io/badge/Email-Support-blue?logo=mail.ru)](mailto:support@chatbotkit.com) +[![Email](https://img.shields.io/badge/Email-Support-blue?logo=mail.ru)](mailto:support@cbk.ai) [![Discord](https://img.shields.io/badge/Discord-Support-blue?logo=discord)](https://go.cbk.ai/discord) [![PyPI](https://img.shields.io/pypi/v/chatbotkit.svg)](https://pypi.org/project/chatbotkit/) [![Follow on Twitter](https://img.shields.io/twitter/follow/chatbotkit.svg?logo=twitter)](https://twitter.com/chatbotkit) @@ -39,6 +38,8 @@ This means you can focus on building great user experiences while ChatBotKit han ## Installation +Install the SDK from PyPI with pip: + ```bash pip install chatbotkit ``` @@ -96,7 +97,7 @@ from chatbotkit.types import ConversationCompleteStreamItemType async def main(): - async with ChatBotKit(secret="your-api-key") as cbk: + async with ChatBotKit(token="your-api-token") as cbk: completion = cbk.conversation.complete( None, { @@ -116,13 +117,13 @@ asyncio.run(main()) ## SDK Client -Create a client with your API key and access resources as attributes: +Create a client with your API token and access resources as attributes: ```python from chatbotkit import ChatBotKit cbk = ChatBotKit( - secret="your-api-key", + token="your-api-token", base_url="https://api.chatbotkit.com", # optional run_as_user_id="user-id", # optional timezone="America/New_York", # optional @@ -140,7 +141,7 @@ cbk.blueprint # Blueprint management (cbk.blueprint.resource/bulletin) cbk.task # Task management (cbk.task.execution) cbk.team # Team management cbk.space # Space management (cbk.space.storage) -cbk.partner # Partner management (cbk.partner.user.token) +cbk.user # User management (cbk.user.token) cbk.policy # Policy management cbk.portal # Portal management cbk.usage # Usage reporting (cbk.usage.series) @@ -148,7 +149,7 @@ cbk.magic # Magic AI generation (cbk.magic.prompt) cbk.event # Event log access (cbk.event.log) cbk.graphql # GraphQL operations cbk.channel # Channel publish/subscribe -cbk.platform # Platform content (doc, example, manual, model, tutorial, ...) +cbk.platform # Platform content (doc, example, manual, model, ...) cbk.integration # Integrations (widget, slack, discord, whatsapp, telegram, # messenger, instagram, notion, sitemap, support, extract, # twilio, email, mcp_server, microsoft_teams, google_chat, @@ -290,7 +291,7 @@ Options can be passed as keyword arguments or via a `ClientOptions` instance. ```python from chatbotkit import ChatBotKit, ClientOptions -cbk = ChatBotKit(ClientOptions(secret="your-api-key", timezone="UTC")) +cbk = ChatBotKit(ClientOptions(token="your-api-token", timezone="UTC")) ``` ## Error Handling @@ -325,7 +326,7 @@ bot = await cbk.bot.create(BotCreateRequest.from_dict({ ## Documentation -- **Platform Documentation**: Comprehensive guide to ChatBotKit [here](https://chatbotkit.com/docs). +- **Platform Documentation**: Comprehensive guide to the platform [here](https://docs.cbk.ai/python-sdk). - **Platform Tutorials**: Step-by-step tutorials for ChatBotKit [here](https://chatbotkit.com/tutorials). ## Contributing @@ -337,7 +338,7 @@ Encounter a bug or want to contribute? Open an issue or submit a pull request on from the latest API specification, run the type sync script from the platform repo: ```bash -pnpm --dir sites/main script:sync-types:python +pnpm --dir platform/platform script:sync-types:python ``` Install the development dependencies and run the test suite with: diff --git a/chatbotkit/__init__.py b/chatbotkit/__init__.py index de9b24a..4fdeb8b 100644 --- a/chatbotkit/__init__.py +++ b/chatbotkit/__init__.py @@ -16,4 +16,4 @@ "Response", ] -__version__ = "0.5.1" +__version__ = "0.6.0" diff --git a/chatbotkit/_client.py b/chatbotkit/_client.py index 0da8521..e686a2f 100644 --- a/chatbotkit/_client.py +++ b/chatbotkit/_client.py @@ -9,13 +9,14 @@ from .contact import ContactClient from .conversation import ConversationClient from .dataset import DatasetClient +from .decision import DecisionClient from .event import EventClient from .file import FileClient from .graphql import GraphqlClient from .integration import IntegrationClient from .magic import MagicClient from .memory import MemoryClient -from .partner import PartnerClient +from .user import UserClient from .platform import PlatformClient from .policy import PolicyClient from .portal import PortalClient @@ -34,6 +35,7 @@ def __init__(self, options: ClientOptions | None = None, **kwargs: Any) -> None: self.bot = BotClient(self) self.conversation = ConversationClient(self) self.dataset = DatasetClient(self) + self.decision = DecisionClient(self) self.skillset = SkillsetClient(self) self.file = FileClient(self) self.contact = ContactClient(self) @@ -43,7 +45,7 @@ def __init__(self, options: ClientOptions | None = None, **kwargs: Any) -> None: self.task = TaskClient(self) self.team = TeamClient(self) self.space = SpaceClient(self) - self.partner = PartnerClient(self) + self.user = UserClient(self) self.policy = PolicyClient(self) self.portal = PortalClient(self) self.usage = UsageClient(self) diff --git a/chatbotkit/_transport.py b/chatbotkit/_transport.py index a712733..025d9b2 100644 --- a/chatbotkit/_transport.py +++ b/chatbotkit/_transport.py @@ -79,6 +79,10 @@ class ClientOptions: headers: Mapping[str, str] | None = None timeout: float | None = None transport: httpx.AsyncBaseTransport | None = None + # @note `token` is the name to use; `secret` is its deprecated former name + # and is ignored when `token` is set. It stays last so that positional + # arguments keep their meaning. + token: str | None = None class APIError(Exception): @@ -254,6 +258,11 @@ def __init__(self, options: ClientOptions | None = None, **kwargs: Any) -> None: ) def extend(self, **kwargs: Any) -> Client: + # @note the deprecated `secret` is folded into `token`, otherwise the + # current token would win over a new credential passed as `secret` + if "secret" in kwargs and "token" not in kwargs: + kwargs = {**kwargs, "token": kwargs["secret"]} + return type(self)(replace(self.options, **kwargs)) async def __aenter__(self) -> Client: @@ -431,8 +440,10 @@ def _build_headers( if has_body: result["content-type"] = "application/json" - if self.options.secret: - result["authorization"] = f"Bearer {self.options.secret}" + token = self.options.token or self.options.secret + + if token: + result["authorization"] = f"Bearer {token}" if self.options.run_as_user_id: result["x-runas-user-id"] = self.options.run_as_user_id diff --git a/chatbotkit/decision.py b/chatbotkit/decision.py new file mode 100644 index 0000000..9b3ac00 --- /dev/null +++ b/chatbotkit/decision.py @@ -0,0 +1,28 @@ +from __future__ import annotations + +from typing import Any, Mapping + +from . import types +from ._transport import Client, Response + +Request = Mapping[str, Any] + + +class DecisionClient: + def __init__(self, client: Client) -> None: + self._client = client + + def create( + self, + request: types.DecisionCreateRequest | Request, + ) -> Response[types.DecisionCreateResponse, Any]: + """Answers typed questions about a state. + + Pass a mapping for choice questions: the generated ``Question`` type + cannot hold the named options of their ``criteria``. + """ + return self._client.client_fetch( + "/api/v1/decision/create", + record=request, + parse=types.DecisionCreateResponse.from_dict, + ) diff --git a/chatbotkit/partner.py b/chatbotkit/partner.py deleted file mode 100644 index 860f315..0000000 --- a/chatbotkit/partner.py +++ /dev/null @@ -1,112 +0,0 @@ -from __future__ import annotations - -from typing import Any, Mapping - -from . import types -from ._transport import Client, Response - -Request = Mapping[str, Any] - - -class PartnerClient: - def __init__(self, client: Client) -> None: - self._client = client - self.user = PartnerUserClient(client) - - -class PartnerUserClient: - def __init__(self, client: Client) -> None: - self._client = client - self.token = PartnerUserTokenClient(client) - - def list( - self, - request: types.PartnerUserListParams | Request | None = None, - ) -> Response[types.PartnerUserListResponse, types.PartnerUserListStreamItem]: - return self._client.client_fetch( - "/api/v1/partner/user/list", - query=request, - parse=types.PartnerUserListResponse.from_dict, - stream_parse=types.PartnerUserListStreamItem.from_dict, - ) - - def fetch(self, user_id: str) -> Response[types.PartnerUserFetchResponse, Any]: - return self._client.client_fetch( - f"/api/v1/partner/user/{user_id}/fetch", - parse=types.PartnerUserFetchResponse.from_dict, - ) - - def create( - self, - request: types.PartnerUserCreateRequest | Request, - ) -> Response[types.PartnerUserCreateResponse, Any]: - return self._client.client_fetch( - "/api/v1/partner/user/create", - record=request, - parse=types.PartnerUserCreateResponse.from_dict, - ) - - def update( - self, - user_id: str, - request: types.PartnerUserUpdateRequest | Request, - ) -> Response[types.PartnerUserUpdateResponse, Any]: - return self._client.client_fetch( - f"/api/v1/partner/user/{user_id}/update", - record=request, - parse=types.PartnerUserUpdateResponse.from_dict, - ) - - def delete( - self, - user_id: str, - request: Request | None = None, - ) -> Response[types.PartnerUserDeleteResponse, Any]: - return self._client.client_fetch( - f"/api/v1/partner/user/{user_id}/delete", - record=request or {}, - parse=types.PartnerUserDeleteResponse.from_dict, - ) - - -class PartnerUserTokenClient: - def __init__(self, client: Client) -> None: - self._client = client - - def list( - self, - user_id: str, - request: types.PartnerUserTokenListParams | Request | None = None, - ) -> Response[ - types.PartnerUserTokenListResponse, - types.PartnerUserTokenListStreamItem, - ]: - return self._client.client_fetch( - f"/api/v1/partner/user/{user_id}/token/list", - query=request, - parse=types.PartnerUserTokenListResponse.from_dict, - stream_parse=types.PartnerUserTokenListStreamItem.from_dict, - ) - - def create( - self, - user_id: str, - request: types.PartnerUserTokenCreateRequest | Request, - ) -> Response[types.PartnerUserTokenCreateResponse, Any]: - return self._client.client_fetch( - f"/api/v1/partner/user/{user_id}/token/create", - record=request, - parse=types.PartnerUserTokenCreateResponse.from_dict, - ) - - def delete( - self, - user_id: str, - token_id: str, - request: Request | None = None, - ) -> Response[types.PartnerUserTokenDeleteResponse, Any]: - return self._client.client_fetch( - f"/api/v1/partner/user/{user_id}/token/{token_id}/delete", - record=request or {}, - parse=types.PartnerUserTokenDeleteResponse.from_dict, - ) diff --git a/chatbotkit/platform.py b/chatbotkit/platform.py index 2208781..062033e 100644 --- a/chatbotkit/platform.py +++ b/chatbotkit/platform.py @@ -13,13 +13,10 @@ def __init__(self, client: Client) -> None: self._client = client self.ability = PlatformAbilityClient(client) self.action = PlatformActionClient(client) - self.doc = PlatformDocClient(client) self.example = PlatformExampleClient(client) - self.manual = PlatformManualClient(client) self.model = PlatformModelClient(client) self.report = PlatformReportClient(client) self.secret = PlatformSecretClient(client) - self.tutorial = PlatformTutorialClient(client) class PlatformAbilityClient: @@ -70,38 +67,6 @@ def list( ) -class PlatformDocClient: - def __init__(self, client: Client) -> None: - self._client = client - - def list( - self, - request: types.PlatformDocListParams | Request | None = None, - ) -> Response[types.PlatformDocListResponse, types.PlatformDocListStreamItem]: - return self._client.client_fetch( - "/api/v1/platform/doc/list", - query=request, - parse=types.PlatformDocListResponse.from_dict, - stream_parse=types.PlatformDocListStreamItem.from_dict, - ) - - def search( - self, - request: types.PlatformDocsSearchRequest | Request, - ) -> Response[types.PlatformDocsSearchResponse, Any]: - return self._client.client_fetch( - "/api/v1/platform/doc/search", - record=request, - parse=types.PlatformDocsSearchResponse.from_dict, - ) - - def fetch(self, doc_id: str) -> Response[types.PlatformDocFetchResponse, Any]: - return self._client.client_fetch( - f"/api/v1/platform/doc/{doc_id}/fetch", - parse=types.PlatformDocFetchResponse.from_dict, - ) - - class PlatformExampleClient: def __init__(self, client: Client) -> None: self._client = client @@ -137,41 +102,6 @@ def fetch(self, example_id: str) -> Response[types.PlatformExampleFetchResponse, ) -class PlatformManualClient: - def __init__(self, client: Client) -> None: - self._client = client - - def list( - self, - request: types.PlatformManualListParams | Request | None = None, - ) -> Response[ - types.PlatformManualListResponse, - types.PlatformManualListStreamItem, - ]: - return self._client.client_fetch( - "/api/v1/platform/manual/list", - query=request, - parse=types.PlatformManualListResponse.from_dict, - stream_parse=types.PlatformManualListStreamItem.from_dict, - ) - - def search( - self, - request: types.PlatformManualsSearchRequest | Request, - ) -> Response[types.PlatformManualsSearchResponse, Any]: - return self._client.client_fetch( - "/api/v1/platform/manual/search", - record=request, - parse=types.PlatformManualsSearchResponse.from_dict, - ) - - def fetch(self, manual_id: str) -> Response[types.PlatformManualFetchResponse, Any]: - return self._client.client_fetch( - f"/api/v1/platform/manual/{manual_id}/fetch", - parse=types.PlatformManualFetchResponse.from_dict, - ) - - class PlatformModelClient: def __init__(self, client: Client) -> None: self._client = client @@ -237,38 +167,3 @@ def search( record=request, parse=types.PlatformSecretsSearchResponse.from_dict, ) - - -class PlatformTutorialClient: - def __init__(self, client: Client) -> None: - self._client = client - - def list( - self, - request: types.PlatformTutorialListParams | Request | None = None, - ) -> Response[ - types.PlatformTutorialListResponse, - types.PlatformTutorialListStreamItem, - ]: - return self._client.client_fetch( - "/api/v1/platform/tutorial/list", - query=request, - parse=types.PlatformTutorialListResponse.from_dict, - stream_parse=types.PlatformTutorialListStreamItem.from_dict, - ) - - def search( - self, - request: types.PlatformTutorialsSearchRequest | Request, - ) -> Response[types.PlatformTutorialsSearchResponse, Any]: - return self._client.client_fetch( - "/api/v1/platform/tutorial/search", - record=request, - parse=types.PlatformTutorialsSearchResponse.from_dict, - ) - - def fetch(self, tutorial_id: str) -> Response[types.PlatformTutorialFetchResponse, Any]: - return self._client.client_fetch( - f"/api/v1/platform/tutorial/{tutorial_id}/fetch", - parse=types.PlatformTutorialFetchResponse.from_dict, - ) diff --git a/chatbotkit/types.py b/chatbotkit/types.py index b7e87d2..b4dd90a 100644 --- a/chatbotkit/types.py +++ b/chatbotkit/types.py @@ -42,13 +42,8 @@ def to_class(c: Type[T], x: Any) -> dict: return cast(Any, x).to_dict() -def from_float(x: Any) -> float: - assert isinstance(x, (float, int)) and not isinstance(x, bool) - return float(x) - - -def to_float(x: Any) -> float: - assert isinstance(x, (int, float)) +def from_int(x: Any) -> int: + assert isinstance(x, int) and not isinstance(x, bool) return x @@ -57,13 +52,13 @@ def to_enum(c: Type[EnumT], x: Any) -> EnumT: return x.value -def from_int(x: Any) -> int: - assert isinstance(x, int) and not isinstance(x, bool) - return x +def from_float(x: Any) -> float: + assert isinstance(x, (float, int)) and not isinstance(x, bool) + return float(x) -def from_bool(x: Any) -> bool: - assert isinstance(x, bool) +def to_float(x: Any) -> float: + assert isinstance(x, (int, float)) return x @@ -71,6 +66,11 @@ def from_datetime(x: Any) -> datetime: return dateutil.parser.parse(x) +def from_bool(x: Any) -> bool: + assert isinstance(x, bool) + return x + + class GraphqlRequest: operation_name: Optional[str] """The name of the operation to execute""" @@ -150,392 +150,538 @@ def to_dict(self) -> dict: return result -class DiscordInitiateRequest: - channel_id: str - """The Discord channel ID to send to""" - - text: str - """The text message to send to the Discord channel""" +class TaskWorkflowEventsSubscribeParams: + task_id: str + """The ID of the task""" - def __init__(self, channel_id: str, text: str) -> None: - self.channel_id = channel_id - self.text = text + def __init__(self, task_id: str) -> None: + self.task_id = task_id @staticmethod - def from_dict(obj: Any) -> 'DiscordInitiateRequest': + def from_dict(obj: Any) -> 'TaskWorkflowEventsSubscribeParams': assert isinstance(obj, dict) - channel_id = from_str(obj.get("channelId")) - text = from_str(obj.get("text")) - return DiscordInitiateRequest(channel_id, text) + task_id = from_str(obj.get("taskId")) + return TaskWorkflowEventsSubscribeParams(task_id) def to_dict(self) -> dict: result: dict = {} - result["channelId"] = from_str(self.channel_id) - result["text"] = from_str(self.text) + result["taskId"] = from_str(self.task_id) return result -class DiscordInitiateResponse: - id: str - """The ID of the initiated integration""" +class TaskWorkflowEventsSubscribeRequest: + history_length: Optional[int] + """Number of recent workflow events to replay before live events.""" - def __init__(self, id: str) -> None: - self.id = id + def __init__(self, history_length: Optional[int]) -> None: + self.history_length = history_length @staticmethod - def from_dict(obj: Any) -> 'DiscordInitiateResponse': + def from_dict(obj: Any) -> 'TaskWorkflowEventsSubscribeRequest': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return DiscordInitiateResponse(id) + history_length = from_union([from_int, from_none], obj.get("historyLength")) + return TaskWorkflowEventsSubscribeRequest(history_length) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + if self.history_length is not None: + result["historyLength"] = from_union([from_int, from_none], self.history_length) return result -class EmailInitiateRequest: - email: str - """The email address to use for the conversation""" +class PurpleKind(Enum): + """The action kind""" - subject: str - """The subject of the email""" + DATASET = "dataset" + FUNCTION = "function" + SKILLSET = "skillset" - text: str - """The text instruction to use to initiate the conversation""" - def __init__(self, email: str, subject: str, text: str) -> None: - self.email = email - self.subject = subject - self.text = text +class PurpleAction: + """The action associated with the operation""" - @staticmethod - def from_dict(obj: Any) -> 'EmailInitiateRequest': - assert isinstance(obj, dict) - email = from_str(obj.get("email")) - subject = from_str(obj.get("subject")) - text = from_str(obj.get("text")) - return EmailInitiateRequest(email, subject, text) + icon: Optional[str] + """The action icon""" - def to_dict(self) -> dict: - result: dict = {} - result["email"] = from_str(self.email) - result["subject"] = from_str(self.subject) - result["text"] = from_str(self.text) - return result + id: str + """The action ID""" + input: Any + """The action input""" -class EmailInitiateResponse: - id: str - """The ID of the initiated integration""" + justification: Optional[str] + """The action justification""" - def __init__(self, id: str) -> None: + kind: Optional[PurpleKind] + """The action kind""" + + name: Optional[str] + """The action name""" + + def __init__(self, icon: Optional[str], id: str, input: Any, justification: Optional[str], kind: Optional[PurpleKind], name: Optional[str]) -> None: + self.icon = icon self.id = id + self.input = input + self.justification = justification + self.kind = kind + self.name = name @staticmethod - def from_dict(obj: Any) -> 'EmailInitiateResponse': + def from_dict(obj: Any) -> 'PurpleAction': assert isinstance(obj, dict) + icon = from_union([from_str, from_none], obj.get("icon")) id = from_str(obj.get("id")) - return EmailInitiateResponse(id) + input = obj.get("input") + justification = from_union([from_str, from_none], obj.get("justification")) + kind = from_union([PurpleKind, from_none], obj.get("kind")) + name = from_union([from_str, from_none], obj.get("name")) + return PurpleAction(icon, id, input, justification, kind, name) def to_dict(self) -> dict: result: dict = {} + if self.icon is not None: + result["icon"] = from_union([from_str, from_none], self.icon) result["id"] = from_str(self.id) + if self.input is not None: + result["input"] = self.input + if self.justification is not None: + result["justification"] = from_union([from_str, from_none], self.justification) + if self.kind is not None: + result["kind"] = from_union([lambda x: to_enum(PurpleKind, x), from_none], self.kind) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) return result -class GooglechatInitiateRequest: - space: Optional[str] - """The Google Chat space resource name to send to, such as spaces/AAAA..., or a Google Chat - user identifier for a direct message +class TaskWorkflowEventsSubscribeStreamItemData: + """The data for the operation begin event + + The data for the operation end event + + The data for the error event """ - text: str - """The text message to send to the Google Chat space""" + action: Optional[PurpleAction] + """The action associated with the operation""" - def __init__(self, space: Optional[str], text: str) -> None: - self.space = space - self.text = text + id: Optional[str] + """The operation ID""" + + code: Optional[str] + """The error code""" + + message: Optional[str] + """The error message""" + + def __init__(self, action: Optional[PurpleAction], id: Optional[str], code: Optional[str], message: Optional[str]) -> None: + self.action = action + self.id = id + self.code = code + self.message = message @staticmethod - def from_dict(obj: Any) -> 'GooglechatInitiateRequest': + def from_dict(obj: Any) -> 'TaskWorkflowEventsSubscribeStreamItemData': assert isinstance(obj, dict) - space = from_union([from_str, from_none], obj.get("space")) - text = from_str(obj.get("text")) - return GooglechatInitiateRequest(space, text) + action = from_union([PurpleAction.from_dict, from_none], obj.get("action")) + id = from_union([from_str, from_none], obj.get("id")) + code = from_union([from_str, from_none], obj.get("code")) + message = from_union([from_str, from_none], obj.get("message")) + return TaskWorkflowEventsSubscribeStreamItemData(action, id, code, message) def to_dict(self) -> dict: result: dict = {} - if self.space is not None: - result["space"] = from_union([from_str, from_none], self.space) - result["text"] = from_str(self.text) + if self.action is not None: + result["action"] = from_union([lambda x: to_class(PurpleAction, x), from_none], self.action) + if self.id is not None: + result["id"] = from_union([from_str, from_none], self.id) + if self.code is not None: + result["code"] = from_union([from_str, from_none], self.code) + if self.message is not None: + result["message"] = from_union([from_str, from_none], self.message) return result -class GooglechatInitiateResponse: - id: str - """The ID of the initiated integration""" +class TaskWorkflowEventsSubscribeStreamItemType(Enum): + """The type of event""" - def __init__(self, id: str) -> None: - self.id = id + ERROR = "error" + OPERATION_BEGIN = "operationBegin" + OPERATION_END = "operationEnd" + + +class TaskWorkflowEventsSubscribeStreamItem: + """An item in the task workflow subscription response""" + + created_at: float + """The event creation timestamp in milliseconds since the Unix epoch""" + + data: TaskWorkflowEventsSubscribeStreamItemData + """The data for the operation begin event + + The data for the operation end event + + The data for the error event + """ + type: TaskWorkflowEventsSubscribeStreamItemType + """The type of event""" + + def __init__(self, created_at: float, data: TaskWorkflowEventsSubscribeStreamItemData, type: TaskWorkflowEventsSubscribeStreamItemType) -> None: + self.created_at = created_at + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'GooglechatInitiateResponse': + def from_dict(obj: Any) -> 'TaskWorkflowEventsSubscribeStreamItem': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return GooglechatInitiateResponse(id) + created_at = from_float(obj.get("createdAt")) + data = TaskWorkflowEventsSubscribeStreamItemData.from_dict(obj.get("data")) + type = TaskWorkflowEventsSubscribeStreamItemType(obj.get("type")) + return TaskWorkflowEventsSubscribeStreamItem(created_at, data, type) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["createdAt"] = to_float(self.created_at) + result["data"] = to_class(TaskWorkflowEventsSubscribeStreamItemData, self.data) + result["type"] = to_enum(TaskWorkflowEventsSubscribeStreamItemType, self.type) return result -class InstagramInitiateRequest: - instagram_user_id: str - """The Instagram professional account ID sending the message""" +class PlatformReportListParamsOrder(Enum): + """The order of the paginated items""" - recipient_id: str - """The Instagram recipient ID from a prior interaction""" + ASC = "asc" + DESC = "desc" - text: str - """The free-form text message to send while Meta allows messaging this recipient""" - def __init__(self, instagram_user_id: str, recipient_id: str, text: str) -> None: - self.instagram_user_id = instagram_user_id - self.recipient_id = recipient_id - self.text = text +class PlatformReportListParams: + cursor: Optional[str] + """The cursor to use for pagination""" + + order: Optional[PlatformReportListParamsOrder] + """The order of the paginated items""" + + take: Optional[int] + """The number of items to retrieve""" + + def __init__(self, cursor: Optional[str], order: Optional[PlatformReportListParamsOrder], take: Optional[int]) -> None: + self.cursor = cursor + self.order = order + self.take = take @staticmethod - def from_dict(obj: Any) -> 'InstagramInitiateRequest': + def from_dict(obj: Any) -> 'PlatformReportListParams': assert isinstance(obj, dict) - instagram_user_id = from_str(obj.get("instagramUserId")) - recipient_id = from_str(obj.get("recipientId")) - text = from_str(obj.get("text")) - return InstagramInitiateRequest(instagram_user_id, recipient_id, text) + cursor = from_union([from_str, from_none], obj.get("cursor")) + order = from_union([PlatformReportListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return PlatformReportListParams(cursor, order, take) def to_dict(self) -> dict: result: dict = {} - result["instagramUserId"] = from_str(self.instagram_user_id) - result["recipientId"] = from_str(self.recipient_id) - result["text"] = from_str(self.text) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(PlatformReportListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class InstagramInitiateResponse: +class PlatformReportListResponseItem: + """Instance list properties""" + + created_at: float + """The timestamp (ms) when the instance was created""" + + description: Optional[str] + """The associated description""" + id: str - """The ID of the initiated integration""" + """The instance ID""" - def __init__(self, id: str) -> None: + meta: Optional[Dict[str, Any]] + """Meta data information""" + + name: Optional[str] + """The associated name""" + + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: + self.created_at = created_at + self.description = description self.id = id + self.meta = meta + self.name = name + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'InstagramInitiateResponse': + def from_dict(obj: Any) -> 'PlatformReportListResponseItem': assert isinstance(obj, dict) + created_at = from_float(obj.get("createdAt")) + description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) - return InstagramInitiateResponse(id) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + updated_at = from_float(obj.get("updatedAt")) + return PlatformReportListResponseItem(created_at, description, id, meta, name, updated_at) def to_dict(self) -> dict: result: dict = {} + result["createdAt"] = to_float(self.created_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + result["updatedAt"] = to_float(self.updated_at) return result -class MessengerInitiateRequest: - page_id: str - """The Facebook Page ID sending the message""" - - recipient_id: str - """The Messenger recipient PSID from a prior interaction""" - - text: str - """The free-form text message to send while Meta allows messaging this recipient""" +class PlatformReportListResponse: + items: List[PlatformReportListResponseItem] - def __init__(self, page_id: str, recipient_id: str, text: str) -> None: - self.page_id = page_id - self.recipient_id = recipient_id - self.text = text + def __init__(self, items: List[PlatformReportListResponseItem]) -> None: + self.items = items @staticmethod - def from_dict(obj: Any) -> 'MessengerInitiateRequest': + def from_dict(obj: Any) -> 'PlatformReportListResponse': assert isinstance(obj, dict) - page_id = from_str(obj.get("pageId")) - recipient_id = from_str(obj.get("recipientId")) - text = from_str(obj.get("text")) - return MessengerInitiateRequest(page_id, recipient_id, text) + items = from_list(PlatformReportListResponseItem.from_dict, obj.get("items")) + return PlatformReportListResponse(items) def to_dict(self) -> dict: result: dict = {} - result["pageId"] = from_str(self.page_id) - result["recipientId"] = from_str(self.recipient_id) - result["text"] = from_str(self.text) + result["items"] = from_list(lambda x: to_class(PlatformReportListResponseItem, x), self.items) return result -class MessengerInitiateResponse: +class PlatformReportListStreamItemData: + """Instance list properties""" + + created_at: float + """The timestamp (ms) when the instance was created""" + + description: Optional[str] + """The associated description""" + id: str - """The ID of the initiated integration""" + """The instance ID""" - def __init__(self, id: str) -> None: + meta: Optional[Dict[str, Any]] + """Meta data information""" + + name: Optional[str] + """The associated name""" + + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: + self.created_at = created_at + self.description = description self.id = id + self.meta = meta + self.name = name + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'MessengerInitiateResponse': + def from_dict(obj: Any) -> 'PlatformReportListStreamItemData': assert isinstance(obj, dict) + created_at = from_float(obj.get("createdAt")) + description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) - return MessengerInitiateResponse(id) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + updated_at = from_float(obj.get("updatedAt")) + return PlatformReportListStreamItemData(created_at, description, id, meta, name, updated_at) def to_dict(self) -> dict: result: dict = {} + result["createdAt"] = to_float(self.created_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + result["updatedAt"] = to_float(self.updated_at) return result -class TeamsInitiateRequest: - conversation_id: str - """The Microsoft Teams Bot Framework conversation ID to send to""" +class PlatformReportListStreamItemType(Enum): + """The type of event""" - text: str - """The text message to send to the Teams conversation""" + ITEM = "item" - def __init__(self, conversation_id: str, text: str) -> None: - self.conversation_id = conversation_id - self.text = text + +class PlatformReportListStreamItem: + data: PlatformReportListStreamItemData + """Instance list properties""" + + type: PlatformReportListStreamItemType + """The type of event""" + + def __init__(self, data: PlatformReportListStreamItemData, type: PlatformReportListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'TeamsInitiateRequest': + def from_dict(obj: Any) -> 'PlatformReportListStreamItem': assert isinstance(obj, dict) - conversation_id = from_str(obj.get("conversationId")) - text = from_str(obj.get("text")) - return TeamsInitiateRequest(conversation_id, text) + data = PlatformReportListStreamItemData.from_dict(obj.get("data")) + type = PlatformReportListStreamItemType(obj.get("type")) + return PlatformReportListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["conversationId"] = from_str(self.conversation_id) - result["text"] = from_str(self.text) + result["data"] = to_class(PlatformReportListStreamItemData, self.data) + result["type"] = to_enum(PlatformReportListStreamItemType, self.type) return result -class TeamsInitiateResponse: - id: str - """The ID of the initiated integration""" +class PlatformReportsGenerateResponseValue: + """Successful report output data""" - def __init__(self, id: str) -> None: - self.id = id + error: Optional[str] + """Error message if report generation failed""" + + def __init__(self, error: Optional[str]) -> None: + self.error = error @staticmethod - def from_dict(obj: Any) -> 'TeamsInitiateResponse': + def from_dict(obj: Any) -> 'PlatformReportsGenerateResponseValue': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return TeamsInitiateResponse(id) + error = from_union([from_str, from_none], obj.get("error")) + return PlatformReportsGenerateResponseValue(error) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + if self.error is not None: + result["error"] = from_union([from_str, from_none], self.error) return result -class RecallInitiateParams: - recall_integration_id: str - """The ID of the recall integration to use""" +class PlatformReportGenerateParams: + report_id: str + """The ID of the report to generate""" - def __init__(self, recall_integration_id: str) -> None: - self.recall_integration_id = recall_integration_id + def __init__(self, report_id: str) -> None: + self.report_id = report_id @staticmethod - def from_dict(obj: Any) -> 'RecallInitiateParams': + def from_dict(obj: Any) -> 'PlatformReportGenerateParams': assert isinstance(obj, dict) - recall_integration_id = from_str(obj.get("recallIntegrationId")) - return RecallInitiateParams(recall_integration_id) + report_id = from_str(obj.get("reportId")) + return PlatformReportGenerateParams(report_id) def to_dict(self) -> dict: result: dict = {} - result["recallIntegrationId"] = from_str(self.recall_integration_id) + result["reportId"] = from_str(self.report_id) return result -class RecallInitiateRequest: - bot_name: Optional[str] - """The display name for the bot in the meeting""" - - meeting_url: str - """The URL of the meeting to join""" - +class WhatsappInitiateRequest: + idempotency_key: Optional[str] + """A stable caller-supplied key used to prevent duplicate proactive messages when retrying + the request + """ text: str - """The instruction text to use to initiate the meeting session""" + """The free-form text message to send within an active WhatsApp customer service window""" - def __init__(self, bot_name: Optional[str], meeting_url: str, text: str) -> None: - self.bot_name = bot_name - self.meeting_url = meeting_url + to: str + """The recipient phone number in E.164 format, without the leading plus sign""" + + def __init__(self, idempotency_key: Optional[str], text: str, to: str) -> None: + self.idempotency_key = idempotency_key self.text = text + self.to = to @staticmethod - def from_dict(obj: Any) -> 'RecallInitiateRequest': + def from_dict(obj: Any) -> 'WhatsappInitiateRequest': assert isinstance(obj, dict) - bot_name = from_union([from_str, from_none], obj.get("botName")) - meeting_url = from_str(obj.get("meetingUrl")) + idempotency_key = from_union([from_str, from_none], obj.get("idempotencyKey")) text = from_str(obj.get("text")) - return RecallInitiateRequest(bot_name, meeting_url, text) + to = from_str(obj.get("to")) + return WhatsappInitiateRequest(idempotency_key, text, to) def to_dict(self) -> dict: result: dict = {} - if self.bot_name is not None: - result["botName"] = from_union([from_str, from_none], self.bot_name) - result["meetingUrl"] = from_str(self.meeting_url) + if self.idempotency_key is not None: + result["idempotencyKey"] = from_union([from_str, from_none], self.idempotency_key) result["text"] = from_str(self.text) + result["to"] = from_str(self.to) return result -class RecallInitiateResponse: - bot: Dict[str, Any] - """The meeting bot data from Recall.ai""" - +class WhatsappInitiateResponse: id: str - """The ID of the recall integration""" + """The ID of the initiated integration""" - def __init__(self, bot: Dict[str, Any], id: str) -> None: - self.bot = bot + def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'RecallInitiateResponse': + def from_dict(obj: Any) -> 'WhatsappInitiateResponse': assert isinstance(obj, dict) - bot = from_dict(lambda x: x, obj.get("bot")) id = from_str(obj.get("id")) - return RecallInitiateResponse(bot, id) + return WhatsappInitiateResponse(id) def to_dict(self) -> dict: result: dict = {} - result["bot"] = from_dict(lambda x: x, self.bot) result["id"] = from_str(self.id) return result -class SlackInitiateRequest: - channel: str - """The Slack channel or user to send to""" +class Channel(Enum): + """The Twilio channel to use for the conversation""" + + CALL = "call" + SMS = "sms" + + +class TwilioInitiateRequest: + channel: Optional[Channel] + """The Twilio channel to use for the conversation""" + + twilio_initiate_request_from: str + """The Twilio sender phone number""" text: str """The text instruction to use to initiate the conversation""" - def __init__(self, channel: str, text: str) -> None: + to: str + """The recipient phone number""" + + def __init__(self, channel: Optional[Channel], twilio_initiate_request_from: str, text: str, to: str) -> None: self.channel = channel + self.twilio_initiate_request_from = twilio_initiate_request_from self.text = text + self.to = to @staticmethod - def from_dict(obj: Any) -> 'SlackInitiateRequest': + def from_dict(obj: Any) -> 'TwilioInitiateRequest': assert isinstance(obj, dict) - channel = from_str(obj.get("channel")) + channel = from_union([Channel, from_none], obj.get("channel")) + twilio_initiate_request_from = from_str(obj.get("from")) text = from_str(obj.get("text")) - return SlackInitiateRequest(channel, text) + to = from_str(obj.get("to")) + return TwilioInitiateRequest(channel, twilio_initiate_request_from, text, to) def to_dict(self) -> dict: result: dict = {} - result["channel"] = from_str(self.channel) + if self.channel is not None: + result["channel"] = from_union([lambda x: to_enum(Channel, x), from_none], self.channel) + result["from"] = from_str(self.twilio_initiate_request_from) result["text"] = from_str(self.text) + result["to"] = from_str(self.to) return result -class SlackInitiateResponse: +class TwilioInitiateResponse: id: str """The ID of the initiated integration""" @@ -543,10 +689,10 @@ def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'SlackInitiateResponse': + def from_dict(obj: Any) -> 'TwilioInitiateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return SlackInitiateResponse(id) + return TwilioInitiateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -598,52 +744,32 @@ def to_dict(self) -> dict: return result -class Channel(Enum): - """The Twilio channel to use for the conversation""" - - CALL = "call" - SMS = "sms" - - -class TwilioInitiateRequest: - channel: Optional[Channel] - """The Twilio channel to use for the conversation""" - - twilio_initiate_request_from: str - """The Twilio sender phone number""" +class SlackInitiateRequest: + channel: str + """The Slack channel or user to send to""" text: str """The text instruction to use to initiate the conversation""" - to: str - """The recipient phone number""" - - def __init__(self, channel: Optional[Channel], twilio_initiate_request_from: str, text: str, to: str) -> None: + def __init__(self, channel: str, text: str) -> None: self.channel = channel - self.twilio_initiate_request_from = twilio_initiate_request_from self.text = text - self.to = to @staticmethod - def from_dict(obj: Any) -> 'TwilioInitiateRequest': + def from_dict(obj: Any) -> 'SlackInitiateRequest': assert isinstance(obj, dict) - channel = from_union([Channel, from_none], obj.get("channel")) - twilio_initiate_request_from = from_str(obj.get("from")) + channel = from_str(obj.get("channel")) text = from_str(obj.get("text")) - to = from_str(obj.get("to")) - return TwilioInitiateRequest(channel, twilio_initiate_request_from, text, to) + return SlackInitiateRequest(channel, text) def to_dict(self) -> dict: result: dict = {} - if self.channel is not None: - result["channel"] = from_union([lambda x: to_enum(Channel, x), from_none], self.channel) - result["from"] = from_str(self.twilio_initiate_request_from) + result["channel"] = from_str(self.channel) result["text"] = from_str(self.text) - result["to"] = from_str(self.to) return result -class TwilioInitiateResponse: +class SlackInitiateResponse: id: str """The ID of the initiated integration""" @@ -651,10 +777,10 @@ def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'TwilioInitiateResponse': + def from_dict(obj: Any) -> 'SlackInitiateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return TwilioInitiateResponse(id) + return SlackInitiateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -662,943 +788,915 @@ def to_dict(self) -> dict: return result -class WhatsappInitiateRequest: - text: str - """The free-form text message to send within an active WhatsApp customer service window""" +class RecallInitiateParams: + recall_integration_id: str + """The ID of the recall integration to use""" - to: str - """The recipient phone number in E.164 format, without the leading plus sign""" + def __init__(self, recall_integration_id: str) -> None: + self.recall_integration_id = recall_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'RecallInitiateParams': + assert isinstance(obj, dict) + recall_integration_id = from_str(obj.get("recallIntegrationId")) + return RecallInitiateParams(recall_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["recallIntegrationId"] = from_str(self.recall_integration_id) + return result + + +class RecallInitiateRequest: + bot_name: Optional[str] + """The display name for the bot in the meeting""" + + meeting_url: str + """The URL of the meeting to join""" + + text: str + """The instruction text to use to initiate the meeting session""" - def __init__(self, text: str, to: str) -> None: + def __init__(self, bot_name: Optional[str], meeting_url: str, text: str) -> None: + self.bot_name = bot_name + self.meeting_url = meeting_url self.text = text - self.to = to @staticmethod - def from_dict(obj: Any) -> 'WhatsappInitiateRequest': + def from_dict(obj: Any) -> 'RecallInitiateRequest': assert isinstance(obj, dict) + bot_name = from_union([from_str, from_none], obj.get("botName")) + meeting_url = from_str(obj.get("meetingUrl")) text = from_str(obj.get("text")) - to = from_str(obj.get("to")) - return WhatsappInitiateRequest(text, to) + return RecallInitiateRequest(bot_name, meeting_url, text) def to_dict(self) -> dict: result: dict = {} + if self.bot_name is not None: + result["botName"] = from_union([from_str, from_none], self.bot_name) + result["meetingUrl"] = from_str(self.meeting_url) result["text"] = from_str(self.text) - result["to"] = from_str(self.to) return result -class WhatsappInitiateResponse: +class RecallInitiateResponse: + bot: Dict[str, Any] + """The meeting bot data from Recall.ai""" + id: str - """The ID of the initiated integration""" + """The ID of the recall integration""" - def __init__(self, id: str) -> None: + def __init__(self, bot: Dict[str, Any], id: str) -> None: + self.bot = bot self.id = id @staticmethod - def from_dict(obj: Any) -> 'WhatsappInitiateResponse': + def from_dict(obj: Any) -> 'RecallInitiateResponse': assert isinstance(obj, dict) + bot = from_dict(lambda x: x, obj.get("bot")) id = from_str(obj.get("id")) - return WhatsappInitiateResponse(id) + return RecallInitiateResponse(bot, id) def to_dict(self) -> dict: result: dict = {} + result["bot"] = from_dict(lambda x: x, self.bot) result["id"] = from_str(self.id) return result -class PlatformReportGenerateParams: - report_id: str - """The ID of the report to generate""" +class TeamsInitiateRequest: + conversation_id: str + """The Microsoft Teams Bot Framework conversation ID to send to""" - def __init__(self, report_id: str) -> None: - self.report_id = report_id + text: str + """The text message to send to the Teams conversation""" + + def __init__(self, conversation_id: str, text: str) -> None: + self.conversation_id = conversation_id + self.text = text @staticmethod - def from_dict(obj: Any) -> 'PlatformReportGenerateParams': + def from_dict(obj: Any) -> 'TeamsInitiateRequest': assert isinstance(obj, dict) - report_id = from_str(obj.get("reportId")) - return PlatformReportGenerateParams(report_id) + conversation_id = from_str(obj.get("conversationId")) + text = from_str(obj.get("text")) + return TeamsInitiateRequest(conversation_id, text) def to_dict(self) -> dict: result: dict = {} - result["reportId"] = from_str(self.report_id) + result["conversationId"] = from_str(self.conversation_id) + result["text"] = from_str(self.text) return result -class PlatformReportsGenerateResponseValue: - """Successful report output data""" - - error: Optional[str] - """Error message if report generation failed""" +class TeamsInitiateResponse: + id: str + """The ID of the initiated integration""" - def __init__(self, error: Optional[str]) -> None: - self.error = error + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'PlatformReportsGenerateResponseValue': + def from_dict(obj: Any) -> 'TeamsInitiateResponse': assert isinstance(obj, dict) - error = from_union([from_str, from_none], obj.get("error")) - return PlatformReportsGenerateResponseValue(error) + id = from_str(obj.get("id")) + return TeamsInitiateResponse(id) def to_dict(self) -> dict: result: dict = {} - if self.error is not None: - result["error"] = from_union([from_str, from_none], self.error) + result["id"] = from_str(self.id) return result -class PlatformReportListParamsOrder(Enum): - """The order of the paginated items""" +class MessengerInitiateRequest: + page_id: str + """The Facebook Page ID sending the message""" - ASC = "asc" - DESC = "desc" + recipient_id: str + """The Messenger recipient PSID from a prior interaction""" + text: str + """The free-form text message to send while Meta allows messaging this recipient""" -class PlatformReportListParams: - cursor: Optional[str] - """The cursor to use for pagination""" + def __init__(self, page_id: str, recipient_id: str, text: str) -> None: + self.page_id = page_id + self.recipient_id = recipient_id + self.text = text - order: Optional[PlatformReportListParamsOrder] - """The order of the paginated items""" + @staticmethod + def from_dict(obj: Any) -> 'MessengerInitiateRequest': + assert isinstance(obj, dict) + page_id = from_str(obj.get("pageId")) + recipient_id = from_str(obj.get("recipientId")) + text = from_str(obj.get("text")) + return MessengerInitiateRequest(page_id, recipient_id, text) - take: Optional[int] - """The number of items to retrieve""" + def to_dict(self) -> dict: + result: dict = {} + result["pageId"] = from_str(self.page_id) + result["recipientId"] = from_str(self.recipient_id) + result["text"] = from_str(self.text) + return result - def __init__(self, cursor: Optional[str], order: Optional[PlatformReportListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.order = order - self.take = take + +class MessengerInitiateResponse: + id: str + """The ID of the initiated integration""" + + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'PlatformReportListParams': + def from_dict(obj: Any) -> 'MessengerInitiateResponse': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - order = from_union([PlatformReportListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return PlatformReportListParams(cursor, order, take) + id = from_str(obj.get("id")) + return MessengerInitiateResponse(id) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(PlatformReportListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["id"] = from_str(self.id) return result -class PlatformReportListResponseItem: - """Instance list properties""" +class InstagramInitiateRequest: + instagram_user_id: str + """The Instagram professional account ID sending the message""" - created_at: float - """The timestamp (ms) when the instance was created""" + recipient_id: str + """The Instagram recipient ID from a prior interaction""" - description: Optional[str] - """The associated description""" + text: str + """The free-form text message to send while Meta allows messaging this recipient""" - id: str - """The instance ID""" + def __init__(self, instagram_user_id: str, recipient_id: str, text: str) -> None: + self.instagram_user_id = instagram_user_id + self.recipient_id = recipient_id + self.text = text - meta: Optional[Dict[str, Any]] - """Meta data information""" + @staticmethod + def from_dict(obj: Any) -> 'InstagramInitiateRequest': + assert isinstance(obj, dict) + instagram_user_id = from_str(obj.get("instagramUserId")) + recipient_id = from_str(obj.get("recipientId")) + text = from_str(obj.get("text")) + return InstagramInitiateRequest(instagram_user_id, recipient_id, text) - name: Optional[str] - """The associated name""" + def to_dict(self) -> dict: + result: dict = {} + result["instagramUserId"] = from_str(self.instagram_user_id) + result["recipientId"] = from_str(self.recipient_id) + result["text"] = from_str(self.text) + return result - updated_at: float - """The timestamp (ms) when the instance was updated""" - def __init__(self, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: - self.created_at = created_at - self.description = description +class InstagramInitiateResponse: + id: str + """The ID of the initiated integration""" + + def __init__(self, id: str) -> None: self.id = id - self.meta = meta - self.name = name - self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'PlatformReportListResponseItem': + def from_dict(obj: Any) -> 'InstagramInitiateResponse': assert isinstance(obj, dict) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformReportListResponseItem(created_at, description, id, meta, name, updated_at) + return InstagramInitiateResponse(id) def to_dict(self) -> dict: result: dict = {} - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - result["updatedAt"] = to_float(self.updated_at) return result -class PlatformReportListResponse: - items: List[PlatformReportListResponseItem] +class GooglechatInitiateRequest: + space: Optional[str] + """The Google Chat space resource name to send to, such as spaces/AAAA..., or a Google Chat + user identifier for a direct message + """ + text: str + """The text message to send to the Google Chat space""" - def __init__(self, items: List[PlatformReportListResponseItem]) -> None: - self.items = items + def __init__(self, space: Optional[str], text: str) -> None: + self.space = space + self.text = text @staticmethod - def from_dict(obj: Any) -> 'PlatformReportListResponse': + def from_dict(obj: Any) -> 'GooglechatInitiateRequest': assert isinstance(obj, dict) - items = from_list(PlatformReportListResponseItem.from_dict, obj.get("items")) - return PlatformReportListResponse(items) + space = from_union([from_str, from_none], obj.get("space")) + text = from_str(obj.get("text")) + return GooglechatInitiateRequest(space, text) def to_dict(self) -> dict: result: dict = {} - result["items"] = from_list(lambda x: to_class(PlatformReportListResponseItem, x), self.items) + if self.space is not None: + result["space"] = from_union([from_str, from_none], self.space) + result["text"] = from_str(self.text) return result -class PlatformReportListStreamItemData: - """Instance list properties""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - description: Optional[str] - """The associated description""" - +class GooglechatInitiateResponse: id: str - """The instance ID""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: Optional[str] - """The associated name""" - - updated_at: float - """The timestamp (ms) when the instance was updated""" + """The ID of the initiated integration""" - def __init__(self, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: - self.created_at = created_at - self.description = description + def __init__(self, id: str) -> None: self.id = id - self.meta = meta - self.name = name - self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'PlatformReportListStreamItemData': + def from_dict(obj: Any) -> 'GooglechatInitiateResponse': assert isinstance(obj, dict) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformReportListStreamItemData(created_at, description, id, meta, name, updated_at) + return GooglechatInitiateResponse(id) def to_dict(self) -> dict: result: dict = {} - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - result["updatedAt"] = to_float(self.updated_at) return result -class PlatformReportListStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - +class EmailInitiateRequest: + email: str + """The email address to use for the conversation""" -class PlatformReportListStreamItem: - data: PlatformReportListStreamItemData - """Instance list properties""" + subject: str + """The subject of the email""" - type: PlatformReportListStreamItemType - """The type of event""" + text: str + """The text instruction to use to initiate the conversation""" - def __init__(self, data: PlatformReportListStreamItemData, type: PlatformReportListStreamItemType) -> None: - self.data = data - self.type = type + def __init__(self, email: str, subject: str, text: str) -> None: + self.email = email + self.subject = subject + self.text = text @staticmethod - def from_dict(obj: Any) -> 'PlatformReportListStreamItem': + def from_dict(obj: Any) -> 'EmailInitiateRequest': assert isinstance(obj, dict) - data = PlatformReportListStreamItemData.from_dict(obj.get("data")) - type = PlatformReportListStreamItemType(obj.get("type")) - return PlatformReportListStreamItem(data, type) + email = from_str(obj.get("email")) + subject = from_str(obj.get("subject")) + text = from_str(obj.get("text")) + return EmailInitiateRequest(email, subject, text) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(PlatformReportListStreamItemData, self.data) - result["type"] = to_enum(PlatformReportListStreamItemType, self.type) + result["email"] = from_str(self.email) + result["subject"] = from_str(self.subject) + result["text"] = from_str(self.text) return result -class TaskWorkflowEventsSubscribeParams: - task_id: str - """The ID of the task""" +class EmailInitiateResponse: + id: str + """The ID of the initiated integration""" - def __init__(self, task_id: str) -> None: - self.task_id = task_id + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'TaskWorkflowEventsSubscribeParams': + def from_dict(obj: Any) -> 'EmailInitiateResponse': assert isinstance(obj, dict) - task_id = from_str(obj.get("taskId")) - return TaskWorkflowEventsSubscribeParams(task_id) + id = from_str(obj.get("id")) + return EmailInitiateResponse(id) def to_dict(self) -> dict: result: dict = {} - result["taskId"] = from_str(self.task_id) + result["id"] = from_str(self.id) return result -class TaskWorkflowEventsSubscribeRequest: - history_length: Optional[int] - """Number of recent workflow events to replay before live events.""" +class DiscordInitiateRequest: + channel_id: str + """The Discord channel ID to send to""" - def __init__(self, history_length: Optional[int]) -> None: - self.history_length = history_length + text: str + """The text message to send to the Discord channel""" + + def __init__(self, channel_id: str, text: str) -> None: + self.channel_id = channel_id + self.text = text @staticmethod - def from_dict(obj: Any) -> 'TaskWorkflowEventsSubscribeRequest': + def from_dict(obj: Any) -> 'DiscordInitiateRequest': assert isinstance(obj, dict) - history_length = from_union([from_int, from_none], obj.get("historyLength")) - return TaskWorkflowEventsSubscribeRequest(history_length) + channel_id = from_str(obj.get("channelId")) + text = from_str(obj.get("text")) + return DiscordInitiateRequest(channel_id, text) def to_dict(self) -> dict: result: dict = {} - if self.history_length is not None: - result["historyLength"] = from_union([from_int, from_none], self.history_length) + result["channelId"] = from_str(self.channel_id) + result["text"] = from_str(self.text) return result -class PurpleKind(Enum): - """The action kind""" +class DiscordInitiateResponse: + id: str + """The ID of the initiated integration""" - DATASET = "dataset" - FUNCTION = "function" - SKILLSET = "skillset" + def __init__(self, id: str) -> None: + self.id = id + @staticmethod + def from_dict(obj: Any) -> 'DiscordInitiateResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return DiscordInitiateResponse(id) -class PurpleAction: - """The action associated with the operation""" + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result - icon: Optional[str] - """The action icon""" - id: str - """The action ID""" +class UserListParamsOrder(Enum): + """The order of the paginated items""" - input: Any - """The action input""" + ASC = "asc" + DESC = "desc" - justification: Optional[str] - """The action justification""" - kind: Optional[PurpleKind] - """The action kind""" +class UserListParams: + cursor: Optional[str] + """The cursor to use for pagination""" - name: Optional[str] - """The action name""" + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the users by metadata""" - def __init__(self, icon: Optional[str], id: str, input: Any, justification: Optional[str], kind: Optional[PurpleKind], name: Optional[str]) -> None: - self.icon = icon - self.id = id - self.input = input - self.justification = justification - self.kind = kind - self.name = name + order: Optional[UserListParamsOrder] + """The order of the paginated items""" + + take: Optional[int] + """The number of items to retrieve""" + + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[UserListParamsOrder], take: Optional[int]) -> None: + self.cursor = cursor + self.meta = meta + self.order = order + self.take = take @staticmethod - def from_dict(obj: Any) -> 'PurpleAction': + def from_dict(obj: Any) -> 'UserListParams': assert isinstance(obj, dict) - icon = from_union([from_str, from_none], obj.get("icon")) - id = from_str(obj.get("id")) - input = obj.get("input") - justification = from_union([from_str, from_none], obj.get("justification")) - kind = from_union([PurpleKind, from_none], obj.get("kind")) - name = from_union([from_str, from_none], obj.get("name")) - return PurpleAction(icon, id, input, justification, kind, name) + cursor = from_union([from_str, from_none], obj.get("cursor")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([UserListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return UserListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} - if self.icon is not None: - result["icon"] = from_union([from_str, from_none], self.icon) - result["id"] = from_str(self.id) - if self.input is not None: - result["input"] = self.input - if self.justification is not None: - result["justification"] = from_union([from_str, from_none], self.justification) - if self.kind is not None: - result["kind"] = from_union([lambda x: to_enum(PurpleKind, x), from_none], self.kind) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(UserListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class TaskWorkflowEventsSubscribeStreamItemData: - """The data for the operation begin event - - The data for the operation end event - - The data for the error event - """ - action: Optional[PurpleAction] - """The action associated with the operation""" +class PurpleDatabase: + """The database limits""" - id: Optional[str] - """The operation ID""" + abilities: Optional[float] + """The abilities limit""" - code: Optional[str] - """The error code""" + datasets: Optional[float] + """The datasets limit""" - message: Optional[str] - """The error message""" + files: Optional[float] + """The files limit""" - def __init__(self, action: Optional[PurpleAction], id: Optional[str], code: Optional[str], message: Optional[str]) -> None: - self.action = action - self.id = id - self.code = code - self.message = message + records: Optional[float] + """The records limit""" + + skillsets: Optional[float] + """The skillsets limit""" + + def __init__(self, abilities: Optional[float], datasets: Optional[float], files: Optional[float], records: Optional[float], skillsets: Optional[float]) -> None: + self.abilities = abilities + self.datasets = datasets + self.files = files + self.records = records + self.skillsets = skillsets @staticmethod - def from_dict(obj: Any) -> 'TaskWorkflowEventsSubscribeStreamItemData': + def from_dict(obj: Any) -> 'PurpleDatabase': assert isinstance(obj, dict) - action = from_union([PurpleAction.from_dict, from_none], obj.get("action")) - id = from_union([from_str, from_none], obj.get("id")) - code = from_union([from_str, from_none], obj.get("code")) - message = from_union([from_str, from_none], obj.get("message")) - return TaskWorkflowEventsSubscribeStreamItemData(action, id, code, message) + abilities = from_union([from_float, from_none], obj.get("abilities")) + datasets = from_union([from_float, from_none], obj.get("datasets")) + files = from_union([from_float, from_none], obj.get("files")) + records = from_union([from_float, from_none], obj.get("records")) + skillsets = from_union([from_float, from_none], obj.get("skillsets")) + return PurpleDatabase(abilities, datasets, files, records, skillsets) def to_dict(self) -> dict: result: dict = {} - if self.action is not None: - result["action"] = from_union([lambda x: to_class(PurpleAction, x), from_none], self.action) - if self.id is not None: - result["id"] = from_union([from_str, from_none], self.id) - if self.code is not None: - result["code"] = from_union([from_str, from_none], self.code) - if self.message is not None: - result["message"] = from_union([from_str, from_none], self.message) + if self.abilities is not None: + result["abilities"] = from_union([to_float, from_none], self.abilities) + if self.datasets is not None: + result["datasets"] = from_union([to_float, from_none], self.datasets) + if self.files is not None: + result["files"] = from_union([to_float, from_none], self.files) + if self.records is not None: + result["records"] = from_union([to_float, from_none], self.records) + if self.skillsets is not None: + result["skillsets"] = from_union([to_float, from_none], self.skillsets) return result -class TaskWorkflowEventsSubscribeStreamItemType(Enum): - """The type of event""" - - ERROR = "error" - OPERATION_BEGIN = "operationBegin" - OPERATION_END = "operationEnd" +class ItemLimits: + """Limits information""" + conversations: Optional[float] + """The conversations limit""" -class TaskWorkflowEventsSubscribeStreamItem: - """An item in the task workflow subscription response""" + database: Optional[PurpleDatabase] + """The database limits""" - created_at: float - """The event creation timestamp in milliseconds since the Unix epoch""" + messages: Optional[float] + """The messages limit""" - data: TaskWorkflowEventsSubscribeStreamItemData - """The data for the operation begin event - - The data for the operation end event - - The data for the error event - """ - type: TaskWorkflowEventsSubscribeStreamItemType - """The type of event""" + tokens: Optional[float] + """The tokens limit""" - def __init__(self, created_at: float, data: TaskWorkflowEventsSubscribeStreamItemData, type: TaskWorkflowEventsSubscribeStreamItemType) -> None: - self.created_at = created_at - self.data = data - self.type = type + def __init__(self, conversations: Optional[float], database: Optional[PurpleDatabase], messages: Optional[float], tokens: Optional[float]) -> None: + self.conversations = conversations + self.database = database + self.messages = messages + self.tokens = tokens @staticmethod - def from_dict(obj: Any) -> 'TaskWorkflowEventsSubscribeStreamItem': + def from_dict(obj: Any) -> 'ItemLimits': assert isinstance(obj, dict) - created_at = from_float(obj.get("createdAt")) - data = TaskWorkflowEventsSubscribeStreamItemData.from_dict(obj.get("data")) - type = TaskWorkflowEventsSubscribeStreamItemType(obj.get("type")) - return TaskWorkflowEventsSubscribeStreamItem(created_at, data, type) + conversations = from_union([from_float, from_none], obj.get("conversations")) + database = from_union([PurpleDatabase.from_dict, from_none], obj.get("database")) + messages = from_union([from_float, from_none], obj.get("messages")) + tokens = from_union([from_float, from_none], obj.get("tokens")) + return ItemLimits(conversations, database, messages, tokens) def to_dict(self) -> dict: result: dict = {} - result["createdAt"] = to_float(self.created_at) - result["data"] = to_class(TaskWorkflowEventsSubscribeStreamItemData, self.data) - result["type"] = to_enum(TaskWorkflowEventsSubscribeStreamItemType, self.type) + if self.conversations is not None: + result["conversations"] = from_union([to_float, from_none], self.conversations) + if self.database is not None: + result["database"] = from_union([lambda x: to_class(PurpleDatabase, x), from_none], self.database) + if self.messages is not None: + result["messages"] = from_union([to_float, from_none], self.messages) + if self.tokens is not None: + result["tokens"] = from_union([to_float, from_none], self.tokens) return result -class BlueprintBulletinCreateParams: - blueprint_id: str - """The ID of the blueprint to post to""" - - def __init__(self, blueprint_id: str) -> None: - self.blueprint_id = blueprint_id - - @staticmethod - def from_dict(obj: Any) -> 'BlueprintBulletinCreateParams': - assert isinstance(obj, dict) - blueprint_id = from_str(obj.get("blueprintId")) - return BlueprintBulletinCreateParams(blueprint_id) - - def to_dict(self) -> dict: - result: dict = {} - result["blueprintId"] = from_str(self.blueprint_id) - return result - +class UserListResponseItem: + """Instance list properties""" -class BlueprintBulletinCreateRequest: - text: str - """The message to post to the shared board""" + created_at: float + """The timestamp (ms) when the instance was created""" - ttl: Optional[float] - """Optional time-to-live in seconds before the bulletin expires""" + description: Optional[str] + """The associated description""" - def __init__(self, text: str, ttl: Optional[float]) -> None: - self.text = text - self.ttl = ttl + email: Optional[str] + """The email of the user""" - @staticmethod - def from_dict(obj: Any) -> 'BlueprintBulletinCreateRequest': - assert isinstance(obj, dict) - text = from_str(obj.get("text")) - ttl = from_union([from_float, from_none], obj.get("ttl")) - return BlueprintBulletinCreateRequest(text, ttl) + id: str + """The instance ID""" - def to_dict(self) -> dict: - result: dict = {} - result["text"] = from_str(self.text) - if self.ttl is not None: - result["ttl"] = from_union([to_float, from_none], self.ttl) - return result + image: Optional[str] + """The image of the user""" + limits: Optional[ItemLimits] + """Limits information""" -class Bulletin: - author: Optional[str] - """The display name of the author who posted the bulletin (a bot or a user)""" + meta: Optional[Dict[str, Any]] + """Meta data information""" - bot_id: Optional[str] - """The ID of the bot the bulletin is associated with, when posted by a bot""" + name: Optional[str] + """The associated name""" - created_at: float - expires_at: float - id: str - text: str + updated_at: float + """The timestamp (ms) when the instance was updated""" - def __init__(self, author: Optional[str], bot_id: Optional[str], created_at: float, expires_at: float, id: str, text: str) -> None: - self.author = author - self.bot_id = bot_id + def __init__(self, created_at: float, description: Optional[str], email: Optional[str], id: str, image: Optional[str], limits: Optional[ItemLimits], meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: self.created_at = created_at - self.expires_at = expires_at + self.description = description + self.email = email self.id = id - self.text = text + self.image = image + self.limits = limits + self.meta = meta + self.name = name + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'Bulletin': + def from_dict(obj: Any) -> 'UserListResponseItem': assert isinstance(obj, dict) - author = from_union([from_str, from_none], obj.get("author")) - bot_id = from_union([from_str, from_none], obj.get("botId")) created_at = from_float(obj.get("createdAt")) - expires_at = from_float(obj.get("expiresAt")) + description = from_union([from_str, from_none], obj.get("description")) + email = from_union([from_str, from_none], obj.get("email")) id = from_str(obj.get("id")) - text = from_str(obj.get("text")) - return Bulletin(author, bot_id, created_at, expires_at, id, text) + image = from_union([from_str, from_none], obj.get("image")) + limits = from_union([ItemLimits.from_dict, from_none], obj.get("limits")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + updated_at = from_float(obj.get("updatedAt")) + return UserListResponseItem(created_at, description, email, id, image, limits, meta, name, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.author is not None: - result["author"] = from_union([from_str, from_none], self.author) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) result["createdAt"] = to_float(self.created_at) - result["expiresAt"] = to_float(self.expires_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.email is not None: + result["email"] = from_union([from_str, from_none], self.email) result["id"] = from_str(self.id) - result["text"] = from_str(self.text) + if self.image is not None: + result["image"] = from_union([from_str, from_none], self.image) + if self.limits is not None: + result["limits"] = from_union([lambda x: to_class(ItemLimits, x), from_none], self.limits) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + result["updatedAt"] = to_float(self.updated_at) return result -class BlueprintBulletinCreateResponse: - bulletin: Bulletin - id: str - """The ID of the blueprint""" +class UserListResponse: + cursor: str + """Cursor for fetching the next page""" - def __init__(self, bulletin: Bulletin, id: str) -> None: - self.bulletin = bulletin - self.id = id + items: List[UserListResponseItem] + + def __init__(self, cursor: str, items: List[UserListResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'BlueprintBulletinCreateResponse': + def from_dict(obj: Any) -> 'UserListResponse': assert isinstance(obj, dict) - bulletin = Bulletin.from_dict(obj.get("bulletin")) - id = from_str(obj.get("id")) - return BlueprintBulletinCreateResponse(bulletin, id) + cursor = from_str(obj.get("cursor")) + items = from_list(UserListResponseItem.from_dict, obj.get("items")) + return UserListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["bulletin"] = to_class(Bulletin, self.bulletin) - result["id"] = from_str(self.id) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(UserListResponseItem, x), self.items) return result -class BlueprintBulletinListParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" +class FluffyDatabase: + """The database limits""" + abilities: Optional[float] + """The abilities limit""" -class BlueprintBulletinListParams: - blueprint_id: str - """The ID of the blueprint to query""" + datasets: Optional[float] + """The datasets limit""" - cursor: Optional[str] - """The cursor to use for pagination""" + files: Optional[float] + """The files limit""" - order: Optional[BlueprintBulletinListParamsOrder] - """The order of the paginated items""" + records: Optional[float] + """The records limit""" - take: Optional[int] - """The number of items to retrieve""" + skillsets: Optional[float] + """The skillsets limit""" - def __init__(self, blueprint_id: str, cursor: Optional[str], order: Optional[BlueprintBulletinListParamsOrder], take: Optional[int]) -> None: - self.blueprint_id = blueprint_id - self.cursor = cursor - self.order = order - self.take = take + def __init__(self, abilities: Optional[float], datasets: Optional[float], files: Optional[float], records: Optional[float], skillsets: Optional[float]) -> None: + self.abilities = abilities + self.datasets = datasets + self.files = files + self.records = records + self.skillsets = skillsets @staticmethod - def from_dict(obj: Any) -> 'BlueprintBulletinListParams': + def from_dict(obj: Any) -> 'FluffyDatabase': assert isinstance(obj, dict) - blueprint_id = from_str(obj.get("blueprintId")) - cursor = from_union([from_str, from_none], obj.get("cursor")) - order = from_union([BlueprintBulletinListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return BlueprintBulletinListParams(blueprint_id, cursor, order, take) + abilities = from_union([from_float, from_none], obj.get("abilities")) + datasets = from_union([from_float, from_none], obj.get("datasets")) + files = from_union([from_float, from_none], obj.get("files")) + records = from_union([from_float, from_none], obj.get("records")) + skillsets = from_union([from_float, from_none], obj.get("skillsets")) + return FluffyDatabase(abilities, datasets, files, records, skillsets) def to_dict(self) -> dict: result: dict = {} - result["blueprintId"] = from_str(self.blueprint_id) - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(BlueprintBulletinListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + if self.abilities is not None: + result["abilities"] = from_union([to_float, from_none], self.abilities) + if self.datasets is not None: + result["datasets"] = from_union([to_float, from_none], self.datasets) + if self.files is not None: + result["files"] = from_union([to_float, from_none], self.files) + if self.records is not None: + result["records"] = from_union([to_float, from_none], self.records) + if self.skillsets is not None: + result["skillsets"] = from_union([to_float, from_none], self.skillsets) return result -class BlueprintBulletinListResponseItem: - author: Optional[str] - """The display name of the author who posted the bulletin (a bot or a user)""" - - bot_id: Optional[str] - """The ID of the bot the bulletin is associated with, when posted by a bot""" +class DataLimits: + """Limits information""" - created_at: float - """The epoch millisecond timestamp when the bulletin was created""" + conversations: Optional[float] + """The conversations limit""" - expires_at: float - """The epoch millisecond timestamp when the bulletin expires""" + database: Optional[FluffyDatabase] + """The database limits""" - id: str - """The unique identifier of the bulletin""" + messages: Optional[float] + """The messages limit""" - text: str - """The message body""" + tokens: Optional[float] + """The tokens limit""" - def __init__(self, author: Optional[str], bot_id: Optional[str], created_at: float, expires_at: float, id: str, text: str) -> None: - self.author = author - self.bot_id = bot_id - self.created_at = created_at - self.expires_at = expires_at - self.id = id - self.text = text + def __init__(self, conversations: Optional[float], database: Optional[FluffyDatabase], messages: Optional[float], tokens: Optional[float]) -> None: + self.conversations = conversations + self.database = database + self.messages = messages + self.tokens = tokens @staticmethod - def from_dict(obj: Any) -> 'BlueprintBulletinListResponseItem': + def from_dict(obj: Any) -> 'DataLimits': assert isinstance(obj, dict) - author = from_union([from_str, from_none], obj.get("author")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - created_at = from_float(obj.get("createdAt")) - expires_at = from_float(obj.get("expiresAt")) - id = from_str(obj.get("id")) - text = from_str(obj.get("text")) - return BlueprintBulletinListResponseItem(author, bot_id, created_at, expires_at, id, text) + conversations = from_union([from_float, from_none], obj.get("conversations")) + database = from_union([FluffyDatabase.from_dict, from_none], obj.get("database")) + messages = from_union([from_float, from_none], obj.get("messages")) + tokens = from_union([from_float, from_none], obj.get("tokens")) + return DataLimits(conversations, database, messages, tokens) def to_dict(self) -> dict: result: dict = {} - if self.author is not None: - result["author"] = from_union([from_str, from_none], self.author) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - result["createdAt"] = to_float(self.created_at) - result["expiresAt"] = to_float(self.expires_at) - result["id"] = from_str(self.id) - result["text"] = from_str(self.text) + if self.conversations is not None: + result["conversations"] = from_union([to_float, from_none], self.conversations) + if self.database is not None: + result["database"] = from_union([lambda x: to_class(FluffyDatabase, x), from_none], self.database) + if self.messages is not None: + result["messages"] = from_union([to_float, from_none], self.messages) + if self.tokens is not None: + result["tokens"] = from_union([to_float, from_none], self.tokens) return result -class BlueprintBulletinListResponse: - cursor: str - """Cursor for fetching the next page""" - - items: List[BlueprintBulletinListResponseItem] - - def __init__(self, cursor: str, items: List[BlueprintBulletinListResponseItem]) -> None: - self.cursor = cursor - self.items = items +class UserListStreamItemData: + """Instance list properties""" - @staticmethod - def from_dict(obj: Any) -> 'BlueprintBulletinListResponse': - assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(BlueprintBulletinListResponseItem.from_dict, obj.get("items")) - return BlueprintBulletinListResponse(cursor, items) + created_at: float + """The timestamp (ms) when the instance was created""" - def to_dict(self) -> dict: - result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(BlueprintBulletinListResponseItem, x), self.items) - return result + description: Optional[str] + """The associated description""" + email: Optional[str] + """The email of the user""" -class BlueprintBulletinListStreamItemData: - author: Optional[str] - """The display name of the author who posted the bulletin (a bot or a user)""" + id: str + """The instance ID""" - bot_id: Optional[str] - """The ID of the bot the bulletin is associated with, when posted by a bot""" + image: Optional[str] + """The image of the user""" - created_at: float - """The epoch millisecond timestamp when the bulletin was created""" + limits: Optional[DataLimits] + """Limits information""" - expires_at: float - """The epoch millisecond timestamp when the bulletin expires""" + meta: Optional[Dict[str, Any]] + """Meta data information""" - id: str - """The unique identifier of the bulletin""" + name: Optional[str] + """The associated name""" - text: str - """The message body""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - def __init__(self, author: Optional[str], bot_id: Optional[str], created_at: float, expires_at: float, id: str, text: str) -> None: - self.author = author - self.bot_id = bot_id + def __init__(self, created_at: float, description: Optional[str], email: Optional[str], id: str, image: Optional[str], limits: Optional[DataLimits], meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: self.created_at = created_at - self.expires_at = expires_at + self.description = description + self.email = email self.id = id - self.text = text + self.image = image + self.limits = limits + self.meta = meta + self.name = name + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'BlueprintBulletinListStreamItemData': + def from_dict(obj: Any) -> 'UserListStreamItemData': assert isinstance(obj, dict) - author = from_union([from_str, from_none], obj.get("author")) - bot_id = from_union([from_str, from_none], obj.get("botId")) created_at = from_float(obj.get("createdAt")) - expires_at = from_float(obj.get("expiresAt")) + description = from_union([from_str, from_none], obj.get("description")) + email = from_union([from_str, from_none], obj.get("email")) id = from_str(obj.get("id")) - text = from_str(obj.get("text")) - return BlueprintBulletinListStreamItemData(author, bot_id, created_at, expires_at, id, text) + image = from_union([from_str, from_none], obj.get("image")) + limits = from_union([DataLimits.from_dict, from_none], obj.get("limits")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + updated_at = from_float(obj.get("updatedAt")) + return UserListStreamItemData(created_at, description, email, id, image, limits, meta, name, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.author is not None: - result["author"] = from_union([from_str, from_none], self.author) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) result["createdAt"] = to_float(self.created_at) - result["expiresAt"] = to_float(self.expires_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.email is not None: + result["email"] = from_union([from_str, from_none], self.email) result["id"] = from_str(self.id) - result["text"] = from_str(self.text) + if self.image is not None: + result["image"] = from_union([from_str, from_none], self.image) + if self.limits is not None: + result["limits"] = from_union([lambda x: to_class(DataLimits, x), from_none], self.limits) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + result["updatedAt"] = to_float(self.updated_at) return result -class BlueprintBulletinListStreamItemType(Enum): +class UserListStreamItemType(Enum): """The type of event""" ITEM = "item" -class BlueprintBulletinListStreamItem: - data: BlueprintBulletinListStreamItemData - type: BlueprintBulletinListStreamItemType +class UserListStreamItem: + data: UserListStreamItemData + """Instance list properties""" + + type: UserListStreamItemType """The type of event""" - def __init__(self, data: BlueprintBulletinListStreamItemData, type: BlueprintBulletinListStreamItemType) -> None: + def __init__(self, data: UserListStreamItemData, type: UserListStreamItemType) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'BlueprintBulletinListStreamItem': - assert isinstance(obj, dict) - data = BlueprintBulletinListStreamItemData.from_dict(obj.get("data")) - type = BlueprintBulletinListStreamItemType(obj.get("type")) - return BlueprintBulletinListStreamItem(data, type) - - def to_dict(self) -> dict: - result: dict = {} - result["data"] = to_class(BlueprintBulletinListStreamItemData, self.data) - result["type"] = to_enum(BlueprintBulletinListStreamItemType, self.type) - return result - - -class BlueprintCloneParams: - blueprint_id: str - """The ID of the blueprint to clone""" - - def __init__(self, blueprint_id: str) -> None: - self.blueprint_id = blueprint_id - - @staticmethod - def from_dict(obj: Any) -> 'BlueprintCloneParams': - assert isinstance(obj, dict) - blueprint_id = from_str(obj.get("blueprintId")) - return BlueprintCloneParams(blueprint_id) - - def to_dict(self) -> dict: - result: dict = {} - result["blueprintId"] = from_str(self.blueprint_id) - return result - - -class BlueprintCloneResponse: - id: str - """The ID of the cloned blueprint""" - - resources: Dict[str, Any] - """A map of the resources that were cloned""" - - def __init__(self, id: str, resources: Dict[str, Any]) -> None: - self.id = id - self.resources = resources - - @staticmethod - def from_dict(obj: Any) -> 'BlueprintCloneResponse': + def from_dict(obj: Any) -> 'UserListStreamItem': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - resources = from_dict(lambda x: x, obj.get("resources")) - return BlueprintCloneResponse(id, resources) + data = UserListStreamItemData.from_dict(obj.get("data")) + type = UserListStreamItemType(obj.get("type")) + return UserListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) - result["resources"] = from_dict(lambda x: x, self.resources) + result["data"] = to_class(UserListStreamItemData, self.data) + result["type"] = to_enum(UserListStreamItemType, self.type) return result -class BlueprintDeleteParams: - blueprint_id: str - """The ID of the blueprint to delete""" +class TentacledDatabase: + """The database limits""" - def __init__(self, blueprint_id: str) -> None: - self.blueprint_id = blueprint_id + abilities: Optional[float] + """The abilities limit""" - @staticmethod - def from_dict(obj: Any) -> 'BlueprintDeleteParams': - assert isinstance(obj, dict) - blueprint_id = from_str(obj.get("blueprintId")) - return BlueprintDeleteParams(blueprint_id) + datasets: Optional[float] + """The datasets limit""" - def to_dict(self) -> dict: - result: dict = {} - result["blueprintId"] = from_str(self.blueprint_id) - return result + files: Optional[float] + """The files limit""" + records: Optional[float] + """The records limit""" -class BlueprintDeleteRequest: - delete_resources: Optional[bool] - """If true, deletes all resources associated with the blueprint. If false or omitted, only - the blueprint is deleted. - """ + skillsets: Optional[float] + """The skillsets limit""" - def __init__(self, delete_resources: Optional[bool]) -> None: - self.delete_resources = delete_resources + def __init__(self, abilities: Optional[float], datasets: Optional[float], files: Optional[float], records: Optional[float], skillsets: Optional[float]) -> None: + self.abilities = abilities + self.datasets = datasets + self.files = files + self.records = records + self.skillsets = skillsets @staticmethod - def from_dict(obj: Any) -> 'BlueprintDeleteRequest': + def from_dict(obj: Any) -> 'TentacledDatabase': assert isinstance(obj, dict) - delete_resources = from_union([from_bool, from_none], obj.get("deleteResources")) - return BlueprintDeleteRequest(delete_resources) + abilities = from_union([from_float, from_none], obj.get("abilities")) + datasets = from_union([from_float, from_none], obj.get("datasets")) + files = from_union([from_float, from_none], obj.get("files")) + records = from_union([from_float, from_none], obj.get("records")) + skillsets = from_union([from_float, from_none], obj.get("skillsets")) + return TentacledDatabase(abilities, datasets, files, records, skillsets) def to_dict(self) -> dict: result: dict = {} - if self.delete_resources is not None: - result["deleteResources"] = from_union([from_bool, from_none], self.delete_resources) + if self.abilities is not None: + result["abilities"] = from_union([to_float, from_none], self.abilities) + if self.datasets is not None: + result["datasets"] = from_union([to_float, from_none], self.datasets) + if self.files is not None: + result["files"] = from_union([to_float, from_none], self.files) + if self.records is not None: + result["records"] = from_union([to_float, from_none], self.records) + if self.skillsets is not None: + result["skillsets"] = from_union([to_float, from_none], self.skillsets) return result -class BlueprintDeleteResponse: - id: str - """The ID of the deleted blueprint""" - - def __init__(self, id: str) -> None: - self.id = id +class UserCreateRequestLimits: + """Limits information""" - @staticmethod - def from_dict(obj: Any) -> 'BlueprintDeleteResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return BlueprintDeleteResponse(id) + conversations: Optional[float] + """The conversations limit""" - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result + database: Optional[TentacledDatabase] + """The database limits""" + messages: Optional[float] + """The messages limit""" -class BlueprintFetchParams: - blueprint_id: str - """The ID of the blueprint to retrieve""" + tokens: Optional[float] + """The tokens limit""" - def __init__(self, blueprint_id: str) -> None: - self.blueprint_id = blueprint_id + def __init__(self, conversations: Optional[float], database: Optional[TentacledDatabase], messages: Optional[float], tokens: Optional[float]) -> None: + self.conversations = conversations + self.database = database + self.messages = messages + self.tokens = tokens @staticmethod - def from_dict(obj: Any) -> 'BlueprintFetchParams': + def from_dict(obj: Any) -> 'UserCreateRequestLimits': assert isinstance(obj, dict) - blueprint_id = from_str(obj.get("blueprintId")) - return BlueprintFetchParams(blueprint_id) + conversations = from_union([from_float, from_none], obj.get("conversations")) + database = from_union([TentacledDatabase.from_dict, from_none], obj.get("database")) + messages = from_union([from_float, from_none], obj.get("messages")) + tokens = from_union([from_float, from_none], obj.get("tokens")) + return UserCreateRequestLimits(conversations, database, messages, tokens) def to_dict(self) -> dict: result: dict = {} - result["blueprintId"] = from_str(self.blueprint_id) + if self.conversations is not None: + result["conversations"] = from_union([to_float, from_none], self.conversations) + if self.database is not None: + result["database"] = from_union([lambda x: to_class(TentacledDatabase, x), from_none], self.database) + if self.messages is not None: + result["messages"] = from_union([to_float, from_none], self.messages) + if self.tokens is not None: + result["tokens"] = from_union([to_float, from_none], self.tokens) return result -class BlueprintFetchResponseVisibility(Enum): - """The blueprint visibility""" - - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" - - -class BlueprintFetchResponse: - """Instance list properties""" +class UserCreateRequest: + """Instance crud properties""" alias: Optional[str] """The unique alias for the instance""" - created_at: float - """The timestamp (ms) when the instance was created""" - description: Optional[str] """The associated description""" - id: str - """The instance ID""" + email: Optional[str] + """The email of the user""" + + image: Optional[str] + """The image of the user""" + + limits: Optional[UserCreateRequestLimits] + """Limits information""" meta: Optional[Dict[str, Any]] """Meta data information""" @@ -1606,212 +1704,178 @@ class BlueprintFetchResponse: name: Optional[str] """The associated name""" - updated_at: float - """The timestamp (ms) when the instance was updated""" - - visibility: Optional[BlueprintFetchResponseVisibility] - """The blueprint visibility""" - - def __init__(self, alias: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float, visibility: Optional[BlueprintFetchResponseVisibility]) -> None: + def __init__(self, alias: Optional[str], description: Optional[str], email: Optional[str], image: Optional[str], limits: Optional[UserCreateRequestLimits], meta: Optional[Dict[str, Any]], name: Optional[str]) -> None: self.alias = alias - self.created_at = created_at self.description = description - self.id = id + self.email = email + self.image = image + self.limits = limits self.meta = meta self.name = name - self.updated_at = updated_at - self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'BlueprintFetchResponse': + def from_dict(obj: Any) -> 'UserCreateRequest': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) - created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) + email = from_union([from_str, from_none], obj.get("email")) + image = from_union([from_str, from_none], obj.get("image")) + limits = from_union([UserCreateRequestLimits.from_dict, from_none], obj.get("limits")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - updated_at = from_float(obj.get("updatedAt")) - visibility = from_union([BlueprintFetchResponseVisibility, from_none], obj.get("visibility")) - return BlueprintFetchResponse(alias, created_at, description, id, meta, name, updated_at, visibility) + return UserCreateRequest(alias, description, email, image, limits, meta, name) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) + if self.email is not None: + result["email"] = from_union([from_str, from_none], self.email) + if self.image is not None: + result["image"] = from_union([from_str, from_none], self.image) + if self.limits is not None: + result["limits"] = from_union([lambda x: to_class(UserCreateRequestLimits, x), from_none], self.limits) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - result["updatedAt"] = to_float(self.updated_at) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(BlueprintFetchResponseVisibility, x), from_none], self.visibility) - return result - - -class BlueprintResourcesExportParams: - blueprint_id: str - """The ID of the blueprint to export""" - - def __init__(self, blueprint_id: str) -> None: - self.blueprint_id = blueprint_id - - @staticmethod - def from_dict(obj: Any) -> 'BlueprintResourcesExportParams': - assert isinstance(obj, dict) - blueprint_id = from_str(obj.get("blueprintId")) - return BlueprintResourcesExportParams(blueprint_id) - - def to_dict(self) -> dict: - result: dict = {} - result["blueprintId"] = from_str(self.blueprint_id) return result -class BlueprintResourcesExportResponse: +class UserCreateResponse: id: str - """The ID of the blueprint""" - - resources: Dict[str, Any] - """A map of the resources by category""" + """The ID of the created user""" - def __init__(self, id: str, resources: Dict[str, Any]) -> None: + def __init__(self, id: str) -> None: self.id = id - self.resources = resources @staticmethod - def from_dict(obj: Any) -> 'BlueprintResourcesExportResponse': + def from_dict(obj: Any) -> 'UserCreateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - resources = from_dict(lambda x: x, obj.get("resources")) - return BlueprintResourcesExportResponse(id, resources) + return UserCreateResponse(id) def to_dict(self) -> dict: result: dict = {} result["id"] = from_str(self.id) - result["resources"] = from_dict(lambda x: x, self.resources) return result -class BlueprintResourcesImportParams: - blueprint_id: str +class UserUpdateParams: + user_id: str + """The ID of the user""" - def __init__(self, blueprint_id: str) -> None: - self.blueprint_id = blueprint_id + def __init__(self, user_id: str) -> None: + self.user_id = user_id @staticmethod - def from_dict(obj: Any) -> 'BlueprintResourcesImportParams': + def from_dict(obj: Any) -> 'UserUpdateParams': assert isinstance(obj, dict) - blueprint_id = from_str(obj.get("blueprintId")) - return BlueprintResourcesImportParams(blueprint_id) + user_id = from_str(obj.get("userId")) + return UserUpdateParams(user_id) def to_dict(self) -> dict: result: dict = {} - result["blueprintId"] = from_str(self.blueprint_id) + result["userId"] = from_str(self.user_id) return result -class BlueprintResourcesImportRequest: - ensure: Optional[bool] - """When true and the blueprint is addressed by the caller's own @alias, it is created if it - does not exist yet (idempotent provision). Ignored for a raw id, which still 404s on miss. - """ - resources: Dict[str, Any] +class StickyDatabase: + """The database limits""" - def __init__(self, ensure: Optional[bool], resources: Dict[str, Any]) -> None: - self.ensure = ensure - self.resources = resources + abilities: Optional[float] + """The abilities limit""" - @staticmethod - def from_dict(obj: Any) -> 'BlueprintResourcesImportRequest': - assert isinstance(obj, dict) - ensure = from_union([from_bool, from_none], obj.get("ensure")) - resources = from_dict(lambda x: x, obj.get("resources")) - return BlueprintResourcesImportRequest(ensure, resources) + datasets: Optional[float] + """The datasets limit""" - def to_dict(self) -> dict: - result: dict = {} - if self.ensure is not None: - result["ensure"] = from_union([from_bool, from_none], self.ensure) - result["resources"] = from_dict(lambda x: x, self.resources) - return result + files: Optional[float] + """The files limit""" + records: Optional[float] + """The records limit""" -class BlueprintResourceListParams: - blueprint_id: str - """The ID of the blueprint to clone""" + skillsets: Optional[float] + """The skillsets limit""" - def __init__(self, blueprint_id: str) -> None: - self.blueprint_id = blueprint_id + def __init__(self, abilities: Optional[float], datasets: Optional[float], files: Optional[float], records: Optional[float], skillsets: Optional[float]) -> None: + self.abilities = abilities + self.datasets = datasets + self.files = files + self.records = records + self.skillsets = skillsets @staticmethod - def from_dict(obj: Any) -> 'BlueprintResourceListParams': + def from_dict(obj: Any) -> 'StickyDatabase': assert isinstance(obj, dict) - blueprint_id = from_str(obj.get("blueprintId")) - return BlueprintResourceListParams(blueprint_id) + abilities = from_union([from_float, from_none], obj.get("abilities")) + datasets = from_union([from_float, from_none], obj.get("datasets")) + files = from_union([from_float, from_none], obj.get("files")) + records = from_union([from_float, from_none], obj.get("records")) + skillsets = from_union([from_float, from_none], obj.get("skillsets")) + return StickyDatabase(abilities, datasets, files, records, skillsets) def to_dict(self) -> dict: result: dict = {} - result["blueprintId"] = from_str(self.blueprint_id) + if self.abilities is not None: + result["abilities"] = from_union([to_float, from_none], self.abilities) + if self.datasets is not None: + result["datasets"] = from_union([to_float, from_none], self.datasets) + if self.files is not None: + result["files"] = from_union([to_float, from_none], self.files) + if self.records is not None: + result["records"] = from_union([to_float, from_none], self.records) + if self.skillsets is not None: + result["skillsets"] = from_union([to_float, from_none], self.skillsets) return result -class BlueprintResourceListResponse: - id: str - """The ID of the blueprint""" - - resources: Dict[str, Any] - """A map of the resources""" - - def __init__(self, id: str, resources: Dict[str, Any]) -> None: - self.id = id - self.resources = resources +class UserUpdateRequestLimits: + """Limits information""" - @staticmethod - def from_dict(obj: Any) -> 'BlueprintResourceListResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - resources = from_dict(lambda x: x, obj.get("resources")) - return BlueprintResourceListResponse(id, resources) + conversations: Optional[float] + """The conversations limit""" - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - result["resources"] = from_dict(lambda x: x, self.resources) - return result + database: Optional[StickyDatabase] + """The database limits""" + messages: Optional[float] + """The messages limit""" -class BlueprintUpdateParams: - blueprint_id: str + tokens: Optional[float] + """The tokens limit""" - def __init__(self, blueprint_id: str) -> None: - self.blueprint_id = blueprint_id + def __init__(self, conversations: Optional[float], database: Optional[StickyDatabase], messages: Optional[float], tokens: Optional[float]) -> None: + self.conversations = conversations + self.database = database + self.messages = messages + self.tokens = tokens @staticmethod - def from_dict(obj: Any) -> 'BlueprintUpdateParams': + def from_dict(obj: Any) -> 'UserUpdateRequestLimits': assert isinstance(obj, dict) - blueprint_id = from_str(obj.get("blueprintId")) - return BlueprintUpdateParams(blueprint_id) + conversations = from_union([from_float, from_none], obj.get("conversations")) + database = from_union([StickyDatabase.from_dict, from_none], obj.get("database")) + messages = from_union([from_float, from_none], obj.get("messages")) + tokens = from_union([from_float, from_none], obj.get("tokens")) + return UserUpdateRequestLimits(conversations, database, messages, tokens) def to_dict(self) -> dict: result: dict = {} - result["blueprintId"] = from_str(self.blueprint_id) + if self.conversations is not None: + result["conversations"] = from_union([to_float, from_none], self.conversations) + if self.database is not None: + result["database"] = from_union([lambda x: to_class(StickyDatabase, x), from_none], self.database) + if self.messages is not None: + result["messages"] = from_union([to_float, from_none], self.messages) + if self.tokens is not None: + result["tokens"] = from_union([to_float, from_none], self.tokens) return result -class BlueprintUpdateRequestVisibility(Enum): - """The blueprint visibility""" - - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" - - -class BlueprintUpdateRequest: +class UserUpdateRequest: """Instance crud properties""" alias: Optional[str] @@ -1820,31 +1884,41 @@ class BlueprintUpdateRequest: description: Optional[str] """The associated description""" + email: Optional[str] + """The email of the user""" + + image: Optional[str] + """The image of the user""" + + limits: Optional[UserUpdateRequestLimits] + """Limits information""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - visibility: Optional[BlueprintUpdateRequestVisibility] - """The blueprint visibility""" - - def __init__(self, alias: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], visibility: Optional[BlueprintUpdateRequestVisibility]) -> None: + def __init__(self, alias: Optional[str], description: Optional[str], email: Optional[str], image: Optional[str], limits: Optional[UserUpdateRequestLimits], meta: Optional[Dict[str, Any]], name: Optional[str]) -> None: self.alias = alias self.description = description + self.email = email + self.image = image + self.limits = limits self.meta = meta self.name = name - self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'BlueprintUpdateRequest': + def from_dict(obj: Any) -> 'UserUpdateRequest': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) description = from_union([from_str, from_none], obj.get("description")) + email = from_union([from_str, from_none], obj.get("email")) + image = from_union([from_str, from_none], obj.get("image")) + limits = from_union([UserUpdateRequestLimits.from_dict, from_none], obj.get("limits")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - visibility = from_union([BlueprintUpdateRequestVisibility, from_none], obj.get("visibility")) - return BlueprintUpdateRequest(alias, description, meta, name, visibility) + return UserUpdateRequest(alias, description, email, image, limits, meta, name) def to_dict(self) -> dict: result: dict = {} @@ -1852,27 +1926,31 @@ def to_dict(self) -> dict: result["alias"] = from_union([from_str, from_none], self.alias) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.email is not None: + result["email"] = from_union([from_str, from_none], self.email) + if self.image is not None: + result["image"] = from_union([from_str, from_none], self.image) + if self.limits is not None: + result["limits"] = from_union([lambda x: to_class(UserUpdateRequestLimits, x), from_none], self.limits) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(BlueprintUpdateRequestVisibility, x), from_none], self.visibility) return result -class BlueprintUpdateResponse: +class UserUpdateResponse: id: str - """The ID of the updated blueprint""" + """The ID of the updated user""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'BlueprintUpdateResponse': + def from_dict(obj: Any) -> 'UserUpdateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return BlueprintUpdateResponse(id) + return UserUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -1880,76 +1958,224 @@ def to_dict(self) -> dict: return result -class BlueprintCreateRequestVisibility(Enum): - """The blueprint visibility""" +class UserFetchParams: + user_id: str + """The ID of the user to retrieve""" - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" + def __init__(self, user_id: str) -> None: + self.user_id = user_id + @staticmethod + def from_dict(obj: Any) -> 'UserFetchParams': + assert isinstance(obj, dict) + user_id = from_str(obj.get("userId")) + return UserFetchParams(user_id) -class BlueprintCreateRequest: - """Instance crud properties""" + def to_dict(self) -> dict: + result: dict = {} + result["userId"] = from_str(self.user_id) + return result - alias: Optional[str] - """The unique alias for the instance""" - description: Optional[str] - """The associated description""" +class IndigoDatabase: + """The database limits""" - meta: Optional[Dict[str, Any]] - """Meta data information""" + abilities: Optional[float] + """The abilities limit""" - name: Optional[str] - """The associated name""" + datasets: Optional[float] + """The datasets limit""" - visibility: Optional[BlueprintCreateRequestVisibility] - """The blueprint visibility""" + files: Optional[float] + """The files limit""" - def __init__(self, alias: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], visibility: Optional[BlueprintCreateRequestVisibility]) -> None: - self.alias = alias - self.description = description - self.meta = meta - self.name = name - self.visibility = visibility + records: Optional[float] + """The records limit""" + + skillsets: Optional[float] + """The skillsets limit""" + + def __init__(self, abilities: Optional[float], datasets: Optional[float], files: Optional[float], records: Optional[float], skillsets: Optional[float]) -> None: + self.abilities = abilities + self.datasets = datasets + self.files = files + self.records = records + self.skillsets = skillsets @staticmethod - def from_dict(obj: Any) -> 'BlueprintCreateRequest': + def from_dict(obj: Any) -> 'IndigoDatabase': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - description = from_union([from_str, from_none], obj.get("description")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - visibility = from_union([BlueprintCreateRequestVisibility, from_none], obj.get("visibility")) - return BlueprintCreateRequest(alias, description, meta, name, visibility) + abilities = from_union([from_float, from_none], obj.get("abilities")) + datasets = from_union([from_float, from_none], obj.get("datasets")) + files = from_union([from_float, from_none], obj.get("files")) + records = from_union([from_float, from_none], obj.get("records")) + skillsets = from_union([from_float, from_none], obj.get("skillsets")) + return IndigoDatabase(abilities, datasets, files, records, skillsets) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) + if self.abilities is not None: + result["abilities"] = from_union([to_float, from_none], self.abilities) + if self.datasets is not None: + result["datasets"] = from_union([to_float, from_none], self.datasets) + if self.files is not None: + result["files"] = from_union([to_float, from_none], self.files) + if self.records is not None: + result["records"] = from_union([to_float, from_none], self.records) + if self.skillsets is not None: + result["skillsets"] = from_union([to_float, from_none], self.skillsets) + return result + + +class UserFetchResponseLimits: + """Limits information""" + + conversations: Optional[float] + """The conversations limit""" + + database: Optional[IndigoDatabase] + """The database limits""" + + messages: Optional[float] + """The messages limit""" + + tokens: Optional[float] + """The tokens limit""" + + def __init__(self, conversations: Optional[float], database: Optional[IndigoDatabase], messages: Optional[float], tokens: Optional[float]) -> None: + self.conversations = conversations + self.database = database + self.messages = messages + self.tokens = tokens + + @staticmethod + def from_dict(obj: Any) -> 'UserFetchResponseLimits': + assert isinstance(obj, dict) + conversations = from_union([from_float, from_none], obj.get("conversations")) + database = from_union([IndigoDatabase.from_dict, from_none], obj.get("database")) + messages = from_union([from_float, from_none], obj.get("messages")) + tokens = from_union([from_float, from_none], obj.get("tokens")) + return UserFetchResponseLimits(conversations, database, messages, tokens) + + def to_dict(self) -> dict: + result: dict = {} + if self.conversations is not None: + result["conversations"] = from_union([to_float, from_none], self.conversations) + if self.database is not None: + result["database"] = from_union([lambda x: to_class(IndigoDatabase, x), from_none], self.database) + if self.messages is not None: + result["messages"] = from_union([to_float, from_none], self.messages) + if self.tokens is not None: + result["tokens"] = from_union([to_float, from_none], self.tokens) + return result + + +class UserFetchResponse: + """Instance list properties""" + + created_at: float + """The timestamp (ms) when the instance was created""" + + description: Optional[str] + """The associated description""" + + email: Optional[str] + """The email of the user""" + + id: str + """The instance ID""" + + image: Optional[str] + """The image of the user""" + + limits: Optional[UserFetchResponseLimits] + """Limits information""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" + + name: Optional[str] + """The associated name""" + + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, created_at: float, description: Optional[str], email: Optional[str], id: str, image: Optional[str], limits: Optional[UserFetchResponseLimits], meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: + self.created_at = created_at + self.description = description + self.email = email + self.id = id + self.image = image + self.limits = limits + self.meta = meta + self.name = name + self.updated_at = updated_at + + @staticmethod + def from_dict(obj: Any) -> 'UserFetchResponse': + assert isinstance(obj, dict) + created_at = from_float(obj.get("createdAt")) + description = from_union([from_str, from_none], obj.get("description")) + email = from_union([from_str, from_none], obj.get("email")) + id = from_str(obj.get("id")) + image = from_union([from_str, from_none], obj.get("image")) + limits = from_union([UserFetchResponseLimits.from_dict, from_none], obj.get("limits")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + updated_at = from_float(obj.get("updatedAt")) + return UserFetchResponse(created_at, description, email, id, image, limits, meta, name, updated_at) + + def to_dict(self) -> dict: + result: dict = {} + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.email is not None: + result["email"] = from_union([from_str, from_none], self.email) + result["id"] = from_str(self.id) + if self.image is not None: + result["image"] = from_union([from_str, from_none], self.image) + if self.limits is not None: + result["limits"] = from_union([lambda x: to_class(UserFetchResponseLimits, x), from_none], self.limits) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(BlueprintCreateRequestVisibility, x), from_none], self.visibility) + result["updatedAt"] = to_float(self.updated_at) return result -class BlueprintCreateResponse: +class UserDeleteParams: + user_id: str + """The ID of the user to delete""" + + def __init__(self, user_id: str) -> None: + self.user_id = user_id + + @staticmethod + def from_dict(obj: Any) -> 'UserDeleteParams': + assert isinstance(obj, dict) + user_id = from_str(obj.get("userId")) + return UserDeleteParams(user_id) + + def to_dict(self) -> dict: + result: dict = {} + result["userId"] = from_str(self.user_id) + return result + + +class UserDeleteResponse: id: str - """The ID of the created blueprint""" + """The ID of the deleted user""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'BlueprintCreateResponse': + def from_dict(obj: Any) -> 'UserDeleteResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return BlueprintCreateResponse(id) + return UserDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -1957,68 +2183,56 @@ def to_dict(self) -> dict: return result -class BlueprintListParamsOrder(Enum): +class UserTokenListParamsOrder(Enum): """The order of the paginated items""" ASC = "asc" DESC = "desc" -class BlueprintListParams: +class UserTokenListParams: cursor: Optional[str] """The cursor to use for pagination""" - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" - - order: Optional[BlueprintListParamsOrder] + order: Optional[UserTokenListParamsOrder] """The order of the paginated items""" take: Optional[int] """The number of items to retrieve""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[BlueprintListParamsOrder], take: Optional[int]) -> None: + user_id: str + """The ID of the user""" + + def __init__(self, cursor: Optional[str], order: Optional[UserTokenListParamsOrder], take: Optional[int], user_id: str) -> None: self.cursor = cursor - self.meta = meta self.order = order self.take = take + self.user_id = user_id @staticmethod - def from_dict(obj: Any) -> 'BlueprintListParams': + def from_dict(obj: Any) -> 'UserTokenListParams': assert isinstance(obj, dict) cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([BlueprintListParamsOrder, from_none], obj.get("order")) + order = from_union([UserTokenListParamsOrder, from_none], obj.get("order")) take = from_union([from_int, from_none], obj.get("take")) - return BlueprintListParams(cursor, meta, order, take) + user_id = from_str(obj.get("userId")) + return UserTokenListParams(cursor, order, take, user_id) def to_dict(self) -> dict: result: dict = {} if self.cursor is not None: result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(BlueprintListParamsOrder, x), from_none], self.order) + result["order"] = from_union([lambda x: to_enum(UserTokenListParamsOrder, x), from_none], self.order) if self.take is not None: result["take"] = from_union([from_int, from_none], self.take) + result["userId"] = from_str(self.user_id) return result -class PurpleVisibility(Enum): - """The blueprint visibility""" - - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" - - -class BlueprintListResponseItem: +class UserTokenListResponseItem: """Instance list properties""" - alias: Optional[str] - """The unique alias for the instance""" - created_at: float """The timestamp (ms) when the instance was created""" @@ -2037,36 +2251,27 @@ class BlueprintListResponseItem: updated_at: float """The timestamp (ms) when the instance was updated""" - visibility: Optional[PurpleVisibility] - """The blueprint visibility""" - - def __init__(self, alias: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float, visibility: Optional[PurpleVisibility]) -> None: - self.alias = alias + def __init__(self, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: self.created_at = created_at self.description = description self.id = id self.meta = meta self.name = name self.updated_at = updated_at - self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'BlueprintListResponseItem': + def from_dict(obj: Any) -> 'UserTokenListResponseItem': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) updated_at = from_float(obj.get("updatedAt")) - visibility = from_union([PurpleVisibility, from_none], obj.get("visibility")) - return BlueprintListResponseItem(alias, created_at, description, id, meta, name, updated_at, visibility) + return UserTokenListResponseItem(created_at, description, id, meta, name, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) @@ -2076,49 +2281,36 @@ def to_dict(self) -> dict: if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) result["updatedAt"] = to_float(self.updated_at) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(PurpleVisibility, x), from_none], self.visibility) return result -class BlueprintListResponse: +class UserTokenListResponse: cursor: str """Cursor for fetching the next page""" - items: List[BlueprintListResponseItem] + items: List[UserTokenListResponseItem] - def __init__(self, cursor: str, items: List[BlueprintListResponseItem]) -> None: + def __init__(self, cursor: str, items: List[UserTokenListResponseItem]) -> None: self.cursor = cursor self.items = items @staticmethod - def from_dict(obj: Any) -> 'BlueprintListResponse': + def from_dict(obj: Any) -> 'UserTokenListResponse': assert isinstance(obj, dict) cursor = from_str(obj.get("cursor")) - items = from_list(BlueprintListResponseItem.from_dict, obj.get("items")) - return BlueprintListResponse(cursor, items) + items = from_list(UserTokenListResponseItem.from_dict, obj.get("items")) + return UserTokenListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(BlueprintListResponseItem, x), self.items) + result["items"] = from_list(lambda x: to_class(UserTokenListResponseItem, x), self.items) return result -class FluffyVisibility(Enum): - """The blueprint visibility""" - - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" - - -class BlueprintListStreamItemData: +class UserTokenListStreamItemData: """Instance list properties""" - alias: Optional[str] - """The unique alias for the instance""" - created_at: float """The timestamp (ms) when the instance was created""" @@ -2137,36 +2329,27 @@ class BlueprintListStreamItemData: updated_at: float """The timestamp (ms) when the instance was updated""" - visibility: Optional[FluffyVisibility] - """The blueprint visibility""" - - def __init__(self, alias: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float, visibility: Optional[FluffyVisibility]) -> None: - self.alias = alias + def __init__(self, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: self.created_at = created_at self.description = description self.id = id self.meta = meta self.name = name self.updated_at = updated_at - self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'BlueprintListStreamItemData': + def from_dict(obj: Any) -> 'UserTokenListStreamItemData': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) updated_at = from_float(obj.get("updatedAt")) - visibility = from_union([FluffyVisibility, from_none], obj.get("visibility")) - return BlueprintListStreamItemData(alias, created_at, description, id, meta, name, updated_at, visibility) + return UserTokenListStreamItemData(created_at, description, id, meta, name, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) @@ -2176,175 +2359,253 @@ def to_dict(self) -> dict: if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) result["updatedAt"] = to_float(self.updated_at) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(FluffyVisibility, x), from_none], self.visibility) return result -class BlueprintListStreamItemType(Enum): +class UserTokenListStreamItemType(Enum): """The type of event""" ITEM = "item" -class BlueprintListStreamItem: - data: BlueprintListStreamItemData +class UserTokenListStreamItem: + data: UserTokenListStreamItemData """Instance list properties""" - type: BlueprintListStreamItemType + type: UserTokenListStreamItemType """The type of event""" - def __init__(self, data: BlueprintListStreamItemData, type: BlueprintListStreamItemType) -> None: + def __init__(self, data: UserTokenListStreamItemData, type: UserTokenListStreamItemType) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'BlueprintListStreamItem': + def from_dict(obj: Any) -> 'UserTokenListStreamItem': assert isinstance(obj, dict) - data = BlueprintListStreamItemData.from_dict(obj.get("data")) - type = BlueprintListStreamItemType(obj.get("type")) - return BlueprintListStreamItem(data, type) + data = UserTokenListStreamItemData.from_dict(obj.get("data")) + type = UserTokenListStreamItemType(obj.get("type")) + return UserTokenListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(BlueprintListStreamItemData, self.data) - result["type"] = to_enum(BlueprintListStreamItemType, self.type) + result["data"] = to_class(UserTokenListStreamItemData, self.data) + result["type"] = to_enum(UserTokenListStreamItemType, self.type) return result -class BotCloneParams: - bot_id: str +class UserTokenCreateParams: + user_id: str + """The ID of the user""" - def __init__(self, bot_id: str) -> None: - self.bot_id = bot_id + def __init__(self, user_id: str) -> None: + self.user_id = user_id @staticmethod - def from_dict(obj: Any) -> 'BotCloneParams': + def from_dict(obj: Any) -> 'UserTokenCreateParams': assert isinstance(obj, dict) - bot_id = from_str(obj.get("botId")) - return BotCloneParams(bot_id) + user_id = from_str(obj.get("userId")) + return UserTokenCreateParams(user_id) def to_dict(self) -> dict: result: dict = {} - result["botId"] = from_str(self.bot_id) + result["userId"] = from_str(self.user_id) return result -class BotCloneResponse: +class UserTokenCreateRequest: + config: Optional[Dict[str, Any]] + """Token configuration""" + + description: Optional[str] + """The description of the token""" + + meta: Optional[Dict[str, Any]] + """Custom metadata for the token""" + + name: Optional[str] + """The name of the token""" + + def __init__(self, config: Optional[Dict[str, Any]], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str]) -> None: + self.config = config + self.description = description + self.meta = meta + self.name = name + + @staticmethod + def from_dict(obj: Any) -> 'UserTokenCreateRequest': + assert isinstance(obj, dict) + config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) + description = from_union([from_str, from_none], obj.get("description")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + return UserTokenCreateRequest(config, description, meta, name) + + def to_dict(self) -> dict: + result: dict = {} + if self.config is not None: + result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + return result + + +class UserTokenCreateResponse: + created_at: float + """The timestamp for when the user token was created (in milliseconds)""" + id: str - """The ID of the cloned bot""" + """The ID of the created user token""" - def __init__(self, id: str) -> None: + token: str + """The token of the created user token""" + + def __init__(self, created_at: float, id: str, token: str) -> None: + self.created_at = created_at self.id = id + self.token = token @staticmethod - def from_dict(obj: Any) -> 'BotCloneResponse': + def from_dict(obj: Any) -> 'UserTokenCreateResponse': assert isinstance(obj, dict) + created_at = from_float(obj.get("createdAt")) id = from_str(obj.get("id")) - return BotCloneResponse(id) + token = from_str(obj.get("token")) + return UserTokenCreateResponse(created_at, id, token) def to_dict(self) -> dict: result: dict = {} + result["createdAt"] = to_float(self.created_at) result["id"] = from_str(self.id) + result["token"] = from_str(self.token) return result -class BotDeleteParams: - bot_id: str - """The ID of the bot to delete""" +class UserTokenUpdateParams: + token_id: str + """The ID of the user token to update""" - def __init__(self, bot_id: str) -> None: - self.bot_id = bot_id + user_id: str + """The ID of the user""" + + def __init__(self, token_id: str, user_id: str) -> None: + self.token_id = token_id + self.user_id = user_id @staticmethod - def from_dict(obj: Any) -> 'BotDeleteParams': + def from_dict(obj: Any) -> 'UserTokenUpdateParams': assert isinstance(obj, dict) - bot_id = from_str(obj.get("botId")) - return BotDeleteParams(bot_id) + token_id = from_str(obj.get("tokenId")) + user_id = from_str(obj.get("userId")) + return UserTokenUpdateParams(token_id, user_id) def to_dict(self) -> dict: result: dict = {} - result["botId"] = from_str(self.bot_id) + result["tokenId"] = from_str(self.token_id) + result["userId"] = from_str(self.user_id) return result -class BotDeleteResponse: - id: str - """The ID of the deleted bot""" +class UserTokenUpdateRequest: + config: Optional[Dict[str, Any]] + """Token configuration""" - def __init__(self, id: str) -> None: - self.id = id + description: Optional[str] + """The description of the token""" + + meta: Optional[Dict[str, Any]] + """Custom metadata for the token""" + + name: Optional[str] + """The name of the token""" + + def __init__(self, config: Optional[Dict[str, Any]], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str]) -> None: + self.config = config + self.description = description + self.meta = meta + self.name = name @staticmethod - def from_dict(obj: Any) -> 'BotDeleteResponse': + def from_dict(obj: Any) -> 'UserTokenUpdateRequest': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return BotDeleteResponse(id) + config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) + description = from_union([from_str, from_none], obj.get("description")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + return UserTokenUpdateRequest(config, description, meta, name) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + if self.config is not None: + result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) return result -class BotDownvoteParams: - bot_id: str - """The ID of the bot""" +class UserTokenUpdateResponse: + id: str + """The ID of the updated user token""" - def __init__(self, bot_id: str) -> None: - self.bot_id = bot_id + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'BotDownvoteParams': + def from_dict(obj: Any) -> 'UserTokenUpdateResponse': assert isinstance(obj, dict) - bot_id = from_str(obj.get("botId")) - return BotDownvoteParams(bot_id) + id = from_str(obj.get("id")) + return UserTokenUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} - result["botId"] = from_str(self.bot_id) + result["id"] = from_str(self.id) return result -class BotDownvoteRequest: - reason: Optional[str] - """The reason for the downvote""" +class UserTokenDeleteParams: + token_id: str + """The ID of the user token to delete""" - value: Optional[int] - """The value of the downvote""" + user_id: str + """The ID of the user""" - def __init__(self, reason: Optional[str], value: Optional[int]) -> None: - self.reason = reason - self.value = value + def __init__(self, token_id: str, user_id: str) -> None: + self.token_id = token_id + self.user_id = user_id @staticmethod - def from_dict(obj: Any) -> 'BotDownvoteRequest': + def from_dict(obj: Any) -> 'UserTokenDeleteParams': assert isinstance(obj, dict) - reason = from_union([from_str, from_none], obj.get("reason")) - value = from_union([from_int, from_none], obj.get("value")) - return BotDownvoteRequest(reason, value) + token_id = from_str(obj.get("tokenId")) + user_id = from_str(obj.get("userId")) + return UserTokenDeleteParams(token_id, user_id) def to_dict(self) -> dict: result: dict = {} - if self.reason is not None: - result["reason"] = from_union([from_str, from_none], self.reason) - if self.value is not None: - result["value"] = from_union([from_int, from_none], self.value) + result["tokenId"] = from_str(self.token_id) + result["userId"] = from_str(self.user_id) return result -class BotDownvoteResponse: +class UserTokenDeleteResponse: id: str - """The bot ID of the downvoted bot""" + """The ID of the deleted user token""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'BotDownvoteResponse': + def from_dict(obj: Any) -> 'UserTokenDeleteResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return BotDownvoteResponse(id) + return UserTokenDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -2352,126 +2613,241 @@ def to_dict(self) -> dict: return result -class BotFetchParams: - bot_id: str - """The ID of the bot to retrieve""" +class UserSessionCreateParams: + user_id: str + """The ID of the user""" - def __init__(self, bot_id: str) -> None: - self.bot_id = bot_id + def __init__(self, user_id: str) -> None: + self.user_id = user_id @staticmethod - def from_dict(obj: Any) -> 'BotFetchParams': + def from_dict(obj: Any) -> 'UserSessionCreateParams': assert isinstance(obj, dict) - bot_id = from_str(obj.get("botId")) - return BotFetchParams(bot_id) + user_id = from_str(obj.get("userId")) + return UserSessionCreateParams(user_id) def to_dict(self) -> dict: result: dict = {} - result["botId"] = from_str(self.bot_id) + result["userId"] = from_str(self.user_id) return result -class BotFetchResponseVisibility(Enum): - """The bot visibility""" - - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" +class Config: + allowed_routes: Optional[List[str]] + """Glob patterns restricting which API routes the token may access""" + contact_id: Optional[str] + """Optional contact ID to include in the session token""" -class BotFetchResponse: - """Blueprint properties""" + def __init__(self, allowed_routes: Optional[List[str]], contact_id: Optional[str]) -> None: + self.allowed_routes = allowed_routes + self.contact_id = contact_id - alias: Optional[str] - """The unique alias for the instance""" + @staticmethod + def from_dict(obj: Any) -> 'Config': + assert isinstance(obj, dict) + allowed_routes = from_union([lambda x: from_list(from_str, x), from_none], obj.get("allowedRoutes")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) + return Config(allowed_routes, contact_id) - backstory: Optional[str] - """The backstory this configuration is using""" + def to_dict(self) -> dict: + result: dict = {} + if self.allowed_routes is not None: + result["allowedRoutes"] = from_union([lambda x: from_list(from_str, x), from_none], self.allowed_routes) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) + return result - blueprint_id: Optional[str] - """The ID of the blueprint""" - created_at: float - """The timestamp (ms) when the instance was created""" +class UserSessionCreateRequest: + config: Optional[Config] + duration_in_seconds: Optional[float] + """The lifetime of the session token in seconds""" - dataset_id: Optional[str] - """The id of the dataset this configuration is using""" + def __init__(self, config: Optional[Config], duration_in_seconds: Optional[float]) -> None: + self.config = config + self.duration_in_seconds = duration_in_seconds - description: Optional[str] - """The associated description""" + @staticmethod + def from_dict(obj: Any) -> 'UserSessionCreateRequest': + assert isinstance(obj, dict) + config = from_union([Config.from_dict, from_none], obj.get("config")) + duration_in_seconds = from_union([from_float, from_none], obj.get("durationInSeconds")) + return UserSessionCreateRequest(config, duration_in_seconds) - id: str - """The instance ID""" + def to_dict(self) -> dict: + result: dict = {} + if self.config is not None: + result["config"] = from_union([lambda x: to_class(Config, x), from_none], self.config) + if self.duration_in_seconds is not None: + result["durationInSeconds"] = from_union([to_float, from_none], self.duration_in_seconds) + return result - meta: Optional[Dict[str, Any]] - """Meta data information""" - model: Optional[str] - """A model definition""" +class UserSessionCreateResponse: + expires_at: float + """The timestamp for when the session token expires (in milliseconds)""" - moderation: Optional[bool] - """The moderation flag for this configuration""" + id: str + """The ID of the created session""" - name: Optional[str] - """The associated name""" + token: str + """The temporary session token""" - privacy: Optional[bool] - """The privacy flag for this configuration""" + def __init__(self, expires_at: float, id: str, token: str) -> None: + self.expires_at = expires_at + self.id = id + self.token = token - skillset_id: Optional[str] - """The id of the skillset this configuration is using""" + @staticmethod + def from_dict(obj: Any) -> 'UserSessionCreateResponse': + assert isinstance(obj, dict) + expires_at = from_float(obj.get("expiresAt")) + id = from_str(obj.get("id")) + token = from_str(obj.get("token")) + return UserSessionCreateResponse(expires_at, id, token) - updated_at: float - """The timestamp (ms) when the instance was updated""" + def to_dict(self) -> dict: + result: dict = {} + result["expiresAt"] = to_float(self.expires_at) + result["id"] = from_str(self.id) + result["token"] = from_str(self.token) + return result - visibility: Optional[BotFetchResponseVisibility] - """The bot visibility""" - def __init__(self, alias: Optional[str], backstory: Optional[str], blueprint_id: Optional[str], created_at: float, dataset_id: Optional[str], description: Optional[str], id: str, meta: Optional[Dict[str, Any]], model: Optional[str], moderation: Optional[bool], name: Optional[str], privacy: Optional[bool], skillset_id: Optional[str], updated_at: float, visibility: Optional[BotFetchResponseVisibility]) -> None: - self.alias = alias - self.backstory = backstory +class UserContextListParamsOrder(Enum): + """The order of the paginated items""" + + ASC = "asc" + DESC = "desc" + + +class UserContextListParams: + blueprint_id: Optional[str] + bot_id: Optional[str] + cursor: Optional[str] + """The cursor to use for pagination""" + + dataset_id: Optional[str] + order: Optional[UserContextListParamsOrder] + """The order of the paginated items""" + + skillset_id: Optional[str] + take: Optional[int] + """The number of items to retrieve""" + + user_id: str + """The ID of the user""" + + def __init__(self, blueprint_id: Optional[str], bot_id: Optional[str], cursor: Optional[str], dataset_id: Optional[str], order: Optional[UserContextListParamsOrder], skillset_id: Optional[str], take: Optional[int], user_id: str) -> None: + self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.cursor = cursor + self.dataset_id = dataset_id + self.order = order + self.skillset_id = skillset_id + self.take = take + self.user_id = user_id + + @staticmethod + def from_dict(obj: Any) -> 'UserContextListParams': + assert isinstance(obj, dict) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + cursor = from_union([from_str, from_none], obj.get("cursor")) + dataset_id = from_union([from_str, from_none], obj.get("datasetId")) + order = from_union([UserContextListParamsOrder, from_none], obj.get("order")) + skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + take = from_union([from_int, from_none], obj.get("take")) + user_id = from_str(obj.get("userId")) + return UserContextListParams(blueprint_id, bot_id, cursor, dataset_id, order, skillset_id, take, user_id) + + def to_dict(self) -> dict: + result: dict = {} + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.dataset_id is not None: + result["datasetId"] = from_union([from_str, from_none], self.dataset_id) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(UserContextListParamsOrder, x), from_none], self.order) + if self.skillset_id is not None: + result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) + result["userId"] = from_str(self.user_id) + return result + + +class UserContextListResponseItem: + """Instance list properties""" + + blueprint_id: Optional[str] + bot_id: Optional[str] + contact_id: Optional[str] + created_at: float + """The timestamp (ms) when the instance was created""" + + dataset_id: Optional[str] + description: Optional[str] + """The associated description""" + + id: str + """The instance ID""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" + + name: Optional[str] + """The associated name""" + + payload: Optional[Dict[str, Any]] + skillset_id: Optional[str] + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, blueprint_id: Optional[str], bot_id: Optional[str], contact_id: Optional[str], created_at: float, dataset_id: Optional[str], description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], payload: Optional[Dict[str, Any]], skillset_id: Optional[str], updated_at: float) -> None: self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.contact_id = contact_id self.created_at = created_at self.dataset_id = dataset_id self.description = description self.id = id self.meta = meta - self.model = model - self.moderation = moderation self.name = name - self.privacy = privacy + self.payload = payload self.skillset_id = skillset_id self.updated_at = updated_at - self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'BotFetchResponse': + def from_dict(obj: Any) -> 'UserContextListResponseItem': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - backstory = from_union([from_str, from_none], obj.get("backstory")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) created_at = from_float(obj.get("createdAt")) dataset_id = from_union([from_str, from_none], obj.get("datasetId")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - model = from_union([from_str, from_none], obj.get("model")) - moderation = from_union([from_bool, from_none], obj.get("moderation")) name = from_union([from_str, from_none], obj.get("name")) - privacy = from_union([from_bool, from_none], obj.get("privacy")) + payload = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("payload")) skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) updated_at = from_float(obj.get("updatedAt")) - visibility = from_union([BotFetchResponseVisibility, from_none], obj.get("visibility")) - return BotFetchResponse(alias, backstory, blueprint_id, created_at, dataset_id, description, id, meta, model, moderation, name, privacy, skillset_id, updated_at, visibility) + return UserContextListResponseItem(blueprint_id, bot_id, contact_id, created_at, dataset_id, description, id, meta, name, payload, skillset_id, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.backstory is not None: - result["backstory"] = from_union([from_str, from_none], self.backstory) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) result["createdAt"] = to_float(self.created_at) if self.dataset_id is not None: result["datasetId"] = from_union([from_str, from_none], self.dataset_id) @@ -2480,674 +2856,534 @@ def to_dict(self) -> dict: result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) - if self.moderation is not None: - result["moderation"] = from_union([from_bool, from_none], self.moderation) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.privacy is not None: - result["privacy"] = from_union([from_bool, from_none], self.privacy) + if self.payload is not None: + result["payload"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.payload) if self.skillset_id is not None: result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) result["updatedAt"] = to_float(self.updated_at) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(BotFetchResponseVisibility, x), from_none], self.visibility) return result -class BotMemorySearchParams: - bot_id: str - """The ID of the bot to search memories for""" +class UserContextListResponse: + cursor: str + """Cursor for fetching the next page""" - def __init__(self, bot_id: str) -> None: - self.bot_id = bot_id + items: List[UserContextListResponseItem] + + def __init__(self, cursor: str, items: List[UserContextListResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'BotMemorySearchParams': + def from_dict(obj: Any) -> 'UserContextListResponse': assert isinstance(obj, dict) - bot_id = from_str(obj.get("botId")) - return BotMemorySearchParams(bot_id) + cursor = from_str(obj.get("cursor")) + items = from_list(UserContextListResponseItem.from_dict, obj.get("items")) + return UserContextListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["botId"] = from_str(self.bot_id) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(UserContextListResponseItem, x), self.items) return result -class BotMemorySearchRequest: - search: str - """The keyword/phrase to search for""" - - def __init__(self, search: str) -> None: - self.search = search - - @staticmethod - def from_dict(obj: Any) -> 'BotMemorySearchRequest': - assert isinstance(obj, dict) - search = from_str(obj.get("search")) - return BotMemorySearchRequest(search) +class UserContextListStreamItemData: + """Instance list properties""" - def to_dict(self) -> dict: - result: dict = {} - result["search"] = from_str(self.search) - return result + blueprint_id: Optional[str] + bot_id: Optional[str] + contact_id: Optional[str] + created_at: float + """The timestamp (ms) when the instance was created""" + dataset_id: Optional[str] + description: Optional[str] + """The associated description""" -class BotMemorySearchResponseItem: id: str + """The instance ID""" + meta: Optional[Dict[str, Any]] - text: str + """Meta data information""" - def __init__(self, id: str, meta: Optional[Dict[str, Any]], text: str) -> None: + name: Optional[str] + """The associated name""" + + payload: Optional[Dict[str, Any]] + skillset_id: Optional[str] + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, blueprint_id: Optional[str], bot_id: Optional[str], contact_id: Optional[str], created_at: float, dataset_id: Optional[str], description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], payload: Optional[Dict[str, Any]], skillset_id: Optional[str], updated_at: float) -> None: + self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.contact_id = contact_id + self.created_at = created_at + self.dataset_id = dataset_id + self.description = description self.id = id self.meta = meta - self.text = text + self.name = name + self.payload = payload + self.skillset_id = skillset_id + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'BotMemorySearchResponseItem': + def from_dict(obj: Any) -> 'UserContextListStreamItemData': assert isinstance(obj, dict) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) + created_at = from_float(obj.get("createdAt")) + dataset_id = from_union([from_str, from_none], obj.get("datasetId")) + description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - text = from_str(obj.get("text")) - return BotMemorySearchResponseItem(id, meta, text) + name = from_union([from_str, from_none], obj.get("name")) + payload = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("payload")) + skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + updated_at = from_float(obj.get("updatedAt")) + return UserContextListStreamItemData(blueprint_id, bot_id, contact_id, created_at, dataset_id, description, id, meta, name, payload, skillset_id, updated_at) def to_dict(self) -> dict: result: dict = {} + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) + result["createdAt"] = to_float(self.created_at) + if self.dataset_id is not None: + result["datasetId"] = from_union([from_str, from_none], self.dataset_id) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["text"] = from_str(self.text) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.payload is not None: + result["payload"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.payload) + if self.skillset_id is not None: + result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) + result["updatedAt"] = to_float(self.updated_at) return result -class BotMemorySearchResponse: - items: List[BotMemorySearchResponseItem] - """An array of memories matching the search query""" +class UserContextListStreamItemType(Enum): + """The type of event""" + + ITEM = "item" - def __init__(self, items: List[BotMemorySearchResponseItem]) -> None: - self.items = items + +class UserContextListStreamItem: + data: UserContextListStreamItemData + """Instance list properties""" + + type: UserContextListStreamItemType + """The type of event""" + + def __init__(self, data: UserContextListStreamItemData, type: UserContextListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'BotMemorySearchResponse': + def from_dict(obj: Any) -> 'UserContextListStreamItem': assert isinstance(obj, dict) - items = from_list(BotMemorySearchResponseItem.from_dict, obj.get("items")) - return BotMemorySearchResponse(items) + data = UserContextListStreamItemData.from_dict(obj.get("data")) + type = UserContextListStreamItemType(obj.get("type")) + return UserContextListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["items"] = from_list(lambda x: to_class(BotMemorySearchResponseItem, x), self.items) + result["data"] = to_class(UserContextListStreamItemData, self.data) + result["type"] = to_enum(UserContextListStreamItemType, self.type) return result -class BotSessionCreateParams: - bot_id: str - """The ID of the bot for this session""" +class UserContextCreateParams: + user_id: str + """The ID of the user""" - def __init__(self, bot_id: str) -> None: - self.bot_id = bot_id + def __init__(self, user_id: str) -> None: + self.user_id = user_id @staticmethod - def from_dict(obj: Any) -> 'BotSessionCreateParams': + def from_dict(obj: Any) -> 'UserContextCreateParams': assert isinstance(obj, dict) - bot_id = from_str(obj.get("botId")) - return BotSessionCreateParams(bot_id) + user_id = from_str(obj.get("userId")) + return UserContextCreateParams(user_id) def to_dict(self) -> dict: result: dict = {} - result["botId"] = from_str(self.bot_id) + result["userId"] = from_str(self.user_id) return result -class PurpleType(Enum): - """The type of the message""" +class UserContextCreateRequest: + """Instance crud properties""" - ACTIVITY = "activity" - BACKSTORY = "backstory" - BOT = "bot" - CHECKPOINT = "checkpoint" - CONTEXT = "context" - INSTRUCTION = "instruction" - REASONING = "reasoning" - USER = "user" + description: Optional[str] + """The associated description""" + meta: Optional[Dict[str, Any]] + """Meta data information""" -class BotSessionCreateRequestMessage: - text: str - """The text of the message""" + name: Optional[str] + """The associated name""" - type: PurpleType - """The type of the message""" + payload: Optional[Dict[str, Any]] + """Context payload""" - def __init__(self, text: str, type: PurpleType) -> None: - self.text = text - self.type = type + def __init__(self, description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], payload: Optional[Dict[str, Any]]) -> None: + self.description = description + self.meta = meta + self.name = name + self.payload = payload @staticmethod - def from_dict(obj: Any) -> 'BotSessionCreateRequestMessage': + def from_dict(obj: Any) -> 'UserContextCreateRequest': assert isinstance(obj, dict) - text = from_str(obj.get("text")) - type = PurpleType(obj.get("type")) - return BotSessionCreateRequestMessage(text, type) + description = from_union([from_str, from_none], obj.get("description")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + payload = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("payload")) + return UserContextCreateRequest(description, meta, name, payload) def to_dict(self) -> dict: result: dict = {} - result["text"] = from_str(self.text) - result["type"] = to_enum(PurpleType, self.type) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.payload is not None: + result["payload"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.payload) return result -class BotSessionCreateRequest: - duration_in_seconds: Optional[float] - """The maximum amount of time this session will stay open""" +class UserContextCreateResponse: + """Instance list properties""" - messages: Optional[List[BotSessionCreateRequestMessage]] - """An array of messages to be included in the conversation""" + blueprint_id: Optional[str] + bot_id: Optional[str] + contact_id: Optional[str] + created_at: float + """The timestamp (ms) when the instance was created""" + + dataset_id: Optional[str] + description: Optional[str] + """The associated description""" + + id: str + """The instance ID""" meta: Optional[Dict[str, Any]] """Meta data information""" - def __init__(self, duration_in_seconds: Optional[float], messages: Optional[List[BotSessionCreateRequestMessage]], meta: Optional[Dict[str, Any]]) -> None: - self.duration_in_seconds = duration_in_seconds - self.messages = messages + name: Optional[str] + """The associated name""" + + payload: Optional[Dict[str, Any]] + skillset_id: Optional[str] + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, blueprint_id: Optional[str], bot_id: Optional[str], contact_id: Optional[str], created_at: float, dataset_id: Optional[str], description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], payload: Optional[Dict[str, Any]], skillset_id: Optional[str], updated_at: float) -> None: + self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.contact_id = contact_id + self.created_at = created_at + self.dataset_id = dataset_id + self.description = description + self.id = id self.meta = meta + self.name = name + self.payload = payload + self.skillset_id = skillset_id + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'BotSessionCreateRequest': + def from_dict(obj: Any) -> 'UserContextCreateResponse': assert isinstance(obj, dict) - duration_in_seconds = from_union([from_float, from_none], obj.get("durationInSeconds")) - messages = from_union([lambda x: from_list(BotSessionCreateRequestMessage.from_dict, x), from_none], obj.get("messages")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) + created_at = from_float(obj.get("createdAt")) + dataset_id = from_union([from_str, from_none], obj.get("datasetId")) + description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - return BotSessionCreateRequest(duration_in_seconds, messages, meta) + name = from_union([from_str, from_none], obj.get("name")) + payload = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("payload")) + skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + updated_at = from_float(obj.get("updatedAt")) + return UserContextCreateResponse(blueprint_id, bot_id, contact_id, created_at, dataset_id, description, id, meta, name, payload, skillset_id, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.duration_in_seconds is not None: - result["durationInSeconds"] = from_union([to_float, from_none], self.duration_in_seconds) - if self.messages is not None: - result["messages"] = from_union([lambda x: from_list(lambda x: to_class(BotSessionCreateRequestMessage, x), x), from_none], self.messages) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) + result["createdAt"] = to_float(self.created_at) + if self.dataset_id is not None: + result["datasetId"] = from_union([from_str, from_none], self.dataset_id) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.payload is not None: + result["payload"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.payload) + if self.skillset_id is not None: + result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) + result["updatedAt"] = to_float(self.updated_at) return result -class FluffyType(Enum): - """The type of the message""" - - ACTIVITY = "activity" - BACKSTORY = "backstory" - BOT = "bot" - CHECKPOINT = "checkpoint" - CONTEXT = "context" - INSTRUCTION = "instruction" - REASONING = "reasoning" - USER = "user" - - -class BotSessionCreateResponseMessage: - text: str - """The text of the message""" +class UserContextUpdateParams: + context_id: str + """The ID of the context to update""" - type: FluffyType - """The type of the message""" + user_id: str + """The ID of the user""" - def __init__(self, text: str, type: FluffyType) -> None: - self.text = text - self.type = type + def __init__(self, context_id: str, user_id: str) -> None: + self.context_id = context_id + self.user_id = user_id @staticmethod - def from_dict(obj: Any) -> 'BotSessionCreateResponseMessage': + def from_dict(obj: Any) -> 'UserContextUpdateParams': assert isinstance(obj, dict) - text = from_str(obj.get("text")) - type = FluffyType(obj.get("type")) - return BotSessionCreateResponseMessage(text, type) + context_id = from_str(obj.get("contextId")) + user_id = from_str(obj.get("userId")) + return UserContextUpdateParams(context_id, user_id) def to_dict(self) -> dict: result: dict = {} - result["text"] = from_str(self.text) - result["type"] = to_enum(FluffyType, self.type) + result["contextId"] = from_str(self.context_id) + result["userId"] = from_str(self.user_id) return result -class BotSessionCreateResponse: - conversation_id: str - """The ID of the conversation""" +class UserContextUpdateRequest: + """Instance crud properties""" - expires_at: float - """The time the token will expire in milliseconds""" + description: Optional[str] + """The associated description""" - id: str - """The ID of the bot""" + meta: Optional[Dict[str, Any]] + """Meta data information""" - messages: Optional[List[BotSessionCreateResponseMessage]] - """An array of messages included in the conversation""" + name: Optional[str] + """The associated name""" - token: str - """The token for this conversation""" + payload: Optional[Dict[str, Any]] + """Context payload""" - def __init__(self, conversation_id: str, expires_at: float, id: str, messages: Optional[List[BotSessionCreateResponseMessage]], token: str) -> None: - self.conversation_id = conversation_id - self.expires_at = expires_at - self.id = id - self.messages = messages - self.token = token + def __init__(self, description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], payload: Optional[Dict[str, Any]]) -> None: + self.description = description + self.meta = meta + self.name = name + self.payload = payload @staticmethod - def from_dict(obj: Any) -> 'BotSessionCreateResponse': + def from_dict(obj: Any) -> 'UserContextUpdateRequest': assert isinstance(obj, dict) - conversation_id = from_str(obj.get("conversationId")) - expires_at = from_float(obj.get("expiresAt")) - id = from_str(obj.get("id")) - messages = from_union([lambda x: from_list(BotSessionCreateResponseMessage.from_dict, x), from_none], obj.get("messages")) - token = from_str(obj.get("token")) - return BotSessionCreateResponse(conversation_id, expires_at, id, messages, token) + description = from_union([from_str, from_none], obj.get("description")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + payload = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("payload")) + return UserContextUpdateRequest(description, meta, name, payload) def to_dict(self) -> dict: result: dict = {} - result["conversationId"] = from_str(self.conversation_id) - result["expiresAt"] = to_float(self.expires_at) - result["id"] = from_str(self.id) - if self.messages is not None: - result["messages"] = from_union([lambda x: from_list(lambda x: to_class(BotSessionCreateResponseMessage, x), x), from_none], self.messages) - result["token"] = from_str(self.token) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.payload is not None: + result["payload"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.payload) return result -class BotUpdateParams: - bot_id: str +class UserContextUpdateResponse: + id: str + """The ID of the updated context""" - def __init__(self, bot_id: str) -> None: - self.bot_id = bot_id + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'BotUpdateParams': + def from_dict(obj: Any) -> 'UserContextUpdateResponse': assert isinstance(obj, dict) - bot_id = from_str(obj.get("botId")) - return BotUpdateParams(bot_id) + id = from_str(obj.get("id")) + return UserContextUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} - result["botId"] = from_str(self.bot_id) + result["id"] = from_str(self.id) return result -class BotUpdateRequestVisibility(Enum): - """The bot visibility""" - - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" +class UserContextFetchParams: + context_id: str + """The ID of the context to retrieve""" + user_id: str + """The ID of the user""" -class BotUpdateRequest: - """Blueprint properties""" + def __init__(self, context_id: str, user_id: str) -> None: + self.context_id = context_id + self.user_id = user_id - alias: Optional[str] - """The unique alias for the instance""" + @staticmethod + def from_dict(obj: Any) -> 'UserContextFetchParams': + assert isinstance(obj, dict) + context_id = from_str(obj.get("contextId")) + user_id = from_str(obj.get("userId")) + return UserContextFetchParams(context_id, user_id) - backstory: Optional[str] - """The backstory this configuration is using""" + def to_dict(self) -> dict: + result: dict = {} + result["contextId"] = from_str(self.context_id) + result["userId"] = from_str(self.user_id) + return result + + +class UserContextFetchResponse: + """Instance list properties""" blueprint_id: Optional[str] - """The ID of the blueprint""" + bot_id: Optional[str] + contact_id: Optional[str] + created_at: float + """The timestamp (ms) when the instance was created""" dataset_id: Optional[str] - """The id of the dataset this configuration is using""" - description: Optional[str] """The associated description""" + id: str + """The instance ID""" + meta: Optional[Dict[str, Any]] """Meta data information""" - model: Optional[str] - """A model definition""" - - moderation: Optional[bool] - """The moderation flag for this configuration""" - name: Optional[str] """The associated name""" - privacy: Optional[bool] - """The privacy flag for this configuration""" - + payload: Optional[Dict[str, Any]] skillset_id: Optional[str] - """The id of the skillset this configuration is using""" - - visibility: Optional[BotUpdateRequestVisibility] - """The bot visibility""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], backstory: Optional[str], blueprint_id: Optional[str], dataset_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], model: Optional[str], moderation: Optional[bool], name: Optional[str], privacy: Optional[bool], skillset_id: Optional[str], visibility: Optional[BotUpdateRequestVisibility]) -> None: - self.alias = alias - self.backstory = backstory + def __init__(self, blueprint_id: Optional[str], bot_id: Optional[str], contact_id: Optional[str], created_at: float, dataset_id: Optional[str], description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], payload: Optional[Dict[str, Any]], skillset_id: Optional[str], updated_at: float) -> None: self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.contact_id = contact_id + self.created_at = created_at self.dataset_id = dataset_id self.description = description + self.id = id self.meta = meta - self.model = model - self.moderation = moderation self.name = name - self.privacy = privacy + self.payload = payload self.skillset_id = skillset_id - self.visibility = visibility + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'BotUpdateRequest': + def from_dict(obj: Any) -> 'UserContextFetchResponse': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - backstory = from_union([from_str, from_none], obj.get("backstory")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) + created_at = from_float(obj.get("createdAt")) dataset_id = from_union([from_str, from_none], obj.get("datasetId")) description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - model = from_union([from_str, from_none], obj.get("model")) - moderation = from_union([from_bool, from_none], obj.get("moderation")) name = from_union([from_str, from_none], obj.get("name")) - privacy = from_union([from_bool, from_none], obj.get("privacy")) + payload = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("payload")) skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) - visibility = from_union([BotUpdateRequestVisibility, from_none], obj.get("visibility")) - return BotUpdateRequest(alias, backstory, blueprint_id, dataset_id, description, meta, model, moderation, name, privacy, skillset_id, visibility) + updated_at = from_float(obj.get("updatedAt")) + return UserContextFetchResponse(blueprint_id, bot_id, contact_id, created_at, dataset_id, description, id, meta, name, payload, skillset_id, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.backstory is not None: - result["backstory"] = from_union([from_str, from_none], self.backstory) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) + result["createdAt"] = to_float(self.created_at) if self.dataset_id is not None: result["datasetId"] = from_union([from_str, from_none], self.dataset_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) - if self.moderation is not None: - result["moderation"] = from_union([from_bool, from_none], self.moderation) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.privacy is not None: - result["privacy"] = from_union([from_bool, from_none], self.privacy) + if self.payload is not None: + result["payload"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.payload) if self.skillset_id is not None: result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(BotUpdateRequestVisibility, x), from_none], self.visibility) - return result - - -class BotUpdateResponse: - id: str - """The ID of the updated bot""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'BotUpdateResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return BotUpdateResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - - -class BotUpvoteParams: - bot_id: str - """The ID of the bot""" - - def __init__(self, bot_id: str) -> None: - self.bot_id = bot_id - - @staticmethod - def from_dict(obj: Any) -> 'BotUpvoteParams': - assert isinstance(obj, dict) - bot_id = from_str(obj.get("botId")) - return BotUpvoteParams(bot_id) - - def to_dict(self) -> dict: - result: dict = {} - result["botId"] = from_str(self.bot_id) - return result - - -class BotUpvoteRequest: - reason: Optional[str] - """The reason for the upvote""" - - value: Optional[int] - """The value of the upvote""" - - def __init__(self, reason: Optional[str], value: Optional[int]) -> None: - self.reason = reason - self.value = value - - @staticmethod - def from_dict(obj: Any) -> 'BotUpvoteRequest': - assert isinstance(obj, dict) - reason = from_union([from_str, from_none], obj.get("reason")) - value = from_union([from_int, from_none], obj.get("value")) - return BotUpvoteRequest(reason, value) - - def to_dict(self) -> dict: - result: dict = {} - if self.reason is not None: - result["reason"] = from_union([from_str, from_none], self.reason) - if self.value is not None: - result["value"] = from_union([from_int, from_none], self.value) - return result - - -class BotUpvoteResponse: - id: str - """The ID of the upvoted bot""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'BotUpvoteResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return BotUpvoteResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - - -class BotUsageFetchParams: - bot_id: str - """The ID of the bot""" - - bot_usage_fetch_params_from: Optional[datetime] - """Start date for the period (ISO 8601 format)""" - - to: Optional[datetime] - """End date for the period (ISO 8601 format)""" - - def __init__(self, bot_id: str, bot_usage_fetch_params_from: Optional[datetime], to: Optional[datetime]) -> None: - self.bot_id = bot_id - self.bot_usage_fetch_params_from = bot_usage_fetch_params_from - self.to = to - - @staticmethod - def from_dict(obj: Any) -> 'BotUsageFetchParams': - assert isinstance(obj, dict) - bot_id = from_str(obj.get("botId")) - bot_usage_fetch_params_from = from_union([from_datetime, from_none], obj.get("from")) - to = from_union([from_datetime, from_none], obj.get("to")) - return BotUsageFetchParams(bot_id, bot_usage_fetch_params_from, to) - - def to_dict(self) -> dict: - result: dict = {} - result["botId"] = from_str(self.bot_id) - if self.bot_usage_fetch_params_from is not None: - result["from"] = from_union([lambda x: x.isoformat(), from_none], self.bot_usage_fetch_params_from) - if self.to is not None: - result["to"] = from_union([lambda x: x.isoformat(), from_none], self.to) - return result - - -class BotUsageFetchResponse: - conversations: Optional[int] - """Total number of conversations""" - - messages: Optional[int] - """Total number of messages""" - - tokens: Optional[int] - """Total number of BASE tokens used""" - - def __init__(self, conversations: Optional[int], messages: Optional[int], tokens: Optional[int]) -> None: - self.conversations = conversations - self.messages = messages - self.tokens = tokens - - @staticmethod - def from_dict(obj: Any) -> 'BotUsageFetchResponse': - assert isinstance(obj, dict) - conversations = from_union([from_int, from_none], obj.get("conversations")) - messages = from_union([from_int, from_none], obj.get("messages")) - tokens = from_union([from_int, from_none], obj.get("tokens")) - return BotUsageFetchResponse(conversations, messages, tokens) - - def to_dict(self) -> dict: - result: dict = {} - if self.conversations is not None: - result["conversations"] = from_union([from_int, from_none], self.conversations) - if self.messages is not None: - result["messages"] = from_union([from_int, from_none], self.messages) - if self.tokens is not None: - result["tokens"] = from_union([from_int, from_none], self.tokens) + result["updatedAt"] = to_float(self.updated_at) return result -class BotCreateRequestVisibility(Enum): - """The bot visibility""" - - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" - - -class BotCreateRequest: - """Blueprint properties""" - - alias: Optional[str] - """The unique alias for the instance""" - - backstory: Optional[str] - """The backstory this configuration is using""" - - blueprint_id: Optional[str] - """The ID of the blueprint""" - - dataset_id: Optional[str] - """The id of the dataset this configuration is using""" - - description: Optional[str] - """The associated description""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - model: Optional[str] - """A model definition""" - - moderation: Optional[bool] - """The moderation flag for this configuration""" - - name: Optional[str] - """The associated name""" - - privacy: Optional[bool] - """The privacy flag for this configuration""" - - skillset_id: Optional[str] - """The id of the skillset this configuration is using""" +class UserContextDeleteParams: + context_id: str + """The ID of the context to delete""" - visibility: Optional[BotCreateRequestVisibility] - """The bot visibility""" + user_id: str + """The ID of the user""" - def __init__(self, alias: Optional[str], backstory: Optional[str], blueprint_id: Optional[str], dataset_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], model: Optional[str], moderation: Optional[bool], name: Optional[str], privacy: Optional[bool], skillset_id: Optional[str], visibility: Optional[BotCreateRequestVisibility]) -> None: - self.alias = alias - self.backstory = backstory - self.blueprint_id = blueprint_id - self.dataset_id = dataset_id - self.description = description - self.meta = meta - self.model = model - self.moderation = moderation - self.name = name - self.privacy = privacy - self.skillset_id = skillset_id - self.visibility = visibility + def __init__(self, context_id: str, user_id: str) -> None: + self.context_id = context_id + self.user_id = user_id @staticmethod - def from_dict(obj: Any) -> 'BotCreateRequest': + def from_dict(obj: Any) -> 'UserContextDeleteParams': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - backstory = from_union([from_str, from_none], obj.get("backstory")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) - description = from_union([from_str, from_none], obj.get("description")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - model = from_union([from_str, from_none], obj.get("model")) - moderation = from_union([from_bool, from_none], obj.get("moderation")) - name = from_union([from_str, from_none], obj.get("name")) - privacy = from_union([from_bool, from_none], obj.get("privacy")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) - visibility = from_union([BotCreateRequestVisibility, from_none], obj.get("visibility")) - return BotCreateRequest(alias, backstory, blueprint_id, dataset_id, description, meta, model, moderation, name, privacy, skillset_id, visibility) + context_id = from_str(obj.get("contextId")) + user_id = from_str(obj.get("userId")) + return UserContextDeleteParams(context_id, user_id) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.backstory is not None: - result["backstory"] = from_union([from_str, from_none], self.backstory) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) - if self.moderation is not None: - result["moderation"] = from_union([from_bool, from_none], self.moderation) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.privacy is not None: - result["privacy"] = from_union([from_bool, from_none], self.privacy) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(BotCreateRequestVisibility, x), from_none], self.visibility) + result["contextId"] = from_str(self.context_id) + result["userId"] = from_str(self.user_id) return result -class BotCreateResponse: +class UserContextDeleteResponse: id: str - """The ID of the created bot""" + """The ID of the deleted context""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'BotCreateResponse': + def from_dict(obj: Any) -> 'UserContextDeleteResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return BotCreateResponse(id) + return UserContextDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -3155,40 +3391,40 @@ def to_dict(self) -> dict: return result -class BotListParamsOrder(Enum): +class UsageRecordListParamsOrder(Enum): """The order of the paginated items""" ASC = "asc" DESC = "desc" -class BotListParams: +class UsageRecordListParams: cursor: Optional[str] """The cursor to use for pagination""" meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" + """Key-value pairs to filter usage records by metadata""" - order: Optional[BotListParamsOrder] + order: Optional[UsageRecordListParamsOrder] """The order of the paginated items""" take: Optional[int] """The number of items to retrieve""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[BotListParamsOrder], take: Optional[int]) -> None: + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[UsageRecordListParamsOrder], take: Optional[int]) -> None: self.cursor = cursor self.meta = meta self.order = order self.take = take @staticmethod - def from_dict(obj: Any) -> 'BotListParams': + def from_dict(obj: Any) -> 'UsageRecordListParams': assert isinstance(obj, dict) cursor = from_union([from_str, from_none], obj.get("cursor")) meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([BotListParamsOrder, from_none], obj.get("order")) + order = from_union([UsageRecordListParamsOrder, from_none], obj.get("order")) take = from_union([from_int, from_none], obj.get("take")) - return BotListParams(cursor, meta, order, take) + return UsageRecordListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} @@ -3197,37 +3433,38 @@ def to_dict(self) -> dict: if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(BotListParamsOrder, x), from_none], self.order) + result["order"] = from_union([lambda x: to_enum(UsageRecordListParamsOrder, x), from_none], self.order) if self.take is not None: result["take"] = from_union([from_int, from_none], self.take) return result -class TentacledVisibility(Enum): - """The bot visibility""" +class UsageRecordListResponseItem: + """Instance list properties""" - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" + ability_id: Optional[str] + """Related ability ID if applicable""" + blueprint_id: Optional[str] + """Related blueprint ID if applicable""" -class BotListResponseItem: - """Blueprint properties""" + bot_id: Optional[str] + """Related bot ID if applicable""" - alias: Optional[str] - """The unique alias for the instance""" + contact_id: Optional[str] + """Related contact ID if applicable""" - backstory: Optional[str] - """The backstory this configuration is using""" + conversation_id: Optional[str] + """Related conversation ID if applicable""" - blueprint_id: Optional[str] - """The ID of the blueprint""" + count: int + """The usage count""" created_at: float """The timestamp (ms) when the instance was created""" dataset_id: Optional[str] - """The id of the dataset this configuration is using""" + """Related dataset ID if applicable""" description: Optional[str] """The associated description""" @@ -3235,466 +3472,370 @@ class BotListResponseItem: id: str """The instance ID""" + message_id: Optional[str] + """Related message ID if applicable""" + meta: Optional[Dict[str, Any]] """Meta data information""" - model: Optional[str] - """A model definition""" - - moderation: Optional[bool] - """The moderation flag for this configuration""" - name: Optional[str] """The associated name""" - privacy: Optional[bool] - """The privacy flag for this configuration""" - skillset_id: Optional[str] - """The id of the skillset this configuration is using""" + """Related skillset ID if applicable""" + + task_id: Optional[str] + """Related task ID if applicable""" + + type: str + """The usage type""" updated_at: float """The timestamp (ms) when the instance was updated""" - visibility: Optional[TentacledVisibility] - """The bot visibility""" - - def __init__(self, alias: Optional[str], backstory: Optional[str], blueprint_id: Optional[str], created_at: float, dataset_id: Optional[str], description: Optional[str], id: str, meta: Optional[Dict[str, Any]], model: Optional[str], moderation: Optional[bool], name: Optional[str], privacy: Optional[bool], skillset_id: Optional[str], updated_at: float, visibility: Optional[TentacledVisibility]) -> None: - self.alias = alias - self.backstory = backstory + def __init__(self, ability_id: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_id: Optional[str], conversation_id: Optional[str], count: int, created_at: float, dataset_id: Optional[str], description: Optional[str], id: str, message_id: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], skillset_id: Optional[str], task_id: Optional[str], type: str, updated_at: float) -> None: + self.ability_id = ability_id self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.contact_id = contact_id + self.conversation_id = conversation_id + self.count = count self.created_at = created_at self.dataset_id = dataset_id self.description = description self.id = id + self.message_id = message_id self.meta = meta - self.model = model - self.moderation = moderation self.name = name - self.privacy = privacy self.skillset_id = skillset_id + self.task_id = task_id + self.type = type self.updated_at = updated_at - self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'BotListResponseItem': + def from_dict(obj: Any) -> 'UsageRecordListResponseItem': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - backstory = from_union([from_str, from_none], obj.get("backstory")) + ability_id = from_union([from_str, from_none], obj.get("abilityId")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) + conversation_id = from_union([from_str, from_none], obj.get("conversationId")) + count = from_int(obj.get("count")) created_at = from_float(obj.get("createdAt")) dataset_id = from_union([from_str, from_none], obj.get("datasetId")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) + message_id = from_union([from_str, from_none], obj.get("messageId")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - model = from_union([from_str, from_none], obj.get("model")) - moderation = from_union([from_bool, from_none], obj.get("moderation")) name = from_union([from_str, from_none], obj.get("name")) - privacy = from_union([from_bool, from_none], obj.get("privacy")) skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + task_id = from_union([from_str, from_none], obj.get("taskId")) + type = from_str(obj.get("type")) updated_at = from_float(obj.get("updatedAt")) - visibility = from_union([TentacledVisibility, from_none], obj.get("visibility")) - return BotListResponseItem(alias, backstory, blueprint_id, created_at, dataset_id, description, id, meta, model, moderation, name, privacy, skillset_id, updated_at, visibility) + return UsageRecordListResponseItem(ability_id, blueprint_id, bot_id, contact_id, conversation_id, count, created_at, dataset_id, description, id, message_id, meta, name, skillset_id, task_id, type, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.backstory is not None: - result["backstory"] = from_union([from_str, from_none], self.backstory) + if self.ability_id is not None: + result["abilityId"] = from_union([from_str, from_none], self.ability_id) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) + if self.conversation_id is not None: + result["conversationId"] = from_union([from_str, from_none], self.conversation_id) + result["count"] = from_int(self.count) result["createdAt"] = to_float(self.created_at) if self.dataset_id is not None: result["datasetId"] = from_union([from_str, from_none], self.dataset_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) + if self.message_id is not None: + result["messageId"] = from_union([from_str, from_none], self.message_id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) - if self.moderation is not None: - result["moderation"] = from_union([from_bool, from_none], self.moderation) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.privacy is not None: - result["privacy"] = from_union([from_bool, from_none], self.privacy) if self.skillset_id is not None: result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) + if self.task_id is not None: + result["taskId"] = from_union([from_str, from_none], self.task_id) + result["type"] = from_str(self.type) result["updatedAt"] = to_float(self.updated_at) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(TentacledVisibility, x), from_none], self.visibility) return result -class BotListResponse: +class UsageRecordListResponse: cursor: str """Cursor for fetching the next page""" - items: List[BotListResponseItem] + items: List[UsageRecordListResponseItem] - def __init__(self, cursor: str, items: List[BotListResponseItem]) -> None: + def __init__(self, cursor: str, items: List[UsageRecordListResponseItem]) -> None: self.cursor = cursor self.items = items @staticmethod - def from_dict(obj: Any) -> 'BotListResponse': + def from_dict(obj: Any) -> 'UsageRecordListResponse': assert isinstance(obj, dict) cursor = from_str(obj.get("cursor")) - items = from_list(BotListResponseItem.from_dict, obj.get("items")) - return BotListResponse(cursor, items) + items = from_list(UsageRecordListResponseItem.from_dict, obj.get("items")) + return UsageRecordListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(BotListResponseItem, x), self.items) + result["items"] = from_list(lambda x: to_class(UsageRecordListResponseItem, x), self.items) return result -class StickyVisibility(Enum): - """The bot visibility""" +class UsageFetchResponseDatabase: + """Database usage information""" - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" + abilities: float + """The number of abilities the user has created""" + datasets: float + """The number of datasets the user has created""" -class BotListStreamItemData: - """Blueprint properties""" - - alias: Optional[str] - """The unique alias for the instance""" - - backstory: Optional[str] - """The backstory this configuration is using""" - - blueprint_id: Optional[str] - """The ID of the blueprint""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - dataset_id: Optional[str] - """The id of the dataset this configuration is using""" - - description: Optional[str] - """The associated description""" - - id: str - """The instance ID""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - model: Optional[str] - """A model definition""" - - moderation: Optional[bool] - """The moderation flag for this configuration""" - - name: Optional[str] - """The associated name""" - - privacy: Optional[bool] - """The privacy flag for this configuration""" + files: float + """The number of files the user has created""" - skillset_id: Optional[str] - """The id of the skillset this configuration is using""" + records: float + """The number of records the user has created""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + skillsets: float + """The number of skillsets the user has created""" - visibility: Optional[StickyVisibility] - """The bot visibility""" + users: float + """The number of users the user has created""" - def __init__(self, alias: Optional[str], backstory: Optional[str], blueprint_id: Optional[str], created_at: float, dataset_id: Optional[str], description: Optional[str], id: str, meta: Optional[Dict[str, Any]], model: Optional[str], moderation: Optional[bool], name: Optional[str], privacy: Optional[bool], skillset_id: Optional[str], updated_at: float, visibility: Optional[StickyVisibility]) -> None: - self.alias = alias - self.backstory = backstory - self.blueprint_id = blueprint_id - self.created_at = created_at - self.dataset_id = dataset_id - self.description = description - self.id = id - self.meta = meta - self.model = model - self.moderation = moderation - self.name = name - self.privacy = privacy - self.skillset_id = skillset_id - self.updated_at = updated_at - self.visibility = visibility + def __init__(self, abilities: float, datasets: float, files: float, records: float, skillsets: float, users: float) -> None: + self.abilities = abilities + self.datasets = datasets + self.files = files + self.records = records + self.skillsets = skillsets + self.users = users @staticmethod - def from_dict(obj: Any) -> 'BotListStreamItemData': + def from_dict(obj: Any) -> 'UsageFetchResponseDatabase': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - backstory = from_union([from_str, from_none], obj.get("backstory")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - created_at = from_float(obj.get("createdAt")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) - description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - model = from_union([from_str, from_none], obj.get("model")) - moderation = from_union([from_bool, from_none], obj.get("moderation")) - name = from_union([from_str, from_none], obj.get("name")) - privacy = from_union([from_bool, from_none], obj.get("privacy")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) - updated_at = from_float(obj.get("updatedAt")) - visibility = from_union([StickyVisibility, from_none], obj.get("visibility")) - return BotListStreamItemData(alias, backstory, blueprint_id, created_at, dataset_id, description, id, meta, model, moderation, name, privacy, skillset_id, updated_at, visibility) + abilities = from_float(obj.get("abilities")) + datasets = from_float(obj.get("datasets")) + files = from_float(obj.get("files")) + records = from_float(obj.get("records")) + skillsets = from_float(obj.get("skillsets")) + users = from_float(obj.get("users")) + return UsageFetchResponseDatabase(abilities, datasets, files, records, skillsets, users) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.backstory is not None: - result["backstory"] = from_union([from_str, from_none], self.backstory) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - result["createdAt"] = to_float(self.created_at) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) - if self.moderation is not None: - result["moderation"] = from_union([from_bool, from_none], self.moderation) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.privacy is not None: - result["privacy"] = from_union([from_bool, from_none], self.privacy) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) - result["updatedAt"] = to_float(self.updated_at) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(StickyVisibility, x), from_none], self.visibility) + result["abilities"] = to_float(self.abilities) + result["datasets"] = to_float(self.datasets) + result["files"] = to_float(self.files) + result["records"] = to_float(self.records) + result["skillsets"] = to_float(self.skillsets) + result["users"] = to_float(self.users) return result -class BotListStreamItemType(Enum): - """The type of event""" - - ITEM = "item" +class UsageFetchResponse: + conversations: float + """The number of conversations the user has created""" + database: UsageFetchResponseDatabase + """Database usage information""" -class BotListStreamItem: - data: BotListStreamItemData - """Blueprint properties""" + messages: float + """The number of messages the user has sent""" - type: BotListStreamItemType - """The type of event""" + tokens: float + """The number of tokens the user has used""" - def __init__(self, data: BotListStreamItemData, type: BotListStreamItemType) -> None: - self.data = data - self.type = type + def __init__(self, conversations: float, database: UsageFetchResponseDatabase, messages: float, tokens: float) -> None: + self.conversations = conversations + self.database = database + self.messages = messages + self.tokens = tokens @staticmethod - def from_dict(obj: Any) -> 'BotListStreamItem': + def from_dict(obj: Any) -> 'UsageFetchResponse': assert isinstance(obj, dict) - data = BotListStreamItemData.from_dict(obj.get("data")) - type = BotListStreamItemType(obj.get("type")) - return BotListStreamItem(data, type) + conversations = from_float(obj.get("conversations")) + database = UsageFetchResponseDatabase.from_dict(obj.get("database")) + messages = from_float(obj.get("messages")) + tokens = from_float(obj.get("tokens")) + return UsageFetchResponse(conversations, database, messages, tokens) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(BotListStreamItemData, self.data) - result["type"] = to_enum(BotListStreamItemType, self.type) + result["conversations"] = to_float(self.conversations) + result["database"] = to_class(UsageFetchResponseDatabase, self.database) + result["messages"] = to_float(self.messages) + result["tokens"] = to_float(self.tokens) return result -class ChannelMessagePublishParams: - channel_id: str - """The ID of the channel to publish to (minimum 16 characters)""" - - def __init__(self, channel_id: str) -> None: - self.channel_id = channel_id - - @staticmethod - def from_dict(obj: Any) -> 'ChannelMessagePublishParams': - assert isinstance(obj, dict) - channel_id = from_str(obj.get("channelId")) - return ChannelMessagePublishParams(channel_id) - - def to_dict(self) -> dict: - result: dict = {} - result["channelId"] = from_str(self.channel_id) - return result - +class Conversation: + date: float + """The date of the data point""" -class ChannelMessagePublishRequest: - message: Dict[str, Any] - """The message to publish to the channel""" + total: float + """The total number of conversations the user has used""" - def __init__(self, message: Dict[str, Any]) -> None: - self.message = message + def __init__(self, date: float, total: float) -> None: + self.date = date + self.total = total @staticmethod - def from_dict(obj: Any) -> 'ChannelMessagePublishRequest': + def from_dict(obj: Any) -> 'Conversation': assert isinstance(obj, dict) - message = from_dict(lambda x: x, obj.get("message")) - return ChannelMessagePublishRequest(message) + date = from_float(obj.get("date")) + total = from_float(obj.get("total")) + return Conversation(date, total) def to_dict(self) -> dict: result: dict = {} - result["message"] = from_dict(lambda x: x, self.message) + result["date"] = to_float(self.date) + result["total"] = to_float(self.total) return result -class ChannelMessagePublishResponse: - id: str - """The ID of the channel the message was published to""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'ChannelMessagePublishResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return ChannelMessagePublishResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - +class UsageSeriesFetchResponseMessage: + date: float + """The date of the data point""" -class ChannelMessagesSubscribeParams: - channel_id: str - """The ID of the channel to subscribe to (minimum 16 characters)""" + total: float + """The total number of messages the user has used""" - def __init__(self, channel_id: str) -> None: - self.channel_id = channel_id + def __init__(self, date: float, total: float) -> None: + self.date = date + self.total = total @staticmethod - def from_dict(obj: Any) -> 'ChannelMessagesSubscribeParams': + def from_dict(obj: Any) -> 'UsageSeriesFetchResponseMessage': assert isinstance(obj, dict) - channel_id = from_str(obj.get("channelId")) - return ChannelMessagesSubscribeParams(channel_id) + date = from_float(obj.get("date")) + total = from_float(obj.get("total")) + return UsageSeriesFetchResponseMessage(date, total) def to_dict(self) -> dict: result: dict = {} - result["channelId"] = from_str(self.channel_id) + result["date"] = to_float(self.date) + result["total"] = to_float(self.total) return result -class ChannelMessagesSubscribeRequest: - history_length: Optional[int] - """Number of historical messages to replay from the channel - before subscribing to live updates. When provided, the - subscriber will first receive up to this many recent - messages that were published before the subscription - started. This is useful for catching up on messages that - may have been published during connection setup. - """ +class Token: + date: float + """The date of the data point""" - def __init__(self, history_length: Optional[int]) -> None: - self.history_length = history_length + total: float + """The total number of tokens the user has used""" + + def __init__(self, date: float, total: float) -> None: + self.date = date + self.total = total @staticmethod - def from_dict(obj: Any) -> 'ChannelMessagesSubscribeRequest': + def from_dict(obj: Any) -> 'Token': assert isinstance(obj, dict) - history_length = from_union([from_int, from_none], obj.get("historyLength")) - return ChannelMessagesSubscribeRequest(history_length) + date = from_float(obj.get("date")) + total = from_float(obj.get("total")) + return Token(date, total) def to_dict(self) -> dict: result: dict = {} - if self.history_length is not None: - result["historyLength"] = from_union([from_int, from_none], self.history_length) + result["date"] = to_float(self.date) + result["total"] = to_float(self.total) return result -class ChannelMessagesSubscribeStreamItemType(Enum): - """The type of event""" - - MESSAGE = "message" - +class UsageSeriesFetchResponse: + conversations: List[Conversation] + """The number of conversations the user has created""" -class ChannelMessagesSubscribeStreamItem: - data: Dict[str, Any] - """The message data published to the channel""" + messages: List[UsageSeriesFetchResponseMessage] + """The number of messages the user has created""" - type: ChannelMessagesSubscribeStreamItemType - """The type of event""" + tokens: List[Token] + """The number of tokens the user has used""" - def __init__(self, data: Dict[str, Any], type: ChannelMessagesSubscribeStreamItemType) -> None: - self.data = data - self.type = type + def __init__(self, conversations: List[Conversation], messages: List[UsageSeriesFetchResponseMessage], tokens: List[Token]) -> None: + self.conversations = conversations + self.messages = messages + self.tokens = tokens @staticmethod - def from_dict(obj: Any) -> 'ChannelMessagesSubscribeStreamItem': + def from_dict(obj: Any) -> 'UsageSeriesFetchResponse': assert isinstance(obj, dict) - data = from_dict(lambda x: x, obj.get("data")) - type = ChannelMessagesSubscribeStreamItemType(obj.get("type")) - return ChannelMessagesSubscribeStreamItem(data, type) + conversations = from_list(Conversation.from_dict, obj.get("conversations")) + messages = from_list(UsageSeriesFetchResponseMessage.from_dict, obj.get("messages")) + tokens = from_list(Token.from_dict, obj.get("tokens")) + return UsageSeriesFetchResponse(conversations, messages, tokens) def to_dict(self) -> dict: result: dict = {} - result["data"] = from_dict(lambda x: x, self.data) - result["type"] = to_enum(ChannelMessagesSubscribeStreamItemType, self.type) + result["conversations"] = from_list(lambda x: to_class(Conversation, x), self.conversations) + result["messages"] = from_list(lambda x: to_class(UsageSeriesFetchResponseMessage, x), self.messages) + result["tokens"] = from_list(lambda x: to_class(Token, x), self.tokens) return result -class ContactConversationListParamsOrder(Enum): +class TeamListParamsOrder(Enum): """The order of the paginated items""" ASC = "asc" DESC = "desc" -class ContactConversationListParams: - contact_id: str - """The ID of the contact to list conversations for""" - +class TeamListParams: cursor: Optional[str] """The cursor to use for pagination""" - order: Optional[ContactConversationListParamsOrder] + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" + + order: Optional[TeamListParamsOrder] """The order of the paginated items""" take: Optional[int] """The number of items to retrieve""" - def __init__(self, contact_id: str, cursor: Optional[str], order: Optional[ContactConversationListParamsOrder], take: Optional[int]) -> None: - self.contact_id = contact_id + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[TeamListParamsOrder], take: Optional[int]) -> None: self.cursor = cursor + self.meta = meta self.order = order self.take = take @staticmethod - def from_dict(obj: Any) -> 'ContactConversationListParams': + def from_dict(obj: Any) -> 'TeamListParams': assert isinstance(obj, dict) - contact_id = from_str(obj.get("contactId")) cursor = from_union([from_str, from_none], obj.get("cursor")) - order = from_union([ContactConversationListParamsOrder, from_none], obj.get("order")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([TeamListParamsOrder, from_none], obj.get("order")) take = from_union([from_int, from_none], obj.get("take")) - return ContactConversationListParams(contact_id, cursor, order, take) + return TeamListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} - result["contactId"] = from_str(self.contact_id) if self.cursor is not None: result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(ContactConversationListParamsOrder, x), from_none], self.order) + result["order"] = from_union([lambda x: to_enum(TeamListParamsOrder, x), from_none], self.order) if self.take is not None: result["take"] = from_union([from_int, from_none], self.take) return result -class ContactConversationListResponseItem: - """A bot configuration or reference - - A bot configuration that can be applied without a dedicated bot instance. - """ - contact_id: Optional[str] - """The contact id assigned to this conversation""" +class TeamListResponseItem: + """Instance list properties""" created_at: float """The timestamp (ms) when the instance was created""" @@ -3711,74 +3852,30 @@ class ContactConversationListResponseItem: name: Optional[str] """The associated name""" - task_id: Optional[str] - """The task id assigned to this conversation""" - updated_at: float """The timestamp (ms) when the instance was updated""" - bot_id: Optional[str] - """The ID of the bot this configuration is using""" - - backstory: Optional[str] - """The backstory this configuration is using""" - - dataset_id: Optional[str] - """The id of the dataset this configuration is using""" - - model: Optional[str] - """A model definition""" - - moderation: Optional[bool] - """The moderation flag for this configuration""" - - privacy: Optional[bool] - """The privacy flag for this configuration""" - - skillset_id: Optional[str] - """The id of the skillset this configuration is using""" - - def __init__(self, contact_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], task_id: Optional[str], updated_at: float, bot_id: Optional[str], backstory: Optional[str], dataset_id: Optional[str], model: Optional[str], moderation: Optional[bool], privacy: Optional[bool], skillset_id: Optional[str]) -> None: - self.contact_id = contact_id + def __init__(self, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: self.created_at = created_at self.description = description self.id = id self.meta = meta self.name = name - self.task_id = task_id self.updated_at = updated_at - self.bot_id = bot_id - self.backstory = backstory - self.dataset_id = dataset_id - self.model = model - self.moderation = moderation - self.privacy = privacy - self.skillset_id = skillset_id @staticmethod - def from_dict(obj: Any) -> 'ContactConversationListResponseItem': + def from_dict(obj: Any) -> 'TeamListResponseItem': assert isinstance(obj, dict) - contact_id = from_union([from_str, from_none], obj.get("contactId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - task_id = from_union([from_str, from_none], obj.get("taskId")) updated_at = from_float(obj.get("updatedAt")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - backstory = from_union([from_str, from_none], obj.get("backstory")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) - model = from_union([from_str, from_none], obj.get("model")) - moderation = from_union([from_bool, from_none], obj.get("moderation")) - privacy = from_union([from_bool, from_none], obj.get("privacy")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) - return ContactConversationListResponseItem(contact_id, created_at, description, id, meta, name, task_id, updated_at, bot_id, backstory, dataset_id, model, moderation, privacy, skillset_id) + return TeamListResponseItem(created_at, description, id, meta, name, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.contact_id is not None: - result["contactId"] = from_union([from_str, from_none], self.contact_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) @@ -3787,57 +3884,36 @@ def to_dict(self) -> dict: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.task_id is not None: - result["taskId"] = from_union([from_str, from_none], self.task_id) result["updatedAt"] = to_float(self.updated_at) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.backstory is not None: - result["backstory"] = from_union([from_str, from_none], self.backstory) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) - if self.moderation is not None: - result["moderation"] = from_union([from_bool, from_none], self.moderation) - if self.privacy is not None: - result["privacy"] = from_union([from_bool, from_none], self.privacy) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) return result -class ContactConversationListResponse: +class TeamListResponse: cursor: str """Cursor for fetching the next page""" - items: List[ContactConversationListResponseItem] + items: List[TeamListResponseItem] - def __init__(self, cursor: str, items: List[ContactConversationListResponseItem]) -> None: + def __init__(self, cursor: str, items: List[TeamListResponseItem]) -> None: self.cursor = cursor self.items = items @staticmethod - def from_dict(obj: Any) -> 'ContactConversationListResponse': + def from_dict(obj: Any) -> 'TeamListResponse': assert isinstance(obj, dict) cursor = from_str(obj.get("cursor")) - items = from_list(ContactConversationListResponseItem.from_dict, obj.get("items")) - return ContactConversationListResponse(cursor, items) + items = from_list(TeamListResponseItem.from_dict, obj.get("items")) + return TeamListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(ContactConversationListResponseItem, x), self.items) + result["items"] = from_list(lambda x: to_class(TeamListResponseItem, x), self.items) return result -class ContactConversationListStreamItemData: - """A bot configuration or reference - - A bot configuration that can be applied without a dedicated bot instance. - """ - contact_id: Optional[str] - """The contact id assigned to this conversation""" +class TeamListStreamItemData: + """Instance list properties""" created_at: float """The timestamp (ms) when the instance was created""" @@ -3854,74 +3930,30 @@ class ContactConversationListStreamItemData: name: Optional[str] """The associated name""" - task_id: Optional[str] - """The task id assigned to this conversation""" - updated_at: float """The timestamp (ms) when the instance was updated""" - bot_id: Optional[str] - """The ID of the bot this configuration is using""" - - backstory: Optional[str] - """The backstory this configuration is using""" - - dataset_id: Optional[str] - """The id of the dataset this configuration is using""" - - model: Optional[str] - """A model definition""" - - moderation: Optional[bool] - """The moderation flag for this configuration""" - - privacy: Optional[bool] - """The privacy flag for this configuration""" - - skillset_id: Optional[str] - """The id of the skillset this configuration is using""" - - def __init__(self, contact_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], task_id: Optional[str], updated_at: float, bot_id: Optional[str], backstory: Optional[str], dataset_id: Optional[str], model: Optional[str], moderation: Optional[bool], privacy: Optional[bool], skillset_id: Optional[str]) -> None: - self.contact_id = contact_id + def __init__(self, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: self.created_at = created_at self.description = description self.id = id self.meta = meta self.name = name - self.task_id = task_id self.updated_at = updated_at - self.bot_id = bot_id - self.backstory = backstory - self.dataset_id = dataset_id - self.model = model - self.moderation = moderation - self.privacy = privacy - self.skillset_id = skillset_id @staticmethod - def from_dict(obj: Any) -> 'ContactConversationListStreamItemData': + def from_dict(obj: Any) -> 'TeamListStreamItemData': assert isinstance(obj, dict) - contact_id = from_union([from_str, from_none], obj.get("contactId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - task_id = from_union([from_str, from_none], obj.get("taskId")) updated_at = from_float(obj.get("updatedAt")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - backstory = from_union([from_str, from_none], obj.get("backstory")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) - model = from_union([from_str, from_none], obj.get("model")) - moderation = from_union([from_bool, from_none], obj.get("moderation")) - privacy = from_union([from_bool, from_none], obj.get("privacy")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) - return ContactConversationListStreamItemData(contact_id, created_at, description, id, meta, name, task_id, updated_at, bot_id, backstory, dataset_id, model, moderation, privacy, skillset_id) + return TeamListStreamItemData(created_at, description, id, meta, name, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.contact_id is not None: - result["contactId"] = from_union([from_str, from_none], self.contact_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) @@ -3930,261 +3962,152 @@ def to_dict(self) -> dict: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.task_id is not None: - result["taskId"] = from_union([from_str, from_none], self.task_id) result["updatedAt"] = to_float(self.updated_at) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.backstory is not None: - result["backstory"] = from_union([from_str, from_none], self.backstory) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) - if self.moderation is not None: - result["moderation"] = from_union([from_bool, from_none], self.moderation) - if self.privacy is not None: - result["privacy"] = from_union([from_bool, from_none], self.privacy) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) return result -class ContactConversationListStreamItemType(Enum): +class TeamListStreamItemType(Enum): """The type of event""" ITEM = "item" -class ContactConversationListStreamItem: - data: ContactConversationListStreamItemData - """A bot configuration or reference""" +class TeamListStreamItem: + data: TeamListStreamItemData + """Instance list properties""" - type: ContactConversationListStreamItemType + type: TeamListStreamItemType """The type of event""" - def __init__(self, data: ContactConversationListStreamItemData, type: ContactConversationListStreamItemType) -> None: + def __init__(self, data: TeamListStreamItemData, type: TeamListStreamItemType) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'ContactConversationListStreamItem': - assert isinstance(obj, dict) - data = ContactConversationListStreamItemData.from_dict(obj.get("data")) - type = ContactConversationListStreamItemType(obj.get("type")) - return ContactConversationListStreamItem(data, type) - - def to_dict(self) -> dict: - result: dict = {} - result["data"] = to_class(ContactConversationListStreamItemData, self.data) - result["type"] = to_enum(ContactConversationListStreamItemType, self.type) - return result - - -class ContactDeleteParams: - contact_id: str - """The ID of the contact to delete""" - - def __init__(self, contact_id: str) -> None: - self.contact_id = contact_id - - @staticmethod - def from_dict(obj: Any) -> 'ContactDeleteParams': - assert isinstance(obj, dict) - contact_id = from_str(obj.get("contactId")) - return ContactDeleteParams(contact_id) - - def to_dict(self) -> dict: - result: dict = {} - result["contactId"] = from_str(self.contact_id) - return result - - -class ContactDeleteResponse: - id: str - """The ID of the deleted contact""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'ContactDeleteResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return ContactDeleteResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - - -class ContactFetchParams: - contact_id: str - """The ID of the contact to retrieve""" - - def __init__(self, contact_id: str) -> None: - self.contact_id = contact_id - - @staticmethod - def from_dict(obj: Any) -> 'ContactFetchParams': + def from_dict(obj: Any) -> 'TeamListStreamItem': assert isinstance(obj, dict) - contact_id = from_str(obj.get("contactId")) - return ContactFetchParams(contact_id) + data = TeamListStreamItemData.from_dict(obj.get("data")) + type = TeamListStreamItemType(obj.get("type")) + return TeamListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["contactId"] = from_str(self.contact_id) + result["data"] = to_class(TeamListStreamItemData, self.data) + result["type"] = to_enum(TeamListStreamItemType, self.type) return result -class ContactFetchResponse: - """Instance list properties""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - description: Optional[str] - """The associated description""" - - email: Optional[str] - """The email address of the contact""" - - fingerprint: str - """The fingerprint of the contact""" - - id: str - """The instance ID""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: Optional[str] - """The associated name""" - - nick: Optional[str] - """The nickname of the contact""" - - phone: Optional[str] - """The phone number of the contact""" - - preferences: Optional[str] - """The preferences of the contact""" - - updated_at: float - """The timestamp (ms) when the instance was updated""" - - verified_at: Optional[float] - """The timestamp (ms) when the contact was verified""" +class TaskListParamsOrder(Enum): + """The order of the paginated items""" - def __init__(self, created_at: float, description: Optional[str], email: Optional[str], fingerprint: str, id: str, meta: Optional[Dict[str, Any]], name: Optional[str], nick: Optional[str], phone: Optional[str], preferences: Optional[str], updated_at: float, verified_at: Optional[float]) -> None: - self.created_at = created_at - self.description = description - self.email = email - self.fingerprint = fingerprint - self.id = id - self.meta = meta - self.name = name - self.nick = nick - self.phone = phone - self.preferences = preferences - self.updated_at = updated_at - self.verified_at = verified_at + ASC = "asc" + DESC = "desc" - @staticmethod - def from_dict(obj: Any) -> 'ContactFetchResponse': - assert isinstance(obj, dict) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - email = from_union([from_str, from_none], obj.get("email")) - fingerprint = from_str(obj.get("fingerprint")) - id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - nick = from_union([from_str, from_none], obj.get("nick")) - phone = from_union([from_str, from_none], obj.get("phone")) - preferences = from_union([from_str, from_none], obj.get("preferences")) - updated_at = from_float(obj.get("updatedAt")) - verified_at = from_union([from_float, from_none], obj.get("verifiedAt")) - return ContactFetchResponse(created_at, description, email, fingerprint, id, meta, name, nick, phone, preferences, updated_at, verified_at) - def to_dict(self) -> dict: - result: dict = {} - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.email is not None: - result["email"] = from_union([from_str, from_none], self.email) - result["fingerprint"] = from_str(self.fingerprint) - result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.nick is not None: - result["nick"] = from_union([from_str, from_none], self.nick) - if self.phone is not None: - result["phone"] = from_union([from_str, from_none], self.phone) - if self.preferences is not None: - result["preferences"] = from_union([from_str, from_none], self.preferences) - result["updatedAt"] = to_float(self.updated_at) - if self.verified_at is not None: - result["verifiedAt"] = from_union([to_float, from_none], self.verified_at) - return result +class TaskListParamsStatus(Enum): + """Filter by task status""" + CANCELED = "canceled" + IDLE = "idle" + RUNNING = "running" -class ContactMemoryListParamsOrder(Enum): - """The order of the paginated items""" - ASC = "asc" - DESC = "desc" +class TaskListParams: + blueprint_id: Optional[str] + """Filter by associated blueprint""" + bot_id: Optional[str] + """Filter by associated bot""" -class ContactMemoryListParams: - contact_id: str - """The ID of the contact to list memories for""" + contact_id: Optional[str] + """Filter by associated contact""" cursor: Optional[str] """The cursor to use for pagination""" - order: Optional[ContactMemoryListParamsOrder] + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" + + order: Optional[TaskListParamsOrder] """The order of the paginated items""" + status: Optional[TaskListParamsStatus] + """Filter by task status""" + take: Optional[int] """The number of items to retrieve""" - def __init__(self, contact_id: str, cursor: Optional[str], order: Optional[ContactMemoryListParamsOrder], take: Optional[int]) -> None: + def __init__(self, blueprint_id: Optional[str], bot_id: Optional[str], contact_id: Optional[str], cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[TaskListParamsOrder], status: Optional[TaskListParamsStatus], take: Optional[int]) -> None: + self.blueprint_id = blueprint_id + self.bot_id = bot_id self.contact_id = contact_id self.cursor = cursor + self.meta = meta self.order = order + self.status = status self.take = take @staticmethod - def from_dict(obj: Any) -> 'ContactMemoryListParams': + def from_dict(obj: Any) -> 'TaskListParams': assert isinstance(obj, dict) - contact_id = from_str(obj.get("contactId")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) cursor = from_union([from_str, from_none], obj.get("cursor")) - order = from_union([ContactMemoryListParamsOrder, from_none], obj.get("order")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([TaskListParamsOrder, from_none], obj.get("order")) + status = from_union([TaskListParamsStatus, from_none], obj.get("status")) take = from_union([from_int, from_none], obj.get("take")) - return ContactMemoryListParams(contact_id, cursor, order, take) + return TaskListParams(blueprint_id, bot_id, contact_id, cursor, meta, order, status, take) def to_dict(self) -> dict: result: dict = {} - result["contactId"] = from_str(self.contact_id) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) if self.cursor is not None: result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(ContactMemoryListParamsOrder, x), from_none], self.order) + result["order"] = from_union([lambda x: to_enum(TaskListParamsOrder, x), from_none], self.order) + if self.status is not None: + result["status"] = from_union([lambda x: to_enum(TaskListParamsStatus, x), from_none], self.status) if self.take is not None: result["take"] = from_union([from_int, from_none], self.take) return result -class ContactMemoryListResponseItem: +class PurpleOutcome(Enum): + """The task execution outcome""" + + FAILURE = "failure" + PENDING = "pending" + SUCCESS = "success" + + +class PurpleStatus(Enum): + """The task execution status""" + + CANCELED = "canceled" + IDLE = "idle" + RUNNING = "running" + + +class TaskListResponseItem: """Instance list properties""" + blueprint_id: Optional[str] + """The blueprint associated with the task""" + bot_id: Optional[str] - """The ID of the bot the memory belongs to""" + """The bot associated with the task""" + + contact_id: Optional[str] + """The contact associated with the task""" created_at: float """The timestamp (ms) when the instance was created""" @@ -4192,90 +4115,184 @@ class ContactMemoryListResponseItem: description: Optional[str] """The associated description""" + expires_at: Optional[float] + """The timestamp (ms) at which the task expires and is automatically deleted""" + id: str """The instance ID""" + last_run_at: Optional[float] + """The timestamp (ms) of the last task execution""" + + max_iterations: Optional[float] + """The maximum number of iterations per task execution""" + + max_time: Optional[float] + """The maximum time per task execution (in milliseconds)""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - text: str - """The text of the memory""" + next_run_at: Optional[float] + """The timestamp (ms) of the next scheduled task execution""" + + outcome: Optional[PurpleOutcome] + """The task execution outcome""" + + schedule: Optional[str] + """The schedule of the task""" + + session_duration: Optional[float] + """The session duration of the task execution (in milliseconds)""" + + status: Optional[PurpleStatus] + """The task execution status""" + + timezone: Optional[str] + """The IANA timezone identifier used to evaluate the task schedule.""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, bot_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], text: str, updated_at: float) -> None: + def __init__(self, blueprint_id: Optional[str], bot_id: Optional[str], contact_id: Optional[str], created_at: float, description: Optional[str], expires_at: Optional[float], id: str, last_run_at: Optional[float], max_iterations: Optional[float], max_time: Optional[float], meta: Optional[Dict[str, Any]], name: Optional[str], next_run_at: Optional[float], outcome: Optional[PurpleOutcome], schedule: Optional[str], session_duration: Optional[float], status: Optional[PurpleStatus], timezone: Optional[str], updated_at: float) -> None: + self.blueprint_id = blueprint_id self.bot_id = bot_id + self.contact_id = contact_id self.created_at = created_at self.description = description + self.expires_at = expires_at self.id = id + self.last_run_at = last_run_at + self.max_iterations = max_iterations + self.max_time = max_time self.meta = meta self.name = name - self.text = text + self.next_run_at = next_run_at + self.outcome = outcome + self.schedule = schedule + self.session_duration = session_duration + self.status = status + self.timezone = timezone self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'ContactMemoryListResponseItem': + def from_dict(obj: Any) -> 'TaskListResponseItem': assert isinstance(obj, dict) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + expires_at = from_union([from_float, from_none], obj.get("expiresAt")) id = from_str(obj.get("id")) + last_run_at = from_union([from_float, from_none], obj.get("lastRunAt")) + max_iterations = from_union([from_float, from_none], obj.get("maxIterations")) + max_time = from_union([from_float, from_none], obj.get("maxTime")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - text = from_str(obj.get("text")) + next_run_at = from_union([from_float, from_none], obj.get("nextRunAt")) + outcome = from_union([PurpleOutcome, from_none], obj.get("outcome")) + schedule = from_union([from_str, from_none], obj.get("schedule")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + status = from_union([PurpleStatus, from_none], obj.get("status")) + timezone = from_union([from_str, from_none], obj.get("timezone")) updated_at = from_float(obj.get("updatedAt")) - return ContactMemoryListResponseItem(bot_id, created_at, description, id, meta, name, text, updated_at) + return TaskListResponseItem(blueprint_id, bot_id, contact_id, created_at, description, expires_at, id, last_run_at, max_iterations, max_time, meta, name, next_run_at, outcome, schedule, session_duration, status, timezone, updated_at) def to_dict(self) -> dict: result: dict = {} + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.expires_at is not None: + result["expiresAt"] = from_union([to_float, from_none], self.expires_at) result["id"] = from_str(self.id) + if self.last_run_at is not None: + result["lastRunAt"] = from_union([to_float, from_none], self.last_run_at) + if self.max_iterations is not None: + result["maxIterations"] = from_union([to_float, from_none], self.max_iterations) + if self.max_time is not None: + result["maxTime"] = from_union([to_float, from_none], self.max_time) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - result["text"] = from_str(self.text) + if self.next_run_at is not None: + result["nextRunAt"] = from_union([to_float, from_none], self.next_run_at) + if self.outcome is not None: + result["outcome"] = from_union([lambda x: to_enum(PurpleOutcome, x), from_none], self.outcome) + if self.schedule is not None: + result["schedule"] = from_union([from_str, from_none], self.schedule) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.status is not None: + result["status"] = from_union([lambda x: to_enum(PurpleStatus, x), from_none], self.status) + if self.timezone is not None: + result["timezone"] = from_union([from_str, from_none], self.timezone) result["updatedAt"] = to_float(self.updated_at) return result -class ContactMemoryListResponse: +class TaskListResponse: cursor: str """Cursor for fetching the next page""" - items: List[ContactMemoryListResponseItem] + items: List[TaskListResponseItem] - def __init__(self, cursor: str, items: List[ContactMemoryListResponseItem]) -> None: + def __init__(self, cursor: str, items: List[TaskListResponseItem]) -> None: self.cursor = cursor self.items = items @staticmethod - def from_dict(obj: Any) -> 'ContactMemoryListResponse': + def from_dict(obj: Any) -> 'TaskListResponse': assert isinstance(obj, dict) cursor = from_str(obj.get("cursor")) - items = from_list(ContactMemoryListResponseItem.from_dict, obj.get("items")) - return ContactMemoryListResponse(cursor, items) + items = from_list(TaskListResponseItem.from_dict, obj.get("items")) + return TaskListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(ContactMemoryListResponseItem, x), self.items) + result["items"] = from_list(lambda x: to_class(TaskListResponseItem, x), self.items) return result -class ContactMemoryListStreamItemData: +class FluffyOutcome(Enum): + """The task execution outcome""" + + FAILURE = "failure" + PENDING = "pending" + SUCCESS = "success" + + +class FluffyStatus(Enum): + """The task execution status""" + + CANCELED = "canceled" + IDLE = "idle" + RUNNING = "running" + + +class TaskListStreamItemData: """Instance list properties""" + blueprint_id: Optional[str] + """The blueprint associated with the task""" + bot_id: Optional[str] - """The ID of the bot the memory belongs to""" + """The bot associated with the task""" + + contact_id: Optional[str] + """The contact associated with the task""" created_at: float """The timestamp (ms) when the instance was created""" @@ -4283,234 +4300,220 @@ class ContactMemoryListStreamItemData: description: Optional[str] """The associated description""" + expires_at: Optional[float] + """The timestamp (ms) at which the task expires and is automatically deleted""" + id: str """The instance ID""" + last_run_at: Optional[float] + """The timestamp (ms) of the last task execution""" + + max_iterations: Optional[float] + """The maximum number of iterations per task execution""" + + max_time: Optional[float] + """The maximum time per task execution (in milliseconds)""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - text: str - """The text of the memory""" + next_run_at: Optional[float] + """The timestamp (ms) of the next scheduled task execution""" + + outcome: Optional[FluffyOutcome] + """The task execution outcome""" + + schedule: Optional[str] + """The schedule of the task""" + + session_duration: Optional[float] + """The session duration of the task execution (in milliseconds)""" + + status: Optional[FluffyStatus] + """The task execution status""" + + timezone: Optional[str] + """The IANA timezone identifier used to evaluate the task schedule.""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, bot_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], text: str, updated_at: float) -> None: + def __init__(self, blueprint_id: Optional[str], bot_id: Optional[str], contact_id: Optional[str], created_at: float, description: Optional[str], expires_at: Optional[float], id: str, last_run_at: Optional[float], max_iterations: Optional[float], max_time: Optional[float], meta: Optional[Dict[str, Any]], name: Optional[str], next_run_at: Optional[float], outcome: Optional[FluffyOutcome], schedule: Optional[str], session_duration: Optional[float], status: Optional[FluffyStatus], timezone: Optional[str], updated_at: float) -> None: + self.blueprint_id = blueprint_id self.bot_id = bot_id + self.contact_id = contact_id self.created_at = created_at self.description = description + self.expires_at = expires_at self.id = id + self.last_run_at = last_run_at + self.max_iterations = max_iterations + self.max_time = max_time self.meta = meta self.name = name - self.text = text + self.next_run_at = next_run_at + self.outcome = outcome + self.schedule = schedule + self.session_duration = session_duration + self.status = status + self.timezone = timezone self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'ContactMemoryListStreamItemData': + def from_dict(obj: Any) -> 'TaskListStreamItemData': assert isinstance(obj, dict) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + expires_at = from_union([from_float, from_none], obj.get("expiresAt")) id = from_str(obj.get("id")) + last_run_at = from_union([from_float, from_none], obj.get("lastRunAt")) + max_iterations = from_union([from_float, from_none], obj.get("maxIterations")) + max_time = from_union([from_float, from_none], obj.get("maxTime")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - text = from_str(obj.get("text")) + next_run_at = from_union([from_float, from_none], obj.get("nextRunAt")) + outcome = from_union([FluffyOutcome, from_none], obj.get("outcome")) + schedule = from_union([from_str, from_none], obj.get("schedule")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + status = from_union([FluffyStatus, from_none], obj.get("status")) + timezone = from_union([from_str, from_none], obj.get("timezone")) updated_at = from_float(obj.get("updatedAt")) - return ContactMemoryListStreamItemData(bot_id, created_at, description, id, meta, name, text, updated_at) + return TaskListStreamItemData(blueprint_id, bot_id, contact_id, created_at, description, expires_at, id, last_run_at, max_iterations, max_time, meta, name, next_run_at, outcome, schedule, session_duration, status, timezone, updated_at) def to_dict(self) -> dict: result: dict = {} + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.expires_at is not None: + result["expiresAt"] = from_union([to_float, from_none], self.expires_at) result["id"] = from_str(self.id) + if self.last_run_at is not None: + result["lastRunAt"] = from_union([to_float, from_none], self.last_run_at) + if self.max_iterations is not None: + result["maxIterations"] = from_union([to_float, from_none], self.max_iterations) + if self.max_time is not None: + result["maxTime"] = from_union([to_float, from_none], self.max_time) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - result["text"] = from_str(self.text) + if self.next_run_at is not None: + result["nextRunAt"] = from_union([to_float, from_none], self.next_run_at) + if self.outcome is not None: + result["outcome"] = from_union([lambda x: to_enum(FluffyOutcome, x), from_none], self.outcome) + if self.schedule is not None: + result["schedule"] = from_union([from_str, from_none], self.schedule) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.status is not None: + result["status"] = from_union([lambda x: to_enum(FluffyStatus, x), from_none], self.status) + if self.timezone is not None: + result["timezone"] = from_union([from_str, from_none], self.timezone) result["updatedAt"] = to_float(self.updated_at) return result -class ContactMemoryListStreamItemType(Enum): +class TaskListStreamItemType(Enum): """The type of event""" ITEM = "item" -class ContactMemoryListStreamItem: - data: ContactMemoryListStreamItemData +class TaskListStreamItem: + data: TaskListStreamItemData """Instance list properties""" - type: ContactMemoryListStreamItemType + type: TaskListStreamItemType """The type of event""" - def __init__(self, data: ContactMemoryListStreamItemData, type: ContactMemoryListStreamItemType) -> None: + def __init__(self, data: TaskListStreamItemData, type: TaskListStreamItemType) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'ContactMemoryListStreamItem': + def from_dict(obj: Any) -> 'TaskListStreamItem': assert isinstance(obj, dict) - data = ContactMemoryListStreamItemData.from_dict(obj.get("data")) - type = ContactMemoryListStreamItemType(obj.get("type")) - return ContactMemoryListStreamItem(data, type) + data = TaskListStreamItemData.from_dict(obj.get("data")) + type = TaskListStreamItemType(obj.get("type")) + return TaskListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(ContactMemoryListStreamItemData, self.data) - result["type"] = to_enum(ContactMemoryListStreamItemType, self.type) + result["data"] = to_class(TaskListStreamItemData, self.data) + result["type"] = to_enum(TaskListStreamItemType, self.type) return result -class ContactMemorySearchParams: - contact_id: str - """The ID of the contact to search memories for""" +class TasksExportParamsOrder(Enum): + """The order of the paginated items""" - def __init__(self, contact_id: str) -> None: - self.contact_id = contact_id + ASC = "asc" + DESC = "desc" - @staticmethod - def from_dict(obj: Any) -> 'ContactMemorySearchParams': - assert isinstance(obj, dict) - contact_id = from_str(obj.get("contactId")) - return ContactMemorySearchParams(contact_id) - - def to_dict(self) -> dict: - result: dict = {} - result["contactId"] = from_str(self.contact_id) - return result - - -class ContactMemorySearchRequest: - search: str - """The keyword/phrase to search for""" - - def __init__(self, search: str) -> None: - self.search = search - - @staticmethod - def from_dict(obj: Any) -> 'ContactMemorySearchRequest': - assert isinstance(obj, dict) - search = from_str(obj.get("search")) - return ContactMemorySearchRequest(search) - - def to_dict(self) -> dict: - result: dict = {} - result["search"] = from_str(self.search) - return result - - -class ContactMemorySearchResponseItem: - id: str - meta: Optional[Dict[str, Any]] - text: str - - def __init__(self, id: str, meta: Optional[Dict[str, Any]], text: str) -> None: - self.id = id - self.meta = meta - self.text = text - - @staticmethod - def from_dict(obj: Any) -> 'ContactMemorySearchResponseItem': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - text = from_str(obj.get("text")) - return ContactMemorySearchResponseItem(id, meta, text) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["text"] = from_str(self.text) - return result - - -class ContactMemorySearchResponse: - items: List[ContactMemorySearchResponseItem] - """An array of memories matching the search query""" - - def __init__(self, items: List[ContactMemorySearchResponseItem]) -> None: - self.items = items - - @staticmethod - def from_dict(obj: Any) -> 'ContactMemorySearchResponse': - assert isinstance(obj, dict) - items = from_list(ContactMemorySearchResponseItem.from_dict, obj.get("items")) - return ContactMemorySearchResponse(items) - - def to_dict(self) -> dict: - result: dict = {} - result["items"] = from_list(lambda x: to_class(ContactMemorySearchResponseItem, x), self.items) - return result - - -class ContactRatingListParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" - - -class ContactRatingListParams: - contact_id: str - """The ID of the contact to list ratings for""" +class TasksExportParams: cursor: Optional[str] """The cursor to use for pagination""" - order: Optional[ContactRatingListParamsOrder] + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" + + order: Optional[TasksExportParamsOrder] """The order of the paginated items""" take: Optional[int] """The number of items to retrieve""" - def __init__(self, contact_id: str, cursor: Optional[str], order: Optional[ContactRatingListParamsOrder], take: Optional[int]) -> None: - self.contact_id = contact_id + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[TasksExportParamsOrder], take: Optional[int]) -> None: self.cursor = cursor + self.meta = meta self.order = order self.take = take @staticmethod - def from_dict(obj: Any) -> 'ContactRatingListParams': + def from_dict(obj: Any) -> 'TasksExportParams': assert isinstance(obj, dict) - contact_id = from_str(obj.get("contactId")) cursor = from_union([from_str, from_none], obj.get("cursor")) - order = from_union([ContactRatingListParamsOrder, from_none], obj.get("order")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([TasksExportParamsOrder, from_none], obj.get("order")) take = from_union([from_int, from_none], obj.get("take")) - return ContactRatingListParams(contact_id, cursor, order, take) + return TasksExportParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} - result["contactId"] = from_str(self.contact_id) if self.cursor is not None: result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(ContactRatingListParamsOrder, x), from_none], self.order) + result["order"] = from_union([lambda x: to_enum(TasksExportParamsOrder, x), from_none], self.order) if self.take is not None: result["take"] = from_union([from_int, from_none], self.take) return result -class ContactRatingListResponseItem: +class TasksExportResponseItem: """Instance list properties""" bot_id: Optional[str] - """The bot id assigned to this rating""" + """The bot associated with the task""" contact_id: Optional[str] - """The contact id assigned to this rating""" - - conversation_id: Optional[str] - """The conversation id assigned to this rating""" + """The contact associated with the task""" created_at: float """The timestamp (ms) when the instance was created""" @@ -4521,8 +4524,11 @@ class ContactRatingListResponseItem: id: str """The instance ID""" - message_id: Optional[str] - """The message id assigned to this rating""" + max_iterations: Optional[float] + """The maximum number of iterations per task execution""" + + max_time: Optional[float] + """The maximum time per task execution (in milliseconds)""" meta: Optional[Dict[str, Any]] """Meta data information""" @@ -4530,45 +4536,50 @@ class ContactRatingListResponseItem: name: Optional[str] """The associated name""" - reason: Optional[str] - """The reason for the rating""" + schedule: Optional[str] + """The schedule of the task""" + + session_duration: Optional[float] + """The session duration of the task execution (in milliseconds)""" + + timezone: Optional[str] + """The IANA timezone identifier used to evaluate the task schedule.""" updated_at: float """The timestamp (ms) when the instance was updated""" - value: Optional[float] - """The rating value""" - - def __init__(self, bot_id: Optional[str], contact_id: Optional[str], conversation_id: Optional[str], created_at: float, description: Optional[str], id: str, message_id: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], reason: Optional[str], updated_at: float, value: Optional[float]) -> None: + def __init__(self, bot_id: Optional[str], contact_id: Optional[str], created_at: float, description: Optional[str], id: str, max_iterations: Optional[float], max_time: Optional[float], meta: Optional[Dict[str, Any]], name: Optional[str], schedule: Optional[str], session_duration: Optional[float], timezone: Optional[str], updated_at: float) -> None: self.bot_id = bot_id self.contact_id = contact_id - self.conversation_id = conversation_id self.created_at = created_at self.description = description self.id = id - self.message_id = message_id + self.max_iterations = max_iterations + self.max_time = max_time self.meta = meta self.name = name - self.reason = reason + self.schedule = schedule + self.session_duration = session_duration + self.timezone = timezone self.updated_at = updated_at - self.value = value @staticmethod - def from_dict(obj: Any) -> 'ContactRatingListResponseItem': + def from_dict(obj: Any) -> 'TasksExportResponseItem': assert isinstance(obj, dict) bot_id = from_union([from_str, from_none], obj.get("botId")) contact_id = from_union([from_str, from_none], obj.get("contactId")) - conversation_id = from_union([from_str, from_none], obj.get("conversationId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) - message_id = from_union([from_str, from_none], obj.get("messageId")) + max_iterations = from_union([from_float, from_none], obj.get("maxIterations")) + max_time = from_union([from_float, from_none], obj.get("maxTime")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - reason = from_union([from_str, from_none], obj.get("reason")) + schedule = from_union([from_str, from_none], obj.get("schedule")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + timezone = from_union([from_str, from_none], obj.get("timezone")) updated_at = from_float(obj.get("updatedAt")) - value = from_union([from_float, from_none], obj.get("value")) - return ContactRatingListResponseItem(bot_id, contact_id, conversation_id, created_at, description, id, message_id, meta, name, reason, updated_at, value) + return TasksExportResponseItem(bot_id, contact_id, created_at, description, id, max_iterations, max_time, meta, name, schedule, session_duration, timezone, updated_at) def to_dict(self) -> dict: result: dict = {} @@ -4576,61 +4587,60 @@ def to_dict(self) -> dict: result["botId"] = from_union([from_str, from_none], self.bot_id) if self.contact_id is not None: result["contactId"] = from_union([from_str, from_none], self.contact_id) - if self.conversation_id is not None: - result["conversationId"] = from_union([from_str, from_none], self.conversation_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) - if self.message_id is not None: - result["messageId"] = from_union([from_str, from_none], self.message_id) + if self.max_iterations is not None: + result["maxIterations"] = from_union([to_float, from_none], self.max_iterations) + if self.max_time is not None: + result["maxTime"] = from_union([to_float, from_none], self.max_time) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.reason is not None: - result["reason"] = from_union([from_str, from_none], self.reason) + if self.schedule is not None: + result["schedule"] = from_union([from_str, from_none], self.schedule) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.timezone is not None: + result["timezone"] = from_union([from_str, from_none], self.timezone) result["updatedAt"] = to_float(self.updated_at) - if self.value is not None: - result["value"] = from_union([to_float, from_none], self.value) return result -class ContactRatingListResponse: +class TasksExportResponse: cursor: str """Cursor for fetching the next page""" - items: List[ContactRatingListResponseItem] + items: List[TasksExportResponseItem] - def __init__(self, cursor: str, items: List[ContactRatingListResponseItem]) -> None: + def __init__(self, cursor: str, items: List[TasksExportResponseItem]) -> None: self.cursor = cursor self.items = items @staticmethod - def from_dict(obj: Any) -> 'ContactRatingListResponse': + def from_dict(obj: Any) -> 'TasksExportResponse': assert isinstance(obj, dict) cursor = from_str(obj.get("cursor")) - items = from_list(ContactRatingListResponseItem.from_dict, obj.get("items")) - return ContactRatingListResponse(cursor, items) + items = from_list(TasksExportResponseItem.from_dict, obj.get("items")) + return TasksExportResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(ContactRatingListResponseItem, x), self.items) + result["items"] = from_list(lambda x: to_class(TasksExportResponseItem, x), self.items) return result -class ContactRatingListStreamItemData: +class TasksExportStreamItemData: """Instance list properties""" bot_id: Optional[str] - """The bot id assigned to this rating""" + """The bot associated with the task""" contact_id: Optional[str] - """The contact id assigned to this rating""" - - conversation_id: Optional[str] - """The conversation id assigned to this rating""" + """The contact associated with the task""" created_at: float """The timestamp (ms) when the instance was created""" @@ -4641,8 +4651,11 @@ class ContactRatingListStreamItemData: id: str """The instance ID""" - message_id: Optional[str] - """The message id assigned to this rating""" + max_iterations: Optional[float] + """The maximum number of iterations per task execution""" + + max_time: Optional[float] + """The maximum time per task execution (in milliseconds)""" meta: Optional[Dict[str, Any]] """Meta data information""" @@ -4650,45 +4663,50 @@ class ContactRatingListStreamItemData: name: Optional[str] """The associated name""" - reason: Optional[str] - """The reason for the rating""" + schedule: Optional[str] + """The schedule of the task""" + + session_duration: Optional[float] + """The session duration of the task execution (in milliseconds)""" + + timezone: Optional[str] + """The IANA timezone identifier used to evaluate the task schedule.""" updated_at: float """The timestamp (ms) when the instance was updated""" - value: Optional[float] - """The rating value""" - - def __init__(self, bot_id: Optional[str], contact_id: Optional[str], conversation_id: Optional[str], created_at: float, description: Optional[str], id: str, message_id: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], reason: Optional[str], updated_at: float, value: Optional[float]) -> None: + def __init__(self, bot_id: Optional[str], contact_id: Optional[str], created_at: float, description: Optional[str], id: str, max_iterations: Optional[float], max_time: Optional[float], meta: Optional[Dict[str, Any]], name: Optional[str], schedule: Optional[str], session_duration: Optional[float], timezone: Optional[str], updated_at: float) -> None: self.bot_id = bot_id self.contact_id = contact_id - self.conversation_id = conversation_id self.created_at = created_at self.description = description self.id = id - self.message_id = message_id + self.max_iterations = max_iterations + self.max_time = max_time self.meta = meta self.name = name - self.reason = reason + self.schedule = schedule + self.session_duration = session_duration + self.timezone = timezone self.updated_at = updated_at - self.value = value @staticmethod - def from_dict(obj: Any) -> 'ContactRatingListStreamItemData': + def from_dict(obj: Any) -> 'TasksExportStreamItemData': assert isinstance(obj, dict) bot_id = from_union([from_str, from_none], obj.get("botId")) contact_id = from_union([from_str, from_none], obj.get("contactId")) - conversation_id = from_union([from_str, from_none], obj.get("conversationId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) - message_id = from_union([from_str, from_none], obj.get("messageId")) + max_iterations = from_union([from_float, from_none], obj.get("maxIterations")) + max_time = from_union([from_float, from_none], obj.get("maxTime")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - reason = from_union([from_str, from_none], obj.get("reason")) + schedule = from_union([from_str, from_none], obj.get("schedule")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + timezone = from_union([from_str, from_none], obj.get("timezone")) updated_at = from_float(obj.get("updatedAt")) - value = from_union([from_float, from_none], obj.get("value")) - return ContactRatingListStreamItemData(bot_id, contact_id, conversation_id, created_at, description, id, message_id, meta, name, reason, updated_at, value) + return TasksExportStreamItemData(bot_id, contact_id, created_at, description, id, max_iterations, max_time, meta, name, schedule, session_duration, timezone, updated_at) def to_dict(self) -> dict: result: dict = {} @@ -4696,260 +4714,324 @@ def to_dict(self) -> dict: result["botId"] = from_union([from_str, from_none], self.bot_id) if self.contact_id is not None: result["contactId"] = from_union([from_str, from_none], self.contact_id) - if self.conversation_id is not None: - result["conversationId"] = from_union([from_str, from_none], self.conversation_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) - if self.message_id is not None: - result["messageId"] = from_union([from_str, from_none], self.message_id) + if self.max_iterations is not None: + result["maxIterations"] = from_union([to_float, from_none], self.max_iterations) + if self.max_time is not None: + result["maxTime"] = from_union([to_float, from_none], self.max_time) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.reason is not None: - result["reason"] = from_union([from_str, from_none], self.reason) + if self.schedule is not None: + result["schedule"] = from_union([from_str, from_none], self.schedule) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.timezone is not None: + result["timezone"] = from_union([from_str, from_none], self.timezone) result["updatedAt"] = to_float(self.updated_at) - if self.value is not None: - result["value"] = from_union([to_float, from_none], self.value) return result -class ContactRatingListStreamItemType(Enum): +class TasksExportStreamItemType(Enum): """The type of event""" ITEM = "item" -class ContactRatingListStreamItem: - data: ContactRatingListStreamItemData +class TasksExportStreamItem: + data: TasksExportStreamItemData """Instance list properties""" - type: ContactRatingListStreamItemType + type: TasksExportStreamItemType """The type of event""" - def __init__(self, data: ContactRatingListStreamItemData, type: ContactRatingListStreamItemType) -> None: + def __init__(self, data: TasksExportStreamItemData, type: TasksExportStreamItemType) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'ContactRatingListStreamItem': + def from_dict(obj: Any) -> 'TasksExportStreamItem': assert isinstance(obj, dict) - data = ContactRatingListStreamItemData.from_dict(obj.get("data")) - type = ContactRatingListStreamItemType(obj.get("type")) - return ContactRatingListStreamItem(data, type) + data = TasksExportStreamItemData.from_dict(obj.get("data")) + type = TasksExportStreamItemType(obj.get("type")) + return TasksExportStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(ContactRatingListStreamItemData, self.data) - result["type"] = to_enum(ContactRatingListStreamItemType, self.type) + result["data"] = to_class(TasksExportStreamItemData, self.data) + result["type"] = to_enum(TasksExportStreamItemType, self.type) return result -class ContactSecretAuthenticateParams: - contact_id: str - """The ID of the contact the secret belongs to""" - - secret_id: str - """The ID of the secret to authenticate""" - - def __init__(self, contact_id: str, secret_id: str) -> None: - self.contact_id = contact_id - self.secret_id = secret_id +class TaskCreateRequest: + """Blueprint properties""" - @staticmethod - def from_dict(obj: Any) -> 'ContactSecretAuthenticateParams': - assert isinstance(obj, dict) - contact_id = from_str(obj.get("contactId")) - secret_id = from_str(obj.get("secretId")) - return ContactSecretAuthenticateParams(contact_id, secret_id) + blueprint_id: Optional[str] + """The ID of the blueprint""" - def to_dict(self) -> dict: - result: dict = {} - result["contactId"] = from_str(self.contact_id) - result["secretId"] = from_str(self.secret_id) - return result + bot_id: Optional[str] + """The bot associated with the task""" + contact_id: Optional[str] + """The contact associated with the task""" -class ContactSecretAuthenticateResponse: - id: str - """The ID of the secret to authenticate""" + description: Optional[str] + """The associated description""" - url: str - """The URL to authenticate the secret""" + expires_at: Optional[float] + """An optional epoch-millisecond timestamp after which the task is automatically deleted. + Pass null or omit for no expiry. + """ + max_calls: Optional[float] + """The maximum number of tool calls across the whole task run (0 or null for unbounded)""" - def __init__(self, id: str, url: str) -> None: - self.id = id - self.url = url + max_iterations: Optional[float] + """The maximum number of iterations per task execution""" - @staticmethod - def from_dict(obj: Any) -> 'ContactSecretAuthenticateResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - url = from_str(obj.get("url")) - return ContactSecretAuthenticateResponse(id, url) + max_time: Optional[float] + """The maximum time per task execution in milliseconds""" - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - result["url"] = from_str(self.url) - return result + meta: Optional[Dict[str, Any]] + """Meta data information""" + name: Optional[str] + """The associated name""" -class ContactSecretMintParams: - contact_id: str - """The ID of the contact the secret belongs to""" + schedule: Optional[str] + """The schedule of the task. Cron expressions and date-based schedules are evaluated in the + provided timezone when set. + """ + session_duration: Optional[float] + """The session duration of the Widget integration""" - secret_id: str - """The ID of the secret to mint""" + timezone: Optional[str] + """An optional IANA timezone identifier used when evaluating the task schedule.""" - def __init__(self, contact_id: str, secret_id: str) -> None: + def __init__(self, blueprint_id: Optional[str], bot_id: Optional[str], contact_id: Optional[str], description: Optional[str], expires_at: Optional[float], max_calls: Optional[float], max_iterations: Optional[float], max_time: Optional[float], meta: Optional[Dict[str, Any]], name: Optional[str], schedule: Optional[str], session_duration: Optional[float], timezone: Optional[str]) -> None: + self.blueprint_id = blueprint_id + self.bot_id = bot_id self.contact_id = contact_id - self.secret_id = secret_id + self.description = description + self.expires_at = expires_at + self.max_calls = max_calls + self.max_iterations = max_iterations + self.max_time = max_time + self.meta = meta + self.name = name + self.schedule = schedule + self.session_duration = session_duration + self.timezone = timezone @staticmethod - def from_dict(obj: Any) -> 'ContactSecretMintParams': + def from_dict(obj: Any) -> 'TaskCreateRequest': assert isinstance(obj, dict) - contact_id = from_str(obj.get("contactId")) - secret_id = from_str(obj.get("secretId")) - return ContactSecretMintParams(contact_id, secret_id) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) + description = from_union([from_str, from_none], obj.get("description")) + expires_at = from_union([from_float, from_none], obj.get("expiresAt")) + max_calls = from_union([from_float, from_none], obj.get("maxCalls")) + max_iterations = from_union([from_float, from_none], obj.get("maxIterations")) + max_time = from_union([from_float, from_none], obj.get("maxTime")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + schedule = from_union([from_str, from_none], obj.get("schedule")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + timezone = from_union([from_str, from_none], obj.get("timezone")) + return TaskCreateRequest(blueprint_id, bot_id, contact_id, description, expires_at, max_calls, max_iterations, max_time, meta, name, schedule, session_duration, timezone) def to_dict(self) -> dict: result: dict = {} - result["contactId"] = from_str(self.contact_id) - result["secretId"] = from_str(self.secret_id) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.expires_at is not None: + result["expiresAt"] = from_union([to_float, from_none], self.expires_at) + if self.max_calls is not None: + result["maxCalls"] = from_union([to_float, from_none], self.max_calls) + if self.max_iterations is not None: + result["maxIterations"] = from_union([to_float, from_none], self.max_iterations) + if self.max_time is not None: + result["maxTime"] = from_union([to_float, from_none], self.max_time) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.schedule is not None: + result["schedule"] = from_union([from_str, from_none], self.schedule) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.timezone is not None: + result["timezone"] = from_union([from_str, from_none], self.timezone) return result -class ContactSecretMintResponse: - expires_at: Optional[float] - """Token expiry as a unix timestamp in ms, or null""" - - token: str - """The usable token to send to the provider""" +class TaskCreateResponse: + id: str + """The ID of the created task""" - def __init__(self, expires_at: Optional[float], token: str) -> None: - self.expires_at = expires_at - self.token = token + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'ContactSecretMintResponse': + def from_dict(obj: Any) -> 'TaskCreateResponse': assert isinstance(obj, dict) - expires_at = from_union([from_float, from_none], obj.get("expiresAt")) - token = from_str(obj.get("token")) - return ContactSecretMintResponse(expires_at, token) + id = from_str(obj.get("id")) + return TaskCreateResponse(id) def to_dict(self) -> dict: result: dict = {} - if self.expires_at is not None: - result["expiresAt"] = from_union([to_float, from_none], self.expires_at) - result["token"] = from_str(self.token) + result["id"] = from_str(self.id) return result -class ContactSecretProxyParams: - contact_id: str - """The ID of the contact the secret belongs to""" - - secret_id: str - """The ID of the secret to inject""" +class TaskUpdateParams: + task_id: str - def __init__(self, contact_id: str, secret_id: str) -> None: - self.contact_id = contact_id - self.secret_id = secret_id + def __init__(self, task_id: str) -> None: + self.task_id = task_id @staticmethod - def from_dict(obj: Any) -> 'ContactSecretProxyParams': + def from_dict(obj: Any) -> 'TaskUpdateParams': assert isinstance(obj, dict) - contact_id = from_str(obj.get("contactId")) - secret_id = from_str(obj.get("secretId")) - return ContactSecretProxyParams(contact_id, secret_id) + task_id = from_str(obj.get("taskId")) + return TaskUpdateParams(task_id) def to_dict(self) -> dict: result: dict = {} - result["contactId"] = from_str(self.contact_id) - result["secretId"] = from_str(self.secret_id) + result["taskId"] = from_str(self.task_id) return result -class ContactSecretProxyRequest: - body: Optional[str] - """The request body""" +class TaskUpdateRequest: + """Blueprint properties""" - headers: Optional[Dict[str, str]] - """The request headers (may reference the secret)""" + blueprint_id: Optional[str] + """The ID of the blueprint""" - method: Optional[str] - """The HTTP method""" + bot_id: Optional[str] + """The bot associated with the task""" - url: str - """The destination URL""" + contact_id: Optional[str] + """The contact associated with the task""" - def __init__(self, body: Optional[str], headers: Optional[Dict[str, str]], method: Optional[str], url: str) -> None: - self.body = body - self.headers = headers - self.method = method - self.url = url + description: Optional[str] + """The associated description""" - @staticmethod - def from_dict(obj: Any) -> 'ContactSecretProxyRequest': - assert isinstance(obj, dict) - body = from_union([from_str, from_none], obj.get("body")) - headers = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("headers")) - method = from_union([from_str, from_none], obj.get("method")) - url = from_str(obj.get("url")) - return ContactSecretProxyRequest(body, headers, method, url) + expires_at: Optional[float] + """An optional epoch-millisecond timestamp after which the task is automatically deleted. + Pass null to clear an existing expiry. + """ + max_calls: Optional[float] + """The maximum number of tool calls across the whole task run (0 or null for unbounded)""" - def to_dict(self) -> dict: - result: dict = {} - if self.body is not None: - result["body"] = from_union([from_str, from_none], self.body) - if self.headers is not None: - result["headers"] = from_union([lambda x: from_dict(from_str, x), from_none], self.headers) - if self.method is not None: - result["method"] = from_union([from_str, from_none], self.method) - result["url"] = from_str(self.url) - return result + max_iterations: Optional[float] + """The maximum number of iterations per task execution""" + max_time: Optional[float] + """The maximum time per task execution in milliseconds""" -class ContactSecretRevokeParams: - contact_id: str - """The ID of the contact the secret belongs to""" + meta: Optional[Dict[str, Any]] + """Meta data information""" - secret_id: str - """The ID of the secret to be revoked""" + name: Optional[str] + """The associated name""" - def __init__(self, contact_id: str, secret_id: str) -> None: + schedule: Optional[str] + """The schedule of the task. Cron expressions and date-based schedules are evaluated in the + provided timezone when set. + """ + session_duration: Optional[float] + """The session duration of the Widget integration""" + + timezone: Optional[str] + """An optional IANA timezone identifier used when evaluating the task schedule.""" + + def __init__(self, blueprint_id: Optional[str], bot_id: Optional[str], contact_id: Optional[str], description: Optional[str], expires_at: Optional[float], max_calls: Optional[float], max_iterations: Optional[float], max_time: Optional[float], meta: Optional[Dict[str, Any]], name: Optional[str], schedule: Optional[str], session_duration: Optional[float], timezone: Optional[str]) -> None: + self.blueprint_id = blueprint_id + self.bot_id = bot_id self.contact_id = contact_id - self.secret_id = secret_id + self.description = description + self.expires_at = expires_at + self.max_calls = max_calls + self.max_iterations = max_iterations + self.max_time = max_time + self.meta = meta + self.name = name + self.schedule = schedule + self.session_duration = session_duration + self.timezone = timezone @staticmethod - def from_dict(obj: Any) -> 'ContactSecretRevokeParams': + def from_dict(obj: Any) -> 'TaskUpdateRequest': assert isinstance(obj, dict) - contact_id = from_str(obj.get("contactId")) - secret_id = from_str(obj.get("secretId")) - return ContactSecretRevokeParams(contact_id, secret_id) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) + description = from_union([from_str, from_none], obj.get("description")) + expires_at = from_union([from_float, from_none], obj.get("expiresAt")) + max_calls = from_union([from_float, from_none], obj.get("maxCalls")) + max_iterations = from_union([from_float, from_none], obj.get("maxIterations")) + max_time = from_union([from_float, from_none], obj.get("maxTime")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + schedule = from_union([from_str, from_none], obj.get("schedule")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + timezone = from_union([from_str, from_none], obj.get("timezone")) + return TaskUpdateRequest(blueprint_id, bot_id, contact_id, description, expires_at, max_calls, max_iterations, max_time, meta, name, schedule, session_duration, timezone) def to_dict(self) -> dict: result: dict = {} - result["contactId"] = from_str(self.contact_id) - result["secretId"] = from_str(self.secret_id) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.expires_at is not None: + result["expiresAt"] = from_union([to_float, from_none], self.expires_at) + if self.max_calls is not None: + result["maxCalls"] = from_union([to_float, from_none], self.max_calls) + if self.max_iterations is not None: + result["maxIterations"] = from_union([to_float, from_none], self.max_iterations) + if self.max_time is not None: + result["maxTime"] = from_union([to_float, from_none], self.max_time) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.schedule is not None: + result["schedule"] = from_union([from_str, from_none], self.schedule) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.timezone is not None: + result["timezone"] = from_union([from_str, from_none], self.timezone) return result -class ContactSecretRevokeResponse: +class TaskUpdateResponse: id: str - """The ID of the revoked secret""" + """The ID of the updated task""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'ContactSecretRevokeResponse': + def from_dict(obj: Any) -> 'TaskUpdateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return ContactSecretRevokeResponse(id) + return TaskUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -4957,150 +5039,89 @@ def to_dict(self) -> dict: return result -class ContactSecretVerifyParams: - contact_id: str - """The ID of the contact the secret belongs to""" - - secret_id: str - """The ID of the secret to be verified""" +class TaskTriggerParams: + task_id: str - def __init__(self, contact_id: str, secret_id: str) -> None: - self.contact_id = contact_id - self.secret_id = secret_id + def __init__(self, task_id: str) -> None: + self.task_id = task_id @staticmethod - def from_dict(obj: Any) -> 'ContactSecretVerifyParams': + def from_dict(obj: Any) -> 'TaskTriggerParams': assert isinstance(obj, dict) - contact_id = from_str(obj.get("contactId")) - secret_id = from_str(obj.get("secretId")) - return ContactSecretVerifyParams(contact_id, secret_id) + task_id = from_str(obj.get("taskId")) + return TaskTriggerParams(task_id) def to_dict(self) -> dict: result: dict = {} - result["contactId"] = from_str(self.contact_id) - result["secretId"] = from_str(self.secret_id) + result["taskId"] = from_str(self.task_id) return result -class TentacledType(Enum): - """The type of action to take""" - - AUTHENTICATE = "authenticate" - - -class ContactSecretVerifyResponseAction: - """The action to take next""" - - type: TentacledType - """The type of action to take""" - - url: str - """The URL to authenticate the secret""" +class TaskTriggerResponse: + id: str + """The ID of the triggered task""" - def __init__(self, type: TentacledType, url: str) -> None: - self.type = type - self.url = url + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'ContactSecretVerifyResponseAction': + def from_dict(obj: Any) -> 'TaskTriggerResponse': assert isinstance(obj, dict) - type = TentacledType(obj.get("type")) - url = from_str(obj.get("url")) - return ContactSecretVerifyResponseAction(type, url) + id = from_str(obj.get("id")) + return TaskTriggerResponse(id) def to_dict(self) -> dict: result: dict = {} - result["type"] = to_enum(TentacledType, self.type) - result["url"] = from_str(self.url) + result["id"] = from_str(self.id) return result -class ContactSecretVerifyResponseStatus(Enum): - """The status of the secret""" - - AUTHENTICATED = "authenticated" - UNAUTHENTICATED = "unauthenticated" - - -class ContactSecretVerifyResponse: - action: Optional[ContactSecretVerifyResponseAction] - id: str - """The ID of the verified secret""" - - status: ContactSecretVerifyResponseStatus - """The status of the secret""" +class TaskFetchParams: + task_id: str + """The ID of the task to retrieve""" - def __init__(self, action: Optional[ContactSecretVerifyResponseAction], id: str, status: ContactSecretVerifyResponseStatus) -> None: - self.action = action - self.id = id - self.status = status + def __init__(self, task_id: str) -> None: + self.task_id = task_id @staticmethod - def from_dict(obj: Any) -> 'ContactSecretVerifyResponse': + def from_dict(obj: Any) -> 'TaskFetchParams': assert isinstance(obj, dict) - action = from_union([ContactSecretVerifyResponseAction.from_dict, from_none], obj.get("action")) - id = from_str(obj.get("id")) - status = ContactSecretVerifyResponseStatus(obj.get("status")) - return ContactSecretVerifyResponse(action, id, status) + task_id = from_str(obj.get("taskId")) + return TaskFetchParams(task_id) def to_dict(self) -> dict: result: dict = {} - if self.action is not None: - result["action"] = from_union([lambda x: to_class(ContactSecretVerifyResponseAction, x), from_none], self.action) - result["id"] = from_str(self.id) - result["status"] = to_enum(ContactSecretVerifyResponseStatus, self.status) + result["taskId"] = from_str(self.task_id) return result -class ContactSecretListParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" - +class TaskFetchResponseOutcome(Enum): + """The task execution outcome""" -class ContactSecretListParams: - contact_id: str - """The ID of the contact to list secrets for""" + FAILURE = "failure" + PENDING = "pending" + SUCCESS = "success" - cursor: Optional[str] - """The cursor to use for pagination""" - order: Optional[ContactSecretListParamsOrder] - """The order of the paginated items""" +class TaskFetchResponseStatus(Enum): + """The task execution status""" - take: Optional[int] - """The number of items to retrieve""" + CANCELED = "canceled" + IDLE = "idle" + RUNNING = "running" - def __init__(self, contact_id: str, cursor: Optional[str], order: Optional[ContactSecretListParamsOrder], take: Optional[int]) -> None: - self.contact_id = contact_id - self.cursor = cursor - self.order = order - self.take = take - @staticmethod - def from_dict(obj: Any) -> 'ContactSecretListParams': - assert isinstance(obj, dict) - contact_id = from_str(obj.get("contactId")) - cursor = from_union([from_str, from_none], obj.get("cursor")) - order = from_union([ContactSecretListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return ContactSecretListParams(contact_id, cursor, order, take) +class TaskFetchResponse: + """Instance list properties""" - def to_dict(self) -> dict: - result: dict = {} - result["contactId"] = from_str(self.contact_id) - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(ContactSecretListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) - return result + blueprint_id: Optional[str] + """The blueprint associated with the task""" + bot_id: Optional[str] + """The bot associated with the task""" -class ContactSecretListResponseItem: - """Instance list properties""" + contact_id: Optional[str] + """The contact associated with the task""" created_at: float """The timestamp (ms) when the instance was created""" @@ -5108,224 +5129,302 @@ class ContactSecretListResponseItem: description: Optional[str] """The associated description""" + expires_at: Optional[float] + """The timestamp (ms) at which the task expires and is automatically deleted""" + id: str """The instance ID""" + last_run_at: Optional[float] + """The timestamp (ms) of the last task execution""" + + max_iterations: Optional[float] + """The maximum number of iterations per task execution""" + + max_time: Optional[float] + """The maximum time per task execution (in milliseconds)""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - type: str - """The type of the secret""" + next_run_at: Optional[float] + """The timestamp (ms) of the next scheduled task execution""" + + outcome: Optional[TaskFetchResponseOutcome] + """The task execution outcome""" + + schedule: Optional[str] + """The schedule of the task""" + + session_duration: Optional[float] + """The session duration of the task execution (in milliseconds)""" + + status: Optional[TaskFetchResponseStatus] + """The task execution status""" + + timezone: Optional[str] + """The IANA timezone identifier used to evaluate the task schedule.""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], type: str, updated_at: float) -> None: + def __init__(self, blueprint_id: Optional[str], bot_id: Optional[str], contact_id: Optional[str], created_at: float, description: Optional[str], expires_at: Optional[float], id: str, last_run_at: Optional[float], max_iterations: Optional[float], max_time: Optional[float], meta: Optional[Dict[str, Any]], name: Optional[str], next_run_at: Optional[float], outcome: Optional[TaskFetchResponseOutcome], schedule: Optional[str], session_duration: Optional[float], status: Optional[TaskFetchResponseStatus], timezone: Optional[str], updated_at: float) -> None: + self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.contact_id = contact_id self.created_at = created_at self.description = description + self.expires_at = expires_at self.id = id + self.last_run_at = last_run_at + self.max_iterations = max_iterations + self.max_time = max_time self.meta = meta self.name = name - self.type = type + self.next_run_at = next_run_at + self.outcome = outcome + self.schedule = schedule + self.session_duration = session_duration + self.status = status + self.timezone = timezone self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'ContactSecretListResponseItem': + def from_dict(obj: Any) -> 'TaskFetchResponse': assert isinstance(obj, dict) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + expires_at = from_union([from_float, from_none], obj.get("expiresAt")) id = from_str(obj.get("id")) + last_run_at = from_union([from_float, from_none], obj.get("lastRunAt")) + max_iterations = from_union([from_float, from_none], obj.get("maxIterations")) + max_time = from_union([from_float, from_none], obj.get("maxTime")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - type = from_str(obj.get("type")) + next_run_at = from_union([from_float, from_none], obj.get("nextRunAt")) + outcome = from_union([TaskFetchResponseOutcome, from_none], obj.get("outcome")) + schedule = from_union([from_str, from_none], obj.get("schedule")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + status = from_union([TaskFetchResponseStatus, from_none], obj.get("status")) + timezone = from_union([from_str, from_none], obj.get("timezone")) updated_at = from_float(obj.get("updatedAt")) - return ContactSecretListResponseItem(created_at, description, id, meta, name, type, updated_at) + return TaskFetchResponse(blueprint_id, bot_id, contact_id, created_at, description, expires_at, id, last_run_at, max_iterations, max_time, meta, name, next_run_at, outcome, schedule, session_duration, status, timezone, updated_at) def to_dict(self) -> dict: result: dict = {} + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.expires_at is not None: + result["expiresAt"] = from_union([to_float, from_none], self.expires_at) result["id"] = from_str(self.id) + if self.last_run_at is not None: + result["lastRunAt"] = from_union([to_float, from_none], self.last_run_at) + if self.max_iterations is not None: + result["maxIterations"] = from_union([to_float, from_none], self.max_iterations) + if self.max_time is not None: + result["maxTime"] = from_union([to_float, from_none], self.max_time) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - result["type"] = from_str(self.type) + if self.next_run_at is not None: + result["nextRunAt"] = from_union([to_float, from_none], self.next_run_at) + if self.outcome is not None: + result["outcome"] = from_union([lambda x: to_enum(TaskFetchResponseOutcome, x), from_none], self.outcome) + if self.schedule is not None: + result["schedule"] = from_union([from_str, from_none], self.schedule) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.status is not None: + result["status"] = from_union([lambda x: to_enum(TaskFetchResponseStatus, x), from_none], self.status) + if self.timezone is not None: + result["timezone"] = from_union([from_str, from_none], self.timezone) result["updatedAt"] = to_float(self.updated_at) return result -class ContactSecretListResponse: - cursor: str - """Cursor for fetching the next page""" - - items: List[ContactSecretListResponseItem] +class TaskDeleteParams: + task_id: str + """The ID of the task to delete""" - def __init__(self, cursor: str, items: List[ContactSecretListResponseItem]) -> None: - self.cursor = cursor - self.items = items + def __init__(self, task_id: str) -> None: + self.task_id = task_id @staticmethod - def from_dict(obj: Any) -> 'ContactSecretListResponse': + def from_dict(obj: Any) -> 'TaskDeleteParams': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(ContactSecretListResponseItem.from_dict, obj.get("items")) - return ContactSecretListResponse(cursor, items) + task_id = from_str(obj.get("taskId")) + return TaskDeleteParams(task_id) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(ContactSecretListResponseItem, x), self.items) + result["taskId"] = from_str(self.task_id) return result -class ContactSecretListStreamItemData: - """Instance list properties""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - description: Optional[str] - """The associated description""" - +class TaskDeleteResponse: id: str - """The instance ID""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: Optional[str] - """The associated name""" - - type: str - """The type of the secret""" - - updated_at: float - """The timestamp (ms) when the instance was updated""" + """The ID of the deleted task""" - def __init__(self, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], type: str, updated_at: float) -> None: - self.created_at = created_at - self.description = description + def __init__(self, id: str) -> None: self.id = id - self.meta = meta - self.name = name - self.type = type - self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'ContactSecretListStreamItemData': + def from_dict(obj: Any) -> 'TaskDeleteResponse': assert isinstance(obj, dict) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - type = from_str(obj.get("type")) - updated_at = from_float(obj.get("updatedAt")) - return ContactSecretListStreamItemData(created_at, description, id, meta, name, type, updated_at) + return TaskDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - result["type"] = from_str(self.type) - result["updatedAt"] = to_float(self.updated_at) return result -class ContactSecretListStreamItemType(Enum): - """The type of event""" +class TaskCancelParams: + task_id: str + """The ID of the task to cancel""" - ITEM = "item" + def __init__(self, task_id: str) -> None: + self.task_id = task_id + @staticmethod + def from_dict(obj: Any) -> 'TaskCancelParams': + assert isinstance(obj, dict) + task_id = from_str(obj.get("taskId")) + return TaskCancelParams(task_id) -class ContactSecretListStreamItem: - data: ContactSecretListStreamItemData - """Instance list properties""" + def to_dict(self) -> dict: + result: dict = {} + result["taskId"] = from_str(self.task_id) + return result - type: ContactSecretListStreamItemType - """The type of event""" - def __init__(self, data: ContactSecretListStreamItemData, type: ContactSecretListStreamItemType) -> None: - self.data = data - self.type = type +class TaskCancelResponse: + id: str + """The ID of the canceled task""" + + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'ContactSecretListStreamItem': + def from_dict(obj: Any) -> 'TaskCancelResponse': assert isinstance(obj, dict) - data = ContactSecretListStreamItemData.from_dict(obj.get("data")) - type = ContactSecretListStreamItemType(obj.get("type")) - return ContactSecretListStreamItem(data, type) + id = from_str(obj.get("id")) + return TaskCancelResponse(id) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(ContactSecretListStreamItemData, self.data) - result["type"] = to_enum(ContactSecretListStreamItemType, self.type) + result["id"] = from_str(self.id) return result -class ContactSpaceListParamsOrder(Enum): +class TaskExecutionListParamsOrder(Enum): """The order of the paginated items""" ASC = "asc" DESC = "desc" -class ContactSpaceListParams: - contact_id: str - """The ID of the contact to list spaces for""" +class TaskExecutionListParamsStatus(Enum): + """Filter by execution status""" + + CANCELED = "canceled" + IDLE = "idle" + RUNNING = "running" + +class TaskExecutionListParams: cursor: Optional[str] """The cursor to use for pagination""" - order: Optional[ContactSpaceListParamsOrder] + meta: Optional[Dict[str, str]] + """Key-value pairs to filter by metadata""" + + order: Optional[TaskExecutionListParamsOrder] """The order of the paginated items""" + status: Optional[TaskExecutionListParamsStatus] + """Filter by execution status""" + take: Optional[int] """The number of items to retrieve""" - def __init__(self, contact_id: str, cursor: Optional[str], order: Optional[ContactSpaceListParamsOrder], take: Optional[int]) -> None: - self.contact_id = contact_id + task_id: str + """The ID of the task""" + + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[TaskExecutionListParamsOrder], status: Optional[TaskExecutionListParamsStatus], take: Optional[int], task_id: str) -> None: self.cursor = cursor + self.meta = meta self.order = order + self.status = status self.take = take + self.task_id = task_id @staticmethod - def from_dict(obj: Any) -> 'ContactSpaceListParams': + def from_dict(obj: Any) -> 'TaskExecutionListParams': assert isinstance(obj, dict) - contact_id = from_str(obj.get("contactId")) cursor = from_union([from_str, from_none], obj.get("cursor")) - order = from_union([ContactSpaceListParamsOrder, from_none], obj.get("order")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([TaskExecutionListParamsOrder, from_none], obj.get("order")) + status = from_union([TaskExecutionListParamsStatus, from_none], obj.get("status")) take = from_union([from_int, from_none], obj.get("take")) - return ContactSpaceListParams(contact_id, cursor, order, take) + task_id = from_str(obj.get("taskId")) + return TaskExecutionListParams(cursor, meta, order, status, take, task_id) def to_dict(self) -> dict: result: dict = {} - result["contactId"] = from_str(self.contact_id) if self.cursor is not None: result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(ContactSpaceListParamsOrder, x), from_none], self.order) + result["order"] = from_union([lambda x: to_enum(TaskExecutionListParamsOrder, x), from_none], self.order) + if self.status is not None: + result["status"] = from_union([lambda x: to_enum(TaskExecutionListParamsStatus, x), from_none], self.status) if self.take is not None: result["take"] = from_union([from_int, from_none], self.take) + result["taskId"] = from_str(self.task_id) return result -class ContactSpaceListResponseItem: +class TentacledOutcome(Enum): + """The task execution outcome""" + + FAILURE = "failure" + PENDING = "pending" + SUCCESS = "success" + + +class TentacledStatus(Enum): + """The task execution status""" + + CANCELED = "canceled" + IDLE = "idle" + RUNNING = "running" + + +class TaskExecutionListResponseItem: """Instance list properties""" - contact_id: Optional[str] - """The contact id assigned to this space""" + completed_at: Optional[datetime] + """When the execution completed""" + + conversation_id: Optional[str] + """The conversation associated with this execution""" created_at: float """The timestamp (ms) when the instance was created""" @@ -5342,34 +5441,63 @@ class ContactSpaceListResponseItem: name: Optional[str] """The associated name""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + outcome: Optional[TentacledOutcome] + """The task execution outcome""" - def __init__(self, contact_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: - self.contact_id = contact_id + resume_at: Optional[datetime] + """When a paused run is expected to resume; null while actively running""" + + status: Optional[TentacledStatus] + """The task execution status""" + + summary: Optional[str] + """A summary of the execution result""" + + task_id: Optional[str] + """The task this execution belongs to""" + + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, completed_at: Optional[datetime], conversation_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], outcome: Optional[TentacledOutcome], resume_at: Optional[datetime], status: Optional[TentacledStatus], summary: Optional[str], task_id: Optional[str], updated_at: float) -> None: + self.completed_at = completed_at + self.conversation_id = conversation_id self.created_at = created_at self.description = description self.id = id self.meta = meta self.name = name + self.outcome = outcome + self.resume_at = resume_at + self.status = status + self.summary = summary + self.task_id = task_id self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'ContactSpaceListResponseItem': + def from_dict(obj: Any) -> 'TaskExecutionListResponseItem': assert isinstance(obj, dict) - contact_id = from_union([from_str, from_none], obj.get("contactId")) + completed_at = from_union([from_datetime, from_none], obj.get("completedAt")) + conversation_id = from_union([from_str, from_none], obj.get("conversationId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) + outcome = from_union([TentacledOutcome, from_none], obj.get("outcome")) + resume_at = from_union([from_datetime, from_none], obj.get("resumeAt")) + status = from_union([TentacledStatus, from_none], obj.get("status")) + summary = from_union([from_str, from_none], obj.get("summary")) + task_id = from_union([from_str, from_none], obj.get("taskId")) updated_at = from_float(obj.get("updatedAt")) - return ContactSpaceListResponseItem(contact_id, created_at, description, id, meta, name, updated_at) + return TaskExecutionListResponseItem(completed_at, conversation_id, created_at, description, id, meta, name, outcome, resume_at, status, summary, task_id, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.contact_id is not None: - result["contactId"] = from_union([from_str, from_none], self.contact_id) + if self.completed_at is not None: + result["completedAt"] = from_union([lambda x: x.isoformat(), from_none], self.completed_at) + if self.conversation_id is not None: + result["conversationId"] = from_union([from_str, from_none], self.conversation_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) @@ -5378,39 +5506,68 @@ def to_dict(self) -> dict: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.outcome is not None: + result["outcome"] = from_union([lambda x: to_enum(TentacledOutcome, x), from_none], self.outcome) + if self.resume_at is not None: + result["resumeAt"] = from_union([lambda x: x.isoformat(), from_none], self.resume_at) + if self.status is not None: + result["status"] = from_union([lambda x: to_enum(TentacledStatus, x), from_none], self.status) + if self.summary is not None: + result["summary"] = from_union([from_str, from_none], self.summary) + if self.task_id is not None: + result["taskId"] = from_union([from_str, from_none], self.task_id) result["updatedAt"] = to_float(self.updated_at) return result -class ContactSpaceListResponse: +class TaskExecutionListResponse: cursor: str """Cursor for fetching the next page""" - items: List[ContactSpaceListResponseItem] + items: List[TaskExecutionListResponseItem] - def __init__(self, cursor: str, items: List[ContactSpaceListResponseItem]) -> None: + def __init__(self, cursor: str, items: List[TaskExecutionListResponseItem]) -> None: self.cursor = cursor self.items = items @staticmethod - def from_dict(obj: Any) -> 'ContactSpaceListResponse': + def from_dict(obj: Any) -> 'TaskExecutionListResponse': assert isinstance(obj, dict) cursor = from_str(obj.get("cursor")) - items = from_list(ContactSpaceListResponseItem.from_dict, obj.get("items")) - return ContactSpaceListResponse(cursor, items) + items = from_list(TaskExecutionListResponseItem.from_dict, obj.get("items")) + return TaskExecutionListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(ContactSpaceListResponseItem, x), self.items) + result["items"] = from_list(lambda x: to_class(TaskExecutionListResponseItem, x), self.items) return result -class ContactSpaceListStreamItemData: +class StickyOutcome(Enum): + """The task execution outcome""" + + FAILURE = "failure" + PENDING = "pending" + SUCCESS = "success" + + +class StickyStatus(Enum): + """The task execution status""" + + CANCELED = "canceled" + IDLE = "idle" + RUNNING = "running" + + +class TaskExecutionListStreamItemData: """Instance list properties""" - contact_id: Optional[str] - """The contact id assigned to this space""" + completed_at: Optional[datetime] + """When the execution completed""" + + conversation_id: Optional[str] + """The conversation associated with this execution""" created_at: float """The timestamp (ms) when the instance was created""" @@ -5427,34 +5584,63 @@ class ContactSpaceListStreamItemData: name: Optional[str] """The associated name""" + outcome: Optional[StickyOutcome] + """The task execution outcome""" + + resume_at: Optional[datetime] + """When a paused run is expected to resume; null while actively running""" + + status: Optional[StickyStatus] + """The task execution status""" + + summary: Optional[str] + """A summary of the execution result""" + + task_id: Optional[str] + """The task this execution belongs to""" + updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, contact_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: - self.contact_id = contact_id + def __init__(self, completed_at: Optional[datetime], conversation_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], outcome: Optional[StickyOutcome], resume_at: Optional[datetime], status: Optional[StickyStatus], summary: Optional[str], task_id: Optional[str], updated_at: float) -> None: + self.completed_at = completed_at + self.conversation_id = conversation_id self.created_at = created_at self.description = description self.id = id self.meta = meta self.name = name + self.outcome = outcome + self.resume_at = resume_at + self.status = status + self.summary = summary + self.task_id = task_id self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'ContactSpaceListStreamItemData': + def from_dict(obj: Any) -> 'TaskExecutionListStreamItemData': assert isinstance(obj, dict) - contact_id = from_union([from_str, from_none], obj.get("contactId")) + completed_at = from_union([from_datetime, from_none], obj.get("completedAt")) + conversation_id = from_union([from_str, from_none], obj.get("conversationId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) + outcome = from_union([StickyOutcome, from_none], obj.get("outcome")) + resume_at = from_union([from_datetime, from_none], obj.get("resumeAt")) + status = from_union([StickyStatus, from_none], obj.get("status")) + summary = from_union([from_str, from_none], obj.get("summary")) + task_id = from_union([from_str, from_none], obj.get("taskId")) updated_at = from_float(obj.get("updatedAt")) - return ContactSpaceListStreamItemData(contact_id, created_at, description, id, meta, name, updated_at) + return TaskExecutionListStreamItemData(completed_at, conversation_id, created_at, description, id, meta, name, outcome, resume_at, status, summary, task_id, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.contact_id is not None: - result["contactId"] = from_union([from_str, from_none], self.contact_id) + if self.completed_at is not None: + result["completedAt"] = from_union([lambda x: x.isoformat(), from_none], self.completed_at) + if self.conversation_id is not None: + result["conversationId"] = from_union([from_str, from_none], self.conversation_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) @@ -5463,112 +5649,160 @@ def to_dict(self) -> dict: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.outcome is not None: + result["outcome"] = from_union([lambda x: to_enum(StickyOutcome, x), from_none], self.outcome) + if self.resume_at is not None: + result["resumeAt"] = from_union([lambda x: x.isoformat(), from_none], self.resume_at) + if self.status is not None: + result["status"] = from_union([lambda x: to_enum(StickyStatus, x), from_none], self.status) + if self.summary is not None: + result["summary"] = from_union([from_str, from_none], self.summary) + if self.task_id is not None: + result["taskId"] = from_union([from_str, from_none], self.task_id) result["updatedAt"] = to_float(self.updated_at) return result -class ContactSpaceListStreamItemType(Enum): +class TaskExecutionListStreamItemType(Enum): """The type of event""" ITEM = "item" -class ContactSpaceListStreamItem: - data: ContactSpaceListStreamItemData +class TaskExecutionListStreamItem: + data: TaskExecutionListStreamItemData """Instance list properties""" - type: ContactSpaceListStreamItemType + type: TaskExecutionListStreamItemType """The type of event""" - def __init__(self, data: ContactSpaceListStreamItemData, type: ContactSpaceListStreamItemType) -> None: + def __init__(self, data: TaskExecutionListStreamItemData, type: TaskExecutionListStreamItemType) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'ContactSpaceListStreamItem': + def from_dict(obj: Any) -> 'TaskExecutionListStreamItem': assert isinstance(obj, dict) - data = ContactSpaceListStreamItemData.from_dict(obj.get("data")) - type = ContactSpaceListStreamItemType(obj.get("type")) - return ContactSpaceListStreamItem(data, type) + data = TaskExecutionListStreamItemData.from_dict(obj.get("data")) + type = TaskExecutionListStreamItemType(obj.get("type")) + return TaskExecutionListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(ContactSpaceListStreamItemData, self.data) - result["type"] = to_enum(ContactSpaceListStreamItemType, self.type) + result["data"] = to_class(TaskExecutionListStreamItemData, self.data) + result["type"] = to_enum(TaskExecutionListStreamItemType, self.type) return result -class ContactTaskListParamsOrder(Enum): +class TaskExecutionCancelParams: + task_execution_id: str + """The ID of the task execution to cancel""" + + task_id: str + """The ID of the task""" + + def __init__(self, task_execution_id: str, task_id: str) -> None: + self.task_execution_id = task_execution_id + self.task_id = task_id + + @staticmethod + def from_dict(obj: Any) -> 'TaskExecutionCancelParams': + assert isinstance(obj, dict) + task_execution_id = from_str(obj.get("taskExecutionId")) + task_id = from_str(obj.get("taskId")) + return TaskExecutionCancelParams(task_execution_id, task_id) + + def to_dict(self) -> dict: + result: dict = {} + result["taskExecutionId"] = from_str(self.task_execution_id) + result["taskId"] = from_str(self.task_id) + return result + + +class TaskExecutionCancelResponse: + id: str + """The ID of the canceled task execution""" + + task_id: str + """The ID of the parent task""" + + def __init__(self, id: str, task_id: str) -> None: + self.id = id + self.task_id = task_id + + @staticmethod + def from_dict(obj: Any) -> 'TaskExecutionCancelResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + task_id = from_str(obj.get("taskId")) + return TaskExecutionCancelResponse(id, task_id) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + result["taskId"] = from_str(self.task_id) + return result + + +class SpaceListParamsOrder(Enum): """The order of the paginated items""" ASC = "asc" DESC = "desc" -class ContactTaskListParams: - contact_id: str - """The ID of the contact to list tasks for""" - +class SpaceListParams: cursor: Optional[str] """The cursor to use for pagination""" - order: Optional[ContactTaskListParamsOrder] + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" + + order: Optional[SpaceListParamsOrder] """The order of the paginated items""" take: Optional[int] """The number of items to retrieve""" - def __init__(self, contact_id: str, cursor: Optional[str], order: Optional[ContactTaskListParamsOrder], take: Optional[int]) -> None: - self.contact_id = contact_id + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[SpaceListParamsOrder], take: Optional[int]) -> None: self.cursor = cursor + self.meta = meta self.order = order self.take = take @staticmethod - def from_dict(obj: Any) -> 'ContactTaskListParams': + def from_dict(obj: Any) -> 'SpaceListParams': assert isinstance(obj, dict) - contact_id = from_str(obj.get("contactId")) cursor = from_union([from_str, from_none], obj.get("cursor")) - order = from_union([ContactTaskListParamsOrder, from_none], obj.get("order")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([SpaceListParamsOrder, from_none], obj.get("order")) take = from_union([from_int, from_none], obj.get("take")) - return ContactTaskListParams(contact_id, cursor, order, take) + return SpaceListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} - result["contactId"] = from_str(self.contact_id) if self.cursor is not None: result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(ContactTaskListParamsOrder, x), from_none], self.order) + result["order"] = from_union([lambda x: to_enum(SpaceListParamsOrder, x), from_none], self.order) if self.take is not None: result["take"] = from_union([from_int, from_none], self.take) return result -class PurpleOutcome(Enum): - """The task execution outcome""" - - FAILURE = "failure" - PENDING = "pending" - SUCCESS = "success" - - -class PurpleStatus(Enum): - """The task execution status""" - - CANCELED = "canceled" - IDLE = "idle" - RUNNING = "running" - +class SpaceListResponseItem: + """Blueprint properties""" -class ContactTaskListResponseItem: - """Instance list properties""" + alias: Optional[str] + """The unique alias for the instance""" - bot_id: Optional[str] - """The bot associated with the task""" + blueprint_id: Optional[str] + """The ID of the blueprint""" contact_id: Optional[str] - """The contact id assigned to this task""" + """The contact associated with the space""" created_at: float """The timestamp (ms) when the instance was created""" @@ -5579,167 +5813,95 @@ class ContactTaskListResponseItem: id: str """The instance ID""" - last_run_at: Optional[float] - """The timestamp (ms) of the last task execution""" - - max_iterations: Optional[float] - """The maximum number of iterations per task execution""" - - max_time: Optional[float] - """The maximum time per task execution (in milliseconds)""" - meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - next_run_at: Optional[float] - """The timestamp (ms) of the next scheduled task execution""" - - outcome: Optional[PurpleOutcome] - """The task execution outcome""" - - schedule: Optional[str] - """The schedule of the task""" - - session_duration: Optional[float] - """The session duration of the task execution (in milliseconds)""" - - status: Optional[PurpleStatus] - """The task execution status""" - - timezone: Optional[str] - """The IANA timezone identifier used to evaluate the task schedule.""" - updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, bot_id: Optional[str], contact_id: Optional[str], created_at: float, description: Optional[str], id: str, last_run_at: Optional[float], max_iterations: Optional[float], max_time: Optional[float], meta: Optional[Dict[str, Any]], name: Optional[str], next_run_at: Optional[float], outcome: Optional[PurpleOutcome], schedule: Optional[str], session_duration: Optional[float], status: Optional[PurpleStatus], timezone: Optional[str], updated_at: float) -> None: - self.bot_id = bot_id + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], contact_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: + self.alias = alias + self.blueprint_id = blueprint_id self.contact_id = contact_id self.created_at = created_at self.description = description self.id = id - self.last_run_at = last_run_at - self.max_iterations = max_iterations - self.max_time = max_time self.meta = meta self.name = name - self.next_run_at = next_run_at - self.outcome = outcome - self.schedule = schedule - self.session_duration = session_duration - self.status = status - self.timezone = timezone self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'ContactTaskListResponseItem': + def from_dict(obj: Any) -> 'SpaceListResponseItem': assert isinstance(obj, dict) - bot_id = from_union([from_str, from_none], obj.get("botId")) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) contact_id = from_union([from_str, from_none], obj.get("contactId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) - last_run_at = from_union([from_float, from_none], obj.get("lastRunAt")) - max_iterations = from_union([from_float, from_none], obj.get("maxIterations")) - max_time = from_union([from_float, from_none], obj.get("maxTime")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - next_run_at = from_union([from_float, from_none], obj.get("nextRunAt")) - outcome = from_union([PurpleOutcome, from_none], obj.get("outcome")) - schedule = from_union([from_str, from_none], obj.get("schedule")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - status = from_union([PurpleStatus, from_none], obj.get("status")) - timezone = from_union([from_str, from_none], obj.get("timezone")) updated_at = from_float(obj.get("updatedAt")) - return ContactTaskListResponseItem(bot_id, contact_id, created_at, description, id, last_run_at, max_iterations, max_time, meta, name, next_run_at, outcome, schedule, session_duration, status, timezone, updated_at) + return SpaceListResponseItem(alias, blueprint_id, contact_id, created_at, description, id, meta, name, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.contact_id is not None: result["contactId"] = from_union([from_str, from_none], self.contact_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) - if self.last_run_at is not None: - result["lastRunAt"] = from_union([to_float, from_none], self.last_run_at) - if self.max_iterations is not None: - result["maxIterations"] = from_union([to_float, from_none], self.max_iterations) - if self.max_time is not None: - result["maxTime"] = from_union([to_float, from_none], self.max_time) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.next_run_at is not None: - result["nextRunAt"] = from_union([to_float, from_none], self.next_run_at) - if self.outcome is not None: - result["outcome"] = from_union([lambda x: to_enum(PurpleOutcome, x), from_none], self.outcome) - if self.schedule is not None: - result["schedule"] = from_union([from_str, from_none], self.schedule) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - if self.status is not None: - result["status"] = from_union([lambda x: to_enum(PurpleStatus, x), from_none], self.status) - if self.timezone is not None: - result["timezone"] = from_union([from_str, from_none], self.timezone) result["updatedAt"] = to_float(self.updated_at) return result -class ContactTaskListResponse: +class SpaceListResponse: cursor: str """Cursor for fetching the next page""" - items: List[ContactTaskListResponseItem] + items: List[SpaceListResponseItem] - def __init__(self, cursor: str, items: List[ContactTaskListResponseItem]) -> None: + def __init__(self, cursor: str, items: List[SpaceListResponseItem]) -> None: self.cursor = cursor self.items = items @staticmethod - def from_dict(obj: Any) -> 'ContactTaskListResponse': + def from_dict(obj: Any) -> 'SpaceListResponse': assert isinstance(obj, dict) cursor = from_str(obj.get("cursor")) - items = from_list(ContactTaskListResponseItem.from_dict, obj.get("items")) - return ContactTaskListResponse(cursor, items) + items = from_list(SpaceListResponseItem.from_dict, obj.get("items")) + return SpaceListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(ContactTaskListResponseItem, x), self.items) + result["items"] = from_list(lambda x: to_class(SpaceListResponseItem, x), self.items) return result -class FluffyOutcome(Enum): - """The task execution outcome""" - - FAILURE = "failure" - PENDING = "pending" - SUCCESS = "success" - - -class FluffyStatus(Enum): - """The task execution status""" - - CANCELED = "canceled" - IDLE = "idle" - RUNNING = "running" - +class SpaceListStreamItemData: + """Blueprint properties""" -class ContactTaskListStreamItemData: - """Instance list properties""" + alias: Optional[str] + """The unique alias for the instance""" - bot_id: Optional[str] - """The bot associated with the task""" + blueprint_id: Optional[str] + """The ID of the blueprint""" contact_id: Optional[str] - """The contact id assigned to this task""" + """The contact associated with the space""" created_at: float """The timestamp (ms) when the instance was created""" @@ -5750,179 +5912,156 @@ class ContactTaskListStreamItemData: id: str """The instance ID""" - last_run_at: Optional[float] - """The timestamp (ms) of the last task execution""" - - max_iterations: Optional[float] - """The maximum number of iterations per task execution""" - - max_time: Optional[float] - """The maximum time per task execution (in milliseconds)""" - meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - next_run_at: Optional[float] - """The timestamp (ms) of the next scheduled task execution""" - - outcome: Optional[FluffyOutcome] - """The task execution outcome""" - - schedule: Optional[str] - """The schedule of the task""" - - session_duration: Optional[float] - """The session duration of the task execution (in milliseconds)""" - - status: Optional[FluffyStatus] - """The task execution status""" - - timezone: Optional[str] - """The IANA timezone identifier used to evaluate the task schedule.""" - updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, bot_id: Optional[str], contact_id: Optional[str], created_at: float, description: Optional[str], id: str, last_run_at: Optional[float], max_iterations: Optional[float], max_time: Optional[float], meta: Optional[Dict[str, Any]], name: Optional[str], next_run_at: Optional[float], outcome: Optional[FluffyOutcome], schedule: Optional[str], session_duration: Optional[float], status: Optional[FluffyStatus], timezone: Optional[str], updated_at: float) -> None: - self.bot_id = bot_id + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], contact_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: + self.alias = alias + self.blueprint_id = blueprint_id self.contact_id = contact_id self.created_at = created_at self.description = description self.id = id - self.last_run_at = last_run_at - self.max_iterations = max_iterations - self.max_time = max_time self.meta = meta self.name = name - self.next_run_at = next_run_at - self.outcome = outcome - self.schedule = schedule - self.session_duration = session_duration - self.status = status - self.timezone = timezone self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'ContactTaskListStreamItemData': + def from_dict(obj: Any) -> 'SpaceListStreamItemData': assert isinstance(obj, dict) - bot_id = from_union([from_str, from_none], obj.get("botId")) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) contact_id = from_union([from_str, from_none], obj.get("contactId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) - last_run_at = from_union([from_float, from_none], obj.get("lastRunAt")) - max_iterations = from_union([from_float, from_none], obj.get("maxIterations")) - max_time = from_union([from_float, from_none], obj.get("maxTime")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - next_run_at = from_union([from_float, from_none], obj.get("nextRunAt")) - outcome = from_union([FluffyOutcome, from_none], obj.get("outcome")) - schedule = from_union([from_str, from_none], obj.get("schedule")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - status = from_union([FluffyStatus, from_none], obj.get("status")) - timezone = from_union([from_str, from_none], obj.get("timezone")) updated_at = from_float(obj.get("updatedAt")) - return ContactTaskListStreamItemData(bot_id, contact_id, created_at, description, id, last_run_at, max_iterations, max_time, meta, name, next_run_at, outcome, schedule, session_duration, status, timezone, updated_at) + return SpaceListStreamItemData(alias, blueprint_id, contact_id, created_at, description, id, meta, name, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.contact_id is not None: result["contactId"] = from_union([from_str, from_none], self.contact_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) - if self.last_run_at is not None: - result["lastRunAt"] = from_union([to_float, from_none], self.last_run_at) - if self.max_iterations is not None: - result["maxIterations"] = from_union([to_float, from_none], self.max_iterations) - if self.max_time is not None: - result["maxTime"] = from_union([to_float, from_none], self.max_time) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.next_run_at is not None: - result["nextRunAt"] = from_union([to_float, from_none], self.next_run_at) - if self.outcome is not None: - result["outcome"] = from_union([lambda x: to_enum(FluffyOutcome, x), from_none], self.outcome) - if self.schedule is not None: - result["schedule"] = from_union([from_str, from_none], self.schedule) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - if self.status is not None: - result["status"] = from_union([lambda x: to_enum(FluffyStatus, x), from_none], self.status) - if self.timezone is not None: - result["timezone"] = from_union([from_str, from_none], self.timezone) result["updatedAt"] = to_float(self.updated_at) return result -class ContactTaskListStreamItemType(Enum): +class SpaceListStreamItemType(Enum): """The type of event""" ITEM = "item" -class ContactTaskListStreamItem: - data: ContactTaskListStreamItemData - """Instance list properties""" +class SpaceListStreamItem: + data: SpaceListStreamItemData + """Blueprint properties""" - type: ContactTaskListStreamItemType + type: SpaceListStreamItemType """The type of event""" - def __init__(self, data: ContactTaskListStreamItemData, type: ContactTaskListStreamItemType) -> None: + def __init__(self, data: SpaceListStreamItemData, type: SpaceListStreamItemType) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'ContactTaskListStreamItem': + def from_dict(obj: Any) -> 'SpaceListStreamItem': assert isinstance(obj, dict) - data = ContactTaskListStreamItemData.from_dict(obj.get("data")) - type = ContactTaskListStreamItemType(obj.get("type")) - return ContactTaskListStreamItem(data, type) + data = SpaceListStreamItemData.from_dict(obj.get("data")) + type = SpaceListStreamItemType(obj.get("type")) + return SpaceListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(ContactTaskListStreamItemData, self.data) - result["type"] = to_enum(ContactTaskListStreamItemType, self.type) + result["data"] = to_class(SpaceListStreamItemData, self.data) + result["type"] = to_enum(SpaceListStreamItemType, self.type) return result -class ContactUpdateParams: - contact_id: str +class SpacesExportParamsOrder(Enum): + """The order of the paginated items""" - def __init__(self, contact_id: str) -> None: - self.contact_id = contact_id + ASC = "asc" + DESC = "desc" - @staticmethod - def from_dict(obj: Any) -> 'ContactUpdateParams': - assert isinstance(obj, dict) - contact_id = from_str(obj.get("contactId")) - return ContactUpdateParams(contact_id) - def to_dict(self) -> dict: - result: dict = {} - result["contactId"] = from_str(self.contact_id) - return result +class SpacesExportParams: + cursor: Optional[str] + """The cursor to use for pagination""" + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" -class ContactUpdateRequest: - """Instance crud properties""" + order: Optional[SpacesExportParamsOrder] + """The order of the paginated items""" - description: Optional[str] - """The associated description""" + take: Optional[int] + """The number of items to retrieve""" - email: Optional[str] - """The email address of the contact""" + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[SpacesExportParamsOrder], take: Optional[int]) -> None: + self.cursor = cursor + self.meta = meta + self.order = order + self.take = take - fingerprint: Optional[str] - """The fingerprint of the contact""" + @staticmethod + def from_dict(obj: Any) -> 'SpacesExportParams': + assert isinstance(obj, dict) + cursor = from_union([from_str, from_none], obj.get("cursor")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([SpacesExportParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return SpacesExportParams(cursor, meta, order, take) + + def to_dict(self) -> dict: + result: dict = {} + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(SpacesExportParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) + return result + + +class SpacesExportResponseItem: + """Blueprint properties""" + + blueprint_id: Optional[str] + """The ID of the blueprint""" + + contact_id: Optional[str] + """The contact associated with the space""" + + created_at: float + """The timestamp (ms) when the instance was created""" + + description: Optional[str] + """The associated description""" + + id: str + """The instance ID""" meta: Optional[Dict[str, Any]] """Meta data information""" @@ -5930,96 +6069,91 @@ class ContactUpdateRequest: name: Optional[str] """The associated name""" - nick: Optional[str] - """The nickname of the contact""" - - phone: Optional[str] - """The phone number of the contact""" - - preferences: Optional[str] - """The preferences of the contact""" - - verified_at: Optional[float] - """The timestamp (ms) when the contact was verified""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - def __init__(self, description: Optional[str], email: Optional[str], fingerprint: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], nick: Optional[str], phone: Optional[str], preferences: Optional[str], verified_at: Optional[float]) -> None: + def __init__(self, blueprint_id: Optional[str], contact_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: + self.blueprint_id = blueprint_id + self.contact_id = contact_id + self.created_at = created_at self.description = description - self.email = email - self.fingerprint = fingerprint + self.id = id self.meta = meta self.name = name - self.nick = nick - self.phone = phone - self.preferences = preferences - self.verified_at = verified_at + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'ContactUpdateRequest': + def from_dict(obj: Any) -> 'SpacesExportResponseItem': assert isinstance(obj, dict) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - email = from_union([from_str, from_none], obj.get("email")) - fingerprint = from_union([from_str, from_none], obj.get("fingerprint")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - nick = from_union([from_str, from_none], obj.get("nick")) - phone = from_union([from_str, from_none], obj.get("phone")) - preferences = from_union([from_str, from_none], obj.get("preferences")) - verified_at = from_union([from_float, from_none], obj.get("verifiedAt")) - return ContactUpdateRequest(description, email, fingerprint, meta, name, nick, phone, preferences, verified_at) + updated_at = from_float(obj.get("updatedAt")) + return SpacesExportResponseItem(blueprint_id, contact_id, created_at, description, id, meta, name, updated_at) def to_dict(self) -> dict: result: dict = {} + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.email is not None: - result["email"] = from_union([from_str, from_none], self.email) - if self.fingerprint is not None: - result["fingerprint"] = from_union([from_str, from_none], self.fingerprint) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.nick is not None: - result["nick"] = from_union([from_str, from_none], self.nick) - if self.phone is not None: - result["phone"] = from_union([from_str, from_none], self.phone) - if self.preferences is not None: - result["preferences"] = from_union([from_str, from_none], self.preferences) - if self.verified_at is not None: - result["verifiedAt"] = from_union([to_float, from_none], self.verified_at) + result["updatedAt"] = to_float(self.updated_at) return result -class ContactUpdateResponse: - id: str - """The ID of the updated contact""" +class SpacesExportResponse: + cursor: str + """Cursor for fetching the next page""" - def __init__(self, id: str) -> None: - self.id = id + items: List[SpacesExportResponseItem] + + def __init__(self, cursor: str, items: List[SpacesExportResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'ContactUpdateResponse': + def from_dict(obj: Any) -> 'SpacesExportResponse': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return ContactUpdateResponse(id) + cursor = from_str(obj.get("cursor")) + items = from_list(SpacesExportResponseItem.from_dict, obj.get("items")) + return SpacesExportResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(SpacesExportResponseItem, x), self.items) return result -class ContactCreateRequest: - """Instance crud properties""" +class SpacesExportStreamItemData: + """Blueprint properties""" + + blueprint_id: Optional[str] + """The ID of the blueprint""" + + contact_id: Optional[str] + """The contact associated with the space""" + + created_at: float + """The timestamp (ms) when the instance was created""" description: Optional[str] """The associated description""" - email: Optional[str] - """The email address of the contact""" - - fingerprint: Optional[str] - """The fingerprint of the contact""" + id: str + """The instance ID""" meta: Optional[Dict[str, Any]] """Meta data information""" @@ -6027,96 +6161,95 @@ class ContactCreateRequest: name: Optional[str] """The associated name""" - nick: Optional[str] - """The nickname of the contact""" - - phone: Optional[str] - """The phone number of the contact""" - - preferences: Optional[str] - """The preferences of the contact""" - - verified_at: Optional[float] - """The timestamp (ms) when the contact was verified""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - def __init__(self, description: Optional[str], email: Optional[str], fingerprint: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], nick: Optional[str], phone: Optional[str], preferences: Optional[str], verified_at: Optional[float]) -> None: + def __init__(self, blueprint_id: Optional[str], contact_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: + self.blueprint_id = blueprint_id + self.contact_id = contact_id + self.created_at = created_at self.description = description - self.email = email - self.fingerprint = fingerprint + self.id = id self.meta = meta self.name = name - self.nick = nick - self.phone = phone - self.preferences = preferences - self.verified_at = verified_at + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'ContactCreateRequest': + def from_dict(obj: Any) -> 'SpacesExportStreamItemData': assert isinstance(obj, dict) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - email = from_union([from_str, from_none], obj.get("email")) - fingerprint = from_union([from_str, from_none], obj.get("fingerprint")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - nick = from_union([from_str, from_none], obj.get("nick")) - phone = from_union([from_str, from_none], obj.get("phone")) - preferences = from_union([from_str, from_none], obj.get("preferences")) - verified_at = from_union([from_float, from_none], obj.get("verifiedAt")) - return ContactCreateRequest(description, email, fingerprint, meta, name, nick, phone, preferences, verified_at) + updated_at = from_float(obj.get("updatedAt")) + return SpacesExportStreamItemData(blueprint_id, contact_id, created_at, description, id, meta, name, updated_at) def to_dict(self) -> dict: result: dict = {} + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.email is not None: - result["email"] = from_union([from_str, from_none], self.email) - if self.fingerprint is not None: - result["fingerprint"] = from_union([from_str, from_none], self.fingerprint) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.nick is not None: - result["nick"] = from_union([from_str, from_none], self.nick) - if self.phone is not None: - result["phone"] = from_union([from_str, from_none], self.phone) - if self.preferences is not None: - result["preferences"] = from_union([from_str, from_none], self.preferences) - if self.verified_at is not None: - result["verifiedAt"] = from_union([to_float, from_none], self.verified_at) + result["updatedAt"] = to_float(self.updated_at) return result -class ContactCreateResponse: - id: str - """The ID of the created contact""" +class SpacesExportStreamItemType(Enum): + """The type of event""" - def __init__(self, id: str) -> None: - self.id = id + ITEM = "item" + + +class SpacesExportStreamItem: + data: SpacesExportStreamItemData + """Blueprint properties""" + + type: SpacesExportStreamItemType + """The type of event""" + + def __init__(self, data: SpacesExportStreamItemData, type: SpacesExportStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'ContactCreateResponse': + def from_dict(obj: Any) -> 'SpacesExportStreamItem': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return ContactCreateResponse(id) + data = SpacesExportStreamItemData.from_dict(obj.get("data")) + type = SpacesExportStreamItemType(obj.get("type")) + return SpacesExportStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["data"] = to_class(SpacesExportStreamItemData, self.data) + result["type"] = to_enum(SpacesExportStreamItemType, self.type) return result -class ContactEnsureRequest: - """Instance crud properties""" +class SpaceCreateRequest: + """Blueprint properties""" - description: Optional[str] - """The associated description""" + alias: Optional[str] + """The unique alias for the instance""" - email: Optional[str] - """The email address of the contact""" + blueprint_id: Optional[str] + """The ID of the blueprint""" - fingerprint: str - """The fingerprint of the contact""" + contact_id: Optional[str] + """The contact associated with the space""" + + description: Optional[str] + """The associated description""" meta: Optional[Dict[str, Any]] """Meta data information""" @@ -6124,77 +6257,54 @@ class ContactEnsureRequest: name: Optional[str] """The associated name""" - nick: Optional[str] - """The nickname of the contact""" - - phone: Optional[str] - """The phone number of the contact""" - - preferences: Optional[str] - """The preferences of the contact""" - - verified_at: Optional[float] - """The timestamp (ms) when the contact was verified""" - - def __init__(self, description: Optional[str], email: Optional[str], fingerprint: str, meta: Optional[Dict[str, Any]], name: Optional[str], nick: Optional[str], phone: Optional[str], preferences: Optional[str], verified_at: Optional[float]) -> None: + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], contact_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.contact_id = contact_id self.description = description - self.email = email - self.fingerprint = fingerprint self.meta = meta self.name = name - self.nick = nick - self.phone = phone - self.preferences = preferences - self.verified_at = verified_at @staticmethod - def from_dict(obj: Any) -> 'ContactEnsureRequest': + def from_dict(obj: Any) -> 'SpaceCreateRequest': assert isinstance(obj, dict) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) description = from_union([from_str, from_none], obj.get("description")) - email = from_union([from_str, from_none], obj.get("email")) - fingerprint = from_str(obj.get("fingerprint")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - nick = from_union([from_str, from_none], obj.get("nick")) - phone = from_union([from_str, from_none], obj.get("phone")) - preferences = from_union([from_str, from_none], obj.get("preferences")) - verified_at = from_union([from_float, from_none], obj.get("verifiedAt")) - return ContactEnsureRequest(description, email, fingerprint, meta, name, nick, phone, preferences, verified_at) + return SpaceCreateRequest(alias, blueprint_id, contact_id, description, meta, name) def to_dict(self) -> dict: result: dict = {} + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.email is not None: - result["email"] = from_union([from_str, from_none], self.email) - result["fingerprint"] = from_str(self.fingerprint) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.nick is not None: - result["nick"] = from_union([from_str, from_none], self.nick) - if self.phone is not None: - result["phone"] = from_union([from_str, from_none], self.phone) - if self.preferences is not None: - result["preferences"] = from_union([from_str, from_none], self.preferences) - if self.verified_at is not None: - result["verifiedAt"] = from_union([to_float, from_none], self.verified_at) return result -class ContactEnsureResponse: +class SpaceCreateResponse: id: str - """The ID of the ensured contact""" + """The ID of the created space""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'ContactEnsureResponse': + def from_dict(obj: Any) -> 'SpaceCreateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return ContactEnsureResponse(id) + return SpaceCreateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -6202,71 +6312,38 @@ def to_dict(self) -> dict: return result -class ContactsExportParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" - - -class ContactsExportParams: - cursor: Optional[str] - """The cursor to use for pagination""" - - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" - - order: Optional[ContactsExportParamsOrder] - """The order of the paginated items""" - - take: Optional[int] - """The number of items to retrieve""" +class SpaceUpdateParams: + space_id: str - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[ContactsExportParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take + def __init__(self, space_id: str) -> None: + self.space_id = space_id @staticmethod - def from_dict(obj: Any) -> 'ContactsExportParams': + def from_dict(obj: Any) -> 'SpaceUpdateParams': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([ContactsExportParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return ContactsExportParams(cursor, meta, order, take) + space_id = from_str(obj.get("spaceId")) + return SpaceUpdateParams(space_id) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(ContactsExportParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["spaceId"] = from_str(self.space_id) return result -class ContactsExportResponseItem: - """Instance list properties""" - - created_at: float - """The timestamp (ms) when the instance was created""" +class SpaceUpdateRequest: + """Blueprint properties""" - description: Optional[str] - """The associated description""" + alias: Optional[str] + """The unique alias for the instance""" - email: Optional[str] - """The email address of the contact""" + blueprint_id: Optional[str] + """The ID of the blueprint""" - fingerprint: str - """The fingerprint of the contact""" + contact_id: Optional[str] + """The contact associated with the space""" - id: str - """The instance ID""" + description: Optional[str] + """The associated description""" meta: Optional[Dict[str, Any]] """Meta data information""" @@ -6274,103 +6351,91 @@ class ContactsExportResponseItem: name: Optional[str] """The associated name""" - nick: Optional[str] - """The nickname of the contact""" - - phone: Optional[str] - """The phone number of the contact""" - - preferences: Optional[str] - """The preferences of the contact""" - - updated_at: float - """The timestamp (ms) when the instance was updated""" - - verified_at: Optional[float] - """The timestamp (ms) when the contact was verified""" - - def __init__(self, created_at: float, description: Optional[str], email: Optional[str], fingerprint: str, id: str, meta: Optional[Dict[str, Any]], name: Optional[str], nick: Optional[str], phone: Optional[str], preferences: Optional[str], updated_at: float, verified_at: Optional[float]) -> None: - self.created_at = created_at + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], contact_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.contact_id = contact_id self.description = description - self.email = email - self.fingerprint = fingerprint - self.id = id self.meta = meta self.name = name - self.nick = nick - self.phone = phone - self.preferences = preferences - self.updated_at = updated_at - self.verified_at = verified_at @staticmethod - def from_dict(obj: Any) -> 'ContactsExportResponseItem': + def from_dict(obj: Any) -> 'SpaceUpdateRequest': assert isinstance(obj, dict) - created_at = from_float(obj.get("createdAt")) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) description = from_union([from_str, from_none], obj.get("description")) - email = from_union([from_str, from_none], obj.get("email")) - fingerprint = from_str(obj.get("fingerprint")) - id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - nick = from_union([from_str, from_none], obj.get("nick")) - phone = from_union([from_str, from_none], obj.get("phone")) - preferences = from_union([from_str, from_none], obj.get("preferences")) - updated_at = from_float(obj.get("updatedAt")) - verified_at = from_union([from_float, from_none], obj.get("verifiedAt")) - return ContactsExportResponseItem(created_at, description, email, fingerprint, id, meta, name, nick, phone, preferences, updated_at, verified_at) + return SpaceUpdateRequest(alias, blueprint_id, contact_id, description, meta, name) def to_dict(self) -> dict: result: dict = {} - result["createdAt"] = to_float(self.created_at) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.email is not None: - result["email"] = from_union([from_str, from_none], self.email) - result["fingerprint"] = from_str(self.fingerprint) - result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.nick is not None: - result["nick"] = from_union([from_str, from_none], self.nick) - if self.phone is not None: - result["phone"] = from_union([from_str, from_none], self.phone) - if self.preferences is not None: - result["preferences"] = from_union([from_str, from_none], self.preferences) - result["updatedAt"] = to_float(self.updated_at) - if self.verified_at is not None: - result["verifiedAt"] = from_union([to_float, from_none], self.verified_at) return result -class ContactsExportResponse: - cursor: str - """Cursor for fetching the next page""" +class SpaceUpdateResponse: + id: str + """The ID of the updated space""" - items: List[ContactsExportResponseItem] + def __init__(self, id: str) -> None: + self.id = id - def __init__(self, cursor: str, items: List[ContactsExportResponseItem]) -> None: - self.cursor = cursor - self.items = items + @staticmethod + def from_dict(obj: Any) -> 'SpaceUpdateResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return SpaceUpdateResponse(id) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result + + +class SpaceFetchParams: + space_id: str + """The ID of the space to retrieve""" + + def __init__(self, space_id: str) -> None: + self.space_id = space_id @staticmethod - def from_dict(obj: Any) -> 'ContactsExportResponse': + def from_dict(obj: Any) -> 'SpaceFetchParams': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(ContactsExportResponseItem.from_dict, obj.get("items")) - return ContactsExportResponse(cursor, items) + space_id = from_str(obj.get("spaceId")) + return SpaceFetchParams(space_id) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(ContactsExportResponseItem, x), self.items) + result["spaceId"] = from_str(self.space_id) return result -class ContactsExportStreamItemData: - """Instance list properties""" +class SpaceFetchResponse: + """Blueprint properties""" + + alias: Optional[str] + """The unique alias for the instance""" + + blueprint_id: Optional[str] + """The ID of the blueprint""" + + contact_id: Optional[str] + """The contact associated with the space""" created_at: float """The timestamp (ms) when the instance was created""" @@ -6378,12 +6443,6 @@ class ContactsExportStreamItemData: description: Optional[str] """The associated description""" - email: Optional[str] - """The email address of the contact""" - - fingerprint: str - """The fingerprint of the contact""" - id: str """The instance ID""" @@ -6393,1667 +6452,1450 @@ class ContactsExportStreamItemData: name: Optional[str] """The associated name""" - nick: Optional[str] - """The nickname of the contact""" - - phone: Optional[str] - """The phone number of the contact""" - - preferences: Optional[str] - """The preferences of the contact""" - updated_at: float """The timestamp (ms) when the instance was updated""" - verified_at: Optional[float] - """The timestamp (ms) when the contact was verified""" - - def __init__(self, created_at: float, description: Optional[str], email: Optional[str], fingerprint: str, id: str, meta: Optional[Dict[str, Any]], name: Optional[str], nick: Optional[str], phone: Optional[str], preferences: Optional[str], updated_at: float, verified_at: Optional[float]) -> None: + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], contact_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.contact_id = contact_id self.created_at = created_at self.description = description - self.email = email - self.fingerprint = fingerprint self.id = id self.meta = meta self.name = name - self.nick = nick - self.phone = phone - self.preferences = preferences self.updated_at = updated_at - self.verified_at = verified_at @staticmethod - def from_dict(obj: Any) -> 'ContactsExportStreamItemData': + def from_dict(obj: Any) -> 'SpaceFetchResponse': assert isinstance(obj, dict) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - email = from_union([from_str, from_none], obj.get("email")) - fingerprint = from_str(obj.get("fingerprint")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - nick = from_union([from_str, from_none], obj.get("nick")) - phone = from_union([from_str, from_none], obj.get("phone")) - preferences = from_union([from_str, from_none], obj.get("preferences")) updated_at = from_float(obj.get("updatedAt")) - verified_at = from_union([from_float, from_none], obj.get("verifiedAt")) - return ContactsExportStreamItemData(created_at, description, email, fingerprint, id, meta, name, nick, phone, preferences, updated_at, verified_at) + return SpaceFetchResponse(alias, blueprint_id, contact_id, created_at, description, id, meta, name, updated_at) def to_dict(self) -> dict: result: dict = {} + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.email is not None: - result["email"] = from_union([from_str, from_none], self.email) - result["fingerprint"] = from_str(self.fingerprint) result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.nick is not None: - result["nick"] = from_union([from_str, from_none], self.nick) - if self.phone is not None: - result["phone"] = from_union([from_str, from_none], self.phone) - if self.preferences is not None: - result["preferences"] = from_union([from_str, from_none], self.preferences) result["updatedAt"] = to_float(self.updated_at) - if self.verified_at is not None: - result["verifiedAt"] = from_union([to_float, from_none], self.verified_at) return result -class ContactsExportStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - - -class ContactsExportStreamItem: - data: ContactsExportStreamItemData - """Instance list properties""" - - type: ContactsExportStreamItemType - """The type of event""" +class SpaceDeleteParams: + space_id: str + """The ID of the space to delete""" - def __init__(self, data: ContactsExportStreamItemData, type: ContactsExportStreamItemType) -> None: - self.data = data - self.type = type + def __init__(self, space_id: str) -> None: + self.space_id = space_id @staticmethod - def from_dict(obj: Any) -> 'ContactsExportStreamItem': + def from_dict(obj: Any) -> 'SpaceDeleteParams': assert isinstance(obj, dict) - data = ContactsExportStreamItemData.from_dict(obj.get("data")) - type = ContactsExportStreamItemType(obj.get("type")) - return ContactsExportStreamItem(data, type) + space_id = from_str(obj.get("spaceId")) + return SpaceDeleteParams(space_id) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(ContactsExportStreamItemData, self.data) - result["type"] = to_enum(ContactsExportStreamItemType, self.type) + result["spaceId"] = from_str(self.space_id) return result -class ContactListParamsOrder(Enum): - """The order of the paginated items""" +class SpaceDeleteResponse: + id: str + """The ID of the deleted space""" - ASC = "asc" - DESC = "desc" + def __init__(self, id: str) -> None: + self.id = id + @staticmethod + def from_dict(obj: Any) -> 'SpaceDeleteResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return SpaceDeleteResponse(id) -class ContactListParams: - cursor: Optional[str] - """The cursor to use for pagination""" + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" - order: Optional[ContactListParamsOrder] - """The order of the paginated items""" +class SpaceStoragePathUploadParams: + path: str + """The file path""" - take: Optional[int] - """The number of items to retrieve""" + space_id: str - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[ContactListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take + def __init__(self, path: str, space_id: str) -> None: + self.path = path + self.space_id = space_id @staticmethod - def from_dict(obj: Any) -> 'ContactListParams': + def from_dict(obj: Any) -> 'SpaceStoragePathUploadParams': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([ContactListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return ContactListParams(cursor, meta, order, take) + path = from_str(obj.get("path")) + space_id = from_str(obj.get("spaceId")) + return SpaceStoragePathUploadParams(path, space_id) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(ContactListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["path"] = from_str(self.path) + result["spaceId"] = from_str(self.space_id) return result -class ContactListResponseItem: - """Instance list properties""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - description: Optional[str] - """The associated description""" - - email: Optional[str] - """The email address of the contact""" - - fingerprint: str - """The fingerprint of the contact""" - - id: str - """The instance ID""" +class PurpleFile: + """The file definition to upload""" meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: Optional[str] - """The associated name""" - - nick: Optional[str] - """The nickname of the contact""" - - phone: Optional[str] - """The phone number of the contact""" - - preferences: Optional[str] - """The preferences of the contact""" + """Optional metadata""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + size: float + """The file size""" - verified_at: Optional[float] - """The timestamp (ms) when the contact was verified""" + type: str + """The file type""" - def __init__(self, created_at: float, description: Optional[str], email: Optional[str], fingerprint: str, id: str, meta: Optional[Dict[str, Any]], name: Optional[str], nick: Optional[str], phone: Optional[str], preferences: Optional[str], updated_at: float, verified_at: Optional[float]) -> None: - self.created_at = created_at - self.description = description - self.email = email - self.fingerprint = fingerprint - self.id = id + def __init__(self, meta: Optional[Dict[str, Any]], size: float, type: str) -> None: self.meta = meta - self.name = name - self.nick = nick - self.phone = phone - self.preferences = preferences - self.updated_at = updated_at - self.verified_at = verified_at + self.size = size + self.type = type @staticmethod - def from_dict(obj: Any) -> 'ContactListResponseItem': + def from_dict(obj: Any) -> 'PurpleFile': assert isinstance(obj, dict) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - email = from_union([from_str, from_none], obj.get("email")) - fingerprint = from_str(obj.get("fingerprint")) - id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - nick = from_union([from_str, from_none], obj.get("nick")) - phone = from_union([from_str, from_none], obj.get("phone")) - preferences = from_union([from_str, from_none], obj.get("preferences")) - updated_at = from_float(obj.get("updatedAt")) - verified_at = from_union([from_float, from_none], obj.get("verifiedAt")) - return ContactListResponseItem(created_at, description, email, fingerprint, id, meta, name, nick, phone, preferences, updated_at, verified_at) + size = from_float(obj.get("size")) + type = from_str(obj.get("type")) + return PurpleFile(meta, size, type) def to_dict(self) -> dict: result: dict = {} - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.email is not None: - result["email"] = from_union([from_str, from_none], self.email) - result["fingerprint"] = from_str(self.fingerprint) - result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.nick is not None: - result["nick"] = from_union([from_str, from_none], self.nick) - if self.phone is not None: - result["phone"] = from_union([from_str, from_none], self.phone) - if self.preferences is not None: - result["preferences"] = from_union([from_str, from_none], self.preferences) - result["updatedAt"] = to_float(self.updated_at) - if self.verified_at is not None: - result["verifiedAt"] = from_union([to_float, from_none], self.verified_at) + result["size"] = to_float(self.size) + result["type"] = from_str(self.type) return result -class ContactListResponse: - cursor: str - """Cursor for fetching the next page""" - - items: List[ContactListResponseItem] +class SpaceStoragePathUploadRequest: + file: Union[str, PurpleFile] + """The file to upload either as http: or data: URL + + The file definition to upload + """ - def __init__(self, cursor: str, items: List[ContactListResponseItem]) -> None: - self.cursor = cursor - self.items = items + def __init__(self, file: Union[str, PurpleFile]) -> None: + self.file = file @staticmethod - def from_dict(obj: Any) -> 'ContactListResponse': + def from_dict(obj: Any) -> 'SpaceStoragePathUploadRequest': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(ContactListResponseItem.from_dict, obj.get("items")) - return ContactListResponse(cursor, items) + file = from_union([from_str, PurpleFile.from_dict], obj.get("file")) + return SpaceStoragePathUploadRequest(file) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(ContactListResponseItem, x), self.items) + result["file"] = from_union([from_str, lambda x: to_class(PurpleFile, x)], self.file) return result -class ContactListStreamItemData: - """Instance list properties""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - description: Optional[str] - """The associated description""" +class SpaceStoragePathUploadResponseUploadRequest: + """The request required to upload the file""" - email: Optional[str] - """The email address of the contact""" + headers: Dict[str, Any] + """The HTTP headers to use""" - fingerprint: str - """The fingerprint of the contact""" + method: str + """The HTTP method to use""" - id: str - """The instance ID""" + url: str + """The HTTP url to use""" - meta: Optional[Dict[str, Any]] - """Meta data information""" + def __init__(self, headers: Dict[str, Any], method: str, url: str) -> None: + self.headers = headers + self.method = method + self.url = url - name: Optional[str] - """The associated name""" + @staticmethod + def from_dict(obj: Any) -> 'SpaceStoragePathUploadResponseUploadRequest': + assert isinstance(obj, dict) + headers = from_dict(lambda x: x, obj.get("headers")) + method = from_str(obj.get("method")) + url = from_str(obj.get("url")) + return SpaceStoragePathUploadResponseUploadRequest(headers, method, url) - nick: Optional[str] - """The nickname of the contact""" + def to_dict(self) -> dict: + result: dict = {} + result["headers"] = from_dict(lambda x: x, self.headers) + result["method"] = from_str(self.method) + result["url"] = from_str(self.url) + return result - phone: Optional[str] - """The phone number of the contact""" - preferences: Optional[str] - """The preferences of the contact""" +class SpaceStoragePathUploadResponse: + id: str + """The ID of the uploaded file""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + path: str + """The path where the file is stored""" - verified_at: Optional[float] - """The timestamp (ms) when the contact was verified""" + upload_request: Optional[SpaceStoragePathUploadResponseUploadRequest] + """The request required to upload the file""" - def __init__(self, created_at: float, description: Optional[str], email: Optional[str], fingerprint: str, id: str, meta: Optional[Dict[str, Any]], name: Optional[str], nick: Optional[str], phone: Optional[str], preferences: Optional[str], updated_at: float, verified_at: Optional[float]) -> None: - self.created_at = created_at - self.description = description - self.email = email - self.fingerprint = fingerprint + def __init__(self, id: str, path: str, upload_request: Optional[SpaceStoragePathUploadResponseUploadRequest]) -> None: self.id = id - self.meta = meta - self.name = name - self.nick = nick - self.phone = phone - self.preferences = preferences - self.updated_at = updated_at - self.verified_at = verified_at + self.path = path + self.upload_request = upload_request @staticmethod - def from_dict(obj: Any) -> 'ContactListStreamItemData': + def from_dict(obj: Any) -> 'SpaceStoragePathUploadResponse': assert isinstance(obj, dict) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - email = from_union([from_str, from_none], obj.get("email")) - fingerprint = from_str(obj.get("fingerprint")) id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - nick = from_union([from_str, from_none], obj.get("nick")) - phone = from_union([from_str, from_none], obj.get("phone")) - preferences = from_union([from_str, from_none], obj.get("preferences")) - updated_at = from_float(obj.get("updatedAt")) - verified_at = from_union([from_float, from_none], obj.get("verifiedAt")) - return ContactListStreamItemData(created_at, description, email, fingerprint, id, meta, name, nick, phone, preferences, updated_at, verified_at) + path = from_str(obj.get("path")) + upload_request = from_union([SpaceStoragePathUploadResponseUploadRequest.from_dict, from_none], obj.get("uploadRequest")) + return SpaceStoragePathUploadResponse(id, path, upload_request) def to_dict(self) -> dict: result: dict = {} - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.email is not None: - result["email"] = from_union([from_str, from_none], self.email) - result["fingerprint"] = from_str(self.fingerprint) result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.nick is not None: - result["nick"] = from_union([from_str, from_none], self.nick) - if self.phone is not None: - result["phone"] = from_union([from_str, from_none], self.phone) - if self.preferences is not None: - result["preferences"] = from_union([from_str, from_none], self.preferences) - result["updatedAt"] = to_float(self.updated_at) - if self.verified_at is not None: - result["verifiedAt"] = from_union([to_float, from_none], self.verified_at) + result["path"] = from_str(self.path) + if self.upload_request is not None: + result["uploadRequest"] = from_union([lambda x: to_class(SpaceStoragePathUploadResponseUploadRequest, x), from_none], self.upload_request) return result -class ContactListStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - - -class ContactListStreamItem: - data: ContactListStreamItemData - """Instance list properties""" +class SpaceStoragePathMoveParams: + path: str + """The source file path""" - type: ContactListStreamItemType - """The type of event""" + space_id: str + """The ID of the space""" - def __init__(self, data: ContactListStreamItemData, type: ContactListStreamItemType) -> None: - self.data = data - self.type = type + def __init__(self, path: str, space_id: str) -> None: + self.path = path + self.space_id = space_id @staticmethod - def from_dict(obj: Any) -> 'ContactListStreamItem': + def from_dict(obj: Any) -> 'SpaceStoragePathMoveParams': assert isinstance(obj, dict) - data = ContactListStreamItemData.from_dict(obj.get("data")) - type = ContactListStreamItemType(obj.get("type")) - return ContactListStreamItem(data, type) + path = from_str(obj.get("path")) + space_id = from_str(obj.get("spaceId")) + return SpaceStoragePathMoveParams(path, space_id) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(ContactListStreamItemData, self.data) - result["type"] = to_enum(ContactListStreamItemType, self.type) + result["path"] = from_str(self.path) + result["spaceId"] = from_str(self.space_id) return result -class ConversationAttachmentListParams: - conversation_id: str - """The ID of the conversation to list attachments for""" - - cursor: Optional[str] - """The cursor to use for pagination""" - - take: Optional[int] - """The number of items to retrieve""" +class SpaceStoragePathMoveRequest: + destination_path: str + """The destination file path""" - def __init__(self, conversation_id: str, cursor: Optional[str], take: Optional[int]) -> None: - self.conversation_id = conversation_id - self.cursor = cursor - self.take = take + def __init__(self, destination_path: str) -> None: + self.destination_path = destination_path @staticmethod - def from_dict(obj: Any) -> 'ConversationAttachmentListParams': + def from_dict(obj: Any) -> 'SpaceStoragePathMoveRequest': assert isinstance(obj, dict) - conversation_id = from_str(obj.get("conversationId")) - cursor = from_union([from_str, from_none], obj.get("cursor")) - take = from_union([from_int, from_none], obj.get("take")) - return ConversationAttachmentListParams(conversation_id, cursor, take) + destination_path = from_str(obj.get("destinationPath")) + return SpaceStoragePathMoveRequest(destination_path) def to_dict(self) -> dict: result: dict = {} - result["conversationId"] = from_str(self.conversation_id) - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["destinationPath"] = from_str(self.destination_path) return result -class ConversationAttachmentListResponseItem: - """Instance list properties""" - - created_at: float - """The timestamp (ms) when the instance was created""" +class SpaceStoragePathMoveResponse: + path: str + """The destination file path""" - description: Optional[str] - """The associated description""" + def __init__(self, path: str) -> None: + self.path = path - id: str - """The instance ID""" + @staticmethod + def from_dict(obj: Any) -> 'SpaceStoragePathMoveResponse': + assert isinstance(obj, dict) + path = from_str(obj.get("path")) + return SpaceStoragePathMoveResponse(path) - meta: Optional[Dict[str, Any]] - """Meta data information""" + def to_dict(self) -> dict: + result: dict = {} + result["path"] = from_str(self.path) + return result - name: Optional[str] - """The stored attachment file name""" - size: Optional[float] - """The attachment size in bytes""" +class SpaceStoragePathListParams: + path: Optional[str] + """The directory path (defaults to root)""" - type: Optional[str] - """The inferred attachment MIME type""" + recursive: Optional[bool] + """Whether to list files recursively""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + space_id: str + """The ID of the space""" - def __init__(self, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], size: Optional[float], type: Optional[str], updated_at: float) -> None: - self.created_at = created_at - self.description = description - self.id = id - self.meta = meta - self.name = name - self.size = size - self.type = type - self.updated_at = updated_at + def __init__(self, path: Optional[str], recursive: Optional[bool], space_id: str) -> None: + self.path = path + self.recursive = recursive + self.space_id = space_id @staticmethod - def from_dict(obj: Any) -> 'ConversationAttachmentListResponseItem': + def from_dict(obj: Any) -> 'SpaceStoragePathListParams': assert isinstance(obj, dict) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - size = from_union([from_float, from_none], obj.get("size")) - type = from_union([from_str, from_none], obj.get("type")) - updated_at = from_float(obj.get("updatedAt")) - return ConversationAttachmentListResponseItem(created_at, description, id, meta, name, size, type, updated_at) + path = from_union([from_str, from_none], obj.get("path")) + recursive = from_union([from_bool, from_none], obj.get("recursive")) + space_id = from_str(obj.get("spaceId")) + return SpaceStoragePathListParams(path, recursive, space_id) def to_dict(self) -> dict: result: dict = {} - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.size is not None: - result["size"] = from_union([to_float, from_none], self.size) - if self.type is not None: - result["type"] = from_union([from_str, from_none], self.type) - result["updatedAt"] = to_float(self.updated_at) + if self.path is not None: + result["path"] = from_union([from_str, from_none], self.path) + if self.recursive is not None: + result["recursive"] = from_union([from_bool, from_none], self.recursive) + result["spaceId"] = from_str(self.space_id) return result -class ConversationAttachmentListResponse: - cursor: str - """Cursor for fetching the next page""" - - items: List[ConversationAttachmentListResponseItem] - - def __init__(self, cursor: str, items: List[ConversationAttachmentListResponseItem]) -> None: - self.cursor = cursor - self.items = items +class SpaceStoragePathListResponseItem: + id: Optional[str] + """The ID of the file or directory""" - @staticmethod - def from_dict(obj: Any) -> 'ConversationAttachmentListResponse': - assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(ConversationAttachmentListResponseItem.from_dict, obj.get("items")) - return ConversationAttachmentListResponse(cursor, items) + is_directory: Optional[bool] + """Whether this is a directory""" - def to_dict(self) -> dict: - result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(ConversationAttachmentListResponseItem, x), self.items) - return result + path: Optional[str] + """The relative path of the file or directory""" + size: Optional[float] + """The size of the file in bytes (0 for directories)""" -class ConversationAttachmentUploadParams: - conversation_id: str + updated_at: Optional[float] + """The timestamp (ms) when the file was last modified""" - def __init__(self, conversation_id: str) -> None: - self.conversation_id = conversation_id + def __init__(self, id: Optional[str], is_directory: Optional[bool], path: Optional[str], size: Optional[float], updated_at: Optional[float]) -> None: + self.id = id + self.is_directory = is_directory + self.path = path + self.size = size + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'ConversationAttachmentUploadParams': + def from_dict(obj: Any) -> 'SpaceStoragePathListResponseItem': assert isinstance(obj, dict) - conversation_id = from_str(obj.get("conversationId")) - return ConversationAttachmentUploadParams(conversation_id) + id = from_union([from_str, from_none], obj.get("id")) + is_directory = from_union([from_bool, from_none], obj.get("isDirectory")) + path = from_union([from_str, from_none], obj.get("path")) + size = from_union([from_float, from_none], obj.get("size")) + updated_at = from_union([from_float, from_none], obj.get("updatedAt")) + return SpaceStoragePathListResponseItem(id, is_directory, path, size, updated_at) def to_dict(self) -> dict: result: dict = {} - result["conversationId"] = from_str(self.conversation_id) + if self.id is not None: + result["id"] = from_union([from_str, from_none], self.id) + if self.is_directory is not None: + result["isDirectory"] = from_union([from_bool, from_none], self.is_directory) + if self.path is not None: + result["path"] = from_union([from_str, from_none], self.path) + if self.size is not None: + result["size"] = from_union([to_float, from_none], self.size) + if self.updated_at is not None: + result["updatedAt"] = from_union([to_float, from_none], self.updated_at) return result -class PurpleFile: - """The file definition to upload""" - - name: Optional[str] - """The file name""" - - size: float - """The file size""" - - type: str - """The file type""" +class SpaceStoragePathListResponse: + items: List[SpaceStoragePathListResponseItem] + next_token: Optional[str] + """Token to use for next page of results""" - def __init__(self, name: Optional[str], size: float, type: str) -> None: - self.name = name - self.size = size - self.type = type + def __init__(self, items: List[SpaceStoragePathListResponseItem], next_token: Optional[str]) -> None: + self.items = items + self.next_token = next_token @staticmethod - def from_dict(obj: Any) -> 'PurpleFile': + def from_dict(obj: Any) -> 'SpaceStoragePathListResponse': assert isinstance(obj, dict) - name = from_union([from_str, from_none], obj.get("name")) - size = from_float(obj.get("size")) - type = from_str(obj.get("type")) - return PurpleFile(name, size, type) + items = from_list(SpaceStoragePathListResponseItem.from_dict, obj.get("items")) + next_token = from_union([from_str, from_none], obj.get("nextToken")) + return SpaceStoragePathListResponse(items, next_token) def to_dict(self) -> dict: result: dict = {} - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - result["size"] = to_float(self.size) - result["type"] = from_str(self.type) + result["items"] = from_list(lambda x: to_class(SpaceStoragePathListResponseItem, x), self.items) + if self.next_token is not None: + result["nextToken"] = from_union([from_str, from_none], self.next_token) return result -class ConversationAttachmentUploadRequest: - file: Union[str, PurpleFile] - """The file to upload either as http: or data: URL - - The file definition to upload - """ +class SpaceStoragePathDownloadParams: + path: str + """The file path""" - def __init__(self, file: Union[str, PurpleFile]) -> None: - self.file = file + space_id: str + """The ID of the space""" + + def __init__(self, path: str, space_id: str) -> None: + self.path = path + self.space_id = space_id @staticmethod - def from_dict(obj: Any) -> 'ConversationAttachmentUploadRequest': + def from_dict(obj: Any) -> 'SpaceStoragePathDownloadParams': assert isinstance(obj, dict) - file = from_union([from_str, PurpleFile.from_dict], obj.get("file")) - return ConversationAttachmentUploadRequest(file) + path = from_str(obj.get("path")) + space_id = from_str(obj.get("spaceId")) + return SpaceStoragePathDownloadParams(path, space_id) def to_dict(self) -> dict: result: dict = {} - result["file"] = from_union([from_str, lambda x: to_class(PurpleFile, x)], self.file) + result["path"] = from_str(self.path) + result["spaceId"] = from_str(self.space_id) return result -class ConversationAttachmentUploadResponseUploadRequest: - """The request required to upload the file""" - - headers: Dict[str, Any] - """The HTTP headers to use""" - - method: str - """The HTTP method to use""" +class SpaceStoragePathDownloadResponse: + id: str + """The ID of the file""" url: str - """The HTTP url to use""" + """The presigned URL to download the file""" - def __init__(self, headers: Dict[str, Any], method: str, url: str) -> None: - self.headers = headers - self.method = method + def __init__(self, id: str, url: str) -> None: + self.id = id self.url = url @staticmethod - def from_dict(obj: Any) -> 'ConversationAttachmentUploadResponseUploadRequest': + def from_dict(obj: Any) -> 'SpaceStoragePathDownloadResponse': assert isinstance(obj, dict) - headers = from_dict(lambda x: x, obj.get("headers")) - method = from_str(obj.get("method")) + id = from_str(obj.get("id")) url = from_str(obj.get("url")) - return ConversationAttachmentUploadResponseUploadRequest(headers, method, url) + return SpaceStoragePathDownloadResponse(id, url) def to_dict(self) -> dict: result: dict = {} - result["headers"] = from_dict(lambda x: x, self.headers) - result["method"] = from_str(self.method) + result["id"] = from_str(self.id) result["url"] = from_str(self.url) return result -class ConversationAttachmentUploadResponse: - id: str - """The ID of the upload file""" - - name: Optional[str] - """The name of the uploaded file""" +class SpaceStoragePathDeleteParams: + path: str + """The file or directory path""" - upload_request: Optional[ConversationAttachmentUploadResponseUploadRequest] - """The request required to upload the file""" + space_id: str + """The ID of the space""" - def __init__(self, id: str, name: Optional[str], upload_request: Optional[ConversationAttachmentUploadResponseUploadRequest]) -> None: - self.id = id - self.name = name - self.upload_request = upload_request + def __init__(self, path: str, space_id: str) -> None: + self.path = path + self.space_id = space_id @staticmethod - def from_dict(obj: Any) -> 'ConversationAttachmentUploadResponse': + def from_dict(obj: Any) -> 'SpaceStoragePathDeleteParams': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - name = from_union([from_str, from_none], obj.get("name")) - upload_request = from_union([ConversationAttachmentUploadResponseUploadRequest.from_dict, from_none], obj.get("uploadRequest")) - return ConversationAttachmentUploadResponse(id, name, upload_request) + path = from_str(obj.get("path")) + space_id = from_str(obj.get("spaceId")) + return SpaceStoragePathDeleteParams(path, space_id) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.upload_request is not None: - result["uploadRequest"] = from_union([lambda x: to_class(ConversationAttachmentUploadResponseUploadRequest, x), from_none], self.upload_request) + result["path"] = from_str(self.path) + result["spaceId"] = from_str(self.space_id) return result -class ConversationChannelSubscribeRequest: - history_length: Optional[int] - """Number of recent monitor events to replay before following - live, so a console opening mid-conversation can catch up. - """ +class SpaceStoragePathDeleteRequest: + recursive: Optional[bool] + """Whether to delete directory contents recursively""" - def __init__(self, history_length: Optional[int]) -> None: - self.history_length = history_length + def __init__(self, recursive: Optional[bool]) -> None: + self.recursive = recursive @staticmethod - def from_dict(obj: Any) -> 'ConversationChannelSubscribeRequest': + def from_dict(obj: Any) -> 'SpaceStoragePathDeleteRequest': assert isinstance(obj, dict) - history_length = from_union([from_int, from_none], obj.get("historyLength")) - return ConversationChannelSubscribeRequest(history_length) + recursive = from_union([from_bool, from_none], obj.get("recursive")) + return SpaceStoragePathDeleteRequest(recursive) def to_dict(self) -> dict: result: dict = {} - if self.history_length is not None: - result["historyLength"] = from_union([from_int, from_none], self.history_length) + if self.recursive is not None: + result["recursive"] = from_union([from_bool, from_none], self.recursive) return result -class ConversationChannelSubscribeStreamItemType(Enum): - """The type of event""" - - MESSAGE = "message" - - -class ConversationChannelSubscribeStreamItem: - data: Dict[str, Any] - """The monitor event published to the channel""" - - type: ConversationChannelSubscribeStreamItemType - """The type of event""" +class SpaceStoragePathDeleteResponse: + path: str + """The deleted file or directory path""" - def __init__(self, data: Dict[str, Any], type: ConversationChannelSubscribeStreamItemType) -> None: - self.data = data - self.type = type + def __init__(self, path: str) -> None: + self.path = path @staticmethod - def from_dict(obj: Any) -> 'ConversationChannelSubscribeStreamItem': + def from_dict(obj: Any) -> 'SpaceStoragePathDeleteResponse': assert isinstance(obj, dict) - data = from_dict(lambda x: x, obj.get("data")) - type = ConversationChannelSubscribeStreamItemType(obj.get("type")) - return ConversationChannelSubscribeStreamItem(data, type) + path = from_str(obj.get("path")) + return SpaceStoragePathDeleteResponse(path) def to_dict(self) -> dict: result: dict = {} - result["data"] = from_dict(lambda x: x, self.data) - result["type"] = to_enum(ConversationChannelSubscribeStreamItemType, self.type) + result["path"] = from_str(self.path) return result -class ConversationCompactParams: - conversation_id: str - """The ID of the conversation to compact""" +class SpaceStoragePathCopyParams: + path: str + """The source file path""" - def __init__(self, conversation_id: str) -> None: - self.conversation_id = conversation_id + space_id: str + """The ID of the space""" + + def __init__(self, path: str, space_id: str) -> None: + self.path = path + self.space_id = space_id @staticmethod - def from_dict(obj: Any) -> 'ConversationCompactParams': + def from_dict(obj: Any) -> 'SpaceStoragePathCopyParams': assert isinstance(obj, dict) - conversation_id = from_str(obj.get("conversationId")) - return ConversationCompactParams(conversation_id) + path = from_str(obj.get("path")) + space_id = from_str(obj.get("spaceId")) + return SpaceStoragePathCopyParams(path, space_id) def to_dict(self) -> dict: result: dict = {} - result["conversationId"] = from_str(self.conversation_id) + result["path"] = from_str(self.path) + result["spaceId"] = from_str(self.space_id) return result -class ConversationCompactResponseUsage: - """Usage information""" - - token: float - """The tokens used in this exchange""" +class SpaceStoragePathCopyRequest: + destination_path: str + """The destination file path""" - def __init__(self, token: float) -> None: - self.token = token + def __init__(self, destination_path: str) -> None: + self.destination_path = destination_path @staticmethod - def from_dict(obj: Any) -> 'ConversationCompactResponseUsage': + def from_dict(obj: Any) -> 'SpaceStoragePathCopyRequest': assert isinstance(obj, dict) - token = from_float(obj.get("token")) - return ConversationCompactResponseUsage(token) + destination_path = from_str(obj.get("destinationPath")) + return SpaceStoragePathCopyRequest(destination_path) def to_dict(self) -> dict: result: dict = {} - result["token"] = to_float(self.token) + result["destinationPath"] = from_str(self.destination_path) return result -class ConversationCompactResponse: - id: str - """The ID of the created checkpoint message, or the conversation ID if there was nothing to - compact - """ - text: str - """The compacted text of the messages, or an empty string if there was nothing to compact""" - - usage: ConversationCompactResponseUsage - """Usage information""" +class SpaceStoragePathCopyResponse: + path: str + """The destination file path""" - def __init__(self, id: str, text: str, usage: ConversationCompactResponseUsage) -> None: - self.id = id - self.text = text - self.usage = usage + def __init__(self, path: str) -> None: + self.path = path @staticmethod - def from_dict(obj: Any) -> 'ConversationCompactResponse': + def from_dict(obj: Any) -> 'SpaceStoragePathCopyResponse': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - text = from_str(obj.get("text")) - usage = ConversationCompactResponseUsage.from_dict(obj.get("usage")) - return ConversationCompactResponse(id, text, usage) + path = from_str(obj.get("path")) + return SpaceStoragePathCopyResponse(path) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) - result["text"] = from_str(self.text) - result["usage"] = to_class(ConversationCompactResponseUsage, self.usage) + result["path"] = from_str(self.path) return result -class ConversationMessageCompleteParams: - conversation_id: str - """The ID of the conversation to receive message from""" - - def __init__(self, conversation_id: str) -> None: - self.conversation_id = conversation_id +class SpaceSiteListParamsOrder(Enum): + """The order of the paginated items""" - @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageCompleteParams': - assert isinstance(obj, dict) - conversation_id = from_str(obj.get("conversationId")) - return ConversationMessageCompleteParams(conversation_id) + ASC = "asc" + DESC = "desc" - def to_dict(self) -> dict: - result: dict = {} - result["conversationId"] = from_str(self.conversation_id) - return result +class SpaceSiteListParams: + cursor: Optional[str] + """The cursor to use for pagination""" -class PurpleReplacement: - begin: float - """Start offset""" + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the sites by metadata""" - end: float - """End offset""" + order: Optional[SpaceSiteListParamsOrder] + """The order of the paginated items""" - text: str - """The text value of the replacement""" + space_id: str + take: Optional[int] + """The number of items to retrieve""" - def __init__(self, begin: float, end: float, text: str) -> None: - self.begin = begin - self.end = end - self.text = text + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[SpaceSiteListParamsOrder], space_id: str, take: Optional[int]) -> None: + self.cursor = cursor + self.meta = meta + self.order = order + self.space_id = space_id + self.take = take @staticmethod - def from_dict(obj: Any) -> 'PurpleReplacement': + def from_dict(obj: Any) -> 'SpaceSiteListParams': assert isinstance(obj, dict) - begin = from_float(obj.get("begin")) - end = from_float(obj.get("end")) - text = from_str(obj.get("text")) - return PurpleReplacement(begin, end, text) + cursor = from_union([from_str, from_none], obj.get("cursor")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([SpaceSiteListParamsOrder, from_none], obj.get("order")) + space_id = from_str(obj.get("spaceId")) + take = from_union([from_int, from_none], obj.get("take")) + return SpaceSiteListParams(cursor, meta, order, space_id, take) def to_dict(self) -> dict: result: dict = {} - result["begin"] = to_float(self.begin) - result["end"] = to_float(self.end) - result["text"] = from_str(self.text) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(SpaceSiteListParamsOrder, x), from_none], self.order) + result["spaceId"] = from_str(self.space_id) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class ConversationMessageCompleteRequestEntity: - """Extracted entity from the message""" +class SpaceSiteListResponseItem: + """Instance list properties""" - begin: float - """Start offset""" + alias: Optional[str] + """The unique alias for the instance""" - end: float - """End offset""" + created_at: float + """The timestamp (ms) when the instance was created""" - replacement: Optional[PurpleReplacement] - text: str - """The text value of the entity""" + description: Optional[str] + """The associated description""" - type: str - """The entity type""" + id: str + """The instance ID""" - def __init__(self, begin: float, end: float, replacement: Optional[PurpleReplacement], text: str, type: str) -> None: - self.begin = begin - self.end = end - self.replacement = replacement - self.text = text - self.type = type + index: Optional[str] + """Directory index filename""" - @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageCompleteRequestEntity': - assert isinstance(obj, dict) - begin = from_float(obj.get("begin")) - end = from_float(obj.get("end")) - replacement = from_union([PurpleReplacement.from_dict, from_none], obj.get("replacement")) - text = from_str(obj.get("text")) - type = from_str(obj.get("type")) - return ConversationMessageCompleteRequestEntity(begin, end, replacement, text, type) + meta: Optional[Dict[str, Any]] + """Meta data information""" - def to_dict(self) -> dict: - result: dict = {} - result["begin"] = to_float(self.begin) - result["end"] = to_float(self.end) - if self.replacement is not None: - result["replacement"] = from_union([lambda x: to_class(PurpleReplacement, x), from_none], self.replacement) - result["text"] = from_str(self.text) - result["type"] = from_str(self.type) - return result + name: Optional[str] + """The associated name""" + not_found: Optional[str] + """Not found filename""" -class PurpleRecord: - meta: Optional[Dict[str, Any]] - """Additional metadata for the record""" + prefix: Optional[str] + """The folder prefix inside the space""" - text: str - """The text content of the record""" + slug: Optional[str] + """The subdomain slug of the site""" - def __init__(self, meta: Optional[Dict[str, Any]], text: str) -> None: + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, alias: Optional[str], created_at: float, description: Optional[str], id: str, index: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], not_found: Optional[str], prefix: Optional[str], slug: Optional[str], updated_at: float) -> None: + self.alias = alias + self.created_at = created_at + self.description = description + self.id = id + self.index = index self.meta = meta - self.text = text + self.name = name + self.not_found = not_found + self.prefix = prefix + self.slug = slug + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'PurpleRecord': + def from_dict(obj: Any) -> 'SpaceSiteListResponseItem': assert isinstance(obj, dict) + alias = from_union([from_str, from_none], obj.get("alias")) + created_at = from_float(obj.get("createdAt")) + description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) + index = from_union([from_str, from_none], obj.get("index")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - text = from_str(obj.get("text")) - return PurpleRecord(meta, text) + name = from_union([from_str, from_none], obj.get("name")) + not_found = from_union([from_str, from_none], obj.get("notFound")) + prefix = from_union([from_str, from_none], obj.get("prefix")) + slug = from_union([from_str, from_none], obj.get("slug")) + updated_at = from_float(obj.get("updatedAt")) + return SpaceSiteListResponseItem(alias, created_at, description, id, index, meta, name, not_found, prefix, slug, updated_at) def to_dict(self) -> dict: result: dict = {} + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + result["createdAt"] = to_float(self.created_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) + if self.index is not None: + result["index"] = from_union([from_str, from_none], self.index) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["text"] = from_str(self.text) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.not_found is not None: + result["notFound"] = from_union([from_str, from_none], self.not_found) + if self.prefix is not None: + result["prefix"] = from_union([from_str, from_none], self.prefix) + if self.slug is not None: + result["slug"] = from_union([from_str, from_none], self.slug) + result["updatedAt"] = to_float(self.updated_at) return result -class PurpleDataset: - description: Optional[str] - """The description of the dataset""" - - name: Optional[str] - """The name of the dataset""" +class SpaceSiteListResponse: + cursor: str + """Cursor for fetching the next page""" - records: List[PurpleRecord] - """The records in the dataset""" + items: List[SpaceSiteListResponseItem] - def __init__(self, description: Optional[str], name: Optional[str], records: List[PurpleRecord]) -> None: + def __init__(self, cursor: str, items: List[SpaceSiteListResponseItem]) -> None: + self.cursor = cursor + self.items = items + + @staticmethod + def from_dict(obj: Any) -> 'SpaceSiteListResponse': + assert isinstance(obj, dict) + cursor = from_str(obj.get("cursor")) + items = from_list(SpaceSiteListResponseItem.from_dict, obj.get("items")) + return SpaceSiteListResponse(cursor, items) + + def to_dict(self) -> dict: + result: dict = {} + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(SpaceSiteListResponseItem, x), self.items) + return result + + +class SpaceSiteListStreamItemData: + """Instance list properties""" + + alias: Optional[str] + """The unique alias for the instance""" + + created_at: float + """The timestamp (ms) when the instance was created""" + + description: Optional[str] + """The associated description""" + + id: str + """The instance ID""" + + index: Optional[str] + """Directory index filename""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" + + name: Optional[str] + """The associated name""" + + not_found: Optional[str] + """Not found filename""" + + prefix: Optional[str] + """The folder prefix inside the space""" + + slug: Optional[str] + """The subdomain slug of the site""" + + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, alias: Optional[str], created_at: float, description: Optional[str], id: str, index: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], not_found: Optional[str], prefix: Optional[str], slug: Optional[str], updated_at: float) -> None: + self.alias = alias + self.created_at = created_at self.description = description + self.id = id + self.index = index + self.meta = meta self.name = name - self.records = records + self.not_found = not_found + self.prefix = prefix + self.slug = slug + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'PurpleDataset': + def from_dict(obj: Any) -> 'SpaceSiteListStreamItemData': assert isinstance(obj, dict) + alias = from_union([from_str, from_none], obj.get("alias")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) + index = from_union([from_str, from_none], obj.get("index")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - records = from_list(PurpleRecord.from_dict, obj.get("records")) - return PurpleDataset(description, name, records) + not_found = from_union([from_str, from_none], obj.get("notFound")) + prefix = from_union([from_str, from_none], obj.get("prefix")) + slug = from_union([from_str, from_none], obj.get("slug")) + updated_at = from_float(obj.get("updatedAt")) + return SpaceSiteListStreamItemData(alias, created_at, description, id, index, meta, name, not_found, prefix, slug, updated_at) def to_dict(self) -> dict: result: dict = {} + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) + if self.index is not None: + result["index"] = from_union([from_str, from_none], self.index) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - result["records"] = from_list(lambda x: to_class(PurpleRecord, x), self.records) + if self.not_found is not None: + result["notFound"] = from_union([from_str, from_none], self.not_found) + if self.prefix is not None: + result["prefix"] = from_union([from_str, from_none], self.prefix) + if self.slug is not None: + result["slug"] = from_union([from_str, from_none], self.slug) + result["updatedAt"] = to_float(self.updated_at) return result -class PurpleFeature: - name: str - """The name of the feature to enable""" +class SpaceSiteListStreamItemType(Enum): + """The type of event""" - options: Optional[Dict[str, Any]] - """Optional configuration options for the feature""" + ITEM = "item" - def __init__(self, name: str, options: Optional[Dict[str, Any]]) -> None: - self.name = name - self.options = options + +class SpaceSiteListStreamItem: + data: SpaceSiteListStreamItemData + """Instance list properties""" + + type: SpaceSiteListStreamItemType + """The type of event""" + + def __init__(self, data: SpaceSiteListStreamItemData, type: SpaceSiteListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'PurpleFeature': + def from_dict(obj: Any) -> 'SpaceSiteListStreamItem': assert isinstance(obj, dict) - name = from_str(obj.get("name")) - options = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("options")) - return PurpleFeature(name, options) + data = SpaceSiteListStreamItemData.from_dict(obj.get("data")) + type = SpaceSiteListStreamItemType(obj.get("type")) + return SpaceSiteListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["name"] = from_str(self.name) - if self.options is not None: - result["options"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.options) + result["data"] = to_class(SpaceSiteListStreamItemData, self.data) + result["type"] = to_enum(SpaceSiteListStreamItemType, self.type) return result -class PurpleAbility: - description: str - """The description of the ability""" - - instruction: str - """The instruction for the ability""" - - meta: Optional[Dict[str, Any]] - """Additional metadata for the ability""" - - name: str - """The name of the ability""" - - secret_id: Optional[str] - """Optional secret ID for the ability""" +class SpaceSiteCreateParams: + space_id: str - def __init__(self, description: str, instruction: str, meta: Optional[Dict[str, Any]], name: str, secret_id: Optional[str]) -> None: - self.description = description - self.instruction = instruction - self.meta = meta - self.name = name - self.secret_id = secret_id + def __init__(self, space_id: str) -> None: + self.space_id = space_id @staticmethod - def from_dict(obj: Any) -> 'PurpleAbility': + def from_dict(obj: Any) -> 'SpaceSiteCreateParams': assert isinstance(obj, dict) - description = from_str(obj.get("description")) - instruction = from_str(obj.get("instruction")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - secret_id = from_union([from_str, from_none], obj.get("secretId")) - return PurpleAbility(description, instruction, meta, name, secret_id) + space_id = from_str(obj.get("spaceId")) + return SpaceSiteCreateParams(space_id) def to_dict(self) -> dict: result: dict = {} - result["description"] = from_str(self.description) - result["instruction"] = from_str(self.instruction) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - if self.secret_id is not None: - result["secretId"] = from_union([from_str, from_none], self.secret_id) + result["spaceId"] = from_str(self.space_id) return result -class PurpleSkillset: - abilities: List[PurpleAbility] - """The abilities in the skillset""" +class SpaceSiteCreateRequest: + """Instance crud properties""" + + alias: Optional[str] + """The unique alias for the instance""" description: Optional[str] - """The description of the skillset""" + """The associated description""" + + index: Optional[str] + """Directory index filename""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" name: Optional[str] - """The name of the skillset""" + """The associated name""" - def __init__(self, abilities: List[PurpleAbility], description: Optional[str], name: Optional[str]) -> None: - self.abilities = abilities + not_found: Optional[str] + """Not found filename""" + + prefix: Optional[str] + """Optional folder prefix inside the space to serve from""" + + slug: str + """The subdomain slug beneath the configured space apex""" + + def __init__(self, alias: Optional[str], description: Optional[str], index: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], not_found: Optional[str], prefix: Optional[str], slug: str) -> None: + self.alias = alias self.description = description + self.index = index + self.meta = meta self.name = name + self.not_found = not_found + self.prefix = prefix + self.slug = slug @staticmethod - def from_dict(obj: Any) -> 'PurpleSkillset': + def from_dict(obj: Any) -> 'SpaceSiteCreateRequest': assert isinstance(obj, dict) - abilities = from_list(PurpleAbility.from_dict, obj.get("abilities")) + alias = from_union([from_str, from_none], obj.get("alias")) description = from_union([from_str, from_none], obj.get("description")) + index = from_union([from_str, from_none], obj.get("index")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - return PurpleSkillset(abilities, description, name) + not_found = from_union([from_str, from_none], obj.get("notFound")) + prefix = from_union([from_str, from_none], obj.get("prefix")) + slug = from_str(obj.get("slug")) + return SpaceSiteCreateRequest(alias, description, index, meta, name, not_found, prefix, slug) def to_dict(self) -> dict: result: dict = {} - result["abilities"] = from_list(lambda x: to_class(PurpleAbility, x), self.abilities) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.index is not None: + result["index"] = from_union([from_str, from_none], self.index) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.not_found is not None: + result["notFound"] = from_union([from_str, from_none], self.not_found) + if self.prefix is not None: + result["prefix"] = from_union([from_str, from_none], self.prefix) + result["slug"] = from_str(self.slug) return result -class ConversationMessageCompleteRequestExtensions: - """Extensions to enhance the bot's capabilities""" - - backstory: Optional[str] - """Additional backstory for the bot""" - - datasets: Optional[List[PurpleDataset]] - """Inline datasets to provide additional context""" - - features: Optional[List[PurpleFeature]] - """Feature flags to enable specific bot capabilities""" - - skillsets: Optional[List[PurpleSkillset]] - """Inline skillsets to provide additional abilities""" +class SpaceSiteCreateResponse: + id: str + """The ID of the created site""" - def __init__(self, backstory: Optional[str], datasets: Optional[List[PurpleDataset]], features: Optional[List[PurpleFeature]], skillsets: Optional[List[PurpleSkillset]]) -> None: - self.backstory = backstory - self.datasets = datasets - self.features = features - self.skillsets = skillsets + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageCompleteRequestExtensions': + def from_dict(obj: Any) -> 'SpaceSiteCreateResponse': assert isinstance(obj, dict) - backstory = from_union([from_str, from_none], obj.get("backstory")) - datasets = from_union([lambda x: from_list(PurpleDataset.from_dict, x), from_none], obj.get("datasets")) - features = from_union([lambda x: from_list(PurpleFeature.from_dict, x), from_none], obj.get("features")) - skillsets = from_union([lambda x: from_list(PurpleSkillset.from_dict, x), from_none], obj.get("skillsets")) - return ConversationMessageCompleteRequestExtensions(backstory, datasets, features, skillsets) + id = from_str(obj.get("id")) + return SpaceSiteCreateResponse(id) def to_dict(self) -> dict: result: dict = {} - if self.backstory is not None: - result["backstory"] = from_union([from_str, from_none], self.backstory) - if self.datasets is not None: - result["datasets"] = from_union([lambda x: from_list(lambda x: to_class(PurpleDataset, x), x), from_none], self.datasets) - if self.features is not None: - result["features"] = from_union([lambda x: from_list(lambda x: to_class(PurpleFeature, x), x), from_none], self.features) - if self.skillsets is not None: - result["skillsets"] = from_union([lambda x: from_list(lambda x: to_class(PurpleSkillset, x), x), from_none], self.skillsets) + result["id"] = from_str(self.id) return result -class PurpleCall: - """Configuration for when this function should be automatically called""" - - end: Optional[bool] - """If true, this function will be force-called at the end of the conversation""" - - start: Optional[bool] - """If true, this function will be force-called at the start of the conversation""" +class SpaceSiteUpdateParams: + site_id: str + space_id: str - def __init__(self, end: Optional[bool], start: Optional[bool]) -> None: - self.end = end - self.start = start + def __init__(self, site_id: str, space_id: str) -> None: + self.site_id = site_id + self.space_id = space_id @staticmethod - def from_dict(obj: Any) -> 'PurpleCall': + def from_dict(obj: Any) -> 'SpaceSiteUpdateParams': assert isinstance(obj, dict) - end = from_union([from_bool, from_none], obj.get("end")) - start = from_union([from_bool, from_none], obj.get("start")) - return PurpleCall(end, start) + site_id = from_str(obj.get("siteId")) + space_id = from_str(obj.get("spaceId")) + return SpaceSiteUpdateParams(site_id, space_id) def to_dict(self) -> dict: result: dict = {} - if self.end is not None: - result["end"] = from_union([from_bool, from_none], self.end) - if self.start is not None: - result["start"] = from_union([from_bool, from_none], self.start) + result["siteId"] = from_str(self.site_id) + result["spaceId"] = from_str(self.space_id) return result -class StickyType(Enum): - """The schema type, must be "object\"""" +class SpaceSiteUpdateRequest: + """Instance crud properties""" - OBJECT = "object" + alias: Optional[str] + """The unique alias for the instance""" + description: Optional[str] + """The associated description""" -class PurpleParameters: - """JSON Schema definition for the function parameters""" + index: Optional[str] + """Directory index filename""" - properties: Dict[str, Any] - """Object property definitions""" + meta: Optional[Dict[str, Any]] + """Meta data information""" - required: Optional[List[str]] - """Required property names""" + name: Optional[str] + """The associated name""" - type: StickyType - """The schema type, must be "object\"""" + not_found: Optional[str] + """Not found filename""" - def __init__(self, properties: Dict[str, Any], required: Optional[List[str]], type: StickyType) -> None: - self.properties = properties - self.required = required - self.type = type + prefix: Optional[str] + """Optional folder prefix inside the space to serve from""" + + slug: Optional[str] + """The subdomain slug beneath the configured space apex""" + + def __init__(self, alias: Optional[str], description: Optional[str], index: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], not_found: Optional[str], prefix: Optional[str], slug: Optional[str]) -> None: + self.alias = alias + self.description = description + self.index = index + self.meta = meta + self.name = name + self.not_found = not_found + self.prefix = prefix + self.slug = slug @staticmethod - def from_dict(obj: Any) -> 'PurpleParameters': + def from_dict(obj: Any) -> 'SpaceSiteUpdateRequest': assert isinstance(obj, dict) - properties = from_dict(lambda x: x, obj.get("properties")) - required = from_union([lambda x: from_list(from_str, x), from_none], obj.get("required")) - type = StickyType(obj.get("type")) - return PurpleParameters(properties, required, type) + alias = from_union([from_str, from_none], obj.get("alias")) + description = from_union([from_str, from_none], obj.get("description")) + index = from_union([from_str, from_none], obj.get("index")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + not_found = from_union([from_str, from_none], obj.get("notFound")) + prefix = from_union([from_str, from_none], obj.get("prefix")) + slug = from_union([from_str, from_none], obj.get("slug")) + return SpaceSiteUpdateRequest(alias, description, index, meta, name, not_found, prefix, slug) def to_dict(self) -> dict: result: dict = {} - result["properties"] = from_dict(lambda x: x, self.properties) - if self.required is not None: - result["required"] = from_union([lambda x: from_list(from_str, x), from_none], self.required) - result["type"] = to_enum(StickyType, self.type) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.index is not None: + result["index"] = from_union([from_str, from_none], self.index) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.not_found is not None: + result["notFound"] = from_union([from_str, from_none], self.not_found) + if self.prefix is not None: + result["prefix"] = from_union([from_str, from_none], self.prefix) + if self.slug is not None: + result["slug"] = from_union([from_str, from_none], self.slug) return result -class PurpleResult: - """The result of the function execution""" - - data: Any - """The data returned by the function (can be any type)""" - - channel: Optional[str] - """The channel for streaming function results""" +class SpaceSiteUpdateResponse: + id: str + """The ID of the updated site""" - def __init__(self, data: Any, channel: Optional[str]) -> None: - self.data = data - self.channel = channel + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'PurpleResult': + def from_dict(obj: Any) -> 'SpaceSiteUpdateResponse': assert isinstance(obj, dict) - data = obj.get("data") - channel = from_union([from_str, from_none], obj.get("channel")) - return PurpleResult(data, channel) + id = from_str(obj.get("id")) + return SpaceSiteUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} - if self.data is not None: - result["data"] = self.data - if self.channel is not None: - result["channel"] = from_union([from_str, from_none], self.channel) + result["id"] = from_str(self.id) return result -class ConversationMessageCompleteRequestFunction: - call: Optional[PurpleCall] - """Configuration for when this function should be automatically called""" - - description: str - """The description of the function""" - - name: str - """The name of the function (must be a valid JS identifier, max 64 chars)""" - - parameters: PurpleParameters - """JSON Schema definition for the function parameters""" +class SpaceSiteFetchParams: + site_id: str + """The ID of the site to retrieve""" - result: Optional[PurpleResult] - """The result of the function execution""" + space_id: str - def __init__(self, call: Optional[PurpleCall], description: str, name: str, parameters: PurpleParameters, result: Optional[PurpleResult]) -> None: - self.call = call - self.description = description - self.name = name - self.parameters = parameters - self.result = result + def __init__(self, site_id: str, space_id: str) -> None: + self.site_id = site_id + self.space_id = space_id @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageCompleteRequestFunction': + def from_dict(obj: Any) -> 'SpaceSiteFetchParams': assert isinstance(obj, dict) - call = from_union([PurpleCall.from_dict, from_none], obj.get("call")) - description = from_str(obj.get("description")) - name = from_str(obj.get("name")) - parameters = PurpleParameters.from_dict(obj.get("parameters")) - result = from_union([PurpleResult.from_dict, from_none], obj.get("result")) - return ConversationMessageCompleteRequestFunction(call, description, name, parameters, result) + site_id = from_str(obj.get("siteId")) + space_id = from_str(obj.get("spaceId")) + return SpaceSiteFetchParams(site_id, space_id) def to_dict(self) -> dict: result: dict = {} - if self.call is not None: - result["call"] = from_union([lambda x: to_class(PurpleCall, x), from_none], self.call) - result["description"] = from_str(self.description) - result["name"] = from_str(self.name) - result["parameters"] = to_class(PurpleParameters, self.parameters) - if self.result is not None: - result["result"] = from_union([lambda x: to_class(PurpleResult, x), from_none], self.result) + result["siteId"] = from_str(self.site_id) + result["spaceId"] = from_str(self.space_id) return result -class ConversationMessageCompleteRequestLimits: - """Execution limits to control conversation processing bounds""" +class SpaceSiteFetchResponse: + """Instance list properties""" - calls: Optional[int] - """Maximum number of function/tool calls. Controls how many total function calls can be made - during the conversation. - """ - continuations: Optional[int] - """Maximum number of model continuations. Controls how many times the model can continue - generating after reaching a stop condition. - """ - iterations: Optional[int] - """Maximum number of agentic iterations. Controls how many times the model can iterate - through tool calls and responses. - """ + alias: Optional[str] + """The unique alias for the instance""" - def __init__(self, calls: Optional[int], continuations: Optional[int], iterations: Optional[int]) -> None: - self.calls = calls - self.continuations = continuations - self.iterations = iterations + created_at: float + """The timestamp (ms) when the instance was created""" - @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageCompleteRequestLimits': - assert isinstance(obj, dict) - calls = from_union([from_int, from_none], obj.get("calls")) - continuations = from_union([from_int, from_none], obj.get("continuations")) - iterations = from_union([from_int, from_none], obj.get("iterations")) - return ConversationMessageCompleteRequestLimits(calls, continuations, iterations) + description: Optional[str] + """The associated description""" - def to_dict(self) -> dict: - result: dict = {} - if self.calls is not None: - result["calls"] = from_union([from_int, from_none], self.calls) - if self.continuations is not None: - result["continuations"] = from_union([from_int, from_none], self.continuations) - if self.iterations is not None: - result["iterations"] = from_union([from_int, from_none], self.iterations) - return result + id: str + """The instance ID""" + index: Optional[str] + """Directory index filename""" -class ConversationMessageCompleteRequest: - entities: Optional[List[ConversationMessageCompleteRequestEntity]] - """Known entities""" + meta: Optional[Dict[str, Any]] + """Meta data information""" - extensions: Optional[ConversationMessageCompleteRequestExtensions] - """Extensions to enhance the bot's capabilities""" + name: Optional[str] + """The associated name""" - functions: Optional[List[ConversationMessageCompleteRequestFunction]] - """An array of functions to be added to the conversation""" + not_found: Optional[str] + """Not found filename""" - limits: Optional[ConversationMessageCompleteRequestLimits] - """Execution limits to control conversation processing bounds""" - - text: Optional[str] - """The text of the message to send. Omit to continue receiving from the existing - conversation state without sending a new user message. - """ - - def __init__(self, entities: Optional[List[ConversationMessageCompleteRequestEntity]], extensions: Optional[ConversationMessageCompleteRequestExtensions], functions: Optional[List[ConversationMessageCompleteRequestFunction]], limits: Optional[ConversationMessageCompleteRequestLimits], text: Optional[str]) -> None: - self.entities = entities - self.extensions = extensions - self.functions = functions - self.limits = limits - self.text = text - - @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageCompleteRequest': - assert isinstance(obj, dict) - entities = from_union([lambda x: from_list(ConversationMessageCompleteRequestEntity.from_dict, x), from_none], obj.get("entities")) - extensions = from_union([ConversationMessageCompleteRequestExtensions.from_dict, from_none], obj.get("extensions")) - functions = from_union([lambda x: from_list(ConversationMessageCompleteRequestFunction.from_dict, x), from_none], obj.get("functions")) - limits = from_union([ConversationMessageCompleteRequestLimits.from_dict, from_none], obj.get("limits")) - text = from_union([from_str, from_none], obj.get("text")) - return ConversationMessageCompleteRequest(entities, extensions, functions, limits, text) - - def to_dict(self) -> dict: - result: dict = {} - if self.entities is not None: - result["entities"] = from_union([lambda x: from_list(lambda x: to_class(ConversationMessageCompleteRequestEntity, x), x), from_none], self.entities) - if self.extensions is not None: - result["extensions"] = from_union([lambda x: to_class(ConversationMessageCompleteRequestExtensions, x), from_none], self.extensions) - if self.functions is not None: - result["functions"] = from_union([lambda x: from_list(lambda x: to_class(ConversationMessageCompleteRequestFunction, x), x), from_none], self.functions) - if self.limits is not None: - result["limits"] = from_union([lambda x: to_class(ConversationMessageCompleteRequestLimits, x), from_none], self.limits) - if self.text is not None: - result["text"] = from_union([from_str, from_none], self.text) - return result - - -class PurpleReason(Enum): - """The reason why the completion ended""" - - ABORT = "abort" - ACTIVITY = "activity" - ERROR = "error" - ITERATION = "iteration" - LENGTH = "length" - STOP = "stop" + prefix: Optional[str] + """The folder prefix inside the space""" + slug: Optional[str] + """The subdomain slug of the site""" -class ConversationMessageCompleteResponseEnd: - """Information about why the completion ended""" + space_id: Optional[str] + """The space the site belongs to""" - reason: PurpleReason - """The reason why the completion ended""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - def __init__(self, reason: PurpleReason) -> None: - self.reason = reason + def __init__(self, alias: Optional[str], created_at: float, description: Optional[str], id: str, index: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], not_found: Optional[str], prefix: Optional[str], slug: Optional[str], space_id: Optional[str], updated_at: float) -> None: + self.alias = alias + self.created_at = created_at + self.description = description + self.id = id + self.index = index + self.meta = meta + self.name = name + self.not_found = not_found + self.prefix = prefix + self.slug = slug + self.space_id = space_id + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageCompleteResponseEnd': + def from_dict(obj: Any) -> 'SpaceSiteFetchResponse': assert isinstance(obj, dict) - reason = PurpleReason(obj.get("reason")) - return ConversationMessageCompleteResponseEnd(reason) + alias = from_union([from_str, from_none], obj.get("alias")) + created_at = from_float(obj.get("createdAt")) + description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) + index = from_union([from_str, from_none], obj.get("index")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + not_found = from_union([from_str, from_none], obj.get("notFound")) + prefix = from_union([from_str, from_none], obj.get("prefix")) + slug = from_union([from_str, from_none], obj.get("slug")) + space_id = from_union([from_str, from_none], obj.get("spaceId")) + updated_at = from_float(obj.get("updatedAt")) + return SpaceSiteFetchResponse(alias, created_at, description, id, index, meta, name, not_found, prefix, slug, space_id, updated_at) def to_dict(self) -> dict: result: dict = {} - result["reason"] = to_enum(PurpleReason, self.reason) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + result["createdAt"] = to_float(self.created_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) + if self.index is not None: + result["index"] = from_union([from_str, from_none], self.index) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.not_found is not None: + result["notFound"] = from_union([from_str, from_none], self.not_found) + if self.prefix is not None: + result["prefix"] = from_union([from_str, from_none], self.prefix) + if self.slug is not None: + result["slug"] = from_union([from_str, from_none], self.slug) + if self.space_id is not None: + result["spaceId"] = from_union([from_str, from_none], self.space_id) + result["updatedAt"] = to_float(self.updated_at) return result -class ConversationMessageCompleteResponseUsage: - """Usage information""" +class SpaceSiteDeleteParams: + site_id: str + """The ID of the site to delete""" - token: float - """The tokens used in this exchange""" + space_id: str - def __init__(self, token: float) -> None: - self.token = token + def __init__(self, site_id: str, space_id: str) -> None: + self.site_id = site_id + self.space_id = space_id @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageCompleteResponseUsage': + def from_dict(obj: Any) -> 'SpaceSiteDeleteParams': assert isinstance(obj, dict) - token = from_float(obj.get("token")) - return ConversationMessageCompleteResponseUsage(token) + site_id = from_str(obj.get("siteId")) + space_id = from_str(obj.get("spaceId")) + return SpaceSiteDeleteParams(site_id, space_id) def to_dict(self) -> dict: result: dict = {} - result["token"] = to_float(self.token) + result["siteId"] = from_str(self.site_id) + result["spaceId"] = from_str(self.space_id) return result -class ConversationMessageCompleteResponse: - end: ConversationMessageCompleteResponseEnd - """Information about why the completion ended""" - +class SpaceSiteDeleteResponse: id: str - """The ID of the created message""" - - text: str - """The text of the message received""" - - usage: ConversationMessageCompleteResponseUsage - """Usage information""" + """The ID of the deleted site""" - def __init__(self, end: ConversationMessageCompleteResponseEnd, id: str, text: str, usage: ConversationMessageCompleteResponseUsage) -> None: - self.end = end + def __init__(self, id: str) -> None: self.id = id - self.text = text - self.usage = usage @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageCompleteResponse': + def from_dict(obj: Any) -> 'SpaceSiteDeleteResponse': assert isinstance(obj, dict) - end = ConversationMessageCompleteResponseEnd.from_dict(obj.get("end")) id = from_str(obj.get("id")) - text = from_str(obj.get("text")) - usage = ConversationMessageCompleteResponseUsage.from_dict(obj.get("usage")) - return ConversationMessageCompleteResponse(end, id, text, usage) + return SpaceSiteDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} - result["end"] = to_class(ConversationMessageCompleteResponseEnd, self.end) result["id"] = from_str(self.id) - result["text"] = from_str(self.text) - result["usage"] = to_class(ConversationMessageCompleteResponseUsage, self.usage) return result -class FluffyReason(Enum): - """The reason why the completion ended""" +class SkillsetListParamsOrder(Enum): + """The order of the paginated items""" - ABORT = "abort" - ACTIVITY = "activity" - ERROR = "error" - ITERATION = "iteration" - LENGTH = "length" - STOP = "stop" + ASC = "asc" + DESC = "desc" -class PurpleEnd: - """Information about why the completion ended""" +class SkillsetListParams: + cursor: Optional[str] + """The cursor to use for pagination""" - reason: FluffyReason - """The reason why the completion ended""" + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" - def __init__(self, reason: FluffyReason) -> None: - self.reason = reason + order: Optional[SkillsetListParamsOrder] + """The order of the paginated items""" + + take: Optional[int] + """The number of items to retrieve""" + + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[SkillsetListParamsOrder], take: Optional[int]) -> None: + self.cursor = cursor + self.meta = meta + self.order = order + self.take = take @staticmethod - def from_dict(obj: Any) -> 'PurpleEnd': + def from_dict(obj: Any) -> 'SkillsetListParams': assert isinstance(obj, dict) - reason = FluffyReason(obj.get("reason")) - return PurpleEnd(reason) + cursor = from_union([from_str, from_none], obj.get("cursor")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([SkillsetListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return SkillsetListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} - result["reason"] = to_enum(FluffyReason, self.reason) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(SkillsetListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class IndigoType(Enum): - """The type of the message""" - - ACTIVITY = "activity" - BACKSTORY = "backstory" - BOT = "bot" - CHECKPOINT = "checkpoint" - CONTEXT = "context" - INSTRUCTION = "instruction" - REASONING = "reasoning" - USER = "user" - +class PurpleState(Enum): + """The lifecycle state of a resource - toggle it on/off without deleting it""" -class PurpleUsage: - """Usage information""" + DISABLED = "disabled" + ENABLED = "enabled" - token: float - """The tokens used in this exchange""" - def __init__(self, token: float) -> None: - self.token = token +class PurpleVisibility(Enum): + """The skillset visibility""" - @staticmethod - def from_dict(obj: Any) -> 'PurpleUsage': - assert isinstance(obj, dict) - token = from_float(obj.get("token")) - return PurpleUsage(token) + PRIVATE = "private" + PROTECTED = "protected" + PUBLIC = "public" - def to_dict(self) -> dict: - result: dict = {} - result["token"] = to_float(self.token) - return result +class SkillsetListResponseItem: + """Blueprint properties""" -class ConversationMessageCompleteStreamItemData: - """The data for the event - - A message in the conversation - - Information about an abort event in a streamed response - """ - end: Optional[PurpleEnd] - """Information about why the completion ended""" + alias: Optional[str] + """The unique alias for the instance""" - id: Optional[str] - """The ID of the created message""" + blueprint_id: Optional[str] + """The ID of the blueprint""" - text: Optional[str] - """The text of the message received - - The text of the message - """ - usage: Optional[PurpleUsage] - """Usage information""" + created_at: float + """The timestamp (ms) when the instance was created""" - message: Optional[str] - """The error message""" + description: Optional[str] + """The associated description""" - token: Optional[str] - """The token generated""" + id: str + """The instance ID""" meta: Optional[Dict[str, Any]] """Meta data information""" - type: Optional[IndigoType] - """The type of the message""" - - function_name: Optional[str] - """The function or tool associated with the abort""" - - reason: Any - """The abort reason if available""" + name: Optional[str] + """The associated name""" - input_tokens_used: Optional[float] - """The number of input tokens used""" + state: Optional[PurpleState] + """The lifecycle state of a resource - toggle it on/off without deleting it""" - model: Optional[str] - """The model used""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - output_tokens_used: Optional[float] - """The number of output tokens used""" + visibility: Optional[PurpleVisibility] + """The skillset visibility""" - def __init__(self, end: Optional[PurpleEnd], id: Optional[str], text: Optional[str], usage: Optional[PurpleUsage], message: Optional[str], token: Optional[str], meta: Optional[Dict[str, Any]], type: Optional[IndigoType], function_name: Optional[str], reason: Any, input_tokens_used: Optional[float], model: Optional[str], output_tokens_used: Optional[float]) -> None: - self.end = end + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], state: Optional[PurpleState], updated_at: float, visibility: Optional[PurpleVisibility]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.created_at = created_at + self.description = description self.id = id - self.text = text - self.usage = usage - self.message = message - self.token = token self.meta = meta - self.type = type - self.function_name = function_name - self.reason = reason - self.input_tokens_used = input_tokens_used - self.model = model - self.output_tokens_used = output_tokens_used + self.name = name + self.state = state + self.updated_at = updated_at + self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageCompleteStreamItemData': + def from_dict(obj: Any) -> 'SkillsetListResponseItem': assert isinstance(obj, dict) - end = from_union([PurpleEnd.from_dict, from_none], obj.get("end")) - id = from_union([from_str, from_none], obj.get("id")) - text = from_union([from_str, from_none], obj.get("text")) - usage = from_union([PurpleUsage.from_dict, from_none], obj.get("usage")) - message = from_union([from_str, from_none], obj.get("message")) - token = from_union([from_str, from_none], obj.get("token")) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + created_at = from_float(obj.get("createdAt")) + description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - type = from_union([IndigoType, from_none], obj.get("type")) - function_name = from_union([from_str, from_none], obj.get("functionName")) - reason = obj.get("reason") - input_tokens_used = from_union([from_float, from_none], obj.get("inputTokensUsed")) - model = from_union([from_str, from_none], obj.get("model")) - output_tokens_used = from_union([from_float, from_none], obj.get("outputTokensUsed")) - return ConversationMessageCompleteStreamItemData(end, id, text, usage, message, token, meta, type, function_name, reason, input_tokens_used, model, output_tokens_used) + name = from_union([from_str, from_none], obj.get("name")) + state = from_union([PurpleState, from_none], obj.get("state")) + updated_at = from_float(obj.get("updatedAt")) + visibility = from_union([PurpleVisibility, from_none], obj.get("visibility")) + return SkillsetListResponseItem(alias, blueprint_id, created_at, description, id, meta, name, state, updated_at, visibility) def to_dict(self) -> dict: result: dict = {} - if self.end is not None: - result["end"] = from_union([lambda x: to_class(PurpleEnd, x), from_none], self.end) - if self.id is not None: - result["id"] = from_union([from_str, from_none], self.id) - if self.text is not None: - result["text"] = from_union([from_str, from_none], self.text) - if self.usage is not None: - result["usage"] = from_union([lambda x: to_class(PurpleUsage, x), from_none], self.usage) - if self.message is not None: - result["message"] = from_union([from_str, from_none], self.message) - if self.token is not None: - result["token"] = from_union([from_str, from_none], self.token) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + result["createdAt"] = to_float(self.created_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.type is not None: - result["type"] = from_union([lambda x: to_enum(IndigoType, x), from_none], self.type) - if self.function_name is not None: - result["functionName"] = from_union([from_str, from_none], self.function_name) - if self.reason is not None: - result["reason"] = self.reason - if self.input_tokens_used is not None: - result["inputTokensUsed"] = from_union([to_float, from_none], self.input_tokens_used) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) - if self.output_tokens_used is not None: - result["outputTokensUsed"] = from_union([to_float, from_none], self.output_tokens_used) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.state is not None: + result["state"] = from_union([lambda x: to_enum(PurpleState, x), from_none], self.state) + result["updatedAt"] = to_float(self.updated_at) + if self.visibility is not None: + result["visibility"] = from_union([lambda x: to_enum(PurpleVisibility, x), from_none], self.visibility) return result -class ConversationMessageCompleteStreamItemType(Enum): - """The type of event""" - - ABORT = "abort" - COMPLETE_BEGIN = "completeBegin" - COMPLETE_END = "completeEnd" - ERROR = "error" - MESSAGE = "message" - REASONING_TOKEN = "reasoningToken" - RESULT = "result" - TOKEN = "token" - USAGE = "usage" - WAIT_FOR_CHANNEL_MESSAGE_BEGIN = "waitForChannelMessageBegin" - WAIT_FOR_CHANNEL_MESSAGE_END = "waitForChannelMessageEnd" - +class SkillsetListResponse: + cursor: str + """Cursor for fetching the next page""" -class ConversationMessageCompleteStreamItem: - data: ConversationMessageCompleteStreamItemData - """The data for the event - - A message in the conversation - - Information about an abort event in a streamed response - """ - type: ConversationMessageCompleteStreamItemType - """The type of event""" + items: List[SkillsetListResponseItem] - def __init__(self, data: ConversationMessageCompleteStreamItemData, type: ConversationMessageCompleteStreamItemType) -> None: - self.data = data - self.type = type + def __init__(self, cursor: str, items: List[SkillsetListResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageCompleteStreamItem': + def from_dict(obj: Any) -> 'SkillsetListResponse': assert isinstance(obj, dict) - data = ConversationMessageCompleteStreamItemData.from_dict(obj.get("data")) - type = ConversationMessageCompleteStreamItemType(obj.get("type")) - return ConversationMessageCompleteStreamItem(data, type) + cursor = from_str(obj.get("cursor")) + items = from_list(SkillsetListResponseItem.from_dict, obj.get("items")) + return SkillsetListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(ConversationMessageCompleteStreamItemData, self.data) - result["type"] = to_enum(ConversationMessageCompleteStreamItemType, self.type) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(SkillsetListResponseItem, x), self.items) return result -class ConversationContactUpsertParams: - conversation_id: str - """The ID of the conversation""" +class FluffyState(Enum): + """The lifecycle state of a resource - toggle it on/off without deleting it""" - def __init__(self, conversation_id: str) -> None: - self.conversation_id = conversation_id + DISABLED = "disabled" + ENABLED = "enabled" - @staticmethod - def from_dict(obj: Any) -> 'ConversationContactUpsertParams': - assert isinstance(obj, dict) - conversation_id = from_str(obj.get("conversationId")) - return ConversationContactUpsertParams(conversation_id) - def to_dict(self) -> dict: - result: dict = {} - result["conversationId"] = from_str(self.conversation_id) - return result +class FluffyVisibility(Enum): + """The skillset visibility""" + + PRIVATE = "private" + PROTECTED = "protected" + PUBLIC = "public" -class ConversationContactUpsertRequest: - """Instance crud properties""" +class SkillsetListStreamItemData: + """Blueprint properties""" + + alias: Optional[str] + """The unique alias for the instance""" + + blueprint_id: Optional[str] + """The ID of the blueprint""" + + created_at: float + """The timestamp (ms) when the instance was created""" description: Optional[str] """The associated description""" - email: Optional[str] - """The email address of the contact""" - - fingerprint: Optional[str] - """The fingerprint of the contact""" + id: str + """The instance ID""" meta: Optional[Dict[str, Any]] """Meta data information""" @@ -8061,102 +7903,186 @@ class ConversationContactUpsertRequest: name: Optional[str] """The associated name""" - nick: Optional[str] - """The nickname of the contact""" + state: Optional[FluffyState] + """The lifecycle state of a resource - toggle it on/off without deleting it""" - phone: Optional[str] - """The phone number of the contact""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - def __init__(self, description: Optional[str], email: Optional[str], fingerprint: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], nick: Optional[str], phone: Optional[str]) -> None: + visibility: Optional[FluffyVisibility] + """The skillset visibility""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], state: Optional[FluffyState], updated_at: float, visibility: Optional[FluffyVisibility]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.created_at = created_at self.description = description - self.email = email - self.fingerprint = fingerprint + self.id = id self.meta = meta self.name = name - self.nick = nick - self.phone = phone + self.state = state + self.updated_at = updated_at + self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'ConversationContactUpsertRequest': + def from_dict(obj: Any) -> 'SkillsetListStreamItemData': assert isinstance(obj, dict) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - email = from_union([from_str, from_none], obj.get("email")) - fingerprint = from_union([from_str, from_none], obj.get("fingerprint")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - nick = from_union([from_str, from_none], obj.get("nick")) - phone = from_union([from_str, from_none], obj.get("phone")) - return ConversationContactUpsertRequest(description, email, fingerprint, meta, name, nick, phone) + state = from_union([FluffyState, from_none], obj.get("state")) + updated_at = from_float(obj.get("updatedAt")) + visibility = from_union([FluffyVisibility, from_none], obj.get("visibility")) + return SkillsetListStreamItemData(alias, blueprint_id, created_at, description, id, meta, name, state, updated_at, visibility) def to_dict(self) -> dict: result: dict = {} - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.email is not None: - result["email"] = from_union([from_str, from_none], self.email) - if self.fingerprint is not None: - result["fingerprint"] = from_union([from_str, from_none], self.fingerprint) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + result["createdAt"] = to_float(self.created_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.nick is not None: - result["nick"] = from_union([from_str, from_none], self.nick) - if self.phone is not None: - result["phone"] = from_union([from_str, from_none], self.phone) + if self.state is not None: + result["state"] = from_union([lambda x: to_enum(FluffyState, x), from_none], self.state) + result["updatedAt"] = to_float(self.updated_at) + if self.visibility is not None: + result["visibility"] = from_union([lambda x: to_enum(FluffyVisibility, x), from_none], self.visibility) return result -class ConversationContactUpsertResponse: - id: str - """The ID of the created contact""" +class SkillsetListStreamItemType(Enum): + """The type of event""" - def __init__(self, id: str) -> None: - self.id = id + ITEM = "item" + + +class SkillsetListStreamItem: + data: SkillsetListStreamItemData + """Blueprint properties""" + + type: SkillsetListStreamItemType + """The type of event""" + + def __init__(self, data: SkillsetListStreamItemData, type: SkillsetListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'ConversationContactUpsertResponse': + def from_dict(obj: Any) -> 'SkillsetListStreamItem': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return ConversationContactUpsertResponse(id) + data = SkillsetListStreamItemData.from_dict(obj.get("data")) + type = SkillsetListStreamItemType(obj.get("type")) + return SkillsetListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["data"] = to_class(SkillsetListStreamItemData, self.data) + result["type"] = to_enum(SkillsetListStreamItemType, self.type) return result -class ConversationDeleteParams: - conversation_id: str - """The ID of the conversation to delete""" +class SkillsetCreateRequestState(Enum): + """The lifecycle state of a resource - toggle it on/off without deleting it""" - def __init__(self, conversation_id: str) -> None: - self.conversation_id = conversation_id + DISABLED = "disabled" + ENABLED = "enabled" + + +class SkillsetCreateRequestVisibility(Enum): + """The skillset visibility""" + + PRIVATE = "private" + PROTECTED = "protected" + PUBLIC = "public" + + +class SkillsetCreateRequest: + """Blueprint properties""" + + alias: Optional[str] + """The unique alias for the instance""" + + blueprint_id: Optional[str] + """The ID of the blueprint""" + + description: Optional[str] + """The associated description""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" + + name: Optional[str] + """The associated name""" + + state: Optional[SkillsetCreateRequestState] + """The lifecycle state of a resource - toggle it on/off without deleting it""" + + visibility: Optional[SkillsetCreateRequestVisibility] + """The skillset visibility""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], state: Optional[SkillsetCreateRequestState], visibility: Optional[SkillsetCreateRequestVisibility]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.description = description + self.meta = meta + self.name = name + self.state = state + self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'ConversationDeleteParams': + def from_dict(obj: Any) -> 'SkillsetCreateRequest': assert isinstance(obj, dict) - conversation_id = from_str(obj.get("conversationId")) - return ConversationDeleteParams(conversation_id) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + description = from_union([from_str, from_none], obj.get("description")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + state = from_union([SkillsetCreateRequestState, from_none], obj.get("state")) + visibility = from_union([SkillsetCreateRequestVisibility, from_none], obj.get("visibility")) + return SkillsetCreateRequest(alias, blueprint_id, description, meta, name, state, visibility) def to_dict(self) -> dict: result: dict = {} - result["conversationId"] = from_str(self.conversation_id) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.state is not None: + result["state"] = from_union([lambda x: to_enum(SkillsetCreateRequestState, x), from_none], self.state) + if self.visibility is not None: + result["visibility"] = from_union([lambda x: to_enum(SkillsetCreateRequestVisibility, x), from_none], self.visibility) return result -class ConversationDeleteResponse: +class SkillsetCreateResponse: id: str - """The ID of the deleted conversation""" + """The ID of the created skillset""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'ConversationDeleteResponse': + def from_dict(obj: Any) -> 'SkillsetCreateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return ConversationDeleteResponse(id) + return SkillsetCreateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -8164,913 +8090,951 @@ def to_dict(self) -> dict: return result -class FluffyReplacement: - begin: float - """Start offset""" - - end: float - """End offset""" - - text: str - """The text value of the replacement""" +class SkillsetUpdateParams: + skillset_id: str - def __init__(self, begin: float, end: float, text: str) -> None: - self.begin = begin - self.end = end - self.text = text + def __init__(self, skillset_id: str) -> None: + self.skillset_id = skillset_id @staticmethod - def from_dict(obj: Any) -> 'FluffyReplacement': + def from_dict(obj: Any) -> 'SkillsetUpdateParams': assert isinstance(obj, dict) - begin = from_float(obj.get("begin")) - end = from_float(obj.get("end")) - text = from_str(obj.get("text")) - return FluffyReplacement(begin, end, text) + skillset_id = from_str(obj.get("skillsetId")) + return SkillsetUpdateParams(skillset_id) def to_dict(self) -> dict: result: dict = {} - result["begin"] = to_float(self.begin) - result["end"] = to_float(self.end) - result["text"] = from_str(self.text) + result["skillsetId"] = from_str(self.skillset_id) return result -class StatefulConversationDispatchRequestEntity: - """Extracted entity from the message""" +class SkillsetUpdateRequestState(Enum): + """The lifecycle state of a resource - toggle it on/off without deleting it""" - begin: float - """Start offset""" + DISABLED = "disabled" + ENABLED = "enabled" - end: float - """End offset""" - replacement: Optional[FluffyReplacement] - text: str - """The text value of the entity""" +class SkillsetUpdateRequestVisibility(Enum): + """The skillset visibility""" - type: str - """The entity type""" + PRIVATE = "private" + PROTECTED = "protected" + PUBLIC = "public" - def __init__(self, begin: float, end: float, replacement: Optional[FluffyReplacement], text: str, type: str) -> None: - self.begin = begin - self.end = end - self.replacement = replacement - self.text = text - self.type = type - @staticmethod - def from_dict(obj: Any) -> 'StatefulConversationDispatchRequestEntity': - assert isinstance(obj, dict) - begin = from_float(obj.get("begin")) - end = from_float(obj.get("end")) - replacement = from_union([FluffyReplacement.from_dict, from_none], obj.get("replacement")) - text = from_str(obj.get("text")) - type = from_str(obj.get("type")) - return StatefulConversationDispatchRequestEntity(begin, end, replacement, text, type) +class SkillsetUpdateRequest: + """Blueprint properties""" - def to_dict(self) -> dict: - result: dict = {} - result["begin"] = to_float(self.begin) - result["end"] = to_float(self.end) - if self.replacement is not None: - result["replacement"] = from_union([lambda x: to_class(FluffyReplacement, x), from_none], self.replacement) - result["text"] = from_str(self.text) - result["type"] = from_str(self.type) - return result + alias: Optional[str] + """The unique alias for the instance""" + blueprint_id: Optional[str] + """The ID of the blueprint""" + + description: Optional[str] + """The associated description""" -class FluffyRecord: meta: Optional[Dict[str, Any]] - """Additional metadata for the record""" + """Meta data information""" - text: str - """The text content of the record""" + name: Optional[str] + """The associated name""" - def __init__(self, meta: Optional[Dict[str, Any]], text: str) -> None: + state: Optional[SkillsetUpdateRequestState] + """The lifecycle state of a resource - toggle it on/off without deleting it""" + + visibility: Optional[SkillsetUpdateRequestVisibility] + """The skillset visibility""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], state: Optional[SkillsetUpdateRequestState], visibility: Optional[SkillsetUpdateRequestVisibility]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.description = description self.meta = meta - self.text = text + self.name = name + self.state = state + self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'FluffyRecord': + def from_dict(obj: Any) -> 'SkillsetUpdateRequest': assert isinstance(obj, dict) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + description = from_union([from_str, from_none], obj.get("description")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - text = from_str(obj.get("text")) - return FluffyRecord(meta, text) + name = from_union([from_str, from_none], obj.get("name")) + state = from_union([SkillsetUpdateRequestState, from_none], obj.get("state")) + visibility = from_union([SkillsetUpdateRequestVisibility, from_none], obj.get("visibility")) + return SkillsetUpdateRequest(alias, blueprint_id, description, meta, name, state, visibility) def to_dict(self) -> dict: result: dict = {} + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["text"] = from_str(self.text) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.state is not None: + result["state"] = from_union([lambda x: to_enum(SkillsetUpdateRequestState, x), from_none], self.state) + if self.visibility is not None: + result["visibility"] = from_union([lambda x: to_enum(SkillsetUpdateRequestVisibility, x), from_none], self.visibility) return result -class FluffyDataset: - description: Optional[str] - """The description of the dataset""" - - name: Optional[str] - """The name of the dataset""" - - records: List[FluffyRecord] - """The records in the dataset""" +class SkillsetUpdateResponse: + id: str + """The ID of the updated skillset""" - def __init__(self, description: Optional[str], name: Optional[str], records: List[FluffyRecord]) -> None: - self.description = description - self.name = name - self.records = records + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'FluffyDataset': + def from_dict(obj: Any) -> 'SkillsetUpdateResponse': assert isinstance(obj, dict) - description = from_union([from_str, from_none], obj.get("description")) - name = from_union([from_str, from_none], obj.get("name")) - records = from_list(FluffyRecord.from_dict, obj.get("records")) - return FluffyDataset(description, name, records) + id = from_str(obj.get("id")) + return SkillsetUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - result["records"] = from_list(lambda x: to_class(FluffyRecord, x), self.records) + result["id"] = from_str(self.id) return result -class FluffyFeature: - name: str - """The name of the feature to enable""" - - options: Optional[Dict[str, Any]] - """Optional configuration options for the feature""" +class SkillsetFetchParams: + skillset_id: str + """The ID of the skillset to retrieve""" - def __init__(self, name: str, options: Optional[Dict[str, Any]]) -> None: - self.name = name - self.options = options + def __init__(self, skillset_id: str) -> None: + self.skillset_id = skillset_id @staticmethod - def from_dict(obj: Any) -> 'FluffyFeature': + def from_dict(obj: Any) -> 'SkillsetFetchParams': assert isinstance(obj, dict) - name = from_str(obj.get("name")) - options = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("options")) - return FluffyFeature(name, options) + skillset_id = from_str(obj.get("skillsetId")) + return SkillsetFetchParams(skillset_id) def to_dict(self) -> dict: result: dict = {} - result["name"] = from_str(self.name) - if self.options is not None: - result["options"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.options) + result["skillsetId"] = from_str(self.skillset_id) return result -class FluffyAbility: - description: str - """The description of the ability""" +class SkillsetFetchResponseState(Enum): + """The lifecycle state of a resource - toggle it on/off without deleting it""" - instruction: str - """The instruction for the ability""" + DISABLED = "disabled" + ENABLED = "enabled" - meta: Optional[Dict[str, Any]] - """Additional metadata for the ability""" - name: str - """The name of the ability""" +class SkillsetFetchResponseVisibility(Enum): + """The skillset visibility""" - secret_id: Optional[str] - """Optional secret ID for the ability""" + PRIVATE = "private" + PROTECTED = "protected" + PUBLIC = "public" - def __init__(self, description: str, instruction: str, meta: Optional[Dict[str, Any]], name: str, secret_id: Optional[str]) -> None: - self.description = description - self.instruction = instruction - self.meta = meta - self.name = name - self.secret_id = secret_id - @staticmethod - def from_dict(obj: Any) -> 'FluffyAbility': - assert isinstance(obj, dict) - description = from_str(obj.get("description")) - instruction = from_str(obj.get("instruction")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - secret_id = from_union([from_str, from_none], obj.get("secretId")) - return FluffyAbility(description, instruction, meta, name, secret_id) +class SkillsetFetchResponse: + """Blueprint properties""" - def to_dict(self) -> dict: - result: dict = {} - result["description"] = from_str(self.description) - result["instruction"] = from_str(self.instruction) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - if self.secret_id is not None: - result["secretId"] = from_union([from_str, from_none], self.secret_id) - return result + alias: Optional[str] + """The unique alias for the instance""" + blueprint_id: Optional[str] + """The ID of the blueprint""" -class FluffySkillset: - abilities: List[FluffyAbility] - """The abilities in the skillset""" + created_at: float + """The timestamp (ms) when the instance was created""" description: Optional[str] - """The description of the skillset""" + """The associated description""" + + id: str + """The instance ID""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" name: Optional[str] - """The name of the skillset""" + """The associated name""" - def __init__(self, abilities: List[FluffyAbility], description: Optional[str], name: Optional[str]) -> None: - self.abilities = abilities + state: Optional[SkillsetFetchResponseState] + """The lifecycle state of a resource - toggle it on/off without deleting it""" + + updated_at: float + """The timestamp (ms) when the instance was updated""" + + visibility: Optional[SkillsetFetchResponseVisibility] + """The skillset visibility""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], state: Optional[SkillsetFetchResponseState], updated_at: float, visibility: Optional[SkillsetFetchResponseVisibility]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.created_at = created_at self.description = description + self.id = id + self.meta = meta self.name = name + self.state = state + self.updated_at = updated_at + self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'FluffySkillset': + def from_dict(obj: Any) -> 'SkillsetFetchResponse': assert isinstance(obj, dict) - abilities = from_list(FluffyAbility.from_dict, obj.get("abilities")) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - return FluffySkillset(abilities, description, name) + state = from_union([SkillsetFetchResponseState, from_none], obj.get("state")) + updated_at = from_float(obj.get("updatedAt")) + visibility = from_union([SkillsetFetchResponseVisibility, from_none], obj.get("visibility")) + return SkillsetFetchResponse(alias, blueprint_id, created_at, description, id, meta, name, state, updated_at, visibility) def to_dict(self) -> dict: result: dict = {} - result["abilities"] = from_list(lambda x: to_class(FluffyAbility, x), self.abilities) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.state is not None: + result["state"] = from_union([lambda x: to_enum(SkillsetFetchResponseState, x), from_none], self.state) + result["updatedAt"] = to_float(self.updated_at) + if self.visibility is not None: + result["visibility"] = from_union([lambda x: to_enum(SkillsetFetchResponseVisibility, x), from_none], self.visibility) return result -class StatefulConversationDispatchRequestExtensions: - """Extensions to enhance the bot's capabilities""" - - backstory: Optional[str] - """Additional backstory for the bot""" - - datasets: Optional[List[FluffyDataset]] - """Inline datasets to provide additional context""" - - features: Optional[List[FluffyFeature]] - """Feature flags to enable specific bot capabilities""" - - skillsets: Optional[List[FluffySkillset]] - """Inline skillsets to provide additional abilities""" +class SkillsetDeleteParams: + skillset_id: str + """The ID of the skillset to delete""" - def __init__(self, backstory: Optional[str], datasets: Optional[List[FluffyDataset]], features: Optional[List[FluffyFeature]], skillsets: Optional[List[FluffySkillset]]) -> None: - self.backstory = backstory - self.datasets = datasets - self.features = features - self.skillsets = skillsets + def __init__(self, skillset_id: str) -> None: + self.skillset_id = skillset_id @staticmethod - def from_dict(obj: Any) -> 'StatefulConversationDispatchRequestExtensions': + def from_dict(obj: Any) -> 'SkillsetDeleteParams': assert isinstance(obj, dict) - backstory = from_union([from_str, from_none], obj.get("backstory")) - datasets = from_union([lambda x: from_list(FluffyDataset.from_dict, x), from_none], obj.get("datasets")) - features = from_union([lambda x: from_list(FluffyFeature.from_dict, x), from_none], obj.get("features")) - skillsets = from_union([lambda x: from_list(FluffySkillset.from_dict, x), from_none], obj.get("skillsets")) - return StatefulConversationDispatchRequestExtensions(backstory, datasets, features, skillsets) + skillset_id = from_str(obj.get("skillsetId")) + return SkillsetDeleteParams(skillset_id) def to_dict(self) -> dict: result: dict = {} - if self.backstory is not None: - result["backstory"] = from_union([from_str, from_none], self.backstory) - if self.datasets is not None: - result["datasets"] = from_union([lambda x: from_list(lambda x: to_class(FluffyDataset, x), x), from_none], self.datasets) - if self.features is not None: - result["features"] = from_union([lambda x: from_list(lambda x: to_class(FluffyFeature, x), x), from_none], self.features) - if self.skillsets is not None: - result["skillsets"] = from_union([lambda x: from_list(lambda x: to_class(FluffySkillset, x), x), from_none], self.skillsets) + result["skillsetId"] = from_str(self.skillset_id) return result -class FluffyCall: - """Configuration for when this function should be automatically called""" - - end: Optional[bool] - """If true, this function will be force-called at the end of the conversation""" - - start: Optional[bool] - """If true, this function will be force-called at the start of the conversation""" +class SkillsetDeleteResponse: + id: str + """The ID of the deleted skillset""" - def __init__(self, end: Optional[bool], start: Optional[bool]) -> None: - self.end = end - self.start = start + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'FluffyCall': + def from_dict(obj: Any) -> 'SkillsetDeleteResponse': assert isinstance(obj, dict) - end = from_union([from_bool, from_none], obj.get("end")) - start = from_union([from_bool, from_none], obj.get("start")) - return FluffyCall(end, start) + id = from_str(obj.get("id")) + return SkillsetDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} - if self.end is not None: - result["end"] = from_union([from_bool, from_none], self.end) - if self.start is not None: - result["start"] = from_union([from_bool, from_none], self.start) + result["id"] = from_str(self.id) return result -class IndecentType(Enum): - """The schema type, must be "object\"""" - - OBJECT = "object" +class SkillsetAbilityListParamsOrder(Enum): + """The order of the paginated items""" + ASC = "asc" + DESC = "desc" -class FluffyParameters: - """JSON Schema definition for the function parameters""" - properties: Dict[str, Any] - """Object property definitions""" +class SkillsetAbilityListParams: + cursor: Optional[str] + """The cursor to use for pagination""" - required: Optional[List[str]] - """Required property names""" + order: Optional[SkillsetAbilityListParamsOrder] + """The order of the paginated items""" - type: IndecentType - """The schema type, must be "object\"""" + skillset_id: str + """The ID of the skillset""" - def __init__(self, properties: Dict[str, Any], required: Optional[List[str]], type: IndecentType) -> None: - self.properties = properties - self.required = required - self.type = type + take: Optional[int] + """The number of items to retrieve""" + + def __init__(self, cursor: Optional[str], order: Optional[SkillsetAbilityListParamsOrder], skillset_id: str, take: Optional[int]) -> None: + self.cursor = cursor + self.order = order + self.skillset_id = skillset_id + self.take = take @staticmethod - def from_dict(obj: Any) -> 'FluffyParameters': + def from_dict(obj: Any) -> 'SkillsetAbilityListParams': assert isinstance(obj, dict) - properties = from_dict(lambda x: x, obj.get("properties")) - required = from_union([lambda x: from_list(from_str, x), from_none], obj.get("required")) - type = IndecentType(obj.get("type")) - return FluffyParameters(properties, required, type) + cursor = from_union([from_str, from_none], obj.get("cursor")) + order = from_union([SkillsetAbilityListParamsOrder, from_none], obj.get("order")) + skillset_id = from_str(obj.get("skillsetId")) + take = from_union([from_int, from_none], obj.get("take")) + return SkillsetAbilityListParams(cursor, order, skillset_id, take) def to_dict(self) -> dict: result: dict = {} - result["properties"] = from_dict(lambda x: x, self.properties) - if self.required is not None: - result["required"] = from_union([lambda x: from_list(from_str, x), from_none], self.required) - result["type"] = to_enum(IndecentType, self.type) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(SkillsetAbilityListParamsOrder, x), from_none], self.order) + result["skillsetId"] = from_str(self.skillset_id) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class FluffyResult: - """The result of the function execution""" - - data: Any - """The data returned by the function (can be any type)""" +class TentacledState(Enum): + """The lifecycle state of a resource - toggle it on/off without deleting it""" - channel: Optional[str] - """The channel for streaming function results""" + DISABLED = "disabled" + ENABLED = "enabled" - def __init__(self, data: Any, channel: Optional[str]) -> None: - self.data = data - self.channel = channel - @staticmethod - def from_dict(obj: Any) -> 'FluffyResult': - assert isinstance(obj, dict) - data = obj.get("data") - channel = from_union([from_str, from_none], obj.get("channel")) - return FluffyResult(data, channel) +class SkillsetAbilityListResponseItem: + """Blueprint properties""" - def to_dict(self) -> dict: - result: dict = {} - if self.data is not None: - result["data"] = self.data - if self.channel is not None: - result["channel"] = from_union([from_str, from_none], self.channel) - return result + alias: Optional[str] + """The unique alias for the instance""" + blueprint_id: Optional[str] + """The ID of the blueprint""" -class StatefulConversationDispatchRequestFunction: - call: Optional[FluffyCall] - """Configuration for when this function should be automatically called""" + created_at: float + """The timestamp (ms) when the instance was created""" description: str - """The description of the function""" + """The associated description""" + + id: str + """The instance ID""" + + instruction: str + linked_bot_id: Optional[str] + """The ID of the bot associated with the ability""" + + linked_file_id: Optional[str] + """The ID of the file associated with the ability""" + + linked_secret_id: Optional[str] + """The ID of the secret associated with the ability""" + + linked_space_id: Optional[str] + """The ID of the space associated with the ability""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" name: str - """The name of the function (must be a valid JS identifier, max 64 chars)""" + """The associated name""" - parameters: FluffyParameters - """JSON Schema definition for the function parameters""" + state: Optional[TentacledState] + """The lifecycle state of a resource - toggle it on/off without deleting it""" - result: Optional[FluffyResult] - """The result of the function execution""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - def __init__(self, call: Optional[FluffyCall], description: str, name: str, parameters: FluffyParameters, result: Optional[FluffyResult]) -> None: - self.call = call + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: str, id: str, instruction: str, linked_bot_id: Optional[str], linked_file_id: Optional[str], linked_secret_id: Optional[str], linked_space_id: Optional[str], meta: Optional[Dict[str, Any]], name: str, state: Optional[TentacledState], updated_at: float) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.created_at = created_at self.description = description + self.id = id + self.instruction = instruction + self.linked_bot_id = linked_bot_id + self.linked_file_id = linked_file_id + self.linked_secret_id = linked_secret_id + self.linked_space_id = linked_space_id + self.meta = meta self.name = name - self.parameters = parameters - self.result = result + self.state = state + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'StatefulConversationDispatchRequestFunction': + def from_dict(obj: Any) -> 'SkillsetAbilityListResponseItem': assert isinstance(obj, dict) - call = from_union([FluffyCall.from_dict, from_none], obj.get("call")) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + created_at = from_float(obj.get("createdAt")) description = from_str(obj.get("description")) + id = from_str(obj.get("id")) + instruction = from_str(obj.get("instruction")) + linked_bot_id = from_union([from_str, from_none], obj.get("linkedBotId")) + linked_file_id = from_union([from_str, from_none], obj.get("linkedFileId")) + linked_secret_id = from_union([from_str, from_none], obj.get("linkedSecretId")) + linked_space_id = from_union([from_str, from_none], obj.get("linkedSpaceId")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_str(obj.get("name")) - parameters = FluffyParameters.from_dict(obj.get("parameters")) - result = from_union([FluffyResult.from_dict, from_none], obj.get("result")) - return StatefulConversationDispatchRequestFunction(call, description, name, parameters, result) + state = from_union([TentacledState, from_none], obj.get("state")) + updated_at = from_float(obj.get("updatedAt")) + return SkillsetAbilityListResponseItem(alias, blueprint_id, created_at, description, id, instruction, linked_bot_id, linked_file_id, linked_secret_id, linked_space_id, meta, name, state, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.call is not None: - result["call"] = from_union([lambda x: to_class(FluffyCall, x), from_none], self.call) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + result["createdAt"] = to_float(self.created_at) result["description"] = from_str(self.description) + result["id"] = from_str(self.id) + result["instruction"] = from_str(self.instruction) + if self.linked_bot_id is not None: + result["linkedBotId"] = from_union([from_str, from_none], self.linked_bot_id) + if self.linked_file_id is not None: + result["linkedFileId"] = from_union([from_str, from_none], self.linked_file_id) + if self.linked_secret_id is not None: + result["linkedSecretId"] = from_union([from_str, from_none], self.linked_secret_id) + if self.linked_space_id is not None: + result["linkedSpaceId"] = from_union([from_str, from_none], self.linked_space_id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) result["name"] = from_str(self.name) - result["parameters"] = to_class(FluffyParameters, self.parameters) - if self.result is not None: - result["result"] = from_union([lambda x: to_class(FluffyResult, x), from_none], self.result) + if self.state is not None: + result["state"] = from_union([lambda x: to_enum(TentacledState, x), from_none], self.state) + result["updatedAt"] = to_float(self.updated_at) return result -class StatefulConversationDispatchRequestLimits: - """Execution limits to control conversation processing bounds""" +class SkillsetAbilityListResponse: + cursor: str + """Cursor for fetching the next page""" - calls: Optional[int] - """Maximum number of function/tool calls. Controls how many total function calls can be made - during the conversation. - """ - continuations: Optional[int] - """Maximum number of model continuations. Controls how many times the model can continue - generating after reaching a stop condition. - """ - iterations: Optional[int] - """Maximum number of agentic iterations. Controls how many times the model can iterate - through tool calls and responses. - """ + items: List[SkillsetAbilityListResponseItem] - def __init__(self, calls: Optional[int], continuations: Optional[int], iterations: Optional[int]) -> None: - self.calls = calls - self.continuations = continuations - self.iterations = iterations + def __init__(self, cursor: str, items: List[SkillsetAbilityListResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'StatefulConversationDispatchRequestLimits': + def from_dict(obj: Any) -> 'SkillsetAbilityListResponse': assert isinstance(obj, dict) - calls = from_union([from_int, from_none], obj.get("calls")) - continuations = from_union([from_int, from_none], obj.get("continuations")) - iterations = from_union([from_int, from_none], obj.get("iterations")) - return StatefulConversationDispatchRequestLimits(calls, continuations, iterations) + cursor = from_str(obj.get("cursor")) + items = from_list(SkillsetAbilityListResponseItem.from_dict, obj.get("items")) + return SkillsetAbilityListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - if self.calls is not None: - result["calls"] = from_union([from_int, from_none], self.calls) - if self.continuations is not None: - result["continuations"] = from_union([from_int, from_none], self.continuations) - if self.iterations is not None: - result["iterations"] = from_union([from_int, from_none], self.iterations) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(SkillsetAbilityListResponseItem, x), self.items) return result -class StatefulConversationDispatchRequest: - channel_id: Optional[str] - """A unique ID to deduplicate dispatch requests""" +class StickyState(Enum): + """The lifecycle state of a resource - toggle it on/off without deleting it""" - entities: Optional[List[StatefulConversationDispatchRequestEntity]] - """Known entities""" + DISABLED = "disabled" + ENABLED = "enabled" - extensions: Optional[StatefulConversationDispatchRequestExtensions] - """Extensions to enhance the bot's capabilities""" - functions: Optional[List[StatefulConversationDispatchRequestFunction]] - """An array of functions to be added to the conversation""" +class SkillsetAbilityListStreamItemData: + """Blueprint properties""" - limits: Optional[StatefulConversationDispatchRequestLimits] - """Execution limits to control conversation processing bounds""" + alias: Optional[str] + """The unique alias for the instance""" - text: Optional[str] - """The text of the message to send. Omit to continue receiving from the existing - conversation state without sending a new user message. - """ + blueprint_id: Optional[str] + """The ID of the blueprint""" - def __init__(self, channel_id: Optional[str], entities: Optional[List[StatefulConversationDispatchRequestEntity]], extensions: Optional[StatefulConversationDispatchRequestExtensions], functions: Optional[List[StatefulConversationDispatchRequestFunction]], limits: Optional[StatefulConversationDispatchRequestLimits], text: Optional[str]) -> None: - self.channel_id = channel_id - self.entities = entities - self.extensions = extensions - self.functions = functions - self.limits = limits - self.text = text + created_at: float + """The timestamp (ms) when the instance was created""" - @staticmethod - def from_dict(obj: Any) -> 'StatefulConversationDispatchRequest': - assert isinstance(obj, dict) - channel_id = from_union([from_str, from_none], obj.get("channelId")) - entities = from_union([lambda x: from_list(StatefulConversationDispatchRequestEntity.from_dict, x), from_none], obj.get("entities")) - extensions = from_union([StatefulConversationDispatchRequestExtensions.from_dict, from_none], obj.get("extensions")) - functions = from_union([lambda x: from_list(StatefulConversationDispatchRequestFunction.from_dict, x), from_none], obj.get("functions")) - limits = from_union([StatefulConversationDispatchRequestLimits.from_dict, from_none], obj.get("limits")) - text = from_union([from_str, from_none], obj.get("text")) - return StatefulConversationDispatchRequest(channel_id, entities, extensions, functions, limits, text) + description: str + """The associated description""" - def to_dict(self) -> dict: - result: dict = {} - if self.channel_id is not None: - result["channelId"] = from_union([from_str, from_none], self.channel_id) - if self.entities is not None: - result["entities"] = from_union([lambda x: from_list(lambda x: to_class(StatefulConversationDispatchRequestEntity, x), x), from_none], self.entities) - if self.extensions is not None: - result["extensions"] = from_union([lambda x: to_class(StatefulConversationDispatchRequestExtensions, x), from_none], self.extensions) - if self.functions is not None: - result["functions"] = from_union([lambda x: from_list(lambda x: to_class(StatefulConversationDispatchRequestFunction, x), x), from_none], self.functions) - if self.limits is not None: - result["limits"] = from_union([lambda x: to_class(StatefulConversationDispatchRequestLimits, x), from_none], self.limits) - if self.text is not None: - result["text"] = from_union([from_str, from_none], self.text) - return result + id: str + """The instance ID""" + instruction: str + linked_bot_id: Optional[str] + """The ID of the bot associated with the ability""" -class StatefulConversationDispatchResponse: - channel_id: str - """The channel ID to subscribe to for completion events""" + linked_file_id: Optional[str] + """The ID of the file associated with the ability""" - def __init__(self, channel_id: str) -> None: - self.channel_id = channel_id + linked_secret_id: Optional[str] + """The ID of the secret associated with the ability""" - @staticmethod - def from_dict(obj: Any) -> 'StatefulConversationDispatchResponse': - assert isinstance(obj, dict) - channel_id = from_str(obj.get("channelId")) - return StatefulConversationDispatchResponse(channel_id) + linked_space_id: Optional[str] + """The ID of the space associated with the ability""" - def to_dict(self) -> dict: - result: dict = {} - result["channelId"] = from_str(self.channel_id) - return result + meta: Optional[Dict[str, Any]] + """Meta data information""" + name: str + """The associated name""" -class ConversationDownvoteParams: - conversation_id: str - """The ID of the conversation""" + state: Optional[StickyState] + """The lifecycle state of a resource - toggle it on/off without deleting it""" - def __init__(self, conversation_id: str) -> None: - self.conversation_id = conversation_id + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: str, id: str, instruction: str, linked_bot_id: Optional[str], linked_file_id: Optional[str], linked_secret_id: Optional[str], linked_space_id: Optional[str], meta: Optional[Dict[str, Any]], name: str, state: Optional[StickyState], updated_at: float) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.created_at = created_at + self.description = description + self.id = id + self.instruction = instruction + self.linked_bot_id = linked_bot_id + self.linked_file_id = linked_file_id + self.linked_secret_id = linked_secret_id + self.linked_space_id = linked_space_id + self.meta = meta + self.name = name + self.state = state + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'ConversationDownvoteParams': + def from_dict(obj: Any) -> 'SkillsetAbilityListStreamItemData': assert isinstance(obj, dict) - conversation_id = from_str(obj.get("conversationId")) - return ConversationDownvoteParams(conversation_id) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + created_at = from_float(obj.get("createdAt")) + description = from_str(obj.get("description")) + id = from_str(obj.get("id")) + instruction = from_str(obj.get("instruction")) + linked_bot_id = from_union([from_str, from_none], obj.get("linkedBotId")) + linked_file_id = from_union([from_str, from_none], obj.get("linkedFileId")) + linked_secret_id = from_union([from_str, from_none], obj.get("linkedSecretId")) + linked_space_id = from_union([from_str, from_none], obj.get("linkedSpaceId")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_str(obj.get("name")) + state = from_union([StickyState, from_none], obj.get("state")) + updated_at = from_float(obj.get("updatedAt")) + return SkillsetAbilityListStreamItemData(alias, blueprint_id, created_at, description, id, instruction, linked_bot_id, linked_file_id, linked_secret_id, linked_space_id, meta, name, state, updated_at) def to_dict(self) -> dict: result: dict = {} - result["conversationId"] = from_str(self.conversation_id) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + result["createdAt"] = to_float(self.created_at) + result["description"] = from_str(self.description) + result["id"] = from_str(self.id) + result["instruction"] = from_str(self.instruction) + if self.linked_bot_id is not None: + result["linkedBotId"] = from_union([from_str, from_none], self.linked_bot_id) + if self.linked_file_id is not None: + result["linkedFileId"] = from_union([from_str, from_none], self.linked_file_id) + if self.linked_secret_id is not None: + result["linkedSecretId"] = from_union([from_str, from_none], self.linked_secret_id) + if self.linked_space_id is not None: + result["linkedSpaceId"] = from_union([from_str, from_none], self.linked_space_id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + result["name"] = from_str(self.name) + if self.state is not None: + result["state"] = from_union([lambda x: to_enum(StickyState, x), from_none], self.state) + result["updatedAt"] = to_float(self.updated_at) return result -class ConversationDownvoteRequest: - reason: Optional[str] - """The reason for the downvote""" +class SkillsetAbilityListStreamItemType(Enum): + """The type of event""" - value: Optional[int] - """The value of the downvote""" + ITEM = "item" - def __init__(self, reason: Optional[str], value: Optional[int]) -> None: - self.reason = reason - self.value = value + +class SkillsetAbilityListStreamItem: + data: SkillsetAbilityListStreamItemData + """Blueprint properties""" + + type: SkillsetAbilityListStreamItemType + """The type of event""" + + def __init__(self, data: SkillsetAbilityListStreamItemData, type: SkillsetAbilityListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'ConversationDownvoteRequest': + def from_dict(obj: Any) -> 'SkillsetAbilityListStreamItem': assert isinstance(obj, dict) - reason = from_union([from_str, from_none], obj.get("reason")) - value = from_union([from_int, from_none], obj.get("value")) - return ConversationDownvoteRequest(reason, value) + data = SkillsetAbilityListStreamItemData.from_dict(obj.get("data")) + type = SkillsetAbilityListStreamItemType(obj.get("type")) + return SkillsetAbilityListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - if self.reason is not None: - result["reason"] = from_union([from_str, from_none], self.reason) - if self.value is not None: - result["value"] = from_union([from_int, from_none], self.value) + result["data"] = to_class(SkillsetAbilityListStreamItemData, self.data) + result["type"] = to_enum(SkillsetAbilityListStreamItemType, self.type) return result -class ConversationDownvoteResponse: - id: str - """The conversation ID of the downvoted conversation""" +class SkillsetAbilitiesExportParamsOrder(Enum): + """The order of the paginated items""" - def __init__(self, id: str) -> None: - self.id = id + ASC = "asc" + DESC = "desc" - @staticmethod - def from_dict(obj: Any) -> 'ConversationDownvoteResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return ConversationDownvoteResponse(id) - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result +class SkillsetAbilitiesExportParams: + cursor: Optional[str] + """The cursor to use for pagination""" + order: Optional[SkillsetAbilitiesExportParamsOrder] + """The order of the paginated items""" -class ConversationFetchParams: - conversation_id: str - """The ID of the conversation to retrieve""" + skillset_id: str + """The ID of the skillset to export""" - def __init__(self, conversation_id: str) -> None: - self.conversation_id = conversation_id + take: Optional[int] + """The number of items to retrieve""" + + def __init__(self, cursor: Optional[str], order: Optional[SkillsetAbilitiesExportParamsOrder], skillset_id: str, take: Optional[int]) -> None: + self.cursor = cursor + self.order = order + self.skillset_id = skillset_id + self.take = take @staticmethod - def from_dict(obj: Any) -> 'ConversationFetchParams': + def from_dict(obj: Any) -> 'SkillsetAbilitiesExportParams': assert isinstance(obj, dict) - conversation_id = from_str(obj.get("conversationId")) - return ConversationFetchParams(conversation_id) + cursor = from_union([from_str, from_none], obj.get("cursor")) + order = from_union([SkillsetAbilitiesExportParamsOrder, from_none], obj.get("order")) + skillset_id = from_str(obj.get("skillsetId")) + take = from_union([from_int, from_none], obj.get("take")) + return SkillsetAbilitiesExportParams(cursor, order, skillset_id, take) def to_dict(self) -> dict: result: dict = {} - result["conversationId"] = from_str(self.conversation_id) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(SkillsetAbilitiesExportParamsOrder, x), from_none], self.order) + result["skillsetId"] = from_str(self.skillset_id) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class ConversationFetchResponse: - """A bot configuration or reference - - A bot configuration that can be applied without a dedicated bot instance. - """ - contact_id: Optional[str] - """The contact id assigned to this conversation""" +class SkillsetAbilitiesExportResponseItem: + """Blueprint properties""" + + alias: Optional[str] + """The unique alias for the instance""" + + blueprint_id: Optional[str] + """The ID of the blueprint""" created_at: float """The timestamp (ms) when the instance was created""" - description: Optional[str] + description: str """The associated description""" id: str """The instance ID""" + instruction: str + linked_bot_id: Optional[str] + """The ID of the bot associated with the ability""" + + linked_file_id: Optional[str] + """The ID of the file associated with the ability""" + + linked_secret_id: Optional[str] + """The ID of the secret associated with the ability""" + + linked_space_id: Optional[str] + """The ID of the space associated with the ability""" + meta: Optional[Dict[str, Any]] """Meta data information""" - name: Optional[str] + name: str """The associated name""" - task_id: Optional[str] - """The task id assigned to this conversation""" - updated_at: float """The timestamp (ms) when the instance was updated""" - bot_id: Optional[str] - """The ID of the bot this configuration is using""" - - backstory: Optional[str] - """The backstory this configuration is using""" - - dataset_id: Optional[str] - """The id of the dataset this configuration is using""" - - model: Optional[str] - """A model definition""" - - moderation: Optional[bool] - """The moderation flag for this configuration""" - - privacy: Optional[bool] - """The privacy flag for this configuration""" - - skillset_id: Optional[str] - """The id of the skillset this configuration is using""" - - def __init__(self, contact_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], task_id: Optional[str], updated_at: float, bot_id: Optional[str], backstory: Optional[str], dataset_id: Optional[str], model: Optional[str], moderation: Optional[bool], privacy: Optional[bool], skillset_id: Optional[str]) -> None: - self.contact_id = contact_id + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: str, id: str, instruction: str, linked_bot_id: Optional[str], linked_file_id: Optional[str], linked_secret_id: Optional[str], linked_space_id: Optional[str], meta: Optional[Dict[str, Any]], name: str, updated_at: float) -> None: + self.alias = alias + self.blueprint_id = blueprint_id self.created_at = created_at self.description = description self.id = id + self.instruction = instruction + self.linked_bot_id = linked_bot_id + self.linked_file_id = linked_file_id + self.linked_secret_id = linked_secret_id + self.linked_space_id = linked_space_id self.meta = meta self.name = name - self.task_id = task_id self.updated_at = updated_at - self.bot_id = bot_id - self.backstory = backstory - self.dataset_id = dataset_id - self.model = model - self.moderation = moderation - self.privacy = privacy - self.skillset_id = skillset_id @staticmethod - def from_dict(obj: Any) -> 'ConversationFetchResponse': + def from_dict(obj: Any) -> 'SkillsetAbilitiesExportResponseItem': assert isinstance(obj, dict) - contact_id = from_union([from_str, from_none], obj.get("contactId")) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) + description = from_str(obj.get("description")) id = from_str(obj.get("id")) + instruction = from_str(obj.get("instruction")) + linked_bot_id = from_union([from_str, from_none], obj.get("linkedBotId")) + linked_file_id = from_union([from_str, from_none], obj.get("linkedFileId")) + linked_secret_id = from_union([from_str, from_none], obj.get("linkedSecretId")) + linked_space_id = from_union([from_str, from_none], obj.get("linkedSpaceId")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - task_id = from_union([from_str, from_none], obj.get("taskId")) + name = from_str(obj.get("name")) updated_at = from_float(obj.get("updatedAt")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - backstory = from_union([from_str, from_none], obj.get("backstory")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) - model = from_union([from_str, from_none], obj.get("model")) - moderation = from_union([from_bool, from_none], obj.get("moderation")) - privacy = from_union([from_bool, from_none], obj.get("privacy")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) - return ConversationFetchResponse(contact_id, created_at, description, id, meta, name, task_id, updated_at, bot_id, backstory, dataset_id, model, moderation, privacy, skillset_id) + return SkillsetAbilitiesExportResponseItem(alias, blueprint_id, created_at, description, id, instruction, linked_bot_id, linked_file_id, linked_secret_id, linked_space_id, meta, name, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.contact_id is not None: - result["contactId"] = from_union([from_str, from_none], self.contact_id) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) + result["description"] = from_str(self.description) result["id"] = from_str(self.id) + result["instruction"] = from_str(self.instruction) + if self.linked_bot_id is not None: + result["linkedBotId"] = from_union([from_str, from_none], self.linked_bot_id) + if self.linked_file_id is not None: + result["linkedFileId"] = from_union([from_str, from_none], self.linked_file_id) + if self.linked_secret_id is not None: + result["linkedSecretId"] = from_union([from_str, from_none], self.linked_secret_id) + if self.linked_space_id is not None: + result["linkedSpaceId"] = from_union([from_str, from_none], self.linked_space_id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.task_id is not None: - result["taskId"] = from_union([from_str, from_none], self.task_id) + result["name"] = from_str(self.name) result["updatedAt"] = to_float(self.updated_at) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.backstory is not None: - result["backstory"] = from_union([from_str, from_none], self.backstory) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) - if self.moderation is not None: - result["moderation"] = from_union([from_bool, from_none], self.moderation) - if self.privacy is not None: - result["privacy"] = from_union([from_bool, from_none], self.privacy) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) return result -class ConversationMessageDeleteParams: - conversation_id: str - """The ID of the conversation containing the message""" +class SkillsetAbilitiesExportResponse: + cursor: str + """Cursor for fetching the next page""" - message_id: str - """The ID of the message to delete""" + items: List[SkillsetAbilitiesExportResponseItem] - def __init__(self, conversation_id: str, message_id: str) -> None: - self.conversation_id = conversation_id - self.message_id = message_id + def __init__(self, cursor: str, items: List[SkillsetAbilitiesExportResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageDeleteParams': + def from_dict(obj: Any) -> 'SkillsetAbilitiesExportResponse': assert isinstance(obj, dict) - conversation_id = from_str(obj.get("conversationId")) - message_id = from_str(obj.get("messageId")) - return ConversationMessageDeleteParams(conversation_id, message_id) + cursor = from_str(obj.get("cursor")) + items = from_list(SkillsetAbilitiesExportResponseItem.from_dict, obj.get("items")) + return SkillsetAbilitiesExportResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["conversationId"] = from_str(self.conversation_id) - result["messageId"] = from_str(self.message_id) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(SkillsetAbilitiesExportResponseItem, x), self.items) return result -class ConversationMessageDeleteResponse: - id: str - """The ID of the deleted message""" +class SkillsetAbilitiesExportStreamItemData: + """Blueprint properties""" - def __init__(self, id: str) -> None: - self.id = id + alias: Optional[str] + """The unique alias for the instance""" - @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageDeleteResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return ConversationMessageDeleteResponse(id) + blueprint_id: Optional[str] + """The ID of the blueprint""" - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result + created_at: float + """The timestamp (ms) when the instance was created""" + description: str + """The associated description""" -class ConversationMessageDownvoteParams: - conversation_id: str - """The ID of the conversation""" + id: str + """The instance ID""" - message_id: str - """The ID of the message""" + instruction: str + linked_bot_id: Optional[str] + """The ID of the bot associated with the ability""" - def __init__(self, conversation_id: str, message_id: str) -> None: - self.conversation_id = conversation_id - self.message_id = message_id + linked_file_id: Optional[str] + """The ID of the file associated with the ability""" - @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageDownvoteParams': - assert isinstance(obj, dict) - conversation_id = from_str(obj.get("conversationId")) - message_id = from_str(obj.get("messageId")) - return ConversationMessageDownvoteParams(conversation_id, message_id) + linked_secret_id: Optional[str] + """The ID of the secret associated with the ability""" - def to_dict(self) -> dict: - result: dict = {} - result["conversationId"] = from_str(self.conversation_id) - result["messageId"] = from_str(self.message_id) - return result + linked_space_id: Optional[str] + """The ID of the space associated with the ability""" + meta: Optional[Dict[str, Any]] + """Meta data information""" -class ConversationMessageDownvoteRequest: - reason: Optional[str] - """The reason for the downvote""" + name: str + """The associated name""" - value: Optional[int] - """The value of the downvote""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - def __init__(self, reason: Optional[str], value: Optional[int]) -> None: - self.reason = reason - self.value = value + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: str, id: str, instruction: str, linked_bot_id: Optional[str], linked_file_id: Optional[str], linked_secret_id: Optional[str], linked_space_id: Optional[str], meta: Optional[Dict[str, Any]], name: str, updated_at: float) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.created_at = created_at + self.description = description + self.id = id + self.instruction = instruction + self.linked_bot_id = linked_bot_id + self.linked_file_id = linked_file_id + self.linked_secret_id = linked_secret_id + self.linked_space_id = linked_space_id + self.meta = meta + self.name = name + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageDownvoteRequest': + def from_dict(obj: Any) -> 'SkillsetAbilitiesExportStreamItemData': assert isinstance(obj, dict) - reason = from_union([from_str, from_none], obj.get("reason")) - value = from_union([from_int, from_none], obj.get("value")) - return ConversationMessageDownvoteRequest(reason, value) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + created_at = from_float(obj.get("createdAt")) + description = from_str(obj.get("description")) + id = from_str(obj.get("id")) + instruction = from_str(obj.get("instruction")) + linked_bot_id = from_union([from_str, from_none], obj.get("linkedBotId")) + linked_file_id = from_union([from_str, from_none], obj.get("linkedFileId")) + linked_secret_id = from_union([from_str, from_none], obj.get("linkedSecretId")) + linked_space_id = from_union([from_str, from_none], obj.get("linkedSpaceId")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_str(obj.get("name")) + updated_at = from_float(obj.get("updatedAt")) + return SkillsetAbilitiesExportStreamItemData(alias, blueprint_id, created_at, description, id, instruction, linked_bot_id, linked_file_id, linked_secret_id, linked_space_id, meta, name, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.reason is not None: - result["reason"] = from_union([from_str, from_none], self.reason) - if self.value is not None: - result["value"] = from_union([from_int, from_none], self.value) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + result["createdAt"] = to_float(self.created_at) + result["description"] = from_str(self.description) + result["id"] = from_str(self.id) + result["instruction"] = from_str(self.instruction) + if self.linked_bot_id is not None: + result["linkedBotId"] = from_union([from_str, from_none], self.linked_bot_id) + if self.linked_file_id is not None: + result["linkedFileId"] = from_union([from_str, from_none], self.linked_file_id) + if self.linked_secret_id is not None: + result["linkedSecretId"] = from_union([from_str, from_none], self.linked_secret_id) + if self.linked_space_id is not None: + result["linkedSpaceId"] = from_union([from_str, from_none], self.linked_space_id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + result["name"] = from_str(self.name) + result["updatedAt"] = to_float(self.updated_at) return result -class ConversationMessageDownvoteResponse: - id: str - """The ID of the downvoted message""" +class SkillsetAbilitiesExportStreamItemType(Enum): + """The type of event""" - def __init__(self, id: str) -> None: - self.id = id + ITEM = "item" + + +class SkillsetAbilitiesExportStreamItem: + data: SkillsetAbilitiesExportStreamItemData + """Blueprint properties""" + + type: SkillsetAbilitiesExportStreamItemType + """The type of event""" + + def __init__(self, data: SkillsetAbilitiesExportStreamItemData, type: SkillsetAbilitiesExportStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageDownvoteResponse': + def from_dict(obj: Any) -> 'SkillsetAbilitiesExportStreamItem': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return ConversationMessageDownvoteResponse(id) + data = SkillsetAbilitiesExportStreamItemData.from_dict(obj.get("data")) + type = SkillsetAbilitiesExportStreamItemType(obj.get("type")) + return SkillsetAbilitiesExportStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["data"] = to_class(SkillsetAbilitiesExportStreamItemData, self.data) + result["type"] = to_enum(SkillsetAbilitiesExportStreamItemType, self.type) return result -class ConversationMessageFetchParams: - conversation_id: str - """The ID of the conversation containing the message""" - - message_id: str - """The ID of the message to retrieve""" +class SkillsetAbilityCreateParams: + skillset_id: str - def __init__(self, conversation_id: str, message_id: str) -> None: - self.conversation_id = conversation_id - self.message_id = message_id + def __init__(self, skillset_id: str) -> None: + self.skillset_id = skillset_id @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageFetchParams': + def from_dict(obj: Any) -> 'SkillsetAbilityCreateParams': assert isinstance(obj, dict) - conversation_id = from_str(obj.get("conversationId")) - message_id = from_str(obj.get("messageId")) - return ConversationMessageFetchParams(conversation_id, message_id) + skillset_id = from_str(obj.get("skillsetId")) + return SkillsetAbilityCreateParams(skillset_id) def to_dict(self) -> dict: result: dict = {} - result["conversationId"] = from_str(self.conversation_id) - result["messageId"] = from_str(self.message_id) + result["skillsetId"] = from_str(self.skillset_id) return result -class ConversationMessageFetchResponseType(Enum): - """The type of the message""" +class SkillsetAbilityCreateRequestState(Enum): + """The lifecycle state of a resource - toggle it on/off without deleting it""" - ACTIVITY = "activity" - BACKSTORY = "backstory" - BOT = "bot" - CHECKPOINT = "checkpoint" - CONTEXT = "context" - INSTRUCTION = "instruction" - REASONING = "reasoning" - USER = "user" + DISABLED = "disabled" + ENABLED = "enabled" -class ConversationMessageFetchResponse: - """Instance list properties""" +class SkillsetAbilityCreateRequest: + """Blueprint properties""" - created_at: float - """The timestamp (ms) when the instance was created""" + alias: Optional[str] + """The unique alias for the instance""" + + blueprint_id: Optional[str] + """The ID of the blueprint""" description: Optional[str] """The associated description""" - id: str - """The instance ID""" + instruction: Optional[str] + """The instruction of the ability""" + + linked_bot_id: Optional[str] + """The ID of the bot associated with the ability""" + + linked_file_id: Optional[str] + """The ID of the file associated with the ability""" + + linked_secret_id: Optional[str] + """The ID of the secret associated with the ability""" + + linked_space_id: Optional[str] + """The ID of the space associated with the ability""" meta: Optional[Dict[str, Any]] """Meta data information""" @@ -9078,91 +9042,77 @@ class ConversationMessageFetchResponse: name: Optional[str] """The associated name""" - text: str - """The text of the fetched message""" - - type: ConversationMessageFetchResponseType - """The type of the message""" - - updated_at: float - """The timestamp (ms) when the instance was updated""" + state: Optional[SkillsetAbilityCreateRequestState] + """The lifecycle state of a resource - toggle it on/off without deleting it""" - def __init__(self, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], text: str, type: ConversationMessageFetchResponseType, updated_at: float) -> None: - self.created_at = created_at + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], description: Optional[str], instruction: Optional[str], linked_bot_id: Optional[str], linked_file_id: Optional[str], linked_secret_id: Optional[str], linked_space_id: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], state: Optional[SkillsetAbilityCreateRequestState]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id self.description = description - self.id = id + self.instruction = instruction + self.linked_bot_id = linked_bot_id + self.linked_file_id = linked_file_id + self.linked_secret_id = linked_secret_id + self.linked_space_id = linked_space_id self.meta = meta self.name = name - self.text = text - self.type = type - self.updated_at = updated_at + self.state = state @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageFetchResponse': + def from_dict(obj: Any) -> 'SkillsetAbilityCreateRequest': assert isinstance(obj, dict) - created_at = from_float(obj.get("createdAt")) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) + instruction = from_union([from_str, from_none], obj.get("instruction")) + linked_bot_id = from_union([from_str, from_none], obj.get("linkedBotId")) + linked_file_id = from_union([from_str, from_none], obj.get("linkedFileId")) + linked_secret_id = from_union([from_str, from_none], obj.get("linkedSecretId")) + linked_space_id = from_union([from_str, from_none], obj.get("linkedSpaceId")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - text = from_str(obj.get("text")) - type = ConversationMessageFetchResponseType(obj.get("type")) - updated_at = from_float(obj.get("updatedAt")) - return ConversationMessageFetchResponse(created_at, description, id, meta, name, text, type, updated_at) + state = from_union([SkillsetAbilityCreateRequestState, from_none], obj.get("state")) + return SkillsetAbilityCreateRequest(alias, blueprint_id, description, instruction, linked_bot_id, linked_file_id, linked_secret_id, linked_space_id, meta, name, state) def to_dict(self) -> dict: result: dict = {} - result["createdAt"] = to_float(self.created_at) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) + if self.instruction is not None: + result["instruction"] = from_union([from_str, from_none], self.instruction) + if self.linked_bot_id is not None: + result["linkedBotId"] = from_union([from_str, from_none], self.linked_bot_id) + if self.linked_file_id is not None: + result["linkedFileId"] = from_union([from_str, from_none], self.linked_file_id) + if self.linked_secret_id is not None: + result["linkedSecretId"] = from_union([from_str, from_none], self.linked_secret_id) + if self.linked_space_id is not None: + result["linkedSpaceId"] = from_union([from_str, from_none], self.linked_space_id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - result["text"] = from_str(self.text) - result["type"] = to_enum(ConversationMessageFetchResponseType, self.type) - result["updatedAt"] = to_float(self.updated_at) - return result - - -class ConversationMessageSynthesizeParams: - conversation_id: str - """The ID of the conversation""" - - message_id: str - """The ID of the message""" - - def __init__(self, conversation_id: str, message_id: str) -> None: - self.conversation_id = conversation_id - self.message_id = message_id - - @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageSynthesizeParams': - assert isinstance(obj, dict) - conversation_id = from_str(obj.get("conversationId")) - message_id = from_str(obj.get("messageId")) - return ConversationMessageSynthesizeParams(conversation_id, message_id) - - def to_dict(self) -> dict: - result: dict = {} - result["conversationId"] = from_str(self.conversation_id) - result["messageId"] = from_str(self.message_id) + if self.state is not None: + result["state"] = from_union([lambda x: to_enum(SkillsetAbilityCreateRequestState, x), from_none], self.state) return result -class ConversationMessageSynthesizeResponse: +class SkillsetAbilityCreateResponse: id: str - """The ID of the synthesized message""" + """The ID of the created ability""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageSynthesizeResponse': + def from_dict(obj: Any) -> 'SkillsetAbilityCreateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return ConversationMessageSynthesizeResponse(id) + return SkillsetAbilityCreateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -9170,127 +9120,61 @@ def to_dict(self) -> dict: return result -class ConversationMessageUpdateParams: - conversation_id: str - """The ID of the conversation""" - - message_id: str - """The ID of the message""" - - def __init__(self, conversation_id: str, message_id: str) -> None: - self.conversation_id = conversation_id - self.message_id = message_id - - @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageUpdateParams': - assert isinstance(obj, dict) - conversation_id = from_str(obj.get("conversationId")) - message_id = from_str(obj.get("messageId")) - return ConversationMessageUpdateParams(conversation_id, message_id) - - def to_dict(self) -> dict: - result: dict = {} - result["conversationId"] = from_str(self.conversation_id) - result["messageId"] = from_str(self.message_id) - return result - - -class TentacledReplacement: - begin: float - """Start offset""" - - end: float - """End offset""" - - text: str - """The text value of the replacement""" +class SkillsetAbilityUpdateParams: + ability_id: str + skillset_id: str - def __init__(self, begin: float, end: float, text: str) -> None: - self.begin = begin - self.end = end - self.text = text + def __init__(self, ability_id: str, skillset_id: str) -> None: + self.ability_id = ability_id + self.skillset_id = skillset_id @staticmethod - def from_dict(obj: Any) -> 'TentacledReplacement': + def from_dict(obj: Any) -> 'SkillsetAbilityUpdateParams': assert isinstance(obj, dict) - begin = from_float(obj.get("begin")) - end = from_float(obj.get("end")) - text = from_str(obj.get("text")) - return TentacledReplacement(begin, end, text) + ability_id = from_str(obj.get("abilityId")) + skillset_id = from_str(obj.get("skillsetId")) + return SkillsetAbilityUpdateParams(ability_id, skillset_id) def to_dict(self) -> dict: result: dict = {} - result["begin"] = to_float(self.begin) - result["end"] = to_float(self.end) - result["text"] = from_str(self.text) + result["abilityId"] = from_str(self.ability_id) + result["skillsetId"] = from_str(self.skillset_id) return result -class ConversationMessageUpdateRequestEntity: - """Extracted entity from the message""" - - begin: float - """Start offset""" - - end: float - """End offset""" - - replacement: Optional[TentacledReplacement] - text: str - """The text value of the entity""" +class SkillsetAbilityUpdateRequestState(Enum): + """The lifecycle state of a resource - toggle it on/off without deleting it""" - type: str - """The entity type""" + DISABLED = "disabled" + ENABLED = "enabled" - def __init__(self, begin: float, end: float, replacement: Optional[TentacledReplacement], text: str, type: str) -> None: - self.begin = begin - self.end = end - self.replacement = replacement - self.text = text - self.type = type - @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageUpdateRequestEntity': - assert isinstance(obj, dict) - begin = from_float(obj.get("begin")) - end = from_float(obj.get("end")) - replacement = from_union([TentacledReplacement.from_dict, from_none], obj.get("replacement")) - text = from_str(obj.get("text")) - type = from_str(obj.get("type")) - return ConversationMessageUpdateRequestEntity(begin, end, replacement, text, type) +class SkillsetAbilityUpdateRequest: + """Blueprint properties""" - def to_dict(self) -> dict: - result: dict = {} - result["begin"] = to_float(self.begin) - result["end"] = to_float(self.end) - if self.replacement is not None: - result["replacement"] = from_union([lambda x: to_class(TentacledReplacement, x), from_none], self.replacement) - result["text"] = from_str(self.text) - result["type"] = from_str(self.type) - return result + alias: Optional[str] + """The unique alias for the instance""" + blueprint_id: Optional[str] + """The ID of the blueprint""" -class ConversationMessageUpdateRequestType(Enum): - """The type of the message""" + description: Optional[str] + """The associated description""" - ACTIVITY = "activity" - BACKSTORY = "backstory" - BOT = "bot" - CHECKPOINT = "checkpoint" - CONTEXT = "context" - INSTRUCTION = "instruction" - REASONING = "reasoning" - USER = "user" + instruction: Optional[str] + """The text to update the ability with""" + linked_bot_id: Optional[str] + """The ID of the bot associated with the ability""" -class ConversationMessageUpdateRequest: - """Instance crud properties""" + linked_file_id: Optional[str] + """The ID of the file associated with the ability""" - description: Optional[str] - """The associated description""" + linked_secret_id: Optional[str] + """The ID of the secret associated with the ability""" - entities: Optional[List[ConversationMessageUpdateRequestEntity]] - """Known entities""" + linked_space_id: Optional[str] + """The ID of the space associated with the ability""" meta: Optional[Dict[str, Any]] """Meta data information""" @@ -9298,60 +9182,77 @@ class ConversationMessageUpdateRequest: name: Optional[str] """The associated name""" - text: Optional[str] - """The updated text of the message""" - - type: Optional[ConversationMessageUpdateRequestType] - """The type of the message""" + state: Optional[SkillsetAbilityUpdateRequestState] + """The lifecycle state of a resource - toggle it on/off without deleting it""" - def __init__(self, description: Optional[str], entities: Optional[List[ConversationMessageUpdateRequestEntity]], meta: Optional[Dict[str, Any]], name: Optional[str], text: Optional[str], type: Optional[ConversationMessageUpdateRequestType]) -> None: + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], description: Optional[str], instruction: Optional[str], linked_bot_id: Optional[str], linked_file_id: Optional[str], linked_secret_id: Optional[str], linked_space_id: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], state: Optional[SkillsetAbilityUpdateRequestState]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id self.description = description - self.entities = entities + self.instruction = instruction + self.linked_bot_id = linked_bot_id + self.linked_file_id = linked_file_id + self.linked_secret_id = linked_secret_id + self.linked_space_id = linked_space_id self.meta = meta self.name = name - self.text = text - self.type = type + self.state = state @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageUpdateRequest': + def from_dict(obj: Any) -> 'SkillsetAbilityUpdateRequest': assert isinstance(obj, dict) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) description = from_union([from_str, from_none], obj.get("description")) - entities = from_union([lambda x: from_list(ConversationMessageUpdateRequestEntity.from_dict, x), from_none], obj.get("entities")) + instruction = from_union([from_str, from_none], obj.get("instruction")) + linked_bot_id = from_union([from_str, from_none], obj.get("linkedBotId")) + linked_file_id = from_union([from_str, from_none], obj.get("linkedFileId")) + linked_secret_id = from_union([from_str, from_none], obj.get("linkedSecretId")) + linked_space_id = from_union([from_str, from_none], obj.get("linkedSpaceId")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - text = from_union([from_str, from_none], obj.get("text")) - type = from_union([ConversationMessageUpdateRequestType, from_none], obj.get("type")) - return ConversationMessageUpdateRequest(description, entities, meta, name, text, type) + state = from_union([SkillsetAbilityUpdateRequestState, from_none], obj.get("state")) + return SkillsetAbilityUpdateRequest(alias, blueprint_id, description, instruction, linked_bot_id, linked_file_id, linked_secret_id, linked_space_id, meta, name, state) def to_dict(self) -> dict: result: dict = {} + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.entities is not None: - result["entities"] = from_union([lambda x: from_list(lambda x: to_class(ConversationMessageUpdateRequestEntity, x), x), from_none], self.entities) + if self.instruction is not None: + result["instruction"] = from_union([from_str, from_none], self.instruction) + if self.linked_bot_id is not None: + result["linkedBotId"] = from_union([from_str, from_none], self.linked_bot_id) + if self.linked_file_id is not None: + result["linkedFileId"] = from_union([from_str, from_none], self.linked_file_id) + if self.linked_secret_id is not None: + result["linkedSecretId"] = from_union([from_str, from_none], self.linked_secret_id) + if self.linked_space_id is not None: + result["linkedSpaceId"] = from_union([from_str, from_none], self.linked_space_id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.text is not None: - result["text"] = from_union([from_str, from_none], self.text) - if self.type is not None: - result["type"] = from_union([lambda x: to_enum(ConversationMessageUpdateRequestType, x), from_none], self.type) + if self.state is not None: + result["state"] = from_union([lambda x: to_enum(SkillsetAbilityUpdateRequestState, x), from_none], self.state) return result -class ConversationMessageUpdateResponse: +class SkillsetAbilityUpdateResponse: id: str - """The ID of the updated message""" + """The ID of the updated ability""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageUpdateResponse': + def from_dict(obj: Any) -> 'SkillsetAbilityUpdateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return ConversationMessageUpdateResponse(id) + return SkillsetAbilityUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -9359,172 +9260,203 @@ def to_dict(self) -> dict: return result -class ConversationMessageUpvoteParams: - conversation_id: str - """The ID of the conversation""" +class SkillsetAbilityFetchParams: + ability_id: str + """The ID of the ability to retrieve""" - message_id: str - """The ID of the message""" + skillset_id: str + """The ID of the skillset""" - def __init__(self, conversation_id: str, message_id: str) -> None: - self.conversation_id = conversation_id - self.message_id = message_id + def __init__(self, ability_id: str, skillset_id: str) -> None: + self.ability_id = ability_id + self.skillset_id = skillset_id @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageUpvoteParams': + def from_dict(obj: Any) -> 'SkillsetAbilityFetchParams': assert isinstance(obj, dict) - conversation_id = from_str(obj.get("conversationId")) - message_id = from_str(obj.get("messageId")) - return ConversationMessageUpvoteParams(conversation_id, message_id) + ability_id = from_str(obj.get("abilityId")) + skillset_id = from_str(obj.get("skillsetId")) + return SkillsetAbilityFetchParams(ability_id, skillset_id) def to_dict(self) -> dict: result: dict = {} - result["conversationId"] = from_str(self.conversation_id) - result["messageId"] = from_str(self.message_id) + result["abilityId"] = from_str(self.ability_id) + result["skillsetId"] = from_str(self.skillset_id) return result -class ConversationMessageUpvoteRequest: - reason: Optional[str] - """The reason for the upvote""" +class SkillsetAbilityFetchResponseState(Enum): + """The lifecycle state of a resource - toggle it on/off without deleting it""" - value: Optional[int] - """The value of the upvote""" + DISABLED = "disabled" + ENABLED = "enabled" - def __init__(self, reason: Optional[str], value: Optional[int]) -> None: - self.reason = reason - self.value = value - @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageUpvoteRequest': - assert isinstance(obj, dict) - reason = from_union([from_str, from_none], obj.get("reason")) - value = from_union([from_int, from_none], obj.get("value")) - return ConversationMessageUpvoteRequest(reason, value) +class SkillsetAbilityFetchResponse: + """Blueprint properties""" - def to_dict(self) -> dict: - result: dict = {} - if self.reason is not None: - result["reason"] = from_union([from_str, from_none], self.reason) - if self.value is not None: - result["value"] = from_union([from_int, from_none], self.value) - return result + alias: Optional[str] + """The unique alias for the instance""" + blueprint_id: Optional[str] + """The ID of the blueprint""" + + created_at: float + """The timestamp (ms) when the instance was created""" + + description: str + """The associated description""" -class ConversationMessageUpvoteResponse: id: str - """The ID of the upvoted message""" + """The instance ID""" - def __init__(self, id: str) -> None: - self.id = id + instruction: str + """The instruction of the skillset ability""" - @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageUpvoteResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return ConversationMessageUpvoteResponse(id) + linked_bot_id: Optional[str] + """The ID of the bot associated with the ability""" - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result + linked_file_id: Optional[str] + """The ID of the file associated with the ability""" + linked_secret_id: Optional[str] + """The ID of the secret associated with the ability""" -class ConversationMessageCreateParams: - conversation_id: str - """The ID of the conversation""" + linked_space_id: Optional[str] + """The ID of the space associated with the ability""" - def __init__(self, conversation_id: str) -> None: - self.conversation_id = conversation_id + meta: Optional[Dict[str, Any]] + """Meta data information""" + + name: str + """The associated name""" + + state: Optional[SkillsetAbilityFetchResponseState] + """The lifecycle state of a resource - toggle it on/off without deleting it""" + + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: str, id: str, instruction: str, linked_bot_id: Optional[str], linked_file_id: Optional[str], linked_secret_id: Optional[str], linked_space_id: Optional[str], meta: Optional[Dict[str, Any]], name: str, state: Optional[SkillsetAbilityFetchResponseState], updated_at: float) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.created_at = created_at + self.description = description + self.id = id + self.instruction = instruction + self.linked_bot_id = linked_bot_id + self.linked_file_id = linked_file_id + self.linked_secret_id = linked_secret_id + self.linked_space_id = linked_space_id + self.meta = meta + self.name = name + self.state = state + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageCreateParams': + def from_dict(obj: Any) -> 'SkillsetAbilityFetchResponse': assert isinstance(obj, dict) - conversation_id = from_str(obj.get("conversationId")) - return ConversationMessageCreateParams(conversation_id) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + created_at = from_float(obj.get("createdAt")) + description = from_str(obj.get("description")) + id = from_str(obj.get("id")) + instruction = from_str(obj.get("instruction")) + linked_bot_id = from_union([from_str, from_none], obj.get("linkedBotId")) + linked_file_id = from_union([from_str, from_none], obj.get("linkedFileId")) + linked_secret_id = from_union([from_str, from_none], obj.get("linkedSecretId")) + linked_space_id = from_union([from_str, from_none], obj.get("linkedSpaceId")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_str(obj.get("name")) + state = from_union([SkillsetAbilityFetchResponseState, from_none], obj.get("state")) + updated_at = from_float(obj.get("updatedAt")) + return SkillsetAbilityFetchResponse(alias, blueprint_id, created_at, description, id, instruction, linked_bot_id, linked_file_id, linked_secret_id, linked_space_id, meta, name, state, updated_at) def to_dict(self) -> dict: result: dict = {} - result["conversationId"] = from_str(self.conversation_id) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + result["createdAt"] = to_float(self.created_at) + result["description"] = from_str(self.description) + result["id"] = from_str(self.id) + result["instruction"] = from_str(self.instruction) + if self.linked_bot_id is not None: + result["linkedBotId"] = from_union([from_str, from_none], self.linked_bot_id) + if self.linked_file_id is not None: + result["linkedFileId"] = from_union([from_str, from_none], self.linked_file_id) + if self.linked_secret_id is not None: + result["linkedSecretId"] = from_union([from_str, from_none], self.linked_secret_id) + if self.linked_space_id is not None: + result["linkedSpaceId"] = from_union([from_str, from_none], self.linked_space_id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + result["name"] = from_str(self.name) + if self.state is not None: + result["state"] = from_union([lambda x: to_enum(SkillsetAbilityFetchResponseState, x), from_none], self.state) + result["updatedAt"] = to_float(self.updated_at) return result -class StickyReplacement: - begin: float - """Start offset""" - - end: float - """End offset""" +class SkillsetAbilityExecuteParams: + ability_id: str + """The ID of the ability to execute""" - text: str - """The text value of the replacement""" + skillset_id: str + """The ID of the skillset containing the ability""" - def __init__(self, begin: float, end: float, text: str) -> None: - self.begin = begin - self.end = end - self.text = text + def __init__(self, ability_id: str, skillset_id: str) -> None: + self.ability_id = ability_id + self.skillset_id = skillset_id @staticmethod - def from_dict(obj: Any) -> 'StickyReplacement': + def from_dict(obj: Any) -> 'SkillsetAbilityExecuteParams': assert isinstance(obj, dict) - begin = from_float(obj.get("begin")) - end = from_float(obj.get("end")) - text = from_str(obj.get("text")) - return StickyReplacement(begin, end, text) + ability_id = from_str(obj.get("abilityId")) + skillset_id = from_str(obj.get("skillsetId")) + return SkillsetAbilityExecuteParams(ability_id, skillset_id) def to_dict(self) -> dict: result: dict = {} - result["begin"] = to_float(self.begin) - result["end"] = to_float(self.end) - result["text"] = from_str(self.text) + result["abilityId"] = from_str(self.ability_id) + result["skillsetId"] = from_str(self.skillset_id) return result -class ConversationMessageCreateRequestEntity: - """Extracted entity from the message""" - - begin: float - """Start offset""" - - end: float - """End offset""" - - replacement: Optional[StickyReplacement] - text: str - """The text value of the entity""" +class SkillsetAbilityExecuteRequest: + contact_id: Optional[str] + """The ID of the contact to associate with the execution""" - type: str - """The entity type""" + input: Optional[str] + """The input to process with the ability. This can be structured + text such as JSON or YAML for precise parameter control, or + unstructured natural language text. When unstructured text is + provided, the system will automatically detect and extract the + relevant parameters from the input. + """ - def __init__(self, begin: float, end: float, replacement: Optional[StickyReplacement], text: str, type: str) -> None: - self.begin = begin - self.end = end - self.replacement = replacement - self.text = text - self.type = type + def __init__(self, contact_id: Optional[str], input: Optional[str]) -> None: + self.contact_id = contact_id + self.input = input @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageCreateRequestEntity': + def from_dict(obj: Any) -> 'SkillsetAbilityExecuteRequest': assert isinstance(obj, dict) - begin = from_float(obj.get("begin")) - end = from_float(obj.get("end")) - replacement = from_union([StickyReplacement.from_dict, from_none], obj.get("replacement")) - text = from_str(obj.get("text")) - type = from_str(obj.get("type")) - return ConversationMessageCreateRequestEntity(begin, end, replacement, text, type) + contact_id = from_union([from_str, from_none], obj.get("contactId")) + input = from_union([from_str, from_none], obj.get("input")) + return SkillsetAbilityExecuteRequest(contact_id, input) def to_dict(self) -> dict: result: dict = {} - result["begin"] = to_float(self.begin) - result["end"] = to_float(self.end) - if self.replacement is not None: - result["replacement"] = from_union([lambda x: to_class(StickyReplacement, x), from_none], self.replacement) - result["text"] = from_str(self.text) - result["type"] = from_str(self.type) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) + if self.input is not None: + result["input"] = from_union([from_str, from_none], self.input) return result -class ConversationMessageCreateRequestType(Enum): +class PurpleType(Enum): """The type of the message""" ACTIVITY = "activity" @@ -9537,209 +9469,102 @@ class ConversationMessageCreateRequestType(Enum): USER = "user" -class ConversationMessageCreateRequest: - """Instance crud properties""" - - description: Optional[str] - """The associated description""" - - entities: Optional[List[ConversationMessageCreateRequestEntity]] - """Known entities""" +class SkillsetAbilityExecuteResponseMessage: + """A message in the conversation""" meta: Optional[Dict[str, Any]] """Meta data information""" - name: Optional[str] - """The associated name""" - text: str """The text of the message""" - type: ConversationMessageCreateRequestType + type: PurpleType """The type of the message""" - def __init__(self, description: Optional[str], entities: Optional[List[ConversationMessageCreateRequestEntity]], meta: Optional[Dict[str, Any]], name: Optional[str], text: str, type: ConversationMessageCreateRequestType) -> None: - self.description = description - self.entities = entities + def __init__(self, meta: Optional[Dict[str, Any]], text: str, type: PurpleType) -> None: self.meta = meta - self.name = name self.text = text self.type = type @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageCreateRequest': + def from_dict(obj: Any) -> 'SkillsetAbilityExecuteResponseMessage': assert isinstance(obj, dict) - description = from_union([from_str, from_none], obj.get("description")) - entities = from_union([lambda x: from_list(ConversationMessageCreateRequestEntity.from_dict, x), from_none], obj.get("entities")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) text = from_str(obj.get("text")) - type = ConversationMessageCreateRequestType(obj.get("type")) - return ConversationMessageCreateRequest(description, entities, meta, name, text, type) + type = PurpleType(obj.get("type")) + return SkillsetAbilityExecuteResponseMessage(meta, text, type) def to_dict(self) -> dict: result: dict = {} - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.entities is not None: - result["entities"] = from_union([lambda x: from_list(lambda x: to_class(ConversationMessageCreateRequestEntity, x), x), from_none], self.entities) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - result["text"] = from_str(self.text) - result["type"] = to_enum(ConversationMessageCreateRequestType, self.type) - return result - - -class IndigoReplacement: - begin: float - """Start offset""" - - end: float - """End offset""" - - text: str - """The text value of the replacement""" - - def __init__(self, begin: float, end: float, text: str) -> None: - self.begin = begin - self.end = end - self.text = text - - @staticmethod - def from_dict(obj: Any) -> 'IndigoReplacement': - assert isinstance(obj, dict) - begin = from_float(obj.get("begin")) - end = from_float(obj.get("end")) - text = from_str(obj.get("text")) - return IndigoReplacement(begin, end, text) - - def to_dict(self) -> dict: - result: dict = {} - result["begin"] = to_float(self.begin) - result["end"] = to_float(self.end) - result["text"] = from_str(self.text) - return result - - -class ConversationMessageCreateResponseEntity: - """Extracted entity from the message""" - - begin: float - """Start offset""" - - end: float - """End offset""" - - replacement: Optional[IndigoReplacement] - text: str - """The text value of the entity""" - - type: str - """The entity type""" - - def __init__(self, begin: float, end: float, replacement: Optional[IndigoReplacement], text: str, type: str) -> None: - self.begin = begin - self.end = end - self.replacement = replacement - self.text = text - self.type = type - - @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageCreateResponseEntity': - assert isinstance(obj, dict) - begin = from_float(obj.get("begin")) - end = from_float(obj.get("end")) - replacement = from_union([IndigoReplacement.from_dict, from_none], obj.get("replacement")) - text = from_str(obj.get("text")) - type = from_str(obj.get("type")) - return ConversationMessageCreateResponseEntity(begin, end, replacement, text, type) - - def to_dict(self) -> dict: - result: dict = {} - result["begin"] = to_float(self.begin) - result["end"] = to_float(self.end) - if self.replacement is not None: - result["replacement"] = from_union([lambda x: to_class(IndigoReplacement, x), from_none], self.replacement) result["text"] = from_str(self.text) - result["type"] = from_str(self.type) + result["type"] = to_enum(PurpleType, self.type) return result -class ConversationMessageCreateResponse: - entities: List[ConversationMessageCreateResponseEntity] - """Extracted entities from the message""" +class SkillsetAbilityExecuteResponseUsage: + """Usage information""" - id: str - """The ID of the created message""" + token: float + """The tokens used in this exchange""" - def __init__(self, entities: List[ConversationMessageCreateResponseEntity], id: str) -> None: - self.entities = entities - self.id = id + def __init__(self, token: float) -> None: + self.token = token @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageCreateResponse': + def from_dict(obj: Any) -> 'SkillsetAbilityExecuteResponseUsage': assert isinstance(obj, dict) - entities = from_list(ConversationMessageCreateResponseEntity.from_dict, obj.get("entities")) - id = from_str(obj.get("id")) - return ConversationMessageCreateResponse(entities, id) + token = from_float(obj.get("token")) + return SkillsetAbilityExecuteResponseUsage(token) def to_dict(self) -> dict: result: dict = {} - result["entities"] = from_list(lambda x: to_class(ConversationMessageCreateResponseEntity, x), self.entities) - result["id"] = from_str(self.id) + result["token"] = to_float(self.token) return result -class ConversationMessageListParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" - - -class ConversationMessageListParams: - conversation_id: str - """The ID of the conversation to list messages for""" +class SkillsetAbilityExecuteResponse: + error: Optional[str] + """Error message if execution failed""" - cursor: Optional[str] - """The cursor to use for pagination""" + messages: Optional[List[SkillsetAbilityExecuteResponseMessage]] + """Messages generated during execution""" - order: Optional[ConversationMessageListParamsOrder] - """The order of the paginated items""" + result: Any + """The result of the ability execution""" - take: Optional[int] - """The number of items to retrieve""" + usage: SkillsetAbilityExecuteResponseUsage + """Usage information""" - def __init__(self, conversation_id: str, cursor: Optional[str], order: Optional[ConversationMessageListParamsOrder], take: Optional[int]) -> None: - self.conversation_id = conversation_id - self.cursor = cursor - self.order = order - self.take = take + def __init__(self, error: Optional[str], messages: Optional[List[SkillsetAbilityExecuteResponseMessage]], result: Any, usage: SkillsetAbilityExecuteResponseUsage) -> None: + self.error = error + self.messages = messages + self.result = result + self.usage = usage @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageListParams': + def from_dict(obj: Any) -> 'SkillsetAbilityExecuteResponse': assert isinstance(obj, dict) - conversation_id = from_str(obj.get("conversationId")) - cursor = from_union([from_str, from_none], obj.get("cursor")) - order = from_union([ConversationMessageListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return ConversationMessageListParams(conversation_id, cursor, order, take) + error = from_union([from_str, from_none], obj.get("error")) + messages = from_union([lambda x: from_list(SkillsetAbilityExecuteResponseMessage.from_dict, x), from_none], obj.get("messages")) + result = obj.get("result") + usage = SkillsetAbilityExecuteResponseUsage.from_dict(obj.get("usage")) + return SkillsetAbilityExecuteResponse(error, messages, result, usage) def to_dict(self) -> dict: result: dict = {} - result["conversationId"] = from_str(self.conversation_id) - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(ConversationMessageListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + if self.error is not None: + result["error"] = from_union([from_str, from_none], self.error) + if self.messages is not None: + result["messages"] = from_union([lambda x: from_list(lambda x: to_class(SkillsetAbilityExecuteResponseMessage, x), x), from_none], self.messages) + if self.result is not None: + result["result"] = self.result + result["usage"] = to_class(SkillsetAbilityExecuteResponseUsage, self.usage) return result -class HilariousType(Enum): +class FluffyType(Enum): """The type of the message""" ACTIVITY = "activity" @@ -9752,97 +9577,41 @@ class HilariousType(Enum): USER = "user" -class ConversationMessageListResponseItem: - """Instance list properties""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - description: Optional[str] - """The associated description""" - - id: str - """The instance ID""" +class DataMessage: + """A message in the conversation""" meta: Optional[Dict[str, Any]] """Meta data information""" - name: Optional[str] - """The associated name""" - text: str """The text of the message""" - type: HilariousType + type: FluffyType """The type of the message""" - updated_at: float - """The timestamp (ms) when the instance was updated""" - - def __init__(self, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], text: str, type: HilariousType, updated_at: float) -> None: - self.created_at = created_at - self.description = description - self.id = id + def __init__(self, meta: Optional[Dict[str, Any]], text: str, type: FluffyType) -> None: self.meta = meta - self.name = name self.text = text self.type = type - self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageListResponseItem': + def from_dict(obj: Any) -> 'DataMessage': assert isinstance(obj, dict) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) text = from_str(obj.get("text")) - type = HilariousType(obj.get("type")) - updated_at = from_float(obj.get("updatedAt")) - return ConversationMessageListResponseItem(created_at, description, id, meta, name, text, type, updated_at) + type = FluffyType(obj.get("type")) + return DataMessage(meta, text, type) def to_dict(self) -> dict: result: dict = {} - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) result["text"] = from_str(self.text) - result["type"] = to_enum(HilariousType, self.type) - result["updatedAt"] = to_float(self.updated_at) - return result - - -class ConversationMessageListResponse: - cursor: str - """Cursor for fetching the next page""" - - items: List[ConversationMessageListResponseItem] - - def __init__(self, cursor: str, items: List[ConversationMessageListResponseItem]) -> None: - self.cursor = cursor - self.items = items - - @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageListResponse': - assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(ConversationMessageListResponseItem.from_dict, obj.get("items")) - return ConversationMessageListResponse(cursor, items) - - def to_dict(self) -> dict: - result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(ConversationMessageListResponseItem, x), self.items) + result["type"] = to_enum(FluffyType, self.type) return result -class AmbitiousType(Enum): +class TentacledType(Enum): """The type of the message""" ACTIVITY = "activity" @@ -9855,1650 +9624,1597 @@ class AmbitiousType(Enum): USER = "user" -class ConversationMessageListStreamItemData: - """Instance list properties""" - - created_at: float - """The timestamp (ms) when the instance was created""" +class PurpleUsage: + """Usage information""" - description: Optional[str] - """The associated description""" + token: float + """The tokens used in this exchange""" - id: str - """The instance ID""" + def __init__(self, token: float) -> None: + self.token = token - meta: Optional[Dict[str, Any]] - """Meta data information""" + @staticmethod + def from_dict(obj: Any) -> 'PurpleUsage': + assert isinstance(obj, dict) + token = from_float(obj.get("token")) + return PurpleUsage(token) - name: Optional[str] - """The associated name""" + def to_dict(self) -> dict: + result: dict = {} + result["token"] = to_float(self.token) + return result - text: str - """The text of the message""" - type: AmbitiousType - """The type of the message""" +class SkillsetAbilityExecuteStreamItemData: + """The data for the event + + A message in the conversation + + Information about an abort event in a streamed response + """ + error: Optional[str] + """Error message if execution failed""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + messages: Optional[List[DataMessage]] + """Messages generated during execution""" - def __init__(self, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], text: str, type: AmbitiousType, updated_at: float) -> None: - self.created_at = created_at - self.description = description - self.id = id + result: Any + """The result of the ability execution""" + + usage: Optional[PurpleUsage] + """Usage information""" + + message: Optional[str] + """The error message""" + + token: Optional[str] + """The token generated""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" + + text: Optional[str] + """The text of the message""" + + type: Optional[TentacledType] + """The type of the message""" + + function_name: Optional[str] + """The function or tool associated with the abort""" + + reason: Any + """The abort reason if available""" + + input_tokens_used: Optional[float] + """The number of input tokens used""" + + model: Optional[str] + """The model used""" + + output_tokens_used: Optional[float] + """The number of output tokens used""" + + def __init__(self, error: Optional[str], messages: Optional[List[DataMessage]], result: Any, usage: Optional[PurpleUsage], message: Optional[str], token: Optional[str], meta: Optional[Dict[str, Any]], text: Optional[str], type: Optional[TentacledType], function_name: Optional[str], reason: Any, input_tokens_used: Optional[float], model: Optional[str], output_tokens_used: Optional[float]) -> None: + self.error = error + self.messages = messages + self.result = result + self.usage = usage + self.message = message + self.token = token self.meta = meta - self.name = name self.text = text self.type = type - self.updated_at = updated_at + self.function_name = function_name + self.reason = reason + self.input_tokens_used = input_tokens_used + self.model = model + self.output_tokens_used = output_tokens_used @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageListStreamItemData': + def from_dict(obj: Any) -> 'SkillsetAbilityExecuteStreamItemData': assert isinstance(obj, dict) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) + error = from_union([from_str, from_none], obj.get("error")) + messages = from_union([lambda x: from_list(DataMessage.from_dict, x), from_none], obj.get("messages")) + result = obj.get("result") + usage = from_union([PurpleUsage.from_dict, from_none], obj.get("usage")) + message = from_union([from_str, from_none], obj.get("message")) + token = from_union([from_str, from_none], obj.get("token")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - text = from_str(obj.get("text")) - type = AmbitiousType(obj.get("type")) - updated_at = from_float(obj.get("updatedAt")) - return ConversationMessageListStreamItemData(created_at, description, id, meta, name, text, type, updated_at) + text = from_union([from_str, from_none], obj.get("text")) + type = from_union([TentacledType, from_none], obj.get("type")) + function_name = from_union([from_str, from_none], obj.get("functionName")) + reason = obj.get("reason") + input_tokens_used = from_union([from_float, from_none], obj.get("inputTokensUsed")) + model = from_union([from_str, from_none], obj.get("model")) + output_tokens_used = from_union([from_float, from_none], obj.get("outputTokensUsed")) + return SkillsetAbilityExecuteStreamItemData(error, messages, result, usage, message, token, meta, text, type, function_name, reason, input_tokens_used, model, output_tokens_used) def to_dict(self) -> dict: result: dict = {} - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) + if self.error is not None: + result["error"] = from_union([from_str, from_none], self.error) + if self.messages is not None: + result["messages"] = from_union([lambda x: from_list(lambda x: to_class(DataMessage, x), x), from_none], self.messages) + if self.result is not None: + result["result"] = self.result + if self.usage is not None: + result["usage"] = from_union([lambda x: to_class(PurpleUsage, x), from_none], self.usage) + if self.message is not None: + result["message"] = from_union([from_str, from_none], self.message) + if self.token is not None: + result["token"] = from_union([from_str, from_none], self.token) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - result["text"] = from_str(self.text) - result["type"] = to_enum(AmbitiousType, self.type) - result["updatedAt"] = to_float(self.updated_at) + if self.text is not None: + result["text"] = from_union([from_str, from_none], self.text) + if self.type is not None: + result["type"] = from_union([lambda x: to_enum(TentacledType, x), from_none], self.type) + if self.function_name is not None: + result["functionName"] = from_union([from_str, from_none], self.function_name) + if self.reason is not None: + result["reason"] = self.reason + if self.input_tokens_used is not None: + result["inputTokensUsed"] = from_union([to_float, from_none], self.input_tokens_used) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) + if self.output_tokens_used is not None: + result["outputTokensUsed"] = from_union([to_float, from_none], self.output_tokens_used) return result -class ConversationMessageListStreamItemType(Enum): +class SkillsetAbilityExecuteStreamItemType(Enum): """The type of event""" - ITEM = "item" - + ABORT = "abort" + COMPLETE_BEGIN = "completeBegin" + COMPLETE_END = "completeEnd" + ERROR = "error" + MESSAGE = "message" + REASONING_TOKEN = "reasoningToken" + RESULT = "result" + TOKEN = "token" + USAGE = "usage" + WAIT_FOR_CHANNEL_MESSAGE_BEGIN = "waitForChannelMessageBegin" + WAIT_FOR_CHANNEL_MESSAGE_END = "waitForChannelMessageEnd" -class ConversationMessageListStreamItem: - data: ConversationMessageListStreamItemData - """Instance list properties""" - type: ConversationMessageListStreamItemType +class SkillsetAbilityExecuteStreamItem: + data: SkillsetAbilityExecuteStreamItemData + """The data for the event + + A message in the conversation + + Information about an abort event in a streamed response + """ + type: SkillsetAbilityExecuteStreamItemType """The type of event""" - def __init__(self, data: ConversationMessageListStreamItemData, type: ConversationMessageListStreamItemType) -> None: + def __init__(self, data: SkillsetAbilityExecuteStreamItemData, type: SkillsetAbilityExecuteStreamItemType) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageListStreamItem': + def from_dict(obj: Any) -> 'SkillsetAbilityExecuteStreamItem': assert isinstance(obj, dict) - data = ConversationMessageListStreamItemData.from_dict(obj.get("data")) - type = ConversationMessageListStreamItemType(obj.get("type")) - return ConversationMessageListStreamItem(data, type) + data = SkillsetAbilityExecuteStreamItemData.from_dict(obj.get("data")) + type = SkillsetAbilityExecuteStreamItemType(obj.get("type")) + return SkillsetAbilityExecuteStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(ConversationMessageListStreamItemData, self.data) - result["type"] = to_enum(ConversationMessageListStreamItemType, self.type) + result["data"] = to_class(SkillsetAbilityExecuteStreamItemData, self.data) + result["type"] = to_enum(SkillsetAbilityExecuteStreamItemType, self.type) return result -class ConversationMessageReceiveParams: - conversation_id: str - """The ID of the conversation to receive message from""" +class SkillsetAbilityDeleteParams: + ability_id: str + """The ID of the ability to delete""" - def __init__(self, conversation_id: str) -> None: - self.conversation_id = conversation_id + skillset_id: str + """The ID of the skillset""" + + def __init__(self, ability_id: str, skillset_id: str) -> None: + self.ability_id = ability_id + self.skillset_id = skillset_id @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageReceiveParams': + def from_dict(obj: Any) -> 'SkillsetAbilityDeleteParams': assert isinstance(obj, dict) - conversation_id = from_str(obj.get("conversationId")) - return ConversationMessageReceiveParams(conversation_id) + ability_id = from_str(obj.get("abilityId")) + skillset_id = from_str(obj.get("skillsetId")) + return SkillsetAbilityDeleteParams(ability_id, skillset_id) def to_dict(self) -> dict: result: dict = {} - result["conversationId"] = from_str(self.conversation_id) + result["abilityId"] = from_str(self.ability_id) + result["skillsetId"] = from_str(self.skillset_id) return result -class TentacledRecord: - meta: Optional[Dict[str, Any]] - """Additional metadata for the record""" - - text: str - """The text content of the record""" +class SkillsetAbilityDeleteResponse: + id: str + """The ID of the deleted ability""" - def __init__(self, meta: Optional[Dict[str, Any]], text: str) -> None: - self.meta = meta - self.text = text + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'TentacledRecord': + def from_dict(obj: Any) -> 'SkillsetAbilityDeleteResponse': assert isinstance(obj, dict) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - text = from_str(obj.get("text")) - return TentacledRecord(meta, text) + id = from_str(obj.get("id")) + return SkillsetAbilityDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["text"] = from_str(self.text) + result["id"] = from_str(self.id) return result -class TentacledDataset: - description: Optional[str] - """The description of the dataset""" +class SecretListParamsOrder(Enum): + """The order of the paginated items""" - name: Optional[str] - """The name of the dataset""" + ASC = "asc" + DESC = "desc" - records: List[TentacledRecord] - """The records in the dataset""" - def __init__(self, description: Optional[str], name: Optional[str], records: List[TentacledRecord]) -> None: - self.description = description - self.name = name - self.records = records +class SecretListParams: + cursor: Optional[str] + """The cursor to use for pagination""" + + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" + + order: Optional[SecretListParamsOrder] + """The order of the paginated items""" + + take: Optional[int] + """The number of items to retrieve""" + + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[SecretListParamsOrder], take: Optional[int]) -> None: + self.cursor = cursor + self.meta = meta + self.order = order + self.take = take @staticmethod - def from_dict(obj: Any) -> 'TentacledDataset': + def from_dict(obj: Any) -> 'SecretListParams': assert isinstance(obj, dict) - description = from_union([from_str, from_none], obj.get("description")) - name = from_union([from_str, from_none], obj.get("name")) - records = from_list(TentacledRecord.from_dict, obj.get("records")) - return TentacledDataset(description, name, records) + cursor = from_union([from_str, from_none], obj.get("cursor")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([SecretListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return SecretListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - result["records"] = from_list(lambda x: to_class(TentacledRecord, x), self.records) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(SecretListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class TentacledFeature: - name: str - """The name of the feature to enable""" +class FluffyKind(Enum): + """The kind of the secret""" - options: Optional[Dict[str, Any]] - """Optional configuration options for the feature""" + PERSONAL = "personal" + SHARED = "shared" - def __init__(self, name: str, options: Optional[Dict[str, Any]]) -> None: - self.name = name - self.options = options - @staticmethod - def from_dict(obj: Any) -> 'TentacledFeature': - assert isinstance(obj, dict) - name = from_str(obj.get("name")) - options = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("options")) - return TentacledFeature(name, options) +class StickyType(Enum): + """The type of the secret""" - def to_dict(self) -> dict: - result: dict = {} - result["name"] = from_str(self.name) - if self.options is not None: - result["options"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.options) - return result + BASIC = "basic" + BEARER = "bearer" + JWT = "jwt" + OAUTH = "oauth" + PLAIN = "plain" + REFERENCE = "reference" + TEMPLATE = "template" -class TentacledAbility: - description: str - """The description of the ability""" +class TentacledVisibility(Enum): + """The visibility of the secret""" - instruction: str - """The instruction for the ability""" + PRIVATE = "private" + PROTECTED = "protected" + PUBLIC = "public" - meta: Optional[Dict[str, Any]] - """Additional metadata for the ability""" - name: str - """The name of the ability""" +class SecretListResponseItem: + """Blueprint properties""" - secret_id: Optional[str] - """Optional secret ID for the ability""" + alias: Optional[str] + """The unique alias for the instance""" - def __init__(self, description: str, instruction: str, meta: Optional[Dict[str, Any]], name: str, secret_id: Optional[str]) -> None: - self.description = description - self.instruction = instruction - self.meta = meta - self.name = name - self.secret_id = secret_id + blueprint_id: Optional[str] + """The ID of the blueprint""" - @staticmethod - def from_dict(obj: Any) -> 'TentacledAbility': - assert isinstance(obj, dict) - description = from_str(obj.get("description")) - instruction = from_str(obj.get("instruction")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - secret_id = from_union([from_str, from_none], obj.get("secretId")) - return TentacledAbility(description, instruction, meta, name, secret_id) + config: Optional[Dict[str, Any]] + """The config of the secret (config.clientSecret is returned as '********' if configured, + null otherwise) + """ + created_at: float + """The timestamp (ms) when the instance was created""" - def to_dict(self) -> dict: - result: dict = {} - result["description"] = from_str(self.description) - result["instruction"] = from_str(self.instruction) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - if self.secret_id is not None: - result["secretId"] = from_union([from_str, from_none], self.secret_id) - return result + description: Optional[str] + """The associated description""" + id: str + """The instance ID""" -class TentacledSkillset: - abilities: List[TentacledAbility] - """The abilities in the skillset""" + kind: Optional[FluffyKind] + """The kind of the secret""" - description: Optional[str] - """The description of the skillset""" + meta: Optional[Dict[str, Any]] + """Meta data information""" name: Optional[str] - """The name of the skillset""" + """The associated name""" - def __init__(self, abilities: List[TentacledAbility], description: Optional[str], name: Optional[str]) -> None: - self.abilities = abilities + type: Optional[StickyType] + """The type of the secret""" + + updated_at: float + """The timestamp (ms) when the instance was updated""" + + visibility: Optional[TentacledVisibility] + """The visibility of the secret""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], config: Optional[Dict[str, Any]], created_at: float, description: Optional[str], id: str, kind: Optional[FluffyKind], meta: Optional[Dict[str, Any]], name: Optional[str], type: Optional[StickyType], updated_at: float, visibility: Optional[TentacledVisibility]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.config = config + self.created_at = created_at self.description = description + self.id = id + self.kind = kind + self.meta = meta self.name = name + self.type = type + self.updated_at = updated_at + self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'TentacledSkillset': + def from_dict(obj: Any) -> 'SecretListResponseItem': assert isinstance(obj, dict) - abilities = from_list(TentacledAbility.from_dict, obj.get("abilities")) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) + kind = from_union([FluffyKind, from_none], obj.get("kind")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - return TentacledSkillset(abilities, description, name) + type = from_union([StickyType, from_none], obj.get("type")) + updated_at = from_float(obj.get("updatedAt")) + visibility = from_union([TentacledVisibility, from_none], obj.get("visibility")) + return SecretListResponseItem(alias, blueprint_id, config, created_at, description, id, kind, meta, name, type, updated_at, visibility) def to_dict(self) -> dict: result: dict = {} - result["abilities"] = from_list(lambda x: to_class(TentacledAbility, x), self.abilities) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.config is not None: + result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) + if self.kind is not None: + result["kind"] = from_union([lambda x: to_enum(FluffyKind, x), from_none], self.kind) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.type is not None: + result["type"] = from_union([lambda x: to_enum(StickyType, x), from_none], self.type) + result["updatedAt"] = to_float(self.updated_at) + if self.visibility is not None: + result["visibility"] = from_union([lambda x: to_enum(TentacledVisibility, x), from_none], self.visibility) return result -class ConversationMessageReceiveRequestExtensions: - """Extensions to enhance the bot's capabilities""" - - backstory: Optional[str] - """Additional backstory for the bot""" - - datasets: Optional[List[TentacledDataset]] - """Inline datasets to provide additional context""" - - features: Optional[List[TentacledFeature]] - """Feature flags to enable specific bot capabilities""" +class SecretListResponse: + cursor: str + """Cursor for fetching the next page""" - skillsets: Optional[List[TentacledSkillset]] - """Inline skillsets to provide additional abilities""" + items: List[SecretListResponseItem] - def __init__(self, backstory: Optional[str], datasets: Optional[List[TentacledDataset]], features: Optional[List[TentacledFeature]], skillsets: Optional[List[TentacledSkillset]]) -> None: - self.backstory = backstory - self.datasets = datasets - self.features = features - self.skillsets = skillsets + def __init__(self, cursor: str, items: List[SecretListResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageReceiveRequestExtensions': + def from_dict(obj: Any) -> 'SecretListResponse': assert isinstance(obj, dict) - backstory = from_union([from_str, from_none], obj.get("backstory")) - datasets = from_union([lambda x: from_list(TentacledDataset.from_dict, x), from_none], obj.get("datasets")) - features = from_union([lambda x: from_list(TentacledFeature.from_dict, x), from_none], obj.get("features")) - skillsets = from_union([lambda x: from_list(TentacledSkillset.from_dict, x), from_none], obj.get("skillsets")) - return ConversationMessageReceiveRequestExtensions(backstory, datasets, features, skillsets) + cursor = from_str(obj.get("cursor")) + items = from_list(SecretListResponseItem.from_dict, obj.get("items")) + return SecretListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - if self.backstory is not None: - result["backstory"] = from_union([from_str, from_none], self.backstory) - if self.datasets is not None: - result["datasets"] = from_union([lambda x: from_list(lambda x: to_class(TentacledDataset, x), x), from_none], self.datasets) - if self.features is not None: - result["features"] = from_union([lambda x: from_list(lambda x: to_class(TentacledFeature, x), x), from_none], self.features) - if self.skillsets is not None: - result["skillsets"] = from_union([lambda x: from_list(lambda x: to_class(TentacledSkillset, x), x), from_none], self.skillsets) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(SecretListResponseItem, x), self.items) return result -class TentacledCall: - """Configuration for when this function should be automatically called""" +class TentacledKind(Enum): + """The kind of the secret""" - end: Optional[bool] - """If true, this function will be force-called at the end of the conversation""" + PERSONAL = "personal" + SHARED = "shared" - start: Optional[bool] - """If true, this function will be force-called at the start of the conversation""" - def __init__(self, end: Optional[bool], start: Optional[bool]) -> None: - self.end = end - self.start = start +class IndigoType(Enum): + """The type of the secret""" - @staticmethod - def from_dict(obj: Any) -> 'TentacledCall': - assert isinstance(obj, dict) - end = from_union([from_bool, from_none], obj.get("end")) - start = from_union([from_bool, from_none], obj.get("start")) - return TentacledCall(end, start) + BASIC = "basic" + BEARER = "bearer" + JWT = "jwt" + OAUTH = "oauth" + PLAIN = "plain" + REFERENCE = "reference" + TEMPLATE = "template" - def to_dict(self) -> dict: - result: dict = {} - if self.end is not None: - result["end"] = from_union([from_bool, from_none], self.end) - if self.start is not None: - result["start"] = from_union([from_bool, from_none], self.start) - return result +class StickyVisibility(Enum): + """The visibility of the secret""" -class CunningType(Enum): - """The schema type, must be "object\"""" + PRIVATE = "private" + PROTECTED = "protected" + PUBLIC = "public" - OBJECT = "object" +class SecretListStreamItemData: + """Blueprint properties""" -class TentacledParameters: - """JSON Schema definition for the function parameters""" + alias: Optional[str] + """The unique alias for the instance""" - properties: Dict[str, Any] - """Object property definitions""" + blueprint_id: Optional[str] + """The ID of the blueprint""" - required: Optional[List[str]] - """Required property names""" + config: Optional[Dict[str, Any]] + """The config of the secret (config.clientSecret is returned as '********' if configured, + null otherwise) + """ + created_at: float + """The timestamp (ms) when the instance was created""" - type: CunningType - """The schema type, must be "object\"""" + description: Optional[str] + """The associated description""" - def __init__(self, properties: Dict[str, Any], required: Optional[List[str]], type: CunningType) -> None: - self.properties = properties - self.required = required + id: str + """The instance ID""" + + kind: Optional[TentacledKind] + """The kind of the secret""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" + + name: Optional[str] + """The associated name""" + + type: Optional[IndigoType] + """The type of the secret""" + + updated_at: float + """The timestamp (ms) when the instance was updated""" + + visibility: Optional[StickyVisibility] + """The visibility of the secret""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], config: Optional[Dict[str, Any]], created_at: float, description: Optional[str], id: str, kind: Optional[TentacledKind], meta: Optional[Dict[str, Any]], name: Optional[str], type: Optional[IndigoType], updated_at: float, visibility: Optional[StickyVisibility]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.config = config + self.created_at = created_at + self.description = description + self.id = id + self.kind = kind + self.meta = meta + self.name = name self.type = type + self.updated_at = updated_at + self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'TentacledParameters': + def from_dict(obj: Any) -> 'SecretListStreamItemData': assert isinstance(obj, dict) - properties = from_dict(lambda x: x, obj.get("properties")) - required = from_union([lambda x: from_list(from_str, x), from_none], obj.get("required")) - type = CunningType(obj.get("type")) - return TentacledParameters(properties, required, type) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) + created_at = from_float(obj.get("createdAt")) + description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) + kind = from_union([TentacledKind, from_none], obj.get("kind")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + type = from_union([IndigoType, from_none], obj.get("type")) + updated_at = from_float(obj.get("updatedAt")) + visibility = from_union([StickyVisibility, from_none], obj.get("visibility")) + return SecretListStreamItemData(alias, blueprint_id, config, created_at, description, id, kind, meta, name, type, updated_at, visibility) def to_dict(self) -> dict: result: dict = {} - result["properties"] = from_dict(lambda x: x, self.properties) - if self.required is not None: - result["required"] = from_union([lambda x: from_list(from_str, x), from_none], self.required) - result["type"] = to_enum(CunningType, self.type) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.config is not None: + result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) + result["createdAt"] = to_float(self.created_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) + if self.kind is not None: + result["kind"] = from_union([lambda x: to_enum(TentacledKind, x), from_none], self.kind) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.type is not None: + result["type"] = from_union([lambda x: to_enum(IndigoType, x), from_none], self.type) + result["updatedAt"] = to_float(self.updated_at) + if self.visibility is not None: + result["visibility"] = from_union([lambda x: to_enum(StickyVisibility, x), from_none], self.visibility) return result -class TentacledResult: - """The result of the function execution""" +class SecretListStreamItemType(Enum): + """The type of event""" - data: Any - """The data returned by the function (can be any type)""" + ITEM = "item" - channel: Optional[str] - """The channel for streaming function results""" - def __init__(self, data: Any, channel: Optional[str]) -> None: +class SecretListStreamItem: + data: SecretListStreamItemData + """Blueprint properties""" + + type: SecretListStreamItemType + """The type of event""" + + def __init__(self, data: SecretListStreamItemData, type: SecretListStreamItemType) -> None: self.data = data - self.channel = channel + self.type = type @staticmethod - def from_dict(obj: Any) -> 'TentacledResult': + def from_dict(obj: Any) -> 'SecretListStreamItem': assert isinstance(obj, dict) - data = obj.get("data") - channel = from_union([from_str, from_none], obj.get("channel")) - return TentacledResult(data, channel) + data = SecretListStreamItemData.from_dict(obj.get("data")) + type = SecretListStreamItemType(obj.get("type")) + return SecretListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - if self.data is not None: - result["data"] = self.data - if self.channel is not None: - result["channel"] = from_union([from_str, from_none], self.channel) + result["data"] = to_class(SecretListStreamItemData, self.data) + result["type"] = to_enum(SecretListStreamItemType, self.type) return result -class ConversationMessageReceiveRequestFunction: - call: Optional[TentacledCall] - """Configuration for when this function should be automatically called""" +class SecretCreateRequestKind(Enum): + """The kind of the secret""" - description: str - """The description of the function""" + PERSONAL = "personal" + SHARED = "shared" - name: str - """The name of the function (must be a valid JS identifier, max 64 chars)""" - parameters: TentacledParameters - """JSON Schema definition for the function parameters""" +class SecretCreateRequestType(Enum): + """The type of the secret""" - result: Optional[TentacledResult] - """The result of the function execution""" + BASIC = "basic" + BEARER = "bearer" + JWT = "jwt" + OAUTH = "oauth" + PLAIN = "plain" + REFERENCE = "reference" + TEMPLATE = "template" - def __init__(self, call: Optional[TentacledCall], description: str, name: str, parameters: TentacledParameters, result: Optional[TentacledResult]) -> None: - self.call = call - self.description = description - self.name = name - self.parameters = parameters - self.result = result - @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageReceiveRequestFunction': - assert isinstance(obj, dict) - call = from_union([TentacledCall.from_dict, from_none], obj.get("call")) - description = from_str(obj.get("description")) - name = from_str(obj.get("name")) - parameters = TentacledParameters.from_dict(obj.get("parameters")) - result = from_union([TentacledResult.from_dict, from_none], obj.get("result")) - return ConversationMessageReceiveRequestFunction(call, description, name, parameters, result) +class SecretCreateRequestVisibility(Enum): + """The visibility of the secret""" - def to_dict(self) -> dict: - result: dict = {} - if self.call is not None: - result["call"] = from_union([lambda x: to_class(TentacledCall, x), from_none], self.call) - result["description"] = from_str(self.description) - result["name"] = from_str(self.name) - result["parameters"] = to_class(TentacledParameters, self.parameters) - if self.result is not None: - result["result"] = from_union([lambda x: to_class(TentacledResult, x), from_none], self.result) - return result + PRIVATE = "private" + PROTECTED = "protected" + PUBLIC = "public" -class ConversationMessageReceiveRequest: - extensions: Optional[ConversationMessageReceiveRequestExtensions] - """Extensions to enhance the bot's capabilities""" +class SecretCreateRequest: + """Blueprint properties""" - functions: Optional[List[ConversationMessageReceiveRequestFunction]] - """An array of functions to be added to the conversation""" + alias: Optional[str] + """The unique alias for the instance""" - def __init__(self, extensions: Optional[ConversationMessageReceiveRequestExtensions], functions: Optional[List[ConversationMessageReceiveRequestFunction]]) -> None: - self.extensions = extensions - self.functions = functions + blueprint_id: Optional[str] + """The ID of the blueprint""" - @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageReceiveRequest': - assert isinstance(obj, dict) - extensions = from_union([ConversationMessageReceiveRequestExtensions.from_dict, from_none], obj.get("extensions")) - functions = from_union([lambda x: from_list(ConversationMessageReceiveRequestFunction.from_dict, x), from_none], obj.get("functions")) - return ConversationMessageReceiveRequest(extensions, functions) + config: Optional[Dict[str, Any]] + """The config of the secret""" - def to_dict(self) -> dict: - result: dict = {} - if self.extensions is not None: - result["extensions"] = from_union([lambda x: to_class(ConversationMessageReceiveRequestExtensions, x), from_none], self.extensions) - if self.functions is not None: - result["functions"] = from_union([lambda x: from_list(lambda x: to_class(ConversationMessageReceiveRequestFunction, x), x), from_none], self.functions) - return result + description: Optional[str] + """The associated description""" + kind: Optional[SecretCreateRequestKind] + """The kind of the secret""" -class ConversationMessageReceiveResponseUsage: - """Usage information""" + meta: Optional[Dict[str, Any]] + """Meta data information""" - token: float - """The tokens used in this exchange""" + name: Optional[str] + """The associated name""" - def __init__(self, token: float) -> None: - self.token = token + type: Optional[SecretCreateRequestType] + """The type of the secret""" + + value: Optional[str] + """The value of the secret""" + + visibility: Optional[SecretCreateRequestVisibility] + """The visibility of the secret""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], config: Optional[Dict[str, Any]], description: Optional[str], kind: Optional[SecretCreateRequestKind], meta: Optional[Dict[str, Any]], name: Optional[str], type: Optional[SecretCreateRequestType], value: Optional[str], visibility: Optional[SecretCreateRequestVisibility]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.config = config + self.description = description + self.kind = kind + self.meta = meta + self.name = name + self.type = type + self.value = value + self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageReceiveResponseUsage': + def from_dict(obj: Any) -> 'SecretCreateRequest': assert isinstance(obj, dict) - token = from_float(obj.get("token")) - return ConversationMessageReceiveResponseUsage(token) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) + description = from_union([from_str, from_none], obj.get("description")) + kind = from_union([SecretCreateRequestKind, from_none], obj.get("kind")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + type = from_union([SecretCreateRequestType, from_none], obj.get("type")) + value = from_union([from_str, from_none], obj.get("value")) + visibility = from_union([SecretCreateRequestVisibility, from_none], obj.get("visibility")) + return SecretCreateRequest(alias, blueprint_id, config, description, kind, meta, name, type, value, visibility) def to_dict(self) -> dict: result: dict = {} - result["token"] = to_float(self.token) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.config is not None: + result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.kind is not None: + result["kind"] = from_union([lambda x: to_enum(SecretCreateRequestKind, x), from_none], self.kind) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.type is not None: + result["type"] = from_union([lambda x: to_enum(SecretCreateRequestType, x), from_none], self.type) + if self.value is not None: + result["value"] = from_union([from_str, from_none], self.value) + if self.visibility is not None: + result["visibility"] = from_union([lambda x: to_enum(SecretCreateRequestVisibility, x), from_none], self.visibility) return result -class ConversationMessageReceiveResponse: +class SecretCreateResponse: id: str - """The ID of the created message""" - - text: str - """The text of the message received""" - - usage: ConversationMessageReceiveResponseUsage - """Usage information""" + """The ID of the created secret""" - def __init__(self, id: str, text: str, usage: ConversationMessageReceiveResponseUsage) -> None: + def __init__(self, id: str) -> None: self.id = id - self.text = text - self.usage = usage @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageReceiveResponse': + def from_dict(obj: Any) -> 'SecretCreateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - text = from_str(obj.get("text")) - usage = ConversationMessageReceiveResponseUsage.from_dict(obj.get("usage")) - return ConversationMessageReceiveResponse(id, text, usage) + return SecretCreateResponse(id) def to_dict(self) -> dict: result: dict = {} result["id"] = from_str(self.id) - result["text"] = from_str(self.text) - result["usage"] = to_class(ConversationMessageReceiveResponseUsage, self.usage) return result -class MagentaType(Enum): - """The type of the message""" - - ACTIVITY = "activity" - BACKSTORY = "backstory" - BOT = "bot" - CHECKPOINT = "checkpoint" - CONTEXT = "context" - INSTRUCTION = "instruction" - REASONING = "reasoning" - USER = "user" - - -class FluffyUsage: - """Usage information""" - - token: float - """The tokens used in this exchange""" +class SecretVerifyParams: + secret_id: str + """The ID of the secret to be verified""" - def __init__(self, token: float) -> None: - self.token = token + def __init__(self, secret_id: str) -> None: + self.secret_id = secret_id @staticmethod - def from_dict(obj: Any) -> 'FluffyUsage': + def from_dict(obj: Any) -> 'SecretVerifyParams': assert isinstance(obj, dict) - token = from_float(obj.get("token")) - return FluffyUsage(token) + secret_id = from_str(obj.get("secretId")) + return SecretVerifyParams(secret_id) def to_dict(self) -> dict: result: dict = {} - result["token"] = to_float(self.token) + result["secretId"] = from_str(self.secret_id) return result -class ConversationMessageReceiveStreamItemData: - """The data for the event - - A message in the conversation - - Information about an abort event in a streamed response - """ - id: Optional[str] - """The ID of the created message""" - - text: Optional[str] - """The text of the message received - - The text of the message - """ - usage: Optional[FluffyUsage] - """Usage information""" - - message: Optional[str] - """The error message""" - - token: Optional[str] - """The token generated""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - type: Optional[MagentaType] - """The type of the message""" +class IndecentType(Enum): + """The type of action to take""" - function_name: Optional[str] - """The function or tool associated with the abort""" + AUTHENTICATE = "authenticate" - reason: Any - """The abort reason if available""" - input_tokens_used: Optional[float] - """The number of input tokens used""" +class SecretVerifyResponseAction: + """The action to take next""" - model: Optional[str] - """The model used""" + type: IndecentType + """The type of action to take""" - output_tokens_used: Optional[float] - """The number of output tokens used""" + url: str + """The URL to authenticate the secret""" - def __init__(self, id: Optional[str], text: Optional[str], usage: Optional[FluffyUsage], message: Optional[str], token: Optional[str], meta: Optional[Dict[str, Any]], type: Optional[MagentaType], function_name: Optional[str], reason: Any, input_tokens_used: Optional[float], model: Optional[str], output_tokens_used: Optional[float]) -> None: - self.id = id - self.text = text - self.usage = usage - self.message = message - self.token = token - self.meta = meta + def __init__(self, type: IndecentType, url: str) -> None: self.type = type - self.function_name = function_name - self.reason = reason - self.input_tokens_used = input_tokens_used - self.model = model - self.output_tokens_used = output_tokens_used + self.url = url @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageReceiveStreamItemData': + def from_dict(obj: Any) -> 'SecretVerifyResponseAction': assert isinstance(obj, dict) - id = from_union([from_str, from_none], obj.get("id")) - text = from_union([from_str, from_none], obj.get("text")) - usage = from_union([FluffyUsage.from_dict, from_none], obj.get("usage")) - message = from_union([from_str, from_none], obj.get("message")) - token = from_union([from_str, from_none], obj.get("token")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - type = from_union([MagentaType, from_none], obj.get("type")) - function_name = from_union([from_str, from_none], obj.get("functionName")) - reason = obj.get("reason") - input_tokens_used = from_union([from_float, from_none], obj.get("inputTokensUsed")) - model = from_union([from_str, from_none], obj.get("model")) - output_tokens_used = from_union([from_float, from_none], obj.get("outputTokensUsed")) - return ConversationMessageReceiveStreamItemData(id, text, usage, message, token, meta, type, function_name, reason, input_tokens_used, model, output_tokens_used) + type = IndecentType(obj.get("type")) + url = from_str(obj.get("url")) + return SecretVerifyResponseAction(type, url) def to_dict(self) -> dict: result: dict = {} - if self.id is not None: - result["id"] = from_union([from_str, from_none], self.id) - if self.text is not None: - result["text"] = from_union([from_str, from_none], self.text) - if self.usage is not None: - result["usage"] = from_union([lambda x: to_class(FluffyUsage, x), from_none], self.usage) - if self.message is not None: - result["message"] = from_union([from_str, from_none], self.message) - if self.token is not None: - result["token"] = from_union([from_str, from_none], self.token) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.type is not None: - result["type"] = from_union([lambda x: to_enum(MagentaType, x), from_none], self.type) - if self.function_name is not None: - result["functionName"] = from_union([from_str, from_none], self.function_name) - if self.reason is not None: - result["reason"] = self.reason - if self.input_tokens_used is not None: - result["inputTokensUsed"] = from_union([to_float, from_none], self.input_tokens_used) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) - if self.output_tokens_used is not None: - result["outputTokensUsed"] = from_union([to_float, from_none], self.output_tokens_used) + result["type"] = to_enum(IndecentType, self.type) + result["url"] = from_str(self.url) return result -class ConversationMessageReceiveStreamItemType(Enum): - """The type of event""" +class SecretVerifyResponseStatus(Enum): + """The status of the secret""" - ABORT = "abort" - COMPLETE_BEGIN = "completeBegin" - COMPLETE_END = "completeEnd" - ERROR = "error" - MESSAGE = "message" - REASONING_TOKEN = "reasoningToken" - RESULT = "result" - TOKEN = "token" - USAGE = "usage" - WAIT_FOR_CHANNEL_MESSAGE_BEGIN = "waitForChannelMessageBegin" - WAIT_FOR_CHANNEL_MESSAGE_END = "waitForChannelMessageEnd" + AUTHENTICATED = "authenticated" + UNAUTHENTICATED = "unauthenticated" -class ConversationMessageReceiveStreamItem: - data: Optional[ConversationMessageReceiveStreamItemData] - """The data for the event - - A message in the conversation - - Information about an abort event in a streamed response - """ - type: Optional[ConversationMessageReceiveStreamItemType] - """The type of event""" +class SecretVerifyResponse: + action: Optional[SecretVerifyResponseAction] + id: str + """The ID of the verified secret""" - def __init__(self, data: Optional[ConversationMessageReceiveStreamItemData], type: Optional[ConversationMessageReceiveStreamItemType]) -> None: - self.data = data - self.type = type + status: SecretVerifyResponseStatus + """The status of the secret""" + + def __init__(self, action: Optional[SecretVerifyResponseAction], id: str, status: SecretVerifyResponseStatus) -> None: + self.action = action + self.id = id + self.status = status @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageReceiveStreamItem': + def from_dict(obj: Any) -> 'SecretVerifyResponse': assert isinstance(obj, dict) - data = from_union([ConversationMessageReceiveStreamItemData.from_dict, from_none], obj.get("data")) - type = from_union([ConversationMessageReceiveStreamItemType, from_none], obj.get("type")) - return ConversationMessageReceiveStreamItem(data, type) + action = from_union([SecretVerifyResponseAction.from_dict, from_none], obj.get("action")) + id = from_str(obj.get("id")) + status = SecretVerifyResponseStatus(obj.get("status")) + return SecretVerifyResponse(action, id, status) def to_dict(self) -> dict: result: dict = {} - if self.data is not None: - result["data"] = from_union([lambda x: to_class(ConversationMessageReceiveStreamItemData, x), from_none], self.data) - if self.type is not None: - result["type"] = from_union([lambda x: to_enum(ConversationMessageReceiveStreamItemType, x), from_none], self.type) + if self.action is not None: + result["action"] = from_union([lambda x: to_class(SecretVerifyResponseAction, x), from_none], self.action) + result["id"] = from_str(self.id) + result["status"] = to_enum(SecretVerifyResponseStatus, self.status) return result -class ConversationMessageSendParams: - conversation_id: str - """The ID of the conversation to send the message to""" +class SecretUpdateParams: + secret_id: str - def __init__(self, conversation_id: str) -> None: - self.conversation_id = conversation_id + def __init__(self, secret_id: str) -> None: + self.secret_id = secret_id @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageSendParams': + def from_dict(obj: Any) -> 'SecretUpdateParams': assert isinstance(obj, dict) - conversation_id = from_str(obj.get("conversationId")) - return ConversationMessageSendParams(conversation_id) + secret_id = from_str(obj.get("secretId")) + return SecretUpdateParams(secret_id) def to_dict(self) -> dict: result: dict = {} - result["conversationId"] = from_str(self.conversation_id) + result["secretId"] = from_str(self.secret_id) return result -class IndecentReplacement: - begin: float - """Start offset""" - - end: float - """End offset""" +class SecretUpdateRequestKind(Enum): + """The kind of the secret""" - text: str - """The text value of the replacement""" + PERSONAL = "personal" + SHARED = "shared" - def __init__(self, begin: float, end: float, text: str) -> None: - self.begin = begin - self.end = end - self.text = text - @staticmethod - def from_dict(obj: Any) -> 'IndecentReplacement': - assert isinstance(obj, dict) - begin = from_float(obj.get("begin")) - end = from_float(obj.get("end")) - text = from_str(obj.get("text")) - return IndecentReplacement(begin, end, text) +class SecretUpdateRequestType(Enum): + """The type of the secret""" - def to_dict(self) -> dict: - result: dict = {} - result["begin"] = to_float(self.begin) - result["end"] = to_float(self.end) - result["text"] = from_str(self.text) - return result + BASIC = "basic" + BEARER = "bearer" + JWT = "jwt" + OAUTH = "oauth" + PLAIN = "plain" + REFERENCE = "reference" + TEMPLATE = "template" -class ConversationMessageSendRequestEntity: - """Extracted entity from the message""" +class SecretUpdateRequestVisibility(Enum): + """The visibility of the secret""" - begin: float - """Start offset""" + PRIVATE = "private" + PROTECTED = "protected" + PUBLIC = "public" - end: float - """End offset""" - replacement: Optional[IndecentReplacement] - text: str - """The text value of the entity""" +class SecretUpdateRequest: + """Blueprint properties""" - type: str - """The entity type""" + alias: Optional[str] + """The unique alias for the instance""" - def __init__(self, begin: float, end: float, replacement: Optional[IndecentReplacement], text: str, type: str) -> None: - self.begin = begin - self.end = end - self.replacement = replacement - self.text = text - self.type = type + blueprint_id: Optional[str] + """The ID of the blueprint""" - @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageSendRequestEntity': - assert isinstance(obj, dict) - begin = from_float(obj.get("begin")) - end = from_float(obj.get("end")) - replacement = from_union([IndecentReplacement.from_dict, from_none], obj.get("replacement")) - text = from_str(obj.get("text")) - type = from_str(obj.get("type")) - return ConversationMessageSendRequestEntity(begin, end, replacement, text, type) + config: Optional[Dict[str, Any]] + """The config of the secret""" - def to_dict(self) -> dict: - result: dict = {} - result["begin"] = to_float(self.begin) - result["end"] = to_float(self.end) - if self.replacement is not None: - result["replacement"] = from_union([lambda x: to_class(IndecentReplacement, x), from_none], self.replacement) - result["text"] = from_str(self.text) - result["type"] = from_str(self.type) - return result + description: Optional[str] + """The associated description""" + kind: Optional[SecretUpdateRequestKind] + """The kind of the secret""" -class StickyRecord: meta: Optional[Dict[str, Any]] - """Additional metadata for the record""" - - text: str - """The text content of the record""" - - def __init__(self, meta: Optional[Dict[str, Any]], text: str) -> None: - self.meta = meta - self.text = text - - @staticmethod - def from_dict(obj: Any) -> 'StickyRecord': - assert isinstance(obj, dict) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - text = from_str(obj.get("text")) - return StickyRecord(meta, text) - - def to_dict(self) -> dict: - result: dict = {} - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["text"] = from_str(self.text) - return result + """Meta data information""" + name: Optional[str] + """The associated name""" -class StickyDataset: - description: Optional[str] - """The description of the dataset""" + type: Optional[SecretUpdateRequestType] + """The type of the secret""" - name: Optional[str] - """The name of the dataset""" + value: Optional[str] + """The value of the secret""" - records: List[StickyRecord] - """The records in the dataset""" + visibility: Optional[SecretUpdateRequestVisibility] + """The visibility of the secret""" - def __init__(self, description: Optional[str], name: Optional[str], records: List[StickyRecord]) -> None: + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], config: Optional[Dict[str, Any]], description: Optional[str], kind: Optional[SecretUpdateRequestKind], meta: Optional[Dict[str, Any]], name: Optional[str], type: Optional[SecretUpdateRequestType], value: Optional[str], visibility: Optional[SecretUpdateRequestVisibility]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.config = config self.description = description + self.kind = kind + self.meta = meta self.name = name - self.records = records + self.type = type + self.value = value + self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'StickyDataset': + def from_dict(obj: Any) -> 'SecretUpdateRequest': assert isinstance(obj, dict) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) description = from_union([from_str, from_none], obj.get("description")) + kind = from_union([SecretUpdateRequestKind, from_none], obj.get("kind")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - records = from_list(StickyRecord.from_dict, obj.get("records")) - return StickyDataset(description, name, records) + type = from_union([SecretUpdateRequestType, from_none], obj.get("type")) + value = from_union([from_str, from_none], obj.get("value")) + visibility = from_union([SecretUpdateRequestVisibility, from_none], obj.get("visibility")) + return SecretUpdateRequest(alias, blueprint_id, config, description, kind, meta, name, type, value, visibility) def to_dict(self) -> dict: result: dict = {} + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.config is not None: + result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.kind is not None: + result["kind"] = from_union([lambda x: to_enum(SecretUpdateRequestKind, x), from_none], self.kind) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - result["records"] = from_list(lambda x: to_class(StickyRecord, x), self.records) + if self.type is not None: + result["type"] = from_union([lambda x: to_enum(SecretUpdateRequestType, x), from_none], self.type) + if self.value is not None: + result["value"] = from_union([from_str, from_none], self.value) + if self.visibility is not None: + result["visibility"] = from_union([lambda x: to_enum(SecretUpdateRequestVisibility, x), from_none], self.visibility) return result -class StickyFeature: - name: str - """The name of the feature to enable""" - - options: Optional[Dict[str, Any]] - """Optional configuration options for the feature""" +class SecretUpdateResponse: + id: str + """The ID of the updated secret""" - def __init__(self, name: str, options: Optional[Dict[str, Any]]) -> None: - self.name = name - self.options = options + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'StickyFeature': + def from_dict(obj: Any) -> 'SecretUpdateResponse': assert isinstance(obj, dict) - name = from_str(obj.get("name")) - options = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("options")) - return StickyFeature(name, options) + id = from_str(obj.get("id")) + return SecretUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} - result["name"] = from_str(self.name) - if self.options is not None: - result["options"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.options) + result["id"] = from_str(self.id) return result -class StickyAbility: - description: str - """The description of the ability""" - - instruction: str - """The instruction for the ability""" - - meta: Optional[Dict[str, Any]] - """Additional metadata for the ability""" - - name: str - """The name of the ability""" - - secret_id: Optional[str] - """Optional secret ID for the ability""" +class SecretRevokeParams: + secret_id: str - def __init__(self, description: str, instruction: str, meta: Optional[Dict[str, Any]], name: str, secret_id: Optional[str]) -> None: - self.description = description - self.instruction = instruction - self.meta = meta - self.name = name + def __init__(self, secret_id: str) -> None: self.secret_id = secret_id @staticmethod - def from_dict(obj: Any) -> 'StickyAbility': + def from_dict(obj: Any) -> 'SecretRevokeParams': assert isinstance(obj, dict) - description = from_str(obj.get("description")) - instruction = from_str(obj.get("instruction")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - secret_id = from_union([from_str, from_none], obj.get("secretId")) - return StickyAbility(description, instruction, meta, name, secret_id) + secret_id = from_str(obj.get("secretId")) + return SecretRevokeParams(secret_id) def to_dict(self) -> dict: result: dict = {} - result["description"] = from_str(self.description) - result["instruction"] = from_str(self.instruction) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - if self.secret_id is not None: - result["secretId"] = from_union([from_str, from_none], self.secret_id) + result["secretId"] = from_str(self.secret_id) return result -class StickySkillset: - abilities: List[StickyAbility] - """The abilities in the skillset""" - - description: Optional[str] - """The description of the skillset""" - - name: Optional[str] - """The name of the skillset""" +class SecretRevokeResponse: + id: str + """The ID of the revoked secret""" - def __init__(self, abilities: List[StickyAbility], description: Optional[str], name: Optional[str]) -> None: - self.abilities = abilities - self.description = description - self.name = name + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'StickySkillset': + def from_dict(obj: Any) -> 'SecretRevokeResponse': assert isinstance(obj, dict) - abilities = from_list(StickyAbility.from_dict, obj.get("abilities")) - description = from_union([from_str, from_none], obj.get("description")) - name = from_union([from_str, from_none], obj.get("name")) - return StickySkillset(abilities, description, name) + id = from_str(obj.get("id")) + return SecretRevokeResponse(id) def to_dict(self) -> dict: result: dict = {} - result["abilities"] = from_list(lambda x: to_class(StickyAbility, x), self.abilities) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) + result["id"] = from_str(self.id) return result -class ConversationMessageSendRequestExtensions: - """Extensions to enhance the bot's capabilities""" - - backstory: Optional[str] - """Additional backstory for the bot""" - - datasets: Optional[List[StickyDataset]] - """Inline datasets to provide additional context""" - - features: Optional[List[StickyFeature]] - """Feature flags to enable specific bot capabilities""" - - skillsets: Optional[List[StickySkillset]] - """Inline skillsets to provide additional abilities""" +class SecretProxyParams: + secret_id: str + """The ID of the secret to inject""" - def __init__(self, backstory: Optional[str], datasets: Optional[List[StickyDataset]], features: Optional[List[StickyFeature]], skillsets: Optional[List[StickySkillset]]) -> None: - self.backstory = backstory - self.datasets = datasets - self.features = features - self.skillsets = skillsets + def __init__(self, secret_id: str) -> None: + self.secret_id = secret_id @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageSendRequestExtensions': + def from_dict(obj: Any) -> 'SecretProxyParams': assert isinstance(obj, dict) - backstory = from_union([from_str, from_none], obj.get("backstory")) - datasets = from_union([lambda x: from_list(StickyDataset.from_dict, x), from_none], obj.get("datasets")) - features = from_union([lambda x: from_list(StickyFeature.from_dict, x), from_none], obj.get("features")) - skillsets = from_union([lambda x: from_list(StickySkillset.from_dict, x), from_none], obj.get("skillsets")) - return ConversationMessageSendRequestExtensions(backstory, datasets, features, skillsets) + secret_id = from_str(obj.get("secretId")) + return SecretProxyParams(secret_id) def to_dict(self) -> dict: result: dict = {} - if self.backstory is not None: - result["backstory"] = from_union([from_str, from_none], self.backstory) - if self.datasets is not None: - result["datasets"] = from_union([lambda x: from_list(lambda x: to_class(StickyDataset, x), x), from_none], self.datasets) - if self.features is not None: - result["features"] = from_union([lambda x: from_list(lambda x: to_class(StickyFeature, x), x), from_none], self.features) - if self.skillsets is not None: - result["skillsets"] = from_union([lambda x: from_list(lambda x: to_class(StickySkillset, x), x), from_none], self.skillsets) + result["secretId"] = from_str(self.secret_id) return result -class StickyCall: - """Configuration for when this function should be automatically called""" +class SecretProxyRequest: + body: Optional[str] + """The request body""" - end: Optional[bool] - """If true, this function will be force-called at the end of the conversation""" + headers: Optional[Dict[str, str]] + """The request headers (may reference the secret)""" - start: Optional[bool] - """If true, this function will be force-called at the start of the conversation""" + method: Optional[str] + """The HTTP method""" - def __init__(self, end: Optional[bool], start: Optional[bool]) -> None: - self.end = end - self.start = start + url: str + """The destination URL""" + + def __init__(self, body: Optional[str], headers: Optional[Dict[str, str]], method: Optional[str], url: str) -> None: + self.body = body + self.headers = headers + self.method = method + self.url = url @staticmethod - def from_dict(obj: Any) -> 'StickyCall': + def from_dict(obj: Any) -> 'SecretProxyRequest': assert isinstance(obj, dict) - end = from_union([from_bool, from_none], obj.get("end")) - start = from_union([from_bool, from_none], obj.get("start")) - return StickyCall(end, start) + body = from_union([from_str, from_none], obj.get("body")) + headers = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("headers")) + method = from_union([from_str, from_none], obj.get("method")) + url = from_str(obj.get("url")) + return SecretProxyRequest(body, headers, method, url) def to_dict(self) -> dict: result: dict = {} - if self.end is not None: - result["end"] = from_union([from_bool, from_none], self.end) - if self.start is not None: - result["start"] = from_union([from_bool, from_none], self.start) + if self.body is not None: + result["body"] = from_union([from_str, from_none], self.body) + if self.headers is not None: + result["headers"] = from_union([lambda x: from_dict(from_str, x), from_none], self.headers) + if self.method is not None: + result["method"] = from_union([from_str, from_none], self.method) + result["url"] = from_str(self.url) return result -class FriskyType(Enum): - """The schema type, must be "object\"""" - - OBJECT = "object" - - -class StickyParameters: - """JSON Schema definition for the function parameters""" - - properties: Dict[str, Any] - """Object property definitions""" - - required: Optional[List[str]] - """Required property names""" - - type: FriskyType - """The schema type, must be "object\"""" +class SecretMintParams: + secret_id: str + """The ID of the secret to mint""" - def __init__(self, properties: Dict[str, Any], required: Optional[List[str]], type: FriskyType) -> None: - self.properties = properties - self.required = required - self.type = type + def __init__(self, secret_id: str) -> None: + self.secret_id = secret_id @staticmethod - def from_dict(obj: Any) -> 'StickyParameters': + def from_dict(obj: Any) -> 'SecretMintParams': assert isinstance(obj, dict) - properties = from_dict(lambda x: x, obj.get("properties")) - required = from_union([lambda x: from_list(from_str, x), from_none], obj.get("required")) - type = FriskyType(obj.get("type")) - return StickyParameters(properties, required, type) + secret_id = from_str(obj.get("secretId")) + return SecretMintParams(secret_id) def to_dict(self) -> dict: result: dict = {} - result["properties"] = from_dict(lambda x: x, self.properties) - if self.required is not None: - result["required"] = from_union([lambda x: from_list(from_str, x), from_none], self.required) - result["type"] = to_enum(FriskyType, self.type) + result["secretId"] = from_str(self.secret_id) return result -class StickyResult: - """The result of the function execution""" - - data: Any - """The data returned by the function (can be any type)""" +class SecretMintResponse: + expires_at: Optional[float] + """Token expiry as a unix timestamp in ms, or null""" - channel: Optional[str] - """The channel for streaming function results""" + token: str + """The usable token to send to the provider""" - def __init__(self, data: Any, channel: Optional[str]) -> None: - self.data = data - self.channel = channel + def __init__(self, expires_at: Optional[float], token: str) -> None: + self.expires_at = expires_at + self.token = token @staticmethod - def from_dict(obj: Any) -> 'StickyResult': + def from_dict(obj: Any) -> 'SecretMintResponse': assert isinstance(obj, dict) - data = obj.get("data") - channel = from_union([from_str, from_none], obj.get("channel")) - return StickyResult(data, channel) + expires_at = from_union([from_float, from_none], obj.get("expiresAt")) + token = from_str(obj.get("token")) + return SecretMintResponse(expires_at, token) def to_dict(self) -> dict: result: dict = {} - if self.data is not None: - result["data"] = self.data - if self.channel is not None: - result["channel"] = from_union([from_str, from_none], self.channel) + if self.expires_at is not None: + result["expiresAt"] = from_union([to_float, from_none], self.expires_at) + result["token"] = from_str(self.token) return result -class ConversationMessageSendRequestFunction: - call: Optional[StickyCall] - """Configuration for when this function should be automatically called""" - - description: str - """The description of the function""" - - name: str - """The name of the function (must be a valid JS identifier, max 64 chars)""" - - parameters: StickyParameters - """JSON Schema definition for the function parameters""" - - result: Optional[StickyResult] - """The result of the function execution""" +class SecretFetchParams: + secret_id: str + """The ID of the secret to retrieve""" - def __init__(self, call: Optional[StickyCall], description: str, name: str, parameters: StickyParameters, result: Optional[StickyResult]) -> None: - self.call = call - self.description = description - self.name = name - self.parameters = parameters - self.result = result + def __init__(self, secret_id: str) -> None: + self.secret_id = secret_id @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageSendRequestFunction': + def from_dict(obj: Any) -> 'SecretFetchParams': assert isinstance(obj, dict) - call = from_union([StickyCall.from_dict, from_none], obj.get("call")) - description = from_str(obj.get("description")) - name = from_str(obj.get("name")) - parameters = StickyParameters.from_dict(obj.get("parameters")) - result = from_union([StickyResult.from_dict, from_none], obj.get("result")) - return ConversationMessageSendRequestFunction(call, description, name, parameters, result) + secret_id = from_str(obj.get("secretId")) + return SecretFetchParams(secret_id) def to_dict(self) -> dict: result: dict = {} - if self.call is not None: - result["call"] = from_union([lambda x: to_class(StickyCall, x), from_none], self.call) - result["description"] = from_str(self.description) - result["name"] = from_str(self.name) - result["parameters"] = to_class(StickyParameters, self.parameters) - if self.result is not None: - result["result"] = from_union([lambda x: to_class(StickyResult, x), from_none], self.result) + result["secretId"] = from_str(self.secret_id) return result -class ConversationMessageSendRequest: - entities: Optional[List[ConversationMessageSendRequestEntity]] - """Known entities""" - - extensions: Optional[ConversationMessageSendRequestExtensions] - """Extensions to enhance the bot's capabilities""" +class SecretFetchResponseKind(Enum): + """The kind of the secret""" - functions: Optional[List[ConversationMessageSendRequestFunction]] - """An array of functions to be added to the conversation""" + PERSONAL = "personal" + SHARED = "shared" - text: str - """The text of the message to send""" - def __init__(self, entities: Optional[List[ConversationMessageSendRequestEntity]], extensions: Optional[ConversationMessageSendRequestExtensions], functions: Optional[List[ConversationMessageSendRequestFunction]], text: str) -> None: - self.entities = entities - self.extensions = extensions - self.functions = functions - self.text = text +class SecretFetchResponseType(Enum): + """The type of the secret""" - @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageSendRequest': - assert isinstance(obj, dict) - entities = from_union([lambda x: from_list(ConversationMessageSendRequestEntity.from_dict, x), from_none], obj.get("entities")) - extensions = from_union([ConversationMessageSendRequestExtensions.from_dict, from_none], obj.get("extensions")) - functions = from_union([lambda x: from_list(ConversationMessageSendRequestFunction.from_dict, x), from_none], obj.get("functions")) - text = from_str(obj.get("text")) - return ConversationMessageSendRequest(entities, extensions, functions, text) + BASIC = "basic" + BEARER = "bearer" + JWT = "jwt" + OAUTH = "oauth" + PLAIN = "plain" + REFERENCE = "reference" + TEMPLATE = "template" - def to_dict(self) -> dict: - result: dict = {} - if self.entities is not None: - result["entities"] = from_union([lambda x: from_list(lambda x: to_class(ConversationMessageSendRequestEntity, x), x), from_none], self.entities) - if self.extensions is not None: - result["extensions"] = from_union([lambda x: to_class(ConversationMessageSendRequestExtensions, x), from_none], self.extensions) - if self.functions is not None: - result["functions"] = from_union([lambda x: from_list(lambda x: to_class(ConversationMessageSendRequestFunction, x), x), from_none], self.functions) - result["text"] = from_str(self.text) - return result +class SecretFetchResponseVisibility(Enum): + """The visibility of the secret""" -class HilariousReplacement: - begin: float - """Start offset""" + PRIVATE = "private" + PROTECTED = "protected" + PUBLIC = "public" - end: float - """End offset""" - text: str - """The text value of the replacement""" +class SecretFetchResponse: + """Blueprint properties""" - def __init__(self, begin: float, end: float, text: str) -> None: - self.begin = begin - self.end = end - self.text = text + alias: Optional[str] + """The unique alias for the instance""" - @staticmethod - def from_dict(obj: Any) -> 'HilariousReplacement': - assert isinstance(obj, dict) - begin = from_float(obj.get("begin")) - end = from_float(obj.get("end")) - text = from_str(obj.get("text")) - return HilariousReplacement(begin, end, text) + blueprint_id: Optional[str] + """The ID of the blueprint""" - def to_dict(self) -> dict: - result: dict = {} - result["begin"] = to_float(self.begin) - result["end"] = to_float(self.end) - result["text"] = from_str(self.text) - return result + config: Optional[Dict[str, Any]] + """The config of the secret (config.clientSecret is returned as '********' if configured, + null otherwise) + """ + created_at: float + """The timestamp (ms) when the instance was created""" + description: Optional[str] + """The associated description""" -class ConversationMessageSendResponseEntity: - """Extracted entity from the message""" + id: str + """The instance ID""" - begin: float - """Start offset""" + kind: Optional[SecretFetchResponseKind] + """The kind of the secret""" - end: float - """End offset""" + meta: Optional[Dict[str, Any]] + """Meta data information""" - replacement: Optional[HilariousReplacement] - text: str - """The text value of the entity""" + name: Optional[str] + """The associated name""" - type: str - """The entity type""" + type: Optional[SecretFetchResponseType] + """The type of the secret""" - def __init__(self, begin: float, end: float, replacement: Optional[HilariousReplacement], text: str, type: str) -> None: - self.begin = begin - self.end = end - self.replacement = replacement - self.text = text + updated_at: float + """The timestamp (ms) when the instance was updated""" + + visibility: Optional[SecretFetchResponseVisibility] + """The visibility of the secret""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], config: Optional[Dict[str, Any]], created_at: float, description: Optional[str], id: str, kind: Optional[SecretFetchResponseKind], meta: Optional[Dict[str, Any]], name: Optional[str], type: Optional[SecretFetchResponseType], updated_at: float, visibility: Optional[SecretFetchResponseVisibility]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.config = config + self.created_at = created_at + self.description = description + self.id = id + self.kind = kind + self.meta = meta + self.name = name self.type = type + self.updated_at = updated_at + self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageSendResponseEntity': + def from_dict(obj: Any) -> 'SecretFetchResponse': assert isinstance(obj, dict) - begin = from_float(obj.get("begin")) - end = from_float(obj.get("end")) - replacement = from_union([HilariousReplacement.from_dict, from_none], obj.get("replacement")) - text = from_str(obj.get("text")) - type = from_str(obj.get("type")) - return ConversationMessageSendResponseEntity(begin, end, replacement, text, type) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) + created_at = from_float(obj.get("createdAt")) + description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) + kind = from_union([SecretFetchResponseKind, from_none], obj.get("kind")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + type = from_union([SecretFetchResponseType, from_none], obj.get("type")) + updated_at = from_float(obj.get("updatedAt")) + visibility = from_union([SecretFetchResponseVisibility, from_none], obj.get("visibility")) + return SecretFetchResponse(alias, blueprint_id, config, created_at, description, id, kind, meta, name, type, updated_at, visibility) def to_dict(self) -> dict: result: dict = {} - result["begin"] = to_float(self.begin) - result["end"] = to_float(self.end) - if self.replacement is not None: - result["replacement"] = from_union([lambda x: to_class(HilariousReplacement, x), from_none], self.replacement) - result["text"] = from_str(self.text) - result["type"] = from_str(self.type) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.config is not None: + result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) + result["createdAt"] = to_float(self.created_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) + if self.kind is not None: + result["kind"] = from_union([lambda x: to_enum(SecretFetchResponseKind, x), from_none], self.kind) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.type is not None: + result["type"] = from_union([lambda x: to_enum(SecretFetchResponseType, x), from_none], self.type) + result["updatedAt"] = to_float(self.updated_at) + if self.visibility is not None: + result["visibility"] = from_union([lambda x: to_enum(SecretFetchResponseVisibility, x), from_none], self.visibility) return result -class ConversationMessageSendResponse: - entities: List[ConversationMessageSendResponseEntity] - """Extracted entities from the message""" +class SecretDeleteParams: + secret_id: str + """The ID of the secret to delete""" + + def __init__(self, secret_id: str) -> None: + self.secret_id = secret_id + @staticmethod + def from_dict(obj: Any) -> 'SecretDeleteParams': + assert isinstance(obj, dict) + secret_id = from_str(obj.get("secretId")) + return SecretDeleteParams(secret_id) + + def to_dict(self) -> dict: + result: dict = {} + result["secretId"] = from_str(self.secret_id) + return result + + +class SecretDeleteResponse: id: str - """The ID of the sent message""" + """The ID of the deleted secret""" - def __init__(self, entities: List[ConversationMessageSendResponseEntity], id: str) -> None: - self.entities = entities + def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageSendResponse': + def from_dict(obj: Any) -> 'SecretDeleteResponse': assert isinstance(obj, dict) - entities = from_list(ConversationMessageSendResponseEntity.from_dict, obj.get("entities")) id = from_str(obj.get("id")) - return ConversationMessageSendResponse(entities, id) + return SecretDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} - result["entities"] = from_list(lambda x: to_class(ConversationMessageSendResponseEntity, x), self.entities) result["id"] = from_str(self.id) return result -class AmbitiousReplacement: - begin: float - """Start offset""" +class SecretAuthenticateParams: + secret_id: str + """The ID of the secret to authenticate""" - end: float - """End offset""" + def __init__(self, secret_id: str) -> None: + self.secret_id = secret_id - text: str - """The text value of the replacement""" + @staticmethod + def from_dict(obj: Any) -> 'SecretAuthenticateParams': + assert isinstance(obj, dict) + secret_id = from_str(obj.get("secretId")) + return SecretAuthenticateParams(secret_id) - def __init__(self, begin: float, end: float, text: str) -> None: - self.begin = begin - self.end = end - self.text = text + def to_dict(self) -> dict: + result: dict = {} + result["secretId"] = from_str(self.secret_id) + return result + + +class SecretAuthenticateResponse: + id: str + """The ID of the secret to authenticate""" + + url: str + """The URL to authenticate the secret""" + + def __init__(self, id: str, url: str) -> None: + self.id = id + self.url = url @staticmethod - def from_dict(obj: Any) -> 'AmbitiousReplacement': + def from_dict(obj: Any) -> 'SecretAuthenticateResponse': assert isinstance(obj, dict) - begin = from_float(obj.get("begin")) - end = from_float(obj.get("end")) - text = from_str(obj.get("text")) - return AmbitiousReplacement(begin, end, text) + id = from_str(obj.get("id")) + url = from_str(obj.get("url")) + return SecretAuthenticateResponse(id, url) def to_dict(self) -> dict: result: dict = {} - result["begin"] = to_float(self.begin) - result["end"] = to_float(self.end) - result["text"] = from_str(self.text) + result["id"] = from_str(self.id) + result["url"] = from_str(self.url) return result -class DataEntity: - """Extracted entity from the message""" +class PortalListParamsOrder(Enum): + """The order of the paginated items""" - begin: float - """Start offset""" + ASC = "asc" + DESC = "desc" - end: float - """End offset""" - replacement: Optional[AmbitiousReplacement] - text: str - """The text value of the entity""" +class PortalListParams: + cursor: Optional[str] + """The cursor to use for pagination""" - type: str - """The entity type""" + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" - def __init__(self, begin: float, end: float, replacement: Optional[AmbitiousReplacement], text: str, type: str) -> None: - self.begin = begin - self.end = end - self.replacement = replacement - self.text = text - self.type = type + order: Optional[PortalListParamsOrder] + """The order of the paginated items""" + + take: Optional[int] + """The number of items to retrieve""" + + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[PortalListParamsOrder], take: Optional[int]) -> None: + self.cursor = cursor + self.meta = meta + self.order = order + self.take = take @staticmethod - def from_dict(obj: Any) -> 'DataEntity': + def from_dict(obj: Any) -> 'PortalListParams': assert isinstance(obj, dict) - begin = from_float(obj.get("begin")) - end = from_float(obj.get("end")) - replacement = from_union([AmbitiousReplacement.from_dict, from_none], obj.get("replacement")) - text = from_str(obj.get("text")) - type = from_str(obj.get("type")) - return DataEntity(begin, end, replacement, text, type) + cursor = from_union([from_str, from_none], obj.get("cursor")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([PortalListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return PortalListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} - result["begin"] = to_float(self.begin) - result["end"] = to_float(self.end) - if self.replacement is not None: - result["replacement"] = from_union([lambda x: to_class(AmbitiousReplacement, x), from_none], self.replacement) - result["text"] = from_str(self.text) - result["type"] = from_str(self.type) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(PortalListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class MischievousType(Enum): - """The type of the message""" +class PortalListResponseItem: + """Blueprint properties""" - ACTIVITY = "activity" - BACKSTORY = "backstory" - BOT = "bot" - CHECKPOINT = "checkpoint" - CONTEXT = "context" - INSTRUCTION = "instruction" - REASONING = "reasoning" - USER = "user" + alias: Optional[str] + """The unique alias for the instance""" + blueprint_id: Optional[str] + """The ID of the blueprint""" -class ConversationMessageSendStreamItemData: - """The data for the event - - A message in the conversation - - Information about an abort event in a streamed response - """ - entities: Optional[List[DataEntity]] - """Extracted entities from the message""" + config: Optional[Dict[str, Any]] + """The config of the portal""" - id: Optional[str] - """The ID of the sent message""" + created_at: float + """The timestamp (ms) when the instance was created""" - message: Optional[str] - """The error message""" + description: Optional[str] + """The associated description""" - token: Optional[str] - """The token generated""" + id: str + """The instance ID""" meta: Optional[Dict[str, Any]] """Meta data information""" - text: Optional[str] - """The text of the message""" - - type: Optional[MischievousType] - """The type of the message""" - - function_name: Optional[str] - """The function or tool associated with the abort""" - - reason: Any - """The abort reason if available""" - - input_tokens_used: Optional[float] - """The number of input tokens used""" + name: Optional[str] + """The associated name""" - model: Optional[str] - """The model used""" + slug: Optional[str] + """The slug of the portal""" - output_tokens_used: Optional[float] - """The number of output tokens used""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - def __init__(self, entities: Optional[List[DataEntity]], id: Optional[str], message: Optional[str], token: Optional[str], meta: Optional[Dict[str, Any]], text: Optional[str], type: Optional[MischievousType], function_name: Optional[str], reason: Any, input_tokens_used: Optional[float], model: Optional[str], output_tokens_used: Optional[float]) -> None: - self.entities = entities + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], config: Optional[Dict[str, Any]], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], slug: Optional[str], updated_at: float) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.config = config + self.created_at = created_at + self.description = description self.id = id - self.message = message - self.token = token self.meta = meta - self.text = text - self.type = type - self.function_name = function_name - self.reason = reason - self.input_tokens_used = input_tokens_used - self.model = model - self.output_tokens_used = output_tokens_used + self.name = name + self.slug = slug + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageSendStreamItemData': + def from_dict(obj: Any) -> 'PortalListResponseItem': assert isinstance(obj, dict) - entities = from_union([lambda x: from_list(DataEntity.from_dict, x), from_none], obj.get("entities")) - id = from_union([from_str, from_none], obj.get("id")) - message = from_union([from_str, from_none], obj.get("message")) - token = from_union([from_str, from_none], obj.get("token")) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) + created_at = from_float(obj.get("createdAt")) + description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - text = from_union([from_str, from_none], obj.get("text")) - type = from_union([MischievousType, from_none], obj.get("type")) - function_name = from_union([from_str, from_none], obj.get("functionName")) - reason = obj.get("reason") - input_tokens_used = from_union([from_float, from_none], obj.get("inputTokensUsed")) - model = from_union([from_str, from_none], obj.get("model")) - output_tokens_used = from_union([from_float, from_none], obj.get("outputTokensUsed")) - return ConversationMessageSendStreamItemData(entities, id, message, token, meta, text, type, function_name, reason, input_tokens_used, model, output_tokens_used) + name = from_union([from_str, from_none], obj.get("name")) + slug = from_union([from_str, from_none], obj.get("slug")) + updated_at = from_float(obj.get("updatedAt")) + return PortalListResponseItem(alias, blueprint_id, config, created_at, description, id, meta, name, slug, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.entities is not None: - result["entities"] = from_union([lambda x: from_list(lambda x: to_class(DataEntity, x), x), from_none], self.entities) - if self.id is not None: - result["id"] = from_union([from_str, from_none], self.id) - if self.message is not None: - result["message"] = from_union([from_str, from_none], self.message) - if self.token is not None: - result["token"] = from_union([from_str, from_none], self.token) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.config is not None: + result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) + result["createdAt"] = to_float(self.created_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.text is not None: - result["text"] = from_union([from_str, from_none], self.text) - if self.type is not None: - result["type"] = from_union([lambda x: to_enum(MischievousType, x), from_none], self.type) - if self.function_name is not None: - result["functionName"] = from_union([from_str, from_none], self.function_name) - if self.reason is not None: - result["reason"] = self.reason - if self.input_tokens_used is not None: - result["inputTokensUsed"] = from_union([to_float, from_none], self.input_tokens_used) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) - if self.output_tokens_used is not None: - result["outputTokensUsed"] = from_union([to_float, from_none], self.output_tokens_used) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.slug is not None: + result["slug"] = from_union([from_str, from_none], self.slug) + result["updatedAt"] = to_float(self.updated_at) return result -class ConversationMessageSendStreamItemType(Enum): - """The type of event""" - - ABORT = "abort" - COMPLETE_BEGIN = "completeBegin" - COMPLETE_END = "completeEnd" - ERROR = "error" - MESSAGE = "message" - REASONING_TOKEN = "reasoningToken" - RESULT = "result" - TOKEN = "token" - USAGE = "usage" - WAIT_FOR_CHANNEL_MESSAGE_BEGIN = "waitForChannelMessageBegin" - WAIT_FOR_CHANNEL_MESSAGE_END = "waitForChannelMessageEnd" - +class PortalListResponse: + cursor: str + """Cursor for fetching the next page""" -class ConversationMessageSendStreamItem: - data: ConversationMessageSendStreamItemData - """The data for the event - - A message in the conversation - - Information about an abort event in a streamed response - """ - type: ConversationMessageSendStreamItemType - """The type of event""" + items: List[PortalListResponseItem] - def __init__(self, data: ConversationMessageSendStreamItemData, type: ConversationMessageSendStreamItemType) -> None: - self.data = data - self.type = type + def __init__(self, cursor: str, items: List[PortalListResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'ConversationMessageSendStreamItem': + def from_dict(obj: Any) -> 'PortalListResponse': assert isinstance(obj, dict) - data = ConversationMessageSendStreamItemData.from_dict(obj.get("data")) - type = ConversationMessageSendStreamItemType(obj.get("type")) - return ConversationMessageSendStreamItem(data, type) + cursor = from_str(obj.get("cursor")) + items = from_list(PortalListResponseItem.from_dict, obj.get("items")) + return PortalListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(ConversationMessageSendStreamItemData, self.data) - result["type"] = to_enum(ConversationMessageSendStreamItemType, self.type) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(PortalListResponseItem, x), self.items) return result -class ConversationSessionCreateParams: - conversation_id: str - """The ID of the conversation""" - - def __init__(self, conversation_id: str) -> None: - self.conversation_id = conversation_id +class PortalListStreamItemData: + """Blueprint properties""" - @staticmethod - def from_dict(obj: Any) -> 'ConversationSessionCreateParams': - assert isinstance(obj, dict) - conversation_id = from_str(obj.get("conversationId")) - return ConversationSessionCreateParams(conversation_id) + alias: Optional[str] + """The unique alias for the instance""" - def to_dict(self) -> dict: - result: dict = {} - result["conversationId"] = from_str(self.conversation_id) - return result + blueprint_id: Optional[str] + """The ID of the blueprint""" + config: Optional[Dict[str, Any]] + """The config of the portal""" -class ConversationSessionCreateRequest: - duration_in_seconds: Optional[float] - """The maximum amount of time this session will stay open""" + created_at: float + """The timestamp (ms) when the instance was created""" - def __init__(self, duration_in_seconds: Optional[float]) -> None: - self.duration_in_seconds = duration_in_seconds + description: Optional[str] + """The associated description""" - @staticmethod - def from_dict(obj: Any) -> 'ConversationSessionCreateRequest': - assert isinstance(obj, dict) - duration_in_seconds = from_union([from_float, from_none], obj.get("durationInSeconds")) - return ConversationSessionCreateRequest(duration_in_seconds) + id: str + """The instance ID""" - def to_dict(self) -> dict: - result: dict = {} - if self.duration_in_seconds is not None: - result["durationInSeconds"] = from_union([to_float, from_none], self.duration_in_seconds) - return result + meta: Optional[Dict[str, Any]] + """Meta data information""" + name: Optional[str] + """The associated name""" -class ConversationSessionCreateResponse: - expires_at: float - """The time the token will expire in milliseconds""" + slug: Optional[str] + """The slug of the portal""" - id: str - """The ID of the conversation""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - token: str - """The token for this conversation""" - - def __init__(self, expires_at: float, id: str, token: str) -> None: - self.expires_at = expires_at + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], config: Optional[Dict[str, Any]], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], slug: Optional[str], updated_at: float) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.config = config + self.created_at = created_at + self.description = description self.id = id - self.token = token + self.meta = meta + self.name = name + self.slug = slug + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'ConversationSessionCreateResponse': + def from_dict(obj: Any) -> 'PortalListStreamItemData': assert isinstance(obj, dict) - expires_at = from_float(obj.get("expiresAt")) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) + created_at = from_float(obj.get("createdAt")) + description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) - token = from_str(obj.get("token")) - return ConversationSessionCreateResponse(expires_at, id, token) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + slug = from_union([from_str, from_none], obj.get("slug")) + updated_at = from_float(obj.get("updatedAt")) + return PortalListStreamItemData(alias, blueprint_id, config, created_at, description, id, meta, name, slug, updated_at) def to_dict(self) -> dict: result: dict = {} - result["expiresAt"] = to_float(self.expires_at) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.config is not None: + result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) + result["createdAt"] = to_float(self.created_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) - result["token"] = from_str(self.token) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.slug is not None: + result["slug"] = from_union([from_str, from_none], self.slug) + result["updatedAt"] = to_float(self.updated_at) return result -class ConversationUpdateParams: - conversation_id: str +class PortalListStreamItemType(Enum): + """The type of event""" - def __init__(self, conversation_id: str) -> None: - self.conversation_id = conversation_id + ITEM = "item" + + +class PortalListStreamItem: + data: PortalListStreamItemData + """Blueprint properties""" + + type: PortalListStreamItemType + """The type of event""" + + def __init__(self, data: PortalListStreamItemData, type: PortalListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'ConversationUpdateParams': + def from_dict(obj: Any) -> 'PortalListStreamItem': assert isinstance(obj, dict) - conversation_id = from_str(obj.get("conversationId")) - return ConversationUpdateParams(conversation_id) + data = PortalListStreamItemData.from_dict(obj.get("data")) + type = PortalListStreamItemType(obj.get("type")) + return PortalListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["conversationId"] = from_str(self.conversation_id) + result["data"] = to_class(PortalListStreamItemData, self.data) + result["type"] = to_enum(PortalListStreamItemType, self.type) return result -class ConversationUpdateRequest: - """A bot configuration or reference - - A bot configuration that can be applied without a dedicated bot instance. - """ - contact_id: Optional[str] - """The contact id assigned to this conversation""" +class PortalCreateRequest: + """Blueprint properties""" + + alias: Optional[str] + """The unique alias for the instance""" + + blueprint_id: Optional[str] + """The ID of the blueprint""" + + config: Optional[Dict[str, Any]] + """The config of the portal""" description: Optional[str] """The associated description""" @@ -11509,109 +11225,61 @@ class ConversationUpdateRequest: name: Optional[str] """The associated name""" - space_id: Optional[str] - """The space id assigned to this conversation""" - - task_id: Optional[str] - """The task id assigned to this conversation""" - - bot_id: Optional[str] - """The ID of the bot this configuration is using""" - - backstory: Optional[str] - """The backstory this configuration is using""" - - dataset_id: Optional[str] - """The id of the dataset this configuration is using""" - - model: Optional[str] - """A model definition""" - - moderation: Optional[bool] - """The moderation flag for this configuration""" - - privacy: Optional[bool] - """The privacy flag for this configuration""" - - skillset_id: Optional[str] - """The id of the skillset this configuration is using""" + slug: Optional[str] + """The slug of the portal""" - def __init__(self, contact_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], space_id: Optional[str], task_id: Optional[str], bot_id: Optional[str], backstory: Optional[str], dataset_id: Optional[str], model: Optional[str], moderation: Optional[bool], privacy: Optional[bool], skillset_id: Optional[str]) -> None: - self.contact_id = contact_id + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], config: Optional[Dict[str, Any]], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], slug: Optional[str]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.config = config self.description = description self.meta = meta self.name = name - self.space_id = space_id - self.task_id = task_id - self.bot_id = bot_id - self.backstory = backstory - self.dataset_id = dataset_id - self.model = model - self.moderation = moderation - self.privacy = privacy - self.skillset_id = skillset_id + self.slug = slug @staticmethod - def from_dict(obj: Any) -> 'ConversationUpdateRequest': + def from_dict(obj: Any) -> 'PortalCreateRequest': assert isinstance(obj, dict) - contact_id = from_union([from_str, from_none], obj.get("contactId")) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) description = from_union([from_str, from_none], obj.get("description")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - space_id = from_union([from_str, from_none], obj.get("spaceId")) - task_id = from_union([from_str, from_none], obj.get("taskId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - backstory = from_union([from_str, from_none], obj.get("backstory")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) - model = from_union([from_str, from_none], obj.get("model")) - moderation = from_union([from_bool, from_none], obj.get("moderation")) - privacy = from_union([from_bool, from_none], obj.get("privacy")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) - return ConversationUpdateRequest(contact_id, description, meta, name, space_id, task_id, bot_id, backstory, dataset_id, model, moderation, privacy, skillset_id) + slug = from_union([from_str, from_none], obj.get("slug")) + return PortalCreateRequest(alias, blueprint_id, config, description, meta, name, slug) def to_dict(self) -> dict: result: dict = {} - if self.contact_id is not None: - result["contactId"] = from_union([from_str, from_none], self.contact_id) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.config is not None: + result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.space_id is not None: - result["spaceId"] = from_union([from_str, from_none], self.space_id) - if self.task_id is not None: - result["taskId"] = from_union([from_str, from_none], self.task_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.backstory is not None: - result["backstory"] = from_union([from_str, from_none], self.backstory) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) - if self.moderation is not None: - result["moderation"] = from_union([from_bool, from_none], self.moderation) - if self.privacy is not None: - result["privacy"] = from_union([from_bool, from_none], self.privacy) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) + if self.slug is not None: + result["slug"] = from_union([from_str, from_none], self.slug) return result -class ConversationUpdateResponse: +class PortalCreateResponse: id: str - """The ID of the updated conversation""" + """The ID of the created portal""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'ConversationUpdateResponse': + def from_dict(obj: Any) -> 'PortalCreateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return ConversationUpdateResponse(id) + return PortalCreateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -11619,64 +11287,100 @@ def to_dict(self) -> dict: return result -class ConversationUpvoteParams: - conversation_id: str - """The ID of the conversation""" +class PortalUpdateParams: + portal_id: str - def __init__(self, conversation_id: str) -> None: - self.conversation_id = conversation_id + def __init__(self, portal_id: str) -> None: + self.portal_id = portal_id @staticmethod - def from_dict(obj: Any) -> 'ConversationUpvoteParams': + def from_dict(obj: Any) -> 'PortalUpdateParams': assert isinstance(obj, dict) - conversation_id = from_str(obj.get("conversationId")) - return ConversationUpvoteParams(conversation_id) + portal_id = from_str(obj.get("portalId")) + return PortalUpdateParams(portal_id) def to_dict(self) -> dict: result: dict = {} - result["conversationId"] = from_str(self.conversation_id) + result["portalId"] = from_str(self.portal_id) return result -class ConversationUpvoteRequest: - reason: Optional[str] - """The reason for the upvote""" +class PortalUpdateRequest: + """Blueprint properties""" - value: Optional[int] - """The value of the upvote""" + alias: Optional[str] + """The unique alias for the instance""" - def __init__(self, reason: Optional[str], value: Optional[int]) -> None: - self.reason = reason - self.value = value + blueprint_id: Optional[str] + """The ID of the blueprint""" + + config: Optional[Dict[str, Any]] + """The config for the portal""" + + description: Optional[str] + """The associated description""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" + + name: Optional[str] + """The associated name""" + + slug: Optional[str] + """The slug for the portal""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], config: Optional[Dict[str, Any]], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], slug: Optional[str]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.config = config + self.description = description + self.meta = meta + self.name = name + self.slug = slug @staticmethod - def from_dict(obj: Any) -> 'ConversationUpvoteRequest': + def from_dict(obj: Any) -> 'PortalUpdateRequest': assert isinstance(obj, dict) - reason = from_union([from_str, from_none], obj.get("reason")) - value = from_union([from_int, from_none], obj.get("value")) - return ConversationUpvoteRequest(reason, value) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) + description = from_union([from_str, from_none], obj.get("description")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + slug = from_union([from_str, from_none], obj.get("slug")) + return PortalUpdateRequest(alias, blueprint_id, config, description, meta, name, slug) def to_dict(self) -> dict: result: dict = {} - if self.reason is not None: - result["reason"] = from_union([from_str, from_none], self.reason) - if self.value is not None: - result["value"] = from_union([from_int, from_none], self.value) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.config is not None: + result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.slug is not None: + result["slug"] = from_union([from_str, from_none], self.slug) return result -class ConversationUpvoteResponse: +class PortalUpdateResponse: id: str - """The ID of the upvoted conversation""" + """The ID of the updated portal""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'ConversationUpvoteResponse': + def from_dict(obj: Any) -> 'PortalUpdateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return ConversationUpvoteResponse(id) + return PortalUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -11684,4702 +11388,2809 @@ def to_dict(self) -> dict: return result -class ConversationUsageFetchParams: - conversation_id: str - """The ID of the conversation""" - - conversation_usage_fetch_params_from: Optional[datetime] - """Start date for the period (ISO 8601 format)""" - - to: Optional[datetime] - """End date for the period (ISO 8601 format)""" +class PortalFetchParams: + portal_id: str + """The ID of the portal to retrieve""" - def __init__(self, conversation_id: str, conversation_usage_fetch_params_from: Optional[datetime], to: Optional[datetime]) -> None: - self.conversation_id = conversation_id - self.conversation_usage_fetch_params_from = conversation_usage_fetch_params_from - self.to = to + def __init__(self, portal_id: str) -> None: + self.portal_id = portal_id @staticmethod - def from_dict(obj: Any) -> 'ConversationUsageFetchParams': + def from_dict(obj: Any) -> 'PortalFetchParams': assert isinstance(obj, dict) - conversation_id = from_str(obj.get("conversationId")) - conversation_usage_fetch_params_from = from_union([from_datetime, from_none], obj.get("from")) - to = from_union([from_datetime, from_none], obj.get("to")) - return ConversationUsageFetchParams(conversation_id, conversation_usage_fetch_params_from, to) + portal_id = from_str(obj.get("portalId")) + return PortalFetchParams(portal_id) def to_dict(self) -> dict: result: dict = {} - result["conversationId"] = from_str(self.conversation_id) - if self.conversation_usage_fetch_params_from is not None: - result["from"] = from_union([lambda x: x.isoformat(), from_none], self.conversation_usage_fetch_params_from) - if self.to is not None: - result["to"] = from_union([lambda x: x.isoformat(), from_none], self.to) + result["portalId"] = from_str(self.portal_id) return result -class ConversationUsageFetchResponse: - messages: Optional[int] - """Total number of messages""" - - tokens: Optional[int] - """Total number of BASE tokens used""" - - def __init__(self, messages: Optional[int], tokens: Optional[int]) -> None: - self.messages = messages - self.tokens = tokens - - @staticmethod - def from_dict(obj: Any) -> 'ConversationUsageFetchResponse': - assert isinstance(obj, dict) - messages = from_union([from_int, from_none], obj.get("messages")) - tokens = from_union([from_int, from_none], obj.get("tokens")) - return ConversationUsageFetchResponse(messages, tokens) - - def to_dict(self) -> dict: - result: dict = {} - if self.messages is not None: - result["messages"] = from_union([from_int, from_none], self.messages) - if self.tokens is not None: - result["tokens"] = from_union([from_int, from_none], self.tokens) - return result - +class PortalFetchResponse: + """Blueprint properties""" -class IndigoRecord: - meta: Optional[Dict[str, Any]] - """Additional metadata for the record""" + alias: Optional[str] + """The unique alias for the instance""" - text: str - """The text content of the record""" + blueprint_id: Optional[str] + """The ID of the blueprint""" - def __init__(self, meta: Optional[Dict[str, Any]], text: str) -> None: - self.meta = meta - self.text = text + config: Optional[Dict[str, Any]] + """The config of the portal""" - @staticmethod - def from_dict(obj: Any) -> 'IndigoRecord': - assert isinstance(obj, dict) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - text = from_str(obj.get("text")) - return IndigoRecord(meta, text) + created_at: float + """The timestamp (ms) when the instance was created""" - def to_dict(self) -> dict: - result: dict = {} - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["text"] = from_str(self.text) - return result + description: Optional[str] + """The associated description""" + id: str + """The instance ID""" -class IndigoDataset: - description: Optional[str] - """The description of the dataset""" + meta: Optional[Dict[str, Any]] + """Meta data information""" name: Optional[str] - """The name of the dataset""" + """The associated name""" - records: List[IndigoRecord] - """The records in the dataset""" + slug: Optional[str] + """The slug of the portal""" - def __init__(self, description: Optional[str], name: Optional[str], records: List[IndigoRecord]) -> None: + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], config: Optional[Dict[str, Any]], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], slug: Optional[str], updated_at: float) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.config = config + self.created_at = created_at self.description = description + self.id = id + self.meta = meta self.name = name - self.records = records + self.slug = slug + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'IndigoDataset': + def from_dict(obj: Any) -> 'PortalFetchResponse': assert isinstance(obj, dict) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - records = from_list(IndigoRecord.from_dict, obj.get("records")) - return IndigoDataset(description, name, records) + slug = from_union([from_str, from_none], obj.get("slug")) + updated_at = from_float(obj.get("updatedAt")) + return PortalFetchResponse(alias, blueprint_id, config, created_at, description, id, meta, name, slug, updated_at) def to_dict(self) -> dict: result: dict = {} + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.config is not None: + result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - result["records"] = from_list(lambda x: to_class(IndigoRecord, x), self.records) + if self.slug is not None: + result["slug"] = from_union([from_str, from_none], self.slug) + result["updatedAt"] = to_float(self.updated_at) return result -class IndigoFeature: - name: str - """The name of the feature to enable""" - - options: Optional[Dict[str, Any]] - """Optional configuration options for the feature""" +class PortalDeleteParams: + portal_id: str + """The ID of the portal to delete""" - def __init__(self, name: str, options: Optional[Dict[str, Any]]) -> None: - self.name = name - self.options = options + def __init__(self, portal_id: str) -> None: + self.portal_id = portal_id @staticmethod - def from_dict(obj: Any) -> 'IndigoFeature': + def from_dict(obj: Any) -> 'PortalDeleteParams': assert isinstance(obj, dict) - name = from_str(obj.get("name")) - options = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("options")) - return IndigoFeature(name, options) + portal_id = from_str(obj.get("portalId")) + return PortalDeleteParams(portal_id) def to_dict(self) -> dict: result: dict = {} - result["name"] = from_str(self.name) - if self.options is not None: - result["options"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.options) + result["portalId"] = from_str(self.portal_id) return result -class IndigoAbility: - description: str - """The description of the ability""" - - instruction: str - """The instruction for the ability""" - - meta: Optional[Dict[str, Any]] - """Additional metadata for the ability""" - - name: str - """The name of the ability""" - - secret_id: Optional[str] - """Optional secret ID for the ability""" +class PortalDeleteResponse: + id: str + """The ID of the deleted portal""" - def __init__(self, description: str, instruction: str, meta: Optional[Dict[str, Any]], name: str, secret_id: Optional[str]) -> None: - self.description = description - self.instruction = instruction - self.meta = meta - self.name = name - self.secret_id = secret_id + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'IndigoAbility': + def from_dict(obj: Any) -> 'PortalDeleteResponse': assert isinstance(obj, dict) - description = from_str(obj.get("description")) - instruction = from_str(obj.get("instruction")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - secret_id = from_union([from_str, from_none], obj.get("secretId")) - return IndigoAbility(description, instruction, meta, name, secret_id) + id = from_str(obj.get("id")) + return PortalDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} - result["description"] = from_str(self.description) - result["instruction"] = from_str(self.instruction) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - if self.secret_id is not None: - result["secretId"] = from_union([from_str, from_none], self.secret_id) + result["id"] = from_str(self.id) return result -class IndigoSkillset: - abilities: List[IndigoAbility] - """The abilities in the skillset""" - - description: Optional[str] - """The description of the skillset""" +class PolicyListParamsOrder(Enum): + """The order of the paginated items""" - name: Optional[str] - """The name of the skillset""" + ASC = "asc" + DESC = "desc" - def __init__(self, abilities: List[IndigoAbility], description: Optional[str], name: Optional[str]) -> None: - self.abilities = abilities - self.description = description - self.name = name - @staticmethod - def from_dict(obj: Any) -> 'IndigoSkillset': - assert isinstance(obj, dict) - abilities = from_list(IndigoAbility.from_dict, obj.get("abilities")) - description = from_union([from_str, from_none], obj.get("description")) - name = from_union([from_str, from_none], obj.get("name")) - return IndigoSkillset(abilities, description, name) - - def to_dict(self) -> dict: - result: dict = {} - result["abilities"] = from_list(lambda x: to_class(IndigoAbility, x), self.abilities) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - return result - - -class ConversationStatelessCompactRequestExtensions: - """Extensions to enhance the bot's capabilities""" +class PolicyListParams: + bot_id: Optional[str] + """Filter policies that apply to a specific bot""" - backstory: Optional[str] - """Additional backstory for the bot""" + cursor: Optional[str] + """The cursor to use for pagination""" - datasets: Optional[List[IndigoDataset]] - """Inline datasets to provide additional context""" + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" - features: Optional[List[IndigoFeature]] - """Feature flags to enable specific bot capabilities""" + order: Optional[PolicyListParamsOrder] + """The order of the paginated items""" - skillsets: Optional[List[IndigoSkillset]] - """Inline skillsets to provide additional abilities""" + take: Optional[int] + """The number of items to retrieve""" - def __init__(self, backstory: Optional[str], datasets: Optional[List[IndigoDataset]], features: Optional[List[IndigoFeature]], skillsets: Optional[List[IndigoSkillset]]) -> None: - self.backstory = backstory - self.datasets = datasets - self.features = features - self.skillsets = skillsets + def __init__(self, bot_id: Optional[str], cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[PolicyListParamsOrder], take: Optional[int]) -> None: + self.bot_id = bot_id + self.cursor = cursor + self.meta = meta + self.order = order + self.take = take @staticmethod - def from_dict(obj: Any) -> 'ConversationStatelessCompactRequestExtensions': + def from_dict(obj: Any) -> 'PolicyListParams': assert isinstance(obj, dict) - backstory = from_union([from_str, from_none], obj.get("backstory")) - datasets = from_union([lambda x: from_list(IndigoDataset.from_dict, x), from_none], obj.get("datasets")) - features = from_union([lambda x: from_list(IndigoFeature.from_dict, x), from_none], obj.get("features")) - skillsets = from_union([lambda x: from_list(IndigoSkillset.from_dict, x), from_none], obj.get("skillsets")) - return ConversationStatelessCompactRequestExtensions(backstory, datasets, features, skillsets) + bot_id = from_union([from_str, from_none], obj.get("botId")) + cursor = from_union([from_str, from_none], obj.get("cursor")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([PolicyListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return PolicyListParams(bot_id, cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} - if self.backstory is not None: - result["backstory"] = from_union([from_str, from_none], self.backstory) - if self.datasets is not None: - result["datasets"] = from_union([lambda x: from_list(lambda x: to_class(IndigoDataset, x), x), from_none], self.datasets) - if self.features is not None: - result["features"] = from_union([lambda x: from_list(lambda x: to_class(IndigoFeature, x), x), from_none], self.features) - if self.skillsets is not None: - result["skillsets"] = from_union([lambda x: from_list(lambda x: to_class(IndigoSkillset, x), x), from_none], self.skillsets) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(PolicyListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class BraggadociousType(Enum): - """The type of the message""" - - ACTIVITY = "activity" - BACKSTORY = "backstory" - BOT = "bot" - CHECKPOINT = "checkpoint" - CONTEXT = "context" - INSTRUCTION = "instruction" - REASONING = "reasoning" - USER = "user" - +class IndigoState(Enum): + """The lifecycle state of a resource - toggle it on/off without deleting it""" -class ConversationStatelessCompactRequestMessage: - """A message in the conversation""" + DISABLED = "disabled" + ENABLED = "enabled" - meta: Optional[Dict[str, Any]] - """Meta data information""" - text: str - """The text of the message""" +class HilariousType(Enum): + """The policy type""" - type: BraggadociousType - """The type of the message""" + RETENTION = "retention" + USAGE = "usage" - def __init__(self, meta: Optional[Dict[str, Any]], text: str, type: BraggadociousType) -> None: - self.meta = meta - self.text = text - self.type = type - @staticmethod - def from_dict(obj: Any) -> 'ConversationStatelessCompactRequestMessage': - assert isinstance(obj, dict) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - text = from_str(obj.get("text")) - type = BraggadociousType(obj.get("type")) - return ConversationStatelessCompactRequestMessage(meta, text, type) +class PolicyListResponseItem: + """Blueprint properties""" - def to_dict(self) -> dict: - result: dict = {} - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["text"] = from_str(self.text) - result["type"] = to_enum(BraggadociousType, self.type) - return result + alias: Optional[str] + """The unique alias for the instance""" + blueprint_id: Optional[str] + """The ID of the blueprint""" -class ConversationStatelessCompactRequest: - """A bot configuration or reference - - A bot configuration that can be applied without a dedicated bot instance. + bot_id: Optional[str] + """The ID of the bot this policy applies to. When omitted the policy is global and applies + to every bot. """ - extensions: Optional[ConversationStatelessCompactRequestExtensions] - """Extensions to enhance the bot's capabilities""" + config: Optional[Dict[str, Any]] + """The policy configuration as JSON""" - messages: List[ConversationStatelessCompactRequestMessage] - """An array of messages to be compacted""" + created_at: float + """The timestamp (ms) when the instance was created""" - bot_id: Optional[str] - """The ID of the bot this configuration is using""" + description: Optional[str] + """The associated description""" - backstory: Optional[str] - """The backstory this configuration is using""" + id: str + """The instance ID""" - dataset_id: Optional[str] - """The id of the dataset this configuration is using""" + meta: Optional[Dict[str, Any]] + """Meta data information""" - model: Optional[str] - """A model definition""" + name: Optional[str] + """The associated name""" - moderation: Optional[bool] - """The moderation flag for this configuration""" + state: Optional[IndigoState] + """The lifecycle state of a resource - toggle it on/off without deleting it""" - privacy: Optional[bool] - """The privacy flag for this configuration""" + type: HilariousType + """The policy type""" - skillset_id: Optional[str] - """The id of the skillset this configuration is using""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - def __init__(self, extensions: Optional[ConversationStatelessCompactRequestExtensions], messages: List[ConversationStatelessCompactRequestMessage], bot_id: Optional[str], backstory: Optional[str], dataset_id: Optional[str], model: Optional[str], moderation: Optional[bool], privacy: Optional[bool], skillset_id: Optional[str]) -> None: - self.extensions = extensions - self.messages = messages + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], config: Optional[Dict[str, Any]], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], state: Optional[IndigoState], type: HilariousType, updated_at: float) -> None: + self.alias = alias + self.blueprint_id = blueprint_id self.bot_id = bot_id - self.backstory = backstory - self.dataset_id = dataset_id - self.model = model - self.moderation = moderation - self.privacy = privacy - self.skillset_id = skillset_id + self.config = config + self.created_at = created_at + self.description = description + self.id = id + self.meta = meta + self.name = name + self.state = state + self.type = type + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'ConversationStatelessCompactRequest': + def from_dict(obj: Any) -> 'PolicyListResponseItem': assert isinstance(obj, dict) - extensions = from_union([ConversationStatelessCompactRequestExtensions.from_dict, from_none], obj.get("extensions")) - messages = from_list(ConversationStatelessCompactRequestMessage.from_dict, obj.get("messages")) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) - backstory = from_union([from_str, from_none], obj.get("backstory")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) - model = from_union([from_str, from_none], obj.get("model")) - moderation = from_union([from_bool, from_none], obj.get("moderation")) - privacy = from_union([from_bool, from_none], obj.get("privacy")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) - return ConversationStatelessCompactRequest(extensions, messages, bot_id, backstory, dataset_id, model, moderation, privacy, skillset_id) + config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) + created_at = from_float(obj.get("createdAt")) + description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + state = from_union([IndigoState, from_none], obj.get("state")) + type = HilariousType(obj.get("type")) + updated_at = from_float(obj.get("updatedAt")) + return PolicyListResponseItem(alias, blueprint_id, bot_id, config, created_at, description, id, meta, name, state, type, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.extensions is not None: - result["extensions"] = from_union([lambda x: to_class(ConversationStatelessCompactRequestExtensions, x), from_none], self.extensions) - result["messages"] = from_list(lambda x: to_class(ConversationStatelessCompactRequestMessage, x), self.messages) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.backstory is not None: - result["backstory"] = from_union([from_str, from_none], self.backstory) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) - if self.moderation is not None: - result["moderation"] = from_union([from_bool, from_none], self.moderation) - if self.privacy is not None: - result["privacy"] = from_union([from_bool, from_none], self.privacy) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) + if self.config is not None: + result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) + result["createdAt"] = to_float(self.created_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.state is not None: + result["state"] = from_union([lambda x: to_enum(IndigoState, x), from_none], self.state) + result["type"] = to_enum(HilariousType, self.type) + result["updatedAt"] = to_float(self.updated_at) return result -class ConversationStatelessCompactResponseUsage: - """Usage information""" +class PolicyListResponse: + cursor: str + """Cursor for fetching the next page""" - token: float - """The tokens used in this exchange""" + items: List[PolicyListResponseItem] - def __init__(self, token: float) -> None: - self.token = token + def __init__(self, cursor: str, items: List[PolicyListResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'ConversationStatelessCompactResponseUsage': + def from_dict(obj: Any) -> 'PolicyListResponse': assert isinstance(obj, dict) - token = from_float(obj.get("token")) - return ConversationStatelessCompactResponseUsage(token) + cursor = from_str(obj.get("cursor")) + items = from_list(PolicyListResponseItem.from_dict, obj.get("items")) + return PolicyListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["token"] = to_float(self.token) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(PolicyListResponseItem, x), self.items) return result -class ConversationStatelessCompactResponse: - text: str - """The compacted text of the messages, or an empty string if there was nothing to compact""" - - usage: ConversationStatelessCompactResponseUsage - """Usage information""" +class IndecentState(Enum): + """The lifecycle state of a resource - toggle it on/off without deleting it""" - def __init__(self, text: str, usage: ConversationStatelessCompactResponseUsage) -> None: - self.text = text - self.usage = usage + DISABLED = "disabled" + ENABLED = "enabled" - @staticmethod - def from_dict(obj: Any) -> 'ConversationStatelessCompactResponse': - assert isinstance(obj, dict) - text = from_str(obj.get("text")) - usage = ConversationStatelessCompactResponseUsage.from_dict(obj.get("usage")) - return ConversationStatelessCompactResponse(text, usage) - def to_dict(self) -> dict: - result: dict = {} - result["text"] = from_str(self.text) - result["usage"] = to_class(ConversationStatelessCompactResponseUsage, self.usage) - return result +class AmbitiousType(Enum): + """The policy type""" + RETENTION = "retention" + USAGE = "usage" -class ConversationCompleteRequestAttachment: - url: Optional[str] - """The URL of the attachment""" - def __init__(self, url: Optional[str]) -> None: - self.url = url +class PolicyListStreamItemData: + """Blueprint properties""" - @staticmethod - def from_dict(obj: Any) -> 'ConversationCompleteRequestAttachment': - assert isinstance(obj, dict) - url = from_union([from_str, from_none], obj.get("url")) - return ConversationCompleteRequestAttachment(url) + alias: Optional[str] + """The unique alias for the instance""" - def to_dict(self) -> dict: - result: dict = {} - if self.url is not None: - result["url"] = from_union([from_str, from_none], self.url) - return result + blueprint_id: Optional[str] + """The ID of the blueprint""" + bot_id: Optional[str] + """The ID of the bot this policy applies to. When omitted the policy is global and applies + to every bot. + """ + config: Optional[Dict[str, Any]] + """The policy configuration as JSON""" -class PurpleContactID: - """A contact object to create or retrieve a trusted contact""" + created_at: float + """The timestamp (ms) when the instance was created""" description: Optional[str] - """A description of the contact""" - - email: Optional[str] - """The email address of the contact""" + """The associated description""" - fingerprint: str - """A unique fingerprint to identify the contact""" + id: str + """The instance ID""" meta: Optional[Dict[str, Any]] - """Additional metadata for the contact""" + """Meta data information""" name: Optional[str] - """The name of the contact""" + """The associated name""" - nick: Optional[str] - """A nickname for the contact""" + state: Optional[IndecentState] + """The lifecycle state of a resource - toggle it on/off without deleting it""" - phone: Optional[str] - """The phone number of the contact""" + type: AmbitiousType + """The policy type""" - def __init__(self, description: Optional[str], email: Optional[str], fingerprint: str, meta: Optional[Dict[str, Any]], name: Optional[str], nick: Optional[str], phone: Optional[str]) -> None: + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], config: Optional[Dict[str, Any]], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], state: Optional[IndecentState], type: AmbitiousType, updated_at: float) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.config = config + self.created_at = created_at self.description = description - self.email = email - self.fingerprint = fingerprint + self.id = id self.meta = meta self.name = name - self.nick = nick - self.phone = phone + self.state = state + self.type = type + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'PurpleContactID': + def from_dict(obj: Any) -> 'PolicyListStreamItemData': assert isinstance(obj, dict) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - email = from_union([from_str, from_none], obj.get("email")) - fingerprint = from_str(obj.get("fingerprint")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - nick = from_union([from_str, from_none], obj.get("nick")) - phone = from_union([from_str, from_none], obj.get("phone")) - return PurpleContactID(description, email, fingerprint, meta, name, nick, phone) + state = from_union([IndecentState, from_none], obj.get("state")) + type = AmbitiousType(obj.get("type")) + updated_at = from_float(obj.get("updatedAt")) + return PolicyListStreamItemData(alias, blueprint_id, bot_id, config, created_at, description, id, meta, name, state, type, updated_at) def to_dict(self) -> dict: result: dict = {} + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.config is not None: + result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.email is not None: - result["email"] = from_union([from_str, from_none], self.email) - result["fingerprint"] = from_str(self.fingerprint) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.nick is not None: - result["nick"] = from_union([from_str, from_none], self.nick) - if self.phone is not None: - result["phone"] = from_union([from_str, from_none], self.phone) + if self.state is not None: + result["state"] = from_union([lambda x: to_enum(IndecentState, x), from_none], self.state) + result["type"] = to_enum(AmbitiousType, self.type) + result["updatedAt"] = to_float(self.updated_at) return result -class IndecentRecord: - meta: Optional[Dict[str, Any]] - """Additional metadata for the record""" +class PolicyListStreamItemType(Enum): + """The type of event""" - text: str - """The text content of the record""" + ITEM = "item" - def __init__(self, meta: Optional[Dict[str, Any]], text: str) -> None: - self.meta = meta - self.text = text + +class PolicyListStreamItem: + data: PolicyListStreamItemData + """Blueprint properties""" + + type: PolicyListStreamItemType + """The type of event""" + + def __init__(self, data: PolicyListStreamItemData, type: PolicyListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'IndecentRecord': + def from_dict(obj: Any) -> 'PolicyListStreamItem': assert isinstance(obj, dict) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - text = from_str(obj.get("text")) - return IndecentRecord(meta, text) + data = PolicyListStreamItemData.from_dict(obj.get("data")) + type = PolicyListStreamItemType(obj.get("type")) + return PolicyListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["text"] = from_str(self.text) + result["data"] = to_class(PolicyListStreamItemData, self.data) + result["type"] = to_enum(PolicyListStreamItemType, self.type) return result -class IndecentDataset: +class PolicyCreateRequestState(Enum): + """The lifecycle state of a resource - toggle it on/off without deleting it""" + + DISABLED = "disabled" + ENABLED = "enabled" + + +class PolicyCreateRequestType(Enum): + """The policy type""" + + RETENTION = "retention" + USAGE = "usage" + + +class PolicyCreateRequest: + """Blueprint properties""" + + alias: Optional[str] + """The unique alias for the instance""" + + blueprint_id: Optional[str] + """The ID of the blueprint""" + + bot_id: Optional[str] + """The ID of the bot this policy applies to. When omitted the policy is global and applies + to every bot. + """ + config: Optional[Dict[str, Any]] + """The policy configuration as JSON""" + description: Optional[str] - """The description of the dataset""" + """The associated description""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" name: Optional[str] - """The name of the dataset""" + """The associated name""" - records: List[IndecentRecord] - """The records in the dataset""" + state: Optional[PolicyCreateRequestState] + """The lifecycle state of a resource - toggle it on/off without deleting it""" - def __init__(self, description: Optional[str], name: Optional[str], records: List[IndecentRecord]) -> None: + type: PolicyCreateRequestType + """The policy type""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], config: Optional[Dict[str, Any]], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], state: Optional[PolicyCreateRequestState], type: PolicyCreateRequestType) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.config = config self.description = description + self.meta = meta self.name = name - self.records = records + self.state = state + self.type = type @staticmethod - def from_dict(obj: Any) -> 'IndecentDataset': + def from_dict(obj: Any) -> 'PolicyCreateRequest': assert isinstance(obj, dict) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) description = from_union([from_str, from_none], obj.get("description")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - records = from_list(IndecentRecord.from_dict, obj.get("records")) - return IndecentDataset(description, name, records) + state = from_union([PolicyCreateRequestState, from_none], obj.get("state")) + type = PolicyCreateRequestType(obj.get("type")) + return PolicyCreateRequest(alias, blueprint_id, bot_id, config, description, meta, name, state, type) def to_dict(self) -> dict: result: dict = {} + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.config is not None: + result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - result["records"] = from_list(lambda x: to_class(IndecentRecord, x), self.records) + if self.state is not None: + result["state"] = from_union([lambda x: to_enum(PolicyCreateRequestState, x), from_none], self.state) + result["type"] = to_enum(PolicyCreateRequestType, self.type) return result -class IndecentFeature: - name: str - """The name of the feature to enable""" +class PolicyCreateResponse: + id: str + """The ID of the created policy""" - options: Optional[Dict[str, Any]] - """Optional configuration options for the feature""" - - def __init__(self, name: str, options: Optional[Dict[str, Any]]) -> None: - self.name = name - self.options = options + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'IndecentFeature': + def from_dict(obj: Any) -> 'PolicyCreateResponse': assert isinstance(obj, dict) - name = from_str(obj.get("name")) - options = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("options")) - return IndecentFeature(name, options) + id = from_str(obj.get("id")) + return PolicyCreateResponse(id) def to_dict(self) -> dict: result: dict = {} - result["name"] = from_str(self.name) - if self.options is not None: - result["options"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.options) + result["id"] = from_str(self.id) return result -class IndecentAbility: - description: str - """The description of the ability""" - - instruction: str - """The instruction for the ability""" - - meta: Optional[Dict[str, Any]] - """Additional metadata for the ability""" - - name: str - """The name of the ability""" - - secret_id: Optional[str] - """Optional secret ID for the ability""" +class PolicyUpdateParams: + policy_id: str + """The ID of the policy to update""" - def __init__(self, description: str, instruction: str, meta: Optional[Dict[str, Any]], name: str, secret_id: Optional[str]) -> None: - self.description = description - self.instruction = instruction - self.meta = meta - self.name = name - self.secret_id = secret_id + def __init__(self, policy_id: str) -> None: + self.policy_id = policy_id @staticmethod - def from_dict(obj: Any) -> 'IndecentAbility': + def from_dict(obj: Any) -> 'PolicyUpdateParams': assert isinstance(obj, dict) - description = from_str(obj.get("description")) - instruction = from_str(obj.get("instruction")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - secret_id = from_union([from_str, from_none], obj.get("secretId")) - return IndecentAbility(description, instruction, meta, name, secret_id) + policy_id = from_str(obj.get("policyId")) + return PolicyUpdateParams(policy_id) def to_dict(self) -> dict: result: dict = {} - result["description"] = from_str(self.description) - result["instruction"] = from_str(self.instruction) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - if self.secret_id is not None: - result["secretId"] = from_union([from_str, from_none], self.secret_id) + result["policyId"] = from_str(self.policy_id) return result -class IndecentSkillset: - abilities: List[IndecentAbility] - """The abilities in the skillset""" +class PolicyUpdateRequestState(Enum): + """The lifecycle state of a resource - toggle it on/off without deleting it""" + + DISABLED = "disabled" + ENABLED = "enabled" + + +class PolicyUpdateRequestType(Enum): + """The policy type""" + + RETENTION = "retention" + USAGE = "usage" + + +class PolicyUpdateRequest: + """Blueprint properties""" + + alias: Optional[str] + """The unique alias for the instance""" + + blueprint_id: Optional[str] + """The ID of the blueprint""" + + bot_id: Optional[str] + """The ID of the bot this policy applies to. When omitted the policy is global and applies + to every bot. + """ + config: Optional[Dict[str, Any]] + """The policy configuration as JSON""" description: Optional[str] - """The description of the skillset""" + """The associated description""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" name: Optional[str] - """The name of the skillset""" + """The associated name""" - def __init__(self, abilities: List[IndecentAbility], description: Optional[str], name: Optional[str]) -> None: - self.abilities = abilities + state: Optional[PolicyUpdateRequestState] + """The lifecycle state of a resource - toggle it on/off without deleting it""" + + type: Optional[PolicyUpdateRequestType] + """The policy type""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], config: Optional[Dict[str, Any]], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], state: Optional[PolicyUpdateRequestState], type: Optional[PolicyUpdateRequestType]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.config = config self.description = description + self.meta = meta self.name = name + self.state = state + self.type = type @staticmethod - def from_dict(obj: Any) -> 'IndecentSkillset': + def from_dict(obj: Any) -> 'PolicyUpdateRequest': assert isinstance(obj, dict) - abilities = from_list(IndecentAbility.from_dict, obj.get("abilities")) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) description = from_union([from_str, from_none], obj.get("description")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - return IndecentSkillset(abilities, description, name) + state = from_union([PolicyUpdateRequestState, from_none], obj.get("state")) + type = from_union([PolicyUpdateRequestType, from_none], obj.get("type")) + return PolicyUpdateRequest(alias, blueprint_id, bot_id, config, description, meta, name, state, type) def to_dict(self) -> dict: result: dict = {} - result["abilities"] = from_list(lambda x: to_class(IndecentAbility, x), self.abilities) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.config is not None: + result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.state is not None: + result["state"] = from_union([lambda x: to_enum(PolicyUpdateRequestState, x), from_none], self.state) + if self.type is not None: + result["type"] = from_union([lambda x: to_enum(PolicyUpdateRequestType, x), from_none], self.type) return result -class ConversationCompleteRequestExtensions: - """Extensions to enhance the bot's capabilities""" - - backstory: Optional[str] - """Additional backstory for the bot""" - - datasets: Optional[List[IndecentDataset]] - """Inline datasets to provide additional context""" - - features: Optional[List[IndecentFeature]] - """Feature flags to enable specific bot capabilities""" - - skillsets: Optional[List[IndecentSkillset]] - """Inline skillsets to provide additional abilities""" +class PolicyUpdateResponse: + id: str + """The ID of the updated policy""" - def __init__(self, backstory: Optional[str], datasets: Optional[List[IndecentDataset]], features: Optional[List[IndecentFeature]], skillsets: Optional[List[IndecentSkillset]]) -> None: - self.backstory = backstory - self.datasets = datasets - self.features = features - self.skillsets = skillsets + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'ConversationCompleteRequestExtensions': + def from_dict(obj: Any) -> 'PolicyUpdateResponse': assert isinstance(obj, dict) - backstory = from_union([from_str, from_none], obj.get("backstory")) - datasets = from_union([lambda x: from_list(IndecentDataset.from_dict, x), from_none], obj.get("datasets")) - features = from_union([lambda x: from_list(IndecentFeature.from_dict, x), from_none], obj.get("features")) - skillsets = from_union([lambda x: from_list(IndecentSkillset.from_dict, x), from_none], obj.get("skillsets")) - return ConversationCompleteRequestExtensions(backstory, datasets, features, skillsets) + id = from_str(obj.get("id")) + return PolicyUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} - if self.backstory is not None: - result["backstory"] = from_union([from_str, from_none], self.backstory) - if self.datasets is not None: - result["datasets"] = from_union([lambda x: from_list(lambda x: to_class(IndecentDataset, x), x), from_none], self.datasets) - if self.features is not None: - result["features"] = from_union([lambda x: from_list(lambda x: to_class(IndecentFeature, x), x), from_none], self.features) - if self.skillsets is not None: - result["skillsets"] = from_union([lambda x: from_list(lambda x: to_class(IndecentSkillset, x), x), from_none], self.skillsets) + result["id"] = from_str(self.id) return result -class IndigoCall: - """Configuration for when this function should be automatically called""" - - end: Optional[bool] - """If true, this function will be force-called at the end of the conversation""" - - start: Optional[bool] - """If true, this function will be force-called at the start of the conversation""" +class PolicyFetchParams: + policy_id: str + """The ID of the policy to retrieve""" - def __init__(self, end: Optional[bool], start: Optional[bool]) -> None: - self.end = end - self.start = start + def __init__(self, policy_id: str) -> None: + self.policy_id = policy_id @staticmethod - def from_dict(obj: Any) -> 'IndigoCall': + def from_dict(obj: Any) -> 'PolicyFetchParams': assert isinstance(obj, dict) - end = from_union([from_bool, from_none], obj.get("end")) - start = from_union([from_bool, from_none], obj.get("start")) - return IndigoCall(end, start) + policy_id = from_str(obj.get("policyId")) + return PolicyFetchParams(policy_id) def to_dict(self) -> dict: result: dict = {} - if self.end is not None: - result["end"] = from_union([from_bool, from_none], self.end) - if self.start is not None: - result["start"] = from_union([from_bool, from_none], self.start) + result["policyId"] = from_str(self.policy_id) return result -class Type1(Enum): - """The schema type, must be "object\"""" - - OBJECT = "object" - - -class IndigoParameters: - """JSON Schema definition for the function parameters""" - - properties: Dict[str, Any] - """Object property definitions""" - - required: Optional[List[str]] - """Required property names""" +class PolicyFetchResponseState(Enum): + """The lifecycle state of a resource - toggle it on/off without deleting it""" - type: Type1 - """The schema type, must be "object\"""" + DISABLED = "disabled" + ENABLED = "enabled" - def __init__(self, properties: Dict[str, Any], required: Optional[List[str]], type: Type1) -> None: - self.properties = properties - self.required = required - self.type = type - @staticmethod - def from_dict(obj: Any) -> 'IndigoParameters': - assert isinstance(obj, dict) - properties = from_dict(lambda x: x, obj.get("properties")) - required = from_union([lambda x: from_list(from_str, x), from_none], obj.get("required")) - type = Type1(obj.get("type")) - return IndigoParameters(properties, required, type) +class PolicyFetchResponseType(Enum): + """The policy type""" - def to_dict(self) -> dict: - result: dict = {} - result["properties"] = from_dict(lambda x: x, self.properties) - if self.required is not None: - result["required"] = from_union([lambda x: from_list(from_str, x), from_none], self.required) - result["type"] = to_enum(Type1, self.type) - return result + RETENTION = "retention" + USAGE = "usage" -class IndigoResult: - """The result of the function execution""" +class PolicyFetchResponse: + """Blueprint properties""" - data: Any - """The data returned by the function (can be any type)""" + alias: Optional[str] + """The unique alias for the instance""" - channel: Optional[str] - """The channel for streaming function results""" + blueprint_id: Optional[str] + """The ID of the blueprint""" - def __init__(self, data: Any, channel: Optional[str]) -> None: - self.data = data - self.channel = channel + bot_id: Optional[str] + """The ID of the bot this policy applies to. When omitted the policy is global and applies + to every bot. + """ + config: Optional[Dict[str, Any]] + """The policy configuration as JSON""" - @staticmethod - def from_dict(obj: Any) -> 'IndigoResult': - assert isinstance(obj, dict) - data = obj.get("data") - channel = from_union([from_str, from_none], obj.get("channel")) - return IndigoResult(data, channel) + created_at: float + """The timestamp (ms) when the instance was created""" - def to_dict(self) -> dict: - result: dict = {} - if self.data is not None: - result["data"] = self.data - if self.channel is not None: - result["channel"] = from_union([from_str, from_none], self.channel) - return result + description: Optional[str] + """The associated description""" + id: str + """The instance ID""" -class ConversationCompleteRequestFunction: - call: Optional[IndigoCall] - """Configuration for when this function should be automatically called""" + meta: Optional[Dict[str, Any]] + """Meta data information""" - description: str - """The description of the function""" + name: Optional[str] + """The associated name""" - name: str - """The name of the function (must be a valid JS identifier, max 64 chars)""" + state: Optional[PolicyFetchResponseState] + """The lifecycle state of a resource - toggle it on/off without deleting it""" - parameters: IndigoParameters - """JSON Schema definition for the function parameters""" + type: PolicyFetchResponseType + """The policy type""" - result: Optional[IndigoResult] - """The result of the function execution""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - def __init__(self, call: Optional[IndigoCall], description: str, name: str, parameters: IndigoParameters, result: Optional[IndigoResult]) -> None: - self.call = call + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], config: Optional[Dict[str, Any]], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], state: Optional[PolicyFetchResponseState], type: PolicyFetchResponseType, updated_at: float) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.config = config + self.created_at = created_at self.description = description + self.id = id + self.meta = meta self.name = name - self.parameters = parameters - self.result = result + self.state = state + self.type = type + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'ConversationCompleteRequestFunction': + def from_dict(obj: Any) -> 'PolicyFetchResponse': assert isinstance(obj, dict) - call = from_union([IndigoCall.from_dict, from_none], obj.get("call")) - description = from_str(obj.get("description")) - name = from_str(obj.get("name")) - parameters = IndigoParameters.from_dict(obj.get("parameters")) - result = from_union([IndigoResult.from_dict, from_none], obj.get("result")) - return ConversationCompleteRequestFunction(call, description, name, parameters, result) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) + created_at = from_float(obj.get("createdAt")) + description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + state = from_union([PolicyFetchResponseState, from_none], obj.get("state")) + type = PolicyFetchResponseType(obj.get("type")) + updated_at = from_float(obj.get("updatedAt")) + return PolicyFetchResponse(alias, blueprint_id, bot_id, config, created_at, description, id, meta, name, state, type, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.call is not None: - result["call"] = from_union([lambda x: to_class(IndigoCall, x), from_none], self.call) - result["description"] = from_str(self.description) - result["name"] = from_str(self.name) - result["parameters"] = to_class(IndigoParameters, self.parameters) - if self.result is not None: - result["result"] = from_union([lambda x: to_class(IndigoResult, x), from_none], self.result) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.config is not None: + result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) + result["createdAt"] = to_float(self.created_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.state is not None: + result["state"] = from_union([lambda x: to_enum(PolicyFetchResponseState, x), from_none], self.state) + result["type"] = to_enum(PolicyFetchResponseType, self.type) + result["updatedAt"] = to_float(self.updated_at) return result -class ConversationCompleteRequestLimits: - """Execution limits to control conversation processing bounds""" - - calls: Optional[int] - """Maximum number of function/tool calls. Controls how many total function calls can be made - during the conversation. - """ - continuations: Optional[int] - """Maximum number of model continuations. Controls how many times the model can continue - generating after reaching a stop condition. - """ - iterations: Optional[int] - """Maximum number of agentic iterations. Controls how many times the model can iterate - through tool calls and responses. - """ +class PolicyDeleteParams: + policy_id: str + """The ID of the policy to delete""" - def __init__(self, calls: Optional[int], continuations: Optional[int], iterations: Optional[int]) -> None: - self.calls = calls - self.continuations = continuations - self.iterations = iterations + def __init__(self, policy_id: str) -> None: + self.policy_id = policy_id @staticmethod - def from_dict(obj: Any) -> 'ConversationCompleteRequestLimits': + def from_dict(obj: Any) -> 'PolicyDeleteParams': assert isinstance(obj, dict) - calls = from_union([from_int, from_none], obj.get("calls")) - continuations = from_union([from_int, from_none], obj.get("continuations")) - iterations = from_union([from_int, from_none], obj.get("iterations")) - return ConversationCompleteRequestLimits(calls, continuations, iterations) + policy_id = from_str(obj.get("policyId")) + return PolicyDeleteParams(policy_id) def to_dict(self) -> dict: result: dict = {} - if self.calls is not None: - result["calls"] = from_union([from_int, from_none], self.calls) - if self.continuations is not None: - result["continuations"] = from_union([from_int, from_none], self.continuations) - if self.iterations is not None: - result["iterations"] = from_union([from_int, from_none], self.iterations) + result["policyId"] = from_str(self.policy_id) return result -class Type2(Enum): - """The type of the message""" +class PolicyDeleteResponse: + id: str + """The ID of the deleted policy""" - ACTIVITY = "activity" - BACKSTORY = "backstory" - BOT = "bot" - CHECKPOINT = "checkpoint" - CONTEXT = "context" - INSTRUCTION = "instruction" - REASONING = "reasoning" - USER = "user" + def __init__(self, id: str) -> None: + self.id = id + @staticmethod + def from_dict(obj: Any) -> 'PolicyDeleteResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return PolicyDeleteResponse(id) -class ConversationCompleteRequestMessage: - """A message in the conversation""" + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result - meta: Optional[Dict[str, Any]] - """Meta data information""" - text: str - """The text of the message""" +class PlatformSecretsSearchRequest: + search: str + """The search query to find relevant secrets""" - type: Type2 - """The type of the message""" + take: Optional[int] + """The maximum number of results to return (1-100, default 10)""" - def __init__(self, meta: Optional[Dict[str, Any]], text: str, type: Type2) -> None: - self.meta = meta - self.text = text - self.type = type + def __init__(self, search: str, take: Optional[int]) -> None: + self.search = search + self.take = take @staticmethod - def from_dict(obj: Any) -> 'ConversationCompleteRequestMessage': + def from_dict(obj: Any) -> 'PlatformSecretsSearchRequest': assert isinstance(obj, dict) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - text = from_str(obj.get("text")) - type = Type2(obj.get("type")) - return ConversationCompleteRequestMessage(meta, text, type) + search = from_str(obj.get("search")) + take = from_union([from_int, from_none], obj.get("take")) + return PlatformSecretsSearchRequest(search, take) def to_dict(self) -> dict: result: dict = {} - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["text"] = from_str(self.text) - result["type"] = to_enum(Type2, self.type) + result["search"] = from_str(self.search) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class ConversationCompleteRequest: - """A bot configuration or reference - - A bot configuration that can be applied without a dedicated bot instance. - """ - attachments: Optional[List[ConversationCompleteRequestAttachment]] - """An array of attachments to be added to the conversation""" +class StickyKind(Enum): + """The kind of the secret""" - contact_id: Optional[Union[PurpleContactID, str]] - """The contact ID to associate with this conversation""" + PERSONAL = "personal" + SHARED = "shared" - extensions: Optional[ConversationCompleteRequestExtensions] - """Extensions to enhance the bot's capabilities""" - functions: Optional[List[ConversationCompleteRequestFunction]] - """An array of functions to be added to the conversation""" +class CunningType(Enum): + """The type of the secret""" - limits: Optional[ConversationCompleteRequestLimits] - """Execution limits to control conversation processing bounds""" + BASIC = "basic" + BEARER = "bearer" + JWT = "jwt" + OAUTH = "oauth" + PLAIN = "plain" + REFERENCE = "reference" + TEMPLATE = "template" - messages: List[ConversationCompleteRequestMessage] - """An array of messages to be added to the conversation""" - bot_id: Optional[str] - """The ID of the bot this configuration is using""" +class PlatformSecretsSearchResponseItem: + """Instance list properties""" - backstory: Optional[str] - """The backstory this configuration is using""" + commentary: Optional[str] + config: Optional[Dict[str, Any]] + created_at: float + """The timestamp (ms) when the instance was created""" - dataset_id: Optional[str] - """The id of the dataset this configuration is using""" + description: Optional[str] + """The associated description""" - model: Optional[str] - """A model definition""" + excerpt: str + """An excerpt from the most relevant part of the secret""" - moderation: Optional[bool] - """The moderation flag for this configuration""" + icon: Optional[str] + id: str + """The instance ID""" - privacy: Optional[bool] - """The privacy flag for this configuration""" + kind: Optional[StickyKind] + """The kind of the secret""" - skillset_id: Optional[str] - """The id of the skillset this configuration is using""" - - def __init__(self, attachments: Optional[List[ConversationCompleteRequestAttachment]], contact_id: Optional[Union[PurpleContactID, str]], extensions: Optional[ConversationCompleteRequestExtensions], functions: Optional[List[ConversationCompleteRequestFunction]], limits: Optional[ConversationCompleteRequestLimits], messages: List[ConversationCompleteRequestMessage], bot_id: Optional[str], backstory: Optional[str], dataset_id: Optional[str], model: Optional[str], moderation: Optional[bool], privacy: Optional[bool], skillset_id: Optional[str]) -> None: - self.attachments = attachments - self.contact_id = contact_id - self.extensions = extensions - self.functions = functions - self.limits = limits - self.messages = messages - self.bot_id = bot_id - self.backstory = backstory - self.dataset_id = dataset_id - self.model = model - self.moderation = moderation - self.privacy = privacy - self.skillset_id = skillset_id - - @staticmethod - def from_dict(obj: Any) -> 'ConversationCompleteRequest': - assert isinstance(obj, dict) - attachments = from_union([lambda x: from_list(ConversationCompleteRequestAttachment.from_dict, x), from_none], obj.get("attachments")) - contact_id = from_union([PurpleContactID.from_dict, from_str, from_none], obj.get("contactId")) - extensions = from_union([ConversationCompleteRequestExtensions.from_dict, from_none], obj.get("extensions")) - functions = from_union([lambda x: from_list(ConversationCompleteRequestFunction.from_dict, x), from_none], obj.get("functions")) - limits = from_union([ConversationCompleteRequestLimits.from_dict, from_none], obj.get("limits")) - messages = from_list(ConversationCompleteRequestMessage.from_dict, obj.get("messages")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - backstory = from_union([from_str, from_none], obj.get("backstory")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) - model = from_union([from_str, from_none], obj.get("model")) - moderation = from_union([from_bool, from_none], obj.get("moderation")) - privacy = from_union([from_bool, from_none], obj.get("privacy")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) - return ConversationCompleteRequest(attachments, contact_id, extensions, functions, limits, messages, bot_id, backstory, dataset_id, model, moderation, privacy, skillset_id) - - def to_dict(self) -> dict: - result: dict = {} - if self.attachments is not None: - result["attachments"] = from_union([lambda x: from_list(lambda x: to_class(ConversationCompleteRequestAttachment, x), x), from_none], self.attachments) - if self.contact_id is not None: - result["contactId"] = from_union([lambda x: to_class(PurpleContactID, x), from_str, from_none], self.contact_id) - if self.extensions is not None: - result["extensions"] = from_union([lambda x: to_class(ConversationCompleteRequestExtensions, x), from_none], self.extensions) - if self.functions is not None: - result["functions"] = from_union([lambda x: from_list(lambda x: to_class(ConversationCompleteRequestFunction, x), x), from_none], self.functions) - if self.limits is not None: - result["limits"] = from_union([lambda x: to_class(ConversationCompleteRequestLimits, x), from_none], self.limits) - result["messages"] = from_list(lambda x: to_class(ConversationCompleteRequestMessage, x), self.messages) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.backstory is not None: - result["backstory"] = from_union([from_str, from_none], self.backstory) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) - if self.moderation is not None: - result["moderation"] = from_union([from_bool, from_none], self.moderation) - if self.privacy is not None: - result["privacy"] = from_union([from_bool, from_none], self.privacy) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) - return result - - -class TentacledReason(Enum): - """The reason why the completion ended""" - - ABORT = "abort" - ACTIVITY = "activity" - ERROR = "error" - ITERATION = "iteration" - LENGTH = "length" - STOP = "stop" - - -class ConversationCompleteResponseEnd: - """Information about why the completion ended""" - - reason: TentacledReason - """The reason why the completion ended""" - - def __init__(self, reason: TentacledReason) -> None: - self.reason = reason - - @staticmethod - def from_dict(obj: Any) -> 'ConversationCompleteResponseEnd': - assert isinstance(obj, dict) - reason = TentacledReason(obj.get("reason")) - return ConversationCompleteResponseEnd(reason) - - def to_dict(self) -> dict: - result: dict = {} - result["reason"] = to_enum(TentacledReason, self.reason) - return result - - -class ConversationCompleteResponseUsage: - """Usage information""" - - token: float - """The tokens used in this exchange""" - - def __init__(self, token: float) -> None: - self.token = token - - @staticmethod - def from_dict(obj: Any) -> 'ConversationCompleteResponseUsage': - assert isinstance(obj, dict) - token = from_float(obj.get("token")) - return ConversationCompleteResponseUsage(token) - - def to_dict(self) -> dict: - result: dict = {} - result["token"] = to_float(self.token) - return result - - -class ConversationCompleteResponse: - end: ConversationCompleteResponseEnd - """Information about why the completion ended""" - - text: str - """The text of the message received""" - - usage: ConversationCompleteResponseUsage - """Usage information""" - - def __init__(self, end: ConversationCompleteResponseEnd, text: str, usage: ConversationCompleteResponseUsage) -> None: - self.end = end - self.text = text - self.usage = usage - - @staticmethod - def from_dict(obj: Any) -> 'ConversationCompleteResponse': - assert isinstance(obj, dict) - end = ConversationCompleteResponseEnd.from_dict(obj.get("end")) - text = from_str(obj.get("text")) - usage = ConversationCompleteResponseUsage.from_dict(obj.get("usage")) - return ConversationCompleteResponse(end, text, usage) - - def to_dict(self) -> dict: - result: dict = {} - result["end"] = to_class(ConversationCompleteResponseEnd, self.end) - result["text"] = from_str(self.text) - result["usage"] = to_class(ConversationCompleteResponseUsage, self.usage) - return result - - -class StickyReason(Enum): - """The reason why the completion ended""" - - ABORT = "abort" - ACTIVITY = "activity" - ERROR = "error" - ITERATION = "iteration" - LENGTH = "length" - STOP = "stop" - - -class FluffyEnd: - """Information about why the completion ended""" - - reason: StickyReason - """The reason why the completion ended""" - - def __init__(self, reason: StickyReason) -> None: - self.reason = reason - - @staticmethod - def from_dict(obj: Any) -> 'FluffyEnd': - assert isinstance(obj, dict) - reason = StickyReason(obj.get("reason")) - return FluffyEnd(reason) - - def to_dict(self) -> dict: - result: dict = {} - result["reason"] = to_enum(StickyReason, self.reason) - return result - - -class Type3(Enum): - """The type of the message""" - - ACTIVITY = "activity" - BACKSTORY = "backstory" - BOT = "bot" - CHECKPOINT = "checkpoint" - CONTEXT = "context" - INSTRUCTION = "instruction" - REASONING = "reasoning" - USER = "user" - - -class TentacledUsage: - """Usage information""" - - token: float - """The tokens used in this exchange""" - - def __init__(self, token: float) -> None: - self.token = token - - @staticmethod - def from_dict(obj: Any) -> 'TentacledUsage': - assert isinstance(obj, dict) - token = from_float(obj.get("token")) - return TentacledUsage(token) - - def to_dict(self) -> dict: - result: dict = {} - result["token"] = to_float(self.token) - return result - - -class ConversationCompleteStreamItemData: - """The data for the event - - A message in the conversation - - Information about an abort event in a streamed response - """ - end: Optional[FluffyEnd] - """Information about why the completion ended""" - - text: Optional[str] - """The text of the message received - - The text of the message - """ - usage: Optional[TentacledUsage] - """Usage information""" - - message: Optional[str] - """The error message""" - - token: Optional[str] - """The token generated""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - type: Optional[Type3] - """The type of the message""" - - function_name: Optional[str] - """The function or tool associated with the abort""" - - reason: Any - """The abort reason if available""" - - input_tokens_used: Optional[float] - """The number of input tokens used""" - - model: Optional[str] - """The model used""" - - output_tokens_used: Optional[float] - """The number of output tokens used""" - - def __init__(self, end: Optional[FluffyEnd], text: Optional[str], usage: Optional[TentacledUsage], message: Optional[str], token: Optional[str], meta: Optional[Dict[str, Any]], type: Optional[Type3], function_name: Optional[str], reason: Any, input_tokens_used: Optional[float], model: Optional[str], output_tokens_used: Optional[float]) -> None: - self.end = end - self.text = text - self.usage = usage - self.message = message - self.token = token - self.meta = meta - self.type = type - self.function_name = function_name - self.reason = reason - self.input_tokens_used = input_tokens_used - self.model = model - self.output_tokens_used = output_tokens_used - - @staticmethod - def from_dict(obj: Any) -> 'ConversationCompleteStreamItemData': - assert isinstance(obj, dict) - end = from_union([FluffyEnd.from_dict, from_none], obj.get("end")) - text = from_union([from_str, from_none], obj.get("text")) - usage = from_union([TentacledUsage.from_dict, from_none], obj.get("usage")) - message = from_union([from_str, from_none], obj.get("message")) - token = from_union([from_str, from_none], obj.get("token")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - type = from_union([Type3, from_none], obj.get("type")) - function_name = from_union([from_str, from_none], obj.get("functionName")) - reason = obj.get("reason") - input_tokens_used = from_union([from_float, from_none], obj.get("inputTokensUsed")) - model = from_union([from_str, from_none], obj.get("model")) - output_tokens_used = from_union([from_float, from_none], obj.get("outputTokensUsed")) - return ConversationCompleteStreamItemData(end, text, usage, message, token, meta, type, function_name, reason, input_tokens_used, model, output_tokens_used) - - def to_dict(self) -> dict: - result: dict = {} - if self.end is not None: - result["end"] = from_union([lambda x: to_class(FluffyEnd, x), from_none], self.end) - if self.text is not None: - result["text"] = from_union([from_str, from_none], self.text) - if self.usage is not None: - result["usage"] = from_union([lambda x: to_class(TentacledUsage, x), from_none], self.usage) - if self.message is not None: - result["message"] = from_union([from_str, from_none], self.message) - if self.token is not None: - result["token"] = from_union([from_str, from_none], self.token) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.type is not None: - result["type"] = from_union([lambda x: to_enum(Type3, x), from_none], self.type) - if self.function_name is not None: - result["functionName"] = from_union([from_str, from_none], self.function_name) - if self.reason is not None: - result["reason"] = self.reason - if self.input_tokens_used is not None: - result["inputTokensUsed"] = from_union([to_float, from_none], self.input_tokens_used) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) - if self.output_tokens_used is not None: - result["outputTokensUsed"] = from_union([to_float, from_none], self.output_tokens_used) - return result - - -class ConversationCompleteStreamItemType(Enum): - """The type of event""" - - ABORT = "abort" - COMPLETE_BEGIN = "completeBegin" - COMPLETE_END = "completeEnd" - ERROR = "error" - MESSAGE = "message" - REASONING_TOKEN = "reasoningToken" - RESULT = "result" - TOKEN = "token" - USAGE = "usage" - WAIT_FOR_CHANNEL_MESSAGE_BEGIN = "waitForChannelMessageBegin" - WAIT_FOR_CHANNEL_MESSAGE_END = "waitForChannelMessageEnd" - - -class ConversationCompleteStreamItem: - data: ConversationCompleteStreamItemData - """The data for the event - - A message in the conversation - - Information about an abort event in a streamed response - """ - type: ConversationCompleteStreamItemType - """The type of event""" - - def __init__(self, data: ConversationCompleteStreamItemData, type: ConversationCompleteStreamItemType) -> None: - self.data = data - self.type = type - - @staticmethod - def from_dict(obj: Any) -> 'ConversationCompleteStreamItem': - assert isinstance(obj, dict) - data = ConversationCompleteStreamItemData.from_dict(obj.get("data")) - type = ConversationCompleteStreamItemType(obj.get("type")) - return ConversationCompleteStreamItem(data, type) - - def to_dict(self) -> dict: - result: dict = {} - result["data"] = to_class(ConversationCompleteStreamItemData, self.data) - result["type"] = to_enum(ConversationCompleteStreamItemType, self.type) - return result - - -class Type4(Enum): - """The type of the message""" - - ACTIVITY = "activity" - BACKSTORY = "backstory" - BOT = "bot" - CHECKPOINT = "checkpoint" - CONTEXT = "context" - INSTRUCTION = "instruction" - REASONING = "reasoning" - USER = "user" - - -class ConversationCreateRequestMessage: - text: str - """The text of the message""" - - type: Type4 - """The type of the message""" - - def __init__(self, text: str, type: Type4) -> None: - self.text = text - self.type = type - - @staticmethod - def from_dict(obj: Any) -> 'ConversationCreateRequestMessage': - assert isinstance(obj, dict) - text = from_str(obj.get("text")) - type = Type4(obj.get("type")) - return ConversationCreateRequestMessage(text, type) - - def to_dict(self) -> dict: - result: dict = {} - result["text"] = from_str(self.text) - result["type"] = to_enum(Type4, self.type) - return result - - -class ConversationCreateRequest: - """A bot configuration or reference - - A bot configuration that can be applied without a dedicated bot instance. - """ - contact_id: Optional[str] - """The contact id assigned to this conversation""" - - description: Optional[str] - """The associated description""" - - messages: Optional[List[ConversationCreateRequestMessage]] - """An array of messages to be added to the conversation""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: Optional[str] - """The associated name""" - - space_id: Optional[str] - """The space id assigned to this conversation""" - - task_id: Optional[str] - """The task id assigned to this conversation""" - - bot_id: Optional[str] - """The ID of the bot this configuration is using""" - - backstory: Optional[str] - """The backstory this configuration is using""" - - dataset_id: Optional[str] - """The id of the dataset this configuration is using""" - - model: Optional[str] - """A model definition""" - - moderation: Optional[bool] - """The moderation flag for this configuration""" - - privacy: Optional[bool] - """The privacy flag for this configuration""" - - skillset_id: Optional[str] - """The id of the skillset this configuration is using""" - - def __init__(self, contact_id: Optional[str], description: Optional[str], messages: Optional[List[ConversationCreateRequestMessage]], meta: Optional[Dict[str, Any]], name: Optional[str], space_id: Optional[str], task_id: Optional[str], bot_id: Optional[str], backstory: Optional[str], dataset_id: Optional[str], model: Optional[str], moderation: Optional[bool], privacy: Optional[bool], skillset_id: Optional[str]) -> None: - self.contact_id = contact_id - self.description = description - self.messages = messages - self.meta = meta - self.name = name - self.space_id = space_id - self.task_id = task_id - self.bot_id = bot_id - self.backstory = backstory - self.dataset_id = dataset_id - self.model = model - self.moderation = moderation - self.privacy = privacy - self.skillset_id = skillset_id - - @staticmethod - def from_dict(obj: Any) -> 'ConversationCreateRequest': - assert isinstance(obj, dict) - contact_id = from_union([from_str, from_none], obj.get("contactId")) - description = from_union([from_str, from_none], obj.get("description")) - messages = from_union([lambda x: from_list(ConversationCreateRequestMessage.from_dict, x), from_none], obj.get("messages")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - space_id = from_union([from_str, from_none], obj.get("spaceId")) - task_id = from_union([from_str, from_none], obj.get("taskId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - backstory = from_union([from_str, from_none], obj.get("backstory")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) - model = from_union([from_str, from_none], obj.get("model")) - moderation = from_union([from_bool, from_none], obj.get("moderation")) - privacy = from_union([from_bool, from_none], obj.get("privacy")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) - return ConversationCreateRequest(contact_id, description, messages, meta, name, space_id, task_id, bot_id, backstory, dataset_id, model, moderation, privacy, skillset_id) - - def to_dict(self) -> dict: - result: dict = {} - if self.contact_id is not None: - result["contactId"] = from_union([from_str, from_none], self.contact_id) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.messages is not None: - result["messages"] = from_union([lambda x: from_list(lambda x: to_class(ConversationCreateRequestMessage, x), x), from_none], self.messages) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.space_id is not None: - result["spaceId"] = from_union([from_str, from_none], self.space_id) - if self.task_id is not None: - result["taskId"] = from_union([from_str, from_none], self.task_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.backstory is not None: - result["backstory"] = from_union([from_str, from_none], self.backstory) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) - if self.moderation is not None: - result["moderation"] = from_union([from_bool, from_none], self.moderation) - if self.privacy is not None: - result["privacy"] = from_union([from_bool, from_none], self.privacy) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) - return result - - -class Type5(Enum): - """The type of the message""" - - ACTIVITY = "activity" - BACKSTORY = "backstory" - BOT = "bot" - CHECKPOINT = "checkpoint" - CONTEXT = "context" - INSTRUCTION = "instruction" - REASONING = "reasoning" - USER = "user" - - -class ConversationCreateResponseMessage: - text: str - """The text of the message""" - - type: Type5 - """The type of the message""" - - def __init__(self, text: str, type: Type5) -> None: - self.text = text - self.type = type - - @staticmethod - def from_dict(obj: Any) -> 'ConversationCreateResponseMessage': - assert isinstance(obj, dict) - text = from_str(obj.get("text")) - type = Type5(obj.get("type")) - return ConversationCreateResponseMessage(text, type) - - def to_dict(self) -> dict: - result: dict = {} - result["text"] = from_str(self.text) - result["type"] = to_enum(Type5, self.type) - return result - - -class ConversationCreateResponse: - id: str - """The ID of the created conversation""" - - messages: Optional[List[ConversationCreateResponseMessage]] - """An array of messages included in the conversation""" - - def __init__(self, id: str, messages: Optional[List[ConversationCreateResponseMessage]]) -> None: - self.id = id - self.messages = messages - - @staticmethod - def from_dict(obj: Any) -> 'ConversationCreateResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - messages = from_union([lambda x: from_list(ConversationCreateResponseMessage.from_dict, x), from_none], obj.get("messages")) - return ConversationCreateResponse(id, messages) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - if self.messages is not None: - result["messages"] = from_union([lambda x: from_list(lambda x: to_class(ConversationCreateResponseMessage, x), x), from_none], self.messages) - return result - - -class ConversationDispatchRequestAttachment: - url: Optional[str] - """The URL of the attachment""" - - def __init__(self, url: Optional[str]) -> None: - self.url = url - - @staticmethod - def from_dict(obj: Any) -> 'ConversationDispatchRequestAttachment': - assert isinstance(obj, dict) - url = from_union([from_str, from_none], obj.get("url")) - return ConversationDispatchRequestAttachment(url) - - def to_dict(self) -> dict: - result: dict = {} - if self.url is not None: - result["url"] = from_union([from_str, from_none], self.url) - return result - - -class FluffyContactID: - """A contact object to create or retrieve a trusted contact""" - - description: Optional[str] - """A description of the contact""" - - email: Optional[str] - """The email address of the contact""" - - fingerprint: str - """A unique fingerprint to identify the contact""" - - meta: Optional[Dict[str, Any]] - """Additional metadata for the contact""" - - name: Optional[str] - """The name of the contact""" - - nick: Optional[str] - """A nickname for the contact""" - - phone: Optional[str] - """The phone number of the contact""" - - def __init__(self, description: Optional[str], email: Optional[str], fingerprint: str, meta: Optional[Dict[str, Any]], name: Optional[str], nick: Optional[str], phone: Optional[str]) -> None: - self.description = description - self.email = email - self.fingerprint = fingerprint - self.meta = meta - self.name = name - self.nick = nick - self.phone = phone - - @staticmethod - def from_dict(obj: Any) -> 'FluffyContactID': - assert isinstance(obj, dict) - description = from_union([from_str, from_none], obj.get("description")) - email = from_union([from_str, from_none], obj.get("email")) - fingerprint = from_str(obj.get("fingerprint")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - nick = from_union([from_str, from_none], obj.get("nick")) - phone = from_union([from_str, from_none], obj.get("phone")) - return FluffyContactID(description, email, fingerprint, meta, name, nick, phone) - - def to_dict(self) -> dict: - result: dict = {} - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.email is not None: - result["email"] = from_union([from_str, from_none], self.email) - result["fingerprint"] = from_str(self.fingerprint) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.nick is not None: - result["nick"] = from_union([from_str, from_none], self.nick) - if self.phone is not None: - result["phone"] = from_union([from_str, from_none], self.phone) - return result - - -class HilariousRecord: - meta: Optional[Dict[str, Any]] - """Additional metadata for the record""" - - text: str - """The text content of the record""" - - def __init__(self, meta: Optional[Dict[str, Any]], text: str) -> None: - self.meta = meta - self.text = text - - @staticmethod - def from_dict(obj: Any) -> 'HilariousRecord': - assert isinstance(obj, dict) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - text = from_str(obj.get("text")) - return HilariousRecord(meta, text) - - def to_dict(self) -> dict: - result: dict = {} - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["text"] = from_str(self.text) - return result - - -class HilariousDataset: - description: Optional[str] - """The description of the dataset""" - - name: Optional[str] - """The name of the dataset""" - - records: List[HilariousRecord] - """The records in the dataset""" - - def __init__(self, description: Optional[str], name: Optional[str], records: List[HilariousRecord]) -> None: - self.description = description - self.name = name - self.records = records - - @staticmethod - def from_dict(obj: Any) -> 'HilariousDataset': - assert isinstance(obj, dict) - description = from_union([from_str, from_none], obj.get("description")) - name = from_union([from_str, from_none], obj.get("name")) - records = from_list(HilariousRecord.from_dict, obj.get("records")) - return HilariousDataset(description, name, records) - - def to_dict(self) -> dict: - result: dict = {} - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - result["records"] = from_list(lambda x: to_class(HilariousRecord, x), self.records) - return result - - -class HilariousFeature: - name: str - """The name of the feature to enable""" - - options: Optional[Dict[str, Any]] - """Optional configuration options for the feature""" - - def __init__(self, name: str, options: Optional[Dict[str, Any]]) -> None: - self.name = name - self.options = options - - @staticmethod - def from_dict(obj: Any) -> 'HilariousFeature': - assert isinstance(obj, dict) - name = from_str(obj.get("name")) - options = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("options")) - return HilariousFeature(name, options) - - def to_dict(self) -> dict: - result: dict = {} - result["name"] = from_str(self.name) - if self.options is not None: - result["options"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.options) - return result - - -class HilariousAbility: - description: str - """The description of the ability""" - - instruction: str - """The instruction for the ability""" - - meta: Optional[Dict[str, Any]] - """Additional metadata for the ability""" - - name: str - """The name of the ability""" - - secret_id: Optional[str] - """Optional secret ID for the ability""" - - def __init__(self, description: str, instruction: str, meta: Optional[Dict[str, Any]], name: str, secret_id: Optional[str]) -> None: - self.description = description - self.instruction = instruction - self.meta = meta - self.name = name - self.secret_id = secret_id - - @staticmethod - def from_dict(obj: Any) -> 'HilariousAbility': - assert isinstance(obj, dict) - description = from_str(obj.get("description")) - instruction = from_str(obj.get("instruction")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - secret_id = from_union([from_str, from_none], obj.get("secretId")) - return HilariousAbility(description, instruction, meta, name, secret_id) - - def to_dict(self) -> dict: - result: dict = {} - result["description"] = from_str(self.description) - result["instruction"] = from_str(self.instruction) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - if self.secret_id is not None: - result["secretId"] = from_union([from_str, from_none], self.secret_id) - return result - - -class HilariousSkillset: - abilities: List[HilariousAbility] - """The abilities in the skillset""" - - description: Optional[str] - """The description of the skillset""" - - name: Optional[str] - """The name of the skillset""" - - def __init__(self, abilities: List[HilariousAbility], description: Optional[str], name: Optional[str]) -> None: - self.abilities = abilities - self.description = description - self.name = name - - @staticmethod - def from_dict(obj: Any) -> 'HilariousSkillset': - assert isinstance(obj, dict) - abilities = from_list(HilariousAbility.from_dict, obj.get("abilities")) - description = from_union([from_str, from_none], obj.get("description")) - name = from_union([from_str, from_none], obj.get("name")) - return HilariousSkillset(abilities, description, name) - - def to_dict(self) -> dict: - result: dict = {} - result["abilities"] = from_list(lambda x: to_class(HilariousAbility, x), self.abilities) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - return result - - -class ConversationDispatchRequestExtensions: - """Extensions to enhance the bot's capabilities""" - - backstory: Optional[str] - """Additional backstory for the bot""" - - datasets: Optional[List[HilariousDataset]] - """Inline datasets to provide additional context""" - - features: Optional[List[HilariousFeature]] - """Feature flags to enable specific bot capabilities""" - - skillsets: Optional[List[HilariousSkillset]] - """Inline skillsets to provide additional abilities""" - - def __init__(self, backstory: Optional[str], datasets: Optional[List[HilariousDataset]], features: Optional[List[HilariousFeature]], skillsets: Optional[List[HilariousSkillset]]) -> None: - self.backstory = backstory - self.datasets = datasets - self.features = features - self.skillsets = skillsets - - @staticmethod - def from_dict(obj: Any) -> 'ConversationDispatchRequestExtensions': - assert isinstance(obj, dict) - backstory = from_union([from_str, from_none], obj.get("backstory")) - datasets = from_union([lambda x: from_list(HilariousDataset.from_dict, x), from_none], obj.get("datasets")) - features = from_union([lambda x: from_list(HilariousFeature.from_dict, x), from_none], obj.get("features")) - skillsets = from_union([lambda x: from_list(HilariousSkillset.from_dict, x), from_none], obj.get("skillsets")) - return ConversationDispatchRequestExtensions(backstory, datasets, features, skillsets) - - def to_dict(self) -> dict: - result: dict = {} - if self.backstory is not None: - result["backstory"] = from_union([from_str, from_none], self.backstory) - if self.datasets is not None: - result["datasets"] = from_union([lambda x: from_list(lambda x: to_class(HilariousDataset, x), x), from_none], self.datasets) - if self.features is not None: - result["features"] = from_union([lambda x: from_list(lambda x: to_class(HilariousFeature, x), x), from_none], self.features) - if self.skillsets is not None: - result["skillsets"] = from_union([lambda x: from_list(lambda x: to_class(HilariousSkillset, x), x), from_none], self.skillsets) - return result - - -class IndecentCall: - """Configuration for when this function should be automatically called""" - - end: Optional[bool] - """If true, this function will be force-called at the end of the conversation""" - - start: Optional[bool] - """If true, this function will be force-called at the start of the conversation""" - - def __init__(self, end: Optional[bool], start: Optional[bool]) -> None: - self.end = end - self.start = start - - @staticmethod - def from_dict(obj: Any) -> 'IndecentCall': - assert isinstance(obj, dict) - end = from_union([from_bool, from_none], obj.get("end")) - start = from_union([from_bool, from_none], obj.get("start")) - return IndecentCall(end, start) - - def to_dict(self) -> dict: - result: dict = {} - if self.end is not None: - result["end"] = from_union([from_bool, from_none], self.end) - if self.start is not None: - result["start"] = from_union([from_bool, from_none], self.start) - return result - - -class Type6(Enum): - """The schema type, must be "object\"""" - - OBJECT = "object" - - -class IndecentParameters: - """JSON Schema definition for the function parameters""" - - properties: Dict[str, Any] - """Object property definitions""" - - required: Optional[List[str]] - """Required property names""" - - type: Type6 - """The schema type, must be "object\"""" - - def __init__(self, properties: Dict[str, Any], required: Optional[List[str]], type: Type6) -> None: - self.properties = properties - self.required = required - self.type = type - - @staticmethod - def from_dict(obj: Any) -> 'IndecentParameters': - assert isinstance(obj, dict) - properties = from_dict(lambda x: x, obj.get("properties")) - required = from_union([lambda x: from_list(from_str, x), from_none], obj.get("required")) - type = Type6(obj.get("type")) - return IndecentParameters(properties, required, type) - - def to_dict(self) -> dict: - result: dict = {} - result["properties"] = from_dict(lambda x: x, self.properties) - if self.required is not None: - result["required"] = from_union([lambda x: from_list(from_str, x), from_none], self.required) - result["type"] = to_enum(Type6, self.type) - return result - - -class IndecentResult: - """The result of the function execution""" - - data: Any - """The data returned by the function (can be any type)""" - - channel: Optional[str] - """The channel for streaming function results""" - - def __init__(self, data: Any, channel: Optional[str]) -> None: - self.data = data - self.channel = channel - - @staticmethod - def from_dict(obj: Any) -> 'IndecentResult': - assert isinstance(obj, dict) - data = obj.get("data") - channel = from_union([from_str, from_none], obj.get("channel")) - return IndecentResult(data, channel) - - def to_dict(self) -> dict: - result: dict = {} - if self.data is not None: - result["data"] = self.data - if self.channel is not None: - result["channel"] = from_union([from_str, from_none], self.channel) - return result - - -class ConversationDispatchRequestFunction: - call: Optional[IndecentCall] - """Configuration for when this function should be automatically called""" - - description: str - """The description of the function""" - - name: str - """The name of the function (must be a valid JS identifier, max 64 chars)""" - - parameters: IndecentParameters - """JSON Schema definition for the function parameters""" - - result: Optional[IndecentResult] - """The result of the function execution""" - - def __init__(self, call: Optional[IndecentCall], description: str, name: str, parameters: IndecentParameters, result: Optional[IndecentResult]) -> None: - self.call = call - self.description = description - self.name = name - self.parameters = parameters - self.result = result - - @staticmethod - def from_dict(obj: Any) -> 'ConversationDispatchRequestFunction': - assert isinstance(obj, dict) - call = from_union([IndecentCall.from_dict, from_none], obj.get("call")) - description = from_str(obj.get("description")) - name = from_str(obj.get("name")) - parameters = IndecentParameters.from_dict(obj.get("parameters")) - result = from_union([IndecentResult.from_dict, from_none], obj.get("result")) - return ConversationDispatchRequestFunction(call, description, name, parameters, result) - - def to_dict(self) -> dict: - result: dict = {} - if self.call is not None: - result["call"] = from_union([lambda x: to_class(IndecentCall, x), from_none], self.call) - result["description"] = from_str(self.description) - result["name"] = from_str(self.name) - result["parameters"] = to_class(IndecentParameters, self.parameters) - if self.result is not None: - result["result"] = from_union([lambda x: to_class(IndecentResult, x), from_none], self.result) - return result - - -class ConversationDispatchRequestLimits: - """Execution limits to control conversation processing bounds""" - - calls: Optional[int] - """Maximum number of function/tool calls. Controls how many total function calls can be made - during the conversation. - """ - continuations: Optional[int] - """Maximum number of model continuations. Controls how many times the model can continue - generating after reaching a stop condition. - """ - iterations: Optional[int] - """Maximum number of agentic iterations. Controls how many times the model can iterate - through tool calls and responses. - """ - - def __init__(self, calls: Optional[int], continuations: Optional[int], iterations: Optional[int]) -> None: - self.calls = calls - self.continuations = continuations - self.iterations = iterations - - @staticmethod - def from_dict(obj: Any) -> 'ConversationDispatchRequestLimits': - assert isinstance(obj, dict) - calls = from_union([from_int, from_none], obj.get("calls")) - continuations = from_union([from_int, from_none], obj.get("continuations")) - iterations = from_union([from_int, from_none], obj.get("iterations")) - return ConversationDispatchRequestLimits(calls, continuations, iterations) - - def to_dict(self) -> dict: - result: dict = {} - if self.calls is not None: - result["calls"] = from_union([from_int, from_none], self.calls) - if self.continuations is not None: - result["continuations"] = from_union([from_int, from_none], self.continuations) - if self.iterations is not None: - result["iterations"] = from_union([from_int, from_none], self.iterations) - return result - - -class Type7(Enum): - """The type of the message""" - - ACTIVITY = "activity" - BACKSTORY = "backstory" - BOT = "bot" - CHECKPOINT = "checkpoint" - CONTEXT = "context" - INSTRUCTION = "instruction" - REASONING = "reasoning" - USER = "user" - - -class ConversationDispatchRequestMessage: - """A message in the conversation""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - text: str - """The text of the message""" - - type: Type7 - """The type of the message""" - - def __init__(self, meta: Optional[Dict[str, Any]], text: str, type: Type7) -> None: - self.meta = meta - self.text = text - self.type = type - - @staticmethod - def from_dict(obj: Any) -> 'ConversationDispatchRequestMessage': - assert isinstance(obj, dict) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - text = from_str(obj.get("text")) - type = Type7(obj.get("type")) - return ConversationDispatchRequestMessage(meta, text, type) - - def to_dict(self) -> dict: - result: dict = {} - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["text"] = from_str(self.text) - result["type"] = to_enum(Type7, self.type) - return result - - -class ConversationDispatchRequest: - """A bot configuration or reference - - A bot configuration that can be applied without a dedicated bot instance. - """ - attachments: Optional[List[ConversationDispatchRequestAttachment]] - """An array of attachments to be added to the conversation""" - - channel_id: Optional[str] - """A unique channel ID to subscribe to for completion events""" - - contact_id: Optional[Union[FluffyContactID, str]] - """The contact ID to associate with this conversation""" - - extensions: Optional[ConversationDispatchRequestExtensions] - """Extensions to enhance the bot's capabilities""" - - functions: Optional[List[ConversationDispatchRequestFunction]] - """An array of functions to be added to the conversation""" - - limits: Optional[ConversationDispatchRequestLimits] - """Execution limits to control conversation processing bounds""" - - messages: List[ConversationDispatchRequestMessage] - """An array of messages to be added to the conversation""" - - bot_id: Optional[str] - """The ID of the bot this configuration is using""" - - backstory: Optional[str] - """The backstory this configuration is using""" - - dataset_id: Optional[str] - """The id of the dataset this configuration is using""" - - model: Optional[str] - """A model definition""" - - moderation: Optional[bool] - """The moderation flag for this configuration""" - - privacy: Optional[bool] - """The privacy flag for this configuration""" - - skillset_id: Optional[str] - """The id of the skillset this configuration is using""" - - def __init__(self, attachments: Optional[List[ConversationDispatchRequestAttachment]], channel_id: Optional[str], contact_id: Optional[Union[FluffyContactID, str]], extensions: Optional[ConversationDispatchRequestExtensions], functions: Optional[List[ConversationDispatchRequestFunction]], limits: Optional[ConversationDispatchRequestLimits], messages: List[ConversationDispatchRequestMessage], bot_id: Optional[str], backstory: Optional[str], dataset_id: Optional[str], model: Optional[str], moderation: Optional[bool], privacy: Optional[bool], skillset_id: Optional[str]) -> None: - self.attachments = attachments - self.channel_id = channel_id - self.contact_id = contact_id - self.extensions = extensions - self.functions = functions - self.limits = limits - self.messages = messages - self.bot_id = bot_id - self.backstory = backstory - self.dataset_id = dataset_id - self.model = model - self.moderation = moderation - self.privacy = privacy - self.skillset_id = skillset_id - - @staticmethod - def from_dict(obj: Any) -> 'ConversationDispatchRequest': - assert isinstance(obj, dict) - attachments = from_union([lambda x: from_list(ConversationDispatchRequestAttachment.from_dict, x), from_none], obj.get("attachments")) - channel_id = from_union([from_str, from_none], obj.get("channelId")) - contact_id = from_union([FluffyContactID.from_dict, from_str, from_none], obj.get("contactId")) - extensions = from_union([ConversationDispatchRequestExtensions.from_dict, from_none], obj.get("extensions")) - functions = from_union([lambda x: from_list(ConversationDispatchRequestFunction.from_dict, x), from_none], obj.get("functions")) - limits = from_union([ConversationDispatchRequestLimits.from_dict, from_none], obj.get("limits")) - messages = from_list(ConversationDispatchRequestMessage.from_dict, obj.get("messages")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - backstory = from_union([from_str, from_none], obj.get("backstory")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) - model = from_union([from_str, from_none], obj.get("model")) - moderation = from_union([from_bool, from_none], obj.get("moderation")) - privacy = from_union([from_bool, from_none], obj.get("privacy")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) - return ConversationDispatchRequest(attachments, channel_id, contact_id, extensions, functions, limits, messages, bot_id, backstory, dataset_id, model, moderation, privacy, skillset_id) - - def to_dict(self) -> dict: - result: dict = {} - if self.attachments is not None: - result["attachments"] = from_union([lambda x: from_list(lambda x: to_class(ConversationDispatchRequestAttachment, x), x), from_none], self.attachments) - if self.channel_id is not None: - result["channelId"] = from_union([from_str, from_none], self.channel_id) - if self.contact_id is not None: - result["contactId"] = from_union([lambda x: to_class(FluffyContactID, x), from_str, from_none], self.contact_id) - if self.extensions is not None: - result["extensions"] = from_union([lambda x: to_class(ConversationDispatchRequestExtensions, x), from_none], self.extensions) - if self.functions is not None: - result["functions"] = from_union([lambda x: from_list(lambda x: to_class(ConversationDispatchRequestFunction, x), x), from_none], self.functions) - if self.limits is not None: - result["limits"] = from_union([lambda x: to_class(ConversationDispatchRequestLimits, x), from_none], self.limits) - result["messages"] = from_list(lambda x: to_class(ConversationDispatchRequestMessage, x), self.messages) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.backstory is not None: - result["backstory"] = from_union([from_str, from_none], self.backstory) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) - if self.moderation is not None: - result["moderation"] = from_union([from_bool, from_none], self.moderation) - if self.privacy is not None: - result["privacy"] = from_union([from_bool, from_none], self.privacy) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) - return result - - -class ConversationDispatchResponse: - channel_id: str - """The channel ID to subscribe to for completion events""" - - def __init__(self, channel_id: str) -> None: - self.channel_id = channel_id - - @staticmethod - def from_dict(obj: Any) -> 'ConversationDispatchResponse': - assert isinstance(obj, dict) - channel_id = from_str(obj.get("channelId")) - return ConversationDispatchResponse(channel_id) - - def to_dict(self) -> dict: - result: dict = {} - result["channelId"] = from_str(self.channel_id) - return result - - -class ConversationsExportParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" - - -class ConversationsExportParams: - cursor: Optional[str] - """The cursor to use for pagination""" - - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" - - order: Optional[ConversationsExportParamsOrder] - """The order of the paginated items""" - - take: Optional[int] - """The number of items to retrieve""" - - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[ConversationsExportParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take - - @staticmethod - def from_dict(obj: Any) -> 'ConversationsExportParams': - assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([ConversationsExportParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return ConversationsExportParams(cursor, meta, order, take) - - def to_dict(self) -> dict: - result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(ConversationsExportParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) - return result - - -class ConversationsExportResponseItem: - """A bot configuration or reference - - A bot configuration that can be applied without a dedicated bot instance. - """ - contact_id: Optional[str] - """The contact id assigned to this conversation""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - description: Optional[str] - """The associated description""" - - id: str - """The instance ID""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: Optional[str] - """The associated name""" - - space_id: Optional[str] - """The space id assigned to this conversation""" - - task_id: Optional[str] - """The task id assigned to this conversation""" - - updated_at: float - """The timestamp (ms) when the instance was updated""" - - bot_id: Optional[str] - """The ID of the bot this configuration is using""" - - backstory: Optional[str] - """The backstory this configuration is using""" - - dataset_id: Optional[str] - """The id of the dataset this configuration is using""" - - model: Optional[str] - """A model definition""" - - moderation: Optional[bool] - """The moderation flag for this configuration""" - - privacy: Optional[bool] - """The privacy flag for this configuration""" - - skillset_id: Optional[str] - """The id of the skillset this configuration is using""" - - def __init__(self, contact_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], space_id: Optional[str], task_id: Optional[str], updated_at: float, bot_id: Optional[str], backstory: Optional[str], dataset_id: Optional[str], model: Optional[str], moderation: Optional[bool], privacy: Optional[bool], skillset_id: Optional[str]) -> None: - self.contact_id = contact_id - self.created_at = created_at - self.description = description - self.id = id - self.meta = meta - self.name = name - self.space_id = space_id - self.task_id = task_id - self.updated_at = updated_at - self.bot_id = bot_id - self.backstory = backstory - self.dataset_id = dataset_id - self.model = model - self.moderation = moderation - self.privacy = privacy - self.skillset_id = skillset_id - - @staticmethod - def from_dict(obj: Any) -> 'ConversationsExportResponseItem': - assert isinstance(obj, dict) - contact_id = from_union([from_str, from_none], obj.get("contactId")) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - space_id = from_union([from_str, from_none], obj.get("spaceId")) - task_id = from_union([from_str, from_none], obj.get("taskId")) - updated_at = from_float(obj.get("updatedAt")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - backstory = from_union([from_str, from_none], obj.get("backstory")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) - model = from_union([from_str, from_none], obj.get("model")) - moderation = from_union([from_bool, from_none], obj.get("moderation")) - privacy = from_union([from_bool, from_none], obj.get("privacy")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) - return ConversationsExportResponseItem(contact_id, created_at, description, id, meta, name, space_id, task_id, updated_at, bot_id, backstory, dataset_id, model, moderation, privacy, skillset_id) - - def to_dict(self) -> dict: - result: dict = {} - if self.contact_id is not None: - result["contactId"] = from_union([from_str, from_none], self.contact_id) - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.space_id is not None: - result["spaceId"] = from_union([from_str, from_none], self.space_id) - if self.task_id is not None: - result["taskId"] = from_union([from_str, from_none], self.task_id) - result["updatedAt"] = to_float(self.updated_at) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.backstory is not None: - result["backstory"] = from_union([from_str, from_none], self.backstory) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) - if self.moderation is not None: - result["moderation"] = from_union([from_bool, from_none], self.moderation) - if self.privacy is not None: - result["privacy"] = from_union([from_bool, from_none], self.privacy) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) - return result - - -class ConversationsExportResponse: - cursor: str - """Cursor for fetching the next page""" - - items: List[ConversationsExportResponseItem] - - def __init__(self, cursor: str, items: List[ConversationsExportResponseItem]) -> None: - self.cursor = cursor - self.items = items - - @staticmethod - def from_dict(obj: Any) -> 'ConversationsExportResponse': - assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(ConversationsExportResponseItem.from_dict, obj.get("items")) - return ConversationsExportResponse(cursor, items) - - def to_dict(self) -> dict: - result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(ConversationsExportResponseItem, x), self.items) - return result - - -class ConversationsExportStreamItemData: - """A bot configuration or reference - - A bot configuration that can be applied without a dedicated bot instance. - """ - contact_id: Optional[str] - """The contact id assigned to this conversation""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - description: Optional[str] - """The associated description""" - - id: str - """The instance ID""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: Optional[str] - """The associated name""" - - space_id: Optional[str] - """The space id assigned to this conversation""" - - task_id: Optional[str] - """The task id assigned to this conversation""" - - updated_at: float - """The timestamp (ms) when the instance was updated""" - - bot_id: Optional[str] - """The ID of the bot this configuration is using""" - - backstory: Optional[str] - """The backstory this configuration is using""" - - dataset_id: Optional[str] - """The id of the dataset this configuration is using""" - - model: Optional[str] - """A model definition""" - - moderation: Optional[bool] - """The moderation flag for this configuration""" - - privacy: Optional[bool] - """The privacy flag for this configuration""" - - skillset_id: Optional[str] - """The id of the skillset this configuration is using""" - - def __init__(self, contact_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], space_id: Optional[str], task_id: Optional[str], updated_at: float, bot_id: Optional[str], backstory: Optional[str], dataset_id: Optional[str], model: Optional[str], moderation: Optional[bool], privacy: Optional[bool], skillset_id: Optional[str]) -> None: - self.contact_id = contact_id - self.created_at = created_at - self.description = description - self.id = id - self.meta = meta - self.name = name - self.space_id = space_id - self.task_id = task_id - self.updated_at = updated_at - self.bot_id = bot_id - self.backstory = backstory - self.dataset_id = dataset_id - self.model = model - self.moderation = moderation - self.privacy = privacy - self.skillset_id = skillset_id - - @staticmethod - def from_dict(obj: Any) -> 'ConversationsExportStreamItemData': - assert isinstance(obj, dict) - contact_id = from_union([from_str, from_none], obj.get("contactId")) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - space_id = from_union([from_str, from_none], obj.get("spaceId")) - task_id = from_union([from_str, from_none], obj.get("taskId")) - updated_at = from_float(obj.get("updatedAt")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - backstory = from_union([from_str, from_none], obj.get("backstory")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) - model = from_union([from_str, from_none], obj.get("model")) - moderation = from_union([from_bool, from_none], obj.get("moderation")) - privacy = from_union([from_bool, from_none], obj.get("privacy")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) - return ConversationsExportStreamItemData(contact_id, created_at, description, id, meta, name, space_id, task_id, updated_at, bot_id, backstory, dataset_id, model, moderation, privacy, skillset_id) - - def to_dict(self) -> dict: - result: dict = {} - if self.contact_id is not None: - result["contactId"] = from_union([from_str, from_none], self.contact_id) - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.space_id is not None: - result["spaceId"] = from_union([from_str, from_none], self.space_id) - if self.task_id is not None: - result["taskId"] = from_union([from_str, from_none], self.task_id) - result["updatedAt"] = to_float(self.updated_at) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.backstory is not None: - result["backstory"] = from_union([from_str, from_none], self.backstory) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) - if self.moderation is not None: - result["moderation"] = from_union([from_bool, from_none], self.moderation) - if self.privacy is not None: - result["privacy"] = from_union([from_bool, from_none], self.privacy) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) - return result - - -class ConversationsExportStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - - -class ConversationsExportStreamItem: - data: ConversationsExportStreamItemData - """A bot configuration or reference""" - - type: ConversationsExportStreamItemType - """The type of event""" - - def __init__(self, data: ConversationsExportStreamItemData, type: ConversationsExportStreamItemType) -> None: - self.data = data - self.type = type - - @staticmethod - def from_dict(obj: Any) -> 'ConversationsExportStreamItem': - assert isinstance(obj, dict) - data = ConversationsExportStreamItemData.from_dict(obj.get("data")) - type = ConversationsExportStreamItemType(obj.get("type")) - return ConversationsExportStreamItem(data, type) - - def to_dict(self) -> dict: - result: dict = {} - result["data"] = to_class(ConversationsExportStreamItemData, self.data) - result["type"] = to_enum(ConversationsExportStreamItemType, self.type) - return result - - -class ConversationListParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" - - -class ConversationListParams: - cursor: Optional[str] - """The cursor to use for pagination""" - - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" - - order: Optional[ConversationListParamsOrder] - """The order of the paginated items""" - - take: Optional[int] - """The number of items to retrieve""" - - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[ConversationListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take - - @staticmethod - def from_dict(obj: Any) -> 'ConversationListParams': - assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([ConversationListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return ConversationListParams(cursor, meta, order, take) - - def to_dict(self) -> dict: - result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(ConversationListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) - return result - - -class ConversationListResponseItem: - """A bot configuration or reference - - A bot configuration that can be applied without a dedicated bot instance. - """ - contact_id: Optional[str] - """The contact id assigned to this conversation""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - description: Optional[str] - """The associated description""" - - id: str - """The instance ID""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: Optional[str] - """The associated name""" - - space_id: Optional[str] - """The space id assigned to this conversation""" - - task_id: Optional[str] - """The task id assigned to this conversation""" - - updated_at: float - """The timestamp (ms) when the instance was updated""" - - bot_id: Optional[str] - """The ID of the bot this configuration is using""" - - backstory: Optional[str] - """The backstory this configuration is using""" - - dataset_id: Optional[str] - """The id of the dataset this configuration is using""" - - model: Optional[str] - """A model definition""" - - moderation: Optional[bool] - """The moderation flag for this configuration""" - - privacy: Optional[bool] - """The privacy flag for this configuration""" - - skillset_id: Optional[str] - """The id of the skillset this configuration is using""" - - def __init__(self, contact_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], space_id: Optional[str], task_id: Optional[str], updated_at: float, bot_id: Optional[str], backstory: Optional[str], dataset_id: Optional[str], model: Optional[str], moderation: Optional[bool], privacy: Optional[bool], skillset_id: Optional[str]) -> None: - self.contact_id = contact_id - self.created_at = created_at - self.description = description - self.id = id - self.meta = meta - self.name = name - self.space_id = space_id - self.task_id = task_id - self.updated_at = updated_at - self.bot_id = bot_id - self.backstory = backstory - self.dataset_id = dataset_id - self.model = model - self.moderation = moderation - self.privacy = privacy - self.skillset_id = skillset_id - - @staticmethod - def from_dict(obj: Any) -> 'ConversationListResponseItem': - assert isinstance(obj, dict) - contact_id = from_union([from_str, from_none], obj.get("contactId")) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - space_id = from_union([from_str, from_none], obj.get("spaceId")) - task_id = from_union([from_str, from_none], obj.get("taskId")) - updated_at = from_float(obj.get("updatedAt")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - backstory = from_union([from_str, from_none], obj.get("backstory")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) - model = from_union([from_str, from_none], obj.get("model")) - moderation = from_union([from_bool, from_none], obj.get("moderation")) - privacy = from_union([from_bool, from_none], obj.get("privacy")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) - return ConversationListResponseItem(contact_id, created_at, description, id, meta, name, space_id, task_id, updated_at, bot_id, backstory, dataset_id, model, moderation, privacy, skillset_id) - - def to_dict(self) -> dict: - result: dict = {} - if self.contact_id is not None: - result["contactId"] = from_union([from_str, from_none], self.contact_id) - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.space_id is not None: - result["spaceId"] = from_union([from_str, from_none], self.space_id) - if self.task_id is not None: - result["taskId"] = from_union([from_str, from_none], self.task_id) - result["updatedAt"] = to_float(self.updated_at) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.backstory is not None: - result["backstory"] = from_union([from_str, from_none], self.backstory) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) - if self.moderation is not None: - result["moderation"] = from_union([from_bool, from_none], self.moderation) - if self.privacy is not None: - result["privacy"] = from_union([from_bool, from_none], self.privacy) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) - return result - - -class ConversationListResponse: - cursor: str - """Cursor for fetching the next page""" - - items: List[ConversationListResponseItem] - - def __init__(self, cursor: str, items: List[ConversationListResponseItem]) -> None: - self.cursor = cursor - self.items = items - - @staticmethod - def from_dict(obj: Any) -> 'ConversationListResponse': - assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(ConversationListResponseItem.from_dict, obj.get("items")) - return ConversationListResponse(cursor, items) - - def to_dict(self) -> dict: - result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(ConversationListResponseItem, x), self.items) - return result - - -class ConversationListStreamItemData: - """A bot configuration or reference - - A bot configuration that can be applied without a dedicated bot instance. - """ - contact_id: Optional[str] - """The contact id assigned to this conversation""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - description: Optional[str] - """The associated description""" - - id: str - """The instance ID""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: Optional[str] - """The associated name""" - - space_id: Optional[str] - """The space id assigned to this conversation""" - - task_id: Optional[str] - """The task id assigned to this conversation""" - - updated_at: float - """The timestamp (ms) when the instance was updated""" - - bot_id: Optional[str] - """The ID of the bot this configuration is using""" - - backstory: Optional[str] - """The backstory this configuration is using""" - - dataset_id: Optional[str] - """The id of the dataset this configuration is using""" - - model: Optional[str] - """A model definition""" - - moderation: Optional[bool] - """The moderation flag for this configuration""" - - privacy: Optional[bool] - """The privacy flag for this configuration""" - - skillset_id: Optional[str] - """The id of the skillset this configuration is using""" - - def __init__(self, contact_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], space_id: Optional[str], task_id: Optional[str], updated_at: float, bot_id: Optional[str], backstory: Optional[str], dataset_id: Optional[str], model: Optional[str], moderation: Optional[bool], privacy: Optional[bool], skillset_id: Optional[str]) -> None: - self.contact_id = contact_id - self.created_at = created_at - self.description = description - self.id = id - self.meta = meta - self.name = name - self.space_id = space_id - self.task_id = task_id - self.updated_at = updated_at - self.bot_id = bot_id - self.backstory = backstory - self.dataset_id = dataset_id - self.model = model - self.moderation = moderation - self.privacy = privacy - self.skillset_id = skillset_id - - @staticmethod - def from_dict(obj: Any) -> 'ConversationListStreamItemData': - assert isinstance(obj, dict) - contact_id = from_union([from_str, from_none], obj.get("contactId")) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - space_id = from_union([from_str, from_none], obj.get("spaceId")) - task_id = from_union([from_str, from_none], obj.get("taskId")) - updated_at = from_float(obj.get("updatedAt")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - backstory = from_union([from_str, from_none], obj.get("backstory")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) - model = from_union([from_str, from_none], obj.get("model")) - moderation = from_union([from_bool, from_none], obj.get("moderation")) - privacy = from_union([from_bool, from_none], obj.get("privacy")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) - return ConversationListStreamItemData(contact_id, created_at, description, id, meta, name, space_id, task_id, updated_at, bot_id, backstory, dataset_id, model, moderation, privacy, skillset_id) - - def to_dict(self) -> dict: - result: dict = {} - if self.contact_id is not None: - result["contactId"] = from_union([from_str, from_none], self.contact_id) - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.space_id is not None: - result["spaceId"] = from_union([from_str, from_none], self.space_id) - if self.task_id is not None: - result["taskId"] = from_union([from_str, from_none], self.task_id) - result["updatedAt"] = to_float(self.updated_at) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.backstory is not None: - result["backstory"] = from_union([from_str, from_none], self.backstory) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) - if self.moderation is not None: - result["moderation"] = from_union([from_bool, from_none], self.moderation) - if self.privacy is not None: - result["privacy"] = from_union([from_bool, from_none], self.privacy) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) - return result - - -class ConversationListStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - - -class ConversationListStreamItem: - data: ConversationListStreamItemData - """A bot configuration or reference""" - - type: ConversationListStreamItemType - """The type of event""" - - def __init__(self, data: ConversationListStreamItemData, type: ConversationListStreamItemType) -> None: - self.data = data - self.type = type - - @staticmethod - def from_dict(obj: Any) -> 'ConversationListStreamItem': - assert isinstance(obj, dict) - data = ConversationListStreamItemData.from_dict(obj.get("data")) - type = ConversationListStreamItemType(obj.get("type")) - return ConversationListStreamItem(data, type) - - def to_dict(self) -> dict: - result: dict = {} - result["data"] = to_class(ConversationListStreamItemData, self.data) - result["type"] = to_enum(ConversationListStreamItemType, self.type) - return result - - -class DatasetDeleteParams: - dataset_id: str - """The ID of the dataset to delete""" - - def __init__(self, dataset_id: str) -> None: - self.dataset_id = dataset_id - - @staticmethod - def from_dict(obj: Any) -> 'DatasetDeleteParams': - assert isinstance(obj, dict) - dataset_id = from_str(obj.get("datasetId")) - return DatasetDeleteParams(dataset_id) - - def to_dict(self) -> dict: - result: dict = {} - result["datasetId"] = from_str(self.dataset_id) - return result - - -class DatasetDeleteResponse: - id: str - """The ID of the deleted dataset""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'DatasetDeleteResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return DatasetDeleteResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - - -class DatasetFetchParams: - dataset_id: str - """The ID of the dataset to retrieve""" - - def __init__(self, dataset_id: str) -> None: - self.dataset_id = dataset_id - - @staticmethod - def from_dict(obj: Any) -> 'DatasetFetchParams': - assert isinstance(obj, dict) - dataset_id = from_str(obj.get("datasetId")) - return DatasetFetchParams(dataset_id) - - def to_dict(self) -> dict: - result: dict = {} - result["datasetId"] = from_str(self.dataset_id) - return result - - -class DatasetFetchResponseVisibility(Enum): - """The dataset visibility""" - - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" - - -class DatasetFetchResponse: - """Blueprint properties""" - - alias: Optional[str] - """The unique alias for the instance""" - - blueprint_id: Optional[str] - """The ID of the blueprint""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - description: Optional[str] - """The associated description""" - - id: str - """The instance ID""" - - match_instruction: Optional[str] - """An instruction to include before found records""" + link: Optional[str] + """The URL to the official secret page""" meta: Optional[Dict[str, Any]] """Meta data information""" - mismatch_instruction: Optional[str] - """An instruction to include if no records where found""" - name: Optional[str] """The associated name""" - record_max_tokens: Optional[float] - """The total number of tokens for each record""" - - reranker: Optional[str] - """The reranker class for the dataset""" - - search_max_records: Optional[float] - """The total number of records to return during search""" - - search_max_tokens: Optional[float] - """The total number of tokens to use during search""" - - search_min_score: Optional[float] - """The minimum score to filter search results by""" + score: float + """The text relevance score of the search result""" - separators: Optional[str] - """A list of separators to use when tokenizing text""" + setup: Optional[str] + tags: Optional[List[str]] + template: Optional[str] + """The original template identifier for the secret""" - store: str - """The storage class for the dataset""" + type: CunningType + """The type of the secret""" updated_at: float """The timestamp (ms) when the instance was updated""" - visibility: Optional[DatasetFetchResponseVisibility] - """The dataset visibility""" - - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, match_instruction: Optional[str], meta: Optional[Dict[str, Any]], mismatch_instruction: Optional[str], name: Optional[str], record_max_tokens: Optional[float], reranker: Optional[str], search_max_records: Optional[float], search_max_tokens: Optional[float], search_min_score: Optional[float], separators: Optional[str], store: str, updated_at: float, visibility: Optional[DatasetFetchResponseVisibility]) -> None: - self.alias = alias - self.blueprint_id = blueprint_id + def __init__(self, commentary: Optional[str], config: Optional[Dict[str, Any]], created_at: float, description: Optional[str], excerpt: str, icon: Optional[str], id: str, kind: Optional[StickyKind], link: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], score: float, setup: Optional[str], tags: Optional[List[str]], template: Optional[str], type: CunningType, updated_at: float) -> None: + self.commentary = commentary + self.config = config self.created_at = created_at self.description = description + self.excerpt = excerpt + self.icon = icon self.id = id - self.match_instruction = match_instruction + self.kind = kind + self.link = link self.meta = meta - self.mismatch_instruction = mismatch_instruction self.name = name - self.record_max_tokens = record_max_tokens - self.reranker = reranker - self.search_max_records = search_max_records - self.search_max_tokens = search_max_tokens - self.search_min_score = search_min_score - self.separators = separators - self.store = store - self.updated_at = updated_at - self.visibility = visibility - - @staticmethod - def from_dict(obj: Any) -> 'DatasetFetchResponse': - assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) - match_instruction = from_union([from_str, from_none], obj.get("matchInstruction")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - mismatch_instruction = from_union([from_str, from_none], obj.get("mismatchInstruction")) - name = from_union([from_str, from_none], obj.get("name")) - record_max_tokens = from_union([from_float, from_none], obj.get("recordMaxTokens")) - reranker = from_union([from_str, from_none], obj.get("reranker")) - search_max_records = from_union([from_float, from_none], obj.get("searchMaxRecords")) - search_max_tokens = from_union([from_float, from_none], obj.get("searchMaxTokens")) - search_min_score = from_union([from_float, from_none], obj.get("searchMinScore")) - separators = from_union([from_str, from_none], obj.get("separators")) - store = from_str(obj.get("store")) - updated_at = from_float(obj.get("updatedAt")) - visibility = from_union([DatasetFetchResponseVisibility, from_none], obj.get("visibility")) - return DatasetFetchResponse(alias, blueprint_id, created_at, description, id, match_instruction, meta, mismatch_instruction, name, record_max_tokens, reranker, search_max_records, search_max_tokens, search_min_score, separators, store, updated_at, visibility) - - def to_dict(self) -> dict: - result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) - if self.match_instruction is not None: - result["matchInstruction"] = from_union([from_str, from_none], self.match_instruction) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.mismatch_instruction is not None: - result["mismatchInstruction"] = from_union([from_str, from_none], self.mismatch_instruction) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.record_max_tokens is not None: - result["recordMaxTokens"] = from_union([to_float, from_none], self.record_max_tokens) - if self.reranker is not None: - result["reranker"] = from_union([from_str, from_none], self.reranker) - if self.search_max_records is not None: - result["searchMaxRecords"] = from_union([to_float, from_none], self.search_max_records) - if self.search_max_tokens is not None: - result["searchMaxTokens"] = from_union([to_float, from_none], self.search_max_tokens) - if self.search_min_score is not None: - result["searchMinScore"] = from_union([to_float, from_none], self.search_min_score) - if self.separators is not None: - result["separators"] = from_union([from_str, from_none], self.separators) - result["store"] = from_str(self.store) - result["updatedAt"] = to_float(self.updated_at) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(DatasetFetchResponseVisibility, x), from_none], self.visibility) - return result - - -class DatasetFileAttachParams: - dataset_id: str - """The ID of the dataset""" - - file_id: str - """The ID of the file""" - - def __init__(self, dataset_id: str, file_id: str) -> None: - self.dataset_id = dataset_id - self.file_id = file_id - - @staticmethod - def from_dict(obj: Any) -> 'DatasetFileAttachParams': - assert isinstance(obj, dict) - dataset_id = from_str(obj.get("datasetId")) - file_id = from_str(obj.get("fileId")) - return DatasetFileAttachParams(dataset_id, file_id) - - def to_dict(self) -> dict: - result: dict = {} - result["datasetId"] = from_str(self.dataset_id) - result["fileId"] = from_str(self.file_id) - return result - - -class DatasetFileAttachRequestType(Enum): - """The dataset file attachment type""" - - SOURCE = "source" - - -class DatasetFileAttachRequest: - type: Optional[DatasetFileAttachRequestType] - """The dataset file attachment type""" - - def __init__(self, type: Optional[DatasetFileAttachRequestType]) -> None: + self.score = score + self.setup = setup + self.tags = tags + self.template = template self.type = type + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'DatasetFileAttachRequest': - assert isinstance(obj, dict) - type = from_union([DatasetFileAttachRequestType, from_none], obj.get("type")) - return DatasetFileAttachRequest(type) - - def to_dict(self) -> dict: - result: dict = {} - if self.type is not None: - result["type"] = from_union([lambda x: to_enum(DatasetFileAttachRequestType, x), from_none], self.type) - return result - - -class DatasetFileAttachResponse: - id: str - """The ID of the dataset file""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'DatasetFileAttachResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return DatasetFileAttachResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - - -class DatasetFileDetachParams: - dataset_id: str - """The ID of the dataset""" - - file_id: str - """The ID of the file""" - - def __init__(self, dataset_id: str, file_id: str) -> None: - self.dataset_id = dataset_id - self.file_id = file_id - - @staticmethod - def from_dict(obj: Any) -> 'DatasetFileDetachParams': - assert isinstance(obj, dict) - dataset_id = from_str(obj.get("datasetId")) - file_id = from_str(obj.get("fileId")) - return DatasetFileDetachParams(dataset_id, file_id) - - def to_dict(self) -> dict: - result: dict = {} - result["datasetId"] = from_str(self.dataset_id) - result["fileId"] = from_str(self.file_id) - return result - - -class DatasetFileDetachRequest: - delete_records: Optional[bool] - """Delete records associated with the file""" - - def __init__(self, delete_records: Optional[bool]) -> None: - self.delete_records = delete_records - - @staticmethod - def from_dict(obj: Any) -> 'DatasetFileDetachRequest': - assert isinstance(obj, dict) - delete_records = from_union([from_bool, from_none], obj.get("deleteRecords")) - return DatasetFileDetachRequest(delete_records) - - def to_dict(self) -> dict: - result: dict = {} - if self.delete_records is not None: - result["deleteRecords"] = from_union([from_bool, from_none], self.delete_records) - return result - - -class DatasetFileDetachResponse: - id: str - """The ID of the dataset file""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'DatasetFileDetachResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return DatasetFileDetachResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - - -class DatasetFileSyncParams: - dataset_id: str - """The ID of the dataset""" - - file_id: str - """The ID of the file""" - - def __init__(self, dataset_id: str, file_id: str) -> None: - self.dataset_id = dataset_id - self.file_id = file_id - - @staticmethod - def from_dict(obj: Any) -> 'DatasetFileSyncParams': + def from_dict(obj: Any) -> 'PlatformSecretsSearchResponseItem': assert isinstance(obj, dict) - dataset_id = from_str(obj.get("datasetId")) - file_id = from_str(obj.get("fileId")) - return DatasetFileSyncParams(dataset_id, file_id) + commentary = from_union([from_str, from_none], obj.get("commentary")) + config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) + created_at = from_float(obj.get("createdAt")) + description = from_union([from_str, from_none], obj.get("description")) + excerpt = from_str(obj.get("excerpt")) + icon = from_union([from_str, from_none], obj.get("icon")) + id = from_str(obj.get("id")) + kind = from_union([StickyKind, from_none], obj.get("kind")) + link = from_union([from_str, from_none], obj.get("link")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + score = from_float(obj.get("score")) + setup = from_union([from_str, from_none], obj.get("setup")) + tags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tags")) + template = from_union([from_str, from_none], obj.get("template")) + type = CunningType(obj.get("type")) + updated_at = from_float(obj.get("updatedAt")) + return PlatformSecretsSearchResponseItem(commentary, config, created_at, description, excerpt, icon, id, kind, link, meta, name, score, setup, tags, template, type, updated_at) def to_dict(self) -> dict: result: dict = {} - result["datasetId"] = from_str(self.dataset_id) - result["fileId"] = from_str(self.file_id) + if self.commentary is not None: + result["commentary"] = from_union([from_str, from_none], self.commentary) + if self.config is not None: + result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) + result["createdAt"] = to_float(self.created_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + result["excerpt"] = from_str(self.excerpt) + if self.icon is not None: + result["icon"] = from_union([from_str, from_none], self.icon) + result["id"] = from_str(self.id) + if self.kind is not None: + result["kind"] = from_union([lambda x: to_enum(StickyKind, x), from_none], self.kind) + if self.link is not None: + result["link"] = from_union([from_str, from_none], self.link) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + result["score"] = to_float(self.score) + if self.setup is not None: + result["setup"] = from_union([from_str, from_none], self.setup) + if self.tags is not None: + result["tags"] = from_union([lambda x: from_list(from_str, x), from_none], self.tags) + if self.template is not None: + result["template"] = from_union([from_str, from_none], self.template) + result["type"] = to_enum(CunningType, self.type) + result["updatedAt"] = to_float(self.updated_at) return result -class DatasetFileSyncResponse: - id: str - """The ID of the dataset file""" +class PlatformSecretsSearchResponse: + items: List[PlatformSecretsSearchResponseItem] - def __init__(self, id: str) -> None: - self.id = id + def __init__(self, items: List[PlatformSecretsSearchResponseItem]) -> None: + self.items = items @staticmethod - def from_dict(obj: Any) -> 'DatasetFileSyncResponse': + def from_dict(obj: Any) -> 'PlatformSecretsSearchResponse': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return DatasetFileSyncResponse(id) + items = from_list(PlatformSecretsSearchResponseItem.from_dict, obj.get("items")) + return PlatformSecretsSearchResponse(items) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["items"] = from_list(lambda x: to_class(PlatformSecretsSearchResponseItem, x), self.items) return result -class DatasetFileListParamsOrder(Enum): +class PlatformSecretListParamsOrder(Enum): """The order of the paginated items""" ASC = "asc" DESC = "desc" -class DatasetFileListParams: +class PlatformSecretListParams: cursor: Optional[str] """The cursor to use for pagination""" - dataset_id: str - """The ID of the dataset""" + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" - order: Optional[DatasetFileListParamsOrder] + order: Optional[PlatformSecretListParamsOrder] """The order of the paginated items""" take: Optional[int] """The number of items to retrieve""" - def __init__(self, cursor: Optional[str], dataset_id: str, order: Optional[DatasetFileListParamsOrder], take: Optional[int]) -> None: + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[PlatformSecretListParamsOrder], take: Optional[int]) -> None: self.cursor = cursor - self.dataset_id = dataset_id + self.meta = meta self.order = order self.take = take @staticmethod - def from_dict(obj: Any) -> 'DatasetFileListParams': + def from_dict(obj: Any) -> 'PlatformSecretListParams': assert isinstance(obj, dict) cursor = from_union([from_str, from_none], obj.get("cursor")) - dataset_id = from_str(obj.get("datasetId")) - order = from_union([DatasetFileListParamsOrder, from_none], obj.get("order")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([PlatformSecretListParamsOrder, from_none], obj.get("order")) take = from_union([from_int, from_none], obj.get("take")) - return DatasetFileListParams(cursor, dataset_id, order, take) + return PlatformSecretListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} if self.cursor is not None: result["cursor"] = from_union([from_str, from_none], self.cursor) - result["datasetId"] = from_str(self.dataset_id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(DatasetFileListParamsOrder, x), from_none], self.order) + result["order"] = from_union([lambda x: to_enum(PlatformSecretListParamsOrder, x), from_none], self.order) if self.take is not None: result["take"] = from_union([from_int, from_none], self.take) return result -class IndigoVisibility(Enum): - """The file visibility""" +class IndigoKind(Enum): + """The kind of the secret""" - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" + PERSONAL = "personal" + SHARED = "shared" -class DatasetFileListResponseItem: +class MagentaType(Enum): + """The type of the secret""" + + BASIC = "basic" + BEARER = "bearer" + JWT = "jwt" + OAUTH = "oauth" + PLAIN = "plain" + REFERENCE = "reference" + TEMPLATE = "template" + + +class PlatformSecretListResponseItem: """Instance list properties""" + commentary: Optional[str] + config: Optional[Dict[str, Any]] created_at: float """The timestamp (ms) when the instance was created""" description: Optional[str] """The associated description""" + icon: Optional[str] id: str """The instance ID""" + kind: Optional[IndigoKind] + """The kind of the secret""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" + setup: Optional[str] + tags: Optional[List[str]] + template: Optional[str] + """The original template identifier for the secret""" + + type: MagentaType + """The type of the secret""" + updated_at: float """The timestamp (ms) when the instance was updated""" - visibility: Optional[IndigoVisibility] - """The file visibility""" - - def __init__(self, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float, visibility: Optional[IndigoVisibility]) -> None: + def __init__(self, commentary: Optional[str], config: Optional[Dict[str, Any]], created_at: float, description: Optional[str], icon: Optional[str], id: str, kind: Optional[IndigoKind], meta: Optional[Dict[str, Any]], name: Optional[str], setup: Optional[str], tags: Optional[List[str]], template: Optional[str], type: MagentaType, updated_at: float) -> None: + self.commentary = commentary + self.config = config self.created_at = created_at self.description = description + self.icon = icon self.id = id + self.kind = kind self.meta = meta self.name = name + self.setup = setup + self.tags = tags + self.template = template + self.type = type self.updated_at = updated_at - self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'DatasetFileListResponseItem': + def from_dict(obj: Any) -> 'PlatformSecretListResponseItem': assert isinstance(obj, dict) + commentary = from_union([from_str, from_none], obj.get("commentary")) + config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + icon = from_union([from_str, from_none], obj.get("icon")) id = from_str(obj.get("id")) + kind = from_union([IndigoKind, from_none], obj.get("kind")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) + setup = from_union([from_str, from_none], obj.get("setup")) + tags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tags")) + template = from_union([from_str, from_none], obj.get("template")) + type = MagentaType(obj.get("type")) updated_at = from_float(obj.get("updatedAt")) - visibility = from_union([IndigoVisibility, from_none], obj.get("visibility")) - return DatasetFileListResponseItem(created_at, description, id, meta, name, updated_at, visibility) + return PlatformSecretListResponseItem(commentary, config, created_at, description, icon, id, kind, meta, name, setup, tags, template, type, updated_at) def to_dict(self) -> dict: result: dict = {} + if self.commentary is not None: + result["commentary"] = from_union([from_str, from_none], self.commentary) + if self.config is not None: + result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.icon is not None: + result["icon"] = from_union([from_str, from_none], self.icon) result["id"] = from_str(self.id) + if self.kind is not None: + result["kind"] = from_union([lambda x: to_enum(IndigoKind, x), from_none], self.kind) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.setup is not None: + result["setup"] = from_union([from_str, from_none], self.setup) + if self.tags is not None: + result["tags"] = from_union([lambda x: from_list(from_str, x), from_none], self.tags) + if self.template is not None: + result["template"] = from_union([from_str, from_none], self.template) + result["type"] = to_enum(MagentaType, self.type) result["updatedAt"] = to_float(self.updated_at) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(IndigoVisibility, x), from_none], self.visibility) return result -class DatasetFileListResponse: +class PlatformSecretListResponse: cursor: str """Cursor for fetching the next page""" - items: List[DatasetFileListResponseItem] + items: List[PlatformSecretListResponseItem] - def __init__(self, cursor: str, items: List[DatasetFileListResponseItem]) -> None: + def __init__(self, cursor: str, items: List[PlatformSecretListResponseItem]) -> None: self.cursor = cursor self.items = items @staticmethod - def from_dict(obj: Any) -> 'DatasetFileListResponse': + def from_dict(obj: Any) -> 'PlatformSecretListResponse': assert isinstance(obj, dict) cursor = from_str(obj.get("cursor")) - items = from_list(DatasetFileListResponseItem.from_dict, obj.get("items")) - return DatasetFileListResponse(cursor, items) + items = from_list(PlatformSecretListResponseItem.from_dict, obj.get("items")) + return PlatformSecretListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(DatasetFileListResponseItem, x), self.items) + result["items"] = from_list(lambda x: to_class(PlatformSecretListResponseItem, x), self.items) return result -class IndecentVisibility(Enum): - """The file visibility""" +class IndecentKind(Enum): + """The kind of the secret""" - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" + PERSONAL = "personal" + SHARED = "shared" -class DatasetFileListStreamItemData: - """Blueprint properties""" +class FriskyType(Enum): + """The type of the secret""" - alias: Optional[str] - """The unique alias for the instance""" + BASIC = "basic" + BEARER = "bearer" + JWT = "jwt" + OAUTH = "oauth" + PLAIN = "plain" + REFERENCE = "reference" + TEMPLATE = "template" - blueprint_id: Optional[str] - """The ID of the blueprint""" +class PlatformSecretListStreamItemData: + """Instance list properties""" + + commentary: Optional[str] + config: Optional[Dict[str, Any]] created_at: float """The timestamp (ms) when the instance was created""" description: Optional[str] """The associated description""" + icon: Optional[str] id: str """The instance ID""" - meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: Optional[str] - """The associated name""" - - updated_at: float - """The timestamp (ms) when the instance was updated""" - - visibility: Optional[IndecentVisibility] - """The file visibility""" - - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float, visibility: Optional[IndecentVisibility]) -> None: - self.alias = alias - self.blueprint_id = blueprint_id - self.created_at = created_at - self.description = description - self.id = id - self.meta = meta - self.name = name - self.updated_at = updated_at - self.visibility = visibility - - @staticmethod - def from_dict(obj: Any) -> 'DatasetFileListStreamItemData': - assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - updated_at = from_float(obj.get("updatedAt")) - visibility = from_union([IndecentVisibility, from_none], obj.get("visibility")) - return DatasetFileListStreamItemData(alias, blueprint_id, created_at, description, id, meta, name, updated_at, visibility) - - def to_dict(self) -> dict: - result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - result["updatedAt"] = to_float(self.updated_at) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(IndecentVisibility, x), from_none], self.visibility) - return result - - -class DatasetFileListStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - - -class DatasetFileListStreamItem: - data: DatasetFileListStreamItemData - """Blueprint properties""" - - type: DatasetFileListStreamItemType - """The type of event""" - - def __init__(self, data: DatasetFileListStreamItemData, type: DatasetFileListStreamItemType) -> None: - self.data = data - self.type = type - - @staticmethod - def from_dict(obj: Any) -> 'DatasetFileListStreamItem': - assert isinstance(obj, dict) - data = DatasetFileListStreamItemData.from_dict(obj.get("data")) - type = DatasetFileListStreamItemType(obj.get("type")) - return DatasetFileListStreamItem(data, type) - - def to_dict(self) -> dict: - result: dict = {} - result["data"] = to_class(DatasetFileListStreamItemData, self.data) - result["type"] = to_enum(DatasetFileListStreamItemType, self.type) - return result - - -class DatasetRecordDeleteParams: - dataset_id: str - """The ID of the dataset""" - - record_id: str - """The ID of the record to delete""" - - def __init__(self, dataset_id: str, record_id: str) -> None: - self.dataset_id = dataset_id - self.record_id = record_id - - @staticmethod - def from_dict(obj: Any) -> 'DatasetRecordDeleteParams': - assert isinstance(obj, dict) - dataset_id = from_str(obj.get("datasetId")) - record_id = from_str(obj.get("recordId")) - return DatasetRecordDeleteParams(dataset_id, record_id) - - def to_dict(self) -> dict: - result: dict = {} - result["datasetId"] = from_str(self.dataset_id) - result["recordId"] = from_str(self.record_id) - return result - - -class DatasetRecordDeleteResponse: - id: str - """The ID of the deleted record""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'DatasetRecordDeleteResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return DatasetRecordDeleteResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - - -class DatasetRecordFetchParams: - dataset_id: str - """The ID of the dataset""" - - record_id: str - """The ID of the record to retrieve""" - - def __init__(self, dataset_id: str, record_id: str) -> None: - self.dataset_id = dataset_id - self.record_id = record_id - - @staticmethod - def from_dict(obj: Any) -> 'DatasetRecordFetchParams': - assert isinstance(obj, dict) - dataset_id = from_str(obj.get("datasetId")) - record_id = from_str(obj.get("recordId")) - return DatasetRecordFetchParams(dataset_id, record_id) - - def to_dict(self) -> dict: - result: dict = {} - result["datasetId"] = from_str(self.dataset_id) - result["recordId"] = from_str(self.record_id) - return result - - -class DatasetRecordFetchResponse: - """Instance list properties""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - id: str - """The instance ID""" - - source: Optional[str] - """The source of the dataset record""" - - text: str - """The text of the dataset record""" - - updated_at: float - """The timestamp (ms) when the instance was updated""" - - def __init__(self, created_at: float, id: str, source: Optional[str], text: str, updated_at: float) -> None: - self.created_at = created_at - self.id = id - self.source = source - self.text = text - self.updated_at = updated_at - - @staticmethod - def from_dict(obj: Any) -> 'DatasetRecordFetchResponse': - assert isinstance(obj, dict) - created_at = from_float(obj.get("createdAt")) - id = from_str(obj.get("id")) - source = from_union([from_str, from_none], obj.get("source")) - text = from_str(obj.get("text")) - updated_at = from_float(obj.get("updatedAt")) - return DatasetRecordFetchResponse(created_at, id, source, text, updated_at) - - def to_dict(self) -> dict: - result: dict = {} - result["createdAt"] = to_float(self.created_at) - result["id"] = from_str(self.id) - if self.source is not None: - result["source"] = from_union([from_str, from_none], self.source) - result["text"] = from_str(self.text) - result["updatedAt"] = to_float(self.updated_at) - return result - - -class DatasetRecordUpdateParams: - dataset_id: str - record_id: str - - def __init__(self, dataset_id: str, record_id: str) -> None: - self.dataset_id = dataset_id - self.record_id = record_id - - @staticmethod - def from_dict(obj: Any) -> 'DatasetRecordUpdateParams': - assert isinstance(obj, dict) - dataset_id = from_str(obj.get("datasetId")) - record_id = from_str(obj.get("recordId")) - return DatasetRecordUpdateParams(dataset_id, record_id) - - def to_dict(self) -> dict: - result: dict = {} - result["datasetId"] = from_str(self.dataset_id) - result["recordId"] = from_str(self.record_id) - return result - - -class DatasetRecordUpdateRequest: - meta: Optional[Dict[str, Any]] - """Meta data information""" - - source: Optional[str] - """The source to update the record with""" - - text: Optional[str] - """The text to update the record with""" - - def __init__(self, meta: Optional[Dict[str, Any]], source: Optional[str], text: Optional[str]) -> None: - self.meta = meta - self.source = source - self.text = text - - @staticmethod - def from_dict(obj: Any) -> 'DatasetRecordUpdateRequest': - assert isinstance(obj, dict) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - source = from_union([from_str, from_none], obj.get("source")) - text = from_union([from_str, from_none], obj.get("text")) - return DatasetRecordUpdateRequest(meta, source, text) - - def to_dict(self) -> dict: - result: dict = {} - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.source is not None: - result["source"] = from_union([from_str, from_none], self.source) - if self.text is not None: - result["text"] = from_union([from_str, from_none], self.text) - return result - - -class DatasetRecordUpdateResponse: - id: str - """The ID of the updated record""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'DatasetRecordUpdateResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return DatasetRecordUpdateResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - - -class DatasetRecordCreateParams: - dataset_id: str - - def __init__(self, dataset_id: str) -> None: - self.dataset_id = dataset_id - - @staticmethod - def from_dict(obj: Any) -> 'DatasetRecordCreateParams': - assert isinstance(obj, dict) - dataset_id = from_str(obj.get("datasetId")) - return DatasetRecordCreateParams(dataset_id) - - def to_dict(self) -> dict: - result: dict = {} - result["datasetId"] = from_str(self.dataset_id) - return result - + kind: Optional[IndecentKind] + """The kind of the secret""" -class DatasetRecordCreateRequest: meta: Optional[Dict[str, Any]] """Meta data information""" - source: Optional[str] - """The source of the record""" + name: Optional[str] + """The associated name""" - text: str - """The text of the record""" + setup: Optional[str] + tags: Optional[List[str]] + template: Optional[str] + """The original template identifier for the secret""" - def __init__(self, meta: Optional[Dict[str, Any]], source: Optional[str], text: str) -> None: + type: FriskyType + """The type of the secret""" + + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, commentary: Optional[str], config: Optional[Dict[str, Any]], created_at: float, description: Optional[str], icon: Optional[str], id: str, kind: Optional[IndecentKind], meta: Optional[Dict[str, Any]], name: Optional[str], setup: Optional[str], tags: Optional[List[str]], template: Optional[str], type: FriskyType, updated_at: float) -> None: + self.commentary = commentary + self.config = config + self.created_at = created_at + self.description = description + self.icon = icon + self.id = id + self.kind = kind self.meta = meta - self.source = source - self.text = text + self.name = name + self.setup = setup + self.tags = tags + self.template = template + self.type = type + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'DatasetRecordCreateRequest': + def from_dict(obj: Any) -> 'PlatformSecretListStreamItemData': assert isinstance(obj, dict) + commentary = from_union([from_str, from_none], obj.get("commentary")) + config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) + created_at = from_float(obj.get("createdAt")) + description = from_union([from_str, from_none], obj.get("description")) + icon = from_union([from_str, from_none], obj.get("icon")) + id = from_str(obj.get("id")) + kind = from_union([IndecentKind, from_none], obj.get("kind")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - source = from_union([from_str, from_none], obj.get("source")) - text = from_str(obj.get("text")) - return DatasetRecordCreateRequest(meta, source, text) + name = from_union([from_str, from_none], obj.get("name")) + setup = from_union([from_str, from_none], obj.get("setup")) + tags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tags")) + template = from_union([from_str, from_none], obj.get("template")) + type = FriskyType(obj.get("type")) + updated_at = from_float(obj.get("updatedAt")) + return PlatformSecretListStreamItemData(commentary, config, created_at, description, icon, id, kind, meta, name, setup, tags, template, type, updated_at) def to_dict(self) -> dict: result: dict = {} + if self.commentary is not None: + result["commentary"] = from_union([from_str, from_none], self.commentary) + if self.config is not None: + result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) + result["createdAt"] = to_float(self.created_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.icon is not None: + result["icon"] = from_union([from_str, from_none], self.icon) + result["id"] = from_str(self.id) + if self.kind is not None: + result["kind"] = from_union([lambda x: to_enum(IndecentKind, x), from_none], self.kind) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.source is not None: - result["source"] = from_union([from_str, from_none], self.source) - result["text"] = from_str(self.text) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.setup is not None: + result["setup"] = from_union([from_str, from_none], self.setup) + if self.tags is not None: + result["tags"] = from_union([lambda x: from_list(from_str, x), from_none], self.tags) + if self.template is not None: + result["template"] = from_union([from_str, from_none], self.template) + result["type"] = to_enum(FriskyType, self.type) + result["updatedAt"] = to_float(self.updated_at) return result -class DatasetRecordCreateResponse: - id: str - """The ID of the created record""" +class PlatformSecretListStreamItemType(Enum): + """The type of event""" - def __init__(self, id: str) -> None: - self.id = id + ITEM = "item" + + +class PlatformSecretListStreamItem: + data: PlatformSecretListStreamItemData + """Instance list properties""" + + type: PlatformSecretListStreamItemType + """The type of event""" + + def __init__(self, data: PlatformSecretListStreamItemData, type: PlatformSecretListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'DatasetRecordCreateResponse': + def from_dict(obj: Any) -> 'PlatformSecretListStreamItem': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return DatasetRecordCreateResponse(id) + data = PlatformSecretListStreamItemData.from_dict(obj.get("data")) + type = PlatformSecretListStreamItemType(obj.get("type")) + return PlatformSecretListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["data"] = to_class(PlatformSecretListStreamItemData, self.data) + result["type"] = to_enum(PlatformSecretListStreamItemType, self.type) return result -class DatasetRecordsExportParamsOrder(Enum): +class PlatformModelListParamsOrder(Enum): """The order of the paginated items""" ASC = "asc" DESC = "desc" -class DatasetRecordsExportParams: +class PlatformModelListParamsType(Enum): + """The type of models to list""" + + DECISION = "decision" + IMAGE = "image" + LANGUAGE = "language" + RERANK = "rerank" + VIDEO = "video" + + +class PlatformModelListParams: cursor: Optional[str] """The cursor to use for pagination""" - dataset_id: str - """The ID of the dataset to export""" + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" - order: Optional[DatasetRecordsExportParamsOrder] + order: Optional[PlatformModelListParamsOrder] """The order of the paginated items""" take: Optional[int] """The number of items to retrieve""" - def __init__(self, cursor: Optional[str], dataset_id: str, order: Optional[DatasetRecordsExportParamsOrder], take: Optional[int]) -> None: + type: Optional[PlatformModelListParamsType] + """The type of models to list""" + + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[PlatformModelListParamsOrder], take: Optional[int], type: Optional[PlatformModelListParamsType]) -> None: self.cursor = cursor - self.dataset_id = dataset_id + self.meta = meta self.order = order self.take = take + self.type = type @staticmethod - def from_dict(obj: Any) -> 'DatasetRecordsExportParams': + def from_dict(obj: Any) -> 'PlatformModelListParams': assert isinstance(obj, dict) cursor = from_union([from_str, from_none], obj.get("cursor")) - dataset_id = from_str(obj.get("datasetId")) - order = from_union([DatasetRecordsExportParamsOrder, from_none], obj.get("order")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([PlatformModelListParamsOrder, from_none], obj.get("order")) take = from_union([from_int, from_none], obj.get("take")) - return DatasetRecordsExportParams(cursor, dataset_id, order, take) + type = from_union([PlatformModelListParamsType, from_none], obj.get("type")) + return PlatformModelListParams(cursor, meta, order, take, type) def to_dict(self) -> dict: result: dict = {} if self.cursor is not None: result["cursor"] = from_union([from_str, from_none], self.cursor) - result["datasetId"] = from_str(self.dataset_id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(DatasetRecordsExportParamsOrder, x), from_none], self.order) + result["order"] = from_union([lambda x: to_enum(PlatformModelListParamsOrder, x), from_none], self.order) if self.take is not None: result["take"] = from_union([from_int, from_none], self.take) + if self.type is not None: + result["type"] = from_union([lambda x: to_enum(PlatformModelListParamsType, x), from_none], self.type) return result -class DatasetRecordsExportResponseItem: +class MischievousType(Enum): + """The type of the model""" + + DECISION = "decision" + IMAGE = "image" + LANGUAGE = "language" + RERANK = "rerank" + VIDEO = "video" + + +class PlatformModelListResponseItem: """Instance list properties""" created_at: float """The timestamp (ms) when the instance was created""" + default: Optional[bool] + """Whether this model is the deployment's default for its type""" + + description: Optional[str] + """The associated description""" + + family: str + """The model of the model""" + id: str """The instance ID""" - source: Optional[str] - text: str + max_input_tokens: float + """The maximum number of tokens the model can accept""" + + max_output_tokens: float + """The maximum number of tokens the model can generate""" + + max_tokens: float + """The maximum number of tokens the model can use""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" + + name: Optional[str] + """The associated name""" + + provider: str + """The backstory of the model""" + + type: MischievousType + """The type of the model""" + updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, created_at: float, id: str, source: Optional[str], text: str, updated_at: float) -> None: + def __init__(self, created_at: float, default: Optional[bool], description: Optional[str], family: str, id: str, max_input_tokens: float, max_output_tokens: float, max_tokens: float, meta: Optional[Dict[str, Any]], name: Optional[str], provider: str, type: MischievousType, updated_at: float) -> None: self.created_at = created_at + self.default = default + self.description = description + self.family = family self.id = id - self.source = source - self.text = text + self.max_input_tokens = max_input_tokens + self.max_output_tokens = max_output_tokens + self.max_tokens = max_tokens + self.meta = meta + self.name = name + self.provider = provider + self.type = type self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'DatasetRecordsExportResponseItem': + def from_dict(obj: Any) -> 'PlatformModelListResponseItem': assert isinstance(obj, dict) created_at = from_float(obj.get("createdAt")) + default = from_union([from_bool, from_none], obj.get("default")) + description = from_union([from_str, from_none], obj.get("description")) + family = from_str(obj.get("family")) id = from_str(obj.get("id")) - source = from_union([from_str, from_none], obj.get("source")) - text = from_str(obj.get("text")) + max_input_tokens = from_float(obj.get("maxInputTokens")) + max_output_tokens = from_float(obj.get("maxOutputTokens")) + max_tokens = from_float(obj.get("maxTokens")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + provider = from_str(obj.get("provider")) + type = MischievousType(obj.get("type")) updated_at = from_float(obj.get("updatedAt")) - return DatasetRecordsExportResponseItem(created_at, id, source, text, updated_at) + return PlatformModelListResponseItem(created_at, default, description, family, id, max_input_tokens, max_output_tokens, max_tokens, meta, name, provider, type, updated_at) def to_dict(self) -> dict: result: dict = {} result["createdAt"] = to_float(self.created_at) + if self.default is not None: + result["default"] = from_union([from_bool, from_none], self.default) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + result["family"] = from_str(self.family) result["id"] = from_str(self.id) - if self.source is not None: - result["source"] = from_union([from_str, from_none], self.source) - result["text"] = from_str(self.text) + result["maxInputTokens"] = to_float(self.max_input_tokens) + result["maxOutputTokens"] = to_float(self.max_output_tokens) + result["maxTokens"] = to_float(self.max_tokens) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + result["provider"] = from_str(self.provider) + result["type"] = to_enum(MischievousType, self.type) result["updatedAt"] = to_float(self.updated_at) return result -class DatasetRecordsExportResponse: +class PlatformModelListResponse: cursor: str """Cursor for fetching the next page""" - items: List[DatasetRecordsExportResponseItem] + items: List[PlatformModelListResponseItem] - def __init__(self, cursor: str, items: List[DatasetRecordsExportResponseItem]) -> None: + def __init__(self, cursor: str, items: List[PlatformModelListResponseItem]) -> None: self.cursor = cursor self.items = items @staticmethod - def from_dict(obj: Any) -> 'DatasetRecordsExportResponse': + def from_dict(obj: Any) -> 'PlatformModelListResponse': assert isinstance(obj, dict) cursor = from_str(obj.get("cursor")) - items = from_list(DatasetRecordsExportResponseItem.from_dict, obj.get("items")) - return DatasetRecordsExportResponse(cursor, items) + items = from_list(PlatformModelListResponseItem.from_dict, obj.get("items")) + return PlatformModelListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(DatasetRecordsExportResponseItem, x), self.items) + result["items"] = from_list(lambda x: to_class(PlatformModelListResponseItem, x), self.items) return result -class DatasetRecordsExportStreamItemData: +class BraggadociousType(Enum): + """The type of the model""" + + DECISION = "decision" + IMAGE = "image" + LANGUAGE = "language" + RERANK = "rerank" + VIDEO = "video" + + +class PlatformModelListStreamItemData: """Instance list properties""" created_at: float """The timestamp (ms) when the instance was created""" + default: Optional[bool] + """Whether this model is the deployment's default for its type""" + + description: Optional[str] + """The associated description""" + + family: str + """The model of the model""" + id: str """The instance ID""" - source: Optional[str] - text: str + max_input_tokens: float + """The maximum number of tokens the model can accept""" + + max_output_tokens: float + """The maximum number of tokens the model can generate""" + + max_tokens: float + """The maximum number of tokens the model can use""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" + + name: Optional[str] + """The associated name""" + + provider: str + """The backstory of the model""" + + type: BraggadociousType + """The type of the model""" + updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, created_at: float, id: str, source: Optional[str], text: str, updated_at: float) -> None: + def __init__(self, created_at: float, default: Optional[bool], description: Optional[str], family: str, id: str, max_input_tokens: float, max_output_tokens: float, max_tokens: float, meta: Optional[Dict[str, Any]], name: Optional[str], provider: str, type: BraggadociousType, updated_at: float) -> None: self.created_at = created_at + self.default = default + self.description = description + self.family = family self.id = id - self.source = source - self.text = text + self.max_input_tokens = max_input_tokens + self.max_output_tokens = max_output_tokens + self.max_tokens = max_tokens + self.meta = meta + self.name = name + self.provider = provider + self.type = type self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'DatasetRecordsExportStreamItemData': + def from_dict(obj: Any) -> 'PlatformModelListStreamItemData': assert isinstance(obj, dict) created_at = from_float(obj.get("createdAt")) + default = from_union([from_bool, from_none], obj.get("default")) + description = from_union([from_str, from_none], obj.get("description")) + family = from_str(obj.get("family")) id = from_str(obj.get("id")) - source = from_union([from_str, from_none], obj.get("source")) - text = from_str(obj.get("text")) + max_input_tokens = from_float(obj.get("maxInputTokens")) + max_output_tokens = from_float(obj.get("maxOutputTokens")) + max_tokens = from_float(obj.get("maxTokens")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + provider = from_str(obj.get("provider")) + type = BraggadociousType(obj.get("type")) updated_at = from_float(obj.get("updatedAt")) - return DatasetRecordsExportStreamItemData(created_at, id, source, text, updated_at) + return PlatformModelListStreamItemData(created_at, default, description, family, id, max_input_tokens, max_output_tokens, max_tokens, meta, name, provider, type, updated_at) def to_dict(self) -> dict: result: dict = {} result["createdAt"] = to_float(self.created_at) + if self.default is not None: + result["default"] = from_union([from_bool, from_none], self.default) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + result["family"] = from_str(self.family) result["id"] = from_str(self.id) - if self.source is not None: - result["source"] = from_union([from_str, from_none], self.source) - result["text"] = from_str(self.text) + result["maxInputTokens"] = to_float(self.max_input_tokens) + result["maxOutputTokens"] = to_float(self.max_output_tokens) + result["maxTokens"] = to_float(self.max_tokens) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + result["provider"] = from_str(self.provider) + result["type"] = to_enum(BraggadociousType, self.type) result["updatedAt"] = to_float(self.updated_at) return result -class DatasetRecordsExportStreamItemType(Enum): +class PlatformModelListStreamItemType(Enum): """The type of event""" ITEM = "item" -class DatasetRecordsExportStreamItem: - data: DatasetRecordsExportStreamItemData +class PlatformModelListStreamItem: + data: PlatformModelListStreamItemData """Instance list properties""" - type: DatasetRecordsExportStreamItemType + type: PlatformModelListStreamItemType """The type of event""" - def __init__(self, data: DatasetRecordsExportStreamItemData, type: DatasetRecordsExportStreamItemType) -> None: + def __init__(self, data: PlatformModelListStreamItemData, type: PlatformModelListStreamItemType) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'DatasetRecordsExportStreamItem': + def from_dict(obj: Any) -> 'PlatformModelListStreamItem': assert isinstance(obj, dict) - data = DatasetRecordsExportStreamItemData.from_dict(obj.get("data")) - type = DatasetRecordsExportStreamItemType(obj.get("type")) - return DatasetRecordsExportStreamItem(data, type) + data = PlatformModelListStreamItemData.from_dict(obj.get("data")) + type = PlatformModelListStreamItemType(obj.get("type")) + return PlatformModelListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(DatasetRecordsExportStreamItemData, self.data) - result["type"] = to_enum(DatasetRecordsExportStreamItemType, self.type) + result["data"] = to_class(PlatformModelListStreamItemData, self.data) + result["type"] = to_enum(PlatformModelListStreamItemType, self.type) return result -class DatasetRecordListParamsOrder(Enum): +class PlatformExamplesSearchRequest: + search: str + """The search query to find relevant examples""" + + take: Optional[int] + """The maximum number of results to return (1-100, default 10)""" + + def __init__(self, search: str, take: Optional[int]) -> None: + self.search = search + self.take = take + + @staticmethod + def from_dict(obj: Any) -> 'PlatformExamplesSearchRequest': + assert isinstance(obj, dict) + search = from_str(obj.get("search")) + take = from_union([from_int, from_none], obj.get("take")) + return PlatformExamplesSearchRequest(search, take) + + def to_dict(self) -> dict: + result: dict = {} + result["search"] = from_str(self.search) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) + return result + + +class Type1(Enum): + """The type of the example""" + + BLUEPRINT = "blueprint" + DISCORD = "discord" + EMAIL = "email" + MESSENGER = "messenger" + PROJECT = "project" + SLACK = "slack" + TELEGRAM = "telegram" + TRIGGER = "trigger" + TWILIO = "twilio" + WHATSAPP = "whatsapp" + WIDGET = "widget" + + +class PlatformExamplesSearchResponseItem: + """Instance list properties""" + + created_at: float + """The timestamp (ms) when the instance was created""" + + description: str + """The associated description""" + + id: str + """The instance ID""" + + link: str + """The URL to the official example page""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" + + name: str + """The associated name""" + + tags: Optional[List[str]] + """Tags associated with the example""" + + type: Type1 + """The type of the example""" + + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, created_at: float, description: str, id: str, link: str, meta: Optional[Dict[str, Any]], name: str, tags: Optional[List[str]], type: Type1, updated_at: float) -> None: + self.created_at = created_at + self.description = description + self.id = id + self.link = link + self.meta = meta + self.name = name + self.tags = tags + self.type = type + self.updated_at = updated_at + + @staticmethod + def from_dict(obj: Any) -> 'PlatformExamplesSearchResponseItem': + assert isinstance(obj, dict) + created_at = from_float(obj.get("createdAt")) + description = from_str(obj.get("description")) + id = from_str(obj.get("id")) + link = from_str(obj.get("link")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_str(obj.get("name")) + tags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tags")) + type = Type1(obj.get("type")) + updated_at = from_float(obj.get("updatedAt")) + return PlatformExamplesSearchResponseItem(created_at, description, id, link, meta, name, tags, type, updated_at) + + def to_dict(self) -> dict: + result: dict = {} + result["createdAt"] = to_float(self.created_at) + result["description"] = from_str(self.description) + result["id"] = from_str(self.id) + result["link"] = from_str(self.link) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + result["name"] = from_str(self.name) + if self.tags is not None: + result["tags"] = from_union([lambda x: from_list(from_str, x), from_none], self.tags) + result["type"] = to_enum(Type1, self.type) + result["updatedAt"] = to_float(self.updated_at) + return result + + +class PlatformExamplesSearchResponse: + items: List[PlatformExamplesSearchResponseItem] + + def __init__(self, items: List[PlatformExamplesSearchResponseItem]) -> None: + self.items = items + + @staticmethod + def from_dict(obj: Any) -> 'PlatformExamplesSearchResponse': + assert isinstance(obj, dict) + items = from_list(PlatformExamplesSearchResponseItem.from_dict, obj.get("items")) + return PlatformExamplesSearchResponse(items) + + def to_dict(self) -> dict: + result: dict = {} + result["items"] = from_list(lambda x: to_class(PlatformExamplesSearchResponseItem, x), self.items) + return result + + +class PlatformExampleListParamsOrder(Enum): """The order of the paginated items""" ASC = "asc" DESC = "desc" -class DatasetRecordListParams: +class PlatformExampleListParams: cursor: Optional[str] """The cursor to use for pagination""" - dataset_id: str - """The ID of the dataset""" + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" - order: Optional[DatasetRecordListParamsOrder] + order: Optional[PlatformExampleListParamsOrder] """The order of the paginated items""" take: Optional[int] """The number of items to retrieve""" - def __init__(self, cursor: Optional[str], dataset_id: str, order: Optional[DatasetRecordListParamsOrder], take: Optional[int]) -> None: + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[PlatformExampleListParamsOrder], take: Optional[int]) -> None: self.cursor = cursor - self.dataset_id = dataset_id + self.meta = meta self.order = order self.take = take @staticmethod - def from_dict(obj: Any) -> 'DatasetRecordListParams': + def from_dict(obj: Any) -> 'PlatformExampleListParams': assert isinstance(obj, dict) cursor = from_union([from_str, from_none], obj.get("cursor")) - dataset_id = from_str(obj.get("datasetId")) - order = from_union([DatasetRecordListParamsOrder, from_none], obj.get("order")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([PlatformExampleListParamsOrder, from_none], obj.get("order")) take = from_union([from_int, from_none], obj.get("take")) - return DatasetRecordListParams(cursor, dataset_id, order, take) + return PlatformExampleListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} if self.cursor is not None: result["cursor"] = from_union([from_str, from_none], self.cursor) - result["datasetId"] = from_str(self.dataset_id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(DatasetRecordListParamsOrder, x), from_none], self.order) + result["order"] = from_union([lambda x: to_enum(PlatformExampleListParamsOrder, x), from_none], self.order) if self.take is not None: result["take"] = from_union([from_int, from_none], self.take) return result -class DatasetRecordListResponseItem: +class Type2(Enum): + """The type of the example""" + + BLUEPRINT = "blueprint" + DISCORD = "discord" + EMAIL = "email" + MESSENGER = "messenger" + PROJECT = "project" + SLACK = "slack" + TELEGRAM = "telegram" + TRIGGER = "trigger" + TWILIO = "twilio" + WHATSAPP = "whatsapp" + WIDGET = "widget" + + +class PlatformExampleListResponseItem: """Instance list properties""" - created_at: float - """The timestamp (ms) when the instance was created""" + created_at: float + """The timestamp (ms) when the instance was created""" + + description: str + """The associated description""" + + id: str + """The instance ID""" + + link: str + """The URL to the official example page""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" + + name: str + """The associated name""" + + tags: Optional[List[str]] + """Tags associated with the example""" - id: str - """The instance ID""" + type: Type2 + """The type of the example""" - source: Optional[str] - text: str updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, created_at: float, id: str, source: Optional[str], text: str, updated_at: float) -> None: + def __init__(self, created_at: float, description: str, id: str, link: str, meta: Optional[Dict[str, Any]], name: str, tags: Optional[List[str]], type: Type2, updated_at: float) -> None: self.created_at = created_at + self.description = description self.id = id - self.source = source - self.text = text + self.link = link + self.meta = meta + self.name = name + self.tags = tags + self.type = type self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'DatasetRecordListResponseItem': + def from_dict(obj: Any) -> 'PlatformExampleListResponseItem': assert isinstance(obj, dict) created_at = from_float(obj.get("createdAt")) + description = from_str(obj.get("description")) id = from_str(obj.get("id")) - source = from_union([from_str, from_none], obj.get("source")) - text = from_str(obj.get("text")) + link = from_str(obj.get("link")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_str(obj.get("name")) + tags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tags")) + type = Type2(obj.get("type")) updated_at = from_float(obj.get("updatedAt")) - return DatasetRecordListResponseItem(created_at, id, source, text, updated_at) + return PlatformExampleListResponseItem(created_at, description, id, link, meta, name, tags, type, updated_at) def to_dict(self) -> dict: result: dict = {} result["createdAt"] = to_float(self.created_at) + result["description"] = from_str(self.description) result["id"] = from_str(self.id) - if self.source is not None: - result["source"] = from_union([from_str, from_none], self.source) - result["text"] = from_str(self.text) + result["link"] = from_str(self.link) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + result["name"] = from_str(self.name) + if self.tags is not None: + result["tags"] = from_union([lambda x: from_list(from_str, x), from_none], self.tags) + result["type"] = to_enum(Type2, self.type) result["updatedAt"] = to_float(self.updated_at) return result -class DatasetRecordListResponse: +class PlatformExampleListResponse: cursor: str """Cursor for fetching the next page""" - items: List[DatasetRecordListResponseItem] + items: List[PlatformExampleListResponseItem] - def __init__(self, cursor: str, items: List[DatasetRecordListResponseItem]) -> None: + def __init__(self, cursor: str, items: List[PlatformExampleListResponseItem]) -> None: self.cursor = cursor self.items = items @staticmethod - def from_dict(obj: Any) -> 'DatasetRecordListResponse': + def from_dict(obj: Any) -> 'PlatformExampleListResponse': assert isinstance(obj, dict) cursor = from_str(obj.get("cursor")) - items = from_list(DatasetRecordListResponseItem.from_dict, obj.get("items")) - return DatasetRecordListResponse(cursor, items) + items = from_list(PlatformExampleListResponseItem.from_dict, obj.get("items")) + return PlatformExampleListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(DatasetRecordListResponseItem, x), self.items) + result["items"] = from_list(lambda x: to_class(PlatformExampleListResponseItem, x), self.items) return result -class DatasetRecordListStreamItemData: +class Type3(Enum): + """The type of the example""" + + BLUEPRINT = "blueprint" + DISCORD = "discord" + EMAIL = "email" + MESSENGER = "messenger" + PROJECT = "project" + SLACK = "slack" + TELEGRAM = "telegram" + TRIGGER = "trigger" + TWILIO = "twilio" + WHATSAPP = "whatsapp" + WIDGET = "widget" + + +class PlatformExampleListStreamItemData: """Instance list properties""" created_at: float """The timestamp (ms) when the instance was created""" + description: str + """The associated description""" + id: str """The instance ID""" - source: Optional[str] - text: str + link: str + """The URL to the official example page""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" + + name: str + """The associated name""" + + tags: Optional[List[str]] + """Tags associated with the example""" + + type: Type3 + """The type of the example""" + updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, created_at: float, id: str, source: Optional[str], text: str, updated_at: float) -> None: + def __init__(self, created_at: float, description: str, id: str, link: str, meta: Optional[Dict[str, Any]], name: str, tags: Optional[List[str]], type: Type3, updated_at: float) -> None: self.created_at = created_at + self.description = description self.id = id - self.source = source - self.text = text + self.link = link + self.meta = meta + self.name = name + self.tags = tags + self.type = type self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'DatasetRecordListStreamItemData': + def from_dict(obj: Any) -> 'PlatformExampleListStreamItemData': assert isinstance(obj, dict) created_at = from_float(obj.get("createdAt")) + description = from_str(obj.get("description")) id = from_str(obj.get("id")) - source = from_union([from_str, from_none], obj.get("source")) - text = from_str(obj.get("text")) + link = from_str(obj.get("link")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_str(obj.get("name")) + tags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tags")) + type = Type3(obj.get("type")) updated_at = from_float(obj.get("updatedAt")) - return DatasetRecordListStreamItemData(created_at, id, source, text, updated_at) + return PlatformExampleListStreamItemData(created_at, description, id, link, meta, name, tags, type, updated_at) def to_dict(self) -> dict: result: dict = {} result["createdAt"] = to_float(self.created_at) + result["description"] = from_str(self.description) result["id"] = from_str(self.id) - if self.source is not None: - result["source"] = from_union([from_str, from_none], self.source) - result["text"] = from_str(self.text) + result["link"] = from_str(self.link) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + result["name"] = from_str(self.name) + if self.tags is not None: + result["tags"] = from_union([lambda x: from_list(from_str, x), from_none], self.tags) + result["type"] = to_enum(Type3, self.type) result["updatedAt"] = to_float(self.updated_at) return result -class DatasetRecordListStreamItemType(Enum): +class PlatformExampleListStreamItemType(Enum): """The type of event""" ITEM = "item" -class DatasetRecordListStreamItem: - data: DatasetRecordListStreamItemData +class PlatformExampleListStreamItem: + data: PlatformExampleListStreamItemData """Instance list properties""" - type: DatasetRecordListStreamItemType + type: PlatformExampleListStreamItemType """The type of event""" - def __init__(self, data: DatasetRecordListStreamItemData, type: DatasetRecordListStreamItemType) -> None: + def __init__(self, data: PlatformExampleListStreamItemData, type: PlatformExampleListStreamItemType) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'DatasetRecordListStreamItem': + def from_dict(obj: Any) -> 'PlatformExampleListStreamItem': assert isinstance(obj, dict) - data = DatasetRecordListStreamItemData.from_dict(obj.get("data")) - type = DatasetRecordListStreamItemType(obj.get("type")) - return DatasetRecordListStreamItem(data, type) + data = PlatformExampleListStreamItemData.from_dict(obj.get("data")) + type = PlatformExampleListStreamItemType(obj.get("type")) + return PlatformExampleListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(DatasetRecordListStreamItemData, self.data) - result["type"] = to_enum(DatasetRecordListStreamItemType, self.type) + result["data"] = to_class(PlatformExampleListStreamItemData, self.data) + result["type"] = to_enum(PlatformExampleListStreamItemType, self.type) return result -class DatasetSearchParams: - dataset_id: str - """The ID of the dataset to search""" +class PlatformExampleFetchParams: + example_id: str + """The ID (slug) of the example""" - def __init__(self, dataset_id: str) -> None: - self.dataset_id = dataset_id + def __init__(self, example_id: str) -> None: + self.example_id = example_id @staticmethod - def from_dict(obj: Any) -> 'DatasetSearchParams': + def from_dict(obj: Any) -> 'PlatformExampleFetchParams': assert isinstance(obj, dict) - dataset_id = from_str(obj.get("datasetId")) - return DatasetSearchParams(dataset_id) + example_id = from_str(obj.get("exampleId")) + return PlatformExampleFetchParams(example_id) def to_dict(self) -> dict: result: dict = {} - result["datasetId"] = from_str(self.dataset_id) + result["exampleId"] = from_str(self.example_id) return result -class FilterClass: - eq: Optional[Union[float, bool, str]] - ne: Optional[Union[float, bool, str]] - gt: Optional[float] - gte: Optional[float] - lt: Optional[float] - lte: Optional[float] +class PlatformExampleFetchResponseType(Enum): + """The type of the example""" + + BLUEPRINT = "blueprint" + DISCORD = "discord" + EMAIL = "email" + MESSENGER = "messenger" + PROJECT = "project" + SLACK = "slack" + TELEGRAM = "telegram" + TRIGGER = "trigger" + TWILIO = "twilio" + WHATSAPP = "whatsapp" + WIDGET = "widget" - def __init__(self, eq: Optional[Union[float, bool, str]], ne: Optional[Union[float, bool, str]], gt: Optional[float], gte: Optional[float], lt: Optional[float], lte: Optional[float]) -> None: - self.eq = eq - self.ne = ne - self.gt = gt - self.gte = gte - self.lt = lt - self.lte = lte + +class PlatformExampleFetchResponse: + config: Dict[str, Any] + """The full configuration details of the example""" + + created_at: Optional[float] + """The creation timestamp""" + + description: str + """The description of the example""" + + id: str + """The ID (slug) of the example""" + + link: str + """The URL to the official example page""" + + name: str + """The name of the example""" + + tags: Optional[List[str]] + """Tags associated with the example""" + + type: PlatformExampleFetchResponseType + """The type of the example""" + + updated_at: Optional[float] + """The last update timestamp""" + + def __init__(self, config: Dict[str, Any], created_at: Optional[float], description: str, id: str, link: str, name: str, tags: Optional[List[str]], type: PlatformExampleFetchResponseType, updated_at: Optional[float]) -> None: + self.config = config + self.created_at = created_at + self.description = description + self.id = id + self.link = link + self.name = name + self.tags = tags + self.type = type + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'FilterClass': + def from_dict(obj: Any) -> 'PlatformExampleFetchResponse': assert isinstance(obj, dict) - eq = from_union([from_float, from_bool, from_str, from_none], obj.get("$eq")) - ne = from_union([from_float, from_bool, from_str, from_none], obj.get("$ne")) - gt = from_union([from_float, from_none], obj.get("$gt")) - gte = from_union([from_float, from_none], obj.get("$gte")) - lt = from_union([from_float, from_none], obj.get("$lt")) - lte = from_union([from_float, from_none], obj.get("$lte")) - return FilterClass(eq, ne, gt, gte, lt, lte) + config = from_dict(lambda x: x, obj.get("config")) + created_at = from_union([from_float, from_none], obj.get("createdAt")) + description = from_str(obj.get("description")) + id = from_str(obj.get("id")) + link = from_str(obj.get("link")) + name = from_str(obj.get("name")) + tags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tags")) + type = PlatformExampleFetchResponseType(obj.get("type")) + updated_at = from_union([from_float, from_none], obj.get("updatedAt")) + return PlatformExampleFetchResponse(config, created_at, description, id, link, name, tags, type, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.eq is not None: - result["$eq"] = from_union([to_float, from_bool, from_str, from_none], self.eq) - if self.ne is not None: - result["$ne"] = from_union([to_float, from_bool, from_str, from_none], self.ne) - if self.gt is not None: - result["$gt"] = from_union([to_float, from_none], self.gt) - if self.gte is not None: - result["$gte"] = from_union([to_float, from_none], self.gte) - if self.lt is not None: - result["$lt"] = from_union([to_float, from_none], self.lt) - if self.lte is not None: - result["$lte"] = from_union([to_float, from_none], self.lte) + result["config"] = from_dict(lambda x: x, self.config) + if self.created_at is not None: + result["createdAt"] = from_union([to_float, from_none], self.created_at) + result["description"] = from_str(self.description) + result["id"] = from_str(self.id) + result["link"] = from_str(self.link) + result["name"] = from_str(self.name) + if self.tags is not None: + result["tags"] = from_union([lambda x: from_list(from_str, x), from_none], self.tags) + result["type"] = to_enum(PlatformExampleFetchResponseType, self.type) + if self.updated_at is not None: + result["updatedAt"] = from_union([to_float, from_none], self.updated_at) return result -class DatasetSearchRequest: - filter: Optional[Dict[str, Union[float, bool, FilterClass, str]]] - search: str - """The keyword/phrase to search for""" +class PlatformExampleCloneParams: + example_id: str + """The ID (slug) of the example to clone""" - def __init__(self, filter: Optional[Dict[str, Union[float, bool, FilterClass, str]]], search: str) -> None: - self.filter = filter - self.search = search + def __init__(self, example_id: str) -> None: + self.example_id = example_id @staticmethod - def from_dict(obj: Any) -> 'DatasetSearchRequest': + def from_dict(obj: Any) -> 'PlatformExampleCloneParams': assert isinstance(obj, dict) - filter = from_union([lambda x: from_dict(lambda x: from_union([from_float, from_bool, FilterClass.from_dict, from_str], x), x), from_none], obj.get("filter")) - search = from_str(obj.get("search")) - return DatasetSearchRequest(filter, search) + example_id = from_str(obj.get("exampleId")) + return PlatformExampleCloneParams(example_id) def to_dict(self) -> dict: result: dict = {} - if self.filter is not None: - result["filter"] = from_union([lambda x: from_dict(lambda x: from_union([to_float, from_bool, lambda x: to_class(FilterClass, x), from_str], x), x), from_none], self.filter) - result["search"] = from_str(self.search) + result["exampleId"] = from_str(self.example_id) return result -class DatasetSearchResponseRecord: +class Resource: + description: Optional[str] + """The description of the resource""" + id: str - meta: Optional[Dict[str, Any]] - score: float - source: Optional[str] - text: str + """The unique identifier of the resource""" - def __init__(self, id: str, meta: Optional[Dict[str, Any]], score: float, source: Optional[str], text: str) -> None: + name: Optional[str] + """The name of the resource""" + + def __init__(self, description: Optional[str], id: str, name: Optional[str]) -> None: + self.description = description self.id = id - self.meta = meta - self.score = score - self.source = source - self.text = text + self.name = name @staticmethod - def from_dict(obj: Any) -> 'DatasetSearchResponseRecord': + def from_dict(obj: Any) -> 'Resource': assert isinstance(obj, dict) + description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - score = from_float(obj.get("score")) - source = from_union([from_str, from_none], obj.get("source")) - text = from_str(obj.get("text")) - return DatasetSearchResponseRecord(id, meta, score, source, text) + name = from_union([from_str, from_none], obj.get("name")) + return Resource(description, id, name) def to_dict(self) -> dict: result: dict = {} + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["score"] = to_float(self.score) - if self.source is not None: - result["source"] = from_union([from_str, from_none], self.source) - result["text"] = from_str(self.text) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) return result -class DatasetSearchResponse: - id: str - """The ID of the dataset that was searched""" - - records: List[DatasetSearchResponseRecord] - """An array of records matching the search query""" +class PlatformExampleCloneResponse: + resources: Dict[str, List[Resource]] + """A map of resource types to arrays of created resources""" - def __init__(self, id: str, records: List[DatasetSearchResponseRecord]) -> None: - self.id = id - self.records = records + def __init__(self, resources: Dict[str, List[Resource]]) -> None: + self.resources = resources @staticmethod - def from_dict(obj: Any) -> 'DatasetSearchResponse': + def from_dict(obj: Any) -> 'PlatformExampleCloneResponse': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - records = from_list(DatasetSearchResponseRecord.from_dict, obj.get("records")) - return DatasetSearchResponse(id, records) + resources = from_dict(lambda x: from_list(Resource.from_dict, x), obj.get("resources")) + return PlatformExampleCloneResponse(resources) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) - result["records"] = from_list(lambda x: to_class(DatasetSearchResponseRecord, x), self.records) + result["resources"] = from_dict(lambda x: from_list(lambda x: to_class(Resource, x), x), self.resources) return result -class DatasetUpdateParams: - dataset_id: str +class PlatformActionListParamsOrder(Enum): + """The order of the paginated items""" - def __init__(self, dataset_id: str) -> None: - self.dataset_id = dataset_id + ASC = "asc" + DESC = "desc" + + +class PlatformActionListParams: + cursor: Optional[str] + """The cursor to use for pagination""" + + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" + + order: Optional[PlatformActionListParamsOrder] + """The order of the paginated items""" + + take: Optional[int] + """The number of items to retrieve""" + + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[PlatformActionListParamsOrder], take: Optional[int]) -> None: + self.cursor = cursor + self.meta = meta + self.order = order + self.take = take @staticmethod - def from_dict(obj: Any) -> 'DatasetUpdateParams': + def from_dict(obj: Any) -> 'PlatformActionListParams': assert isinstance(obj, dict) - dataset_id = from_str(obj.get("datasetId")) - return DatasetUpdateParams(dataset_id) + cursor = from_union([from_str, from_none], obj.get("cursor")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([PlatformActionListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return PlatformActionListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} - result["datasetId"] = from_str(self.dataset_id) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(PlatformActionListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class DatasetUpdateRequestVisibility(Enum): - """The dataset visibility""" - - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" - - -class DatasetUpdateRequest: - """Blueprint properties""" +class PlatformActionListResponseItem: + """Instance list properties""" - alias: Optional[str] - """The unique alias for the instance""" + created_at: float + """The timestamp (ms) when the instance was created""" - blueprint_id: Optional[str] - """The ID of the blueprint""" + description: str + """The description of the action""" - description: Optional[str] - """The associated description""" + examples: List[str] + """Example demonstrating the action usage""" - match_instruction: Optional[str] - """An instruction to include before found records""" + id: str + """The instance ID""" meta: Optional[Dict[str, Any]] """Meta data information""" - mismatch_instruction: Optional[str] - """An instruction to include if no records where found""" - name: Optional[str] """The associated name""" - record_max_tokens: Optional[float] - """The total number of tokens to for each record""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - reranker: Optional[str] - """The reranker class for the dataset""" + def __init__(self, created_at: float, description: str, examples: List[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: + self.created_at = created_at + self.description = description + self.examples = examples + self.id = id + self.meta = meta + self.name = name + self.updated_at = updated_at - search_max_records: Optional[float] - """The total number of records to return during search""" + @staticmethod + def from_dict(obj: Any) -> 'PlatformActionListResponseItem': + assert isinstance(obj, dict) + created_at = from_float(obj.get("createdAt")) + description = from_str(obj.get("description")) + examples = from_list(from_str, obj.get("examples")) + id = from_str(obj.get("id")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + updated_at = from_float(obj.get("updatedAt")) + return PlatformActionListResponseItem(created_at, description, examples, id, meta, name, updated_at) + + def to_dict(self) -> dict: + result: dict = {} + result["createdAt"] = to_float(self.created_at) + result["description"] = from_str(self.description) + result["examples"] = from_list(from_str, self.examples) + result["id"] = from_str(self.id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + result["updatedAt"] = to_float(self.updated_at) + return result + + +class PlatformActionListResponse: + cursor: str + """Cursor for fetching the next page""" + + items: List[PlatformActionListResponseItem] + + def __init__(self, cursor: str, items: List[PlatformActionListResponseItem]) -> None: + self.cursor = cursor + self.items = items + + @staticmethod + def from_dict(obj: Any) -> 'PlatformActionListResponse': + assert isinstance(obj, dict) + cursor = from_str(obj.get("cursor")) + items = from_list(PlatformActionListResponseItem.from_dict, obj.get("items")) + return PlatformActionListResponse(cursor, items) + + def to_dict(self) -> dict: + result: dict = {} + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(PlatformActionListResponseItem, x), self.items) + return result + + +class PlatformActionListStreamItemData: + """Instance list properties""" + + created_at: float + """The timestamp (ms) when the instance was created""" + + description: str + """The description of the action""" - search_max_tokens: Optional[float] - """The total number of tokens to use during search""" + examples: List[str] + """Example demonstrating the action usage""" - search_min_score: Optional[float] - """The minimum score to filter search results by""" + id: str + """The instance ID""" - separators: Optional[str] - """A list of separators to use when tokenizing text""" + meta: Optional[Dict[str, Any]] + """Meta data information""" - visibility: Optional[DatasetUpdateRequestVisibility] - """The dataset visibility""" + name: Optional[str] + """The associated name""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], description: Optional[str], match_instruction: Optional[str], meta: Optional[Dict[str, Any]], mismatch_instruction: Optional[str], name: Optional[str], record_max_tokens: Optional[float], reranker: Optional[str], search_max_records: Optional[float], search_max_tokens: Optional[float], search_min_score: Optional[float], separators: Optional[str], visibility: Optional[DatasetUpdateRequestVisibility]) -> None: - self.alias = alias - self.blueprint_id = blueprint_id + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, created_at: float, description: str, examples: List[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: + self.created_at = created_at self.description = description - self.match_instruction = match_instruction + self.examples = examples + self.id = id self.meta = meta - self.mismatch_instruction = mismatch_instruction self.name = name - self.record_max_tokens = record_max_tokens - self.reranker = reranker - self.search_max_records = search_max_records - self.search_max_tokens = search_max_tokens - self.search_min_score = search_min_score - self.separators = separators - self.visibility = visibility + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'DatasetUpdateRequest': + def from_dict(obj: Any) -> 'PlatformActionListStreamItemData': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - description = from_union([from_str, from_none], obj.get("description")) - match_instruction = from_union([from_str, from_none], obj.get("matchInstruction")) + created_at = from_float(obj.get("createdAt")) + description = from_str(obj.get("description")) + examples = from_list(from_str, obj.get("examples")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - mismatch_instruction = from_union([from_str, from_none], obj.get("mismatchInstruction")) name = from_union([from_str, from_none], obj.get("name")) - record_max_tokens = from_union([from_float, from_none], obj.get("recordMaxTokens")) - reranker = from_union([from_str, from_none], obj.get("reranker")) - search_max_records = from_union([from_float, from_none], obj.get("searchMaxRecords")) - search_max_tokens = from_union([from_float, from_none], obj.get("searchMaxTokens")) - search_min_score = from_union([from_float, from_none], obj.get("searchMinScore")) - separators = from_union([from_str, from_none], obj.get("separators")) - visibility = from_union([DatasetUpdateRequestVisibility, from_none], obj.get("visibility")) - return DatasetUpdateRequest(alias, blueprint_id, description, match_instruction, meta, mismatch_instruction, name, record_max_tokens, reranker, search_max_records, search_max_tokens, search_min_score, separators, visibility) + updated_at = from_float(obj.get("updatedAt")) + return PlatformActionListStreamItemData(created_at, description, examples, id, meta, name, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.match_instruction is not None: - result["matchInstruction"] = from_union([from_str, from_none], self.match_instruction) + result["createdAt"] = to_float(self.created_at) + result["description"] = from_str(self.description) + result["examples"] = from_list(from_str, self.examples) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.mismatch_instruction is not None: - result["mismatchInstruction"] = from_union([from_str, from_none], self.mismatch_instruction) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.record_max_tokens is not None: - result["recordMaxTokens"] = from_union([to_float, from_none], self.record_max_tokens) - if self.reranker is not None: - result["reranker"] = from_union([from_str, from_none], self.reranker) - if self.search_max_records is not None: - result["searchMaxRecords"] = from_union([to_float, from_none], self.search_max_records) - if self.search_max_tokens is not None: - result["searchMaxTokens"] = from_union([to_float, from_none], self.search_max_tokens) - if self.search_min_score is not None: - result["searchMinScore"] = from_union([to_float, from_none], self.search_min_score) - if self.separators is not None: - result["separators"] = from_union([from_str, from_none], self.separators) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(DatasetUpdateRequestVisibility, x), from_none], self.visibility) + result["updatedAt"] = to_float(self.updated_at) return result -class DatasetUpdateResponse: - id: str - """The ID of the updated dataset""" +class PlatformActionListStreamItemType(Enum): + """The type of event""" - def __init__(self, id: str) -> None: - self.id = id + ITEM = "item" + + +class PlatformActionListStreamItem: + data: PlatformActionListStreamItemData + """Instance list properties""" + + type: PlatformActionListStreamItemType + """The type of event""" + + def __init__(self, data: PlatformActionListStreamItemData, type: PlatformActionListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'DatasetUpdateResponse': + def from_dict(obj: Any) -> 'PlatformActionListStreamItem': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return DatasetUpdateResponse(id) + data = PlatformActionListStreamItemData.from_dict(obj.get("data")) + type = PlatformActionListStreamItemType(obj.get("type")) + return PlatformActionListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["data"] = to_class(PlatformActionListStreamItemData, self.data) + result["type"] = to_enum(PlatformActionListStreamItemType, self.type) return result -class DatasetCreateRequestVisibility(Enum): - """The dataset visibility""" +class PlatformAbilitiesSearchRequest: + search: str + """The search query to find relevant abilities""" - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" + take: Optional[int] + """The maximum number of results to return (1-100, default 10)""" + + def __init__(self, search: str, take: Optional[int]) -> None: + self.search = search + self.take = take + @staticmethod + def from_dict(obj: Any) -> 'PlatformAbilitiesSearchRequest': + assert isinstance(obj, dict) + search = from_str(obj.get("search")) + take = from_union([from_int, from_none], obj.get("take")) + return PlatformAbilitiesSearchRequest(search, take) -class DatasetCreateRequest: - """Blueprint properties""" + def to_dict(self) -> dict: + result: dict = {} + result["search"] = from_str(self.search) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) + return result - alias: Optional[str] - """The unique alias for the instance""" - blueprint_id: Optional[str] - """The ID of the blueprint""" +class Type4(Enum): + """The schema type, must be "object\"""" + + OBJECT = "object" + +class PurpleSchema: + """A JSON Schema object type definition (https://json-schema.org/). Represents an object + schema with properties and validation rules. + """ description: Optional[str] - """The associated description""" + """The schema description""" - match_instruction: Optional[str] - """An instruction to include before found records""" + properties: Dict[str, Any] + """Object property definitions""" - meta: Optional[Dict[str, Any]] - """Meta data information""" + required: Optional[List[str]] + """Required property names""" - mismatch_instruction: Optional[str] - """An instruction to include if no records where found""" + title: Optional[str] + """The schema title""" - name: Optional[str] - """The associated name""" + type: Type4 + """The schema type, must be "object\"""" - record_max_tokens: Optional[float] - """The total number of tokens for each record""" + def __init__(self, description: Optional[str], properties: Dict[str, Any], required: Optional[List[str]], title: Optional[str], type: Type4) -> None: + self.description = description + self.properties = properties + self.required = required + self.title = title + self.type = type - reranker: Optional[str] - """The reranker class for the dataset""" + @staticmethod + def from_dict(obj: Any) -> 'PurpleSchema': + assert isinstance(obj, dict) + description = from_union([from_str, from_none], obj.get("description")) + properties = from_dict(lambda x: x, obj.get("properties")) + required = from_union([lambda x: from_list(from_str, x), from_none], obj.get("required")) + title = from_union([from_str, from_none], obj.get("title")) + type = Type4(obj.get("type")) + return PurpleSchema(description, properties, required, title, type) - search_max_records: Optional[float] - """The total number of records to return during search""" + def to_dict(self) -> dict: + result: dict = {} + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + result["properties"] = from_dict(lambda x: x, self.properties) + if self.required is not None: + result["required"] = from_union([lambda x: from_list(from_str, x), from_none], self.required) + if self.title is not None: + result["title"] = from_union([from_str, from_none], self.title) + result["type"] = to_enum(Type4, self.type) + return result - search_max_tokens: Optional[float] - """The total number of tokens to use during search""" - search_min_score: Optional[float] - """The minimum score to filter search results by""" +class PlatformAbilitiesSearchResponseItem: + """Instance list properties""" - separators: Optional[str] - """A list of separators to use when tokenizing text""" + bot: Optional[str] + commentary: Optional[str] + created_at: float + """The timestamp (ms) when the instance was created""" - store: Optional[str] - """The storage class for the dataset""" + description: str + """The associated description""" - visibility: Optional[DatasetCreateRequestVisibility] - """The dataset visibility""" + excerpt: str + """An excerpt from the most relevant part of the ability""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], description: Optional[str], match_instruction: Optional[str], meta: Optional[Dict[str, Any]], mismatch_instruction: Optional[str], name: Optional[str], record_max_tokens: Optional[float], reranker: Optional[str], search_max_records: Optional[float], search_max_tokens: Optional[float], search_min_score: Optional[float], separators: Optional[str], store: Optional[str], visibility: Optional[DatasetCreateRequestVisibility]) -> None: - self.alias = alias - self.blueprint_id = blueprint_id + file: Optional[str] + icon: str + id: str + """The instance ID""" + + instruction: str + link: Optional[str] + """The URL to the official ability page""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" + + name: str + """The associated name""" + + provider: Optional[str] + schema: PurpleSchema + """A JSON Schema object type definition (https://json-schema.org/). Represents an object + schema with properties and validation rules. + """ + score: float + """The text relevance score of the search result""" + + secret: Optional[str] + setup: Optional[str] + space: Optional[str] + tags: Optional[List[str]] + template: Optional[str] + """The original template identifier for the ability""" + + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, bot: Optional[str], commentary: Optional[str], created_at: float, description: str, excerpt: str, file: Optional[str], icon: str, id: str, instruction: str, link: Optional[str], meta: Optional[Dict[str, Any]], name: str, provider: Optional[str], schema: PurpleSchema, score: float, secret: Optional[str], setup: Optional[str], space: Optional[str], tags: Optional[List[str]], template: Optional[str], updated_at: float) -> None: + self.bot = bot + self.commentary = commentary + self.created_at = created_at self.description = description - self.match_instruction = match_instruction + self.excerpt = excerpt + self.file = file + self.icon = icon + self.id = id + self.instruction = instruction + self.link = link self.meta = meta - self.mismatch_instruction = mismatch_instruction self.name = name - self.record_max_tokens = record_max_tokens - self.reranker = reranker - self.search_max_records = search_max_records - self.search_max_tokens = search_max_tokens - self.search_min_score = search_min_score - self.separators = separators - self.store = store - self.visibility = visibility + self.provider = provider + self.schema = schema + self.score = score + self.secret = secret + self.setup = setup + self.space = space + self.tags = tags + self.template = template + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'DatasetCreateRequest': + def from_dict(obj: Any) -> 'PlatformAbilitiesSearchResponseItem': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - description = from_union([from_str, from_none], obj.get("description")) - match_instruction = from_union([from_str, from_none], obj.get("matchInstruction")) + bot = from_union([from_str, from_none], obj.get("bot")) + commentary = from_union([from_str, from_none], obj.get("commentary")) + created_at = from_float(obj.get("createdAt")) + description = from_str(obj.get("description")) + excerpt = from_str(obj.get("excerpt")) + file = from_union([from_str, from_none], obj.get("file")) + icon = from_str(obj.get("icon")) + id = from_str(obj.get("id")) + instruction = from_str(obj.get("instruction")) + link = from_union([from_str, from_none], obj.get("link")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - mismatch_instruction = from_union([from_str, from_none], obj.get("mismatchInstruction")) - name = from_union([from_str, from_none], obj.get("name")) - record_max_tokens = from_union([from_float, from_none], obj.get("recordMaxTokens")) - reranker = from_union([from_str, from_none], obj.get("reranker")) - search_max_records = from_union([from_float, from_none], obj.get("searchMaxRecords")) - search_max_tokens = from_union([from_float, from_none], obj.get("searchMaxTokens")) - search_min_score = from_union([from_float, from_none], obj.get("searchMinScore")) - separators = from_union([from_str, from_none], obj.get("separators")) - store = from_union([from_str, from_none], obj.get("store")) - visibility = from_union([DatasetCreateRequestVisibility, from_none], obj.get("visibility")) - return DatasetCreateRequest(alias, blueprint_id, description, match_instruction, meta, mismatch_instruction, name, record_max_tokens, reranker, search_max_records, search_max_tokens, search_min_score, separators, store, visibility) + name = from_str(obj.get("name")) + provider = from_union([from_str, from_none], obj.get("provider")) + schema = PurpleSchema.from_dict(obj.get("schema")) + score = from_float(obj.get("score")) + secret = from_union([from_str, from_none], obj.get("secret")) + setup = from_union([from_str, from_none], obj.get("setup")) + space = from_union([from_str, from_none], obj.get("space")) + tags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tags")) + template = from_union([from_str, from_none], obj.get("template")) + updated_at = from_float(obj.get("updatedAt")) + return PlatformAbilitiesSearchResponseItem(bot, commentary, created_at, description, excerpt, file, icon, id, instruction, link, meta, name, provider, schema, score, secret, setup, space, tags, template, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.match_instruction is not None: - result["matchInstruction"] = from_union([from_str, from_none], self.match_instruction) + if self.bot is not None: + result["bot"] = from_union([from_str, from_none], self.bot) + if self.commentary is not None: + result["commentary"] = from_union([from_str, from_none], self.commentary) + result["createdAt"] = to_float(self.created_at) + result["description"] = from_str(self.description) + result["excerpt"] = from_str(self.excerpt) + if self.file is not None: + result["file"] = from_union([from_str, from_none], self.file) + result["icon"] = from_str(self.icon) + result["id"] = from_str(self.id) + result["instruction"] = from_str(self.instruction) + if self.link is not None: + result["link"] = from_union([from_str, from_none], self.link) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.mismatch_instruction is not None: - result["mismatchInstruction"] = from_union([from_str, from_none], self.mismatch_instruction) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.record_max_tokens is not None: - result["recordMaxTokens"] = from_union([to_float, from_none], self.record_max_tokens) - if self.reranker is not None: - result["reranker"] = from_union([from_str, from_none], self.reranker) - if self.search_max_records is not None: - result["searchMaxRecords"] = from_union([to_float, from_none], self.search_max_records) - if self.search_max_tokens is not None: - result["searchMaxTokens"] = from_union([to_float, from_none], self.search_max_tokens) - if self.search_min_score is not None: - result["searchMinScore"] = from_union([to_float, from_none], self.search_min_score) - if self.separators is not None: - result["separators"] = from_union([from_str, from_none], self.separators) - if self.store is not None: - result["store"] = from_union([from_str, from_none], self.store) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(DatasetCreateRequestVisibility, x), from_none], self.visibility) + result["name"] = from_str(self.name) + if self.provider is not None: + result["provider"] = from_union([from_str, from_none], self.provider) + result["schema"] = to_class(PurpleSchema, self.schema) + result["score"] = to_float(self.score) + if self.secret is not None: + result["secret"] = from_union([from_str, from_none], self.secret) + if self.setup is not None: + result["setup"] = from_union([from_str, from_none], self.setup) + if self.space is not None: + result["space"] = from_union([from_str, from_none], self.space) + if self.tags is not None: + result["tags"] = from_union([lambda x: from_list(from_str, x), from_none], self.tags) + if self.template is not None: + result["template"] = from_union([from_str, from_none], self.template) + result["updatedAt"] = to_float(self.updated_at) return result -class DatasetCreateResponse: - id: str - """The ID of the created dataset""" +class PlatformAbilitiesSearchResponse: + items: List[PlatformAbilitiesSearchResponseItem] - def __init__(self, id: str) -> None: - self.id = id + def __init__(self, items: List[PlatformAbilitiesSearchResponseItem]) -> None: + self.items = items @staticmethod - def from_dict(obj: Any) -> 'DatasetCreateResponse': + def from_dict(obj: Any) -> 'PlatformAbilitiesSearchResponse': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return DatasetCreateResponse(id) + items = from_list(PlatformAbilitiesSearchResponseItem.from_dict, obj.get("items")) + return PlatformAbilitiesSearchResponse(items) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["items"] = from_list(lambda x: to_class(PlatformAbilitiesSearchResponseItem, x), self.items) return result -class DatasetListParamsOrder(Enum): +class PlatformAbilityListParamsOrder(Enum): """The order of the paginated items""" ASC = "asc" DESC = "desc" -class DatasetListParams: +class PlatformAbilityListParams: cursor: Optional[str] """The cursor to use for pagination""" meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" + """Key-value pairs to filter the items by metadata""" - order: Optional[DatasetListParamsOrder] + order: Optional[PlatformAbilityListParamsOrder] """The order of the paginated items""" take: Optional[int] """The number of items to retrieve""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[DatasetListParamsOrder], take: Optional[int]) -> None: + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[PlatformAbilityListParamsOrder], take: Optional[int]) -> None: self.cursor = cursor self.meta = meta self.order = order self.take = take @staticmethod - def from_dict(obj: Any) -> 'DatasetListParams': + def from_dict(obj: Any) -> 'PlatformAbilityListParams': assert isinstance(obj, dict) cursor = from_union([from_str, from_none], obj.get("cursor")) meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([DatasetListParamsOrder, from_none], obj.get("order")) + order = from_union([PlatformAbilityListParamsOrder, from_none], obj.get("order")) take = from_union([from_int, from_none], obj.get("take")) - return DatasetListParams(cursor, meta, order, take) + return PlatformAbilityListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} @@ -16388,391 +14199,542 @@ def to_dict(self) -> dict: if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(DatasetListParamsOrder, x), from_none], self.order) + result["order"] = from_union([lambda x: to_enum(PlatformAbilityListParamsOrder, x), from_none], self.order) if self.take is not None: result["take"] = from_union([from_int, from_none], self.take) return result -class HilariousVisibility(Enum): - """The dataset visibility""" +class Type5(Enum): + """The schema type, must be "object\"""" - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" + OBJECT = "object" -class DatasetListResponseItem: - """Blueprint properties""" +class FluffySchema: + """A JSON Schema object type definition (https://json-schema.org/). Represents an object + schema with properties and validation rules. + """ + description: Optional[str] + """The schema description""" - alias: Optional[str] - """The unique alias for the instance""" + properties: Dict[str, Any] + """Object property definitions""" - blueprint_id: Optional[str] - """The ID of the blueprint""" + required: Optional[List[str]] + """Required property names""" + + title: Optional[str] + """The schema title""" + + type: Type5 + """The schema type, must be "object\"""" + + def __init__(self, description: Optional[str], properties: Dict[str, Any], required: Optional[List[str]], title: Optional[str], type: Type5) -> None: + self.description = description + self.properties = properties + self.required = required + self.title = title + self.type = type + + @staticmethod + def from_dict(obj: Any) -> 'FluffySchema': + assert isinstance(obj, dict) + description = from_union([from_str, from_none], obj.get("description")) + properties = from_dict(lambda x: x, obj.get("properties")) + required = from_union([lambda x: from_list(from_str, x), from_none], obj.get("required")) + title = from_union([from_str, from_none], obj.get("title")) + type = Type5(obj.get("type")) + return FluffySchema(description, properties, required, title, type) + + def to_dict(self) -> dict: + result: dict = {} + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + result["properties"] = from_dict(lambda x: x, self.properties) + if self.required is not None: + result["required"] = from_union([lambda x: from_list(from_str, x), from_none], self.required) + if self.title is not None: + result["title"] = from_union([from_str, from_none], self.title) + result["type"] = to_enum(Type5, self.type) + return result + + +class PlatformAbilityListResponseItem: + """Instance list properties""" + bot: Optional[str] + """The ID of the bot associated with the ability""" + + commentary: Optional[str] created_at: float """The timestamp (ms) when the instance was created""" description: Optional[str] """The associated description""" + file: Optional[str] + """The ID of the file associated with the ability""" + + icon: str id: str """The instance ID""" - match_instruction: Optional[str] - """An instruction to include before found records""" - + instruction: str meta: Optional[Dict[str, Any]] """Meta data information""" - mismatch_instruction: Optional[str] - """An instruction to include if no records where found""" - name: Optional[str] """The associated name""" - record_max_tokens: Optional[float] - """The total number of tokens for each record""" - - reranker: Optional[str] - """The reranker class for the dataset""" - - search_max_records: Optional[float] - """The total number of records to return during search""" - - search_max_tokens: Optional[float] - """The total number of tokens to use during search""" + provider: Optional[str] + """The provider of the ability""" - search_min_score: Optional[float] - """The minimum score to filter search results by""" + schema: FluffySchema + """A JSON Schema object type definition (https://json-schema.org/). Represents an object + schema with properties and validation rules. + """ + secret: Optional[str] + """The ID of the secret associated with the ability""" - separators: Optional[str] - """A list of separators to use when tokenizing text""" + setup: Optional[str] + space: Optional[str] + """The ID of the space associated with the ability""" - store: str - """The storage class for the dataset""" + tags: Optional[List[str]] + template: Optional[str] + """The original template identifier for the ability""" updated_at: float """The timestamp (ms) when the instance was updated""" - visibility: Optional[HilariousVisibility] - """The dataset visibility""" - - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, match_instruction: Optional[str], meta: Optional[Dict[str, Any]], mismatch_instruction: Optional[str], name: Optional[str], record_max_tokens: Optional[float], reranker: Optional[str], search_max_records: Optional[float], search_max_tokens: Optional[float], search_min_score: Optional[float], separators: Optional[str], store: str, updated_at: float, visibility: Optional[HilariousVisibility]) -> None: - self.alias = alias - self.blueprint_id = blueprint_id + def __init__(self, bot: Optional[str], commentary: Optional[str], created_at: float, description: Optional[str], file: Optional[str], icon: str, id: str, instruction: str, meta: Optional[Dict[str, Any]], name: Optional[str], provider: Optional[str], schema: FluffySchema, secret: Optional[str], setup: Optional[str], space: Optional[str], tags: Optional[List[str]], template: Optional[str], updated_at: float) -> None: + self.bot = bot + self.commentary = commentary self.created_at = created_at self.description = description + self.file = file + self.icon = icon self.id = id - self.match_instruction = match_instruction + self.instruction = instruction self.meta = meta - self.mismatch_instruction = mismatch_instruction self.name = name - self.record_max_tokens = record_max_tokens - self.reranker = reranker - self.search_max_records = search_max_records - self.search_max_tokens = search_max_tokens - self.search_min_score = search_min_score - self.separators = separators - self.store = store + self.provider = provider + self.schema = schema + self.secret = secret + self.setup = setup + self.space = space + self.tags = tags + self.template = template self.updated_at = updated_at - self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'DatasetListResponseItem': + def from_dict(obj: Any) -> 'PlatformAbilityListResponseItem': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot = from_union([from_str, from_none], obj.get("bot")) + commentary = from_union([from_str, from_none], obj.get("commentary")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + file = from_union([from_str, from_none], obj.get("file")) + icon = from_str(obj.get("icon")) id = from_str(obj.get("id")) - match_instruction = from_union([from_str, from_none], obj.get("matchInstruction")) + instruction = from_str(obj.get("instruction")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - mismatch_instruction = from_union([from_str, from_none], obj.get("mismatchInstruction")) name = from_union([from_str, from_none], obj.get("name")) - record_max_tokens = from_union([from_float, from_none], obj.get("recordMaxTokens")) - reranker = from_union([from_str, from_none], obj.get("reranker")) - search_max_records = from_union([from_float, from_none], obj.get("searchMaxRecords")) - search_max_tokens = from_union([from_float, from_none], obj.get("searchMaxTokens")) - search_min_score = from_union([from_float, from_none], obj.get("searchMinScore")) - separators = from_union([from_str, from_none], obj.get("separators")) - store = from_str(obj.get("store")) + provider = from_union([from_str, from_none], obj.get("provider")) + schema = FluffySchema.from_dict(obj.get("schema")) + secret = from_union([from_str, from_none], obj.get("secret")) + setup = from_union([from_str, from_none], obj.get("setup")) + space = from_union([from_str, from_none], obj.get("space")) + tags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tags")) + template = from_union([from_str, from_none], obj.get("template")) updated_at = from_float(obj.get("updatedAt")) - visibility = from_union([HilariousVisibility, from_none], obj.get("visibility")) - return DatasetListResponseItem(alias, blueprint_id, created_at, description, id, match_instruction, meta, mismatch_instruction, name, record_max_tokens, reranker, search_max_records, search_max_tokens, search_min_score, separators, store, updated_at, visibility) + return PlatformAbilityListResponseItem(bot, commentary, created_at, description, file, icon, id, instruction, meta, name, provider, schema, secret, setup, space, tags, template, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot is not None: + result["bot"] = from_union([from_str, from_none], self.bot) + if self.commentary is not None: + result["commentary"] = from_union([from_str, from_none], self.commentary) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.file is not None: + result["file"] = from_union([from_str, from_none], self.file) + result["icon"] = from_str(self.icon) result["id"] = from_str(self.id) - if self.match_instruction is not None: - result["matchInstruction"] = from_union([from_str, from_none], self.match_instruction) + result["instruction"] = from_str(self.instruction) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.mismatch_instruction is not None: - result["mismatchInstruction"] = from_union([from_str, from_none], self.mismatch_instruction) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.record_max_tokens is not None: - result["recordMaxTokens"] = from_union([to_float, from_none], self.record_max_tokens) - if self.reranker is not None: - result["reranker"] = from_union([from_str, from_none], self.reranker) - if self.search_max_records is not None: - result["searchMaxRecords"] = from_union([to_float, from_none], self.search_max_records) - if self.search_max_tokens is not None: - result["searchMaxTokens"] = from_union([to_float, from_none], self.search_max_tokens) - if self.search_min_score is not None: - result["searchMinScore"] = from_union([to_float, from_none], self.search_min_score) - if self.separators is not None: - result["separators"] = from_union([from_str, from_none], self.separators) - result["store"] = from_str(self.store) + if self.provider is not None: + result["provider"] = from_union([from_str, from_none], self.provider) + result["schema"] = to_class(FluffySchema, self.schema) + if self.secret is not None: + result["secret"] = from_union([from_str, from_none], self.secret) + if self.setup is not None: + result["setup"] = from_union([from_str, from_none], self.setup) + if self.space is not None: + result["space"] = from_union([from_str, from_none], self.space) + if self.tags is not None: + result["tags"] = from_union([lambda x: from_list(from_str, x), from_none], self.tags) + if self.template is not None: + result["template"] = from_union([from_str, from_none], self.template) result["updatedAt"] = to_float(self.updated_at) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(HilariousVisibility, x), from_none], self.visibility) return result -class DatasetListResponse: +class PlatformAbilityListResponse: cursor: str """Cursor for fetching the next page""" - items: List[DatasetListResponseItem] + items: List[PlatformAbilityListResponseItem] - def __init__(self, cursor: str, items: List[DatasetListResponseItem]) -> None: + def __init__(self, cursor: str, items: List[PlatformAbilityListResponseItem]) -> None: self.cursor = cursor self.items = items @staticmethod - def from_dict(obj: Any) -> 'DatasetListResponse': + def from_dict(obj: Any) -> 'PlatformAbilityListResponse': assert isinstance(obj, dict) cursor = from_str(obj.get("cursor")) - items = from_list(DatasetListResponseItem.from_dict, obj.get("items")) - return DatasetListResponse(cursor, items) + items = from_list(PlatformAbilityListResponseItem.from_dict, obj.get("items")) + return PlatformAbilityListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(DatasetListResponseItem, x), self.items) + result["items"] = from_list(lambda x: to_class(PlatformAbilityListResponseItem, x), self.items) return result -class AmbitiousVisibility(Enum): - """The dataset visibility""" +class Type6(Enum): + """The schema type, must be "object\"""" - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" + OBJECT = "object" -class DatasetListStreamItemData: - """Blueprint properties""" +class DataSchema: + """A JSON Schema object type definition (https://json-schema.org/). Represents an object + schema with properties and validation rules. + """ + description: Optional[str] + """The schema description""" - alias: Optional[str] - """The unique alias for the instance""" + properties: Dict[str, Any] + """Object property definitions""" - blueprint_id: Optional[str] - """The ID of the blueprint""" + required: Optional[List[str]] + """Required property names""" + + title: Optional[str] + """The schema title""" + + type: Type6 + """The schema type, must be "object\"""" + + def __init__(self, description: Optional[str], properties: Dict[str, Any], required: Optional[List[str]], title: Optional[str], type: Type6) -> None: + self.description = description + self.properties = properties + self.required = required + self.title = title + self.type = type + + @staticmethod + def from_dict(obj: Any) -> 'DataSchema': + assert isinstance(obj, dict) + description = from_union([from_str, from_none], obj.get("description")) + properties = from_dict(lambda x: x, obj.get("properties")) + required = from_union([lambda x: from_list(from_str, x), from_none], obj.get("required")) + title = from_union([from_str, from_none], obj.get("title")) + type = Type6(obj.get("type")) + return DataSchema(description, properties, required, title, type) + + def to_dict(self) -> dict: + result: dict = {} + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + result["properties"] = from_dict(lambda x: x, self.properties) + if self.required is not None: + result["required"] = from_union([lambda x: from_list(from_str, x), from_none], self.required) + if self.title is not None: + result["title"] = from_union([from_str, from_none], self.title) + result["type"] = to_enum(Type6, self.type) + return result + + +class PlatformAbilityListStreamItemData: + """Instance list properties""" + + bot: Optional[str] + """The ID of the bot associated with the ability""" + commentary: Optional[str] created_at: float """The timestamp (ms) when the instance was created""" description: Optional[str] """The associated description""" + file: Optional[str] + """The ID of the file associated with the ability""" + + icon: str id: str """The instance ID""" - match_instruction: Optional[str] - """An instruction to include before found records""" - + instruction: str meta: Optional[Dict[str, Any]] """Meta data information""" - mismatch_instruction: Optional[str] - """An instruction to include if no records where found""" - name: Optional[str] """The associated name""" - record_max_tokens: Optional[float] - """The total number of tokens for each record""" - - reranker: Optional[str] - """The reranker class for the dataset""" - - search_max_records: Optional[float] - """The total number of records to return during search""" - - search_max_tokens: Optional[float] - """The total number of tokens to use during search""" + provider: Optional[str] + """The provider of the ability""" - search_min_score: Optional[float] - """The minimum score to filter search results by""" + schema: DataSchema + """A JSON Schema object type definition (https://json-schema.org/). Represents an object + schema with properties and validation rules. + """ + secret: Optional[str] + """The ID of the secret associated with the ability""" - separators: Optional[str] - """A list of separators to use when tokenizing text""" + setup: Optional[str] + space: Optional[str] + """The ID of the space associated with the ability""" - store: str - """The storage class for the dataset""" + tags: Optional[List[str]] + template: Optional[str] + """The original template identifier for the ability""" updated_at: float """The timestamp (ms) when the instance was updated""" - visibility: Optional[AmbitiousVisibility] - """The dataset visibility""" - - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, match_instruction: Optional[str], meta: Optional[Dict[str, Any]], mismatch_instruction: Optional[str], name: Optional[str], record_max_tokens: Optional[float], reranker: Optional[str], search_max_records: Optional[float], search_max_tokens: Optional[float], search_min_score: Optional[float], separators: Optional[str], store: str, updated_at: float, visibility: Optional[AmbitiousVisibility]) -> None: - self.alias = alias - self.blueprint_id = blueprint_id + def __init__(self, bot: Optional[str], commentary: Optional[str], created_at: float, description: Optional[str], file: Optional[str], icon: str, id: str, instruction: str, meta: Optional[Dict[str, Any]], name: Optional[str], provider: Optional[str], schema: DataSchema, secret: Optional[str], setup: Optional[str], space: Optional[str], tags: Optional[List[str]], template: Optional[str], updated_at: float) -> None: + self.bot = bot + self.commentary = commentary self.created_at = created_at self.description = description + self.file = file + self.icon = icon self.id = id - self.match_instruction = match_instruction + self.instruction = instruction self.meta = meta - self.mismatch_instruction = mismatch_instruction self.name = name - self.record_max_tokens = record_max_tokens - self.reranker = reranker - self.search_max_records = search_max_records - self.search_max_tokens = search_max_tokens - self.search_min_score = search_min_score - self.separators = separators - self.store = store + self.provider = provider + self.schema = schema + self.secret = secret + self.setup = setup + self.space = space + self.tags = tags + self.template = template self.updated_at = updated_at - self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'DatasetListStreamItemData': + def from_dict(obj: Any) -> 'PlatformAbilityListStreamItemData': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot = from_union([from_str, from_none], obj.get("bot")) + commentary = from_union([from_str, from_none], obj.get("commentary")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + file = from_union([from_str, from_none], obj.get("file")) + icon = from_str(obj.get("icon")) id = from_str(obj.get("id")) - match_instruction = from_union([from_str, from_none], obj.get("matchInstruction")) + instruction = from_str(obj.get("instruction")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - mismatch_instruction = from_union([from_str, from_none], obj.get("mismatchInstruction")) name = from_union([from_str, from_none], obj.get("name")) - record_max_tokens = from_union([from_float, from_none], obj.get("recordMaxTokens")) - reranker = from_union([from_str, from_none], obj.get("reranker")) - search_max_records = from_union([from_float, from_none], obj.get("searchMaxRecords")) - search_max_tokens = from_union([from_float, from_none], obj.get("searchMaxTokens")) - search_min_score = from_union([from_float, from_none], obj.get("searchMinScore")) - separators = from_union([from_str, from_none], obj.get("separators")) - store = from_str(obj.get("store")) + provider = from_union([from_str, from_none], obj.get("provider")) + schema = DataSchema.from_dict(obj.get("schema")) + secret = from_union([from_str, from_none], obj.get("secret")) + setup = from_union([from_str, from_none], obj.get("setup")) + space = from_union([from_str, from_none], obj.get("space")) + tags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tags")) + template = from_union([from_str, from_none], obj.get("template")) updated_at = from_float(obj.get("updatedAt")) - visibility = from_union([AmbitiousVisibility, from_none], obj.get("visibility")) - return DatasetListStreamItemData(alias, blueprint_id, created_at, description, id, match_instruction, meta, mismatch_instruction, name, record_max_tokens, reranker, search_max_records, search_max_tokens, search_min_score, separators, store, updated_at, visibility) + return PlatformAbilityListStreamItemData(bot, commentary, created_at, description, file, icon, id, instruction, meta, name, provider, schema, secret, setup, space, tags, template, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot is not None: + result["bot"] = from_union([from_str, from_none], self.bot) + if self.commentary is not None: + result["commentary"] = from_union([from_str, from_none], self.commentary) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.file is not None: + result["file"] = from_union([from_str, from_none], self.file) + result["icon"] = from_str(self.icon) result["id"] = from_str(self.id) - if self.match_instruction is not None: - result["matchInstruction"] = from_union([from_str, from_none], self.match_instruction) + result["instruction"] = from_str(self.instruction) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.mismatch_instruction is not None: - result["mismatchInstruction"] = from_union([from_str, from_none], self.mismatch_instruction) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.record_max_tokens is not None: - result["recordMaxTokens"] = from_union([to_float, from_none], self.record_max_tokens) - if self.reranker is not None: - result["reranker"] = from_union([from_str, from_none], self.reranker) - if self.search_max_records is not None: - result["searchMaxRecords"] = from_union([to_float, from_none], self.search_max_records) - if self.search_max_tokens is not None: - result["searchMaxTokens"] = from_union([to_float, from_none], self.search_max_tokens) - if self.search_min_score is not None: - result["searchMinScore"] = from_union([to_float, from_none], self.search_min_score) - if self.separators is not None: - result["separators"] = from_union([from_str, from_none], self.separators) - result["store"] = from_str(self.store) + if self.provider is not None: + result["provider"] = from_union([from_str, from_none], self.provider) + result["schema"] = to_class(DataSchema, self.schema) + if self.secret is not None: + result["secret"] = from_union([from_str, from_none], self.secret) + if self.setup is not None: + result["setup"] = from_union([from_str, from_none], self.setup) + if self.space is not None: + result["space"] = from_union([from_str, from_none], self.space) + if self.tags is not None: + result["tags"] = from_union([lambda x: from_list(from_str, x), from_none], self.tags) + if self.template is not None: + result["template"] = from_union([from_str, from_none], self.template) result["updatedAt"] = to_float(self.updated_at) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(AmbitiousVisibility, x), from_none], self.visibility) return result -class DatasetListStreamItemType(Enum): +class PlatformAbilityListStreamItemType(Enum): """The type of event""" ITEM = "item" -class DatasetListStreamItem: - data: DatasetListStreamItemData - """Blueprint properties""" +class PlatformAbilityListStreamItem: + data: PlatformAbilityListStreamItemData + """Instance list properties""" - type: DatasetListStreamItemType + type: PlatformAbilityListStreamItemType """The type of event""" - def __init__(self, data: DatasetListStreamItemData, type: DatasetListStreamItemType) -> None: + def __init__(self, data: PlatformAbilityListStreamItemData, type: PlatformAbilityListStreamItemType) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'DatasetListStreamItem': + def from_dict(obj: Any) -> 'PlatformAbilityListStreamItem': assert isinstance(obj, dict) - data = DatasetListStreamItemData.from_dict(obj.get("data")) - type = DatasetListStreamItemType(obj.get("type")) - return DatasetListStreamItem(data, type) + data = PlatformAbilityListStreamItemData.from_dict(obj.get("data")) + type = PlatformAbilityListStreamItemType(obj.get("type")) + return PlatformAbilityListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(DatasetListStreamItemData, self.data) - result["type"] = to_enum(DatasetListStreamItemType, self.type) + result["data"] = to_class(PlatformAbilityListStreamItemData, self.data) + result["type"] = to_enum(PlatformAbilityListStreamItemType, self.type) return result -class EventLogsExportParamsOrder(Enum): +class MemorySearchRequest: + bot_id: Optional[str] + """The ID of the bot to filter memories by""" + + contact_id: Optional[str] + """The ID of the contact to filter memories by""" + + search: str + """The keyword/phrase to search for""" + + def __init__(self, bot_id: Optional[str], contact_id: Optional[str], search: str) -> None: + self.bot_id = bot_id + self.contact_id = contact_id + self.search = search + + @staticmethod + def from_dict(obj: Any) -> 'MemorySearchRequest': + assert isinstance(obj, dict) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) + search = from_str(obj.get("search")) + return MemorySearchRequest(bot_id, contact_id, search) + + def to_dict(self) -> dict: + result: dict = {} + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) + result["search"] = from_str(self.search) + return result + + +class MemorySearchResponseItem: + id: str + meta: Optional[Dict[str, Any]] + text: str + + def __init__(self, id: str, meta: Optional[Dict[str, Any]], text: str) -> None: + self.id = id + self.meta = meta + self.text = text + + @staticmethod + def from_dict(obj: Any) -> 'MemorySearchResponseItem': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + text = from_str(obj.get("text")) + return MemorySearchResponseItem(id, meta, text) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + result["text"] = from_str(self.text) + return result + + +class MemorySearchResponse: + items: List[MemorySearchResponseItem] + """An array of memories matching the search query""" + + def __init__(self, items: List[MemorySearchResponseItem]) -> None: + self.items = items + + @staticmethod + def from_dict(obj: Any) -> 'MemorySearchResponse': + assert isinstance(obj, dict) + items = from_list(MemorySearchResponseItem.from_dict, obj.get("items")) + return MemorySearchResponse(items) + + def to_dict(self) -> dict: + result: dict = {} + result["items"] = from_list(lambda x: to_class(MemorySearchResponseItem, x), self.items) + return result + + +class MemoryListParamsOrder(Enum): """The order of the paginated items""" ASC = "asc" DESC = "desc" -class EventLogsExportParams: +class MemoryListParams: cursor: Optional[str] """The cursor to use for pagination""" meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" + """Key-value pairs to filter the items by metadata""" - order: Optional[EventLogsExportParamsOrder] + order: Optional[MemoryListParamsOrder] """The order of the paginated items""" take: Optional[int] """The number of items to retrieve""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[EventLogsExportParamsOrder], take: Optional[int]) -> None: + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[MemoryListParamsOrder], take: Optional[int]) -> None: self.cursor = cursor self.meta = meta self.order = order self.take = take @staticmethod - def from_dict(obj: Any) -> 'EventLogsExportParams': + def from_dict(obj: Any) -> 'MemoryListParams': assert isinstance(obj, dict) cursor = from_union([from_str, from_none], obj.get("cursor")) meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([EventLogsExportParamsOrder, from_none], obj.get("order")) + order = from_union([MemoryListParamsOrder, from_none], obj.get("order")) take = from_union([from_int, from_none], obj.get("take")) - return EventLogsExportParams(cursor, meta, order, take) + return MemoryListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} @@ -16781,1573 +14743,799 @@ def to_dict(self) -> dict: if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(EventLogsExportParamsOrder, x), from_none], self.order) + result["order"] = from_union([lambda x: to_enum(MemoryListParamsOrder, x), from_none], self.order) if self.take is not None: result["take"] = from_union([from_int, from_none], self.take) return result -class EventLogsExportResponseItem: - """Instance list properties""" - - ability_id: Optional[str] - """Related ability ID if applicable""" - - blueprint_id: Optional[str] - """Related blueprint ID if applicable""" - - bot_id: Optional[str] - """Related bot ID if applicable""" - - contact_id: Optional[str] - """Related contact ID if applicable""" - - conversation_id: Optional[str] - """Related conversation ID if applicable""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - dataset_id: Optional[str] - """Related dataset ID if applicable""" - - description: Optional[str] - """The associated description""" - - discord_integration_id: Optional[str] - """Related Discord integration ID if applicable""" - - email_integration_id: Optional[str] - """Related email integration ID if applicable""" - - extract_integration_id: Optional[str] - """Related extract integration ID if applicable""" - - file_id: Optional[str] - """Related file ID if applicable""" - - googlechat_integration_id: Optional[str] - """Related Google Chat integration ID if applicable""" - - id: str - """The instance ID""" - - mcpserver_integration_id: Optional[str] - """Related MCP server integration ID if applicable""" - - messenger_integration_id: Optional[str] - """Related Messenger integration ID if applicable""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - microsoftteams_integration_id: Optional[str] - """Related Microsoft Teams integration ID if applicable""" - - name: Optional[str] - """The associated name""" - - notion_integration_id: Optional[str] - """Related Notion integration ID if applicable""" - - portal_id: Optional[str] - """Related portal ID if applicable""" - - record_id: Optional[str] - """Related record ID if applicable""" - - secret_id: Optional[str] - """Related secret ID if applicable""" - - sitemap_integration_id: Optional[str] - """Related sitemap integration ID if applicable""" - - skillset_id: Optional[str] - """Related skillset ID if applicable""" - - slack_integration_id: Optional[str] - """Related Slack integration ID if applicable""" +class MemoryListResponseItem: + """Instance list properties""" - support_integration_id: Optional[str] - """Related support integration ID if applicable""" + bot_id: Optional[str] + """The bot associated with the memory""" - task_id: Optional[str] - """Related task ID if applicable""" + contact_id: Optional[str] + """The contact associated with the memory""" - telegram_integration_id: Optional[str] - """Related Telegram integration ID if applicable""" + created_at: float + """The timestamp (ms) when the instance was created""" - trigger_integration_id: Optional[str] - """Related trigger integration ID if applicable""" + description: Optional[str] + """The associated description""" - twilio_integration_id: Optional[str] - """Related Twilio integration ID if applicable""" + expires_at: Optional[float] + """The timestamp (ms) at which the memory expires and is automatically deleted""" - type: str - """The type of event (e.g., 'conversation.create')""" + id: str + """The instance ID""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + meta: Optional[Dict[str, Any]] + """Meta data information""" - webhook_id: Optional[str] - """Related webhook ID if applicable""" + name: Optional[str] + """The associated name""" - whatsapp_integration_id: Optional[str] - """Related WhatsApp integration ID if applicable""" + text: Optional[str] + """The text of the memory""" - widget_integration_id: Optional[str] - """Related widget integration ID if applicable""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - def __init__(self, ability_id: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_id: Optional[str], conversation_id: Optional[str], created_at: float, dataset_id: Optional[str], description: Optional[str], discord_integration_id: Optional[str], email_integration_id: Optional[str], extract_integration_id: Optional[str], file_id: Optional[str], googlechat_integration_id: Optional[str], id: str, mcpserver_integration_id: Optional[str], messenger_integration_id: Optional[str], meta: Optional[Dict[str, Any]], microsoftteams_integration_id: Optional[str], name: Optional[str], notion_integration_id: Optional[str], portal_id: Optional[str], record_id: Optional[str], secret_id: Optional[str], sitemap_integration_id: Optional[str], skillset_id: Optional[str], slack_integration_id: Optional[str], support_integration_id: Optional[str], task_id: Optional[str], telegram_integration_id: Optional[str], trigger_integration_id: Optional[str], twilio_integration_id: Optional[str], type: str, updated_at: float, webhook_id: Optional[str], whatsapp_integration_id: Optional[str], widget_integration_id: Optional[str]) -> None: - self.ability_id = ability_id - self.blueprint_id = blueprint_id + def __init__(self, bot_id: Optional[str], contact_id: Optional[str], created_at: float, description: Optional[str], expires_at: Optional[float], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], text: Optional[str], updated_at: float) -> None: self.bot_id = bot_id self.contact_id = contact_id - self.conversation_id = conversation_id self.created_at = created_at - self.dataset_id = dataset_id self.description = description - self.discord_integration_id = discord_integration_id - self.email_integration_id = email_integration_id - self.extract_integration_id = extract_integration_id - self.file_id = file_id - self.googlechat_integration_id = googlechat_integration_id + self.expires_at = expires_at self.id = id - self.mcpserver_integration_id = mcpserver_integration_id - self.messenger_integration_id = messenger_integration_id self.meta = meta - self.microsoftteams_integration_id = microsoftteams_integration_id self.name = name - self.notion_integration_id = notion_integration_id - self.portal_id = portal_id - self.record_id = record_id - self.secret_id = secret_id - self.sitemap_integration_id = sitemap_integration_id - self.skillset_id = skillset_id - self.slack_integration_id = slack_integration_id - self.support_integration_id = support_integration_id - self.task_id = task_id - self.telegram_integration_id = telegram_integration_id - self.trigger_integration_id = trigger_integration_id - self.twilio_integration_id = twilio_integration_id - self.type = type + self.text = text self.updated_at = updated_at - self.webhook_id = webhook_id - self.whatsapp_integration_id = whatsapp_integration_id - self.widget_integration_id = widget_integration_id @staticmethod - def from_dict(obj: Any) -> 'EventLogsExportResponseItem': + def from_dict(obj: Any) -> 'MemoryListResponseItem': assert isinstance(obj, dict) - ability_id = from_union([from_str, from_none], obj.get("abilityId")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) contact_id = from_union([from_str, from_none], obj.get("contactId")) - conversation_id = from_union([from_str, from_none], obj.get("conversationId")) created_at = from_float(obj.get("createdAt")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) description = from_union([from_str, from_none], obj.get("description")) - discord_integration_id = from_union([from_str, from_none], obj.get("discordIntegrationId")) - email_integration_id = from_union([from_str, from_none], obj.get("emailIntegrationId")) - extract_integration_id = from_union([from_str, from_none], obj.get("extractIntegrationId")) - file_id = from_union([from_str, from_none], obj.get("fileId")) - googlechat_integration_id = from_union([from_str, from_none], obj.get("googlechatIntegrationId")) + expires_at = from_union([from_float, from_none], obj.get("expiresAt")) id = from_str(obj.get("id")) - mcpserver_integration_id = from_union([from_str, from_none], obj.get("mcpserverIntegrationId")) - messenger_integration_id = from_union([from_str, from_none], obj.get("messengerIntegrationId")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - microsoftteams_integration_id = from_union([from_str, from_none], obj.get("microsoftteamsIntegrationId")) name = from_union([from_str, from_none], obj.get("name")) - notion_integration_id = from_union([from_str, from_none], obj.get("notionIntegrationId")) - portal_id = from_union([from_str, from_none], obj.get("portalId")) - record_id = from_union([from_str, from_none], obj.get("recordId")) - secret_id = from_union([from_str, from_none], obj.get("secretId")) - sitemap_integration_id = from_union([from_str, from_none], obj.get("sitemapIntegrationId")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) - slack_integration_id = from_union([from_str, from_none], obj.get("slackIntegrationId")) - support_integration_id = from_union([from_str, from_none], obj.get("supportIntegrationId")) - task_id = from_union([from_str, from_none], obj.get("taskId")) - telegram_integration_id = from_union([from_str, from_none], obj.get("telegramIntegrationId")) - trigger_integration_id = from_union([from_str, from_none], obj.get("triggerIntegrationId")) - twilio_integration_id = from_union([from_str, from_none], obj.get("twilioIntegrationId")) - type = from_str(obj.get("type")) + text = from_union([from_str, from_none], obj.get("text")) updated_at = from_float(obj.get("updatedAt")) - webhook_id = from_union([from_str, from_none], obj.get("webhookId")) - whatsapp_integration_id = from_union([from_str, from_none], obj.get("whatsappIntegrationId")) - widget_integration_id = from_union([from_str, from_none], obj.get("widgetIntegrationId")) - return EventLogsExportResponseItem(ability_id, blueprint_id, bot_id, contact_id, conversation_id, created_at, dataset_id, description, discord_integration_id, email_integration_id, extract_integration_id, file_id, googlechat_integration_id, id, mcpserver_integration_id, messenger_integration_id, meta, microsoftteams_integration_id, name, notion_integration_id, portal_id, record_id, secret_id, sitemap_integration_id, skillset_id, slack_integration_id, support_integration_id, task_id, telegram_integration_id, trigger_integration_id, twilio_integration_id, type, updated_at, webhook_id, whatsapp_integration_id, widget_integration_id) + return MemoryListResponseItem(bot_id, contact_id, created_at, description, expires_at, id, meta, name, text, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.ability_id is not None: - result["abilityId"] = from_union([from_str, from_none], self.ability_id) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) if self.contact_id is not None: result["contactId"] = from_union([from_str, from_none], self.contact_id) - if self.conversation_id is not None: - result["conversationId"] = from_union([from_str, from_none], self.conversation_id) result["createdAt"] = to_float(self.created_at) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.discord_integration_id is not None: - result["discordIntegrationId"] = from_union([from_str, from_none], self.discord_integration_id) - if self.email_integration_id is not None: - result["emailIntegrationId"] = from_union([from_str, from_none], self.email_integration_id) - if self.extract_integration_id is not None: - result["extractIntegrationId"] = from_union([from_str, from_none], self.extract_integration_id) - if self.file_id is not None: - result["fileId"] = from_union([from_str, from_none], self.file_id) - if self.googlechat_integration_id is not None: - result["googlechatIntegrationId"] = from_union([from_str, from_none], self.googlechat_integration_id) + if self.expires_at is not None: + result["expiresAt"] = from_union([to_float, from_none], self.expires_at) result["id"] = from_str(self.id) - if self.mcpserver_integration_id is not None: - result["mcpserverIntegrationId"] = from_union([from_str, from_none], self.mcpserver_integration_id) - if self.messenger_integration_id is not None: - result["messengerIntegrationId"] = from_union([from_str, from_none], self.messenger_integration_id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.microsoftteams_integration_id is not None: - result["microsoftteamsIntegrationId"] = from_union([from_str, from_none], self.microsoftteams_integration_id) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.notion_integration_id is not None: - result["notionIntegrationId"] = from_union([from_str, from_none], self.notion_integration_id) - if self.portal_id is not None: - result["portalId"] = from_union([from_str, from_none], self.portal_id) - if self.record_id is not None: - result["recordId"] = from_union([from_str, from_none], self.record_id) - if self.secret_id is not None: - result["secretId"] = from_union([from_str, from_none], self.secret_id) - if self.sitemap_integration_id is not None: - result["sitemapIntegrationId"] = from_union([from_str, from_none], self.sitemap_integration_id) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) - if self.slack_integration_id is not None: - result["slackIntegrationId"] = from_union([from_str, from_none], self.slack_integration_id) - if self.support_integration_id is not None: - result["supportIntegrationId"] = from_union([from_str, from_none], self.support_integration_id) - if self.task_id is not None: - result["taskId"] = from_union([from_str, from_none], self.task_id) - if self.telegram_integration_id is not None: - result["telegramIntegrationId"] = from_union([from_str, from_none], self.telegram_integration_id) - if self.trigger_integration_id is not None: - result["triggerIntegrationId"] = from_union([from_str, from_none], self.trigger_integration_id) - if self.twilio_integration_id is not None: - result["twilioIntegrationId"] = from_union([from_str, from_none], self.twilio_integration_id) - result["type"] = from_str(self.type) + if self.text is not None: + result["text"] = from_union([from_str, from_none], self.text) result["updatedAt"] = to_float(self.updated_at) - if self.webhook_id is not None: - result["webhookId"] = from_union([from_str, from_none], self.webhook_id) - if self.whatsapp_integration_id is not None: - result["whatsappIntegrationId"] = from_union([from_str, from_none], self.whatsapp_integration_id) - if self.widget_integration_id is not None: - result["widgetIntegrationId"] = from_union([from_str, from_none], self.widget_integration_id) return result -class EventLogsExportResponse: +class MemoryListResponse: cursor: str """Cursor for fetching the next page""" - items: List[EventLogsExportResponseItem] + items: List[MemoryListResponseItem] - def __init__(self, cursor: str, items: List[EventLogsExportResponseItem]) -> None: + def __init__(self, cursor: str, items: List[MemoryListResponseItem]) -> None: self.cursor = cursor self.items = items @staticmethod - def from_dict(obj: Any) -> 'EventLogsExportResponse': + def from_dict(obj: Any) -> 'MemoryListResponse': assert isinstance(obj, dict) cursor = from_str(obj.get("cursor")) - items = from_list(EventLogsExportResponseItem.from_dict, obj.get("items")) - return EventLogsExportResponse(cursor, items) + items = from_list(MemoryListResponseItem.from_dict, obj.get("items")) + return MemoryListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(EventLogsExportResponseItem, x), self.items) + result["items"] = from_list(lambda x: to_class(MemoryListResponseItem, x), self.items) return result -class EventLogsExportStreamItemData: +class MemoryListStreamItemData: """Instance list properties""" - ability_id: Optional[str] - """Related ability ID if applicable""" - - blueprint_id: Optional[str] - """Related blueprint ID if applicable""" - bot_id: Optional[str] - """Related bot ID if applicable""" + """The bot associated with the memory""" contact_id: Optional[str] - """Related contact ID if applicable""" - - conversation_id: Optional[str] - """Related conversation ID if applicable""" + """The contact associated with the memory""" created_at: float """The timestamp (ms) when the instance was created""" - dataset_id: Optional[str] - """Related dataset ID if applicable""" - description: Optional[str] """The associated description""" - discord_integration_id: Optional[str] - """Related Discord integration ID if applicable""" - - email_integration_id: Optional[str] - """Related email integration ID if applicable""" - - extract_integration_id: Optional[str] - """Related extract integration ID if applicable""" - - file_id: Optional[str] - """Related file ID if applicable""" - - googlechat_integration_id: Optional[str] - """Related Google Chat integration ID if applicable""" + expires_at: Optional[float] + """The timestamp (ms) at which the memory expires and is automatically deleted""" id: str """The instance ID""" - mcpserver_integration_id: Optional[str] - """Related MCP server integration ID if applicable""" - - messenger_integration_id: Optional[str] - """Related Messenger integration ID if applicable""" - meta: Optional[Dict[str, Any]] """Meta data information""" - microsoftteams_integration_id: Optional[str] - """Related Microsoft Teams integration ID if applicable""" - name: Optional[str] """The associated name""" - notion_integration_id: Optional[str] - """Related Notion integration ID if applicable""" - - portal_id: Optional[str] - """Related portal ID if applicable""" - - record_id: Optional[str] - """Related record ID if applicable""" - - secret_id: Optional[str] - """Related secret ID if applicable""" - - sitemap_integration_id: Optional[str] - """Related sitemap integration ID if applicable""" - - skillset_id: Optional[str] - """Related skillset ID if applicable""" - - slack_integration_id: Optional[str] - """Related Slack integration ID if applicable""" - - support_integration_id: Optional[str] - """Related support integration ID if applicable""" - - task_id: Optional[str] - """Related task ID if applicable""" - - telegram_integration_id: Optional[str] - """Related Telegram integration ID if applicable""" - - trigger_integration_id: Optional[str] - """Related trigger integration ID if applicable""" - - twilio_integration_id: Optional[str] - """Related Twilio integration ID if applicable""" - - type: str - """The type of event (e.g., 'conversation.create')""" + text: Optional[str] + """The text of the memory""" updated_at: float """The timestamp (ms) when the instance was updated""" - webhook_id: Optional[str] - """Related webhook ID if applicable""" - - whatsapp_integration_id: Optional[str] - """Related WhatsApp integration ID if applicable""" - - widget_integration_id: Optional[str] - """Related widget integration ID if applicable""" - - def __init__(self, ability_id: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_id: Optional[str], conversation_id: Optional[str], created_at: float, dataset_id: Optional[str], description: Optional[str], discord_integration_id: Optional[str], email_integration_id: Optional[str], extract_integration_id: Optional[str], file_id: Optional[str], googlechat_integration_id: Optional[str], id: str, mcpserver_integration_id: Optional[str], messenger_integration_id: Optional[str], meta: Optional[Dict[str, Any]], microsoftteams_integration_id: Optional[str], name: Optional[str], notion_integration_id: Optional[str], portal_id: Optional[str], record_id: Optional[str], secret_id: Optional[str], sitemap_integration_id: Optional[str], skillset_id: Optional[str], slack_integration_id: Optional[str], support_integration_id: Optional[str], task_id: Optional[str], telegram_integration_id: Optional[str], trigger_integration_id: Optional[str], twilio_integration_id: Optional[str], type: str, updated_at: float, webhook_id: Optional[str], whatsapp_integration_id: Optional[str], widget_integration_id: Optional[str]) -> None: - self.ability_id = ability_id - self.blueprint_id = blueprint_id + def __init__(self, bot_id: Optional[str], contact_id: Optional[str], created_at: float, description: Optional[str], expires_at: Optional[float], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], text: Optional[str], updated_at: float) -> None: self.bot_id = bot_id self.contact_id = contact_id - self.conversation_id = conversation_id self.created_at = created_at - self.dataset_id = dataset_id self.description = description - self.discord_integration_id = discord_integration_id - self.email_integration_id = email_integration_id - self.extract_integration_id = extract_integration_id - self.file_id = file_id - self.googlechat_integration_id = googlechat_integration_id + self.expires_at = expires_at self.id = id - self.mcpserver_integration_id = mcpserver_integration_id - self.messenger_integration_id = messenger_integration_id self.meta = meta - self.microsoftteams_integration_id = microsoftteams_integration_id self.name = name - self.notion_integration_id = notion_integration_id - self.portal_id = portal_id - self.record_id = record_id - self.secret_id = secret_id - self.sitemap_integration_id = sitemap_integration_id - self.skillset_id = skillset_id - self.slack_integration_id = slack_integration_id - self.support_integration_id = support_integration_id - self.task_id = task_id - self.telegram_integration_id = telegram_integration_id - self.trigger_integration_id = trigger_integration_id - self.twilio_integration_id = twilio_integration_id - self.type = type + self.text = text self.updated_at = updated_at - self.webhook_id = webhook_id - self.whatsapp_integration_id = whatsapp_integration_id - self.widget_integration_id = widget_integration_id @staticmethod - def from_dict(obj: Any) -> 'EventLogsExportStreamItemData': + def from_dict(obj: Any) -> 'MemoryListStreamItemData': assert isinstance(obj, dict) - ability_id = from_union([from_str, from_none], obj.get("abilityId")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) contact_id = from_union([from_str, from_none], obj.get("contactId")) - conversation_id = from_union([from_str, from_none], obj.get("conversationId")) created_at = from_float(obj.get("createdAt")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) description = from_union([from_str, from_none], obj.get("description")) - discord_integration_id = from_union([from_str, from_none], obj.get("discordIntegrationId")) - email_integration_id = from_union([from_str, from_none], obj.get("emailIntegrationId")) - extract_integration_id = from_union([from_str, from_none], obj.get("extractIntegrationId")) - file_id = from_union([from_str, from_none], obj.get("fileId")) - googlechat_integration_id = from_union([from_str, from_none], obj.get("googlechatIntegrationId")) + expires_at = from_union([from_float, from_none], obj.get("expiresAt")) id = from_str(obj.get("id")) - mcpserver_integration_id = from_union([from_str, from_none], obj.get("mcpserverIntegrationId")) - messenger_integration_id = from_union([from_str, from_none], obj.get("messengerIntegrationId")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - microsoftteams_integration_id = from_union([from_str, from_none], obj.get("microsoftteamsIntegrationId")) name = from_union([from_str, from_none], obj.get("name")) - notion_integration_id = from_union([from_str, from_none], obj.get("notionIntegrationId")) - portal_id = from_union([from_str, from_none], obj.get("portalId")) - record_id = from_union([from_str, from_none], obj.get("recordId")) - secret_id = from_union([from_str, from_none], obj.get("secretId")) - sitemap_integration_id = from_union([from_str, from_none], obj.get("sitemapIntegrationId")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) - slack_integration_id = from_union([from_str, from_none], obj.get("slackIntegrationId")) - support_integration_id = from_union([from_str, from_none], obj.get("supportIntegrationId")) - task_id = from_union([from_str, from_none], obj.get("taskId")) - telegram_integration_id = from_union([from_str, from_none], obj.get("telegramIntegrationId")) - trigger_integration_id = from_union([from_str, from_none], obj.get("triggerIntegrationId")) - twilio_integration_id = from_union([from_str, from_none], obj.get("twilioIntegrationId")) - type = from_str(obj.get("type")) + text = from_union([from_str, from_none], obj.get("text")) updated_at = from_float(obj.get("updatedAt")) - webhook_id = from_union([from_str, from_none], obj.get("webhookId")) - whatsapp_integration_id = from_union([from_str, from_none], obj.get("whatsappIntegrationId")) - widget_integration_id = from_union([from_str, from_none], obj.get("widgetIntegrationId")) - return EventLogsExportStreamItemData(ability_id, blueprint_id, bot_id, contact_id, conversation_id, created_at, dataset_id, description, discord_integration_id, email_integration_id, extract_integration_id, file_id, googlechat_integration_id, id, mcpserver_integration_id, messenger_integration_id, meta, microsoftteams_integration_id, name, notion_integration_id, portal_id, record_id, secret_id, sitemap_integration_id, skillset_id, slack_integration_id, support_integration_id, task_id, telegram_integration_id, trigger_integration_id, twilio_integration_id, type, updated_at, webhook_id, whatsapp_integration_id, widget_integration_id) + return MemoryListStreamItemData(bot_id, contact_id, created_at, description, expires_at, id, meta, name, text, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.ability_id is not None: - result["abilityId"] = from_union([from_str, from_none], self.ability_id) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) if self.contact_id is not None: result["contactId"] = from_union([from_str, from_none], self.contact_id) - if self.conversation_id is not None: - result["conversationId"] = from_union([from_str, from_none], self.conversation_id) result["createdAt"] = to_float(self.created_at) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.discord_integration_id is not None: - result["discordIntegrationId"] = from_union([from_str, from_none], self.discord_integration_id) - if self.email_integration_id is not None: - result["emailIntegrationId"] = from_union([from_str, from_none], self.email_integration_id) - if self.extract_integration_id is not None: - result["extractIntegrationId"] = from_union([from_str, from_none], self.extract_integration_id) - if self.file_id is not None: - result["fileId"] = from_union([from_str, from_none], self.file_id) - if self.googlechat_integration_id is not None: - result["googlechatIntegrationId"] = from_union([from_str, from_none], self.googlechat_integration_id) + if self.expires_at is not None: + result["expiresAt"] = from_union([to_float, from_none], self.expires_at) result["id"] = from_str(self.id) - if self.mcpserver_integration_id is not None: - result["mcpserverIntegrationId"] = from_union([from_str, from_none], self.mcpserver_integration_id) - if self.messenger_integration_id is not None: - result["messengerIntegrationId"] = from_union([from_str, from_none], self.messenger_integration_id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.microsoftteams_integration_id is not None: - result["microsoftteamsIntegrationId"] = from_union([from_str, from_none], self.microsoftteams_integration_id) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.notion_integration_id is not None: - result["notionIntegrationId"] = from_union([from_str, from_none], self.notion_integration_id) - if self.portal_id is not None: - result["portalId"] = from_union([from_str, from_none], self.portal_id) - if self.record_id is not None: - result["recordId"] = from_union([from_str, from_none], self.record_id) - if self.secret_id is not None: - result["secretId"] = from_union([from_str, from_none], self.secret_id) - if self.sitemap_integration_id is not None: - result["sitemapIntegrationId"] = from_union([from_str, from_none], self.sitemap_integration_id) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) - if self.slack_integration_id is not None: - result["slackIntegrationId"] = from_union([from_str, from_none], self.slack_integration_id) - if self.support_integration_id is not None: - result["supportIntegrationId"] = from_union([from_str, from_none], self.support_integration_id) - if self.task_id is not None: - result["taskId"] = from_union([from_str, from_none], self.task_id) - if self.telegram_integration_id is not None: - result["telegramIntegrationId"] = from_union([from_str, from_none], self.telegram_integration_id) - if self.trigger_integration_id is not None: - result["triggerIntegrationId"] = from_union([from_str, from_none], self.trigger_integration_id) - if self.twilio_integration_id is not None: - result["twilioIntegrationId"] = from_union([from_str, from_none], self.twilio_integration_id) - result["type"] = from_str(self.type) + if self.text is not None: + result["text"] = from_union([from_str, from_none], self.text) result["updatedAt"] = to_float(self.updated_at) - if self.webhook_id is not None: - result["webhookId"] = from_union([from_str, from_none], self.webhook_id) - if self.whatsapp_integration_id is not None: - result["whatsappIntegrationId"] = from_union([from_str, from_none], self.whatsapp_integration_id) - if self.widget_integration_id is not None: - result["widgetIntegrationId"] = from_union([from_str, from_none], self.widget_integration_id) return result -class EventLogsExportStreamItemType(Enum): +class MemoryListStreamItemType(Enum): """The type of event""" ITEM = "item" -class EventLogsExportStreamItem: - data: EventLogsExportStreamItemData +class MemoryListStreamItem: + data: MemoryListStreamItemData """Instance list properties""" - type: EventLogsExportStreamItemType + type: MemoryListStreamItemType """The type of event""" - def __init__(self, data: EventLogsExportStreamItemData, type: EventLogsExportStreamItemType) -> None: + def __init__(self, data: MemoryListStreamItemData, type: MemoryListStreamItemType) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'EventLogsExportStreamItem': + def from_dict(obj: Any) -> 'MemoryListStreamItem': assert isinstance(obj, dict) - data = EventLogsExportStreamItemData.from_dict(obj.get("data")) - type = EventLogsExportStreamItemType(obj.get("type")) - return EventLogsExportStreamItem(data, type) + data = MemoryListStreamItemData.from_dict(obj.get("data")) + type = MemoryListStreamItemType(obj.get("type")) + return MemoryListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(EventLogsExportStreamItemData, self.data) - result["type"] = to_enum(EventLogsExportStreamItemType, self.type) + result["data"] = to_class(MemoryListStreamItemData, self.data) + result["type"] = to_enum(MemoryListStreamItemType, self.type) return result -class EventLogListParamsOrder(Enum): +class MemoriesExportParamsOrder(Enum): """The order of the paginated items""" ASC = "asc" DESC = "desc" -class EventLogListParams: - cursor: Optional[str] - """The cursor to use for pagination""" +class MemoriesExportParams: + cursor: Optional[str] + """The cursor to use for pagination""" + + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" + + order: Optional[MemoriesExportParamsOrder] + """The order of the paginated items""" + + take: Optional[int] + """The number of items to retrieve""" + + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[MemoriesExportParamsOrder], take: Optional[int]) -> None: + self.cursor = cursor + self.meta = meta + self.order = order + self.take = take + + @staticmethod + def from_dict(obj: Any) -> 'MemoriesExportParams': + assert isinstance(obj, dict) + cursor = from_union([from_str, from_none], obj.get("cursor")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([MemoriesExportParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return MemoriesExportParams(cursor, meta, order, take) + + def to_dict(self) -> dict: + result: dict = {} + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(MemoriesExportParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) + return result + + +class MemoriesExportResponseItem: + """Instance list properties""" + + bot_id: Optional[str] + """The bot associated with the memory""" + + contact_id: Optional[str] + """The contact associated with the memory""" + + created_at: float + """The timestamp (ms) when the instance was created""" + + description: Optional[str] + """The associated description""" + + id: str + """The instance ID""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" + + name: Optional[str] + """The associated name""" + + text: Optional[str] + """The text of the memory""" + + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, bot_id: Optional[str], contact_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], text: Optional[str], updated_at: float) -> None: + self.bot_id = bot_id + self.contact_id = contact_id + self.created_at = created_at + self.description = description + self.id = id + self.meta = meta + self.name = name + self.text = text + self.updated_at = updated_at + + @staticmethod + def from_dict(obj: Any) -> 'MemoriesExportResponseItem': + assert isinstance(obj, dict) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) + created_at = from_float(obj.get("createdAt")) + description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + text = from_union([from_str, from_none], obj.get("text")) + updated_at = from_float(obj.get("updatedAt")) + return MemoriesExportResponseItem(bot_id, contact_id, created_at, description, id, meta, name, text, updated_at) + + def to_dict(self) -> dict: + result: dict = {} + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) + result["createdAt"] = to_float(self.created_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.text is not None: + result["text"] = from_union([from_str, from_none], self.text) + result["updatedAt"] = to_float(self.updated_at) + return result - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" - order: Optional[EventLogListParamsOrder] - """The order of the paginated items""" +class MemoriesExportResponse: + cursor: str + """Cursor for fetching the next page""" - take: Optional[int] - """The number of items to retrieve""" + items: List[MemoriesExportResponseItem] - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[EventLogListParamsOrder], take: Optional[int]) -> None: + def __init__(self, cursor: str, items: List[MemoriesExportResponseItem]) -> None: self.cursor = cursor - self.meta = meta - self.order = order - self.take = take + self.items = items @staticmethod - def from_dict(obj: Any) -> 'EventLogListParams': + def from_dict(obj: Any) -> 'MemoriesExportResponse': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([EventLogListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return EventLogListParams(cursor, meta, order, take) + cursor = from_str(obj.get("cursor")) + items = from_list(MemoriesExportResponseItem.from_dict, obj.get("items")) + return MemoriesExportResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(EventLogListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(MemoriesExportResponseItem, x), self.items) return result -class EventLogListResponseItem: +class MemoriesExportStreamItemData: """Instance list properties""" - ability_id: Optional[str] - """Related ability ID if applicable""" - - blueprint_id: Optional[str] - """Related blueprint ID if applicable""" - bot_id: Optional[str] - """Related bot ID if applicable""" + """The bot associated with the memory""" contact_id: Optional[str] - """Related contact ID if applicable""" - - conversation_id: Optional[str] - """Related conversation ID if applicable""" + """The contact associated with the memory""" created_at: float """The timestamp (ms) when the instance was created""" - dataset_id: Optional[str] - """Related dataset ID if applicable""" - description: Optional[str] """The associated description""" - discord_integration_id: Optional[str] - """Related Discord integration ID if applicable""" - - email_integration_id: Optional[str] - """Related email integration ID if applicable""" - - extract_integration_id: Optional[str] - """Related extract integration ID if applicable""" - - file_id: Optional[str] - """Related file ID if applicable""" - - googlechat_integration_id: Optional[str] - """Related Google Chat integration ID if applicable""" - id: str """The instance ID""" - mcpserver_integration_id: Optional[str] - """Related MCP server integration ID if applicable""" - - messenger_integration_id: Optional[str] - """Related Messenger integration ID if applicable""" - meta: Optional[Dict[str, Any]] """Meta data information""" - microsoftteams_integration_id: Optional[str] - """Related Microsoft Teams integration ID if applicable""" - name: Optional[str] """The associated name""" - notion_integration_id: Optional[str] - """Related Notion integration ID if applicable""" - - portal_id: Optional[str] - """Related portal ID if applicable""" - - record_id: Optional[str] - """Related record ID if applicable""" - - secret_id: Optional[str] - """Related secret ID if applicable""" - - sitemap_integration_id: Optional[str] - """Related sitemap integration ID if applicable""" - - skillset_id: Optional[str] - """Related skillset ID if applicable""" - - slack_integration_id: Optional[str] - """Related Slack integration ID if applicable""" - - support_integration_id: Optional[str] - """Related support integration ID if applicable""" - - task_id: Optional[str] - """Related task ID if applicable""" - - telegram_integration_id: Optional[str] - """Related Telegram integration ID if applicable""" - - trigger_integration_id: Optional[str] - """Related trigger integration ID if applicable""" - - twilio_integration_id: Optional[str] - """Related Twilio integration ID if applicable""" - - type: str - """The type of event (e.g., 'conversation.create')""" + text: Optional[str] + """The text of the memory""" updated_at: float """The timestamp (ms) when the instance was updated""" - webhook_id: Optional[str] - """Related webhook ID if applicable""" - - whatsapp_integration_id: Optional[str] - """Related WhatsApp integration ID if applicable""" - - widget_integration_id: Optional[str] - """Related widget integration ID if applicable""" - - def __init__(self, ability_id: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_id: Optional[str], conversation_id: Optional[str], created_at: float, dataset_id: Optional[str], description: Optional[str], discord_integration_id: Optional[str], email_integration_id: Optional[str], extract_integration_id: Optional[str], file_id: Optional[str], googlechat_integration_id: Optional[str], id: str, mcpserver_integration_id: Optional[str], messenger_integration_id: Optional[str], meta: Optional[Dict[str, Any]], microsoftteams_integration_id: Optional[str], name: Optional[str], notion_integration_id: Optional[str], portal_id: Optional[str], record_id: Optional[str], secret_id: Optional[str], sitemap_integration_id: Optional[str], skillset_id: Optional[str], slack_integration_id: Optional[str], support_integration_id: Optional[str], task_id: Optional[str], telegram_integration_id: Optional[str], trigger_integration_id: Optional[str], twilio_integration_id: Optional[str], type: str, updated_at: float, webhook_id: Optional[str], whatsapp_integration_id: Optional[str], widget_integration_id: Optional[str]) -> None: - self.ability_id = ability_id - self.blueprint_id = blueprint_id + def __init__(self, bot_id: Optional[str], contact_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], text: Optional[str], updated_at: float) -> None: self.bot_id = bot_id self.contact_id = contact_id - self.conversation_id = conversation_id self.created_at = created_at - self.dataset_id = dataset_id self.description = description - self.discord_integration_id = discord_integration_id - self.email_integration_id = email_integration_id - self.extract_integration_id = extract_integration_id - self.file_id = file_id - self.googlechat_integration_id = googlechat_integration_id self.id = id - self.mcpserver_integration_id = mcpserver_integration_id - self.messenger_integration_id = messenger_integration_id self.meta = meta - self.microsoftteams_integration_id = microsoftteams_integration_id self.name = name - self.notion_integration_id = notion_integration_id - self.portal_id = portal_id - self.record_id = record_id - self.secret_id = secret_id - self.sitemap_integration_id = sitemap_integration_id - self.skillset_id = skillset_id - self.slack_integration_id = slack_integration_id - self.support_integration_id = support_integration_id - self.task_id = task_id - self.telegram_integration_id = telegram_integration_id - self.trigger_integration_id = trigger_integration_id - self.twilio_integration_id = twilio_integration_id - self.type = type + self.text = text self.updated_at = updated_at - self.webhook_id = webhook_id - self.whatsapp_integration_id = whatsapp_integration_id - self.widget_integration_id = widget_integration_id @staticmethod - def from_dict(obj: Any) -> 'EventLogListResponseItem': + def from_dict(obj: Any) -> 'MemoriesExportStreamItemData': assert isinstance(obj, dict) - ability_id = from_union([from_str, from_none], obj.get("abilityId")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) contact_id = from_union([from_str, from_none], obj.get("contactId")) - conversation_id = from_union([from_str, from_none], obj.get("conversationId")) created_at = from_float(obj.get("createdAt")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) description = from_union([from_str, from_none], obj.get("description")) - discord_integration_id = from_union([from_str, from_none], obj.get("discordIntegrationId")) - email_integration_id = from_union([from_str, from_none], obj.get("emailIntegrationId")) - extract_integration_id = from_union([from_str, from_none], obj.get("extractIntegrationId")) - file_id = from_union([from_str, from_none], obj.get("fileId")) - googlechat_integration_id = from_union([from_str, from_none], obj.get("googlechatIntegrationId")) id = from_str(obj.get("id")) - mcpserver_integration_id = from_union([from_str, from_none], obj.get("mcpserverIntegrationId")) - messenger_integration_id = from_union([from_str, from_none], obj.get("messengerIntegrationId")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - microsoftteams_integration_id = from_union([from_str, from_none], obj.get("microsoftteamsIntegrationId")) name = from_union([from_str, from_none], obj.get("name")) - notion_integration_id = from_union([from_str, from_none], obj.get("notionIntegrationId")) - portal_id = from_union([from_str, from_none], obj.get("portalId")) - record_id = from_union([from_str, from_none], obj.get("recordId")) - secret_id = from_union([from_str, from_none], obj.get("secretId")) - sitemap_integration_id = from_union([from_str, from_none], obj.get("sitemapIntegrationId")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) - slack_integration_id = from_union([from_str, from_none], obj.get("slackIntegrationId")) - support_integration_id = from_union([from_str, from_none], obj.get("supportIntegrationId")) - task_id = from_union([from_str, from_none], obj.get("taskId")) - telegram_integration_id = from_union([from_str, from_none], obj.get("telegramIntegrationId")) - trigger_integration_id = from_union([from_str, from_none], obj.get("triggerIntegrationId")) - twilio_integration_id = from_union([from_str, from_none], obj.get("twilioIntegrationId")) - type = from_str(obj.get("type")) + text = from_union([from_str, from_none], obj.get("text")) updated_at = from_float(obj.get("updatedAt")) - webhook_id = from_union([from_str, from_none], obj.get("webhookId")) - whatsapp_integration_id = from_union([from_str, from_none], obj.get("whatsappIntegrationId")) - widget_integration_id = from_union([from_str, from_none], obj.get("widgetIntegrationId")) - return EventLogListResponseItem(ability_id, blueprint_id, bot_id, contact_id, conversation_id, created_at, dataset_id, description, discord_integration_id, email_integration_id, extract_integration_id, file_id, googlechat_integration_id, id, mcpserver_integration_id, messenger_integration_id, meta, microsoftteams_integration_id, name, notion_integration_id, portal_id, record_id, secret_id, sitemap_integration_id, skillset_id, slack_integration_id, support_integration_id, task_id, telegram_integration_id, trigger_integration_id, twilio_integration_id, type, updated_at, webhook_id, whatsapp_integration_id, widget_integration_id) + return MemoriesExportStreamItemData(bot_id, contact_id, created_at, description, id, meta, name, text, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.ability_id is not None: - result["abilityId"] = from_union([from_str, from_none], self.ability_id) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) if self.contact_id is not None: result["contactId"] = from_union([from_str, from_none], self.contact_id) - if self.conversation_id is not None: - result["conversationId"] = from_union([from_str, from_none], self.conversation_id) result["createdAt"] = to_float(self.created_at) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.discord_integration_id is not None: - result["discordIntegrationId"] = from_union([from_str, from_none], self.discord_integration_id) - if self.email_integration_id is not None: - result["emailIntegrationId"] = from_union([from_str, from_none], self.email_integration_id) - if self.extract_integration_id is not None: - result["extractIntegrationId"] = from_union([from_str, from_none], self.extract_integration_id) - if self.file_id is not None: - result["fileId"] = from_union([from_str, from_none], self.file_id) - if self.googlechat_integration_id is not None: - result["googlechatIntegrationId"] = from_union([from_str, from_none], self.googlechat_integration_id) result["id"] = from_str(self.id) - if self.mcpserver_integration_id is not None: - result["mcpserverIntegrationId"] = from_union([from_str, from_none], self.mcpserver_integration_id) - if self.messenger_integration_id is not None: - result["messengerIntegrationId"] = from_union([from_str, from_none], self.messenger_integration_id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.microsoftteams_integration_id is not None: - result["microsoftteamsIntegrationId"] = from_union([from_str, from_none], self.microsoftteams_integration_id) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.notion_integration_id is not None: - result["notionIntegrationId"] = from_union([from_str, from_none], self.notion_integration_id) - if self.portal_id is not None: - result["portalId"] = from_union([from_str, from_none], self.portal_id) - if self.record_id is not None: - result["recordId"] = from_union([from_str, from_none], self.record_id) - if self.secret_id is not None: - result["secretId"] = from_union([from_str, from_none], self.secret_id) - if self.sitemap_integration_id is not None: - result["sitemapIntegrationId"] = from_union([from_str, from_none], self.sitemap_integration_id) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) - if self.slack_integration_id is not None: - result["slackIntegrationId"] = from_union([from_str, from_none], self.slack_integration_id) - if self.support_integration_id is not None: - result["supportIntegrationId"] = from_union([from_str, from_none], self.support_integration_id) - if self.task_id is not None: - result["taskId"] = from_union([from_str, from_none], self.task_id) - if self.telegram_integration_id is not None: - result["telegramIntegrationId"] = from_union([from_str, from_none], self.telegram_integration_id) - if self.trigger_integration_id is not None: - result["triggerIntegrationId"] = from_union([from_str, from_none], self.trigger_integration_id) - if self.twilio_integration_id is not None: - result["twilioIntegrationId"] = from_union([from_str, from_none], self.twilio_integration_id) - result["type"] = from_str(self.type) + if self.text is not None: + result["text"] = from_union([from_str, from_none], self.text) result["updatedAt"] = to_float(self.updated_at) - if self.webhook_id is not None: - result["webhookId"] = from_union([from_str, from_none], self.webhook_id) - if self.whatsapp_integration_id is not None: - result["whatsappIntegrationId"] = from_union([from_str, from_none], self.whatsapp_integration_id) - if self.widget_integration_id is not None: - result["widgetIntegrationId"] = from_union([from_str, from_none], self.widget_integration_id) return result -class EventLogListResponse: - cursor: str - """Cursor for fetching the next page""" +class MemoriesExportStreamItemType(Enum): + """The type of event""" - items: List[EventLogListResponseItem] + ITEM = "item" - def __init__(self, cursor: str, items: List[EventLogListResponseItem]) -> None: - self.cursor = cursor - self.items = items + +class MemoriesExportStreamItem: + data: MemoriesExportStreamItemData + """Instance list properties""" + + type: MemoriesExportStreamItemType + """The type of event""" + + def __init__(self, data: MemoriesExportStreamItemData, type: MemoriesExportStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'EventLogListResponse': + def from_dict(obj: Any) -> 'MemoriesExportStreamItem': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(EventLogListResponseItem.from_dict, obj.get("items")) - return EventLogListResponse(cursor, items) + data = MemoriesExportStreamItemData.from_dict(obj.get("data")) + type = MemoriesExportStreamItemType(obj.get("type")) + return MemoriesExportStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(EventLogListResponseItem, x), self.items) + result["data"] = to_class(MemoriesExportStreamItemData, self.data) + result["type"] = to_enum(MemoriesExportStreamItemType, self.type) return result -class EventLogListStreamItemData: - """Instance list properties""" - - ability_id: Optional[str] - """Related ability ID if applicable""" - - blueprint_id: Optional[str] - """Related blueprint ID if applicable""" +class MemoryCreateRequest: + """Instance crud properties""" bot_id: Optional[str] - """Related bot ID if applicable""" + """The bot associated with the memory""" contact_id: Optional[str] - """Related contact ID if applicable""" - - conversation_id: Optional[str] - """Related conversation ID if applicable""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - dataset_id: Optional[str] - """Related dataset ID if applicable""" + """The contact associated with the memory""" description: Optional[str] """The associated description""" - discord_integration_id: Optional[str] - """Related Discord integration ID if applicable""" - - email_integration_id: Optional[str] - """Related email integration ID if applicable""" - - extract_integration_id: Optional[str] - """Related extract integration ID if applicable""" + expires_at: Optional[int] + """Epoch-ms timestamp at which the memory is automatically deleted; null for no expiry""" - file_id: Optional[str] - """Related file ID if applicable""" + meta: Optional[Dict[str, Any]] + """Meta data information""" - googlechat_integration_id: Optional[str] - """Related Google Chat integration ID if applicable""" + name: Optional[str] + """The associated name""" - id: str - """The instance ID""" + text: str + """The text of the memory""" - mcpserver_integration_id: Optional[str] - """Related MCP server integration ID if applicable""" + def __init__(self, bot_id: Optional[str], contact_id: Optional[str], description: Optional[str], expires_at: Optional[int], meta: Optional[Dict[str, Any]], name: Optional[str], text: str) -> None: + self.bot_id = bot_id + self.contact_id = contact_id + self.description = description + self.expires_at = expires_at + self.meta = meta + self.name = name + self.text = text - messenger_integration_id: Optional[str] - """Related Messenger integration ID if applicable""" + @staticmethod + def from_dict(obj: Any) -> 'MemoryCreateRequest': + assert isinstance(obj, dict) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) + description = from_union([from_str, from_none], obj.get("description")) + expires_at = from_union([from_int, from_none], obj.get("expiresAt")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + text = from_str(obj.get("text")) + return MemoryCreateRequest(bot_id, contact_id, description, expires_at, meta, name, text) - meta: Optional[Dict[str, Any]] - """Meta data information""" + def to_dict(self) -> dict: + result: dict = {} + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.expires_at is not None: + result["expiresAt"] = from_union([from_int, from_none], self.expires_at) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + result["text"] = from_str(self.text) + return result - microsoftteams_integration_id: Optional[str] - """Related Microsoft Teams integration ID if applicable""" - name: Optional[str] - """The associated name""" +class MemoryCreateResponse: + id: str + """The ID of the created memory""" - notion_integration_id: Optional[str] - """Related Notion integration ID if applicable""" + def __init__(self, id: str) -> None: + self.id = id - portal_id: Optional[str] - """Related portal ID if applicable""" + @staticmethod + def from_dict(obj: Any) -> 'MemoryCreateResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return MemoryCreateResponse(id) - record_id: Optional[str] - """Related record ID if applicable""" + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result - secret_id: Optional[str] - """Related secret ID if applicable""" - sitemap_integration_id: Optional[str] - """Related sitemap integration ID if applicable""" +class MemoryUpdateParams: + memory_id: str - skillset_id: Optional[str] - """Related skillset ID if applicable""" + def __init__(self, memory_id: str) -> None: + self.memory_id = memory_id - slack_integration_id: Optional[str] - """Related Slack integration ID if applicable""" + @staticmethod + def from_dict(obj: Any) -> 'MemoryUpdateParams': + assert isinstance(obj, dict) + memory_id = from_str(obj.get("memoryId")) + return MemoryUpdateParams(memory_id) - support_integration_id: Optional[str] - """Related support integration ID if applicable""" + def to_dict(self) -> dict: + result: dict = {} + result["memoryId"] = from_str(self.memory_id) + return result - task_id: Optional[str] - """Related task ID if applicable""" - telegram_integration_id: Optional[str] - """Related Telegram integration ID if applicable""" +class MemoryUpdateRequest: + """Instance crud properties""" - trigger_integration_id: Optional[str] - """Related trigger integration ID if applicable""" + bot_id: Optional[str] + """The bot associated with the memory""" - twilio_integration_id: Optional[str] - """Related Twilio integration ID if applicable""" + contact_id: Optional[str] + """The contact associated with the memory""" - type: str - """The type of event (e.g., 'conversation.create')""" + description: Optional[str] + """The associated description""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + expires_at: Optional[int] + """Epoch-ms timestamp at which the memory is automatically deleted; null clears any expiry""" - webhook_id: Optional[str] - """Related webhook ID if applicable""" + meta: Optional[Dict[str, Any]] + """Meta data information""" - whatsapp_integration_id: Optional[str] - """Related WhatsApp integration ID if applicable""" + name: Optional[str] + """The associated name""" - widget_integration_id: Optional[str] - """Related widget integration ID if applicable""" + text: Optional[str] + """The text of the memory""" - def __init__(self, ability_id: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_id: Optional[str], conversation_id: Optional[str], created_at: float, dataset_id: Optional[str], description: Optional[str], discord_integration_id: Optional[str], email_integration_id: Optional[str], extract_integration_id: Optional[str], file_id: Optional[str], googlechat_integration_id: Optional[str], id: str, mcpserver_integration_id: Optional[str], messenger_integration_id: Optional[str], meta: Optional[Dict[str, Any]], microsoftteams_integration_id: Optional[str], name: Optional[str], notion_integration_id: Optional[str], portal_id: Optional[str], record_id: Optional[str], secret_id: Optional[str], sitemap_integration_id: Optional[str], skillset_id: Optional[str], slack_integration_id: Optional[str], support_integration_id: Optional[str], task_id: Optional[str], telegram_integration_id: Optional[str], trigger_integration_id: Optional[str], twilio_integration_id: Optional[str], type: str, updated_at: float, webhook_id: Optional[str], whatsapp_integration_id: Optional[str], widget_integration_id: Optional[str]) -> None: - self.ability_id = ability_id - self.blueprint_id = blueprint_id + def __init__(self, bot_id: Optional[str], contact_id: Optional[str], description: Optional[str], expires_at: Optional[int], meta: Optional[Dict[str, Any]], name: Optional[str], text: Optional[str]) -> None: self.bot_id = bot_id self.contact_id = contact_id - self.conversation_id = conversation_id - self.created_at = created_at - self.dataset_id = dataset_id self.description = description - self.discord_integration_id = discord_integration_id - self.email_integration_id = email_integration_id - self.extract_integration_id = extract_integration_id - self.file_id = file_id - self.googlechat_integration_id = googlechat_integration_id - self.id = id - self.mcpserver_integration_id = mcpserver_integration_id - self.messenger_integration_id = messenger_integration_id + self.expires_at = expires_at self.meta = meta - self.microsoftteams_integration_id = microsoftteams_integration_id self.name = name - self.notion_integration_id = notion_integration_id - self.portal_id = portal_id - self.record_id = record_id - self.secret_id = secret_id - self.sitemap_integration_id = sitemap_integration_id - self.skillset_id = skillset_id - self.slack_integration_id = slack_integration_id - self.support_integration_id = support_integration_id - self.task_id = task_id - self.telegram_integration_id = telegram_integration_id - self.trigger_integration_id = trigger_integration_id - self.twilio_integration_id = twilio_integration_id - self.type = type - self.updated_at = updated_at - self.webhook_id = webhook_id - self.whatsapp_integration_id = whatsapp_integration_id - self.widget_integration_id = widget_integration_id + self.text = text @staticmethod - def from_dict(obj: Any) -> 'EventLogListStreamItemData': + def from_dict(obj: Any) -> 'MemoryUpdateRequest': assert isinstance(obj, dict) - ability_id = from_union([from_str, from_none], obj.get("abilityId")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_id = from_union([from_str, from_none], obj.get("contactId")) - conversation_id = from_union([from_str, from_none], obj.get("conversationId")) - created_at = from_float(obj.get("createdAt")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) - description = from_union([from_str, from_none], obj.get("description")) - discord_integration_id = from_union([from_str, from_none], obj.get("discordIntegrationId")) - email_integration_id = from_union([from_str, from_none], obj.get("emailIntegrationId")) - extract_integration_id = from_union([from_str, from_none], obj.get("extractIntegrationId")) - file_id = from_union([from_str, from_none], obj.get("fileId")) - googlechat_integration_id = from_union([from_str, from_none], obj.get("googlechatIntegrationId")) - id = from_str(obj.get("id")) - mcpserver_integration_id = from_union([from_str, from_none], obj.get("mcpserverIntegrationId")) - messenger_integration_id = from_union([from_str, from_none], obj.get("messengerIntegrationId")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) + description = from_union([from_str, from_none], obj.get("description")) + expires_at = from_union([from_int, from_none], obj.get("expiresAt")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - microsoftteams_integration_id = from_union([from_str, from_none], obj.get("microsoftteamsIntegrationId")) name = from_union([from_str, from_none], obj.get("name")) - notion_integration_id = from_union([from_str, from_none], obj.get("notionIntegrationId")) - portal_id = from_union([from_str, from_none], obj.get("portalId")) - record_id = from_union([from_str, from_none], obj.get("recordId")) - secret_id = from_union([from_str, from_none], obj.get("secretId")) - sitemap_integration_id = from_union([from_str, from_none], obj.get("sitemapIntegrationId")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) - slack_integration_id = from_union([from_str, from_none], obj.get("slackIntegrationId")) - support_integration_id = from_union([from_str, from_none], obj.get("supportIntegrationId")) - task_id = from_union([from_str, from_none], obj.get("taskId")) - telegram_integration_id = from_union([from_str, from_none], obj.get("telegramIntegrationId")) - trigger_integration_id = from_union([from_str, from_none], obj.get("triggerIntegrationId")) - twilio_integration_id = from_union([from_str, from_none], obj.get("twilioIntegrationId")) - type = from_str(obj.get("type")) - updated_at = from_float(obj.get("updatedAt")) - webhook_id = from_union([from_str, from_none], obj.get("webhookId")) - whatsapp_integration_id = from_union([from_str, from_none], obj.get("whatsappIntegrationId")) - widget_integration_id = from_union([from_str, from_none], obj.get("widgetIntegrationId")) - return EventLogListStreamItemData(ability_id, blueprint_id, bot_id, contact_id, conversation_id, created_at, dataset_id, description, discord_integration_id, email_integration_id, extract_integration_id, file_id, googlechat_integration_id, id, mcpserver_integration_id, messenger_integration_id, meta, microsoftteams_integration_id, name, notion_integration_id, portal_id, record_id, secret_id, sitemap_integration_id, skillset_id, slack_integration_id, support_integration_id, task_id, telegram_integration_id, trigger_integration_id, twilio_integration_id, type, updated_at, webhook_id, whatsapp_integration_id, widget_integration_id) + text = from_union([from_str, from_none], obj.get("text")) + return MemoryUpdateRequest(bot_id, contact_id, description, expires_at, meta, name, text) def to_dict(self) -> dict: result: dict = {} - if self.ability_id is not None: - result["abilityId"] = from_union([from_str, from_none], self.ability_id) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) if self.contact_id is not None: result["contactId"] = from_union([from_str, from_none], self.contact_id) - if self.conversation_id is not None: - result["conversationId"] = from_union([from_str, from_none], self.conversation_id) - result["createdAt"] = to_float(self.created_at) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.discord_integration_id is not None: - result["discordIntegrationId"] = from_union([from_str, from_none], self.discord_integration_id) - if self.email_integration_id is not None: - result["emailIntegrationId"] = from_union([from_str, from_none], self.email_integration_id) - if self.extract_integration_id is not None: - result["extractIntegrationId"] = from_union([from_str, from_none], self.extract_integration_id) - if self.file_id is not None: - result["fileId"] = from_union([from_str, from_none], self.file_id) - if self.googlechat_integration_id is not None: - result["googlechatIntegrationId"] = from_union([from_str, from_none], self.googlechat_integration_id) - result["id"] = from_str(self.id) - if self.mcpserver_integration_id is not None: - result["mcpserverIntegrationId"] = from_union([from_str, from_none], self.mcpserver_integration_id) - if self.messenger_integration_id is not None: - result["messengerIntegrationId"] = from_union([from_str, from_none], self.messenger_integration_id) + if self.expires_at is not None: + result["expiresAt"] = from_union([from_int, from_none], self.expires_at) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.microsoftteams_integration_id is not None: - result["microsoftteamsIntegrationId"] = from_union([from_str, from_none], self.microsoftteams_integration_id) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.notion_integration_id is not None: - result["notionIntegrationId"] = from_union([from_str, from_none], self.notion_integration_id) - if self.portal_id is not None: - result["portalId"] = from_union([from_str, from_none], self.portal_id) - if self.record_id is not None: - result["recordId"] = from_union([from_str, from_none], self.record_id) - if self.secret_id is not None: - result["secretId"] = from_union([from_str, from_none], self.secret_id) - if self.sitemap_integration_id is not None: - result["sitemapIntegrationId"] = from_union([from_str, from_none], self.sitemap_integration_id) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) - if self.slack_integration_id is not None: - result["slackIntegrationId"] = from_union([from_str, from_none], self.slack_integration_id) - if self.support_integration_id is not None: - result["supportIntegrationId"] = from_union([from_str, from_none], self.support_integration_id) - if self.task_id is not None: - result["taskId"] = from_union([from_str, from_none], self.task_id) - if self.telegram_integration_id is not None: - result["telegramIntegrationId"] = from_union([from_str, from_none], self.telegram_integration_id) - if self.trigger_integration_id is not None: - result["triggerIntegrationId"] = from_union([from_str, from_none], self.trigger_integration_id) - if self.twilio_integration_id is not None: - result["twilioIntegrationId"] = from_union([from_str, from_none], self.twilio_integration_id) - result["type"] = from_str(self.type) - result["updatedAt"] = to_float(self.updated_at) - if self.webhook_id is not None: - result["webhookId"] = from_union([from_str, from_none], self.webhook_id) - if self.whatsapp_integration_id is not None: - result["whatsappIntegrationId"] = from_union([from_str, from_none], self.whatsapp_integration_id) - if self.widget_integration_id is not None: - result["widgetIntegrationId"] = from_union([from_str, from_none], self.widget_integration_id) + if self.text is not None: + result["text"] = from_union([from_str, from_none], self.text) return result -class EventLogListStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - - -class EventLogListStreamItem: - data: EventLogListStreamItemData - """Instance list properties""" - - type: EventLogListStreamItemType - """The type of event""" +class MemoryUpdateResponse: + id: str + """The ID of the updated memory""" - def __init__(self, data: EventLogListStreamItemData, type: EventLogListStreamItemType) -> None: - self.data = data - self.type = type + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'EventLogListStreamItem': + def from_dict(obj: Any) -> 'MemoryUpdateResponse': assert isinstance(obj, dict) - data = EventLogListStreamItemData.from_dict(obj.get("data")) - type = EventLogListStreamItemType(obj.get("type")) - return EventLogListStreamItem(data, type) + id = from_str(obj.get("id")) + return MemoryUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(EventLogListStreamItemData, self.data) - result["type"] = to_enum(EventLogListStreamItemType, self.type) + result["id"] = from_str(self.id) return result -class EventLogsSubscribeRequest: - history_length: Optional[int] - """Number of recent historical events to replay before - subscribing to live updates. When provided, the subscriber - will first receive up to this many recent events that were - logged before the subscription started. This is useful for - catching up on events that may have occurred during - connection setup. - """ +class MemoryFetchParams: + memory_id: str + """The ID of the memory to retrieve""" - def __init__(self, history_length: Optional[int]) -> None: - self.history_length = history_length + def __init__(self, memory_id: str) -> None: + self.memory_id = memory_id @staticmethod - def from_dict(obj: Any) -> 'EventLogsSubscribeRequest': + def from_dict(obj: Any) -> 'MemoryFetchParams': assert isinstance(obj, dict) - history_length = from_union([from_int, from_none], obj.get("historyLength")) - return EventLogsSubscribeRequest(history_length) + memory_id = from_str(obj.get("memoryId")) + return MemoryFetchParams(memory_id) def to_dict(self) -> dict: result: dict = {} - if self.history_length is not None: - result["historyLength"] = from_union([from_int, from_none], self.history_length) + result["memoryId"] = from_str(self.memory_id) return result -class EventLogsSubscribeStreamItemData: +class MemoryFetchResponse: """Instance list properties""" - ability_id: Optional[str] - """Related ability ID if applicable""" - - blueprint_id: Optional[str] - """Related blueprint ID if applicable""" - bot_id: Optional[str] - """Related bot ID if applicable""" + """The bot associated with the memory""" contact_id: Optional[str] - """Related contact ID if applicable""" - - conversation_id: Optional[str] - """Related conversation ID if applicable""" + """The contact associated with the memory""" created_at: float """The timestamp (ms) when the instance was created""" - dataset_id: Optional[str] - """Related dataset ID if applicable""" - description: Optional[str] """The associated description""" - discord_integration_id: Optional[str] - """Related Discord integration ID if applicable""" - - email_integration_id: Optional[str] - """Related email integration ID if applicable""" - - extract_integration_id: Optional[str] - """Related extract integration ID if applicable""" - - file_id: Optional[str] - """Related file ID if applicable""" - - googlechat_integration_id: Optional[str] - """Related Google Chat integration ID if applicable""" + expires_at: Optional[float] + """The timestamp (ms) at which the memory expires and is automatically deleted""" id: str """The instance ID""" - mcpserver_integration_id: Optional[str] - """Related MCP server integration ID if applicable""" - - messenger_integration_id: Optional[str] - """Related Messenger integration ID if applicable""" - meta: Optional[Dict[str, Any]] """Meta data information""" - microsoftteams_integration_id: Optional[str] - """Related Microsoft Teams integration ID if applicable""" - name: Optional[str] """The associated name""" - notion_integration_id: Optional[str] - """Related Notion integration ID if applicable""" - - portal_id: Optional[str] - """Related portal ID if applicable""" - - record_id: Optional[str] - """Related record ID if applicable""" - - secret_id: Optional[str] - """Related secret ID if applicable""" - - sitemap_integration_id: Optional[str] - """Related sitemap integration ID if applicable""" - - skillset_id: Optional[str] - """Related skillset ID if applicable""" - - slack_integration_id: Optional[str] - """Related Slack integration ID if applicable""" - - support_integration_id: Optional[str] - """Related support integration ID if applicable""" - - task_id: Optional[str] - """Related task ID if applicable""" - - telegram_integration_id: Optional[str] - """Related Telegram integration ID if applicable""" - - trigger_integration_id: Optional[str] - """Related trigger integration ID if applicable""" - - twilio_integration_id: Optional[str] - """Related Twilio integration ID if applicable""" - - type: str - """The type of event (e.g., 'conversation.create')""" + text: Optional[str] + """The text of the memory""" updated_at: float """The timestamp (ms) when the instance was updated""" - webhook_id: Optional[str] - """Related webhook ID if applicable""" - - whatsapp_integration_id: Optional[str] - """Related WhatsApp integration ID if applicable""" - - widget_integration_id: Optional[str] - """Related widget integration ID if applicable""" - - def __init__(self, ability_id: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_id: Optional[str], conversation_id: Optional[str], created_at: float, dataset_id: Optional[str], description: Optional[str], discord_integration_id: Optional[str], email_integration_id: Optional[str], extract_integration_id: Optional[str], file_id: Optional[str], googlechat_integration_id: Optional[str], id: str, mcpserver_integration_id: Optional[str], messenger_integration_id: Optional[str], meta: Optional[Dict[str, Any]], microsoftteams_integration_id: Optional[str], name: Optional[str], notion_integration_id: Optional[str], portal_id: Optional[str], record_id: Optional[str], secret_id: Optional[str], sitemap_integration_id: Optional[str], skillset_id: Optional[str], slack_integration_id: Optional[str], support_integration_id: Optional[str], task_id: Optional[str], telegram_integration_id: Optional[str], trigger_integration_id: Optional[str], twilio_integration_id: Optional[str], type: str, updated_at: float, webhook_id: Optional[str], whatsapp_integration_id: Optional[str], widget_integration_id: Optional[str]) -> None: - self.ability_id = ability_id - self.blueprint_id = blueprint_id + def __init__(self, bot_id: Optional[str], contact_id: Optional[str], created_at: float, description: Optional[str], expires_at: Optional[float], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], text: Optional[str], updated_at: float) -> None: self.bot_id = bot_id self.contact_id = contact_id - self.conversation_id = conversation_id self.created_at = created_at - self.dataset_id = dataset_id self.description = description - self.discord_integration_id = discord_integration_id - self.email_integration_id = email_integration_id - self.extract_integration_id = extract_integration_id - self.file_id = file_id - self.googlechat_integration_id = googlechat_integration_id + self.expires_at = expires_at self.id = id - self.mcpserver_integration_id = mcpserver_integration_id - self.messenger_integration_id = messenger_integration_id self.meta = meta - self.microsoftteams_integration_id = microsoftteams_integration_id self.name = name - self.notion_integration_id = notion_integration_id - self.portal_id = portal_id - self.record_id = record_id - self.secret_id = secret_id - self.sitemap_integration_id = sitemap_integration_id - self.skillset_id = skillset_id - self.slack_integration_id = slack_integration_id - self.support_integration_id = support_integration_id - self.task_id = task_id - self.telegram_integration_id = telegram_integration_id - self.trigger_integration_id = trigger_integration_id - self.twilio_integration_id = twilio_integration_id - self.type = type + self.text = text self.updated_at = updated_at - self.webhook_id = webhook_id - self.whatsapp_integration_id = whatsapp_integration_id - self.widget_integration_id = widget_integration_id @staticmethod - def from_dict(obj: Any) -> 'EventLogsSubscribeStreamItemData': + def from_dict(obj: Any) -> 'MemoryFetchResponse': assert isinstance(obj, dict) - ability_id = from_union([from_str, from_none], obj.get("abilityId")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) contact_id = from_union([from_str, from_none], obj.get("contactId")) - conversation_id = from_union([from_str, from_none], obj.get("conversationId")) created_at = from_float(obj.get("createdAt")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) description = from_union([from_str, from_none], obj.get("description")) - discord_integration_id = from_union([from_str, from_none], obj.get("discordIntegrationId")) - email_integration_id = from_union([from_str, from_none], obj.get("emailIntegrationId")) - extract_integration_id = from_union([from_str, from_none], obj.get("extractIntegrationId")) - file_id = from_union([from_str, from_none], obj.get("fileId")) - googlechat_integration_id = from_union([from_str, from_none], obj.get("googlechatIntegrationId")) + expires_at = from_union([from_float, from_none], obj.get("expiresAt")) id = from_str(obj.get("id")) - mcpserver_integration_id = from_union([from_str, from_none], obj.get("mcpserverIntegrationId")) - messenger_integration_id = from_union([from_str, from_none], obj.get("messengerIntegrationId")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - microsoftteams_integration_id = from_union([from_str, from_none], obj.get("microsoftteamsIntegrationId")) name = from_union([from_str, from_none], obj.get("name")) - notion_integration_id = from_union([from_str, from_none], obj.get("notionIntegrationId")) - portal_id = from_union([from_str, from_none], obj.get("portalId")) - record_id = from_union([from_str, from_none], obj.get("recordId")) - secret_id = from_union([from_str, from_none], obj.get("secretId")) - sitemap_integration_id = from_union([from_str, from_none], obj.get("sitemapIntegrationId")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) - slack_integration_id = from_union([from_str, from_none], obj.get("slackIntegrationId")) - support_integration_id = from_union([from_str, from_none], obj.get("supportIntegrationId")) - task_id = from_union([from_str, from_none], obj.get("taskId")) - telegram_integration_id = from_union([from_str, from_none], obj.get("telegramIntegrationId")) - trigger_integration_id = from_union([from_str, from_none], obj.get("triggerIntegrationId")) - twilio_integration_id = from_union([from_str, from_none], obj.get("twilioIntegrationId")) - type = from_str(obj.get("type")) + text = from_union([from_str, from_none], obj.get("text")) updated_at = from_float(obj.get("updatedAt")) - webhook_id = from_union([from_str, from_none], obj.get("webhookId")) - whatsapp_integration_id = from_union([from_str, from_none], obj.get("whatsappIntegrationId")) - widget_integration_id = from_union([from_str, from_none], obj.get("widgetIntegrationId")) - return EventLogsSubscribeStreamItemData(ability_id, blueprint_id, bot_id, contact_id, conversation_id, created_at, dataset_id, description, discord_integration_id, email_integration_id, extract_integration_id, file_id, googlechat_integration_id, id, mcpserver_integration_id, messenger_integration_id, meta, microsoftteams_integration_id, name, notion_integration_id, portal_id, record_id, secret_id, sitemap_integration_id, skillset_id, slack_integration_id, support_integration_id, task_id, telegram_integration_id, trigger_integration_id, twilio_integration_id, type, updated_at, webhook_id, whatsapp_integration_id, widget_integration_id) + return MemoryFetchResponse(bot_id, contact_id, created_at, description, expires_at, id, meta, name, text, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.ability_id is not None: - result["abilityId"] = from_union([from_str, from_none], self.ability_id) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) if self.contact_id is not None: result["contactId"] = from_union([from_str, from_none], self.contact_id) - if self.conversation_id is not None: - result["conversationId"] = from_union([from_str, from_none], self.conversation_id) result["createdAt"] = to_float(self.created_at) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.discord_integration_id is not None: - result["discordIntegrationId"] = from_union([from_str, from_none], self.discord_integration_id) - if self.email_integration_id is not None: - result["emailIntegrationId"] = from_union([from_str, from_none], self.email_integration_id) - if self.extract_integration_id is not None: - result["extractIntegrationId"] = from_union([from_str, from_none], self.extract_integration_id) - if self.file_id is not None: - result["fileId"] = from_union([from_str, from_none], self.file_id) - if self.googlechat_integration_id is not None: - result["googlechatIntegrationId"] = from_union([from_str, from_none], self.googlechat_integration_id) + if self.expires_at is not None: + result["expiresAt"] = from_union([to_float, from_none], self.expires_at) result["id"] = from_str(self.id) - if self.mcpserver_integration_id is not None: - result["mcpserverIntegrationId"] = from_union([from_str, from_none], self.mcpserver_integration_id) - if self.messenger_integration_id is not None: - result["messengerIntegrationId"] = from_union([from_str, from_none], self.messenger_integration_id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.microsoftteams_integration_id is not None: - result["microsoftteamsIntegrationId"] = from_union([from_str, from_none], self.microsoftteams_integration_id) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.notion_integration_id is not None: - result["notionIntegrationId"] = from_union([from_str, from_none], self.notion_integration_id) - if self.portal_id is not None: - result["portalId"] = from_union([from_str, from_none], self.portal_id) - if self.record_id is not None: - result["recordId"] = from_union([from_str, from_none], self.record_id) - if self.secret_id is not None: - result["secretId"] = from_union([from_str, from_none], self.secret_id) - if self.sitemap_integration_id is not None: - result["sitemapIntegrationId"] = from_union([from_str, from_none], self.sitemap_integration_id) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) - if self.slack_integration_id is not None: - result["slackIntegrationId"] = from_union([from_str, from_none], self.slack_integration_id) - if self.support_integration_id is not None: - result["supportIntegrationId"] = from_union([from_str, from_none], self.support_integration_id) - if self.task_id is not None: - result["taskId"] = from_union([from_str, from_none], self.task_id) - if self.telegram_integration_id is not None: - result["telegramIntegrationId"] = from_union([from_str, from_none], self.telegram_integration_id) - if self.trigger_integration_id is not None: - result["triggerIntegrationId"] = from_union([from_str, from_none], self.trigger_integration_id) - if self.twilio_integration_id is not None: - result["twilioIntegrationId"] = from_union([from_str, from_none], self.twilio_integration_id) - result["type"] = from_str(self.type) + if self.text is not None: + result["text"] = from_union([from_str, from_none], self.text) result["updatedAt"] = to_float(self.updated_at) - if self.webhook_id is not None: - result["webhookId"] = from_union([from_str, from_none], self.webhook_id) - if self.whatsapp_integration_id is not None: - result["whatsappIntegrationId"] = from_union([from_str, from_none], self.whatsapp_integration_id) - if self.widget_integration_id is not None: - result["widgetIntegrationId"] = from_union([from_str, from_none], self.widget_integration_id) return result -class EventLogsSubscribeStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - - -class EventLogsSubscribeStreamItem: - data: EventLogsSubscribeStreamItemData - """Instance list properties""" - - type: EventLogsSubscribeStreamItemType - """The type of event""" - - def __init__(self, data: EventLogsSubscribeStreamItemData, type: EventLogsSubscribeStreamItemType) -> None: - self.data = data - self.type = type - - @staticmethod - def from_dict(obj: Any) -> 'EventLogsSubscribeStreamItem': - assert isinstance(obj, dict) - data = EventLogsSubscribeStreamItemData.from_dict(obj.get("data")) - type = EventLogsSubscribeStreamItemType(obj.get("type")) - return EventLogsSubscribeStreamItem(data, type) - - def to_dict(self) -> dict: - result: dict = {} - result["data"] = to_class(EventLogsSubscribeStreamItemData, self.data) - result["type"] = to_enum(EventLogsSubscribeStreamItemType, self.type) - return result - - -class FileDeleteParams: - file_id: str - """The ID of the file to delete""" +class MemoryDeleteParams: + memory_id: str + """The ID of the memory to delete""" - def __init__(self, file_id: str) -> None: - self.file_id = file_id + def __init__(self, memory_id: str) -> None: + self.memory_id = memory_id @staticmethod - def from_dict(obj: Any) -> 'FileDeleteParams': + def from_dict(obj: Any) -> 'MemoryDeleteParams': assert isinstance(obj, dict) - file_id = from_str(obj.get("fileId")) - return FileDeleteParams(file_id) + memory_id = from_str(obj.get("memoryId")) + return MemoryDeleteParams(memory_id) def to_dict(self) -> dict: result: dict = {} - result["fileId"] = from_str(self.file_id) + result["memoryId"] = from_str(self.memory_id) return result -class FileDeleteResponse: +class MemoryDeleteResponse: id: str - """The ID of the deleted file""" + """The ID of the deleted memory""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'FileDeleteResponse': + def from_dict(obj: Any) -> 'MemoryDeleteResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return FileDeleteResponse(id) + return MemoryDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -18355,79 +15543,59 @@ def to_dict(self) -> dict: return result -class FileDownloadParams: - file_id: str - """The ID of the file to download""" - - def __init__(self, file_id: str) -> None: - self.file_id = file_id - - @staticmethod - def from_dict(obj: Any) -> 'FileDownloadParams': - assert isinstance(obj, dict) - file_id = from_str(obj.get("fileId")) - return FileDownloadParams(file_id) - - def to_dict(self) -> dict: - result: dict = {} - result["fileId"] = from_str(self.file_id) - return result - +class MagicPromptListParamsOrder(Enum): + """The order of the paginated items""" -class FileDownloadResponse: - url: str - """The URL to download the file""" + ASC = "asc" + DESC = "desc" - def __init__(self, url: str) -> None: - self.url = url - @staticmethod - def from_dict(obj: Any) -> 'FileDownloadResponse': - assert isinstance(obj, dict) - url = from_str(obj.get("url")) - return FileDownloadResponse(url) +class MagicPromptListParams: + cursor: Optional[str] + """The cursor to use for pagination""" - def to_dict(self) -> dict: - result: dict = {} - result["url"] = from_str(self.url) - return result + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" + order: Optional[MagicPromptListParamsOrder] + """The order of the paginated items""" -class FileFetchParams: - file_id: str - """The ID of the file to retrieve""" + take: Optional[int] + """The number of items to retrieve""" - def __init__(self, file_id: str) -> None: - self.file_id = file_id + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[MagicPromptListParamsOrder], take: Optional[int]) -> None: + self.cursor = cursor + self.meta = meta + self.order = order + self.take = take @staticmethod - def from_dict(obj: Any) -> 'FileFetchParams': + def from_dict(obj: Any) -> 'MagicPromptListParams': assert isinstance(obj, dict) - file_id = from_str(obj.get("fileId")) - return FileFetchParams(file_id) + cursor = from_union([from_str, from_none], obj.get("cursor")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([MagicPromptListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return MagicPromptListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} - result["fileId"] = from_str(self.file_id) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(MagicPromptListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class FileFetchResponseVisibility(Enum): - """The file visibility""" - - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" - - -class FileFetchResponse: - """Blueprint properties""" - - alias: Optional[str] - """The unique alias for the instance""" +class MagicPromptListResponseItem: + """Instance list properties""" - blueprint_id: Optional[str] - """The ID of the blueprint""" + alias: str + """The alias of the item""" created_at: float """The timestamp (ms) when the instance was created""" @@ -18447,40 +15615,30 @@ class FileFetchResponse: updated_at: float """The timestamp (ms) when the instance was updated""" - visibility: Optional[FileFetchResponseVisibility] - """The file visibility""" - - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float, visibility: Optional[FileFetchResponseVisibility]) -> None: + def __init__(self, alias: str, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: self.alias = alias - self.blueprint_id = blueprint_id self.created_at = created_at self.description = description self.id = id self.meta = meta self.name = name self.updated_at = updated_at - self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'FileFetchResponse': + def from_dict(obj: Any) -> 'MagicPromptListResponseItem': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + alias = from_str(obj.get("alias")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) updated_at = from_float(obj.get("updatedAt")) - visibility = from_union([FileFetchResponseVisibility, from_none], obj.get("visibility")) - return FileFetchResponse(alias, blueprint_id, created_at, description, id, meta, name, updated_at, visibility) + return MagicPromptListResponseItem(alias, created_at, description, id, meta, name, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + result["alias"] = from_str(self.alias) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) @@ -18490,402 +15648,331 @@ def to_dict(self) -> dict: if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) result["updatedAt"] = to_float(self.updated_at) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(FileFetchResponseVisibility, x), from_none], self.visibility) - return result - - -class FileSyncParams: - file_id: str - """The ID of the file to sync""" - - def __init__(self, file_id: str) -> None: - self.file_id = file_id - - @staticmethod - def from_dict(obj: Any) -> 'FileSyncParams': - assert isinstance(obj, dict) - file_id = from_str(obj.get("fileId")) - return FileSyncParams(file_id) - - def to_dict(self) -> dict: - result: dict = {} - result["fileId"] = from_str(self.file_id) return result -class FileSyncResponse: - id: str - """The ID of the file""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'FileSyncResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return FileSyncResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - +class MagicPromptListResponse: + cursor: str + """Cursor for fetching the next page""" -class FileUpdateParams: - file_id: str + items: List[MagicPromptListResponseItem] - def __init__(self, file_id: str) -> None: - self.file_id = file_id + def __init__(self, cursor: str, items: List[MagicPromptListResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'FileUpdateParams': + def from_dict(obj: Any) -> 'MagicPromptListResponse': assert isinstance(obj, dict) - file_id = from_str(obj.get("fileId")) - return FileUpdateParams(file_id) + cursor = from_str(obj.get("cursor")) + items = from_list(MagicPromptListResponseItem.from_dict, obj.get("items")) + return MagicPromptListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["fileId"] = from_str(self.file_id) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(MagicPromptListResponseItem, x), self.items) return result -class FileUpdateRequestVisibility(Enum): - """The file visibility""" - - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" - - -class FileUpdateRequest: - """Blueprint properties""" +class MagicPromptListStreamItemData: + """Instance list properties""" - alias: Optional[str] - """The unique alias for the instance""" + alias: str + """The alias of the item""" - blueprint_id: Optional[str] - """The ID of the blueprint""" + created_at: float + """The timestamp (ms) when the instance was created""" description: Optional[str] """The associated description""" + id: str + """The instance ID""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - visibility: Optional[FileUpdateRequestVisibility] - """The file visibility""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], visibility: Optional[FileUpdateRequestVisibility]) -> None: + def __init__(self, alias: str, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: self.alias = alias - self.blueprint_id = blueprint_id + self.created_at = created_at self.description = description + self.id = id self.meta = meta self.name = name - self.visibility = visibility + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'FileUpdateRequest': + def from_dict(obj: Any) -> 'MagicPromptListStreamItemData': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + alias = from_str(obj.get("alias")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - visibility = from_union([FileUpdateRequestVisibility, from_none], obj.get("visibility")) - return FileUpdateRequest(alias, blueprint_id, description, meta, name, visibility) + updated_at = from_float(obj.get("updatedAt")) + return MagicPromptListStreamItemData(alias, created_at, description, id, meta, name, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + result["alias"] = from_str(self.alias) + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(FileUpdateRequestVisibility, x), from_none], self.visibility) + result["updatedAt"] = to_float(self.updated_at) return result -class FileUpdateResponse: - id: str - """The ID of the updated file""" +class MagicPromptListStreamItemType(Enum): + """The type of event""" - def __init__(self, id: str) -> None: - self.id = id + ITEM = "item" + + +class MagicPromptListStreamItem: + data: MagicPromptListStreamItemData + """Instance list properties""" + + type: MagicPromptListStreamItemType + """The type of event""" + + def __init__(self, data: MagicPromptListStreamItemData, type: MagicPromptListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'FileUpdateResponse': + def from_dict(obj: Any) -> 'MagicPromptListStreamItem': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return FileUpdateResponse(id) + data = MagicPromptListStreamItemData.from_dict(obj.get("data")) + type = MagicPromptListStreamItemType(obj.get("type")) + return MagicPromptListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["data"] = to_class(MagicPromptListStreamItemData, self.data) + result["type"] = to_enum(MagicPromptListStreamItemType, self.type) return result -class FileUploadParams: - file_id: str +class MagicFromPromptGenerateParams: + prompt_id: str + """The ID of the prompt to use for generation""" - def __init__(self, file_id: str) -> None: - self.file_id = file_id + def __init__(self, prompt_id: str) -> None: + self.prompt_id = prompt_id @staticmethod - def from_dict(obj: Any) -> 'FileUploadParams': + def from_dict(obj: Any) -> 'MagicFromPromptGenerateParams': assert isinstance(obj, dict) - file_id = from_str(obj.get("fileId")) - return FileUploadParams(file_id) + prompt_id = from_str(obj.get("promptId")) + return MagicFromPromptGenerateParams(prompt_id) def to_dict(self) -> dict: result: dict = {} - result["fileId"] = from_str(self.file_id) + result["promptId"] = from_str(self.prompt_id) return result -class FluffyFile: - """The file definition to upload""" - - name: Optional[str] - """The file name""" +class MagicFromPromptGenerateRequest: + model: Optional[str] + """Optional language model to use for generation""" - size: float - """The file size""" + props: Optional[Dict[str, Any]] + """Additional properties to pass to the prompt""" - type: str - """The file type""" + text: str + """The text to use as input""" - def __init__(self, name: Optional[str], size: float, type: str) -> None: - self.name = name - self.size = size - self.type = type + def __init__(self, model: Optional[str], props: Optional[Dict[str, Any]], text: str) -> None: + self.model = model + self.props = props + self.text = text @staticmethod - def from_dict(obj: Any) -> 'FluffyFile': + def from_dict(obj: Any) -> 'MagicFromPromptGenerateRequest': assert isinstance(obj, dict) - name = from_union([from_str, from_none], obj.get("name")) - size = from_float(obj.get("size")) - type = from_str(obj.get("type")) - return FluffyFile(name, size, type) + model = from_union([from_str, from_none], obj.get("model")) + props = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("props")) + text = from_str(obj.get("text")) + return MagicFromPromptGenerateRequest(model, props, text) def to_dict(self) -> dict: result: dict = {} - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - result["size"] = to_float(self.size) - result["type"] = from_str(self.type) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) + if self.props is not None: + result["props"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.props) + result["text"] = from_str(self.text) return result -class FileUploadRequest: - file: Union[str, FluffyFile] - """The file to upload either as http: or data: URL - - The file definition to upload - """ +class MagicFromPromptGenerateResponseUsage: + """Usage information""" - def __init__(self, file: Union[str, FluffyFile]) -> None: - self.file = file + token: float + """The tokens used in this exchange""" + + def __init__(self, token: float) -> None: + self.token = token @staticmethod - def from_dict(obj: Any) -> 'FileUploadRequest': + def from_dict(obj: Any) -> 'MagicFromPromptGenerateResponseUsage': assert isinstance(obj, dict) - file = from_union([from_str, FluffyFile.from_dict], obj.get("file")) - return FileUploadRequest(file) + token = from_float(obj.get("token")) + return MagicFromPromptGenerateResponseUsage(token) def to_dict(self) -> dict: result: dict = {} - result["file"] = from_union([from_str, lambda x: to_class(FluffyFile, x)], self.file) + result["token"] = to_float(self.token) return result -class FileUploadResponseUploadRequest: - """The request required to upload the file""" - - headers: Dict[str, Any] - """The HTTP headers to use""" - - method: str - """The HTTP method to use""" +class MagicFromPromptGenerateResponse: + text: str + """The input text""" - url: str - """The HTTP url to use""" + usage: MagicFromPromptGenerateResponseUsage + """Usage information""" - def __init__(self, headers: Dict[str, Any], method: str, url: str) -> None: - self.headers = headers - self.method = method - self.url = url + def __init__(self, text: str, usage: MagicFromPromptGenerateResponseUsage) -> None: + self.text = text + self.usage = usage @staticmethod - def from_dict(obj: Any) -> 'FileUploadResponseUploadRequest': + def from_dict(obj: Any) -> 'MagicFromPromptGenerateResponse': assert isinstance(obj, dict) - headers = from_dict(lambda x: x, obj.get("headers")) - method = from_str(obj.get("method")) - url = from_str(obj.get("url")) - return FileUploadResponseUploadRequest(headers, method, url) + text = from_str(obj.get("text")) + usage = MagicFromPromptGenerateResponseUsage.from_dict(obj.get("usage")) + return MagicFromPromptGenerateResponse(text, usage) def to_dict(self) -> dict: result: dict = {} - result["headers"] = from_dict(lambda x: x, self.headers) - result["method"] = from_str(self.method) - result["url"] = from_str(self.url) + result["text"] = from_str(self.text) + result["usage"] = to_class(MagicFromPromptGenerateResponseUsage, self.usage) return result -class FileUploadResponse: - id: str - """The ID of the upload file""" +class FluffyUsage: + """Usage information""" - upload_request: Optional[FileUploadResponseUploadRequest] - """The request required to upload the file""" + token: float + """The tokens used in this exchange""" - def __init__(self, id: str, upload_request: Optional[FileUploadResponseUploadRequest]) -> None: - self.id = id - self.upload_request = upload_request + def __init__(self, token: float) -> None: + self.token = token @staticmethod - def from_dict(obj: Any) -> 'FileUploadResponse': + def from_dict(obj: Any) -> 'FluffyUsage': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - upload_request = from_union([FileUploadResponseUploadRequest.from_dict, from_none], obj.get("uploadRequest")) - return FileUploadResponse(id, upload_request) + token = from_float(obj.get("token")) + return FluffyUsage(token) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) - if self.upload_request is not None: - result["uploadRequest"] = from_union([lambda x: to_class(FileUploadResponseUploadRequest, x), from_none], self.upload_request) + result["token"] = to_float(self.token) return result -class FileCreateRequestVisibility(Enum): - """The file visibility""" - - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" - - -class FileCreateRequest: - """Blueprint properties""" - - alias: Optional[str] - """The unique alias for the instance""" - - blueprint_id: Optional[str] - """The ID of the blueprint""" - - description: Optional[str] - """The associated description""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: Optional[str] - """The associated name""" +class MagicFromPromptGenerateStreamItemData: + text: str + """The input text""" - visibility: Optional[FileCreateRequestVisibility] - """The file visibility""" + usage: FluffyUsage + """Usage information""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], visibility: Optional[FileCreateRequestVisibility]) -> None: - self.alias = alias - self.blueprint_id = blueprint_id - self.description = description - self.meta = meta - self.name = name - self.visibility = visibility + def __init__(self, text: str, usage: FluffyUsage) -> None: + self.text = text + self.usage = usage @staticmethod - def from_dict(obj: Any) -> 'FileCreateRequest': + def from_dict(obj: Any) -> 'MagicFromPromptGenerateStreamItemData': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - description = from_union([from_str, from_none], obj.get("description")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - visibility = from_union([FileCreateRequestVisibility, from_none], obj.get("visibility")) - return FileCreateRequest(alias, blueprint_id, description, meta, name, visibility) + text = from_str(obj.get("text")) + usage = FluffyUsage.from_dict(obj.get("usage")) + return MagicFromPromptGenerateStreamItemData(text, usage) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(FileCreateRequestVisibility, x), from_none], self.visibility) + result["text"] = from_str(self.text) + result["usage"] = to_class(FluffyUsage, self.usage) return result -class FileCreateResponse: - id: str - """The ID of the created file""" +class MagicFromPromptGenerateStreamItemType(Enum): + """The generated text""" - def __init__(self, id: str) -> None: - self.id = id + RESULT = "result" + + +class MagicFromPromptGenerateStreamItem: + data: MagicFromPromptGenerateStreamItemData + type: MagicFromPromptGenerateStreamItemType + """The generated text""" + + def __init__(self, data: MagicFromPromptGenerateStreamItemData, type: MagicFromPromptGenerateStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'FileCreateResponse': + def from_dict(obj: Any) -> 'MagicFromPromptGenerateStreamItem': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return FileCreateResponse(id) + data = MagicFromPromptGenerateStreamItemData.from_dict(obj.get("data")) + type = MagicFromPromptGenerateStreamItemType(obj.get("type")) + return MagicFromPromptGenerateStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["data"] = to_class(MagicFromPromptGenerateStreamItemData, self.data) + result["type"] = to_enum(MagicFromPromptGenerateStreamItemType, self.type) return result -class FileListParamsOrder(Enum): +class IntegrationWidgetListParamsOrder(Enum): """The order of the paginated items""" ASC = "asc" DESC = "desc" -class FileListParams: +class IntegrationWidgetListParams: cursor: Optional[str] """The cursor to use for pagination""" meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" + """Key-value pairs to filter the items by metadata""" - order: Optional[FileListParamsOrder] + order: Optional[IntegrationWidgetListParamsOrder] """The order of the paginated items""" take: Optional[int] """The number of items to retrieve""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[FileListParamsOrder], take: Optional[int]) -> None: + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationWidgetListParamsOrder], take: Optional[int]) -> None: self.cursor = cursor self.meta = meta self.order = order self.take = take @staticmethod - def from_dict(obj: Any) -> 'FileListParams': + def from_dict(obj: Any) -> 'IntegrationWidgetListParams': assert isinstance(obj, dict) cursor = from_union([from_str, from_none], obj.get("cursor")) meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([FileListParamsOrder, from_none], obj.get("order")) + order = from_union([IntegrationWidgetListParamsOrder, from_none], obj.get("order")) take = from_union([from_int, from_none], obj.get("take")) - return FileListParams(cursor, meta, order, take) + return IntegrationWidgetListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} @@ -18894,303 +15981,318 @@ def to_dict(self) -> dict: if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(FileListParamsOrder, x), from_none], self.order) + result["order"] = from_union([lambda x: to_enum(IntegrationWidgetListParamsOrder, x), from_none], self.order) if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) - return result - - -class CunningVisibility(Enum): - """The file visibility""" - - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" - - -class FileListResponseItem: - """Blueprint properties""" - - alias: Optional[str] - """The unique alias for the instance""" - - blueprint_id: Optional[str] - """The ID of the blueprint""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - description: Optional[str] - """The associated description""" - - id: str - """The instance ID""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: Optional[str] - """The associated name""" - - updated_at: float - """The timestamp (ms) when the instance was updated""" - - visibility: Optional[CunningVisibility] - """The file visibility""" - - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float, visibility: Optional[CunningVisibility]) -> None: - self.alias = alias - self.blueprint_id = blueprint_id - self.created_at = created_at - self.description = description - self.id = id - self.meta = meta - self.name = name - self.updated_at = updated_at - self.visibility = visibility - - @staticmethod - def from_dict(obj: Any) -> 'FileListResponseItem': - assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - updated_at = from_float(obj.get("updatedAt")) - visibility = from_union([CunningVisibility, from_none], obj.get("visibility")) - return FileListResponseItem(alias, blueprint_id, created_at, description, id, meta, name, updated_at, visibility) - - def to_dict(self) -> dict: - result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - result["updatedAt"] = to_float(self.updated_at) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(CunningVisibility, x), from_none], self.visibility) - return result - - -class FileListResponse: - cursor: str - """Cursor for fetching the next page""" - - items: List[FileListResponseItem] - - def __init__(self, cursor: str, items: List[FileListResponseItem]) -> None: - self.cursor = cursor - self.items = items - - @staticmethod - def from_dict(obj: Any) -> 'FileListResponse': - assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(FileListResponseItem.from_dict, obj.get("items")) - return FileListResponse(cursor, items) - - def to_dict(self) -> dict: - result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(FileListResponseItem, x), self.items) + result["take"] = from_union([from_int, from_none], self.take) return result -class MagentaVisibility(Enum): - """The file visibility""" - - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" - - -class FileListStreamItemData: - """Blueprint properties""" +class IntegrationWidgetListResponseItem: + """A bot configuration that can be applied without a dedicated bot instance.""" alias: Optional[str] """The unique alias for the instance""" + attachments: Optional[bool] + """Weather the Widget integration supports attachments""" + + auto_scroll: Optional[bool] + """Whether the Widget integration auto scrolls""" + blueprint_id: Optional[str] """The ID of the blueprint""" + bot_id: Optional[str] + """The ID of the bot this configuration is using""" + + carousel: Optional[bool] + """Weather the Widget integration supports carousels""" + + contact_collection: Optional[bool] + """Whether the Widget integration collects contacts""" + created_at: float """The timestamp (ms) when the instance was created""" description: Optional[str] """The associated description""" + export_conversation: Optional[bool] + """Controls whether the Widget allows exporting the current conversation""" + + form: Optional[bool] + """Weather the Widget integration supports forms""" + id: str """The instance ID""" + initial: Optional[str] + """The initial message of the Widget integration""" + + intro: Optional[str] + """The intro of the Widget integration""" + + language: Optional[str] + """The language of the Widget integration""" + + layout: Optional[str] + """The default layout of the Widget integration""" + + math: Optional[bool] + """Weather the Widget integration supports math""" + + maximize: Optional[bool] + """Controls whether the Widget allows maximizing the conversation""" + + message_peek: Optional[bool] + """Controls whether the Widget allows peeking at the initial messages""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" + origin: Optional[str] + """The origin URLs of the Widget integration""" + + placeholder: Optional[str] + """The input placeholder of the Widget integration""" + + plugins: Optional[str] + """The plugins of the Widget integration""" + + powered_by: Optional[bool] + """Whether the Widget integration displays powered by""" + + restart_conversation: Optional[bool] + """Controls whether the Widget allows restarting the conversation""" + + session_duration: Optional[float] + """The session duration of the Widget integration""" + + start_first: Optional[bool] + """Whether the Widget integration starts first""" + + stream: Optional[bool] + """Whether the Widget integration is streaming""" + + theme: Optional[str] + """The theme of the Widget integration""" + + title: Optional[str] + """The title of the Widget integration""" + + tools: Optional[bool] + """Whether the Widget integration has tools""" + + unfurl: Optional[bool] + """Whether the Widget integration unfurls links""" + updated_at: float """The timestamp (ms) when the instance was updated""" - visibility: Optional[MagentaVisibility] - """The file visibility""" + verbose: Optional[bool] + """Whether the Widget integration is verbose""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float, visibility: Optional[MagentaVisibility]) -> None: + voice_in: Optional[bool] + """Whether the Widget integration supports voice input""" + + voice_out: Optional[bool] + """Whether the Widget integration supports voice output""" + + def __init__(self, alias: Optional[str], attachments: Optional[bool], auto_scroll: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], carousel: Optional[bool], contact_collection: Optional[bool], created_at: float, description: Optional[str], export_conversation: Optional[bool], form: Optional[bool], id: str, initial: Optional[str], intro: Optional[str], language: Optional[str], layout: Optional[str], math: Optional[bool], maximize: Optional[bool], message_peek: Optional[bool], meta: Optional[Dict[str, Any]], name: Optional[str], origin: Optional[str], placeholder: Optional[str], plugins: Optional[str], powered_by: Optional[bool], restart_conversation: Optional[bool], session_duration: Optional[float], start_first: Optional[bool], stream: Optional[bool], theme: Optional[str], title: Optional[str], tools: Optional[bool], unfurl: Optional[bool], updated_at: float, verbose: Optional[bool], voice_in: Optional[bool], voice_out: Optional[bool]) -> None: self.alias = alias + self.attachments = attachments + self.auto_scroll = auto_scroll self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.carousel = carousel + self.contact_collection = contact_collection self.created_at = created_at self.description = description + self.export_conversation = export_conversation + self.form = form self.id = id + self.initial = initial + self.intro = intro + self.language = language + self.layout = layout + self.math = math + self.maximize = maximize + self.message_peek = message_peek self.meta = meta self.name = name + self.origin = origin + self.placeholder = placeholder + self.plugins = plugins + self.powered_by = powered_by + self.restart_conversation = restart_conversation + self.session_duration = session_duration + self.start_first = start_first + self.stream = stream + self.theme = theme + self.title = title + self.tools = tools + self.unfurl = unfurl self.updated_at = updated_at - self.visibility = visibility + self.verbose = verbose + self.voice_in = voice_in + self.voice_out = voice_out @staticmethod - def from_dict(obj: Any) -> 'FileListStreamItemData': + def from_dict(obj: Any) -> 'IntegrationWidgetListResponseItem': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) + auto_scroll = from_union([from_bool, from_none], obj.get("autoScroll")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + carousel = from_union([from_bool, from_none], obj.get("carousel")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + export_conversation = from_union([from_bool, from_none], obj.get("exportConversation")) + form = from_union([from_bool, from_none], obj.get("form")) id = from_str(obj.get("id")) + initial = from_union([from_str, from_none], obj.get("initial")) + intro = from_union([from_str, from_none], obj.get("intro")) + language = from_union([from_str, from_none], obj.get("language")) + layout = from_union([from_str, from_none], obj.get("layout")) + math = from_union([from_bool, from_none], obj.get("math")) + maximize = from_union([from_bool, from_none], obj.get("maximize")) + message_peek = from_union([from_bool, from_none], obj.get("messagePeek")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) + origin = from_union([from_str, from_none], obj.get("origin")) + placeholder = from_union([from_str, from_none], obj.get("placeholder")) + plugins = from_union([from_str, from_none], obj.get("plugins")) + powered_by = from_union([from_bool, from_none], obj.get("poweredBy")) + restart_conversation = from_union([from_bool, from_none], obj.get("restartConversation")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + start_first = from_union([from_bool, from_none], obj.get("startFirst")) + stream = from_union([from_bool, from_none], obj.get("stream")) + theme = from_union([from_str, from_none], obj.get("theme")) + title = from_union([from_str, from_none], obj.get("title")) + tools = from_union([from_bool, from_none], obj.get("tools")) + unfurl = from_union([from_bool, from_none], obj.get("unfurl")) updated_at = from_float(obj.get("updatedAt")) - visibility = from_union([MagentaVisibility, from_none], obj.get("visibility")) - return FileListStreamItemData(alias, blueprint_id, created_at, description, id, meta, name, updated_at, visibility) + verbose = from_union([from_bool, from_none], obj.get("verbose")) + voice_in = from_union([from_bool, from_none], obj.get("voiceIn")) + voice_out = from_union([from_bool, from_none], obj.get("voiceOut")) + return IntegrationWidgetListResponseItem(alias, attachments, auto_scroll, blueprint_id, bot_id, carousel, contact_collection, created_at, description, export_conversation, form, id, initial, intro, language, layout, math, maximize, message_peek, meta, name, origin, placeholder, plugins, powered_by, restart_conversation, session_duration, start_first, stream, theme, title, tools, unfurl, updated_at, verbose, voice_in, voice_out) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) + if self.auto_scroll is not None: + result["autoScroll"] = from_union([from_bool, from_none], self.auto_scroll) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.carousel is not None: + result["carousel"] = from_union([from_bool, from_none], self.carousel) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.export_conversation is not None: + result["exportConversation"] = from_union([from_bool, from_none], self.export_conversation) + if self.form is not None: + result["form"] = from_union([from_bool, from_none], self.form) result["id"] = from_str(self.id) + if self.initial is not None: + result["initial"] = from_union([from_str, from_none], self.initial) + if self.intro is not None: + result["intro"] = from_union([from_str, from_none], self.intro) + if self.language is not None: + result["language"] = from_union([from_str, from_none], self.language) + if self.layout is not None: + result["layout"] = from_union([from_str, from_none], self.layout) + if self.math is not None: + result["math"] = from_union([from_bool, from_none], self.math) + if self.maximize is not None: + result["maximize"] = from_union([from_bool, from_none], self.maximize) + if self.message_peek is not None: + result["messagePeek"] = from_union([from_bool, from_none], self.message_peek) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.origin is not None: + result["origin"] = from_union([from_str, from_none], self.origin) + if self.placeholder is not None: + result["placeholder"] = from_union([from_str, from_none], self.placeholder) + if self.plugins is not None: + result["plugins"] = from_union([from_str, from_none], self.plugins) + if self.powered_by is not None: + result["poweredBy"] = from_union([from_bool, from_none], self.powered_by) + if self.restart_conversation is not None: + result["restartConversation"] = from_union([from_bool, from_none], self.restart_conversation) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.start_first is not None: + result["startFirst"] = from_union([from_bool, from_none], self.start_first) + if self.stream is not None: + result["stream"] = from_union([from_bool, from_none], self.stream) + if self.theme is not None: + result["theme"] = from_union([from_str, from_none], self.theme) + if self.title is not None: + result["title"] = from_union([from_str, from_none], self.title) + if self.tools is not None: + result["tools"] = from_union([from_bool, from_none], self.tools) + if self.unfurl is not None: + result["unfurl"] = from_union([from_bool, from_none], self.unfurl) result["updatedAt"] = to_float(self.updated_at) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(MagentaVisibility, x), from_none], self.visibility) - return result - - -class FileListStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - - -class FileListStreamItem: - data: FileListStreamItemData - """Blueprint properties""" - - type: FileListStreamItemType - """The type of event""" - - def __init__(self, data: FileListStreamItemData, type: FileListStreamItemType) -> None: - self.data = data - self.type = type - - @staticmethod - def from_dict(obj: Any) -> 'FileListStreamItem': - assert isinstance(obj, dict) - data = FileListStreamItemData.from_dict(obj.get("data")) - type = FileListStreamItemType(obj.get("type")) - return FileListStreamItem(data, type) - - def to_dict(self) -> dict: - result: dict = {} - result["data"] = to_class(FileListStreamItemData, self.data) - result["type"] = to_enum(FileListStreamItemType, self.type) - return result - - -class IntegrationDiscordDeleteParams: - discord_integration_id: str - """The ID of the Discord integration""" - - def __init__(self, discord_integration_id: str) -> None: - self.discord_integration_id = discord_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationDiscordDeleteParams': - assert isinstance(obj, dict) - discord_integration_id = from_str(obj.get("discordIntegrationId")) - return IntegrationDiscordDeleteParams(discord_integration_id) - - def to_dict(self) -> dict: - result: dict = {} - result["discordIntegrationId"] = from_str(self.discord_integration_id) + if self.verbose is not None: + result["verbose"] = from_union([from_bool, from_none], self.verbose) + if self.voice_in is not None: + result["voiceIn"] = from_union([from_bool, from_none], self.voice_in) + if self.voice_out is not None: + result["voiceOut"] = from_union([from_bool, from_none], self.voice_out) return result -class IntegrationDiscordDeleteResponse: - id: str - """The ID of the deleted Discord integration""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationDiscordDeleteResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return IntegrationDiscordDeleteResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - +class IntegrationWidgetListResponse: + cursor: str + """Cursor for fetching the next page""" -class IntegrationDiscordFetchParams: - discord_integration_id: str - """The ID of the Discord integration to retrieve""" + items: List[IntegrationWidgetListResponseItem] - def __init__(self, discord_integration_id: str) -> None: - self.discord_integration_id = discord_integration_id + def __init__(self, cursor: str, items: List[IntegrationWidgetListResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'IntegrationDiscordFetchParams': + def from_dict(obj: Any) -> 'IntegrationWidgetListResponse': assert isinstance(obj, dict) - discord_integration_id = from_str(obj.get("discordIntegrationId")) - return IntegrationDiscordFetchParams(discord_integration_id) + cursor = from_str(obj.get("cursor")) + items = from_list(IntegrationWidgetListResponseItem.from_dict, obj.get("items")) + return IntegrationWidgetListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["discordIntegrationId"] = from_str(self.discord_integration_id) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(IntegrationWidgetListResponseItem, x), self.items) return result -class IntegrationDiscordFetchResponse: - """Blueprint properties""" +class IntegrationWidgetListStreamItemData: + """A bot configuration that can be applied without a dedicated bot instance.""" alias: Optional[str] """The unique alias for the instance""" - allow_from: Optional[str] - """Restrict which Discord users can interact with this integration. Accepts Discord user IDs - (17-18 digit snowflakes) or @username, one per line. Use * to allow all senders. Leave - empty to deny all. - """ - app_id: Optional[str] - """The Discord application ID""" + attachments: Optional[bool] + """Weather the Widget integration supports attachments""" + + auto_scroll: Optional[bool] + """Whether the Widget integration auto scrolls""" blueprint_id: Optional[str] """The ID of the blueprint""" @@ -19198,8 +16300,11 @@ class IntegrationDiscordFetchResponse: bot_id: Optional[str] """The ID of the bot this configuration is using""" + carousel: Optional[bool] + """Weather the Widget integration supports carousels""" + contact_collection: Optional[bool] - """Weather to collect contacts""" + """Whether the Widget integration collects contacts""" created_at: float """The timestamp (ms) when the instance was created""" @@ -19207,159 +16312,289 @@ class IntegrationDiscordFetchResponse: description: Optional[str] """The associated description""" - handle: Optional[str] - """The Discord command handle""" + export_conversation: Optional[bool] + """Controls whether the Widget allows exporting the current conversation""" + + form: Optional[bool] + """Weather the Widget integration supports forms""" id: str """The instance ID""" + initial: Optional[str] + """The initial message of the Widget integration""" + + intro: Optional[str] + """The intro of the Widget integration""" + + language: Optional[str] + """The language of the Widget integration""" + + layout: Optional[str] + """The default layout of the Widget integration""" + + math: Optional[bool] + """Weather the Widget integration supports math""" + + maximize: Optional[bool] + """Controls whether the Widget allows maximizing the conversation""" + + message_peek: Optional[bool] + """Controls whether the Widget allows peeking at the initial messages""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" + origin: Optional[str] + """The origin URLs of the Widget integration""" + + placeholder: Optional[str] + """The input placeholder of the Widget integration""" + + plugins: Optional[str] + """The plugins of the Widget integration""" + + powered_by: Optional[bool] + """Whether the Widget integration displays powered by""" + + restart_conversation: Optional[bool] + """Controls whether the Widget allows restarting the conversation""" + session_duration: Optional[float] - """The chat session duration""" + """The session duration of the Widget integration""" + + start_first: Optional[bool] + """Whether the Widget integration starts first""" + + stream: Optional[bool] + """Whether the Widget integration is streaming""" + + theme: Optional[str] + """The theme of the Widget integration""" + + title: Optional[str] + """The title of the Widget integration""" + + tools: Optional[bool] + """Whether the Widget integration has tools""" + + unfurl: Optional[bool] + """Whether the Widget integration unfurls links""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], app_id: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], handle: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float) -> None: + verbose: Optional[bool] + """Whether the Widget integration is verbose""" + + voice_in: Optional[bool] + """Whether the Widget integration supports voice input""" + + voice_out: Optional[bool] + """Whether the Widget integration supports voice output""" + + def __init__(self, alias: Optional[str], attachments: Optional[bool], auto_scroll: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], carousel: Optional[bool], contact_collection: Optional[bool], created_at: float, description: Optional[str], export_conversation: Optional[bool], form: Optional[bool], id: str, initial: Optional[str], intro: Optional[str], language: Optional[str], layout: Optional[str], math: Optional[bool], maximize: Optional[bool], message_peek: Optional[bool], meta: Optional[Dict[str, Any]], name: Optional[str], origin: Optional[str], placeholder: Optional[str], plugins: Optional[str], powered_by: Optional[bool], restart_conversation: Optional[bool], session_duration: Optional[float], start_first: Optional[bool], stream: Optional[bool], theme: Optional[str], title: Optional[str], tools: Optional[bool], unfurl: Optional[bool], updated_at: float, verbose: Optional[bool], voice_in: Optional[bool], voice_out: Optional[bool]) -> None: self.alias = alias - self.allow_from = allow_from - self.app_id = app_id + self.attachments = attachments + self.auto_scroll = auto_scroll self.blueprint_id = blueprint_id self.bot_id = bot_id + self.carousel = carousel self.contact_collection = contact_collection self.created_at = created_at self.description = description - self.handle = handle + self.export_conversation = export_conversation + self.form = form self.id = id + self.initial = initial + self.intro = intro + self.language = language + self.layout = layout + self.math = math + self.maximize = maximize + self.message_peek = message_peek self.meta = meta self.name = name + self.origin = origin + self.placeholder = placeholder + self.plugins = plugins + self.powered_by = powered_by + self.restart_conversation = restart_conversation self.session_duration = session_duration + self.start_first = start_first + self.stream = stream + self.theme = theme + self.title = title + self.tools = tools + self.unfurl = unfurl self.updated_at = updated_at + self.verbose = verbose + self.voice_in = voice_in + self.voice_out = voice_out @staticmethod - def from_dict(obj: Any) -> 'IntegrationDiscordFetchResponse': + def from_dict(obj: Any) -> 'IntegrationWidgetListStreamItemData': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) - allow_from = from_union([from_str, from_none], obj.get("allowFrom")) - app_id = from_union([from_str, from_none], obj.get("appId")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) + auto_scroll = from_union([from_bool, from_none], obj.get("autoScroll")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) + carousel = from_union([from_bool, from_none], obj.get("carousel")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - handle = from_union([from_str, from_none], obj.get("handle")) + export_conversation = from_union([from_bool, from_none], obj.get("exportConversation")) + form = from_union([from_bool, from_none], obj.get("form")) id = from_str(obj.get("id")) + initial = from_union([from_str, from_none], obj.get("initial")) + intro = from_union([from_str, from_none], obj.get("intro")) + language = from_union([from_str, from_none], obj.get("language")) + layout = from_union([from_str, from_none], obj.get("layout")) + math = from_union([from_bool, from_none], obj.get("math")) + maximize = from_union([from_bool, from_none], obj.get("maximize")) + message_peek = from_union([from_bool, from_none], obj.get("messagePeek")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) + origin = from_union([from_str, from_none], obj.get("origin")) + placeholder = from_union([from_str, from_none], obj.get("placeholder")) + plugins = from_union([from_str, from_none], obj.get("plugins")) + powered_by = from_union([from_bool, from_none], obj.get("poweredBy")) + restart_conversation = from_union([from_bool, from_none], obj.get("restartConversation")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + start_first = from_union([from_bool, from_none], obj.get("startFirst")) + stream = from_union([from_bool, from_none], obj.get("stream")) + theme = from_union([from_str, from_none], obj.get("theme")) + title = from_union([from_str, from_none], obj.get("title")) + tools = from_union([from_bool, from_none], obj.get("tools")) + unfurl = from_union([from_bool, from_none], obj.get("unfurl")) updated_at = from_float(obj.get("updatedAt")) - return IntegrationDiscordFetchResponse(alias, allow_from, app_id, blueprint_id, bot_id, contact_collection, created_at, description, handle, id, meta, name, session_duration, updated_at) + verbose = from_union([from_bool, from_none], obj.get("verbose")) + voice_in = from_union([from_bool, from_none], obj.get("voiceIn")) + voice_out = from_union([from_bool, from_none], obj.get("voiceOut")) + return IntegrationWidgetListStreamItemData(alias, attachments, auto_scroll, blueprint_id, bot_id, carousel, contact_collection, created_at, description, export_conversation, form, id, initial, intro, language, layout, math, maximize, message_peek, meta, name, origin, placeholder, plugins, powered_by, restart_conversation, session_duration, start_first, stream, theme, title, tools, unfurl, updated_at, verbose, voice_in, voice_out) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.allow_from is not None: - result["allowFrom"] = from_union([from_str, from_none], self.allow_from) - if self.app_id is not None: - result["appId"] = from_union([from_str, from_none], self.app_id) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) + if self.auto_scroll is not None: + result["autoScroll"] = from_union([from_bool, from_none], self.auto_scroll) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.carousel is not None: + result["carousel"] = from_union([from_bool, from_none], self.carousel) if self.contact_collection is not None: result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.handle is not None: - result["handle"] = from_union([from_str, from_none], self.handle) + if self.export_conversation is not None: + result["exportConversation"] = from_union([from_bool, from_none], self.export_conversation) + if self.form is not None: + result["form"] = from_union([from_bool, from_none], self.form) result["id"] = from_str(self.id) + if self.initial is not None: + result["initial"] = from_union([from_str, from_none], self.initial) + if self.intro is not None: + result["intro"] = from_union([from_str, from_none], self.intro) + if self.language is not None: + result["language"] = from_union([from_str, from_none], self.language) + if self.layout is not None: + result["layout"] = from_union([from_str, from_none], self.layout) + if self.math is not None: + result["math"] = from_union([from_bool, from_none], self.math) + if self.maximize is not None: + result["maximize"] = from_union([from_bool, from_none], self.maximize) + if self.message_peek is not None: + result["messagePeek"] = from_union([from_bool, from_none], self.message_peek) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.origin is not None: + result["origin"] = from_union([from_str, from_none], self.origin) + if self.placeholder is not None: + result["placeholder"] = from_union([from_str, from_none], self.placeholder) + if self.plugins is not None: + result["plugins"] = from_union([from_str, from_none], self.plugins) + if self.powered_by is not None: + result["poweredBy"] = from_union([from_bool, from_none], self.powered_by) + if self.restart_conversation is not None: + result["restartConversation"] = from_union([from_bool, from_none], self.restart_conversation) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.start_first is not None: + result["startFirst"] = from_union([from_bool, from_none], self.start_first) + if self.stream is not None: + result["stream"] = from_union([from_bool, from_none], self.stream) + if self.theme is not None: + result["theme"] = from_union([from_str, from_none], self.theme) + if self.title is not None: + result["title"] = from_union([from_str, from_none], self.title) + if self.tools is not None: + result["tools"] = from_union([from_bool, from_none], self.tools) + if self.unfurl is not None: + result["unfurl"] = from_union([from_bool, from_none], self.unfurl) result["updatedAt"] = to_float(self.updated_at) + if self.verbose is not None: + result["verbose"] = from_union([from_bool, from_none], self.verbose) + if self.voice_in is not None: + result["voiceIn"] = from_union([from_bool, from_none], self.voice_in) + if self.voice_out is not None: + result["voiceOut"] = from_union([from_bool, from_none], self.voice_out) return result -class IntegrationDiscordSetupParams: - discord_integration_id: str - """The ID of the Discord integration""" - - def __init__(self, discord_integration_id: str) -> None: - self.discord_integration_id = discord_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationDiscordSetupParams': - assert isinstance(obj, dict) - discord_integration_id = from_str(obj.get("discordIntegrationId")) - return IntegrationDiscordSetupParams(discord_integration_id) - - def to_dict(self) -> dict: - result: dict = {} - result["discordIntegrationId"] = from_str(self.discord_integration_id) - return result - - -class IntegrationDiscordSetupResponse: - id: str - """The ID of the setup Discord integration""" - - def __init__(self, id: str) -> None: - self.id = id +class IntegrationWidgetListStreamItemType(Enum): + """The type of event""" - @staticmethod - def from_dict(obj: Any) -> 'IntegrationDiscordSetupResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return IntegrationDiscordSetupResponse(id) + ITEM = "item" - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result +class IntegrationWidgetListStreamItem: + data: IntegrationWidgetListStreamItemData + """A bot configuration that can be applied without a dedicated bot instance.""" -class IntegrationDiscordUpdateParams: - discord_integration_id: str - """The ID of the Discord integration""" + type: IntegrationWidgetListStreamItemType + """The type of event""" - def __init__(self, discord_integration_id: str) -> None: - self.discord_integration_id = discord_integration_id + def __init__(self, data: IntegrationWidgetListStreamItemData, type: IntegrationWidgetListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'IntegrationDiscordUpdateParams': + def from_dict(obj: Any) -> 'IntegrationWidgetListStreamItem': assert isinstance(obj, dict) - discord_integration_id = from_str(obj.get("discordIntegrationId")) - return IntegrationDiscordUpdateParams(discord_integration_id) + data = IntegrationWidgetListStreamItemData.from_dict(obj.get("data")) + type = IntegrationWidgetListStreamItemType(obj.get("type")) + return IntegrationWidgetListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["discordIntegrationId"] = from_str(self.discord_integration_id) + result["data"] = to_class(IntegrationWidgetListStreamItemData, self.data) + result["type"] = to_enum(IntegrationWidgetListStreamItemType, self.type) return result -class IntegrationDiscordUpdateRequest: +class IntegrationWidgetCreateRequest: """A bot configuration that can be applied without a dedicated bot instance.""" alias: Optional[str] """The unique alias for the instance""" - allow_from: Optional[str] - """Restrict which Discord users can interact with this integration. Accepts Discord user IDs - (17-18 digit snowflakes) or @username, one per line. Use * to allow all senders. Leave - empty to deny all. - """ - app_id: Optional[str] - """The Discord application ID""" + attachments: Optional[bool] + """Weather the Widget integration supports attachments""" + + auto_scroll: Optional[bool] + """Whether the Widget integration auto scrolls""" blueprint_id: Optional[str] """The ID of the blueprint""" @@ -19367,17 +16602,41 @@ class IntegrationDiscordUpdateRequest: bot_id: Optional[str] """The ID of the bot this configuration is using""" - bot_token: Optional[str] - """The Discord bot token""" + carousel: Optional[bool] + """Weather the Widget integration supports carousels""" contact_collection: Optional[bool] - """Weather to collect contacts""" + """Whether the Widget integration collects contacts""" description: Optional[str] """The associated description""" - handle: Optional[str] - """The Discord command handle""" + export_conversation: Optional[bool] + """Controls whether the Widget allows exporting the current conversation""" + + form: Optional[bool] + """Weather the Widget integration supports forms""" + + initial: Optional[str] + """The initial message of the Widget integration""" + + intro: Optional[str] + """The intro of the Widget integration""" + + language: Optional[str] + """The language of the Widget integration""" + + layout: Optional[str] + """The default layout of the Widget integration""" + + math: Optional[bool] + """Weather the Widget integration supports math""" + + maximize: Optional[bool] + """Controls whether the Widget allows maximizing the conversation""" + + message_peek: Optional[bool] + """Controls whether the Widget allows peeking at the initial messages""" meta: Optional[Dict[str, Any]] """Meta data information""" @@ -19385,88 +16644,211 @@ class IntegrationDiscordUpdateRequest: name: Optional[str] """The associated name""" - public_key: Optional[str] - """The Discord public key""" + origin: Optional[str] + """The origin URLs of the Widget integration""" + + placeholder: Optional[str] + """The input placeholder of the Widget integration""" + + plugins: Optional[str] + """The plugins of the Widget integration""" + + powered_by: Optional[bool] + """Whether the Widget integration displays powered by""" + + restart_conversation: Optional[bool] + """Controls whether the Widget allows restarting the conversation""" session_duration: Optional[float] - """The chat session duration""" + """The session duration of the Widget integration""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], app_id: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], bot_token: Optional[str], contact_collection: Optional[bool], description: Optional[str], handle: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], public_key: Optional[str], session_duration: Optional[float]) -> None: + start_first: Optional[bool] + """Whether the Widget integration starts first""" + + stream: Optional[bool] + """Whether the Widget integration is streaming""" + + theme: Optional[str] + """The theme of the Widget integration""" + + title: Optional[str] + """The title of the Widget integration""" + + tools: Optional[bool] + """Whether the Widget integration has tools""" + + unfurl: Optional[bool] + """Whether the Widget integration unfurls links""" + + verbose: Optional[bool] + """Whether the Widget integration is verbose""" + + voice_in: Optional[bool] + """Controls whether the Widget allows voice input""" + + voice_out: Optional[bool] + """Controls whether the Widget allows voice output""" + + def __init__(self, alias: Optional[str], attachments: Optional[bool], auto_scroll: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], carousel: Optional[bool], contact_collection: Optional[bool], description: Optional[str], export_conversation: Optional[bool], form: Optional[bool], initial: Optional[str], intro: Optional[str], language: Optional[str], layout: Optional[str], math: Optional[bool], maximize: Optional[bool], message_peek: Optional[bool], meta: Optional[Dict[str, Any]], name: Optional[str], origin: Optional[str], placeholder: Optional[str], plugins: Optional[str], powered_by: Optional[bool], restart_conversation: Optional[bool], session_duration: Optional[float], start_first: Optional[bool], stream: Optional[bool], theme: Optional[str], title: Optional[str], tools: Optional[bool], unfurl: Optional[bool], verbose: Optional[bool], voice_in: Optional[bool], voice_out: Optional[bool]) -> None: self.alias = alias - self.allow_from = allow_from - self.app_id = app_id + self.attachments = attachments + self.auto_scroll = auto_scroll self.blueprint_id = blueprint_id self.bot_id = bot_id - self.bot_token = bot_token + self.carousel = carousel self.contact_collection = contact_collection self.description = description - self.handle = handle + self.export_conversation = export_conversation + self.form = form + self.initial = initial + self.intro = intro + self.language = language + self.layout = layout + self.math = math + self.maximize = maximize + self.message_peek = message_peek self.meta = meta self.name = name - self.public_key = public_key + self.origin = origin + self.placeholder = placeholder + self.plugins = plugins + self.powered_by = powered_by + self.restart_conversation = restart_conversation self.session_duration = session_duration + self.start_first = start_first + self.stream = stream + self.theme = theme + self.title = title + self.tools = tools + self.unfurl = unfurl + self.verbose = verbose + self.voice_in = voice_in + self.voice_out = voice_out @staticmethod - def from_dict(obj: Any) -> 'IntegrationDiscordUpdateRequest': + def from_dict(obj: Any) -> 'IntegrationWidgetCreateRequest': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) - allow_from = from_union([from_str, from_none], obj.get("allowFrom")) - app_id = from_union([from_str, from_none], obj.get("appId")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) + auto_scroll = from_union([from_bool, from_none], obj.get("autoScroll")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) - bot_token = from_union([from_str, from_none], obj.get("botToken")) + carousel = from_union([from_bool, from_none], obj.get("carousel")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) description = from_union([from_str, from_none], obj.get("description")) - handle = from_union([from_str, from_none], obj.get("handle")) + export_conversation = from_union([from_bool, from_none], obj.get("exportConversation")) + form = from_union([from_bool, from_none], obj.get("form")) + initial = from_union([from_str, from_none], obj.get("initial")) + intro = from_union([from_str, from_none], obj.get("intro")) + language = from_union([from_str, from_none], obj.get("language")) + layout = from_union([from_str, from_none], obj.get("layout")) + math = from_union([from_bool, from_none], obj.get("math")) + maximize = from_union([from_bool, from_none], obj.get("maximize")) + message_peek = from_union([from_bool, from_none], obj.get("messagePeek")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - public_key = from_union([from_str, from_none], obj.get("publicKey")) + origin = from_union([from_str, from_none], obj.get("origin")) + placeholder = from_union([from_str, from_none], obj.get("placeholder")) + plugins = from_union([from_str, from_none], obj.get("plugins")) + powered_by = from_union([from_bool, from_none], obj.get("poweredBy")) + restart_conversation = from_union([from_bool, from_none], obj.get("restartConversation")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - return IntegrationDiscordUpdateRequest(alias, allow_from, app_id, blueprint_id, bot_id, bot_token, contact_collection, description, handle, meta, name, public_key, session_duration) + start_first = from_union([from_bool, from_none], obj.get("startFirst")) + stream = from_union([from_bool, from_none], obj.get("stream")) + theme = from_union([from_str, from_none], obj.get("theme")) + title = from_union([from_str, from_none], obj.get("title")) + tools = from_union([from_bool, from_none], obj.get("tools")) + unfurl = from_union([from_bool, from_none], obj.get("unfurl")) + verbose = from_union([from_bool, from_none], obj.get("verbose")) + voice_in = from_union([from_bool, from_none], obj.get("voiceIn")) + voice_out = from_union([from_bool, from_none], obj.get("voiceOut")) + return IntegrationWidgetCreateRequest(alias, attachments, auto_scroll, blueprint_id, bot_id, carousel, contact_collection, description, export_conversation, form, initial, intro, language, layout, math, maximize, message_peek, meta, name, origin, placeholder, plugins, powered_by, restart_conversation, session_duration, start_first, stream, theme, title, tools, unfurl, verbose, voice_in, voice_out) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.allow_from is not None: - result["allowFrom"] = from_union([from_str, from_none], self.allow_from) - if self.app_id is not None: - result["appId"] = from_union([from_str, from_none], self.app_id) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) + if self.auto_scroll is not None: + result["autoScroll"] = from_union([from_bool, from_none], self.auto_scroll) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.bot_token is not None: - result["botToken"] = from_union([from_str, from_none], self.bot_token) + if self.carousel is not None: + result["carousel"] = from_union([from_bool, from_none], self.carousel) if self.contact_collection is not None: result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.handle is not None: - result["handle"] = from_union([from_str, from_none], self.handle) + if self.export_conversation is not None: + result["exportConversation"] = from_union([from_bool, from_none], self.export_conversation) + if self.form is not None: + result["form"] = from_union([from_bool, from_none], self.form) + if self.initial is not None: + result["initial"] = from_union([from_str, from_none], self.initial) + if self.intro is not None: + result["intro"] = from_union([from_str, from_none], self.intro) + if self.language is not None: + result["language"] = from_union([from_str, from_none], self.language) + if self.layout is not None: + result["layout"] = from_union([from_str, from_none], self.layout) + if self.math is not None: + result["math"] = from_union([from_bool, from_none], self.math) + if self.maximize is not None: + result["maximize"] = from_union([from_bool, from_none], self.maximize) + if self.message_peek is not None: + result["messagePeek"] = from_union([from_bool, from_none], self.message_peek) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.public_key is not None: - result["publicKey"] = from_union([from_str, from_none], self.public_key) + if self.origin is not None: + result["origin"] = from_union([from_str, from_none], self.origin) + if self.placeholder is not None: + result["placeholder"] = from_union([from_str, from_none], self.placeholder) + if self.plugins is not None: + result["plugins"] = from_union([from_str, from_none], self.plugins) + if self.powered_by is not None: + result["poweredBy"] = from_union([from_bool, from_none], self.powered_by) + if self.restart_conversation is not None: + result["restartConversation"] = from_union([from_bool, from_none], self.restart_conversation) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.start_first is not None: + result["startFirst"] = from_union([from_bool, from_none], self.start_first) + if self.stream is not None: + result["stream"] = from_union([from_bool, from_none], self.stream) + if self.theme is not None: + result["theme"] = from_union([from_str, from_none], self.theme) + if self.title is not None: + result["title"] = from_union([from_str, from_none], self.title) + if self.tools is not None: + result["tools"] = from_union([from_bool, from_none], self.tools) + if self.unfurl is not None: + result["unfurl"] = from_union([from_bool, from_none], self.unfurl) + if self.verbose is not None: + result["verbose"] = from_union([from_bool, from_none], self.verbose) + if self.voice_in is not None: + result["voiceIn"] = from_union([from_bool, from_none], self.voice_in) + if self.voice_out is not None: + result["voiceOut"] = from_union([from_bool, from_none], self.voice_out) return result -class IntegrationDiscordUpdateResponse: +class IntegrationWidgetCreateResponse: id: str - """The ID of the Discord Integration""" + """The ID of the Widget Integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationDiscordUpdateResponse': + def from_dict(obj: Any) -> 'IntegrationWidgetCreateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationDiscordUpdateResponse(id) + return IntegrationWidgetCreateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -19474,19 +16856,36 @@ def to_dict(self) -> dict: return result -class IntegrationDiscordCreateRequest: +class IntegrationWidgetUpdateParams: + widget_integration_id: str + """The ID of the Widget integration""" + + def __init__(self, widget_integration_id: str) -> None: + self.widget_integration_id = widget_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationWidgetUpdateParams': + assert isinstance(obj, dict) + widget_integration_id = from_str(obj.get("widgetIntegrationId")) + return IntegrationWidgetUpdateParams(widget_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["widgetIntegrationId"] = from_str(self.widget_integration_id) + return result + + +class IntegrationWidgetUpdateRequest: """A bot configuration that can be applied without a dedicated bot instance.""" alias: Optional[str] """The unique alias for the instance""" - allow_from: Optional[str] - """Restrict which Discord users can interact with this integration. Accepts Discord user IDs - (17-18 digit snowflakes) or @username, one per line. Use * to allow all senders. Leave - empty to deny all. - """ - app_id: Optional[str] - """The Discord application ID""" + attachments: Optional[bool] + """Whether the Widget integration supports attachments""" + + auto_scroll: Optional[bool] + """Whether the Widget integration auto scrolls""" blueprint_id: Optional[str] """The ID of the blueprint""" @@ -19494,17 +16893,41 @@ class IntegrationDiscordCreateRequest: bot_id: Optional[str] """The ID of the bot this configuration is using""" - bot_token: Optional[str] - """The Discord bot token""" + carousel: Optional[bool] + """Whether the Widget integration supports carousels""" contact_collection: Optional[bool] - """Weather to collect contacts""" + """Whether the Widget integration collects contacts""" description: Optional[str] """The associated description""" - handle: Optional[str] - """The Discord command handle""" + export_conversation: Optional[bool] + """Controls whether the Widget allows exporting the current conversation""" + + form: Optional[bool] + """Whether the Widget integration supports forms""" + + initial: Optional[str] + """The initial message of the Widget integration""" + + intro: Optional[str] + """The intro of the Widget integration""" + + language: Optional[str] + """The language of the Widget integration""" + + layout: Optional[str] + """The default layout of the Widget integration""" + + math: Optional[bool] + """Whether the Widget integration supports math""" + + maximize: Optional[bool] + """Controls whether the Widget allows maximizing the conversation""" + + message_peek: Optional[bool] + """Controls whether the Widget allows peeking at the initial messages""" meta: Optional[Dict[str, Any]] """Meta data information""" @@ -19512,88 +16935,211 @@ class IntegrationDiscordCreateRequest: name: Optional[str] """The associated name""" - public_key: Optional[str] - """The Discord public key""" + origin: Optional[str] + """The origin URLs of the Widget integration""" + + placeholder: Optional[str] + """The input placeholder of the Widget integration""" + + plugins: Optional[str] + """The plugins of the Widget integration""" + + powered_by: Optional[bool] + """Whether the Widget integration displays powered by""" + + restart_conversation: Optional[bool] + """Controls whether the Widget allows restarting the conversation""" session_duration: Optional[float] - """The chat session duration""" + """The session duration of the Widget integration""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], app_id: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], bot_token: Optional[str], contact_collection: Optional[bool], description: Optional[str], handle: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], public_key: Optional[str], session_duration: Optional[float]) -> None: + start_first: Optional[bool] + """Whether the Widget integration starts first""" + + stream: Optional[bool] + """Whether the Widget integration is streaming""" + + theme: Optional[str] + """The theme of the Widget integration""" + + title: Optional[str] + """The title of the Widget integration""" + + tools: Optional[bool] + """Whether the Widget integration has tools""" + + unfurl: Optional[bool] + """Whether the Widget integration unfurls links""" + + verbose: Optional[bool] + """Whether the Widget integration is verbose""" + + voice_in: Optional[bool] + """Controls whether the Widget allows voice input""" + + voice_out: Optional[bool] + """Controls whether the Widget allows voice output""" + + def __init__(self, alias: Optional[str], attachments: Optional[bool], auto_scroll: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], carousel: Optional[bool], contact_collection: Optional[bool], description: Optional[str], export_conversation: Optional[bool], form: Optional[bool], initial: Optional[str], intro: Optional[str], language: Optional[str], layout: Optional[str], math: Optional[bool], maximize: Optional[bool], message_peek: Optional[bool], meta: Optional[Dict[str, Any]], name: Optional[str], origin: Optional[str], placeholder: Optional[str], plugins: Optional[str], powered_by: Optional[bool], restart_conversation: Optional[bool], session_duration: Optional[float], start_first: Optional[bool], stream: Optional[bool], theme: Optional[str], title: Optional[str], tools: Optional[bool], unfurl: Optional[bool], verbose: Optional[bool], voice_in: Optional[bool], voice_out: Optional[bool]) -> None: self.alias = alias - self.allow_from = allow_from - self.app_id = app_id + self.attachments = attachments + self.auto_scroll = auto_scroll self.blueprint_id = blueprint_id self.bot_id = bot_id - self.bot_token = bot_token + self.carousel = carousel self.contact_collection = contact_collection self.description = description - self.handle = handle + self.export_conversation = export_conversation + self.form = form + self.initial = initial + self.intro = intro + self.language = language + self.layout = layout + self.math = math + self.maximize = maximize + self.message_peek = message_peek self.meta = meta self.name = name - self.public_key = public_key + self.origin = origin + self.placeholder = placeholder + self.plugins = plugins + self.powered_by = powered_by + self.restart_conversation = restart_conversation self.session_duration = session_duration + self.start_first = start_first + self.stream = stream + self.theme = theme + self.title = title + self.tools = tools + self.unfurl = unfurl + self.verbose = verbose + self.voice_in = voice_in + self.voice_out = voice_out @staticmethod - def from_dict(obj: Any) -> 'IntegrationDiscordCreateRequest': + def from_dict(obj: Any) -> 'IntegrationWidgetUpdateRequest': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) - allow_from = from_union([from_str, from_none], obj.get("allowFrom")) - app_id = from_union([from_str, from_none], obj.get("appId")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) + auto_scroll = from_union([from_bool, from_none], obj.get("autoScroll")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) - bot_token = from_union([from_str, from_none], obj.get("botToken")) + carousel = from_union([from_bool, from_none], obj.get("carousel")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) description = from_union([from_str, from_none], obj.get("description")) - handle = from_union([from_str, from_none], obj.get("handle")) + export_conversation = from_union([from_bool, from_none], obj.get("exportConversation")) + form = from_union([from_bool, from_none], obj.get("form")) + initial = from_union([from_str, from_none], obj.get("initial")) + intro = from_union([from_str, from_none], obj.get("intro")) + language = from_union([from_str, from_none], obj.get("language")) + layout = from_union([from_str, from_none], obj.get("layout")) + math = from_union([from_bool, from_none], obj.get("math")) + maximize = from_union([from_bool, from_none], obj.get("maximize")) + message_peek = from_union([from_bool, from_none], obj.get("messagePeek")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - public_key = from_union([from_str, from_none], obj.get("publicKey")) + origin = from_union([from_str, from_none], obj.get("origin")) + placeholder = from_union([from_str, from_none], obj.get("placeholder")) + plugins = from_union([from_str, from_none], obj.get("plugins")) + powered_by = from_union([from_bool, from_none], obj.get("poweredBy")) + restart_conversation = from_union([from_bool, from_none], obj.get("restartConversation")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - return IntegrationDiscordCreateRequest(alias, allow_from, app_id, blueprint_id, bot_id, bot_token, contact_collection, description, handle, meta, name, public_key, session_duration) + start_first = from_union([from_bool, from_none], obj.get("startFirst")) + stream = from_union([from_bool, from_none], obj.get("stream")) + theme = from_union([from_str, from_none], obj.get("theme")) + title = from_union([from_str, from_none], obj.get("title")) + tools = from_union([from_bool, from_none], obj.get("tools")) + unfurl = from_union([from_bool, from_none], obj.get("unfurl")) + verbose = from_union([from_bool, from_none], obj.get("verbose")) + voice_in = from_union([from_bool, from_none], obj.get("voiceIn")) + voice_out = from_union([from_bool, from_none], obj.get("voiceOut")) + return IntegrationWidgetUpdateRequest(alias, attachments, auto_scroll, blueprint_id, bot_id, carousel, contact_collection, description, export_conversation, form, initial, intro, language, layout, math, maximize, message_peek, meta, name, origin, placeholder, plugins, powered_by, restart_conversation, session_duration, start_first, stream, theme, title, tools, unfurl, verbose, voice_in, voice_out) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.allow_from is not None: - result["allowFrom"] = from_union([from_str, from_none], self.allow_from) - if self.app_id is not None: - result["appId"] = from_union([from_str, from_none], self.app_id) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) + if self.auto_scroll is not None: + result["autoScroll"] = from_union([from_bool, from_none], self.auto_scroll) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.bot_token is not None: - result["botToken"] = from_union([from_str, from_none], self.bot_token) + if self.carousel is not None: + result["carousel"] = from_union([from_bool, from_none], self.carousel) if self.contact_collection is not None: result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.handle is not None: - result["handle"] = from_union([from_str, from_none], self.handle) + if self.export_conversation is not None: + result["exportConversation"] = from_union([from_bool, from_none], self.export_conversation) + if self.form is not None: + result["form"] = from_union([from_bool, from_none], self.form) + if self.initial is not None: + result["initial"] = from_union([from_str, from_none], self.initial) + if self.intro is not None: + result["intro"] = from_union([from_str, from_none], self.intro) + if self.language is not None: + result["language"] = from_union([from_str, from_none], self.language) + if self.layout is not None: + result["layout"] = from_union([from_str, from_none], self.layout) + if self.math is not None: + result["math"] = from_union([from_bool, from_none], self.math) + if self.maximize is not None: + result["maximize"] = from_union([from_bool, from_none], self.maximize) + if self.message_peek is not None: + result["messagePeek"] = from_union([from_bool, from_none], self.message_peek) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.public_key is not None: - result["publicKey"] = from_union([from_str, from_none], self.public_key) + if self.origin is not None: + result["origin"] = from_union([from_str, from_none], self.origin) + if self.placeholder is not None: + result["placeholder"] = from_union([from_str, from_none], self.placeholder) + if self.plugins is not None: + result["plugins"] = from_union([from_str, from_none], self.plugins) + if self.powered_by is not None: + result["poweredBy"] = from_union([from_bool, from_none], self.powered_by) + if self.restart_conversation is not None: + result["restartConversation"] = from_union([from_bool, from_none], self.restart_conversation) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.start_first is not None: + result["startFirst"] = from_union([from_bool, from_none], self.start_first) + if self.stream is not None: + result["stream"] = from_union([from_bool, from_none], self.stream) + if self.theme is not None: + result["theme"] = from_union([from_str, from_none], self.theme) + if self.title is not None: + result["title"] = from_union([from_str, from_none], self.title) + if self.tools is not None: + result["tools"] = from_union([from_bool, from_none], self.tools) + if self.unfurl is not None: + result["unfurl"] = from_union([from_bool, from_none], self.unfurl) + if self.verbose is not None: + result["verbose"] = from_union([from_bool, from_none], self.verbose) + if self.voice_in is not None: + result["voiceIn"] = from_union([from_bool, from_none], self.voice_in) + if self.voice_out is not None: + result["voiceOut"] = from_union([from_bool, from_none], self.voice_out) return result -class IntegrationDiscordCreateResponse: +class IntegrationWidgetUpdateResponse: id: str - """The ID of the Discord Integration""" + """The ID of the Widget Integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationDiscordCreateResponse': + def from_dict(obj: Any) -> 'IntegrationWidgetUpdateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationDiscordCreateResponse(id) + return IntegrationWidgetUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -19601,67 +17147,74 @@ def to_dict(self) -> dict: return result -class IntegrationDiscordListParamsOrder(Enum): - """The order of the paginated items""" +class IntegrationWidgetSetupParams: + widget_integration_id: str + """The ID of the Widget integration""" - ASC = "asc" - DESC = "desc" + def __init__(self, widget_integration_id: str) -> None: + self.widget_integration_id = widget_integration_id + @staticmethod + def from_dict(obj: Any) -> 'IntegrationWidgetSetupParams': + assert isinstance(obj, dict) + widget_integration_id = from_str(obj.get("widgetIntegrationId")) + return IntegrationWidgetSetupParams(widget_integration_id) -class IntegrationDiscordListParams: - cursor: Optional[str] - """The cursor to use for pagination""" + def to_dict(self) -> dict: + result: dict = {} + result["widgetIntegrationId"] = from_str(self.widget_integration_id) + return result - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" - order: Optional[IntegrationDiscordListParamsOrder] - """The order of the paginated items""" +class IntegrationWidgetSetupResponse: + id: str + """The ID of the Widget integration""" - take: Optional[int] - """The number of items to retrieve""" + def __init__(self, id: str) -> None: + self.id = id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationWidgetSetupResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return IntegrationWidgetSetupResponse(id) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationDiscordListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take + +class IntegrationWidgetFetchParams: + widget_integration_id: str + """The ID of the Widget integration to retrieve""" + + def __init__(self, widget_integration_id: str) -> None: + self.widget_integration_id = widget_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationDiscordListParams': + def from_dict(obj: Any) -> 'IntegrationWidgetFetchParams': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([IntegrationDiscordListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return IntegrationDiscordListParams(cursor, meta, order, take) + widget_integration_id = from_str(obj.get("widgetIntegrationId")) + return IntegrationWidgetFetchParams(widget_integration_id) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(IntegrationDiscordListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["widgetIntegrationId"] = from_str(self.widget_integration_id) return result -class IntegrationDiscordListResponseItem: - """Blueprint properties""" +class IntegrationWidgetFetchResponse: + """A bot configuration that can be applied without a dedicated bot instance.""" alias: Optional[str] """The unique alias for the instance""" - allow_from: Optional[str] - """Restrict which Discord users can interact with this integration. Accepts Discord user IDs - (17-18 digit snowflakes) or @username, one per line. Use * to allow all senders. Leave - empty to deny all. - """ - app_id: Optional[str] - """The Discord application ID""" + attachments: Optional[bool] + """Whether the Widget integration supports attachments""" + + auto_scroll: Optional[bool] + """Whether the Widget integration auto scrolls""" blueprint_id: Optional[str] """The ID of the blueprint""" @@ -19669,8 +17222,11 @@ class IntegrationDiscordListResponseItem: bot_id: Optional[str] """The ID of the bot this configuration is using""" + carousel: Optional[bool] + """Whether the Widget integration supports carousels""" + contact_collection: Optional[bool] - """Weather to collect contacts""" + """Whether the Widget integration collects contacts""" created_at: float """The timestamp (ms) when the instance was created""" @@ -19678,321 +17234,527 @@ class IntegrationDiscordListResponseItem: description: Optional[str] """The associated description""" - handle: Optional[str] - """The Discord command handle""" + export_conversation: Optional[bool] + """Controls whether the Widget allows exporting the current conversation""" + + form: Optional[bool] + """Whether the Widget integration supports forms""" id: str """The instance ID""" + initial: Optional[str] + """The initial message of the Widget integration""" + + intro: Optional[str] + """The intro of the Widget integration""" + + language: Optional[str] + """The language of the Widget integration""" + + layout: Optional[str] + """The default layout of the Widget integration""" + + math: Optional[bool] + """Whether the Widget integration supports math""" + + maximize: Optional[bool] + """Controls whether the Widget allows maximizing the conversation""" + + message_peek: Optional[bool] + """Controls whether the Widget allows peeking at the initial messages""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" + origin: Optional[str] + """The origin URLs of the Widget integration""" + + placeholder: Optional[str] + """The input placeholder of the Widget integration""" + + plugins: Optional[str] + """The plugins of the Widget integration""" + + powered_by: Optional[bool] + """Whether the Widget integration displays powered by""" + + restart_conversation: Optional[bool] + """Controls whether the Widget allows restarting the conversation""" + session_duration: Optional[float] - """The chat session duration""" + """The session duration of the Widget integration""" + + start_first: Optional[bool] + """Whether the Widget integration starts first""" + + stream: Optional[bool] + """Whether the Widget integration is streaming""" + + theme: Optional[str] + """The theme of the Widget integration""" + + title: Optional[str] + """The title of the Widget integration""" + + tools: Optional[bool] + """Whether the Widget integration has tools""" + + unfurl: Optional[bool] + """Whether the Widget integration unfurls links""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], app_id: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], handle: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float) -> None: + verbose: Optional[bool] + """Whether the Widget integration is verbose""" + + voice_in: Optional[bool] + """Whether the Widget integration supports voice input""" + + voice_out: Optional[bool] + """Whether the Widget integration supports voice output""" + + def __init__(self, alias: Optional[str], attachments: Optional[bool], auto_scroll: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], carousel: Optional[bool], contact_collection: Optional[bool], created_at: float, description: Optional[str], export_conversation: Optional[bool], form: Optional[bool], id: str, initial: Optional[str], intro: Optional[str], language: Optional[str], layout: Optional[str], math: Optional[bool], maximize: Optional[bool], message_peek: Optional[bool], meta: Optional[Dict[str, Any]], name: Optional[str], origin: Optional[str], placeholder: Optional[str], plugins: Optional[str], powered_by: Optional[bool], restart_conversation: Optional[bool], session_duration: Optional[float], start_first: Optional[bool], stream: Optional[bool], theme: Optional[str], title: Optional[str], tools: Optional[bool], unfurl: Optional[bool], updated_at: float, verbose: Optional[bool], voice_in: Optional[bool], voice_out: Optional[bool]) -> None: self.alias = alias - self.allow_from = allow_from - self.app_id = app_id + self.attachments = attachments + self.auto_scroll = auto_scroll self.blueprint_id = blueprint_id self.bot_id = bot_id + self.carousel = carousel self.contact_collection = contact_collection self.created_at = created_at self.description = description - self.handle = handle + self.export_conversation = export_conversation + self.form = form self.id = id + self.initial = initial + self.intro = intro + self.language = language + self.layout = layout + self.math = math + self.maximize = maximize + self.message_peek = message_peek self.meta = meta self.name = name + self.origin = origin + self.placeholder = placeholder + self.plugins = plugins + self.powered_by = powered_by + self.restart_conversation = restart_conversation self.session_duration = session_duration + self.start_first = start_first + self.stream = stream + self.theme = theme + self.title = title + self.tools = tools + self.unfurl = unfurl self.updated_at = updated_at + self.verbose = verbose + self.voice_in = voice_in + self.voice_out = voice_out @staticmethod - def from_dict(obj: Any) -> 'IntegrationDiscordListResponseItem': + def from_dict(obj: Any) -> 'IntegrationWidgetFetchResponse': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) - allow_from = from_union([from_str, from_none], obj.get("allowFrom")) - app_id = from_union([from_str, from_none], obj.get("appId")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) + auto_scroll = from_union([from_bool, from_none], obj.get("autoScroll")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) + carousel = from_union([from_bool, from_none], obj.get("carousel")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - handle = from_union([from_str, from_none], obj.get("handle")) + export_conversation = from_union([from_bool, from_none], obj.get("exportConversation")) + form = from_union([from_bool, from_none], obj.get("form")) id = from_str(obj.get("id")) + initial = from_union([from_str, from_none], obj.get("initial")) + intro = from_union([from_str, from_none], obj.get("intro")) + language = from_union([from_str, from_none], obj.get("language")) + layout = from_union([from_str, from_none], obj.get("layout")) + math = from_union([from_bool, from_none], obj.get("math")) + maximize = from_union([from_bool, from_none], obj.get("maximize")) + message_peek = from_union([from_bool, from_none], obj.get("messagePeek")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) + origin = from_union([from_str, from_none], obj.get("origin")) + placeholder = from_union([from_str, from_none], obj.get("placeholder")) + plugins = from_union([from_str, from_none], obj.get("plugins")) + powered_by = from_union([from_bool, from_none], obj.get("poweredBy")) + restart_conversation = from_union([from_bool, from_none], obj.get("restartConversation")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + start_first = from_union([from_bool, from_none], obj.get("startFirst")) + stream = from_union([from_bool, from_none], obj.get("stream")) + theme = from_union([from_str, from_none], obj.get("theme")) + title = from_union([from_str, from_none], obj.get("title")) + tools = from_union([from_bool, from_none], obj.get("tools")) + unfurl = from_union([from_bool, from_none], obj.get("unfurl")) updated_at = from_float(obj.get("updatedAt")) - return IntegrationDiscordListResponseItem(alias, allow_from, app_id, blueprint_id, bot_id, contact_collection, created_at, description, handle, id, meta, name, session_duration, updated_at) + verbose = from_union([from_bool, from_none], obj.get("verbose")) + voice_in = from_union([from_bool, from_none], obj.get("voiceIn")) + voice_out = from_union([from_bool, from_none], obj.get("voiceOut")) + return IntegrationWidgetFetchResponse(alias, attachments, auto_scroll, blueprint_id, bot_id, carousel, contact_collection, created_at, description, export_conversation, form, id, initial, intro, language, layout, math, maximize, message_peek, meta, name, origin, placeholder, plugins, powered_by, restart_conversation, session_duration, start_first, stream, theme, title, tools, unfurl, updated_at, verbose, voice_in, voice_out) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.allow_from is not None: - result["allowFrom"] = from_union([from_str, from_none], self.allow_from) - if self.app_id is not None: - result["appId"] = from_union([from_str, from_none], self.app_id) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) + if self.auto_scroll is not None: + result["autoScroll"] = from_union([from_bool, from_none], self.auto_scroll) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.carousel is not None: + result["carousel"] = from_union([from_bool, from_none], self.carousel) if self.contact_collection is not None: result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.handle is not None: - result["handle"] = from_union([from_str, from_none], self.handle) + if self.export_conversation is not None: + result["exportConversation"] = from_union([from_bool, from_none], self.export_conversation) + if self.form is not None: + result["form"] = from_union([from_bool, from_none], self.form) result["id"] = from_str(self.id) + if self.initial is not None: + result["initial"] = from_union([from_str, from_none], self.initial) + if self.intro is not None: + result["intro"] = from_union([from_str, from_none], self.intro) + if self.language is not None: + result["language"] = from_union([from_str, from_none], self.language) + if self.layout is not None: + result["layout"] = from_union([from_str, from_none], self.layout) + if self.math is not None: + result["math"] = from_union([from_bool, from_none], self.math) + if self.maximize is not None: + result["maximize"] = from_union([from_bool, from_none], self.maximize) + if self.message_peek is not None: + result["messagePeek"] = from_union([from_bool, from_none], self.message_peek) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.origin is not None: + result["origin"] = from_union([from_str, from_none], self.origin) + if self.placeholder is not None: + result["placeholder"] = from_union([from_str, from_none], self.placeholder) + if self.plugins is not None: + result["plugins"] = from_union([from_str, from_none], self.plugins) + if self.powered_by is not None: + result["poweredBy"] = from_union([from_bool, from_none], self.powered_by) + if self.restart_conversation is not None: + result["restartConversation"] = from_union([from_bool, from_none], self.restart_conversation) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.start_first is not None: + result["startFirst"] = from_union([from_bool, from_none], self.start_first) + if self.stream is not None: + result["stream"] = from_union([from_bool, from_none], self.stream) + if self.theme is not None: + result["theme"] = from_union([from_str, from_none], self.theme) + if self.title is not None: + result["title"] = from_union([from_str, from_none], self.title) + if self.tools is not None: + result["tools"] = from_union([from_bool, from_none], self.tools) + if self.unfurl is not None: + result["unfurl"] = from_union([from_bool, from_none], self.unfurl) result["updatedAt"] = to_float(self.updated_at) + if self.verbose is not None: + result["verbose"] = from_union([from_bool, from_none], self.verbose) + if self.voice_in is not None: + result["voiceIn"] = from_union([from_bool, from_none], self.voice_in) + if self.voice_out is not None: + result["voiceOut"] = from_union([from_bool, from_none], self.voice_out) return result -class IntegrationDiscordListResponse: - cursor: str - """Cursor for fetching the next page""" - - items: List[IntegrationDiscordListResponseItem] +class IntegrationWidgetDeleteParams: + widget_integration_id: str + """The ID of the Widget integration""" - def __init__(self, cursor: str, items: List[IntegrationDiscordListResponseItem]) -> None: - self.cursor = cursor - self.items = items + def __init__(self, widget_integration_id: str) -> None: + self.widget_integration_id = widget_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationDiscordListResponse': + def from_dict(obj: Any) -> 'IntegrationWidgetDeleteParams': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(IntegrationDiscordListResponseItem.from_dict, obj.get("items")) - return IntegrationDiscordListResponse(cursor, items) + widget_integration_id = from_str(obj.get("widgetIntegrationId")) + return IntegrationWidgetDeleteParams(widget_integration_id) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(IntegrationDiscordListResponseItem, x), self.items) + result["widgetIntegrationId"] = from_str(self.widget_integration_id) return result -class IntegrationDiscordListStreamItemData: - """Blueprint properties""" +class IntegrationWidgetDeleteResponse: + id: str + """The ID of the deleted Widget integration""" - alias: Optional[str] - """The unique alias for the instance""" + def __init__(self, id: str) -> None: + self.id = id - allow_from: Optional[str] - """Restrict which Discord users can interact with this integration. Accepts Discord user IDs - (17-18 digit snowflakes) or @username, one per line. Use * to allow all senders. Leave - empty to deny all. - """ - app_id: Optional[str] - """The Discord application ID""" + @staticmethod + def from_dict(obj: Any) -> 'IntegrationWidgetDeleteResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return IntegrationWidgetDeleteResponse(id) - blueprint_id: Optional[str] - """The ID of the blueprint""" + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result - bot_id: Optional[str] - """The ID of the bot this configuration is using""" - contact_collection: Optional[bool] - """Weather to collect contacts""" +class IntegrationWidgetCloneParams: + widget_integration_id: str + """The ID of the Widget integration""" - created_at: float - """The timestamp (ms) when the instance was created""" + def __init__(self, widget_integration_id: str) -> None: + self.widget_integration_id = widget_integration_id - description: Optional[str] - """The associated description""" + @staticmethod + def from_dict(obj: Any) -> 'IntegrationWidgetCloneParams': + assert isinstance(obj, dict) + widget_integration_id = from_str(obj.get("widgetIntegrationId")) + return IntegrationWidgetCloneParams(widget_integration_id) - handle: Optional[str] - """The Discord command handle""" + def to_dict(self) -> dict: + result: dict = {} + result["widgetIntegrationId"] = from_str(self.widget_integration_id) + return result + +class IntegrationWidgetCloneResponse: id: str - """The instance ID""" + """The ID of the cloned Widget integration""" - meta: Optional[Dict[str, Any]] - """Meta data information""" + def __init__(self, id: str) -> None: + self.id = id - name: Optional[str] - """The associated name""" + @staticmethod + def from_dict(obj: Any) -> 'IntegrationWidgetCloneResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return IntegrationWidgetCloneResponse(id) - session_duration: Optional[float] - """The chat session duration""" + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result - updated_at: float - """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], app_id: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], handle: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float) -> None: - self.alias = alias - self.allow_from = allow_from - self.app_id = app_id - self.blueprint_id = blueprint_id - self.bot_id = bot_id - self.contact_collection = contact_collection - self.created_at = created_at - self.description = description - self.handle = handle - self.id = id - self.meta = meta - self.name = name - self.session_duration = session_duration - self.updated_at = updated_at +class WidgetIntegrationFileDetachParams: + file_id: str + """The ID of the file to detach""" + + widget_integration_id: str + """The ID of the widget integration""" + + def __init__(self, file_id: str, widget_integration_id: str) -> None: + self.file_id = file_id + self.widget_integration_id = widget_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationDiscordListStreamItemData': + def from_dict(obj: Any) -> 'WidgetIntegrationFileDetachParams': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - allow_from = from_union([from_str, from_none], obj.get("allowFrom")) - app_id = from_union([from_str, from_none], obj.get("appId")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - handle = from_union([from_str, from_none], obj.get("handle")) - id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - updated_at = from_float(obj.get("updatedAt")) - return IntegrationDiscordListStreamItemData(alias, allow_from, app_id, blueprint_id, bot_id, contact_collection, created_at, description, handle, id, meta, name, session_duration, updated_at) + file_id = from_str(obj.get("fileId")) + widget_integration_id = from_str(obj.get("widgetIntegrationId")) + return WidgetIntegrationFileDetachParams(file_id, widget_integration_id) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.allow_from is not None: - result["allowFrom"] = from_union([from_str, from_none], self.allow_from) - if self.app_id is not None: - result["appId"] = from_union([from_str, from_none], self.app_id) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.handle is not None: - result["handle"] = from_union([from_str, from_none], self.handle) - result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - result["updatedAt"] = to_float(self.updated_at) + result["fileId"] = from_str(self.file_id) + result["widgetIntegrationId"] = from_str(self.widget_integration_id) return result -class IntegrationDiscordListStreamItemType(Enum): - """The type of event""" +class WidgetIntegrationFileDetachResponse: + id: str + """The ID of the detached file""" + + type: str + """The attachment slot type that was cleared""" + + widget_integration_id: str + """The ID of the widget integration""" + + def __init__(self, id: str, type: str, widget_integration_id: str) -> None: + self.id = id + self.type = type + self.widget_integration_id = widget_integration_id - ITEM = "item" + @staticmethod + def from_dict(obj: Any) -> 'WidgetIntegrationFileDetachResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + type = from_str(obj.get("type")) + widget_integration_id = from_str(obj.get("widgetIntegrationId")) + return WidgetIntegrationFileDetachResponse(id, type, widget_integration_id) + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + result["type"] = from_str(self.type) + result["widgetIntegrationId"] = from_str(self.widget_integration_id) + return result -class IntegrationDiscordListStreamItem: - data: IntegrationDiscordListStreamItemData - """Blueprint properties""" - type: IntegrationDiscordListStreamItemType - """The type of event""" +class WidgetIntegrationFileAttachParams: + file_id: str + """The ID of the file to attach""" - def __init__(self, data: IntegrationDiscordListStreamItemData, type: IntegrationDiscordListStreamItemType) -> None: - self.data = data - self.type = type + widget_integration_id: str + """The ID of the widget integration""" + + def __init__(self, file_id: str, widget_integration_id: str) -> None: + self.file_id = file_id + self.widget_integration_id = widget_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationDiscordListStreamItem': + def from_dict(obj: Any) -> 'WidgetIntegrationFileAttachParams': assert isinstance(obj, dict) - data = IntegrationDiscordListStreamItemData.from_dict(obj.get("data")) - type = IntegrationDiscordListStreamItemType(obj.get("type")) - return IntegrationDiscordListStreamItem(data, type) + file_id = from_str(obj.get("fileId")) + widget_integration_id = from_str(obj.get("widgetIntegrationId")) + return WidgetIntegrationFileAttachParams(file_id, widget_integration_id) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(IntegrationDiscordListStreamItemData, self.data) - result["type"] = to_enum(IntegrationDiscordListStreamItemType, self.type) + result["fileId"] = from_str(self.file_id) + result["widgetIntegrationId"] = from_str(self.widget_integration_id) return result -class EmailIntegrationDeleteParams: - email_integration_id: str - """The ID of the Email integration""" +class WidgetIntegrationFileAttachRequestType(Enum): + """The attachment slot type for the file""" + + BAR = "bar" + BOT = "bot" + BUTTON = "button" + USER = "user" - def __init__(self, email_integration_id: str) -> None: - self.email_integration_id = email_integration_id + +class WidgetIntegrationFileAttachRequest: + type: WidgetIntegrationFileAttachRequestType + """The attachment slot type for the file""" + + def __init__(self, type: WidgetIntegrationFileAttachRequestType) -> None: + self.type = type @staticmethod - def from_dict(obj: Any) -> 'EmailIntegrationDeleteParams': + def from_dict(obj: Any) -> 'WidgetIntegrationFileAttachRequest': assert isinstance(obj, dict) - email_integration_id = from_str(obj.get("emailIntegrationId")) - return EmailIntegrationDeleteParams(email_integration_id) + type = WidgetIntegrationFileAttachRequestType(obj.get("type")) + return WidgetIntegrationFileAttachRequest(type) def to_dict(self) -> dict: result: dict = {} - result["emailIntegrationId"] = from_str(self.email_integration_id) + result["type"] = to_enum(WidgetIntegrationFileAttachRequestType, self.type) return result -class EmailIntegrationDeleteResponse: +class WidgetIntegrationFileAttachResponse: id: str - """The ID of the deleted Email integration""" + """The ID of the attached file""" - def __init__(self, id: str) -> None: + type: str + """The attachment slot type""" + + widget_integration_id: str + """The ID of the widget integration""" + + def __init__(self, id: str, type: str, widget_integration_id: str) -> None: self.id = id + self.type = type + self.widget_integration_id = widget_integration_id @staticmethod - def from_dict(obj: Any) -> 'EmailIntegrationDeleteResponse': + def from_dict(obj: Any) -> 'WidgetIntegrationFileAttachResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return EmailIntegrationDeleteResponse(id) + type = from_str(obj.get("type")) + widget_integration_id = from_str(obj.get("widgetIntegrationId")) + return WidgetIntegrationFileAttachResponse(id, type, widget_integration_id) def to_dict(self) -> dict: result: dict = {} result["id"] = from_str(self.id) + result["type"] = from_str(self.type) + result["widgetIntegrationId"] = from_str(self.widget_integration_id) return result -class EmailIntegrationFetchParams: - email_integration_id: str - """The ID of the Email integration to retrieve""" +class IntegrationWhatsAppListParamsOrder(Enum): + """The order of the paginated items""" - def __init__(self, email_integration_id: str) -> None: - self.email_integration_id = email_integration_id + ASC = "asc" + DESC = "desc" + + +class IntegrationWhatsAppListParams: + cursor: Optional[str] + """The cursor to use for pagination""" + + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" + + order: Optional[IntegrationWhatsAppListParamsOrder] + """The order of the paginated items""" + + take: Optional[int] + """The number of items to retrieve""" + + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationWhatsAppListParamsOrder], take: Optional[int]) -> None: + self.cursor = cursor + self.meta = meta + self.order = order + self.take = take @staticmethod - def from_dict(obj: Any) -> 'EmailIntegrationFetchParams': + def from_dict(obj: Any) -> 'IntegrationWhatsAppListParams': assert isinstance(obj, dict) - email_integration_id = from_str(obj.get("emailIntegrationId")) - return EmailIntegrationFetchParams(email_integration_id) + cursor = from_union([from_str, from_none], obj.get("cursor")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([IntegrationWhatsAppListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return IntegrationWhatsAppListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} - result["emailIntegrationId"] = from_str(self.email_integration_id) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(IntegrationWhatsAppListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class EmailIntegrationFetchResponse: +class IntegrationWhatsAppListResponseItem: """Blueprint properties""" + access_token: Optional[str] + """The WhatsApp integration access token (returned as '********' if configured, null + otherwise) + """ alias: Optional[str] """The unique alias for the instance""" allow_from: Optional[str] - """Newline-separated list of email patterns allowed to send messages to this integration""" + """Newline-or-comma-separated list of allowed senders. Use phone numbers in E.164 format + (digits only). Leave empty to block all. Use * to allow everyone. + """ + app_secret: Optional[str] + """The Meta app secret (returned as '********' if configured, null otherwise)""" attachments: Optional[bool] """Weather the bot supports attachments""" @@ -20021,15 +17783,23 @@ class EmailIntegrationFetchResponse: name: Optional[str] """The associated name""" + phone_number_id: Optional[str] + """The WhatsApp integration phone number ID""" + session_duration: Optional[float] """The session duration (in milliseconds)""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float) -> None: + verify_token: str + """The WhatsApp integration verify token""" + + def __init__(self, access_token: Optional[str], alias: Optional[str], allow_from: Optional[str], app_secret: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], phone_number_id: Optional[str], session_duration: Optional[float], updated_at: float, verify_token: str) -> None: + self.access_token = access_token self.alias = alias self.allow_from = allow_from + self.app_secret = app_secret self.attachments = attachments self.blueprint_id = blueprint_id self.bot_id = bot_id @@ -20039,14 +17809,18 @@ def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: self.id = id self.meta = meta self.name = name + self.phone_number_id = phone_number_id self.session_duration = session_duration self.updated_at = updated_at + self.verify_token = verify_token @staticmethod - def from_dict(obj: Any) -> 'EmailIntegrationFetchResponse': + def from_dict(obj: Any) -> 'IntegrationWhatsAppListResponseItem': assert isinstance(obj, dict) + access_token = from_union([from_str, from_none], obj.get("accessToken")) alias = from_union([from_str, from_none], obj.get("alias")) allow_from = from_union([from_str, from_none], obj.get("allowFrom")) + app_secret = from_union([from_str, from_none], obj.get("appSecret")) attachments = from_union([from_bool, from_none], obj.get("attachments")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) @@ -20056,16 +17830,22 @@ def from_dict(obj: Any) -> 'EmailIntegrationFetchResponse': id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) + phone_number_id = from_union([from_str, from_none], obj.get("phoneNumberId")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) updated_at = from_float(obj.get("updatedAt")) - return EmailIntegrationFetchResponse(alias, allow_from, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at) + verify_token = from_str(obj.get("verifyToken")) + return IntegrationWhatsAppListResponseItem(access_token, alias, allow_from, app_secret, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, phone_number_id, session_duration, updated_at, verify_token) def to_dict(self) -> dict: result: dict = {} + if self.access_token is not None: + result["accessToken"] = from_union([from_str, from_none], self.access_token) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) if self.allow_from is not None: result["allowFrom"] = from_union([from_str, from_none], self.allow_from) + if self.app_secret is not None: + result["appSecret"] = from_union([from_str, from_none], self.app_secret) if self.attachments is not None: result["attachments"] = from_union([from_bool, from_none], self.attachments) if self.blueprint_id is not None: @@ -20082,77 +17862,55 @@ def to_dict(self) -> dict: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.phone_number_id is not None: + result["phoneNumberId"] = from_union([from_str, from_none], self.phone_number_id) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) result["updatedAt"] = to_float(self.updated_at) + result["verifyToken"] = from_str(self.verify_token) return result -class EmailIntegrationSetupParams: - email_integration_id: str - """The ID of the Email integration""" - - def __init__(self, email_integration_id: str) -> None: - self.email_integration_id = email_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'EmailIntegrationSetupParams': - assert isinstance(obj, dict) - email_integration_id = from_str(obj.get("emailIntegrationId")) - return EmailIntegrationSetupParams(email_integration_id) - - def to_dict(self) -> dict: - result: dict = {} - result["emailIntegrationId"] = from_str(self.email_integration_id) - return result - - -class EmailIntegrationSetupResponse: - id: str - """The ID of the Email Integration""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'EmailIntegrationSetupResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return EmailIntegrationSetupResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - +class IntegrationWhatsAppListResponse: + cursor: str + """Cursor for fetching the next page""" -class EmailIntegrationUpdateParams: - email_integration_id: str - """The ID of the Email integration""" + items: List[IntegrationWhatsAppListResponseItem] - def __init__(self, email_integration_id: str) -> None: - self.email_integration_id = email_integration_id + def __init__(self, cursor: str, items: List[IntegrationWhatsAppListResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'EmailIntegrationUpdateParams': + def from_dict(obj: Any) -> 'IntegrationWhatsAppListResponse': assert isinstance(obj, dict) - email_integration_id = from_str(obj.get("emailIntegrationId")) - return EmailIntegrationUpdateParams(email_integration_id) + cursor = from_str(obj.get("cursor")) + items = from_list(IntegrationWhatsAppListResponseItem.from_dict, obj.get("items")) + return IntegrationWhatsAppListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["emailIntegrationId"] = from_str(self.email_integration_id) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(IntegrationWhatsAppListResponseItem, x), self.items) return result -class EmailIntegrationUpdateRequest: - """A bot configuration that can be applied without a dedicated bot instance.""" +class IntegrationWhatsAppListStreamItemData: + """Blueprint properties""" + access_token: Optional[str] + """The WhatsApp integration access token (returned as '********' if configured, null + otherwise) + """ alias: Optional[str] """The unique alias for the instance""" allow_from: Optional[str] - """Newline-separated list of email patterns allowed to send messages to this integration""" + """Newline-or-comma-separated list of allowed senders. Use phone numbers in E.164 format + (digits only). Leave empty to block all. Use * to allow everyone. + """ + app_secret: Optional[str] + """The Meta app secret (returned as '********' if configured, null otherwise)""" attachments: Optional[bool] """Weather the bot supports attachments""" @@ -20166,51 +17924,84 @@ class EmailIntegrationUpdateRequest: contact_collection: Optional[bool] """Weather to collect contacts""" + created_at: float + """The timestamp (ms) when the instance was created""" + description: Optional[str] """The associated description""" + id: str + """The instance ID""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" + phone_number_id: Optional[str] + """The WhatsApp integration phone number ID""" + session_duration: Optional[float] """The session duration (in milliseconds)""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float]) -> None: + updated_at: float + """The timestamp (ms) when the instance was updated""" + + verify_token: str + """The WhatsApp integration verify token""" + + def __init__(self, access_token: Optional[str], alias: Optional[str], allow_from: Optional[str], app_secret: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], phone_number_id: Optional[str], session_duration: Optional[float], updated_at: float, verify_token: str) -> None: + self.access_token = access_token self.alias = alias self.allow_from = allow_from + self.app_secret = app_secret self.attachments = attachments self.blueprint_id = blueprint_id self.bot_id = bot_id self.contact_collection = contact_collection + self.created_at = created_at self.description = description + self.id = id self.meta = meta self.name = name + self.phone_number_id = phone_number_id self.session_duration = session_duration + self.updated_at = updated_at + self.verify_token = verify_token @staticmethod - def from_dict(obj: Any) -> 'EmailIntegrationUpdateRequest': + def from_dict(obj: Any) -> 'IntegrationWhatsAppListStreamItemData': assert isinstance(obj, dict) + access_token = from_union([from_str, from_none], obj.get("accessToken")) alias = from_union([from_str, from_none], obj.get("alias")) allow_from = from_union([from_str, from_none], obj.get("allowFrom")) + app_secret = from_union([from_str, from_none], obj.get("appSecret")) attachments = from_union([from_bool, from_none], obj.get("attachments")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) + phone_number_id = from_union([from_str, from_none], obj.get("phoneNumberId")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - return EmailIntegrationUpdateRequest(alias, allow_from, attachments, blueprint_id, bot_id, contact_collection, description, meta, name, session_duration) + updated_at = from_float(obj.get("updatedAt")) + verify_token = from_str(obj.get("verifyToken")) + return IntegrationWhatsAppListStreamItemData(access_token, alias, allow_from, app_secret, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, phone_number_id, session_duration, updated_at, verify_token) def to_dict(self) -> dict: result: dict = {} + if self.access_token is not None: + result["accessToken"] = from_union([from_str, from_none], self.access_token) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) if self.allow_from is not None: result["allowFrom"] = from_union([from_str, from_none], self.allow_from) + if self.app_secret is not None: + result["appSecret"] = from_union([from_str, from_none], self.app_secret) if self.attachments is not None: result["attachments"] = from_union([from_bool, from_none], self.attachments) if self.blueprint_id is not None: @@ -20219,44 +18010,69 @@ def to_dict(self) -> dict: result["botId"] = from_union([from_str, from_none], self.bot_id) if self.contact_collection is not None: result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.phone_number_id is not None: + result["phoneNumberId"] = from_union([from_str, from_none], self.phone_number_id) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + result["updatedAt"] = to_float(self.updated_at) + result["verifyToken"] = from_str(self.verify_token) return result -class EmailIntegrationUpdateResponse: - id: str - """The ID of the Email Integration""" +class IntegrationWhatsAppListStreamItemType(Enum): + """The type of event""" - def __init__(self, id: str) -> None: - self.id = id + ITEM = "item" + + +class IntegrationWhatsAppListStreamItem: + data: IntegrationWhatsAppListStreamItemData + """Blueprint properties""" + + type: IntegrationWhatsAppListStreamItemType + """The type of event""" + + def __init__(self, data: IntegrationWhatsAppListStreamItemData, type: IntegrationWhatsAppListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'EmailIntegrationUpdateResponse': + def from_dict(obj: Any) -> 'IntegrationWhatsAppListStreamItem': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return EmailIntegrationUpdateResponse(id) + data = IntegrationWhatsAppListStreamItemData.from_dict(obj.get("data")) + type = IntegrationWhatsAppListStreamItemType(obj.get("type")) + return IntegrationWhatsAppListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["data"] = to_class(IntegrationWhatsAppListStreamItemData, self.data) + result["type"] = to_enum(IntegrationWhatsAppListStreamItemType, self.type) return result -class EmailIntegrationCreateRequest: +class IntegrationWhatsAppCreateRequest: """A bot configuration that can be applied without a dedicated bot instance.""" + access_token: Optional[str] + """The WhatsApp integration access token""" + alias: Optional[str] """The unique alias for the instance""" allow_from: Optional[str] - """Newline-separated list of email patterns allowed to send messages to this integration""" + """Newline-or-comma-separated list of allowed senders. Use E.164 phone numbers with or + without the leading `+`. Set to `*` to allow all. Leave empty to deny all. + """ + app_secret: Optional[str] + """The Meta app secret used to validate webhook signatures""" attachments: Optional[bool] """Weather the bot supports attachments""" @@ -20279,12 +18095,17 @@ class EmailIntegrationCreateRequest: name: Optional[str] """The associated name""" + phone_number_id: Optional[str] + """The WhatsApp integration phone number ID""" + session_duration: Optional[float] """The session duration (in milliseconds)""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float]) -> None: + def __init__(self, access_token: Optional[str], alias: Optional[str], allow_from: Optional[str], app_secret: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], phone_number_id: Optional[str], session_duration: Optional[float]) -> None: + self.access_token = access_token self.alias = alias self.allow_from = allow_from + self.app_secret = app_secret self.attachments = attachments self.blueprint_id = blueprint_id self.bot_id = bot_id @@ -20292,13 +18113,16 @@ def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: self.description = description self.meta = meta self.name = name + self.phone_number_id = phone_number_id self.session_duration = session_duration @staticmethod - def from_dict(obj: Any) -> 'EmailIntegrationCreateRequest': + def from_dict(obj: Any) -> 'IntegrationWhatsAppCreateRequest': assert isinstance(obj, dict) + access_token = from_union([from_str, from_none], obj.get("accessToken")) alias = from_union([from_str, from_none], obj.get("alias")) allow_from = from_union([from_str, from_none], obj.get("allowFrom")) + app_secret = from_union([from_str, from_none], obj.get("appSecret")) attachments = from_union([from_bool, from_none], obj.get("attachments")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) @@ -20306,15 +18130,20 @@ def from_dict(obj: Any) -> 'EmailIntegrationCreateRequest': description = from_union([from_str, from_none], obj.get("description")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) + phone_number_id = from_union([from_str, from_none], obj.get("phoneNumberId")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - return EmailIntegrationCreateRequest(alias, allow_from, attachments, blueprint_id, bot_id, contact_collection, description, meta, name, session_duration) + return IntegrationWhatsAppCreateRequest(access_token, alias, allow_from, app_secret, attachments, blueprint_id, bot_id, contact_collection, description, meta, name, phone_number_id, session_duration) def to_dict(self) -> dict: result: dict = {} + if self.access_token is not None: + result["accessToken"] = from_union([from_str, from_none], self.access_token) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) if self.allow_from is not None: result["allowFrom"] = from_union([from_str, from_none], self.allow_from) + if self.app_secret is not None: + result["appSecret"] = from_union([from_str, from_none], self.app_secret) if self.attachments is not None: result["attachments"] = from_union([from_bool, from_none], self.attachments) if self.blueprint_id is not None: @@ -20329,213 +18158,66 @@ def to_dict(self) -> dict: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.phone_number_id is not None: + result["phoneNumberId"] = from_union([from_str, from_none], self.phone_number_id) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) return result -class EmailIntegrationCreateResponse: +class IntegrationWhatsAppCreateResponse: id: str - """The ID of the Email Integration""" + """The ID of the WhatsApp Integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'EmailIntegrationCreateResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return EmailIntegrationCreateResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - - -class EmailIntegrationListParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" - - -class EmailIntegrationListParams: - cursor: Optional[str] - """The cursor to use for pagination""" - - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" - - order: Optional[EmailIntegrationListParamsOrder] - """The order of the paginated items""" - - take: Optional[int] - """The number of items to retrieve""" - - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[EmailIntegrationListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take - - @staticmethod - def from_dict(obj: Any) -> 'EmailIntegrationListParams': - assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([EmailIntegrationListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return EmailIntegrationListParams(cursor, meta, order, take) - - def to_dict(self) -> dict: - result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(EmailIntegrationListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) - return result - - -class EmailIntegrationListResponseItem: - """Blueprint properties""" - - alias: Optional[str] - """The unique alias for the instance""" - - allow_from: Optional[str] - """Newline-separated list of email patterns allowed to send messages to this integration""" - - attachments: Optional[bool] - """Weather the bot supports attachments""" - - blueprint_id: Optional[str] - """The ID of the blueprint""" - - bot_id: Optional[str] - """The ID of the bot this configuration is using""" - - contact_collection: Optional[bool] - """Weather to collect contacts""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - description: Optional[str] - """The associated description""" - - id: str - """The instance ID""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: Optional[str] - """The associated name""" - - session_duration: Optional[float] - """The session duration (in milliseconds)""" - - updated_at: float - """The timestamp (ms) when the instance was updated""" - - def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float) -> None: - self.alias = alias - self.allow_from = allow_from - self.attachments = attachments - self.blueprint_id = blueprint_id - self.bot_id = bot_id - self.contact_collection = contact_collection - self.created_at = created_at - self.description = description - self.id = id - self.meta = meta - self.name = name - self.session_duration = session_duration - self.updated_at = updated_at - - @staticmethod - def from_dict(obj: Any) -> 'EmailIntegrationListResponseItem': + def from_dict(obj: Any) -> 'IntegrationWhatsAppCreateResponse': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - allow_from = from_union([from_str, from_none], obj.get("allowFrom")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - updated_at = from_float(obj.get("updatedAt")) - return EmailIntegrationListResponseItem(alias, allow_from, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at) + return IntegrationWhatsAppCreateResponse(id) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.allow_from is not None: - result["allowFrom"] = from_union([from_str, from_none], self.allow_from) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - result["updatedAt"] = to_float(self.updated_at) return result -class EmailIntegrationListResponse: - cursor: str - """Cursor for fetching the next page""" - - items: List[EmailIntegrationListResponseItem] - - def __init__(self, cursor: str, items: List[EmailIntegrationListResponseItem]) -> None: - self.cursor = cursor - self.items = items +class IntegrationWhatsAppUpdateParams: + whatsapp_integration_id: str + """The ID of the WhatsApp integration""" + + def __init__(self, whatsapp_integration_id: str) -> None: + self.whatsapp_integration_id = whatsapp_integration_id @staticmethod - def from_dict(obj: Any) -> 'EmailIntegrationListResponse': + def from_dict(obj: Any) -> 'IntegrationWhatsAppUpdateParams': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(EmailIntegrationListResponseItem.from_dict, obj.get("items")) - return EmailIntegrationListResponse(cursor, items) + whatsapp_integration_id = from_str(obj.get("whatsappIntegrationId")) + return IntegrationWhatsAppUpdateParams(whatsapp_integration_id) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(EmailIntegrationListResponseItem, x), self.items) + result["whatsappIntegrationId"] = from_str(self.whatsapp_integration_id) return result -class EmailIntegrationListStreamItemData: - """Blueprint properties""" +class IntegrationWhatsAppUpdateRequest: + """A bot configuration that can be applied without a dedicated bot instance.""" + + access_token: Optional[str] + """The WhatsApp integration access token""" alias: Optional[str] """The unique alias for the instance""" allow_from: Optional[str] - """Newline-separated list of email patterns allowed to send messages to this integration""" + """Newline-or-comma-separated list of allowed senders. Use E.164 phone numbers with or + without the leading `+`. Set to `*` to allow all. Leave empty to deny all. + """ + app_secret: Optional[str] + """The Meta app secret used to validate webhook signatures""" attachments: Optional[bool] """Weather the bot supports attachments""" @@ -20549,66 +18231,64 @@ class EmailIntegrationListStreamItemData: contact_collection: Optional[bool] """Weather to collect contacts""" - created_at: float - """The timestamp (ms) when the instance was created""" - description: Optional[str] """The associated description""" - id: str - """The instance ID""" - meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" + phone_number_id: Optional[str] + """The WhatsApp integration phone number ID""" + session_duration: Optional[float] """The session duration (in milliseconds)""" - updated_at: float - """The timestamp (ms) when the instance was updated""" - - def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float) -> None: + def __init__(self, access_token: Optional[str], alias: Optional[str], allow_from: Optional[str], app_secret: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], phone_number_id: Optional[str], session_duration: Optional[float]) -> None: + self.access_token = access_token self.alias = alias self.allow_from = allow_from + self.app_secret = app_secret self.attachments = attachments self.blueprint_id = blueprint_id self.bot_id = bot_id self.contact_collection = contact_collection - self.created_at = created_at self.description = description - self.id = id self.meta = meta self.name = name + self.phone_number_id = phone_number_id self.session_duration = session_duration - self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'EmailIntegrationListStreamItemData': + def from_dict(obj: Any) -> 'IntegrationWhatsAppUpdateRequest': assert isinstance(obj, dict) + access_token = from_union([from_str, from_none], obj.get("accessToken")) alias = from_union([from_str, from_none], obj.get("alias")) allow_from = from_union([from_str, from_none], obj.get("allowFrom")) + app_secret = from_union([from_str, from_none], obj.get("appSecret")) attachments = from_union([from_bool, from_none], obj.get("attachments")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) - created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) + phone_number_id = from_union([from_str, from_none], obj.get("phoneNumberId")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - updated_at = from_float(obj.get("updatedAt")) - return EmailIntegrationListStreamItemData(alias, allow_from, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at) + return IntegrationWhatsAppUpdateRequest(access_token, alias, allow_from, app_secret, attachments, blueprint_id, bot_id, contact_collection, description, meta, name, phone_number_id, session_duration) def to_dict(self) -> dict: result: dict = {} + if self.access_token is not None: + result["accessToken"] = from_union([from_str, from_none], self.access_token) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) if self.allow_from is not None: result["allowFrom"] = from_union([from_str, from_none], self.allow_from) + if self.app_secret is not None: + result["appSecret"] = from_union([from_str, from_none], self.app_secret) if self.attachments is not None: result["attachments"] = from_union([from_bool, from_none], self.attachments) if self.blueprint_id is not None: @@ -20617,82 +18297,69 @@ def to_dict(self) -> dict: result["botId"] = from_union([from_str, from_none], self.bot_id) if self.contact_collection is not None: result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) - result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.phone_number_id is not None: + result["phoneNumberId"] = from_union([from_str, from_none], self.phone_number_id) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - result["updatedAt"] = to_float(self.updated_at) return result -class EmailIntegrationListStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - - -class EmailIntegrationListStreamItem: - data: EmailIntegrationListStreamItemData - """Blueprint properties""" - - type: EmailIntegrationListStreamItemType - """The type of event""" +class IntegrationWhatsAppUpdateResponse: + id: str + """The ID of the WhatsApp Integration""" - def __init__(self, data: EmailIntegrationListStreamItemData, type: EmailIntegrationListStreamItemType) -> None: - self.data = data - self.type = type + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'EmailIntegrationListStreamItem': + def from_dict(obj: Any) -> 'IntegrationWhatsAppUpdateResponse': assert isinstance(obj, dict) - data = EmailIntegrationListStreamItemData.from_dict(obj.get("data")) - type = EmailIntegrationListStreamItemType(obj.get("type")) - return EmailIntegrationListStreamItem(data, type) + id = from_str(obj.get("id")) + return IntegrationWhatsAppUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(EmailIntegrationListStreamItemData, self.data) - result["type"] = to_enum(EmailIntegrationListStreamItemType, self.type) + result["id"] = from_str(self.id) return result -class IntegrationExtractDeleteParams: - extract_integration_id: str - """The ID of the Extract integration""" +class IntegrationWhatsAppSetupParams: + whatsapp_integration_id: str + """The ID of the WhatsApp integration""" - def __init__(self, extract_integration_id: str) -> None: - self.extract_integration_id = extract_integration_id + def __init__(self, whatsapp_integration_id: str) -> None: + self.whatsapp_integration_id = whatsapp_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationExtractDeleteParams': + def from_dict(obj: Any) -> 'IntegrationWhatsAppSetupParams': assert isinstance(obj, dict) - extract_integration_id = from_str(obj.get("extractIntegrationId")) - return IntegrationExtractDeleteParams(extract_integration_id) + whatsapp_integration_id = from_str(obj.get("whatsappIntegrationId")) + return IntegrationWhatsAppSetupParams(whatsapp_integration_id) def to_dict(self) -> dict: result: dict = {} - result["extractIntegrationId"] = from_str(self.extract_integration_id) + result["whatsappIntegrationId"] = from_str(self.whatsapp_integration_id) return result -class IntegrationExtractDeleteResponse: +class IntegrationWhatsAppSetupResponse: id: str - """The ID of the deleted Extract integration""" + """The ID of the WhatsApp Integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationExtractDeleteResponse': + def from_dict(obj: Any) -> 'IntegrationWhatsAppSetupResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationExtractDeleteResponse(id) + return IntegrationWhatsAppSetupResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -20700,36 +18367,52 @@ def to_dict(self) -> dict: return result -class IntegrationExtractFetchParams: - extract_integration_id: str - """The ID of the Extract integration to retrieve""" +class IntegrationWhatsAppFetchParams: + whatsapp_integration_id: str + """The ID of the WhatsApp integration to retrieve""" - def __init__(self, extract_integration_id: str) -> None: - self.extract_integration_id = extract_integration_id + def __init__(self, whatsapp_integration_id: str) -> None: + self.whatsapp_integration_id = whatsapp_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationExtractFetchParams': + def from_dict(obj: Any) -> 'IntegrationWhatsAppFetchParams': assert isinstance(obj, dict) - extract_integration_id = from_str(obj.get("extractIntegrationId")) - return IntegrationExtractFetchParams(extract_integration_id) + whatsapp_integration_id = from_str(obj.get("whatsappIntegrationId")) + return IntegrationWhatsAppFetchParams(whatsapp_integration_id) def to_dict(self) -> dict: result: dict = {} - result["extractIntegrationId"] = from_str(self.extract_integration_id) + result["whatsappIntegrationId"] = from_str(self.whatsapp_integration_id) return result -class IntegrationExtractFetchResponse: +class IntegrationWhatsAppFetchResponse: """Blueprint properties""" + access_token: Optional[str] + """The WhatsApp integration access token (returned as '********' if configured, null + otherwise) + """ alias: Optional[str] """The unique alias for the instance""" + allow_from: Optional[str] + """Newline-or-comma-separated list of allowed senders""" + + app_secret: Optional[str] + """The Meta app secret (returned as '********' if configured, null otherwise)""" + + attachments: Optional[bool] + """Weather the bot supports attachments""" + blueprint_id: Optional[str] """The ID of the blueprint""" - bot_id: str - """The ID of the Bot to use""" + bot_id: Optional[str] + """The ID of the bot this configuration is using""" + + contact_collection: Optional[bool] + """Weather to collect contacts""" created_at: float """The timestamp (ms) when the instance was created""" @@ -20743,428 +18426,620 @@ class IntegrationExtractFetchResponse: meta: Optional[Dict[str, Any]] """Meta data information""" - model: Optional[str] - """The language model to use for data extraction""" - name: Optional[str] """The associated name""" - request: Optional[str] - """Optional webhook to receive the extracted data""" + phone_number_id: Optional[str] + """The WhatsApp integration phone number ID""" - schema: Optional[Dict[str, Any]] - """The configured extraction schema""" + session_duration: Optional[float] + """The session duration (in milliseconds)""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: str, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], model: Optional[str], name: Optional[str], request: Optional[str], schema: Optional[Dict[str, Any]], updated_at: float) -> None: + verify_token: str + """The WhatsApp integration verify token""" + + def __init__(self, access_token: Optional[str], alias: Optional[str], allow_from: Optional[str], app_secret: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], phone_number_id: Optional[str], session_duration: Optional[float], updated_at: float, verify_token: str) -> None: + self.access_token = access_token self.alias = alias + self.allow_from = allow_from + self.app_secret = app_secret + self.attachments = attachments self.blueprint_id = blueprint_id self.bot_id = bot_id + self.contact_collection = contact_collection self.created_at = created_at self.description = description self.id = id self.meta = meta - self.model = model self.name = name - self.request = request - self.schema = schema + self.phone_number_id = phone_number_id + self.session_duration = session_duration self.updated_at = updated_at + self.verify_token = verify_token @staticmethod - def from_dict(obj: Any) -> 'IntegrationExtractFetchResponse': + def from_dict(obj: Any) -> 'IntegrationWhatsAppFetchResponse': assert isinstance(obj, dict) + access_token = from_union([from_str, from_none], obj.get("accessToken")) alias = from_union([from_str, from_none], obj.get("alias")) + allow_from = from_union([from_str, from_none], obj.get("allowFrom")) + app_secret = from_union([from_str, from_none], obj.get("appSecret")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_str(obj.get("botId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - model = from_union([from_str, from_none], obj.get("model")) name = from_union([from_str, from_none], obj.get("name")) - request = from_union([from_str, from_none], obj.get("request")) - schema = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("schema")) + phone_number_id = from_union([from_str, from_none], obj.get("phoneNumberId")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) updated_at = from_float(obj.get("updatedAt")) - return IntegrationExtractFetchResponse(alias, blueprint_id, bot_id, created_at, description, id, meta, model, name, request, schema, updated_at) + verify_token = from_str(obj.get("verifyToken")) + return IntegrationWhatsAppFetchResponse(access_token, alias, allow_from, app_secret, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, phone_number_id, session_duration, updated_at, verify_token) def to_dict(self) -> dict: result: dict = {} + if self.access_token is not None: + result["accessToken"] = from_union([from_str, from_none], self.access_token) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) + if self.allow_from is not None: + result["allowFrom"] = from_union([from_str, from_none], self.allow_from) + if self.app_secret is not None: + result["appSecret"] = from_union([from_str, from_none], self.app_secret) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - result["botId"] = from_str(self.bot_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.request is not None: - result["request"] = from_union([from_str, from_none], self.request) - if self.schema is not None: - result["schema"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.schema) + if self.phone_number_id is not None: + result["phoneNumberId"] = from_union([from_str, from_none], self.phone_number_id) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) result["updatedAt"] = to_float(self.updated_at) + result["verifyToken"] = from_str(self.verify_token) return result -class ExtractIntegrationItemsExportParamsOrder(Enum): +class IntegrationWhatsAppDeleteParams: + whatsapp_integration_id: str + """The ID of the WhatsApp integration""" + + def __init__(self, whatsapp_integration_id: str) -> None: + self.whatsapp_integration_id = whatsapp_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationWhatsAppDeleteParams': + assert isinstance(obj, dict) + whatsapp_integration_id = from_str(obj.get("whatsappIntegrationId")) + return IntegrationWhatsAppDeleteParams(whatsapp_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["whatsappIntegrationId"] = from_str(self.whatsapp_integration_id) + return result + + +class IntegrationWhatsAppDeleteResponse: + id: str + """The ID of the deleted WhatsApp integration""" + + def __init__(self, id: str) -> None: + self.id = id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationWhatsAppDeleteResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return IntegrationWhatsAppDeleteResponse(id) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result + + +class IntegrationTwilioListParamsOrder(Enum): """The order of the paginated items""" ASC = "asc" DESC = "desc" -class ExtractIntegrationItemsExportParams: +class IntegrationTwilioListParams: cursor: Optional[str] """The cursor to use for pagination""" - extract_integration_id: str - """The ID of the extract integration""" + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" - order: Optional[ExtractIntegrationItemsExportParamsOrder] + order: Optional[IntegrationTwilioListParamsOrder] """The order of the paginated items""" take: Optional[int] """The number of items to retrieve""" - def __init__(self, cursor: Optional[str], extract_integration_id: str, order: Optional[ExtractIntegrationItemsExportParamsOrder], take: Optional[int]) -> None: + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationTwilioListParamsOrder], take: Optional[int]) -> None: self.cursor = cursor - self.extract_integration_id = extract_integration_id + self.meta = meta self.order = order self.take = take @staticmethod - def from_dict(obj: Any) -> 'ExtractIntegrationItemsExportParams': + def from_dict(obj: Any) -> 'IntegrationTwilioListParams': assert isinstance(obj, dict) cursor = from_union([from_str, from_none], obj.get("cursor")) - extract_integration_id = from_str(obj.get("extractIntegrationId")) - order = from_union([ExtractIntegrationItemsExportParamsOrder, from_none], obj.get("order")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([IntegrationTwilioListParamsOrder, from_none], obj.get("order")) take = from_union([from_int, from_none], obj.get("take")) - return ExtractIntegrationItemsExportParams(cursor, extract_integration_id, order, take) + return IntegrationTwilioListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} if self.cursor is not None: result["cursor"] = from_union([from_str, from_none], self.cursor) - result["extractIntegrationId"] = from_str(self.extract_integration_id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(ExtractIntegrationItemsExportParamsOrder, x), from_none], self.order) + result["order"] = from_union([lambda x: to_enum(IntegrationTwilioListParamsOrder, x), from_none], self.order) if self.take is not None: result["take"] = from_union([from_int, from_none], self.take) return result -class ExtractIntegrationItemsExportResponseItem: - conversation_id: Optional[str] - """The ID of the conversation from which data was extracted""" +class IntegrationTwilioListResponseItem: + """Blueprint properties""" - created_at: Optional[str] - """The timestamp when the item was created""" + account_sid: Optional[str] + """The Twilio account SID""" - data: Dict[str, Any] - """The extracted data in YAML-serializable format""" + alias: Optional[str] + """The unique alias for the instance""" - extract_integration_id: str - """The ID of the extract integration""" + allow_from: Optional[str] + """Newline-or-comma-separated list of allowed senders""" + + blueprint_id: Optional[str] + """The ID of the blueprint""" + + bot_id: Optional[str] + """The ID of the bot this configuration is using""" + + contact_collection: Optional[bool] + """Weather to collect contacts""" + + created_at: float + """The timestamp (ms) when the instance was created""" + + description: Optional[str] + """The associated description""" id: str - """The unique identifier of the item""" + """The instance ID""" - updated_at: Optional[str] - """The timestamp when the item was last updated""" + meta: Optional[Dict[str, Any]] + """Meta data information""" - def __init__(self, conversation_id: Optional[str], created_at: Optional[str], data: Dict[str, Any], extract_integration_id: str, id: str, updated_at: Optional[str]) -> None: - self.conversation_id = conversation_id + name: Optional[str] + """The associated name""" + + session_duration: Optional[float] + """The session duration (in milliseconds)""" + + updated_at: float + """The timestamp (ms) when the instance was updated""" + + voice: Optional[str] + """The voice configuration structured string""" + + def __init__(self, account_sid: Optional[str], alias: Optional[str], allow_from: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float, voice: Optional[str]) -> None: + self.account_sid = account_sid + self.alias = alias + self.allow_from = allow_from + self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.contact_collection = contact_collection self.created_at = created_at - self.data = data - self.extract_integration_id = extract_integration_id + self.description = description self.id = id + self.meta = meta + self.name = name + self.session_duration = session_duration self.updated_at = updated_at + self.voice = voice @staticmethod - def from_dict(obj: Any) -> 'ExtractIntegrationItemsExportResponseItem': + def from_dict(obj: Any) -> 'IntegrationTwilioListResponseItem': assert isinstance(obj, dict) - conversation_id = from_union([from_str, from_none], obj.get("conversationId")) - created_at = from_union([from_str, from_none], obj.get("createdAt")) - data = from_dict(lambda x: x, obj.get("data")) - extract_integration_id = from_str(obj.get("extractIntegrationId")) + account_sid = from_union([from_str, from_none], obj.get("accountSid")) + alias = from_union([from_str, from_none], obj.get("alias")) + allow_from = from_union([from_str, from_none], obj.get("allowFrom")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + created_at = from_float(obj.get("createdAt")) + description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) - updated_at = from_union([from_str, from_none], obj.get("updatedAt")) - return ExtractIntegrationItemsExportResponseItem(conversation_id, created_at, data, extract_integration_id, id, updated_at) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + updated_at = from_float(obj.get("updatedAt")) + voice = from_union([from_str, from_none], obj.get("voice")) + return IntegrationTwilioListResponseItem(account_sid, alias, allow_from, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at, voice) def to_dict(self) -> dict: result: dict = {} - if self.conversation_id is not None: - result["conversationId"] = from_union([from_str, from_none], self.conversation_id) - if self.created_at is not None: - result["createdAt"] = from_union([from_str, from_none], self.created_at) - result["data"] = from_dict(lambda x: x, self.data) - result["extractIntegrationId"] = from_str(self.extract_integration_id) + if self.account_sid is not None: + result["accountSid"] = from_union([from_str, from_none], self.account_sid) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.allow_from is not None: + result["allowFrom"] = from_union([from_str, from_none], self.allow_from) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + result["createdAt"] = to_float(self.created_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) - if self.updated_at is not None: - result["updatedAt"] = from_union([from_str, from_none], self.updated_at) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + result["updatedAt"] = to_float(self.updated_at) + if self.voice is not None: + result["voice"] = from_union([from_str, from_none], self.voice) return result -class ExtractIntegrationItemsExportResponse: - cursor: Optional[str] +class IntegrationTwilioListResponse: + cursor: str """Cursor for fetching the next page""" - items: Optional[List[ExtractIntegrationItemsExportResponseItem]] + items: List[IntegrationTwilioListResponseItem] - def __init__(self, cursor: Optional[str], items: Optional[List[ExtractIntegrationItemsExportResponseItem]]) -> None: + def __init__(self, cursor: str, items: List[IntegrationTwilioListResponseItem]) -> None: self.cursor = cursor self.items = items @staticmethod - def from_dict(obj: Any) -> 'ExtractIntegrationItemsExportResponse': + def from_dict(obj: Any) -> 'IntegrationTwilioListResponse': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - items = from_union([lambda x: from_list(ExtractIntegrationItemsExportResponseItem.from_dict, x), from_none], obj.get("items")) - return ExtractIntegrationItemsExportResponse(cursor, items) + cursor = from_str(obj.get("cursor")) + items = from_list(IntegrationTwilioListResponseItem.from_dict, obj.get("items")) + return IntegrationTwilioListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.items is not None: - result["items"] = from_union([lambda x: from_list(lambda x: to_class(ExtractIntegrationItemsExportResponseItem, x), x), from_none], self.items) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(IntegrationTwilioListResponseItem, x), self.items) return result -class ExtractIntegrationItemListParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" - +class IntegrationTwilioListStreamItemData: + """Blueprint properties""" -class ExtractIntegrationItemListParams: - cursor: Optional[str] - """The cursor to use for pagination""" + account_sid: Optional[str] + """The Twilio account SID""" - extract_integration_id: str - """The ID of the extract integration""" + alias: Optional[str] + """The unique alias for the instance""" - order: Optional[ExtractIntegrationItemListParamsOrder] - """The order of the paginated items""" + allow_from: Optional[str] + """Newline-or-comma-separated list of allowed senders""" - take: Optional[int] - """The number of items to retrieve""" + blueprint_id: Optional[str] + """The ID of the blueprint""" - def __init__(self, cursor: Optional[str], extract_integration_id: str, order: Optional[ExtractIntegrationItemListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.extract_integration_id = extract_integration_id - self.order = order - self.take = take + bot_id: Optional[str] + """The ID of the bot this configuration is using""" - @staticmethod - def from_dict(obj: Any) -> 'ExtractIntegrationItemListParams': - assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - extract_integration_id = from_str(obj.get("extractIntegrationId")) - order = from_union([ExtractIntegrationItemListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return ExtractIntegrationItemListParams(cursor, extract_integration_id, order, take) + contact_collection: Optional[bool] + """Weather to collect contacts""" - def to_dict(self) -> dict: - result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - result["extractIntegrationId"] = from_str(self.extract_integration_id) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(ExtractIntegrationItemListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) - return result + created_at: float + """The timestamp (ms) when the instance was created""" + description: Optional[str] + """The associated description""" -class ExtractIntegrationItemListResponseItem: - conversation_id: Optional[str] - """The ID of the conversation from which data was extracted""" + id: str + """The instance ID""" - created_at: Optional[str] - """The timestamp when the item was created""" + meta: Optional[Dict[str, Any]] + """Meta data information""" - data: Dict[str, Any] - """The extracted data matching the integration schema""" + name: Optional[str] + """The associated name""" - extract_integration_id: str - """The ID of the extract integration""" + session_duration: Optional[float] + """The session duration (in milliseconds)""" - id: str - """The unique identifier of the item""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - updated_at: Optional[str] - """The timestamp when the item was last updated""" + voice: Optional[str] + """The voice configuration structured string""" - def __init__(self, conversation_id: Optional[str], created_at: Optional[str], data: Dict[str, Any], extract_integration_id: str, id: str, updated_at: Optional[str]) -> None: - self.conversation_id = conversation_id + def __init__(self, account_sid: Optional[str], alias: Optional[str], allow_from: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float, voice: Optional[str]) -> None: + self.account_sid = account_sid + self.alias = alias + self.allow_from = allow_from + self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.contact_collection = contact_collection self.created_at = created_at - self.data = data - self.extract_integration_id = extract_integration_id + self.description = description self.id = id + self.meta = meta + self.name = name + self.session_duration = session_duration self.updated_at = updated_at + self.voice = voice @staticmethod - def from_dict(obj: Any) -> 'ExtractIntegrationItemListResponseItem': + def from_dict(obj: Any) -> 'IntegrationTwilioListStreamItemData': assert isinstance(obj, dict) - conversation_id = from_union([from_str, from_none], obj.get("conversationId")) - created_at = from_union([from_str, from_none], obj.get("createdAt")) - data = from_dict(lambda x: x, obj.get("data")) - extract_integration_id = from_str(obj.get("extractIntegrationId")) + account_sid = from_union([from_str, from_none], obj.get("accountSid")) + alias = from_union([from_str, from_none], obj.get("alias")) + allow_from = from_union([from_str, from_none], obj.get("allowFrom")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + created_at = from_float(obj.get("createdAt")) + description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) - updated_at = from_union([from_str, from_none], obj.get("updatedAt")) - return ExtractIntegrationItemListResponseItem(conversation_id, created_at, data, extract_integration_id, id, updated_at) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + updated_at = from_float(obj.get("updatedAt")) + voice = from_union([from_str, from_none], obj.get("voice")) + return IntegrationTwilioListStreamItemData(account_sid, alias, allow_from, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at, voice) def to_dict(self) -> dict: result: dict = {} - if self.conversation_id is not None: - result["conversationId"] = from_union([from_str, from_none], self.conversation_id) - if self.created_at is not None: - result["createdAt"] = from_union([from_str, from_none], self.created_at) - result["data"] = from_dict(lambda x: x, self.data) - result["extractIntegrationId"] = from_str(self.extract_integration_id) + if self.account_sid is not None: + result["accountSid"] = from_union([from_str, from_none], self.account_sid) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.allow_from is not None: + result["allowFrom"] = from_union([from_str, from_none], self.allow_from) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + result["createdAt"] = to_float(self.created_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) - if self.updated_at is not None: - result["updatedAt"] = from_union([from_str, from_none], self.updated_at) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + result["updatedAt"] = to_float(self.updated_at) + if self.voice is not None: + result["voice"] = from_union([from_str, from_none], self.voice) return result -class ExtractIntegrationItemListResponse: - cursor: Optional[str] - """Cursor for fetching the next page""" +class IntegrationTwilioListStreamItemType(Enum): + """The type of event""" - items: Optional[List[ExtractIntegrationItemListResponseItem]] + ITEM = "item" - def __init__(self, cursor: Optional[str], items: Optional[List[ExtractIntegrationItemListResponseItem]]) -> None: - self.cursor = cursor - self.items = items + +class IntegrationTwilioListStreamItem: + data: IntegrationTwilioListStreamItemData + """Blueprint properties""" + + type: IntegrationTwilioListStreamItemType + """The type of event""" + + def __init__(self, data: IntegrationTwilioListStreamItemData, type: IntegrationTwilioListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'ExtractIntegrationItemListResponse': + def from_dict(obj: Any) -> 'IntegrationTwilioListStreamItem': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - items = from_union([lambda x: from_list(ExtractIntegrationItemListResponseItem.from_dict, x), from_none], obj.get("items")) - return ExtractIntegrationItemListResponse(cursor, items) + data = IntegrationTwilioListStreamItemData.from_dict(obj.get("data")) + type = IntegrationTwilioListStreamItemType(obj.get("type")) + return IntegrationTwilioListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.items is not None: - result["items"] = from_union([lambda x: from_list(lambda x: to_class(ExtractIntegrationItemListResponseItem, x), x), from_none], self.items) + result["data"] = to_class(IntegrationTwilioListStreamItemData, self.data) + result["type"] = to_enum(IntegrationTwilioListStreamItemType, self.type) return result -class IntegrationExtractTriggerParams: - extract_integration_id: str - """The ID of the Extract integration""" +class IntegrationTwilioCreateRequest: + """A bot configuration that can be applied without a dedicated bot instance.""" - def __init__(self, extract_integration_id: str) -> None: - self.extract_integration_id = extract_integration_id + account_sid: Optional[str] + """The Twilio account SID""" - @staticmethod - def from_dict(obj: Any) -> 'IntegrationExtractTriggerParams': - assert isinstance(obj, dict) - extract_integration_id = from_str(obj.get("extractIntegrationId")) - return IntegrationExtractTriggerParams(extract_integration_id) + alias: Optional[str] + """The unique alias for the instance""" - def to_dict(self) -> dict: - result: dict = {} - result["extractIntegrationId"] = from_str(self.extract_integration_id) - return result + allow_from: Optional[str] + """Newline-or-comma-separated list of allowed senders. Use E.164 phone numbers with or + without the leading `+`. Set to `*` to allow all. Leave empty to deny all. + """ + auth_token: Optional[str] + """The Twilio auth token""" + blueprint_id: Optional[str] + """The ID of the blueprint""" -class IntegrationExtractTriggerRequest: - conversation_ids: Optional[List[str]] - """Array of conversation IDs to process""" + bot_id: Optional[str] + """The ID of the bot this configuration is using""" - sample: Optional[int] - """Number of recent conversations to process (default 20)""" + contact_collection: Optional[bool] + """Weather to collect contacts""" - def __init__(self, conversation_ids: Optional[List[str]], sample: Optional[int]) -> None: - self.conversation_ids = conversation_ids - self.sample = sample + description: Optional[str] + """The associated description""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" + + name: Optional[str] + """The associated name""" + + session_duration: Optional[float] + """The session duration (in milliseconds)""" + + voice: Optional[str] + """The voice configuration structured string""" + + def __init__(self, account_sid: Optional[str], alias: Optional[str], allow_from: Optional[str], auth_token: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], voice: Optional[str]) -> None: + self.account_sid = account_sid + self.alias = alias + self.allow_from = allow_from + self.auth_token = auth_token + self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.contact_collection = contact_collection + self.description = description + self.meta = meta + self.name = name + self.session_duration = session_duration + self.voice = voice @staticmethod - def from_dict(obj: Any) -> 'IntegrationExtractTriggerRequest': + def from_dict(obj: Any) -> 'IntegrationTwilioCreateRequest': assert isinstance(obj, dict) - conversation_ids = from_union([lambda x: from_list(from_str, x), from_none], obj.get("conversationIds")) - sample = from_union([from_int, from_none], obj.get("sample")) - return IntegrationExtractTriggerRequest(conversation_ids, sample) + account_sid = from_union([from_str, from_none], obj.get("accountSid")) + alias = from_union([from_str, from_none], obj.get("alias")) + allow_from = from_union([from_str, from_none], obj.get("allowFrom")) + auth_token = from_union([from_str, from_none], obj.get("authToken")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + description = from_union([from_str, from_none], obj.get("description")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + voice = from_union([from_str, from_none], obj.get("voice")) + return IntegrationTwilioCreateRequest(account_sid, alias, allow_from, auth_token, blueprint_id, bot_id, contact_collection, description, meta, name, session_duration, voice) def to_dict(self) -> dict: result: dict = {} - if self.conversation_ids is not None: - result["conversationIds"] = from_union([lambda x: from_list(from_str, x), from_none], self.conversation_ids) - if self.sample is not None: - result["sample"] = from_union([from_int, from_none], self.sample) + if self.account_sid is not None: + result["accountSid"] = from_union([from_str, from_none], self.account_sid) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.allow_from is not None: + result["allowFrom"] = from_union([from_str, from_none], self.allow_from) + if self.auth_token is not None: + result["authToken"] = from_union([from_str, from_none], self.auth_token) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.voice is not None: + result["voice"] = from_union([from_str, from_none], self.voice) return result -class IntegrationExtractTriggerResponse: +class IntegrationTwilioCreateResponse: id: str - """ID of the extract integration""" - - triggered: float - """Number of conversations queued for processing""" + """The ID of the Twilio Integration""" - def __init__(self, id: str, triggered: float) -> None: + def __init__(self, id: str) -> None: self.id = id - self.triggered = triggered @staticmethod - def from_dict(obj: Any) -> 'IntegrationExtractTriggerResponse': + def from_dict(obj: Any) -> 'IntegrationTwilioCreateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - triggered = from_float(obj.get("triggered")) - return IntegrationExtractTriggerResponse(id, triggered) + return IntegrationTwilioCreateResponse(id) def to_dict(self) -> dict: result: dict = {} result["id"] = from_str(self.id) - result["triggered"] = to_float(self.triggered) return result -class IntegrationExtractUpdateParams: - extract_integration_id: str - """The ID of the Extract integration""" +class IntegrationTwilioUpdateParams: + twilio_integration_id: str + """The ID of the Twilio integration""" - def __init__(self, extract_integration_id: str) -> None: - self.extract_integration_id = extract_integration_id + def __init__(self, twilio_integration_id: str) -> None: + self.twilio_integration_id = twilio_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationExtractUpdateParams': + def from_dict(obj: Any) -> 'IntegrationTwilioUpdateParams': assert isinstance(obj, dict) - extract_integration_id = from_str(obj.get("extractIntegrationId")) - return IntegrationExtractUpdateParams(extract_integration_id) + twilio_integration_id = from_str(obj.get("twilioIntegrationId")) + return IntegrationTwilioUpdateParams(twilio_integration_id) def to_dict(self) -> dict: result: dict = {} - result["extractIntegrationId"] = from_str(self.extract_integration_id) + result["twilioIntegrationId"] = from_str(self.twilio_integration_id) return result -class IntegrationExtractUpdateRequest: - """Blueprint properties""" +class IntegrationTwilioUpdateRequest: + """A bot configuration that can be applied without a dedicated bot instance.""" + + account_sid: Optional[str] + """The Twilio account SID""" alias: Optional[str] """The unique alias for the instance""" + allow_from: Optional[str] + """Newline-or-comma-separated list of allowed senders. Use E.164 phone numbers with or + without the leading `+`. Set to `*` to allow all. Leave empty to deny all. + """ + auth_token: Optional[str] + """The Twilio auth token""" + blueprint_id: Optional[str] """The ID of the blueprint""" bot_id: Optional[str] - """The ID of the Bot to use""" + """The ID of the bot this configuration is using""" + + contact_collection: Optional[bool] + """Weather to collect contacts""" description: Optional[str] """The associated description""" @@ -21172,78 +19047,87 @@ class IntegrationExtractUpdateRequest: meta: Optional[Dict[str, Any]] """Meta data information""" - model: Optional[str] - """The language model to use for data extraction""" - name: Optional[str] """The associated name""" - request: Optional[str] - """Optional webhook to receive the extracted data""" + session_duration: Optional[float] + """The session duration (in milliseconds)""" - schema: Optional[Dict[str, Any]] - """The configured extraction schema""" + voice: Optional[str] + """The voice configuration structured string""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], model: Optional[str], name: Optional[str], request: Optional[str], schema: Optional[Dict[str, Any]]) -> None: + def __init__(self, account_sid: Optional[str], alias: Optional[str], allow_from: Optional[str], auth_token: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], voice: Optional[str]) -> None: + self.account_sid = account_sid self.alias = alias + self.allow_from = allow_from + self.auth_token = auth_token self.blueprint_id = blueprint_id self.bot_id = bot_id + self.contact_collection = contact_collection self.description = description self.meta = meta - self.model = model self.name = name - self.request = request - self.schema = schema + self.session_duration = session_duration + self.voice = voice @staticmethod - def from_dict(obj: Any) -> 'IntegrationExtractUpdateRequest': + def from_dict(obj: Any) -> 'IntegrationTwilioUpdateRequest': assert isinstance(obj, dict) + account_sid = from_union([from_str, from_none], obj.get("accountSid")) alias = from_union([from_str, from_none], obj.get("alias")) + allow_from = from_union([from_str, from_none], obj.get("allowFrom")) + auth_token = from_union([from_str, from_none], obj.get("authToken")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) description = from_union([from_str, from_none], obj.get("description")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - model = from_union([from_str, from_none], obj.get("model")) name = from_union([from_str, from_none], obj.get("name")) - request = from_union([from_str, from_none], obj.get("request")) - schema = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("schema")) - return IntegrationExtractUpdateRequest(alias, blueprint_id, bot_id, description, meta, model, name, request, schema) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + voice = from_union([from_str, from_none], obj.get("voice")) + return IntegrationTwilioUpdateRequest(account_sid, alias, allow_from, auth_token, blueprint_id, bot_id, contact_collection, description, meta, name, session_duration, voice) def to_dict(self) -> dict: result: dict = {} + if self.account_sid is not None: + result["accountSid"] = from_union([from_str, from_none], self.account_sid) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) + if self.allow_from is not None: + result["allowFrom"] = from_union([from_str, from_none], self.allow_from) + if self.auth_token is not None: + result["authToken"] = from_union([from_str, from_none], self.auth_token) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.request is not None: - result["request"] = from_union([from_str, from_none], self.request) - if self.schema is not None: - result["schema"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.schema) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.voice is not None: + result["voice"] = from_union([from_str, from_none], self.voice) return result -class IntegrationExtractUpdateResponse: +class IntegrationTwilioUpdateResponse: id: str - """The ID of the Extract Integration""" + """The ID of the Twilio Integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationExtractUpdateResponse': + def from_dict(obj: Any) -> 'IntegrationTwilioUpdateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationExtractUpdateResponse(id) + return IntegrationTwilioUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -21251,96 +19135,204 @@ def to_dict(self) -> dict: return result -class IntegrationExtractCreateRequest: +class IntegrationTwilioSetupParams: + twilio_integration_id: str + """The ID of the Twilio integration""" + + def __init__(self, twilio_integration_id: str) -> None: + self.twilio_integration_id = twilio_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationTwilioSetupParams': + assert isinstance(obj, dict) + twilio_integration_id = from_str(obj.get("twilioIntegrationId")) + return IntegrationTwilioSetupParams(twilio_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["twilioIntegrationId"] = from_str(self.twilio_integration_id) + return result + + +class IntegrationTwilioSetupResponse: + id: str + """The ID of the Twilio Integration""" + + def __init__(self, id: str) -> None: + self.id = id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationTwilioSetupResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return IntegrationTwilioSetupResponse(id) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result + + +class IntegrationTwilioFetchParams: + twilio_integration_id: str + """The ID of the Twilio integration to retrieve""" + + def __init__(self, twilio_integration_id: str) -> None: + self.twilio_integration_id = twilio_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationTwilioFetchParams': + assert isinstance(obj, dict) + twilio_integration_id = from_str(obj.get("twilioIntegrationId")) + return IntegrationTwilioFetchParams(twilio_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["twilioIntegrationId"] = from_str(self.twilio_integration_id) + return result + + +class IntegrationTwilioFetchResponse: """Blueprint properties""" + account_sid: Optional[str] + """The Twilio account SID""" + alias: Optional[str] """The unique alias for the instance""" + allow_from: Optional[str] + """Newline-or-comma-separated list of allowed senders""" + blueprint_id: Optional[str] """The ID of the blueprint""" bot_id: Optional[str] - """The ID of the Bot to use""" + """The ID of the bot this configuration is using""" + + contact_collection: Optional[bool] + """Weather to collect contacts""" + + created_at: float + """The timestamp (ms) when the instance was created""" description: Optional[str] """The associated description""" + id: str + """The instance ID""" + meta: Optional[Dict[str, Any]] """Meta data information""" - model: Optional[str] - """The language model to use for data extraction""" - name: Optional[str] """The associated name""" - request: Optional[str] - """Optional webhook to receive the extracted data""" + session_duration: Optional[float] + """The session duration (in milliseconds)""" - schema: Optional[Dict[str, Any]] - """The configured extraction schema""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], model: Optional[str], name: Optional[str], request: Optional[str], schema: Optional[Dict[str, Any]]) -> None: + voice: Optional[str] + """The voice configuration structured string""" + + def __init__(self, account_sid: Optional[str], alias: Optional[str], allow_from: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float, voice: Optional[str]) -> None: + self.account_sid = account_sid self.alias = alias + self.allow_from = allow_from self.blueprint_id = blueprint_id self.bot_id = bot_id + self.contact_collection = contact_collection + self.created_at = created_at self.description = description + self.id = id self.meta = meta - self.model = model self.name = name - self.request = request - self.schema = schema + self.session_duration = session_duration + self.updated_at = updated_at + self.voice = voice @staticmethod - def from_dict(obj: Any) -> 'IntegrationExtractCreateRequest': + def from_dict(obj: Any) -> 'IntegrationTwilioFetchResponse': assert isinstance(obj, dict) + account_sid = from_union([from_str, from_none], obj.get("accountSid")) alias = from_union([from_str, from_none], obj.get("alias")) + allow_from = from_union([from_str, from_none], obj.get("allowFrom")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - model = from_union([from_str, from_none], obj.get("model")) name = from_union([from_str, from_none], obj.get("name")) - request = from_union([from_str, from_none], obj.get("request")) - schema = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("schema")) - return IntegrationExtractCreateRequest(alias, blueprint_id, bot_id, description, meta, model, name, request, schema) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + updated_at = from_float(obj.get("updatedAt")) + voice = from_union([from_str, from_none], obj.get("voice")) + return IntegrationTwilioFetchResponse(account_sid, alias, allow_from, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at, voice) def to_dict(self) -> dict: result: dict = {} + if self.account_sid is not None: + result["accountSid"] = from_union([from_str, from_none], self.account_sid) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) + if self.allow_from is not None: + result["allowFrom"] = from_union([from_str, from_none], self.allow_from) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.request is not None: - result["request"] = from_union([from_str, from_none], self.request) - if self.schema is not None: - result["schema"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.schema) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + result["updatedAt"] = to_float(self.updated_at) + if self.voice is not None: + result["voice"] = from_union([from_str, from_none], self.voice) return result -class IntegrationExtractCreateResponse: +class IntegrationTwilioDeleteParams: + twilio_integration_id: str + """The ID of the Twilio integration""" + + def __init__(self, twilio_integration_id: str) -> None: + self.twilio_integration_id = twilio_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationTwilioDeleteParams': + assert isinstance(obj, dict) + twilio_integration_id = from_str(obj.get("twilioIntegrationId")) + return IntegrationTwilioDeleteParams(twilio_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["twilioIntegrationId"] = from_str(self.twilio_integration_id) + return result + + +class IntegrationTwilioDeleteResponse: id: str - """The ID of the Extract Integration""" + """The ID of the deleted Twilio integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationExtractCreateResponse': + def from_dict(obj: Any) -> 'IntegrationTwilioDeleteResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationExtractCreateResponse(id) + return IntegrationTwilioDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -21348,40 +19340,40 @@ def to_dict(self) -> dict: return result -class IntegrationExtractListParamsOrder(Enum): +class TriggerIntegrationListParamsOrder(Enum): """The order of the paginated items""" ASC = "asc" DESC = "desc" -class IntegrationExtractListParams: +class TriggerIntegrationListParams: cursor: Optional[str] """The cursor to use for pagination""" meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" + """Key-value pairs to filter the items by metadata""" - order: Optional[IntegrationExtractListParamsOrder] + order: Optional[TriggerIntegrationListParamsOrder] """The order of the paginated items""" take: Optional[int] """The number of items to retrieve""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationExtractListParamsOrder], take: Optional[int]) -> None: + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[TriggerIntegrationListParamsOrder], take: Optional[int]) -> None: self.cursor = cursor self.meta = meta self.order = order self.take = take @staticmethod - def from_dict(obj: Any) -> 'IntegrationExtractListParams': + def from_dict(obj: Any) -> 'TriggerIntegrationListParams': assert isinstance(obj, dict) cursor = from_union([from_str, from_none], obj.get("cursor")) meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([IntegrationExtractListParamsOrder, from_none], obj.get("order")) + order = from_union([TriggerIntegrationListParamsOrder, from_none], obj.get("order")) take = from_union([from_int, from_none], obj.get("take")) - return IntegrationExtractListParams(cursor, meta, order, take) + return TriggerIntegrationListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} @@ -21390,23 +19382,26 @@ def to_dict(self) -> dict: if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(IntegrationExtractListParamsOrder, x), from_none], self.order) + result["order"] = from_union([lambda x: to_enum(TriggerIntegrationListParamsOrder, x), from_none], self.order) if self.take is not None: result["take"] = from_union([from_int, from_none], self.take) return result -class IntegrationExtractListResponseItem: - """Blueprint properties""" +class TriggerIntegrationListResponseItem: + """A bot configuration that can be applied without a dedicated bot instance.""" alias: Optional[str] """The unique alias for the instance""" + authenticate: Optional[bool] + """When enabled the integration requires authentication""" + blueprint_id: Optional[str] """The ID of the blueprint""" - bot_id: str - """The ID of the Bot to use""" + bot_id: Optional[str] + """The ID of the bot this configuration is using""" created_at: float """The timestamp (ms) when the instance was created""" @@ -21417,115 +19412,144 @@ class IntegrationExtractListResponseItem: id: str """The instance ID""" + last_trigger_at: Optional[float] + """The timestamp (ms) of the last trigger execution""" + meta: Optional[Dict[str, Any]] """Meta data information""" - model: Optional[str] - """The language model to use for data extraction""" - name: Optional[str] """The associated name""" - request: Optional[str] - """Optional webhook to receive the extracted data""" + next_trigger_at: Optional[float] + """The timestamp (ms) of the next scheduled trigger execution""" - schema: Optional[Dict[str, Any]] - """The configured extraction schema""" + schedule: Optional[str] + """The schedule for the trigger integration (interval, cron expression, ISO date, or null)""" + + secret: str + """The Trigger integration secret (returned in clear to the owner - it is the value the + calling system must present) + """ + session_duration: Optional[float] + """The session duration (in milliseconds)""" + + timezone: Optional[str] + """The IANA timezone identifier used to evaluate the trigger schedule.""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: str, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], model: Optional[str], name: Optional[str], request: Optional[str], schema: Optional[Dict[str, Any]], updated_at: float) -> None: + def __init__(self, alias: Optional[str], authenticate: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], created_at: float, description: Optional[str], id: str, last_trigger_at: Optional[float], meta: Optional[Dict[str, Any]], name: Optional[str], next_trigger_at: Optional[float], schedule: Optional[str], secret: str, session_duration: Optional[float], timezone: Optional[str], updated_at: float) -> None: self.alias = alias + self.authenticate = authenticate self.blueprint_id = blueprint_id self.bot_id = bot_id self.created_at = created_at self.description = description self.id = id + self.last_trigger_at = last_trigger_at self.meta = meta - self.model = model self.name = name - self.request = request - self.schema = schema + self.next_trigger_at = next_trigger_at + self.schedule = schedule + self.secret = secret + self.session_duration = session_duration + self.timezone = timezone self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'IntegrationExtractListResponseItem': + def from_dict(obj: Any) -> 'TriggerIntegrationListResponseItem': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) + authenticate = from_union([from_bool, from_none], obj.get("authenticate")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_str(obj.get("botId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) + last_trigger_at = from_union([from_float, from_none], obj.get("lastTriggerAt")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - model = from_union([from_str, from_none], obj.get("model")) name = from_union([from_str, from_none], obj.get("name")) - request = from_union([from_str, from_none], obj.get("request")) - schema = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("schema")) + next_trigger_at = from_union([from_float, from_none], obj.get("nextTriggerAt")) + schedule = from_union([from_str, from_none], obj.get("schedule")) + secret = from_str(obj.get("secret")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + timezone = from_union([from_str, from_none], obj.get("timezone")) updated_at = from_float(obj.get("updatedAt")) - return IntegrationExtractListResponseItem(alias, blueprint_id, bot_id, created_at, description, id, meta, model, name, request, schema, updated_at) + return TriggerIntegrationListResponseItem(alias, authenticate, blueprint_id, bot_id, created_at, description, id, last_trigger_at, meta, name, next_trigger_at, schedule, secret, session_duration, timezone, updated_at) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) + if self.authenticate is not None: + result["authenticate"] = from_union([from_bool, from_none], self.authenticate) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - result["botId"] = from_str(self.bot_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) + if self.last_trigger_at is not None: + result["lastTriggerAt"] = from_union([to_float, from_none], self.last_trigger_at) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.request is not None: - result["request"] = from_union([from_str, from_none], self.request) - if self.schema is not None: - result["schema"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.schema) + if self.next_trigger_at is not None: + result["nextTriggerAt"] = from_union([to_float, from_none], self.next_trigger_at) + if self.schedule is not None: + result["schedule"] = from_union([from_str, from_none], self.schedule) + result["secret"] = from_str(self.secret) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.timezone is not None: + result["timezone"] = from_union([from_str, from_none], self.timezone) result["updatedAt"] = to_float(self.updated_at) return result -class IntegrationExtractListResponse: +class TriggerIntegrationListResponse: cursor: str """Cursor for fetching the next page""" - items: List[IntegrationExtractListResponseItem] + items: List[TriggerIntegrationListResponseItem] - def __init__(self, cursor: str, items: List[IntegrationExtractListResponseItem]) -> None: + def __init__(self, cursor: str, items: List[TriggerIntegrationListResponseItem]) -> None: self.cursor = cursor self.items = items @staticmethod - def from_dict(obj: Any) -> 'IntegrationExtractListResponse': + def from_dict(obj: Any) -> 'TriggerIntegrationListResponse': assert isinstance(obj, dict) cursor = from_str(obj.get("cursor")) - items = from_list(IntegrationExtractListResponseItem.from_dict, obj.get("items")) - return IntegrationExtractListResponse(cursor, items) + items = from_list(TriggerIntegrationListResponseItem.from_dict, obj.get("items")) + return TriggerIntegrationListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(IntegrationExtractListResponseItem, x), self.items) + result["items"] = from_list(lambda x: to_class(TriggerIntegrationListResponseItem, x), self.items) return result -class IntegrationExtractListStreamItemData: - """Blueprint properties""" +class TriggerIntegrationListStreamItemData: + """A bot configuration that can be applied without a dedicated bot instance.""" alias: Optional[str] """The unique alias for the instance""" + authenticate: Optional[bool] + """When enabled the integration requires authentication""" + blueprint_id: Optional[str] """The ID of the blueprint""" - bot_id: str - """The ID of the Bot to use""" + bot_id: Optional[str] + """The ID of the bot this configuration is using""" created_at: float """The timestamp (ms) when the instance was created""" @@ -21536,286 +19560,269 @@ class IntegrationExtractListStreamItemData: id: str """The instance ID""" + last_trigger_at: Optional[float] + """The timestamp (ms) of the last trigger execution""" + meta: Optional[Dict[str, Any]] """Meta data information""" - model: Optional[str] - """The language model to use for data extraction""" - name: Optional[str] """The associated name""" - request: Optional[str] - """Optional webhook to receive the extracted data""" + next_trigger_at: Optional[float] + """The timestamp (ms) of the next scheduled trigger execution""" - schema: Optional[Dict[str, Any]] - """The configured extraction schema""" + schedule: Optional[str] + """The schedule for the trigger integration (interval, cron expression, ISO date, or null)""" + + secret: str + """The Trigger integration secret (returned in clear to the owner - it is the value the + calling system must present) + """ + session_duration: Optional[float] + """The session duration (in milliseconds)""" + + timezone: Optional[str] + """The IANA timezone identifier used to evaluate the trigger schedule.""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: str, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], model: Optional[str], name: Optional[str], request: Optional[str], schema: Optional[Dict[str, Any]], updated_at: float) -> None: + def __init__(self, alias: Optional[str], authenticate: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], created_at: float, description: Optional[str], id: str, last_trigger_at: Optional[float], meta: Optional[Dict[str, Any]], name: Optional[str], next_trigger_at: Optional[float], schedule: Optional[str], secret: str, session_duration: Optional[float], timezone: Optional[str], updated_at: float) -> None: self.alias = alias + self.authenticate = authenticate self.blueprint_id = blueprint_id self.bot_id = bot_id self.created_at = created_at self.description = description self.id = id + self.last_trigger_at = last_trigger_at self.meta = meta - self.model = model self.name = name - self.request = request - self.schema = schema + self.next_trigger_at = next_trigger_at + self.schedule = schedule + self.secret = secret + self.session_duration = session_duration + self.timezone = timezone self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'IntegrationExtractListStreamItemData': + def from_dict(obj: Any) -> 'TriggerIntegrationListStreamItemData': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) + authenticate = from_union([from_bool, from_none], obj.get("authenticate")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_str(obj.get("botId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) + last_trigger_at = from_union([from_float, from_none], obj.get("lastTriggerAt")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - model = from_union([from_str, from_none], obj.get("model")) name = from_union([from_str, from_none], obj.get("name")) - request = from_union([from_str, from_none], obj.get("request")) - schema = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("schema")) + next_trigger_at = from_union([from_float, from_none], obj.get("nextTriggerAt")) + schedule = from_union([from_str, from_none], obj.get("schedule")) + secret = from_str(obj.get("secret")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + timezone = from_union([from_str, from_none], obj.get("timezone")) updated_at = from_float(obj.get("updatedAt")) - return IntegrationExtractListStreamItemData(alias, blueprint_id, bot_id, created_at, description, id, meta, model, name, request, schema, updated_at) + return TriggerIntegrationListStreamItemData(alias, authenticate, blueprint_id, bot_id, created_at, description, id, last_trigger_at, meta, name, next_trigger_at, schedule, secret, session_duration, timezone, updated_at) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) + if self.authenticate is not None: + result["authenticate"] = from_union([from_bool, from_none], self.authenticate) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - result["botId"] = from_str(self.bot_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) + if self.last_trigger_at is not None: + result["lastTriggerAt"] = from_union([to_float, from_none], self.last_trigger_at) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.request is not None: - result["request"] = from_union([from_str, from_none], self.request) - if self.schema is not None: - result["schema"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.schema) + if self.next_trigger_at is not None: + result["nextTriggerAt"] = from_union([to_float, from_none], self.next_trigger_at) + if self.schedule is not None: + result["schedule"] = from_union([from_str, from_none], self.schedule) + result["secret"] = from_str(self.secret) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.timezone is not None: + result["timezone"] = from_union([from_str, from_none], self.timezone) result["updatedAt"] = to_float(self.updated_at) return result -class IntegrationExtractListStreamItemType(Enum): +class TriggerIntegrationListStreamItemType(Enum): """The type of event""" ITEM = "item" -class IntegrationExtractListStreamItem: - data: IntegrationExtractListStreamItemData - """Blueprint properties""" +class TriggerIntegrationListStreamItem: + data: TriggerIntegrationListStreamItemData + """A bot configuration that can be applied without a dedicated bot instance.""" - type: IntegrationExtractListStreamItemType + type: TriggerIntegrationListStreamItemType """The type of event""" - def __init__(self, data: IntegrationExtractListStreamItemData, type: IntegrationExtractListStreamItemType) -> None: + def __init__(self, data: TriggerIntegrationListStreamItemData, type: TriggerIntegrationListStreamItemType) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'IntegrationExtractListStreamItem': - assert isinstance(obj, dict) - data = IntegrationExtractListStreamItemData.from_dict(obj.get("data")) - type = IntegrationExtractListStreamItemType(obj.get("type")) - return IntegrationExtractListStreamItem(data, type) - - def to_dict(self) -> dict: - result: dict = {} - result["data"] = to_class(IntegrationExtractListStreamItemData, self.data) - result["type"] = to_enum(IntegrationExtractListStreamItemType, self.type) - return result - - -class GithubIntegrationDeleteParams: - github_integration_id: str - """The ID of the GitHub integration""" - - def __init__(self, github_integration_id: str) -> None: - self.github_integration_id = github_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'GithubIntegrationDeleteParams': - assert isinstance(obj, dict) - github_integration_id = from_str(obj.get("githubIntegrationId")) - return GithubIntegrationDeleteParams(github_integration_id) - - def to_dict(self) -> dict: - result: dict = {} - result["githubIntegrationId"] = from_str(self.github_integration_id) - return result - - -class GithubIntegrationDeleteResponse: - id: str - """The ID of the deleted GitHub integration""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'GithubIntegrationDeleteResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return GithubIntegrationDeleteResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - - -class GithubIntegrationFetchParams: - github_integration_id: str - """The ID of the GitHub integration to retrieve""" - - def __init__(self, github_integration_id: str) -> None: - self.github_integration_id = github_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'GithubIntegrationFetchParams': + def from_dict(obj: Any) -> 'TriggerIntegrationListStreamItem': assert isinstance(obj, dict) - github_integration_id = from_str(obj.get("githubIntegrationId")) - return GithubIntegrationFetchParams(github_integration_id) + data = TriggerIntegrationListStreamItemData.from_dict(obj.get("data")) + type = TriggerIntegrationListStreamItemType(obj.get("type")) + return TriggerIntegrationListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["githubIntegrationId"] = from_str(self.github_integration_id) + result["data"] = to_class(TriggerIntegrationListStreamItemData, self.data) + result["type"] = to_enum(TriggerIntegrationListStreamItemType, self.type) return result -class GithubIntegrationFetchResponse: - """Blueprint properties""" +class TriggerIntegrationCreateRequest: + """A bot configuration that can be applied without a dedicated bot instance.""" alias: Optional[str] """The unique alias for the instance""" + authenticate: Optional[bool] + """When enabled the integration requires authentication""" + blueprint_id: Optional[str] """The ID of the blueprint""" bot_id: Optional[str] """The ID of the bot this configuration is using""" - created_at: float - """The timestamp (ms) when the instance was created""" - description: Optional[str] """The associated description""" - id: str - """The instance ID""" - meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + schedule: Optional[str] + """The schedule for the trigger integration (interval, cron expression, or ISO date)""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: + session_duration: Optional[float] + """The session duration (in milliseconds)""" + + timezone: Optional[str] + """An optional IANA timezone identifier used when evaluating the trigger schedule.""" + + def __init__(self, alias: Optional[str], authenticate: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], schedule: Optional[str], session_duration: Optional[float], timezone: Optional[str]) -> None: self.alias = alias + self.authenticate = authenticate self.blueprint_id = blueprint_id self.bot_id = bot_id - self.created_at = created_at self.description = description - self.id = id self.meta = meta self.name = name - self.updated_at = updated_at + self.schedule = schedule + self.session_duration = session_duration + self.timezone = timezone @staticmethod - def from_dict(obj: Any) -> 'GithubIntegrationFetchResponse': + def from_dict(obj: Any) -> 'TriggerIntegrationCreateRequest': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) + authenticate = from_union([from_bool, from_none], obj.get("authenticate")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) - created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - updated_at = from_float(obj.get("updatedAt")) - return GithubIntegrationFetchResponse(alias, blueprint_id, bot_id, created_at, description, id, meta, name, updated_at) + schedule = from_union([from_str, from_none], obj.get("schedule")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + timezone = from_union([from_str, from_none], obj.get("timezone")) + return TriggerIntegrationCreateRequest(alias, authenticate, blueprint_id, bot_id, description, meta, name, schedule, session_duration, timezone) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) + if self.authenticate is not None: + result["authenticate"] = from_union([from_bool, from_none], self.authenticate) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) - result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - result["updatedAt"] = to_float(self.updated_at) + if self.schedule is not None: + result["schedule"] = from_union([from_str, from_none], self.schedule) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.timezone is not None: + result["timezone"] = from_union([from_str, from_none], self.timezone) return result -class GithubIntegrationSetupParams: - github_integration_id: str +class TriggerIntegrationCreateResponse: + id: str + """The ID of the Trigger Integration""" - def __init__(self, github_integration_id: str) -> None: - self.github_integration_id = github_integration_id + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'GithubIntegrationSetupParams': + def from_dict(obj: Any) -> 'TriggerIntegrationCreateResponse': assert isinstance(obj, dict) - github_integration_id = from_str(obj.get("githubIntegrationId")) - return GithubIntegrationSetupParams(github_integration_id) + id = from_str(obj.get("id")) + return TriggerIntegrationCreateResponse(id) def to_dict(self) -> dict: result: dict = {} - result["githubIntegrationId"] = from_str(self.github_integration_id) + result["id"] = from_str(self.id) return result -class GithubIntegrationUpdateParams: - github_integration_id: str - """The ID of the GitHub integration""" +class TriggerIntegrationUpdateParams: + trigger_integration_id: str + """The ID of the Trigger integration""" - def __init__(self, github_integration_id: str) -> None: - self.github_integration_id = github_integration_id + def __init__(self, trigger_integration_id: str) -> None: + self.trigger_integration_id = trigger_integration_id @staticmethod - def from_dict(obj: Any) -> 'GithubIntegrationUpdateParams': + def from_dict(obj: Any) -> 'TriggerIntegrationUpdateParams': assert isinstance(obj, dict) - github_integration_id = from_str(obj.get("githubIntegrationId")) - return GithubIntegrationUpdateParams(github_integration_id) + trigger_integration_id = from_str(obj.get("triggerIntegrationId")) + return TriggerIntegrationUpdateParams(trigger_integration_id) def to_dict(self) -> dict: result: dict = {} - result["githubIntegrationId"] = from_str(self.github_integration_id) + result["triggerIntegrationId"] = from_str(self.trigger_integration_id) return result -class GithubIntegrationUpdateRequest: +class TriggerIntegrationUpdateRequest: """A bot configuration that can be applied without a dedicated bot instance.""" alias: Optional[str] """The unique alias for the instance""" + authenticate: Optional[bool] + """When enabled the integration requires authentication""" + blueprint_id: Optional[str] """The ID of the blueprint""" @@ -21831,29 +19838,48 @@ class GithubIntegrationUpdateRequest: name: Optional[str] """The associated name""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str]) -> None: + schedule: Optional[str] + """The schedule for the trigger integration (interval, cron expression, or ISO date)""" + + session_duration: Optional[float] + """The session duration (in milliseconds)""" + + timezone: Optional[str] + """An optional IANA timezone identifier used when evaluating the trigger schedule.""" + + def __init__(self, alias: Optional[str], authenticate: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], schedule: Optional[str], session_duration: Optional[float], timezone: Optional[str]) -> None: self.alias = alias + self.authenticate = authenticate self.blueprint_id = blueprint_id self.bot_id = bot_id self.description = description self.meta = meta self.name = name + self.schedule = schedule + self.session_duration = session_duration + self.timezone = timezone @staticmethod - def from_dict(obj: Any) -> 'GithubIntegrationUpdateRequest': + def from_dict(obj: Any) -> 'TriggerIntegrationUpdateRequest': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) + authenticate = from_union([from_bool, from_none], obj.get("authenticate")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) description = from_union([from_str, from_none], obj.get("description")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - return GithubIntegrationUpdateRequest(alias, blueprint_id, bot_id, description, meta, name) + schedule = from_union([from_str, from_none], obj.get("schedule")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + timezone = from_union([from_str, from_none], obj.get("timezone")) + return TriggerIntegrationUpdateRequest(alias, authenticate, blueprint_id, bot_id, description, meta, name, schedule, session_duration, timezone) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) + if self.authenticate is not None: + result["authenticate"] = from_union([from_bool, from_none], self.authenticate) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: @@ -21864,21 +19890,27 @@ def to_dict(self) -> dict: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.schedule is not None: + result["schedule"] = from_union([from_str, from_none], self.schedule) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.timezone is not None: + result["timezone"] = from_union([from_str, from_none], self.timezone) return result -class GithubIntegrationUpdateResponse: +class TriggerIntegrationUpdateResponse: id: str - """The ID of the GitHub Integration""" + """The ID of the Trigger Integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'GithubIntegrationUpdateResponse': + def from_dict(obj: Any) -> 'TriggerIntegrationUpdateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return GithubIntegrationUpdateResponse(id) + return TriggerIntegrationUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -21886,14 +19918,109 @@ def to_dict(self) -> dict: return result -class GithubIntegrationCreateRequest: +class TriggerIntegrationSetupParams: + trigger_integration_id: str + """The ID of the Trigger integration""" + + def __init__(self, trigger_integration_id: str) -> None: + self.trigger_integration_id = trigger_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'TriggerIntegrationSetupParams': + assert isinstance(obj, dict) + trigger_integration_id = from_str(obj.get("triggerIntegrationId")) + return TriggerIntegrationSetupParams(trigger_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["triggerIntegrationId"] = from_str(self.trigger_integration_id) + return result + + +class TriggerIntegrationSetupResponse: + id: str + """The ID of the Trigger Integration""" + + def __init__(self, id: str) -> None: + self.id = id + + @staticmethod + def from_dict(obj: Any) -> 'TriggerIntegrationSetupResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return TriggerIntegrationSetupResponse(id) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result + + +class TriggerIntegrationInvokeParams: + trigger_integration_id: str + """The ID of the Trigger integration""" + + def __init__(self, trigger_integration_id: str) -> None: + self.trigger_integration_id = trigger_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'TriggerIntegrationInvokeParams': + assert isinstance(obj, dict) + trigger_integration_id = from_str(obj.get("triggerIntegrationId")) + return TriggerIntegrationInvokeParams(trigger_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["triggerIntegrationId"] = from_str(self.trigger_integration_id) + return result + + +class TriggerIntegrationInvokeResponse: + id: str + """The ID of the trigged Trigger integration""" + + def __init__(self, id: str) -> None: + self.id = id + + @staticmethod + def from_dict(obj: Any) -> 'TriggerIntegrationInvokeResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return TriggerIntegrationInvokeResponse(id) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result + + +class TriggerIntegrationFetchParams: + trigger_integration_id: str + """The ID of the Trigger integration to retrieve""" + + def __init__(self, trigger_integration_id: str) -> None: + self.trigger_integration_id = trigger_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'TriggerIntegrationFetchParams': + assert isinstance(obj, dict) + trigger_integration_id = from_str(obj.get("triggerIntegrationId")) + return TriggerIntegrationFetchParams(trigger_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["triggerIntegrationId"] = from_str(self.trigger_integration_id) + return result + + +class TriggerIntegrationFetchResponse: """A bot configuration that can be applied without a dedicated bot instance.""" alias: Optional[str] """The unique alias for the instance""" - app_id: Optional[str] - """This integration's GitHub App id (signs the App JWT)""" + authenticate: Optional[bool] + """When enabled the integration requires authentication""" blueprint_id: Optional[str] """The ID of the blueprint""" @@ -21901,95 +20028,146 @@ class GithubIntegrationCreateRequest: bot_id: Optional[str] """The ID of the bot this configuration is using""" - contact_collection: Optional[bool] - """Whether to collect contacts""" + created_at: float + """The timestamp (ms) when the instance was created""" description: Optional[str] """The associated description""" + id: str + """The instance ID""" + + last_trigger_at: Optional[float] + """The timestamp (ms) of the last trigger execution""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - private_key: Optional[str] - """This integration's GitHub App private key (PEM)""" + next_trigger_at: Optional[float] + """The timestamp (ms) of the next scheduled trigger execution""" + + schedule: Optional[str] + """The schedule for the trigger integration (interval, cron expression, ISO date, or null)""" + secret: str + """The Trigger integration secret (returned in clear to the owner - it is the value the + calling system must present) + """ session_duration: Optional[float] - """The session duration for the GitHub integration""" + """The session duration (in milliseconds)""" - webhook_secret: Optional[str] - """The GitHub App webhook secret used to validate x-hub-signature-256""" + timezone: Optional[str] + """The IANA timezone identifier used to evaluate the trigger schedule.""" - def __init__(self, alias: Optional[str], app_id: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], private_key: Optional[str], session_duration: Optional[float], webhook_secret: Optional[str]) -> None: + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, alias: Optional[str], authenticate: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], created_at: float, description: Optional[str], id: str, last_trigger_at: Optional[float], meta: Optional[Dict[str, Any]], name: Optional[str], next_trigger_at: Optional[float], schedule: Optional[str], secret: str, session_duration: Optional[float], timezone: Optional[str], updated_at: float) -> None: self.alias = alias - self.app_id = app_id + self.authenticate = authenticate self.blueprint_id = blueprint_id self.bot_id = bot_id - self.contact_collection = contact_collection + self.created_at = created_at self.description = description + self.id = id + self.last_trigger_at = last_trigger_at self.meta = meta self.name = name - self.private_key = private_key + self.next_trigger_at = next_trigger_at + self.schedule = schedule + self.secret = secret self.session_duration = session_duration - self.webhook_secret = webhook_secret + self.timezone = timezone + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'GithubIntegrationCreateRequest': + def from_dict(obj: Any) -> 'TriggerIntegrationFetchResponse': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) - app_id = from_union([from_str, from_none], obj.get("appId")) + authenticate = from_union([from_bool, from_none], obj.get("authenticate")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) + last_trigger_at = from_union([from_float, from_none], obj.get("lastTriggerAt")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - private_key = from_union([from_str, from_none], obj.get("privateKey")) + next_trigger_at = from_union([from_float, from_none], obj.get("nextTriggerAt")) + schedule = from_union([from_str, from_none], obj.get("schedule")) + secret = from_str(obj.get("secret")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - webhook_secret = from_union([from_str, from_none], obj.get("webhookSecret")) - return GithubIntegrationCreateRequest(alias, app_id, blueprint_id, bot_id, contact_collection, description, meta, name, private_key, session_duration, webhook_secret) + timezone = from_union([from_str, from_none], obj.get("timezone")) + updated_at = from_float(obj.get("updatedAt")) + return TriggerIntegrationFetchResponse(alias, authenticate, blueprint_id, bot_id, created_at, description, id, last_trigger_at, meta, name, next_trigger_at, schedule, secret, session_duration, timezone, updated_at) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.app_id is not None: - result["appId"] = from_union([from_str, from_none], self.app_id) + if self.authenticate is not None: + result["authenticate"] = from_union([from_bool, from_none], self.authenticate) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) + if self.last_trigger_at is not None: + result["lastTriggerAt"] = from_union([to_float, from_none], self.last_trigger_at) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.private_key is not None: - result["privateKey"] = from_union([from_str, from_none], self.private_key) + if self.next_trigger_at is not None: + result["nextTriggerAt"] = from_union([to_float, from_none], self.next_trigger_at) + if self.schedule is not None: + result["schedule"] = from_union([from_str, from_none], self.schedule) + result["secret"] = from_str(self.secret) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - if self.webhook_secret is not None: - result["webhookSecret"] = from_union([from_str, from_none], self.webhook_secret) + if self.timezone is not None: + result["timezone"] = from_union([from_str, from_none], self.timezone) + result["updatedAt"] = to_float(self.updated_at) return result -class GithubIntegrationCreateResponse: +class TriggerIntegrationDeleteParams: + trigger_integration_id: str + """The ID of the Trigger integration""" + + def __init__(self, trigger_integration_id: str) -> None: + self.trigger_integration_id = trigger_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'TriggerIntegrationDeleteParams': + assert isinstance(obj, dict) + trigger_integration_id = from_str(obj.get("triggerIntegrationId")) + return TriggerIntegrationDeleteParams(trigger_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["triggerIntegrationId"] = from_str(self.trigger_integration_id) + return result + + +class TriggerIntegrationDeleteResponse: id: str - """The ID of the GitHub Integration""" + """The ID of the deleted Trigger integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'GithubIntegrationCreateResponse': + def from_dict(obj: Any) -> 'TriggerIntegrationDeleteResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return GithubIntegrationCreateResponse(id) + return TriggerIntegrationDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -21997,40 +20175,40 @@ def to_dict(self) -> dict: return result -class GithubIntegrationListParamsOrder(Enum): +class IntegrationTelegramListParamsOrder(Enum): """The order of the paginated items""" ASC = "asc" DESC = "desc" -class GithubIntegrationListParams: +class IntegrationTelegramListParams: cursor: Optional[str] """The cursor to use for pagination""" meta: Optional[Dict[str, str]] - """Key-value pairs to filter by metadata""" + """Key-value pairs to filter the items by metadata""" - order: Optional[GithubIntegrationListParamsOrder] + order: Optional[IntegrationTelegramListParamsOrder] """The order of the paginated items""" take: Optional[int] """The number of items to retrieve""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[GithubIntegrationListParamsOrder], take: Optional[int]) -> None: + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationTelegramListParamsOrder], take: Optional[int]) -> None: self.cursor = cursor self.meta = meta self.order = order self.take = take @staticmethod - def from_dict(obj: Any) -> 'GithubIntegrationListParams': + def from_dict(obj: Any) -> 'IntegrationTelegramListParams': assert isinstance(obj, dict) cursor = from_union([from_str, from_none], obj.get("cursor")) meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([GithubIntegrationListParamsOrder, from_none], obj.get("order")) + order = from_union([IntegrationTelegramListParamsOrder, from_none], obj.get("order")) take = from_union([from_int, from_none], obj.get("take")) - return GithubIntegrationListParams(cursor, meta, order, take) + return IntegrationTelegramListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} @@ -22039,24 +20217,33 @@ def to_dict(self) -> dict: if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(GithubIntegrationListParamsOrder, x), from_none], self.order) + result["order"] = from_union([lambda x: to_enum(IntegrationTelegramListParamsOrder, x), from_none], self.order) if self.take is not None: result["take"] = from_union([from_int, from_none], self.take) return result -class GithubIntegrationListResponseItem: +class IntegrationTelegramListResponseItem: """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" + allow_from: Optional[str] + """Newline-or-comma-separated list of allowed senders. Use @username or @numericId for users,""" + + attachments: Optional[bool] + """Weather the bot supports attachments""" + blueprint_id: Optional[str] """The ID of the blueprint""" bot_id: Optional[str] """The ID of the bot this configuration is using""" + contact_collection: Optional[bool] + """Weather to collect contacts""" + created_at: float """The timestamp (ms) when the instance was created""" @@ -22072,42 +20259,59 @@ class GithubIntegrationListResponseItem: name: Optional[str] """The associated name""" + session_duration: Optional[float] + """The session duration (in milliseconds)""" + updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: + def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float) -> None: self.alias = alias + self.allow_from = allow_from + self.attachments = attachments self.blueprint_id = blueprint_id self.bot_id = bot_id + self.contact_collection = contact_collection self.created_at = created_at self.description = description self.id = id self.meta = meta self.name = name + self.session_duration = session_duration self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'GithubIntegrationListResponseItem': + def from_dict(obj: Any) -> 'IntegrationTelegramListResponseItem': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) + allow_from = from_union([from_str, from_none], obj.get("allowFrom")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) updated_at = from_float(obj.get("updatedAt")) - return GithubIntegrationListResponseItem(alias, blueprint_id, bot_id, created_at, description, id, meta, name, updated_at) + return IntegrationTelegramListResponseItem(alias, allow_from, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) + if self.allow_from is not None: + result["allowFrom"] = from_union([from_str, from_none], self.allow_from) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) @@ -22116,105 +20320,47 @@ def to_dict(self) -> dict: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) result["updatedAt"] = to_float(self.updated_at) return result -class GithubIntegrationListResponse: +class IntegrationTelegramListResponse: cursor: str """Cursor for fetching the next page""" - items: List[GithubIntegrationListResponseItem] + items: List[IntegrationTelegramListResponseItem] - def __init__(self, cursor: str, items: List[GithubIntegrationListResponseItem]) -> None: + def __init__(self, cursor: str, items: List[IntegrationTelegramListResponseItem]) -> None: self.cursor = cursor self.items = items @staticmethod - def from_dict(obj: Any) -> 'GithubIntegrationListResponse': + def from_dict(obj: Any) -> 'IntegrationTelegramListResponse': assert isinstance(obj, dict) cursor = from_str(obj.get("cursor")) - items = from_list(GithubIntegrationListResponseItem.from_dict, obj.get("items")) - return GithubIntegrationListResponse(cursor, items) + items = from_list(IntegrationTelegramListResponseItem.from_dict, obj.get("items")) + return IntegrationTelegramListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(GithubIntegrationListResponseItem, x), self.items) - return result - - -class GooglechatIntegrationDeleteParams: - googlechat_integration_id: str - """The ID of the Google Chat integration""" - - def __init__(self, googlechat_integration_id: str) -> None: - self.googlechat_integration_id = googlechat_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'GooglechatIntegrationDeleteParams': - assert isinstance(obj, dict) - googlechat_integration_id = from_str(obj.get("googlechatIntegrationId")) - return GooglechatIntegrationDeleteParams(googlechat_integration_id) - - def to_dict(self) -> dict: - result: dict = {} - result["googlechatIntegrationId"] = from_str(self.googlechat_integration_id) - return result - - -class GooglechatIntegrationDeleteResponse: - id: str - """The ID of the deleted Google Chat integration""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'GooglechatIntegrationDeleteResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return GooglechatIntegrationDeleteResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - - -class GooglechatIntegrationFetchParams: - googlechat_integration_id: str - """The ID of the Google Chat integration to retrieve""" - - def __init__(self, googlechat_integration_id: str) -> None: - self.googlechat_integration_id = googlechat_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'GooglechatIntegrationFetchParams': - assert isinstance(obj, dict) - googlechat_integration_id = from_str(obj.get("googlechatIntegrationId")) - return GooglechatIntegrationFetchParams(googlechat_integration_id) - - def to_dict(self) -> dict: - result: dict = {} - result["googlechatIntegrationId"] = from_str(self.googlechat_integration_id) + result["items"] = from_list(lambda x: to_class(IntegrationTelegramListResponseItem, x), self.items) return result -class GooglechatIntegrationFetchResponse: +class IntegrationTelegramListStreamItemData: """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" allow_from: Optional[str] - """The allowed senders for this integration""" + """Newline-or-comma-separated list of allowed senders. Use @username or @numericId for users,""" attachments: Optional[bool] - """Whether file attachment processing is enabled""" - - auto_respond: Optional[str] - """The auto-respond configuration""" + """Weather the bot supports attachments""" blueprint_id: Optional[str] """The ID of the blueprint""" @@ -22223,7 +20369,7 @@ class GooglechatIntegrationFetchResponse: """The ID of the bot this configuration is using""" contact_collection: Optional[bool] - """Whether to collect contacts""" + """Weather to collect contacts""" created_at: float """The timestamp (ms) when the instance was created""" @@ -22240,23 +20386,16 @@ class GooglechatIntegrationFetchResponse: name: Optional[str] """The associated name""" - project_number: Optional[str] - """The Google Cloud project number for JWT verification""" - - service_account_key: Optional[str] - """The service account key (returned as '********' if configured, null otherwise)""" - session_duration: Optional[float] - """The session duration for the integration""" + """The session duration (in milliseconds)""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], auto_respond: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], project_number: Optional[str], service_account_key: Optional[str], session_duration: Optional[float], updated_at: float) -> None: + def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float) -> None: self.alias = alias self.allow_from = allow_from self.attachments = attachments - self.auto_respond = auto_respond self.blueprint_id = blueprint_id self.bot_id = bot_id self.contact_collection = contact_collection @@ -22265,18 +20404,15 @@ def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: self.id = id self.meta = meta self.name = name - self.project_number = project_number - self.service_account_key = service_account_key self.session_duration = session_duration self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'GooglechatIntegrationFetchResponse': + def from_dict(obj: Any) -> 'IntegrationTelegramListStreamItemData': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) allow_from = from_union([from_str, from_none], obj.get("allowFrom")) attachments = from_union([from_bool, from_none], obj.get("attachments")) - auto_respond = from_union([from_str, from_none], obj.get("autoRespond")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) @@ -22285,11 +20421,9 @@ def from_dict(obj: Any) -> 'GooglechatIntegrationFetchResponse': id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - project_number = from_union([from_str, from_none], obj.get("projectNumber")) - service_account_key = from_union([from_str, from_none], obj.get("serviceAccountKey")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) updated_at = from_float(obj.get("updatedAt")) - return GooglechatIntegrationFetchResponse(alias, allow_from, attachments, auto_respond, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, project_number, service_account_key, session_duration, updated_at) + return IntegrationTelegramListStreamItemData(alias, allow_from, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at) def to_dict(self) -> dict: result: dict = {} @@ -22299,8 +20433,6 @@ def to_dict(self) -> dict: result["allowFrom"] = from_union([from_str, from_none], self.allow_from) if self.attachments is not None: result["attachments"] = from_union([from_bool, from_none], self.attachments) - if self.auto_respond is not None: - result["autoRespond"] = from_union([from_str, from_none], self.auto_respond) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: @@ -22315,47 +20447,147 @@ def to_dict(self) -> dict: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.project_number is not None: - result["projectNumber"] = from_union([from_str, from_none], self.project_number) - if self.service_account_key is not None: - result["serviceAccountKey"] = from_union([from_str, from_none], self.service_account_key) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) result["updatedAt"] = to_float(self.updated_at) return result -class GooglechatIntegrationSetupParams: - googlechat_integration_id: str - """The ID of the Google Chat integration""" +class IntegrationTelegramListStreamItemType(Enum): + """The type of event""" - def __init__(self, googlechat_integration_id: str) -> None: - self.googlechat_integration_id = googlechat_integration_id + ITEM = "item" + + +class IntegrationTelegramListStreamItem: + data: IntegrationTelegramListStreamItemData + """Blueprint properties""" + + type: IntegrationTelegramListStreamItemType + """The type of event""" + + def __init__(self, data: IntegrationTelegramListStreamItemData, type: IntegrationTelegramListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'GooglechatIntegrationSetupParams': + def from_dict(obj: Any) -> 'IntegrationTelegramListStreamItem': assert isinstance(obj, dict) - googlechat_integration_id = from_str(obj.get("googlechatIntegrationId")) - return GooglechatIntegrationSetupParams(googlechat_integration_id) + data = IntegrationTelegramListStreamItemData.from_dict(obj.get("data")) + type = IntegrationTelegramListStreamItemType(obj.get("type")) + return IntegrationTelegramListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["googlechatIntegrationId"] = from_str(self.googlechat_integration_id) + result["data"] = to_class(IntegrationTelegramListStreamItemData, self.data) + result["type"] = to_enum(IntegrationTelegramListStreamItemType, self.type) return result -class GooglechatIntegrationSetupResponse: +class IntegrationTelegramCreateRequest: + """A bot configuration that can be applied without a dedicated bot instance.""" + + alias: Optional[str] + """The unique alias for the instance""" + + allow_from: Optional[str] + """Newline-or-comma-separated list of allowed senders. Use @username or @numericId for users,""" + + attachments: Optional[bool] + """Weather the bot supports attachments""" + + blueprint_id: Optional[str] + """The ID of the blueprint""" + + bot_id: Optional[str] + """The ID of the bot this configuration is using""" + + bot_token: Optional[str] + """The Telegram integration bot token""" + + contact_collection: Optional[bool] + """Weather to collect contacts""" + + description: Optional[str] + """The associated description""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" + + name: Optional[str] + """The associated name""" + + session_duration: Optional[float] + """The session duration (in milliseconds)""" + + def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], bot_token: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float]) -> None: + self.alias = alias + self.allow_from = allow_from + self.attachments = attachments + self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.bot_token = bot_token + self.contact_collection = contact_collection + self.description = description + self.meta = meta + self.name = name + self.session_duration = session_duration + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationTelegramCreateRequest': + assert isinstance(obj, dict) + alias = from_union([from_str, from_none], obj.get("alias")) + allow_from = from_union([from_str, from_none], obj.get("allowFrom")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + bot_token = from_union([from_str, from_none], obj.get("botToken")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + description = from_union([from_str, from_none], obj.get("description")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + return IntegrationTelegramCreateRequest(alias, allow_from, attachments, blueprint_id, bot_id, bot_token, contact_collection, description, meta, name, session_duration) + + def to_dict(self) -> dict: + result: dict = {} + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.allow_from is not None: + result["allowFrom"] = from_union([from_str, from_none], self.allow_from) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.bot_token is not None: + result["botToken"] = from_union([from_str, from_none], self.bot_token) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + return result + + +class IntegrationTelegramCreateResponse: id: str - """The ID of the Google Chat Integration""" + """The ID of the Telegram Integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'GooglechatIntegrationSetupResponse': + def from_dict(obj: Any) -> 'IntegrationTelegramCreateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return GooglechatIntegrationSetupResponse(id) + return IntegrationTelegramCreateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -22363,39 +20595,36 @@ def to_dict(self) -> dict: return result -class GooglechatIntegrationUpdateParams: - googlechat_integration_id: str - """The ID of the Google Chat integration""" +class IntegrationTelegramUpdateParams: + telegram_integration_id: str + """The ID of the Telegram integration""" - def __init__(self, googlechat_integration_id: str) -> None: - self.googlechat_integration_id = googlechat_integration_id + def __init__(self, telegram_integration_id: str) -> None: + self.telegram_integration_id = telegram_integration_id @staticmethod - def from_dict(obj: Any) -> 'GooglechatIntegrationUpdateParams': + def from_dict(obj: Any) -> 'IntegrationTelegramUpdateParams': assert isinstance(obj, dict) - googlechat_integration_id = from_str(obj.get("googlechatIntegrationId")) - return GooglechatIntegrationUpdateParams(googlechat_integration_id) + telegram_integration_id = from_str(obj.get("telegramIntegrationId")) + return IntegrationTelegramUpdateParams(telegram_integration_id) def to_dict(self) -> dict: result: dict = {} - result["googlechatIntegrationId"] = from_str(self.googlechat_integration_id) + result["telegramIntegrationId"] = from_str(self.telegram_integration_id) return result -class GooglechatIntegrationUpdateRequest: +class IntegrationTelegramUpdateRequest: """A bot configuration that can be applied without a dedicated bot instance.""" alias: Optional[str] """The unique alias for the instance""" allow_from: Optional[str] - """The allowed senders for this integration""" + """Newline-or-comma-separated list of allowed senders. Use @username or @numericId for users,""" attachments: Optional[bool] - """Whether file attachment processing is enabled""" - - auto_respond: Optional[str] - """The auto-respond configuration""" + """Weather the bot supports attachments""" blueprint_id: Optional[str] """The ID of the blueprint""" @@ -22403,8 +20632,11 @@ class GooglechatIntegrationUpdateRequest: bot_id: Optional[str] """The ID of the bot this configuration is using""" + bot_token: Optional[str] + """The Telegram integration bot token""" + contact_collection: Optional[bool] - """Whether to collect contacts""" + """Weather to collect contacts""" description: Optional[str] """The associated description""" @@ -22415,47 +20647,37 @@ class GooglechatIntegrationUpdateRequest: name: Optional[str] """The associated name""" - project_number: Optional[str] - """The Google Cloud project number for JWT verification""" - - service_account_key: Optional[str] - """The Google service account JSON key for sending messages""" - session_duration: Optional[float] - """The session duration for the integration""" + """The session duration (in milliseconds)""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], auto_respond: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], project_number: Optional[str], service_account_key: Optional[str], session_duration: Optional[float]) -> None: + def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], bot_token: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float]) -> None: self.alias = alias self.allow_from = allow_from self.attachments = attachments - self.auto_respond = auto_respond self.blueprint_id = blueprint_id self.bot_id = bot_id + self.bot_token = bot_token self.contact_collection = contact_collection self.description = description self.meta = meta self.name = name - self.project_number = project_number - self.service_account_key = service_account_key self.session_duration = session_duration @staticmethod - def from_dict(obj: Any) -> 'GooglechatIntegrationUpdateRequest': + def from_dict(obj: Any) -> 'IntegrationTelegramUpdateRequest': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) allow_from = from_union([from_str, from_none], obj.get("allowFrom")) attachments = from_union([from_bool, from_none], obj.get("attachments")) - auto_respond = from_union([from_str, from_none], obj.get("autoRespond")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) + bot_token = from_union([from_str, from_none], obj.get("botToken")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) description = from_union([from_str, from_none], obj.get("description")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - project_number = from_union([from_str, from_none], obj.get("projectNumber")) - service_account_key = from_union([from_str, from_none], obj.get("serviceAccountKey")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - return GooglechatIntegrationUpdateRequest(alias, allow_from, attachments, auto_respond, blueprint_id, bot_id, contact_collection, description, meta, name, project_number, service_account_key, session_duration) + return IntegrationTelegramUpdateRequest(alias, allow_from, attachments, blueprint_id, bot_id, bot_token, contact_collection, description, meta, name, session_duration) def to_dict(self) -> dict: result: dict = {} @@ -22465,12 +20687,12 @@ def to_dict(self) -> dict: result["allowFrom"] = from_union([from_str, from_none], self.allow_from) if self.attachments is not None: result["attachments"] = from_union([from_bool, from_none], self.attachments) - if self.auto_respond is not None: - result["autoRespond"] = from_union([from_str, from_none], self.auto_respond) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.bot_token is not None: + result["botToken"] = from_union([from_str, from_none], self.bot_token) if self.contact_collection is not None: result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) if self.description is not None: @@ -22479,27 +20701,23 @@ def to_dict(self) -> dict: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.project_number is not None: - result["projectNumber"] = from_union([from_str, from_none], self.project_number) - if self.service_account_key is not None: - result["serviceAccountKey"] = from_union([from_str, from_none], self.service_account_key) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) return result -class GooglechatIntegrationUpdateResponse: +class IntegrationTelegramUpdateResponse: id: str - """The ID of the Google Chat Integration""" + """The ID of the Telegram Integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'GooglechatIntegrationUpdateResponse': + def from_dict(obj: Any) -> 'IntegrationTelegramUpdateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return GooglechatIntegrationUpdateResponse(id) + return IntegrationTelegramUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -22507,24 +20725,75 @@ def to_dict(self) -> dict: return result -class GooglechatIntegrationCreateRequest: - """A bot configuration that can be applied without a dedicated bot instance.""" +class IntegrationTelegramSetupParams: + telegram_integration_id: str + """The ID of the Telegram integration""" + + def __init__(self, telegram_integration_id: str) -> None: + self.telegram_integration_id = telegram_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationTelegramSetupParams': + assert isinstance(obj, dict) + telegram_integration_id = from_str(obj.get("telegramIntegrationId")) + return IntegrationTelegramSetupParams(telegram_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["telegramIntegrationId"] = from_str(self.telegram_integration_id) + return result + + +class IntegrationTelegramSetupResponse: + id: str + """The ID of the Telegram Integration""" + + def __init__(self, id: str) -> None: + self.id = id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationTelegramSetupResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return IntegrationTelegramSetupResponse(id) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result + + +class IntegrationTelegramFetchParams: + telegram_integration_id: str + """The ID of the Telegram integration to retrieve""" + + def __init__(self, telegram_integration_id: str) -> None: + self.telegram_integration_id = telegram_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationTelegramFetchParams': + assert isinstance(obj, dict) + telegram_integration_id = from_str(obj.get("telegramIntegrationId")) + return IntegrationTelegramFetchParams(telegram_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["telegramIntegrationId"] = from_str(self.telegram_integration_id) + return result + + +class IntegrationTelegramFetchResponse: + """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" allow_from: Optional[str] - """Restrict which Google Chat users can interact with this integration. Accepts user - resource names (users/USER_ID) or * to allow all. One per line. - """ - attachments: Optional[bool] - """Whether file attachment processing is enabled""" - - auto_respond: Optional[str] - """Configure automatic response behavior. Use '@all' to respond to all messages, '@agent - ' for agent-powered decisions, or custom instructions for lightweight LLM - filtering. Null/empty defaults to DMs and direct messages only. - """ + """Newline-or-comma-separated list of allowed senders""" + + attachments: Optional[bool] + """Weather the bot supports attachments""" + blueprint_id: Optional[str] """The ID of the blueprint""" @@ -22532,58 +20801,61 @@ class GooglechatIntegrationCreateRequest: """The ID of the bot this configuration is using""" contact_collection: Optional[bool] - """Whether to collect contacts""" + """Weather to collect contacts""" + + created_at: float + """The timestamp (ms) when the instance was created""" description: Optional[str] """The associated description""" + id: str + """The instance ID""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - project_number: Optional[str] - """The Google Cloud project number used to verify incoming event JWT audience claims""" - - service_account_key: Optional[str] - """The Google service account JSON key for sending messages via the Chat REST API""" - session_duration: Optional[float] - """The session duration for the Google Chat integration""" + """The session duration (in milliseconds)""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], auto_respond: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], project_number: Optional[str], service_account_key: Optional[str], session_duration: Optional[float]) -> None: + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float) -> None: self.alias = alias self.allow_from = allow_from self.attachments = attachments - self.auto_respond = auto_respond self.blueprint_id = blueprint_id self.bot_id = bot_id self.contact_collection = contact_collection + self.created_at = created_at self.description = description + self.id = id self.meta = meta self.name = name - self.project_number = project_number - self.service_account_key = service_account_key self.session_duration = session_duration + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'GooglechatIntegrationCreateRequest': + def from_dict(obj: Any) -> 'IntegrationTelegramFetchResponse': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) allow_from = from_union([from_str, from_none], obj.get("allowFrom")) attachments = from_union([from_bool, from_none], obj.get("attachments")) - auto_respond = from_union([from_str, from_none], obj.get("autoRespond")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - project_number = from_union([from_str, from_none], obj.get("projectNumber")) - service_account_key = from_union([from_str, from_none], obj.get("serviceAccountKey")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - return GooglechatIntegrationCreateRequest(alias, allow_from, attachments, auto_respond, blueprint_id, bot_id, contact_collection, description, meta, name, project_number, service_account_key, session_duration) + updated_at = from_float(obj.get("updatedAt")) + return IntegrationTelegramFetchResponse(alias, allow_from, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at) def to_dict(self) -> dict: result: dict = {} @@ -22593,41 +20865,57 @@ def to_dict(self) -> dict: result["allowFrom"] = from_union([from_str, from_none], self.allow_from) if self.attachments is not None: result["attachments"] = from_union([from_bool, from_none], self.attachments) - if self.auto_respond is not None: - result["autoRespond"] = from_union([from_str, from_none], self.auto_respond) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) if self.contact_collection is not None: result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.project_number is not None: - result["projectNumber"] = from_union([from_str, from_none], self.project_number) - if self.service_account_key is not None: - result["serviceAccountKey"] = from_union([from_str, from_none], self.service_account_key) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + result["updatedAt"] = to_float(self.updated_at) return result -class GooglechatIntegrationCreateResponse: +class IntegrationTelegramDeleteParams: + telegram_integration_id: str + """The ID of the Telegram integration""" + + def __init__(self, telegram_integration_id: str) -> None: + self.telegram_integration_id = telegram_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationTelegramDeleteParams': + assert isinstance(obj, dict) + telegram_integration_id = from_str(obj.get("telegramIntegrationId")) + return IntegrationTelegramDeleteParams(telegram_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["telegramIntegrationId"] = from_str(self.telegram_integration_id) + return result + + +class IntegrationTelegramDeleteResponse: id: str - """The ID of the Google Chat Integration""" + """The ID of the deleted Telegram integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'GooglechatIntegrationCreateResponse': + def from_dict(obj: Any) -> 'IntegrationTelegramDeleteResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return GooglechatIntegrationCreateResponse(id) + return IntegrationTelegramDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -22635,40 +20923,40 @@ def to_dict(self) -> dict: return result -class GooglechatIntegrationListParamsOrder(Enum): +class IntegrationSupportListParamsOrder(Enum): """The order of the paginated items""" ASC = "asc" DESC = "desc" -class GooglechatIntegrationListParams: +class IntegrationSupportListParams: cursor: Optional[str] """The cursor to use for pagination""" meta: Optional[Dict[str, str]] - """Key-value pairs to filter by metadata""" + """Key-value pairs to filter the items by metadata""" - order: Optional[GooglechatIntegrationListParamsOrder] + order: Optional[IntegrationSupportListParamsOrder] """The order of the paginated items""" take: Optional[int] """The number of items to retrieve""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[GooglechatIntegrationListParamsOrder], take: Optional[int]) -> None: + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationSupportListParamsOrder], take: Optional[int]) -> None: self.cursor = cursor self.meta = meta self.order = order self.take = take @staticmethod - def from_dict(obj: Any) -> 'GooglechatIntegrationListParams': + def from_dict(obj: Any) -> 'IntegrationSupportListParams': assert isinstance(obj, dict) cursor = from_union([from_str, from_none], obj.get("cursor")) meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([GooglechatIntegrationListParamsOrder, from_none], obj.get("order")) + order = from_union([IntegrationSupportListParamsOrder, from_none], obj.get("order")) take = from_union([from_int, from_none], obj.get("take")) - return GooglechatIntegrationListParams(cursor, meta, order, take) + return IntegrationSupportListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} @@ -22677,42 +20965,33 @@ def to_dict(self) -> dict: if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(GooglechatIntegrationListParamsOrder, x), from_none], self.order) + result["order"] = from_union([lambda x: to_enum(IntegrationSupportListParamsOrder, x), from_none], self.order) if self.take is not None: result["take"] = from_union([from_int, from_none], self.take) return result -class GooglechatIntegrationListResponseItem: - """Blueprint properties""" +class IntegrationSupportListResponseItem: + """A bot configuration that can be applied without a dedicated bot instance.""" alias: Optional[str] """The unique alias for the instance""" - allow_from: Optional[str] - """The allowed senders for this integration""" - - attachments: Optional[bool] - """Whether file attachment processing is enabled""" - - auto_respond: Optional[str] - """The auto-respond configuration""" - blueprint_id: Optional[str] """The ID of the blueprint""" - bot_id: Optional[str] + bot_id: str """The ID of the bot this configuration is using""" - contact_collection: Optional[bool] - """Whether to collect contacts""" - created_at: float """The timestamp (ms) when the instance was created""" description: Optional[str] """The associated description""" + email: Optional[str] + """The email to use""" + id: str """The instance ID""" @@ -22722,145 +21001,102 @@ class GooglechatIntegrationListResponseItem: name: Optional[str] """The associated name""" - project_number: Optional[str] - """The Google Cloud project number for JWT verification""" - - service_account_key: Optional[str] - """The service account key (returned as '********' if configured, null otherwise)""" - - session_duration: Optional[float] - """The session duration for the integration""" - updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], auto_respond: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], project_number: Optional[str], service_account_key: Optional[str], session_duration: Optional[float], updated_at: float) -> None: + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: str, created_at: float, description: Optional[str], email: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: self.alias = alias - self.allow_from = allow_from - self.attachments = attachments - self.auto_respond = auto_respond self.blueprint_id = blueprint_id self.bot_id = bot_id - self.contact_collection = contact_collection self.created_at = created_at self.description = description + self.email = email self.id = id self.meta = meta self.name = name - self.project_number = project_number - self.service_account_key = service_account_key - self.session_duration = session_duration self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'GooglechatIntegrationListResponseItem': + def from_dict(obj: Any) -> 'IntegrationSupportListResponseItem': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) - allow_from = from_union([from_str, from_none], obj.get("allowFrom")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) - auto_respond = from_union([from_str, from_none], obj.get("autoRespond")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + bot_id = from_str(obj.get("botId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + email = from_union([from_str, from_none], obj.get("email")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - project_number = from_union([from_str, from_none], obj.get("projectNumber")) - service_account_key = from_union([from_str, from_none], obj.get("serviceAccountKey")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) updated_at = from_float(obj.get("updatedAt")) - return GooglechatIntegrationListResponseItem(alias, allow_from, attachments, auto_respond, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, project_number, service_account_key, session_duration, updated_at) + return IntegrationSupportListResponseItem(alias, blueprint_id, bot_id, created_at, description, email, id, meta, name, updated_at) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.allow_from is not None: - result["allowFrom"] = from_union([from_str, from_none], self.allow_from) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) - if self.auto_respond is not None: - result["autoRespond"] = from_union([from_str, from_none], self.auto_respond) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + result["botId"] = from_str(self.bot_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.email is not None: + result["email"] = from_union([from_str, from_none], self.email) result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.project_number is not None: - result["projectNumber"] = from_union([from_str, from_none], self.project_number) - if self.service_account_key is not None: - result["serviceAccountKey"] = from_union([from_str, from_none], self.service_account_key) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) result["updatedAt"] = to_float(self.updated_at) return result -class GooglechatIntegrationListResponse: +class IntegrationSupportListResponse: cursor: str """Cursor for fetching the next page""" - items: List[GooglechatIntegrationListResponseItem] + items: List[IntegrationSupportListResponseItem] - def __init__(self, cursor: str, items: List[GooglechatIntegrationListResponseItem]) -> None: + def __init__(self, cursor: str, items: List[IntegrationSupportListResponseItem]) -> None: self.cursor = cursor self.items = items @staticmethod - def from_dict(obj: Any) -> 'GooglechatIntegrationListResponse': + def from_dict(obj: Any) -> 'IntegrationSupportListResponse': assert isinstance(obj, dict) cursor = from_str(obj.get("cursor")) - items = from_list(GooglechatIntegrationListResponseItem.from_dict, obj.get("items")) - return GooglechatIntegrationListResponse(cursor, items) + items = from_list(IntegrationSupportListResponseItem.from_dict, obj.get("items")) + return IntegrationSupportListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(GooglechatIntegrationListResponseItem, x), self.items) + result["items"] = from_list(lambda x: to_class(IntegrationSupportListResponseItem, x), self.items) return result -class GooglechatIntegrationListStreamItemData: - """Blueprint properties""" +class IntegrationSupportListStreamItemData: + """A bot configuration that can be applied without a dedicated bot instance.""" alias: Optional[str] """The unique alias for the instance""" - allow_from: Optional[str] - """The allowed senders for this integration""" - - attachments: Optional[bool] - """Whether file attachment processing is enabled""" - - auto_respond: Optional[str] - """The auto-respond configuration""" - blueprint_id: Optional[str] """The ID of the blueprint""" - bot_id: Optional[str] + bot_id: str """The ID of the bot this configuration is using""" - contact_collection: Optional[bool] - """Whether to collect contacts""" - created_at: float """The timestamp (ms) when the instance was created""" description: Optional[str] """The associated description""" + email: Optional[str] + """The email to use""" + id: str """The instance ID""" @@ -22870,207 +21106,384 @@ class GooglechatIntegrationListStreamItemData: name: Optional[str] """The associated name""" - project_number: Optional[str] - """The Google Cloud project number for JWT verification""" - - service_account_key: Optional[str] - """The service account key (returned as '********' if configured, null otherwise)""" - - session_duration: Optional[float] - """The session duration for the integration""" - updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], auto_respond: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], project_number: Optional[str], service_account_key: Optional[str], session_duration: Optional[float], updated_at: float) -> None: + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: str, created_at: float, description: Optional[str], email: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: self.alias = alias - self.allow_from = allow_from - self.attachments = attachments - self.auto_respond = auto_respond self.blueprint_id = blueprint_id self.bot_id = bot_id - self.contact_collection = contact_collection self.created_at = created_at self.description = description + self.email = email self.id = id self.meta = meta self.name = name - self.project_number = project_number - self.service_account_key = service_account_key - self.session_duration = session_duration self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'GooglechatIntegrationListStreamItemData': + def from_dict(obj: Any) -> 'IntegrationSupportListStreamItemData': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) - allow_from = from_union([from_str, from_none], obj.get("allowFrom")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) - auto_respond = from_union([from_str, from_none], obj.get("autoRespond")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + bot_id = from_str(obj.get("botId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + email = from_union([from_str, from_none], obj.get("email")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - project_number = from_union([from_str, from_none], obj.get("projectNumber")) - service_account_key = from_union([from_str, from_none], obj.get("serviceAccountKey")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) updated_at = from_float(obj.get("updatedAt")) - return GooglechatIntegrationListStreamItemData(alias, allow_from, attachments, auto_respond, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, project_number, service_account_key, session_duration, updated_at) + return IntegrationSupportListStreamItemData(alias, blueprint_id, bot_id, created_at, description, email, id, meta, name, updated_at) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.allow_from is not None: - result["allowFrom"] = from_union([from_str, from_none], self.allow_from) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) - if self.auto_respond is not None: - result["autoRespond"] = from_union([from_str, from_none], self.auto_respond) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + result["botId"] = from_str(self.bot_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.email is not None: + result["email"] = from_union([from_str, from_none], self.email) result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.project_number is not None: - result["projectNumber"] = from_union([from_str, from_none], self.project_number) - if self.service_account_key is not None: - result["serviceAccountKey"] = from_union([from_str, from_none], self.service_account_key) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) result["updatedAt"] = to_float(self.updated_at) return result -class GooglechatIntegrationListStreamItemType(Enum): +class IntegrationSupportListStreamItemType(Enum): """The type of event""" ITEM = "item" -class GooglechatIntegrationListStreamItem: - data: GooglechatIntegrationListStreamItemData - """Blueprint properties""" +class IntegrationSupportListStreamItem: + data: IntegrationSupportListStreamItemData + """A bot configuration that can be applied without a dedicated bot instance.""" - type: GooglechatIntegrationListStreamItemType + type: IntegrationSupportListStreamItemType """The type of event""" - def __init__(self, data: GooglechatIntegrationListStreamItemData, type: GooglechatIntegrationListStreamItemType) -> None: + def __init__(self, data: IntegrationSupportListStreamItemData, type: IntegrationSupportListStreamItemType) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'GooglechatIntegrationListStreamItem': + def from_dict(obj: Any) -> 'IntegrationSupportListStreamItem': assert isinstance(obj, dict) - data = GooglechatIntegrationListStreamItemData.from_dict(obj.get("data")) - type = GooglechatIntegrationListStreamItemType(obj.get("type")) - return GooglechatIntegrationListStreamItem(data, type) + data = IntegrationSupportListStreamItemData.from_dict(obj.get("data")) + type = IntegrationSupportListStreamItemType(obj.get("type")) + return IntegrationSupportListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(GooglechatIntegrationListStreamItemData, self.data) - result["type"] = to_enum(GooglechatIntegrationListStreamItemType, self.type) + result["data"] = to_class(IntegrationSupportListStreamItemData, self.data) + result["type"] = to_enum(IntegrationSupportListStreamItemType, self.type) return result -class IntegrationInstagramDeleteParams: - instagram_integration_id: str - """The ID of the Instagram integration""" +class IntegrationSupportCreateRequest: + """A bot configuration that can be applied without a dedicated bot instance.""" - def __init__(self, instagram_integration_id: str) -> None: - self.instagram_integration_id = instagram_integration_id + alias: Optional[str] + """The unique alias for the instance""" + + blueprint_id: Optional[str] + """The ID of the blueprint""" + + bot_id: Optional[str] + """The ID of the bot this configuration is using""" + + description: Optional[str] + """The associated description""" + + email: Optional[str] + """The email to use""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" + + name: Optional[str] + """The associated name""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], description: Optional[str], email: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.description = description + self.email = email + self.meta = meta + self.name = name @staticmethod - def from_dict(obj: Any) -> 'IntegrationInstagramDeleteParams': + def from_dict(obj: Any) -> 'IntegrationSupportCreateRequest': assert isinstance(obj, dict) - instagram_integration_id = from_str(obj.get("instagramIntegrationId")) - return IntegrationInstagramDeleteParams(instagram_integration_id) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + description = from_union([from_str, from_none], obj.get("description")) + email = from_union([from_str, from_none], obj.get("email")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + return IntegrationSupportCreateRequest(alias, blueprint_id, bot_id, description, email, meta, name) def to_dict(self) -> dict: result: dict = {} - result["instagramIntegrationId"] = from_str(self.instagram_integration_id) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.email is not None: + result["email"] = from_union([from_str, from_none], self.email) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) return result -class IntegrationInstagramDeleteResponse: +class IntegrationSupportCreateResponse: id: str - """The ID of the deleted Instagram integration""" + """The ID of the Support Integration""" + + def __init__(self, id: str) -> None: + self.id = id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationSupportCreateResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return IntegrationSupportCreateResponse(id) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result + + +class IntegrationSupportUpdateParams: + support_integration_id: str + """The ID of the Support integration""" + + def __init__(self, support_integration_id: str) -> None: + self.support_integration_id = support_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationSupportUpdateParams': + assert isinstance(obj, dict) + support_integration_id = from_str(obj.get("supportIntegrationId")) + return IntegrationSupportUpdateParams(support_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["supportIntegrationId"] = from_str(self.support_integration_id) + return result + + +class IntegrationSupportUpdateRequest: + """A bot configuration that can be applied without a dedicated bot instance.""" + + alias: Optional[str] + """The unique alias for the instance""" + + blueprint_id: Optional[str] + """The ID of the blueprint""" + + bot_id: Optional[str] + """The ID of the bot this configuration is using""" + + description: Optional[str] + """The associated description""" + + email: Optional[str] + """The email to use""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" + + name: Optional[str] + """The associated name""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], description: Optional[str], email: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.description = description + self.email = email + self.meta = meta + self.name = name + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationSupportUpdateRequest': + assert isinstance(obj, dict) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + description = from_union([from_str, from_none], obj.get("description")) + email = from_union([from_str, from_none], obj.get("email")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + return IntegrationSupportUpdateRequest(alias, blueprint_id, bot_id, description, email, meta, name) + + def to_dict(self) -> dict: + result: dict = {} + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.email is not None: + result["email"] = from_union([from_str, from_none], self.email) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + return result + + +class IntegrationSupportUpdateResponse: + id: str + """The ID of the Support Integration""" + + def __init__(self, id: str) -> None: + self.id = id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationSupportUpdateResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return IntegrationSupportUpdateResponse(id) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result + + +class IntegrationSupportTriggerParams: + support_integration_id: str + """The ID of the Support integration""" + + def __init__(self, support_integration_id: str) -> None: + self.support_integration_id = support_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationSupportTriggerParams': + assert isinstance(obj, dict) + support_integration_id = from_str(obj.get("supportIntegrationId")) + return IntegrationSupportTriggerParams(support_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["supportIntegrationId"] = from_str(self.support_integration_id) + return result + + +class IntegrationSupportTriggerRequest: + conversation_ids: Optional[List[str]] + """Array of conversation IDs to process""" + + sample: Optional[int] + """Number of recent conversations to process (default 20)""" + + def __init__(self, conversation_ids: Optional[List[str]], sample: Optional[int]) -> None: + self.conversation_ids = conversation_ids + self.sample = sample + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationSupportTriggerRequest': + assert isinstance(obj, dict) + conversation_ids = from_union([lambda x: from_list(from_str, x), from_none], obj.get("conversationIds")) + sample = from_union([from_int, from_none], obj.get("sample")) + return IntegrationSupportTriggerRequest(conversation_ids, sample) + + def to_dict(self) -> dict: + result: dict = {} + if self.conversation_ids is not None: + result["conversationIds"] = from_union([lambda x: from_list(from_str, x), from_none], self.conversation_ids) + if self.sample is not None: + result["sample"] = from_union([from_int, from_none], self.sample) + return result + + +class IntegrationSupportTriggerResponse: + id: str + """ID of the support integration""" - def __init__(self, id: str) -> None: + triggered: float + """Number of conversations queued for processing""" + + def __init__(self, id: str, triggered: float) -> None: self.id = id + self.triggered = triggered @staticmethod - def from_dict(obj: Any) -> 'IntegrationInstagramDeleteResponse': + def from_dict(obj: Any) -> 'IntegrationSupportTriggerResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationInstagramDeleteResponse(id) + triggered = from_float(obj.get("triggered")) + return IntegrationSupportTriggerResponse(id, triggered) def to_dict(self) -> dict: result: dict = {} result["id"] = from_str(self.id) + result["triggered"] = to_float(self.triggered) return result -class IntegrationInstagramFetchParams: - instagram_integration_id: str - """The ID of the Instagram integration to retrieve""" +class IntegrationSupportFetchParams: + support_integration_id: str + """The ID of the Support integration to retrieve""" - def __init__(self, instagram_integration_id: str) -> None: - self.instagram_integration_id = instagram_integration_id + def __init__(self, support_integration_id: str) -> None: + self.support_integration_id = support_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationInstagramFetchParams': + def from_dict(obj: Any) -> 'IntegrationSupportFetchParams': assert isinstance(obj, dict) - instagram_integration_id = from_str(obj.get("instagramIntegrationId")) - return IntegrationInstagramFetchParams(instagram_integration_id) + support_integration_id = from_str(obj.get("supportIntegrationId")) + return IntegrationSupportFetchParams(support_integration_id) def to_dict(self) -> dict: result: dict = {} - result["instagramIntegrationId"] = from_str(self.instagram_integration_id) + result["supportIntegrationId"] = from_str(self.support_integration_id) return result -class IntegrationInstagramFetchResponse: - """Blueprint properties""" +class IntegrationSupportFetchResponse: + """A bot configuration that can be applied without a dedicated bot instance.""" - access_token: Optional[str] - """The Instagram integration access token (returned as '********' if configured, null - otherwise) - """ alias: Optional[str] """The unique alias for the instance""" - attachments: Optional[bool] - """Whether the bot supports attachments""" - blueprint_id: Optional[str] """The ID of the blueprint""" - bot_id: Optional[str] + bot_id: str """The ID of the bot this configuration is using""" - contact_collection: Optional[bool] - """Whether to collect contacts""" - created_at: float """The timestamp (ms) when the instance was created""" description: Optional[str] """The associated description""" + email: Optional[str] + """The email to use""" + id: str """The instance ID""" @@ -23080,110 +21493,88 @@ class IntegrationInstagramFetchResponse: name: Optional[str] """The associated name""" - session_duration: Optional[float] - """The session duration (in milliseconds)""" - updated_at: float """The timestamp (ms) when the instance was updated""" - verify_token: str - """The Instagram integration verify token""" - - def __init__(self, access_token: Optional[str], alias: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float, verify_token: str) -> None: - self.access_token = access_token + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: str, created_at: float, description: Optional[str], email: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: self.alias = alias - self.attachments = attachments self.blueprint_id = blueprint_id self.bot_id = bot_id - self.contact_collection = contact_collection self.created_at = created_at self.description = description + self.email = email self.id = id self.meta = meta self.name = name - self.session_duration = session_duration self.updated_at = updated_at - self.verify_token = verify_token @staticmethod - def from_dict(obj: Any) -> 'IntegrationInstagramFetchResponse': + def from_dict(obj: Any) -> 'IntegrationSupportFetchResponse': assert isinstance(obj, dict) - access_token = from_union([from_str, from_none], obj.get("accessToken")) alias = from_union([from_str, from_none], obj.get("alias")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + bot_id = from_str(obj.get("botId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + email = from_union([from_str, from_none], obj.get("email")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) updated_at = from_float(obj.get("updatedAt")) - verify_token = from_str(obj.get("verifyToken")) - return IntegrationInstagramFetchResponse(access_token, alias, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at, verify_token) + return IntegrationSupportFetchResponse(alias, blueprint_id, bot_id, created_at, description, email, id, meta, name, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.access_token is not None: - result["accessToken"] = from_union([from_str, from_none], self.access_token) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + result["botId"] = from_str(self.bot_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.email is not None: + result["email"] = from_union([from_str, from_none], self.email) result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) result["updatedAt"] = to_float(self.updated_at) - result["verifyToken"] = from_str(self.verify_token) return result -class IntegrationInstagramSetupParams: - instagram_integration_id: str - """The ID of the Instagram integration""" +class IntegrationSupportDeleteParams: + support_integration_id: str + """The ID of the Support integration""" - def __init__(self, instagram_integration_id: str) -> None: - self.instagram_integration_id = instagram_integration_id + def __init__(self, support_integration_id: str) -> None: + self.support_integration_id = support_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationInstagramSetupParams': + def from_dict(obj: Any) -> 'IntegrationSupportDeleteParams': assert isinstance(obj, dict) - instagram_integration_id = from_str(obj.get("instagramIntegrationId")) - return IntegrationInstagramSetupParams(instagram_integration_id) + support_integration_id = from_str(obj.get("supportIntegrationId")) + return IntegrationSupportDeleteParams(support_integration_id) def to_dict(self) -> dict: result: dict = {} - result["instagramIntegrationId"] = from_str(self.instagram_integration_id) + result["supportIntegrationId"] = from_str(self.support_integration_id) return result -class IntegrationInstagramSetupResponse: +class IntegrationSupportDeleteResponse: id: str - """The ID of the Instagram Integration""" + """The ID of the deleted Support integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationInstagramSetupResponse': + def from_dict(obj: Any) -> 'IntegrationSupportDeleteResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationInstagramSetupResponse(id) + return IntegrationSupportDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -23191,302 +21582,252 @@ def to_dict(self) -> dict: return result -class IntegrationInstagramUpdateParams: - instagram_integration_id: str - """The ID of the Instagram integration""" - - def __init__(self, instagram_integration_id: str) -> None: - self.instagram_integration_id = instagram_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationInstagramUpdateParams': - assert isinstance(obj, dict) - instagram_integration_id = from_str(obj.get("instagramIntegrationId")) - return IntegrationInstagramUpdateParams(instagram_integration_id) - - def to_dict(self) -> dict: - result: dict = {} - result["instagramIntegrationId"] = from_str(self.instagram_integration_id) - return result - - -class IntegrationInstagramUpdateRequest: - """A bot configuration that can be applied without a dedicated bot instance.""" - - access_token: Optional[str] - """The Instagram integration access token""" - - alias: Optional[str] - """The unique alias for the instance""" - - attachments: Optional[bool] - """Whether the bot supports attachments""" - - blueprint_id: Optional[str] - """The ID of the blueprint""" +class IntegrationSlackListParamsOrder(Enum): + """The order of the paginated items""" - bot_id: Optional[str] - """The ID of the bot this configuration is using""" + ASC = "asc" + DESC = "desc" - contact_collection: Optional[bool] - """Whether to collect contacts""" - description: Optional[str] - """The associated description""" +class IntegrationSlackListParams: + cursor: Optional[str] + """The cursor to use for pagination""" - meta: Optional[Dict[str, Any]] - """Meta data information""" + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" - name: Optional[str] - """The associated name""" + order: Optional[IntegrationSlackListParamsOrder] + """The order of the paginated items""" - session_duration: Optional[float] - """The session duration (in milliseconds)""" + take: Optional[int] + """The number of items to retrieve""" - def __init__(self, access_token: Optional[str], alias: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float]) -> None: - self.access_token = access_token - self.alias = alias - self.attachments = attachments - self.blueprint_id = blueprint_id - self.bot_id = bot_id - self.contact_collection = contact_collection - self.description = description + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationSlackListParamsOrder], take: Optional[int]) -> None: + self.cursor = cursor self.meta = meta - self.name = name - self.session_duration = session_duration + self.order = order + self.take = take @staticmethod - def from_dict(obj: Any) -> 'IntegrationInstagramUpdateRequest': + def from_dict(obj: Any) -> 'IntegrationSlackListParams': assert isinstance(obj, dict) - access_token = from_union([from_str, from_none], obj.get("accessToken")) - alias = from_union([from_str, from_none], obj.get("alias")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) - description = from_union([from_str, from_none], obj.get("description")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - return IntegrationInstagramUpdateRequest(access_token, alias, attachments, blueprint_id, bot_id, contact_collection, description, meta, name, session_duration) + cursor = from_union([from_str, from_none], obj.get("cursor")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([IntegrationSlackListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return IntegrationSlackListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} - if self.access_token is not None: - result["accessToken"] = from_union([from_str, from_none], self.access_token) - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - return result - - -class IntegrationInstagramUpdateResponse: - id: str - """The ID of the Instagram Integration""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationInstagramUpdateResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return IntegrationInstagramUpdateResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(IntegrationSlackListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class IntegrationInstagramCreateRequest: - """A bot configuration that can be applied without a dedicated bot instance.""" - - access_token: Optional[str] - """The Instagram integration access token""" +class IntegrationSlackListResponseItem: + """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" - attachments: Optional[bool] - """Whether the bot supports attachments""" - + allow_from: Optional[str] + """Restrict which Slack users or channels can interact with this integration. Accepts Slack + user IDs (U…/W…), channel IDs (C…/G…/D…), @username, or + """ + auto_respond: Optional[str] + """Configure automatic response behavior. Use '@all' to respond to all messages, '@agent + ' for agent-powered decisions, or custom instructions for lightweight LLM + filtering. Null/empty defaults to current behavior (DMs, mentions, threads only). + """ blueprint_id: Optional[str] """The ID of the blueprint""" bot_id: Optional[str] """The ID of the bot this configuration is using""" + bot_token: Optional[str] + """The bot token (returned as '********' if configured, null otherwise)""" + contact_collection: Optional[bool] - """Whether to collect contacts""" + """Weather to collect contacts""" + + created_at: float + """The timestamp (ms) when the instance was created""" description: Optional[str] """The associated description""" + id: str + """The instance ID""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" + ratings: Optional[bool] + """Whether to enable ratings buttons feature""" + + references: Optional[bool] + """Whether to enable references feature""" + session_duration: Optional[float] - """The session duration (in milliseconds)""" + """The session duration for the Slack integration""" - def __init__(self, access_token: Optional[str], alias: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float]) -> None: - self.access_token = access_token + signing_secret: Optional[str] + """The signing secret (returned as '********' if configured, null otherwise)""" + + updated_at: float + """The timestamp (ms) when the instance was updated""" + + user_token: Optional[str] + """The user token (returned as '********' if configured, null otherwise)""" + + visible_messages: Optional[float] + """The number of visible messages outside of the new thread""" + + def __init__(self, alias: Optional[str], allow_from: Optional[str], auto_respond: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], bot_token: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], ratings: Optional[bool], references: Optional[bool], session_duration: Optional[float], signing_secret: Optional[str], updated_at: float, user_token: Optional[str], visible_messages: Optional[float]) -> None: self.alias = alias - self.attachments = attachments + self.allow_from = allow_from + self.auto_respond = auto_respond self.blueprint_id = blueprint_id self.bot_id = bot_id + self.bot_token = bot_token self.contact_collection = contact_collection + self.created_at = created_at self.description = description + self.id = id self.meta = meta self.name = name + self.ratings = ratings + self.references = references self.session_duration = session_duration + self.signing_secret = signing_secret + self.updated_at = updated_at + self.user_token = user_token + self.visible_messages = visible_messages @staticmethod - def from_dict(obj: Any) -> 'IntegrationInstagramCreateRequest': + def from_dict(obj: Any) -> 'IntegrationSlackListResponseItem': assert isinstance(obj, dict) - access_token = from_union([from_str, from_none], obj.get("accessToken")) alias = from_union([from_str, from_none], obj.get("alias")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) + allow_from = from_union([from_str, from_none], obj.get("allowFrom")) + auto_respond = from_union([from_str, from_none], obj.get("autoRespond")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) + bot_token = from_union([from_str, from_none], obj.get("botToken")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) + ratings = from_union([from_bool, from_none], obj.get("ratings")) + references = from_union([from_bool, from_none], obj.get("references")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - return IntegrationInstagramCreateRequest(access_token, alias, attachments, blueprint_id, bot_id, contact_collection, description, meta, name, session_duration) + signing_secret = from_union([from_str, from_none], obj.get("signingSecret")) + updated_at = from_float(obj.get("updatedAt")) + user_token = from_union([from_str, from_none], obj.get("userToken")) + visible_messages = from_union([from_float, from_none], obj.get("visibleMessages")) + return IntegrationSlackListResponseItem(alias, allow_from, auto_respond, blueprint_id, bot_id, bot_token, contact_collection, created_at, description, id, meta, name, ratings, references, session_duration, signing_secret, updated_at, user_token, visible_messages) def to_dict(self) -> dict: result: dict = {} - if self.access_token is not None: - result["accessToken"] = from_union([from_str, from_none], self.access_token) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) + if self.allow_from is not None: + result["allowFrom"] = from_union([from_str, from_none], self.allow_from) + if self.auto_respond is not None: + result["autoRespond"] = from_union([from_str, from_none], self.auto_respond) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.bot_token is not None: + result["botToken"] = from_union([from_str, from_none], self.bot_token) if self.contact_collection is not None: result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.ratings is not None: + result["ratings"] = from_union([from_bool, from_none], self.ratings) + if self.references is not None: + result["references"] = from_union([from_bool, from_none], self.references) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.signing_secret is not None: + result["signingSecret"] = from_union([from_str, from_none], self.signing_secret) + result["updatedAt"] = to_float(self.updated_at) + if self.user_token is not None: + result["userToken"] = from_union([from_str, from_none], self.user_token) + if self.visible_messages is not None: + result["visibleMessages"] = from_union([to_float, from_none], self.visible_messages) return result -class IntegrationInstagramCreateResponse: - id: str - """The ID of the Instagram Integration""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationInstagramCreateResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return IntegrationInstagramCreateResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - - -class IntegrationInstagramListParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" - - -class IntegrationInstagramListParams: - cursor: Optional[str] - """The cursor to use for pagination""" - - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" - - order: Optional[IntegrationInstagramListParamsOrder] - """The order of the paginated items""" +class IntegrationSlackListResponse: + cursor: str + """Cursor for fetching the next page""" - take: Optional[int] - """The number of items to retrieve""" + items: List[IntegrationSlackListResponseItem] - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationInstagramListParamsOrder], take: Optional[int]) -> None: + def __init__(self, cursor: str, items: List[IntegrationSlackListResponseItem]) -> None: self.cursor = cursor - self.meta = meta - self.order = order - self.take = take + self.items = items @staticmethod - def from_dict(obj: Any) -> 'IntegrationInstagramListParams': + def from_dict(obj: Any) -> 'IntegrationSlackListResponse': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([IntegrationInstagramListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return IntegrationInstagramListParams(cursor, meta, order, take) + cursor = from_str(obj.get("cursor")) + items = from_list(IntegrationSlackListResponseItem.from_dict, obj.get("items")) + return IntegrationSlackListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(IntegrationInstagramListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(IntegrationSlackListResponseItem, x), self.items) return result -class IntegrationInstagramListResponseItem: +class IntegrationSlackListStreamItemData: """Blueprint properties""" - access_token: Optional[str] - """The Instagram integration access token (returned as '********' if configured, null - otherwise) - """ alias: Optional[str] """The unique alias for the instance""" - attachments: Optional[bool] - """Whether the bot supports attachments""" - + allow_from: Optional[str] + """Restrict which Slack users or channels can interact with this integration. Accepts Slack + user IDs (U…/W…), channel IDs (C…/G…/D…), @username, or + """ + auto_respond: Optional[str] + """Configure automatic response behavior. Use '@all' to respond to all messages, '@agent + ' for agent-powered decisions, or custom instructions for lightweight LLM + filtering. Null/empty defaults to current behavior (DMs, mentions, threads only). + """ blueprint_id: Optional[str] """The ID of the blueprint""" bot_id: Optional[str] """The ID of the bot this configuration is using""" + bot_token: Optional[str] + """The bot token (returned as '********' if configured, null otherwise)""" + contact_collection: Optional[bool] - """Whether to collect contacts""" + """Weather to collect contacts""" created_at: float """The timestamp (ms) when the instance was created""" @@ -23503,62 +21844,86 @@ class IntegrationInstagramListResponseItem: name: Optional[str] """The associated name""" + ratings: Optional[bool] + """Whether to enable ratings buttons feature""" + + references: Optional[bool] + """Whether to enable references feature""" + session_duration: Optional[float] - """The session duration (in milliseconds)""" + """The session duration for the Slack integration""" + + signing_secret: Optional[str] + """The signing secret (returned as '********' if configured, null otherwise)""" updated_at: float """The timestamp (ms) when the instance was updated""" - verify_token: str - """The Instagram integration verify token""" + user_token: Optional[str] + """The user token (returned as '********' if configured, null otherwise)""" - def __init__(self, access_token: Optional[str], alias: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float, verify_token: str) -> None: - self.access_token = access_token + visible_messages: Optional[float] + """The number of visible messages outside of the new thread""" + + def __init__(self, alias: Optional[str], allow_from: Optional[str], auto_respond: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], bot_token: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], ratings: Optional[bool], references: Optional[bool], session_duration: Optional[float], signing_secret: Optional[str], updated_at: float, user_token: Optional[str], visible_messages: Optional[float]) -> None: self.alias = alias - self.attachments = attachments + self.allow_from = allow_from + self.auto_respond = auto_respond self.blueprint_id = blueprint_id self.bot_id = bot_id + self.bot_token = bot_token self.contact_collection = contact_collection self.created_at = created_at self.description = description self.id = id self.meta = meta self.name = name + self.ratings = ratings + self.references = references self.session_duration = session_duration + self.signing_secret = signing_secret self.updated_at = updated_at - self.verify_token = verify_token + self.user_token = user_token + self.visible_messages = visible_messages @staticmethod - def from_dict(obj: Any) -> 'IntegrationInstagramListResponseItem': + def from_dict(obj: Any) -> 'IntegrationSlackListStreamItemData': assert isinstance(obj, dict) - access_token = from_union([from_str, from_none], obj.get("accessToken")) alias = from_union([from_str, from_none], obj.get("alias")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) + allow_from = from_union([from_str, from_none], obj.get("allowFrom")) + auto_respond = from_union([from_str, from_none], obj.get("autoRespond")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) + bot_token = from_union([from_str, from_none], obj.get("botToken")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) + ratings = from_union([from_bool, from_none], obj.get("ratings")) + references = from_union([from_bool, from_none], obj.get("references")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + signing_secret = from_union([from_str, from_none], obj.get("signingSecret")) updated_at = from_float(obj.get("updatedAt")) - verify_token = from_str(obj.get("verifyToken")) - return IntegrationInstagramListResponseItem(access_token, alias, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at, verify_token) + user_token = from_union([from_str, from_none], obj.get("userToken")) + visible_messages = from_union([from_float, from_none], obj.get("visibleMessages")) + return IntegrationSlackListStreamItemData(alias, allow_from, auto_respond, blueprint_id, bot_id, bot_token, contact_collection, created_at, description, id, meta, name, ratings, references, session_duration, signing_secret, updated_at, user_token, visible_messages) def to_dict(self) -> dict: result: dict = {} - if self.access_token is not None: - result["accessToken"] = from_union([from_str, from_none], self.access_token) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) + if self.allow_from is not None: + result["allowFrom"] = from_union([from_str, from_none], self.allow_from) + if self.auto_respond is not None: + result["autoRespond"] = from_union([from_str, from_none], self.auto_respond) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.bot_token is not None: + result["botToken"] = from_union([from_str, from_none], self.bot_token) if self.contact_collection is not None: result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) result["createdAt"] = to_float(self.created_at) @@ -23569,209 +21934,195 @@ def to_dict(self) -> dict: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.ratings is not None: + result["ratings"] = from_union([from_bool, from_none], self.ratings) + if self.references is not None: + result["references"] = from_union([from_bool, from_none], self.references) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.signing_secret is not None: + result["signingSecret"] = from_union([from_str, from_none], self.signing_secret) result["updatedAt"] = to_float(self.updated_at) - result["verifyToken"] = from_str(self.verify_token) + if self.user_token is not None: + result["userToken"] = from_union([from_str, from_none], self.user_token) + if self.visible_messages is not None: + result["visibleMessages"] = from_union([to_float, from_none], self.visible_messages) return result -class IntegrationInstagramListResponse: - cursor: str - """Cursor for fetching the next page""" +class IntegrationSlackListStreamItemType(Enum): + """The type of event""" + + ITEM = "item" + + +class IntegrationSlackListStreamItem: + data: IntegrationSlackListStreamItemData + """Blueprint properties""" - items: List[IntegrationInstagramListResponseItem] + type: IntegrationSlackListStreamItemType + """The type of event""" - def __init__(self, cursor: str, items: List[IntegrationInstagramListResponseItem]) -> None: - self.cursor = cursor - self.items = items + def __init__(self, data: IntegrationSlackListStreamItemData, type: IntegrationSlackListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'IntegrationInstagramListResponse': + def from_dict(obj: Any) -> 'IntegrationSlackListStreamItem': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(IntegrationInstagramListResponseItem.from_dict, obj.get("items")) - return IntegrationInstagramListResponse(cursor, items) + data = IntegrationSlackListStreamItemData.from_dict(obj.get("data")) + type = IntegrationSlackListStreamItemType(obj.get("type")) + return IntegrationSlackListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(IntegrationInstagramListResponseItem, x), self.items) + result["data"] = to_class(IntegrationSlackListStreamItemData, self.data) + result["type"] = to_enum(IntegrationSlackListStreamItemType, self.type) return result -class IntegrationInstagramListStreamItemData: - """Blueprint properties""" +class IntegrationSlackCreateRequest: + """A bot configuration that can be applied without a dedicated bot instance.""" - access_token: Optional[str] - """The Instagram integration access token (returned as '********' if configured, null - otherwise) - """ alias: Optional[str] """The unique alias for the instance""" - attachments: Optional[bool] - """Whether the bot supports attachments""" - + allow_from: Optional[str] + """Restrict which Slack users or channels can interact with this integration. Accepts Slack + user IDs (U…/W…), channel IDs (C…/G…/D…), @username, or + """ + auto_respond: Optional[str] + """Configure automatic response behavior. Use '@all' to respond to all messages, '@agent + ' for agent-powered decisions, or custom instructions for lightweight LLM + filtering. Null/empty defaults to current behavior (DMs, mentions, threads only). + """ blueprint_id: Optional[str] """The ID of the blueprint""" bot_id: Optional[str] """The ID of the bot this configuration is using""" - contact_collection: Optional[bool] - """Whether to collect contacts""" + bot_token: Optional[str] + """The bot token for the Slack integration""" - created_at: float - """The timestamp (ms) when the instance was created""" + contact_collection: Optional[bool] + """Weather to collect contacts""" description: Optional[str] """The associated description""" - id: str - """The instance ID""" - meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" + ratings: Optional[bool] + """Whether to enable ratings buttons feature""" + + references: Optional[bool] + """Whether to enable references feature""" + session_duration: Optional[float] - """The session duration (in milliseconds)""" + """The session duration for the Slack integration""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + signing_secret: Optional[str] + """The signing secret for the Slack integration""" - verify_token: str - """The Instagram integration verify token""" + user_token: Optional[str] + """The user token for the Slack integration""" - def __init__(self, access_token: Optional[str], alias: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float, verify_token: str) -> None: - self.access_token = access_token + visible_messages: Optional[float] + """The number of visible messages outside of the new thread""" + + def __init__(self, alias: Optional[str], allow_from: Optional[str], auto_respond: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], bot_token: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], ratings: Optional[bool], references: Optional[bool], session_duration: Optional[float], signing_secret: Optional[str], user_token: Optional[str], visible_messages: Optional[float]) -> None: self.alias = alias - self.attachments = attachments + self.allow_from = allow_from + self.auto_respond = auto_respond self.blueprint_id = blueprint_id self.bot_id = bot_id + self.bot_token = bot_token self.contact_collection = contact_collection - self.created_at = created_at self.description = description - self.id = id self.meta = meta self.name = name + self.ratings = ratings + self.references = references self.session_duration = session_duration - self.updated_at = updated_at - self.verify_token = verify_token + self.signing_secret = signing_secret + self.user_token = user_token + self.visible_messages = visible_messages @staticmethod - def from_dict(obj: Any) -> 'IntegrationInstagramListStreamItemData': + def from_dict(obj: Any) -> 'IntegrationSlackCreateRequest': assert isinstance(obj, dict) - access_token = from_union([from_str, from_none], obj.get("accessToken")) alias = from_union([from_str, from_none], obj.get("alias")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) + allow_from = from_union([from_str, from_none], obj.get("allowFrom")) + auto_respond = from_union([from_str, from_none], obj.get("autoRespond")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) + bot_token = from_union([from_str, from_none], obj.get("botToken")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) - created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) + ratings = from_union([from_bool, from_none], obj.get("ratings")) + references = from_union([from_bool, from_none], obj.get("references")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - updated_at = from_float(obj.get("updatedAt")) - verify_token = from_str(obj.get("verifyToken")) - return IntegrationInstagramListStreamItemData(access_token, alias, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at, verify_token) + signing_secret = from_union([from_str, from_none], obj.get("signingSecret")) + user_token = from_union([from_str, from_none], obj.get("userToken")) + visible_messages = from_union([from_float, from_none], obj.get("visibleMessages")) + return IntegrationSlackCreateRequest(alias, allow_from, auto_respond, blueprint_id, bot_id, bot_token, contact_collection, description, meta, name, ratings, references, session_duration, signing_secret, user_token, visible_messages) def to_dict(self) -> dict: result: dict = {} - if self.access_token is not None: - result["accessToken"] = from_union([from_str, from_none], self.access_token) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) + if self.allow_from is not None: + result["allowFrom"] = from_union([from_str, from_none], self.allow_from) + if self.auto_respond is not None: + result["autoRespond"] = from_union([from_str, from_none], self.auto_respond) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.bot_token is not None: + result["botToken"] = from_union([from_str, from_none], self.bot_token) if self.contact_collection is not None: result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) - result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.ratings is not None: + result["ratings"] = from_union([from_bool, from_none], self.ratings) + if self.references is not None: + result["references"] = from_union([from_bool, from_none], self.references) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - result["updatedAt"] = to_float(self.updated_at) - result["verifyToken"] = from_str(self.verify_token) - return result - - -class IntegrationInstagramListStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - - -class IntegrationInstagramListStreamItem: - data: IntegrationInstagramListStreamItemData - """Blueprint properties""" - - type: IntegrationInstagramListStreamItemType - """The type of event""" - - def __init__(self, data: IntegrationInstagramListStreamItemData, type: IntegrationInstagramListStreamItemType) -> None: - self.data = data - self.type = type - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationInstagramListStreamItem': - assert isinstance(obj, dict) - data = IntegrationInstagramListStreamItemData.from_dict(obj.get("data")) - type = IntegrationInstagramListStreamItemType(obj.get("type")) - return IntegrationInstagramListStreamItem(data, type) - - def to_dict(self) -> dict: - result: dict = {} - result["data"] = to_class(IntegrationInstagramListStreamItemData, self.data) - result["type"] = to_enum(IntegrationInstagramListStreamItemType, self.type) - return result - - -class IntegrationMCPServerDeleteParams: - mcpserver_integration_id: str - """The ID of the McpServer integration""" - - def __init__(self, mcpserver_integration_id: str) -> None: - self.mcpserver_integration_id = mcpserver_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationMCPServerDeleteParams': - assert isinstance(obj, dict) - mcpserver_integration_id = from_str(obj.get("mcpserverIntegrationId")) - return IntegrationMCPServerDeleteParams(mcpserver_integration_id) - - def to_dict(self) -> dict: - result: dict = {} - result["mcpserverIntegrationId"] = from_str(self.mcpserver_integration_id) + if self.signing_secret is not None: + result["signingSecret"] = from_union([from_str, from_none], self.signing_secret) + if self.user_token is not None: + result["userToken"] = from_union([from_str, from_none], self.user_token) + if self.visible_messages is not None: + result["visibleMessages"] = from_union([to_float, from_none], self.visible_messages) return result -class IntegrationMCPServerDeleteResponse: +class IntegrationSlackCreateResponse: id: str - """The ID of the deleted McpServer integration""" + """The ID of the Slack Integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationMCPServerDeleteResponse': + def from_dict(obj: Any) -> 'IntegrationSlackCreateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationMCPServerDeleteResponse(id) + return IntegrationSlackCreateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -23779,202 +22130,205 @@ def to_dict(self) -> dict: return result -class IntegrationMCPServerFetchParams: - mcpserver_integration_id: str - """The ID of the McpServer integration to retrieve""" +class IntegrationSlackUpdateParams: + slack_integration_id: str + """The ID of the Slack integration""" - def __init__(self, mcpserver_integration_id: str) -> None: - self.mcpserver_integration_id = mcpserver_integration_id + def __init__(self, slack_integration_id: str) -> None: + self.slack_integration_id = slack_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationMCPServerFetchParams': + def from_dict(obj: Any) -> 'IntegrationSlackUpdateParams': assert isinstance(obj, dict) - mcpserver_integration_id = from_str(obj.get("mcpserverIntegrationId")) - return IntegrationMCPServerFetchParams(mcpserver_integration_id) + slack_integration_id = from_str(obj.get("slackIntegrationId")) + return IntegrationSlackUpdateParams(slack_integration_id) def to_dict(self) -> dict: result: dict = {} - result["mcpserverIntegrationId"] = from_str(self.mcpserver_integration_id) + result["slackIntegrationId"] = from_str(self.slack_integration_id) return result -class IntegrationMCPServerFetchResponse: - """Blueprint properties""" +class IntegrationSlackUpdateRequest: + """A bot configuration that can be applied without a dedicated bot instance.""" alias: Optional[str] """The unique alias for the instance""" + allow_from: Optional[str] + """Restrict which Slack users or channels can interact with this integration. Accepts Slack + user IDs (U…/W…), channel IDs (C…/G…/D…), @username, or + """ + auto_respond: Optional[str] + """Configure automatic response behavior. Use '@all' to respond to all messages, '@agent + ' for agent-powered decisions, or custom instructions for lightweight LLM + filtering. Null/empty defaults to current behavior (DMs, mentions, threads only). + """ blueprint_id: Optional[str] """The ID of the blueprint""" - created_at: float - """The timestamp (ms) when the instance was created""" + bot_id: Optional[str] + """The ID of the bot this configuration is using""" + + bot_token: Optional[str] + """The bot token for the Slack integration""" + + contact_collection: Optional[bool] + """Weather to collect contacts""" description: Optional[str] """The associated description""" - id: str - """The instance ID""" - meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - o_auth_connection_id: Optional[str] - """The ID of the OAuth connection for IdP-based authentication""" + ratings: Optional[bool] + """Whether to enable ratings buttons feature""" - skillset_id: Optional[str] - """The ID of the skillset""" + references: Optional[bool] + """Whether to enable references feature""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + session_duration: Optional[float] + """The session duration for the Slack integration""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], o_auth_connection_id: Optional[str], skillset_id: Optional[str], updated_at: float) -> None: + signing_secret: Optional[str] + """The signing secret for the Slack integration""" + + user_token: Optional[str] + """The user token for the Slack integration""" + + visible_messages: Optional[float] + """The number of visible messages outside of the new thread""" + + def __init__(self, alias: Optional[str], allow_from: Optional[str], auto_respond: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], bot_token: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], ratings: Optional[bool], references: Optional[bool], session_duration: Optional[float], signing_secret: Optional[str], user_token: Optional[str], visible_messages: Optional[float]) -> None: self.alias = alias + self.allow_from = allow_from + self.auto_respond = auto_respond self.blueprint_id = blueprint_id - self.created_at = created_at + self.bot_id = bot_id + self.bot_token = bot_token + self.contact_collection = contact_collection self.description = description - self.id = id self.meta = meta self.name = name - self.o_auth_connection_id = o_auth_connection_id - self.skillset_id = skillset_id - self.updated_at = updated_at + self.ratings = ratings + self.references = references + self.session_duration = session_duration + self.signing_secret = signing_secret + self.user_token = user_token + self.visible_messages = visible_messages @staticmethod - def from_dict(obj: Any) -> 'IntegrationMCPServerFetchResponse': + def from_dict(obj: Any) -> 'IntegrationSlackUpdateRequest': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) + allow_from = from_union([from_str, from_none], obj.get("allowFrom")) + auto_respond = from_union([from_str, from_none], obj.get("autoRespond")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - created_at = from_float(obj.get("createdAt")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + bot_token = from_union([from_str, from_none], obj.get("botToken")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - o_auth_connection_id = from_union([from_str, from_none], obj.get("oAuthConnectionId")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) - updated_at = from_float(obj.get("updatedAt")) - return IntegrationMCPServerFetchResponse(alias, blueprint_id, created_at, description, id, meta, name, o_auth_connection_id, skillset_id, updated_at) + ratings = from_union([from_bool, from_none], obj.get("ratings")) + references = from_union([from_bool, from_none], obj.get("references")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + signing_secret = from_union([from_str, from_none], obj.get("signingSecret")) + user_token = from_union([from_str, from_none], obj.get("userToken")) + visible_messages = from_union([from_float, from_none], obj.get("visibleMessages")) + return IntegrationSlackUpdateRequest(alias, allow_from, auto_respond, blueprint_id, bot_id, bot_token, contact_collection, description, meta, name, ratings, references, session_duration, signing_secret, user_token, visible_messages) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) + if self.allow_from is not None: + result["allowFrom"] = from_union([from_str, from_none], self.allow_from) + if self.auto_respond is not None: + result["autoRespond"] = from_union([from_str, from_none], self.auto_respond) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - result["createdAt"] = to_float(self.created_at) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.bot_token is not None: + result["botToken"] = from_union([from_str, from_none], self.bot_token) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.o_auth_connection_id is not None: - result["oAuthConnectionId"] = from_union([from_str, from_none], self.o_auth_connection_id) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) - result["updatedAt"] = to_float(self.updated_at) + if self.ratings is not None: + result["ratings"] = from_union([from_bool, from_none], self.ratings) + if self.references is not None: + result["references"] = from_union([from_bool, from_none], self.references) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.signing_secret is not None: + result["signingSecret"] = from_union([from_str, from_none], self.signing_secret) + if self.user_token is not None: + result["userToken"] = from_union([from_str, from_none], self.user_token) + if self.visible_messages is not None: + result["visibleMessages"] = from_union([to_float, from_none], self.visible_messages) return result -class IntegrationMCPServerUpdateParams: - mcpserver_integration_id: str - """The ID of the McpServer integration""" +class IntegrationSlackUpdateResponse: + id: str + """The ID of the Slack Integration""" - def __init__(self, mcpserver_integration_id: str) -> None: - self.mcpserver_integration_id = mcpserver_integration_id + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationMCPServerUpdateParams': + def from_dict(obj: Any) -> 'IntegrationSlackUpdateResponse': assert isinstance(obj, dict) - mcpserver_integration_id = from_str(obj.get("mcpserverIntegrationId")) - return IntegrationMCPServerUpdateParams(mcpserver_integration_id) + id = from_str(obj.get("id")) + return IntegrationSlackUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} - result["mcpserverIntegrationId"] = from_str(self.mcpserver_integration_id) + result["id"] = from_str(self.id) return result -class IntegrationMCPServerUpdateRequest: - """Blueprint properties""" - - alias: Optional[str] - """The unique alias for the instance""" - - blueprint_id: Optional[str] - """The ID of the blueprint""" - - description: Optional[str] - """The associated description""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: Optional[str] - """The associated name""" - - o_auth_connection_id: Optional[str] - """The ID of the OAuth connection for IdP-based authentication""" - - skillset_id: Optional[str] - """The ID of the skillset""" +class IntegrationSlackSetupParams: + slack_integration_id: str + """The ID of the Slack integration""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], o_auth_connection_id: Optional[str], skillset_id: Optional[str]) -> None: - self.alias = alias - self.blueprint_id = blueprint_id - self.description = description - self.meta = meta - self.name = name - self.o_auth_connection_id = o_auth_connection_id - self.skillset_id = skillset_id + def __init__(self, slack_integration_id: str) -> None: + self.slack_integration_id = slack_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationMCPServerUpdateRequest': + def from_dict(obj: Any) -> 'IntegrationSlackSetupParams': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - description = from_union([from_str, from_none], obj.get("description")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - o_auth_connection_id = from_union([from_str, from_none], obj.get("oAuthConnectionId")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) - return IntegrationMCPServerUpdateRequest(alias, blueprint_id, description, meta, name, o_auth_connection_id, skillset_id) + slack_integration_id = from_str(obj.get("slackIntegrationId")) + return IntegrationSlackSetupParams(slack_integration_id) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.o_auth_connection_id is not None: - result["oAuthConnectionId"] = from_union([from_str, from_none], self.o_auth_connection_id) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) + result["slackIntegrationId"] = from_str(self.slack_integration_id) return result -class IntegrationMCPServerUpdateResponse: +class IntegrationSlackSetupResponse: id: str - """The ID of the McpServer Integration""" + """The ID of the setup Slack integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationMCPServerUpdateResponse': + def from_dict(obj: Any) -> 'IntegrationSlackSetupResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationMCPServerUpdateResponse(id) + return IntegrationSlackSetupResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -23982,82 +22336,204 @@ def to_dict(self) -> dict: return result -class IntegrationMCPServerCreateRequest: +class IntegrationSlackFetchParams: + slack_integration_id: str + """The ID of the Slack integration to retrieve""" + + def __init__(self, slack_integration_id: str) -> None: + self.slack_integration_id = slack_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationSlackFetchParams': + assert isinstance(obj, dict) + slack_integration_id = from_str(obj.get("slackIntegrationId")) + return IntegrationSlackFetchParams(slack_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["slackIntegrationId"] = from_str(self.slack_integration_id) + return result + + +class IntegrationSlackFetchResponse: """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" + allow_from: Optional[str] + """Restrict which Slack users or channels can interact with this integration. Accepts Slack + user IDs (U…/W…), channel IDs (C…/G…/D…), @username, or + """ + auto_respond: Optional[str] + """Configure automatic response behavior. Use '@all' to respond to all messages, '@agent + ' for agent-powered decisions, or custom instructions for lightweight LLM + filtering. Null/empty defaults to current behavior (DMs, mentions, threads only). + """ blueprint_id: Optional[str] """The ID of the blueprint""" + bot_id: Optional[str] + """The ID of the bot this configuration is using""" + + bot_token: Optional[str] + """The bot token (returned as '********' if configured, null otherwise)""" + + contact_collection: Optional[bool] + """Weather to collect contacts""" + + created_at: float + """The timestamp (ms) when the instance was created""" + description: Optional[str] """The associated description""" + id: str + """The instance ID""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - o_auth_connection_id: Optional[str] - """The ID of the OAuth connection for IdP-based authentication""" + ratings: Optional[bool] + """Whether to enable ratings buttons feature""" - skillset_id: Optional[str] - """The ID of the skillset""" + references: Optional[bool] + """Whether to enable references feature""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], o_auth_connection_id: Optional[str], skillset_id: Optional[str]) -> None: + session_duration: Optional[float] + """The session duration for the Slack integration""" + + signing_secret: Optional[str] + """The signing secret (returned as '********' if configured, null otherwise)""" + + updated_at: float + """The timestamp (ms) when the instance was updated""" + + user_token: Optional[str] + """The user token (returned as '********' if configured, null otherwise)""" + + visible_messages: Optional[float] + """The number of visible messages outside of the new thread""" + + def __init__(self, alias: Optional[str], allow_from: Optional[str], auto_respond: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], bot_token: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], ratings: Optional[bool], references: Optional[bool], session_duration: Optional[float], signing_secret: Optional[str], updated_at: float, user_token: Optional[str], visible_messages: Optional[float]) -> None: self.alias = alias + self.allow_from = allow_from + self.auto_respond = auto_respond self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.bot_token = bot_token + self.contact_collection = contact_collection + self.created_at = created_at self.description = description + self.id = id self.meta = meta self.name = name - self.o_auth_connection_id = o_auth_connection_id - self.skillset_id = skillset_id + self.ratings = ratings + self.references = references + self.session_duration = session_duration + self.signing_secret = signing_secret + self.updated_at = updated_at + self.user_token = user_token + self.visible_messages = visible_messages @staticmethod - def from_dict(obj: Any) -> 'IntegrationMCPServerCreateRequest': + def from_dict(obj: Any) -> 'IntegrationSlackFetchResponse': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) + allow_from = from_union([from_str, from_none], obj.get("allowFrom")) + auto_respond = from_union([from_str, from_none], obj.get("autoRespond")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + bot_token = from_union([from_str, from_none], obj.get("botToken")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - o_auth_connection_id = from_union([from_str, from_none], obj.get("oAuthConnectionId")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) - return IntegrationMCPServerCreateRequest(alias, blueprint_id, description, meta, name, o_auth_connection_id, skillset_id) + ratings = from_union([from_bool, from_none], obj.get("ratings")) + references = from_union([from_bool, from_none], obj.get("references")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + signing_secret = from_union([from_str, from_none], obj.get("signingSecret")) + updated_at = from_float(obj.get("updatedAt")) + user_token = from_union([from_str, from_none], obj.get("userToken")) + visible_messages = from_union([from_float, from_none], obj.get("visibleMessages")) + return IntegrationSlackFetchResponse(alias, allow_from, auto_respond, blueprint_id, bot_id, bot_token, contact_collection, created_at, description, id, meta, name, ratings, references, session_duration, signing_secret, updated_at, user_token, visible_messages) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) + if self.allow_from is not None: + result["allowFrom"] = from_union([from_str, from_none], self.allow_from) + if self.auto_respond is not None: + result["autoRespond"] = from_union([from_str, from_none], self.auto_respond) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.bot_token is not None: + result["botToken"] = from_union([from_str, from_none], self.bot_token) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.o_auth_connection_id is not None: - result["oAuthConnectionId"] = from_union([from_str, from_none], self.o_auth_connection_id) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) + if self.ratings is not None: + result["ratings"] = from_union([from_bool, from_none], self.ratings) + if self.references is not None: + result["references"] = from_union([from_bool, from_none], self.references) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.signing_secret is not None: + result["signingSecret"] = from_union([from_str, from_none], self.signing_secret) + result["updatedAt"] = to_float(self.updated_at) + if self.user_token is not None: + result["userToken"] = from_union([from_str, from_none], self.user_token) + if self.visible_messages is not None: + result["visibleMessages"] = from_union([to_float, from_none], self.visible_messages) return result -class IntegrationMCPServerCreateResponse: +class IntegrationSlackDeleteParams: + slack_integration_id: str + """The ID of the Slack integration""" + + def __init__(self, slack_integration_id: str) -> None: + self.slack_integration_id = slack_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationSlackDeleteParams': + assert isinstance(obj, dict) + slack_integration_id = from_str(obj.get("slackIntegrationId")) + return IntegrationSlackDeleteParams(slack_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["slackIntegrationId"] = from_str(self.slack_integration_id) + return result + + +class IntegrationSlackDeleteResponse: id: str - """The ID of the McpServer Integration""" + """The ID of the deleted Slack integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationMCPServerCreateResponse': + def from_dict(obj: Any) -> 'IntegrationSlackDeleteResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationMCPServerCreateResponse(id) + return IntegrationSlackDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -24065,40 +22541,40 @@ def to_dict(self) -> dict: return result -class IntegrationMCPServerListParamsOrder(Enum): +class SkillServerIntegrationListParamsOrder(Enum): """The order of the paginated items""" ASC = "asc" DESC = "desc" -class IntegrationMCPServerListParams: +class SkillServerIntegrationListParams: cursor: Optional[str] """The cursor to use for pagination""" meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" + """Key-value pairs to filter by metadata""" - order: Optional[IntegrationMCPServerListParamsOrder] + order: Optional[SkillServerIntegrationListParamsOrder] """The order of the paginated items""" take: Optional[int] """The number of items to retrieve""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationMCPServerListParamsOrder], take: Optional[int]) -> None: + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[SkillServerIntegrationListParamsOrder], take: Optional[int]) -> None: self.cursor = cursor self.meta = meta self.order = order self.take = take @staticmethod - def from_dict(obj: Any) -> 'IntegrationMCPServerListParams': + def from_dict(obj: Any) -> 'SkillServerIntegrationListParams': assert isinstance(obj, dict) cursor = from_union([from_str, from_none], obj.get("cursor")) meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([IntegrationMCPServerListParamsOrder, from_none], obj.get("order")) + order = from_union([SkillServerIntegrationListParamsOrder, from_none], obj.get("order")) take = from_union([from_int, from_none], obj.get("take")) - return IntegrationMCPServerListParams(cursor, meta, order, take) + return SkillServerIntegrationListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} @@ -24107,13 +22583,13 @@ def to_dict(self) -> dict: if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(IntegrationMCPServerListParamsOrder, x), from_none], self.order) + result["order"] = from_union([lambda x: to_enum(SkillServerIntegrationListParamsOrder, x), from_none], self.order) if self.take is not None: result["take"] = from_union([from_int, from_none], self.take) return result -class IntegrationMCPServerListResponseItem: +class SkillServerIntegrationListResponseItem: """Blueprint properties""" alias: Optional[str] @@ -24137,16 +22613,13 @@ class IntegrationMCPServerListResponseItem: name: Optional[str] """The associated name""" - o_auth_connection_id: Optional[str] - """The ID of the OAuth connection for IdP-based authentication""" - skillset_id: Optional[str] """The ID of the skillset""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], o_auth_connection_id: Optional[str], skillset_id: Optional[str], updated_at: float) -> None: + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], skillset_id: Optional[str], updated_at: float) -> None: self.alias = alias self.blueprint_id = blueprint_id self.created_at = created_at @@ -24154,12 +22627,11 @@ def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at self.id = id self.meta = meta self.name = name - self.o_auth_connection_id = o_auth_connection_id self.skillset_id = skillset_id self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'IntegrationMCPServerListResponseItem': + def from_dict(obj: Any) -> 'SkillServerIntegrationListResponseItem': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) @@ -24168,10 +22640,9 @@ def from_dict(obj: Any) -> 'IntegrationMCPServerListResponseItem': id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - o_auth_connection_id = from_union([from_str, from_none], obj.get("oAuthConnectionId")) skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) updated_at = from_float(obj.get("updatedAt")) - return IntegrationMCPServerListResponseItem(alias, blueprint_id, created_at, description, id, meta, name, o_auth_connection_id, skillset_id, updated_at) + return SkillServerIntegrationListResponseItem(alias, blueprint_id, created_at, description, id, meta, name, skillset_id, updated_at) def to_dict(self) -> dict: result: dict = {} @@ -24187,39 +22658,37 @@ def to_dict(self) -> dict: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.o_auth_connection_id is not None: - result["oAuthConnectionId"] = from_union([from_str, from_none], self.o_auth_connection_id) if self.skillset_id is not None: result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) result["updatedAt"] = to_float(self.updated_at) return result -class IntegrationMCPServerListResponse: +class SkillServerIntegrationListResponse: cursor: str """Cursor for fetching the next page""" - items: List[IntegrationMCPServerListResponseItem] + items: List[SkillServerIntegrationListResponseItem] - def __init__(self, cursor: str, items: List[IntegrationMCPServerListResponseItem]) -> None: + def __init__(self, cursor: str, items: List[SkillServerIntegrationListResponseItem]) -> None: self.cursor = cursor self.items = items @staticmethod - def from_dict(obj: Any) -> 'IntegrationMCPServerListResponse': + def from_dict(obj: Any) -> 'SkillServerIntegrationListResponse': assert isinstance(obj, dict) cursor = from_str(obj.get("cursor")) - items = from_list(IntegrationMCPServerListResponseItem.from_dict, obj.get("items")) - return IntegrationMCPServerListResponse(cursor, items) + items = from_list(SkillServerIntegrationListResponseItem.from_dict, obj.get("items")) + return SkillServerIntegrationListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(IntegrationMCPServerListResponseItem, x), self.items) + result["items"] = from_list(lambda x: to_class(SkillServerIntegrationListResponseItem, x), self.items) return result -class IntegrationMCPServerListStreamItemData: +class SkillServerIntegrationListStreamItemData: """Blueprint properties""" alias: Optional[str] @@ -24243,16 +22712,13 @@ class IntegrationMCPServerListStreamItemData: name: Optional[str] """The associated name""" - o_auth_connection_id: Optional[str] - """The ID of the OAuth connection for IdP-based authentication""" - skillset_id: Optional[str] """The ID of the skillset""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], o_auth_connection_id: Optional[str], skillset_id: Optional[str], updated_at: float) -> None: + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], skillset_id: Optional[str], updated_at: float) -> None: self.alias = alias self.blueprint_id = blueprint_id self.created_at = created_at @@ -24260,12 +22726,11 @@ def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at self.id = id self.meta = meta self.name = name - self.o_auth_connection_id = o_auth_connection_id self.skillset_id = skillset_id self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'IntegrationMCPServerListStreamItemData': + def from_dict(obj: Any) -> 'SkillServerIntegrationListStreamItemData': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) @@ -24274,10 +22739,9 @@ def from_dict(obj: Any) -> 'IntegrationMCPServerListStreamItemData': id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - o_auth_connection_id = from_union([from_str, from_none], obj.get("oAuthConnectionId")) skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) updated_at = from_float(obj.get("updatedAt")) - return IntegrationMCPServerListStreamItemData(alias, blueprint_id, created_at, description, id, meta, name, o_auth_connection_id, skillset_id, updated_at) + return SkillServerIntegrationListStreamItemData(alias, blueprint_id, created_at, description, id, meta, name, skillset_id, updated_at) def to_dict(self) -> dict: result: dict = {} @@ -24293,243 +22757,112 @@ def to_dict(self) -> dict: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.o_auth_connection_id is not None: - result["oAuthConnectionId"] = from_union([from_str, from_none], self.o_auth_connection_id) if self.skillset_id is not None: result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) result["updatedAt"] = to_float(self.updated_at) return result -class IntegrationMCPServerListStreamItemType(Enum): +class SkillServerIntegrationListStreamItemType(Enum): """The type of event""" ITEM = "item" -class IntegrationMCPServerListStreamItem: - data: IntegrationMCPServerListStreamItemData +class SkillServerIntegrationListStreamItem: + data: SkillServerIntegrationListStreamItemData """Blueprint properties""" - type: IntegrationMCPServerListStreamItemType + type: SkillServerIntegrationListStreamItemType """The type of event""" - def __init__(self, data: IntegrationMCPServerListStreamItemData, type: IntegrationMCPServerListStreamItemType) -> None: + def __init__(self, data: SkillServerIntegrationListStreamItemData, type: SkillServerIntegrationListStreamItemType) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'IntegrationMCPServerListStreamItem': - assert isinstance(obj, dict) - data = IntegrationMCPServerListStreamItemData.from_dict(obj.get("data")) - type = IntegrationMCPServerListStreamItemType(obj.get("type")) - return IntegrationMCPServerListStreamItem(data, type) - - def to_dict(self) -> dict: - result: dict = {} - result["data"] = to_class(IntegrationMCPServerListStreamItemData, self.data) - result["type"] = to_enum(IntegrationMCPServerListStreamItemType, self.type) - return result - - -class IntegrationMessengerDeleteParams: - messenger_integration_id: str - """The ID of the Messenger integration""" - - def __init__(self, messenger_integration_id: str) -> None: - self.messenger_integration_id = messenger_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationMessengerDeleteParams': - assert isinstance(obj, dict) - messenger_integration_id = from_str(obj.get("messengerIntegrationId")) - return IntegrationMessengerDeleteParams(messenger_integration_id) - - def to_dict(self) -> dict: - result: dict = {} - result["messengerIntegrationId"] = from_str(self.messenger_integration_id) - return result - - -class IntegrationMessengerDeleteResponse: - id: str - """The ID of the deleted Messenger integration""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationMessengerDeleteResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return IntegrationMessengerDeleteResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - - -class IntegrationMessengerFetchParams: - messenger_integration_id: str - """The ID of the Messenger integration to retrieve""" - - def __init__(self, messenger_integration_id: str) -> None: - self.messenger_integration_id = messenger_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationMessengerFetchParams': + def from_dict(obj: Any) -> 'SkillServerIntegrationListStreamItem': assert isinstance(obj, dict) - messenger_integration_id = from_str(obj.get("messengerIntegrationId")) - return IntegrationMessengerFetchParams(messenger_integration_id) + data = SkillServerIntegrationListStreamItemData.from_dict(obj.get("data")) + type = SkillServerIntegrationListStreamItemType(obj.get("type")) + return SkillServerIntegrationListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["messengerIntegrationId"] = from_str(self.messenger_integration_id) + result["data"] = to_class(SkillServerIntegrationListStreamItemData, self.data) + result["type"] = to_enum(SkillServerIntegrationListStreamItemType, self.type) return result -class IntegrationMessengerFetchResponse: +class SkillServerIntegrationCreateRequest: """Blueprint properties""" - access_token: Optional[str] - """The Messenger integration access token (returned as '********' if configured, null - otherwise) - """ alias: Optional[str] """The unique alias for the instance""" - attachments: Optional[bool] - """Whether the bot supports attachments""" - blueprint_id: Optional[str] """The ID of the blueprint""" - bot_id: Optional[str] - """The ID of the bot this configuration is using""" - - contact_collection: Optional[bool] - """Whether to collect contacts""" - - created_at: float - """The timestamp (ms) when the instance was created""" - description: Optional[str] """The associated description""" - id: str - """The instance ID""" - meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - session_duration: Optional[float] - """The session duration (in milliseconds)""" - - updated_at: float - """The timestamp (ms) when the instance was updated""" - - verify_token: str - """The Messenger integration verify token""" + skillset_id: Optional[str] + """The ID of the skillset""" - def __init__(self, access_token: Optional[str], alias: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float, verify_token: str) -> None: - self.access_token = access_token + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], skillset_id: Optional[str]) -> None: self.alias = alias - self.attachments = attachments self.blueprint_id = blueprint_id - self.bot_id = bot_id - self.contact_collection = contact_collection - self.created_at = created_at self.description = description - self.id = id self.meta = meta self.name = name - self.session_duration = session_duration - self.updated_at = updated_at - self.verify_token = verify_token + self.skillset_id = skillset_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationMessengerFetchResponse': + def from_dict(obj: Any) -> 'SkillServerIntegrationCreateRequest': assert isinstance(obj, dict) - access_token = from_union([from_str, from_none], obj.get("accessToken")) alias = from_union([from_str, from_none], obj.get("alias")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) - created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - updated_at = from_float(obj.get("updatedAt")) - verify_token = from_str(obj.get("verifyToken")) - return IntegrationMessengerFetchResponse(access_token, alias, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at, verify_token) + skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + return SkillServerIntegrationCreateRequest(alias, blueprint_id, description, meta, name, skillset_id) def to_dict(self) -> dict: result: dict = {} - if self.access_token is not None: - result["accessToken"] = from_union([from_str, from_none], self.access_token) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) - result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - result["updatedAt"] = to_float(self.updated_at) - result["verifyToken"] = from_str(self.verify_token) - return result - - -class IntegrationMessengerSetupParams: - messenger_integration_id: str - """The ID of the Messenger integration""" - - def __init__(self, messenger_integration_id: str) -> None: - self.messenger_integration_id = messenger_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationMessengerSetupParams': - assert isinstance(obj, dict) - messenger_integration_id = from_str(obj.get("messengerIntegrationId")) - return IntegrationMessengerSetupParams(messenger_integration_id) - - def to_dict(self) -> dict: - result: dict = {} - result["messengerIntegrationId"] = from_str(self.messenger_integration_id) + if self.skillset_id is not None: + result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) return result -class IntegrationMessengerSetupResponse: +class SkillServerIntegrationCreateResponse: id: str - """The ID of the Messenger Integration""" + """The ID of the SkillServer Integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationMessengerSetupResponse': + def from_dict(obj: Any) -> 'SkillServerIntegrationCreateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationMessengerSetupResponse(id) + return SkillServerIntegrationCreateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -24537,46 +22870,34 @@ def to_dict(self) -> dict: return result -class IntegrationMessengerUpdateParams: - messenger_integration_id: str - """The ID of the Messenger integration""" +class SkillServerIntegrationUpdateParams: + skillserver_integration_id: str + """The ID of the SkillServer integration""" - def __init__(self, messenger_integration_id: str) -> None: - self.messenger_integration_id = messenger_integration_id + def __init__(self, skillserver_integration_id: str) -> None: + self.skillserver_integration_id = skillserver_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationMessengerUpdateParams': + def from_dict(obj: Any) -> 'SkillServerIntegrationUpdateParams': assert isinstance(obj, dict) - messenger_integration_id = from_str(obj.get("messengerIntegrationId")) - return IntegrationMessengerUpdateParams(messenger_integration_id) + skillserver_integration_id = from_str(obj.get("skillserverIntegrationId")) + return SkillServerIntegrationUpdateParams(skillserver_integration_id) def to_dict(self) -> dict: result: dict = {} - result["messengerIntegrationId"] = from_str(self.messenger_integration_id) + result["skillserverIntegrationId"] = from_str(self.skillserver_integration_id) return result -class IntegrationMessengerUpdateRequest: - """A bot configuration that can be applied without a dedicated bot instance.""" - - access_token: Optional[str] - """The Messenger integration access token""" +class SkillServerIntegrationUpdateRequest: + """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" - attachments: Optional[bool] - """Whether the bot supports attachments""" - blueprint_id: Optional[str] """The ID of the blueprint""" - bot_id: Optional[str] - """The ID of the bot this configuration is using""" - - contact_collection: Optional[bool] - """Whether to collect contacts""" - description: Optional[str] """The associated description""" @@ -24586,73 +22907,57 @@ class IntegrationMessengerUpdateRequest: name: Optional[str] """The associated name""" - session_duration: Optional[float] - """The session duration (in milliseconds)""" + skillset_id: Optional[str] + """The ID of the skillset""" - def __init__(self, access_token: Optional[str], alias: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float]) -> None: - self.access_token = access_token + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], skillset_id: Optional[str]) -> None: self.alias = alias - self.attachments = attachments self.blueprint_id = blueprint_id - self.bot_id = bot_id - self.contact_collection = contact_collection self.description = description self.meta = meta self.name = name - self.session_duration = session_duration + self.skillset_id = skillset_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationMessengerUpdateRequest': + def from_dict(obj: Any) -> 'SkillServerIntegrationUpdateRequest': assert isinstance(obj, dict) - access_token = from_union([from_str, from_none], obj.get("accessToken")) alias = from_union([from_str, from_none], obj.get("alias")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) description = from_union([from_str, from_none], obj.get("description")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - return IntegrationMessengerUpdateRequest(access_token, alias, attachments, blueprint_id, bot_id, contact_collection, description, meta, name, session_duration) + skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + return SkillServerIntegrationUpdateRequest(alias, blueprint_id, description, meta, name, skillset_id) def to_dict(self) -> dict: result: dict = {} - if self.access_token is not None: - result["accessToken"] = from_union([from_str, from_none], self.access_token) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.skillset_id is not None: + result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) return result -class IntegrationMessengerUpdateResponse: +class SkillServerIntegrationUpdateResponse: id: str - """The ID of the Messenger Integration""" + """The ID of the SkillServer Integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationMessengerUpdateResponse': + def from_dict(obj: Any) -> 'SkillServerIntegrationUpdateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationMessengerUpdateResponse(id) + return SkillServerIntegrationUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -24660,180 +22965,142 @@ def to_dict(self) -> dict: return result -class IntegrationMessengerCreateRequest: - """A bot configuration that can be applied without a dedicated bot instance.""" +class SkillServerManualFetchParams: + skillserver_integration_id: str + """The ID of the SkillServer integration""" - access_token: Optional[str] - """The Messenger integration access token""" + def __init__(self, skillserver_integration_id: str) -> None: + self.skillserver_integration_id = skillserver_integration_id - alias: Optional[str] - """The unique alias for the instance""" + @staticmethod + def from_dict(obj: Any) -> 'SkillServerManualFetchParams': + assert isinstance(obj, dict) + skillserver_integration_id = from_str(obj.get("skillserverIntegrationId")) + return SkillServerManualFetchParams(skillserver_integration_id) - attachments: Optional[bool] - """Whether the bot supports attachments""" + def to_dict(self) -> dict: + result: dict = {} + result["skillserverIntegrationId"] = from_str(self.skillserver_integration_id) + return result - blueprint_id: Optional[str] - """The ID of the blueprint""" - bot_id: Optional[str] - """The ID of the bot this configuration is using""" +class Format(Enum): + """Set to "json" to receive a JSON response""" - contact_collection: Optional[bool] - """Whether to collect contacts""" + JSON = "json" - description: Optional[str] - """The associated description""" - meta: Optional[Dict[str, Any]] - """Meta data information""" +class SkillServerAbilityInvokeParams: + format: Optional[Format] + """Set to "json" to receive a JSON response""" - name: Optional[str] - """The associated name""" + session: Optional[str] + """Optional session id to group tool state across calls""" - session_duration: Optional[float] - """The session duration (in milliseconds)""" + skillserver_integration_id: str + """The ID of the SkillServer integration""" - def __init__(self, access_token: Optional[str], alias: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float]) -> None: - self.access_token = access_token - self.alias = alias - self.attachments = attachments - self.blueprint_id = blueprint_id - self.bot_id = bot_id - self.contact_collection = contact_collection - self.description = description - self.meta = meta - self.name = name - self.session_duration = session_duration + def __init__(self, format: Optional[Format], session: Optional[str], skillserver_integration_id: str) -> None: + self.format = format + self.session = session + self.skillserver_integration_id = skillserver_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationMessengerCreateRequest': + def from_dict(obj: Any) -> 'SkillServerAbilityInvokeParams': assert isinstance(obj, dict) - access_token = from_union([from_str, from_none], obj.get("accessToken")) - alias = from_union([from_str, from_none], obj.get("alias")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) - description = from_union([from_str, from_none], obj.get("description")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - return IntegrationMessengerCreateRequest(access_token, alias, attachments, blueprint_id, bot_id, contact_collection, description, meta, name, session_duration) + format = from_union([Format, from_none], obj.get("format")) + session = from_union([from_str, from_none], obj.get("session")) + skillserver_integration_id = from_str(obj.get("skillserverIntegrationId")) + return SkillServerAbilityInvokeParams(format, session, skillserver_integration_id) def to_dict(self) -> dict: result: dict = {} - if self.access_token is not None: - result["accessToken"] = from_union([from_str, from_none], self.access_token) - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.format is not None: + result["format"] = from_union([lambda x: to_enum(Format, x), from_none], self.format) + if self.session is not None: + result["session"] = from_union([from_str, from_none], self.session) + result["skillserverIntegrationId"] = from_str(self.skillserver_integration_id) return result -class IntegrationMessengerCreateResponse: - id: str - """The ID of the Messenger Integration""" +class SkillServerAbilityInvokeRequest: + ability: str + """The name of the ability to invoke (as listed in the manual)""" - def __init__(self, id: str) -> None: - self.id = id + input: Optional[Dict[str, Any]] + """The ability input""" + + def __init__(self, ability: str, input: Optional[Dict[str, Any]]) -> None: + self.ability = ability + self.input = input @staticmethod - def from_dict(obj: Any) -> 'IntegrationMessengerCreateResponse': + def from_dict(obj: Any) -> 'SkillServerAbilityInvokeRequest': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return IntegrationMessengerCreateResponse(id) + ability = from_str(obj.get("ability")) + input = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("input")) + return SkillServerAbilityInvokeRequest(ability, input) + + def to_dict(self) -> dict: + result: dict = {} + result["ability"] = from_str(self.ability) + if self.input is not None: + result["input"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.input) + return result + + +class SkillServerAbilityInvokeResponse: + error: Optional[str] + result: Any + + def __init__(self, error: Optional[str], result: Any) -> None: + self.error = error + self.result = result + + @staticmethod + def from_dict(obj: Any) -> 'SkillServerAbilityInvokeResponse': + assert isinstance(obj, dict) + error = from_union([from_str, from_none], obj.get("error")) + result = obj.get("result") + return SkillServerAbilityInvokeResponse(error, result) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + if self.error is not None: + result["error"] = from_union([from_str, from_none], self.error) + if self.result is not None: + result["result"] = self.result return result -class IntegrationMessengerListParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" - - -class IntegrationMessengerListParams: - cursor: Optional[str] - """The cursor to use for pagination""" - - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" - - order: Optional[IntegrationMessengerListParamsOrder] - """The order of the paginated items""" - - take: Optional[int] - """The number of items to retrieve""" +class SkillServerIntegrationFetchParams: + skillserver_integration_id: str + """The ID of the SkillServer integration to retrieve""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationMessengerListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take + def __init__(self, skillserver_integration_id: str) -> None: + self.skillserver_integration_id = skillserver_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationMessengerListParams': + def from_dict(obj: Any) -> 'SkillServerIntegrationFetchParams': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([IntegrationMessengerListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return IntegrationMessengerListParams(cursor, meta, order, take) + skillserver_integration_id = from_str(obj.get("skillserverIntegrationId")) + return SkillServerIntegrationFetchParams(skillserver_integration_id) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(IntegrationMessengerListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["skillserverIntegrationId"] = from_str(self.skillserver_integration_id) return result -class IntegrationMessengerListResponseItem: +class SkillServerIntegrationFetchResponse: """Blueprint properties""" - access_token: Optional[str] - """The Messenger integration access token (returned as '********' if configured, null - otherwise) - """ alias: Optional[str] """The unique alias for the instance""" - attachments: Optional[bool] - """Whether the bot supports attachments""" - blueprint_id: Optional[str] """The ID of the blueprint""" - bot_id: Optional[str] - """The ID of the bot this configuration is using""" - - contact_collection: Optional[bool] - """Whether to collect contacts""" - created_at: float """The timestamp (ms) when the instance was created""" @@ -24849,64 +23116,43 @@ class IntegrationMessengerListResponseItem: name: Optional[str] """The associated name""" - session_duration: Optional[float] - """The session duration (in milliseconds)""" + skillset_id: Optional[str] + """The ID of the skillset""" updated_at: float """The timestamp (ms) when the instance was updated""" - verify_token: str - """The Messenger integration verify token""" - - def __init__(self, access_token: Optional[str], alias: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float, verify_token: str) -> None: - self.access_token = access_token + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], skillset_id: Optional[str], updated_at: float) -> None: self.alias = alias - self.attachments = attachments self.blueprint_id = blueprint_id - self.bot_id = bot_id - self.contact_collection = contact_collection self.created_at = created_at self.description = description self.id = id self.meta = meta self.name = name - self.session_duration = session_duration + self.skillset_id = skillset_id self.updated_at = updated_at - self.verify_token = verify_token @staticmethod - def from_dict(obj: Any) -> 'IntegrationMessengerListResponseItem': + def from_dict(obj: Any) -> 'SkillServerIntegrationFetchResponse': assert isinstance(obj, dict) - access_token = from_union([from_str, from_none], obj.get("accessToken")) alias = from_union([from_str, from_none], obj.get("alias")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) updated_at = from_float(obj.get("updatedAt")) - verify_token = from_str(obj.get("verifyToken")) - return IntegrationMessengerListResponseItem(access_token, alias, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at, verify_token) + return SkillServerIntegrationFetchResponse(alias, blueprint_id, created_at, description, id, meta, name, skillset_id, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.access_token is not None: - result["accessToken"] = from_union([from_str, from_none], self.access_token) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) @@ -24915,421 +23161,452 @@ def to_dict(self) -> dict: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.skillset_id is not None: + result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) result["updatedAt"] = to_float(self.updated_at) - result["verifyToken"] = from_str(self.verify_token) return result -class IntegrationMessengerListResponse: - cursor: str - """Cursor for fetching the next page""" +class SkillServerIntegrationDeleteParams: + skillserver_integration_id: str + """The ID of the SkillServer integration""" - items: List[IntegrationMessengerListResponseItem] + def __init__(self, skillserver_integration_id: str) -> None: + self.skillserver_integration_id = skillserver_integration_id - def __init__(self, cursor: str, items: List[IntegrationMessengerListResponseItem]) -> None: + @staticmethod + def from_dict(obj: Any) -> 'SkillServerIntegrationDeleteParams': + assert isinstance(obj, dict) + skillserver_integration_id = from_str(obj.get("skillserverIntegrationId")) + return SkillServerIntegrationDeleteParams(skillserver_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["skillserverIntegrationId"] = from_str(self.skillserver_integration_id) + return result + + +class SkillServerIntegrationDeleteResponse: + id: str + """The ID of the deleted SkillServer integration""" + + def __init__(self, id: str) -> None: + self.id = id + + @staticmethod + def from_dict(obj: Any) -> 'SkillServerIntegrationDeleteResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return SkillServerIntegrationDeleteResponse(id) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result + + +class IntegrationSitemapListParamsOrder(Enum): + """The order of the paginated items""" + + ASC = "asc" + DESC = "desc" + + +class IntegrationSitemapListParams: + cursor: Optional[str] + """The cursor to use for pagination""" + + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" + + order: Optional[IntegrationSitemapListParamsOrder] + """The order of the paginated items""" + + take: Optional[int] + """The number of items to retrieve""" + + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationSitemapListParamsOrder], take: Optional[int]) -> None: self.cursor = cursor - self.items = items + self.meta = meta + self.order = order + self.take = take @staticmethod - def from_dict(obj: Any) -> 'IntegrationMessengerListResponse': + def from_dict(obj: Any) -> 'IntegrationSitemapListParams': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(IntegrationMessengerListResponseItem.from_dict, obj.get("items")) - return IntegrationMessengerListResponse(cursor, items) + cursor = from_union([from_str, from_none], obj.get("cursor")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([IntegrationSitemapListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return IntegrationSitemapListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(IntegrationMessengerListResponseItem, x), self.items) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(IntegrationSitemapListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class IntegrationMessengerListStreamItemData: +class PurpleSyncStatus(Enum): + """The sync status of an integration""" + + ERROR = "error" + PENDING = "pending" + SYNCED = "synced" + + +class IntegrationSitemapListResponseItem: """Blueprint properties""" - access_token: Optional[str] - """The Messenger integration access token (returned as '********' if configured, null - otherwise) - """ alias: Optional[str] """The unique alias for the instance""" - attachments: Optional[bool] - """Whether the bot supports attachments""" - blueprint_id: Optional[str] """The ID of the blueprint""" - bot_id: Optional[str] - """The ID of the bot this configuration is using""" - - contact_collection: Optional[bool] - """Whether to collect contacts""" - created_at: float """The timestamp (ms) when the instance was created""" + dataset_id: str + """The ID of the dataset used in the Sitemap integration""" + description: Optional[str] """The associated description""" + expires_in: Optional[float] + """Record expiry in milliseconds""" + + glob: Optional[str] + """The glob rules to use for this Sitemap integration""" + id: str """The instance ID""" + javascript: Optional[bool] + """Indicates if the Sitemap integration should use JavaScript during the spidering process""" + + last_synced_at: Optional[datetime] + """The timestamp of the last successful sync""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - session_duration: Optional[float] - """The session duration (in milliseconds)""" + selectors: Optional[str] + """The selector rules to use for this Sitemap integration""" + + sync_schedule: Optional[str] + """The sync schedule to use for this Sitemap integration""" + + sync_status: Optional[PurpleSyncStatus] + """The sync status of an integration""" updated_at: float """The timestamp (ms) when the instance was updated""" - verify_token: str - """The Messenger integration verify token""" + url: Optional[str] + """The URL to use for this Sitemap integration""" - def __init__(self, access_token: Optional[str], alias: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float, verify_token: str) -> None: - self.access_token = access_token + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, dataset_id: str, description: Optional[str], expires_in: Optional[float], glob: Optional[str], id: str, javascript: Optional[bool], last_synced_at: Optional[datetime], meta: Optional[Dict[str, Any]], name: Optional[str], selectors: Optional[str], sync_schedule: Optional[str], sync_status: Optional[PurpleSyncStatus], updated_at: float, url: Optional[str]) -> None: self.alias = alias - self.attachments = attachments self.blueprint_id = blueprint_id - self.bot_id = bot_id - self.contact_collection = contact_collection self.created_at = created_at + self.dataset_id = dataset_id self.description = description + self.expires_in = expires_in + self.glob = glob self.id = id + self.javascript = javascript + self.last_synced_at = last_synced_at self.meta = meta self.name = name - self.session_duration = session_duration + self.selectors = selectors + self.sync_schedule = sync_schedule + self.sync_status = sync_status self.updated_at = updated_at - self.verify_token = verify_token + self.url = url @staticmethod - def from_dict(obj: Any) -> 'IntegrationMessengerListStreamItemData': + def from_dict(obj: Any) -> 'IntegrationSitemapListResponseItem': assert isinstance(obj, dict) - access_token = from_union([from_str, from_none], obj.get("accessToken")) alias = from_union([from_str, from_none], obj.get("alias")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) created_at = from_float(obj.get("createdAt")) + dataset_id = from_str(obj.get("datasetId")) description = from_union([from_str, from_none], obj.get("description")) + expires_in = from_union([from_float, from_none], obj.get("expiresIn")) + glob = from_union([from_str, from_none], obj.get("glob")) id = from_str(obj.get("id")) + javascript = from_union([from_bool, from_none], obj.get("javascript")) + last_synced_at = from_union([from_datetime, from_none], obj.get("lastSyncedAt")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + selectors = from_union([from_str, from_none], obj.get("selectors")) + sync_schedule = from_union([from_str, from_none], obj.get("syncSchedule")) + sync_status = from_union([PurpleSyncStatus, from_none], obj.get("syncStatus")) updated_at = from_float(obj.get("updatedAt")) - verify_token = from_str(obj.get("verifyToken")) - return IntegrationMessengerListStreamItemData(access_token, alias, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at, verify_token) + url = from_union([from_str, from_none], obj.get("url")) + return IntegrationSitemapListResponseItem(alias, blueprint_id, created_at, dataset_id, description, expires_in, glob, id, javascript, last_synced_at, meta, name, selectors, sync_schedule, sync_status, updated_at, url) def to_dict(self) -> dict: result: dict = {} - if self.access_token is not None: - result["accessToken"] = from_union([from_str, from_none], self.access_token) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) result["createdAt"] = to_float(self.created_at) + result["datasetId"] = from_str(self.dataset_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.expires_in is not None: + result["expiresIn"] = from_union([to_float, from_none], self.expires_in) + if self.glob is not None: + result["glob"] = from_union([from_str, from_none], self.glob) result["id"] = from_str(self.id) + if self.javascript is not None: + result["javascript"] = from_union([from_bool, from_none], self.javascript) + if self.last_synced_at is not None: + result["lastSyncedAt"] = from_union([lambda x: x.isoformat(), from_none], self.last_synced_at) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.selectors is not None: + result["selectors"] = from_union([from_str, from_none], self.selectors) + if self.sync_schedule is not None: + result["syncSchedule"] = from_union([from_str, from_none], self.sync_schedule) + if self.sync_status is not None: + result["syncStatus"] = from_union([lambda x: to_enum(PurpleSyncStatus, x), from_none], self.sync_status) result["updatedAt"] = to_float(self.updated_at) - result["verifyToken"] = from_str(self.verify_token) - return result - - -class IntegrationMessengerListStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - - -class IntegrationMessengerListStreamItem: - data: IntegrationMessengerListStreamItemData - """Blueprint properties""" - - type: IntegrationMessengerListStreamItemType - """The type of event""" - - def __init__(self, data: IntegrationMessengerListStreamItemData, type: IntegrationMessengerListStreamItemType) -> None: - self.data = data - self.type = type - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationMessengerListStreamItem': - assert isinstance(obj, dict) - data = IntegrationMessengerListStreamItemData.from_dict(obj.get("data")) - type = IntegrationMessengerListStreamItemType(obj.get("type")) - return IntegrationMessengerListStreamItem(data, type) - - def to_dict(self) -> dict: - result: dict = {} - result["data"] = to_class(IntegrationMessengerListStreamItemData, self.data) - result["type"] = to_enum(IntegrationMessengerListStreamItemType, self.type) + if self.url is not None: + result["url"] = from_union([from_str, from_none], self.url) return result -class MicrosoftteamsIntegrationDeleteParams: - microsoftteams_integration_id: str - """The ID of the Microsoft Teams integration""" - - def __init__(self, microsoftteams_integration_id: str) -> None: - self.microsoftteams_integration_id = microsoftteams_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationDeleteParams': - assert isinstance(obj, dict) - microsoftteams_integration_id = from_str(obj.get("microsoftteamsIntegrationId")) - return MicrosoftteamsIntegrationDeleteParams(microsoftteams_integration_id) - - def to_dict(self) -> dict: - result: dict = {} - result["microsoftteamsIntegrationId"] = from_str(self.microsoftteams_integration_id) - return result - +class IntegrationSitemapListResponse: + cursor: str + """Cursor for fetching the next page""" -class MicrosoftteamsIntegrationDeleteResponse: - id: str - """The ID of the deleted Microsoft Teams integration""" + items: List[IntegrationSitemapListResponseItem] - def __init__(self, id: str) -> None: - self.id = id + def __init__(self, cursor: str, items: List[IntegrationSitemapListResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationDeleteResponse': + def from_dict(obj: Any) -> 'IntegrationSitemapListResponse': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return MicrosoftteamsIntegrationDeleteResponse(id) + cursor = from_str(obj.get("cursor")) + items = from_list(IntegrationSitemapListResponseItem.from_dict, obj.get("items")) + return IntegrationSitemapListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(IntegrationSitemapListResponseItem, x), self.items) return result -class MicrosoftteamsIntegrationFetchParams: - microsoftteams_integration_id: str - """The ID of the Microsoft Teams integration to retrieve""" - - def __init__(self, microsoftteams_integration_id: str) -> None: - self.microsoftteams_integration_id = microsoftteams_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationFetchParams': - assert isinstance(obj, dict) - microsoftteams_integration_id = from_str(obj.get("microsoftteamsIntegrationId")) - return MicrosoftteamsIntegrationFetchParams(microsoftteams_integration_id) +class FluffySyncStatus(Enum): + """The sync status of an integration""" - def to_dict(self) -> dict: - result: dict = {} - result["microsoftteamsIntegrationId"] = from_str(self.microsoftteams_integration_id) - return result + ERROR = "error" + PENDING = "pending" + SYNCED = "synced" -class MicrosoftteamsIntegrationFetchResponse: +class IntegrationSitemapListStreamItemData: """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" - allow_from: Optional[str] - """The allowed senders for this integration""" - blueprint_id: Optional[str] """The ID of the blueprint""" - bot_framework_app_id: Optional[str] - """The Microsoft Bot Framework Application ID""" - - bot_id: Optional[str] - """The ID of the bot this configuration is using""" - - contact_collection: Optional[bool] - """Weather to collect contacts""" - created_at: float """The timestamp (ms) when the instance was created""" + dataset_id: str + """The ID of the dataset used in the Sitemap integration""" + description: Optional[str] """The associated description""" + expires_in: Optional[float] + """Record expiry in milliseconds""" + + glob: Optional[str] + """The glob rules to use for this Sitemap integration""" + id: str """The instance ID""" + javascript: Optional[bool] + """Indicates if the Sitemap integration should use JavaScript during the spidering process""" + + last_synced_at: Optional[datetime] + """The timestamp of the last successful sync""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - session_duration: Optional[float] - """The chat session duration""" + selectors: Optional[str] + """The selector rules to use for this Sitemap integration""" + + sync_schedule: Optional[str] + """The sync schedule to use for this Sitemap integration""" + + sync_status: Optional[FluffySyncStatus] + """The sync status of an integration""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], blueprint_id: Optional[str], bot_framework_app_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float) -> None: + url: Optional[str] + """The URL to use for this Sitemap integration""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, dataset_id: str, description: Optional[str], expires_in: Optional[float], glob: Optional[str], id: str, javascript: Optional[bool], last_synced_at: Optional[datetime], meta: Optional[Dict[str, Any]], name: Optional[str], selectors: Optional[str], sync_schedule: Optional[str], sync_status: Optional[FluffySyncStatus], updated_at: float, url: Optional[str]) -> None: self.alias = alias - self.allow_from = allow_from self.blueprint_id = blueprint_id - self.bot_framework_app_id = bot_framework_app_id - self.bot_id = bot_id - self.contact_collection = contact_collection self.created_at = created_at + self.dataset_id = dataset_id self.description = description + self.expires_in = expires_in + self.glob = glob self.id = id + self.javascript = javascript + self.last_synced_at = last_synced_at self.meta = meta self.name = name - self.session_duration = session_duration + self.selectors = selectors + self.sync_schedule = sync_schedule + self.sync_status = sync_status self.updated_at = updated_at + self.url = url @staticmethod - def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationFetchResponse': + def from_dict(obj: Any) -> 'IntegrationSitemapListStreamItemData': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) - allow_from = from_union([from_str, from_none], obj.get("allowFrom")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_framework_app_id = from_union([from_str, from_none], obj.get("botFrameworkAppId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) created_at = from_float(obj.get("createdAt")) + dataset_id = from_str(obj.get("datasetId")) description = from_union([from_str, from_none], obj.get("description")) + expires_in = from_union([from_float, from_none], obj.get("expiresIn")) + glob = from_union([from_str, from_none], obj.get("glob")) id = from_str(obj.get("id")) + javascript = from_union([from_bool, from_none], obj.get("javascript")) + last_synced_at = from_union([from_datetime, from_none], obj.get("lastSyncedAt")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + selectors = from_union([from_str, from_none], obj.get("selectors")) + sync_schedule = from_union([from_str, from_none], obj.get("syncSchedule")) + sync_status = from_union([FluffySyncStatus, from_none], obj.get("syncStatus")) updated_at = from_float(obj.get("updatedAt")) - return MicrosoftteamsIntegrationFetchResponse(alias, allow_from, blueprint_id, bot_framework_app_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at) + url = from_union([from_str, from_none], obj.get("url")) + return IntegrationSitemapListStreamItemData(alias, blueprint_id, created_at, dataset_id, description, expires_in, glob, id, javascript, last_synced_at, meta, name, selectors, sync_schedule, sync_status, updated_at, url) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.allow_from is not None: - result["allowFrom"] = from_union([from_str, from_none], self.allow_from) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_framework_app_id is not None: - result["botFrameworkAppId"] = from_union([from_str, from_none], self.bot_framework_app_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) result["createdAt"] = to_float(self.created_at) + result["datasetId"] = from_str(self.dataset_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.expires_in is not None: + result["expiresIn"] = from_union([to_float, from_none], self.expires_in) + if self.glob is not None: + result["glob"] = from_union([from_str, from_none], self.glob) result["id"] = from_str(self.id) + if self.javascript is not None: + result["javascript"] = from_union([from_bool, from_none], self.javascript) + if self.last_synced_at is not None: + result["lastSyncedAt"] = from_union([lambda x: x.isoformat(), from_none], self.last_synced_at) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - result["updatedAt"] = to_float(self.updated_at) - return result - - -class MicrosoftteamsIntegrationSetupParams: - microsoftteams_integration_id: str - """The ID of the Microsoft Teams integration""" - - def __init__(self, microsoftteams_integration_id: str) -> None: - self.microsoftteams_integration_id = microsoftteams_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationSetupParams': - assert isinstance(obj, dict) - microsoftteams_integration_id = from_str(obj.get("microsoftteamsIntegrationId")) - return MicrosoftteamsIntegrationSetupParams(microsoftteams_integration_id) - - def to_dict(self) -> dict: - result: dict = {} - result["microsoftteamsIntegrationId"] = from_str(self.microsoftteams_integration_id) + result["name"] = from_union([from_str, from_none], self.name) + if self.selectors is not None: + result["selectors"] = from_union([from_str, from_none], self.selectors) + if self.sync_schedule is not None: + result["syncSchedule"] = from_union([from_str, from_none], self.sync_schedule) + if self.sync_status is not None: + result["syncStatus"] = from_union([lambda x: to_enum(FluffySyncStatus, x), from_none], self.sync_status) + result["updatedAt"] = to_float(self.updated_at) + if self.url is not None: + result["url"] = from_union([from_str, from_none], self.url) return result -class MicrosoftteamsIntegrationSetupResponse: - id: str - """The ID of the Microsoft Teams integration that was set up""" - - def __init__(self, id: str) -> None: - self.id = id +class IntegrationSitemapListStreamItemType(Enum): + """The type of event""" - @staticmethod - def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationSetupResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return MicrosoftteamsIntegrationSetupResponse(id) + ITEM = "item" - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result +class IntegrationSitemapListStreamItem: + data: IntegrationSitemapListStreamItemData + """Blueprint properties""" -class MicrosoftteamsIntegrationUpdateParams: - microsoftteams_integration_id: str - """The ID of the Microsoft Teams integration""" + type: IntegrationSitemapListStreamItemType + """The type of event""" - def __init__(self, microsoftteams_integration_id: str) -> None: - self.microsoftteams_integration_id = microsoftteams_integration_id + def __init__(self, data: IntegrationSitemapListStreamItemData, type: IntegrationSitemapListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationUpdateParams': + def from_dict(obj: Any) -> 'IntegrationSitemapListStreamItem': assert isinstance(obj, dict) - microsoftteams_integration_id = from_str(obj.get("microsoftteamsIntegrationId")) - return MicrosoftteamsIntegrationUpdateParams(microsoftteams_integration_id) + data = IntegrationSitemapListStreamItemData.from_dict(obj.get("data")) + type = IntegrationSitemapListStreamItemType(obj.get("type")) + return IntegrationSitemapListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["microsoftteamsIntegrationId"] = from_str(self.microsoftteams_integration_id) + result["data"] = to_class(IntegrationSitemapListStreamItemData, self.data) + result["type"] = to_enum(IntegrationSitemapListStreamItemType, self.type) return result -class MicrosoftteamsIntegrationUpdateRequest: - """A bot configuration that can be applied without a dedicated bot instance.""" +class IntegrationSitemapCreateRequest: + """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" - allow_from: Optional[str] - """The allowed senders for this integration""" - blueprint_id: Optional[str] """The ID of the blueprint""" - bot_framework_app_id: Optional[str] - """The Microsoft Bot Framework Application ID""" + dataset_id: Optional[str] + """The ID of the dataset to use for this Sitemap integration""" - bot_framework_app_secret: Optional[str] - """The Microsoft Bot Framework Application Secret""" + description: Optional[str] + """The associated description""" - bot_id: Optional[str] - """The ID of the bot this configuration is using""" + expires_in: Optional[float] + """Record expiry in milliseconds""" - contact_collection: Optional[bool] - """Weather to collect contacts""" + glob: Optional[str] + """The glob rules to use for this Sitemap integration""" - description: Optional[str] - """The associated description""" + javascript: Optional[bool] + """Indicates if the Sitemap integration should use JavaScript during the spidering process""" meta: Optional[Dict[str, Any]] """Meta data information""" @@ -25337,84 +23614,87 @@ class MicrosoftteamsIntegrationUpdateRequest: name: Optional[str] """The associated name""" - session_duration: Optional[float] - """The chat session duration""" + selectors: Optional[str] + """The selector rules to use for this Sitemap integration""" - tenant_id: Optional[str] - """The Microsoft Entra tenant ID""" + sync_schedule: Optional[str] + """The sync schedule to use for this Sitemap integration""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], blueprint_id: Optional[str], bot_framework_app_id: Optional[str], bot_framework_app_secret: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], tenant_id: Optional[str]) -> None: + url: Optional[str] + """The URL to use for this Sitemap integration""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], dataset_id: Optional[str], description: Optional[str], expires_in: Optional[float], glob: Optional[str], javascript: Optional[bool], meta: Optional[Dict[str, Any]], name: Optional[str], selectors: Optional[str], sync_schedule: Optional[str], url: Optional[str]) -> None: self.alias = alias - self.allow_from = allow_from self.blueprint_id = blueprint_id - self.bot_framework_app_id = bot_framework_app_id - self.bot_framework_app_secret = bot_framework_app_secret - self.bot_id = bot_id - self.contact_collection = contact_collection + self.dataset_id = dataset_id self.description = description + self.expires_in = expires_in + self.glob = glob + self.javascript = javascript self.meta = meta self.name = name - self.session_duration = session_duration - self.tenant_id = tenant_id + self.selectors = selectors + self.sync_schedule = sync_schedule + self.url = url @staticmethod - def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationUpdateRequest': + def from_dict(obj: Any) -> 'IntegrationSitemapCreateRequest': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) - allow_from = from_union([from_str, from_none], obj.get("allowFrom")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_framework_app_id = from_union([from_str, from_none], obj.get("botFrameworkAppId")) - bot_framework_app_secret = from_union([from_str, from_none], obj.get("botFrameworkAppSecret")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + dataset_id = from_union([from_str, from_none], obj.get("datasetId")) description = from_union([from_str, from_none], obj.get("description")) + expires_in = from_union([from_float, from_none], obj.get("expiresIn")) + glob = from_union([from_str, from_none], obj.get("glob")) + javascript = from_union([from_bool, from_none], obj.get("javascript")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - tenant_id = from_union([from_str, from_none], obj.get("tenantId")) - return MicrosoftteamsIntegrationUpdateRequest(alias, allow_from, blueprint_id, bot_framework_app_id, bot_framework_app_secret, bot_id, contact_collection, description, meta, name, session_duration, tenant_id) + selectors = from_union([from_str, from_none], obj.get("selectors")) + sync_schedule = from_union([from_str, from_none], obj.get("syncSchedule")) + url = from_union([from_str, from_none], obj.get("url")) + return IntegrationSitemapCreateRequest(alias, blueprint_id, dataset_id, description, expires_in, glob, javascript, meta, name, selectors, sync_schedule, url) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.allow_from is not None: - result["allowFrom"] = from_union([from_str, from_none], self.allow_from) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_framework_app_id is not None: - result["botFrameworkAppId"] = from_union([from_str, from_none], self.bot_framework_app_id) - if self.bot_framework_app_secret is not None: - result["botFrameworkAppSecret"] = from_union([from_str, from_none], self.bot_framework_app_secret) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + if self.dataset_id is not None: + result["datasetId"] = from_union([from_str, from_none], self.dataset_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.expires_in is not None: + result["expiresIn"] = from_union([to_float, from_none], self.expires_in) + if self.glob is not None: + result["glob"] = from_union([from_str, from_none], self.glob) + if self.javascript is not None: + result["javascript"] = from_union([from_bool, from_none], self.javascript) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - if self.tenant_id is not None: - result["tenantId"] = from_union([from_str, from_none], self.tenant_id) + if self.selectors is not None: + result["selectors"] = from_union([from_str, from_none], self.selectors) + if self.sync_schedule is not None: + result["syncSchedule"] = from_union([from_str, from_none], self.sync_schedule) + if self.url is not None: + result["url"] = from_union([from_str, from_none], self.url) return result -class MicrosoftteamsIntegrationUpdateResponse: +class IntegrationSitemapCreateResponse: id: str - """The ID of the Microsoft Teams integration""" + """The ID of the Sitemap Integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationUpdateResponse': + def from_dict(obj: Any) -> 'IntegrationSitemapCreateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return MicrosoftteamsIntegrationUpdateResponse(id) + return IntegrationSitemapCreateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -25422,32 +23702,48 @@ def to_dict(self) -> dict: return result -class MicrosoftteamsIntegrationCreateRequest: - """A bot configuration that can be applied without a dedicated bot instance.""" +class IntegrationSitemapUpdateParams: + sitemap_integration_id: str + """The ID of the Sitemap integration""" + + def __init__(self, sitemap_integration_id: str) -> None: + self.sitemap_integration_id = sitemap_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationSitemapUpdateParams': + assert isinstance(obj, dict) + sitemap_integration_id = from_str(obj.get("sitemapIntegrationId")) + return IntegrationSitemapUpdateParams(sitemap_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["sitemapIntegrationId"] = from_str(self.sitemap_integration_id) + return result + + +class IntegrationSitemapUpdateRequest: + """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" - allow_from: Optional[str] - """The allowed senders for this integration""" - blueprint_id: Optional[str] """The ID of the blueprint""" - bot_framework_app_id: Optional[str] - """The Microsoft Bot Framework Application ID""" + dataset_id: Optional[str] + """The ID of the dataset to use for this Sitemap integration""" - bot_framework_app_secret: Optional[str] - """The Microsoft Bot Framework Application Secret""" + description: Optional[str] + """The associated description""" - bot_id: Optional[str] - """The ID of the bot this configuration is using""" + expires_in: Optional[float] + """Record expiry in milliseconds""" - contact_collection: Optional[bool] - """Weather to collect contacts""" + glob: Optional[str] + """The glob rules to use for this Sitemap integration""" - description: Optional[str] - """The associated description""" + javascript: Optional[bool] + """Indicates if the Sitemap integration should use JavaScript during the spidering process""" meta: Optional[Dict[str, Any]] """Meta data information""" @@ -25455,84 +23751,87 @@ class MicrosoftteamsIntegrationCreateRequest: name: Optional[str] """The associated name""" - session_duration: Optional[float] - """The chat session duration""" + selectors: Optional[str] + """The selector rules to use for this Sitemap integration""" - tenant_id: Optional[str] - """The Microsoft Entra tenant ID""" + sync_schedule: Optional[str] + """The sync schedule to use for this Sitemap integration""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], blueprint_id: Optional[str], bot_framework_app_id: Optional[str], bot_framework_app_secret: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], tenant_id: Optional[str]) -> None: + url: Optional[str] + """The URL to use for this Sitemap integration""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], dataset_id: Optional[str], description: Optional[str], expires_in: Optional[float], glob: Optional[str], javascript: Optional[bool], meta: Optional[Dict[str, Any]], name: Optional[str], selectors: Optional[str], sync_schedule: Optional[str], url: Optional[str]) -> None: self.alias = alias - self.allow_from = allow_from self.blueprint_id = blueprint_id - self.bot_framework_app_id = bot_framework_app_id - self.bot_framework_app_secret = bot_framework_app_secret - self.bot_id = bot_id - self.contact_collection = contact_collection + self.dataset_id = dataset_id self.description = description + self.expires_in = expires_in + self.glob = glob + self.javascript = javascript self.meta = meta self.name = name - self.session_duration = session_duration - self.tenant_id = tenant_id + self.selectors = selectors + self.sync_schedule = sync_schedule + self.url = url @staticmethod - def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationCreateRequest': + def from_dict(obj: Any) -> 'IntegrationSitemapUpdateRequest': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) - allow_from = from_union([from_str, from_none], obj.get("allowFrom")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_framework_app_id = from_union([from_str, from_none], obj.get("botFrameworkAppId")) - bot_framework_app_secret = from_union([from_str, from_none], obj.get("botFrameworkAppSecret")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + dataset_id = from_union([from_str, from_none], obj.get("datasetId")) description = from_union([from_str, from_none], obj.get("description")) + expires_in = from_union([from_float, from_none], obj.get("expiresIn")) + glob = from_union([from_str, from_none], obj.get("glob")) + javascript = from_union([from_bool, from_none], obj.get("javascript")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - tenant_id = from_union([from_str, from_none], obj.get("tenantId")) - return MicrosoftteamsIntegrationCreateRequest(alias, allow_from, blueprint_id, bot_framework_app_id, bot_framework_app_secret, bot_id, contact_collection, description, meta, name, session_duration, tenant_id) + selectors = from_union([from_str, from_none], obj.get("selectors")) + sync_schedule = from_union([from_str, from_none], obj.get("syncSchedule")) + url = from_union([from_str, from_none], obj.get("url")) + return IntegrationSitemapUpdateRequest(alias, blueprint_id, dataset_id, description, expires_in, glob, javascript, meta, name, selectors, sync_schedule, url) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.allow_from is not None: - result["allowFrom"] = from_union([from_str, from_none], self.allow_from) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_framework_app_id is not None: - result["botFrameworkAppId"] = from_union([from_str, from_none], self.bot_framework_app_id) - if self.bot_framework_app_secret is not None: - result["botFrameworkAppSecret"] = from_union([from_str, from_none], self.bot_framework_app_secret) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + if self.dataset_id is not None: + result["datasetId"] = from_union([from_str, from_none], self.dataset_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.expires_in is not None: + result["expiresIn"] = from_union([to_float, from_none], self.expires_in) + if self.glob is not None: + result["glob"] = from_union([from_str, from_none], self.glob) + if self.javascript is not None: + result["javascript"] = from_union([from_bool, from_none], self.javascript) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - if self.tenant_id is not None: - result["tenantId"] = from_union([from_str, from_none], self.tenant_id) + if self.selectors is not None: + result["selectors"] = from_union([from_str, from_none], self.selectors) + if self.sync_schedule is not None: + result["syncSchedule"] = from_union([from_str, from_none], self.sync_schedule) + if self.url is not None: + result["url"] = from_union([from_str, from_none], self.url) return result -class MicrosoftteamsIntegrationCreateResponse: +class IntegrationSitemapUpdateResponse: id: str - """The ID of the Microsoft Teams integration""" + """The ID of the Sitemap Integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationCreateResponse': + def from_dict(obj: Any) -> 'IntegrationSitemapUpdateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return MicrosoftteamsIntegrationCreateResponse(id) + return IntegrationSitemapUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -25540,373 +23839,429 @@ def to_dict(self) -> dict: return result -class MicrosoftteamsIntegrationListParamsOrder(Enum): - """The order of the paginated items""" +class IntegrationSitemapSyncParams: + sitemap_integration_id: str + """The ID of the Sitemap integration""" - ASC = "asc" - DESC = "desc" + def __init__(self, sitemap_integration_id: str) -> None: + self.sitemap_integration_id = sitemap_integration_id + @staticmethod + def from_dict(obj: Any) -> 'IntegrationSitemapSyncParams': + assert isinstance(obj, dict) + sitemap_integration_id = from_str(obj.get("sitemapIntegrationId")) + return IntegrationSitemapSyncParams(sitemap_integration_id) -class MicrosoftteamsIntegrationListParams: - cursor: Optional[str] - """The cursor to use for pagination""" + def to_dict(self) -> dict: + result: dict = {} + result["sitemapIntegrationId"] = from_str(self.sitemap_integration_id) + return result - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" - order: Optional[MicrosoftteamsIntegrationListParamsOrder] - """The order of the paginated items""" +class IntegrationSitemapSyncResponse: + id: str + """The ID of the Sitemap Integration""" - take: Optional[int] - """The number of items to retrieve""" + def __init__(self, id: str) -> None: + self.id = id - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[MicrosoftteamsIntegrationListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take + @staticmethod + def from_dict(obj: Any) -> 'IntegrationSitemapSyncResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return IntegrationSitemapSyncResponse(id) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result + + +class IntegrationSitemapFetchParams: + sitemap_integration_id: str + """The ID of the Sitemap integration to retrieve""" + + def __init__(self, sitemap_integration_id: str) -> None: + self.sitemap_integration_id = sitemap_integration_id @staticmethod - def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationListParams': + def from_dict(obj: Any) -> 'IntegrationSitemapFetchParams': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([MicrosoftteamsIntegrationListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return MicrosoftteamsIntegrationListParams(cursor, meta, order, take) + sitemap_integration_id = from_str(obj.get("sitemapIntegrationId")) + return IntegrationSitemapFetchParams(sitemap_integration_id) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(MicrosoftteamsIntegrationListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["sitemapIntegrationId"] = from_str(self.sitemap_integration_id) return result -class MicrosoftteamsIntegrationListResponseItem: +class IntegrationSitemapFetchResponseSyncStatus(Enum): + """The sync status of an integration""" + + ERROR = "error" + PENDING = "pending" + SYNCED = "synced" + + +class IntegrationSitemapFetchResponse: """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" - allow_from: Optional[str] - """The allowed senders for this integration""" - blueprint_id: Optional[str] """The ID of the blueprint""" - bot_framework_app_id: Optional[str] - """The Microsoft Bot Framework Application ID""" - - bot_id: Optional[str] - """The ID of the bot this configuration is using""" - - contact_collection: Optional[bool] - """Weather to collect contacts""" - created_at: float """The timestamp (ms) when the instance was created""" + dataset_id: str + """The ID of the dataset used in the Sitemap integration""" + description: Optional[str] """The associated description""" + expires_in: Optional[float] + """Record expiry in milliseconds""" + + glob: Optional[str] + """The glob rules to use for this Sitemap integration""" + id: str """The instance ID""" + javascript: Optional[bool] + """Indicates if the Sitemap integration should use JavaScript during the spidering process""" + + last_synced_at: Optional[datetime] + """The timestamp of the last successful sync""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - session_duration: Optional[float] - """The chat session duration""" + selectors: Optional[str] + """The selector rules to use for this Sitemap integration""" + + sync_schedule: Optional[str] + """The sync schedule to use for this Sitemap integration""" + + sync_status: Optional[IntegrationSitemapFetchResponseSyncStatus] + """The sync status of an integration""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], blueprint_id: Optional[str], bot_framework_app_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float) -> None: + url: Optional[str] + """The URL to use for this Sitemap integration""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, dataset_id: str, description: Optional[str], expires_in: Optional[float], glob: Optional[str], id: str, javascript: Optional[bool], last_synced_at: Optional[datetime], meta: Optional[Dict[str, Any]], name: Optional[str], selectors: Optional[str], sync_schedule: Optional[str], sync_status: Optional[IntegrationSitemapFetchResponseSyncStatus], updated_at: float, url: Optional[str]) -> None: self.alias = alias - self.allow_from = allow_from self.blueprint_id = blueprint_id - self.bot_framework_app_id = bot_framework_app_id - self.bot_id = bot_id - self.contact_collection = contact_collection self.created_at = created_at + self.dataset_id = dataset_id self.description = description + self.expires_in = expires_in + self.glob = glob self.id = id + self.javascript = javascript + self.last_synced_at = last_synced_at self.meta = meta self.name = name - self.session_duration = session_duration + self.selectors = selectors + self.sync_schedule = sync_schedule + self.sync_status = sync_status self.updated_at = updated_at + self.url = url @staticmethod - def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationListResponseItem': + def from_dict(obj: Any) -> 'IntegrationSitemapFetchResponse': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) - allow_from = from_union([from_str, from_none], obj.get("allowFrom")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_framework_app_id = from_union([from_str, from_none], obj.get("botFrameworkAppId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) created_at = from_float(obj.get("createdAt")) + dataset_id = from_str(obj.get("datasetId")) description = from_union([from_str, from_none], obj.get("description")) + expires_in = from_union([from_float, from_none], obj.get("expiresIn")) + glob = from_union([from_str, from_none], obj.get("glob")) id = from_str(obj.get("id")) + javascript = from_union([from_bool, from_none], obj.get("javascript")) + last_synced_at = from_union([from_datetime, from_none], obj.get("lastSyncedAt")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + selectors = from_union([from_str, from_none], obj.get("selectors")) + sync_schedule = from_union([from_str, from_none], obj.get("syncSchedule")) + sync_status = from_union([IntegrationSitemapFetchResponseSyncStatus, from_none], obj.get("syncStatus")) updated_at = from_float(obj.get("updatedAt")) - return MicrosoftteamsIntegrationListResponseItem(alias, allow_from, blueprint_id, bot_framework_app_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at) + url = from_union([from_str, from_none], obj.get("url")) + return IntegrationSitemapFetchResponse(alias, blueprint_id, created_at, dataset_id, description, expires_in, glob, id, javascript, last_synced_at, meta, name, selectors, sync_schedule, sync_status, updated_at, url) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.allow_from is not None: - result["allowFrom"] = from_union([from_str, from_none], self.allow_from) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_framework_app_id is not None: - result["botFrameworkAppId"] = from_union([from_str, from_none], self.bot_framework_app_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) result["createdAt"] = to_float(self.created_at) + result["datasetId"] = from_str(self.dataset_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.expires_in is not None: + result["expiresIn"] = from_union([to_float, from_none], self.expires_in) + if self.glob is not None: + result["glob"] = from_union([from_str, from_none], self.glob) result["id"] = from_str(self.id) + if self.javascript is not None: + result["javascript"] = from_union([from_bool, from_none], self.javascript) + if self.last_synced_at is not None: + result["lastSyncedAt"] = from_union([lambda x: x.isoformat(), from_none], self.last_synced_at) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.selectors is not None: + result["selectors"] = from_union([from_str, from_none], self.selectors) + if self.sync_schedule is not None: + result["syncSchedule"] = from_union([from_str, from_none], self.sync_schedule) + if self.sync_status is not None: + result["syncStatus"] = from_union([lambda x: to_enum(IntegrationSitemapFetchResponseSyncStatus, x), from_none], self.sync_status) result["updatedAt"] = to_float(self.updated_at) + if self.url is not None: + result["url"] = from_union([from_str, from_none], self.url) + return result + + +class IntegrationSitemapDeleteParams: + sitemap_integration_id: str + """The ID of the Sitemap integration""" + + def __init__(self, sitemap_integration_id: str) -> None: + self.sitemap_integration_id = sitemap_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationSitemapDeleteParams': + assert isinstance(obj, dict) + sitemap_integration_id = from_str(obj.get("sitemapIntegrationId")) + return IntegrationSitemapDeleteParams(sitemap_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["sitemapIntegrationId"] = from_str(self.sitemap_integration_id) + return result + + +class IntegrationSitemapDeleteResponse: + id: str + """The ID of the deleted Sitemap integration""" + + def __init__(self, id: str) -> None: + self.id = id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationSitemapDeleteResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return IntegrationSitemapDeleteResponse(id) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) return result -class MicrosoftteamsIntegrationListResponse: - cursor: str - """Cursor for fetching the next page""" +class IntegrationNotionListParamsOrder(Enum): + """The order of the paginated items""" + + ASC = "asc" + DESC = "desc" + + +class IntegrationNotionListParams: + cursor: Optional[str] + """The cursor to use for pagination""" - items: List[MicrosoftteamsIntegrationListResponseItem] + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" - def __init__(self, cursor: str, items: List[MicrosoftteamsIntegrationListResponseItem]) -> None: + order: Optional[IntegrationNotionListParamsOrder] + """The order of the paginated items""" + + take: Optional[int] + """The number of items to retrieve""" + + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationNotionListParamsOrder], take: Optional[int]) -> None: self.cursor = cursor - self.items = items + self.meta = meta + self.order = order + self.take = take @staticmethod - def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationListResponse': + def from_dict(obj: Any) -> 'IntegrationNotionListParams': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(MicrosoftteamsIntegrationListResponseItem.from_dict, obj.get("items")) - return MicrosoftteamsIntegrationListResponse(cursor, items) + cursor = from_union([from_str, from_none], obj.get("cursor")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([IntegrationNotionListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return IntegrationNotionListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(MicrosoftteamsIntegrationListResponseItem, x), self.items) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(IntegrationNotionListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class MicrosoftteamsIntegrationListStreamItemData: +class TentacledSyncStatus(Enum): + """The sync status of an integration""" + + ERROR = "error" + PENDING = "pending" + SYNCED = "synced" + + +class IntegrationNotionListResponseItem: """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" - allow_from: Optional[str] - """The allowed senders for this integration""" - blueprint_id: Optional[str] """The ID of the blueprint""" - bot_framework_app_id: Optional[str] - """The Microsoft Bot Framework Application ID""" - - bot_id: Optional[str] - """The ID of the bot this configuration is using""" - - contact_collection: Optional[bool] - """Weather to collect contacts""" - created_at: float """The timestamp (ms) when the instance was created""" + dataset_id: str + """The ID of the dataset to sync into""" + description: Optional[str] """The associated description""" + expires_in: Optional[float] + """The time in milliseconds until records expire""" + id: str """The instance ID""" + last_synced_at: Optional[datetime] + """The timestamp of the last successful sync""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - session_duration: Optional[float] - """The chat session duration""" + sync_schedule: Optional[str] + """The sync schedule""" + + sync_status: Optional[TentacledSyncStatus] + """The sync status of an integration""" + + token: Optional[str] + """The Notion API token (returned as '********' if configured, null otherwise)""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], blueprint_id: Optional[str], bot_framework_app_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float) -> None: + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, dataset_id: str, description: Optional[str], expires_in: Optional[float], id: str, last_synced_at: Optional[datetime], meta: Optional[Dict[str, Any]], name: Optional[str], sync_schedule: Optional[str], sync_status: Optional[TentacledSyncStatus], token: Optional[str], updated_at: float) -> None: self.alias = alias - self.allow_from = allow_from self.blueprint_id = blueprint_id - self.bot_framework_app_id = bot_framework_app_id - self.bot_id = bot_id - self.contact_collection = contact_collection self.created_at = created_at + self.dataset_id = dataset_id self.description = description + self.expires_in = expires_in self.id = id + self.last_synced_at = last_synced_at self.meta = meta self.name = name - self.session_duration = session_duration + self.sync_schedule = sync_schedule + self.sync_status = sync_status + self.token = token self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationListStreamItemData': + def from_dict(obj: Any) -> 'IntegrationNotionListResponseItem': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) - allow_from = from_union([from_str, from_none], obj.get("allowFrom")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_framework_app_id = from_union([from_str, from_none], obj.get("botFrameworkAppId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) created_at = from_float(obj.get("createdAt")) + dataset_id = from_str(obj.get("datasetId")) description = from_union([from_str, from_none], obj.get("description")) + expires_in = from_union([from_float, from_none], obj.get("expiresIn")) id = from_str(obj.get("id")) + last_synced_at = from_union([from_datetime, from_none], obj.get("lastSyncedAt")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + sync_schedule = from_union([from_str, from_none], obj.get("syncSchedule")) + sync_status = from_union([TentacledSyncStatus, from_none], obj.get("syncStatus")) + token = from_union([from_str, from_none], obj.get("token")) updated_at = from_float(obj.get("updatedAt")) - return MicrosoftteamsIntegrationListStreamItemData(alias, allow_from, blueprint_id, bot_framework_app_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at) + return IntegrationNotionListResponseItem(alias, blueprint_id, created_at, dataset_id, description, expires_in, id, last_synced_at, meta, name, sync_schedule, sync_status, token, updated_at) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.allow_from is not None: - result["allowFrom"] = from_union([from_str, from_none], self.allow_from) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_framework_app_id is not None: - result["botFrameworkAppId"] = from_union([from_str, from_none], self.bot_framework_app_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) result["createdAt"] = to_float(self.created_at) + result["datasetId"] = from_str(self.dataset_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.expires_in is not None: + result["expiresIn"] = from_union([to_float, from_none], self.expires_in) result["id"] = from_str(self.id) + if self.last_synced_at is not None: + result["lastSyncedAt"] = from_union([lambda x: x.isoformat(), from_none], self.last_synced_at) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.sync_schedule is not None: + result["syncSchedule"] = from_union([from_str, from_none], self.sync_schedule) + if self.sync_status is not None: + result["syncStatus"] = from_union([lambda x: to_enum(TentacledSyncStatus, x), from_none], self.sync_status) + if self.token is not None: + result["token"] = from_union([from_str, from_none], self.token) result["updatedAt"] = to_float(self.updated_at) return result -class MicrosoftteamsIntegrationListStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - - -class MicrosoftteamsIntegrationListStreamItem: - data: MicrosoftteamsIntegrationListStreamItemData - """Blueprint properties""" - - type: MicrosoftteamsIntegrationListStreamItemType - """The type of event""" - - def __init__(self, data: MicrosoftteamsIntegrationListStreamItemData, type: MicrosoftteamsIntegrationListStreamItemType) -> None: - self.data = data - self.type = type - - @staticmethod - def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationListStreamItem': - assert isinstance(obj, dict) - data = MicrosoftteamsIntegrationListStreamItemData.from_dict(obj.get("data")) - type = MicrosoftteamsIntegrationListStreamItemType(obj.get("type")) - return MicrosoftteamsIntegrationListStreamItem(data, type) - - def to_dict(self) -> dict: - result: dict = {} - result["data"] = to_class(MicrosoftteamsIntegrationListStreamItemData, self.data) - result["type"] = to_enum(MicrosoftteamsIntegrationListStreamItemType, self.type) - return result - - -class IntegrationNotionDeleteParams: - notion_integration_id: str - """The ID of the Notion integration""" - - def __init__(self, notion_integration_id: str) -> None: - self.notion_integration_id = notion_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationNotionDeleteParams': - assert isinstance(obj, dict) - notion_integration_id = from_str(obj.get("notionIntegrationId")) - return IntegrationNotionDeleteParams(notion_integration_id) - - def to_dict(self) -> dict: - result: dict = {} - result["notionIntegrationId"] = from_str(self.notion_integration_id) - return result - - -class IntegrationNotionDeleteResponse: - id: str - """The ID of the deleted Notion integration""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationNotionDeleteResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return IntegrationNotionDeleteResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - +class IntegrationNotionListResponse: + cursor: str + """Cursor for fetching the next page""" -class IntegrationNotionFetchParams: - notion_integration_id: str - """The ID of the Notion integration to retrieve""" + items: List[IntegrationNotionListResponseItem] - def __init__(self, notion_integration_id: str) -> None: - self.notion_integration_id = notion_integration_id + def __init__(self, cursor: str, items: List[IntegrationNotionListResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'IntegrationNotionFetchParams': + def from_dict(obj: Any) -> 'IntegrationNotionListResponse': assert isinstance(obj, dict) - notion_integration_id = from_str(obj.get("notionIntegrationId")) - return IntegrationNotionFetchParams(notion_integration_id) + cursor = from_str(obj.get("cursor")) + items = from_list(IntegrationNotionListResponseItem.from_dict, obj.get("items")) + return IntegrationNotionListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["notionIntegrationId"] = from_str(self.notion_integration_id) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(IntegrationNotionListResponseItem, x), self.items) return result -class IntegrationNotionFetchResponseSyncStatus(Enum): +class StickySyncStatus(Enum): """The sync status of an integration""" ERROR = "error" @@ -25914,7 +24269,7 @@ class IntegrationNotionFetchResponseSyncStatus(Enum): SYNCED = "synced" -class IntegrationNotionFetchResponse: +class IntegrationNotionListStreamItemData: """Blueprint properties""" alias: Optional[str] @@ -25950,7 +24305,7 @@ class IntegrationNotionFetchResponse: sync_schedule: Optional[str] """The sync schedule""" - sync_status: Optional[IntegrationNotionFetchResponseSyncStatus] + sync_status: Optional[StickySyncStatus] """The sync status of an integration""" token: Optional[str] @@ -25959,7 +24314,7 @@ class IntegrationNotionFetchResponse: updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, dataset_id: str, description: Optional[str], expires_in: Optional[float], id: str, last_synced_at: Optional[datetime], meta: Optional[Dict[str, Any]], name: Optional[str], sync_schedule: Optional[str], sync_status: Optional[IntegrationNotionFetchResponseSyncStatus], token: Optional[str], updated_at: float) -> None: + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, dataset_id: str, description: Optional[str], expires_in: Optional[float], id: str, last_synced_at: Optional[datetime], meta: Optional[Dict[str, Any]], name: Optional[str], sync_schedule: Optional[str], sync_status: Optional[StickySyncStatus], token: Optional[str], updated_at: float) -> None: self.alias = alias self.blueprint_id = blueprint_id self.created_at = created_at @@ -25976,7 +24331,7 @@ def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'IntegrationNotionFetchResponse': + def from_dict(obj: Any) -> 'IntegrationNotionListStreamItemData': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) @@ -25989,10 +24344,10 @@ def from_dict(obj: Any) -> 'IntegrationNotionFetchResponse': meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) sync_schedule = from_union([from_str, from_none], obj.get("syncSchedule")) - sync_status = from_union([IntegrationNotionFetchResponseSyncStatus, from_none], obj.get("syncStatus")) + sync_status = from_union([StickySyncStatus, from_none], obj.get("syncStatus")) token = from_union([from_str, from_none], obj.get("token")) updated_at = from_float(obj.get("updatedAt")) - return IntegrationNotionFetchResponse(alias, blueprint_id, created_at, dataset_id, description, expires_in, id, last_synced_at, meta, name, sync_schedule, sync_status, token, updated_at) + return IntegrationNotionListStreamItemData(alias, blueprint_id, created_at, dataset_id, description, expires_in, id, last_synced_at, meta, name, sync_schedule, sync_status, token, updated_at) def to_dict(self) -> dict: result: dict = {} @@ -26016,71 +24371,45 @@ def to_dict(self) -> dict: if self.sync_schedule is not None: result["syncSchedule"] = from_union([from_str, from_none], self.sync_schedule) if self.sync_status is not None: - result["syncStatus"] = from_union([lambda x: to_enum(IntegrationNotionFetchResponseSyncStatus, x), from_none], self.sync_status) + result["syncStatus"] = from_union([lambda x: to_enum(StickySyncStatus, x), from_none], self.sync_status) if self.token is not None: result["token"] = from_union([from_str, from_none], self.token) result["updatedAt"] = to_float(self.updated_at) return result -class IntegrationNotionSyncParams: - notion_integration_id: str - """The ID of the Notion integration""" - - def __init__(self, notion_integration_id: str) -> None: - self.notion_integration_id = notion_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationNotionSyncParams': - assert isinstance(obj, dict) - notion_integration_id = from_str(obj.get("notionIntegrationId")) - return IntegrationNotionSyncParams(notion_integration_id) - - def to_dict(self) -> dict: - result: dict = {} - result["notionIntegrationId"] = from_str(self.notion_integration_id) - return result - - -class IntegrationNotionSyncResponse: - id: str - """The ID of the synced Notion integration""" - - def __init__(self, id: str) -> None: - self.id = id +class IntegrationNotionListStreamItemType(Enum): + """The type of event""" - @staticmethod - def from_dict(obj: Any) -> 'IntegrationNotionSyncResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return IntegrationNotionSyncResponse(id) + ITEM = "item" - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result +class IntegrationNotionListStreamItem: + data: IntegrationNotionListStreamItemData + """Blueprint properties""" -class IntegrationNotionUpdateParams: - notion_integration_id: str - """The ID of the Notion integration""" + type: IntegrationNotionListStreamItemType + """The type of event""" - def __init__(self, notion_integration_id: str) -> None: - self.notion_integration_id = notion_integration_id + def __init__(self, data: IntegrationNotionListStreamItemData, type: IntegrationNotionListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'IntegrationNotionUpdateParams': + def from_dict(obj: Any) -> 'IntegrationNotionListStreamItem': assert isinstance(obj, dict) - notion_integration_id = from_str(obj.get("notionIntegrationId")) - return IntegrationNotionUpdateParams(notion_integration_id) + data = IntegrationNotionListStreamItemData.from_dict(obj.get("data")) + type = IntegrationNotionListStreamItemType(obj.get("type")) + return IntegrationNotionListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["notionIntegrationId"] = from_str(self.notion_integration_id) + result["data"] = to_class(IntegrationNotionListStreamItemData, self.data) + result["type"] = to_enum(IntegrationNotionListStreamItemType, self.type) return result -class IntegrationNotionUpdateRequest: +class IntegrationNotionCreateRequest: """Blueprint properties""" alias: Optional[str] @@ -26122,7 +24451,7 @@ def __init__(self, alias: Optional[str], blueprint_id: Optional[str], dataset_id self.token = token @staticmethod - def from_dict(obj: Any) -> 'IntegrationNotionUpdateRequest': + def from_dict(obj: Any) -> 'IntegrationNotionCreateRequest': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) @@ -26133,7 +24462,7 @@ def from_dict(obj: Any) -> 'IntegrationNotionUpdateRequest': name = from_union([from_str, from_none], obj.get("name")) sync_schedule = from_union([from_str, from_none], obj.get("syncSchedule")) token = from_union([from_str, from_none], obj.get("token")) - return IntegrationNotionUpdateRequest(alias, blueprint_id, dataset_id, description, expires_in, meta, name, sync_schedule, token) + return IntegrationNotionCreateRequest(alias, blueprint_id, dataset_id, description, expires_in, meta, name, sync_schedule, token) def to_dict(self) -> dict: result: dict = {} @@ -26158,7 +24487,7 @@ def to_dict(self) -> dict: return result -class IntegrationNotionUpdateResponse: +class IntegrationNotionCreateResponse: id: str """The ID of the Notion Integration""" @@ -26166,10 +24495,10 @@ def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationNotionUpdateResponse': + def from_dict(obj: Any) -> 'IntegrationNotionCreateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationNotionUpdateResponse(id) + return IntegrationNotionCreateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -26177,7 +24506,26 @@ def to_dict(self) -> dict: return result -class IntegrationNotionCreateRequest: +class IntegrationNotionUpdateParams: + notion_integration_id: str + """The ID of the Notion integration""" + + def __init__(self, notion_integration_id: str) -> None: + self.notion_integration_id = notion_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationNotionUpdateParams': + assert isinstance(obj, dict) + notion_integration_id = from_str(obj.get("notionIntegrationId")) + return IntegrationNotionUpdateParams(notion_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["notionIntegrationId"] = from_str(self.notion_integration_id) + return result + + +class IntegrationNotionUpdateRequest: """Blueprint properties""" alias: Optional[str] @@ -26219,7 +24567,7 @@ def __init__(self, alias: Optional[str], blueprint_id: Optional[str], dataset_id self.token = token @staticmethod - def from_dict(obj: Any) -> 'IntegrationNotionCreateRequest': + def from_dict(obj: Any) -> 'IntegrationNotionUpdateRequest': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) @@ -26230,7 +24578,7 @@ def from_dict(obj: Any) -> 'IntegrationNotionCreateRequest': name = from_union([from_str, from_none], obj.get("name")) sync_schedule = from_union([from_str, from_none], obj.get("syncSchedule")) token = from_union([from_str, from_none], obj.get("token")) - return IntegrationNotionCreateRequest(alias, blueprint_id, dataset_id, description, expires_in, meta, name, sync_schedule, token) + return IntegrationNotionUpdateRequest(alias, blueprint_id, dataset_id, description, expires_in, meta, name, sync_schedule, token) def to_dict(self) -> dict: result: dict = {} @@ -26255,7 +24603,7 @@ def to_dict(self) -> dict: return result -class IntegrationNotionCreateResponse: +class IntegrationNotionUpdateResponse: id: str """The ID of the Notion Integration""" @@ -26263,10 +24611,10 @@ def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationNotionCreateResponse': + def from_dict(obj: Any) -> 'IntegrationNotionUpdateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationNotionCreateResponse(id) + return IntegrationNotionUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -26274,55 +24622,64 @@ def to_dict(self) -> dict: return result -class IntegrationNotionListParamsOrder(Enum): - """The order of the paginated items""" +class IntegrationNotionSyncParams: + notion_integration_id: str + """The ID of the Notion integration""" - ASC = "asc" - DESC = "desc" + def __init__(self, notion_integration_id: str) -> None: + self.notion_integration_id = notion_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationNotionSyncParams': + assert isinstance(obj, dict) + notion_integration_id = from_str(obj.get("notionIntegrationId")) + return IntegrationNotionSyncParams(notion_integration_id) + def to_dict(self) -> dict: + result: dict = {} + result["notionIntegrationId"] = from_str(self.notion_integration_id) + return result -class IntegrationNotionListParams: - cursor: Optional[str] - """The cursor to use for pagination""" - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" +class IntegrationNotionSyncResponse: + id: str + """The ID of the synced Notion integration""" - order: Optional[IntegrationNotionListParamsOrder] - """The order of the paginated items""" + def __init__(self, id: str) -> None: + self.id = id - take: Optional[int] - """The number of items to retrieve""" + @staticmethod + def from_dict(obj: Any) -> 'IntegrationNotionSyncResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return IntegrationNotionSyncResponse(id) - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationNotionListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result + + +class IntegrationNotionFetchParams: + notion_integration_id: str + """The ID of the Notion integration to retrieve""" + + def __init__(self, notion_integration_id: str) -> None: + self.notion_integration_id = notion_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationNotionListParams': + def from_dict(obj: Any) -> 'IntegrationNotionFetchParams': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([IntegrationNotionListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return IntegrationNotionListParams(cursor, meta, order, take) + notion_integration_id = from_str(obj.get("notionIntegrationId")) + return IntegrationNotionFetchParams(notion_integration_id) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(IntegrationNotionListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["notionIntegrationId"] = from_str(self.notion_integration_id) return result -class PurpleSyncStatus(Enum): +class IntegrationNotionFetchResponseSyncStatus(Enum): """The sync status of an integration""" ERROR = "error" @@ -26330,7 +24687,7 @@ class PurpleSyncStatus(Enum): SYNCED = "synced" -class IntegrationNotionListResponseItem: +class IntegrationNotionFetchResponse: """Blueprint properties""" alias: Optional[str] @@ -26366,7 +24723,7 @@ class IntegrationNotionListResponseItem: sync_schedule: Optional[str] """The sync schedule""" - sync_status: Optional[PurpleSyncStatus] + sync_status: Optional[IntegrationNotionFetchResponseSyncStatus] """The sync status of an integration""" token: Optional[str] @@ -26375,7 +24732,7 @@ class IntegrationNotionListResponseItem: updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, dataset_id: str, description: Optional[str], expires_in: Optional[float], id: str, last_synced_at: Optional[datetime], meta: Optional[Dict[str, Any]], name: Optional[str], sync_schedule: Optional[str], sync_status: Optional[PurpleSyncStatus], token: Optional[str], updated_at: float) -> None: + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, dataset_id: str, description: Optional[str], expires_in: Optional[float], id: str, last_synced_at: Optional[datetime], meta: Optional[Dict[str, Any]], name: Optional[str], sync_schedule: Optional[str], sync_status: Optional[IntegrationNotionFetchResponseSyncStatus], token: Optional[str], updated_at: float) -> None: self.alias = alias self.blueprint_id = blueprint_id self.created_at = created_at @@ -26392,7 +24749,7 @@ def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'IntegrationNotionListResponseItem': + def from_dict(obj: Any) -> 'IntegrationNotionFetchResponse': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) @@ -26405,10 +24762,10 @@ def from_dict(obj: Any) -> 'IntegrationNotionListResponseItem': meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) sync_schedule = from_union([from_str, from_none], obj.get("syncSchedule")) - sync_status = from_union([PurpleSyncStatus, from_none], obj.get("syncStatus")) + sync_status = from_union([IntegrationNotionFetchResponseSyncStatus, from_none], obj.get("syncStatus")) token = from_union([from_str, from_none], obj.get("token")) updated_at = from_float(obj.get("updatedAt")) - return IntegrationNotionListResponseItem(alias, blueprint_id, created_at, dataset_id, description, expires_in, id, last_synced_at, meta, name, sync_schedule, sync_status, token, updated_at) + return IntegrationNotionFetchResponse(alias, blueprint_id, created_at, dataset_id, description, expires_in, id, last_synced_at, meta, name, sync_schedule, sync_status, token, updated_at) def to_dict(self) -> dict: result: dict = {} @@ -26432,460 +24789,386 @@ def to_dict(self) -> dict: if self.sync_schedule is not None: result["syncSchedule"] = from_union([from_str, from_none], self.sync_schedule) if self.sync_status is not None: - result["syncStatus"] = from_union([lambda x: to_enum(PurpleSyncStatus, x), from_none], self.sync_status) + result["syncStatus"] = from_union([lambda x: to_enum(IntegrationNotionFetchResponseSyncStatus, x), from_none], self.sync_status) if self.token is not None: result["token"] = from_union([from_str, from_none], self.token) result["updatedAt"] = to_float(self.updated_at) return result -class IntegrationNotionListResponse: - cursor: str - """Cursor for fetching the next page""" +class IntegrationNotionDeleteParams: + notion_integration_id: str + """The ID of the Notion integration""" - items: List[IntegrationNotionListResponseItem] + def __init__(self, notion_integration_id: str) -> None: + self.notion_integration_id = notion_integration_id - def __init__(self, cursor: str, items: List[IntegrationNotionListResponseItem]) -> None: - self.cursor = cursor - self.items = items + @staticmethod + def from_dict(obj: Any) -> 'IntegrationNotionDeleteParams': + assert isinstance(obj, dict) + notion_integration_id = from_str(obj.get("notionIntegrationId")) + return IntegrationNotionDeleteParams(notion_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["notionIntegrationId"] = from_str(self.notion_integration_id) + return result + + +class IntegrationNotionDeleteResponse: + id: str + """The ID of the deleted Notion integration""" + + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationNotionListResponse': + def from_dict(obj: Any) -> 'IntegrationNotionDeleteResponse': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(IntegrationNotionListResponseItem.from_dict, obj.get("items")) - return IntegrationNotionListResponse(cursor, items) + id = from_str(obj.get("id")) + return IntegrationNotionDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(IntegrationNotionListResponseItem, x), self.items) + result["id"] = from_str(self.id) return result -class FluffySyncStatus(Enum): - """The sync status of an integration""" +class MicrosoftteamsIntegrationListParamsOrder(Enum): + """The order of the paginated items""" - ERROR = "error" - PENDING = "pending" - SYNCED = "synced" + ASC = "asc" + DESC = "desc" + + +class MicrosoftteamsIntegrationListParams: + cursor: Optional[str] + """The cursor to use for pagination""" + + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" + + order: Optional[MicrosoftteamsIntegrationListParamsOrder] + """The order of the paginated items""" + + take: Optional[int] + """The number of items to retrieve""" + + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[MicrosoftteamsIntegrationListParamsOrder], take: Optional[int]) -> None: + self.cursor = cursor + self.meta = meta + self.order = order + self.take = take + + @staticmethod + def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationListParams': + assert isinstance(obj, dict) + cursor = from_union([from_str, from_none], obj.get("cursor")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([MicrosoftteamsIntegrationListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return MicrosoftteamsIntegrationListParams(cursor, meta, order, take) + + def to_dict(self) -> dict: + result: dict = {} + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(MicrosoftteamsIntegrationListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) + return result -class IntegrationNotionListStreamItemData: +class MicrosoftteamsIntegrationListResponseItem: """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" + allow_from: Optional[str] + """The allowed senders for this integration""" + blueprint_id: Optional[str] """The ID of the blueprint""" + bot_framework_app_id: Optional[str] + """The Microsoft Bot Framework Application ID""" + + bot_id: Optional[str] + """The ID of the bot this configuration is using""" + + contact_collection: Optional[bool] + """Weather to collect contacts""" + created_at: float """The timestamp (ms) when the instance was created""" - dataset_id: str - """The ID of the dataset to sync into""" - description: Optional[str] """The associated description""" - expires_in: Optional[float] - """The time in milliseconds until records expire""" - id: str """The instance ID""" - last_synced_at: Optional[datetime] - """The timestamp of the last successful sync""" - meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - sync_schedule: Optional[str] - """The sync schedule""" - - sync_status: Optional[FluffySyncStatus] - """The sync status of an integration""" - - token: Optional[str] - """The Notion API token (returned as '********' if configured, null otherwise)""" + session_duration: Optional[float] + """The chat session duration""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, dataset_id: str, description: Optional[str], expires_in: Optional[float], id: str, last_synced_at: Optional[datetime], meta: Optional[Dict[str, Any]], name: Optional[str], sync_schedule: Optional[str], sync_status: Optional[FluffySyncStatus], token: Optional[str], updated_at: float) -> None: + def __init__(self, alias: Optional[str], allow_from: Optional[str], blueprint_id: Optional[str], bot_framework_app_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float) -> None: self.alias = alias + self.allow_from = allow_from self.blueprint_id = blueprint_id + self.bot_framework_app_id = bot_framework_app_id + self.bot_id = bot_id + self.contact_collection = contact_collection self.created_at = created_at - self.dataset_id = dataset_id self.description = description - self.expires_in = expires_in self.id = id - self.last_synced_at = last_synced_at self.meta = meta self.name = name - self.sync_schedule = sync_schedule - self.sync_status = sync_status - self.token = token + self.session_duration = session_duration self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'IntegrationNotionListStreamItemData': + def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationListResponseItem': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) + allow_from = from_union([from_str, from_none], obj.get("allowFrom")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_framework_app_id = from_union([from_str, from_none], obj.get("botFrameworkAppId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) created_at = from_float(obj.get("createdAt")) - dataset_id = from_str(obj.get("datasetId")) description = from_union([from_str, from_none], obj.get("description")) - expires_in = from_union([from_float, from_none], obj.get("expiresIn")) id = from_str(obj.get("id")) - last_synced_at = from_union([from_datetime, from_none], obj.get("lastSyncedAt")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - sync_schedule = from_union([from_str, from_none], obj.get("syncSchedule")) - sync_status = from_union([FluffySyncStatus, from_none], obj.get("syncStatus")) - token = from_union([from_str, from_none], obj.get("token")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) updated_at = from_float(obj.get("updatedAt")) - return IntegrationNotionListStreamItemData(alias, blueprint_id, created_at, dataset_id, description, expires_in, id, last_synced_at, meta, name, sync_schedule, sync_status, token, updated_at) + return MicrosoftteamsIntegrationListResponseItem(alias, allow_from, blueprint_id, bot_framework_app_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) + if self.allow_from is not None: + result["allowFrom"] = from_union([from_str, from_none], self.allow_from) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_framework_app_id is not None: + result["botFrameworkAppId"] = from_union([from_str, from_none], self.bot_framework_app_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) result["createdAt"] = to_float(self.created_at) - result["datasetId"] = from_str(self.dataset_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.expires_in is not None: - result["expiresIn"] = from_union([to_float, from_none], self.expires_in) result["id"] = from_str(self.id) - if self.last_synced_at is not None: - result["lastSyncedAt"] = from_union([lambda x: x.isoformat(), from_none], self.last_synced_at) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.sync_schedule is not None: - result["syncSchedule"] = from_union([from_str, from_none], self.sync_schedule) - if self.sync_status is not None: - result["syncStatus"] = from_union([lambda x: to_enum(FluffySyncStatus, x), from_none], self.sync_status) - if self.token is not None: - result["token"] = from_union([from_str, from_none], self.token) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) result["updatedAt"] = to_float(self.updated_at) return result -class IntegrationNotionListStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - - -class IntegrationNotionListStreamItem: - data: IntegrationNotionListStreamItemData - """Blueprint properties""" - - type: IntegrationNotionListStreamItemType - """The type of event""" - - def __init__(self, data: IntegrationNotionListStreamItemData, type: IntegrationNotionListStreamItemType) -> None: - self.data = data - self.type = type - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationNotionListStreamItem': - assert isinstance(obj, dict) - data = IntegrationNotionListStreamItemData.from_dict(obj.get("data")) - type = IntegrationNotionListStreamItemType(obj.get("type")) - return IntegrationNotionListStreamItem(data, type) - - def to_dict(self) -> dict: - result: dict = {} - result["data"] = to_class(IntegrationNotionListStreamItemData, self.data) - result["type"] = to_enum(IntegrationNotionListStreamItemType, self.type) - return result - - -class IntegrationSitemapDeleteParams: - sitemap_integration_id: str - """The ID of the Sitemap integration""" - - def __init__(self, sitemap_integration_id: str) -> None: - self.sitemap_integration_id = sitemap_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationSitemapDeleteParams': - assert isinstance(obj, dict) - sitemap_integration_id = from_str(obj.get("sitemapIntegrationId")) - return IntegrationSitemapDeleteParams(sitemap_integration_id) - - def to_dict(self) -> dict: - result: dict = {} - result["sitemapIntegrationId"] = from_str(self.sitemap_integration_id) - return result - - -class IntegrationSitemapDeleteResponse: - id: str - """The ID of the deleted Sitemap integration""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationSitemapDeleteResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return IntegrationSitemapDeleteResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - +class MicrosoftteamsIntegrationListResponse: + cursor: str + """Cursor for fetching the next page""" -class IntegrationSitemapFetchParams: - sitemap_integration_id: str - """The ID of the Sitemap integration to retrieve""" + items: List[MicrosoftteamsIntegrationListResponseItem] - def __init__(self, sitemap_integration_id: str) -> None: - self.sitemap_integration_id = sitemap_integration_id + def __init__(self, cursor: str, items: List[MicrosoftteamsIntegrationListResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'IntegrationSitemapFetchParams': + def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationListResponse': assert isinstance(obj, dict) - sitemap_integration_id = from_str(obj.get("sitemapIntegrationId")) - return IntegrationSitemapFetchParams(sitemap_integration_id) + cursor = from_str(obj.get("cursor")) + items = from_list(MicrosoftteamsIntegrationListResponseItem.from_dict, obj.get("items")) + return MicrosoftteamsIntegrationListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["sitemapIntegrationId"] = from_str(self.sitemap_integration_id) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(MicrosoftteamsIntegrationListResponseItem, x), self.items) return result -class IntegrationSitemapFetchResponseSyncStatus(Enum): - """The sync status of an integration""" - - ERROR = "error" - PENDING = "pending" - SYNCED = "synced" - - -class IntegrationSitemapFetchResponse: +class MicrosoftteamsIntegrationListStreamItemData: """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" + allow_from: Optional[str] + """The allowed senders for this integration""" + blueprint_id: Optional[str] """The ID of the blueprint""" + bot_framework_app_id: Optional[str] + """The Microsoft Bot Framework Application ID""" + + bot_id: Optional[str] + """The ID of the bot this configuration is using""" + + contact_collection: Optional[bool] + """Weather to collect contacts""" + created_at: float """The timestamp (ms) when the instance was created""" - dataset_id: str - """The ID of the dataset used in the Sitemap integration""" - description: Optional[str] """The associated description""" - expires_in: Optional[float] - """Record expiry in milliseconds""" - - glob: Optional[str] - """The glob rules to use for this Sitemap integration""" - id: str """The instance ID""" - javascript: Optional[bool] - """Indicates if the Sitemap integration should use JavaScript during the spidering process""" - - last_synced_at: Optional[datetime] - """The timestamp of the last successful sync""" - meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - selectors: Optional[str] - """The selector rules to use for this Sitemap integration""" - - sync_schedule: Optional[str] - """The sync schedule to use for this Sitemap integration""" - - sync_status: Optional[IntegrationSitemapFetchResponseSyncStatus] - """The sync status of an integration""" + session_duration: Optional[float] + """The chat session duration""" updated_at: float """The timestamp (ms) when the instance was updated""" - url: Optional[str] - """The URL to use for this Sitemap integration""" - - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, dataset_id: str, description: Optional[str], expires_in: Optional[float], glob: Optional[str], id: str, javascript: Optional[bool], last_synced_at: Optional[datetime], meta: Optional[Dict[str, Any]], name: Optional[str], selectors: Optional[str], sync_schedule: Optional[str], sync_status: Optional[IntegrationSitemapFetchResponseSyncStatus], updated_at: float, url: Optional[str]) -> None: + def __init__(self, alias: Optional[str], allow_from: Optional[str], blueprint_id: Optional[str], bot_framework_app_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float) -> None: self.alias = alias + self.allow_from = allow_from self.blueprint_id = blueprint_id + self.bot_framework_app_id = bot_framework_app_id + self.bot_id = bot_id + self.contact_collection = contact_collection self.created_at = created_at - self.dataset_id = dataset_id self.description = description - self.expires_in = expires_in - self.glob = glob self.id = id - self.javascript = javascript - self.last_synced_at = last_synced_at self.meta = meta self.name = name - self.selectors = selectors - self.sync_schedule = sync_schedule - self.sync_status = sync_status + self.session_duration = session_duration self.updated_at = updated_at - self.url = url @staticmethod - def from_dict(obj: Any) -> 'IntegrationSitemapFetchResponse': + def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationListStreamItemData': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) + allow_from = from_union([from_str, from_none], obj.get("allowFrom")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_framework_app_id = from_union([from_str, from_none], obj.get("botFrameworkAppId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) created_at = from_float(obj.get("createdAt")) - dataset_id = from_str(obj.get("datasetId")) description = from_union([from_str, from_none], obj.get("description")) - expires_in = from_union([from_float, from_none], obj.get("expiresIn")) - glob = from_union([from_str, from_none], obj.get("glob")) id = from_str(obj.get("id")) - javascript = from_union([from_bool, from_none], obj.get("javascript")) - last_synced_at = from_union([from_datetime, from_none], obj.get("lastSyncedAt")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - selectors = from_union([from_str, from_none], obj.get("selectors")) - sync_schedule = from_union([from_str, from_none], obj.get("syncSchedule")) - sync_status = from_union([IntegrationSitemapFetchResponseSyncStatus, from_none], obj.get("syncStatus")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) updated_at = from_float(obj.get("updatedAt")) - url = from_union([from_str, from_none], obj.get("url")) - return IntegrationSitemapFetchResponse(alias, blueprint_id, created_at, dataset_id, description, expires_in, glob, id, javascript, last_synced_at, meta, name, selectors, sync_schedule, sync_status, updated_at, url) + return MicrosoftteamsIntegrationListStreamItemData(alias, allow_from, blueprint_id, bot_framework_app_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) + if self.allow_from is not None: + result["allowFrom"] = from_union([from_str, from_none], self.allow_from) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_framework_app_id is not None: + result["botFrameworkAppId"] = from_union([from_str, from_none], self.bot_framework_app_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) result["createdAt"] = to_float(self.created_at) - result["datasetId"] = from_str(self.dataset_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.expires_in is not None: - result["expiresIn"] = from_union([to_float, from_none], self.expires_in) - if self.glob is not None: - result["glob"] = from_union([from_str, from_none], self.glob) result["id"] = from_str(self.id) - if self.javascript is not None: - result["javascript"] = from_union([from_bool, from_none], self.javascript) - if self.last_synced_at is not None: - result["lastSyncedAt"] = from_union([lambda x: x.isoformat(), from_none], self.last_synced_at) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.selectors is not None: - result["selectors"] = from_union([from_str, from_none], self.selectors) - if self.sync_schedule is not None: - result["syncSchedule"] = from_union([from_str, from_none], self.sync_schedule) - if self.sync_status is not None: - result["syncStatus"] = from_union([lambda x: to_enum(IntegrationSitemapFetchResponseSyncStatus, x), from_none], self.sync_status) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) result["updatedAt"] = to_float(self.updated_at) - if self.url is not None: - result["url"] = from_union([from_str, from_none], self.url) - return result - - -class IntegrationSitemapSyncParams: - sitemap_integration_id: str - """The ID of the Sitemap integration""" - - def __init__(self, sitemap_integration_id: str) -> None: - self.sitemap_integration_id = sitemap_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationSitemapSyncParams': - assert isinstance(obj, dict) - sitemap_integration_id = from_str(obj.get("sitemapIntegrationId")) - return IntegrationSitemapSyncParams(sitemap_integration_id) - - def to_dict(self) -> dict: - result: dict = {} - result["sitemapIntegrationId"] = from_str(self.sitemap_integration_id) return result -class IntegrationSitemapSyncResponse: - id: str - """The ID of the Sitemap Integration""" - - def __init__(self, id: str) -> None: - self.id = id +class MicrosoftteamsIntegrationListStreamItemType(Enum): + """The type of event""" - @staticmethod - def from_dict(obj: Any) -> 'IntegrationSitemapSyncResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return IntegrationSitemapSyncResponse(id) + ITEM = "item" - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result +class MicrosoftteamsIntegrationListStreamItem: + data: MicrosoftteamsIntegrationListStreamItemData + """Blueprint properties""" -class IntegrationSitemapUpdateParams: - sitemap_integration_id: str - """The ID of the Sitemap integration""" + type: MicrosoftteamsIntegrationListStreamItemType + """The type of event""" - def __init__(self, sitemap_integration_id: str) -> None: - self.sitemap_integration_id = sitemap_integration_id + def __init__(self, data: MicrosoftteamsIntegrationListStreamItemData, type: MicrosoftteamsIntegrationListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'IntegrationSitemapUpdateParams': + def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationListStreamItem': assert isinstance(obj, dict) - sitemap_integration_id = from_str(obj.get("sitemapIntegrationId")) - return IntegrationSitemapUpdateParams(sitemap_integration_id) + data = MicrosoftteamsIntegrationListStreamItemData.from_dict(obj.get("data")) + type = MicrosoftteamsIntegrationListStreamItemType(obj.get("type")) + return MicrosoftteamsIntegrationListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["sitemapIntegrationId"] = from_str(self.sitemap_integration_id) + result["data"] = to_class(MicrosoftteamsIntegrationListStreamItemData, self.data) + result["type"] = to_enum(MicrosoftteamsIntegrationListStreamItemType, self.type) return result -class IntegrationSitemapUpdateRequest: - """Blueprint properties""" +class MicrosoftteamsIntegrationCreateRequest: + """A bot configuration that can be applied without a dedicated bot instance.""" alias: Optional[str] """The unique alias for the instance""" + allow_from: Optional[str] + """The allowed senders for this integration""" + blueprint_id: Optional[str] """The ID of the blueprint""" - dataset_id: Optional[str] - """The ID of the dataset to use for this Sitemap integration""" + bot_framework_app_id: Optional[str] + """The Microsoft Bot Framework Application ID""" - description: Optional[str] - """The associated description""" + bot_framework_app_secret: Optional[str] + """The Microsoft Bot Framework Application Secret""" - expires_in: Optional[float] - """Record expiry in milliseconds""" + bot_id: Optional[str] + """The ID of the bot this configuration is using""" - glob: Optional[str] - """The glob rules to use for this Sitemap integration""" + contact_collection: Optional[bool] + """Weather to collect contacts""" - javascript: Optional[bool] - """Indicates if the Sitemap integration should use JavaScript during the spidering process""" + description: Optional[str] + """The associated description""" meta: Optional[Dict[str, Any]] """Meta data information""" @@ -26893,87 +25176,84 @@ class IntegrationSitemapUpdateRequest: name: Optional[str] """The associated name""" - selectors: Optional[str] - """The selector rules to use for this Sitemap integration""" - - sync_schedule: Optional[str] - """The sync schedule to use for this Sitemap integration""" + session_duration: Optional[float] + """The chat session duration""" - url: Optional[str] - """The URL to use for this Sitemap integration""" + tenant_id: Optional[str] + """The Microsoft Entra tenant ID""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], dataset_id: Optional[str], description: Optional[str], expires_in: Optional[float], glob: Optional[str], javascript: Optional[bool], meta: Optional[Dict[str, Any]], name: Optional[str], selectors: Optional[str], sync_schedule: Optional[str], url: Optional[str]) -> None: + def __init__(self, alias: Optional[str], allow_from: Optional[str], blueprint_id: Optional[str], bot_framework_app_id: Optional[str], bot_framework_app_secret: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], tenant_id: Optional[str]) -> None: self.alias = alias + self.allow_from = allow_from self.blueprint_id = blueprint_id - self.dataset_id = dataset_id + self.bot_framework_app_id = bot_framework_app_id + self.bot_framework_app_secret = bot_framework_app_secret + self.bot_id = bot_id + self.contact_collection = contact_collection self.description = description - self.expires_in = expires_in - self.glob = glob - self.javascript = javascript self.meta = meta self.name = name - self.selectors = selectors - self.sync_schedule = sync_schedule - self.url = url + self.session_duration = session_duration + self.tenant_id = tenant_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationSitemapUpdateRequest': + def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationCreateRequest': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) + allow_from = from_union([from_str, from_none], obj.get("allowFrom")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) + bot_framework_app_id = from_union([from_str, from_none], obj.get("botFrameworkAppId")) + bot_framework_app_secret = from_union([from_str, from_none], obj.get("botFrameworkAppSecret")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) description = from_union([from_str, from_none], obj.get("description")) - expires_in = from_union([from_float, from_none], obj.get("expiresIn")) - glob = from_union([from_str, from_none], obj.get("glob")) - javascript = from_union([from_bool, from_none], obj.get("javascript")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - selectors = from_union([from_str, from_none], obj.get("selectors")) - sync_schedule = from_union([from_str, from_none], obj.get("syncSchedule")) - url = from_union([from_str, from_none], obj.get("url")) - return IntegrationSitemapUpdateRequest(alias, blueprint_id, dataset_id, description, expires_in, glob, javascript, meta, name, selectors, sync_schedule, url) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + tenant_id = from_union([from_str, from_none], obj.get("tenantId")) + return MicrosoftteamsIntegrationCreateRequest(alias, allow_from, blueprint_id, bot_framework_app_id, bot_framework_app_secret, bot_id, contact_collection, description, meta, name, session_duration, tenant_id) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) + if self.allow_from is not None: + result["allowFrom"] = from_union([from_str, from_none], self.allow_from) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) + if self.bot_framework_app_id is not None: + result["botFrameworkAppId"] = from_union([from_str, from_none], self.bot_framework_app_id) + if self.bot_framework_app_secret is not None: + result["botFrameworkAppSecret"] = from_union([from_str, from_none], self.bot_framework_app_secret) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.expires_in is not None: - result["expiresIn"] = from_union([to_float, from_none], self.expires_in) - if self.glob is not None: - result["glob"] = from_union([from_str, from_none], self.glob) - if self.javascript is not None: - result["javascript"] = from_union([from_bool, from_none], self.javascript) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.selectors is not None: - result["selectors"] = from_union([from_str, from_none], self.selectors) - if self.sync_schedule is not None: - result["syncSchedule"] = from_union([from_str, from_none], self.sync_schedule) - if self.url is not None: - result["url"] = from_union([from_str, from_none], self.url) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.tenant_id is not None: + result["tenantId"] = from_union([from_str, from_none], self.tenant_id) return result -class IntegrationSitemapUpdateResponse: +class MicrosoftteamsIntegrationCreateResponse: id: str - """The ID of the Sitemap Integration""" + """The ID of the Microsoft Teams integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationSitemapUpdateResponse': + def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationCreateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationSitemapUpdateResponse(id) + return MicrosoftteamsIntegrationCreateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -26981,29 +25261,51 @@ def to_dict(self) -> dict: return result -class IntegrationSitemapCreateRequest: - """Blueprint properties""" +class MicrosoftteamsIntegrationUpdateParams: + microsoftteams_integration_id: str + """The ID of the Microsoft Teams integration""" + + def __init__(self, microsoftteams_integration_id: str) -> None: + self.microsoftteams_integration_id = microsoftteams_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationUpdateParams': + assert isinstance(obj, dict) + microsoftteams_integration_id = from_str(obj.get("microsoftteamsIntegrationId")) + return MicrosoftteamsIntegrationUpdateParams(microsoftteams_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["microsoftteamsIntegrationId"] = from_str(self.microsoftteams_integration_id) + return result + + +class MicrosoftteamsIntegrationUpdateRequest: + """A bot configuration that can be applied without a dedicated bot instance.""" alias: Optional[str] """The unique alias for the instance""" + allow_from: Optional[str] + """The allowed senders for this integration""" + blueprint_id: Optional[str] """The ID of the blueprint""" - dataset_id: Optional[str] - """The ID of the dataset to use for this Sitemap integration""" + bot_framework_app_id: Optional[str] + """The Microsoft Bot Framework Application ID""" - description: Optional[str] - """The associated description""" + bot_framework_app_secret: Optional[str] + """The Microsoft Bot Framework Application Secret""" - expires_in: Optional[float] - """Record expiry in milliseconds""" + bot_id: Optional[str] + """The ID of the bot this configuration is using""" - glob: Optional[str] - """The glob rules to use for this Sitemap integration""" + contact_collection: Optional[bool] + """Weather to collect contacts""" - javascript: Optional[bool] - """Indicates if the Sitemap integration should use JavaScript during the spidering process""" + description: Optional[str] + """The associated description""" meta: Optional[Dict[str, Any]] """Meta data information""" @@ -27011,87 +25313,84 @@ class IntegrationSitemapCreateRequest: name: Optional[str] """The associated name""" - selectors: Optional[str] - """The selector rules to use for this Sitemap integration""" - - sync_schedule: Optional[str] - """The sync schedule to use for this Sitemap integration""" + session_duration: Optional[float] + """The chat session duration""" - url: Optional[str] - """The URL to use for this Sitemap integration""" + tenant_id: Optional[str] + """The Microsoft Entra tenant ID""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], dataset_id: Optional[str], description: Optional[str], expires_in: Optional[float], glob: Optional[str], javascript: Optional[bool], meta: Optional[Dict[str, Any]], name: Optional[str], selectors: Optional[str], sync_schedule: Optional[str], url: Optional[str]) -> None: + def __init__(self, alias: Optional[str], allow_from: Optional[str], blueprint_id: Optional[str], bot_framework_app_id: Optional[str], bot_framework_app_secret: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], tenant_id: Optional[str]) -> None: self.alias = alias + self.allow_from = allow_from self.blueprint_id = blueprint_id - self.dataset_id = dataset_id + self.bot_framework_app_id = bot_framework_app_id + self.bot_framework_app_secret = bot_framework_app_secret + self.bot_id = bot_id + self.contact_collection = contact_collection self.description = description - self.expires_in = expires_in - self.glob = glob - self.javascript = javascript self.meta = meta self.name = name - self.selectors = selectors - self.sync_schedule = sync_schedule - self.url = url + self.session_duration = session_duration + self.tenant_id = tenant_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationSitemapCreateRequest': + def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationUpdateRequest': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) + allow_from = from_union([from_str, from_none], obj.get("allowFrom")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) + bot_framework_app_id = from_union([from_str, from_none], obj.get("botFrameworkAppId")) + bot_framework_app_secret = from_union([from_str, from_none], obj.get("botFrameworkAppSecret")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) description = from_union([from_str, from_none], obj.get("description")) - expires_in = from_union([from_float, from_none], obj.get("expiresIn")) - glob = from_union([from_str, from_none], obj.get("glob")) - javascript = from_union([from_bool, from_none], obj.get("javascript")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - selectors = from_union([from_str, from_none], obj.get("selectors")) - sync_schedule = from_union([from_str, from_none], obj.get("syncSchedule")) - url = from_union([from_str, from_none], obj.get("url")) - return IntegrationSitemapCreateRequest(alias, blueprint_id, dataset_id, description, expires_in, glob, javascript, meta, name, selectors, sync_schedule, url) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + tenant_id = from_union([from_str, from_none], obj.get("tenantId")) + return MicrosoftteamsIntegrationUpdateRequest(alias, allow_from, blueprint_id, bot_framework_app_id, bot_framework_app_secret, bot_id, contact_collection, description, meta, name, session_duration, tenant_id) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) + if self.allow_from is not None: + result["allowFrom"] = from_union([from_str, from_none], self.allow_from) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) + if self.bot_framework_app_id is not None: + result["botFrameworkAppId"] = from_union([from_str, from_none], self.bot_framework_app_id) + if self.bot_framework_app_secret is not None: + result["botFrameworkAppSecret"] = from_union([from_str, from_none], self.bot_framework_app_secret) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.expires_in is not None: - result["expiresIn"] = from_union([to_float, from_none], self.expires_in) - if self.glob is not None: - result["glob"] = from_union([from_str, from_none], self.glob) - if self.javascript is not None: - result["javascript"] = from_union([from_bool, from_none], self.javascript) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.selectors is not None: - result["selectors"] = from_union([from_str, from_none], self.selectors) - if self.sync_schedule is not None: - result["syncSchedule"] = from_union([from_str, from_none], self.sync_schedule) - if self.url is not None: - result["url"] = from_union([from_str, from_none], self.url) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.tenant_id is not None: + result["tenantId"] = from_union([from_str, from_none], self.tenant_id) return result -class IntegrationSitemapCreateResponse: +class MicrosoftteamsIntegrationUpdateResponse: id: str - """The ID of the Sitemap Integration""" + """The ID of the Microsoft Teams integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationSitemapCreateResponse': + def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationUpdateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationSitemapCreateResponse(id) + return MicrosoftteamsIntegrationUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -27099,451 +25398,418 @@ def to_dict(self) -> dict: return result -class IntegrationSitemapListParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" +class MicrosoftteamsIntegrationSetupParams: + microsoftteams_integration_id: str + """The ID of the Microsoft Teams integration""" + def __init__(self, microsoftteams_integration_id: str) -> None: + self.microsoftteams_integration_id = microsoftteams_integration_id -class IntegrationSitemapListParams: - cursor: Optional[str] - """The cursor to use for pagination""" + @staticmethod + def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationSetupParams': + assert isinstance(obj, dict) + microsoftteams_integration_id = from_str(obj.get("microsoftteamsIntegrationId")) + return MicrosoftteamsIntegrationSetupParams(microsoftteams_integration_id) - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" + def to_dict(self) -> dict: + result: dict = {} + result["microsoftteamsIntegrationId"] = from_str(self.microsoftteams_integration_id) + return result - order: Optional[IntegrationSitemapListParamsOrder] - """The order of the paginated items""" - take: Optional[int] - """The number of items to retrieve""" +class MicrosoftteamsIntegrationSetupResponse: + id: str + """The ID of the Microsoft Teams integration that was set up""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationSitemapListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationSitemapListParams': + def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationSetupResponse': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([IntegrationSitemapListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return IntegrationSitemapListParams(cursor, meta, order, take) + id = from_str(obj.get("id")) + return MicrosoftteamsIntegrationSetupResponse(id) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(IntegrationSitemapListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["id"] = from_str(self.id) return result -class TentacledSyncStatus(Enum): - """The sync status of an integration""" +class MicrosoftteamsIntegrationFetchParams: + microsoftteams_integration_id: str + """The ID of the Microsoft Teams integration to retrieve""" - ERROR = "error" - PENDING = "pending" - SYNCED = "synced" + def __init__(self, microsoftteams_integration_id: str) -> None: + self.microsoftteams_integration_id = microsoftteams_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationFetchParams': + assert isinstance(obj, dict) + microsoftteams_integration_id = from_str(obj.get("microsoftteamsIntegrationId")) + return MicrosoftteamsIntegrationFetchParams(microsoftteams_integration_id) + def to_dict(self) -> dict: + result: dict = {} + result["microsoftteamsIntegrationId"] = from_str(self.microsoftteams_integration_id) + return result -class IntegrationSitemapListResponseItem: + +class MicrosoftteamsIntegrationFetchResponse: """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" + allow_from: Optional[str] + """The allowed senders for this integration""" + blueprint_id: Optional[str] """The ID of the blueprint""" + bot_framework_app_id: Optional[str] + """The Microsoft Bot Framework Application ID""" + + bot_id: Optional[str] + """The ID of the bot this configuration is using""" + + contact_collection: Optional[bool] + """Weather to collect contacts""" + created_at: float """The timestamp (ms) when the instance was created""" - dataset_id: str - """The ID of the dataset used in the Sitemap integration""" - description: Optional[str] """The associated description""" - expires_in: Optional[float] - """Record expiry in milliseconds""" - - glob: Optional[str] - """The glob rules to use for this Sitemap integration""" - id: str """The instance ID""" - javascript: Optional[bool] - """Indicates if the Sitemap integration should use JavaScript during the spidering process""" - - last_synced_at: Optional[datetime] - """The timestamp of the last successful sync""" - meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - selectors: Optional[str] - """The selector rules to use for this Sitemap integration""" - - sync_schedule: Optional[str] - """The sync schedule to use for this Sitemap integration""" - - sync_status: Optional[TentacledSyncStatus] - """The sync status of an integration""" + session_duration: Optional[float] + """The chat session duration""" updated_at: float """The timestamp (ms) when the instance was updated""" - url: Optional[str] - """The URL to use for this Sitemap integration""" - - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, dataset_id: str, description: Optional[str], expires_in: Optional[float], glob: Optional[str], id: str, javascript: Optional[bool], last_synced_at: Optional[datetime], meta: Optional[Dict[str, Any]], name: Optional[str], selectors: Optional[str], sync_schedule: Optional[str], sync_status: Optional[TentacledSyncStatus], updated_at: float, url: Optional[str]) -> None: + def __init__(self, alias: Optional[str], allow_from: Optional[str], blueprint_id: Optional[str], bot_framework_app_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float) -> None: self.alias = alias + self.allow_from = allow_from self.blueprint_id = blueprint_id + self.bot_framework_app_id = bot_framework_app_id + self.bot_id = bot_id + self.contact_collection = contact_collection self.created_at = created_at - self.dataset_id = dataset_id self.description = description - self.expires_in = expires_in - self.glob = glob self.id = id - self.javascript = javascript - self.last_synced_at = last_synced_at self.meta = meta self.name = name - self.selectors = selectors - self.sync_schedule = sync_schedule - self.sync_status = sync_status + self.session_duration = session_duration self.updated_at = updated_at - self.url = url @staticmethod - def from_dict(obj: Any) -> 'IntegrationSitemapListResponseItem': + def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationFetchResponse': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) + allow_from = from_union([from_str, from_none], obj.get("allowFrom")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_framework_app_id = from_union([from_str, from_none], obj.get("botFrameworkAppId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) created_at = from_float(obj.get("createdAt")) - dataset_id = from_str(obj.get("datasetId")) description = from_union([from_str, from_none], obj.get("description")) - expires_in = from_union([from_float, from_none], obj.get("expiresIn")) - glob = from_union([from_str, from_none], obj.get("glob")) id = from_str(obj.get("id")) - javascript = from_union([from_bool, from_none], obj.get("javascript")) - last_synced_at = from_union([from_datetime, from_none], obj.get("lastSyncedAt")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - selectors = from_union([from_str, from_none], obj.get("selectors")) - sync_schedule = from_union([from_str, from_none], obj.get("syncSchedule")) - sync_status = from_union([TentacledSyncStatus, from_none], obj.get("syncStatus")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) updated_at = from_float(obj.get("updatedAt")) - url = from_union([from_str, from_none], obj.get("url")) - return IntegrationSitemapListResponseItem(alias, blueprint_id, created_at, dataset_id, description, expires_in, glob, id, javascript, last_synced_at, meta, name, selectors, sync_schedule, sync_status, updated_at, url) + return MicrosoftteamsIntegrationFetchResponse(alias, allow_from, blueprint_id, bot_framework_app_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) + if self.allow_from is not None: + result["allowFrom"] = from_union([from_str, from_none], self.allow_from) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_framework_app_id is not None: + result["botFrameworkAppId"] = from_union([from_str, from_none], self.bot_framework_app_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) result["createdAt"] = to_float(self.created_at) - result["datasetId"] = from_str(self.dataset_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.expires_in is not None: - result["expiresIn"] = from_union([to_float, from_none], self.expires_in) - if self.glob is not None: - result["glob"] = from_union([from_str, from_none], self.glob) result["id"] = from_str(self.id) - if self.javascript is not None: - result["javascript"] = from_union([from_bool, from_none], self.javascript) - if self.last_synced_at is not None: - result["lastSyncedAt"] = from_union([lambda x: x.isoformat(), from_none], self.last_synced_at) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.selectors is not None: - result["selectors"] = from_union([from_str, from_none], self.selectors) - if self.sync_schedule is not None: - result["syncSchedule"] = from_union([from_str, from_none], self.sync_schedule) - if self.sync_status is not None: - result["syncStatus"] = from_union([lambda x: to_enum(TentacledSyncStatus, x), from_none], self.sync_status) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) result["updatedAt"] = to_float(self.updated_at) - if self.url is not None: - result["url"] = from_union([from_str, from_none], self.url) return result -class IntegrationSitemapListResponse: - cursor: str - """Cursor for fetching the next page""" +class MicrosoftteamsIntegrationDeleteParams: + microsoftteams_integration_id: str + """The ID of the Microsoft Teams integration""" - items: List[IntegrationSitemapListResponseItem] + def __init__(self, microsoftteams_integration_id: str) -> None: + self.microsoftteams_integration_id = microsoftteams_integration_id - def __init__(self, cursor: str, items: List[IntegrationSitemapListResponseItem]) -> None: - self.cursor = cursor - self.items = items + @staticmethod + def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationDeleteParams': + assert isinstance(obj, dict) + microsoftteams_integration_id = from_str(obj.get("microsoftteamsIntegrationId")) + return MicrosoftteamsIntegrationDeleteParams(microsoftteams_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["microsoftteamsIntegrationId"] = from_str(self.microsoftteams_integration_id) + return result + + +class MicrosoftteamsIntegrationDeleteResponse: + id: str + """The ID of the deleted Microsoft Teams integration""" + + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationSitemapListResponse': + def from_dict(obj: Any) -> 'MicrosoftteamsIntegrationDeleteResponse': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(IntegrationSitemapListResponseItem.from_dict, obj.get("items")) - return IntegrationSitemapListResponse(cursor, items) + id = from_str(obj.get("id")) + return MicrosoftteamsIntegrationDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(IntegrationSitemapListResponseItem, x), self.items) + result["id"] = from_str(self.id) return result -class StickySyncStatus(Enum): - """The sync status of an integration""" +class IntegrationMessengerListParamsOrder(Enum): + """The order of the paginated items""" - ERROR = "error" - PENDING = "pending" - SYNCED = "synced" + ASC = "asc" + DESC = "desc" -class IntegrationSitemapListStreamItemData: +class IntegrationMessengerListParams: + cursor: Optional[str] + """The cursor to use for pagination""" + + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" + + order: Optional[IntegrationMessengerListParamsOrder] + """The order of the paginated items""" + + take: Optional[int] + """The number of items to retrieve""" + + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationMessengerListParamsOrder], take: Optional[int]) -> None: + self.cursor = cursor + self.meta = meta + self.order = order + self.take = take + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationMessengerListParams': + assert isinstance(obj, dict) + cursor = from_union([from_str, from_none], obj.get("cursor")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([IntegrationMessengerListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return IntegrationMessengerListParams(cursor, meta, order, take) + + def to_dict(self) -> dict: + result: dict = {} + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(IntegrationMessengerListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) + return result + + +class IntegrationMessengerListResponseItem: """Blueprint properties""" + access_token: Optional[str] + """The Messenger integration access token (returned as '********' if configured, null + otherwise) + """ alias: Optional[str] """The unique alias for the instance""" + app_secret: Optional[str] + """The Meta app secret (returned as '********' if configured, null otherwise)""" + + attachments: Optional[bool] + """Whether the bot supports attachments""" + blueprint_id: Optional[str] """The ID of the blueprint""" + bot_id: Optional[str] + """The ID of the bot this configuration is using""" + + contact_collection: Optional[bool] + """Whether to collect contacts""" + created_at: float """The timestamp (ms) when the instance was created""" - dataset_id: str - """The ID of the dataset used in the Sitemap integration""" - description: Optional[str] """The associated description""" - expires_in: Optional[float] - """Record expiry in milliseconds""" - - glob: Optional[str] - """The glob rules to use for this Sitemap integration""" - id: str """The instance ID""" - javascript: Optional[bool] - """Indicates if the Sitemap integration should use JavaScript during the spidering process""" - - last_synced_at: Optional[datetime] - """The timestamp of the last successful sync""" - meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - selectors: Optional[str] - """The selector rules to use for this Sitemap integration""" - - sync_schedule: Optional[str] - """The sync schedule to use for this Sitemap integration""" - - sync_status: Optional[StickySyncStatus] - """The sync status of an integration""" + session_duration: Optional[float] + """The session duration (in milliseconds)""" updated_at: float """The timestamp (ms) when the instance was updated""" - url: Optional[str] - """The URL to use for this Sitemap integration""" + verify_token: str + """The Messenger integration verify token""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, dataset_id: str, description: Optional[str], expires_in: Optional[float], glob: Optional[str], id: str, javascript: Optional[bool], last_synced_at: Optional[datetime], meta: Optional[Dict[str, Any]], name: Optional[str], selectors: Optional[str], sync_schedule: Optional[str], sync_status: Optional[StickySyncStatus], updated_at: float, url: Optional[str]) -> None: + def __init__(self, access_token: Optional[str], alias: Optional[str], app_secret: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float, verify_token: str) -> None: + self.access_token = access_token self.alias = alias + self.app_secret = app_secret + self.attachments = attachments self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.contact_collection = contact_collection self.created_at = created_at - self.dataset_id = dataset_id self.description = description - self.expires_in = expires_in - self.glob = glob self.id = id - self.javascript = javascript - self.last_synced_at = last_synced_at self.meta = meta self.name = name - self.selectors = selectors - self.sync_schedule = sync_schedule - self.sync_status = sync_status + self.session_duration = session_duration self.updated_at = updated_at - self.url = url + self.verify_token = verify_token @staticmethod - def from_dict(obj: Any) -> 'IntegrationSitemapListStreamItemData': + def from_dict(obj: Any) -> 'IntegrationMessengerListResponseItem': assert isinstance(obj, dict) + access_token = from_union([from_str, from_none], obj.get("accessToken")) alias = from_union([from_str, from_none], obj.get("alias")) + app_secret = from_union([from_str, from_none], obj.get("appSecret")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) created_at = from_float(obj.get("createdAt")) - dataset_id = from_str(obj.get("datasetId")) description = from_union([from_str, from_none], obj.get("description")) - expires_in = from_union([from_float, from_none], obj.get("expiresIn")) - glob = from_union([from_str, from_none], obj.get("glob")) id = from_str(obj.get("id")) - javascript = from_union([from_bool, from_none], obj.get("javascript")) - last_synced_at = from_union([from_datetime, from_none], obj.get("lastSyncedAt")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - selectors = from_union([from_str, from_none], obj.get("selectors")) - sync_schedule = from_union([from_str, from_none], obj.get("syncSchedule")) - sync_status = from_union([StickySyncStatus, from_none], obj.get("syncStatus")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) updated_at = from_float(obj.get("updatedAt")) - url = from_union([from_str, from_none], obj.get("url")) - return IntegrationSitemapListStreamItemData(alias, blueprint_id, created_at, dataset_id, description, expires_in, glob, id, javascript, last_synced_at, meta, name, selectors, sync_schedule, sync_status, updated_at, url) + verify_token = from_str(obj.get("verifyToken")) + return IntegrationMessengerListResponseItem(access_token, alias, app_secret, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at, verify_token) def to_dict(self) -> dict: result: dict = {} + if self.access_token is not None: + result["accessToken"] = from_union([from_str, from_none], self.access_token) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) + if self.app_secret is not None: + result["appSecret"] = from_union([from_str, from_none], self.app_secret) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) result["createdAt"] = to_float(self.created_at) - result["datasetId"] = from_str(self.dataset_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.expires_in is not None: - result["expiresIn"] = from_union([to_float, from_none], self.expires_in) - if self.glob is not None: - result["glob"] = from_union([from_str, from_none], self.glob) result["id"] = from_str(self.id) - if self.javascript is not None: - result["javascript"] = from_union([from_bool, from_none], self.javascript) - if self.last_synced_at is not None: - result["lastSyncedAt"] = from_union([lambda x: x.isoformat(), from_none], self.last_synced_at) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.selectors is not None: - result["selectors"] = from_union([from_str, from_none], self.selectors) - if self.sync_schedule is not None: - result["syncSchedule"] = from_union([from_str, from_none], self.sync_schedule) - if self.sync_status is not None: - result["syncStatus"] = from_union([lambda x: to_enum(StickySyncStatus, x), from_none], self.sync_status) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) result["updatedAt"] = to_float(self.updated_at) - if self.url is not None: - result["url"] = from_union([from_str, from_none], self.url) - return result - - -class IntegrationSitemapListStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - - -class IntegrationSitemapListStreamItem: - data: IntegrationSitemapListStreamItemData - """Blueprint properties""" - - type: IntegrationSitemapListStreamItemType - """The type of event""" - - def __init__(self, data: IntegrationSitemapListStreamItemData, type: IntegrationSitemapListStreamItemType) -> None: - self.data = data - self.type = type - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationSitemapListStreamItem': - assert isinstance(obj, dict) - data = IntegrationSitemapListStreamItemData.from_dict(obj.get("data")) - type = IntegrationSitemapListStreamItemType(obj.get("type")) - return IntegrationSitemapListStreamItem(data, type) - - def to_dict(self) -> dict: - result: dict = {} - result["data"] = to_class(IntegrationSitemapListStreamItemData, self.data) - result["type"] = to_enum(IntegrationSitemapListStreamItemType, self.type) - return result - - -class SkillServerIntegrationDeleteParams: - skillserver_integration_id: str - """The ID of the SkillServer integration""" - - def __init__(self, skillserver_integration_id: str) -> None: - self.skillserver_integration_id = skillserver_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'SkillServerIntegrationDeleteParams': - assert isinstance(obj, dict) - skillserver_integration_id = from_str(obj.get("skillserverIntegrationId")) - return SkillServerIntegrationDeleteParams(skillserver_integration_id) - - def to_dict(self) -> dict: - result: dict = {} - result["skillserverIntegrationId"] = from_str(self.skillserver_integration_id) + result["verifyToken"] = from_str(self.verify_token) return result -class SkillServerIntegrationDeleteResponse: - id: str - """The ID of the deleted SkillServer integration""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'SkillServerIntegrationDeleteResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return SkillServerIntegrationDeleteResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - +class IntegrationMessengerListResponse: + cursor: str + """Cursor for fetching the next page""" -class SkillServerIntegrationFetchParams: - skillserver_integration_id: str - """The ID of the SkillServer integration to retrieve""" + items: List[IntegrationMessengerListResponseItem] - def __init__(self, skillserver_integration_id: str) -> None: - self.skillserver_integration_id = skillserver_integration_id + def __init__(self, cursor: str, items: List[IntegrationMessengerListResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'SkillServerIntegrationFetchParams': + def from_dict(obj: Any) -> 'IntegrationMessengerListResponse': assert isinstance(obj, dict) - skillserver_integration_id = from_str(obj.get("skillserverIntegrationId")) - return SkillServerIntegrationFetchParams(skillserver_integration_id) + cursor = from_str(obj.get("cursor")) + items = from_list(IntegrationMessengerListResponseItem.from_dict, obj.get("items")) + return IntegrationMessengerListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["skillserverIntegrationId"] = from_str(self.skillserver_integration_id) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(IntegrationMessengerListResponseItem, x), self.items) return result -class SkillServerIntegrationFetchResponse: +class IntegrationMessengerListStreamItemData: """Blueprint properties""" + access_token: Optional[str] + """The Messenger integration access token (returned as '********' if configured, null + otherwise) + """ alias: Optional[str] """The unique alias for the instance""" + app_secret: Optional[str] + """The Meta app secret (returned as '********' if configured, null otherwise)""" + + attachments: Optional[bool] + """Whether the bot supports attachments""" + blueprint_id: Optional[str] """The ID of the blueprint""" + bot_id: Optional[str] + """The ID of the bot this configuration is using""" + + contact_collection: Optional[bool] + """Whether to collect contacts""" + created_at: float """The timestamp (ms) when the instance was created""" @@ -27559,43 +25825,68 @@ class SkillServerIntegrationFetchResponse: name: Optional[str] """The associated name""" - skillset_id: Optional[str] - """The ID of the skillset""" + session_duration: Optional[float] + """The session duration (in milliseconds)""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], skillset_id: Optional[str], updated_at: float) -> None: + verify_token: str + """The Messenger integration verify token""" + + def __init__(self, access_token: Optional[str], alias: Optional[str], app_secret: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float, verify_token: str) -> None: + self.access_token = access_token self.alias = alias + self.app_secret = app_secret + self.attachments = attachments self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.contact_collection = contact_collection self.created_at = created_at self.description = description self.id = id self.meta = meta self.name = name - self.skillset_id = skillset_id + self.session_duration = session_duration self.updated_at = updated_at + self.verify_token = verify_token @staticmethod - def from_dict(obj: Any) -> 'SkillServerIntegrationFetchResponse': + def from_dict(obj: Any) -> 'IntegrationMessengerListStreamItemData': assert isinstance(obj, dict) + access_token = from_union([from_str, from_none], obj.get("accessToken")) alias = from_union([from_str, from_none], obj.get("alias")) + app_secret = from_union([from_str, from_none], obj.get("appSecret")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) updated_at = from_float(obj.get("updatedAt")) - return SkillServerIntegrationFetchResponse(alias, blueprint_id, created_at, description, id, meta, name, skillset_id, updated_at) + verify_token = from_str(obj.get("verifyToken")) + return IntegrationMessengerListStreamItemData(access_token, alias, app_secret, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at, verify_token) def to_dict(self) -> dict: result: dict = {} + if self.access_token is not None: + result["accessToken"] = from_union([from_str, from_none], self.access_token) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) + if self.app_secret is not None: + result["appSecret"] = from_union([from_str, from_none], self.app_secret) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) @@ -27604,148 +25895,198 @@ def to_dict(self) -> dict: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) result["updatedAt"] = to_float(self.updated_at) + result["verifyToken"] = from_str(self.verify_token) return result -class SkillServerManualFetchParams: - skillserver_integration_id: str - """The ID of the SkillServer integration""" +class IntegrationMessengerListStreamItemType(Enum): + """The type of event""" - def __init__(self, skillserver_integration_id: str) -> None: - self.skillserver_integration_id = skillserver_integration_id + ITEM = "item" + + +class IntegrationMessengerListStreamItem: + data: IntegrationMessengerListStreamItemData + """Blueprint properties""" + + type: IntegrationMessengerListStreamItemType + """The type of event""" + + def __init__(self, data: IntegrationMessengerListStreamItemData, type: IntegrationMessengerListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'SkillServerManualFetchParams': + def from_dict(obj: Any) -> 'IntegrationMessengerListStreamItem': assert isinstance(obj, dict) - skillserver_integration_id = from_str(obj.get("skillserverIntegrationId")) - return SkillServerManualFetchParams(skillserver_integration_id) + data = IntegrationMessengerListStreamItemData.from_dict(obj.get("data")) + type = IntegrationMessengerListStreamItemType(obj.get("type")) + return IntegrationMessengerListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["skillserverIntegrationId"] = from_str(self.skillserver_integration_id) + result["data"] = to_class(IntegrationMessengerListStreamItemData, self.data) + result["type"] = to_enum(IntegrationMessengerListStreamItemType, self.type) return result -class Format(Enum): - """Set to "json" to receive a JSON response""" +class IntegrationMessengerCreateRequest: + """A bot configuration that can be applied without a dedicated bot instance.""" - JSON = "json" + access_token: Optional[str] + """The Messenger integration access token""" + alias: Optional[str] + """The unique alias for the instance""" -class SkillServerAbilityInvokeParams: - format: Optional[Format] - """Set to "json" to receive a JSON response""" + app_secret: Optional[str] + """The Meta app secret used to validate webhook signatures""" - session: Optional[str] - """Optional session id to group tool state across calls""" + attachments: Optional[bool] + """Whether the bot supports attachments""" - skillserver_integration_id: str - """The ID of the SkillServer integration""" + blueprint_id: Optional[str] + """The ID of the blueprint""" - def __init__(self, format: Optional[Format], session: Optional[str], skillserver_integration_id: str) -> None: - self.format = format - self.session = session - self.skillserver_integration_id = skillserver_integration_id + bot_id: Optional[str] + """The ID of the bot this configuration is using""" - @staticmethod - def from_dict(obj: Any) -> 'SkillServerAbilityInvokeParams': - assert isinstance(obj, dict) - format = from_union([Format, from_none], obj.get("format")) - session = from_union([from_str, from_none], obj.get("session")) - skillserver_integration_id = from_str(obj.get("skillserverIntegrationId")) - return SkillServerAbilityInvokeParams(format, session, skillserver_integration_id) + contact_collection: Optional[bool] + """Whether to collect contacts""" - def to_dict(self) -> dict: - result: dict = {} - if self.format is not None: - result["format"] = from_union([lambda x: to_enum(Format, x), from_none], self.format) - if self.session is not None: - result["session"] = from_union([from_str, from_none], self.session) - result["skillserverIntegrationId"] = from_str(self.skillserver_integration_id) - return result + description: Optional[str] + """The associated description""" + meta: Optional[Dict[str, Any]] + """Meta data information""" -class SkillServerAbilityInvokeRequest: - ability: str - """The name of the ability to invoke (as listed in the manual)""" + name: Optional[str] + """The associated name""" - input: Optional[Dict[str, Any]] - """The ability input""" + session_duration: Optional[float] + """The session duration (in milliseconds)""" - def __init__(self, ability: str, input: Optional[Dict[str, Any]]) -> None: - self.ability = ability - self.input = input + def __init__(self, access_token: Optional[str], alias: Optional[str], app_secret: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float]) -> None: + self.access_token = access_token + self.alias = alias + self.app_secret = app_secret + self.attachments = attachments + self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.contact_collection = contact_collection + self.description = description + self.meta = meta + self.name = name + self.session_duration = session_duration @staticmethod - def from_dict(obj: Any) -> 'SkillServerAbilityInvokeRequest': + def from_dict(obj: Any) -> 'IntegrationMessengerCreateRequest': assert isinstance(obj, dict) - ability = from_str(obj.get("ability")) - input = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("input")) - return SkillServerAbilityInvokeRequest(ability, input) + access_token = from_union([from_str, from_none], obj.get("accessToken")) + alias = from_union([from_str, from_none], obj.get("alias")) + app_secret = from_union([from_str, from_none], obj.get("appSecret")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + description = from_union([from_str, from_none], obj.get("description")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + return IntegrationMessengerCreateRequest(access_token, alias, app_secret, attachments, blueprint_id, bot_id, contact_collection, description, meta, name, session_duration) def to_dict(self) -> dict: result: dict = {} - result["ability"] = from_str(self.ability) - if self.input is not None: - result["input"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.input) + if self.access_token is not None: + result["accessToken"] = from_union([from_str, from_none], self.access_token) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.app_secret is not None: + result["appSecret"] = from_union([from_str, from_none], self.app_secret) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) return result -class SkillServerAbilityInvokeResponse: - error: Optional[str] - result: Any +class IntegrationMessengerCreateResponse: + id: str + """The ID of the Messenger Integration""" - def __init__(self, error: Optional[str], result: Any) -> None: - self.error = error - self.result = result + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'SkillServerAbilityInvokeResponse': + def from_dict(obj: Any) -> 'IntegrationMessengerCreateResponse': assert isinstance(obj, dict) - error = from_union([from_str, from_none], obj.get("error")) - result = obj.get("result") - return SkillServerAbilityInvokeResponse(error, result) + id = from_str(obj.get("id")) + return IntegrationMessengerCreateResponse(id) def to_dict(self) -> dict: result: dict = {} - if self.error is not None: - result["error"] = from_union([from_str, from_none], self.error) - if self.result is not None: - result["result"] = self.result + result["id"] = from_str(self.id) return result -class SkillServerIntegrationUpdateParams: - skillserver_integration_id: str - """The ID of the SkillServer integration""" +class IntegrationMessengerUpdateParams: + messenger_integration_id: str + """The ID of the Messenger integration""" - def __init__(self, skillserver_integration_id: str) -> None: - self.skillserver_integration_id = skillserver_integration_id + def __init__(self, messenger_integration_id: str) -> None: + self.messenger_integration_id = messenger_integration_id @staticmethod - def from_dict(obj: Any) -> 'SkillServerIntegrationUpdateParams': + def from_dict(obj: Any) -> 'IntegrationMessengerUpdateParams': assert isinstance(obj, dict) - skillserver_integration_id = from_str(obj.get("skillserverIntegrationId")) - return SkillServerIntegrationUpdateParams(skillserver_integration_id) + messenger_integration_id = from_str(obj.get("messengerIntegrationId")) + return IntegrationMessengerUpdateParams(messenger_integration_id) def to_dict(self) -> dict: result: dict = {} - result["skillserverIntegrationId"] = from_str(self.skillserver_integration_id) + result["messengerIntegrationId"] = from_str(self.messenger_integration_id) return result -class SkillServerIntegrationUpdateRequest: - """Blueprint properties""" +class IntegrationMessengerUpdateRequest: + """A bot configuration that can be applied without a dedicated bot instance.""" + + access_token: Optional[str] + """The Messenger integration access token""" alias: Optional[str] """The unique alias for the instance""" + app_secret: Optional[str] + """The Meta app secret used to validate webhook signatures""" + + attachments: Optional[bool] + """Whether the bot supports attachments""" + blueprint_id: Optional[str] """The ID of the blueprint""" + bot_id: Optional[str] + """The ID of the bot this configuration is using""" + + contact_collection: Optional[bool] + """Whether to collect contacts""" + description: Optional[str] """The associated description""" @@ -27755,57 +26096,77 @@ class SkillServerIntegrationUpdateRequest: name: Optional[str] """The associated name""" - skillset_id: Optional[str] - """The ID of the skillset""" + session_duration: Optional[float] + """The session duration (in milliseconds)""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], skillset_id: Optional[str]) -> None: + def __init__(self, access_token: Optional[str], alias: Optional[str], app_secret: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float]) -> None: + self.access_token = access_token self.alias = alias + self.app_secret = app_secret + self.attachments = attachments self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.contact_collection = contact_collection self.description = description self.meta = meta self.name = name - self.skillset_id = skillset_id + self.session_duration = session_duration @staticmethod - def from_dict(obj: Any) -> 'SkillServerIntegrationUpdateRequest': + def from_dict(obj: Any) -> 'IntegrationMessengerUpdateRequest': assert isinstance(obj, dict) + access_token = from_union([from_str, from_none], obj.get("accessToken")) alias = from_union([from_str, from_none], obj.get("alias")) + app_secret = from_union([from_str, from_none], obj.get("appSecret")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) description = from_union([from_str, from_none], obj.get("description")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) - return SkillServerIntegrationUpdateRequest(alias, blueprint_id, description, meta, name, skillset_id) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + return IntegrationMessengerUpdateRequest(access_token, alias, app_secret, attachments, blueprint_id, bot_id, contact_collection, description, meta, name, session_duration) def to_dict(self) -> dict: result: dict = {} + if self.access_token is not None: + result["accessToken"] = from_union([from_str, from_none], self.access_token) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) + if self.app_secret is not None: + result["appSecret"] = from_union([from_str, from_none], self.app_secret) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) return result -class SkillServerIntegrationUpdateResponse: +class IntegrationMessengerUpdateResponse: id: str - """The ID of the SkillServer Integration""" + """The ID of the Messenger Integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'SkillServerIntegrationUpdateResponse': + def from_dict(obj: Any) -> 'IntegrationMessengerUpdateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return SkillServerIntegrationUpdateResponse(id) + return IntegrationMessengerUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -27813,75 +26174,211 @@ def to_dict(self) -> dict: return result -class SkillServerIntegrationCreateRequest: +class IntegrationMessengerSetupParams: + messenger_integration_id: str + """The ID of the Messenger integration""" + + def __init__(self, messenger_integration_id: str) -> None: + self.messenger_integration_id = messenger_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationMessengerSetupParams': + assert isinstance(obj, dict) + messenger_integration_id = from_str(obj.get("messengerIntegrationId")) + return IntegrationMessengerSetupParams(messenger_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["messengerIntegrationId"] = from_str(self.messenger_integration_id) + return result + + +class IntegrationMessengerSetupResponse: + id: str + """The ID of the Messenger Integration""" + + def __init__(self, id: str) -> None: + self.id = id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationMessengerSetupResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return IntegrationMessengerSetupResponse(id) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result + + +class IntegrationMessengerFetchParams: + messenger_integration_id: str + """The ID of the Messenger integration to retrieve""" + + def __init__(self, messenger_integration_id: str) -> None: + self.messenger_integration_id = messenger_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationMessengerFetchParams': + assert isinstance(obj, dict) + messenger_integration_id = from_str(obj.get("messengerIntegrationId")) + return IntegrationMessengerFetchParams(messenger_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["messengerIntegrationId"] = from_str(self.messenger_integration_id) + return result + + +class IntegrationMessengerFetchResponse: """Blueprint properties""" + access_token: Optional[str] + """The Messenger integration access token (returned as '********' if configured, null + otherwise) + """ alias: Optional[str] """The unique alias for the instance""" + app_secret: Optional[str] + """The Meta app secret (returned as '********' if configured, null otherwise)""" + + attachments: Optional[bool] + """Whether the bot supports attachments""" + blueprint_id: Optional[str] """The ID of the blueprint""" + bot_id: Optional[str] + """The ID of the bot this configuration is using""" + + contact_collection: Optional[bool] + """Whether to collect contacts""" + + created_at: float + """The timestamp (ms) when the instance was created""" + description: Optional[str] """The associated description""" + id: str + """The instance ID""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - skillset_id: Optional[str] - """The ID of the skillset""" + session_duration: Optional[float] + """The session duration (in milliseconds)""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], skillset_id: Optional[str]) -> None: + updated_at: float + """The timestamp (ms) when the instance was updated""" + + verify_token: str + """The Messenger integration verify token""" + + def __init__(self, access_token: Optional[str], alias: Optional[str], app_secret: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float, verify_token: str) -> None: + self.access_token = access_token self.alias = alias + self.app_secret = app_secret + self.attachments = attachments self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.contact_collection = contact_collection + self.created_at = created_at self.description = description + self.id = id self.meta = meta self.name = name - self.skillset_id = skillset_id + self.session_duration = session_duration + self.updated_at = updated_at + self.verify_token = verify_token @staticmethod - def from_dict(obj: Any) -> 'SkillServerIntegrationCreateRequest': + def from_dict(obj: Any) -> 'IntegrationMessengerFetchResponse': assert isinstance(obj, dict) + access_token = from_union([from_str, from_none], obj.get("accessToken")) alias = from_union([from_str, from_none], obj.get("alias")) + app_secret = from_union([from_str, from_none], obj.get("appSecret")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) - return SkillServerIntegrationCreateRequest(alias, blueprint_id, description, meta, name, skillset_id) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + updated_at = from_float(obj.get("updatedAt")) + verify_token = from_str(obj.get("verifyToken")) + return IntegrationMessengerFetchResponse(access_token, alias, app_secret, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at, verify_token) def to_dict(self) -> dict: result: dict = {} + if self.access_token is not None: + result["accessToken"] = from_union([from_str, from_none], self.access_token) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) + if self.app_secret is not None: + result["appSecret"] = from_union([from_str, from_none], self.app_secret) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + result["updatedAt"] = to_float(self.updated_at) + result["verifyToken"] = from_str(self.verify_token) return result -class SkillServerIntegrationCreateResponse: +class IntegrationMessengerDeleteParams: + messenger_integration_id: str + """The ID of the Messenger integration""" + + def __init__(self, messenger_integration_id: str) -> None: + self.messenger_integration_id = messenger_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationMessengerDeleteParams': + assert isinstance(obj, dict) + messenger_integration_id = from_str(obj.get("messengerIntegrationId")) + return IntegrationMessengerDeleteParams(messenger_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["messengerIntegrationId"] = from_str(self.messenger_integration_id) + return result + + +class IntegrationMessengerDeleteResponse: id: str - """The ID of the SkillServer Integration""" + """The ID of the deleted Messenger integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'SkillServerIntegrationCreateResponse': + def from_dict(obj: Any) -> 'IntegrationMessengerDeleteResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return SkillServerIntegrationCreateResponse(id) + return IntegrationMessengerDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -27889,40 +26386,40 @@ def to_dict(self) -> dict: return result -class SkillServerIntegrationListParamsOrder(Enum): +class IntegrationMCPServerListParamsOrder(Enum): """The order of the paginated items""" ASC = "asc" DESC = "desc" -class SkillServerIntegrationListParams: +class IntegrationMCPServerListParams: cursor: Optional[str] """The cursor to use for pagination""" meta: Optional[Dict[str, str]] - """Key-value pairs to filter by metadata""" + """Key-value pairs to filter the items by metadata""" - order: Optional[SkillServerIntegrationListParamsOrder] + order: Optional[IntegrationMCPServerListParamsOrder] """The order of the paginated items""" take: Optional[int] """The number of items to retrieve""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[SkillServerIntegrationListParamsOrder], take: Optional[int]) -> None: + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationMCPServerListParamsOrder], take: Optional[int]) -> None: self.cursor = cursor self.meta = meta self.order = order self.take = take @staticmethod - def from_dict(obj: Any) -> 'SkillServerIntegrationListParams': + def from_dict(obj: Any) -> 'IntegrationMCPServerListParams': assert isinstance(obj, dict) cursor = from_union([from_str, from_none], obj.get("cursor")) meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([SkillServerIntegrationListParamsOrder, from_none], obj.get("order")) + order = from_union([IntegrationMCPServerListParamsOrder, from_none], obj.get("order")) take = from_union([from_int, from_none], obj.get("take")) - return SkillServerIntegrationListParams(cursor, meta, order, take) + return IntegrationMCPServerListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} @@ -27931,13 +26428,13 @@ def to_dict(self) -> dict: if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(SkillServerIntegrationListParamsOrder, x), from_none], self.order) + result["order"] = from_union([lambda x: to_enum(IntegrationMCPServerListParamsOrder, x), from_none], self.order) if self.take is not None: result["take"] = from_union([from_int, from_none], self.take) return result -class SkillServerIntegrationListResponseItem: +class IntegrationMCPServerListResponseItem: """Blueprint properties""" alias: Optional[str] @@ -27961,13 +26458,16 @@ class SkillServerIntegrationListResponseItem: name: Optional[str] """The associated name""" + o_auth_connection_id: Optional[str] + """The ID of the OAuth connection for IdP-based authentication""" + skillset_id: Optional[str] """The ID of the skillset""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], skillset_id: Optional[str], updated_at: float) -> None: + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], o_auth_connection_id: Optional[str], skillset_id: Optional[str], updated_at: float) -> None: self.alias = alias self.blueprint_id = blueprint_id self.created_at = created_at @@ -27975,11 +26475,12 @@ def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at self.id = id self.meta = meta self.name = name + self.o_auth_connection_id = o_auth_connection_id self.skillset_id = skillset_id self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'SkillServerIntegrationListResponseItem': + def from_dict(obj: Any) -> 'IntegrationMCPServerListResponseItem': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) @@ -27988,9 +26489,10 @@ def from_dict(obj: Any) -> 'SkillServerIntegrationListResponseItem': id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) + o_auth_connection_id = from_union([from_str, from_none], obj.get("oAuthConnectionId")) skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) updated_at = from_float(obj.get("updatedAt")) - return SkillServerIntegrationListResponseItem(alias, blueprint_id, created_at, description, id, meta, name, skillset_id, updated_at) + return IntegrationMCPServerListResponseItem(alias, blueprint_id, created_at, description, id, meta, name, o_auth_connection_id, skillset_id, updated_at) def to_dict(self) -> dict: result: dict = {} @@ -28006,37 +26508,39 @@ def to_dict(self) -> dict: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.o_auth_connection_id is not None: + result["oAuthConnectionId"] = from_union([from_str, from_none], self.o_auth_connection_id) if self.skillset_id is not None: result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) result["updatedAt"] = to_float(self.updated_at) return result -class SkillServerIntegrationListResponse: +class IntegrationMCPServerListResponse: cursor: str """Cursor for fetching the next page""" - items: List[SkillServerIntegrationListResponseItem] + items: List[IntegrationMCPServerListResponseItem] - def __init__(self, cursor: str, items: List[SkillServerIntegrationListResponseItem]) -> None: + def __init__(self, cursor: str, items: List[IntegrationMCPServerListResponseItem]) -> None: self.cursor = cursor self.items = items @staticmethod - def from_dict(obj: Any) -> 'SkillServerIntegrationListResponse': + def from_dict(obj: Any) -> 'IntegrationMCPServerListResponse': assert isinstance(obj, dict) cursor = from_str(obj.get("cursor")) - items = from_list(SkillServerIntegrationListResponseItem.from_dict, obj.get("items")) - return SkillServerIntegrationListResponse(cursor, items) + items = from_list(IntegrationMCPServerListResponseItem.from_dict, obj.get("items")) + return IntegrationMCPServerListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(SkillServerIntegrationListResponseItem, x), self.items) + result["items"] = from_list(lambda x: to_class(IntegrationMCPServerListResponseItem, x), self.items) return result -class SkillServerIntegrationListStreamItemData: +class IntegrationMCPServerListStreamItemData: """Blueprint properties""" alias: Optional[str] @@ -28060,13 +26564,16 @@ class SkillServerIntegrationListStreamItemData: name: Optional[str] """The associated name""" + o_auth_connection_id: Optional[str] + """The ID of the OAuth connection for IdP-based authentication""" + skillset_id: Optional[str] """The ID of the skillset""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], skillset_id: Optional[str], updated_at: float) -> None: + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], o_auth_connection_id: Optional[str], skillset_id: Optional[str], updated_at: float) -> None: self.alias = alias self.blueprint_id = blueprint_id self.created_at = created_at @@ -28074,11 +26581,12 @@ def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at self.id = id self.meta = meta self.name = name + self.o_auth_connection_id = o_auth_connection_id self.skillset_id = skillset_id self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'SkillServerIntegrationListStreamItemData': + def from_dict(obj: Any) -> 'IntegrationMCPServerListStreamItemData': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) @@ -28087,9 +26595,10 @@ def from_dict(obj: Any) -> 'SkillServerIntegrationListStreamItemData': id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) + o_auth_connection_id = from_union([from_str, from_none], obj.get("oAuthConnectionId")) skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) updated_at = from_float(obj.get("updatedAt")) - return SkillServerIntegrationListStreamItemData(alias, blueprint_id, created_at, description, id, meta, name, skillset_id, updated_at) + return IntegrationMCPServerListStreamItemData(alias, blueprint_id, created_at, description, id, meta, name, o_auth_connection_id, skillset_id, updated_at) def to_dict(self) -> dict: result: dict = {} @@ -28105,279 +26614,121 @@ def to_dict(self) -> dict: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.o_auth_connection_id is not None: + result["oAuthConnectionId"] = from_union([from_str, from_none], self.o_auth_connection_id) if self.skillset_id is not None: result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) result["updatedAt"] = to_float(self.updated_at) return result -class SkillServerIntegrationListStreamItemType(Enum): +class IntegrationMCPServerListStreamItemType(Enum): """The type of event""" ITEM = "item" -class SkillServerIntegrationListStreamItem: - data: SkillServerIntegrationListStreamItemData +class IntegrationMCPServerListStreamItem: + data: IntegrationMCPServerListStreamItemData """Blueprint properties""" - type: SkillServerIntegrationListStreamItemType + type: IntegrationMCPServerListStreamItemType """The type of event""" - def __init__(self, data: SkillServerIntegrationListStreamItemData, type: SkillServerIntegrationListStreamItemType) -> None: + def __init__(self, data: IntegrationMCPServerListStreamItemData, type: IntegrationMCPServerListStreamItemType) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'SkillServerIntegrationListStreamItem': - assert isinstance(obj, dict) - data = SkillServerIntegrationListStreamItemData.from_dict(obj.get("data")) - type = SkillServerIntegrationListStreamItemType(obj.get("type")) - return SkillServerIntegrationListStreamItem(data, type) - - def to_dict(self) -> dict: - result: dict = {} - result["data"] = to_class(SkillServerIntegrationListStreamItemData, self.data) - result["type"] = to_enum(SkillServerIntegrationListStreamItemType, self.type) - return result - - -class IntegrationSlackDeleteParams: - slack_integration_id: str - """The ID of the Slack integration""" - - def __init__(self, slack_integration_id: str) -> None: - self.slack_integration_id = slack_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationSlackDeleteParams': - assert isinstance(obj, dict) - slack_integration_id = from_str(obj.get("slackIntegrationId")) - return IntegrationSlackDeleteParams(slack_integration_id) - - def to_dict(self) -> dict: - result: dict = {} - result["slackIntegrationId"] = from_str(self.slack_integration_id) - return result - - -class IntegrationSlackDeleteResponse: - id: str - """The ID of the deleted Slack integration""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationSlackDeleteResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return IntegrationSlackDeleteResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - - -class IntegrationSlackFetchParams: - slack_integration_id: str - """The ID of the Slack integration to retrieve""" - - def __init__(self, slack_integration_id: str) -> None: - self.slack_integration_id = slack_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationSlackFetchParams': + def from_dict(obj: Any) -> 'IntegrationMCPServerListStreamItem': assert isinstance(obj, dict) - slack_integration_id = from_str(obj.get("slackIntegrationId")) - return IntegrationSlackFetchParams(slack_integration_id) + data = IntegrationMCPServerListStreamItemData.from_dict(obj.get("data")) + type = IntegrationMCPServerListStreamItemType(obj.get("type")) + return IntegrationMCPServerListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["slackIntegrationId"] = from_str(self.slack_integration_id) + result["data"] = to_class(IntegrationMCPServerListStreamItemData, self.data) + result["type"] = to_enum(IntegrationMCPServerListStreamItemType, self.type) return result -class IntegrationSlackFetchResponse: +class IntegrationMCPServerCreateRequest: """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" - allow_from: Optional[str] - """Restrict which Slack users or channels can interact with this integration. Accepts Slack - user IDs (U…/W…), channel IDs (C…/G…/D…), @username, or - """ - auto_respond: Optional[str] - """Configure automatic response behavior. Use '@all' to respond to all messages, '@agent - ' for agent-powered decisions, or custom instructions for lightweight LLM - filtering. Null/empty defaults to current behavior (DMs, mentions, threads only). - """ blueprint_id: Optional[str] """The ID of the blueprint""" - bot_id: Optional[str] - """The ID of the bot this configuration is using""" - - bot_token: Optional[str] - """The bot token (returned as '********' if configured, null otherwise)""" - - contact_collection: Optional[bool] - """Weather to collect contacts""" - - created_at: float - """The timestamp (ms) when the instance was created""" - description: Optional[str] """The associated description""" - id: str - """The instance ID""" - meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - ratings: Optional[bool] - """Whether to enable ratings buttons feature""" - - references: Optional[bool] - """Whether to enable references feature""" - - session_duration: Optional[float] - """The session duration for the Slack integration""" - - signing_secret: Optional[str] - """The signing secret (returned as '********' if configured, null otherwise)""" - - updated_at: float - """The timestamp (ms) when the instance was updated""" - - user_token: Optional[str] - """The user token (returned as '********' if configured, null otherwise)""" + o_auth_connection_id: Optional[str] + """The ID of the OAuth connection for IdP-based authentication""" - visible_messages: Optional[float] - """The number of visible messages outside of the new thread""" + skillset_id: Optional[str] + """The ID of the skillset""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], auto_respond: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], bot_token: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], ratings: Optional[bool], references: Optional[bool], session_duration: Optional[float], signing_secret: Optional[str], updated_at: float, user_token: Optional[str], visible_messages: Optional[float]) -> None: + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], o_auth_connection_id: Optional[str], skillset_id: Optional[str]) -> None: self.alias = alias - self.allow_from = allow_from - self.auto_respond = auto_respond self.blueprint_id = blueprint_id - self.bot_id = bot_id - self.bot_token = bot_token - self.contact_collection = contact_collection - self.created_at = created_at self.description = description - self.id = id self.meta = meta self.name = name - self.ratings = ratings - self.references = references - self.session_duration = session_duration - self.signing_secret = signing_secret - self.updated_at = updated_at - self.user_token = user_token - self.visible_messages = visible_messages + self.o_auth_connection_id = o_auth_connection_id + self.skillset_id = skillset_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationSlackFetchResponse': + def from_dict(obj: Any) -> 'IntegrationMCPServerCreateRequest': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) - allow_from = from_union([from_str, from_none], obj.get("allowFrom")) - auto_respond = from_union([from_str, from_none], obj.get("autoRespond")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - bot_token = from_union([from_str, from_none], obj.get("botToken")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) - created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - ratings = from_union([from_bool, from_none], obj.get("ratings")) - references = from_union([from_bool, from_none], obj.get("references")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - signing_secret = from_union([from_str, from_none], obj.get("signingSecret")) - updated_at = from_float(obj.get("updatedAt")) - user_token = from_union([from_str, from_none], obj.get("userToken")) - visible_messages = from_union([from_float, from_none], obj.get("visibleMessages")) - return IntegrationSlackFetchResponse(alias, allow_from, auto_respond, blueprint_id, bot_id, bot_token, contact_collection, created_at, description, id, meta, name, ratings, references, session_duration, signing_secret, updated_at, user_token, visible_messages) + o_auth_connection_id = from_union([from_str, from_none], obj.get("oAuthConnectionId")) + skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + return IntegrationMCPServerCreateRequest(alias, blueprint_id, description, meta, name, o_auth_connection_id, skillset_id) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.allow_from is not None: - result["allowFrom"] = from_union([from_str, from_none], self.allow_from) - if self.auto_respond is not None: - result["autoRespond"] = from_union([from_str, from_none], self.auto_respond) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.bot_token is not None: - result["botToken"] = from_union([from_str, from_none], self.bot_token) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) - result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.ratings is not None: - result["ratings"] = from_union([from_bool, from_none], self.ratings) - if self.references is not None: - result["references"] = from_union([from_bool, from_none], self.references) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - if self.signing_secret is not None: - result["signingSecret"] = from_union([from_str, from_none], self.signing_secret) - result["updatedAt"] = to_float(self.updated_at) - if self.user_token is not None: - result["userToken"] = from_union([from_str, from_none], self.user_token) - if self.visible_messages is not None: - result["visibleMessages"] = from_union([to_float, from_none], self.visible_messages) - return result - - -class IntegrationSlackSetupParams: - slack_integration_id: str - """The ID of the Slack integration""" - - def __init__(self, slack_integration_id: str) -> None: - self.slack_integration_id = slack_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationSlackSetupParams': - assert isinstance(obj, dict) - slack_integration_id = from_str(obj.get("slackIntegrationId")) - return IntegrationSlackSetupParams(slack_integration_id) - - def to_dict(self) -> dict: - result: dict = {} - result["slackIntegrationId"] = from_str(self.slack_integration_id) + if self.o_auth_connection_id is not None: + result["oAuthConnectionId"] = from_union([from_str, from_none], self.o_auth_connection_id) + if self.skillset_id is not None: + result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) return result -class IntegrationSlackSetupResponse: +class IntegrationMCPServerCreateResponse: id: str - """The ID of the setup Slack integration""" + """The ID of the McpServer Integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationSlackSetupResponse': + def from_dict(obj: Any) -> 'IntegrationMCPServerCreateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationSlackSetupResponse(id) + return IntegrationMCPServerCreateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -28385,52 +26736,34 @@ def to_dict(self) -> dict: return result -class IntegrationSlackUpdateParams: - slack_integration_id: str - """The ID of the Slack integration""" +class IntegrationMCPServerUpdateParams: + mcpserver_integration_id: str + """The ID of the McpServer integration""" - def __init__(self, slack_integration_id: str) -> None: - self.slack_integration_id = slack_integration_id + def __init__(self, mcpserver_integration_id: str) -> None: + self.mcpserver_integration_id = mcpserver_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationSlackUpdateParams': + def from_dict(obj: Any) -> 'IntegrationMCPServerUpdateParams': assert isinstance(obj, dict) - slack_integration_id = from_str(obj.get("slackIntegrationId")) - return IntegrationSlackUpdateParams(slack_integration_id) + mcpserver_integration_id = from_str(obj.get("mcpserverIntegrationId")) + return IntegrationMCPServerUpdateParams(mcpserver_integration_id) def to_dict(self) -> dict: result: dict = {} - result["slackIntegrationId"] = from_str(self.slack_integration_id) + result["mcpserverIntegrationId"] = from_str(self.mcpserver_integration_id) return result -class IntegrationSlackUpdateRequest: - """A bot configuration that can be applied without a dedicated bot instance.""" +class IntegrationMCPServerUpdateRequest: + """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" - allow_from: Optional[str] - """Restrict which Slack users or channels can interact with this integration. Accepts Slack - user IDs (U…/W…), channel IDs (C…/G…/D…), @username, or - """ - auto_respond: Optional[str] - """Configure automatic response behavior. Use '@all' to respond to all messages, '@agent - ' for agent-powered decisions, or custom instructions for lightweight LLM - filtering. Null/empty defaults to current behavior (DMs, mentions, threads only). - """ blueprint_id: Optional[str] """The ID of the blueprint""" - bot_id: Optional[str] - """The ID of the bot this configuration is using""" - - bot_token: Optional[str] - """The bot token for the Slack integration""" - - contact_collection: Optional[bool] - """Weather to collect contacts""" - description: Optional[str] """The associated description""" @@ -28440,112 +26773,64 @@ class IntegrationSlackUpdateRequest: name: Optional[str] """The associated name""" - ratings: Optional[bool] - """Whether to enable ratings buttons feature""" - - references: Optional[bool] - """Whether to enable references feature""" - - session_duration: Optional[float] - """The session duration for the Slack integration""" - - signing_secret: Optional[str] - """The signing secret for the Slack integration""" - - user_token: Optional[str] - """The user token for the Slack integration""" + o_auth_connection_id: Optional[str] + """The ID of the OAuth connection for IdP-based authentication""" - visible_messages: Optional[float] - """The number of visible messages outside of the new thread""" + skillset_id: Optional[str] + """The ID of the skillset""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], auto_respond: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], bot_token: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], ratings: Optional[bool], references: Optional[bool], session_duration: Optional[float], signing_secret: Optional[str], user_token: Optional[str], visible_messages: Optional[float]) -> None: + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], o_auth_connection_id: Optional[str], skillset_id: Optional[str]) -> None: self.alias = alias - self.allow_from = allow_from - self.auto_respond = auto_respond self.blueprint_id = blueprint_id - self.bot_id = bot_id - self.bot_token = bot_token - self.contact_collection = contact_collection self.description = description self.meta = meta self.name = name - self.ratings = ratings - self.references = references - self.session_duration = session_duration - self.signing_secret = signing_secret - self.user_token = user_token - self.visible_messages = visible_messages + self.o_auth_connection_id = o_auth_connection_id + self.skillset_id = skillset_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationSlackUpdateRequest': + def from_dict(obj: Any) -> 'IntegrationMCPServerUpdateRequest': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) - allow_from = from_union([from_str, from_none], obj.get("allowFrom")) - auto_respond = from_union([from_str, from_none], obj.get("autoRespond")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - bot_token = from_union([from_str, from_none], obj.get("botToken")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) description = from_union([from_str, from_none], obj.get("description")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - ratings = from_union([from_bool, from_none], obj.get("ratings")) - references = from_union([from_bool, from_none], obj.get("references")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - signing_secret = from_union([from_str, from_none], obj.get("signingSecret")) - user_token = from_union([from_str, from_none], obj.get("userToken")) - visible_messages = from_union([from_float, from_none], obj.get("visibleMessages")) - return IntegrationSlackUpdateRequest(alias, allow_from, auto_respond, blueprint_id, bot_id, bot_token, contact_collection, description, meta, name, ratings, references, session_duration, signing_secret, user_token, visible_messages) + o_auth_connection_id = from_union([from_str, from_none], obj.get("oAuthConnectionId")) + skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + return IntegrationMCPServerUpdateRequest(alias, blueprint_id, description, meta, name, o_auth_connection_id, skillset_id) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.allow_from is not None: - result["allowFrom"] = from_union([from_str, from_none], self.allow_from) - if self.auto_respond is not None: - result["autoRespond"] = from_union([from_str, from_none], self.auto_respond) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.bot_token is not None: - result["botToken"] = from_union([from_str, from_none], self.bot_token) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.ratings is not None: - result["ratings"] = from_union([from_bool, from_none], self.ratings) - if self.references is not None: - result["references"] = from_union([from_bool, from_none], self.references) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - if self.signing_secret is not None: - result["signingSecret"] = from_union([from_str, from_none], self.signing_secret) - if self.user_token is not None: - result["userToken"] = from_union([from_str, from_none], self.user_token) - if self.visible_messages is not None: - result["visibleMessages"] = from_union([to_float, from_none], self.visible_messages) + if self.o_auth_connection_id is not None: + result["oAuthConnectionId"] = from_union([from_str, from_none], self.o_auth_connection_id) + if self.skillset_id is not None: + result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) return result -class IntegrationSlackUpdateResponse: +class IntegrationMCPServerUpdateResponse: id: str - """The ID of the Slack Integration""" + """The ID of the McpServer Integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationSlackUpdateResponse': + def from_dict(obj: Any) -> 'IntegrationMCPServerUpdateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationSlackUpdateResponse(id) + return IntegrationMCPServerUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -28553,148 +26838,138 @@ def to_dict(self) -> dict: return result -class IntegrationSlackCreateRequest: - """A bot configuration that can be applied without a dedicated bot instance.""" +class IntegrationMCPServerFetchParams: + mcpserver_integration_id: str + """The ID of the McpServer integration to retrieve""" + + def __init__(self, mcpserver_integration_id: str) -> None: + self.mcpserver_integration_id = mcpserver_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationMCPServerFetchParams': + assert isinstance(obj, dict) + mcpserver_integration_id = from_str(obj.get("mcpserverIntegrationId")) + return IntegrationMCPServerFetchParams(mcpserver_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["mcpserverIntegrationId"] = from_str(self.mcpserver_integration_id) + return result + + +class IntegrationMCPServerFetchResponse: + """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" - allow_from: Optional[str] - """Restrict which Slack users or channels can interact with this integration. Accepts Slack - user IDs (U…/W…), channel IDs (C…/G…/D…), @username, or - """ - auto_respond: Optional[str] - """Configure automatic response behavior. Use '@all' to respond to all messages, '@agent - ' for agent-powered decisions, or custom instructions for lightweight LLM - filtering. Null/empty defaults to current behavior (DMs, mentions, threads only). - """ blueprint_id: Optional[str] """The ID of the blueprint""" - bot_id: Optional[str] - """The ID of the bot this configuration is using""" - - bot_token: Optional[str] - """The bot token for the Slack integration""" - - contact_collection: Optional[bool] - """Weather to collect contacts""" + created_at: float + """The timestamp (ms) when the instance was created""" description: Optional[str] """The associated description""" + id: str + """The instance ID""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - ratings: Optional[bool] - """Whether to enable ratings buttons feature""" - - references: Optional[bool] - """Whether to enable references feature""" - - session_duration: Optional[float] - """The session duration for the Slack integration""" - - signing_secret: Optional[str] - """The signing secret for the Slack integration""" + o_auth_connection_id: Optional[str] + """The ID of the OAuth connection for IdP-based authentication""" - user_token: Optional[str] - """The user token for the Slack integration""" + skillset_id: Optional[str] + """The ID of the skillset""" - visible_messages: Optional[float] - """The number of visible messages outside of the new thread""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], auto_respond: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], bot_token: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], ratings: Optional[bool], references: Optional[bool], session_duration: Optional[float], signing_secret: Optional[str], user_token: Optional[str], visible_messages: Optional[float]) -> None: + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], o_auth_connection_id: Optional[str], skillset_id: Optional[str], updated_at: float) -> None: self.alias = alias - self.allow_from = allow_from - self.auto_respond = auto_respond self.blueprint_id = blueprint_id - self.bot_id = bot_id - self.bot_token = bot_token - self.contact_collection = contact_collection + self.created_at = created_at self.description = description + self.id = id self.meta = meta self.name = name - self.ratings = ratings - self.references = references - self.session_duration = session_duration - self.signing_secret = signing_secret - self.user_token = user_token - self.visible_messages = visible_messages + self.o_auth_connection_id = o_auth_connection_id + self.skillset_id = skillset_id + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'IntegrationSlackCreateRequest': + def from_dict(obj: Any) -> 'IntegrationMCPServerFetchResponse': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) - allow_from = from_union([from_str, from_none], obj.get("allowFrom")) - auto_respond = from_union([from_str, from_none], obj.get("autoRespond")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - bot_token = from_union([from_str, from_none], obj.get("botToken")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - ratings = from_union([from_bool, from_none], obj.get("ratings")) - references = from_union([from_bool, from_none], obj.get("references")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - signing_secret = from_union([from_str, from_none], obj.get("signingSecret")) - user_token = from_union([from_str, from_none], obj.get("userToken")) - visible_messages = from_union([from_float, from_none], obj.get("visibleMessages")) - return IntegrationSlackCreateRequest(alias, allow_from, auto_respond, blueprint_id, bot_id, bot_token, contact_collection, description, meta, name, ratings, references, session_duration, signing_secret, user_token, visible_messages) + o_auth_connection_id = from_union([from_str, from_none], obj.get("oAuthConnectionId")) + skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + updated_at = from_float(obj.get("updatedAt")) + return IntegrationMCPServerFetchResponse(alias, blueprint_id, created_at, description, id, meta, name, o_auth_connection_id, skillset_id, updated_at) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.allow_from is not None: - result["allowFrom"] = from_union([from_str, from_none], self.allow_from) - if self.auto_respond is not None: - result["autoRespond"] = from_union([from_str, from_none], self.auto_respond) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.bot_token is not None: - result["botToken"] = from_union([from_str, from_none], self.bot_token) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.ratings is not None: - result["ratings"] = from_union([from_bool, from_none], self.ratings) - if self.references is not None: - result["references"] = from_union([from_bool, from_none], self.references) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - if self.signing_secret is not None: - result["signingSecret"] = from_union([from_str, from_none], self.signing_secret) - if self.user_token is not None: - result["userToken"] = from_union([from_str, from_none], self.user_token) - if self.visible_messages is not None: - result["visibleMessages"] = from_union([to_float, from_none], self.visible_messages) + if self.o_auth_connection_id is not None: + result["oAuthConnectionId"] = from_union([from_str, from_none], self.o_auth_connection_id) + if self.skillset_id is not None: + result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) + result["updatedAt"] = to_float(self.updated_at) + return result + + +class IntegrationMCPServerDeleteParams: + mcpserver_integration_id: str + """The ID of the McpServer integration""" + + def __init__(self, mcpserver_integration_id: str) -> None: + self.mcpserver_integration_id = mcpserver_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationMCPServerDeleteParams': + assert isinstance(obj, dict) + mcpserver_integration_id = from_str(obj.get("mcpserverIntegrationId")) + return IntegrationMCPServerDeleteParams(mcpserver_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["mcpserverIntegrationId"] = from_str(self.mcpserver_integration_id) return result -class IntegrationSlackCreateResponse: +class IntegrationMCPServerDeleteResponse: id: str - """The ID of the Slack Integration""" + """The ID of the deleted McpServer integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationSlackCreateResponse': + def from_dict(obj: Any) -> 'IntegrationMCPServerDeleteResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationSlackCreateResponse(id) + return IntegrationMCPServerDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -28702,40 +26977,40 @@ def to_dict(self) -> dict: return result -class IntegrationSlackListParamsOrder(Enum): +class IntegrationInstagramListParamsOrder(Enum): """The order of the paginated items""" ASC = "asc" DESC = "desc" -class IntegrationSlackListParams: +class IntegrationInstagramListParams: cursor: Optional[str] """The cursor to use for pagination""" meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" + """Key-value pairs to filter the items by metadata""" - order: Optional[IntegrationSlackListParamsOrder] + order: Optional[IntegrationInstagramListParamsOrder] """The order of the paginated items""" take: Optional[int] """The number of items to retrieve""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationSlackListParamsOrder], take: Optional[int]) -> None: + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationInstagramListParamsOrder], take: Optional[int]) -> None: self.cursor = cursor self.meta = meta self.order = order self.take = take @staticmethod - def from_dict(obj: Any) -> 'IntegrationSlackListParams': + def from_dict(obj: Any) -> 'IntegrationInstagramListParams': assert isinstance(obj, dict) cursor = from_union([from_str, from_none], obj.get("cursor")) meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([IntegrationSlackListParamsOrder, from_none], obj.get("order")) + order = from_union([IntegrationInstagramListParamsOrder, from_none], obj.get("order")) take = from_union([from_int, from_none], obj.get("take")) - return IntegrationSlackListParams(cursor, meta, order, take) + return IntegrationInstagramListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} @@ -28744,38 +27019,36 @@ def to_dict(self) -> dict: if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(IntegrationSlackListParamsOrder, x), from_none], self.order) + result["order"] = from_union([lambda x: to_enum(IntegrationInstagramListParamsOrder, x), from_none], self.order) if self.take is not None: result["take"] = from_union([from_int, from_none], self.take) return result -class IntegrationSlackListResponseItem: +class IntegrationInstagramListResponseItem: """Blueprint properties""" + access_token: Optional[str] + """The Instagram integration access token (returned as '********' if configured, null + otherwise) + """ alias: Optional[str] """The unique alias for the instance""" - allow_from: Optional[str] - """Restrict which Slack users or channels can interact with this integration. Accepts Slack - user IDs (U…/W…), channel IDs (C…/G…/D…), @username, or - """ - auto_respond: Optional[str] - """Configure automatic response behavior. Use '@all' to respond to all messages, '@agent - ' for agent-powered decisions, or custom instructions for lightweight LLM - filtering. Null/empty defaults to current behavior (DMs, mentions, threads only). - """ + app_secret: Optional[str] + """The Meta app secret (returned as '********' if configured, null otherwise)""" + + attachments: Optional[bool] + """Whether the bot supports attachments""" + blueprint_id: Optional[str] """The ID of the blueprint""" bot_id: Optional[str] """The ID of the bot this configuration is using""" - bot_token: Optional[str] - """The bot token (returned as '********' if configured, null otherwise)""" - contact_collection: Optional[bool] - """Weather to collect contacts""" + """Whether to collect contacts""" created_at: float """The timestamp (ms) when the instance was created""" @@ -28792,86 +27065,66 @@ class IntegrationSlackListResponseItem: name: Optional[str] """The associated name""" - ratings: Optional[bool] - """Whether to enable ratings buttons feature""" - - references: Optional[bool] - """Whether to enable references feature""" - session_duration: Optional[float] - """The session duration for the Slack integration""" - - signing_secret: Optional[str] - """The signing secret (returned as '********' if configured, null otherwise)""" + """The session duration (in milliseconds)""" updated_at: float """The timestamp (ms) when the instance was updated""" - user_token: Optional[str] - """The user token (returned as '********' if configured, null otherwise)""" - - visible_messages: Optional[float] - """The number of visible messages outside of the new thread""" + verify_token: str + """The Instagram integration verify token""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], auto_respond: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], bot_token: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], ratings: Optional[bool], references: Optional[bool], session_duration: Optional[float], signing_secret: Optional[str], updated_at: float, user_token: Optional[str], visible_messages: Optional[float]) -> None: + def __init__(self, access_token: Optional[str], alias: Optional[str], app_secret: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float, verify_token: str) -> None: + self.access_token = access_token self.alias = alias - self.allow_from = allow_from - self.auto_respond = auto_respond + self.app_secret = app_secret + self.attachments = attachments self.blueprint_id = blueprint_id self.bot_id = bot_id - self.bot_token = bot_token self.contact_collection = contact_collection self.created_at = created_at self.description = description self.id = id self.meta = meta self.name = name - self.ratings = ratings - self.references = references self.session_duration = session_duration - self.signing_secret = signing_secret self.updated_at = updated_at - self.user_token = user_token - self.visible_messages = visible_messages + self.verify_token = verify_token @staticmethod - def from_dict(obj: Any) -> 'IntegrationSlackListResponseItem': + def from_dict(obj: Any) -> 'IntegrationInstagramListResponseItem': assert isinstance(obj, dict) + access_token = from_union([from_str, from_none], obj.get("accessToken")) alias = from_union([from_str, from_none], obj.get("alias")) - allow_from = from_union([from_str, from_none], obj.get("allowFrom")) - auto_respond = from_union([from_str, from_none], obj.get("autoRespond")) + app_secret = from_union([from_str, from_none], obj.get("appSecret")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) - bot_token = from_union([from_str, from_none], obj.get("botToken")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - ratings = from_union([from_bool, from_none], obj.get("ratings")) - references = from_union([from_bool, from_none], obj.get("references")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - signing_secret = from_union([from_str, from_none], obj.get("signingSecret")) updated_at = from_float(obj.get("updatedAt")) - user_token = from_union([from_str, from_none], obj.get("userToken")) - visible_messages = from_union([from_float, from_none], obj.get("visibleMessages")) - return IntegrationSlackListResponseItem(alias, allow_from, auto_respond, blueprint_id, bot_id, bot_token, contact_collection, created_at, description, id, meta, name, ratings, references, session_duration, signing_secret, updated_at, user_token, visible_messages) + verify_token = from_str(obj.get("verifyToken")) + return IntegrationInstagramListResponseItem(access_token, alias, app_secret, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at, verify_token) def to_dict(self) -> dict: result: dict = {} + if self.access_token is not None: + result["accessToken"] = from_union([from_str, from_none], self.access_token) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.allow_from is not None: - result["allowFrom"] = from_union([from_str, from_none], self.allow_from) - if self.auto_respond is not None: - result["autoRespond"] = from_union([from_str, from_none], self.auto_respond) + if self.app_secret is not None: + result["appSecret"] = from_union([from_str, from_none], self.app_secret) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.bot_token is not None: - result["botToken"] = from_union([from_str, from_none], self.bot_token) if self.contact_collection is not None: result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) result["createdAt"] = to_float(self.created_at) @@ -28882,72 +27135,61 @@ def to_dict(self) -> dict: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.ratings is not None: - result["ratings"] = from_union([from_bool, from_none], self.ratings) - if self.references is not None: - result["references"] = from_union([from_bool, from_none], self.references) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - if self.signing_secret is not None: - result["signingSecret"] = from_union([from_str, from_none], self.signing_secret) result["updatedAt"] = to_float(self.updated_at) - if self.user_token is not None: - result["userToken"] = from_union([from_str, from_none], self.user_token) - if self.visible_messages is not None: - result["visibleMessages"] = from_union([to_float, from_none], self.visible_messages) + result["verifyToken"] = from_str(self.verify_token) return result -class IntegrationSlackListResponse: +class IntegrationInstagramListResponse: cursor: str """Cursor for fetching the next page""" - items: List[IntegrationSlackListResponseItem] + items: List[IntegrationInstagramListResponseItem] - def __init__(self, cursor: str, items: List[IntegrationSlackListResponseItem]) -> None: + def __init__(self, cursor: str, items: List[IntegrationInstagramListResponseItem]) -> None: self.cursor = cursor self.items = items @staticmethod - def from_dict(obj: Any) -> 'IntegrationSlackListResponse': + def from_dict(obj: Any) -> 'IntegrationInstagramListResponse': assert isinstance(obj, dict) cursor = from_str(obj.get("cursor")) - items = from_list(IntegrationSlackListResponseItem.from_dict, obj.get("items")) - return IntegrationSlackListResponse(cursor, items) + items = from_list(IntegrationInstagramListResponseItem.from_dict, obj.get("items")) + return IntegrationInstagramListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(IntegrationSlackListResponseItem, x), self.items) + result["items"] = from_list(lambda x: to_class(IntegrationInstagramListResponseItem, x), self.items) return result -class IntegrationSlackListStreamItemData: +class IntegrationInstagramListStreamItemData: """Blueprint properties""" + access_token: Optional[str] + """The Instagram integration access token (returned as '********' if configured, null + otherwise) + """ alias: Optional[str] """The unique alias for the instance""" - allow_from: Optional[str] - """Restrict which Slack users or channels can interact with this integration. Accepts Slack - user IDs (U…/W…), channel IDs (C…/G…/D…), @username, or - """ - auto_respond: Optional[str] - """Configure automatic response behavior. Use '@all' to respond to all messages, '@agent - ' for agent-powered decisions, or custom instructions for lightweight LLM - filtering. Null/empty defaults to current behavior (DMs, mentions, threads only). - """ + app_secret: Optional[str] + """The Meta app secret (returned as '********' if configured, null otherwise)""" + + attachments: Optional[bool] + """Whether the bot supports attachments""" + blueprint_id: Optional[str] """The ID of the blueprint""" bot_id: Optional[str] """The ID of the bot this configuration is using""" - bot_token: Optional[str] - """The bot token (returned as '********' if configured, null otherwise)""" - contact_collection: Optional[bool] - """Weather to collect contacts""" + """Whether to collect contacts""" created_at: float """The timestamp (ms) when the instance was created""" @@ -28964,86 +27206,66 @@ class IntegrationSlackListStreamItemData: name: Optional[str] """The associated name""" - ratings: Optional[bool] - """Whether to enable ratings buttons feature""" - - references: Optional[bool] - """Whether to enable references feature""" - session_duration: Optional[float] - """The session duration for the Slack integration""" - - signing_secret: Optional[str] - """The signing secret (returned as '********' if configured, null otherwise)""" + """The session duration (in milliseconds)""" updated_at: float """The timestamp (ms) when the instance was updated""" - user_token: Optional[str] - """The user token (returned as '********' if configured, null otherwise)""" - - visible_messages: Optional[float] - """The number of visible messages outside of the new thread""" + verify_token: str + """The Instagram integration verify token""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], auto_respond: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], bot_token: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], ratings: Optional[bool], references: Optional[bool], session_duration: Optional[float], signing_secret: Optional[str], updated_at: float, user_token: Optional[str], visible_messages: Optional[float]) -> None: + def __init__(self, access_token: Optional[str], alias: Optional[str], app_secret: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float, verify_token: str) -> None: + self.access_token = access_token self.alias = alias - self.allow_from = allow_from - self.auto_respond = auto_respond + self.app_secret = app_secret + self.attachments = attachments self.blueprint_id = blueprint_id self.bot_id = bot_id - self.bot_token = bot_token self.contact_collection = contact_collection self.created_at = created_at self.description = description self.id = id self.meta = meta self.name = name - self.ratings = ratings - self.references = references self.session_duration = session_duration - self.signing_secret = signing_secret self.updated_at = updated_at - self.user_token = user_token - self.visible_messages = visible_messages + self.verify_token = verify_token @staticmethod - def from_dict(obj: Any) -> 'IntegrationSlackListStreamItemData': + def from_dict(obj: Any) -> 'IntegrationInstagramListStreamItemData': assert isinstance(obj, dict) + access_token = from_union([from_str, from_none], obj.get("accessToken")) alias = from_union([from_str, from_none], obj.get("alias")) - allow_from = from_union([from_str, from_none], obj.get("allowFrom")) - auto_respond = from_union([from_str, from_none], obj.get("autoRespond")) + app_secret = from_union([from_str, from_none], obj.get("appSecret")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) - bot_token = from_union([from_str, from_none], obj.get("botToken")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - ratings = from_union([from_bool, from_none], obj.get("ratings")) - references = from_union([from_bool, from_none], obj.get("references")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - signing_secret = from_union([from_str, from_none], obj.get("signingSecret")) updated_at = from_float(obj.get("updatedAt")) - user_token = from_union([from_str, from_none], obj.get("userToken")) - visible_messages = from_union([from_float, from_none], obj.get("visibleMessages")) - return IntegrationSlackListStreamItemData(alias, allow_from, auto_respond, blueprint_id, bot_id, bot_token, contact_collection, created_at, description, id, meta, name, ratings, references, session_duration, signing_secret, updated_at, user_token, visible_messages) + verify_token = from_str(obj.get("verifyToken")) + return IntegrationInstagramListStreamItemData(access_token, alias, app_secret, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at, verify_token) def to_dict(self) -> dict: result: dict = {} + if self.access_token is not None: + result["accessToken"] = from_union([from_str, from_none], self.access_token) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.allow_from is not None: - result["allowFrom"] = from_union([from_str, from_none], self.allow_from) - if self.auto_respond is not None: - result["autoRespond"] = from_union([from_str, from_none], self.auto_respond) + if self.app_secret is not None: + result["appSecret"] = from_union([from_str, from_none], self.app_secret) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.bot_token is not None: - result["botToken"] = from_union([from_str, from_none], self.bot_token) if self.contact_collection is not None: result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) result["createdAt"] = to_float(self.created_at) @@ -29054,84 +27276,148 @@ def to_dict(self) -> dict: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.ratings is not None: - result["ratings"] = from_union([from_bool, from_none], self.ratings) - if self.references is not None: - result["references"] = from_union([from_bool, from_none], self.references) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - if self.signing_secret is not None: - result["signingSecret"] = from_union([from_str, from_none], self.signing_secret) result["updatedAt"] = to_float(self.updated_at) - if self.user_token is not None: - result["userToken"] = from_union([from_str, from_none], self.user_token) - if self.visible_messages is not None: - result["visibleMessages"] = from_union([to_float, from_none], self.visible_messages) + result["verifyToken"] = from_str(self.verify_token) return result -class IntegrationSlackListStreamItemType(Enum): +class IntegrationInstagramListStreamItemType(Enum): """The type of event""" ITEM = "item" -class IntegrationSlackListStreamItem: - data: IntegrationSlackListStreamItemData +class IntegrationInstagramListStreamItem: + data: IntegrationInstagramListStreamItemData """Blueprint properties""" - type: IntegrationSlackListStreamItemType + type: IntegrationInstagramListStreamItemType """The type of event""" - def __init__(self, data: IntegrationSlackListStreamItemData, type: IntegrationSlackListStreamItemType) -> None: + def __init__(self, data: IntegrationInstagramListStreamItemData, type: IntegrationInstagramListStreamItemType) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'IntegrationSlackListStreamItem': + def from_dict(obj: Any) -> 'IntegrationInstagramListStreamItem': assert isinstance(obj, dict) - data = IntegrationSlackListStreamItemData.from_dict(obj.get("data")) - type = IntegrationSlackListStreamItemType(obj.get("type")) - return IntegrationSlackListStreamItem(data, type) + data = IntegrationInstagramListStreamItemData.from_dict(obj.get("data")) + type = IntegrationInstagramListStreamItemType(obj.get("type")) + return IntegrationInstagramListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(IntegrationSlackListStreamItemData, self.data) - result["type"] = to_enum(IntegrationSlackListStreamItemType, self.type) + result["data"] = to_class(IntegrationInstagramListStreamItemData, self.data) + result["type"] = to_enum(IntegrationInstagramListStreamItemType, self.type) return result -class IntegrationSupportDeleteParams: - support_integration_id: str - """The ID of the Support integration""" +class IntegrationInstagramCreateRequest: + """A bot configuration that can be applied without a dedicated bot instance.""" - def __init__(self, support_integration_id: str) -> None: - self.support_integration_id = support_integration_id + access_token: Optional[str] + """The Instagram integration access token""" + + alias: Optional[str] + """The unique alias for the instance""" + + app_secret: Optional[str] + """The Meta app secret used to validate webhook signatures""" + + attachments: Optional[bool] + """Whether the bot supports attachments""" + + blueprint_id: Optional[str] + """The ID of the blueprint""" + + bot_id: Optional[str] + """The ID of the bot this configuration is using""" + + contact_collection: Optional[bool] + """Whether to collect contacts""" + + description: Optional[str] + """The associated description""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" + + name: Optional[str] + """The associated name""" + + session_duration: Optional[float] + """The session duration (in milliseconds)""" + + def __init__(self, access_token: Optional[str], alias: Optional[str], app_secret: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float]) -> None: + self.access_token = access_token + self.alias = alias + self.app_secret = app_secret + self.attachments = attachments + self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.contact_collection = contact_collection + self.description = description + self.meta = meta + self.name = name + self.session_duration = session_duration @staticmethod - def from_dict(obj: Any) -> 'IntegrationSupportDeleteParams': + def from_dict(obj: Any) -> 'IntegrationInstagramCreateRequest': assert isinstance(obj, dict) - support_integration_id = from_str(obj.get("supportIntegrationId")) - return IntegrationSupportDeleteParams(support_integration_id) + access_token = from_union([from_str, from_none], obj.get("accessToken")) + alias = from_union([from_str, from_none], obj.get("alias")) + app_secret = from_union([from_str, from_none], obj.get("appSecret")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + description = from_union([from_str, from_none], obj.get("description")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + return IntegrationInstagramCreateRequest(access_token, alias, app_secret, attachments, blueprint_id, bot_id, contact_collection, description, meta, name, session_duration) def to_dict(self) -> dict: result: dict = {} - result["supportIntegrationId"] = from_str(self.support_integration_id) + if self.access_token is not None: + result["accessToken"] = from_union([from_str, from_none], self.access_token) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.app_secret is not None: + result["appSecret"] = from_union([from_str, from_none], self.app_secret) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) return result -class IntegrationSupportDeleteResponse: +class IntegrationInstagramCreateResponse: id: str - """The ID of the deleted Support integration""" + """The ID of the Instagram Integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationSupportDeleteResponse': + def from_dict(obj: Any) -> 'IntegrationInstagramCreateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationSupportDeleteResponse(id) + return IntegrationInstagramCreateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -29139,46 +27425,224 @@ def to_dict(self) -> dict: return result -class IntegrationSupportFetchParams: - support_integration_id: str - """The ID of the Support integration to retrieve""" +class IntegrationInstagramUpdateParams: + instagram_integration_id: str + """The ID of the Instagram integration""" - def __init__(self, support_integration_id: str) -> None: - self.support_integration_id = support_integration_id + def __init__(self, instagram_integration_id: str) -> None: + self.instagram_integration_id = instagram_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationSupportFetchParams': + def from_dict(obj: Any) -> 'IntegrationInstagramUpdateParams': assert isinstance(obj, dict) - support_integration_id = from_str(obj.get("supportIntegrationId")) - return IntegrationSupportFetchParams(support_integration_id) + instagram_integration_id = from_str(obj.get("instagramIntegrationId")) + return IntegrationInstagramUpdateParams(instagram_integration_id) def to_dict(self) -> dict: result: dict = {} - result["supportIntegrationId"] = from_str(self.support_integration_id) + result["instagramIntegrationId"] = from_str(self.instagram_integration_id) return result -class IntegrationSupportFetchResponse: +class IntegrationInstagramUpdateRequest: """A bot configuration that can be applied without a dedicated bot instance.""" + access_token: Optional[str] + """The Instagram integration access token""" + + alias: Optional[str] + """The unique alias for the instance""" + + app_secret: Optional[str] + """The Meta app secret used to validate webhook signatures""" + + attachments: Optional[bool] + """Whether the bot supports attachments""" + + blueprint_id: Optional[str] + """The ID of the blueprint""" + + bot_id: Optional[str] + """The ID of the bot this configuration is using""" + + contact_collection: Optional[bool] + """Whether to collect contacts""" + + description: Optional[str] + """The associated description""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" + + name: Optional[str] + """The associated name""" + + session_duration: Optional[float] + """The session duration (in milliseconds)""" + + def __init__(self, access_token: Optional[str], alias: Optional[str], app_secret: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float]) -> None: + self.access_token = access_token + self.alias = alias + self.app_secret = app_secret + self.attachments = attachments + self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.contact_collection = contact_collection + self.description = description + self.meta = meta + self.name = name + self.session_duration = session_duration + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationInstagramUpdateRequest': + assert isinstance(obj, dict) + access_token = from_union([from_str, from_none], obj.get("accessToken")) + alias = from_union([from_str, from_none], obj.get("alias")) + app_secret = from_union([from_str, from_none], obj.get("appSecret")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + description = from_union([from_str, from_none], obj.get("description")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + return IntegrationInstagramUpdateRequest(access_token, alias, app_secret, attachments, blueprint_id, bot_id, contact_collection, description, meta, name, session_duration) + + def to_dict(self) -> dict: + result: dict = {} + if self.access_token is not None: + result["accessToken"] = from_union([from_str, from_none], self.access_token) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.app_secret is not None: + result["appSecret"] = from_union([from_str, from_none], self.app_secret) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + return result + + +class IntegrationInstagramUpdateResponse: + id: str + """The ID of the Instagram Integration""" + + def __init__(self, id: str) -> None: + self.id = id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationInstagramUpdateResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return IntegrationInstagramUpdateResponse(id) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result + + +class IntegrationInstagramSetupParams: + instagram_integration_id: str + """The ID of the Instagram integration""" + + def __init__(self, instagram_integration_id: str) -> None: + self.instagram_integration_id = instagram_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationInstagramSetupParams': + assert isinstance(obj, dict) + instagram_integration_id = from_str(obj.get("instagramIntegrationId")) + return IntegrationInstagramSetupParams(instagram_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["instagramIntegrationId"] = from_str(self.instagram_integration_id) + return result + + +class IntegrationInstagramSetupResponse: + id: str + """The ID of the Instagram Integration""" + + def __init__(self, id: str) -> None: + self.id = id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationInstagramSetupResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return IntegrationInstagramSetupResponse(id) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result + + +class IntegrationInstagramFetchParams: + instagram_integration_id: str + """The ID of the Instagram integration to retrieve""" + + def __init__(self, instagram_integration_id: str) -> None: + self.instagram_integration_id = instagram_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationInstagramFetchParams': + assert isinstance(obj, dict) + instagram_integration_id = from_str(obj.get("instagramIntegrationId")) + return IntegrationInstagramFetchParams(instagram_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["instagramIntegrationId"] = from_str(self.instagram_integration_id) + return result + + +class IntegrationInstagramFetchResponse: + """Blueprint properties""" + + access_token: Optional[str] + """The Instagram integration access token (returned as '********' if configured, null + otherwise) + """ alias: Optional[str] """The unique alias for the instance""" + app_secret: Optional[str] + """The Meta app secret (returned as '********' if configured, null otherwise)""" + + attachments: Optional[bool] + """Whether the bot supports attachments""" + blueprint_id: Optional[str] """The ID of the blueprint""" - bot_id: str + bot_id: Optional[str] """The ID of the bot this configuration is using""" + contact_collection: Optional[bool] + """Whether to collect contacts""" + created_at: float """The timestamp (ms) when the instance was created""" description: Optional[str] """The associated description""" - email: Optional[str] - """The email to use""" - id: str """The instance ID""" @@ -29188,164 +27652,201 @@ class IntegrationSupportFetchResponse: name: Optional[str] """The associated name""" + session_duration: Optional[float] + """The session duration (in milliseconds)""" + updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: str, created_at: float, description: Optional[str], email: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: + verify_token: str + """The Instagram integration verify token""" + + def __init__(self, access_token: Optional[str], alias: Optional[str], app_secret: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float, verify_token: str) -> None: + self.access_token = access_token self.alias = alias + self.app_secret = app_secret + self.attachments = attachments self.blueprint_id = blueprint_id self.bot_id = bot_id + self.contact_collection = contact_collection self.created_at = created_at self.description = description - self.email = email self.id = id self.meta = meta self.name = name + self.session_duration = session_duration self.updated_at = updated_at + self.verify_token = verify_token @staticmethod - def from_dict(obj: Any) -> 'IntegrationSupportFetchResponse': + def from_dict(obj: Any) -> 'IntegrationInstagramFetchResponse': assert isinstance(obj, dict) + access_token = from_union([from_str, from_none], obj.get("accessToken")) alias = from_union([from_str, from_none], obj.get("alias")) + app_secret = from_union([from_str, from_none], obj.get("appSecret")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_str(obj.get("botId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - email = from_union([from_str, from_none], obj.get("email")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) updated_at = from_float(obj.get("updatedAt")) - return IntegrationSupportFetchResponse(alias, blueprint_id, bot_id, created_at, description, email, id, meta, name, updated_at) + verify_token = from_str(obj.get("verifyToken")) + return IntegrationInstagramFetchResponse(access_token, alias, app_secret, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at, verify_token) def to_dict(self) -> dict: result: dict = {} + if self.access_token is not None: + result["accessToken"] = from_union([from_str, from_none], self.access_token) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) + if self.app_secret is not None: + result["appSecret"] = from_union([from_str, from_none], self.app_secret) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - result["botId"] = from_str(self.bot_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.email is not None: - result["email"] = from_union([from_str, from_none], self.email) result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) result["updatedAt"] = to_float(self.updated_at) + result["verifyToken"] = from_str(self.verify_token) return result -class IntegrationSupportTriggerParams: - support_integration_id: str - """The ID of the Support integration""" +class IntegrationInstagramDeleteParams: + instagram_integration_id: str + """The ID of the Instagram integration""" - def __init__(self, support_integration_id: str) -> None: - self.support_integration_id = support_integration_id + def __init__(self, instagram_integration_id: str) -> None: + self.instagram_integration_id = instagram_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationSupportTriggerParams': + def from_dict(obj: Any) -> 'IntegrationInstagramDeleteParams': assert isinstance(obj, dict) - support_integration_id = from_str(obj.get("supportIntegrationId")) - return IntegrationSupportTriggerParams(support_integration_id) + instagram_integration_id = from_str(obj.get("instagramIntegrationId")) + return IntegrationInstagramDeleteParams(instagram_integration_id) def to_dict(self) -> dict: result: dict = {} - result["supportIntegrationId"] = from_str(self.support_integration_id) + result["instagramIntegrationId"] = from_str(self.instagram_integration_id) return result -class IntegrationSupportTriggerRequest: - conversation_ids: Optional[List[str]] - """Array of conversation IDs to process""" - - sample: Optional[int] - """Number of recent conversations to process (default 20)""" +class IntegrationInstagramDeleteResponse: + id: str + """The ID of the deleted Instagram integration""" - def __init__(self, conversation_ids: Optional[List[str]], sample: Optional[int]) -> None: - self.conversation_ids = conversation_ids - self.sample = sample + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationSupportTriggerRequest': + def from_dict(obj: Any) -> 'IntegrationInstagramDeleteResponse': assert isinstance(obj, dict) - conversation_ids = from_union([lambda x: from_list(from_str, x), from_none], obj.get("conversationIds")) - sample = from_union([from_int, from_none], obj.get("sample")) - return IntegrationSupportTriggerRequest(conversation_ids, sample) + id = from_str(obj.get("id")) + return IntegrationInstagramDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} - if self.conversation_ids is not None: - result["conversationIds"] = from_union([lambda x: from_list(from_str, x), from_none], self.conversation_ids) - if self.sample is not None: - result["sample"] = from_union([from_int, from_none], self.sample) + result["id"] = from_str(self.id) return result -class IntegrationSupportTriggerResponse: - id: str - """ID of the support integration""" +class GooglechatIntegrationListParamsOrder(Enum): + """The order of the paginated items""" - triggered: float - """Number of conversations queued for processing""" + ASC = "asc" + DESC = "desc" - def __init__(self, id: str, triggered: float) -> None: - self.id = id - self.triggered = triggered - @staticmethod - def from_dict(obj: Any) -> 'IntegrationSupportTriggerResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - triggered = from_float(obj.get("triggered")) - return IntegrationSupportTriggerResponse(id, triggered) +class GooglechatIntegrationListParams: + cursor: Optional[str] + """The cursor to use for pagination""" - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - result["triggered"] = to_float(self.triggered) - return result + meta: Optional[Dict[str, str]] + """Key-value pairs to filter by metadata""" + order: Optional[GooglechatIntegrationListParamsOrder] + """The order of the paginated items""" -class IntegrationSupportUpdateParams: - support_integration_id: str - """The ID of the Support integration""" + take: Optional[int] + """The number of items to retrieve""" - def __init__(self, support_integration_id: str) -> None: - self.support_integration_id = support_integration_id + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[GooglechatIntegrationListParamsOrder], take: Optional[int]) -> None: + self.cursor = cursor + self.meta = meta + self.order = order + self.take = take @staticmethod - def from_dict(obj: Any) -> 'IntegrationSupportUpdateParams': + def from_dict(obj: Any) -> 'GooglechatIntegrationListParams': assert isinstance(obj, dict) - support_integration_id = from_str(obj.get("supportIntegrationId")) - return IntegrationSupportUpdateParams(support_integration_id) + cursor = from_union([from_str, from_none], obj.get("cursor")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([GooglechatIntegrationListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return GooglechatIntegrationListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} - result["supportIntegrationId"] = from_str(self.support_integration_id) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(GooglechatIntegrationListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class IntegrationSupportUpdateRequest: - """A bot configuration that can be applied without a dedicated bot instance.""" +class GooglechatIntegrationListResponseItem: + """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" + allow_from: Optional[str] + """The allowed senders for this integration""" + + attachments: Optional[bool] + """Whether file attachment processing is enabled""" + + auto_respond: Optional[str] + """The auto-respond configuration""" + blueprint_id: Optional[str] """The ID of the blueprint""" bot_id: Optional[str] """The ID of the bot this configuration is using""" + contact_collection: Optional[bool] + """Whether to collect contacts""" + + created_at: float + """The timestamp (ms) when the instance was created""" + description: Optional[str] """The associated description""" - email: Optional[str] - """The email to use""" + id: str + """The instance ID""" meta: Optional[Dict[str, Any]] """Meta data information""" @@ -29353,82 +27854,147 @@ class IntegrationSupportUpdateRequest: name: Optional[str] """The associated name""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], description: Optional[str], email: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str]) -> None: + project_number: Optional[str] + """The Google Cloud project number for JWT verification""" + + service_account_key: Optional[str] + """The service account key (returned as '********' if configured, null otherwise)""" + + session_duration: Optional[float] + """The session duration for the integration""" + + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], auto_respond: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], project_number: Optional[str], service_account_key: Optional[str], session_duration: Optional[float], updated_at: float) -> None: self.alias = alias + self.allow_from = allow_from + self.attachments = attachments + self.auto_respond = auto_respond self.blueprint_id = blueprint_id self.bot_id = bot_id + self.contact_collection = contact_collection + self.created_at = created_at self.description = description - self.email = email + self.id = id self.meta = meta self.name = name + self.project_number = project_number + self.service_account_key = service_account_key + self.session_duration = session_duration + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'IntegrationSupportUpdateRequest': + def from_dict(obj: Any) -> 'GooglechatIntegrationListResponseItem': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) + allow_from = from_union([from_str, from_none], obj.get("allowFrom")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) + auto_respond = from_union([from_str, from_none], obj.get("autoRespond")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - email = from_union([from_str, from_none], obj.get("email")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - return IntegrationSupportUpdateRequest(alias, blueprint_id, bot_id, description, email, meta, name) + project_number = from_union([from_str, from_none], obj.get("projectNumber")) + service_account_key = from_union([from_str, from_none], obj.get("serviceAccountKey")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + updated_at = from_float(obj.get("updatedAt")) + return GooglechatIntegrationListResponseItem(alias, allow_from, attachments, auto_respond, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, project_number, service_account_key, session_duration, updated_at) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) + if self.allow_from is not None: + result["allowFrom"] = from_union([from_str, from_none], self.allow_from) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) + if self.auto_respond is not None: + result["autoRespond"] = from_union([from_str, from_none], self.auto_respond) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.email is not None: - result["email"] = from_union([from_str, from_none], self.email) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.project_number is not None: + result["projectNumber"] = from_union([from_str, from_none], self.project_number) + if self.service_account_key is not None: + result["serviceAccountKey"] = from_union([from_str, from_none], self.service_account_key) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + result["updatedAt"] = to_float(self.updated_at) return result -class IntegrationSupportUpdateResponse: - id: str - """The ID of the Support Integration""" +class GooglechatIntegrationListResponse: + cursor: str + """Cursor for fetching the next page""" - def __init__(self, id: str) -> None: - self.id = id + items: List[GooglechatIntegrationListResponseItem] + + def __init__(self, cursor: str, items: List[GooglechatIntegrationListResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'IntegrationSupportUpdateResponse': + def from_dict(obj: Any) -> 'GooglechatIntegrationListResponse': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return IntegrationSupportUpdateResponse(id) + cursor = from_str(obj.get("cursor")) + items = from_list(GooglechatIntegrationListResponseItem.from_dict, obj.get("items")) + return GooglechatIntegrationListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(GooglechatIntegrationListResponseItem, x), self.items) return result -class IntegrationSupportCreateRequest: - """A bot configuration that can be applied without a dedicated bot instance.""" +class GooglechatIntegrationListStreamItemData: + """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" + allow_from: Optional[str] + """The allowed senders for this integration""" + + attachments: Optional[bool] + """Whether file attachment processing is enabled""" + + auto_respond: Optional[str] + """The auto-respond configuration""" + blueprint_id: Optional[str] """The ID of the blueprint""" bot_id: Optional[str] """The ID of the bot this configuration is using""" + contact_collection: Optional[bool] + """Whether to collect contacts""" + + created_at: float + """The timestamp (ms) when the instance was created""" + description: Optional[str] """The associated description""" - email: Optional[str] - """The email to use""" + id: str + """The instance ID""" meta: Optional[Dict[str, Any]] """Meta data information""" @@ -29436,361 +28002,425 @@ class IntegrationSupportCreateRequest: name: Optional[str] """The associated name""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], description: Optional[str], email: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str]) -> None: + project_number: Optional[str] + """The Google Cloud project number for JWT verification""" + + service_account_key: Optional[str] + """The service account key (returned as '********' if configured, null otherwise)""" + + session_duration: Optional[float] + """The session duration for the integration""" + + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], auto_respond: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], project_number: Optional[str], service_account_key: Optional[str], session_duration: Optional[float], updated_at: float) -> None: self.alias = alias + self.allow_from = allow_from + self.attachments = attachments + self.auto_respond = auto_respond self.blueprint_id = blueprint_id self.bot_id = bot_id + self.contact_collection = contact_collection + self.created_at = created_at self.description = description - self.email = email + self.id = id self.meta = meta self.name = name + self.project_number = project_number + self.service_account_key = service_account_key + self.session_duration = session_duration + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'IntegrationSupportCreateRequest': + def from_dict(obj: Any) -> 'GooglechatIntegrationListStreamItemData': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) + allow_from = from_union([from_str, from_none], obj.get("allowFrom")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) + auto_respond = from_union([from_str, from_none], obj.get("autoRespond")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - email = from_union([from_str, from_none], obj.get("email")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - return IntegrationSupportCreateRequest(alias, blueprint_id, bot_id, description, email, meta, name) + project_number = from_union([from_str, from_none], obj.get("projectNumber")) + service_account_key = from_union([from_str, from_none], obj.get("serviceAccountKey")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + updated_at = from_float(obj.get("updatedAt")) + return GooglechatIntegrationListStreamItemData(alias, allow_from, attachments, auto_respond, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, project_number, service_account_key, session_duration, updated_at) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) + if self.allow_from is not None: + result["allowFrom"] = from_union([from_str, from_none], self.allow_from) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) + if self.auto_respond is not None: + result["autoRespond"] = from_union([from_str, from_none], self.auto_respond) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.email is not None: - result["email"] = from_union([from_str, from_none], self.email) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.project_number is not None: + result["projectNumber"] = from_union([from_str, from_none], self.project_number) + if self.service_account_key is not None: + result["serviceAccountKey"] = from_union([from_str, from_none], self.service_account_key) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + result["updatedAt"] = to_float(self.updated_at) return result -class IntegrationSupportCreateResponse: - id: str - """The ID of the Support Integration""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationSupportCreateResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return IntegrationSupportCreateResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - - -class IntegrationSupportListParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" - +class GooglechatIntegrationListStreamItemType(Enum): + """The type of event""" -class IntegrationSupportListParams: - cursor: Optional[str] - """The cursor to use for pagination""" + ITEM = "item" - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" - order: Optional[IntegrationSupportListParamsOrder] - """The order of the paginated items""" +class GooglechatIntegrationListStreamItem: + data: GooglechatIntegrationListStreamItemData + """Blueprint properties""" - take: Optional[int] - """The number of items to retrieve""" + type: GooglechatIntegrationListStreamItemType + """The type of event""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationSupportListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take + def __init__(self, data: GooglechatIntegrationListStreamItemData, type: GooglechatIntegrationListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'IntegrationSupportListParams': + def from_dict(obj: Any) -> 'GooglechatIntegrationListStreamItem': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([IntegrationSupportListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return IntegrationSupportListParams(cursor, meta, order, take) + data = GooglechatIntegrationListStreamItemData.from_dict(obj.get("data")) + type = GooglechatIntegrationListStreamItemType(obj.get("type")) + return GooglechatIntegrationListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(IntegrationSupportListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["data"] = to_class(GooglechatIntegrationListStreamItemData, self.data) + result["type"] = to_enum(GooglechatIntegrationListStreamItemType, self.type) return result -class IntegrationSupportListResponseItem: +class GooglechatIntegrationCreateRequest: """A bot configuration that can be applied without a dedicated bot instance.""" alias: Optional[str] """The unique alias for the instance""" + allow_from: Optional[str] + """Restrict which Google Chat users can interact with this integration. Accepts user + resource names (users/USER_ID) or * to allow all. One per line. + """ + attachments: Optional[bool] + """Whether file attachment processing is enabled""" + + auto_respond: Optional[str] + """Configure automatic response behavior. Use '@all' to respond to all messages, '@agent + ' for agent-powered decisions, or custom instructions for lightweight LLM + filtering. Null/empty defaults to DMs and direct messages only. + """ blueprint_id: Optional[str] """The ID of the blueprint""" - bot_id: str + bot_id: Optional[str] """The ID of the bot this configuration is using""" - created_at: float - """The timestamp (ms) when the instance was created""" + contact_collection: Optional[bool] + """Whether to collect contacts""" description: Optional[str] """The associated description""" - email: Optional[str] - """The email to use""" - - id: str - """The instance ID""" - meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + project_number: Optional[str] + """The Google Cloud project number used to verify incoming event JWT audience claims""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: str, created_at: float, description: Optional[str], email: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: + service_account_key: Optional[str] + """The Google service account JSON key for sending messages via the Chat REST API""" + + session_duration: Optional[float] + """The session duration for the Google Chat integration""" + + def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], auto_respond: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], project_number: Optional[str], service_account_key: Optional[str], session_duration: Optional[float]) -> None: self.alias = alias + self.allow_from = allow_from + self.attachments = attachments + self.auto_respond = auto_respond self.blueprint_id = blueprint_id self.bot_id = bot_id - self.created_at = created_at + self.contact_collection = contact_collection self.description = description - self.email = email - self.id = id self.meta = meta self.name = name - self.updated_at = updated_at + self.project_number = project_number + self.service_account_key = service_account_key + self.session_duration = session_duration @staticmethod - def from_dict(obj: Any) -> 'IntegrationSupportListResponseItem': + def from_dict(obj: Any) -> 'GooglechatIntegrationCreateRequest': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) + allow_from = from_union([from_str, from_none], obj.get("allowFrom")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) + auto_respond = from_union([from_str, from_none], obj.get("autoRespond")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_str(obj.get("botId")) - created_at = from_float(obj.get("createdAt")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) description = from_union([from_str, from_none], obj.get("description")) - email = from_union([from_str, from_none], obj.get("email")) - id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - updated_at = from_float(obj.get("updatedAt")) - return IntegrationSupportListResponseItem(alias, blueprint_id, bot_id, created_at, description, email, id, meta, name, updated_at) + project_number = from_union([from_str, from_none], obj.get("projectNumber")) + service_account_key = from_union([from_str, from_none], obj.get("serviceAccountKey")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + return GooglechatIntegrationCreateRequest(alias, allow_from, attachments, auto_respond, blueprint_id, bot_id, contact_collection, description, meta, name, project_number, service_account_key, session_duration) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) + if self.allow_from is not None: + result["allowFrom"] = from_union([from_str, from_none], self.allow_from) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) + if self.auto_respond is not None: + result["autoRespond"] = from_union([from_str, from_none], self.auto_respond) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - result["botId"] = from_str(self.bot_id) - result["createdAt"] = to_float(self.created_at) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.email is not None: - result["email"] = from_union([from_str, from_none], self.email) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.project_number is not None: + result["projectNumber"] = from_union([from_str, from_none], self.project_number) + if self.service_account_key is not None: + result["serviceAccountKey"] = from_union([from_str, from_none], self.service_account_key) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + return result + + +class GooglechatIntegrationCreateResponse: + id: str + """The ID of the Google Chat Integration""" + + def __init__(self, id: str) -> None: + self.id = id + + @staticmethod + def from_dict(obj: Any) -> 'GooglechatIntegrationCreateResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return GooglechatIntegrationCreateResponse(id) + + def to_dict(self) -> dict: + result: dict = {} result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - result["updatedAt"] = to_float(self.updated_at) return result -class IntegrationSupportListResponse: - cursor: str - """Cursor for fetching the next page""" - - items: List[IntegrationSupportListResponseItem] +class GooglechatIntegrationUpdateParams: + googlechat_integration_id: str + """The ID of the Google Chat integration""" - def __init__(self, cursor: str, items: List[IntegrationSupportListResponseItem]) -> None: - self.cursor = cursor - self.items = items + def __init__(self, googlechat_integration_id: str) -> None: + self.googlechat_integration_id = googlechat_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationSupportListResponse': + def from_dict(obj: Any) -> 'GooglechatIntegrationUpdateParams': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(IntegrationSupportListResponseItem.from_dict, obj.get("items")) - return IntegrationSupportListResponse(cursor, items) + googlechat_integration_id = from_str(obj.get("googlechatIntegrationId")) + return GooglechatIntegrationUpdateParams(googlechat_integration_id) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(IntegrationSupportListResponseItem, x), self.items) + result["googlechatIntegrationId"] = from_str(self.googlechat_integration_id) return result -class IntegrationSupportListStreamItemData: +class GooglechatIntegrationUpdateRequest: """A bot configuration that can be applied without a dedicated bot instance.""" alias: Optional[str] """The unique alias for the instance""" + allow_from: Optional[str] + """The allowed senders for this integration""" + + attachments: Optional[bool] + """Whether file attachment processing is enabled""" + + auto_respond: Optional[str] + """The auto-respond configuration""" + blueprint_id: Optional[str] """The ID of the blueprint""" - bot_id: str + bot_id: Optional[str] """The ID of the bot this configuration is using""" - created_at: float - """The timestamp (ms) when the instance was created""" + contact_collection: Optional[bool] + """Whether to collect contacts""" description: Optional[str] """The associated description""" - email: Optional[str] - """The email to use""" - - id: str - """The instance ID""" - meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + project_number: Optional[str] + """The Google Cloud project number for JWT verification""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: str, created_at: float, description: Optional[str], email: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: + service_account_key: Optional[str] + """The Google service account JSON key for sending messages""" + + session_duration: Optional[float] + """The session duration for the integration""" + + def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], auto_respond: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], project_number: Optional[str], service_account_key: Optional[str], session_duration: Optional[float]) -> None: self.alias = alias + self.allow_from = allow_from + self.attachments = attachments + self.auto_respond = auto_respond self.blueprint_id = blueprint_id self.bot_id = bot_id - self.created_at = created_at + self.contact_collection = contact_collection self.description = description - self.email = email - self.id = id self.meta = meta self.name = name - self.updated_at = updated_at + self.project_number = project_number + self.service_account_key = service_account_key + self.session_duration = session_duration @staticmethod - def from_dict(obj: Any) -> 'IntegrationSupportListStreamItemData': + def from_dict(obj: Any) -> 'GooglechatIntegrationUpdateRequest': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) + allow_from = from_union([from_str, from_none], obj.get("allowFrom")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) + auto_respond = from_union([from_str, from_none], obj.get("autoRespond")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_str(obj.get("botId")) - created_at = from_float(obj.get("createdAt")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) description = from_union([from_str, from_none], obj.get("description")) - email = from_union([from_str, from_none], obj.get("email")) - id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - updated_at = from_float(obj.get("updatedAt")) - return IntegrationSupportListStreamItemData(alias, blueprint_id, bot_id, created_at, description, email, id, meta, name, updated_at) + project_number = from_union([from_str, from_none], obj.get("projectNumber")) + service_account_key = from_union([from_str, from_none], obj.get("serviceAccountKey")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + return GooglechatIntegrationUpdateRequest(alias, allow_from, attachments, auto_respond, blueprint_id, bot_id, contact_collection, description, meta, name, project_number, service_account_key, session_duration) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) + if self.allow_from is not None: + result["allowFrom"] = from_union([from_str, from_none], self.allow_from) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) + if self.auto_respond is not None: + result["autoRespond"] = from_union([from_str, from_none], self.auto_respond) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - result["botId"] = from_str(self.bot_id) - result["createdAt"] = to_float(self.created_at) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_collection is not None: + result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.email is not None: - result["email"] = from_union([from_str, from_none], self.email) - result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - result["updatedAt"] = to_float(self.updated_at) + if self.project_number is not None: + result["projectNumber"] = from_union([from_str, from_none], self.project_number) + if self.service_account_key is not None: + result["serviceAccountKey"] = from_union([from_str, from_none], self.service_account_key) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) return result -class IntegrationSupportListStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - - -class IntegrationSupportListStreamItem: - data: IntegrationSupportListStreamItemData - """A bot configuration that can be applied without a dedicated bot instance.""" - - type: IntegrationSupportListStreamItemType - """The type of event""" +class GooglechatIntegrationUpdateResponse: + id: str + """The ID of the Google Chat Integration""" - def __init__(self, data: IntegrationSupportListStreamItemData, type: IntegrationSupportListStreamItemType) -> None: - self.data = data - self.type = type + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationSupportListStreamItem': + def from_dict(obj: Any) -> 'GooglechatIntegrationUpdateResponse': assert isinstance(obj, dict) - data = IntegrationSupportListStreamItemData.from_dict(obj.get("data")) - type = IntegrationSupportListStreamItemType(obj.get("type")) - return IntegrationSupportListStreamItem(data, type) + id = from_str(obj.get("id")) + return GooglechatIntegrationUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(IntegrationSupportListStreamItemData, self.data) - result["type"] = to_enum(IntegrationSupportListStreamItemType, self.type) + result["id"] = from_str(self.id) return result -class IntegrationTelegramDeleteParams: - telegram_integration_id: str - """The ID of the Telegram integration""" +class GooglechatIntegrationSetupParams: + googlechat_integration_id: str + """The ID of the Google Chat integration""" - def __init__(self, telegram_integration_id: str) -> None: - self.telegram_integration_id = telegram_integration_id + def __init__(self, googlechat_integration_id: str) -> None: + self.googlechat_integration_id = googlechat_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationTelegramDeleteParams': + def from_dict(obj: Any) -> 'GooglechatIntegrationSetupParams': assert isinstance(obj, dict) - telegram_integration_id = from_str(obj.get("telegramIntegrationId")) - return IntegrationTelegramDeleteParams(telegram_integration_id) + googlechat_integration_id = from_str(obj.get("googlechatIntegrationId")) + return GooglechatIntegrationSetupParams(googlechat_integration_id) def to_dict(self) -> dict: result: dict = {} - result["telegramIntegrationId"] = from_str(self.telegram_integration_id) + result["googlechatIntegrationId"] = from_str(self.googlechat_integration_id) return result -class IntegrationTelegramDeleteResponse: +class GooglechatIntegrationSetupResponse: id: str - """The ID of the deleted Telegram integration""" + """The ID of the Google Chat Integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationTelegramDeleteResponse': + def from_dict(obj: Any) -> 'GooglechatIntegrationSetupResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationTelegramDeleteResponse(id) + return GooglechatIntegrationSetupResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -29798,36 +28428,39 @@ def to_dict(self) -> dict: return result -class IntegrationTelegramFetchParams: - telegram_integration_id: str - """The ID of the Telegram integration to retrieve""" +class GooglechatIntegrationFetchParams: + googlechat_integration_id: str + """The ID of the Google Chat integration to retrieve""" - def __init__(self, telegram_integration_id: str) -> None: - self.telegram_integration_id = telegram_integration_id + def __init__(self, googlechat_integration_id: str) -> None: + self.googlechat_integration_id = googlechat_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationTelegramFetchParams': + def from_dict(obj: Any) -> 'GooglechatIntegrationFetchParams': assert isinstance(obj, dict) - telegram_integration_id = from_str(obj.get("telegramIntegrationId")) - return IntegrationTelegramFetchParams(telegram_integration_id) + googlechat_integration_id = from_str(obj.get("googlechatIntegrationId")) + return GooglechatIntegrationFetchParams(googlechat_integration_id) def to_dict(self) -> dict: result: dict = {} - result["telegramIntegrationId"] = from_str(self.telegram_integration_id) + result["googlechatIntegrationId"] = from_str(self.googlechat_integration_id) return result -class IntegrationTelegramFetchResponse: +class GooglechatIntegrationFetchResponse: """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" allow_from: Optional[str] - """Newline-or-comma-separated list of allowed senders""" + """The allowed senders for this integration""" attachments: Optional[bool] - """Weather the bot supports attachments""" + """Whether file attachment processing is enabled""" + + auto_respond: Optional[str] + """The auto-respond configuration""" blueprint_id: Optional[str] """The ID of the blueprint""" @@ -29836,7 +28469,7 @@ class IntegrationTelegramFetchResponse: """The ID of the bot this configuration is using""" contact_collection: Optional[bool] - """Weather to collect contacts""" + """Whether to collect contacts""" created_at: float """The timestamp (ms) when the instance was created""" @@ -29853,16 +28486,23 @@ class IntegrationTelegramFetchResponse: name: Optional[str] """The associated name""" + project_number: Optional[str] + """The Google Cloud project number for JWT verification""" + + service_account_key: Optional[str] + """The service account key (returned as '********' if configured, null otherwise)""" + session_duration: Optional[float] - """The session duration (in milliseconds)""" + """The session duration for the integration""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float) -> None: + def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], auto_respond: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], project_number: Optional[str], service_account_key: Optional[str], session_duration: Optional[float], updated_at: float) -> None: self.alias = alias self.allow_from = allow_from self.attachments = attachments + self.auto_respond = auto_respond self.blueprint_id = blueprint_id self.bot_id = bot_id self.contact_collection = contact_collection @@ -29871,15 +28511,18 @@ def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: self.id = id self.meta = meta self.name = name + self.project_number = project_number + self.service_account_key = service_account_key self.session_duration = session_duration self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'IntegrationTelegramFetchResponse': + def from_dict(obj: Any) -> 'GooglechatIntegrationFetchResponse': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) allow_from = from_union([from_str, from_none], obj.get("allowFrom")) attachments = from_union([from_bool, from_none], obj.get("attachments")) + auto_respond = from_union([from_str, from_none], obj.get("autoRespond")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) @@ -29888,9 +28531,11 @@ def from_dict(obj: Any) -> 'IntegrationTelegramFetchResponse': id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) + project_number = from_union([from_str, from_none], obj.get("projectNumber")) + service_account_key = from_union([from_str, from_none], obj.get("serviceAccountKey")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) updated_at = from_float(obj.get("updatedAt")) - return IntegrationTelegramFetchResponse(alias, allow_from, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at) + return GooglechatIntegrationFetchResponse(alias, allow_from, attachments, auto_respond, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, project_number, service_account_key, session_duration, updated_at) def to_dict(self) -> dict: result: dict = {} @@ -29900,6 +28545,8 @@ def to_dict(self) -> dict: result["allowFrom"] = from_union([from_str, from_none], self.allow_from) if self.attachments is not None: result["attachments"] = from_union([from_bool, from_none], self.attachments) + if self.auto_respond is not None: + result["autoRespond"] = from_union([from_str, from_none], self.auto_respond) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: @@ -29914,43 +28561,47 @@ def to_dict(self) -> dict: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.project_number is not None: + result["projectNumber"] = from_union([from_str, from_none], self.project_number) + if self.service_account_key is not None: + result["serviceAccountKey"] = from_union([from_str, from_none], self.service_account_key) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) result["updatedAt"] = to_float(self.updated_at) return result -class IntegrationTelegramSetupParams: - telegram_integration_id: str - """The ID of the Telegram integration""" +class GooglechatIntegrationDeleteParams: + googlechat_integration_id: str + """The ID of the Google Chat integration""" - def __init__(self, telegram_integration_id: str) -> None: - self.telegram_integration_id = telegram_integration_id + def __init__(self, googlechat_integration_id: str) -> None: + self.googlechat_integration_id = googlechat_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationTelegramSetupParams': + def from_dict(obj: Any) -> 'GooglechatIntegrationDeleteParams': assert isinstance(obj, dict) - telegram_integration_id = from_str(obj.get("telegramIntegrationId")) - return IntegrationTelegramSetupParams(telegram_integration_id) + googlechat_integration_id = from_str(obj.get("googlechatIntegrationId")) + return GooglechatIntegrationDeleteParams(googlechat_integration_id) def to_dict(self) -> dict: result: dict = {} - result["telegramIntegrationId"] = from_str(self.telegram_integration_id) + result["googlechatIntegrationId"] = from_str(self.googlechat_integration_id) return result -class IntegrationTelegramSetupResponse: +class GooglechatIntegrationDeleteResponse: id: str - """The ID of the Telegram Integration""" + """The ID of the deleted Google Chat integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationTelegramSetupResponse': + def from_dict(obj: Any) -> 'GooglechatIntegrationDeleteResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationTelegramSetupResponse(id) + return GooglechatIntegrationDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -29958,147 +28609,165 @@ def to_dict(self) -> dict: return result -class IntegrationTelegramUpdateParams: - telegram_integration_id: str - """The ID of the Telegram integration""" +class GithubIntegrationListParamsOrder(Enum): + """The order of the paginated items""" - def __init__(self, telegram_integration_id: str) -> None: - self.telegram_integration_id = telegram_integration_id + ASC = "asc" + DESC = "desc" + + +class GithubIntegrationListParams: + cursor: Optional[str] + """The cursor to use for pagination""" + + meta: Optional[Dict[str, str]] + """Key-value pairs to filter by metadata""" + + order: Optional[GithubIntegrationListParamsOrder] + """The order of the paginated items""" + + take: Optional[int] + """The number of items to retrieve""" + + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[GithubIntegrationListParamsOrder], take: Optional[int]) -> None: + self.cursor = cursor + self.meta = meta + self.order = order + self.take = take @staticmethod - def from_dict(obj: Any) -> 'IntegrationTelegramUpdateParams': + def from_dict(obj: Any) -> 'GithubIntegrationListParams': assert isinstance(obj, dict) - telegram_integration_id = from_str(obj.get("telegramIntegrationId")) - return IntegrationTelegramUpdateParams(telegram_integration_id) + cursor = from_union([from_str, from_none], obj.get("cursor")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([GithubIntegrationListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return GithubIntegrationListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} - result["telegramIntegrationId"] = from_str(self.telegram_integration_id) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(GithubIntegrationListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class IntegrationTelegramUpdateRequest: - """A bot configuration that can be applied without a dedicated bot instance.""" +class GithubIntegrationListResponseItem: + """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" - allow_from: Optional[str] - """Newline-or-comma-separated list of allowed senders. Use @username or @numericId for users,""" - - attachments: Optional[bool] - """Weather the bot supports attachments""" - blueprint_id: Optional[str] """The ID of the blueprint""" bot_id: Optional[str] """The ID of the bot this configuration is using""" - bot_token: Optional[str] - """The Telegram integration bot token""" - - contact_collection: Optional[bool] - """Weather to collect contacts""" + created_at: float + """The timestamp (ms) when the instance was created""" description: Optional[str] """The associated description""" + id: str + """The instance ID""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - session_duration: Optional[float] - """The session duration (in milliseconds)""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], bot_token: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float]) -> None: + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: self.alias = alias - self.allow_from = allow_from - self.attachments = attachments self.blueprint_id = blueprint_id self.bot_id = bot_id - self.bot_token = bot_token - self.contact_collection = contact_collection + self.created_at = created_at self.description = description + self.id = id self.meta = meta self.name = name - self.session_duration = session_duration + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'IntegrationTelegramUpdateRequest': + def from_dict(obj: Any) -> 'GithubIntegrationListResponseItem': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) - allow_from = from_union([from_str, from_none], obj.get("allowFrom")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) - bot_token = from_union([from_str, from_none], obj.get("botToken")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - return IntegrationTelegramUpdateRequest(alias, allow_from, attachments, blueprint_id, bot_id, bot_token, contact_collection, description, meta, name, session_duration) + updated_at = from_float(obj.get("updatedAt")) + return GithubIntegrationListResponseItem(alias, blueprint_id, bot_id, created_at, description, id, meta, name, updated_at) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.allow_from is not None: - result["allowFrom"] = from_union([from_str, from_none], self.allow_from) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.bot_token is not None: - result["botToken"] = from_union([from_str, from_none], self.bot_token) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + result["updatedAt"] = to_float(self.updated_at) return result -class IntegrationTelegramUpdateResponse: - id: str - """The ID of the Telegram Integration""" +class GithubIntegrationListResponse: + cursor: str + """Cursor for fetching the next page""" - def __init__(self, id: str) -> None: - self.id = id + items: List[GithubIntegrationListResponseItem] + + def __init__(self, cursor: str, items: List[GithubIntegrationListResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'IntegrationTelegramUpdateResponse': + def from_dict(obj: Any) -> 'GithubIntegrationListResponse': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return IntegrationTelegramUpdateResponse(id) + cursor = from_str(obj.get("cursor")) + items = from_list(GithubIntegrationListResponseItem.from_dict, obj.get("items")) + return GithubIntegrationListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(GithubIntegrationListResponseItem, x), self.items) return result -class IntegrationTelegramCreateRequest: +class GithubIntegrationCreateRequest: """A bot configuration that can be applied without a dedicated bot instance.""" alias: Optional[str] """The unique alias for the instance""" allow_from: Optional[str] - """Newline-or-comma-separated list of allowed senders. Use @username or @numericId for users,""" - - attachments: Optional[bool] - """Weather the bot supports attachments""" + """Restricts who can summon the bot. Comma or newline separated list of `@collaborators`, + `@login`, `owner/repo`, `owner/*` or `*`. Defaults to `@collaborators`. + """ + app_id: Optional[str] + """This integration's GitHub App id (signs the App JWT)""" blueprint_id: Optional[str] """The ID of the blueprint""" @@ -30106,11 +28775,8 @@ class IntegrationTelegramCreateRequest: bot_id: Optional[str] """The ID of the bot this configuration is using""" - bot_token: Optional[str] - """The Telegram integration bot token""" - contact_collection: Optional[bool] - """Weather to collect contacts""" + """Whether to collect contacts""" description: Optional[str] """The associated description""" @@ -30121,37 +28787,45 @@ class IntegrationTelegramCreateRequest: name: Optional[str] """The associated name""" + private_key: Optional[str] + """This integration's GitHub App private key (PEM)""" + session_duration: Optional[float] - """The session duration (in milliseconds)""" + """The session duration for the GitHub integration""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], bot_token: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float]) -> None: + webhook_secret: Optional[str] + """The GitHub App webhook secret used to validate x-hub-signature-256""" + + def __init__(self, alias: Optional[str], allow_from: Optional[str], app_id: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], private_key: Optional[str], session_duration: Optional[float], webhook_secret: Optional[str]) -> None: self.alias = alias self.allow_from = allow_from - self.attachments = attachments + self.app_id = app_id self.blueprint_id = blueprint_id self.bot_id = bot_id - self.bot_token = bot_token self.contact_collection = contact_collection self.description = description self.meta = meta self.name = name + self.private_key = private_key self.session_duration = session_duration + self.webhook_secret = webhook_secret @staticmethod - def from_dict(obj: Any) -> 'IntegrationTelegramCreateRequest': + def from_dict(obj: Any) -> 'GithubIntegrationCreateRequest': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) allow_from = from_union([from_str, from_none], obj.get("allowFrom")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) + app_id = from_union([from_str, from_none], obj.get("appId")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) - bot_token = from_union([from_str, from_none], obj.get("botToken")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) description = from_union([from_str, from_none], obj.get("description")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) + private_key = from_union([from_str, from_none], obj.get("privateKey")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - return IntegrationTelegramCreateRequest(alias, allow_from, attachments, blueprint_id, bot_id, bot_token, contact_collection, description, meta, name, session_duration) + webhook_secret = from_union([from_str, from_none], obj.get("webhookSecret")) + return GithubIntegrationCreateRequest(alias, allow_from, app_id, blueprint_id, bot_id, contact_collection, description, meta, name, private_key, session_duration, webhook_secret) def to_dict(self) -> dict: result: dict = {} @@ -30159,14 +28833,12 @@ def to_dict(self) -> dict: result["alias"] = from_union([from_str, from_none], self.alias) if self.allow_from is not None: result["allowFrom"] = from_union([from_str, from_none], self.allow_from) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) + if self.app_id is not None: + result["appId"] = from_union([from_str, from_none], self.app_id) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.bot_token is not None: - result["botToken"] = from_union([from_str, from_none], self.bot_token) if self.contact_collection is not None: result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) if self.description is not None: @@ -30175,23 +28847,27 @@ def to_dict(self) -> dict: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.private_key is not None: + result["privateKey"] = from_union([from_str, from_none], self.private_key) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.webhook_secret is not None: + result["webhookSecret"] = from_union([from_str, from_none], self.webhook_secret) return result -class IntegrationTelegramCreateResponse: +class GithubIntegrationCreateResponse: id: str - """The ID of the Telegram Integration""" + """The ID of the GitHub Integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationTelegramCreateResponse': + def from_dict(obj: Any) -> 'GithubIntegrationCreateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationTelegramCreateResponse(id) + return GithubIntegrationCreateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -30199,192 +28875,149 @@ def to_dict(self) -> dict: return result -class IntegrationTelegramListParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" - - -class IntegrationTelegramListParams: - cursor: Optional[str] - """The cursor to use for pagination""" - - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" - - order: Optional[IntegrationTelegramListParamsOrder] - """The order of the paginated items""" - - take: Optional[int] - """The number of items to retrieve""" +class GithubIntegrationUpdateParams: + github_integration_id: str + """The ID of the GitHub integration""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationTelegramListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take + def __init__(self, github_integration_id: str) -> None: + self.github_integration_id = github_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationTelegramListParams': + def from_dict(obj: Any) -> 'GithubIntegrationUpdateParams': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([IntegrationTelegramListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return IntegrationTelegramListParams(cursor, meta, order, take) + github_integration_id = from_str(obj.get("githubIntegrationId")) + return GithubIntegrationUpdateParams(github_integration_id) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(IntegrationTelegramListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["githubIntegrationId"] = from_str(self.github_integration_id) return result -class IntegrationTelegramListResponseItem: - """Blueprint properties""" +class GithubIntegrationUpdateRequest: + """A bot configuration that can be applied without a dedicated bot instance.""" alias: Optional[str] """The unique alias for the instance""" - allow_from: Optional[str] - """Newline-or-comma-separated list of allowed senders. Use @username or @numericId for users,""" - - attachments: Optional[bool] - """Weather the bot supports attachments""" - blueprint_id: Optional[str] """The ID of the blueprint""" bot_id: Optional[str] """The ID of the bot this configuration is using""" - contact_collection: Optional[bool] - """Weather to collect contacts""" - - created_at: float - """The timestamp (ms) when the instance was created""" - description: Optional[str] """The associated description""" - id: str - """The instance ID""" - meta: Optional[Dict[str, Any]] """Meta data information""" - name: Optional[str] - """The associated name""" - - session_duration: Optional[float] - """The session duration (in milliseconds)""" - - updated_at: float - """The timestamp (ms) when the instance was updated""" + name: Optional[str] + """The associated name""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float) -> None: + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str]) -> None: self.alias = alias - self.allow_from = allow_from - self.attachments = attachments self.blueprint_id = blueprint_id self.bot_id = bot_id - self.contact_collection = contact_collection - self.created_at = created_at self.description = description - self.id = id self.meta = meta self.name = name - self.session_duration = session_duration - self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'IntegrationTelegramListResponseItem': + def from_dict(obj: Any) -> 'GithubIntegrationUpdateRequest': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) - allow_from = from_union([from_str, from_none], obj.get("allowFrom")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) - created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - updated_at = from_float(obj.get("updatedAt")) - return IntegrationTelegramListResponseItem(alias, allow_from, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at) + return GithubIntegrationUpdateRequest(alias, blueprint_id, bot_id, description, meta, name) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.allow_from is not None: - result["allowFrom"] = from_union([from_str, from_none], self.allow_from) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) - result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - result["updatedAt"] = to_float(self.updated_at) return result -class IntegrationTelegramListResponse: - cursor: str - """Cursor for fetching the next page""" +class GithubIntegrationUpdateResponse: + id: str + """The ID of the GitHub Integration""" - items: List[IntegrationTelegramListResponseItem] + def __init__(self, id: str) -> None: + self.id = id - def __init__(self, cursor: str, items: List[IntegrationTelegramListResponseItem]) -> None: - self.cursor = cursor - self.items = items + @staticmethod + def from_dict(obj: Any) -> 'GithubIntegrationUpdateResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return GithubIntegrationUpdateResponse(id) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result + + +class GithubIntegrationSetupParams: + github_integration_id: str + + def __init__(self, github_integration_id: str) -> None: + self.github_integration_id = github_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationTelegramListResponse': + def from_dict(obj: Any) -> 'GithubIntegrationSetupParams': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(IntegrationTelegramListResponseItem.from_dict, obj.get("items")) - return IntegrationTelegramListResponse(cursor, items) + github_integration_id = from_str(obj.get("githubIntegrationId")) + return GithubIntegrationSetupParams(github_integration_id) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(IntegrationTelegramListResponseItem, x), self.items) + result["githubIntegrationId"] = from_str(self.github_integration_id) return result -class IntegrationTelegramListStreamItemData: +class GithubIntegrationFetchParams: + github_integration_id: str + """The ID of the GitHub integration to retrieve""" + + def __init__(self, github_integration_id: str) -> None: + self.github_integration_id = github_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'GithubIntegrationFetchParams': + assert isinstance(obj, dict) + github_integration_id = from_str(obj.get("githubIntegrationId")) + return GithubIntegrationFetchParams(github_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["githubIntegrationId"] = from_str(self.github_integration_id) + return result + + +class GithubIntegrationFetchResponse: """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" allow_from: Optional[str] - """Newline-or-comma-separated list of allowed senders. Use @username or @numericId for users,""" + """Who may talk to the agent through this integration""" - attachments: Optional[bool] - """Weather the bot supports attachments""" + app_id: Optional[str] + """The GitHub App ID""" blueprint_id: Optional[str] """The ID of the blueprint""" @@ -30393,7 +29026,7 @@ class IntegrationTelegramListStreamItemData: """The ID of the bot this configuration is using""" contact_collection: Optional[bool] - """Weather to collect contacts""" + """Whether to collect contacts""" created_at: float """The timestamp (ms) when the instance was created""" @@ -30410,16 +29043,22 @@ class IntegrationTelegramListStreamItemData: name: Optional[str] """The associated name""" + private_key: Optional[str] + """The GitHub App private key (returned as '********' if configured, null otherwise)""" + session_duration: Optional[float] - """The session duration (in milliseconds)""" + """The session duration for the GitHub integration""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float) -> None: + webhook_secret: Optional[str] + """The webhook secret to paste into the GitHub App settings""" + + def __init__(self, alias: Optional[str], allow_from: Optional[str], app_id: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], private_key: Optional[str], session_duration: Optional[float], updated_at: float, webhook_secret: Optional[str]) -> None: self.alias = alias self.allow_from = allow_from - self.attachments = attachments + self.app_id = app_id self.blueprint_id = blueprint_id self.bot_id = bot_id self.contact_collection = contact_collection @@ -30428,15 +29067,17 @@ def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: self.id = id self.meta = meta self.name = name + self.private_key = private_key self.session_duration = session_duration self.updated_at = updated_at + self.webhook_secret = webhook_secret @staticmethod - def from_dict(obj: Any) -> 'IntegrationTelegramListStreamItemData': + def from_dict(obj: Any) -> 'GithubIntegrationFetchResponse': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) allow_from = from_union([from_str, from_none], obj.get("allowFrom")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) + app_id = from_union([from_str, from_none], obj.get("appId")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) @@ -30445,9 +29086,11 @@ def from_dict(obj: Any) -> 'IntegrationTelegramListStreamItemData': id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) + private_key = from_union([from_str, from_none], obj.get("privateKey")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) updated_at = from_float(obj.get("updatedAt")) - return IntegrationTelegramListStreamItemData(alias, allow_from, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at) + webhook_secret = from_union([from_str, from_none], obj.get("webhookSecret")) + return GithubIntegrationFetchResponse(alias, allow_from, app_id, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, private_key, session_duration, updated_at, webhook_secret) def to_dict(self) -> dict: result: dict = {} @@ -30455,8 +29098,8 @@ def to_dict(self) -> dict: result["alias"] = from_union([from_str, from_none], self.alias) if self.allow_from is not None: result["allowFrom"] = from_union([from_str, from_none], self.allow_from) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) + if self.app_id is not None: + result["appId"] = from_union([from_str, from_none], self.app_id) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: @@ -30471,74 +29114,47 @@ def to_dict(self) -> dict: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.private_key is not None: + result["privateKey"] = from_union([from_str, from_none], self.private_key) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) result["updatedAt"] = to_float(self.updated_at) + if self.webhook_secret is not None: + result["webhookSecret"] = from_union([from_str, from_none], self.webhook_secret) return result -class IntegrationTelegramListStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - - -class IntegrationTelegramListStreamItem: - data: IntegrationTelegramListStreamItemData - """Blueprint properties""" - - type: IntegrationTelegramListStreamItemType - """The type of event""" - - def __init__(self, data: IntegrationTelegramListStreamItemData, type: IntegrationTelegramListStreamItemType) -> None: - self.data = data - self.type = type - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationTelegramListStreamItem': - assert isinstance(obj, dict) - data = IntegrationTelegramListStreamItemData.from_dict(obj.get("data")) - type = IntegrationTelegramListStreamItemType(obj.get("type")) - return IntegrationTelegramListStreamItem(data, type) - - def to_dict(self) -> dict: - result: dict = {} - result["data"] = to_class(IntegrationTelegramListStreamItemData, self.data) - result["type"] = to_enum(IntegrationTelegramListStreamItemType, self.type) - return result - - -class TriggerIntegrationDeleteParams: - trigger_integration_id: str - """The ID of the Trigger integration""" +class GithubIntegrationDeleteParams: + github_integration_id: str + """The ID of the GitHub integration""" - def __init__(self, trigger_integration_id: str) -> None: - self.trigger_integration_id = trigger_integration_id + def __init__(self, github_integration_id: str) -> None: + self.github_integration_id = github_integration_id @staticmethod - def from_dict(obj: Any) -> 'TriggerIntegrationDeleteParams': + def from_dict(obj: Any) -> 'GithubIntegrationDeleteParams': assert isinstance(obj, dict) - trigger_integration_id = from_str(obj.get("triggerIntegrationId")) - return TriggerIntegrationDeleteParams(trigger_integration_id) + github_integration_id = from_str(obj.get("githubIntegrationId")) + return GithubIntegrationDeleteParams(github_integration_id) def to_dict(self) -> dict: result: dict = {} - result["triggerIntegrationId"] = from_str(self.trigger_integration_id) + result["githubIntegrationId"] = from_str(self.github_integration_id) return result -class TriggerIntegrationDeleteResponse: +class GithubIntegrationDeleteResponse: id: str - """The ID of the deleted Trigger integration""" + """The ID of the deleted GitHub integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'TriggerIntegrationDeleteResponse': + def from_dict(obj: Any) -> 'GithubIntegrationDeleteResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return TriggerIntegrationDeleteResponse(id) + return GithubIntegrationDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -30546,39 +29162,65 @@ def to_dict(self) -> dict: return result -class TriggerIntegrationFetchParams: - trigger_integration_id: str - """The ID of the Trigger integration to retrieve""" +class IntegrationExtractListParamsOrder(Enum): + """The order of the paginated items""" - def __init__(self, trigger_integration_id: str) -> None: - self.trigger_integration_id = trigger_integration_id + ASC = "asc" + DESC = "desc" + + +class IntegrationExtractListParams: + cursor: Optional[str] + """The cursor to use for pagination""" + + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" + + order: Optional[IntegrationExtractListParamsOrder] + """The order of the paginated items""" + + take: Optional[int] + """The number of items to retrieve""" + + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationExtractListParamsOrder], take: Optional[int]) -> None: + self.cursor = cursor + self.meta = meta + self.order = order + self.take = take @staticmethod - def from_dict(obj: Any) -> 'TriggerIntegrationFetchParams': + def from_dict(obj: Any) -> 'IntegrationExtractListParams': assert isinstance(obj, dict) - trigger_integration_id = from_str(obj.get("triggerIntegrationId")) - return TriggerIntegrationFetchParams(trigger_integration_id) + cursor = from_union([from_str, from_none], obj.get("cursor")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([IntegrationExtractListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return IntegrationExtractListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} - result["triggerIntegrationId"] = from_str(self.trigger_integration_id) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(IntegrationExtractListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class TriggerIntegrationFetchResponse: - """A bot configuration that can be applied without a dedicated bot instance.""" +class IntegrationExtractListResponseItem: + """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" - authenticate: Optional[bool] - """When enabled the integration requires authentication""" - blueprint_id: Optional[str] """The ID of the blueprint""" - bot_id: Optional[str] - """The ID of the bot this configuration is using""" + bot_id: str + """The ID of the Bot to use""" created_at: float """The timestamp (ms) when the instance was created""" @@ -30589,214 +29231,241 @@ class TriggerIntegrationFetchResponse: id: str """The instance ID""" - last_trigger_at: Optional[float] - """The timestamp (ms) of the last trigger execution""" - meta: Optional[Dict[str, Any]] """Meta data information""" + model: Optional[str] + """The language model to use for data extraction""" + name: Optional[str] """The associated name""" - next_trigger_at: Optional[float] - """The timestamp (ms) of the next scheduled trigger execution""" - - schedule: Optional[str] - """The schedule for the trigger integration (interval, cron expression, ISO date, or null)""" - - secret: str - """The Trigger integration secret""" - - session_duration: Optional[float] - """The session duration (in milliseconds)""" + request: Optional[str] + """Optional webhook to receive the extracted data""" - timezone: Optional[str] - """The IANA timezone identifier used to evaluate the trigger schedule.""" + schema: Optional[Dict[str, Any]] + """The configured extraction schema""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], authenticate: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], created_at: float, description: Optional[str], id: str, last_trigger_at: Optional[float], meta: Optional[Dict[str, Any]], name: Optional[str], next_trigger_at: Optional[float], schedule: Optional[str], secret: str, session_duration: Optional[float], timezone: Optional[str], updated_at: float) -> None: + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: str, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], model: Optional[str], name: Optional[str], request: Optional[str], schema: Optional[Dict[str, Any]], updated_at: float) -> None: self.alias = alias - self.authenticate = authenticate self.blueprint_id = blueprint_id self.bot_id = bot_id self.created_at = created_at self.description = description self.id = id - self.last_trigger_at = last_trigger_at self.meta = meta + self.model = model self.name = name - self.next_trigger_at = next_trigger_at - self.schedule = schedule - self.secret = secret - self.session_duration = session_duration - self.timezone = timezone + self.request = request + self.schema = schema self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'TriggerIntegrationFetchResponse': + def from_dict(obj: Any) -> 'IntegrationExtractListResponseItem': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) - authenticate = from_union([from_bool, from_none], obj.get("authenticate")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) + bot_id = from_str(obj.get("botId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) - last_trigger_at = from_union([from_float, from_none], obj.get("lastTriggerAt")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + model = from_union([from_str, from_none], obj.get("model")) name = from_union([from_str, from_none], obj.get("name")) - next_trigger_at = from_union([from_float, from_none], obj.get("nextTriggerAt")) - schedule = from_union([from_str, from_none], obj.get("schedule")) - secret = from_str(obj.get("secret")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - timezone = from_union([from_str, from_none], obj.get("timezone")) + request = from_union([from_str, from_none], obj.get("request")) + schema = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("schema")) updated_at = from_float(obj.get("updatedAt")) - return TriggerIntegrationFetchResponse(alias, authenticate, blueprint_id, bot_id, created_at, description, id, last_trigger_at, meta, name, next_trigger_at, schedule, secret, session_duration, timezone, updated_at) + return IntegrationExtractListResponseItem(alias, blueprint_id, bot_id, created_at, description, id, meta, model, name, request, schema, updated_at) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.authenticate is not None: - result["authenticate"] = from_union([from_bool, from_none], self.authenticate) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) + result["botId"] = from_str(self.bot_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) - if self.last_trigger_at is not None: - result["lastTriggerAt"] = from_union([to_float, from_none], self.last_trigger_at) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.next_trigger_at is not None: - result["nextTriggerAt"] = from_union([to_float, from_none], self.next_trigger_at) - if self.schedule is not None: - result["schedule"] = from_union([from_str, from_none], self.schedule) - result["secret"] = from_str(self.secret) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - if self.timezone is not None: - result["timezone"] = from_union([from_str, from_none], self.timezone) + if self.request is not None: + result["request"] = from_union([from_str, from_none], self.request) + if self.schema is not None: + result["schema"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.schema) result["updatedAt"] = to_float(self.updated_at) return result -class TriggerIntegrationInvokeParams: - trigger_integration_id: str - """The ID of the Trigger integration""" +class IntegrationExtractListResponse: + cursor: str + """Cursor for fetching the next page""" - def __init__(self, trigger_integration_id: str) -> None: - self.trigger_integration_id = trigger_integration_id + items: List[IntegrationExtractListResponseItem] + + def __init__(self, cursor: str, items: List[IntegrationExtractListResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'TriggerIntegrationInvokeParams': + def from_dict(obj: Any) -> 'IntegrationExtractListResponse': assert isinstance(obj, dict) - trigger_integration_id = from_str(obj.get("triggerIntegrationId")) - return TriggerIntegrationInvokeParams(trigger_integration_id) + cursor = from_str(obj.get("cursor")) + items = from_list(IntegrationExtractListResponseItem.from_dict, obj.get("items")) + return IntegrationExtractListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["triggerIntegrationId"] = from_str(self.trigger_integration_id) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(IntegrationExtractListResponseItem, x), self.items) return result -class TriggerIntegrationInvokeResponse: - id: str - """The ID of the trigged Trigger integration""" +class IntegrationExtractListStreamItemData: + """Blueprint properties""" - def __init__(self, id: str) -> None: - self.id = id + alias: Optional[str] + """The unique alias for the instance""" - @staticmethod - def from_dict(obj: Any) -> 'TriggerIntegrationInvokeResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return TriggerIntegrationInvokeResponse(id) + blueprint_id: Optional[str] + """The ID of the blueprint""" - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result + bot_id: str + """The ID of the Bot to use""" + created_at: float + """The timestamp (ms) when the instance was created""" -class TriggerIntegrationSetupParams: - trigger_integration_id: str - """The ID of the Trigger integration""" + description: Optional[str] + """The associated description""" - def __init__(self, trigger_integration_id: str) -> None: - self.trigger_integration_id = trigger_integration_id + id: str + """The instance ID""" - @staticmethod - def from_dict(obj: Any) -> 'TriggerIntegrationSetupParams': - assert isinstance(obj, dict) - trigger_integration_id = from_str(obj.get("triggerIntegrationId")) - return TriggerIntegrationSetupParams(trigger_integration_id) + meta: Optional[Dict[str, Any]] + """Meta data information""" - def to_dict(self) -> dict: - result: dict = {} - result["triggerIntegrationId"] = from_str(self.trigger_integration_id) - return result + model: Optional[str] + """The language model to use for data extraction""" + + name: Optional[str] + """The associated name""" + request: Optional[str] + """Optional webhook to receive the extracted data""" -class TriggerIntegrationSetupResponse: - id: str - """The ID of the Trigger Integration""" + schema: Optional[Dict[str, Any]] + """The configured extraction schema""" - def __init__(self, id: str) -> None: + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: str, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], model: Optional[str], name: Optional[str], request: Optional[str], schema: Optional[Dict[str, Any]], updated_at: float) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.created_at = created_at + self.description = description self.id = id + self.meta = meta + self.model = model + self.name = name + self.request = request + self.schema = schema + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'TriggerIntegrationSetupResponse': + def from_dict(obj: Any) -> 'IntegrationExtractListStreamItemData': assert isinstance(obj, dict) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_str(obj.get("botId")) + created_at = from_float(obj.get("createdAt")) + description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) - return TriggerIntegrationSetupResponse(id) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + model = from_union([from_str, from_none], obj.get("model")) + name = from_union([from_str, from_none], obj.get("name")) + request = from_union([from_str, from_none], obj.get("request")) + schema = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("schema")) + updated_at = from_float(obj.get("updatedAt")) + return IntegrationExtractListStreamItemData(alias, blueprint_id, bot_id, created_at, description, id, meta, model, name, request, schema, updated_at) def to_dict(self) -> dict: result: dict = {} + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + result["botId"] = from_str(self.bot_id) + result["createdAt"] = to_float(self.created_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.request is not None: + result["request"] = from_union([from_str, from_none], self.request) + if self.schema is not None: + result["schema"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.schema) + result["updatedAt"] = to_float(self.updated_at) return result -class TriggerIntegrationUpdateParams: - trigger_integration_id: str - """The ID of the Trigger integration""" +class IntegrationExtractListStreamItemType(Enum): + """The type of event""" - def __init__(self, trigger_integration_id: str) -> None: - self.trigger_integration_id = trigger_integration_id + ITEM = "item" + + +class IntegrationExtractListStreamItem: + data: IntegrationExtractListStreamItemData + """Blueprint properties""" + + type: IntegrationExtractListStreamItemType + """The type of event""" + + def __init__(self, data: IntegrationExtractListStreamItemData, type: IntegrationExtractListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'TriggerIntegrationUpdateParams': + def from_dict(obj: Any) -> 'IntegrationExtractListStreamItem': assert isinstance(obj, dict) - trigger_integration_id = from_str(obj.get("triggerIntegrationId")) - return TriggerIntegrationUpdateParams(trigger_integration_id) + data = IntegrationExtractListStreamItemData.from_dict(obj.get("data")) + type = IntegrationExtractListStreamItemType(obj.get("type")) + return IntegrationExtractListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["triggerIntegrationId"] = from_str(self.trigger_integration_id) + result["data"] = to_class(IntegrationExtractListStreamItemData, self.data) + result["type"] = to_enum(IntegrationExtractListStreamItemType, self.type) return result -class TriggerIntegrationUpdateRequest: - """A bot configuration that can be applied without a dedicated bot instance.""" +class IntegrationExtractCreateRequest: + """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" - authenticate: Optional[bool] - """When enabled the integration requires authentication""" - blueprint_id: Optional[str] """The ID of the blueprint""" bot_id: Optional[str] - """The ID of the bot this configuration is using""" + """The ID of the Bot to use""" description: Optional[str] """The associated description""" @@ -30804,51 +29473,47 @@ class TriggerIntegrationUpdateRequest: meta: Optional[Dict[str, Any]] """Meta data information""" + model: Optional[str] + """The language model to use for data extraction""" + name: Optional[str] """The associated name""" - schedule: Optional[str] - """The schedule for the trigger integration (interval, cron expression, or ISO date)""" - - session_duration: Optional[float] - """The session duration (in milliseconds)""" + request: Optional[str] + """Optional webhook to receive the extracted data""" - timezone: Optional[str] - """An optional IANA timezone identifier used when evaluating the trigger schedule.""" + schema: Optional[Dict[str, Any]] + """The configured extraction schema""" - def __init__(self, alias: Optional[str], authenticate: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], schedule: Optional[str], session_duration: Optional[float], timezone: Optional[str]) -> None: + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], model: Optional[str], name: Optional[str], request: Optional[str], schema: Optional[Dict[str, Any]]) -> None: self.alias = alias - self.authenticate = authenticate self.blueprint_id = blueprint_id self.bot_id = bot_id self.description = description self.meta = meta + self.model = model self.name = name - self.schedule = schedule - self.session_duration = session_duration - self.timezone = timezone + self.request = request + self.schema = schema @staticmethod - def from_dict(obj: Any) -> 'TriggerIntegrationUpdateRequest': + def from_dict(obj: Any) -> 'IntegrationExtractCreateRequest': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) - authenticate = from_union([from_bool, from_none], obj.get("authenticate")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) description = from_union([from_str, from_none], obj.get("description")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - schedule = from_union([from_str, from_none], obj.get("schedule")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - timezone = from_union([from_str, from_none], obj.get("timezone")) - return TriggerIntegrationUpdateRequest(alias, authenticate, blueprint_id, bot_id, description, meta, name, schedule, session_duration, timezone) + model = from_union([from_str, from_none], obj.get("model")) + name = from_union([from_str, from_none], obj.get("name")) + request = from_union([from_str, from_none], obj.get("request")) + schema = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("schema")) + return IntegrationExtractCreateRequest(alias, blueprint_id, bot_id, description, meta, model, name, request, schema) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.authenticate is not None: - result["authenticate"] = from_union([from_bool, from_none], self.authenticate) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: @@ -30857,29 +29522,29 @@ def to_dict(self) -> dict: result["description"] = from_union([from_str, from_none], self.description) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.schedule is not None: - result["schedule"] = from_union([from_str, from_none], self.schedule) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - if self.timezone is not None: - result["timezone"] = from_union([from_str, from_none], self.timezone) + if self.request is not None: + result["request"] = from_union([from_str, from_none], self.request) + if self.schema is not None: + result["schema"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.schema) return result -class TriggerIntegrationUpdateResponse: +class IntegrationExtractCreateResponse: id: str - """The ID of the Trigger Integration""" + """The ID of the Extract Integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'TriggerIntegrationUpdateResponse': + def from_dict(obj: Any) -> 'IntegrationExtractCreateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return TriggerIntegrationUpdateResponse(id) + return IntegrationExtractCreateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -30887,20 +29552,36 @@ def to_dict(self) -> dict: return result -class TriggerIntegrationCreateRequest: - """A bot configuration that can be applied without a dedicated bot instance.""" +class IntegrationExtractUpdateParams: + extract_integration_id: str + """The ID of the Extract integration""" + + def __init__(self, extract_integration_id: str) -> None: + self.extract_integration_id = extract_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationExtractUpdateParams': + assert isinstance(obj, dict) + extract_integration_id = from_str(obj.get("extractIntegrationId")) + return IntegrationExtractUpdateParams(extract_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["extractIntegrationId"] = from_str(self.extract_integration_id) + return result + + +class IntegrationExtractUpdateRequest: + """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" - authenticate: Optional[bool] - """When enabled the integration requires authentication""" - blueprint_id: Optional[str] """The ID of the blueprint""" bot_id: Optional[str] - """The ID of the bot this configuration is using""" + """The ID of the Bot to use""" description: Optional[str] """The associated description""" @@ -30908,51 +29589,47 @@ class TriggerIntegrationCreateRequest: meta: Optional[Dict[str, Any]] """Meta data information""" + model: Optional[str] + """The language model to use for data extraction""" + name: Optional[str] """The associated name""" - schedule: Optional[str] - """The schedule for the trigger integration (interval, cron expression, or ISO date)""" - - session_duration: Optional[float] - """The session duration (in milliseconds)""" + request: Optional[str] + """Optional webhook to receive the extracted data""" - timezone: Optional[str] - """An optional IANA timezone identifier used when evaluating the trigger schedule.""" + schema: Optional[Dict[str, Any]] + """The configured extraction schema""" - def __init__(self, alias: Optional[str], authenticate: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], schedule: Optional[str], session_duration: Optional[float], timezone: Optional[str]) -> None: + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], model: Optional[str], name: Optional[str], request: Optional[str], schema: Optional[Dict[str, Any]]) -> None: self.alias = alias - self.authenticate = authenticate self.blueprint_id = blueprint_id self.bot_id = bot_id self.description = description self.meta = meta + self.model = model self.name = name - self.schedule = schedule - self.session_duration = session_duration - self.timezone = timezone + self.request = request + self.schema = schema @staticmethod - def from_dict(obj: Any) -> 'TriggerIntegrationCreateRequest': + def from_dict(obj: Any) -> 'IntegrationExtractUpdateRequest': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) - authenticate = from_union([from_bool, from_none], obj.get("authenticate")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) description = from_union([from_str, from_none], obj.get("description")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + model = from_union([from_str, from_none], obj.get("model")) name = from_union([from_str, from_none], obj.get("name")) - schedule = from_union([from_str, from_none], obj.get("schedule")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - timezone = from_union([from_str, from_none], obj.get("timezone")) - return TriggerIntegrationCreateRequest(alias, authenticate, blueprint_id, bot_id, description, meta, name, schedule, session_duration, timezone) + request = from_union([from_str, from_none], obj.get("request")) + schema = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("schema")) + return IntegrationExtractUpdateRequest(alias, blueprint_id, bot_id, description, meta, model, name, request, schema) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.authenticate is not None: - result["authenticate"] = from_union([from_bool, from_none], self.authenticate) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: @@ -30961,29 +29638,29 @@ def to_dict(self) -> dict: result["description"] = from_union([from_str, from_none], self.description) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.schedule is not None: - result["schedule"] = from_union([from_str, from_none], self.schedule) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - if self.timezone is not None: - result["timezone"] = from_union([from_str, from_none], self.timezone) + if self.request is not None: + result["request"] = from_union([from_str, from_none], self.request) + if self.schema is not None: + result["schema"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.schema) return result -class TriggerIntegrationCreateResponse: +class IntegrationExtractUpdateResponse: id: str - """The ID of the Trigger Integration""" + """The ID of the Extract Integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'TriggerIntegrationCreateResponse': + def from_dict(obj: Any) -> 'IntegrationExtractUpdateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return TriggerIntegrationCreateResponse(id) + return IntegrationExtractUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -30991,68 +29668,107 @@ def to_dict(self) -> dict: return result -class TriggerIntegrationListParamsOrder(Enum): - """The order of the paginated items""" +class IntegrationExtractTriggerParams: + extract_integration_id: str + """The ID of the Extract integration""" - ASC = "asc" - DESC = "desc" + def __init__(self, extract_integration_id: str) -> None: + self.extract_integration_id = extract_integration_id + @staticmethod + def from_dict(obj: Any) -> 'IntegrationExtractTriggerParams': + assert isinstance(obj, dict) + extract_integration_id = from_str(obj.get("extractIntegrationId")) + return IntegrationExtractTriggerParams(extract_integration_id) -class TriggerIntegrationListParams: - cursor: Optional[str] - """The cursor to use for pagination""" + def to_dict(self) -> dict: + result: dict = {} + result["extractIntegrationId"] = from_str(self.extract_integration_id) + return result - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" - order: Optional[TriggerIntegrationListParamsOrder] - """The order of the paginated items""" +class IntegrationExtractTriggerRequest: + conversation_ids: Optional[List[str]] + """Array of conversation IDs to process""" - take: Optional[int] - """The number of items to retrieve""" + sample: Optional[int] + """Number of recent conversations to process (default 20)""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[TriggerIntegrationListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take + def __init__(self, conversation_ids: Optional[List[str]], sample: Optional[int]) -> None: + self.conversation_ids = conversation_ids + self.sample = sample @staticmethod - def from_dict(obj: Any) -> 'TriggerIntegrationListParams': + def from_dict(obj: Any) -> 'IntegrationExtractTriggerRequest': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([TriggerIntegrationListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return TriggerIntegrationListParams(cursor, meta, order, take) + conversation_ids = from_union([lambda x: from_list(from_str, x), from_none], obj.get("conversationIds")) + sample = from_union([from_int, from_none], obj.get("sample")) + return IntegrationExtractTriggerRequest(conversation_ids, sample) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(TriggerIntegrationListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + if self.conversation_ids is not None: + result["conversationIds"] = from_union([lambda x: from_list(from_str, x), from_none], self.conversation_ids) + if self.sample is not None: + result["sample"] = from_union([from_int, from_none], self.sample) return result -class TriggerIntegrationListResponseItem: - """A bot configuration that can be applied without a dedicated bot instance.""" +class IntegrationExtractTriggerResponse: + id: str + """ID of the extract integration""" + + triggered: float + """Number of conversations queued for processing""" + + def __init__(self, id: str, triggered: float) -> None: + self.id = id + self.triggered = triggered + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationExtractTriggerResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + triggered = from_float(obj.get("triggered")) + return IntegrationExtractTriggerResponse(id, triggered) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + result["triggered"] = to_float(self.triggered) + return result + + +class IntegrationExtractFetchParams: + extract_integration_id: str + """The ID of the Extract integration to retrieve""" + + def __init__(self, extract_integration_id: str) -> None: + self.extract_integration_id = extract_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationExtractFetchParams': + assert isinstance(obj, dict) + extract_integration_id = from_str(obj.get("extractIntegrationId")) + return IntegrationExtractFetchParams(extract_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["extractIntegrationId"] = from_str(self.extract_integration_id) + return result + + +class IntegrationExtractFetchResponse: + """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" - authenticate: Optional[bool] - """When enabled the integration requires authentication""" - blueprint_id: Optional[str] """The ID of the blueprint""" - bot_id: Optional[str] - """The ID of the bot this configuration is using""" + bot_id: str + """The ID of the Bot to use""" created_at: float """The timestamp (ms) when the instance was created""" @@ -31063,351 +29779,427 @@ class TriggerIntegrationListResponseItem: id: str """The instance ID""" - last_trigger_at: Optional[float] - """The timestamp (ms) of the last trigger execution""" - meta: Optional[Dict[str, Any]] """Meta data information""" + model: Optional[str] + """The language model to use for data extraction""" + name: Optional[str] """The associated name""" - next_trigger_at: Optional[float] - """The timestamp (ms) of the next scheduled trigger execution""" - - schedule: Optional[str] - """The schedule for the trigger integration (interval, cron expression, ISO date, or null)""" - - secret: str - """The Trigger integration secret""" - - session_duration: Optional[float] - """The session duration (in milliseconds)""" + request: Optional[str] + """Optional webhook to receive the extracted data""" - timezone: Optional[str] - """The IANA timezone identifier used to evaluate the trigger schedule.""" + schema: Optional[Dict[str, Any]] + """The configured extraction schema""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], authenticate: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], created_at: float, description: Optional[str], id: str, last_trigger_at: Optional[float], meta: Optional[Dict[str, Any]], name: Optional[str], next_trigger_at: Optional[float], schedule: Optional[str], secret: str, session_duration: Optional[float], timezone: Optional[str], updated_at: float) -> None: + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: str, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], model: Optional[str], name: Optional[str], request: Optional[str], schema: Optional[Dict[str, Any]], updated_at: float) -> None: self.alias = alias - self.authenticate = authenticate self.blueprint_id = blueprint_id self.bot_id = bot_id self.created_at = created_at self.description = description self.id = id - self.last_trigger_at = last_trigger_at self.meta = meta + self.model = model self.name = name - self.next_trigger_at = next_trigger_at - self.schedule = schedule - self.secret = secret - self.session_duration = session_duration - self.timezone = timezone + self.request = request + self.schema = schema self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'TriggerIntegrationListResponseItem': + def from_dict(obj: Any) -> 'IntegrationExtractFetchResponse': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) - authenticate = from_union([from_bool, from_none], obj.get("authenticate")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) + bot_id = from_str(obj.get("botId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) - last_trigger_at = from_union([from_float, from_none], obj.get("lastTriggerAt")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + model = from_union([from_str, from_none], obj.get("model")) name = from_union([from_str, from_none], obj.get("name")) - next_trigger_at = from_union([from_float, from_none], obj.get("nextTriggerAt")) - schedule = from_union([from_str, from_none], obj.get("schedule")) - secret = from_str(obj.get("secret")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - timezone = from_union([from_str, from_none], obj.get("timezone")) + request = from_union([from_str, from_none], obj.get("request")) + schema = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("schema")) updated_at = from_float(obj.get("updatedAt")) - return TriggerIntegrationListResponseItem(alias, authenticate, blueprint_id, bot_id, created_at, description, id, last_trigger_at, meta, name, next_trigger_at, schedule, secret, session_duration, timezone, updated_at) + return IntegrationExtractFetchResponse(alias, blueprint_id, bot_id, created_at, description, id, meta, model, name, request, schema, updated_at) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.authenticate is not None: - result["authenticate"] = from_union([from_bool, from_none], self.authenticate) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) + result["botId"] = from_str(self.bot_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) - if self.last_trigger_at is not None: - result["lastTriggerAt"] = from_union([to_float, from_none], self.last_trigger_at) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.next_trigger_at is not None: - result["nextTriggerAt"] = from_union([to_float, from_none], self.next_trigger_at) - if self.schedule is not None: - result["schedule"] = from_union([from_str, from_none], self.schedule) - result["secret"] = from_str(self.secret) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - if self.timezone is not None: - result["timezone"] = from_union([from_str, from_none], self.timezone) + if self.request is not None: + result["request"] = from_union([from_str, from_none], self.request) + if self.schema is not None: + result["schema"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.schema) result["updatedAt"] = to_float(self.updated_at) return result -class TriggerIntegrationListResponse: - cursor: str - """Cursor for fetching the next page""" +class IntegrationExtractDeleteParams: + extract_integration_id: str + """The ID of the Extract integration""" - items: List[TriggerIntegrationListResponseItem] + def __init__(self, extract_integration_id: str) -> None: + self.extract_integration_id = extract_integration_id - def __init__(self, cursor: str, items: List[TriggerIntegrationListResponseItem]) -> None: - self.cursor = cursor - self.items = items + @staticmethod + def from_dict(obj: Any) -> 'IntegrationExtractDeleteParams': + assert isinstance(obj, dict) + extract_integration_id = from_str(obj.get("extractIntegrationId")) + return IntegrationExtractDeleteParams(extract_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["extractIntegrationId"] = from_str(self.extract_integration_id) + return result + + +class IntegrationExtractDeleteResponse: + id: str + """The ID of the deleted Extract integration""" + + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'TriggerIntegrationListResponse': + def from_dict(obj: Any) -> 'IntegrationExtractDeleteResponse': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(TriggerIntegrationListResponseItem.from_dict, obj.get("items")) - return TriggerIntegrationListResponse(cursor, items) + id = from_str(obj.get("id")) + return IntegrationExtractDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(TriggerIntegrationListResponseItem, x), self.items) + result["id"] = from_str(self.id) return result -class TriggerIntegrationListStreamItemData: - """A bot configuration that can be applied without a dedicated bot instance.""" +class ExtractIntegrationItemListParamsOrder(Enum): + """The order of the paginated items""" - alias: Optional[str] - """The unique alias for the instance""" + ASC = "asc" + DESC = "desc" - authenticate: Optional[bool] - """When enabled the integration requires authentication""" - blueprint_id: Optional[str] - """The ID of the blueprint""" +class ExtractIntegrationItemListParams: + cursor: Optional[str] + """The cursor to use for pagination""" - bot_id: Optional[str] - """The ID of the bot this configuration is using""" + extract_integration_id: str + """The ID of the extract integration""" - created_at: float - """The timestamp (ms) when the instance was created""" + order: Optional[ExtractIntegrationItemListParamsOrder] + """The order of the paginated items""" - description: Optional[str] - """The associated description""" + take: Optional[int] + """The number of items to retrieve""" - id: str - """The instance ID""" + def __init__(self, cursor: Optional[str], extract_integration_id: str, order: Optional[ExtractIntegrationItemListParamsOrder], take: Optional[int]) -> None: + self.cursor = cursor + self.extract_integration_id = extract_integration_id + self.order = order + self.take = take - last_trigger_at: Optional[float] - """The timestamp (ms) of the last trigger execution""" + @staticmethod + def from_dict(obj: Any) -> 'ExtractIntegrationItemListParams': + assert isinstance(obj, dict) + cursor = from_union([from_str, from_none], obj.get("cursor")) + extract_integration_id = from_str(obj.get("extractIntegrationId")) + order = from_union([ExtractIntegrationItemListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return ExtractIntegrationItemListParams(cursor, extract_integration_id, order, take) - meta: Optional[Dict[str, Any]] - """Meta data information""" + def to_dict(self) -> dict: + result: dict = {} + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + result["extractIntegrationId"] = from_str(self.extract_integration_id) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(ExtractIntegrationItemListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) + return result - name: Optional[str] - """The associated name""" - next_trigger_at: Optional[float] - """The timestamp (ms) of the next scheduled trigger execution""" +class ExtractIntegrationItemListResponseItem: + conversation_id: Optional[str] + """The ID of the conversation from which data was extracted""" - schedule: Optional[str] - """The schedule for the trigger integration (interval, cron expression, ISO date, or null)""" + created_at: Optional[str] + """The timestamp when the item was created""" - secret: str - """The Trigger integration secret""" + data: Dict[str, Any] + """The extracted data matching the integration schema""" - session_duration: Optional[float] - """The session duration (in milliseconds)""" + extract_integration_id: str + """The ID of the extract integration""" - timezone: Optional[str] - """The IANA timezone identifier used to evaluate the trigger schedule.""" + id: str + """The unique identifier of the item""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + updated_at: Optional[str] + """The timestamp when the item was last updated""" - def __init__(self, alias: Optional[str], authenticate: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], created_at: float, description: Optional[str], id: str, last_trigger_at: Optional[float], meta: Optional[Dict[str, Any]], name: Optional[str], next_trigger_at: Optional[float], schedule: Optional[str], secret: str, session_duration: Optional[float], timezone: Optional[str], updated_at: float) -> None: - self.alias = alias - self.authenticate = authenticate - self.blueprint_id = blueprint_id - self.bot_id = bot_id + def __init__(self, conversation_id: Optional[str], created_at: Optional[str], data: Dict[str, Any], extract_integration_id: str, id: str, updated_at: Optional[str]) -> None: + self.conversation_id = conversation_id self.created_at = created_at - self.description = description + self.data = data + self.extract_integration_id = extract_integration_id self.id = id - self.last_trigger_at = last_trigger_at - self.meta = meta - self.name = name - self.next_trigger_at = next_trigger_at - self.schedule = schedule - self.secret = secret - self.session_duration = session_duration - self.timezone = timezone self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'TriggerIntegrationListStreamItemData': + def from_dict(obj: Any) -> 'ExtractIntegrationItemListResponseItem': + assert isinstance(obj, dict) + conversation_id = from_union([from_str, from_none], obj.get("conversationId")) + created_at = from_union([from_str, from_none], obj.get("createdAt")) + data = from_dict(lambda x: x, obj.get("data")) + extract_integration_id = from_str(obj.get("extractIntegrationId")) + id = from_str(obj.get("id")) + updated_at = from_union([from_str, from_none], obj.get("updatedAt")) + return ExtractIntegrationItemListResponseItem(conversation_id, created_at, data, extract_integration_id, id, updated_at) + + def to_dict(self) -> dict: + result: dict = {} + if self.conversation_id is not None: + result["conversationId"] = from_union([from_str, from_none], self.conversation_id) + if self.created_at is not None: + result["createdAt"] = from_union([from_str, from_none], self.created_at) + result["data"] = from_dict(lambda x: x, self.data) + result["extractIntegrationId"] = from_str(self.extract_integration_id) + result["id"] = from_str(self.id) + if self.updated_at is not None: + result["updatedAt"] = from_union([from_str, from_none], self.updated_at) + return result + + +class ExtractIntegrationItemListResponse: + cursor: Optional[str] + """Cursor for fetching the next page""" + + items: Optional[List[ExtractIntegrationItemListResponseItem]] + + def __init__(self, cursor: Optional[str], items: Optional[List[ExtractIntegrationItemListResponseItem]]) -> None: + self.cursor = cursor + self.items = items + + @staticmethod + def from_dict(obj: Any) -> 'ExtractIntegrationItemListResponse': + assert isinstance(obj, dict) + cursor = from_union([from_str, from_none], obj.get("cursor")) + items = from_union([lambda x: from_list(ExtractIntegrationItemListResponseItem.from_dict, x), from_none], obj.get("items")) + return ExtractIntegrationItemListResponse(cursor, items) + + def to_dict(self) -> dict: + result: dict = {} + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.items is not None: + result["items"] = from_union([lambda x: from_list(lambda x: to_class(ExtractIntegrationItemListResponseItem, x), x), from_none], self.items) + return result + + +class ExtractIntegrationItemsExportParamsOrder(Enum): + """The order of the paginated items""" + + ASC = "asc" + DESC = "desc" + + +class ExtractIntegrationItemsExportParams: + cursor: Optional[str] + """The cursor to use for pagination""" + + extract_integration_id: str + """The ID of the extract integration""" + + order: Optional[ExtractIntegrationItemsExportParamsOrder] + """The order of the paginated items""" + + take: Optional[int] + """The number of items to retrieve""" + + def __init__(self, cursor: Optional[str], extract_integration_id: str, order: Optional[ExtractIntegrationItemsExportParamsOrder], take: Optional[int]) -> None: + self.cursor = cursor + self.extract_integration_id = extract_integration_id + self.order = order + self.take = take + + @staticmethod + def from_dict(obj: Any) -> 'ExtractIntegrationItemsExportParams': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - authenticate = from_union([from_bool, from_none], obj.get("authenticate")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) - last_trigger_at = from_union([from_float, from_none], obj.get("lastTriggerAt")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - next_trigger_at = from_union([from_float, from_none], obj.get("nextTriggerAt")) - schedule = from_union([from_str, from_none], obj.get("schedule")) - secret = from_str(obj.get("secret")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - timezone = from_union([from_str, from_none], obj.get("timezone")) - updated_at = from_float(obj.get("updatedAt")) - return TriggerIntegrationListStreamItemData(alias, authenticate, blueprint_id, bot_id, created_at, description, id, last_trigger_at, meta, name, next_trigger_at, schedule, secret, session_duration, timezone, updated_at) + cursor = from_union([from_str, from_none], obj.get("cursor")) + extract_integration_id = from_str(obj.get("extractIntegrationId")) + order = from_union([ExtractIntegrationItemsExportParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return ExtractIntegrationItemsExportParams(cursor, extract_integration_id, order, take) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.authenticate is not None: - result["authenticate"] = from_union([from_bool, from_none], self.authenticate) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) - if self.last_trigger_at is not None: - result["lastTriggerAt"] = from_union([to_float, from_none], self.last_trigger_at) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.next_trigger_at is not None: - result["nextTriggerAt"] = from_union([to_float, from_none], self.next_trigger_at) - if self.schedule is not None: - result["schedule"] = from_union([from_str, from_none], self.schedule) - result["secret"] = from_str(self.secret) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - if self.timezone is not None: - result["timezone"] = from_union([from_str, from_none], self.timezone) - result["updatedAt"] = to_float(self.updated_at) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + result["extractIntegrationId"] = from_str(self.extract_integration_id) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(ExtractIntegrationItemsExportParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class TriggerIntegrationListStreamItemType(Enum): - """The type of event""" +class ExtractIntegrationItemsExportResponseItem: + conversation_id: Optional[str] + """The ID of the conversation from which data was extracted""" - ITEM = "item" + created_at: Optional[str] + """The timestamp when the item was created""" + data: Dict[str, Any] + """The extracted data in YAML-serializable format""" -class TriggerIntegrationListStreamItem: - data: TriggerIntegrationListStreamItemData - """A bot configuration that can be applied without a dedicated bot instance.""" + extract_integration_id: str + """The ID of the extract integration""" - type: TriggerIntegrationListStreamItemType - """The type of event""" + id: str + """The unique identifier of the item""" - def __init__(self, data: TriggerIntegrationListStreamItemData, type: TriggerIntegrationListStreamItemType) -> None: + updated_at: Optional[str] + """The timestamp when the item was last updated""" + + def __init__(self, conversation_id: Optional[str], created_at: Optional[str], data: Dict[str, Any], extract_integration_id: str, id: str, updated_at: Optional[str]) -> None: + self.conversation_id = conversation_id + self.created_at = created_at self.data = data - self.type = type + self.extract_integration_id = extract_integration_id + self.id = id + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'TriggerIntegrationListStreamItem': + def from_dict(obj: Any) -> 'ExtractIntegrationItemsExportResponseItem': assert isinstance(obj, dict) - data = TriggerIntegrationListStreamItemData.from_dict(obj.get("data")) - type = TriggerIntegrationListStreamItemType(obj.get("type")) - return TriggerIntegrationListStreamItem(data, type) + conversation_id = from_union([from_str, from_none], obj.get("conversationId")) + created_at = from_union([from_str, from_none], obj.get("createdAt")) + data = from_dict(lambda x: x, obj.get("data")) + extract_integration_id = from_str(obj.get("extractIntegrationId")) + id = from_str(obj.get("id")) + updated_at = from_union([from_str, from_none], obj.get("updatedAt")) + return ExtractIntegrationItemsExportResponseItem(conversation_id, created_at, data, extract_integration_id, id, updated_at) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(TriggerIntegrationListStreamItemData, self.data) - result["type"] = to_enum(TriggerIntegrationListStreamItemType, self.type) + if self.conversation_id is not None: + result["conversationId"] = from_union([from_str, from_none], self.conversation_id) + if self.created_at is not None: + result["createdAt"] = from_union([from_str, from_none], self.created_at) + result["data"] = from_dict(lambda x: x, self.data) + result["extractIntegrationId"] = from_str(self.extract_integration_id) + result["id"] = from_str(self.id) + if self.updated_at is not None: + result["updatedAt"] = from_union([from_str, from_none], self.updated_at) return result -class IntegrationTwilioDeleteParams: - twilio_integration_id: str - """The ID of the Twilio integration""" +class ExtractIntegrationItemsExportResponse: + cursor: Optional[str] + """Cursor for fetching the next page""" - def __init__(self, twilio_integration_id: str) -> None: - self.twilio_integration_id = twilio_integration_id + items: Optional[List[ExtractIntegrationItemsExportResponseItem]] + + def __init__(self, cursor: Optional[str], items: Optional[List[ExtractIntegrationItemsExportResponseItem]]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'IntegrationTwilioDeleteParams': + def from_dict(obj: Any) -> 'ExtractIntegrationItemsExportResponse': assert isinstance(obj, dict) - twilio_integration_id = from_str(obj.get("twilioIntegrationId")) - return IntegrationTwilioDeleteParams(twilio_integration_id) + cursor = from_union([from_str, from_none], obj.get("cursor")) + items = from_union([lambda x: from_list(ExtractIntegrationItemsExportResponseItem.from_dict, x), from_none], obj.get("items")) + return ExtractIntegrationItemsExportResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["twilioIntegrationId"] = from_str(self.twilio_integration_id) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.items is not None: + result["items"] = from_union([lambda x: from_list(lambda x: to_class(ExtractIntegrationItemsExportResponseItem, x), x), from_none], self.items) return result -class IntegrationTwilioDeleteResponse: - id: str - """The ID of the deleted Twilio integration""" +class EmailIntegrationListParamsOrder(Enum): + """The order of the paginated items""" - def __init__(self, id: str) -> None: - self.id = id + ASC = "asc" + DESC = "desc" - @staticmethod - def from_dict(obj: Any) -> 'IntegrationTwilioDeleteResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return IntegrationTwilioDeleteResponse(id) - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result +class EmailIntegrationListParams: + cursor: Optional[str] + """The cursor to use for pagination""" + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" -class IntegrationTwilioFetchParams: - twilio_integration_id: str - """The ID of the Twilio integration to retrieve""" + order: Optional[EmailIntegrationListParamsOrder] + """The order of the paginated items""" - def __init__(self, twilio_integration_id: str) -> None: - self.twilio_integration_id = twilio_integration_id + take: Optional[int] + """The number of items to retrieve""" + + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[EmailIntegrationListParamsOrder], take: Optional[int]) -> None: + self.cursor = cursor + self.meta = meta + self.order = order + self.take = take @staticmethod - def from_dict(obj: Any) -> 'IntegrationTwilioFetchParams': + def from_dict(obj: Any) -> 'EmailIntegrationListParams': assert isinstance(obj, dict) - twilio_integration_id = from_str(obj.get("twilioIntegrationId")) - return IntegrationTwilioFetchParams(twilio_integration_id) + cursor = from_union([from_str, from_none], obj.get("cursor")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([EmailIntegrationListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return EmailIntegrationListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} - result["twilioIntegrationId"] = from_str(self.twilio_integration_id) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(EmailIntegrationListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class IntegrationTwilioFetchResponse: +class EmailIntegrationListResponseItem: """Blueprint properties""" - account_sid: Optional[str] - """The Twilio account SID""" - alias: Optional[str] """The unique alias for the instance""" allow_from: Optional[str] - """Newline-or-comma-separated list of allowed senders""" + """Newline-separated list of email patterns allowed to send messages to this integration""" + + attachments: Optional[bool] + """Weather the bot supports attachments""" blueprint_id: Optional[str] """The ID of the blueprint""" @@ -31439,13 +30231,10 @@ class IntegrationTwilioFetchResponse: updated_at: float """The timestamp (ms) when the instance was updated""" - voice: Optional[str] - """The voice configuration structured string""" - - def __init__(self, account_sid: Optional[str], alias: Optional[str], allow_from: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float, voice: Optional[str]) -> None: - self.account_sid = account_sid + def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float) -> None: self.alias = alias self.allow_from = allow_from + self.attachments = attachments self.blueprint_id = blueprint_id self.bot_id = bot_id self.contact_collection = contact_collection @@ -31456,14 +30245,13 @@ def __init__(self, account_sid: Optional[str], alias: Optional[str], allow_from: self.name = name self.session_duration = session_duration self.updated_at = updated_at - self.voice = voice @staticmethod - def from_dict(obj: Any) -> 'IntegrationTwilioFetchResponse': + def from_dict(obj: Any) -> 'EmailIntegrationListResponseItem': assert isinstance(obj, dict) - account_sid = from_union([from_str, from_none], obj.get("accountSid")) alias = from_union([from_str, from_none], obj.get("alias")) allow_from = from_union([from_str, from_none], obj.get("allowFrom")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) @@ -31474,17 +30262,16 @@ def from_dict(obj: Any) -> 'IntegrationTwilioFetchResponse': name = from_union([from_str, from_none], obj.get("name")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) updated_at = from_float(obj.get("updatedAt")) - voice = from_union([from_str, from_none], obj.get("voice")) - return IntegrationTwilioFetchResponse(account_sid, alias, allow_from, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at, voice) + return EmailIntegrationListResponseItem(alias, allow_from, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.account_sid is not None: - result["accountSid"] = from_union([from_str, from_none], self.account_sid) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) if self.allow_from is not None: result["allowFrom"] = from_union([from_str, from_none], self.allow_from) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: @@ -31502,83 +30289,44 @@ def to_dict(self) -> dict: if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) result["updatedAt"] = to_float(self.updated_at) - if self.voice is not None: - result["voice"] = from_union([from_str, from_none], self.voice) - return result - - -class IntegrationTwilioSetupParams: - twilio_integration_id: str - """The ID of the Twilio integration""" - - def __init__(self, twilio_integration_id: str) -> None: - self.twilio_integration_id = twilio_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationTwilioSetupParams': - assert isinstance(obj, dict) - twilio_integration_id = from_str(obj.get("twilioIntegrationId")) - return IntegrationTwilioSetupParams(twilio_integration_id) - - def to_dict(self) -> dict: - result: dict = {} - result["twilioIntegrationId"] = from_str(self.twilio_integration_id) return result -class IntegrationTwilioSetupResponse: - id: str - """The ID of the Twilio Integration""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationTwilioSetupResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return IntegrationTwilioSetupResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - +class EmailIntegrationListResponse: + cursor: str + """Cursor for fetching the next page""" -class IntegrationTwilioUpdateParams: - twilio_integration_id: str - """The ID of the Twilio integration""" + items: List[EmailIntegrationListResponseItem] - def __init__(self, twilio_integration_id: str) -> None: - self.twilio_integration_id = twilio_integration_id + def __init__(self, cursor: str, items: List[EmailIntegrationListResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'IntegrationTwilioUpdateParams': + def from_dict(obj: Any) -> 'EmailIntegrationListResponse': assert isinstance(obj, dict) - twilio_integration_id = from_str(obj.get("twilioIntegrationId")) - return IntegrationTwilioUpdateParams(twilio_integration_id) + cursor = from_str(obj.get("cursor")) + items = from_list(EmailIntegrationListResponseItem.from_dict, obj.get("items")) + return EmailIntegrationListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["twilioIntegrationId"] = from_str(self.twilio_integration_id) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(EmailIntegrationListResponseItem, x), self.items) return result -class IntegrationTwilioUpdateRequest: - """A bot configuration that can be applied without a dedicated bot instance.""" - - account_sid: Optional[str] - """The Twilio account SID""" +class EmailIntegrationListStreamItemData: + """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" allow_from: Optional[str] - """Newline-or-comma-separated list of allowed senders. Use E.164 phone numbers with or - without the leading `+`. Set to `*` to allow all. Leave empty to deny all. - """ - auth_token: Optional[str] - """The Twilio auth token""" + """Newline-separated list of email patterns allowed to send messages to this integration""" + + attachments: Optional[bool] + """Weather the bot supports attachments""" blueprint_id: Optional[str] """The ID of the blueprint""" @@ -31589,9 +30337,15 @@ class IntegrationTwilioUpdateRequest: contact_collection: Optional[bool] """Weather to collect contacts""" + created_at: float + """The timestamp (ms) when the instance was created""" + description: Optional[str] """The associated description""" + id: str + """The instance ID""" + meta: Optional[Dict[str, Any]] """Meta data information""" @@ -31601,103 +30355,112 @@ class IntegrationTwilioUpdateRequest: session_duration: Optional[float] """The session duration (in milliseconds)""" - voice: Optional[str] - """The voice configuration structured string""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - def __init__(self, account_sid: Optional[str], alias: Optional[str], allow_from: Optional[str], auth_token: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], voice: Optional[str]) -> None: - self.account_sid = account_sid + def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float) -> None: self.alias = alias self.allow_from = allow_from - self.auth_token = auth_token + self.attachments = attachments self.blueprint_id = blueprint_id self.bot_id = bot_id self.contact_collection = contact_collection + self.created_at = created_at self.description = description + self.id = id self.meta = meta self.name = name self.session_duration = session_duration - self.voice = voice + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'IntegrationTwilioUpdateRequest': + def from_dict(obj: Any) -> 'EmailIntegrationListStreamItemData': assert isinstance(obj, dict) - account_sid = from_union([from_str, from_none], obj.get("accountSid")) alias = from_union([from_str, from_none], obj.get("alias")) allow_from = from_union([from_str, from_none], obj.get("allowFrom")) - auth_token = from_union([from_str, from_none], obj.get("authToken")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - voice = from_union([from_str, from_none], obj.get("voice")) - return IntegrationTwilioUpdateRequest(account_sid, alias, allow_from, auth_token, blueprint_id, bot_id, contact_collection, description, meta, name, session_duration, voice) + updated_at = from_float(obj.get("updatedAt")) + return EmailIntegrationListStreamItemData(alias, allow_from, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.account_sid is not None: - result["accountSid"] = from_union([from_str, from_none], self.account_sid) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) if self.allow_from is not None: result["allowFrom"] = from_union([from_str, from_none], self.allow_from) - if self.auth_token is not None: - result["authToken"] = from_union([from_str, from_none], self.auth_token) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) if self.contact_collection is not None: result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - if self.voice is not None: - result["voice"] = from_union([from_str, from_none], self.voice) + result["updatedAt"] = to_float(self.updated_at) return result -class IntegrationTwilioUpdateResponse: - id: str - """The ID of the Twilio Integration""" +class EmailIntegrationListStreamItemType(Enum): + """The type of event""" + + ITEM = "item" - def __init__(self, id: str) -> None: - self.id = id + +class EmailIntegrationListStreamItem: + data: EmailIntegrationListStreamItemData + """Blueprint properties""" + + type: EmailIntegrationListStreamItemType + """The type of event""" + + def __init__(self, data: EmailIntegrationListStreamItemData, type: EmailIntegrationListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'IntegrationTwilioUpdateResponse': + def from_dict(obj: Any) -> 'EmailIntegrationListStreamItem': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return IntegrationTwilioUpdateResponse(id) + data = EmailIntegrationListStreamItemData.from_dict(obj.get("data")) + type = EmailIntegrationListStreamItemType(obj.get("type")) + return EmailIntegrationListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["data"] = to_class(EmailIntegrationListStreamItemData, self.data) + result["type"] = to_enum(EmailIntegrationListStreamItemType, self.type) return result -class IntegrationTwilioCreateRequest: +class EmailIntegrationCreateRequest: """A bot configuration that can be applied without a dedicated bot instance.""" - account_sid: Optional[str] - """The Twilio account SID""" - alias: Optional[str] """The unique alias for the instance""" allow_from: Optional[str] - """Newline-or-comma-separated list of allowed senders. Use E.164 phone numbers with or - without the leading `+`. Set to `*` to allow all. Leave empty to deny all. - """ - auth_token: Optional[str] - """The Twilio auth token""" + """Newline-separated list of email patterns allowed to send messages to this integration""" + + attachments: Optional[bool] + """Weather the bot supports attachments""" blueprint_id: Optional[str] """The ID of the blueprint""" @@ -31720,14 +30483,10 @@ class IntegrationTwilioCreateRequest: session_duration: Optional[float] """The session duration (in milliseconds)""" - voice: Optional[str] - """The voice configuration structured string""" - - def __init__(self, account_sid: Optional[str], alias: Optional[str], allow_from: Optional[str], auth_token: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], voice: Optional[str]) -> None: - self.account_sid = account_sid + def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float]) -> None: self.alias = alias self.allow_from = allow_from - self.auth_token = auth_token + self.attachments = attachments self.blueprint_id = blueprint_id self.bot_id = bot_id self.contact_collection = contact_collection @@ -31735,15 +30494,13 @@ def __init__(self, account_sid: Optional[str], alias: Optional[str], allow_from: self.meta = meta self.name = name self.session_duration = session_duration - self.voice = voice @staticmethod - def from_dict(obj: Any) -> 'IntegrationTwilioCreateRequest': + def from_dict(obj: Any) -> 'EmailIntegrationCreateRequest': assert isinstance(obj, dict) - account_sid = from_union([from_str, from_none], obj.get("accountSid")) alias = from_union([from_str, from_none], obj.get("alias")) allow_from = from_union([from_str, from_none], obj.get("allowFrom")) - auth_token = from_union([from_str, from_none], obj.get("authToken")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) @@ -31751,19 +30508,16 @@ def from_dict(obj: Any) -> 'IntegrationTwilioCreateRequest': meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - voice = from_union([from_str, from_none], obj.get("voice")) - return IntegrationTwilioCreateRequest(account_sid, alias, allow_from, auth_token, blueprint_id, bot_id, contact_collection, description, meta, name, session_duration, voice) + return EmailIntegrationCreateRequest(alias, allow_from, attachments, blueprint_id, bot_id, contact_collection, description, meta, name, session_duration) def to_dict(self) -> dict: result: dict = {} - if self.account_sid is not None: - result["accountSid"] = from_union([from_str, from_none], self.account_sid) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) if self.allow_from is not None: result["allowFrom"] = from_union([from_str, from_none], self.allow_from) - if self.auth_token is not None: - result["authToken"] = from_union([from_str, from_none], self.auth_token) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: @@ -31778,23 +30532,21 @@ def to_dict(self) -> dict: result["name"] = from_union([from_str, from_none], self.name) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - if self.voice is not None: - result["voice"] = from_union([from_str, from_none], self.voice) return result -class IntegrationTwilioCreateResponse: +class EmailIntegrationCreateResponse: id: str - """The ID of the Twilio Integration""" + """The ID of the Email Integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationTwilioCreateResponse': + def from_dict(obj: Any) -> 'EmailIntegrationCreateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationTwilioCreateResponse(id) + return EmailIntegrationCreateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -31802,65 +30554,36 @@ def to_dict(self) -> dict: return result -class IntegrationTwilioListParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" - - -class IntegrationTwilioListParams: - cursor: Optional[str] - """The cursor to use for pagination""" - - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" - - order: Optional[IntegrationTwilioListParamsOrder] - """The order of the paginated items""" - - take: Optional[int] - """The number of items to retrieve""" +class EmailIntegrationUpdateParams: + email_integration_id: str + """The ID of the Email integration""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationTwilioListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take + def __init__(self, email_integration_id: str) -> None: + self.email_integration_id = email_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationTwilioListParams': + def from_dict(obj: Any) -> 'EmailIntegrationUpdateParams': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([IntegrationTwilioListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return IntegrationTwilioListParams(cursor, meta, order, take) + email_integration_id = from_str(obj.get("emailIntegrationId")) + return EmailIntegrationUpdateParams(email_integration_id) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(IntegrationTwilioListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["emailIntegrationId"] = from_str(self.email_integration_id) return result -class IntegrationTwilioListResponseItem: - """Blueprint properties""" - - account_sid: Optional[str] - """The Twilio account SID""" +class EmailIntegrationUpdateRequest: + """A bot configuration that can be applied without a dedicated bot instance.""" alias: Optional[str] """The unique alias for the instance""" allow_from: Optional[str] - """Newline-or-comma-separated list of allowed senders""" + """Newline-separated list of email patterns allowed to send messages to this integration""" + + attachments: Optional[bool] + """Weather the bot supports attachments""" blueprint_id: Optional[str] """The ID of the blueprint""" @@ -31871,15 +30594,9 @@ class IntegrationTwilioListResponseItem: contact_collection: Optional[bool] """Weather to collect contacts""" - created_at: float - """The timestamp (ms) when the instance was created""" - description: Optional[str] """The associated description""" - id: str - """The instance ID""" - meta: Optional[Dict[str, Any]] """Meta data information""" @@ -31889,112 +30606,145 @@ class IntegrationTwilioListResponseItem: session_duration: Optional[float] """The session duration (in milliseconds)""" - updated_at: float - """The timestamp (ms) when the instance was updated""" - - voice: Optional[str] - """The voice configuration structured string""" - - def __init__(self, account_sid: Optional[str], alias: Optional[str], allow_from: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float, voice: Optional[str]) -> None: - self.account_sid = account_sid + def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float]) -> None: self.alias = alias self.allow_from = allow_from + self.attachments = attachments self.blueprint_id = blueprint_id self.bot_id = bot_id self.contact_collection = contact_collection - self.created_at = created_at self.description = description - self.id = id self.meta = meta self.name = name self.session_duration = session_duration - self.updated_at = updated_at - self.voice = voice @staticmethod - def from_dict(obj: Any) -> 'IntegrationTwilioListResponseItem': + def from_dict(obj: Any) -> 'EmailIntegrationUpdateRequest': assert isinstance(obj, dict) - account_sid = from_union([from_str, from_none], obj.get("accountSid")) alias = from_union([from_str, from_none], obj.get("alias")) allow_from = from_union([from_str, from_none], obj.get("allowFrom")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) - created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - updated_at = from_float(obj.get("updatedAt")) - voice = from_union([from_str, from_none], obj.get("voice")) - return IntegrationTwilioListResponseItem(account_sid, alias, allow_from, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at, voice) + return EmailIntegrationUpdateRequest(alias, allow_from, attachments, blueprint_id, bot_id, contact_collection, description, meta, name, session_duration) def to_dict(self) -> dict: result: dict = {} - if self.account_sid is not None: - result["accountSid"] = from_union([from_str, from_none], self.account_sid) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) if self.allow_from is not None: result["allowFrom"] = from_union([from_str, from_none], self.allow_from) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) if self.contact_collection is not None: result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) - result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - result["updatedAt"] = to_float(self.updated_at) - if self.voice is not None: - result["voice"] = from_union([from_str, from_none], self.voice) return result -class IntegrationTwilioListResponse: - cursor: str - """Cursor for fetching the next page""" +class EmailIntegrationUpdateResponse: + id: str + """The ID of the Email Integration""" - items: List[IntegrationTwilioListResponseItem] + def __init__(self, id: str) -> None: + self.id = id - def __init__(self, cursor: str, items: List[IntegrationTwilioListResponseItem]) -> None: - self.cursor = cursor - self.items = items + @staticmethod + def from_dict(obj: Any) -> 'EmailIntegrationUpdateResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return EmailIntegrationUpdateResponse(id) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result + + +class EmailIntegrationSetupParams: + email_integration_id: str + """The ID of the Email integration""" + + def __init__(self, email_integration_id: str) -> None: + self.email_integration_id = email_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationTwilioListResponse': + def from_dict(obj: Any) -> 'EmailIntegrationSetupParams': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(IntegrationTwilioListResponseItem.from_dict, obj.get("items")) - return IntegrationTwilioListResponse(cursor, items) + email_integration_id = from_str(obj.get("emailIntegrationId")) + return EmailIntegrationSetupParams(email_integration_id) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(IntegrationTwilioListResponseItem, x), self.items) + result["emailIntegrationId"] = from_str(self.email_integration_id) return result -class IntegrationTwilioListStreamItemData: - """Blueprint properties""" +class EmailIntegrationSetupResponse: + id: str + """The ID of the Email Integration""" - account_sid: Optional[str] - """The Twilio account SID""" + def __init__(self, id: str) -> None: + self.id = id + + @staticmethod + def from_dict(obj: Any) -> 'EmailIntegrationSetupResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return EmailIntegrationSetupResponse(id) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result + + +class EmailIntegrationFetchParams: + email_integration_id: str + """The ID of the Email integration to retrieve""" + + def __init__(self, email_integration_id: str) -> None: + self.email_integration_id = email_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'EmailIntegrationFetchParams': + assert isinstance(obj, dict) + email_integration_id = from_str(obj.get("emailIntegrationId")) + return EmailIntegrationFetchParams(email_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["emailIntegrationId"] = from_str(self.email_integration_id) + return result + + +class EmailIntegrationFetchResponse: + """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" allow_from: Optional[str] - """Newline-or-comma-separated list of allowed senders""" + """Newline-separated list of email patterns allowed to send messages to this integration""" + + attachments: Optional[bool] + """Weather the bot supports attachments""" blueprint_id: Optional[str] """The ID of the blueprint""" @@ -32026,13 +30776,10 @@ class IntegrationTwilioListStreamItemData: updated_at: float """The timestamp (ms) when the instance was updated""" - voice: Optional[str] - """The voice configuration structured string""" - - def __init__(self, account_sid: Optional[str], alias: Optional[str], allow_from: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float, voice: Optional[str]) -> None: - self.account_sid = account_sid + def __init__(self, alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float) -> None: self.alias = alias self.allow_from = allow_from + self.attachments = attachments self.blueprint_id = blueprint_id self.bot_id = bot_id self.contact_collection = contact_collection @@ -32043,14 +30790,13 @@ def __init__(self, account_sid: Optional[str], alias: Optional[str], allow_from: self.name = name self.session_duration = session_duration self.updated_at = updated_at - self.voice = voice @staticmethod - def from_dict(obj: Any) -> 'IntegrationTwilioListStreamItemData': + def from_dict(obj: Any) -> 'EmailIntegrationFetchResponse': assert isinstance(obj, dict) - account_sid = from_union([from_str, from_none], obj.get("accountSid")) alias = from_union([from_str, from_none], obj.get("alias")) allow_from = from_union([from_str, from_none], obj.get("allowFrom")) + attachments = from_union([from_bool, from_none], obj.get("attachments")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) @@ -32061,17 +30807,16 @@ def from_dict(obj: Any) -> 'IntegrationTwilioListStreamItemData': name = from_union([from_str, from_none], obj.get("name")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) updated_at = from_float(obj.get("updatedAt")) - voice = from_union([from_str, from_none], obj.get("voice")) - return IntegrationTwilioListStreamItemData(account_sid, alias, allow_from, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at, voice) + return EmailIntegrationFetchResponse(alias, allow_from, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, session_duration, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.account_sid is not None: - result["accountSid"] = from_union([from_str, from_none], self.account_sid) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) if self.allow_from is not None: result["allowFrom"] = from_union([from_str, from_none], self.allow_from) + if self.attachments is not None: + result["attachments"] = from_union([from_bool, from_none], self.attachments) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: @@ -32089,73 +30834,40 @@ def to_dict(self) -> dict: if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) result["updatedAt"] = to_float(self.updated_at) - if self.voice is not None: - result["voice"] = from_union([from_str, from_none], self.voice) - return result - - -class IntegrationTwilioListStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - - -class IntegrationTwilioListStreamItem: - data: IntegrationTwilioListStreamItemData - """Blueprint properties""" - - type: IntegrationTwilioListStreamItemType - """The type of event""" - - def __init__(self, data: IntegrationTwilioListStreamItemData, type: IntegrationTwilioListStreamItemType) -> None: - self.data = data - self.type = type - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationTwilioListStreamItem': - assert isinstance(obj, dict) - data = IntegrationTwilioListStreamItemData.from_dict(obj.get("data")) - type = IntegrationTwilioListStreamItemType(obj.get("type")) - return IntegrationTwilioListStreamItem(data, type) - - def to_dict(self) -> dict: - result: dict = {} - result["data"] = to_class(IntegrationTwilioListStreamItemData, self.data) - result["type"] = to_enum(IntegrationTwilioListStreamItemType, self.type) return result -class IntegrationWhatsAppDeleteParams: - whatsapp_integration_id: str - """The ID of the WhatsApp integration""" +class EmailIntegrationDeleteParams: + email_integration_id: str + """The ID of the Email integration""" - def __init__(self, whatsapp_integration_id: str) -> None: - self.whatsapp_integration_id = whatsapp_integration_id + def __init__(self, email_integration_id: str) -> None: + self.email_integration_id = email_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationWhatsAppDeleteParams': + def from_dict(obj: Any) -> 'EmailIntegrationDeleteParams': assert isinstance(obj, dict) - whatsapp_integration_id = from_str(obj.get("whatsappIntegrationId")) - return IntegrationWhatsAppDeleteParams(whatsapp_integration_id) + email_integration_id = from_str(obj.get("emailIntegrationId")) + return EmailIntegrationDeleteParams(email_integration_id) def to_dict(self) -> dict: result: dict = {} - result["whatsappIntegrationId"] = from_str(self.whatsapp_integration_id) + result["emailIntegrationId"] = from_str(self.email_integration_id) return result -class IntegrationWhatsAppDeleteResponse: +class EmailIntegrationDeleteResponse: id: str - """The ID of the deleted WhatsApp integration""" + """The ID of the deleted Email integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationWhatsAppDeleteResponse': + def from_dict(obj: Any) -> 'EmailIntegrationDeleteResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationWhatsAppDeleteResponse(id) + return EmailIntegrationDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -32163,40 +30875,67 @@ def to_dict(self) -> dict: return result -class IntegrationWhatsAppFetchParams: - whatsapp_integration_id: str - """The ID of the WhatsApp integration to retrieve""" +class IntegrationDiscordListParamsOrder(Enum): + """The order of the paginated items""" - def __init__(self, whatsapp_integration_id: str) -> None: - self.whatsapp_integration_id = whatsapp_integration_id + ASC = "asc" + DESC = "desc" + + +class IntegrationDiscordListParams: + cursor: Optional[str] + """The cursor to use for pagination""" + + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" + + order: Optional[IntegrationDiscordListParamsOrder] + """The order of the paginated items""" + + take: Optional[int] + """The number of items to retrieve""" + + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationDiscordListParamsOrder], take: Optional[int]) -> None: + self.cursor = cursor + self.meta = meta + self.order = order + self.take = take @staticmethod - def from_dict(obj: Any) -> 'IntegrationWhatsAppFetchParams': + def from_dict(obj: Any) -> 'IntegrationDiscordListParams': assert isinstance(obj, dict) - whatsapp_integration_id = from_str(obj.get("whatsappIntegrationId")) - return IntegrationWhatsAppFetchParams(whatsapp_integration_id) + cursor = from_union([from_str, from_none], obj.get("cursor")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([IntegrationDiscordListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return IntegrationDiscordListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} - result["whatsappIntegrationId"] = from_str(self.whatsapp_integration_id) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(IntegrationDiscordListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class IntegrationWhatsAppFetchResponse: +class IntegrationDiscordListResponseItem: """Blueprint properties""" - access_token: Optional[str] - """The WhatsApp integration access token (returned as '********' if configured, null - otherwise) - """ alias: Optional[str] """The unique alias for the instance""" allow_from: Optional[str] - """Newline-or-comma-separated list of allowed senders""" - - attachments: Optional[bool] - """Weather the bot supports attachments""" + """Restrict which Discord users can interact with this integration. Accepts Discord user IDs + (17-18 digit snowflakes) or @username, one per line. Use * to allow all senders. Leave + empty to deny all. + """ + app_id: Optional[str] + """The Discord application ID""" blueprint_id: Optional[str] """The ID of the blueprint""" @@ -32213,6 +30952,9 @@ class IntegrationWhatsAppFetchResponse: description: Optional[str] """The associated description""" + handle: Optional[str] + """The Discord command handle""" + id: str """The instance ID""" @@ -32222,67 +30964,55 @@ class IntegrationWhatsAppFetchResponse: name: Optional[str] """The associated name""" - phone_number_id: Optional[str] - """The WhatsApp integration phone number ID""" - session_duration: Optional[float] - """The session duration (in milliseconds)""" + """The chat session duration""" updated_at: float """The timestamp (ms) when the instance was updated""" - verify_token: str - """The WhatsApp integration verify token""" - - def __init__(self, access_token: Optional[str], alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], phone_number_id: Optional[str], session_duration: Optional[float], updated_at: float, verify_token: str) -> None: - self.access_token = access_token + def __init__(self, alias: Optional[str], allow_from: Optional[str], app_id: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], handle: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float) -> None: self.alias = alias self.allow_from = allow_from - self.attachments = attachments + self.app_id = app_id self.blueprint_id = blueprint_id self.bot_id = bot_id self.contact_collection = contact_collection self.created_at = created_at self.description = description + self.handle = handle self.id = id self.meta = meta self.name = name - self.phone_number_id = phone_number_id self.session_duration = session_duration self.updated_at = updated_at - self.verify_token = verify_token @staticmethod - def from_dict(obj: Any) -> 'IntegrationWhatsAppFetchResponse': + def from_dict(obj: Any) -> 'IntegrationDiscordListResponseItem': assert isinstance(obj, dict) - access_token = from_union([from_str, from_none], obj.get("accessToken")) alias = from_union([from_str, from_none], obj.get("alias")) allow_from = from_union([from_str, from_none], obj.get("allowFrom")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) + app_id = from_union([from_str, from_none], obj.get("appId")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + handle = from_union([from_str, from_none], obj.get("handle")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - phone_number_id = from_union([from_str, from_none], obj.get("phoneNumberId")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) updated_at = from_float(obj.get("updatedAt")) - verify_token = from_str(obj.get("verifyToken")) - return IntegrationWhatsAppFetchResponse(access_token, alias, allow_from, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, phone_number_id, session_duration, updated_at, verify_token) + return IntegrationDiscordListResponseItem(alias, allow_from, app_id, blueprint_id, bot_id, contact_collection, created_at, description, handle, id, meta, name, session_duration, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.access_token is not None: - result["accessToken"] = from_union([from_str, from_none], self.access_token) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) if self.allow_from is not None: result["allowFrom"] = from_union([from_str, from_none], self.allow_from) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) + if self.app_id is not None: + result["appId"] = from_union([from_str, from_none], self.app_id) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: @@ -32292,92 +31022,56 @@ def to_dict(self) -> dict: result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.handle is not None: + result["handle"] = from_union([from_str, from_none], self.handle) result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.phone_number_id is not None: - result["phoneNumberId"] = from_union([from_str, from_none], self.phone_number_id) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) result["updatedAt"] = to_float(self.updated_at) - result["verifyToken"] = from_str(self.verify_token) - return result - - -class IntegrationWhatsAppSetupParams: - whatsapp_integration_id: str - """The ID of the WhatsApp integration""" - - def __init__(self, whatsapp_integration_id: str) -> None: - self.whatsapp_integration_id = whatsapp_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationWhatsAppSetupParams': - assert isinstance(obj, dict) - whatsapp_integration_id = from_str(obj.get("whatsappIntegrationId")) - return IntegrationWhatsAppSetupParams(whatsapp_integration_id) - - def to_dict(self) -> dict: - result: dict = {} - result["whatsappIntegrationId"] = from_str(self.whatsapp_integration_id) return result -class IntegrationWhatsAppSetupResponse: - id: str - """The ID of the WhatsApp Integration""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationWhatsAppSetupResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return IntegrationWhatsAppSetupResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - +class IntegrationDiscordListResponse: + cursor: str + """Cursor for fetching the next page""" -class IntegrationWhatsAppUpdateParams: - whatsapp_integration_id: str - """The ID of the WhatsApp integration""" + items: List[IntegrationDiscordListResponseItem] - def __init__(self, whatsapp_integration_id: str) -> None: - self.whatsapp_integration_id = whatsapp_integration_id + def __init__(self, cursor: str, items: List[IntegrationDiscordListResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'IntegrationWhatsAppUpdateParams': + def from_dict(obj: Any) -> 'IntegrationDiscordListResponse': assert isinstance(obj, dict) - whatsapp_integration_id = from_str(obj.get("whatsappIntegrationId")) - return IntegrationWhatsAppUpdateParams(whatsapp_integration_id) + cursor = from_str(obj.get("cursor")) + items = from_list(IntegrationDiscordListResponseItem.from_dict, obj.get("items")) + return IntegrationDiscordListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["whatsappIntegrationId"] = from_str(self.whatsapp_integration_id) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(IntegrationDiscordListResponseItem, x), self.items) return result -class IntegrationWhatsAppUpdateRequest: - """A bot configuration that can be applied without a dedicated bot instance.""" - - access_token: Optional[str] - """The WhatsApp integration access token""" +class IntegrationDiscordListStreamItemData: + """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" allow_from: Optional[str] - """Newline-or-comma-separated list of allowed senders. Use E.164 phone numbers with or - without the leading `+`. Set to `*` to allow all. Leave empty to deny all. + """Restrict which Discord users can interact with this integration. Accepts Discord user IDs + (17-18 digit snowflakes) or @username, one per line. Use * to allow all senders. Leave + empty to deny all. """ - attachments: Optional[bool] - """Weather the bot supports attachments""" + app_id: Optional[str] + """The Discord application ID""" blueprint_id: Optional[str] """The ID of the blueprint""" @@ -32388,115 +31082,139 @@ class IntegrationWhatsAppUpdateRequest: contact_collection: Optional[bool] """Weather to collect contacts""" + created_at: float + """The timestamp (ms) when the instance was created""" + description: Optional[str] """The associated description""" + handle: Optional[str] + """The Discord command handle""" + + id: str + """The instance ID""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - phone_number_id: Optional[str] - """The WhatsApp integration phone number ID""" - session_duration: Optional[float] - """The session duration (in milliseconds)""" + """The chat session duration""" - def __init__(self, access_token: Optional[str], alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], phone_number_id: Optional[str], session_duration: Optional[float]) -> None: - self.access_token = access_token + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, alias: Optional[str], allow_from: Optional[str], app_id: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], handle: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float) -> None: self.alias = alias self.allow_from = allow_from - self.attachments = attachments + self.app_id = app_id self.blueprint_id = blueprint_id self.bot_id = bot_id self.contact_collection = contact_collection + self.created_at = created_at self.description = description + self.handle = handle + self.id = id self.meta = meta self.name = name - self.phone_number_id = phone_number_id self.session_duration = session_duration + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'IntegrationWhatsAppUpdateRequest': + def from_dict(obj: Any) -> 'IntegrationDiscordListStreamItemData': assert isinstance(obj, dict) - access_token = from_union([from_str, from_none], obj.get("accessToken")) alias = from_union([from_str, from_none], obj.get("alias")) allow_from = from_union([from_str, from_none], obj.get("allowFrom")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) + app_id = from_union([from_str, from_none], obj.get("appId")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + handle = from_union([from_str, from_none], obj.get("handle")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - phone_number_id = from_union([from_str, from_none], obj.get("phoneNumberId")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - return IntegrationWhatsAppUpdateRequest(access_token, alias, allow_from, attachments, blueprint_id, bot_id, contact_collection, description, meta, name, phone_number_id, session_duration) + updated_at = from_float(obj.get("updatedAt")) + return IntegrationDiscordListStreamItemData(alias, allow_from, app_id, blueprint_id, bot_id, contact_collection, created_at, description, handle, id, meta, name, session_duration, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.access_token is not None: - result["accessToken"] = from_union([from_str, from_none], self.access_token) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) if self.allow_from is not None: result["allowFrom"] = from_union([from_str, from_none], self.allow_from) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) + if self.app_id is not None: + result["appId"] = from_union([from_str, from_none], self.app_id) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) if self.contact_collection is not None: result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.handle is not None: + result["handle"] = from_union([from_str, from_none], self.handle) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.phone_number_id is not None: - result["phoneNumberId"] = from_union([from_str, from_none], self.phone_number_id) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + result["updatedAt"] = to_float(self.updated_at) return result -class IntegrationWhatsAppUpdateResponse: - id: str - """The ID of the WhatsApp Integration""" +class IntegrationDiscordListStreamItemType(Enum): + """The type of event""" - def __init__(self, id: str) -> None: - self.id = id + ITEM = "item" + + +class IntegrationDiscordListStreamItem: + data: IntegrationDiscordListStreamItemData + """Blueprint properties""" + + type: IntegrationDiscordListStreamItemType + """The type of event""" + + def __init__(self, data: IntegrationDiscordListStreamItemData, type: IntegrationDiscordListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'IntegrationWhatsAppUpdateResponse': + def from_dict(obj: Any) -> 'IntegrationDiscordListStreamItem': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return IntegrationWhatsAppUpdateResponse(id) + data = IntegrationDiscordListStreamItemData.from_dict(obj.get("data")) + type = IntegrationDiscordListStreamItemType(obj.get("type")) + return IntegrationDiscordListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["data"] = to_class(IntegrationDiscordListStreamItemData, self.data) + result["type"] = to_enum(IntegrationDiscordListStreamItemType, self.type) return result -class IntegrationWhatsAppCreateRequest: +class IntegrationDiscordCreateRequest: """A bot configuration that can be applied without a dedicated bot instance.""" - access_token: Optional[str] - """The WhatsApp integration access token""" - alias: Optional[str] """The unique alias for the instance""" allow_from: Optional[str] - """Newline-or-comma-separated list of allowed senders. Use E.164 phone numbers with or - without the leading `+`. Set to `*` to allow all. Leave empty to deny all. + """Restrict which Discord users can interact with this integration. Accepts Discord user IDs + (17-18 digit snowflakes) or @username, one per line. Use * to allow all senders. Leave + empty to deny all. """ - attachments: Optional[bool] - """Weather the bot supports attachments""" + app_id: Optional[str] + """The Discord application ID""" blueprint_id: Optional[str] """The ID of the blueprint""" @@ -32504,96 +31222,106 @@ class IntegrationWhatsAppCreateRequest: bot_id: Optional[str] """The ID of the bot this configuration is using""" + bot_token: Optional[str] + """The Discord bot token""" + contact_collection: Optional[bool] """Weather to collect contacts""" description: Optional[str] """The associated description""" + handle: Optional[str] + """The Discord command handle""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - phone_number_id: Optional[str] - """The WhatsApp integration phone number ID""" + public_key: Optional[str] + """The Discord public key""" session_duration: Optional[float] - """The session duration (in milliseconds)""" + """The chat session duration""" - def __init__(self, access_token: Optional[str], alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], phone_number_id: Optional[str], session_duration: Optional[float]) -> None: - self.access_token = access_token + def __init__(self, alias: Optional[str], allow_from: Optional[str], app_id: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], bot_token: Optional[str], contact_collection: Optional[bool], description: Optional[str], handle: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], public_key: Optional[str], session_duration: Optional[float]) -> None: self.alias = alias self.allow_from = allow_from - self.attachments = attachments + self.app_id = app_id self.blueprint_id = blueprint_id self.bot_id = bot_id + self.bot_token = bot_token self.contact_collection = contact_collection self.description = description + self.handle = handle self.meta = meta self.name = name - self.phone_number_id = phone_number_id + self.public_key = public_key self.session_duration = session_duration @staticmethod - def from_dict(obj: Any) -> 'IntegrationWhatsAppCreateRequest': + def from_dict(obj: Any) -> 'IntegrationDiscordCreateRequest': assert isinstance(obj, dict) - access_token = from_union([from_str, from_none], obj.get("accessToken")) alias = from_union([from_str, from_none], obj.get("alias")) allow_from = from_union([from_str, from_none], obj.get("allowFrom")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) + app_id = from_union([from_str, from_none], obj.get("appId")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) + bot_token = from_union([from_str, from_none], obj.get("botToken")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) description = from_union([from_str, from_none], obj.get("description")) + handle = from_union([from_str, from_none], obj.get("handle")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - phone_number_id = from_union([from_str, from_none], obj.get("phoneNumberId")) + public_key = from_union([from_str, from_none], obj.get("publicKey")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - return IntegrationWhatsAppCreateRequest(access_token, alias, allow_from, attachments, blueprint_id, bot_id, contact_collection, description, meta, name, phone_number_id, session_duration) + return IntegrationDiscordCreateRequest(alias, allow_from, app_id, blueprint_id, bot_id, bot_token, contact_collection, description, handle, meta, name, public_key, session_duration) def to_dict(self) -> dict: result: dict = {} - if self.access_token is not None: - result["accessToken"] = from_union([from_str, from_none], self.access_token) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) if self.allow_from is not None: result["allowFrom"] = from_union([from_str, from_none], self.allow_from) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) + if self.app_id is not None: + result["appId"] = from_union([from_str, from_none], self.app_id) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.bot_token is not None: + result["botToken"] = from_union([from_str, from_none], self.bot_token) if self.contact_collection is not None: result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.handle is not None: + result["handle"] = from_union([from_str, from_none], self.handle) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.phone_number_id is not None: - result["phoneNumberId"] = from_union([from_str, from_none], self.phone_number_id) + if self.public_key is not None: + result["publicKey"] = from_union([from_str, from_none], self.public_key) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) return result -class IntegrationWhatsAppCreateResponse: +class IntegrationDiscordCreateResponse: id: str - """The ID of the WhatsApp Integration""" + """The ID of the Discord Integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationWhatsAppCreateResponse': + def from_dict(obj: Any) -> 'IntegrationDiscordCreateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationWhatsAppCreateResponse(id) + return IntegrationDiscordCreateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -32601,70 +31329,38 @@ def to_dict(self) -> dict: return result -class IntegrationWhatsAppListParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" - - -class IntegrationWhatsAppListParams: - cursor: Optional[str] - """The cursor to use for pagination""" - - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" - - order: Optional[IntegrationWhatsAppListParamsOrder] - """The order of the paginated items""" - - take: Optional[int] - """The number of items to retrieve""" +class IntegrationDiscordUpdateParams: + discord_integration_id: str + """The ID of the Discord integration""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationWhatsAppListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take + def __init__(self, discord_integration_id: str) -> None: + self.discord_integration_id = discord_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationWhatsAppListParams': + def from_dict(obj: Any) -> 'IntegrationDiscordUpdateParams': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([IntegrationWhatsAppListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return IntegrationWhatsAppListParams(cursor, meta, order, take) + discord_integration_id = from_str(obj.get("discordIntegrationId")) + return IntegrationDiscordUpdateParams(discord_integration_id) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(IntegrationWhatsAppListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["discordIntegrationId"] = from_str(self.discord_integration_id) return result -class IntegrationWhatsAppListResponseItem: - """Blueprint properties""" +class IntegrationDiscordUpdateRequest: + """A bot configuration that can be applied without a dedicated bot instance.""" - access_token: Optional[str] - """The WhatsApp integration access token (returned as '********' if configured, null - otherwise) - """ alias: Optional[str] """The unique alias for the instance""" allow_from: Optional[str] - """Newline-or-comma-separated list of allowed senders. Use phone numbers in E.164 format - (digits only). Leave empty to block all. Use * to allow everyone. + """Restrict which Discord users can interact with this integration. Accepts Discord user IDs + (17-18 digit snowflakes) or @username, one per line. Use * to allow all senders. Leave + empty to deny all. """ - attachments: Optional[bool] - """Weather the bot supports attachments""" + app_id: Optional[str] + """The Discord application ID""" blueprint_id: Optional[str] """The ID of the blueprint""" @@ -32672,17 +31368,17 @@ class IntegrationWhatsAppListResponseItem: bot_id: Optional[str] """The ID of the bot this configuration is using""" + bot_token: Optional[str] + """The Discord bot token""" + contact_collection: Optional[bool] """Weather to collect contacts""" - created_at: float - """The timestamp (ms) when the instance was created""" - description: Optional[str] """The associated description""" - id: str - """The instance ID""" + handle: Optional[str] + """The Discord command handle""" meta: Optional[Dict[str, Any]] """Meta data information""" @@ -32690,130 +31386,165 @@ class IntegrationWhatsAppListResponseItem: name: Optional[str] """The associated name""" - phone_number_id: Optional[str] - """The WhatsApp integration phone number ID""" + public_key: Optional[str] + """The Discord public key""" session_duration: Optional[float] - """The session duration (in milliseconds)""" - - updated_at: float - """The timestamp (ms) when the instance was updated""" - - verify_token: str - """The WhatsApp integration verify token""" + """The chat session duration""" - def __init__(self, access_token: Optional[str], alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], phone_number_id: Optional[str], session_duration: Optional[float], updated_at: float, verify_token: str) -> None: - self.access_token = access_token + def __init__(self, alias: Optional[str], allow_from: Optional[str], app_id: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], bot_token: Optional[str], contact_collection: Optional[bool], description: Optional[str], handle: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], public_key: Optional[str], session_duration: Optional[float]) -> None: self.alias = alias self.allow_from = allow_from - self.attachments = attachments + self.app_id = app_id self.blueprint_id = blueprint_id self.bot_id = bot_id + self.bot_token = bot_token self.contact_collection = contact_collection - self.created_at = created_at self.description = description - self.id = id + self.handle = handle self.meta = meta self.name = name - self.phone_number_id = phone_number_id + self.public_key = public_key self.session_duration = session_duration - self.updated_at = updated_at - self.verify_token = verify_token @staticmethod - def from_dict(obj: Any) -> 'IntegrationWhatsAppListResponseItem': + def from_dict(obj: Any) -> 'IntegrationDiscordUpdateRequest': assert isinstance(obj, dict) - access_token = from_union([from_str, from_none], obj.get("accessToken")) alias = from_union([from_str, from_none], obj.get("alias")) allow_from = from_union([from_str, from_none], obj.get("allowFrom")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) + app_id = from_union([from_str, from_none], obj.get("appId")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) + bot_token = from_union([from_str, from_none], obj.get("botToken")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) - created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) + handle = from_union([from_str, from_none], obj.get("handle")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - phone_number_id = from_union([from_str, from_none], obj.get("phoneNumberId")) + public_key = from_union([from_str, from_none], obj.get("publicKey")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - updated_at = from_float(obj.get("updatedAt")) - verify_token = from_str(obj.get("verifyToken")) - return IntegrationWhatsAppListResponseItem(access_token, alias, allow_from, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, phone_number_id, session_duration, updated_at, verify_token) + return IntegrationDiscordUpdateRequest(alias, allow_from, app_id, blueprint_id, bot_id, bot_token, contact_collection, description, handle, meta, name, public_key, session_duration) def to_dict(self) -> dict: result: dict = {} - if self.access_token is not None: - result["accessToken"] = from_union([from_str, from_none], self.access_token) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) if self.allow_from is not None: result["allowFrom"] = from_union([from_str, from_none], self.allow_from) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) + if self.app_id is not None: + result["appId"] = from_union([from_str, from_none], self.app_id) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.bot_token is not None: + result["botToken"] = from_union([from_str, from_none], self.bot_token) if self.contact_collection is not None: result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) - result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) + if self.handle is not None: + result["handle"] = from_union([from_str, from_none], self.handle) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.phone_number_id is not None: - result["phoneNumberId"] = from_union([from_str, from_none], self.phone_number_id) + if self.public_key is not None: + result["publicKey"] = from_union([from_str, from_none], self.public_key) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - result["updatedAt"] = to_float(self.updated_at) - result["verifyToken"] = from_str(self.verify_token) return result -class IntegrationWhatsAppListResponse: - cursor: str - """Cursor for fetching the next page""" +class IntegrationDiscordUpdateResponse: + id: str + """The ID of the Discord Integration""" - items: List[IntegrationWhatsAppListResponseItem] + def __init__(self, id: str) -> None: + self.id = id - def __init__(self, cursor: str, items: List[IntegrationWhatsAppListResponseItem]) -> None: - self.cursor = cursor - self.items = items + @staticmethod + def from_dict(obj: Any) -> 'IntegrationDiscordUpdateResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return IntegrationDiscordUpdateResponse(id) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result + + +class IntegrationDiscordSetupParams: + discord_integration_id: str + """The ID of the Discord integration""" + + def __init__(self, discord_integration_id: str) -> None: + self.discord_integration_id = discord_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationWhatsAppListResponse': + def from_dict(obj: Any) -> 'IntegrationDiscordSetupParams': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(IntegrationWhatsAppListResponseItem.from_dict, obj.get("items")) - return IntegrationWhatsAppListResponse(cursor, items) + discord_integration_id = from_str(obj.get("discordIntegrationId")) + return IntegrationDiscordSetupParams(discord_integration_id) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(IntegrationWhatsAppListResponseItem, x), self.items) + result["discordIntegrationId"] = from_str(self.discord_integration_id) return result -class IntegrationWhatsAppListStreamItemData: +class IntegrationDiscordSetupResponse: + id: str + """The ID of the setup Discord integration""" + + def __init__(self, id: str) -> None: + self.id = id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationDiscordSetupResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return IntegrationDiscordSetupResponse(id) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result + + +class IntegrationDiscordFetchParams: + discord_integration_id: str + """The ID of the Discord integration to retrieve""" + + def __init__(self, discord_integration_id: str) -> None: + self.discord_integration_id = discord_integration_id + + @staticmethod + def from_dict(obj: Any) -> 'IntegrationDiscordFetchParams': + assert isinstance(obj, dict) + discord_integration_id = from_str(obj.get("discordIntegrationId")) + return IntegrationDiscordFetchParams(discord_integration_id) + + def to_dict(self) -> dict: + result: dict = {} + result["discordIntegrationId"] = from_str(self.discord_integration_id) + return result + + +class IntegrationDiscordFetchResponse: """Blueprint properties""" - access_token: Optional[str] - """The WhatsApp integration access token (returned as '********' if configured, null - otherwise) - """ alias: Optional[str] """The unique alias for the instance""" allow_from: Optional[str] - """Newline-or-comma-separated list of allowed senders. Use phone numbers in E.164 format - (digits only). Leave empty to block all. Use * to allow everyone. + """Restrict which Discord users can interact with this integration. Accepts Discord user IDs + (17-18 digit snowflakes) or @username, one per line. Use * to allow all senders. Leave + empty to deny all. """ - attachments: Optional[bool] - """Weather the bot supports attachments""" + app_id: Optional[str] + """The Discord application ID""" blueprint_id: Optional[str] """The ID of the blueprint""" @@ -32830,6 +31561,9 @@ class IntegrationWhatsAppListStreamItemData: description: Optional[str] """The associated description""" + handle: Optional[str] + """The Discord command handle""" + id: str """The instance ID""" @@ -32839,67 +31573,55 @@ class IntegrationWhatsAppListStreamItemData: name: Optional[str] """The associated name""" - phone_number_id: Optional[str] - """The WhatsApp integration phone number ID""" - session_duration: Optional[float] - """The session duration (in milliseconds)""" + """The chat session duration""" updated_at: float """The timestamp (ms) when the instance was updated""" - verify_token: str - """The WhatsApp integration verify token""" - - def __init__(self, access_token: Optional[str], alias: Optional[str], allow_from: Optional[str], attachments: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], phone_number_id: Optional[str], session_duration: Optional[float], updated_at: float, verify_token: str) -> None: - self.access_token = access_token + def __init__(self, alias: Optional[str], allow_from: Optional[str], app_id: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_collection: Optional[bool], created_at: float, description: Optional[str], handle: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], session_duration: Optional[float], updated_at: float) -> None: self.alias = alias self.allow_from = allow_from - self.attachments = attachments + self.app_id = app_id self.blueprint_id = blueprint_id self.bot_id = bot_id self.contact_collection = contact_collection self.created_at = created_at self.description = description + self.handle = handle self.id = id self.meta = meta self.name = name - self.phone_number_id = phone_number_id self.session_duration = session_duration self.updated_at = updated_at - self.verify_token = verify_token @staticmethod - def from_dict(obj: Any) -> 'IntegrationWhatsAppListStreamItemData': + def from_dict(obj: Any) -> 'IntegrationDiscordFetchResponse': assert isinstance(obj, dict) - access_token = from_union([from_str, from_none], obj.get("accessToken")) alias = from_union([from_str, from_none], obj.get("alias")) allow_from = from_union([from_str, from_none], obj.get("allowFrom")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) + app_id = from_union([from_str, from_none], obj.get("appId")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + handle = from_union([from_str, from_none], obj.get("handle")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - phone_number_id = from_union([from_str, from_none], obj.get("phoneNumberId")) session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) updated_at = from_float(obj.get("updatedAt")) - verify_token = from_str(obj.get("verifyToken")) - return IntegrationWhatsAppListStreamItemData(access_token, alias, allow_from, attachments, blueprint_id, bot_id, contact_collection, created_at, description, id, meta, name, phone_number_id, session_duration, updated_at, verify_token) + return IntegrationDiscordFetchResponse(alias, allow_from, app_id, blueprint_id, bot_id, contact_collection, created_at, description, handle, id, meta, name, session_duration, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.access_token is not None: - result["accessToken"] = from_union([from_str, from_none], self.access_token) if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) if self.allow_from is not None: result["allowFrom"] = from_union([from_str, from_none], self.allow_from) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) + if self.app_id is not None: + result["appId"] = from_union([from_str, from_none], self.app_id) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: @@ -32909,82 +31631,50 @@ def to_dict(self) -> dict: result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.handle is not None: + result["handle"] = from_union([from_str, from_none], self.handle) result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.phone_number_id is not None: - result["phoneNumberId"] = from_union([from_str, from_none], self.phone_number_id) if self.session_duration is not None: result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) result["updatedAt"] = to_float(self.updated_at) - result["verifyToken"] = from_str(self.verify_token) - return result - - -class IntegrationWhatsAppListStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - - -class IntegrationWhatsAppListStreamItem: - data: IntegrationWhatsAppListStreamItemData - """Blueprint properties""" - - type: IntegrationWhatsAppListStreamItemType - """The type of event""" - - def __init__(self, data: IntegrationWhatsAppListStreamItemData, type: IntegrationWhatsAppListStreamItemType) -> None: - self.data = data - self.type = type - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationWhatsAppListStreamItem': - assert isinstance(obj, dict) - data = IntegrationWhatsAppListStreamItemData.from_dict(obj.get("data")) - type = IntegrationWhatsAppListStreamItemType(obj.get("type")) - return IntegrationWhatsAppListStreamItem(data, type) - - def to_dict(self) -> dict: - result: dict = {} - result["data"] = to_class(IntegrationWhatsAppListStreamItemData, self.data) - result["type"] = to_enum(IntegrationWhatsAppListStreamItemType, self.type) return result -class IntegrationWidgetCloneParams: - widget_integration_id: str - """The ID of the Widget integration""" +class IntegrationDiscordDeleteParams: + discord_integration_id: str + """The ID of the Discord integration""" - def __init__(self, widget_integration_id: str) -> None: - self.widget_integration_id = widget_integration_id + def __init__(self, discord_integration_id: str) -> None: + self.discord_integration_id = discord_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationWidgetCloneParams': + def from_dict(obj: Any) -> 'IntegrationDiscordDeleteParams': assert isinstance(obj, dict) - widget_integration_id = from_str(obj.get("widgetIntegrationId")) - return IntegrationWidgetCloneParams(widget_integration_id) + discord_integration_id = from_str(obj.get("discordIntegrationId")) + return IntegrationDiscordDeleteParams(discord_integration_id) def to_dict(self) -> dict: result: dict = {} - result["widgetIntegrationId"] = from_str(self.widget_integration_id) + result["discordIntegrationId"] = from_str(self.discord_integration_id) return result -class IntegrationWidgetCloneResponse: +class IntegrationDiscordDeleteResponse: id: str - """The ID of the cloned Widget integration""" + """The ID of the deleted Discord integration""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationWidgetCloneResponse': + def from_dict(obj: Any) -> 'IntegrationDiscordDeleteResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationWidgetCloneResponse(id) + return IntegrationDiscordDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -32992,796 +31682,587 @@ def to_dict(self) -> dict: return result -class IntegrationWidgetDeleteParams: - widget_integration_id: str - """The ID of the Widget integration""" +class FileListParamsOrder(Enum): + """The order of the paginated items""" - def __init__(self, widget_integration_id: str) -> None: - self.widget_integration_id = widget_integration_id + ASC = "asc" + DESC = "desc" - @staticmethod - def from_dict(obj: Any) -> 'IntegrationWidgetDeleteParams': - assert isinstance(obj, dict) - widget_integration_id = from_str(obj.get("widgetIntegrationId")) - return IntegrationWidgetDeleteParams(widget_integration_id) - def to_dict(self) -> dict: - result: dict = {} - result["widgetIntegrationId"] = from_str(self.widget_integration_id) - return result +class FileListParams: + cursor: Optional[str] + """The cursor to use for pagination""" + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" -class IntegrationWidgetDeleteResponse: - id: str - """The ID of the deleted Widget integration""" + order: Optional[FileListParamsOrder] + """The order of the paginated items""" - def __init__(self, id: str) -> None: - self.id = id + take: Optional[int] + """The number of items to retrieve""" + + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[FileListParamsOrder], take: Optional[int]) -> None: + self.cursor = cursor + self.meta = meta + self.order = order + self.take = take @staticmethod - def from_dict(obj: Any) -> 'IntegrationWidgetDeleteResponse': + def from_dict(obj: Any) -> 'FileListParams': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return IntegrationWidgetDeleteResponse(id) + cursor = from_union([from_str, from_none], obj.get("cursor")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([FileListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return FileListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(FileListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class IntegrationWidgetFetchParams: - widget_integration_id: str - """The ID of the Widget integration to retrieve""" - - def __init__(self, widget_integration_id: str) -> None: - self.widget_integration_id = widget_integration_id - - @staticmethod - def from_dict(obj: Any) -> 'IntegrationWidgetFetchParams': - assert isinstance(obj, dict) - widget_integration_id = from_str(obj.get("widgetIntegrationId")) - return IntegrationWidgetFetchParams(widget_integration_id) +class IndigoVisibility(Enum): + """The file visibility""" - def to_dict(self) -> dict: - result: dict = {} - result["widgetIntegrationId"] = from_str(self.widget_integration_id) - return result + PRIVATE = "private" + PROTECTED = "protected" + PUBLIC = "public" -class IntegrationWidgetFetchResponse: - """A bot configuration that can be applied without a dedicated bot instance.""" +class FileListResponseItem: + """Blueprint properties""" alias: Optional[str] """The unique alias for the instance""" - attachments: Optional[bool] - """Whether the Widget integration supports attachments""" - - auto_scroll: Optional[bool] - """Whether the Widget integration auto scrolls""" - blueprint_id: Optional[str] """The ID of the blueprint""" - bot_id: Optional[str] - """The ID of the bot this configuration is using""" - - carousel: Optional[bool] - """Whether the Widget integration supports carousels""" - - contact_collection: Optional[bool] - """Whether the Widget integration collects contacts""" - created_at: float """The timestamp (ms) when the instance was created""" description: Optional[str] """The associated description""" - export_conversation: Optional[bool] - """Controls whether the Widget allows exporting the current conversation""" - - form: Optional[bool] - """Whether the Widget integration supports forms""" - id: str """The instance ID""" - initial: Optional[str] - """The initial message of the Widget integration""" + meta: Optional[Dict[str, Any]] + """Meta data information""" - intro: Optional[str] - """The intro of the Widget integration""" + name: Optional[str] + """The associated name""" - language: Optional[str] - """The language of the Widget integration""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - layout: Optional[str] - """The default layout of the Widget integration""" + visibility: Optional[IndigoVisibility] + """The file visibility""" - math: Optional[bool] - """Whether the Widget integration supports math""" + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float, visibility: Optional[IndigoVisibility]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.created_at = created_at + self.description = description + self.id = id + self.meta = meta + self.name = name + self.updated_at = updated_at + self.visibility = visibility - maximize: Optional[bool] - """Controls whether the Widget allows maximizing the conversation""" + @staticmethod + def from_dict(obj: Any) -> 'FileListResponseItem': + assert isinstance(obj, dict) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + created_at = from_float(obj.get("createdAt")) + description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + updated_at = from_float(obj.get("updatedAt")) + visibility = from_union([IndigoVisibility, from_none], obj.get("visibility")) + return FileListResponseItem(alias, blueprint_id, created_at, description, id, meta, name, updated_at, visibility) - message_peek: Optional[bool] - """Controls whether the Widget allows peeking at the initial messages""" + def to_dict(self) -> dict: + result: dict = {} + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + result["createdAt"] = to_float(self.created_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + result["updatedAt"] = to_float(self.updated_at) + if self.visibility is not None: + result["visibility"] = from_union([lambda x: to_enum(IndigoVisibility, x), from_none], self.visibility) + return result - meta: Optional[Dict[str, Any]] - """Meta data information""" - name: Optional[str] - """The associated name""" +class FileListResponse: + cursor: str + """Cursor for fetching the next page""" - origin: Optional[str] - """The origin URLs of the Widget integration""" + items: List[FileListResponseItem] - placeholder: Optional[str] - """The input placeholder of the Widget integration""" + def __init__(self, cursor: str, items: List[FileListResponseItem]) -> None: + self.cursor = cursor + self.items = items - plugins: Optional[str] - """The plugins of the Widget integration""" + @staticmethod + def from_dict(obj: Any) -> 'FileListResponse': + assert isinstance(obj, dict) + cursor = from_str(obj.get("cursor")) + items = from_list(FileListResponseItem.from_dict, obj.get("items")) + return FileListResponse(cursor, items) - powered_by: Optional[bool] - """Whether the Widget integration displays powered by""" + def to_dict(self) -> dict: + result: dict = {} + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(FileListResponseItem, x), self.items) + return result - restart_conversation: Optional[bool] - """Controls whether the Widget allows restarting the conversation""" - session_duration: Optional[float] - """The session duration of the Widget integration""" +class IndecentVisibility(Enum): + """The file visibility""" - start_first: Optional[bool] - """Whether the Widget integration starts first""" + PRIVATE = "private" + PROTECTED = "protected" + PUBLIC = "public" - stream: Optional[bool] - """Whether the Widget integration is streaming""" - theme: Optional[str] - """The theme of the Widget integration""" +class FileListStreamItemData: + """Blueprint properties""" + + alias: Optional[str] + """The unique alias for the instance""" + + blueprint_id: Optional[str] + """The ID of the blueprint""" + + created_at: float + """The timestamp (ms) when the instance was created""" - title: Optional[str] - """The title of the Widget integration""" + description: Optional[str] + """The associated description""" - tools: Optional[bool] - """Whether the Widget integration has tools""" + id: str + """The instance ID""" - unfurl: Optional[bool] - """Whether the Widget integration unfurls links""" + meta: Optional[Dict[str, Any]] + """Meta data information""" + + name: Optional[str] + """The associated name""" updated_at: float """The timestamp (ms) when the instance was updated""" - verbose: Optional[bool] - """Whether the Widget integration is verbose""" - - voice_in: Optional[bool] - """Whether the Widget integration supports voice input""" - - voice_out: Optional[bool] - """Whether the Widget integration supports voice output""" + visibility: Optional[IndecentVisibility] + """The file visibility""" - def __init__(self, alias: Optional[str], attachments: Optional[bool], auto_scroll: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], carousel: Optional[bool], contact_collection: Optional[bool], created_at: float, description: Optional[str], export_conversation: Optional[bool], form: Optional[bool], id: str, initial: Optional[str], intro: Optional[str], language: Optional[str], layout: Optional[str], math: Optional[bool], maximize: Optional[bool], message_peek: Optional[bool], meta: Optional[Dict[str, Any]], name: Optional[str], origin: Optional[str], placeholder: Optional[str], plugins: Optional[str], powered_by: Optional[bool], restart_conversation: Optional[bool], session_duration: Optional[float], start_first: Optional[bool], stream: Optional[bool], theme: Optional[str], title: Optional[str], tools: Optional[bool], unfurl: Optional[bool], updated_at: float, verbose: Optional[bool], voice_in: Optional[bool], voice_out: Optional[bool]) -> None: + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float, visibility: Optional[IndecentVisibility]) -> None: self.alias = alias - self.attachments = attachments - self.auto_scroll = auto_scroll self.blueprint_id = blueprint_id - self.bot_id = bot_id - self.carousel = carousel - self.contact_collection = contact_collection self.created_at = created_at self.description = description - self.export_conversation = export_conversation - self.form = form self.id = id - self.initial = initial - self.intro = intro - self.language = language - self.layout = layout - self.math = math - self.maximize = maximize - self.message_peek = message_peek self.meta = meta self.name = name - self.origin = origin - self.placeholder = placeholder - self.plugins = plugins - self.powered_by = powered_by - self.restart_conversation = restart_conversation - self.session_duration = session_duration - self.start_first = start_first - self.stream = stream - self.theme = theme - self.title = title - self.tools = tools - self.unfurl = unfurl self.updated_at = updated_at - self.verbose = verbose - self.voice_in = voice_in - self.voice_out = voice_out + self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'IntegrationWidgetFetchResponse': + def from_dict(obj: Any) -> 'FileListStreamItemData': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) - auto_scroll = from_union([from_bool, from_none], obj.get("autoScroll")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - carousel = from_union([from_bool, from_none], obj.get("carousel")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - export_conversation = from_union([from_bool, from_none], obj.get("exportConversation")) - form = from_union([from_bool, from_none], obj.get("form")) id = from_str(obj.get("id")) - initial = from_union([from_str, from_none], obj.get("initial")) - intro = from_union([from_str, from_none], obj.get("intro")) - language = from_union([from_str, from_none], obj.get("language")) - layout = from_union([from_str, from_none], obj.get("layout")) - math = from_union([from_bool, from_none], obj.get("math")) - maximize = from_union([from_bool, from_none], obj.get("maximize")) - message_peek = from_union([from_bool, from_none], obj.get("messagePeek")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - origin = from_union([from_str, from_none], obj.get("origin")) - placeholder = from_union([from_str, from_none], obj.get("placeholder")) - plugins = from_union([from_str, from_none], obj.get("plugins")) - powered_by = from_union([from_bool, from_none], obj.get("poweredBy")) - restart_conversation = from_union([from_bool, from_none], obj.get("restartConversation")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - start_first = from_union([from_bool, from_none], obj.get("startFirst")) - stream = from_union([from_bool, from_none], obj.get("stream")) - theme = from_union([from_str, from_none], obj.get("theme")) - title = from_union([from_str, from_none], obj.get("title")) - tools = from_union([from_bool, from_none], obj.get("tools")) - unfurl = from_union([from_bool, from_none], obj.get("unfurl")) updated_at = from_float(obj.get("updatedAt")) - verbose = from_union([from_bool, from_none], obj.get("verbose")) - voice_in = from_union([from_bool, from_none], obj.get("voiceIn")) - voice_out = from_union([from_bool, from_none], obj.get("voiceOut")) - return IntegrationWidgetFetchResponse(alias, attachments, auto_scroll, blueprint_id, bot_id, carousel, contact_collection, created_at, description, export_conversation, form, id, initial, intro, language, layout, math, maximize, message_peek, meta, name, origin, placeholder, plugins, powered_by, restart_conversation, session_duration, start_first, stream, theme, title, tools, unfurl, updated_at, verbose, voice_in, voice_out) + visibility = from_union([IndecentVisibility, from_none], obj.get("visibility")) + return FileListStreamItemData(alias, blueprint_id, created_at, description, id, meta, name, updated_at, visibility) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) - if self.auto_scroll is not None: - result["autoScroll"] = from_union([from_bool, from_none], self.auto_scroll) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.carousel is not None: - result["carousel"] = from_union([from_bool, from_none], self.carousel) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.export_conversation is not None: - result["exportConversation"] = from_union([from_bool, from_none], self.export_conversation) - if self.form is not None: - result["form"] = from_union([from_bool, from_none], self.form) result["id"] = from_str(self.id) - if self.initial is not None: - result["initial"] = from_union([from_str, from_none], self.initial) - if self.intro is not None: - result["intro"] = from_union([from_str, from_none], self.intro) - if self.language is not None: - result["language"] = from_union([from_str, from_none], self.language) - if self.layout is not None: - result["layout"] = from_union([from_str, from_none], self.layout) - if self.math is not None: - result["math"] = from_union([from_bool, from_none], self.math) - if self.maximize is not None: - result["maximize"] = from_union([from_bool, from_none], self.maximize) - if self.message_peek is not None: - result["messagePeek"] = from_union([from_bool, from_none], self.message_peek) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.origin is not None: - result["origin"] = from_union([from_str, from_none], self.origin) - if self.placeholder is not None: - result["placeholder"] = from_union([from_str, from_none], self.placeholder) - if self.plugins is not None: - result["plugins"] = from_union([from_str, from_none], self.plugins) - if self.powered_by is not None: - result["poweredBy"] = from_union([from_bool, from_none], self.powered_by) - if self.restart_conversation is not None: - result["restartConversation"] = from_union([from_bool, from_none], self.restart_conversation) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - if self.start_first is not None: - result["startFirst"] = from_union([from_bool, from_none], self.start_first) - if self.stream is not None: - result["stream"] = from_union([from_bool, from_none], self.stream) - if self.theme is not None: - result["theme"] = from_union([from_str, from_none], self.theme) - if self.title is not None: - result["title"] = from_union([from_str, from_none], self.title) - if self.tools is not None: - result["tools"] = from_union([from_bool, from_none], self.tools) - if self.unfurl is not None: - result["unfurl"] = from_union([from_bool, from_none], self.unfurl) result["updatedAt"] = to_float(self.updated_at) - if self.verbose is not None: - result["verbose"] = from_union([from_bool, from_none], self.verbose) - if self.voice_in is not None: - result["voiceIn"] = from_union([from_bool, from_none], self.voice_in) - if self.voice_out is not None: - result["voiceOut"] = from_union([from_bool, from_none], self.voice_out) + if self.visibility is not None: + result["visibility"] = from_union([lambda x: to_enum(IndecentVisibility, x), from_none], self.visibility) return result -class WidgetIntegrationFileAttachParams: - file_id: str - """The ID of the file to attach""" +class FileListStreamItemType(Enum): + """The type of event""" - widget_integration_id: str - """The ID of the widget integration""" + ITEM = "item" - def __init__(self, file_id: str, widget_integration_id: str) -> None: - self.file_id = file_id - self.widget_integration_id = widget_integration_id + +class FileListStreamItem: + data: FileListStreamItemData + """Blueprint properties""" + + type: FileListStreamItemType + """The type of event""" + + def __init__(self, data: FileListStreamItemData, type: FileListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'WidgetIntegrationFileAttachParams': + def from_dict(obj: Any) -> 'FileListStreamItem': assert isinstance(obj, dict) - file_id = from_str(obj.get("fileId")) - widget_integration_id = from_str(obj.get("widgetIntegrationId")) - return WidgetIntegrationFileAttachParams(file_id, widget_integration_id) + data = FileListStreamItemData.from_dict(obj.get("data")) + type = FileListStreamItemType(obj.get("type")) + return FileListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["fileId"] = from_str(self.file_id) - result["widgetIntegrationId"] = from_str(self.widget_integration_id) + result["data"] = to_class(FileListStreamItemData, self.data) + result["type"] = to_enum(FileListStreamItemType, self.type) return result -class WidgetIntegrationFileAttachRequestType(Enum): - """The attachment slot type for the file""" +class FileCreateRequestVisibility(Enum): + """The file visibility""" - BAR = "bar" - BOT = "bot" - BUTTON = "button" - USER = "user" + PRIVATE = "private" + PROTECTED = "protected" + PUBLIC = "public" -class WidgetIntegrationFileAttachRequest: - type: WidgetIntegrationFileAttachRequestType - """The attachment slot type for the file""" +class FileCreateRequest: + """Blueprint properties""" - def __init__(self, type: WidgetIntegrationFileAttachRequestType) -> None: - self.type = type + alias: Optional[str] + """The unique alias for the instance""" + + blueprint_id: Optional[str] + """The ID of the blueprint""" + + description: Optional[str] + """The associated description""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" + + name: Optional[str] + """The associated name""" + + visibility: Optional[FileCreateRequestVisibility] + """The file visibility""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], visibility: Optional[FileCreateRequestVisibility]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.description = description + self.meta = meta + self.name = name + self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'WidgetIntegrationFileAttachRequest': + def from_dict(obj: Any) -> 'FileCreateRequest': assert isinstance(obj, dict) - type = WidgetIntegrationFileAttachRequestType(obj.get("type")) - return WidgetIntegrationFileAttachRequest(type) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + description = from_union([from_str, from_none], obj.get("description")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + visibility = from_union([FileCreateRequestVisibility, from_none], obj.get("visibility")) + return FileCreateRequest(alias, blueprint_id, description, meta, name, visibility) def to_dict(self) -> dict: result: dict = {} - result["type"] = to_enum(WidgetIntegrationFileAttachRequestType, self.type) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.visibility is not None: + result["visibility"] = from_union([lambda x: to_enum(FileCreateRequestVisibility, x), from_none], self.visibility) return result -class WidgetIntegrationFileAttachResponse: +class FileCreateResponse: id: str - """The ID of the attached file""" - - type: str - """The attachment slot type""" - - widget_integration_id: str - """The ID of the widget integration""" + """The ID of the created file""" - def __init__(self, id: str, type: str, widget_integration_id: str) -> None: + def __init__(self, id: str) -> None: self.id = id - self.type = type - self.widget_integration_id = widget_integration_id @staticmethod - def from_dict(obj: Any) -> 'WidgetIntegrationFileAttachResponse': + def from_dict(obj: Any) -> 'FileCreateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - type = from_str(obj.get("type")) - widget_integration_id = from_str(obj.get("widgetIntegrationId")) - return WidgetIntegrationFileAttachResponse(id, type, widget_integration_id) + return FileCreateResponse(id) def to_dict(self) -> dict: result: dict = {} result["id"] = from_str(self.id) - result["type"] = from_str(self.type) - result["widgetIntegrationId"] = from_str(self.widget_integration_id) return result -class WidgetIntegrationFileDetachParams: +class FileUploadParams: file_id: str - """The ID of the file to detach""" - - widget_integration_id: str - """The ID of the widget integration""" - def __init__(self, file_id: str, widget_integration_id: str) -> None: + def __init__(self, file_id: str) -> None: self.file_id = file_id - self.widget_integration_id = widget_integration_id @staticmethod - def from_dict(obj: Any) -> 'WidgetIntegrationFileDetachParams': + def from_dict(obj: Any) -> 'FileUploadParams': assert isinstance(obj, dict) file_id = from_str(obj.get("fileId")) - widget_integration_id = from_str(obj.get("widgetIntegrationId")) - return WidgetIntegrationFileDetachParams(file_id, widget_integration_id) + return FileUploadParams(file_id) def to_dict(self) -> dict: result: dict = {} result["fileId"] = from_str(self.file_id) - result["widgetIntegrationId"] = from_str(self.widget_integration_id) return result -class WidgetIntegrationFileDetachResponse: - id: str - """The ID of the detached file""" +class FluffyFile: + """The file definition to upload""" - type: str - """The attachment slot type that was cleared""" + name: Optional[str] + """The file name""" - widget_integration_id: str - """The ID of the widget integration""" + size: float + """The file size""" - def __init__(self, id: str, type: str, widget_integration_id: str) -> None: - self.id = id + type: str + """The file type""" + + def __init__(self, name: Optional[str], size: float, type: str) -> None: + self.name = name + self.size = size self.type = type - self.widget_integration_id = widget_integration_id @staticmethod - def from_dict(obj: Any) -> 'WidgetIntegrationFileDetachResponse': + def from_dict(obj: Any) -> 'FluffyFile': assert isinstance(obj, dict) - id = from_str(obj.get("id")) + name = from_union([from_str, from_none], obj.get("name")) + size = from_float(obj.get("size")) type = from_str(obj.get("type")) - widget_integration_id = from_str(obj.get("widgetIntegrationId")) - return WidgetIntegrationFileDetachResponse(id, type, widget_integration_id) + return FluffyFile(name, size, type) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + result["size"] = to_float(self.size) result["type"] = from_str(self.type) - result["widgetIntegrationId"] = from_str(self.widget_integration_id) return result -class IntegrationWidgetSetupParams: - widget_integration_id: str - """The ID of the Widget integration""" +class FileUploadRequest: + file: Union[str, FluffyFile] + """The file to upload either as http: or data: URL + + The file definition to upload + """ - def __init__(self, widget_integration_id: str) -> None: - self.widget_integration_id = widget_integration_id + def __init__(self, file: Union[str, FluffyFile]) -> None: + self.file = file @staticmethod - def from_dict(obj: Any) -> 'IntegrationWidgetSetupParams': + def from_dict(obj: Any) -> 'FileUploadRequest': assert isinstance(obj, dict) - widget_integration_id = from_str(obj.get("widgetIntegrationId")) - return IntegrationWidgetSetupParams(widget_integration_id) + file = from_union([from_str, FluffyFile.from_dict], obj.get("file")) + return FileUploadRequest(file) def to_dict(self) -> dict: result: dict = {} - result["widgetIntegrationId"] = from_str(self.widget_integration_id) + result["file"] = from_union([from_str, lambda x: to_class(FluffyFile, x)], self.file) return result -class IntegrationWidgetSetupResponse: +class FileUploadResponseUploadRequest: + """The request required to upload the file""" + + headers: Dict[str, Any] + """The HTTP headers to use""" + + method: str + """The HTTP method to use""" + + url: str + """The HTTP url to use""" + + def __init__(self, headers: Dict[str, Any], method: str, url: str) -> None: + self.headers = headers + self.method = method + self.url = url + + @staticmethod + def from_dict(obj: Any) -> 'FileUploadResponseUploadRequest': + assert isinstance(obj, dict) + headers = from_dict(lambda x: x, obj.get("headers")) + method = from_str(obj.get("method")) + url = from_str(obj.get("url")) + return FileUploadResponseUploadRequest(headers, method, url) + + def to_dict(self) -> dict: + result: dict = {} + result["headers"] = from_dict(lambda x: x, self.headers) + result["method"] = from_str(self.method) + result["url"] = from_str(self.url) + return result + + +class FileUploadResponse: id: str - """The ID of the Widget integration""" + """The ID of the upload file""" - def __init__(self, id: str) -> None: + upload_request: Optional[FileUploadResponseUploadRequest] + """The request required to upload the file""" + + def __init__(self, id: str, upload_request: Optional[FileUploadResponseUploadRequest]) -> None: self.id = id + self.upload_request = upload_request @staticmethod - def from_dict(obj: Any) -> 'IntegrationWidgetSetupResponse': + def from_dict(obj: Any) -> 'FileUploadResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationWidgetSetupResponse(id) + upload_request = from_union([FileUploadResponseUploadRequest.from_dict, from_none], obj.get("uploadRequest")) + return FileUploadResponse(id, upload_request) def to_dict(self) -> dict: result: dict = {} result["id"] = from_str(self.id) + if self.upload_request is not None: + result["uploadRequest"] = from_union([lambda x: to_class(FileUploadResponseUploadRequest, x), from_none], self.upload_request) return result -class IntegrationWidgetUpdateParams: - widget_integration_id: str - """The ID of the Widget integration""" +class FileUpdateParams: + file_id: str - def __init__(self, widget_integration_id: str) -> None: - self.widget_integration_id = widget_integration_id + def __init__(self, file_id: str) -> None: + self.file_id = file_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationWidgetUpdateParams': + def from_dict(obj: Any) -> 'FileUpdateParams': assert isinstance(obj, dict) - widget_integration_id = from_str(obj.get("widgetIntegrationId")) - return IntegrationWidgetUpdateParams(widget_integration_id) + file_id = from_str(obj.get("fileId")) + return FileUpdateParams(file_id) def to_dict(self) -> dict: result: dict = {} - result["widgetIntegrationId"] = from_str(self.widget_integration_id) + result["fileId"] = from_str(self.file_id) return result -class IntegrationWidgetUpdateRequest: - """A bot configuration that can be applied without a dedicated bot instance.""" +class FileUpdateRequestVisibility(Enum): + """The file visibility""" - alias: Optional[str] - """The unique alias for the instance""" + PRIVATE = "private" + PROTECTED = "protected" + PUBLIC = "public" - attachments: Optional[bool] - """Whether the Widget integration supports attachments""" - auto_scroll: Optional[bool] - """Whether the Widget integration auto scrolls""" +class FileUpdateRequest: + """Blueprint properties""" + + alias: Optional[str] + """The unique alias for the instance""" blueprint_id: Optional[str] """The ID of the blueprint""" - bot_id: Optional[str] - """The ID of the bot this configuration is using""" - - carousel: Optional[bool] - """Whether the Widget integration supports carousels""" - - contact_collection: Optional[bool] - """Whether the Widget integration collects contacts""" - description: Optional[str] """The associated description""" - export_conversation: Optional[bool] - """Controls whether the Widget allows exporting the current conversation""" - - form: Optional[bool] - """Whether the Widget integration supports forms""" - - initial: Optional[str] - """The initial message of the Widget integration""" - - intro: Optional[str] - """The intro of the Widget integration""" - - language: Optional[str] - """The language of the Widget integration""" - - layout: Optional[str] - """The default layout of the Widget integration""" - - math: Optional[bool] - """Whether the Widget integration supports math""" - - maximize: Optional[bool] - """Controls whether the Widget allows maximizing the conversation""" - - message_peek: Optional[bool] - """Controls whether the Widget allows peeking at the initial messages""" - meta: Optional[Dict[str, Any]] """Meta data information""" - name: Optional[str] - """The associated name""" - - origin: Optional[str] - """The origin URLs of the Widget integration""" - - placeholder: Optional[str] - """The input placeholder of the Widget integration""" - - plugins: Optional[str] - """The plugins of the Widget integration""" - - powered_by: Optional[bool] - """Whether the Widget integration displays powered by""" - - restart_conversation: Optional[bool] - """Controls whether the Widget allows restarting the conversation""" - - session_duration: Optional[float] - """The session duration of the Widget integration""" - - start_first: Optional[bool] - """Whether the Widget integration starts first""" - - stream: Optional[bool] - """Whether the Widget integration is streaming""" - - theme: Optional[str] - """The theme of the Widget integration""" - - title: Optional[str] - """The title of the Widget integration""" - - tools: Optional[bool] - """Whether the Widget integration has tools""" - - unfurl: Optional[bool] - """Whether the Widget integration unfurls links""" - - verbose: Optional[bool] - """Whether the Widget integration is verbose""" - - voice_in: Optional[bool] - """Controls whether the Widget allows voice input""" + name: Optional[str] + """The associated name""" - voice_out: Optional[bool] - """Controls whether the Widget allows voice output""" + visibility: Optional[FileUpdateRequestVisibility] + """The file visibility""" - def __init__(self, alias: Optional[str], attachments: Optional[bool], auto_scroll: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], carousel: Optional[bool], contact_collection: Optional[bool], description: Optional[str], export_conversation: Optional[bool], form: Optional[bool], initial: Optional[str], intro: Optional[str], language: Optional[str], layout: Optional[str], math: Optional[bool], maximize: Optional[bool], message_peek: Optional[bool], meta: Optional[Dict[str, Any]], name: Optional[str], origin: Optional[str], placeholder: Optional[str], plugins: Optional[str], powered_by: Optional[bool], restart_conversation: Optional[bool], session_duration: Optional[float], start_first: Optional[bool], stream: Optional[bool], theme: Optional[str], title: Optional[str], tools: Optional[bool], unfurl: Optional[bool], verbose: Optional[bool], voice_in: Optional[bool], voice_out: Optional[bool]) -> None: + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], visibility: Optional[FileUpdateRequestVisibility]) -> None: self.alias = alias - self.attachments = attachments - self.auto_scroll = auto_scroll self.blueprint_id = blueprint_id - self.bot_id = bot_id - self.carousel = carousel - self.contact_collection = contact_collection self.description = description - self.export_conversation = export_conversation - self.form = form - self.initial = initial - self.intro = intro - self.language = language - self.layout = layout - self.math = math - self.maximize = maximize - self.message_peek = message_peek self.meta = meta self.name = name - self.origin = origin - self.placeholder = placeholder - self.plugins = plugins - self.powered_by = powered_by - self.restart_conversation = restart_conversation - self.session_duration = session_duration - self.start_first = start_first - self.stream = stream - self.theme = theme - self.title = title - self.tools = tools - self.unfurl = unfurl - self.verbose = verbose - self.voice_in = voice_in - self.voice_out = voice_out + self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'IntegrationWidgetUpdateRequest': + def from_dict(obj: Any) -> 'FileUpdateRequest': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) - auto_scroll = from_union([from_bool, from_none], obj.get("autoScroll")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - carousel = from_union([from_bool, from_none], obj.get("carousel")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) description = from_union([from_str, from_none], obj.get("description")) - export_conversation = from_union([from_bool, from_none], obj.get("exportConversation")) - form = from_union([from_bool, from_none], obj.get("form")) - initial = from_union([from_str, from_none], obj.get("initial")) - intro = from_union([from_str, from_none], obj.get("intro")) - language = from_union([from_str, from_none], obj.get("language")) - layout = from_union([from_str, from_none], obj.get("layout")) - math = from_union([from_bool, from_none], obj.get("math")) - maximize = from_union([from_bool, from_none], obj.get("maximize")) - message_peek = from_union([from_bool, from_none], obj.get("messagePeek")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - origin = from_union([from_str, from_none], obj.get("origin")) - placeholder = from_union([from_str, from_none], obj.get("placeholder")) - plugins = from_union([from_str, from_none], obj.get("plugins")) - powered_by = from_union([from_bool, from_none], obj.get("poweredBy")) - restart_conversation = from_union([from_bool, from_none], obj.get("restartConversation")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - start_first = from_union([from_bool, from_none], obj.get("startFirst")) - stream = from_union([from_bool, from_none], obj.get("stream")) - theme = from_union([from_str, from_none], obj.get("theme")) - title = from_union([from_str, from_none], obj.get("title")) - tools = from_union([from_bool, from_none], obj.get("tools")) - unfurl = from_union([from_bool, from_none], obj.get("unfurl")) - verbose = from_union([from_bool, from_none], obj.get("verbose")) - voice_in = from_union([from_bool, from_none], obj.get("voiceIn")) - voice_out = from_union([from_bool, from_none], obj.get("voiceOut")) - return IntegrationWidgetUpdateRequest(alias, attachments, auto_scroll, blueprint_id, bot_id, carousel, contact_collection, description, export_conversation, form, initial, intro, language, layout, math, maximize, message_peek, meta, name, origin, placeholder, plugins, powered_by, restart_conversation, session_duration, start_first, stream, theme, title, tools, unfurl, verbose, voice_in, voice_out) + visibility = from_union([FileUpdateRequestVisibility, from_none], obj.get("visibility")) + return FileUpdateRequest(alias, blueprint_id, description, meta, name, visibility) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) - if self.auto_scroll is not None: - result["autoScroll"] = from_union([from_bool, from_none], self.auto_scroll) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.carousel is not None: - result["carousel"] = from_union([from_bool, from_none], self.carousel) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.export_conversation is not None: - result["exportConversation"] = from_union([from_bool, from_none], self.export_conversation) - if self.form is not None: - result["form"] = from_union([from_bool, from_none], self.form) - if self.initial is not None: - result["initial"] = from_union([from_str, from_none], self.initial) - if self.intro is not None: - result["intro"] = from_union([from_str, from_none], self.intro) - if self.language is not None: - result["language"] = from_union([from_str, from_none], self.language) - if self.layout is not None: - result["layout"] = from_union([from_str, from_none], self.layout) - if self.math is not None: - result["math"] = from_union([from_bool, from_none], self.math) - if self.maximize is not None: - result["maximize"] = from_union([from_bool, from_none], self.maximize) - if self.message_peek is not None: - result["messagePeek"] = from_union([from_bool, from_none], self.message_peek) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.origin is not None: - result["origin"] = from_union([from_str, from_none], self.origin) - if self.placeholder is not None: - result["placeholder"] = from_union([from_str, from_none], self.placeholder) - if self.plugins is not None: - result["plugins"] = from_union([from_str, from_none], self.plugins) - if self.powered_by is not None: - result["poweredBy"] = from_union([from_bool, from_none], self.powered_by) - if self.restart_conversation is not None: - result["restartConversation"] = from_union([from_bool, from_none], self.restart_conversation) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - if self.start_first is not None: - result["startFirst"] = from_union([from_bool, from_none], self.start_first) - if self.stream is not None: - result["stream"] = from_union([from_bool, from_none], self.stream) - if self.theme is not None: - result["theme"] = from_union([from_str, from_none], self.theme) - if self.title is not None: - result["title"] = from_union([from_str, from_none], self.title) - if self.tools is not None: - result["tools"] = from_union([from_bool, from_none], self.tools) - if self.unfurl is not None: - result["unfurl"] = from_union([from_bool, from_none], self.unfurl) - if self.verbose is not None: - result["verbose"] = from_union([from_bool, from_none], self.verbose) - if self.voice_in is not None: - result["voiceIn"] = from_union([from_bool, from_none], self.voice_in) - if self.voice_out is not None: - result["voiceOut"] = from_union([from_bool, from_none], self.voice_out) + if self.visibility is not None: + result["visibility"] = from_union([lambda x: to_enum(FileUpdateRequestVisibility, x), from_none], self.visibility) return result -class IntegrationWidgetUpdateResponse: +class FileUpdateResponse: id: str - """The ID of the Widget Integration""" + """The ID of the updated file""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'IntegrationWidgetUpdateResponse': + def from_dict(obj: Any) -> 'FileUpdateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return IntegrationWidgetUpdateResponse(id) + return FileUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -33789,1130 +32270,1205 @@ def to_dict(self) -> dict: return result -class IntegrationWidgetCreateRequest: - """A bot configuration that can be applied without a dedicated bot instance.""" - - alias: Optional[str] - """The unique alias for the instance""" - - attachments: Optional[bool] - """Weather the Widget integration supports attachments""" - - auto_scroll: Optional[bool] - """Whether the Widget integration auto scrolls""" - - blueprint_id: Optional[str] - """The ID of the blueprint""" - - bot_id: Optional[str] - """The ID of the bot this configuration is using""" - - carousel: Optional[bool] - """Weather the Widget integration supports carousels""" - - contact_collection: Optional[bool] - """Whether the Widget integration collects contacts""" +class FileSyncParams: + file_id: str + """The ID of the file to sync""" - description: Optional[str] - """The associated description""" + def __init__(self, file_id: str) -> None: + self.file_id = file_id - export_conversation: Optional[bool] - """Controls whether the Widget allows exporting the current conversation""" + @staticmethod + def from_dict(obj: Any) -> 'FileSyncParams': + assert isinstance(obj, dict) + file_id = from_str(obj.get("fileId")) + return FileSyncParams(file_id) - form: Optional[bool] - """Weather the Widget integration supports forms""" + def to_dict(self) -> dict: + result: dict = {} + result["fileId"] = from_str(self.file_id) + return result - initial: Optional[str] - """The initial message of the Widget integration""" - intro: Optional[str] - """The intro of the Widget integration""" +class FileSyncResponse: + id: str + """The ID of the file""" - language: Optional[str] - """The language of the Widget integration""" + def __init__(self, id: str) -> None: + self.id = id - layout: Optional[str] - """The default layout of the Widget integration""" + @staticmethod + def from_dict(obj: Any) -> 'FileSyncResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return FileSyncResponse(id) - math: Optional[bool] - """Weather the Widget integration supports math""" + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result - maximize: Optional[bool] - """Controls whether the Widget allows maximizing the conversation""" - message_peek: Optional[bool] - """Controls whether the Widget allows peeking at the initial messages""" +class FileFetchParams: + file_id: str + """The ID of the file to retrieve""" - meta: Optional[Dict[str, Any]] - """Meta data information""" + def __init__(self, file_id: str) -> None: + self.file_id = file_id - name: Optional[str] - """The associated name""" + @staticmethod + def from_dict(obj: Any) -> 'FileFetchParams': + assert isinstance(obj, dict) + file_id = from_str(obj.get("fileId")) + return FileFetchParams(file_id) - origin: Optional[str] - """The origin URLs of the Widget integration""" + def to_dict(self) -> dict: + result: dict = {} + result["fileId"] = from_str(self.file_id) + return result - placeholder: Optional[str] - """The input placeholder of the Widget integration""" - plugins: Optional[str] - """The plugins of the Widget integration""" +class FileFetchResponseVisibility(Enum): + """The file visibility""" - powered_by: Optional[bool] - """Whether the Widget integration displays powered by""" + PRIVATE = "private" + PROTECTED = "protected" + PUBLIC = "public" - restart_conversation: Optional[bool] - """Controls whether the Widget allows restarting the conversation""" - session_duration: Optional[float] - """The session duration of the Widget integration""" +class FileFetchResponse: + """Blueprint properties""" - start_first: Optional[bool] - """Whether the Widget integration starts first""" + alias: Optional[str] + """The unique alias for the instance""" - stream: Optional[bool] - """Whether the Widget integration is streaming""" + blueprint_id: Optional[str] + """The ID of the blueprint""" - theme: Optional[str] - """The theme of the Widget integration""" + created_at: float + """The timestamp (ms) when the instance was created""" - title: Optional[str] - """The title of the Widget integration""" + description: Optional[str] + """The associated description""" - tools: Optional[bool] - """Whether the Widget integration has tools""" + id: str + """The instance ID""" - unfurl: Optional[bool] - """Whether the Widget integration unfurls links""" + meta: Optional[Dict[str, Any]] + """Meta data information""" - verbose: Optional[bool] - """Whether the Widget integration is verbose""" + name: Optional[str] + """The associated name""" - voice_in: Optional[bool] - """Controls whether the Widget allows voice input""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - voice_out: Optional[bool] - """Controls whether the Widget allows voice output""" + visibility: Optional[FileFetchResponseVisibility] + """The file visibility""" - def __init__(self, alias: Optional[str], attachments: Optional[bool], auto_scroll: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], carousel: Optional[bool], contact_collection: Optional[bool], description: Optional[str], export_conversation: Optional[bool], form: Optional[bool], initial: Optional[str], intro: Optional[str], language: Optional[str], layout: Optional[str], math: Optional[bool], maximize: Optional[bool], message_peek: Optional[bool], meta: Optional[Dict[str, Any]], name: Optional[str], origin: Optional[str], placeholder: Optional[str], plugins: Optional[str], powered_by: Optional[bool], restart_conversation: Optional[bool], session_duration: Optional[float], start_first: Optional[bool], stream: Optional[bool], theme: Optional[str], title: Optional[str], tools: Optional[bool], unfurl: Optional[bool], verbose: Optional[bool], voice_in: Optional[bool], voice_out: Optional[bool]) -> None: + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float, visibility: Optional[FileFetchResponseVisibility]) -> None: self.alias = alias - self.attachments = attachments - self.auto_scroll = auto_scroll self.blueprint_id = blueprint_id - self.bot_id = bot_id - self.carousel = carousel - self.contact_collection = contact_collection + self.created_at = created_at self.description = description - self.export_conversation = export_conversation - self.form = form - self.initial = initial - self.intro = intro - self.language = language - self.layout = layout - self.math = math - self.maximize = maximize - self.message_peek = message_peek + self.id = id self.meta = meta self.name = name - self.origin = origin - self.placeholder = placeholder - self.plugins = plugins - self.powered_by = powered_by - self.restart_conversation = restart_conversation - self.session_duration = session_duration - self.start_first = start_first - self.stream = stream - self.theme = theme - self.title = title - self.tools = tools - self.unfurl = unfurl - self.verbose = verbose - self.voice_in = voice_in - self.voice_out = voice_out + self.updated_at = updated_at + self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'IntegrationWidgetCreateRequest': + def from_dict(obj: Any) -> 'FileFetchResponse': assert isinstance(obj, dict) alias = from_union([from_str, from_none], obj.get("alias")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) - auto_scroll = from_union([from_bool, from_none], obj.get("autoScroll")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - carousel = from_union([from_bool, from_none], obj.get("carousel")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - export_conversation = from_union([from_bool, from_none], obj.get("exportConversation")) - form = from_union([from_bool, from_none], obj.get("form")) - initial = from_union([from_str, from_none], obj.get("initial")) - intro = from_union([from_str, from_none], obj.get("intro")) - language = from_union([from_str, from_none], obj.get("language")) - layout = from_union([from_str, from_none], obj.get("layout")) - math = from_union([from_bool, from_none], obj.get("math")) - maximize = from_union([from_bool, from_none], obj.get("maximize")) - message_peek = from_union([from_bool, from_none], obj.get("messagePeek")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - origin = from_union([from_str, from_none], obj.get("origin")) - placeholder = from_union([from_str, from_none], obj.get("placeholder")) - plugins = from_union([from_str, from_none], obj.get("plugins")) - powered_by = from_union([from_bool, from_none], obj.get("poweredBy")) - restart_conversation = from_union([from_bool, from_none], obj.get("restartConversation")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - start_first = from_union([from_bool, from_none], obj.get("startFirst")) - stream = from_union([from_bool, from_none], obj.get("stream")) - theme = from_union([from_str, from_none], obj.get("theme")) - title = from_union([from_str, from_none], obj.get("title")) - tools = from_union([from_bool, from_none], obj.get("tools")) - unfurl = from_union([from_bool, from_none], obj.get("unfurl")) - verbose = from_union([from_bool, from_none], obj.get("verbose")) - voice_in = from_union([from_bool, from_none], obj.get("voiceIn")) - voice_out = from_union([from_bool, from_none], obj.get("voiceOut")) - return IntegrationWidgetCreateRequest(alias, attachments, auto_scroll, blueprint_id, bot_id, carousel, contact_collection, description, export_conversation, form, initial, intro, language, layout, math, maximize, message_peek, meta, name, origin, placeholder, plugins, powered_by, restart_conversation, session_duration, start_first, stream, theme, title, tools, unfurl, verbose, voice_in, voice_out) + updated_at = from_float(obj.get("updatedAt")) + visibility = from_union([FileFetchResponseVisibility, from_none], obj.get("visibility")) + return FileFetchResponse(alias, blueprint_id, created_at, description, id, meta, name, updated_at, visibility) def to_dict(self) -> dict: result: dict = {} if self.alias is not None: result["alias"] = from_union([from_str, from_none], self.alias) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) - if self.auto_scroll is not None: - result["autoScroll"] = from_union([from_bool, from_none], self.auto_scroll) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.carousel is not None: - result["carousel"] = from_union([from_bool, from_none], self.carousel) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.export_conversation is not None: - result["exportConversation"] = from_union([from_bool, from_none], self.export_conversation) - if self.form is not None: - result["form"] = from_union([from_bool, from_none], self.form) - if self.initial is not None: - result["initial"] = from_union([from_str, from_none], self.initial) - if self.intro is not None: - result["intro"] = from_union([from_str, from_none], self.intro) - if self.language is not None: - result["language"] = from_union([from_str, from_none], self.language) - if self.layout is not None: - result["layout"] = from_union([from_str, from_none], self.layout) - if self.math is not None: - result["math"] = from_union([from_bool, from_none], self.math) - if self.maximize is not None: - result["maximize"] = from_union([from_bool, from_none], self.maximize) - if self.message_peek is not None: - result["messagePeek"] = from_union([from_bool, from_none], self.message_peek) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.origin is not None: - result["origin"] = from_union([from_str, from_none], self.origin) - if self.placeholder is not None: - result["placeholder"] = from_union([from_str, from_none], self.placeholder) - if self.plugins is not None: - result["plugins"] = from_union([from_str, from_none], self.plugins) - if self.powered_by is not None: - result["poweredBy"] = from_union([from_bool, from_none], self.powered_by) - if self.restart_conversation is not None: - result["restartConversation"] = from_union([from_bool, from_none], self.restart_conversation) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - if self.start_first is not None: - result["startFirst"] = from_union([from_bool, from_none], self.start_first) - if self.stream is not None: - result["stream"] = from_union([from_bool, from_none], self.stream) - if self.theme is not None: - result["theme"] = from_union([from_str, from_none], self.theme) - if self.title is not None: - result["title"] = from_union([from_str, from_none], self.title) - if self.tools is not None: - result["tools"] = from_union([from_bool, from_none], self.tools) - if self.unfurl is not None: - result["unfurl"] = from_union([from_bool, from_none], self.unfurl) - if self.verbose is not None: - result["verbose"] = from_union([from_bool, from_none], self.verbose) - if self.voice_in is not None: - result["voiceIn"] = from_union([from_bool, from_none], self.voice_in) - if self.voice_out is not None: - result["voiceOut"] = from_union([from_bool, from_none], self.voice_out) + result["updatedAt"] = to_float(self.updated_at) + if self.visibility is not None: + result["visibility"] = from_union([lambda x: to_enum(FileFetchResponseVisibility, x), from_none], self.visibility) return result -class IntegrationWidgetCreateResponse: - id: str - """The ID of the Widget Integration""" +class FileDownloadParams: + file_id: str + """The ID of the file to download""" - def __init__(self, id: str) -> None: - self.id = id + def __init__(self, file_id: str) -> None: + self.file_id = file_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationWidgetCreateResponse': + def from_dict(obj: Any) -> 'FileDownloadParams': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return IntegrationWidgetCreateResponse(id) + file_id = from_str(obj.get("fileId")) + return FileDownloadParams(file_id) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["fileId"] = from_str(self.file_id) return result -class IntegrationWidgetListParamsOrder(Enum): - """The order of the paginated items""" +class FileDownloadResponse: + url: str + """The URL to download the file""" - ASC = "asc" - DESC = "desc" + def __init__(self, url: str) -> None: + self.url = url + @staticmethod + def from_dict(obj: Any) -> 'FileDownloadResponse': + assert isinstance(obj, dict) + url = from_str(obj.get("url")) + return FileDownloadResponse(url) -class IntegrationWidgetListParams: - cursor: Optional[str] - """The cursor to use for pagination""" + def to_dict(self) -> dict: + result: dict = {} + result["url"] = from_str(self.url) + return result - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" - order: Optional[IntegrationWidgetListParamsOrder] - """The order of the paginated items""" +class FileDeleteParams: + file_id: str + """The ID of the file to delete""" - take: Optional[int] - """The number of items to retrieve""" + def __init__(self, file_id: str) -> None: + self.file_id = file_id - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[IntegrationWidgetListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take + @staticmethod + def from_dict(obj: Any) -> 'FileDeleteParams': + assert isinstance(obj, dict) + file_id = from_str(obj.get("fileId")) + return FileDeleteParams(file_id) + + def to_dict(self) -> dict: + result: dict = {} + result["fileId"] = from_str(self.file_id) + return result + + +class FileDeleteResponse: + id: str + """The ID of the deleted file""" + + def __init__(self, id: str) -> None: + self.id = id + + @staticmethod + def from_dict(obj: Any) -> 'FileDeleteResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return FileDeleteResponse(id) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result + + +class EventLogsSubscribeRequest: + history_length: Optional[int] + """Number of recent historical events to replay before + subscribing to live updates. When provided, the subscriber + will first receive up to this many recent events that were + logged before the subscription started. This is useful for + catching up on events that may have occurred during + connection setup. + """ + + def __init__(self, history_length: Optional[int]) -> None: + self.history_length = history_length @staticmethod - def from_dict(obj: Any) -> 'IntegrationWidgetListParams': + def from_dict(obj: Any) -> 'EventLogsSubscribeRequest': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([IntegrationWidgetListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return IntegrationWidgetListParams(cursor, meta, order, take) + history_length = from_union([from_int, from_none], obj.get("historyLength")) + return EventLogsSubscribeRequest(history_length) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(IntegrationWidgetListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + if self.history_length is not None: + result["historyLength"] = from_union([from_int, from_none], self.history_length) return result -class IntegrationWidgetListResponseItem: - """A bot configuration that can be applied without a dedicated bot instance.""" - - alias: Optional[str] - """The unique alias for the instance""" - - attachments: Optional[bool] - """Weather the Widget integration supports attachments""" +class EventLogsSubscribeStreamItemData: + """Instance list properties""" - auto_scroll: Optional[bool] - """Whether the Widget integration auto scrolls""" + ability_id: Optional[str] + """Related ability ID if applicable""" blueprint_id: Optional[str] - """The ID of the blueprint""" + """Related blueprint ID if applicable""" bot_id: Optional[str] - """The ID of the bot this configuration is using""" + """Related bot ID if applicable""" - carousel: Optional[bool] - """Weather the Widget integration supports carousels""" + contact_id: Optional[str] + """Related contact ID if applicable""" - contact_collection: Optional[bool] - """Whether the Widget integration collects contacts""" + conversation_id: Optional[str] + """Related conversation ID if applicable""" created_at: float """The timestamp (ms) when the instance was created""" + dataset_id: Optional[str] + """Related dataset ID if applicable""" + description: Optional[str] """The associated description""" - export_conversation: Optional[bool] - """Controls whether the Widget allows exporting the current conversation""" - - form: Optional[bool] - """Weather the Widget integration supports forms""" - - id: str - """The instance ID""" + discord_integration_id: Optional[str] + """Related Discord integration ID if applicable""" - initial: Optional[str] - """The initial message of the Widget integration""" + email_integration_id: Optional[str] + """Related email integration ID if applicable""" - intro: Optional[str] - """The intro of the Widget integration""" + extract_integration_id: Optional[str] + """Related extract integration ID if applicable""" - language: Optional[str] - """The language of the Widget integration""" + file_id: Optional[str] + """Related file ID if applicable""" - layout: Optional[str] - """The default layout of the Widget integration""" + googlechat_integration_id: Optional[str] + """Related Google Chat integration ID if applicable""" - math: Optional[bool] - """Weather the Widget integration supports math""" + id: str + """The instance ID""" - maximize: Optional[bool] - """Controls whether the Widget allows maximizing the conversation""" + mcpserver_integration_id: Optional[str] + """Related MCP server integration ID if applicable""" - message_peek: Optional[bool] - """Controls whether the Widget allows peeking at the initial messages""" + messenger_integration_id: Optional[str] + """Related Messenger integration ID if applicable""" meta: Optional[Dict[str, Any]] """Meta data information""" + microsoftteams_integration_id: Optional[str] + """Related Microsoft Teams integration ID if applicable""" + name: Optional[str] """The associated name""" - origin: Optional[str] - """The origin URLs of the Widget integration""" + notion_integration_id: Optional[str] + """Related Notion integration ID if applicable""" - placeholder: Optional[str] - """The input placeholder of the Widget integration""" + portal_id: Optional[str] + """Related portal ID if applicable""" - plugins: Optional[str] - """The plugins of the Widget integration""" + record_id: Optional[str] + """Related record ID if applicable""" - powered_by: Optional[bool] - """Whether the Widget integration displays powered by""" + secret_id: Optional[str] + """Related secret ID if applicable""" - restart_conversation: Optional[bool] - """Controls whether the Widget allows restarting the conversation""" + sitemap_integration_id: Optional[str] + """Related sitemap integration ID if applicable""" - session_duration: Optional[float] - """The session duration of the Widget integration""" + skillset_id: Optional[str] + """Related skillset ID if applicable""" - start_first: Optional[bool] - """Whether the Widget integration starts first""" + slack_integration_id: Optional[str] + """Related Slack integration ID if applicable""" - stream: Optional[bool] - """Whether the Widget integration is streaming""" + support_integration_id: Optional[str] + """Related support integration ID if applicable""" - theme: Optional[str] - """The theme of the Widget integration""" + task_id: Optional[str] + """Related task ID if applicable""" - title: Optional[str] - """The title of the Widget integration""" + telegram_integration_id: Optional[str] + """Related Telegram integration ID if applicable""" - tools: Optional[bool] - """Whether the Widget integration has tools""" + trigger_integration_id: Optional[str] + """Related trigger integration ID if applicable""" - unfurl: Optional[bool] - """Whether the Widget integration unfurls links""" + twilio_integration_id: Optional[str] + """Related Twilio integration ID if applicable""" + + type: str + """The type of event (e.g., 'conversation.create')""" updated_at: float """The timestamp (ms) when the instance was updated""" - verbose: Optional[bool] - """Whether the Widget integration is verbose""" + webhook_id: Optional[str] + """Related webhook ID if applicable""" - voice_in: Optional[bool] - """Whether the Widget integration supports voice input""" + whatsapp_integration_id: Optional[str] + """Related WhatsApp integration ID if applicable""" - voice_out: Optional[bool] - """Whether the Widget integration supports voice output""" + widget_integration_id: Optional[str] + """Related widget integration ID if applicable""" - def __init__(self, alias: Optional[str], attachments: Optional[bool], auto_scroll: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], carousel: Optional[bool], contact_collection: Optional[bool], created_at: float, description: Optional[str], export_conversation: Optional[bool], form: Optional[bool], id: str, initial: Optional[str], intro: Optional[str], language: Optional[str], layout: Optional[str], math: Optional[bool], maximize: Optional[bool], message_peek: Optional[bool], meta: Optional[Dict[str, Any]], name: Optional[str], origin: Optional[str], placeholder: Optional[str], plugins: Optional[str], powered_by: Optional[bool], restart_conversation: Optional[bool], session_duration: Optional[float], start_first: Optional[bool], stream: Optional[bool], theme: Optional[str], title: Optional[str], tools: Optional[bool], unfurl: Optional[bool], updated_at: float, verbose: Optional[bool], voice_in: Optional[bool], voice_out: Optional[bool]) -> None: - self.alias = alias - self.attachments = attachments - self.auto_scroll = auto_scroll + def __init__(self, ability_id: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_id: Optional[str], conversation_id: Optional[str], created_at: float, dataset_id: Optional[str], description: Optional[str], discord_integration_id: Optional[str], email_integration_id: Optional[str], extract_integration_id: Optional[str], file_id: Optional[str], googlechat_integration_id: Optional[str], id: str, mcpserver_integration_id: Optional[str], messenger_integration_id: Optional[str], meta: Optional[Dict[str, Any]], microsoftteams_integration_id: Optional[str], name: Optional[str], notion_integration_id: Optional[str], portal_id: Optional[str], record_id: Optional[str], secret_id: Optional[str], sitemap_integration_id: Optional[str], skillset_id: Optional[str], slack_integration_id: Optional[str], support_integration_id: Optional[str], task_id: Optional[str], telegram_integration_id: Optional[str], trigger_integration_id: Optional[str], twilio_integration_id: Optional[str], type: str, updated_at: float, webhook_id: Optional[str], whatsapp_integration_id: Optional[str], widget_integration_id: Optional[str]) -> None: + self.ability_id = ability_id self.blueprint_id = blueprint_id self.bot_id = bot_id - self.carousel = carousel - self.contact_collection = contact_collection + self.contact_id = contact_id + self.conversation_id = conversation_id self.created_at = created_at + self.dataset_id = dataset_id self.description = description - self.export_conversation = export_conversation - self.form = form + self.discord_integration_id = discord_integration_id + self.email_integration_id = email_integration_id + self.extract_integration_id = extract_integration_id + self.file_id = file_id + self.googlechat_integration_id = googlechat_integration_id self.id = id - self.initial = initial - self.intro = intro - self.language = language - self.layout = layout - self.math = math - self.maximize = maximize - self.message_peek = message_peek + self.mcpserver_integration_id = mcpserver_integration_id + self.messenger_integration_id = messenger_integration_id self.meta = meta + self.microsoftteams_integration_id = microsoftteams_integration_id self.name = name - self.origin = origin - self.placeholder = placeholder - self.plugins = plugins - self.powered_by = powered_by - self.restart_conversation = restart_conversation - self.session_duration = session_duration - self.start_first = start_first - self.stream = stream - self.theme = theme - self.title = title - self.tools = tools - self.unfurl = unfurl + self.notion_integration_id = notion_integration_id + self.portal_id = portal_id + self.record_id = record_id + self.secret_id = secret_id + self.sitemap_integration_id = sitemap_integration_id + self.skillset_id = skillset_id + self.slack_integration_id = slack_integration_id + self.support_integration_id = support_integration_id + self.task_id = task_id + self.telegram_integration_id = telegram_integration_id + self.trigger_integration_id = trigger_integration_id + self.twilio_integration_id = twilio_integration_id + self.type = type self.updated_at = updated_at - self.verbose = verbose - self.voice_in = voice_in - self.voice_out = voice_out + self.webhook_id = webhook_id + self.whatsapp_integration_id = whatsapp_integration_id + self.widget_integration_id = widget_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationWidgetListResponseItem': + def from_dict(obj: Any) -> 'EventLogsSubscribeStreamItemData': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) - auto_scroll = from_union([from_bool, from_none], obj.get("autoScroll")) + ability_id = from_union([from_str, from_none], obj.get("abilityId")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) - carousel = from_union([from_bool, from_none], obj.get("carousel")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) + conversation_id = from_union([from_str, from_none], obj.get("conversationId")) created_at = from_float(obj.get("createdAt")) + dataset_id = from_union([from_str, from_none], obj.get("datasetId")) description = from_union([from_str, from_none], obj.get("description")) - export_conversation = from_union([from_bool, from_none], obj.get("exportConversation")) - form = from_union([from_bool, from_none], obj.get("form")) + discord_integration_id = from_union([from_str, from_none], obj.get("discordIntegrationId")) + email_integration_id = from_union([from_str, from_none], obj.get("emailIntegrationId")) + extract_integration_id = from_union([from_str, from_none], obj.get("extractIntegrationId")) + file_id = from_union([from_str, from_none], obj.get("fileId")) + googlechat_integration_id = from_union([from_str, from_none], obj.get("googlechatIntegrationId")) id = from_str(obj.get("id")) - initial = from_union([from_str, from_none], obj.get("initial")) - intro = from_union([from_str, from_none], obj.get("intro")) - language = from_union([from_str, from_none], obj.get("language")) - layout = from_union([from_str, from_none], obj.get("layout")) - math = from_union([from_bool, from_none], obj.get("math")) - maximize = from_union([from_bool, from_none], obj.get("maximize")) - message_peek = from_union([from_bool, from_none], obj.get("messagePeek")) + mcpserver_integration_id = from_union([from_str, from_none], obj.get("mcpserverIntegrationId")) + messenger_integration_id = from_union([from_str, from_none], obj.get("messengerIntegrationId")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + microsoftteams_integration_id = from_union([from_str, from_none], obj.get("microsoftteamsIntegrationId")) name = from_union([from_str, from_none], obj.get("name")) - origin = from_union([from_str, from_none], obj.get("origin")) - placeholder = from_union([from_str, from_none], obj.get("placeholder")) - plugins = from_union([from_str, from_none], obj.get("plugins")) - powered_by = from_union([from_bool, from_none], obj.get("poweredBy")) - restart_conversation = from_union([from_bool, from_none], obj.get("restartConversation")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - start_first = from_union([from_bool, from_none], obj.get("startFirst")) - stream = from_union([from_bool, from_none], obj.get("stream")) - theme = from_union([from_str, from_none], obj.get("theme")) - title = from_union([from_str, from_none], obj.get("title")) - tools = from_union([from_bool, from_none], obj.get("tools")) - unfurl = from_union([from_bool, from_none], obj.get("unfurl")) + notion_integration_id = from_union([from_str, from_none], obj.get("notionIntegrationId")) + portal_id = from_union([from_str, from_none], obj.get("portalId")) + record_id = from_union([from_str, from_none], obj.get("recordId")) + secret_id = from_union([from_str, from_none], obj.get("secretId")) + sitemap_integration_id = from_union([from_str, from_none], obj.get("sitemapIntegrationId")) + skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + slack_integration_id = from_union([from_str, from_none], obj.get("slackIntegrationId")) + support_integration_id = from_union([from_str, from_none], obj.get("supportIntegrationId")) + task_id = from_union([from_str, from_none], obj.get("taskId")) + telegram_integration_id = from_union([from_str, from_none], obj.get("telegramIntegrationId")) + trigger_integration_id = from_union([from_str, from_none], obj.get("triggerIntegrationId")) + twilio_integration_id = from_union([from_str, from_none], obj.get("twilioIntegrationId")) + type = from_str(obj.get("type")) updated_at = from_float(obj.get("updatedAt")) - verbose = from_union([from_bool, from_none], obj.get("verbose")) - voice_in = from_union([from_bool, from_none], obj.get("voiceIn")) - voice_out = from_union([from_bool, from_none], obj.get("voiceOut")) - return IntegrationWidgetListResponseItem(alias, attachments, auto_scroll, blueprint_id, bot_id, carousel, contact_collection, created_at, description, export_conversation, form, id, initial, intro, language, layout, math, maximize, message_peek, meta, name, origin, placeholder, plugins, powered_by, restart_conversation, session_duration, start_first, stream, theme, title, tools, unfurl, updated_at, verbose, voice_in, voice_out) + webhook_id = from_union([from_str, from_none], obj.get("webhookId")) + whatsapp_integration_id = from_union([from_str, from_none], obj.get("whatsappIntegrationId")) + widget_integration_id = from_union([from_str, from_none], obj.get("widgetIntegrationId")) + return EventLogsSubscribeStreamItemData(ability_id, blueprint_id, bot_id, contact_id, conversation_id, created_at, dataset_id, description, discord_integration_id, email_integration_id, extract_integration_id, file_id, googlechat_integration_id, id, mcpserver_integration_id, messenger_integration_id, meta, microsoftteams_integration_id, name, notion_integration_id, portal_id, record_id, secret_id, sitemap_integration_id, skillset_id, slack_integration_id, support_integration_id, task_id, telegram_integration_id, trigger_integration_id, twilio_integration_id, type, updated_at, webhook_id, whatsapp_integration_id, widget_integration_id) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) - if self.auto_scroll is not None: - result["autoScroll"] = from_union([from_bool, from_none], self.auto_scroll) + if self.ability_id is not None: + result["abilityId"] = from_union([from_str, from_none], self.ability_id) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.carousel is not None: - result["carousel"] = from_union([from_bool, from_none], self.carousel) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) + if self.conversation_id is not None: + result["conversationId"] = from_union([from_str, from_none], self.conversation_id) result["createdAt"] = to_float(self.created_at) + if self.dataset_id is not None: + result["datasetId"] = from_union([from_str, from_none], self.dataset_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.export_conversation is not None: - result["exportConversation"] = from_union([from_bool, from_none], self.export_conversation) - if self.form is not None: - result["form"] = from_union([from_bool, from_none], self.form) + if self.discord_integration_id is not None: + result["discordIntegrationId"] = from_union([from_str, from_none], self.discord_integration_id) + if self.email_integration_id is not None: + result["emailIntegrationId"] = from_union([from_str, from_none], self.email_integration_id) + if self.extract_integration_id is not None: + result["extractIntegrationId"] = from_union([from_str, from_none], self.extract_integration_id) + if self.file_id is not None: + result["fileId"] = from_union([from_str, from_none], self.file_id) + if self.googlechat_integration_id is not None: + result["googlechatIntegrationId"] = from_union([from_str, from_none], self.googlechat_integration_id) result["id"] = from_str(self.id) - if self.initial is not None: - result["initial"] = from_union([from_str, from_none], self.initial) - if self.intro is not None: - result["intro"] = from_union([from_str, from_none], self.intro) - if self.language is not None: - result["language"] = from_union([from_str, from_none], self.language) - if self.layout is not None: - result["layout"] = from_union([from_str, from_none], self.layout) - if self.math is not None: - result["math"] = from_union([from_bool, from_none], self.math) - if self.maximize is not None: - result["maximize"] = from_union([from_bool, from_none], self.maximize) - if self.message_peek is not None: - result["messagePeek"] = from_union([from_bool, from_none], self.message_peek) + if self.mcpserver_integration_id is not None: + result["mcpserverIntegrationId"] = from_union([from_str, from_none], self.mcpserver_integration_id) + if self.messenger_integration_id is not None: + result["messengerIntegrationId"] = from_union([from_str, from_none], self.messenger_integration_id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.microsoftteams_integration_id is not None: + result["microsoftteamsIntegrationId"] = from_union([from_str, from_none], self.microsoftteams_integration_id) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.origin is not None: - result["origin"] = from_union([from_str, from_none], self.origin) - if self.placeholder is not None: - result["placeholder"] = from_union([from_str, from_none], self.placeholder) - if self.plugins is not None: - result["plugins"] = from_union([from_str, from_none], self.plugins) - if self.powered_by is not None: - result["poweredBy"] = from_union([from_bool, from_none], self.powered_by) - if self.restart_conversation is not None: - result["restartConversation"] = from_union([from_bool, from_none], self.restart_conversation) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - if self.start_first is not None: - result["startFirst"] = from_union([from_bool, from_none], self.start_first) - if self.stream is not None: - result["stream"] = from_union([from_bool, from_none], self.stream) - if self.theme is not None: - result["theme"] = from_union([from_str, from_none], self.theme) - if self.title is not None: - result["title"] = from_union([from_str, from_none], self.title) - if self.tools is not None: - result["tools"] = from_union([from_bool, from_none], self.tools) - if self.unfurl is not None: - result["unfurl"] = from_union([from_bool, from_none], self.unfurl) + if self.notion_integration_id is not None: + result["notionIntegrationId"] = from_union([from_str, from_none], self.notion_integration_id) + if self.portal_id is not None: + result["portalId"] = from_union([from_str, from_none], self.portal_id) + if self.record_id is not None: + result["recordId"] = from_union([from_str, from_none], self.record_id) + if self.secret_id is not None: + result["secretId"] = from_union([from_str, from_none], self.secret_id) + if self.sitemap_integration_id is not None: + result["sitemapIntegrationId"] = from_union([from_str, from_none], self.sitemap_integration_id) + if self.skillset_id is not None: + result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) + if self.slack_integration_id is not None: + result["slackIntegrationId"] = from_union([from_str, from_none], self.slack_integration_id) + if self.support_integration_id is not None: + result["supportIntegrationId"] = from_union([from_str, from_none], self.support_integration_id) + if self.task_id is not None: + result["taskId"] = from_union([from_str, from_none], self.task_id) + if self.telegram_integration_id is not None: + result["telegramIntegrationId"] = from_union([from_str, from_none], self.telegram_integration_id) + if self.trigger_integration_id is not None: + result["triggerIntegrationId"] = from_union([from_str, from_none], self.trigger_integration_id) + if self.twilio_integration_id is not None: + result["twilioIntegrationId"] = from_union([from_str, from_none], self.twilio_integration_id) + result["type"] = from_str(self.type) result["updatedAt"] = to_float(self.updated_at) - if self.verbose is not None: - result["verbose"] = from_union([from_bool, from_none], self.verbose) - if self.voice_in is not None: - result["voiceIn"] = from_union([from_bool, from_none], self.voice_in) - if self.voice_out is not None: - result["voiceOut"] = from_union([from_bool, from_none], self.voice_out) + if self.webhook_id is not None: + result["webhookId"] = from_union([from_str, from_none], self.webhook_id) + if self.whatsapp_integration_id is not None: + result["whatsappIntegrationId"] = from_union([from_str, from_none], self.whatsapp_integration_id) + if self.widget_integration_id is not None: + result["widgetIntegrationId"] = from_union([from_str, from_none], self.widget_integration_id) return result -class IntegrationWidgetListResponse: - cursor: str - """Cursor for fetching the next page""" +class EventLogsSubscribeStreamItemType(Enum): + """The type of event""" - items: List[IntegrationWidgetListResponseItem] + ITEM = "item" - def __init__(self, cursor: str, items: List[IntegrationWidgetListResponseItem]) -> None: - self.cursor = cursor - self.items = items + +class EventLogsSubscribeStreamItem: + data: EventLogsSubscribeStreamItemData + """Instance list properties""" + + type: EventLogsSubscribeStreamItemType + """The type of event""" + + def __init__(self, data: EventLogsSubscribeStreamItemData, type: EventLogsSubscribeStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'IntegrationWidgetListResponse': + def from_dict(obj: Any) -> 'EventLogsSubscribeStreamItem': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(IntegrationWidgetListResponseItem.from_dict, obj.get("items")) - return IntegrationWidgetListResponse(cursor, items) + data = EventLogsSubscribeStreamItemData.from_dict(obj.get("data")) + type = EventLogsSubscribeStreamItemType(obj.get("type")) + return EventLogsSubscribeStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(IntegrationWidgetListResponseItem, x), self.items) + result["data"] = to_class(EventLogsSubscribeStreamItemData, self.data) + result["type"] = to_enum(EventLogsSubscribeStreamItemType, self.type) return result -class IntegrationWidgetListStreamItemData: - """A bot configuration that can be applied without a dedicated bot instance.""" +class EventLogListParamsOrder(Enum): + """The order of the paginated items""" - alias: Optional[str] - """The unique alias for the instance""" + ASC = "asc" + DESC = "desc" - attachments: Optional[bool] - """Weather the Widget integration supports attachments""" - auto_scroll: Optional[bool] - """Whether the Widget integration auto scrolls""" +class EventLogListParams: + cursor: Optional[str] + """The cursor to use for pagination""" + + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" + + order: Optional[EventLogListParamsOrder] + """The order of the paginated items""" + + take: Optional[int] + """The number of items to retrieve""" + + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[EventLogListParamsOrder], take: Optional[int]) -> None: + self.cursor = cursor + self.meta = meta + self.order = order + self.take = take + + @staticmethod + def from_dict(obj: Any) -> 'EventLogListParams': + assert isinstance(obj, dict) + cursor = from_union([from_str, from_none], obj.get("cursor")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([EventLogListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return EventLogListParams(cursor, meta, order, take) + + def to_dict(self) -> dict: + result: dict = {} + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(EventLogListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) + return result + + +class EventLogListResponseItem: + """Instance list properties""" + + ability_id: Optional[str] + """Related ability ID if applicable""" blueprint_id: Optional[str] - """The ID of the blueprint""" + """Related blueprint ID if applicable""" bot_id: Optional[str] - """The ID of the bot this configuration is using""" + """Related bot ID if applicable""" - carousel: Optional[bool] - """Weather the Widget integration supports carousels""" + contact_id: Optional[str] + """Related contact ID if applicable""" - contact_collection: Optional[bool] - """Whether the Widget integration collects contacts""" + conversation_id: Optional[str] + """Related conversation ID if applicable""" created_at: float """The timestamp (ms) when the instance was created""" + dataset_id: Optional[str] + """Related dataset ID if applicable""" + description: Optional[str] """The associated description""" - export_conversation: Optional[bool] - """Controls whether the Widget allows exporting the current conversation""" - - form: Optional[bool] - """Weather the Widget integration supports forms""" - - id: str - """The instance ID""" + discord_integration_id: Optional[str] + """Related Discord integration ID if applicable""" - initial: Optional[str] - """The initial message of the Widget integration""" + email_integration_id: Optional[str] + """Related email integration ID if applicable""" - intro: Optional[str] - """The intro of the Widget integration""" + extract_integration_id: Optional[str] + """Related extract integration ID if applicable""" - language: Optional[str] - """The language of the Widget integration""" + file_id: Optional[str] + """Related file ID if applicable""" - layout: Optional[str] - """The default layout of the Widget integration""" + googlechat_integration_id: Optional[str] + """Related Google Chat integration ID if applicable""" - math: Optional[bool] - """Weather the Widget integration supports math""" + id: str + """The instance ID""" - maximize: Optional[bool] - """Controls whether the Widget allows maximizing the conversation""" + mcpserver_integration_id: Optional[str] + """Related MCP server integration ID if applicable""" - message_peek: Optional[bool] - """Controls whether the Widget allows peeking at the initial messages""" + messenger_integration_id: Optional[str] + """Related Messenger integration ID if applicable""" meta: Optional[Dict[str, Any]] """Meta data information""" + microsoftteams_integration_id: Optional[str] + """Related Microsoft Teams integration ID if applicable""" + name: Optional[str] """The associated name""" - origin: Optional[str] - """The origin URLs of the Widget integration""" + notion_integration_id: Optional[str] + """Related Notion integration ID if applicable""" - placeholder: Optional[str] - """The input placeholder of the Widget integration""" + portal_id: Optional[str] + """Related portal ID if applicable""" - plugins: Optional[str] - """The plugins of the Widget integration""" + record_id: Optional[str] + """Related record ID if applicable""" - powered_by: Optional[bool] - """Whether the Widget integration displays powered by""" + secret_id: Optional[str] + """Related secret ID if applicable""" - restart_conversation: Optional[bool] - """Controls whether the Widget allows restarting the conversation""" + sitemap_integration_id: Optional[str] + """Related sitemap integration ID if applicable""" - session_duration: Optional[float] - """The session duration of the Widget integration""" + skillset_id: Optional[str] + """Related skillset ID if applicable""" - start_first: Optional[bool] - """Whether the Widget integration starts first""" + slack_integration_id: Optional[str] + """Related Slack integration ID if applicable""" - stream: Optional[bool] - """Whether the Widget integration is streaming""" + support_integration_id: Optional[str] + """Related support integration ID if applicable""" - theme: Optional[str] - """The theme of the Widget integration""" + task_id: Optional[str] + """Related task ID if applicable""" - title: Optional[str] - """The title of the Widget integration""" + telegram_integration_id: Optional[str] + """Related Telegram integration ID if applicable""" - tools: Optional[bool] - """Whether the Widget integration has tools""" + trigger_integration_id: Optional[str] + """Related trigger integration ID if applicable""" - unfurl: Optional[bool] - """Whether the Widget integration unfurls links""" + twilio_integration_id: Optional[str] + """Related Twilio integration ID if applicable""" + + type: str + """The type of event (e.g., 'conversation.create')""" updated_at: float """The timestamp (ms) when the instance was updated""" - verbose: Optional[bool] - """Whether the Widget integration is verbose""" + webhook_id: Optional[str] + """Related webhook ID if applicable""" - voice_in: Optional[bool] - """Whether the Widget integration supports voice input""" + whatsapp_integration_id: Optional[str] + """Related WhatsApp integration ID if applicable""" - voice_out: Optional[bool] - """Whether the Widget integration supports voice output""" + widget_integration_id: Optional[str] + """Related widget integration ID if applicable""" - def __init__(self, alias: Optional[str], attachments: Optional[bool], auto_scroll: Optional[bool], blueprint_id: Optional[str], bot_id: Optional[str], carousel: Optional[bool], contact_collection: Optional[bool], created_at: float, description: Optional[str], export_conversation: Optional[bool], form: Optional[bool], id: str, initial: Optional[str], intro: Optional[str], language: Optional[str], layout: Optional[str], math: Optional[bool], maximize: Optional[bool], message_peek: Optional[bool], meta: Optional[Dict[str, Any]], name: Optional[str], origin: Optional[str], placeholder: Optional[str], plugins: Optional[str], powered_by: Optional[bool], restart_conversation: Optional[bool], session_duration: Optional[float], start_first: Optional[bool], stream: Optional[bool], theme: Optional[str], title: Optional[str], tools: Optional[bool], unfurl: Optional[bool], updated_at: float, verbose: Optional[bool], voice_in: Optional[bool], voice_out: Optional[bool]) -> None: - self.alias = alias - self.attachments = attachments - self.auto_scroll = auto_scroll + def __init__(self, ability_id: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_id: Optional[str], conversation_id: Optional[str], created_at: float, dataset_id: Optional[str], description: Optional[str], discord_integration_id: Optional[str], email_integration_id: Optional[str], extract_integration_id: Optional[str], file_id: Optional[str], googlechat_integration_id: Optional[str], id: str, mcpserver_integration_id: Optional[str], messenger_integration_id: Optional[str], meta: Optional[Dict[str, Any]], microsoftteams_integration_id: Optional[str], name: Optional[str], notion_integration_id: Optional[str], portal_id: Optional[str], record_id: Optional[str], secret_id: Optional[str], sitemap_integration_id: Optional[str], skillset_id: Optional[str], slack_integration_id: Optional[str], support_integration_id: Optional[str], task_id: Optional[str], telegram_integration_id: Optional[str], trigger_integration_id: Optional[str], twilio_integration_id: Optional[str], type: str, updated_at: float, webhook_id: Optional[str], whatsapp_integration_id: Optional[str], widget_integration_id: Optional[str]) -> None: + self.ability_id = ability_id self.blueprint_id = blueprint_id self.bot_id = bot_id - self.carousel = carousel - self.contact_collection = contact_collection + self.contact_id = contact_id + self.conversation_id = conversation_id self.created_at = created_at + self.dataset_id = dataset_id self.description = description - self.export_conversation = export_conversation - self.form = form + self.discord_integration_id = discord_integration_id + self.email_integration_id = email_integration_id + self.extract_integration_id = extract_integration_id + self.file_id = file_id + self.googlechat_integration_id = googlechat_integration_id self.id = id - self.initial = initial - self.intro = intro - self.language = language - self.layout = layout - self.math = math - self.maximize = maximize - self.message_peek = message_peek + self.mcpserver_integration_id = mcpserver_integration_id + self.messenger_integration_id = messenger_integration_id self.meta = meta + self.microsoftteams_integration_id = microsoftteams_integration_id self.name = name - self.origin = origin - self.placeholder = placeholder - self.plugins = plugins - self.powered_by = powered_by - self.restart_conversation = restart_conversation - self.session_duration = session_duration - self.start_first = start_first - self.stream = stream - self.theme = theme - self.title = title - self.tools = tools - self.unfurl = unfurl + self.notion_integration_id = notion_integration_id + self.portal_id = portal_id + self.record_id = record_id + self.secret_id = secret_id + self.sitemap_integration_id = sitemap_integration_id + self.skillset_id = skillset_id + self.slack_integration_id = slack_integration_id + self.support_integration_id = support_integration_id + self.task_id = task_id + self.telegram_integration_id = telegram_integration_id + self.trigger_integration_id = trigger_integration_id + self.twilio_integration_id = twilio_integration_id + self.type = type self.updated_at = updated_at - self.verbose = verbose - self.voice_in = voice_in - self.voice_out = voice_out + self.webhook_id = webhook_id + self.whatsapp_integration_id = whatsapp_integration_id + self.widget_integration_id = widget_integration_id @staticmethod - def from_dict(obj: Any) -> 'IntegrationWidgetListStreamItemData': + def from_dict(obj: Any) -> 'EventLogListResponseItem': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - attachments = from_union([from_bool, from_none], obj.get("attachments")) - auto_scroll = from_union([from_bool, from_none], obj.get("autoScroll")) + ability_id = from_union([from_str, from_none], obj.get("abilityId")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) - carousel = from_union([from_bool, from_none], obj.get("carousel")) - contact_collection = from_union([from_bool, from_none], obj.get("contactCollection")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) + conversation_id = from_union([from_str, from_none], obj.get("conversationId")) created_at = from_float(obj.get("createdAt")) + dataset_id = from_union([from_str, from_none], obj.get("datasetId")) description = from_union([from_str, from_none], obj.get("description")) - export_conversation = from_union([from_bool, from_none], obj.get("exportConversation")) - form = from_union([from_bool, from_none], obj.get("form")) + discord_integration_id = from_union([from_str, from_none], obj.get("discordIntegrationId")) + email_integration_id = from_union([from_str, from_none], obj.get("emailIntegrationId")) + extract_integration_id = from_union([from_str, from_none], obj.get("extractIntegrationId")) + file_id = from_union([from_str, from_none], obj.get("fileId")) + googlechat_integration_id = from_union([from_str, from_none], obj.get("googlechatIntegrationId")) id = from_str(obj.get("id")) - initial = from_union([from_str, from_none], obj.get("initial")) - intro = from_union([from_str, from_none], obj.get("intro")) - language = from_union([from_str, from_none], obj.get("language")) - layout = from_union([from_str, from_none], obj.get("layout")) - math = from_union([from_bool, from_none], obj.get("math")) - maximize = from_union([from_bool, from_none], obj.get("maximize")) - message_peek = from_union([from_bool, from_none], obj.get("messagePeek")) + mcpserver_integration_id = from_union([from_str, from_none], obj.get("mcpserverIntegrationId")) + messenger_integration_id = from_union([from_str, from_none], obj.get("messengerIntegrationId")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + microsoftteams_integration_id = from_union([from_str, from_none], obj.get("microsoftteamsIntegrationId")) name = from_union([from_str, from_none], obj.get("name")) - origin = from_union([from_str, from_none], obj.get("origin")) - placeholder = from_union([from_str, from_none], obj.get("placeholder")) - plugins = from_union([from_str, from_none], obj.get("plugins")) - powered_by = from_union([from_bool, from_none], obj.get("poweredBy")) - restart_conversation = from_union([from_bool, from_none], obj.get("restartConversation")) - session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) - start_first = from_union([from_bool, from_none], obj.get("startFirst")) - stream = from_union([from_bool, from_none], obj.get("stream")) - theme = from_union([from_str, from_none], obj.get("theme")) - title = from_union([from_str, from_none], obj.get("title")) - tools = from_union([from_bool, from_none], obj.get("tools")) - unfurl = from_union([from_bool, from_none], obj.get("unfurl")) + notion_integration_id = from_union([from_str, from_none], obj.get("notionIntegrationId")) + portal_id = from_union([from_str, from_none], obj.get("portalId")) + record_id = from_union([from_str, from_none], obj.get("recordId")) + secret_id = from_union([from_str, from_none], obj.get("secretId")) + sitemap_integration_id = from_union([from_str, from_none], obj.get("sitemapIntegrationId")) + skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + slack_integration_id = from_union([from_str, from_none], obj.get("slackIntegrationId")) + support_integration_id = from_union([from_str, from_none], obj.get("supportIntegrationId")) + task_id = from_union([from_str, from_none], obj.get("taskId")) + telegram_integration_id = from_union([from_str, from_none], obj.get("telegramIntegrationId")) + trigger_integration_id = from_union([from_str, from_none], obj.get("triggerIntegrationId")) + twilio_integration_id = from_union([from_str, from_none], obj.get("twilioIntegrationId")) + type = from_str(obj.get("type")) updated_at = from_float(obj.get("updatedAt")) - verbose = from_union([from_bool, from_none], obj.get("verbose")) - voice_in = from_union([from_bool, from_none], obj.get("voiceIn")) - voice_out = from_union([from_bool, from_none], obj.get("voiceOut")) - return IntegrationWidgetListStreamItemData(alias, attachments, auto_scroll, blueprint_id, bot_id, carousel, contact_collection, created_at, description, export_conversation, form, id, initial, intro, language, layout, math, maximize, message_peek, meta, name, origin, placeholder, plugins, powered_by, restart_conversation, session_duration, start_first, stream, theme, title, tools, unfurl, updated_at, verbose, voice_in, voice_out) + webhook_id = from_union([from_str, from_none], obj.get("webhookId")) + whatsapp_integration_id = from_union([from_str, from_none], obj.get("whatsappIntegrationId")) + widget_integration_id = from_union([from_str, from_none], obj.get("widgetIntegrationId")) + return EventLogListResponseItem(ability_id, blueprint_id, bot_id, contact_id, conversation_id, created_at, dataset_id, description, discord_integration_id, email_integration_id, extract_integration_id, file_id, googlechat_integration_id, id, mcpserver_integration_id, messenger_integration_id, meta, microsoftteams_integration_id, name, notion_integration_id, portal_id, record_id, secret_id, sitemap_integration_id, skillset_id, slack_integration_id, support_integration_id, task_id, telegram_integration_id, trigger_integration_id, twilio_integration_id, type, updated_at, webhook_id, whatsapp_integration_id, widget_integration_id) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.attachments is not None: - result["attachments"] = from_union([from_bool, from_none], self.attachments) - if self.auto_scroll is not None: - result["autoScroll"] = from_union([from_bool, from_none], self.auto_scroll) + if self.ability_id is not None: + result["abilityId"] = from_union([from_str, from_none], self.ability_id) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.carousel is not None: - result["carousel"] = from_union([from_bool, from_none], self.carousel) - if self.contact_collection is not None: - result["contactCollection"] = from_union([from_bool, from_none], self.contact_collection) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) + if self.conversation_id is not None: + result["conversationId"] = from_union([from_str, from_none], self.conversation_id) result["createdAt"] = to_float(self.created_at) + if self.dataset_id is not None: + result["datasetId"] = from_union([from_str, from_none], self.dataset_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.export_conversation is not None: - result["exportConversation"] = from_union([from_bool, from_none], self.export_conversation) - if self.form is not None: - result["form"] = from_union([from_bool, from_none], self.form) + if self.discord_integration_id is not None: + result["discordIntegrationId"] = from_union([from_str, from_none], self.discord_integration_id) + if self.email_integration_id is not None: + result["emailIntegrationId"] = from_union([from_str, from_none], self.email_integration_id) + if self.extract_integration_id is not None: + result["extractIntegrationId"] = from_union([from_str, from_none], self.extract_integration_id) + if self.file_id is not None: + result["fileId"] = from_union([from_str, from_none], self.file_id) + if self.googlechat_integration_id is not None: + result["googlechatIntegrationId"] = from_union([from_str, from_none], self.googlechat_integration_id) result["id"] = from_str(self.id) - if self.initial is not None: - result["initial"] = from_union([from_str, from_none], self.initial) - if self.intro is not None: - result["intro"] = from_union([from_str, from_none], self.intro) - if self.language is not None: - result["language"] = from_union([from_str, from_none], self.language) - if self.layout is not None: - result["layout"] = from_union([from_str, from_none], self.layout) - if self.math is not None: - result["math"] = from_union([from_bool, from_none], self.math) - if self.maximize is not None: - result["maximize"] = from_union([from_bool, from_none], self.maximize) - if self.message_peek is not None: - result["messagePeek"] = from_union([from_bool, from_none], self.message_peek) + if self.mcpserver_integration_id is not None: + result["mcpserverIntegrationId"] = from_union([from_str, from_none], self.mcpserver_integration_id) + if self.messenger_integration_id is not None: + result["messengerIntegrationId"] = from_union([from_str, from_none], self.messenger_integration_id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.microsoftteams_integration_id is not None: + result["microsoftteamsIntegrationId"] = from_union([from_str, from_none], self.microsoftteams_integration_id) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.origin is not None: - result["origin"] = from_union([from_str, from_none], self.origin) - if self.placeholder is not None: - result["placeholder"] = from_union([from_str, from_none], self.placeholder) - if self.plugins is not None: - result["plugins"] = from_union([from_str, from_none], self.plugins) - if self.powered_by is not None: - result["poweredBy"] = from_union([from_bool, from_none], self.powered_by) - if self.restart_conversation is not None: - result["restartConversation"] = from_union([from_bool, from_none], self.restart_conversation) - if self.session_duration is not None: - result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) - if self.start_first is not None: - result["startFirst"] = from_union([from_bool, from_none], self.start_first) - if self.stream is not None: - result["stream"] = from_union([from_bool, from_none], self.stream) - if self.theme is not None: - result["theme"] = from_union([from_str, from_none], self.theme) - if self.title is not None: - result["title"] = from_union([from_str, from_none], self.title) - if self.tools is not None: - result["tools"] = from_union([from_bool, from_none], self.tools) - if self.unfurl is not None: - result["unfurl"] = from_union([from_bool, from_none], self.unfurl) + if self.notion_integration_id is not None: + result["notionIntegrationId"] = from_union([from_str, from_none], self.notion_integration_id) + if self.portal_id is not None: + result["portalId"] = from_union([from_str, from_none], self.portal_id) + if self.record_id is not None: + result["recordId"] = from_union([from_str, from_none], self.record_id) + if self.secret_id is not None: + result["secretId"] = from_union([from_str, from_none], self.secret_id) + if self.sitemap_integration_id is not None: + result["sitemapIntegrationId"] = from_union([from_str, from_none], self.sitemap_integration_id) + if self.skillset_id is not None: + result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) + if self.slack_integration_id is not None: + result["slackIntegrationId"] = from_union([from_str, from_none], self.slack_integration_id) + if self.support_integration_id is not None: + result["supportIntegrationId"] = from_union([from_str, from_none], self.support_integration_id) + if self.task_id is not None: + result["taskId"] = from_union([from_str, from_none], self.task_id) + if self.telegram_integration_id is not None: + result["telegramIntegrationId"] = from_union([from_str, from_none], self.telegram_integration_id) + if self.trigger_integration_id is not None: + result["triggerIntegrationId"] = from_union([from_str, from_none], self.trigger_integration_id) + if self.twilio_integration_id is not None: + result["twilioIntegrationId"] = from_union([from_str, from_none], self.twilio_integration_id) + result["type"] = from_str(self.type) result["updatedAt"] = to_float(self.updated_at) - if self.verbose is not None: - result["verbose"] = from_union([from_bool, from_none], self.verbose) - if self.voice_in is not None: - result["voiceIn"] = from_union([from_bool, from_none], self.voice_in) - if self.voice_out is not None: - result["voiceOut"] = from_union([from_bool, from_none], self.voice_out) + if self.webhook_id is not None: + result["webhookId"] = from_union([from_str, from_none], self.webhook_id) + if self.whatsapp_integration_id is not None: + result["whatsappIntegrationId"] = from_union([from_str, from_none], self.whatsapp_integration_id) + if self.widget_integration_id is not None: + result["widgetIntegrationId"] = from_union([from_str, from_none], self.widget_integration_id) return result -class IntegrationWidgetListStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - - -class IntegrationWidgetListStreamItem: - data: IntegrationWidgetListStreamItemData - """A bot configuration that can be applied without a dedicated bot instance.""" +class EventLogListResponse: + cursor: str + """Cursor for fetching the next page""" - type: IntegrationWidgetListStreamItemType - """The type of event""" + items: List[EventLogListResponseItem] - def __init__(self, data: IntegrationWidgetListStreamItemData, type: IntegrationWidgetListStreamItemType) -> None: - self.data = data - self.type = type + def __init__(self, cursor: str, items: List[EventLogListResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'IntegrationWidgetListStreamItem': + def from_dict(obj: Any) -> 'EventLogListResponse': assert isinstance(obj, dict) - data = IntegrationWidgetListStreamItemData.from_dict(obj.get("data")) - type = IntegrationWidgetListStreamItemType(obj.get("type")) - return IntegrationWidgetListStreamItem(data, type) + cursor = from_str(obj.get("cursor")) + items = from_list(EventLogListResponseItem.from_dict, obj.get("items")) + return EventLogListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(IntegrationWidgetListStreamItemData, self.data) - result["type"] = to_enum(IntegrationWidgetListStreamItemType, self.type) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(EventLogListResponseItem, x), self.items) return result -class MagicFromPromptGenerateParams: - prompt_id: str - """The ID of the prompt to use for generation""" +class EventLogListStreamItemData: + """Instance list properties""" - def __init__(self, prompt_id: str) -> None: - self.prompt_id = prompt_id + ability_id: Optional[str] + """Related ability ID if applicable""" - @staticmethod - def from_dict(obj: Any) -> 'MagicFromPromptGenerateParams': - assert isinstance(obj, dict) - prompt_id = from_str(obj.get("promptId")) - return MagicFromPromptGenerateParams(prompt_id) + blueprint_id: Optional[str] + """Related blueprint ID if applicable""" - def to_dict(self) -> dict: - result: dict = {} - result["promptId"] = from_str(self.prompt_id) - return result + bot_id: Optional[str] + """Related bot ID if applicable""" + contact_id: Optional[str] + """Related contact ID if applicable""" -class MagicFromPromptGenerateRequest: - model: Optional[str] - """Optional language model to use for generation""" + conversation_id: Optional[str] + """Related conversation ID if applicable""" - props: Optional[Dict[str, Any]] - """Additional properties to pass to the prompt""" + created_at: float + """The timestamp (ms) when the instance was created""" - text: str - """The text to use as input""" + dataset_id: Optional[str] + """Related dataset ID if applicable""" - def __init__(self, model: Optional[str], props: Optional[Dict[str, Any]], text: str) -> None: - self.model = model - self.props = props - self.text = text + description: Optional[str] + """The associated description""" - @staticmethod - def from_dict(obj: Any) -> 'MagicFromPromptGenerateRequest': - assert isinstance(obj, dict) - model = from_union([from_str, from_none], obj.get("model")) - props = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("props")) - text = from_str(obj.get("text")) - return MagicFromPromptGenerateRequest(model, props, text) + discord_integration_id: Optional[str] + """Related Discord integration ID if applicable""" - def to_dict(self) -> dict: - result: dict = {} - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) - if self.props is not None: - result["props"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.props) - result["text"] = from_str(self.text) - return result + email_integration_id: Optional[str] + """Related email integration ID if applicable""" + extract_integration_id: Optional[str] + """Related extract integration ID if applicable""" -class MagicFromPromptGenerateResponseUsage: - """Usage information""" + file_id: Optional[str] + """Related file ID if applicable""" - token: float - """The tokens used in this exchange""" + googlechat_integration_id: Optional[str] + """Related Google Chat integration ID if applicable""" - def __init__(self, token: float) -> None: - self.token = token + id: str + """The instance ID""" - @staticmethod - def from_dict(obj: Any) -> 'MagicFromPromptGenerateResponseUsage': - assert isinstance(obj, dict) - token = from_float(obj.get("token")) - return MagicFromPromptGenerateResponseUsage(token) + mcpserver_integration_id: Optional[str] + """Related MCP server integration ID if applicable""" - def to_dict(self) -> dict: - result: dict = {} - result["token"] = to_float(self.token) - return result + messenger_integration_id: Optional[str] + """Related Messenger integration ID if applicable""" + meta: Optional[Dict[str, Any]] + """Meta data information""" -class MagicFromPromptGenerateResponse: - text: str - """The input text""" + microsoftteams_integration_id: Optional[str] + """Related Microsoft Teams integration ID if applicable""" - usage: MagicFromPromptGenerateResponseUsage - """Usage information""" + name: Optional[str] + """The associated name""" - def __init__(self, text: str, usage: MagicFromPromptGenerateResponseUsage) -> None: - self.text = text - self.usage = usage + notion_integration_id: Optional[str] + """Related Notion integration ID if applicable""" - @staticmethod - def from_dict(obj: Any) -> 'MagicFromPromptGenerateResponse': - assert isinstance(obj, dict) - text = from_str(obj.get("text")) - usage = MagicFromPromptGenerateResponseUsage.from_dict(obj.get("usage")) - return MagicFromPromptGenerateResponse(text, usage) + portal_id: Optional[str] + """Related portal ID if applicable""" - def to_dict(self) -> dict: - result: dict = {} - result["text"] = from_str(self.text) - result["usage"] = to_class(MagicFromPromptGenerateResponseUsage, self.usage) - return result + record_id: Optional[str] + """Related record ID if applicable""" + secret_id: Optional[str] + """Related secret ID if applicable""" -class StickyUsage: - """Usage information""" + sitemap_integration_id: Optional[str] + """Related sitemap integration ID if applicable""" - token: float - """The tokens used in this exchange""" + skillset_id: Optional[str] + """Related skillset ID if applicable""" - def __init__(self, token: float) -> None: - self.token = token + slack_integration_id: Optional[str] + """Related Slack integration ID if applicable""" - @staticmethod - def from_dict(obj: Any) -> 'StickyUsage': - assert isinstance(obj, dict) - token = from_float(obj.get("token")) - return StickyUsage(token) + support_integration_id: Optional[str] + """Related support integration ID if applicable""" - def to_dict(self) -> dict: - result: dict = {} - result["token"] = to_float(self.token) - return result + task_id: Optional[str] + """Related task ID if applicable""" + + telegram_integration_id: Optional[str] + """Related Telegram integration ID if applicable""" + + trigger_integration_id: Optional[str] + """Related trigger integration ID if applicable""" + + twilio_integration_id: Optional[str] + """Related Twilio integration ID if applicable""" + + type: str + """The type of event (e.g., 'conversation.create')""" + updated_at: float + """The timestamp (ms) when the instance was updated""" -class MagicFromPromptGenerateStreamItemData: - text: str - """The input text""" + webhook_id: Optional[str] + """Related webhook ID if applicable""" - usage: StickyUsage - """Usage information""" + whatsapp_integration_id: Optional[str] + """Related WhatsApp integration ID if applicable""" - def __init__(self, text: str, usage: StickyUsage) -> None: - self.text = text - self.usage = usage + widget_integration_id: Optional[str] + """Related widget integration ID if applicable""" + + def __init__(self, ability_id: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_id: Optional[str], conversation_id: Optional[str], created_at: float, dataset_id: Optional[str], description: Optional[str], discord_integration_id: Optional[str], email_integration_id: Optional[str], extract_integration_id: Optional[str], file_id: Optional[str], googlechat_integration_id: Optional[str], id: str, mcpserver_integration_id: Optional[str], messenger_integration_id: Optional[str], meta: Optional[Dict[str, Any]], microsoftteams_integration_id: Optional[str], name: Optional[str], notion_integration_id: Optional[str], portal_id: Optional[str], record_id: Optional[str], secret_id: Optional[str], sitemap_integration_id: Optional[str], skillset_id: Optional[str], slack_integration_id: Optional[str], support_integration_id: Optional[str], task_id: Optional[str], telegram_integration_id: Optional[str], trigger_integration_id: Optional[str], twilio_integration_id: Optional[str], type: str, updated_at: float, webhook_id: Optional[str], whatsapp_integration_id: Optional[str], widget_integration_id: Optional[str]) -> None: + self.ability_id = ability_id + self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.contact_id = contact_id + self.conversation_id = conversation_id + self.created_at = created_at + self.dataset_id = dataset_id + self.description = description + self.discord_integration_id = discord_integration_id + self.email_integration_id = email_integration_id + self.extract_integration_id = extract_integration_id + self.file_id = file_id + self.googlechat_integration_id = googlechat_integration_id + self.id = id + self.mcpserver_integration_id = mcpserver_integration_id + self.messenger_integration_id = messenger_integration_id + self.meta = meta + self.microsoftteams_integration_id = microsoftteams_integration_id + self.name = name + self.notion_integration_id = notion_integration_id + self.portal_id = portal_id + self.record_id = record_id + self.secret_id = secret_id + self.sitemap_integration_id = sitemap_integration_id + self.skillset_id = skillset_id + self.slack_integration_id = slack_integration_id + self.support_integration_id = support_integration_id + self.task_id = task_id + self.telegram_integration_id = telegram_integration_id + self.trigger_integration_id = trigger_integration_id + self.twilio_integration_id = twilio_integration_id + self.type = type + self.updated_at = updated_at + self.webhook_id = webhook_id + self.whatsapp_integration_id = whatsapp_integration_id + self.widget_integration_id = widget_integration_id @staticmethod - def from_dict(obj: Any) -> 'MagicFromPromptGenerateStreamItemData': + def from_dict(obj: Any) -> 'EventLogListStreamItemData': assert isinstance(obj, dict) - text = from_str(obj.get("text")) - usage = StickyUsage.from_dict(obj.get("usage")) - return MagicFromPromptGenerateStreamItemData(text, usage) + ability_id = from_union([from_str, from_none], obj.get("abilityId")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) + conversation_id = from_union([from_str, from_none], obj.get("conversationId")) + created_at = from_float(obj.get("createdAt")) + dataset_id = from_union([from_str, from_none], obj.get("datasetId")) + description = from_union([from_str, from_none], obj.get("description")) + discord_integration_id = from_union([from_str, from_none], obj.get("discordIntegrationId")) + email_integration_id = from_union([from_str, from_none], obj.get("emailIntegrationId")) + extract_integration_id = from_union([from_str, from_none], obj.get("extractIntegrationId")) + file_id = from_union([from_str, from_none], obj.get("fileId")) + googlechat_integration_id = from_union([from_str, from_none], obj.get("googlechatIntegrationId")) + id = from_str(obj.get("id")) + mcpserver_integration_id = from_union([from_str, from_none], obj.get("mcpserverIntegrationId")) + messenger_integration_id = from_union([from_str, from_none], obj.get("messengerIntegrationId")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + microsoftteams_integration_id = from_union([from_str, from_none], obj.get("microsoftteamsIntegrationId")) + name = from_union([from_str, from_none], obj.get("name")) + notion_integration_id = from_union([from_str, from_none], obj.get("notionIntegrationId")) + portal_id = from_union([from_str, from_none], obj.get("portalId")) + record_id = from_union([from_str, from_none], obj.get("recordId")) + secret_id = from_union([from_str, from_none], obj.get("secretId")) + sitemap_integration_id = from_union([from_str, from_none], obj.get("sitemapIntegrationId")) + skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + slack_integration_id = from_union([from_str, from_none], obj.get("slackIntegrationId")) + support_integration_id = from_union([from_str, from_none], obj.get("supportIntegrationId")) + task_id = from_union([from_str, from_none], obj.get("taskId")) + telegram_integration_id = from_union([from_str, from_none], obj.get("telegramIntegrationId")) + trigger_integration_id = from_union([from_str, from_none], obj.get("triggerIntegrationId")) + twilio_integration_id = from_union([from_str, from_none], obj.get("twilioIntegrationId")) + type = from_str(obj.get("type")) + updated_at = from_float(obj.get("updatedAt")) + webhook_id = from_union([from_str, from_none], obj.get("webhookId")) + whatsapp_integration_id = from_union([from_str, from_none], obj.get("whatsappIntegrationId")) + widget_integration_id = from_union([from_str, from_none], obj.get("widgetIntegrationId")) + return EventLogListStreamItemData(ability_id, blueprint_id, bot_id, contact_id, conversation_id, created_at, dataset_id, description, discord_integration_id, email_integration_id, extract_integration_id, file_id, googlechat_integration_id, id, mcpserver_integration_id, messenger_integration_id, meta, microsoftteams_integration_id, name, notion_integration_id, portal_id, record_id, secret_id, sitemap_integration_id, skillset_id, slack_integration_id, support_integration_id, task_id, telegram_integration_id, trigger_integration_id, twilio_integration_id, type, updated_at, webhook_id, whatsapp_integration_id, widget_integration_id) def to_dict(self) -> dict: result: dict = {} - result["text"] = from_str(self.text) - result["usage"] = to_class(StickyUsage, self.usage) + if self.ability_id is not None: + result["abilityId"] = from_union([from_str, from_none], self.ability_id) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) + if self.conversation_id is not None: + result["conversationId"] = from_union([from_str, from_none], self.conversation_id) + result["createdAt"] = to_float(self.created_at) + if self.dataset_id is not None: + result["datasetId"] = from_union([from_str, from_none], self.dataset_id) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.discord_integration_id is not None: + result["discordIntegrationId"] = from_union([from_str, from_none], self.discord_integration_id) + if self.email_integration_id is not None: + result["emailIntegrationId"] = from_union([from_str, from_none], self.email_integration_id) + if self.extract_integration_id is not None: + result["extractIntegrationId"] = from_union([from_str, from_none], self.extract_integration_id) + if self.file_id is not None: + result["fileId"] = from_union([from_str, from_none], self.file_id) + if self.googlechat_integration_id is not None: + result["googlechatIntegrationId"] = from_union([from_str, from_none], self.googlechat_integration_id) + result["id"] = from_str(self.id) + if self.mcpserver_integration_id is not None: + result["mcpserverIntegrationId"] = from_union([from_str, from_none], self.mcpserver_integration_id) + if self.messenger_integration_id is not None: + result["messengerIntegrationId"] = from_union([from_str, from_none], self.messenger_integration_id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.microsoftteams_integration_id is not None: + result["microsoftteamsIntegrationId"] = from_union([from_str, from_none], self.microsoftteams_integration_id) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.notion_integration_id is not None: + result["notionIntegrationId"] = from_union([from_str, from_none], self.notion_integration_id) + if self.portal_id is not None: + result["portalId"] = from_union([from_str, from_none], self.portal_id) + if self.record_id is not None: + result["recordId"] = from_union([from_str, from_none], self.record_id) + if self.secret_id is not None: + result["secretId"] = from_union([from_str, from_none], self.secret_id) + if self.sitemap_integration_id is not None: + result["sitemapIntegrationId"] = from_union([from_str, from_none], self.sitemap_integration_id) + if self.skillset_id is not None: + result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) + if self.slack_integration_id is not None: + result["slackIntegrationId"] = from_union([from_str, from_none], self.slack_integration_id) + if self.support_integration_id is not None: + result["supportIntegrationId"] = from_union([from_str, from_none], self.support_integration_id) + if self.task_id is not None: + result["taskId"] = from_union([from_str, from_none], self.task_id) + if self.telegram_integration_id is not None: + result["telegramIntegrationId"] = from_union([from_str, from_none], self.telegram_integration_id) + if self.trigger_integration_id is not None: + result["triggerIntegrationId"] = from_union([from_str, from_none], self.trigger_integration_id) + if self.twilio_integration_id is not None: + result["twilioIntegrationId"] = from_union([from_str, from_none], self.twilio_integration_id) + result["type"] = from_str(self.type) + result["updatedAt"] = to_float(self.updated_at) + if self.webhook_id is not None: + result["webhookId"] = from_union([from_str, from_none], self.webhook_id) + if self.whatsapp_integration_id is not None: + result["whatsappIntegrationId"] = from_union([from_str, from_none], self.whatsapp_integration_id) + if self.widget_integration_id is not None: + result["widgetIntegrationId"] = from_union([from_str, from_none], self.widget_integration_id) return result -class MagicFromPromptGenerateStreamItemType(Enum): - """The generated text""" +class EventLogListStreamItemType(Enum): + """The type of event""" - RESULT = "result" + ITEM = "item" -class MagicFromPromptGenerateStreamItem: - data: MagicFromPromptGenerateStreamItemData - type: MagicFromPromptGenerateStreamItemType - """The generated text""" +class EventLogListStreamItem: + data: EventLogListStreamItemData + """Instance list properties""" - def __init__(self, data: MagicFromPromptGenerateStreamItemData, type: MagicFromPromptGenerateStreamItemType) -> None: + type: EventLogListStreamItemType + """The type of event""" + + def __init__(self, data: EventLogListStreamItemData, type: EventLogListStreamItemType) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'MagicFromPromptGenerateStreamItem': + def from_dict(obj: Any) -> 'EventLogListStreamItem': assert isinstance(obj, dict) - data = MagicFromPromptGenerateStreamItemData.from_dict(obj.get("data")) - type = MagicFromPromptGenerateStreamItemType(obj.get("type")) - return MagicFromPromptGenerateStreamItem(data, type) + data = EventLogListStreamItemData.from_dict(obj.get("data")) + type = EventLogListStreamItemType(obj.get("type")) + return EventLogListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(MagicFromPromptGenerateStreamItemData, self.data) - result["type"] = to_enum(MagicFromPromptGenerateStreamItemType, self.type) + result["data"] = to_class(EventLogListStreamItemData, self.data) + result["type"] = to_enum(EventLogListStreamItemType, self.type) return result -class MagicPromptListParamsOrder(Enum): +class EventLogsExportParamsOrder(Enum): """The order of the paginated items""" ASC = "asc" DESC = "desc" -class MagicPromptListParams: +class EventLogsExportParams: cursor: Optional[str] """The cursor to use for pagination""" meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" + """Key-value pairs to filter the items by metadata""" - order: Optional[MagicPromptListParamsOrder] + order: Optional[EventLogsExportParamsOrder] """The order of the paginated items""" take: Optional[int] """The number of items to retrieve""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[MagicPromptListParamsOrder], take: Optional[int]) -> None: + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[EventLogsExportParamsOrder], take: Optional[int]) -> None: self.cursor = cursor self.meta = meta self.order = order self.take = take @staticmethod - def from_dict(obj: Any) -> 'MagicPromptListParams': + def from_dict(obj: Any) -> 'EventLogsExportParams': assert isinstance(obj, dict) cursor = from_union([from_str, from_none], obj.get("cursor")) meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([MagicPromptListParamsOrder, from_none], obj.get("order")) + order = from_union([EventLogsExportParamsOrder, from_none], obj.get("order")) take = from_union([from_int, from_none], obj.get("take")) - return MagicPromptListParams(cursor, meta, order, take) + return EventLogsExportParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} @@ -34921,522 +33477,834 @@ def to_dict(self) -> dict: if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(MagicPromptListParamsOrder, x), from_none], self.order) + result["order"] = from_union([lambda x: to_enum(EventLogsExportParamsOrder, x), from_none], self.order) if self.take is not None: result["take"] = from_union([from_int, from_none], self.take) return result -class MagicPromptListResponseItem: +class EventLogsExportResponseItem: """Instance list properties""" - alias: str - """The alias of the item""" + ability_id: Optional[str] + """Related ability ID if applicable""" + + blueprint_id: Optional[str] + """Related blueprint ID if applicable""" + + bot_id: Optional[str] + """Related bot ID if applicable""" + + contact_id: Optional[str] + """Related contact ID if applicable""" + + conversation_id: Optional[str] + """Related conversation ID if applicable""" created_at: float """The timestamp (ms) when the instance was created""" + dataset_id: Optional[str] + """Related dataset ID if applicable""" + description: Optional[str] """The associated description""" + discord_integration_id: Optional[str] + """Related Discord integration ID if applicable""" + + email_integration_id: Optional[str] + """Related email integration ID if applicable""" + + extract_integration_id: Optional[str] + """Related extract integration ID if applicable""" + + file_id: Optional[str] + """Related file ID if applicable""" + + googlechat_integration_id: Optional[str] + """Related Google Chat integration ID if applicable""" + id: str """The instance ID""" + mcpserver_integration_id: Optional[str] + """Related MCP server integration ID if applicable""" + + messenger_integration_id: Optional[str] + """Related Messenger integration ID if applicable""" + meta: Optional[Dict[str, Any]] """Meta data information""" + microsoftteams_integration_id: Optional[str] + """Related Microsoft Teams integration ID if applicable""" + name: Optional[str] """The associated name""" - updated_at: float - """The timestamp (ms) when the instance was updated""" - - def __init__(self, alias: str, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: - self.alias = alias - self.created_at = created_at - self.description = description - self.id = id - self.meta = meta - self.name = name - self.updated_at = updated_at - - @staticmethod - def from_dict(obj: Any) -> 'MagicPromptListResponseItem': - assert isinstance(obj, dict) - alias = from_str(obj.get("alias")) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - updated_at = from_float(obj.get("updatedAt")) - return MagicPromptListResponseItem(alias, created_at, description, id, meta, name, updated_at) + notion_integration_id: Optional[str] + """Related Notion integration ID if applicable""" - def to_dict(self) -> dict: - result: dict = {} - result["alias"] = from_str(self.alias) - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - result["updatedAt"] = to_float(self.updated_at) - return result + portal_id: Optional[str] + """Related portal ID if applicable""" + record_id: Optional[str] + """Related record ID if applicable""" -class MagicPromptListResponse: - cursor: str - """Cursor for fetching the next page""" + secret_id: Optional[str] + """Related secret ID if applicable""" - items: List[MagicPromptListResponseItem] + sitemap_integration_id: Optional[str] + """Related sitemap integration ID if applicable""" - def __init__(self, cursor: str, items: List[MagicPromptListResponseItem]) -> None: - self.cursor = cursor - self.items = items + skillset_id: Optional[str] + """Related skillset ID if applicable""" - @staticmethod - def from_dict(obj: Any) -> 'MagicPromptListResponse': - assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(MagicPromptListResponseItem.from_dict, obj.get("items")) - return MagicPromptListResponse(cursor, items) + slack_integration_id: Optional[str] + """Related Slack integration ID if applicable""" - def to_dict(self) -> dict: - result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(MagicPromptListResponseItem, x), self.items) - return result + support_integration_id: Optional[str] + """Related support integration ID if applicable""" + task_id: Optional[str] + """Related task ID if applicable""" -class MagicPromptListStreamItemData: - """Instance list properties""" + telegram_integration_id: Optional[str] + """Related Telegram integration ID if applicable""" - alias: str - """The alias of the item""" + trigger_integration_id: Optional[str] + """Related trigger integration ID if applicable""" - created_at: float - """The timestamp (ms) when the instance was created""" + twilio_integration_id: Optional[str] + """Related Twilio integration ID if applicable""" - description: Optional[str] - """The associated description""" + type: str + """The type of event (e.g., 'conversation.create')""" - id: str - """The instance ID""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - meta: Optional[Dict[str, Any]] - """Meta data information""" + webhook_id: Optional[str] + """Related webhook ID if applicable""" - name: Optional[str] - """The associated name""" + whatsapp_integration_id: Optional[str] + """Related WhatsApp integration ID if applicable""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + widget_integration_id: Optional[str] + """Related widget integration ID if applicable""" - def __init__(self, alias: str, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: - self.alias = alias + def __init__(self, ability_id: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_id: Optional[str], conversation_id: Optional[str], created_at: float, dataset_id: Optional[str], description: Optional[str], discord_integration_id: Optional[str], email_integration_id: Optional[str], extract_integration_id: Optional[str], file_id: Optional[str], googlechat_integration_id: Optional[str], id: str, mcpserver_integration_id: Optional[str], messenger_integration_id: Optional[str], meta: Optional[Dict[str, Any]], microsoftteams_integration_id: Optional[str], name: Optional[str], notion_integration_id: Optional[str], portal_id: Optional[str], record_id: Optional[str], secret_id: Optional[str], sitemap_integration_id: Optional[str], skillset_id: Optional[str], slack_integration_id: Optional[str], support_integration_id: Optional[str], task_id: Optional[str], telegram_integration_id: Optional[str], trigger_integration_id: Optional[str], twilio_integration_id: Optional[str], type: str, updated_at: float, webhook_id: Optional[str], whatsapp_integration_id: Optional[str], widget_integration_id: Optional[str]) -> None: + self.ability_id = ability_id + self.blueprint_id = blueprint_id + self.bot_id = bot_id + self.contact_id = contact_id + self.conversation_id = conversation_id self.created_at = created_at + self.dataset_id = dataset_id self.description = description + self.discord_integration_id = discord_integration_id + self.email_integration_id = email_integration_id + self.extract_integration_id = extract_integration_id + self.file_id = file_id + self.googlechat_integration_id = googlechat_integration_id self.id = id + self.mcpserver_integration_id = mcpserver_integration_id + self.messenger_integration_id = messenger_integration_id self.meta = meta + self.microsoftteams_integration_id = microsoftteams_integration_id self.name = name + self.notion_integration_id = notion_integration_id + self.portal_id = portal_id + self.record_id = record_id + self.secret_id = secret_id + self.sitemap_integration_id = sitemap_integration_id + self.skillset_id = skillset_id + self.slack_integration_id = slack_integration_id + self.support_integration_id = support_integration_id + self.task_id = task_id + self.telegram_integration_id = telegram_integration_id + self.trigger_integration_id = trigger_integration_id + self.twilio_integration_id = twilio_integration_id + self.type = type self.updated_at = updated_at + self.webhook_id = webhook_id + self.whatsapp_integration_id = whatsapp_integration_id + self.widget_integration_id = widget_integration_id @staticmethod - def from_dict(obj: Any) -> 'MagicPromptListStreamItemData': + def from_dict(obj: Any) -> 'EventLogsExportResponseItem': assert isinstance(obj, dict) - alias = from_str(obj.get("alias")) + ability_id = from_union([from_str, from_none], obj.get("abilityId")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) + conversation_id = from_union([from_str, from_none], obj.get("conversationId")) created_at = from_float(obj.get("createdAt")) + dataset_id = from_union([from_str, from_none], obj.get("datasetId")) description = from_union([from_str, from_none], obj.get("description")) + discord_integration_id = from_union([from_str, from_none], obj.get("discordIntegrationId")) + email_integration_id = from_union([from_str, from_none], obj.get("emailIntegrationId")) + extract_integration_id = from_union([from_str, from_none], obj.get("extractIntegrationId")) + file_id = from_union([from_str, from_none], obj.get("fileId")) + googlechat_integration_id = from_union([from_str, from_none], obj.get("googlechatIntegrationId")) id = from_str(obj.get("id")) + mcpserver_integration_id = from_union([from_str, from_none], obj.get("mcpserverIntegrationId")) + messenger_integration_id = from_union([from_str, from_none], obj.get("messengerIntegrationId")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + microsoftteams_integration_id = from_union([from_str, from_none], obj.get("microsoftteamsIntegrationId")) name = from_union([from_str, from_none], obj.get("name")) + notion_integration_id = from_union([from_str, from_none], obj.get("notionIntegrationId")) + portal_id = from_union([from_str, from_none], obj.get("portalId")) + record_id = from_union([from_str, from_none], obj.get("recordId")) + secret_id = from_union([from_str, from_none], obj.get("secretId")) + sitemap_integration_id = from_union([from_str, from_none], obj.get("sitemapIntegrationId")) + skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + slack_integration_id = from_union([from_str, from_none], obj.get("slackIntegrationId")) + support_integration_id = from_union([from_str, from_none], obj.get("supportIntegrationId")) + task_id = from_union([from_str, from_none], obj.get("taskId")) + telegram_integration_id = from_union([from_str, from_none], obj.get("telegramIntegrationId")) + trigger_integration_id = from_union([from_str, from_none], obj.get("triggerIntegrationId")) + twilio_integration_id = from_union([from_str, from_none], obj.get("twilioIntegrationId")) + type = from_str(obj.get("type")) updated_at = from_float(obj.get("updatedAt")) - return MagicPromptListStreamItemData(alias, created_at, description, id, meta, name, updated_at) + webhook_id = from_union([from_str, from_none], obj.get("webhookId")) + whatsapp_integration_id = from_union([from_str, from_none], obj.get("whatsappIntegrationId")) + widget_integration_id = from_union([from_str, from_none], obj.get("widgetIntegrationId")) + return EventLogsExportResponseItem(ability_id, blueprint_id, bot_id, contact_id, conversation_id, created_at, dataset_id, description, discord_integration_id, email_integration_id, extract_integration_id, file_id, googlechat_integration_id, id, mcpserver_integration_id, messenger_integration_id, meta, microsoftteams_integration_id, name, notion_integration_id, portal_id, record_id, secret_id, sitemap_integration_id, skillset_id, slack_integration_id, support_integration_id, task_id, telegram_integration_id, trigger_integration_id, twilio_integration_id, type, updated_at, webhook_id, whatsapp_integration_id, widget_integration_id) def to_dict(self) -> dict: result: dict = {} - result["alias"] = from_str(self.alias) + if self.ability_id is not None: + result["abilityId"] = from_union([from_str, from_none], self.ability_id) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) + if self.conversation_id is not None: + result["conversationId"] = from_union([from_str, from_none], self.conversation_id) result["createdAt"] = to_float(self.created_at) + if self.dataset_id is not None: + result["datasetId"] = from_union([from_str, from_none], self.dataset_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.discord_integration_id is not None: + result["discordIntegrationId"] = from_union([from_str, from_none], self.discord_integration_id) + if self.email_integration_id is not None: + result["emailIntegrationId"] = from_union([from_str, from_none], self.email_integration_id) + if self.extract_integration_id is not None: + result["extractIntegrationId"] = from_union([from_str, from_none], self.extract_integration_id) + if self.file_id is not None: + result["fileId"] = from_union([from_str, from_none], self.file_id) + if self.googlechat_integration_id is not None: + result["googlechatIntegrationId"] = from_union([from_str, from_none], self.googlechat_integration_id) result["id"] = from_str(self.id) + if self.mcpserver_integration_id is not None: + result["mcpserverIntegrationId"] = from_union([from_str, from_none], self.mcpserver_integration_id) + if self.messenger_integration_id is not None: + result["messengerIntegrationId"] = from_union([from_str, from_none], self.messenger_integration_id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.microsoftteams_integration_id is not None: + result["microsoftteamsIntegrationId"] = from_union([from_str, from_none], self.microsoftteams_integration_id) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.notion_integration_id is not None: + result["notionIntegrationId"] = from_union([from_str, from_none], self.notion_integration_id) + if self.portal_id is not None: + result["portalId"] = from_union([from_str, from_none], self.portal_id) + if self.record_id is not None: + result["recordId"] = from_union([from_str, from_none], self.record_id) + if self.secret_id is not None: + result["secretId"] = from_union([from_str, from_none], self.secret_id) + if self.sitemap_integration_id is not None: + result["sitemapIntegrationId"] = from_union([from_str, from_none], self.sitemap_integration_id) + if self.skillset_id is not None: + result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) + if self.slack_integration_id is not None: + result["slackIntegrationId"] = from_union([from_str, from_none], self.slack_integration_id) + if self.support_integration_id is not None: + result["supportIntegrationId"] = from_union([from_str, from_none], self.support_integration_id) + if self.task_id is not None: + result["taskId"] = from_union([from_str, from_none], self.task_id) + if self.telegram_integration_id is not None: + result["telegramIntegrationId"] = from_union([from_str, from_none], self.telegram_integration_id) + if self.trigger_integration_id is not None: + result["triggerIntegrationId"] = from_union([from_str, from_none], self.trigger_integration_id) + if self.twilio_integration_id is not None: + result["twilioIntegrationId"] = from_union([from_str, from_none], self.twilio_integration_id) + result["type"] = from_str(self.type) result["updatedAt"] = to_float(self.updated_at) + if self.webhook_id is not None: + result["webhookId"] = from_union([from_str, from_none], self.webhook_id) + if self.whatsapp_integration_id is not None: + result["whatsappIntegrationId"] = from_union([from_str, from_none], self.whatsapp_integration_id) + if self.widget_integration_id is not None: + result["widgetIntegrationId"] = from_union([from_str, from_none], self.widget_integration_id) return result -class MagicPromptListStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - - -class MagicPromptListStreamItem: - data: MagicPromptListStreamItemData - """Instance list properties""" - - type: MagicPromptListStreamItemType - """The type of event""" - - def __init__(self, data: MagicPromptListStreamItemData, type: MagicPromptListStreamItemType) -> None: - self.data = data - self.type = type - - @staticmethod - def from_dict(obj: Any) -> 'MagicPromptListStreamItem': - assert isinstance(obj, dict) - data = MagicPromptListStreamItemData.from_dict(obj.get("data")) - type = MagicPromptListStreamItemType(obj.get("type")) - return MagicPromptListStreamItem(data, type) - - def to_dict(self) -> dict: - result: dict = {} - result["data"] = to_class(MagicPromptListStreamItemData, self.data) - result["type"] = to_enum(MagicPromptListStreamItemType, self.type) - return result - - -class MemoryDeleteParams: - memory_id: str - """The ID of the memory to delete""" - - def __init__(self, memory_id: str) -> None: - self.memory_id = memory_id - - @staticmethod - def from_dict(obj: Any) -> 'MemoryDeleteParams': - assert isinstance(obj, dict) - memory_id = from_str(obj.get("memoryId")) - return MemoryDeleteParams(memory_id) - - def to_dict(self) -> dict: - result: dict = {} - result["memoryId"] = from_str(self.memory_id) - return result - +class EventLogsExportResponse: + cursor: str + """Cursor for fetching the next page""" -class MemoryDeleteResponse: - id: str - """The ID of the deleted memory""" + items: List[EventLogsExportResponseItem] - def __init__(self, id: str) -> None: - self.id = id + def __init__(self, cursor: str, items: List[EventLogsExportResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'MemoryDeleteResponse': + def from_dict(obj: Any) -> 'EventLogsExportResponse': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return MemoryDeleteResponse(id) + cursor = from_str(obj.get("cursor")) + items = from_list(EventLogsExportResponseItem.from_dict, obj.get("items")) + return EventLogsExportResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(EventLogsExportResponseItem, x), self.items) return result -class MemoryFetchParams: - memory_id: str - """The ID of the memory to retrieve""" - - def __init__(self, memory_id: str) -> None: - self.memory_id = memory_id - - @staticmethod - def from_dict(obj: Any) -> 'MemoryFetchParams': - assert isinstance(obj, dict) - memory_id = from_str(obj.get("memoryId")) - return MemoryFetchParams(memory_id) - - def to_dict(self) -> dict: - result: dict = {} - result["memoryId"] = from_str(self.memory_id) - return result +class EventLogsExportStreamItemData: + """Instance list properties""" + ability_id: Optional[str] + """Related ability ID if applicable""" -class MemoryFetchResponse: - """Instance list properties""" + blueprint_id: Optional[str] + """Related blueprint ID if applicable""" bot_id: Optional[str] - """The bot associated with the memory""" + """Related bot ID if applicable""" contact_id: Optional[str] - """The contact associated with the memory""" + """Related contact ID if applicable""" + + conversation_id: Optional[str] + """Related conversation ID if applicable""" created_at: float """The timestamp (ms) when the instance was created""" + dataset_id: Optional[str] + """Related dataset ID if applicable""" + description: Optional[str] """The associated description""" + discord_integration_id: Optional[str] + """Related Discord integration ID if applicable""" + + email_integration_id: Optional[str] + """Related email integration ID if applicable""" + + extract_integration_id: Optional[str] + """Related extract integration ID if applicable""" + + file_id: Optional[str] + """Related file ID if applicable""" + + googlechat_integration_id: Optional[str] + """Related Google Chat integration ID if applicable""" + id: str """The instance ID""" + mcpserver_integration_id: Optional[str] + """Related MCP server integration ID if applicable""" + + messenger_integration_id: Optional[str] + """Related Messenger integration ID if applicable""" + meta: Optional[Dict[str, Any]] """Meta data information""" + microsoftteams_integration_id: Optional[str] + """Related Microsoft Teams integration ID if applicable""" + name: Optional[str] """The associated name""" - text: Optional[str] - """The text of the memory""" + notion_integration_id: Optional[str] + """Related Notion integration ID if applicable""" + + portal_id: Optional[str] + """Related portal ID if applicable""" + + record_id: Optional[str] + """Related record ID if applicable""" + + secret_id: Optional[str] + """Related secret ID if applicable""" + + sitemap_integration_id: Optional[str] + """Related sitemap integration ID if applicable""" + + skillset_id: Optional[str] + """Related skillset ID if applicable""" + + slack_integration_id: Optional[str] + """Related Slack integration ID if applicable""" + + support_integration_id: Optional[str] + """Related support integration ID if applicable""" + + task_id: Optional[str] + """Related task ID if applicable""" + + telegram_integration_id: Optional[str] + """Related Telegram integration ID if applicable""" + + trigger_integration_id: Optional[str] + """Related trigger integration ID if applicable""" + + twilio_integration_id: Optional[str] + """Related Twilio integration ID if applicable""" + + type: str + """The type of event (e.g., 'conversation.create')""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, bot_id: Optional[str], contact_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], text: Optional[str], updated_at: float) -> None: + webhook_id: Optional[str] + """Related webhook ID if applicable""" + + whatsapp_integration_id: Optional[str] + """Related WhatsApp integration ID if applicable""" + + widget_integration_id: Optional[str] + """Related widget integration ID if applicable""" + + def __init__(self, ability_id: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], contact_id: Optional[str], conversation_id: Optional[str], created_at: float, dataset_id: Optional[str], description: Optional[str], discord_integration_id: Optional[str], email_integration_id: Optional[str], extract_integration_id: Optional[str], file_id: Optional[str], googlechat_integration_id: Optional[str], id: str, mcpserver_integration_id: Optional[str], messenger_integration_id: Optional[str], meta: Optional[Dict[str, Any]], microsoftteams_integration_id: Optional[str], name: Optional[str], notion_integration_id: Optional[str], portal_id: Optional[str], record_id: Optional[str], secret_id: Optional[str], sitemap_integration_id: Optional[str], skillset_id: Optional[str], slack_integration_id: Optional[str], support_integration_id: Optional[str], task_id: Optional[str], telegram_integration_id: Optional[str], trigger_integration_id: Optional[str], twilio_integration_id: Optional[str], type: str, updated_at: float, webhook_id: Optional[str], whatsapp_integration_id: Optional[str], widget_integration_id: Optional[str]) -> None: + self.ability_id = ability_id + self.blueprint_id = blueprint_id self.bot_id = bot_id self.contact_id = contact_id + self.conversation_id = conversation_id self.created_at = created_at + self.dataset_id = dataset_id self.description = description + self.discord_integration_id = discord_integration_id + self.email_integration_id = email_integration_id + self.extract_integration_id = extract_integration_id + self.file_id = file_id + self.googlechat_integration_id = googlechat_integration_id self.id = id + self.mcpserver_integration_id = mcpserver_integration_id + self.messenger_integration_id = messenger_integration_id self.meta = meta + self.microsoftteams_integration_id = microsoftteams_integration_id self.name = name - self.text = text + self.notion_integration_id = notion_integration_id + self.portal_id = portal_id + self.record_id = record_id + self.secret_id = secret_id + self.sitemap_integration_id = sitemap_integration_id + self.skillset_id = skillset_id + self.slack_integration_id = slack_integration_id + self.support_integration_id = support_integration_id + self.task_id = task_id + self.telegram_integration_id = telegram_integration_id + self.trigger_integration_id = trigger_integration_id + self.twilio_integration_id = twilio_integration_id + self.type = type self.updated_at = updated_at + self.webhook_id = webhook_id + self.whatsapp_integration_id = whatsapp_integration_id + self.widget_integration_id = widget_integration_id @staticmethod - def from_dict(obj: Any) -> 'MemoryFetchResponse': + def from_dict(obj: Any) -> 'EventLogsExportStreamItemData': assert isinstance(obj, dict) + ability_id = from_union([from_str, from_none], obj.get("abilityId")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) bot_id = from_union([from_str, from_none], obj.get("botId")) contact_id = from_union([from_str, from_none], obj.get("contactId")) + conversation_id = from_union([from_str, from_none], obj.get("conversationId")) created_at = from_float(obj.get("createdAt")) + dataset_id = from_union([from_str, from_none], obj.get("datasetId")) description = from_union([from_str, from_none], obj.get("description")) + discord_integration_id = from_union([from_str, from_none], obj.get("discordIntegrationId")) + email_integration_id = from_union([from_str, from_none], obj.get("emailIntegrationId")) + extract_integration_id = from_union([from_str, from_none], obj.get("extractIntegrationId")) + file_id = from_union([from_str, from_none], obj.get("fileId")) + googlechat_integration_id = from_union([from_str, from_none], obj.get("googlechatIntegrationId")) id = from_str(obj.get("id")) + mcpserver_integration_id = from_union([from_str, from_none], obj.get("mcpserverIntegrationId")) + messenger_integration_id = from_union([from_str, from_none], obj.get("messengerIntegrationId")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + microsoftteams_integration_id = from_union([from_str, from_none], obj.get("microsoftteamsIntegrationId")) name = from_union([from_str, from_none], obj.get("name")) - text = from_union([from_str, from_none], obj.get("text")) + notion_integration_id = from_union([from_str, from_none], obj.get("notionIntegrationId")) + portal_id = from_union([from_str, from_none], obj.get("portalId")) + record_id = from_union([from_str, from_none], obj.get("recordId")) + secret_id = from_union([from_str, from_none], obj.get("secretId")) + sitemap_integration_id = from_union([from_str, from_none], obj.get("sitemapIntegrationId")) + skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + slack_integration_id = from_union([from_str, from_none], obj.get("slackIntegrationId")) + support_integration_id = from_union([from_str, from_none], obj.get("supportIntegrationId")) + task_id = from_union([from_str, from_none], obj.get("taskId")) + telegram_integration_id = from_union([from_str, from_none], obj.get("telegramIntegrationId")) + trigger_integration_id = from_union([from_str, from_none], obj.get("triggerIntegrationId")) + twilio_integration_id = from_union([from_str, from_none], obj.get("twilioIntegrationId")) + type = from_str(obj.get("type")) updated_at = from_float(obj.get("updatedAt")) - return MemoryFetchResponse(bot_id, contact_id, created_at, description, id, meta, name, text, updated_at) + webhook_id = from_union([from_str, from_none], obj.get("webhookId")) + whatsapp_integration_id = from_union([from_str, from_none], obj.get("whatsappIntegrationId")) + widget_integration_id = from_union([from_str, from_none], obj.get("widgetIntegrationId")) + return EventLogsExportStreamItemData(ability_id, blueprint_id, bot_id, contact_id, conversation_id, created_at, dataset_id, description, discord_integration_id, email_integration_id, extract_integration_id, file_id, googlechat_integration_id, id, mcpserver_integration_id, messenger_integration_id, meta, microsoftteams_integration_id, name, notion_integration_id, portal_id, record_id, secret_id, sitemap_integration_id, skillset_id, slack_integration_id, support_integration_id, task_id, telegram_integration_id, trigger_integration_id, twilio_integration_id, type, updated_at, webhook_id, whatsapp_integration_id, widget_integration_id) def to_dict(self) -> dict: result: dict = {} + if self.ability_id is not None: + result["abilityId"] = from_union([from_str, from_none], self.ability_id) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.bot_id is not None: result["botId"] = from_union([from_str, from_none], self.bot_id) if self.contact_id is not None: result["contactId"] = from_union([from_str, from_none], self.contact_id) + if self.conversation_id is not None: + result["conversationId"] = from_union([from_str, from_none], self.conversation_id) result["createdAt"] = to_float(self.created_at) + if self.dataset_id is not None: + result["datasetId"] = from_union([from_str, from_none], self.dataset_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.discord_integration_id is not None: + result["discordIntegrationId"] = from_union([from_str, from_none], self.discord_integration_id) + if self.email_integration_id is not None: + result["emailIntegrationId"] = from_union([from_str, from_none], self.email_integration_id) + if self.extract_integration_id is not None: + result["extractIntegrationId"] = from_union([from_str, from_none], self.extract_integration_id) + if self.file_id is not None: + result["fileId"] = from_union([from_str, from_none], self.file_id) + if self.googlechat_integration_id is not None: + result["googlechatIntegrationId"] = from_union([from_str, from_none], self.googlechat_integration_id) result["id"] = from_str(self.id) + if self.mcpserver_integration_id is not None: + result["mcpserverIntegrationId"] = from_union([from_str, from_none], self.mcpserver_integration_id) + if self.messenger_integration_id is not None: + result["messengerIntegrationId"] = from_union([from_str, from_none], self.messenger_integration_id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.microsoftteams_integration_id is not None: + result["microsoftteamsIntegrationId"] = from_union([from_str, from_none], self.microsoftteams_integration_id) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.text is not None: - result["text"] = from_union([from_str, from_none], self.text) + if self.notion_integration_id is not None: + result["notionIntegrationId"] = from_union([from_str, from_none], self.notion_integration_id) + if self.portal_id is not None: + result["portalId"] = from_union([from_str, from_none], self.portal_id) + if self.record_id is not None: + result["recordId"] = from_union([from_str, from_none], self.record_id) + if self.secret_id is not None: + result["secretId"] = from_union([from_str, from_none], self.secret_id) + if self.sitemap_integration_id is not None: + result["sitemapIntegrationId"] = from_union([from_str, from_none], self.sitemap_integration_id) + if self.skillset_id is not None: + result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) + if self.slack_integration_id is not None: + result["slackIntegrationId"] = from_union([from_str, from_none], self.slack_integration_id) + if self.support_integration_id is not None: + result["supportIntegrationId"] = from_union([from_str, from_none], self.support_integration_id) + if self.task_id is not None: + result["taskId"] = from_union([from_str, from_none], self.task_id) + if self.telegram_integration_id is not None: + result["telegramIntegrationId"] = from_union([from_str, from_none], self.telegram_integration_id) + if self.trigger_integration_id is not None: + result["triggerIntegrationId"] = from_union([from_str, from_none], self.trigger_integration_id) + if self.twilio_integration_id is not None: + result["twilioIntegrationId"] = from_union([from_str, from_none], self.twilio_integration_id) + result["type"] = from_str(self.type) result["updatedAt"] = to_float(self.updated_at) + if self.webhook_id is not None: + result["webhookId"] = from_union([from_str, from_none], self.webhook_id) + if self.whatsapp_integration_id is not None: + result["whatsappIntegrationId"] = from_union([from_str, from_none], self.whatsapp_integration_id) + if self.widget_integration_id is not None: + result["widgetIntegrationId"] = from_union([from_str, from_none], self.widget_integration_id) return result -class MemoryUpdateParams: - memory_id: str +class EventLogsExportStreamItemType(Enum): + """The type of event""" - def __init__(self, memory_id: str) -> None: - self.memory_id = memory_id + ITEM = "item" + + +class EventLogsExportStreamItem: + data: EventLogsExportStreamItemData + """Instance list properties""" + + type: EventLogsExportStreamItemType + """The type of event""" + + def __init__(self, data: EventLogsExportStreamItemData, type: EventLogsExportStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'MemoryUpdateParams': + def from_dict(obj: Any) -> 'EventLogsExportStreamItem': assert isinstance(obj, dict) - memory_id = from_str(obj.get("memoryId")) - return MemoryUpdateParams(memory_id) + data = EventLogsExportStreamItemData.from_dict(obj.get("data")) + type = EventLogsExportStreamItemType(obj.get("type")) + return EventLogsExportStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["memoryId"] = from_str(self.memory_id) + result["data"] = to_class(EventLogsExportStreamItemData, self.data) + result["type"] = to_enum(EventLogsExportStreamItemType, self.type) return result -class MemoryUpdateRequest: - """Instance crud properties""" +class PurpleCriteria: + """What a true and a false answer mean + + The options keyed by name, each with a description (2 to 255) + """ + false: Optional[Union[Dict[str, Any], List[Any], str]] + """A description of an option or level, or null when its name says enough""" - bot_id: Optional[str] - """The bot associated with the memory""" + true: Optional[Union[Dict[str, Any], List[Any], str]] + """A description of an option or level, or null when its name says enough""" - contact_id: Optional[str] - """The contact associated with the memory""" + def __init__(self, false: Optional[Union[Dict[str, Any], List[Any], str]], true: Optional[Union[Dict[str, Any], List[Any], str]]) -> None: + self.false = false + self.true = true - description: Optional[str] - """The associated description""" + @staticmethod + def from_dict(obj: Any) -> 'PurpleCriteria': + assert isinstance(obj, dict) + false = from_union([lambda x: from_dict(lambda x: x, x), lambda x: from_list(lambda x: x, x), from_str, from_none], obj.get("false")) + true = from_union([lambda x: from_dict(lambda x: x, x), lambda x: from_list(lambda x: x, x), from_str, from_none], obj.get("true")) + return PurpleCriteria(false, true) - meta: Optional[Dict[str, Any]] - """Meta data information""" + def to_dict(self) -> dict: + result: dict = {} + if self.false is not None: + result["false"] = from_union([lambda x: from_dict(lambda x: x, x), lambda x: from_list(lambda x: x, x), from_str, from_none], self.false) + if self.true is not None: + result["true"] = from_union([lambda x: from_dict(lambda x: x, x), lambda x: from_list(lambda x: x, x), from_str, from_none], self.true) + return result - name: Optional[str] - """The associated name""" - text: Optional[str] - """The text of the memory""" +class QuestionType(Enum): + BOOLEAN = "boolean" + CHOICE = "choice" + SCORE = "score" - def __init__(self, bot_id: Optional[str], contact_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], text: Optional[str]) -> None: - self.bot_id = bot_id - self.contact_id = contact_id - self.description = description - self.meta = meta - self.name = name - self.text = text + +class Question: + """A typed question to answer about the state""" + + criteria: Optional[Union[PurpleCriteria, List[Union[Dict[str, Any], List[Any], str]]]] + """What a true and a false answer mean + + The options keyed by name, each with a description (2 to 255) + + The levels ordered from lowest to highest (2 to 10) + """ + instructions: Union[Dict[str, Any], List[Any], str] + """Text, or a JSON object or array of related context""" + + type: QuestionType + + def __init__(self, criteria: Optional[Union[PurpleCriteria, List[Union[Dict[str, Any], List[Any], str]]]], instructions: Union[Dict[str, Any], List[Any], str], type: QuestionType) -> None: + self.criteria = criteria + self.instructions = instructions + self.type = type @staticmethod - def from_dict(obj: Any) -> 'MemoryUpdateRequest': + def from_dict(obj: Any) -> 'Question': assert isinstance(obj, dict) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_id = from_union([from_str, from_none], obj.get("contactId")) - description = from_union([from_str, from_none], obj.get("description")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - text = from_union([from_str, from_none], obj.get("text")) - return MemoryUpdateRequest(bot_id, contact_id, description, meta, name, text) + criteria = from_union([PurpleCriteria.from_dict, lambda x: from_list(lambda x: from_union([lambda x: from_dict(lambda x: x, x), lambda x: from_list(lambda x: x, x), from_str], x), x), from_none], obj.get("criteria")) + instructions = from_union([lambda x: from_dict(lambda x: x, x), lambda x: from_list(lambda x: x, x), from_str], obj.get("instructions")) + type = QuestionType(obj.get("type")) + return Question(criteria, instructions, type) def to_dict(self) -> dict: result: dict = {} - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_id is not None: - result["contactId"] = from_union([from_str, from_none], self.contact_id) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.text is not None: - result["text"] = from_union([from_str, from_none], self.text) + if self.criteria is not None: + result["criteria"] = from_union([lambda x: to_class(PurpleCriteria, x), lambda x: from_list(lambda x: from_union([lambda x: from_dict(lambda x: x, x), lambda x: from_list(lambda x: x, x), from_str], x), x), from_none], self.criteria) + result["instructions"] = from_union([lambda x: from_dict(lambda x: x, x), lambda x: from_list(lambda x: x, x), from_str], self.instructions) + result["type"] = to_enum(QuestionType, self.type) return result -class MemoryUpdateResponse: - id: str - """The ID of the updated memory""" +class DecisionCreateRequest: + model: Optional[str] + """The decision model to use""" - def __init__(self, id: str) -> None: - self.id = id + questions: Dict[str, Question] + """The questions to answer keyed by a name of your choice""" + + state: Union[Dict[str, Any], List[Any], str] + """The content to decide about, as text or a JSON object or array of related context""" + + def __init__(self, model: Optional[str], questions: Dict[str, Question], state: Union[Dict[str, Any], List[Any], str]) -> None: + self.model = model + self.questions = questions + self.state = state @staticmethod - def from_dict(obj: Any) -> 'MemoryUpdateResponse': + def from_dict(obj: Any) -> 'DecisionCreateRequest': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return MemoryUpdateResponse(id) + model = from_union([from_str, from_none], obj.get("model")) + questions = from_dict(Question.from_dict, obj.get("questions")) + state = from_union([lambda x: from_dict(lambda x: x, x), lambda x: from_list(lambda x: x, x), from_str], obj.get("state")) + return DecisionCreateRequest(model, questions, state) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) + result["questions"] = from_dict(lambda x: to_class(Question, x), self.questions) + result["state"] = from_union([lambda x: from_dict(lambda x: x, x), lambda x: from_list(lambda x: x, x), from_str], self.state) return result -class MemoryCreateRequest: - """Instance crud properties""" +class Answer: + """The answer to a typed question""" - bot_id: Optional[str] - """The bot associated with the memory""" + probability: Optional[float] + """The probability from 0 to 1 that the answer is true""" - contact_id: Optional[str] - """The contact associated with the memory""" + type: QuestionType + choice: Optional[str] + """The name of the most likely option""" - description: Optional[str] - """The associated description""" + probabilities: Optional[Dict[str, float]] + """The probability of each option + + The probability of each level keyed by its index + """ + score: Optional[float] + """The probability-weighted level index, starting at 0""" - meta: Optional[Dict[str, Any]] - """Meta data information""" + def __init__(self, probability: Optional[float], type: QuestionType, choice: Optional[str], probabilities: Optional[Dict[str, float]], score: Optional[float]) -> None: + self.probability = probability + self.type = type + self.choice = choice + self.probabilities = probabilities + self.score = score - name: Optional[str] - """The associated name""" + @staticmethod + def from_dict(obj: Any) -> 'Answer': + assert isinstance(obj, dict) + probability = from_union([from_float, from_none], obj.get("probability")) + type = QuestionType(obj.get("type")) + choice = from_union([from_str, from_none], obj.get("choice")) + probabilities = from_union([lambda x: from_dict(from_float, x), from_none], obj.get("probabilities")) + score = from_union([from_float, from_none], obj.get("score")) + return Answer(probability, type, choice, probabilities, score) - text: str - """The text of the memory""" + def to_dict(self) -> dict: + result: dict = {} + if self.probability is not None: + result["probability"] = from_union([to_float, from_none], self.probability) + result["type"] = to_enum(QuestionType, self.type) + if self.choice is not None: + result["choice"] = from_union([from_str, from_none], self.choice) + if self.probabilities is not None: + result["probabilities"] = from_union([lambda x: from_dict(to_float, x), from_none], self.probabilities) + if self.score is not None: + result["score"] = from_union([to_float, from_none], self.score) + return result - def __init__(self, bot_id: Optional[str], contact_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], text: str) -> None: - self.bot_id = bot_id - self.contact_id = contact_id - self.description = description - self.meta = meta - self.name = name - self.text = text + +class DecisionCreateResponseUsage: + input_tokens: float + model: str + """The model that answered""" + + output_tokens: float + + def __init__(self, input_tokens: float, model: str, output_tokens: float) -> None: + self.input_tokens = input_tokens + self.model = model + self.output_tokens = output_tokens @staticmethod - def from_dict(obj: Any) -> 'MemoryCreateRequest': + def from_dict(obj: Any) -> 'DecisionCreateResponseUsage': assert isinstance(obj, dict) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_id = from_union([from_str, from_none], obj.get("contactId")) - description = from_union([from_str, from_none], obj.get("description")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - text = from_str(obj.get("text")) - return MemoryCreateRequest(bot_id, contact_id, description, meta, name, text) + input_tokens = from_float(obj.get("inputTokens")) + model = from_str(obj.get("model")) + output_tokens = from_float(obj.get("outputTokens")) + return DecisionCreateResponseUsage(input_tokens, model, output_tokens) def to_dict(self) -> dict: result: dict = {} - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_id is not None: - result["contactId"] = from_union([from_str, from_none], self.contact_id) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - result["text"] = from_str(self.text) + result["inputTokens"] = to_float(self.input_tokens) + result["model"] = from_str(self.model) + result["outputTokens"] = to_float(self.output_tokens) return result -class MemoryCreateResponse: - id: str - """The ID of the created memory""" +class DecisionCreateResponse: + answers: Dict[str, Answer] + """The answers keyed by the question names""" - def __init__(self, id: str) -> None: - self.id = id + usage: DecisionCreateResponseUsage + + def __init__(self, answers: Dict[str, Answer], usage: DecisionCreateResponseUsage) -> None: + self.answers = answers + self.usage = usage @staticmethod - def from_dict(obj: Any) -> 'MemoryCreateResponse': + def from_dict(obj: Any) -> 'DecisionCreateResponse': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return MemoryCreateResponse(id) + answers = from_dict(Answer.from_dict, obj.get("answers")) + usage = DecisionCreateResponseUsage.from_dict(obj.get("usage")) + return DecisionCreateResponse(answers, usage) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["answers"] = from_dict(lambda x: to_class(Answer, x), self.answers) + result["usage"] = to_class(DecisionCreateResponseUsage, self.usage) return result -class MemoriesExportParamsOrder(Enum): +class DatasetListParamsOrder(Enum): """The order of the paginated items""" ASC = "asc" DESC = "desc" -class MemoriesExportParams: +class DatasetListParams: cursor: Optional[str] """The cursor to use for pagination""" meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" + """Key-value pairs to filter the items by metadata""" - order: Optional[MemoriesExportParamsOrder] + order: Optional[DatasetListParamsOrder] """The order of the paginated items""" take: Optional[int] """The number of items to retrieve""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[MemoriesExportParamsOrder], take: Optional[int]) -> None: + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[DatasetListParamsOrder], take: Optional[int]) -> None: self.cursor = cursor self.meta = meta self.order = order self.take = take @staticmethod - def from_dict(obj: Any) -> 'MemoriesExportParams': + def from_dict(obj: Any) -> 'DatasetListParams': assert isinstance(obj, dict) cursor = from_union([from_str, from_none], obj.get("cursor")) meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([MemoriesExportParamsOrder, from_none], obj.get("order")) + order = from_union([DatasetListParamsOrder, from_none], obj.get("order")) take = from_union([from_int, from_none], obj.get("take")) - return MemoriesExportParams(cursor, meta, order, take) + return DatasetListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} @@ -35445,20 +34313,28 @@ def to_dict(self) -> dict: if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(MemoriesExportParamsOrder, x), from_none], self.order) + result["order"] = from_union([lambda x: to_enum(DatasetListParamsOrder, x), from_none], self.order) if self.take is not None: result["take"] = from_union([from_int, from_none], self.take) return result -class MemoriesExportResponseItem: - """Instance list properties""" +class HilariousVisibility(Enum): + """The dataset visibility""" - bot_id: Optional[str] - """The bot associated with the memory""" + PRIVATE = "private" + PROTECTED = "protected" + PUBLIC = "public" - contact_id: Optional[str] - """The contact associated with the memory""" + +class DatasetListResponseItem: + """Blueprint properties""" + + alias: Optional[str] + """The unique alias for the instance""" + + blueprint_id: Optional[str] + """The ID of the blueprint""" created_at: float """The timestamp (ms) when the instance was created""" @@ -35469,95 +34345,159 @@ class MemoriesExportResponseItem: id: str """The instance ID""" + match_instruction: Optional[str] + """An instruction to include before found records""" + meta: Optional[Dict[str, Any]] """Meta data information""" + mismatch_instruction: Optional[str] + """An instruction to include if no records where found""" + name: Optional[str] """The associated name""" - text: Optional[str] - """The text of the memory""" + record_max_tokens: Optional[float] + """The total number of tokens for each record""" + + reranker: Optional[str] + """The reranker class for the dataset""" + + search_max_records: Optional[float] + """The total number of records to return during search""" + + search_max_tokens: Optional[float] + """The total number of tokens to use during search""" + + search_min_score: Optional[float] + """The minimum score to filter search results by""" + + separators: Optional[str] + """A list of separators to use when tokenizing text""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, bot_id: Optional[str], contact_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], text: Optional[str], updated_at: float) -> None: - self.bot_id = bot_id - self.contact_id = contact_id + visibility: Optional[HilariousVisibility] + """The dataset visibility""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, match_instruction: Optional[str], meta: Optional[Dict[str, Any]], mismatch_instruction: Optional[str], name: Optional[str], record_max_tokens: Optional[float], reranker: Optional[str], search_max_records: Optional[float], search_max_tokens: Optional[float], search_min_score: Optional[float], separators: Optional[str], updated_at: float, visibility: Optional[HilariousVisibility]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id self.created_at = created_at self.description = description self.id = id + self.match_instruction = match_instruction self.meta = meta + self.mismatch_instruction = mismatch_instruction self.name = name - self.text = text + self.record_max_tokens = record_max_tokens + self.reranker = reranker + self.search_max_records = search_max_records + self.search_max_tokens = search_max_tokens + self.search_min_score = search_min_score + self.separators = separators self.updated_at = updated_at + self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'MemoriesExportResponseItem': + def from_dict(obj: Any) -> 'DatasetListResponseItem': assert isinstance(obj, dict) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_id = from_union([from_str, from_none], obj.get("contactId")) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) + match_instruction = from_union([from_str, from_none], obj.get("matchInstruction")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + mismatch_instruction = from_union([from_str, from_none], obj.get("mismatchInstruction")) name = from_union([from_str, from_none], obj.get("name")) - text = from_union([from_str, from_none], obj.get("text")) + record_max_tokens = from_union([from_float, from_none], obj.get("recordMaxTokens")) + reranker = from_union([from_str, from_none], obj.get("reranker")) + search_max_records = from_union([from_float, from_none], obj.get("searchMaxRecords")) + search_max_tokens = from_union([from_float, from_none], obj.get("searchMaxTokens")) + search_min_score = from_union([from_float, from_none], obj.get("searchMinScore")) + separators = from_union([from_str, from_none], obj.get("separators")) updated_at = from_float(obj.get("updatedAt")) - return MemoriesExportResponseItem(bot_id, contact_id, created_at, description, id, meta, name, text, updated_at) + visibility = from_union([HilariousVisibility, from_none], obj.get("visibility")) + return DatasetListResponseItem(alias, blueprint_id, created_at, description, id, match_instruction, meta, mismatch_instruction, name, record_max_tokens, reranker, search_max_records, search_max_tokens, search_min_score, separators, updated_at, visibility) def to_dict(self) -> dict: result: dict = {} - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_id is not None: - result["contactId"] = from_union([from_str, from_none], self.contact_id) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) + if self.match_instruction is not None: + result["matchInstruction"] = from_union([from_str, from_none], self.match_instruction) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.mismatch_instruction is not None: + result["mismatchInstruction"] = from_union([from_str, from_none], self.mismatch_instruction) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.text is not None: - result["text"] = from_union([from_str, from_none], self.text) + if self.record_max_tokens is not None: + result["recordMaxTokens"] = from_union([to_float, from_none], self.record_max_tokens) + if self.reranker is not None: + result["reranker"] = from_union([from_str, from_none], self.reranker) + if self.search_max_records is not None: + result["searchMaxRecords"] = from_union([to_float, from_none], self.search_max_records) + if self.search_max_tokens is not None: + result["searchMaxTokens"] = from_union([to_float, from_none], self.search_max_tokens) + if self.search_min_score is not None: + result["searchMinScore"] = from_union([to_float, from_none], self.search_min_score) + if self.separators is not None: + result["separators"] = from_union([from_str, from_none], self.separators) result["updatedAt"] = to_float(self.updated_at) + if self.visibility is not None: + result["visibility"] = from_union([lambda x: to_enum(HilariousVisibility, x), from_none], self.visibility) return result -class MemoriesExportResponse: +class DatasetListResponse: cursor: str """Cursor for fetching the next page""" - items: List[MemoriesExportResponseItem] + items: List[DatasetListResponseItem] - def __init__(self, cursor: str, items: List[MemoriesExportResponseItem]) -> None: + def __init__(self, cursor: str, items: List[DatasetListResponseItem]) -> None: self.cursor = cursor self.items = items @staticmethod - def from_dict(obj: Any) -> 'MemoriesExportResponse': + def from_dict(obj: Any) -> 'DatasetListResponse': assert isinstance(obj, dict) cursor = from_str(obj.get("cursor")) - items = from_list(MemoriesExportResponseItem.from_dict, obj.get("items")) - return MemoriesExportResponse(cursor, items) + items = from_list(DatasetListResponseItem.from_dict, obj.get("items")) + return DatasetListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(MemoriesExportResponseItem, x), self.items) + result["items"] = from_list(lambda x: to_class(DatasetListResponseItem, x), self.items) return result -class MemoriesExportStreamItemData: - """Instance list properties""" +class AmbitiousVisibility(Enum): + """The dataset visibility""" - bot_id: Optional[str] - """The bot associated with the memory""" + PRIVATE = "private" + PROTECTED = "protected" + PUBLIC = "public" - contact_id: Optional[str] - """The contact associated with the memory""" + +class DatasetListStreamItemData: + """Blueprint properties""" + + alias: Optional[str] + """The unique alias for the instance""" + + blueprint_id: Optional[str] + """The ID of the blueprint""" created_at: float """The timestamp (ms) when the instance was created""" @@ -35568,1133 +34508,1227 @@ class MemoriesExportStreamItemData: id: str """The instance ID""" + match_instruction: Optional[str] + """An instruction to include before found records""" + meta: Optional[Dict[str, Any]] """Meta data information""" + mismatch_instruction: Optional[str] + """An instruction to include if no records where found""" + name: Optional[str] """The associated name""" - text: Optional[str] - """The text of the memory""" + record_max_tokens: Optional[float] + """The total number of tokens for each record""" + + reranker: Optional[str] + """The reranker class for the dataset""" + + search_max_records: Optional[float] + """The total number of records to return during search""" + + search_max_tokens: Optional[float] + """The total number of tokens to use during search""" + + search_min_score: Optional[float] + """The minimum score to filter search results by""" + + separators: Optional[str] + """A list of separators to use when tokenizing text""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, bot_id: Optional[str], contact_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], text: Optional[str], updated_at: float) -> None: - self.bot_id = bot_id - self.contact_id = contact_id + visibility: Optional[AmbitiousVisibility] + """The dataset visibility""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, match_instruction: Optional[str], meta: Optional[Dict[str, Any]], mismatch_instruction: Optional[str], name: Optional[str], record_max_tokens: Optional[float], reranker: Optional[str], search_max_records: Optional[float], search_max_tokens: Optional[float], search_min_score: Optional[float], separators: Optional[str], updated_at: float, visibility: Optional[AmbitiousVisibility]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id self.created_at = created_at self.description = description self.id = id + self.match_instruction = match_instruction self.meta = meta + self.mismatch_instruction = mismatch_instruction self.name = name - self.text = text + self.record_max_tokens = record_max_tokens + self.reranker = reranker + self.search_max_records = search_max_records + self.search_max_tokens = search_max_tokens + self.search_min_score = search_min_score + self.separators = separators self.updated_at = updated_at + self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'MemoriesExportStreamItemData': + def from_dict(obj: Any) -> 'DatasetListStreamItemData': assert isinstance(obj, dict) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_id = from_union([from_str, from_none], obj.get("contactId")) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) + match_instruction = from_union([from_str, from_none], obj.get("matchInstruction")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + mismatch_instruction = from_union([from_str, from_none], obj.get("mismatchInstruction")) name = from_union([from_str, from_none], obj.get("name")) - text = from_union([from_str, from_none], obj.get("text")) + record_max_tokens = from_union([from_float, from_none], obj.get("recordMaxTokens")) + reranker = from_union([from_str, from_none], obj.get("reranker")) + search_max_records = from_union([from_float, from_none], obj.get("searchMaxRecords")) + search_max_tokens = from_union([from_float, from_none], obj.get("searchMaxTokens")) + search_min_score = from_union([from_float, from_none], obj.get("searchMinScore")) + separators = from_union([from_str, from_none], obj.get("separators")) updated_at = from_float(obj.get("updatedAt")) - return MemoriesExportStreamItemData(bot_id, contact_id, created_at, description, id, meta, name, text, updated_at) + visibility = from_union([AmbitiousVisibility, from_none], obj.get("visibility")) + return DatasetListStreamItemData(alias, blueprint_id, created_at, description, id, match_instruction, meta, mismatch_instruction, name, record_max_tokens, reranker, search_max_records, search_max_tokens, search_min_score, separators, updated_at, visibility) def to_dict(self) -> dict: result: dict = {} - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_id is not None: - result["contactId"] = from_union([from_str, from_none], self.contact_id) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) + if self.match_instruction is not None: + result["matchInstruction"] = from_union([from_str, from_none], self.match_instruction) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.mismatch_instruction is not None: + result["mismatchInstruction"] = from_union([from_str, from_none], self.mismatch_instruction) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.text is not None: - result["text"] = from_union([from_str, from_none], self.text) + if self.record_max_tokens is not None: + result["recordMaxTokens"] = from_union([to_float, from_none], self.record_max_tokens) + if self.reranker is not None: + result["reranker"] = from_union([from_str, from_none], self.reranker) + if self.search_max_records is not None: + result["searchMaxRecords"] = from_union([to_float, from_none], self.search_max_records) + if self.search_max_tokens is not None: + result["searchMaxTokens"] = from_union([to_float, from_none], self.search_max_tokens) + if self.search_min_score is not None: + result["searchMinScore"] = from_union([to_float, from_none], self.search_min_score) + if self.separators is not None: + result["separators"] = from_union([from_str, from_none], self.separators) result["updatedAt"] = to_float(self.updated_at) + if self.visibility is not None: + result["visibility"] = from_union([lambda x: to_enum(AmbitiousVisibility, x), from_none], self.visibility) return result -class MemoriesExportStreamItemType(Enum): +class DatasetListStreamItemType(Enum): """The type of event""" ITEM = "item" -class MemoriesExportStreamItem: - data: MemoriesExportStreamItemData - """Instance list properties""" +class DatasetListStreamItem: + data: DatasetListStreamItemData + """Blueprint properties""" - type: MemoriesExportStreamItemType + type: DatasetListStreamItemType """The type of event""" - def __init__(self, data: MemoriesExportStreamItemData, type: MemoriesExportStreamItemType) -> None: + def __init__(self, data: DatasetListStreamItemData, type: DatasetListStreamItemType) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'MemoriesExportStreamItem': + def from_dict(obj: Any) -> 'DatasetListStreamItem': assert isinstance(obj, dict) - data = MemoriesExportStreamItemData.from_dict(obj.get("data")) - type = MemoriesExportStreamItemType(obj.get("type")) - return MemoriesExportStreamItem(data, type) + data = DatasetListStreamItemData.from_dict(obj.get("data")) + type = DatasetListStreamItemType(obj.get("type")) + return DatasetListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(MemoriesExportStreamItemData, self.data) - result["type"] = to_enum(MemoriesExportStreamItemType, self.type) + result["data"] = to_class(DatasetListStreamItemData, self.data) + result["type"] = to_enum(DatasetListStreamItemType, self.type) return result -class MemoryListParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" - - -class MemoryListParams: - cursor: Optional[str] - """The cursor to use for pagination""" - - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" - - order: Optional[MemoryListParamsOrder] - """The order of the paginated items""" - - take: Optional[int] - """The number of items to retrieve""" - - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[MemoryListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take - - @staticmethod - def from_dict(obj: Any) -> 'MemoryListParams': - assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([MemoryListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return MemoryListParams(cursor, meta, order, take) - - def to_dict(self) -> dict: - result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(MemoryListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) - return result +class DatasetCreateRequestVisibility(Enum): + """The dataset visibility""" + PRIVATE = "private" + PROTECTED = "protected" + PUBLIC = "public" -class MemoryListResponseItem: - """Instance list properties""" - bot_id: Optional[str] - """The bot associated with the memory""" +class DatasetCreateRequest: + """Blueprint properties""" - contact_id: Optional[str] - """The contact associated with the memory""" + alias: Optional[str] + """The unique alias for the instance""" - created_at: float - """The timestamp (ms) when the instance was created""" + blueprint_id: Optional[str] + """The ID of the blueprint""" description: Optional[str] """The associated description""" - id: str - """The instance ID""" + match_instruction: Optional[str] + """An instruction to include before found records""" meta: Optional[Dict[str, Any]] """Meta data information""" + mismatch_instruction: Optional[str] + """An instruction to include if no records where found""" + name: Optional[str] """The associated name""" - text: Optional[str] - """The text of the memory""" + record_max_tokens: Optional[float] + """The total number of tokens for each record""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + reranker: Optional[str] + """The reranker class for the dataset""" - def __init__(self, bot_id: Optional[str], contact_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], text: Optional[str], updated_at: float) -> None: - self.bot_id = bot_id - self.contact_id = contact_id - self.created_at = created_at + search_max_records: Optional[float] + """The total number of records to return during search""" + + search_max_tokens: Optional[float] + """The total number of tokens to use during search""" + + search_min_score: Optional[float] + """The minimum score to filter search results by""" + + separators: Optional[str] + """A list of separators to use when tokenizing text""" + + visibility: Optional[DatasetCreateRequestVisibility] + """The dataset visibility""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], description: Optional[str], match_instruction: Optional[str], meta: Optional[Dict[str, Any]], mismatch_instruction: Optional[str], name: Optional[str], record_max_tokens: Optional[float], reranker: Optional[str], search_max_records: Optional[float], search_max_tokens: Optional[float], search_min_score: Optional[float], separators: Optional[str], visibility: Optional[DatasetCreateRequestVisibility]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id self.description = description - self.id = id + self.match_instruction = match_instruction self.meta = meta + self.mismatch_instruction = mismatch_instruction self.name = name - self.text = text - self.updated_at = updated_at + self.record_max_tokens = record_max_tokens + self.reranker = reranker + self.search_max_records = search_max_records + self.search_max_tokens = search_max_tokens + self.search_min_score = search_min_score + self.separators = separators + self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'MemoryListResponseItem': + def from_dict(obj: Any) -> 'DatasetCreateRequest': assert isinstance(obj, dict) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_id = from_union([from_str, from_none], obj.get("contactId")) - created_at = from_float(obj.get("createdAt")) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) + match_instruction = from_union([from_str, from_none], obj.get("matchInstruction")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + mismatch_instruction = from_union([from_str, from_none], obj.get("mismatchInstruction")) name = from_union([from_str, from_none], obj.get("name")) - text = from_union([from_str, from_none], obj.get("text")) - updated_at = from_float(obj.get("updatedAt")) - return MemoryListResponseItem(bot_id, contact_id, created_at, description, id, meta, name, text, updated_at) + record_max_tokens = from_union([from_float, from_none], obj.get("recordMaxTokens")) + reranker = from_union([from_str, from_none], obj.get("reranker")) + search_max_records = from_union([from_float, from_none], obj.get("searchMaxRecords")) + search_max_tokens = from_union([from_float, from_none], obj.get("searchMaxTokens")) + search_min_score = from_union([from_float, from_none], obj.get("searchMinScore")) + separators = from_union([from_str, from_none], obj.get("separators")) + visibility = from_union([DatasetCreateRequestVisibility, from_none], obj.get("visibility")) + return DatasetCreateRequest(alias, blueprint_id, description, match_instruction, meta, mismatch_instruction, name, record_max_tokens, reranker, search_max_records, search_max_tokens, search_min_score, separators, visibility) def to_dict(self) -> dict: result: dict = {} - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_id is not None: - result["contactId"] = from_union([from_str, from_none], self.contact_id) - result["createdAt"] = to_float(self.created_at) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) + if self.match_instruction is not None: + result["matchInstruction"] = from_union([from_str, from_none], self.match_instruction) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.mismatch_instruction is not None: + result["mismatchInstruction"] = from_union([from_str, from_none], self.mismatch_instruction) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.text is not None: - result["text"] = from_union([from_str, from_none], self.text) - result["updatedAt"] = to_float(self.updated_at) + if self.record_max_tokens is not None: + result["recordMaxTokens"] = from_union([to_float, from_none], self.record_max_tokens) + if self.reranker is not None: + result["reranker"] = from_union([from_str, from_none], self.reranker) + if self.search_max_records is not None: + result["searchMaxRecords"] = from_union([to_float, from_none], self.search_max_records) + if self.search_max_tokens is not None: + result["searchMaxTokens"] = from_union([to_float, from_none], self.search_max_tokens) + if self.search_min_score is not None: + result["searchMinScore"] = from_union([to_float, from_none], self.search_min_score) + if self.separators is not None: + result["separators"] = from_union([from_str, from_none], self.separators) + if self.visibility is not None: + result["visibility"] = from_union([lambda x: to_enum(DatasetCreateRequestVisibility, x), from_none], self.visibility) return result -class MemoryListResponse: - cursor: str - """Cursor for fetching the next page""" +class DatasetCreateResponse: + id: str + """The ID of the created dataset""" - items: List[MemoryListResponseItem] + def __init__(self, id: str) -> None: + self.id = id - def __init__(self, cursor: str, items: List[MemoryListResponseItem]) -> None: - self.cursor = cursor - self.items = items + @staticmethod + def from_dict(obj: Any) -> 'DatasetCreateResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return DatasetCreateResponse(id) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result + + +class DatasetUpdateParams: + dataset_id: str + + def __init__(self, dataset_id: str) -> None: + self.dataset_id = dataset_id @staticmethod - def from_dict(obj: Any) -> 'MemoryListResponse': + def from_dict(obj: Any) -> 'DatasetUpdateParams': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(MemoryListResponseItem.from_dict, obj.get("items")) - return MemoryListResponse(cursor, items) + dataset_id = from_str(obj.get("datasetId")) + return DatasetUpdateParams(dataset_id) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(MemoryListResponseItem, x), self.items) + result["datasetId"] = from_str(self.dataset_id) return result -class MemoryListStreamItemData: - """Instance list properties""" +class DatasetUpdateRequestVisibility(Enum): + """The dataset visibility""" - bot_id: Optional[str] - """The bot associated with the memory""" + PRIVATE = "private" + PROTECTED = "protected" + PUBLIC = "public" - contact_id: Optional[str] - """The contact associated with the memory""" - created_at: float - """The timestamp (ms) when the instance was created""" +class DatasetUpdateRequest: + """Blueprint properties""" + + alias: Optional[str] + """The unique alias for the instance""" + + blueprint_id: Optional[str] + """The ID of the blueprint""" description: Optional[str] """The associated description""" - id: str - """The instance ID""" + match_instruction: Optional[str] + """An instruction to include before found records""" meta: Optional[Dict[str, Any]] """Meta data information""" + mismatch_instruction: Optional[str] + """An instruction to include if no records where found""" + name: Optional[str] """The associated name""" - text: Optional[str] - """The text of the memory""" + record_max_tokens: Optional[float] + """The total number of tokens to for each record""" + + reranker: Optional[str] + """The reranker class for the dataset""" + + search_max_records: Optional[float] + """The total number of records to return during search""" + + search_max_tokens: Optional[float] + """The total number of tokens to use during search""" + + search_min_score: Optional[float] + """The minimum score to filter search results by""" + + separators: Optional[str] + """A list of separators to use when tokenizing text""" + + visibility: Optional[DatasetUpdateRequestVisibility] + """The dataset visibility""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], description: Optional[str], match_instruction: Optional[str], meta: Optional[Dict[str, Any]], mismatch_instruction: Optional[str], name: Optional[str], record_max_tokens: Optional[float], reranker: Optional[str], search_max_records: Optional[float], search_max_tokens: Optional[float], search_min_score: Optional[float], separators: Optional[str], visibility: Optional[DatasetUpdateRequestVisibility]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.description = description + self.match_instruction = match_instruction + self.meta = meta + self.mismatch_instruction = mismatch_instruction + self.name = name + self.record_max_tokens = record_max_tokens + self.reranker = reranker + self.search_max_records = search_max_records + self.search_max_tokens = search_max_tokens + self.search_min_score = search_min_score + self.separators = separators + self.visibility = visibility + + @staticmethod + def from_dict(obj: Any) -> 'DatasetUpdateRequest': + assert isinstance(obj, dict) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + description = from_union([from_str, from_none], obj.get("description")) + match_instruction = from_union([from_str, from_none], obj.get("matchInstruction")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + mismatch_instruction = from_union([from_str, from_none], obj.get("mismatchInstruction")) + name = from_union([from_str, from_none], obj.get("name")) + record_max_tokens = from_union([from_float, from_none], obj.get("recordMaxTokens")) + reranker = from_union([from_str, from_none], obj.get("reranker")) + search_max_records = from_union([from_float, from_none], obj.get("searchMaxRecords")) + search_max_tokens = from_union([from_float, from_none], obj.get("searchMaxTokens")) + search_min_score = from_union([from_float, from_none], obj.get("searchMinScore")) + separators = from_union([from_str, from_none], obj.get("separators")) + visibility = from_union([DatasetUpdateRequestVisibility, from_none], obj.get("visibility")) + return DatasetUpdateRequest(alias, blueprint_id, description, match_instruction, meta, mismatch_instruction, name, record_max_tokens, reranker, search_max_records, search_max_tokens, search_min_score, separators, visibility) + + def to_dict(self) -> dict: + result: dict = {} + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.match_instruction is not None: + result["matchInstruction"] = from_union([from_str, from_none], self.match_instruction) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.mismatch_instruction is not None: + result["mismatchInstruction"] = from_union([from_str, from_none], self.mismatch_instruction) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.record_max_tokens is not None: + result["recordMaxTokens"] = from_union([to_float, from_none], self.record_max_tokens) + if self.reranker is not None: + result["reranker"] = from_union([from_str, from_none], self.reranker) + if self.search_max_records is not None: + result["searchMaxRecords"] = from_union([to_float, from_none], self.search_max_records) + if self.search_max_tokens is not None: + result["searchMaxTokens"] = from_union([to_float, from_none], self.search_max_tokens) + if self.search_min_score is not None: + result["searchMinScore"] = from_union([to_float, from_none], self.search_min_score) + if self.separators is not None: + result["separators"] = from_union([from_str, from_none], self.separators) + if self.visibility is not None: + result["visibility"] = from_union([lambda x: to_enum(DatasetUpdateRequestVisibility, x), from_none], self.visibility) + return result + - updated_at: float - """The timestamp (ms) when the instance was updated""" +class DatasetUpdateResponse: + id: str + """The ID of the updated dataset""" - def __init__(self, bot_id: Optional[str], contact_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], text: Optional[str], updated_at: float) -> None: - self.bot_id = bot_id - self.contact_id = contact_id - self.created_at = created_at - self.description = description + def __init__(self, id: str) -> None: self.id = id - self.meta = meta - self.name = name - self.text = text - self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'MemoryListStreamItemData': + def from_dict(obj: Any) -> 'DatasetUpdateResponse': assert isinstance(obj, dict) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_id = from_union([from_str, from_none], obj.get("contactId")) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - text = from_union([from_str, from_none], obj.get("text")) - updated_at = from_float(obj.get("updatedAt")) - return MemoryListStreamItemData(bot_id, contact_id, created_at, description, id, meta, name, text, updated_at) + return DatasetUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_id is not None: - result["contactId"] = from_union([from_str, from_none], self.contact_id) - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.text is not None: - result["text"] = from_union([from_str, from_none], self.text) - result["updatedAt"] = to_float(self.updated_at) return result -class MemoryListStreamItemType(Enum): - """The type of event""" +class DatasetSearchParams: + dataset_id: str + """The ID of the dataset to search""" - ITEM = "item" + def __init__(self, dataset_id: str) -> None: + self.dataset_id = dataset_id + @staticmethod + def from_dict(obj: Any) -> 'DatasetSearchParams': + assert isinstance(obj, dict) + dataset_id = from_str(obj.get("datasetId")) + return DatasetSearchParams(dataset_id) -class MemoryListStreamItem: - data: MemoryListStreamItemData - """Instance list properties""" + def to_dict(self) -> dict: + result: dict = {} + result["datasetId"] = from_str(self.dataset_id) + return result - type: MemoryListStreamItemType - """The type of event""" - def __init__(self, data: MemoryListStreamItemData, type: MemoryListStreamItemType) -> None: - self.data = data - self.type = type +class FilterClass: + eq: Optional[Union[float, bool, str]] + ne: Optional[Union[float, bool, str]] + gt: Optional[float] + gte: Optional[float] + lt: Optional[float] + lte: Optional[float] + + def __init__(self, eq: Optional[Union[float, bool, str]], ne: Optional[Union[float, bool, str]], gt: Optional[float], gte: Optional[float], lt: Optional[float], lte: Optional[float]) -> None: + self.eq = eq + self.ne = ne + self.gt = gt + self.gte = gte + self.lt = lt + self.lte = lte @staticmethod - def from_dict(obj: Any) -> 'MemoryListStreamItem': + def from_dict(obj: Any) -> 'FilterClass': assert isinstance(obj, dict) - data = MemoryListStreamItemData.from_dict(obj.get("data")) - type = MemoryListStreamItemType(obj.get("type")) - return MemoryListStreamItem(data, type) + eq = from_union([from_float, from_bool, from_str, from_none], obj.get("$eq")) + ne = from_union([from_float, from_bool, from_str, from_none], obj.get("$ne")) + gt = from_union([from_float, from_none], obj.get("$gt")) + gte = from_union([from_float, from_none], obj.get("$gte")) + lt = from_union([from_float, from_none], obj.get("$lt")) + lte = from_union([from_float, from_none], obj.get("$lte")) + return FilterClass(eq, ne, gt, gte, lt, lte) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(MemoryListStreamItemData, self.data) - result["type"] = to_enum(MemoryListStreamItemType, self.type) + if self.eq is not None: + result["$eq"] = from_union([to_float, from_bool, from_str, from_none], self.eq) + if self.ne is not None: + result["$ne"] = from_union([to_float, from_bool, from_str, from_none], self.ne) + if self.gt is not None: + result["$gt"] = from_union([to_float, from_none], self.gt) + if self.gte is not None: + result["$gte"] = from_union([to_float, from_none], self.gte) + if self.lt is not None: + result["$lt"] = from_union([to_float, from_none], self.lt) + if self.lte is not None: + result["$lte"] = from_union([to_float, from_none], self.lte) return result -class MemorySearchRequest: - bot_id: Optional[str] - """The ID of the bot to filter memories by""" - - contact_id: Optional[str] - """The ID of the contact to filter memories by""" - +class DatasetSearchRequest: + filter: Optional[Dict[str, Union[float, bool, FilterClass, str]]] search: str """The keyword/phrase to search for""" - def __init__(self, bot_id: Optional[str], contact_id: Optional[str], search: str) -> None: - self.bot_id = bot_id - self.contact_id = contact_id + def __init__(self, filter: Optional[Dict[str, Union[float, bool, FilterClass, str]]], search: str) -> None: + self.filter = filter self.search = search @staticmethod - def from_dict(obj: Any) -> 'MemorySearchRequest': + def from_dict(obj: Any) -> 'DatasetSearchRequest': assert isinstance(obj, dict) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_id = from_union([from_str, from_none], obj.get("contactId")) + filter = from_union([lambda x: from_dict(lambda x: from_union([from_float, from_bool, FilterClass.from_dict, from_str], x), x), from_none], obj.get("filter")) search = from_str(obj.get("search")) - return MemorySearchRequest(bot_id, contact_id, search) + return DatasetSearchRequest(filter, search) def to_dict(self) -> dict: result: dict = {} - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_id is not None: - result["contactId"] = from_union([from_str, from_none], self.contact_id) + if self.filter is not None: + result["filter"] = from_union([lambda x: from_dict(lambda x: from_union([to_float, from_bool, lambda x: to_class(FilterClass, x), from_str], x), x), from_none], self.filter) result["search"] = from_str(self.search) return result -class MemorySearchResponseItem: +class DatasetSearchResponseRecord: id: str meta: Optional[Dict[str, Any]] + score: float + source: Optional[str] text: str - def __init__(self, id: str, meta: Optional[Dict[str, Any]], text: str) -> None: + def __init__(self, id: str, meta: Optional[Dict[str, Any]], score: float, source: Optional[str], text: str) -> None: self.id = id self.meta = meta + self.score = score + self.source = source self.text = text @staticmethod - def from_dict(obj: Any) -> 'MemorySearchResponseItem': + def from_dict(obj: Any) -> 'DatasetSearchResponseRecord': assert isinstance(obj, dict) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + score = from_float(obj.get("score")) + source = from_union([from_str, from_none], obj.get("source")) text = from_str(obj.get("text")) - return MemorySearchResponseItem(id, meta, text) + return DatasetSearchResponseRecord(id, meta, score, source, text) def to_dict(self) -> dict: result: dict = {} result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + result["score"] = to_float(self.score) + if self.source is not None: + result["source"] = from_union([from_str, from_none], self.source) result["text"] = from_str(self.text) return result -class MemorySearchResponse: - items: List[MemorySearchResponseItem] - """An array of memories matching the search query""" - - def __init__(self, items: List[MemorySearchResponseItem]) -> None: - self.items = items - - @staticmethod - def from_dict(obj: Any) -> 'MemorySearchResponse': - assert isinstance(obj, dict) - items = from_list(MemorySearchResponseItem.from_dict, obj.get("items")) - return MemorySearchResponse(items) - - def to_dict(self) -> dict: - result: dict = {} - result["items"] = from_list(lambda x: to_class(MemorySearchResponseItem, x), self.items) - return result - - -class PartnerUserContextDeleteParams: - context_id: str - """The ID of the context to delete""" +class DatasetSearchResponse: + id: str + """The ID of the dataset that was searched""" - user_id: str - """The ID of the partner user""" + records: List[DatasetSearchResponseRecord] + """An array of records matching the search query""" - def __init__(self, context_id: str, user_id: str) -> None: - self.context_id = context_id - self.user_id = user_id + def __init__(self, id: str, records: List[DatasetSearchResponseRecord]) -> None: + self.id = id + self.records = records @staticmethod - def from_dict(obj: Any) -> 'PartnerUserContextDeleteParams': + def from_dict(obj: Any) -> 'DatasetSearchResponse': assert isinstance(obj, dict) - context_id = from_str(obj.get("contextId")) - user_id = from_str(obj.get("userId")) - return PartnerUserContextDeleteParams(context_id, user_id) + id = from_str(obj.get("id")) + records = from_list(DatasetSearchResponseRecord.from_dict, obj.get("records")) + return DatasetSearchResponse(id, records) def to_dict(self) -> dict: result: dict = {} - result["contextId"] = from_str(self.context_id) - result["userId"] = from_str(self.user_id) + result["id"] = from_str(self.id) + result["records"] = from_list(lambda x: to_class(DatasetSearchResponseRecord, x), self.records) return result -class PartnerUserContextDeleteResponse: - id: str - """The ID of the deleted context""" +class DatasetFetchParams: + dataset_id: str + """The ID of the dataset to retrieve""" - def __init__(self, id: str) -> None: - self.id = id + def __init__(self, dataset_id: str) -> None: + self.dataset_id = dataset_id @staticmethod - def from_dict(obj: Any) -> 'PartnerUserContextDeleteResponse': + def from_dict(obj: Any) -> 'DatasetFetchParams': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return PartnerUserContextDeleteResponse(id) + dataset_id = from_str(obj.get("datasetId")) + return DatasetFetchParams(dataset_id) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["datasetId"] = from_str(self.dataset_id) return result -class PartnerUserContextFetchParams: - context_id: str - """The ID of the context to retrieve""" - - user_id: str - """The ID of the partner user""" - - def __init__(self, context_id: str, user_id: str) -> None: - self.context_id = context_id - self.user_id = user_id +class DatasetFetchResponseVisibility(Enum): + """The dataset visibility""" - @staticmethod - def from_dict(obj: Any) -> 'PartnerUserContextFetchParams': - assert isinstance(obj, dict) - context_id = from_str(obj.get("contextId")) - user_id = from_str(obj.get("userId")) - return PartnerUserContextFetchParams(context_id, user_id) + PRIVATE = "private" + PROTECTED = "protected" + PUBLIC = "public" - def to_dict(self) -> dict: - result: dict = {} - result["contextId"] = from_str(self.context_id) - result["userId"] = from_str(self.user_id) - return result +class DatasetFetchResponse: + """Blueprint properties""" -class PartnerUserContextFetchResponse: - """Instance list properties""" + alias: Optional[str] + """The unique alias for the instance""" blueprint_id: Optional[str] - bot_id: Optional[str] - contact_id: Optional[str] + """The ID of the blueprint""" + created_at: float """The timestamp (ms) when the instance was created""" - dataset_id: Optional[str] description: Optional[str] """The associated description""" id: str """The instance ID""" + match_instruction: Optional[str] + """An instruction to include before found records""" + meta: Optional[Dict[str, Any]] """Meta data information""" + mismatch_instruction: Optional[str] + """An instruction to include if no records where found""" + name: Optional[str] """The associated name""" - payload: Optional[Dict[str, Any]] - skillset_id: Optional[str] + record_max_tokens: Optional[float] + """The total number of tokens for each record""" + + reranker: Optional[str] + """The reranker class for the dataset""" + + search_max_records: Optional[float] + """The total number of records to return during search""" + + search_max_tokens: Optional[float] + """The total number of tokens to use during search""" + + search_min_score: Optional[float] + """The minimum score to filter search results by""" + + separators: Optional[str] + """A list of separators to use when tokenizing text""" + updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, blueprint_id: Optional[str], bot_id: Optional[str], contact_id: Optional[str], created_at: float, dataset_id: Optional[str], description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], payload: Optional[Dict[str, Any]], skillset_id: Optional[str], updated_at: float) -> None: + visibility: Optional[DatasetFetchResponseVisibility] + """The dataset visibility""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, match_instruction: Optional[str], meta: Optional[Dict[str, Any]], mismatch_instruction: Optional[str], name: Optional[str], record_max_tokens: Optional[float], reranker: Optional[str], search_max_records: Optional[float], search_max_tokens: Optional[float], search_min_score: Optional[float], separators: Optional[str], updated_at: float, visibility: Optional[DatasetFetchResponseVisibility]) -> None: + self.alias = alias self.blueprint_id = blueprint_id - self.bot_id = bot_id - self.contact_id = contact_id self.created_at = created_at - self.dataset_id = dataset_id self.description = description self.id = id + self.match_instruction = match_instruction self.meta = meta + self.mismatch_instruction = mismatch_instruction self.name = name - self.payload = payload - self.skillset_id = skillset_id + self.record_max_tokens = record_max_tokens + self.reranker = reranker + self.search_max_records = search_max_records + self.search_max_tokens = search_max_tokens + self.search_min_score = search_min_score + self.separators = separators self.updated_at = updated_at + self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'PartnerUserContextFetchResponse': + def from_dict(obj: Any) -> 'DatasetFetchResponse': assert isinstance(obj, dict) + alias = from_union([from_str, from_none], obj.get("alias")) blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_id = from_union([from_str, from_none], obj.get("contactId")) created_at = from_float(obj.get("createdAt")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) + match_instruction = from_union([from_str, from_none], obj.get("matchInstruction")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + mismatch_instruction = from_union([from_str, from_none], obj.get("mismatchInstruction")) name = from_union([from_str, from_none], obj.get("name")) - payload = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("payload")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + record_max_tokens = from_union([from_float, from_none], obj.get("recordMaxTokens")) + reranker = from_union([from_str, from_none], obj.get("reranker")) + search_max_records = from_union([from_float, from_none], obj.get("searchMaxRecords")) + search_max_tokens = from_union([from_float, from_none], obj.get("searchMaxTokens")) + search_min_score = from_union([from_float, from_none], obj.get("searchMinScore")) + separators = from_union([from_str, from_none], obj.get("separators")) updated_at = from_float(obj.get("updatedAt")) - return PartnerUserContextFetchResponse(blueprint_id, bot_id, contact_id, created_at, dataset_id, description, id, meta, name, payload, skillset_id, updated_at) + visibility = from_union([DatasetFetchResponseVisibility, from_none], obj.get("visibility")) + return DatasetFetchResponse(alias, blueprint_id, created_at, description, id, match_instruction, meta, mismatch_instruction, name, record_max_tokens, reranker, search_max_records, search_max_tokens, search_min_score, separators, updated_at, visibility) def to_dict(self) -> dict: result: dict = {} + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) if self.blueprint_id is not None: result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_id is not None: - result["contactId"] = from_union([from_str, from_none], self.contact_id) result["createdAt"] = to_float(self.created_at) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) + if self.match_instruction is not None: + result["matchInstruction"] = from_union([from_str, from_none], self.match_instruction) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.mismatch_instruction is not None: + result["mismatchInstruction"] = from_union([from_str, from_none], self.mismatch_instruction) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.payload is not None: - result["payload"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.payload) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) + if self.record_max_tokens is not None: + result["recordMaxTokens"] = from_union([to_float, from_none], self.record_max_tokens) + if self.reranker is not None: + result["reranker"] = from_union([from_str, from_none], self.reranker) + if self.search_max_records is not None: + result["searchMaxRecords"] = from_union([to_float, from_none], self.search_max_records) + if self.search_max_tokens is not None: + result["searchMaxTokens"] = from_union([to_float, from_none], self.search_max_tokens) + if self.search_min_score is not None: + result["searchMinScore"] = from_union([to_float, from_none], self.search_min_score) + if self.separators is not None: + result["separators"] = from_union([from_str, from_none], self.separators) result["updatedAt"] = to_float(self.updated_at) + if self.visibility is not None: + result["visibility"] = from_union([lambda x: to_enum(DatasetFetchResponseVisibility, x), from_none], self.visibility) return result -class PartnerUserContextUpdateParams: - context_id: str - """The ID of the context to update""" - - user_id: str - """The ID of the partner user""" +class DatasetDeleteParams: + dataset_id: str + """The ID of the dataset to delete""" - def __init__(self, context_id: str, user_id: str) -> None: - self.context_id = context_id - self.user_id = user_id + def __init__(self, dataset_id: str) -> None: + self.dataset_id = dataset_id @staticmethod - def from_dict(obj: Any) -> 'PartnerUserContextUpdateParams': + def from_dict(obj: Any) -> 'DatasetDeleteParams': assert isinstance(obj, dict) - context_id = from_str(obj.get("contextId")) - user_id = from_str(obj.get("userId")) - return PartnerUserContextUpdateParams(context_id, user_id) + dataset_id = from_str(obj.get("datasetId")) + return DatasetDeleteParams(dataset_id) def to_dict(self) -> dict: result: dict = {} - result["contextId"] = from_str(self.context_id) - result["userId"] = from_str(self.user_id) + result["datasetId"] = from_str(self.dataset_id) return result -class PartnerUserContextUpdateRequest: - """Instance crud properties""" - - description: Optional[str] - """The associated description""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: Optional[str] - """The associated name""" - - payload: Optional[Dict[str, Any]] - """Context payload""" +class DatasetDeleteResponse: + id: str + """The ID of the deleted dataset""" - def __init__(self, description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], payload: Optional[Dict[str, Any]]) -> None: - self.description = description - self.meta = meta - self.name = name - self.payload = payload + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'PartnerUserContextUpdateRequest': + def from_dict(obj: Any) -> 'DatasetDeleteResponse': assert isinstance(obj, dict) - description = from_union([from_str, from_none], obj.get("description")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - payload = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("payload")) - return PartnerUserContextUpdateRequest(description, meta, name, payload) + id = from_str(obj.get("id")) + return DatasetDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.payload is not None: - result["payload"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.payload) + result["id"] = from_str(self.id) return result -class PartnerUserContextUpdateResponse: - id: str - """The ID of the updated context""" +class DatasetRecordListParamsOrder(Enum): + """The order of the paginated items""" - def __init__(self, id: str) -> None: - self.id = id + ASC = "asc" + DESC = "desc" + + +class DatasetRecordListParams: + cursor: Optional[str] + """The cursor to use for pagination""" + + dataset_id: str + """The ID of the dataset""" + + order: Optional[DatasetRecordListParamsOrder] + """The order of the paginated items""" + + take: Optional[int] + """The number of items to retrieve""" + + def __init__(self, cursor: Optional[str], dataset_id: str, order: Optional[DatasetRecordListParamsOrder], take: Optional[int]) -> None: + self.cursor = cursor + self.dataset_id = dataset_id + self.order = order + self.take = take @staticmethod - def from_dict(obj: Any) -> 'PartnerUserContextUpdateResponse': + def from_dict(obj: Any) -> 'DatasetRecordListParams': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return PartnerUserContextUpdateResponse(id) + cursor = from_union([from_str, from_none], obj.get("cursor")) + dataset_id = from_str(obj.get("datasetId")) + order = from_union([DatasetRecordListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return DatasetRecordListParams(cursor, dataset_id, order, take) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + result["datasetId"] = from_str(self.dataset_id) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(DatasetRecordListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class PartnerUserContextCreateParams: - user_id: str - """The ID of the partner user""" +class DatasetRecordListResponseItem: + """Instance list properties""" - def __init__(self, user_id: str) -> None: - self.user_id = user_id + created_at: float + """The timestamp (ms) when the instance was created""" + + id: str + """The instance ID""" + + source: Optional[str] + text: str + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, created_at: float, id: str, source: Optional[str], text: str, updated_at: float) -> None: + self.created_at = created_at + self.id = id + self.source = source + self.text = text + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'PartnerUserContextCreateParams': + def from_dict(obj: Any) -> 'DatasetRecordListResponseItem': assert isinstance(obj, dict) - user_id = from_str(obj.get("userId")) - return PartnerUserContextCreateParams(user_id) + created_at = from_float(obj.get("createdAt")) + id = from_str(obj.get("id")) + source = from_union([from_str, from_none], obj.get("source")) + text = from_str(obj.get("text")) + updated_at = from_float(obj.get("updatedAt")) + return DatasetRecordListResponseItem(created_at, id, source, text, updated_at) def to_dict(self) -> dict: result: dict = {} - result["userId"] = from_str(self.user_id) + result["createdAt"] = to_float(self.created_at) + result["id"] = from_str(self.id) + if self.source is not None: + result["source"] = from_union([from_str, from_none], self.source) + result["text"] = from_str(self.text) + result["updatedAt"] = to_float(self.updated_at) return result -class PartnerUserContextCreateRequest: - """Instance crud properties""" - - description: Optional[str] - """The associated description""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: Optional[str] - """The associated name""" +class DatasetRecordListResponse: + cursor: str + """Cursor for fetching the next page""" - payload: Optional[Dict[str, Any]] - """Context payload""" + items: List[DatasetRecordListResponseItem] - def __init__(self, description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], payload: Optional[Dict[str, Any]]) -> None: - self.description = description - self.meta = meta - self.name = name - self.payload = payload + def __init__(self, cursor: str, items: List[DatasetRecordListResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'PartnerUserContextCreateRequest': + def from_dict(obj: Any) -> 'DatasetRecordListResponse': assert isinstance(obj, dict) - description = from_union([from_str, from_none], obj.get("description")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - payload = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("payload")) - return PartnerUserContextCreateRequest(description, meta, name, payload) + cursor = from_str(obj.get("cursor")) + items = from_list(DatasetRecordListResponseItem.from_dict, obj.get("items")) + return DatasetRecordListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.payload is not None: - result["payload"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.payload) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(DatasetRecordListResponseItem, x), self.items) return result -class PartnerUserContextCreateResponse: +class DatasetRecordListStreamItemData: """Instance list properties""" - blueprint_id: Optional[str] - bot_id: Optional[str] - contact_id: Optional[str] created_at: float """The timestamp (ms) when the instance was created""" - dataset_id: Optional[str] - description: Optional[str] - """The associated description""" - id: str """The instance ID""" - meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: Optional[str] - """The associated name""" - - payload: Optional[Dict[str, Any]] - skillset_id: Optional[str] + source: Optional[str] + text: str updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, blueprint_id: Optional[str], bot_id: Optional[str], contact_id: Optional[str], created_at: float, dataset_id: Optional[str], description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], payload: Optional[Dict[str, Any]], skillset_id: Optional[str], updated_at: float) -> None: - self.blueprint_id = blueprint_id - self.bot_id = bot_id - self.contact_id = contact_id + def __init__(self, created_at: float, id: str, source: Optional[str], text: str, updated_at: float) -> None: self.created_at = created_at - self.dataset_id = dataset_id - self.description = description self.id = id - self.meta = meta - self.name = name - self.payload = payload - self.skillset_id = skillset_id + self.source = source + self.text = text self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'PartnerUserContextCreateResponse': + def from_dict(obj: Any) -> 'DatasetRecordListStreamItemData': assert isinstance(obj, dict) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_id = from_union([from_str, from_none], obj.get("contactId")) created_at = from_float(obj.get("createdAt")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) - description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - payload = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("payload")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + source = from_union([from_str, from_none], obj.get("source")) + text = from_str(obj.get("text")) updated_at = from_float(obj.get("updatedAt")) - return PartnerUserContextCreateResponse(blueprint_id, bot_id, contact_id, created_at, dataset_id, description, id, meta, name, payload, skillset_id, updated_at) + return DatasetRecordListStreamItemData(created_at, id, source, text, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_id is not None: - result["contactId"] = from_union([from_str, from_none], self.contact_id) result["createdAt"] = to_float(self.created_at) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.payload is not None: - result["payload"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.payload) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) + if self.source is not None: + result["source"] = from_union([from_str, from_none], self.source) + result["text"] = from_str(self.text) result["updatedAt"] = to_float(self.updated_at) return result -class PartnerUserContextListParamsOrder(Enum): +class DatasetRecordListStreamItemType(Enum): + """The type of event""" + + ITEM = "item" + + +class DatasetRecordListStreamItem: + data: DatasetRecordListStreamItemData + """Instance list properties""" + + type: DatasetRecordListStreamItemType + """The type of event""" + + def __init__(self, data: DatasetRecordListStreamItemData, type: DatasetRecordListStreamItemType) -> None: + self.data = data + self.type = type + + @staticmethod + def from_dict(obj: Any) -> 'DatasetRecordListStreamItem': + assert isinstance(obj, dict) + data = DatasetRecordListStreamItemData.from_dict(obj.get("data")) + type = DatasetRecordListStreamItemType(obj.get("type")) + return DatasetRecordListStreamItem(data, type) + + def to_dict(self) -> dict: + result: dict = {} + result["data"] = to_class(DatasetRecordListStreamItemData, self.data) + result["type"] = to_enum(DatasetRecordListStreamItemType, self.type) + return result + + +class DatasetRecordsExportParamsOrder(Enum): """The order of the paginated items""" ASC = "asc" DESC = "desc" -class PartnerUserContextListParams: - blueprint_id: Optional[str] - bot_id: Optional[str] +class DatasetRecordsExportParams: cursor: Optional[str] """The cursor to use for pagination""" - dataset_id: Optional[str] - order: Optional[PartnerUserContextListParamsOrder] + dataset_id: str + """The ID of the dataset to export""" + + order: Optional[DatasetRecordsExportParamsOrder] """The order of the paginated items""" - skillset_id: Optional[str] take: Optional[int] """The number of items to retrieve""" - user_id: str - """The ID of the partner user""" - - def __init__(self, blueprint_id: Optional[str], bot_id: Optional[str], cursor: Optional[str], dataset_id: Optional[str], order: Optional[PartnerUserContextListParamsOrder], skillset_id: Optional[str], take: Optional[int], user_id: str) -> None: - self.blueprint_id = blueprint_id - self.bot_id = bot_id + def __init__(self, cursor: Optional[str], dataset_id: str, order: Optional[DatasetRecordsExportParamsOrder], take: Optional[int]) -> None: self.cursor = cursor self.dataset_id = dataset_id self.order = order - self.skillset_id = skillset_id self.take = take - self.user_id = user_id @staticmethod - def from_dict(obj: Any) -> 'PartnerUserContextListParams': + def from_dict(obj: Any) -> 'DatasetRecordsExportParams': assert isinstance(obj, dict) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) cursor = from_union([from_str, from_none], obj.get("cursor")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) - order = from_union([PartnerUserContextListParamsOrder, from_none], obj.get("order")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + dataset_id = from_str(obj.get("datasetId")) + order = from_union([DatasetRecordsExportParamsOrder, from_none], obj.get("order")) take = from_union([from_int, from_none], obj.get("take")) - user_id = from_str(obj.get("userId")) - return PartnerUserContextListParams(blueprint_id, bot_id, cursor, dataset_id, order, skillset_id, take, user_id) + return DatasetRecordsExportParams(cursor, dataset_id, order, take) def to_dict(self) -> dict: result: dict = {} - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) if self.cursor is not None: result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) + result["datasetId"] = from_str(self.dataset_id) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(PartnerUserContextListParamsOrder, x), from_none], self.order) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) + result["order"] = from_union([lambda x: to_enum(DatasetRecordsExportParamsOrder, x), from_none], self.order) if self.take is not None: result["take"] = from_union([from_int, from_none], self.take) - result["userId"] = from_str(self.user_id) return result -class PartnerUserContextListResponseItem: +class DatasetRecordsExportResponseItem: """Instance list properties""" - blueprint_id: Optional[str] - bot_id: Optional[str] - contact_id: Optional[str] created_at: float """The timestamp (ms) when the instance was created""" - dataset_id: Optional[str] - description: Optional[str] - """The associated description""" - id: str """The instance ID""" - meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: Optional[str] - """The associated name""" - - payload: Optional[Dict[str, Any]] - skillset_id: Optional[str] + source: Optional[str] + text: str updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, blueprint_id: Optional[str], bot_id: Optional[str], contact_id: Optional[str], created_at: float, dataset_id: Optional[str], description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], payload: Optional[Dict[str, Any]], skillset_id: Optional[str], updated_at: float) -> None: - self.blueprint_id = blueprint_id - self.bot_id = bot_id - self.contact_id = contact_id + def __init__(self, created_at: float, id: str, source: Optional[str], text: str, updated_at: float) -> None: self.created_at = created_at - self.dataset_id = dataset_id - self.description = description self.id = id - self.meta = meta - self.name = name - self.payload = payload - self.skillset_id = skillset_id + self.source = source + self.text = text self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'PartnerUserContextListResponseItem': + def from_dict(obj: Any) -> 'DatasetRecordsExportResponseItem': assert isinstance(obj, dict) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_id = from_union([from_str, from_none], obj.get("contactId")) created_at = from_float(obj.get("createdAt")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) - description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - payload = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("payload")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + source = from_union([from_str, from_none], obj.get("source")) + text = from_str(obj.get("text")) updated_at = from_float(obj.get("updatedAt")) - return PartnerUserContextListResponseItem(blueprint_id, bot_id, contact_id, created_at, dataset_id, description, id, meta, name, payload, skillset_id, updated_at) + return DatasetRecordsExportResponseItem(created_at, id, source, text, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_id is not None: - result["contactId"] = from_union([from_str, from_none], self.contact_id) result["createdAt"] = to_float(self.created_at) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.payload is not None: - result["payload"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.payload) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) + if self.source is not None: + result["source"] = from_union([from_str, from_none], self.source) + result["text"] = from_str(self.text) result["updatedAt"] = to_float(self.updated_at) return result -class PartnerUserContextListResponse: +class DatasetRecordsExportResponse: cursor: str """Cursor for fetching the next page""" - items: List[PartnerUserContextListResponseItem] + items: List[DatasetRecordsExportResponseItem] - def __init__(self, cursor: str, items: List[PartnerUserContextListResponseItem]) -> None: + def __init__(self, cursor: str, items: List[DatasetRecordsExportResponseItem]) -> None: self.cursor = cursor self.items = items @staticmethod - def from_dict(obj: Any) -> 'PartnerUserContextListResponse': + def from_dict(obj: Any) -> 'DatasetRecordsExportResponse': assert isinstance(obj, dict) cursor = from_str(obj.get("cursor")) - items = from_list(PartnerUserContextListResponseItem.from_dict, obj.get("items")) - return PartnerUserContextListResponse(cursor, items) + items = from_list(DatasetRecordsExportResponseItem.from_dict, obj.get("items")) + return DatasetRecordsExportResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(PartnerUserContextListResponseItem, x), self.items) + result["items"] = from_list(lambda x: to_class(DatasetRecordsExportResponseItem, x), self.items) return result -class PartnerUserContextListStreamItemData: +class DatasetRecordsExportStreamItemData: """Instance list properties""" - blueprint_id: Optional[str] - bot_id: Optional[str] - contact_id: Optional[str] created_at: float """The timestamp (ms) when the instance was created""" - dataset_id: Optional[str] - description: Optional[str] - """The associated description""" - id: str """The instance ID""" - meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: Optional[str] - """The associated name""" - - payload: Optional[Dict[str, Any]] - skillset_id: Optional[str] + source: Optional[str] + text: str updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, blueprint_id: Optional[str], bot_id: Optional[str], contact_id: Optional[str], created_at: float, dataset_id: Optional[str], description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], payload: Optional[Dict[str, Any]], skillset_id: Optional[str], updated_at: float) -> None: - self.blueprint_id = blueprint_id - self.bot_id = bot_id - self.contact_id = contact_id + def __init__(self, created_at: float, id: str, source: Optional[str], text: str, updated_at: float) -> None: self.created_at = created_at - self.dataset_id = dataset_id - self.description = description self.id = id - self.meta = meta - self.name = name - self.payload = payload - self.skillset_id = skillset_id + self.source = source + self.text = text self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'PartnerUserContextListStreamItemData': + def from_dict(obj: Any) -> 'DatasetRecordsExportStreamItemData': assert isinstance(obj, dict) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - contact_id = from_union([from_str, from_none], obj.get("contactId")) created_at = from_float(obj.get("createdAt")) - dataset_id = from_union([from_str, from_none], obj.get("datasetId")) - description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - payload = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("payload")) - skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + source = from_union([from_str, from_none], obj.get("source")) + text = from_str(obj.get("text")) updated_at = from_float(obj.get("updatedAt")) - return PartnerUserContextListStreamItemData(blueprint_id, bot_id, contact_id, created_at, dataset_id, description, id, meta, name, payload, skillset_id, updated_at) + return DatasetRecordsExportStreamItemData(created_at, id, source, text, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.contact_id is not None: - result["contactId"] = from_union([from_str, from_none], self.contact_id) result["createdAt"] = to_float(self.created_at) - if self.dataset_id is not None: - result["datasetId"] = from_union([from_str, from_none], self.dataset_id) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.payload is not None: - result["payload"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.payload) - if self.skillset_id is not None: - result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) + if self.source is not None: + result["source"] = from_union([from_str, from_none], self.source) + result["text"] = from_str(self.text) result["updatedAt"] = to_float(self.updated_at) return result -class PartnerUserContextListStreamItemType(Enum): +class DatasetRecordsExportStreamItemType(Enum): """The type of event""" ITEM = "item" -class PartnerUserContextListStreamItem: - data: PartnerUserContextListStreamItemData +class DatasetRecordsExportStreamItem: + data: DatasetRecordsExportStreamItemData """Instance list properties""" - type: PartnerUserContextListStreamItemType + type: DatasetRecordsExportStreamItemType """The type of event""" - def __init__(self, data: PartnerUserContextListStreamItemData, type: PartnerUserContextListStreamItemType) -> None: + def __init__(self, data: DatasetRecordsExportStreamItemData, type: DatasetRecordsExportStreamItemType) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'PartnerUserContextListStreamItem': + def from_dict(obj: Any) -> 'DatasetRecordsExportStreamItem': assert isinstance(obj, dict) - data = PartnerUserContextListStreamItemData.from_dict(obj.get("data")) - type = PartnerUserContextListStreamItemType(obj.get("type")) - return PartnerUserContextListStreamItem(data, type) + data = DatasetRecordsExportStreamItemData.from_dict(obj.get("data")) + type = DatasetRecordsExportStreamItemType(obj.get("type")) + return DatasetRecordsExportStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(PartnerUserContextListStreamItemData, self.data) - result["type"] = to_enum(PartnerUserContextListStreamItemType, self.type) + result["data"] = to_class(DatasetRecordsExportStreamItemData, self.data) + result["type"] = to_enum(DatasetRecordsExportStreamItemType, self.type) return result -class PartnerUserDeleteParams: - user_id: str - """The ID of the user to delete""" +class DatasetRecordCreateParams: + dataset_id: str - def __init__(self, user_id: str) -> None: - self.user_id = user_id + def __init__(self, dataset_id: str) -> None: + self.dataset_id = dataset_id @staticmethod - def from_dict(obj: Any) -> 'PartnerUserDeleteParams': + def from_dict(obj: Any) -> 'DatasetRecordCreateParams': assert isinstance(obj, dict) - user_id = from_str(obj.get("userId")) - return PartnerUserDeleteParams(user_id) + dataset_id = from_str(obj.get("datasetId")) + return DatasetRecordCreateParams(dataset_id) def to_dict(self) -> dict: result: dict = {} - result["userId"] = from_str(self.user_id) + result["datasetId"] = from_str(self.dataset_id) + return result + + +class DatasetRecordCreateRequest: + meta: Optional[Dict[str, Any]] + """Meta data information""" + + source: Optional[str] + """The source of the record""" + + text: str + """The text of the record""" + + def __init__(self, meta: Optional[Dict[str, Any]], source: Optional[str], text: str) -> None: + self.meta = meta + self.source = source + self.text = text + + @staticmethod + def from_dict(obj: Any) -> 'DatasetRecordCreateRequest': + assert isinstance(obj, dict) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + source = from_union([from_str, from_none], obj.get("source")) + text = from_str(obj.get("text")) + return DatasetRecordCreateRequest(meta, source, text) + + def to_dict(self) -> dict: + result: dict = {} + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.source is not None: + result["source"] = from_union([from_str, from_none], self.source) + result["text"] = from_str(self.text) return result -class PartnerUserDeleteResponse: +class DatasetRecordCreateResponse: id: str - """The ID of the deleted user""" + """The ID of the created record""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'PartnerUserDeleteResponse': + def from_dict(obj: Any) -> 'DatasetRecordCreateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return PartnerUserDeleteResponse(id) + return DatasetRecordCreateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -36702,119 +35736,252 @@ def to_dict(self) -> dict: return result -class PartnerUserFetchParams: - user_id: str - """The ID of the partner user to retrieve""" +class DatasetRecordUpdateParams: + dataset_id: str + record_id: str - def __init__(self, user_id: str) -> None: - self.user_id = user_id + def __init__(self, dataset_id: str, record_id: str) -> None: + self.dataset_id = dataset_id + self.record_id = record_id @staticmethod - def from_dict(obj: Any) -> 'PartnerUserFetchParams': + def from_dict(obj: Any) -> 'DatasetRecordUpdateParams': assert isinstance(obj, dict) - user_id = from_str(obj.get("userId")) - return PartnerUserFetchParams(user_id) + dataset_id = from_str(obj.get("datasetId")) + record_id = from_str(obj.get("recordId")) + return DatasetRecordUpdateParams(dataset_id, record_id) def to_dict(self) -> dict: result: dict = {} - result["userId"] = from_str(self.user_id) + result["datasetId"] = from_str(self.dataset_id) + result["recordId"] = from_str(self.record_id) return result -class PurpleDatabase: - """The database limits""" +class DatasetRecordUpdateRequest: + meta: Optional[Dict[str, Any]] + """Meta data information""" - abilities: Optional[float] - """The abilities limit""" + source: Optional[str] + """The source to update the record with""" - datasets: Optional[float] - """The datasets limit""" + text: Optional[str] + """The text to update the record with""" - files: Optional[float] - """The files limit""" + def __init__(self, meta: Optional[Dict[str, Any]], source: Optional[str], text: Optional[str]) -> None: + self.meta = meta + self.source = source + self.text = text - records: Optional[float] - """The records limit""" + @staticmethod + def from_dict(obj: Any) -> 'DatasetRecordUpdateRequest': + assert isinstance(obj, dict) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + source = from_union([from_str, from_none], obj.get("source")) + text = from_union([from_str, from_none], obj.get("text")) + return DatasetRecordUpdateRequest(meta, source, text) - skillsets: Optional[float] - """The skillsets limit""" + def to_dict(self) -> dict: + result: dict = {} + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.source is not None: + result["source"] = from_union([from_str, from_none], self.source) + if self.text is not None: + result["text"] = from_union([from_str, from_none], self.text) + return result - def __init__(self, abilities: Optional[float], datasets: Optional[float], files: Optional[float], records: Optional[float], skillsets: Optional[float]) -> None: - self.abilities = abilities - self.datasets = datasets - self.files = files - self.records = records - self.skillsets = skillsets + +class DatasetRecordUpdateResponse: + id: str + """The ID of the updated record""" + + def __init__(self, id: str) -> None: + self.id = id + + @staticmethod + def from_dict(obj: Any) -> 'DatasetRecordUpdateResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return DatasetRecordUpdateResponse(id) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result + + +class DatasetRecordFetchParams: + dataset_id: str + """The ID of the dataset""" + + record_id: str + """The ID of the record to retrieve""" + + def __init__(self, dataset_id: str, record_id: str) -> None: + self.dataset_id = dataset_id + self.record_id = record_id + + @staticmethod + def from_dict(obj: Any) -> 'DatasetRecordFetchParams': + assert isinstance(obj, dict) + dataset_id = from_str(obj.get("datasetId")) + record_id = from_str(obj.get("recordId")) + return DatasetRecordFetchParams(dataset_id, record_id) + + def to_dict(self) -> dict: + result: dict = {} + result["datasetId"] = from_str(self.dataset_id) + result["recordId"] = from_str(self.record_id) + return result + + +class DatasetRecordFetchResponse: + """Instance list properties""" + + created_at: float + """The timestamp (ms) when the instance was created""" + + id: str + """The instance ID""" + + source: Optional[str] + """The source of the dataset record""" + + text: str + """The text of the dataset record""" + + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, created_at: float, id: str, source: Optional[str], text: str, updated_at: float) -> None: + self.created_at = created_at + self.id = id + self.source = source + self.text = text + self.updated_at = updated_at + + @staticmethod + def from_dict(obj: Any) -> 'DatasetRecordFetchResponse': + assert isinstance(obj, dict) + created_at = from_float(obj.get("createdAt")) + id = from_str(obj.get("id")) + source = from_union([from_str, from_none], obj.get("source")) + text = from_str(obj.get("text")) + updated_at = from_float(obj.get("updatedAt")) + return DatasetRecordFetchResponse(created_at, id, source, text, updated_at) + + def to_dict(self) -> dict: + result: dict = {} + result["createdAt"] = to_float(self.created_at) + result["id"] = from_str(self.id) + if self.source is not None: + result["source"] = from_union([from_str, from_none], self.source) + result["text"] = from_str(self.text) + result["updatedAt"] = to_float(self.updated_at) + return result + + +class DatasetRecordDeleteParams: + dataset_id: str + """The ID of the dataset""" + + record_id: str + """The ID of the record to delete""" + + def __init__(self, dataset_id: str, record_id: str) -> None: + self.dataset_id = dataset_id + self.record_id = record_id + + @staticmethod + def from_dict(obj: Any) -> 'DatasetRecordDeleteParams': + assert isinstance(obj, dict) + dataset_id = from_str(obj.get("datasetId")) + record_id = from_str(obj.get("recordId")) + return DatasetRecordDeleteParams(dataset_id, record_id) + + def to_dict(self) -> dict: + result: dict = {} + result["datasetId"] = from_str(self.dataset_id) + result["recordId"] = from_str(self.record_id) + return result + + +class DatasetRecordDeleteResponse: + id: str + """The ID of the deleted record""" + + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'PurpleDatabase': + def from_dict(obj: Any) -> 'DatasetRecordDeleteResponse': assert isinstance(obj, dict) - abilities = from_union([from_float, from_none], obj.get("abilities")) - datasets = from_union([from_float, from_none], obj.get("datasets")) - files = from_union([from_float, from_none], obj.get("files")) - records = from_union([from_float, from_none], obj.get("records")) - skillsets = from_union([from_float, from_none], obj.get("skillsets")) - return PurpleDatabase(abilities, datasets, files, records, skillsets) + id = from_str(obj.get("id")) + return DatasetRecordDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} - if self.abilities is not None: - result["abilities"] = from_union([to_float, from_none], self.abilities) - if self.datasets is not None: - result["datasets"] = from_union([to_float, from_none], self.datasets) - if self.files is not None: - result["files"] = from_union([to_float, from_none], self.files) - if self.records is not None: - result["records"] = from_union([to_float, from_none], self.records) - if self.skillsets is not None: - result["skillsets"] = from_union([to_float, from_none], self.skillsets) + result["id"] = from_str(self.id) return result -class PartnerUserFetchResponseLimits: - """Limits information""" +class DatasetFileListParamsOrder(Enum): + """The order of the paginated items""" - conversations: Optional[float] - """The conversations limit""" + ASC = "asc" + DESC = "desc" - database: Optional[PurpleDatabase] - """The database limits""" - messages: Optional[float] - """The messages limit""" +class DatasetFileListParams: + cursor: Optional[str] + """The cursor to use for pagination""" - tokens: Optional[float] - """The tokens limit""" + dataset_id: str + """The ID of the dataset""" - def __init__(self, conversations: Optional[float], database: Optional[PurpleDatabase], messages: Optional[float], tokens: Optional[float]) -> None: - self.conversations = conversations - self.database = database - self.messages = messages - self.tokens = tokens + order: Optional[DatasetFileListParamsOrder] + """The order of the paginated items""" + + take: Optional[int] + """The number of items to retrieve""" + + def __init__(self, cursor: Optional[str], dataset_id: str, order: Optional[DatasetFileListParamsOrder], take: Optional[int]) -> None: + self.cursor = cursor + self.dataset_id = dataset_id + self.order = order + self.take = take @staticmethod - def from_dict(obj: Any) -> 'PartnerUserFetchResponseLimits': + def from_dict(obj: Any) -> 'DatasetFileListParams': assert isinstance(obj, dict) - conversations = from_union([from_float, from_none], obj.get("conversations")) - database = from_union([PurpleDatabase.from_dict, from_none], obj.get("database")) - messages = from_union([from_float, from_none], obj.get("messages")) - tokens = from_union([from_float, from_none], obj.get("tokens")) - return PartnerUserFetchResponseLimits(conversations, database, messages, tokens) + cursor = from_union([from_str, from_none], obj.get("cursor")) + dataset_id = from_str(obj.get("datasetId")) + order = from_union([DatasetFileListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return DatasetFileListParams(cursor, dataset_id, order, take) def to_dict(self) -> dict: result: dict = {} - if self.conversations is not None: - result["conversations"] = from_union([to_float, from_none], self.conversations) - if self.database is not None: - result["database"] = from_union([lambda x: to_class(PurpleDatabase, x), from_none], self.database) - if self.messages is not None: - result["messages"] = from_union([to_float, from_none], self.messages) - if self.tokens is not None: - result["tokens"] = from_union([to_float, from_none], self.tokens) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + result["datasetId"] = from_str(self.dataset_id) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(DatasetFileListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class PartnerUserFetchResponse: +class CunningVisibility(Enum): + """The file visibility""" + + PRIVATE = "private" + PROTECTED = "protected" + PUBLIC = "public" + + +class DatasetFileListResponseItem: """Instance list properties""" created_at: float @@ -36823,18 +35990,9 @@ class PartnerUserFetchResponse: description: Optional[str] """The associated description""" - email: Optional[str] - """The email of the partner user""" - id: str """The instance ID""" - image: Optional[str] - """The image of the partner user""" - - limits: Optional[PartnerUserFetchResponseLimits] - """Limits information""" - meta: Optional[Dict[str, Any]] """Meta data information""" @@ -36844,190 +36002,221 @@ class PartnerUserFetchResponse: updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, created_at: float, description: Optional[str], email: Optional[str], id: str, image: Optional[str], limits: Optional[PartnerUserFetchResponseLimits], meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: + visibility: Optional[CunningVisibility] + """The file visibility""" + + def __init__(self, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float, visibility: Optional[CunningVisibility]) -> None: self.created_at = created_at self.description = description - self.email = email self.id = id - self.image = image - self.limits = limits self.meta = meta self.name = name self.updated_at = updated_at + self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'PartnerUserFetchResponse': + def from_dict(obj: Any) -> 'DatasetFileListResponseItem': assert isinstance(obj, dict) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - email = from_union([from_str, from_none], obj.get("email")) id = from_str(obj.get("id")) - image = from_union([from_str, from_none], obj.get("image")) - limits = from_union([PartnerUserFetchResponseLimits.from_dict, from_none], obj.get("limits")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) updated_at = from_float(obj.get("updatedAt")) - return PartnerUserFetchResponse(created_at, description, email, id, image, limits, meta, name, updated_at) + visibility = from_union([CunningVisibility, from_none], obj.get("visibility")) + return DatasetFileListResponseItem(created_at, description, id, meta, name, updated_at, visibility) def to_dict(self) -> dict: result: dict = {} result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.email is not None: - result["email"] = from_union([from_str, from_none], self.email) result["id"] = from_str(self.id) - if self.image is not None: - result["image"] = from_union([from_str, from_none], self.image) - if self.limits is not None: - result["limits"] = from_union([lambda x: to_class(PartnerUserFetchResponseLimits, x), from_none], self.limits) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) result["updatedAt"] = to_float(self.updated_at) + if self.visibility is not None: + result["visibility"] = from_union([lambda x: to_enum(CunningVisibility, x), from_none], self.visibility) return result -class PartnerUserSessionCreateParams: - user_id: str - """The ID of the user""" +class DatasetFileListResponse: + cursor: str + """Cursor for fetching the next page""" - def __init__(self, user_id: str) -> None: - self.user_id = user_id + items: List[DatasetFileListResponseItem] + + def __init__(self, cursor: str, items: List[DatasetFileListResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'PartnerUserSessionCreateParams': + def from_dict(obj: Any) -> 'DatasetFileListResponse': assert isinstance(obj, dict) - user_id = from_str(obj.get("userId")) - return PartnerUserSessionCreateParams(user_id) + cursor = from_str(obj.get("cursor")) + items = from_list(DatasetFileListResponseItem.from_dict, obj.get("items")) + return DatasetFileListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["userId"] = from_str(self.user_id) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(DatasetFileListResponseItem, x), self.items) return result -class Config: - allowed_routes: Optional[List[str]] - """Glob patterns restricting which API routes the token may access""" +class MagentaVisibility(Enum): + """The file visibility""" - contact_id: Optional[str] - """Optional contact ID to include in the session token""" + PRIVATE = "private" + PROTECTED = "protected" + PUBLIC = "public" - def __init__(self, allowed_routes: Optional[List[str]], contact_id: Optional[str]) -> None: - self.allowed_routes = allowed_routes - self.contact_id = contact_id - @staticmethod - def from_dict(obj: Any) -> 'Config': - assert isinstance(obj, dict) - allowed_routes = from_union([lambda x: from_list(from_str, x), from_none], obj.get("allowedRoutes")) - contact_id = from_union([from_str, from_none], obj.get("contactId")) - return Config(allowed_routes, contact_id) +class DatasetFileListStreamItemData: + """Blueprint properties""" - def to_dict(self) -> dict: - result: dict = {} - if self.allowed_routes is not None: - result["allowedRoutes"] = from_union([lambda x: from_list(from_str, x), from_none], self.allowed_routes) - if self.contact_id is not None: - result["contactId"] = from_union([from_str, from_none], self.contact_id) - return result + alias: Optional[str] + """The unique alias for the instance""" + blueprint_id: Optional[str] + """The ID of the blueprint""" -class PartnerUserSessionCreateRequest: - config: Optional[Config] - duration_in_seconds: Optional[float] - """The lifetime of the session token in seconds""" + created_at: float + """The timestamp (ms) when the instance was created""" - def __init__(self, config: Optional[Config], duration_in_seconds: Optional[float]) -> None: - self.config = config - self.duration_in_seconds = duration_in_seconds + description: Optional[str] + """The associated description""" + + id: str + """The instance ID""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" + + name: Optional[str] + """The associated name""" + + updated_at: float + """The timestamp (ms) when the instance was updated""" + + visibility: Optional[MagentaVisibility] + """The file visibility""" + + def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float, visibility: Optional[MagentaVisibility]) -> None: + self.alias = alias + self.blueprint_id = blueprint_id + self.created_at = created_at + self.description = description + self.id = id + self.meta = meta + self.name = name + self.updated_at = updated_at + self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'PartnerUserSessionCreateRequest': + def from_dict(obj: Any) -> 'DatasetFileListStreamItemData': assert isinstance(obj, dict) - config = from_union([Config.from_dict, from_none], obj.get("config")) - duration_in_seconds = from_union([from_float, from_none], obj.get("durationInSeconds")) - return PartnerUserSessionCreateRequest(config, duration_in_seconds) + alias = from_union([from_str, from_none], obj.get("alias")) + blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + created_at = from_float(obj.get("createdAt")) + description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + updated_at = from_float(obj.get("updatedAt")) + visibility = from_union([MagentaVisibility, from_none], obj.get("visibility")) + return DatasetFileListStreamItemData(alias, blueprint_id, created_at, description, id, meta, name, updated_at, visibility) def to_dict(self) -> dict: result: dict = {} - if self.config is not None: - result["config"] = from_union([lambda x: to_class(Config, x), from_none], self.config) - if self.duration_in_seconds is not None: - result["durationInSeconds"] = from_union([to_float, from_none], self.duration_in_seconds) + if self.alias is not None: + result["alias"] = from_union([from_str, from_none], self.alias) + if self.blueprint_id is not None: + result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + result["createdAt"] = to_float(self.created_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + result["updatedAt"] = to_float(self.updated_at) + if self.visibility is not None: + result["visibility"] = from_union([lambda x: to_enum(MagentaVisibility, x), from_none], self.visibility) return result -class PartnerUserSessionCreateResponse: - expires_at: float - """The timestamp for when the session token expires (in milliseconds)""" +class DatasetFileListStreamItemType(Enum): + """The type of event""" - id: str - """The ID of the created session""" + ITEM = "item" - token: str - """The temporary session token""" - def __init__(self, expires_at: float, id: str, token: str) -> None: - self.expires_at = expires_at - self.id = id - self.token = token +class DatasetFileListStreamItem: + data: DatasetFileListStreamItemData + """Blueprint properties""" + + type: DatasetFileListStreamItemType + """The type of event""" + + def __init__(self, data: DatasetFileListStreamItemData, type: DatasetFileListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'PartnerUserSessionCreateResponse': + def from_dict(obj: Any) -> 'DatasetFileListStreamItem': assert isinstance(obj, dict) - expires_at = from_float(obj.get("expiresAt")) - id = from_str(obj.get("id")) - token = from_str(obj.get("token")) - return PartnerUserSessionCreateResponse(expires_at, id, token) + data = DatasetFileListStreamItemData.from_dict(obj.get("data")) + type = DatasetFileListStreamItemType(obj.get("type")) + return DatasetFileListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["expiresAt"] = to_float(self.expires_at) - result["id"] = from_str(self.id) - result["token"] = from_str(self.token) + result["data"] = to_class(DatasetFileListStreamItemData, self.data) + result["type"] = to_enum(DatasetFileListStreamItemType, self.type) return result -class PartnerUserTokenDeleteParams: - token_id: str - """The ID of the user token to delete""" +class DatasetFileSyncParams: + dataset_id: str + """The ID of the dataset""" - user_id: str - """The ID of the user""" + file_id: str + """The ID of the file""" - def __init__(self, token_id: str, user_id: str) -> None: - self.token_id = token_id - self.user_id = user_id + def __init__(self, dataset_id: str, file_id: str) -> None: + self.dataset_id = dataset_id + self.file_id = file_id @staticmethod - def from_dict(obj: Any) -> 'PartnerUserTokenDeleteParams': + def from_dict(obj: Any) -> 'DatasetFileSyncParams': assert isinstance(obj, dict) - token_id = from_str(obj.get("tokenId")) - user_id = from_str(obj.get("userId")) - return PartnerUserTokenDeleteParams(token_id, user_id) + dataset_id = from_str(obj.get("datasetId")) + file_id = from_str(obj.get("fileId")) + return DatasetFileSyncParams(dataset_id, file_id) def to_dict(self) -> dict: result: dict = {} - result["tokenId"] = from_str(self.token_id) - result["userId"] = from_str(self.user_id) + result["datasetId"] = from_str(self.dataset_id) + result["fileId"] = from_str(self.file_id) return result -class PartnerUserTokenDeleteResponse: +class DatasetFileSyncResponse: id: str - """The ID of the deleted user token""" + """The ID of the dataset file""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'PartnerUserTokenDeleteResponse': + def from_dict(obj: Any) -> 'DatasetFileSyncResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return PartnerUserTokenDeleteResponse(id) + return DatasetFileSyncResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -37035,84 +36224,63 @@ def to_dict(self) -> dict: return result -class PartnerUserTokenUpdateParams: - token_id: str - """The ID of the user token to update""" +class DatasetFileDetachParams: + dataset_id: str + """The ID of the dataset""" - user_id: str - """The ID of the user""" + file_id: str + """The ID of the file""" - def __init__(self, token_id: str, user_id: str) -> None: - self.token_id = token_id - self.user_id = user_id + def __init__(self, dataset_id: str, file_id: str) -> None: + self.dataset_id = dataset_id + self.file_id = file_id @staticmethod - def from_dict(obj: Any) -> 'PartnerUserTokenUpdateParams': + def from_dict(obj: Any) -> 'DatasetFileDetachParams': assert isinstance(obj, dict) - token_id = from_str(obj.get("tokenId")) - user_id = from_str(obj.get("userId")) - return PartnerUserTokenUpdateParams(token_id, user_id) + dataset_id = from_str(obj.get("datasetId")) + file_id = from_str(obj.get("fileId")) + return DatasetFileDetachParams(dataset_id, file_id) def to_dict(self) -> dict: result: dict = {} - result["tokenId"] = from_str(self.token_id) - result["userId"] = from_str(self.user_id) + result["datasetId"] = from_str(self.dataset_id) + result["fileId"] = from_str(self.file_id) return result -class PartnerUserTokenUpdateRequest: - config: Optional[Dict[str, Any]] - """Token configuration""" - - description: Optional[str] - """The description of the token""" - - meta: Optional[Dict[str, Any]] - """Custom metadata for the token""" - - name: Optional[str] - """The name of the token""" +class DatasetFileDetachRequest: + delete_records: Optional[bool] + """Delete records associated with the file""" - def __init__(self, config: Optional[Dict[str, Any]], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str]) -> None: - self.config = config - self.description = description - self.meta = meta - self.name = name + def __init__(self, delete_records: Optional[bool]) -> None: + self.delete_records = delete_records @staticmethod - def from_dict(obj: Any) -> 'PartnerUserTokenUpdateRequest': + def from_dict(obj: Any) -> 'DatasetFileDetachRequest': assert isinstance(obj, dict) - config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) - description = from_union([from_str, from_none], obj.get("description")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - return PartnerUserTokenUpdateRequest(config, description, meta, name) + delete_records = from_union([from_bool, from_none], obj.get("deleteRecords")) + return DatasetFileDetachRequest(delete_records) def to_dict(self) -> dict: result: dict = {} - if self.config is not None: - result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) + if self.delete_records is not None: + result["deleteRecords"] = from_union([from_bool, from_none], self.delete_records) return result -class PartnerUserTokenUpdateResponse: +class DatasetFileDetachResponse: id: str - """The ID of the updated user token""" + """The ID of the dataset file""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'PartnerUserTokenUpdateResponse': + def from_dict(obj: Any) -> 'DatasetFileDetachResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return PartnerUserTokenUpdateResponse(id) + return DatasetFileDetachResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -37120,146 +36288,131 @@ def to_dict(self) -> dict: return result -class PartnerUserTokenCreateParams: - user_id: str - """The ID of the user""" +class DatasetFileAttachParams: + dataset_id: str + """The ID of the dataset""" - def __init__(self, user_id: str) -> None: - self.user_id = user_id + file_id: str + """The ID of the file""" + + def __init__(self, dataset_id: str, file_id: str) -> None: + self.dataset_id = dataset_id + self.file_id = file_id @staticmethod - def from_dict(obj: Any) -> 'PartnerUserTokenCreateParams': + def from_dict(obj: Any) -> 'DatasetFileAttachParams': assert isinstance(obj, dict) - user_id = from_str(obj.get("userId")) - return PartnerUserTokenCreateParams(user_id) + dataset_id = from_str(obj.get("datasetId")) + file_id = from_str(obj.get("fileId")) + return DatasetFileAttachParams(dataset_id, file_id) def to_dict(self) -> dict: result: dict = {} - result["userId"] = from_str(self.user_id) + result["datasetId"] = from_str(self.dataset_id) + result["fileId"] = from_str(self.file_id) return result -class PartnerUserTokenCreateRequest: - config: Optional[Dict[str, Any]] - """Token configuration""" +class DatasetFileAttachRequestType(Enum): + """The dataset file attachment type""" - description: Optional[str] - """The description of the token""" + SOURCE = "source" - meta: Optional[Dict[str, Any]] - """Custom metadata for the token""" - name: Optional[str] - """The name of the token""" +class DatasetFileAttachRequest: + type: Optional[DatasetFileAttachRequestType] + """The dataset file attachment type""" - def __init__(self, config: Optional[Dict[str, Any]], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str]) -> None: - self.config = config - self.description = description - self.meta = meta - self.name = name + def __init__(self, type: Optional[DatasetFileAttachRequestType]) -> None: + self.type = type @staticmethod - def from_dict(obj: Any) -> 'PartnerUserTokenCreateRequest': + def from_dict(obj: Any) -> 'DatasetFileAttachRequest': assert isinstance(obj, dict) - config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) - description = from_union([from_str, from_none], obj.get("description")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - return PartnerUserTokenCreateRequest(config, description, meta, name) + type = from_union([DatasetFileAttachRequestType, from_none], obj.get("type")) + return DatasetFileAttachRequest(type) def to_dict(self) -> dict: result: dict = {} - if self.config is not None: - result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) + if self.type is not None: + result["type"] = from_union([lambda x: to_enum(DatasetFileAttachRequestType, x), from_none], self.type) return result -class PartnerUserTokenCreateResponse: - created_at: float - """The timestamp for when the user token was created (in milliseconds)""" - +class DatasetFileAttachResponse: id: str - """The ID of the created user token""" - - token: str - """The token of the created user token""" + """The ID of the dataset file""" - def __init__(self, created_at: float, id: str, token: str) -> None: - self.created_at = created_at + def __init__(self, id: str) -> None: self.id = id - self.token = token @staticmethod - def from_dict(obj: Any) -> 'PartnerUserTokenCreateResponse': + def from_dict(obj: Any) -> 'DatasetFileAttachResponse': assert isinstance(obj, dict) - created_at = from_float(obj.get("createdAt")) id = from_str(obj.get("id")) - token = from_str(obj.get("token")) - return PartnerUserTokenCreateResponse(created_at, id, token) + return DatasetFileAttachResponse(id) def to_dict(self) -> dict: result: dict = {} - result["createdAt"] = to_float(self.created_at) result["id"] = from_str(self.id) - result["token"] = from_str(self.token) return result -class PartnerUserTokenListParamsOrder(Enum): +class ConversationListParamsOrder(Enum): """The order of the paginated items""" ASC = "asc" DESC = "desc" -class PartnerUserTokenListParams: +class ConversationListParams: cursor: Optional[str] """The cursor to use for pagination""" - order: Optional[PartnerUserTokenListParamsOrder] + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" + + order: Optional[ConversationListParamsOrder] """The order of the paginated items""" take: Optional[int] """The number of items to retrieve""" - user_id: str - """The ID of the user""" - - def __init__(self, cursor: Optional[str], order: Optional[PartnerUserTokenListParamsOrder], take: Optional[int], user_id: str) -> None: + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[ConversationListParamsOrder], take: Optional[int]) -> None: self.cursor = cursor + self.meta = meta self.order = order self.take = take - self.user_id = user_id @staticmethod - def from_dict(obj: Any) -> 'PartnerUserTokenListParams': + def from_dict(obj: Any) -> 'ConversationListParams': assert isinstance(obj, dict) cursor = from_union([from_str, from_none], obj.get("cursor")) - order = from_union([PartnerUserTokenListParamsOrder, from_none], obj.get("order")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([ConversationListParamsOrder, from_none], obj.get("order")) take = from_union([from_int, from_none], obj.get("take")) - user_id = from_str(obj.get("userId")) - return PartnerUserTokenListParams(cursor, order, take, user_id) + return ConversationListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} if self.cursor is not None: result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(PartnerUserTokenListParamsOrder, x), from_none], self.order) + result["order"] = from_union([lambda x: to_enum(ConversationListParamsOrder, x), from_none], self.order) if self.take is not None: result["take"] = from_union([from_int, from_none], self.take) - result["userId"] = from_str(self.user_id) return result -class PartnerUserTokenListResponseItem: - """Instance list properties""" +class ConversationListResponseItem: + """A bot configuration or reference + + A bot configuration that can be applied without a dedicated bot instance. + """ + contact_id: Optional[str] + """The contact id assigned to this conversation""" created_at: float """The timestamp (ms) when the instance was created""" @@ -37267,6 +36420,9 @@ class PartnerUserTokenListResponseItem: description: Optional[str] """The associated description""" + expires_at: Optional[float] + """The timestamp (ms) at which the conversation expires and is automatically deleted""" + id: str """The instance ID""" @@ -37276,68 +36432,144 @@ class PartnerUserTokenListResponseItem: name: Optional[str] """The associated name""" + space_id: Optional[str] + """The space id assigned to this conversation""" + + task_id: Optional[str] + """The task id assigned to this conversation""" + updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: + bot_id: Optional[str] + """The ID of the bot this configuration is using""" + + backstory: Optional[str] + """The backstory this configuration is using""" + + dataset_id: Optional[str] + """The id of the dataset this configuration is using""" + + model: Optional[str] + """A model definition""" + + moderation: Optional[bool] + """The moderation flag for this configuration""" + + privacy: Optional[bool] + """The privacy flag for this configuration""" + + skillset_id: Optional[str] + """The id of the skillset this configuration is using""" + + def __init__(self, contact_id: Optional[str], created_at: float, description: Optional[str], expires_at: Optional[float], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], space_id: Optional[str], task_id: Optional[str], updated_at: float, bot_id: Optional[str], backstory: Optional[str], dataset_id: Optional[str], model: Optional[str], moderation: Optional[bool], privacy: Optional[bool], skillset_id: Optional[str]) -> None: + self.contact_id = contact_id self.created_at = created_at self.description = description + self.expires_at = expires_at self.id = id self.meta = meta self.name = name + self.space_id = space_id + self.task_id = task_id self.updated_at = updated_at + self.bot_id = bot_id + self.backstory = backstory + self.dataset_id = dataset_id + self.model = model + self.moderation = moderation + self.privacy = privacy + self.skillset_id = skillset_id @staticmethod - def from_dict(obj: Any) -> 'PartnerUserTokenListResponseItem': + def from_dict(obj: Any) -> 'ConversationListResponseItem': assert isinstance(obj, dict) + contact_id = from_union([from_str, from_none], obj.get("contactId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + expires_at = from_union([from_float, from_none], obj.get("expiresAt")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) + space_id = from_union([from_str, from_none], obj.get("spaceId")) + task_id = from_union([from_str, from_none], obj.get("taskId")) updated_at = from_float(obj.get("updatedAt")) - return PartnerUserTokenListResponseItem(created_at, description, id, meta, name, updated_at) + bot_id = from_union([from_str, from_none], obj.get("botId")) + backstory = from_union([from_str, from_none], obj.get("backstory")) + dataset_id = from_union([from_str, from_none], obj.get("datasetId")) + model = from_union([from_str, from_none], obj.get("model")) + moderation = from_union([from_bool, from_none], obj.get("moderation")) + privacy = from_union([from_bool, from_none], obj.get("privacy")) + skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + return ConversationListResponseItem(contact_id, created_at, description, expires_at, id, meta, name, space_id, task_id, updated_at, bot_id, backstory, dataset_id, model, moderation, privacy, skillset_id) def to_dict(self) -> dict: result: dict = {} + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.expires_at is not None: + result["expiresAt"] = from_union([to_float, from_none], self.expires_at) result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.space_id is not None: + result["spaceId"] = from_union([from_str, from_none], self.space_id) + if self.task_id is not None: + result["taskId"] = from_union([from_str, from_none], self.task_id) result["updatedAt"] = to_float(self.updated_at) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.backstory is not None: + result["backstory"] = from_union([from_str, from_none], self.backstory) + if self.dataset_id is not None: + result["datasetId"] = from_union([from_str, from_none], self.dataset_id) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) + if self.moderation is not None: + result["moderation"] = from_union([from_bool, from_none], self.moderation) + if self.privacy is not None: + result["privacy"] = from_union([from_bool, from_none], self.privacy) + if self.skillset_id is not None: + result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) return result -class PartnerUserTokenListResponse: +class ConversationListResponse: cursor: str """Cursor for fetching the next page""" - items: List[PartnerUserTokenListResponseItem] + items: List[ConversationListResponseItem] - def __init__(self, cursor: str, items: List[PartnerUserTokenListResponseItem]) -> None: + def __init__(self, cursor: str, items: List[ConversationListResponseItem]) -> None: self.cursor = cursor self.items = items @staticmethod - def from_dict(obj: Any) -> 'PartnerUserTokenListResponse': + def from_dict(obj: Any) -> 'ConversationListResponse': assert isinstance(obj, dict) cursor = from_str(obj.get("cursor")) - items = from_list(PartnerUserTokenListResponseItem.from_dict, obj.get("items")) - return PartnerUserTokenListResponse(cursor, items) + items = from_list(ConversationListResponseItem.from_dict, obj.get("items")) + return ConversationListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(PartnerUserTokenListResponseItem, x), self.items) + result["items"] = from_list(lambda x: to_class(ConversationListResponseItem, x), self.items) return result -class PartnerUserTokenListStreamItemData: - """Instance list properties""" +class ConversationListStreamItemData: + """A bot configuration or reference + + A bot configuration that can be applied without a dedicated bot instance. + """ + contact_id: Optional[str] + """The contact id assigned to this conversation""" created_at: float """The timestamp (ms) when the instance was created""" @@ -37345,6 +36577,9 @@ class PartnerUserTokenListStreamItemData: description: Optional[str] """The associated description""" + expires_at: Optional[float] + """The timestamp (ms) at which the conversation expires and is automatically deleted""" + id: str """The instance ID""" @@ -37354,202 +36589,208 @@ class PartnerUserTokenListStreamItemData: name: Optional[str] """The associated name""" + space_id: Optional[str] + """The space id assigned to this conversation""" + + task_id: Optional[str] + """The task id assigned to this conversation""" + updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: + bot_id: Optional[str] + """The ID of the bot this configuration is using""" + + backstory: Optional[str] + """The backstory this configuration is using""" + + dataset_id: Optional[str] + """The id of the dataset this configuration is using""" + + model: Optional[str] + """A model definition""" + + moderation: Optional[bool] + """The moderation flag for this configuration""" + + privacy: Optional[bool] + """The privacy flag for this configuration""" + + skillset_id: Optional[str] + """The id of the skillset this configuration is using""" + + def __init__(self, contact_id: Optional[str], created_at: float, description: Optional[str], expires_at: Optional[float], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], space_id: Optional[str], task_id: Optional[str], updated_at: float, bot_id: Optional[str], backstory: Optional[str], dataset_id: Optional[str], model: Optional[str], moderation: Optional[bool], privacy: Optional[bool], skillset_id: Optional[str]) -> None: + self.contact_id = contact_id self.created_at = created_at self.description = description + self.expires_at = expires_at self.id = id self.meta = meta self.name = name + self.space_id = space_id + self.task_id = task_id self.updated_at = updated_at + self.bot_id = bot_id + self.backstory = backstory + self.dataset_id = dataset_id + self.model = model + self.moderation = moderation + self.privacy = privacy + self.skillset_id = skillset_id @staticmethod - def from_dict(obj: Any) -> 'PartnerUserTokenListStreamItemData': + def from_dict(obj: Any) -> 'ConversationListStreamItemData': assert isinstance(obj, dict) + contact_id = from_union([from_str, from_none], obj.get("contactId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + expires_at = from_union([from_float, from_none], obj.get("expiresAt")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) + space_id = from_union([from_str, from_none], obj.get("spaceId")) + task_id = from_union([from_str, from_none], obj.get("taskId")) updated_at = from_float(obj.get("updatedAt")) - return PartnerUserTokenListStreamItemData(created_at, description, id, meta, name, updated_at) + bot_id = from_union([from_str, from_none], obj.get("botId")) + backstory = from_union([from_str, from_none], obj.get("backstory")) + dataset_id = from_union([from_str, from_none], obj.get("datasetId")) + model = from_union([from_str, from_none], obj.get("model")) + moderation = from_union([from_bool, from_none], obj.get("moderation")) + privacy = from_union([from_bool, from_none], obj.get("privacy")) + skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + return ConversationListStreamItemData(contact_id, created_at, description, expires_at, id, meta, name, space_id, task_id, updated_at, bot_id, backstory, dataset_id, model, moderation, privacy, skillset_id) def to_dict(self) -> dict: result: dict = {} + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.expires_at is not None: + result["expiresAt"] = from_union([to_float, from_none], self.expires_at) result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.space_id is not None: + result["spaceId"] = from_union([from_str, from_none], self.space_id) + if self.task_id is not None: + result["taskId"] = from_union([from_str, from_none], self.task_id) result["updatedAt"] = to_float(self.updated_at) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.backstory is not None: + result["backstory"] = from_union([from_str, from_none], self.backstory) + if self.dataset_id is not None: + result["datasetId"] = from_union([from_str, from_none], self.dataset_id) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) + if self.moderation is not None: + result["moderation"] = from_union([from_bool, from_none], self.moderation) + if self.privacy is not None: + result["privacy"] = from_union([from_bool, from_none], self.privacy) + if self.skillset_id is not None: + result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) return result -class PartnerUserTokenListStreamItemType(Enum): +class ConversationListStreamItemType(Enum): """The type of event""" ITEM = "item" -class PartnerUserTokenListStreamItem: - data: PartnerUserTokenListStreamItemData - """Instance list properties""" +class ConversationListStreamItem: + data: ConversationListStreamItemData + """A bot configuration or reference""" - type: PartnerUserTokenListStreamItemType + type: ConversationListStreamItemType """The type of event""" - def __init__(self, data: PartnerUserTokenListStreamItemData, type: PartnerUserTokenListStreamItemType) -> None: + def __init__(self, data: ConversationListStreamItemData, type: ConversationListStreamItemType) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'PartnerUserTokenListStreamItem': - assert isinstance(obj, dict) - data = PartnerUserTokenListStreamItemData.from_dict(obj.get("data")) - type = PartnerUserTokenListStreamItemType(obj.get("type")) - return PartnerUserTokenListStreamItem(data, type) - - def to_dict(self) -> dict: - result: dict = {} - result["data"] = to_class(PartnerUserTokenListStreamItemData, self.data) - result["type"] = to_enum(PartnerUserTokenListStreamItemType, self.type) - return result - - -class PartnerUserUpdateParams: - user_id: str - """The ID of the partner user""" - - def __init__(self, user_id: str) -> None: - self.user_id = user_id - - @staticmethod - def from_dict(obj: Any) -> 'PartnerUserUpdateParams': + def from_dict(obj: Any) -> 'ConversationListStreamItem': assert isinstance(obj, dict) - user_id = from_str(obj.get("userId")) - return PartnerUserUpdateParams(user_id) + data = ConversationListStreamItemData.from_dict(obj.get("data")) + type = ConversationListStreamItemType(obj.get("type")) + return ConversationListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["userId"] = from_str(self.user_id) + result["data"] = to_class(ConversationListStreamItemData, self.data) + result["type"] = to_enum(ConversationListStreamItemType, self.type) return result -class FluffyDatabase: - """The database limits""" - - abilities: Optional[float] - """The abilities limit""" - - datasets: Optional[float] - """The datasets limit""" - - files: Optional[float] - """The files limit""" - - records: Optional[float] - """The records limit""" - - skillsets: Optional[float] - """The skillsets limit""" - - def __init__(self, abilities: Optional[float], datasets: Optional[float], files: Optional[float], records: Optional[float], skillsets: Optional[float]) -> None: - self.abilities = abilities - self.datasets = datasets - self.files = files - self.records = records - self.skillsets = skillsets - - @staticmethod - def from_dict(obj: Any) -> 'FluffyDatabase': - assert isinstance(obj, dict) - abilities = from_union([from_float, from_none], obj.get("abilities")) - datasets = from_union([from_float, from_none], obj.get("datasets")) - files = from_union([from_float, from_none], obj.get("files")) - records = from_union([from_float, from_none], obj.get("records")) - skillsets = from_union([from_float, from_none], obj.get("skillsets")) - return FluffyDatabase(abilities, datasets, files, records, skillsets) - - def to_dict(self) -> dict: - result: dict = {} - if self.abilities is not None: - result["abilities"] = from_union([to_float, from_none], self.abilities) - if self.datasets is not None: - result["datasets"] = from_union([to_float, from_none], self.datasets) - if self.files is not None: - result["files"] = from_union([to_float, from_none], self.files) - if self.records is not None: - result["records"] = from_union([to_float, from_none], self.records) - if self.skillsets is not None: - result["skillsets"] = from_union([to_float, from_none], self.skillsets) - return result +class ConversationsExportParamsOrder(Enum): + """The order of the paginated items""" + ASC = "asc" + DESC = "desc" -class PartnerUserUpdateRequestLimits: - """Limits information""" - conversations: Optional[float] - """The conversations limit""" +class ConversationsExportParams: + cursor: Optional[str] + """The cursor to use for pagination""" - database: Optional[FluffyDatabase] - """The database limits""" + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" - messages: Optional[float] - """The messages limit""" + order: Optional[ConversationsExportParamsOrder] + """The order of the paginated items""" - tokens: Optional[float] - """The tokens limit""" + take: Optional[int] + """The number of items to retrieve""" - def __init__(self, conversations: Optional[float], database: Optional[FluffyDatabase], messages: Optional[float], tokens: Optional[float]) -> None: - self.conversations = conversations - self.database = database - self.messages = messages - self.tokens = tokens + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[ConversationsExportParamsOrder], take: Optional[int]) -> None: + self.cursor = cursor + self.meta = meta + self.order = order + self.take = take @staticmethod - def from_dict(obj: Any) -> 'PartnerUserUpdateRequestLimits': + def from_dict(obj: Any) -> 'ConversationsExportParams': assert isinstance(obj, dict) - conversations = from_union([from_float, from_none], obj.get("conversations")) - database = from_union([FluffyDatabase.from_dict, from_none], obj.get("database")) - messages = from_union([from_float, from_none], obj.get("messages")) - tokens = from_union([from_float, from_none], obj.get("tokens")) - return PartnerUserUpdateRequestLimits(conversations, database, messages, tokens) + cursor = from_union([from_str, from_none], obj.get("cursor")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([ConversationsExportParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return ConversationsExportParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} - if self.conversations is not None: - result["conversations"] = from_union([to_float, from_none], self.conversations) - if self.database is not None: - result["database"] = from_union([lambda x: to_class(FluffyDatabase, x), from_none], self.database) - if self.messages is not None: - result["messages"] = from_union([to_float, from_none], self.messages) - if self.tokens is not None: - result["tokens"] = from_union([to_float, from_none], self.tokens) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(ConversationsExportParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class PartnerUserUpdateRequest: - """Instance crud properties""" +class ConversationsExportResponseItem: + """A bot configuration or reference + + A bot configuration that can be applied without a dedicated bot instance. + """ + contact_id: Optional[str] + """The contact id assigned to this conversation""" - alias: Optional[str] - """The unique alias for the instance""" + created_at: float + """The timestamp (ms) when the instance was created""" description: Optional[str] """The associated description""" - email: Optional[str] - """The email of the partner user""" - - image: Optional[str] - """The image of the partner user""" - - limits: Optional[PartnerUserUpdateRequestLimits] - """Limits information""" + id: str + """The instance ID""" meta: Optional[Dict[str, Any]] """Meta data information""" @@ -37557,740 +36798,623 @@ class PartnerUserUpdateRequest: name: Optional[str] """The associated name""" - def __init__(self, alias: Optional[str], description: Optional[str], email: Optional[str], image: Optional[str], limits: Optional[PartnerUserUpdateRequestLimits], meta: Optional[Dict[str, Any]], name: Optional[str]) -> None: - self.alias = alias - self.description = description - self.email = email - self.image = image - self.limits = limits - self.meta = meta - self.name = name - - @staticmethod - def from_dict(obj: Any) -> 'PartnerUserUpdateRequest': - assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - description = from_union([from_str, from_none], obj.get("description")) - email = from_union([from_str, from_none], obj.get("email")) - image = from_union([from_str, from_none], obj.get("image")) - limits = from_union([PartnerUserUpdateRequestLimits.from_dict, from_none], obj.get("limits")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - return PartnerUserUpdateRequest(alias, description, email, image, limits, meta, name) - - def to_dict(self) -> dict: - result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.email is not None: - result["email"] = from_union([from_str, from_none], self.email) - if self.image is not None: - result["image"] = from_union([from_str, from_none], self.image) - if self.limits is not None: - result["limits"] = from_union([lambda x: to_class(PartnerUserUpdateRequestLimits, x), from_none], self.limits) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - return result - - -class PartnerUserUpdateResponse: - id: str - """The ID of the updated partner user""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'PartnerUserUpdateResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return PartnerUserUpdateResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - - -class TentacledDatabase: - """The database limits""" - - abilities: Optional[float] - """The abilities limit""" - - datasets: Optional[float] - """The datasets limit""" - - files: Optional[float] - """The files limit""" - - records: Optional[float] - """The records limit""" - - skillsets: Optional[float] - """The skillsets limit""" - - def __init__(self, abilities: Optional[float], datasets: Optional[float], files: Optional[float], records: Optional[float], skillsets: Optional[float]) -> None: - self.abilities = abilities - self.datasets = datasets - self.files = files - self.records = records - self.skillsets = skillsets - - @staticmethod - def from_dict(obj: Any) -> 'TentacledDatabase': - assert isinstance(obj, dict) - abilities = from_union([from_float, from_none], obj.get("abilities")) - datasets = from_union([from_float, from_none], obj.get("datasets")) - files = from_union([from_float, from_none], obj.get("files")) - records = from_union([from_float, from_none], obj.get("records")) - skillsets = from_union([from_float, from_none], obj.get("skillsets")) - return TentacledDatabase(abilities, datasets, files, records, skillsets) - - def to_dict(self) -> dict: - result: dict = {} - if self.abilities is not None: - result["abilities"] = from_union([to_float, from_none], self.abilities) - if self.datasets is not None: - result["datasets"] = from_union([to_float, from_none], self.datasets) - if self.files is not None: - result["files"] = from_union([to_float, from_none], self.files) - if self.records is not None: - result["records"] = from_union([to_float, from_none], self.records) - if self.skillsets is not None: - result["skillsets"] = from_union([to_float, from_none], self.skillsets) - return result - - -class PartnerUserCreateRequestLimits: - """Limits information""" - - conversations: Optional[float] - """The conversations limit""" - - database: Optional[TentacledDatabase] - """The database limits""" - - messages: Optional[float] - """The messages limit""" - - tokens: Optional[float] - """The tokens limit""" - - def __init__(self, conversations: Optional[float], database: Optional[TentacledDatabase], messages: Optional[float], tokens: Optional[float]) -> None: - self.conversations = conversations - self.database = database - self.messages = messages - self.tokens = tokens - - @staticmethod - def from_dict(obj: Any) -> 'PartnerUserCreateRequestLimits': - assert isinstance(obj, dict) - conversations = from_union([from_float, from_none], obj.get("conversations")) - database = from_union([TentacledDatabase.from_dict, from_none], obj.get("database")) - messages = from_union([from_float, from_none], obj.get("messages")) - tokens = from_union([from_float, from_none], obj.get("tokens")) - return PartnerUserCreateRequestLimits(conversations, database, messages, tokens) - - def to_dict(self) -> dict: - result: dict = {} - if self.conversations is not None: - result["conversations"] = from_union([to_float, from_none], self.conversations) - if self.database is not None: - result["database"] = from_union([lambda x: to_class(TentacledDatabase, x), from_none], self.database) - if self.messages is not None: - result["messages"] = from_union([to_float, from_none], self.messages) - if self.tokens is not None: - result["tokens"] = from_union([to_float, from_none], self.tokens) - return result + space_id: Optional[str] + """The space id assigned to this conversation""" + task_id: Optional[str] + """The task id assigned to this conversation""" -class PartnerUserCreateRequest: - """Instance crud properties""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - alias: Optional[str] - """The unique alias for the instance""" + bot_id: Optional[str] + """The ID of the bot this configuration is using""" - description: Optional[str] - """The associated description""" + backstory: Optional[str] + """The backstory this configuration is using""" - email: Optional[str] - """The email of the partner user""" + dataset_id: Optional[str] + """The id of the dataset this configuration is using""" - image: Optional[str] - """The image of the partner user""" + model: Optional[str] + """A model definition""" - limits: Optional[PartnerUserCreateRequestLimits] - """Limits information""" + moderation: Optional[bool] + """The moderation flag for this configuration""" - meta: Optional[Dict[str, Any]] - """Meta data information""" + privacy: Optional[bool] + """The privacy flag for this configuration""" - name: Optional[str] - """The associated name""" + skillset_id: Optional[str] + """The id of the skillset this configuration is using""" - def __init__(self, alias: Optional[str], description: Optional[str], email: Optional[str], image: Optional[str], limits: Optional[PartnerUserCreateRequestLimits], meta: Optional[Dict[str, Any]], name: Optional[str]) -> None: - self.alias = alias + def __init__(self, contact_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], space_id: Optional[str], task_id: Optional[str], updated_at: float, bot_id: Optional[str], backstory: Optional[str], dataset_id: Optional[str], model: Optional[str], moderation: Optional[bool], privacy: Optional[bool], skillset_id: Optional[str]) -> None: + self.contact_id = contact_id + self.created_at = created_at self.description = description - self.email = email - self.image = image - self.limits = limits + self.id = id self.meta = meta self.name = name + self.space_id = space_id + self.task_id = task_id + self.updated_at = updated_at + self.bot_id = bot_id + self.backstory = backstory + self.dataset_id = dataset_id + self.model = model + self.moderation = moderation + self.privacy = privacy + self.skillset_id = skillset_id @staticmethod - def from_dict(obj: Any) -> 'PartnerUserCreateRequest': + def from_dict(obj: Any) -> 'ConversationsExportResponseItem': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - email = from_union([from_str, from_none], obj.get("email")) - image = from_union([from_str, from_none], obj.get("image")) - limits = from_union([PartnerUserCreateRequestLimits.from_dict, from_none], obj.get("limits")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - return PartnerUserCreateRequest(alias, description, email, image, limits, meta, name) + space_id = from_union([from_str, from_none], obj.get("spaceId")) + task_id = from_union([from_str, from_none], obj.get("taskId")) + updated_at = from_float(obj.get("updatedAt")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + backstory = from_union([from_str, from_none], obj.get("backstory")) + dataset_id = from_union([from_str, from_none], obj.get("datasetId")) + model = from_union([from_str, from_none], obj.get("model")) + moderation = from_union([from_bool, from_none], obj.get("moderation")) + privacy = from_union([from_bool, from_none], obj.get("privacy")) + skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + return ConversationsExportResponseItem(contact_id, created_at, description, id, meta, name, space_id, task_id, updated_at, bot_id, backstory, dataset_id, model, moderation, privacy, skillset_id) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.email is not None: - result["email"] = from_union([from_str, from_none], self.email) - if self.image is not None: - result["image"] = from_union([from_str, from_none], self.image) - if self.limits is not None: - result["limits"] = from_union([lambda x: to_class(PartnerUserCreateRequestLimits, x), from_none], self.limits) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.space_id is not None: + result["spaceId"] = from_union([from_str, from_none], self.space_id) + if self.task_id is not None: + result["taskId"] = from_union([from_str, from_none], self.task_id) + result["updatedAt"] = to_float(self.updated_at) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.backstory is not None: + result["backstory"] = from_union([from_str, from_none], self.backstory) + if self.dataset_id is not None: + result["datasetId"] = from_union([from_str, from_none], self.dataset_id) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) + if self.moderation is not None: + result["moderation"] = from_union([from_bool, from_none], self.moderation) + if self.privacy is not None: + result["privacy"] = from_union([from_bool, from_none], self.privacy) + if self.skillset_id is not None: + result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) return result -class PartnerUserCreateResponse: - id: str - """The ID of the created user""" +class ConversationsExportResponse: + cursor: str + """Cursor for fetching the next page""" - def __init__(self, id: str) -> None: - self.id = id + items: List[ConversationsExportResponseItem] + + def __init__(self, cursor: str, items: List[ConversationsExportResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'PartnerUserCreateResponse': + def from_dict(obj: Any) -> 'ConversationsExportResponse': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return PartnerUserCreateResponse(id) + cursor = from_str(obj.get("cursor")) + items = from_list(ConversationsExportResponseItem.from_dict, obj.get("items")) + return ConversationsExportResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(ConversationsExportResponseItem, x), self.items) return result -class PartnerUserListParamsOrder(Enum): - """The order of the paginated items""" +class ConversationsExportStreamItemData: + """A bot configuration or reference + + A bot configuration that can be applied without a dedicated bot instance. + """ + contact_id: Optional[str] + """The contact id assigned to this conversation""" - ASC = "asc" - DESC = "desc" + created_at: float + """The timestamp (ms) when the instance was created""" + description: Optional[str] + """The associated description""" -class PartnerUserListParams: - cursor: Optional[str] - """The cursor to use for pagination""" + id: str + """The instance ID""" - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" + meta: Optional[Dict[str, Any]] + """Meta data information""" - order: Optional[PartnerUserListParamsOrder] - """The order of the paginated items""" + name: Optional[str] + """The associated name""" - take: Optional[int] - """The number of items to retrieve""" + space_id: Optional[str] + """The space id assigned to this conversation""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[PartnerUserListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor + task_id: Optional[str] + """The task id assigned to this conversation""" + + updated_at: float + """The timestamp (ms) when the instance was updated""" + + bot_id: Optional[str] + """The ID of the bot this configuration is using""" + + backstory: Optional[str] + """The backstory this configuration is using""" + + dataset_id: Optional[str] + """The id of the dataset this configuration is using""" + + model: Optional[str] + """A model definition""" + + moderation: Optional[bool] + """The moderation flag for this configuration""" + + privacy: Optional[bool] + """The privacy flag for this configuration""" + + skillset_id: Optional[str] + """The id of the skillset this configuration is using""" + + def __init__(self, contact_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], space_id: Optional[str], task_id: Optional[str], updated_at: float, bot_id: Optional[str], backstory: Optional[str], dataset_id: Optional[str], model: Optional[str], moderation: Optional[bool], privacy: Optional[bool], skillset_id: Optional[str]) -> None: + self.contact_id = contact_id + self.created_at = created_at + self.description = description + self.id = id self.meta = meta - self.order = order - self.take = take + self.name = name + self.space_id = space_id + self.task_id = task_id + self.updated_at = updated_at + self.bot_id = bot_id + self.backstory = backstory + self.dataset_id = dataset_id + self.model = model + self.moderation = moderation + self.privacy = privacy + self.skillset_id = skillset_id @staticmethod - def from_dict(obj: Any) -> 'PartnerUserListParams': + def from_dict(obj: Any) -> 'ConversationsExportStreamItemData': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([PartnerUserListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return PartnerUserListParams(cursor, meta, order, take) + contact_id = from_union([from_str, from_none], obj.get("contactId")) + created_at = from_float(obj.get("createdAt")) + description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + space_id = from_union([from_str, from_none], obj.get("spaceId")) + task_id = from_union([from_str, from_none], obj.get("taskId")) + updated_at = from_float(obj.get("updatedAt")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + backstory = from_union([from_str, from_none], obj.get("backstory")) + dataset_id = from_union([from_str, from_none], obj.get("datasetId")) + model = from_union([from_str, from_none], obj.get("model")) + moderation = from_union([from_bool, from_none], obj.get("moderation")) + privacy = from_union([from_bool, from_none], obj.get("privacy")) + skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + return ConversationsExportStreamItemData(contact_id, created_at, description, id, meta, name, space_id, task_id, updated_at, bot_id, backstory, dataset_id, model, moderation, privacy, skillset_id) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) + result["createdAt"] = to_float(self.created_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(PartnerUserListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.space_id is not None: + result["spaceId"] = from_union([from_str, from_none], self.space_id) + if self.task_id is not None: + result["taskId"] = from_union([from_str, from_none], self.task_id) + result["updatedAt"] = to_float(self.updated_at) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.backstory is not None: + result["backstory"] = from_union([from_str, from_none], self.backstory) + if self.dataset_id is not None: + result["datasetId"] = from_union([from_str, from_none], self.dataset_id) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) + if self.moderation is not None: + result["moderation"] = from_union([from_bool, from_none], self.moderation) + if self.privacy is not None: + result["privacy"] = from_union([from_bool, from_none], self.privacy) + if self.skillset_id is not None: + result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) return result -class StickyDatabase: - """The database limits""" - - abilities: Optional[float] - """The abilities limit""" +class ConversationsExportStreamItemType(Enum): + """The type of event""" - datasets: Optional[float] - """The datasets limit""" + ITEM = "item" - files: Optional[float] - """The files limit""" - records: Optional[float] - """The records limit""" +class ConversationsExportStreamItem: + data: ConversationsExportStreamItemData + """A bot configuration or reference""" - skillsets: Optional[float] - """The skillsets limit""" + type: ConversationsExportStreamItemType + """The type of event""" - def __init__(self, abilities: Optional[float], datasets: Optional[float], files: Optional[float], records: Optional[float], skillsets: Optional[float]) -> None: - self.abilities = abilities - self.datasets = datasets - self.files = files - self.records = records - self.skillsets = skillsets + def __init__(self, data: ConversationsExportStreamItemData, type: ConversationsExportStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'StickyDatabase': + def from_dict(obj: Any) -> 'ConversationsExportStreamItem': assert isinstance(obj, dict) - abilities = from_union([from_float, from_none], obj.get("abilities")) - datasets = from_union([from_float, from_none], obj.get("datasets")) - files = from_union([from_float, from_none], obj.get("files")) - records = from_union([from_float, from_none], obj.get("records")) - skillsets = from_union([from_float, from_none], obj.get("skillsets")) - return StickyDatabase(abilities, datasets, files, records, skillsets) + data = ConversationsExportStreamItemData.from_dict(obj.get("data")) + type = ConversationsExportStreamItemType(obj.get("type")) + return ConversationsExportStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - if self.abilities is not None: - result["abilities"] = from_union([to_float, from_none], self.abilities) - if self.datasets is not None: - result["datasets"] = from_union([to_float, from_none], self.datasets) - if self.files is not None: - result["files"] = from_union([to_float, from_none], self.files) - if self.records is not None: - result["records"] = from_union([to_float, from_none], self.records) - if self.skillsets is not None: - result["skillsets"] = from_union([to_float, from_none], self.skillsets) + result["data"] = to_class(ConversationsExportStreamItemData, self.data) + result["type"] = to_enum(ConversationsExportStreamItemType, self.type) return result -class ItemLimits: - """Limits information""" - - conversations: Optional[float] - """The conversations limit""" - - database: Optional[StickyDatabase] - """The database limits""" - - messages: Optional[float] - """The messages limit""" - - tokens: Optional[float] - """The tokens limit""" +class ConversationDispatchRequestAttachment: + url: Optional[str] + """The URL of the attachment""" - def __init__(self, conversations: Optional[float], database: Optional[StickyDatabase], messages: Optional[float], tokens: Optional[float]) -> None: - self.conversations = conversations - self.database = database - self.messages = messages - self.tokens = tokens + def __init__(self, url: Optional[str]) -> None: + self.url = url @staticmethod - def from_dict(obj: Any) -> 'ItemLimits': + def from_dict(obj: Any) -> 'ConversationDispatchRequestAttachment': assert isinstance(obj, dict) - conversations = from_union([from_float, from_none], obj.get("conversations")) - database = from_union([StickyDatabase.from_dict, from_none], obj.get("database")) - messages = from_union([from_float, from_none], obj.get("messages")) - tokens = from_union([from_float, from_none], obj.get("tokens")) - return ItemLimits(conversations, database, messages, tokens) + url = from_union([from_str, from_none], obj.get("url")) + return ConversationDispatchRequestAttachment(url) def to_dict(self) -> dict: result: dict = {} - if self.conversations is not None: - result["conversations"] = from_union([to_float, from_none], self.conversations) - if self.database is not None: - result["database"] = from_union([lambda x: to_class(StickyDatabase, x), from_none], self.database) - if self.messages is not None: - result["messages"] = from_union([to_float, from_none], self.messages) - if self.tokens is not None: - result["tokens"] = from_union([to_float, from_none], self.tokens) + if self.url is not None: + result["url"] = from_union([from_str, from_none], self.url) return result -class PartnerUserListResponseItem: - """Instance list properties""" - - created_at: float - """The timestamp (ms) when the instance was created""" +class PurpleContactID: + """A contact object to create or retrieve a trusted contact""" description: Optional[str] - """The associated description""" + """A description of the contact""" email: Optional[str] - """The email of the partner user""" - - id: str - """The instance ID""" - - image: Optional[str] - """The image of the partner user""" + """The email address of the contact""" - limits: Optional[ItemLimits] - """Limits information""" + fingerprint: str + """A unique fingerprint to identify the contact""" meta: Optional[Dict[str, Any]] - """Meta data information""" + """Additional metadata for the contact""" name: Optional[str] - """The associated name""" + """The name of the contact""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + nick: Optional[str] + """A nickname for the contact""" - def __init__(self, created_at: float, description: Optional[str], email: Optional[str], id: str, image: Optional[str], limits: Optional[ItemLimits], meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: - self.created_at = created_at + phone: Optional[str] + """The phone number of the contact""" + + def __init__(self, description: Optional[str], email: Optional[str], fingerprint: str, meta: Optional[Dict[str, Any]], name: Optional[str], nick: Optional[str], phone: Optional[str]) -> None: self.description = description self.email = email - self.id = id - self.image = image - self.limits = limits + self.fingerprint = fingerprint self.meta = meta self.name = name - self.updated_at = updated_at + self.nick = nick + self.phone = phone @staticmethod - def from_dict(obj: Any) -> 'PartnerUserListResponseItem': + def from_dict(obj: Any) -> 'PurpleContactID': assert isinstance(obj, dict) - created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) email = from_union([from_str, from_none], obj.get("email")) - id = from_str(obj.get("id")) - image = from_union([from_str, from_none], obj.get("image")) - limits = from_union([ItemLimits.from_dict, from_none], obj.get("limits")) + fingerprint = from_str(obj.get("fingerprint")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - updated_at = from_float(obj.get("updatedAt")) - return PartnerUserListResponseItem(created_at, description, email, id, image, limits, meta, name, updated_at) + nick = from_union([from_str, from_none], obj.get("nick")) + phone = from_union([from_str, from_none], obj.get("phone")) + return PurpleContactID(description, email, fingerprint, meta, name, nick, phone) def to_dict(self) -> dict: result: dict = {} - result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) if self.email is not None: result["email"] = from_union([from_str, from_none], self.email) - result["id"] = from_str(self.id) - if self.image is not None: - result["image"] = from_union([from_str, from_none], self.image) - if self.limits is not None: - result["limits"] = from_union([lambda x: to_class(ItemLimits, x), from_none], self.limits) + result["fingerprint"] = from_str(self.fingerprint) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - result["updatedAt"] = to_float(self.updated_at) + if self.nick is not None: + result["nick"] = from_union([from_str, from_none], self.nick) + if self.phone is not None: + result["phone"] = from_union([from_str, from_none], self.phone) return result -class PartnerUserListResponse: - cursor: str - """Cursor for fetching the next page""" +class PurpleRecord: + meta: Optional[Dict[str, Any]] + """Additional metadata for the record""" - items: List[PartnerUserListResponseItem] + text: str + """The text content of the record""" - def __init__(self, cursor: str, items: List[PartnerUserListResponseItem]) -> None: - self.cursor = cursor - self.items = items + def __init__(self, meta: Optional[Dict[str, Any]], text: str) -> None: + self.meta = meta + self.text = text @staticmethod - def from_dict(obj: Any) -> 'PartnerUserListResponse': + def from_dict(obj: Any) -> 'PurpleRecord': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(PartnerUserListResponseItem.from_dict, obj.get("items")) - return PartnerUserListResponse(cursor, items) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + text = from_str(obj.get("text")) + return PurpleRecord(meta, text) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(PartnerUserListResponseItem, x), self.items) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + result["text"] = from_str(self.text) return result -class IndigoDatabase: - """The database limits""" - - abilities: Optional[float] - """The abilities limit""" - - datasets: Optional[float] - """The datasets limit""" - - files: Optional[float] - """The files limit""" +class PurpleDataset: + description: Optional[str] + """The description of the dataset""" - records: Optional[float] - """The records limit""" + name: Optional[str] + """The name of the dataset""" - skillsets: Optional[float] - """The skillsets limit""" + records: List[PurpleRecord] + """The records in the dataset""" - def __init__(self, abilities: Optional[float], datasets: Optional[float], files: Optional[float], records: Optional[float], skillsets: Optional[float]) -> None: - self.abilities = abilities - self.datasets = datasets - self.files = files + def __init__(self, description: Optional[str], name: Optional[str], records: List[PurpleRecord]) -> None: + self.description = description + self.name = name self.records = records - self.skillsets = skillsets @staticmethod - def from_dict(obj: Any) -> 'IndigoDatabase': + def from_dict(obj: Any) -> 'PurpleDataset': assert isinstance(obj, dict) - abilities = from_union([from_float, from_none], obj.get("abilities")) - datasets = from_union([from_float, from_none], obj.get("datasets")) - files = from_union([from_float, from_none], obj.get("files")) - records = from_union([from_float, from_none], obj.get("records")) - skillsets = from_union([from_float, from_none], obj.get("skillsets")) - return IndigoDatabase(abilities, datasets, files, records, skillsets) + description = from_union([from_str, from_none], obj.get("description")) + name = from_union([from_str, from_none], obj.get("name")) + records = from_list(PurpleRecord.from_dict, obj.get("records")) + return PurpleDataset(description, name, records) def to_dict(self) -> dict: result: dict = {} - if self.abilities is not None: - result["abilities"] = from_union([to_float, from_none], self.abilities) - if self.datasets is not None: - result["datasets"] = from_union([to_float, from_none], self.datasets) - if self.files is not None: - result["files"] = from_union([to_float, from_none], self.files) - if self.records is not None: - result["records"] = from_union([to_float, from_none], self.records) - if self.skillsets is not None: - result["skillsets"] = from_union([to_float, from_none], self.skillsets) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + result["records"] = from_list(lambda x: to_class(PurpleRecord, x), self.records) return result -class DataLimits: - """Limits information""" - - conversations: Optional[float] - """The conversations limit""" - - database: Optional[IndigoDatabase] - """The database limits""" - - messages: Optional[float] - """The messages limit""" +class PurpleFeature: + name: str + """The name of the feature to enable""" - tokens: Optional[float] - """The tokens limit""" + options: Optional[Dict[str, Any]] + """Optional configuration options for the feature""" - def __init__(self, conversations: Optional[float], database: Optional[IndigoDatabase], messages: Optional[float], tokens: Optional[float]) -> None: - self.conversations = conversations - self.database = database - self.messages = messages - self.tokens = tokens + def __init__(self, name: str, options: Optional[Dict[str, Any]]) -> None: + self.name = name + self.options = options @staticmethod - def from_dict(obj: Any) -> 'DataLimits': + def from_dict(obj: Any) -> 'PurpleFeature': assert isinstance(obj, dict) - conversations = from_union([from_float, from_none], obj.get("conversations")) - database = from_union([IndigoDatabase.from_dict, from_none], obj.get("database")) - messages = from_union([from_float, from_none], obj.get("messages")) - tokens = from_union([from_float, from_none], obj.get("tokens")) - return DataLimits(conversations, database, messages, tokens) + name = from_str(obj.get("name")) + options = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("options")) + return PurpleFeature(name, options) def to_dict(self) -> dict: result: dict = {} - if self.conversations is not None: - result["conversations"] = from_union([to_float, from_none], self.conversations) - if self.database is not None: - result["database"] = from_union([lambda x: to_class(IndigoDatabase, x), from_none], self.database) - if self.messages is not None: - result["messages"] = from_union([to_float, from_none], self.messages) - if self.tokens is not None: - result["tokens"] = from_union([to_float, from_none], self.tokens) + result["name"] = from_str(self.name) + if self.options is not None: + result["options"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.options) return result -class PartnerUserListStreamItemData: - """Instance list properties""" +class PurpleAbility: + description: str + """The description of the ability""" - created_at: float - """The timestamp (ms) when the instance was created""" + instruction: str + """The instruction for the ability""" - description: Optional[str] - """The associated description""" + linked_secret_id: Optional[str] + """Optional secret ID for the ability""" - email: Optional[str] - """The email of the partner user""" + linked_space_id: Optional[str] + """Optional space ID for the ability""" - id: str - """The instance ID""" + meta: Optional[Dict[str, Any]] + """Additional metadata for the ability""" - image: Optional[str] - """The image of the partner user""" + name: str + """The name of the ability""" - limits: Optional[DataLimits] - """Limits information""" + def __init__(self, description: str, instruction: str, linked_secret_id: Optional[str], linked_space_id: Optional[str], meta: Optional[Dict[str, Any]], name: str) -> None: + self.description = description + self.instruction = instruction + self.linked_secret_id = linked_secret_id + self.linked_space_id = linked_space_id + self.meta = meta + self.name = name - meta: Optional[Dict[str, Any]] - """Meta data information""" + @staticmethod + def from_dict(obj: Any) -> 'PurpleAbility': + assert isinstance(obj, dict) + description = from_str(obj.get("description")) + instruction = from_str(obj.get("instruction")) + linked_secret_id = from_union([from_str, from_none], obj.get("linkedSecretId")) + linked_space_id = from_union([from_str, from_none], obj.get("linkedSpaceId")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_str(obj.get("name")) + return PurpleAbility(description, instruction, linked_secret_id, linked_space_id, meta, name) - name: Optional[str] - """The associated name""" + def to_dict(self) -> dict: + result: dict = {} + result["description"] = from_str(self.description) + result["instruction"] = from_str(self.instruction) + if self.linked_secret_id is not None: + result["linkedSecretId"] = from_union([from_str, from_none], self.linked_secret_id) + if self.linked_space_id is not None: + result["linkedSpaceId"] = from_union([from_str, from_none], self.linked_space_id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + result["name"] = from_str(self.name) + return result - updated_at: float - """The timestamp (ms) when the instance was updated""" - def __init__(self, created_at: float, description: Optional[str], email: Optional[str], id: str, image: Optional[str], limits: Optional[DataLimits], meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: - self.created_at = created_at +class PurpleSkillset: + abilities: List[PurpleAbility] + """The abilities in the skillset""" + + description: Optional[str] + """The description of the skillset""" + + name: Optional[str] + """The name of the skillset""" + + def __init__(self, abilities: List[PurpleAbility], description: Optional[str], name: Optional[str]) -> None: + self.abilities = abilities self.description = description - self.email = email - self.id = id - self.image = image - self.limits = limits - self.meta = meta self.name = name - self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'PartnerUserListStreamItemData': + def from_dict(obj: Any) -> 'PurpleSkillset': assert isinstance(obj, dict) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - email = from_union([from_str, from_none], obj.get("email")) - id = from_str(obj.get("id")) - image = from_union([from_str, from_none], obj.get("image")) - limits = from_union([DataLimits.from_dict, from_none], obj.get("limits")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + abilities = from_list(PurpleAbility.from_dict, obj.get("abilities")) + description = from_union([from_str, from_none], obj.get("description")) name = from_union([from_str, from_none], obj.get("name")) - updated_at = from_float(obj.get("updatedAt")) - return PartnerUserListStreamItemData(created_at, description, email, id, image, limits, meta, name, updated_at) + return PurpleSkillset(abilities, description, name) def to_dict(self) -> dict: result: dict = {} - result["createdAt"] = to_float(self.created_at) + result["abilities"] = from_list(lambda x: to_class(PurpleAbility, x), self.abilities) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.email is not None: - result["email"] = from_union([from_str, from_none], self.email) - result["id"] = from_str(self.id) - if self.image is not None: - result["image"] = from_union([from_str, from_none], self.image) - if self.limits is not None: - result["limits"] = from_union([lambda x: to_class(DataLimits, x), from_none], self.limits) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - result["updatedAt"] = to_float(self.updated_at) return result -class PartnerUserListStreamItemType(Enum): - """The type of event""" +class ConversationDispatchRequestExtensions: + """Extensions to enhance the bot's capabilities""" - ITEM = "item" + backstory: Optional[str] + """Additional backstory for the bot""" + datasets: Optional[List[PurpleDataset]] + """Inline datasets to provide additional context""" -class PartnerUserListStreamItem: - data: PartnerUserListStreamItemData - """Instance list properties""" + features: Optional[List[PurpleFeature]] + """Feature flags to enable specific bot capabilities""" - type: PartnerUserListStreamItemType - """The type of event""" + skillsets: Optional[List[PurpleSkillset]] + """Inline skillsets to provide additional abilities""" - def __init__(self, data: PartnerUserListStreamItemData, type: PartnerUserListStreamItemType) -> None: - self.data = data - self.type = type + def __init__(self, backstory: Optional[str], datasets: Optional[List[PurpleDataset]], features: Optional[List[PurpleFeature]], skillsets: Optional[List[PurpleSkillset]]) -> None: + self.backstory = backstory + self.datasets = datasets + self.features = features + self.skillsets = skillsets @staticmethod - def from_dict(obj: Any) -> 'PartnerUserListStreamItem': + def from_dict(obj: Any) -> 'ConversationDispatchRequestExtensions': assert isinstance(obj, dict) - data = PartnerUserListStreamItemData.from_dict(obj.get("data")) - type = PartnerUserListStreamItemType(obj.get("type")) - return PartnerUserListStreamItem(data, type) + backstory = from_union([from_str, from_none], obj.get("backstory")) + datasets = from_union([lambda x: from_list(PurpleDataset.from_dict, x), from_none], obj.get("datasets")) + features = from_union([lambda x: from_list(PurpleFeature.from_dict, x), from_none], obj.get("features")) + skillsets = from_union([lambda x: from_list(PurpleSkillset.from_dict, x), from_none], obj.get("skillsets")) + return ConversationDispatchRequestExtensions(backstory, datasets, features, skillsets) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(PartnerUserListStreamItemData, self.data) - result["type"] = to_enum(PartnerUserListStreamItemType, self.type) + if self.backstory is not None: + result["backstory"] = from_union([from_str, from_none], self.backstory) + if self.datasets is not None: + result["datasets"] = from_union([lambda x: from_list(lambda x: to_class(PurpleDataset, x), x), from_none], self.datasets) + if self.features is not None: + result["features"] = from_union([lambda x: from_list(lambda x: to_class(PurpleFeature, x), x), from_none], self.features) + if self.skillsets is not None: + result["skillsets"] = from_union([lambda x: from_list(lambda x: to_class(PurpleSkillset, x), x), from_none], self.skillsets) return result -class PlatformAbilityListParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" - - -class PlatformAbilityListParams: - cursor: Optional[str] - """The cursor to use for pagination""" - - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" +class PurpleCall: + """Configuration for when this function should be automatically called""" - order: Optional[PlatformAbilityListParamsOrder] - """The order of the paginated items""" + end: Optional[bool] + """If true, this function will be force-called at the end of the conversation""" - take: Optional[int] - """The number of items to retrieve""" + start: Optional[bool] + """If true, this function will be force-called at the start of the conversation""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[PlatformAbilityListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take + def __init__(self, end: Optional[bool], start: Optional[bool]) -> None: + self.end = end + self.start = start @staticmethod - def from_dict(obj: Any) -> 'PlatformAbilityListParams': + def from_dict(obj: Any) -> 'PurpleCall': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([PlatformAbilityListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return PlatformAbilityListParams(cursor, meta, order, take) + end = from_union([from_bool, from_none], obj.get("end")) + start = from_union([from_bool, from_none], obj.get("start")) + return PurpleCall(end, start) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(PlatformAbilityListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + if self.end is not None: + result["end"] = from_union([from_bool, from_none], self.end) + if self.start is not None: + result["start"] = from_union([from_bool, from_none], self.start) return result -class Type8(Enum): +class Type7(Enum): """The schema type, must be "object\"""" OBJECT = "object" -class PurpleSchema: - """A JSON Schema object type definition (https://json-schema.org/). Represents an object - schema with properties and validation rules. - """ - description: Optional[str] - """The schema description""" +class PurpleParameters: + """JSON Schema definition for the function parameters""" properties: Dict[str, Any] """Object property definitions""" @@ -38298,4479 +37422,4332 @@ class PurpleSchema: required: Optional[List[str]] """Required property names""" - title: Optional[str] - """The schema title""" - - type: Type8 + type: Type7 """The schema type, must be "object\"""" - def __init__(self, description: Optional[str], properties: Dict[str, Any], required: Optional[List[str]], title: Optional[str], type: Type8) -> None: - self.description = description + def __init__(self, properties: Dict[str, Any], required: Optional[List[str]], type: Type7) -> None: self.properties = properties self.required = required - self.title = title self.type = type @staticmethod - def from_dict(obj: Any) -> 'PurpleSchema': + def from_dict(obj: Any) -> 'PurpleParameters': assert isinstance(obj, dict) - description = from_union([from_str, from_none], obj.get("description")) properties = from_dict(lambda x: x, obj.get("properties")) required = from_union([lambda x: from_list(from_str, x), from_none], obj.get("required")) - title = from_union([from_str, from_none], obj.get("title")) - type = Type8(obj.get("type")) - return PurpleSchema(description, properties, required, title, type) + type = Type7(obj.get("type")) + return PurpleParameters(properties, required, type) def to_dict(self) -> dict: result: dict = {} - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) result["properties"] = from_dict(lambda x: x, self.properties) if self.required is not None: result["required"] = from_union([lambda x: from_list(from_str, x), from_none], self.required) - if self.title is not None: - result["title"] = from_union([from_str, from_none], self.title) - result["type"] = to_enum(Type8, self.type) + result["type"] = to_enum(Type7, self.type) return result -class PlatformAbilityListResponseItem: - """Instance list properties""" +class PurpleResult: + """The result of the function execution""" - bot: Optional[str] - """The ID of the bot associated with the ability""" + data: Any + """The data returned by the function (can be any type)""" - commentary: Optional[str] - created_at: float - """The timestamp (ms) when the instance was created""" + channel: Optional[str] + """The channel for streaming function results""" - description: Optional[str] - """The associated description""" + def __init__(self, data: Any, channel: Optional[str]) -> None: + self.data = data + self.channel = channel - file: Optional[str] - """The ID of the file associated with the ability""" + @staticmethod + def from_dict(obj: Any) -> 'PurpleResult': + assert isinstance(obj, dict) + data = obj.get("data") + channel = from_union([from_str, from_none], obj.get("channel")) + return PurpleResult(data, channel) - icon: str - id: str - """The instance ID""" + def to_dict(self) -> dict: + result: dict = {} + if self.data is not None: + result["data"] = self.data + if self.channel is not None: + result["channel"] = from_union([from_str, from_none], self.channel) + return result - instruction: str - meta: Optional[Dict[str, Any]] - """Meta data information""" - name: Optional[str] - """The associated name""" +class ConversationDispatchRequestFunction: + call: Optional[PurpleCall] + """Configuration for when this function should be automatically called""" - provider: Optional[str] - """The provider of the ability""" + description: str + """The description of the function""" - schema: PurpleSchema - """A JSON Schema object type definition (https://json-schema.org/). Represents an object - schema with properties and validation rules. + name: str + """The name of the function (must be a valid JS identifier, max 64 chars)""" + + parameters: PurpleParameters + """JSON Schema definition for the function parameters""" + + result: Optional[PurpleResult] + """The result of the function execution""" + + def __init__(self, call: Optional[PurpleCall], description: str, name: str, parameters: PurpleParameters, result: Optional[PurpleResult]) -> None: + self.call = call + self.description = description + self.name = name + self.parameters = parameters + self.result = result + + @staticmethod + def from_dict(obj: Any) -> 'ConversationDispatchRequestFunction': + assert isinstance(obj, dict) + call = from_union([PurpleCall.from_dict, from_none], obj.get("call")) + description = from_str(obj.get("description")) + name = from_str(obj.get("name")) + parameters = PurpleParameters.from_dict(obj.get("parameters")) + result = from_union([PurpleResult.from_dict, from_none], obj.get("result")) + return ConversationDispatchRequestFunction(call, description, name, parameters, result) + + def to_dict(self) -> dict: + result: dict = {} + if self.call is not None: + result["call"] = from_union([lambda x: to_class(PurpleCall, x), from_none], self.call) + result["description"] = from_str(self.description) + result["name"] = from_str(self.name) + result["parameters"] = to_class(PurpleParameters, self.parameters) + if self.result is not None: + result["result"] = from_union([lambda x: to_class(PurpleResult, x), from_none], self.result) + return result + + +class ConversationDispatchRequestLimits: + """Execution limits to control conversation processing bounds""" + + calls: Optional[int] + """Maximum number of function/tool calls. Controls how many total function calls can be made + during the conversation. + """ + continuations: Optional[int] + """Maximum number of model continuations. Controls how many times the model can continue + generating after reaching a stop condition. + """ + iterations: Optional[int] + """Maximum number of agentic iterations. Controls how many times the model can iterate + through tool calls and responses. """ - secret: Optional[str] - """The ID of the secret associated with the ability""" - setup: Optional[str] - space: Optional[str] - """The ID of the space associated with the ability""" + def __init__(self, calls: Optional[int], continuations: Optional[int], iterations: Optional[int]) -> None: + self.calls = calls + self.continuations = continuations + self.iterations = iterations - tags: Optional[List[str]] - template: Optional[str] - """The original template identifier for the ability""" + @staticmethod + def from_dict(obj: Any) -> 'ConversationDispatchRequestLimits': + assert isinstance(obj, dict) + calls = from_union([from_int, from_none], obj.get("calls")) + continuations = from_union([from_int, from_none], obj.get("continuations")) + iterations = from_union([from_int, from_none], obj.get("iterations")) + return ConversationDispatchRequestLimits(calls, continuations, iterations) - updated_at: float - """The timestamp (ms) when the instance was updated""" + def to_dict(self) -> dict: + result: dict = {} + if self.calls is not None: + result["calls"] = from_union([from_int, from_none], self.calls) + if self.continuations is not None: + result["continuations"] = from_union([from_int, from_none], self.continuations) + if self.iterations is not None: + result["iterations"] = from_union([from_int, from_none], self.iterations) + return result - def __init__(self, bot: Optional[str], commentary: Optional[str], created_at: float, description: Optional[str], file: Optional[str], icon: str, id: str, instruction: str, meta: Optional[Dict[str, Any]], name: Optional[str], provider: Optional[str], schema: PurpleSchema, secret: Optional[str], setup: Optional[str], space: Optional[str], tags: Optional[List[str]], template: Optional[str], updated_at: float) -> None: - self.bot = bot - self.commentary = commentary - self.created_at = created_at - self.description = description - self.file = file - self.icon = icon - self.id = id - self.instruction = instruction + +class Type8(Enum): + """The type of the message""" + + ACTIVITY = "activity" + BACKSTORY = "backstory" + BOT = "bot" + CHECKPOINT = "checkpoint" + CONTEXT = "context" + INSTRUCTION = "instruction" + REASONING = "reasoning" + USER = "user" + + +class ConversationDispatchRequestMessage: + """A message in the conversation""" + + meta: Optional[Dict[str, Any]] + """Meta data information""" + + text: str + """The text of the message""" + + type: Type8 + """The type of the message""" + + def __init__(self, meta: Optional[Dict[str, Any]], text: str, type: Type8) -> None: self.meta = meta - self.name = name - self.provider = provider - self.schema = schema - self.secret = secret - self.setup = setup - self.space = space - self.tags = tags - self.template = template - self.updated_at = updated_at + self.text = text + self.type = type @staticmethod - def from_dict(obj: Any) -> 'PlatformAbilityListResponseItem': + def from_dict(obj: Any) -> 'ConversationDispatchRequestMessage': assert isinstance(obj, dict) - bot = from_union([from_str, from_none], obj.get("bot")) - commentary = from_union([from_str, from_none], obj.get("commentary")) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - file = from_union([from_str, from_none], obj.get("file")) - icon = from_str(obj.get("icon")) - id = from_str(obj.get("id")) - instruction = from_str(obj.get("instruction")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - provider = from_union([from_str, from_none], obj.get("provider")) - schema = PurpleSchema.from_dict(obj.get("schema")) - secret = from_union([from_str, from_none], obj.get("secret")) - setup = from_union([from_str, from_none], obj.get("setup")) - space = from_union([from_str, from_none], obj.get("space")) - tags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tags")) - template = from_union([from_str, from_none], obj.get("template")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformAbilityListResponseItem(bot, commentary, created_at, description, file, icon, id, instruction, meta, name, provider, schema, secret, setup, space, tags, template, updated_at) + text = from_str(obj.get("text")) + type = Type8(obj.get("type")) + return ConversationDispatchRequestMessage(meta, text, type) def to_dict(self) -> dict: result: dict = {} - if self.bot is not None: - result["bot"] = from_union([from_str, from_none], self.bot) - if self.commentary is not None: - result["commentary"] = from_union([from_str, from_none], self.commentary) - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.file is not None: - result["file"] = from_union([from_str, from_none], self.file) - result["icon"] = from_str(self.icon) - result["id"] = from_str(self.id) - result["instruction"] = from_str(self.instruction) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.provider is not None: - result["provider"] = from_union([from_str, from_none], self.provider) - result["schema"] = to_class(PurpleSchema, self.schema) - if self.secret is not None: - result["secret"] = from_union([from_str, from_none], self.secret) - if self.setup is not None: - result["setup"] = from_union([from_str, from_none], self.setup) - if self.space is not None: - result["space"] = from_union([from_str, from_none], self.space) - if self.tags is not None: - result["tags"] = from_union([lambda x: from_list(from_str, x), from_none], self.tags) - if self.template is not None: - result["template"] = from_union([from_str, from_none], self.template) - result["updatedAt"] = to_float(self.updated_at) + result["text"] = from_str(self.text) + result["type"] = to_enum(Type8, self.type) return result -class PlatformAbilityListResponse: - cursor: str - """Cursor for fetching the next page""" +class ConversationDispatchRequest: + """A bot configuration or reference + + A bot configuration that can be applied without a dedicated bot instance. + """ + attachments: Optional[List[ConversationDispatchRequestAttachment]] + """An array of attachments to be added to the conversation""" - items: List[PlatformAbilityListResponseItem] + channel_id: Optional[str] + """A unique channel ID to subscribe to for completion events""" - def __init__(self, cursor: str, items: List[PlatformAbilityListResponseItem]) -> None: - self.cursor = cursor - self.items = items + contact_id: Optional[Union[PurpleContactID, str]] + """The contact ID to associate with this conversation""" + + extensions: Optional[ConversationDispatchRequestExtensions] + """Extensions to enhance the bot's capabilities""" + + functions: Optional[List[ConversationDispatchRequestFunction]] + """An array of functions to be added to the conversation""" + + limits: Optional[ConversationDispatchRequestLimits] + """Execution limits to control conversation processing bounds""" + + messages: List[ConversationDispatchRequestMessage] + """An array of messages to be added to the conversation""" + + bot_id: Optional[str] + """The ID of the bot this configuration is using""" + + backstory: Optional[str] + """The backstory this configuration is using""" + + dataset_id: Optional[str] + """The id of the dataset this configuration is using""" + + model: Optional[str] + """A model definition""" + + moderation: Optional[bool] + """The moderation flag for this configuration""" + + privacy: Optional[bool] + """The privacy flag for this configuration""" + + skillset_id: Optional[str] + """The id of the skillset this configuration is using""" + + def __init__(self, attachments: Optional[List[ConversationDispatchRequestAttachment]], channel_id: Optional[str], contact_id: Optional[Union[PurpleContactID, str]], extensions: Optional[ConversationDispatchRequestExtensions], functions: Optional[List[ConversationDispatchRequestFunction]], limits: Optional[ConversationDispatchRequestLimits], messages: List[ConversationDispatchRequestMessage], bot_id: Optional[str], backstory: Optional[str], dataset_id: Optional[str], model: Optional[str], moderation: Optional[bool], privacy: Optional[bool], skillset_id: Optional[str]) -> None: + self.attachments = attachments + self.channel_id = channel_id + self.contact_id = contact_id + self.extensions = extensions + self.functions = functions + self.limits = limits + self.messages = messages + self.bot_id = bot_id + self.backstory = backstory + self.dataset_id = dataset_id + self.model = model + self.moderation = moderation + self.privacy = privacy + self.skillset_id = skillset_id @staticmethod - def from_dict(obj: Any) -> 'PlatformAbilityListResponse': + def from_dict(obj: Any) -> 'ConversationDispatchRequest': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(PlatformAbilityListResponseItem.from_dict, obj.get("items")) - return PlatformAbilityListResponse(cursor, items) + attachments = from_union([lambda x: from_list(ConversationDispatchRequestAttachment.from_dict, x), from_none], obj.get("attachments")) + channel_id = from_union([from_str, from_none], obj.get("channelId")) + contact_id = from_union([PurpleContactID.from_dict, from_str, from_none], obj.get("contactId")) + extensions = from_union([ConversationDispatchRequestExtensions.from_dict, from_none], obj.get("extensions")) + functions = from_union([lambda x: from_list(ConversationDispatchRequestFunction.from_dict, x), from_none], obj.get("functions")) + limits = from_union([ConversationDispatchRequestLimits.from_dict, from_none], obj.get("limits")) + messages = from_list(ConversationDispatchRequestMessage.from_dict, obj.get("messages")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + backstory = from_union([from_str, from_none], obj.get("backstory")) + dataset_id = from_union([from_str, from_none], obj.get("datasetId")) + model = from_union([from_str, from_none], obj.get("model")) + moderation = from_union([from_bool, from_none], obj.get("moderation")) + privacy = from_union([from_bool, from_none], obj.get("privacy")) + skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + return ConversationDispatchRequest(attachments, channel_id, contact_id, extensions, functions, limits, messages, bot_id, backstory, dataset_id, model, moderation, privacy, skillset_id) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(PlatformAbilityListResponseItem, x), self.items) + if self.attachments is not None: + result["attachments"] = from_union([lambda x: from_list(lambda x: to_class(ConversationDispatchRequestAttachment, x), x), from_none], self.attachments) + if self.channel_id is not None: + result["channelId"] = from_union([from_str, from_none], self.channel_id) + if self.contact_id is not None: + result["contactId"] = from_union([lambda x: to_class(PurpleContactID, x), from_str, from_none], self.contact_id) + if self.extensions is not None: + result["extensions"] = from_union([lambda x: to_class(ConversationDispatchRequestExtensions, x), from_none], self.extensions) + if self.functions is not None: + result["functions"] = from_union([lambda x: from_list(lambda x: to_class(ConversationDispatchRequestFunction, x), x), from_none], self.functions) + if self.limits is not None: + result["limits"] = from_union([lambda x: to_class(ConversationDispatchRequestLimits, x), from_none], self.limits) + result["messages"] = from_list(lambda x: to_class(ConversationDispatchRequestMessage, x), self.messages) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.backstory is not None: + result["backstory"] = from_union([from_str, from_none], self.backstory) + if self.dataset_id is not None: + result["datasetId"] = from_union([from_str, from_none], self.dataset_id) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) + if self.moderation is not None: + result["moderation"] = from_union([from_bool, from_none], self.moderation) + if self.privacy is not None: + result["privacy"] = from_union([from_bool, from_none], self.privacy) + if self.skillset_id is not None: + result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) return result -class Type9(Enum): - """The schema type, must be "object\"""" +class ConversationDispatchResponse: + channel_id: str + """The channel ID to subscribe to for completion events""" - OBJECT = "object" + def __init__(self, channel_id: str) -> None: + self.channel_id = channel_id + @staticmethod + def from_dict(obj: Any) -> 'ConversationDispatchResponse': + assert isinstance(obj, dict) + channel_id = from_str(obj.get("channelId")) + return ConversationDispatchResponse(channel_id) -class DataSchema: - """A JSON Schema object type definition (https://json-schema.org/). Represents an object - schema with properties and validation rules. - """ - description: Optional[str] - """The schema description""" + def to_dict(self) -> dict: + result: dict = {} + result["channelId"] = from_str(self.channel_id) + return result - properties: Dict[str, Any] - """Object property definitions""" - required: Optional[List[str]] - """Required property names""" +class Type9(Enum): + """The type of the message""" + + ACTIVITY = "activity" + BACKSTORY = "backstory" + BOT = "bot" + CHECKPOINT = "checkpoint" + CONTEXT = "context" + INSTRUCTION = "instruction" + REASONING = "reasoning" + USER = "user" + - title: Optional[str] - """The schema title""" +class ConversationCreateRequestMessage: + text: str + """The text of the message""" type: Type9 - """The schema type, must be "object\"""" + """The type of the message""" - def __init__(self, description: Optional[str], properties: Dict[str, Any], required: Optional[List[str]], title: Optional[str], type: Type9) -> None: - self.description = description - self.properties = properties - self.required = required - self.title = title + def __init__(self, text: str, type: Type9) -> None: + self.text = text self.type = type @staticmethod - def from_dict(obj: Any) -> 'DataSchema': + def from_dict(obj: Any) -> 'ConversationCreateRequestMessage': assert isinstance(obj, dict) - description = from_union([from_str, from_none], obj.get("description")) - properties = from_dict(lambda x: x, obj.get("properties")) - required = from_union([lambda x: from_list(from_str, x), from_none], obj.get("required")) - title = from_union([from_str, from_none], obj.get("title")) + text = from_str(obj.get("text")) type = Type9(obj.get("type")) - return DataSchema(description, properties, required, title, type) + return ConversationCreateRequestMessage(text, type) def to_dict(self) -> dict: result: dict = {} - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - result["properties"] = from_dict(lambda x: x, self.properties) - if self.required is not None: - result["required"] = from_union([lambda x: from_list(from_str, x), from_none], self.required) - if self.title is not None: - result["title"] = from_union([from_str, from_none], self.title) + result["text"] = from_str(self.text) result["type"] = to_enum(Type9, self.type) return result -class PlatformAbilityListStreamItemData: - """Instance list properties""" - - bot: Optional[str] - """The ID of the bot associated with the ability""" - - commentary: Optional[str] - created_at: float - """The timestamp (ms) when the instance was created""" +class ConversationCreateRequest: + """A bot configuration or reference + + A bot configuration that can be applied without a dedicated bot instance. + """ + contact_id: Optional[str] + """The contact id assigned to this conversation""" description: Optional[str] """The associated description""" - file: Optional[str] - """The ID of the file associated with the ability""" - - icon: str - id: str - """The instance ID""" + messages: Optional[List[ConversationCreateRequestMessage]] + """An array of messages to be added to the conversation""" - instruction: str meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - provider: Optional[str] - """The provider of the ability""" + space_id: Optional[str] + """The space id assigned to this conversation""" - schema: DataSchema - """A JSON Schema object type definition (https://json-schema.org/). Represents an object - schema with properties and validation rules. - """ - secret: Optional[str] - """The ID of the secret associated with the ability""" + task_id: Optional[str] + """The task id assigned to this conversation""" - setup: Optional[str] - space: Optional[str] - """The ID of the space associated with the ability""" + bot_id: Optional[str] + """The ID of the bot this configuration is using""" - tags: Optional[List[str]] - template: Optional[str] - """The original template identifier for the ability""" + backstory: Optional[str] + """The backstory this configuration is using""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + dataset_id: Optional[str] + """The id of the dataset this configuration is using""" - def __init__(self, bot: Optional[str], commentary: Optional[str], created_at: float, description: Optional[str], file: Optional[str], icon: str, id: str, instruction: str, meta: Optional[Dict[str, Any]], name: Optional[str], provider: Optional[str], schema: DataSchema, secret: Optional[str], setup: Optional[str], space: Optional[str], tags: Optional[List[str]], template: Optional[str], updated_at: float) -> None: - self.bot = bot - self.commentary = commentary - self.created_at = created_at + model: Optional[str] + """A model definition""" + + moderation: Optional[bool] + """The moderation flag for this configuration""" + + privacy: Optional[bool] + """The privacy flag for this configuration""" + + skillset_id: Optional[str] + """The id of the skillset this configuration is using""" + + def __init__(self, contact_id: Optional[str], description: Optional[str], messages: Optional[List[ConversationCreateRequestMessage]], meta: Optional[Dict[str, Any]], name: Optional[str], space_id: Optional[str], task_id: Optional[str], bot_id: Optional[str], backstory: Optional[str], dataset_id: Optional[str], model: Optional[str], moderation: Optional[bool], privacy: Optional[bool], skillset_id: Optional[str]) -> None: + self.contact_id = contact_id self.description = description - self.file = file - self.icon = icon - self.id = id - self.instruction = instruction + self.messages = messages self.meta = meta self.name = name - self.provider = provider - self.schema = schema - self.secret = secret - self.setup = setup - self.space = space - self.tags = tags - self.template = template - self.updated_at = updated_at + self.space_id = space_id + self.task_id = task_id + self.bot_id = bot_id + self.backstory = backstory + self.dataset_id = dataset_id + self.model = model + self.moderation = moderation + self.privacy = privacy + self.skillset_id = skillset_id @staticmethod - def from_dict(obj: Any) -> 'PlatformAbilityListStreamItemData': + def from_dict(obj: Any) -> 'ConversationCreateRequest': assert isinstance(obj, dict) - bot = from_union([from_str, from_none], obj.get("bot")) - commentary = from_union([from_str, from_none], obj.get("commentary")) - created_at = from_float(obj.get("createdAt")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) description = from_union([from_str, from_none], obj.get("description")) - file = from_union([from_str, from_none], obj.get("file")) - icon = from_str(obj.get("icon")) - id = from_str(obj.get("id")) - instruction = from_str(obj.get("instruction")) + messages = from_union([lambda x: from_list(ConversationCreateRequestMessage.from_dict, x), from_none], obj.get("messages")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - provider = from_union([from_str, from_none], obj.get("provider")) - schema = DataSchema.from_dict(obj.get("schema")) - secret = from_union([from_str, from_none], obj.get("secret")) - setup = from_union([from_str, from_none], obj.get("setup")) - space = from_union([from_str, from_none], obj.get("space")) - tags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tags")) - template = from_union([from_str, from_none], obj.get("template")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformAbilityListStreamItemData(bot, commentary, created_at, description, file, icon, id, instruction, meta, name, provider, schema, secret, setup, space, tags, template, updated_at) + space_id = from_union([from_str, from_none], obj.get("spaceId")) + task_id = from_union([from_str, from_none], obj.get("taskId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + backstory = from_union([from_str, from_none], obj.get("backstory")) + dataset_id = from_union([from_str, from_none], obj.get("datasetId")) + model = from_union([from_str, from_none], obj.get("model")) + moderation = from_union([from_bool, from_none], obj.get("moderation")) + privacy = from_union([from_bool, from_none], obj.get("privacy")) + skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + return ConversationCreateRequest(contact_id, description, messages, meta, name, space_id, task_id, bot_id, backstory, dataset_id, model, moderation, privacy, skillset_id) def to_dict(self) -> dict: result: dict = {} - if self.bot is not None: - result["bot"] = from_union([from_str, from_none], self.bot) - if self.commentary is not None: - result["commentary"] = from_union([from_str, from_none], self.commentary) - result["createdAt"] = to_float(self.created_at) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.file is not None: - result["file"] = from_union([from_str, from_none], self.file) - result["icon"] = from_str(self.icon) - result["id"] = from_str(self.id) - result["instruction"] = from_str(self.instruction) + if self.messages is not None: + result["messages"] = from_union([lambda x: from_list(lambda x: to_class(ConversationCreateRequestMessage, x), x), from_none], self.messages) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.provider is not None: - result["provider"] = from_union([from_str, from_none], self.provider) - result["schema"] = to_class(DataSchema, self.schema) - if self.secret is not None: - result["secret"] = from_union([from_str, from_none], self.secret) - if self.setup is not None: - result["setup"] = from_union([from_str, from_none], self.setup) - if self.space is not None: - result["space"] = from_union([from_str, from_none], self.space) - if self.tags is not None: - result["tags"] = from_union([lambda x: from_list(from_str, x), from_none], self.tags) - if self.template is not None: - result["template"] = from_union([from_str, from_none], self.template) - result["updatedAt"] = to_float(self.updated_at) + if self.space_id is not None: + result["spaceId"] = from_union([from_str, from_none], self.space_id) + if self.task_id is not None: + result["taskId"] = from_union([from_str, from_none], self.task_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.backstory is not None: + result["backstory"] = from_union([from_str, from_none], self.backstory) + if self.dataset_id is not None: + result["datasetId"] = from_union([from_str, from_none], self.dataset_id) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) + if self.moderation is not None: + result["moderation"] = from_union([from_bool, from_none], self.moderation) + if self.privacy is not None: + result["privacy"] = from_union([from_bool, from_none], self.privacy) + if self.skillset_id is not None: + result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) return result -class PlatformAbilityListStreamItemType(Enum): - """The type of event""" +class Type10(Enum): + """The type of the message""" - ITEM = "item" + ACTIVITY = "activity" + BACKSTORY = "backstory" + BOT = "bot" + CHECKPOINT = "checkpoint" + CONTEXT = "context" + INSTRUCTION = "instruction" + REASONING = "reasoning" + USER = "user" -class PlatformAbilityListStreamItem: - data: PlatformAbilityListStreamItemData - """Instance list properties""" +class ConversationCreateResponseMessage: + text: str + """The text of the message""" - type: PlatformAbilityListStreamItemType - """The type of event""" + type: Type10 + """The type of the message""" - def __init__(self, data: PlatformAbilityListStreamItemData, type: PlatformAbilityListStreamItemType) -> None: - self.data = data + def __init__(self, text: str, type: Type10) -> None: + self.text = text self.type = type @staticmethod - def from_dict(obj: Any) -> 'PlatformAbilityListStreamItem': + def from_dict(obj: Any) -> 'ConversationCreateResponseMessage': assert isinstance(obj, dict) - data = PlatformAbilityListStreamItemData.from_dict(obj.get("data")) - type = PlatformAbilityListStreamItemType(obj.get("type")) - return PlatformAbilityListStreamItem(data, type) + text = from_str(obj.get("text")) + type = Type10(obj.get("type")) + return ConversationCreateResponseMessage(text, type) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(PlatformAbilityListStreamItemData, self.data) - result["type"] = to_enum(PlatformAbilityListStreamItemType, self.type) + result["text"] = from_str(self.text) + result["type"] = to_enum(Type10, self.type) return result -class PlatformAbilitiesSearchRequest: - search: str - """The search query to find relevant abilities""" +class ConversationCreateResponse: + id: str + """The ID of the created conversation""" - take: Optional[int] - """The maximum number of results to return (1-100, default 10)""" + messages: Optional[List[ConversationCreateResponseMessage]] + """An array of messages included in the conversation""" - def __init__(self, search: str, take: Optional[int]) -> None: - self.search = search - self.take = take + def __init__(self, id: str, messages: Optional[List[ConversationCreateResponseMessage]]) -> None: + self.id = id + self.messages = messages @staticmethod - def from_dict(obj: Any) -> 'PlatformAbilitiesSearchRequest': + def from_dict(obj: Any) -> 'ConversationCreateResponse': assert isinstance(obj, dict) - search = from_str(obj.get("search")) - take = from_union([from_int, from_none], obj.get("take")) - return PlatformAbilitiesSearchRequest(search, take) + id = from_str(obj.get("id")) + messages = from_union([lambda x: from_list(ConversationCreateResponseMessage.from_dict, x), from_none], obj.get("messages")) + return ConversationCreateResponse(id, messages) def to_dict(self) -> dict: result: dict = {} - result["search"] = from_str(self.search) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["id"] = from_str(self.id) + if self.messages is not None: + result["messages"] = from_union([lambda x: from_list(lambda x: to_class(ConversationCreateResponseMessage, x), x), from_none], self.messages) return result -class Type10(Enum): - """The schema type, must be "object\"""" +class ConversationCompleteRequestAttachment: + url: Optional[str] + """The URL of the attachment""" - OBJECT = "object" + def __init__(self, url: Optional[str]) -> None: + self.url = url + @staticmethod + def from_dict(obj: Any) -> 'ConversationCompleteRequestAttachment': + assert isinstance(obj, dict) + url = from_union([from_str, from_none], obj.get("url")) + return ConversationCompleteRequestAttachment(url) + + def to_dict(self) -> dict: + result: dict = {} + if self.url is not None: + result["url"] = from_union([from_str, from_none], self.url) + return result + + +class FluffyContactID: + """A contact object to create or retrieve a trusted contact""" -class FluffySchema: - """A JSON Schema object type definition (https://json-schema.org/). Represents an object - schema with properties and validation rules. - """ description: Optional[str] - """The schema description""" + """A description of the contact""" - properties: Dict[str, Any] - """Object property definitions""" + email: Optional[str] + """The email address of the contact""" - required: Optional[List[str]] - """Required property names""" + fingerprint: str + """A unique fingerprint to identify the contact""" - title: Optional[str] - """The schema title""" + meta: Optional[Dict[str, Any]] + """Additional metadata for the contact""" - type: Type10 - """The schema type, must be "object\"""" + name: Optional[str] + """The name of the contact""" + + nick: Optional[str] + """A nickname for the contact""" + + phone: Optional[str] + """The phone number of the contact""" - def __init__(self, description: Optional[str], properties: Dict[str, Any], required: Optional[List[str]], title: Optional[str], type: Type10) -> None: + def __init__(self, description: Optional[str], email: Optional[str], fingerprint: str, meta: Optional[Dict[str, Any]], name: Optional[str], nick: Optional[str], phone: Optional[str]) -> None: self.description = description - self.properties = properties - self.required = required - self.title = title - self.type = type + self.email = email + self.fingerprint = fingerprint + self.meta = meta + self.name = name + self.nick = nick + self.phone = phone @staticmethod - def from_dict(obj: Any) -> 'FluffySchema': + def from_dict(obj: Any) -> 'FluffyContactID': assert isinstance(obj, dict) description = from_union([from_str, from_none], obj.get("description")) - properties = from_dict(lambda x: x, obj.get("properties")) - required = from_union([lambda x: from_list(from_str, x), from_none], obj.get("required")) - title = from_union([from_str, from_none], obj.get("title")) - type = Type10(obj.get("type")) - return FluffySchema(description, properties, required, title, type) + email = from_union([from_str, from_none], obj.get("email")) + fingerprint = from_str(obj.get("fingerprint")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + nick = from_union([from_str, from_none], obj.get("nick")) + phone = from_union([from_str, from_none], obj.get("phone")) + return FluffyContactID(description, email, fingerprint, meta, name, nick, phone) def to_dict(self) -> dict: result: dict = {} if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - result["properties"] = from_dict(lambda x: x, self.properties) - if self.required is not None: - result["required"] = from_union([lambda x: from_list(from_str, x), from_none], self.required) - if self.title is not None: - result["title"] = from_union([from_str, from_none], self.title) - result["type"] = to_enum(Type10, self.type) + if self.email is not None: + result["email"] = from_union([from_str, from_none], self.email) + result["fingerprint"] = from_str(self.fingerprint) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.nick is not None: + result["nick"] = from_union([from_str, from_none], self.nick) + if self.phone is not None: + result["phone"] = from_union([from_str, from_none], self.phone) return result -class PlatformAbilitiesSearchResponseItem: - """Instance list properties""" - - bot: Optional[str] - commentary: Optional[str] - created_at: float - """The timestamp (ms) when the instance was created""" - - description: str - """The associated description""" +class FluffyRecord: + meta: Optional[Dict[str, Any]] + """Additional metadata for the record""" - excerpt: str - """An excerpt from the most relevant part of the ability""" + text: str + """The text content of the record""" - file: Optional[str] - icon: str - id: str - """The instance ID""" + def __init__(self, meta: Optional[Dict[str, Any]], text: str) -> None: + self.meta = meta + self.text = text - instruction: str - link: Optional[str] - """The URL to the official ability page""" + @staticmethod + def from_dict(obj: Any) -> 'FluffyRecord': + assert isinstance(obj, dict) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + text = from_str(obj.get("text")) + return FluffyRecord(meta, text) - meta: Optional[Dict[str, Any]] - """Meta data information""" + def to_dict(self) -> dict: + result: dict = {} + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + result["text"] = from_str(self.text) + return result - name: str - """The associated name""" - provider: Optional[str] - schema: FluffySchema - """A JSON Schema object type definition (https://json-schema.org/). Represents an object - schema with properties and validation rules. - """ - score: float - """The similarity score of the search result""" +class FluffyDataset: + description: Optional[str] + """The description of the dataset""" - secret: Optional[str] - setup: Optional[str] - space: Optional[str] - tags: Optional[List[str]] - template: Optional[str] - """The original template identifier for the ability""" + name: Optional[str] + """The name of the dataset""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + records: List[FluffyRecord] + """The records in the dataset""" - def __init__(self, bot: Optional[str], commentary: Optional[str], created_at: float, description: str, excerpt: str, file: Optional[str], icon: str, id: str, instruction: str, link: Optional[str], meta: Optional[Dict[str, Any]], name: str, provider: Optional[str], schema: FluffySchema, score: float, secret: Optional[str], setup: Optional[str], space: Optional[str], tags: Optional[List[str]], template: Optional[str], updated_at: float) -> None: - self.bot = bot - self.commentary = commentary - self.created_at = created_at + def __init__(self, description: Optional[str], name: Optional[str], records: List[FluffyRecord]) -> None: self.description = description - self.excerpt = excerpt - self.file = file - self.icon = icon - self.id = id - self.instruction = instruction - self.link = link - self.meta = meta self.name = name - self.provider = provider - self.schema = schema - self.score = score - self.secret = secret - self.setup = setup - self.space = space - self.tags = tags - self.template = template - self.updated_at = updated_at + self.records = records @staticmethod - def from_dict(obj: Any) -> 'PlatformAbilitiesSearchResponseItem': + def from_dict(obj: Any) -> 'FluffyDataset': assert isinstance(obj, dict) - bot = from_union([from_str, from_none], obj.get("bot")) - commentary = from_union([from_str, from_none], obj.get("commentary")) - created_at = from_float(obj.get("createdAt")) - description = from_str(obj.get("description")) - excerpt = from_str(obj.get("excerpt")) - file = from_union([from_str, from_none], obj.get("file")) - icon = from_str(obj.get("icon")) - id = from_str(obj.get("id")) - instruction = from_str(obj.get("instruction")) - link = from_union([from_str, from_none], obj.get("link")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - provider = from_union([from_str, from_none], obj.get("provider")) - schema = FluffySchema.from_dict(obj.get("schema")) - score = from_float(obj.get("score")) - secret = from_union([from_str, from_none], obj.get("secret")) - setup = from_union([from_str, from_none], obj.get("setup")) - space = from_union([from_str, from_none], obj.get("space")) - tags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tags")) - template = from_union([from_str, from_none], obj.get("template")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformAbilitiesSearchResponseItem(bot, commentary, created_at, description, excerpt, file, icon, id, instruction, link, meta, name, provider, schema, score, secret, setup, space, tags, template, updated_at) + description = from_union([from_str, from_none], obj.get("description")) + name = from_union([from_str, from_none], obj.get("name")) + records = from_list(FluffyRecord.from_dict, obj.get("records")) + return FluffyDataset(description, name, records) def to_dict(self) -> dict: result: dict = {} - if self.bot is not None: - result["bot"] = from_union([from_str, from_none], self.bot) - if self.commentary is not None: - result["commentary"] = from_union([from_str, from_none], self.commentary) - result["createdAt"] = to_float(self.created_at) - result["description"] = from_str(self.description) - result["excerpt"] = from_str(self.excerpt) - if self.file is not None: - result["file"] = from_union([from_str, from_none], self.file) - result["icon"] = from_str(self.icon) - result["id"] = from_str(self.id) - result["instruction"] = from_str(self.instruction) - if self.link is not None: - result["link"] = from_union([from_str, from_none], self.link) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - if self.provider is not None: - result["provider"] = from_union([from_str, from_none], self.provider) - result["schema"] = to_class(FluffySchema, self.schema) - result["score"] = to_float(self.score) - if self.secret is not None: - result["secret"] = from_union([from_str, from_none], self.secret) - if self.setup is not None: - result["setup"] = from_union([from_str, from_none], self.setup) - if self.space is not None: - result["space"] = from_union([from_str, from_none], self.space) - if self.tags is not None: - result["tags"] = from_union([lambda x: from_list(from_str, x), from_none], self.tags) - if self.template is not None: - result["template"] = from_union([from_str, from_none], self.template) - result["updatedAt"] = to_float(self.updated_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + result["records"] = from_list(lambda x: to_class(FluffyRecord, x), self.records) return result -class PlatformAbilitiesSearchResponse: - items: List[PlatformAbilitiesSearchResponseItem] +class FluffyFeature: + name: str + """The name of the feature to enable""" - def __init__(self, items: List[PlatformAbilitiesSearchResponseItem]) -> None: - self.items = items + options: Optional[Dict[str, Any]] + """Optional configuration options for the feature""" + + def __init__(self, name: str, options: Optional[Dict[str, Any]]) -> None: + self.name = name + self.options = options @staticmethod - def from_dict(obj: Any) -> 'PlatformAbilitiesSearchResponse': + def from_dict(obj: Any) -> 'FluffyFeature': assert isinstance(obj, dict) - items = from_list(PlatformAbilitiesSearchResponseItem.from_dict, obj.get("items")) - return PlatformAbilitiesSearchResponse(items) + name = from_str(obj.get("name")) + options = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("options")) + return FluffyFeature(name, options) def to_dict(self) -> dict: result: dict = {} - result["items"] = from_list(lambda x: to_class(PlatformAbilitiesSearchResponseItem, x), self.items) + result["name"] = from_str(self.name) + if self.options is not None: + result["options"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.options) return result -class PlatformActionListParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" +class FluffyAbility: + description: str + """The description of the ability""" + instruction: str + """The instruction for the ability""" -class PlatformActionListParams: - cursor: Optional[str] - """The cursor to use for pagination""" + linked_secret_id: Optional[str] + """Optional secret ID for the ability""" - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" + linked_space_id: Optional[str] + """Optional space ID for the ability""" - order: Optional[PlatformActionListParamsOrder] - """The order of the paginated items""" + meta: Optional[Dict[str, Any]] + """Additional metadata for the ability""" - take: Optional[int] - """The number of items to retrieve""" + name: str + """The name of the ability""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[PlatformActionListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor + def __init__(self, description: str, instruction: str, linked_secret_id: Optional[str], linked_space_id: Optional[str], meta: Optional[Dict[str, Any]], name: str) -> None: + self.description = description + self.instruction = instruction + self.linked_secret_id = linked_secret_id + self.linked_space_id = linked_space_id self.meta = meta - self.order = order - self.take = take + self.name = name @staticmethod - def from_dict(obj: Any) -> 'PlatformActionListParams': + def from_dict(obj: Any) -> 'FluffyAbility': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([PlatformActionListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return PlatformActionListParams(cursor, meta, order, take) + description = from_str(obj.get("description")) + instruction = from_str(obj.get("instruction")) + linked_secret_id = from_union([from_str, from_none], obj.get("linkedSecretId")) + linked_space_id = from_union([from_str, from_none], obj.get("linkedSpaceId")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_str(obj.get("name")) + return FluffyAbility(description, instruction, linked_secret_id, linked_space_id, meta, name) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) + result["description"] = from_str(self.description) + result["instruction"] = from_str(self.instruction) + if self.linked_secret_id is not None: + result["linkedSecretId"] = from_union([from_str, from_none], self.linked_secret_id) + if self.linked_space_id is not None: + result["linkedSpaceId"] = from_union([from_str, from_none], self.linked_space_id) if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(PlatformActionListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + result["name"] = from_str(self.name) return result -class PlatformActionListResponseItem: - """Instance list properties""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - description: str - """The description of the action""" - - examples: List[str] - """Example demonstrating the action usage""" - - id: str - """The instance ID""" +class FluffySkillset: + abilities: List[FluffyAbility] + """The abilities in the skillset""" - meta: Optional[Dict[str, Any]] - """Meta data information""" + description: Optional[str] + """The description of the skillset""" name: Optional[str] - """The associated name""" - - updated_at: float - """The timestamp (ms) when the instance was updated""" + """The name of the skillset""" - def __init__(self, created_at: float, description: str, examples: List[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: - self.created_at = created_at + def __init__(self, abilities: List[FluffyAbility], description: Optional[str], name: Optional[str]) -> None: + self.abilities = abilities self.description = description - self.examples = examples - self.id = id - self.meta = meta self.name = name - self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'PlatformActionListResponseItem': + def from_dict(obj: Any) -> 'FluffySkillset': assert isinstance(obj, dict) - created_at = from_float(obj.get("createdAt")) - description = from_str(obj.get("description")) - examples = from_list(from_str, obj.get("examples")) - id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + abilities = from_list(FluffyAbility.from_dict, obj.get("abilities")) + description = from_union([from_str, from_none], obj.get("description")) name = from_union([from_str, from_none], obj.get("name")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformActionListResponseItem(created_at, description, examples, id, meta, name, updated_at) + return FluffySkillset(abilities, description, name) def to_dict(self) -> dict: result: dict = {} - result["createdAt"] = to_float(self.created_at) - result["description"] = from_str(self.description) - result["examples"] = from_list(from_str, self.examples) - result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + result["abilities"] = from_list(lambda x: to_class(FluffyAbility, x), self.abilities) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - result["updatedAt"] = to_float(self.updated_at) return result -class PlatformActionListResponse: - cursor: str - """Cursor for fetching the next page""" +class ConversationCompleteRequestExtensions: + """Extensions to enhance the bot's capabilities""" - items: List[PlatformActionListResponseItem] + backstory: Optional[str] + """Additional backstory for the bot""" - def __init__(self, cursor: str, items: List[PlatformActionListResponseItem]) -> None: - self.cursor = cursor - self.items = items + datasets: Optional[List[FluffyDataset]] + """Inline datasets to provide additional context""" + + features: Optional[List[FluffyFeature]] + """Feature flags to enable specific bot capabilities""" + + skillsets: Optional[List[FluffySkillset]] + """Inline skillsets to provide additional abilities""" + + def __init__(self, backstory: Optional[str], datasets: Optional[List[FluffyDataset]], features: Optional[List[FluffyFeature]], skillsets: Optional[List[FluffySkillset]]) -> None: + self.backstory = backstory + self.datasets = datasets + self.features = features + self.skillsets = skillsets @staticmethod - def from_dict(obj: Any) -> 'PlatformActionListResponse': + def from_dict(obj: Any) -> 'ConversationCompleteRequestExtensions': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(PlatformActionListResponseItem.from_dict, obj.get("items")) - return PlatformActionListResponse(cursor, items) + backstory = from_union([from_str, from_none], obj.get("backstory")) + datasets = from_union([lambda x: from_list(FluffyDataset.from_dict, x), from_none], obj.get("datasets")) + features = from_union([lambda x: from_list(FluffyFeature.from_dict, x), from_none], obj.get("features")) + skillsets = from_union([lambda x: from_list(FluffySkillset.from_dict, x), from_none], obj.get("skillsets")) + return ConversationCompleteRequestExtensions(backstory, datasets, features, skillsets) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(PlatformActionListResponseItem, x), self.items) + if self.backstory is not None: + result["backstory"] = from_union([from_str, from_none], self.backstory) + if self.datasets is not None: + result["datasets"] = from_union([lambda x: from_list(lambda x: to_class(FluffyDataset, x), x), from_none], self.datasets) + if self.features is not None: + result["features"] = from_union([lambda x: from_list(lambda x: to_class(FluffyFeature, x), x), from_none], self.features) + if self.skillsets is not None: + result["skillsets"] = from_union([lambda x: from_list(lambda x: to_class(FluffySkillset, x), x), from_none], self.skillsets) return result -class PlatformActionListStreamItemData: - """Instance list properties""" +class FluffyCall: + """Configuration for when this function should be automatically called""" - created_at: float - """The timestamp (ms) when the instance was created""" + end: Optional[bool] + """If true, this function will be force-called at the end of the conversation""" - description: str - """The description of the action""" + start: Optional[bool] + """If true, this function will be force-called at the start of the conversation""" - examples: List[str] - """Example demonstrating the action usage""" + def __init__(self, end: Optional[bool], start: Optional[bool]) -> None: + self.end = end + self.start = start - id: str - """The instance ID""" + @staticmethod + def from_dict(obj: Any) -> 'FluffyCall': + assert isinstance(obj, dict) + end = from_union([from_bool, from_none], obj.get("end")) + start = from_union([from_bool, from_none], obj.get("start")) + return FluffyCall(end, start) - meta: Optional[Dict[str, Any]] - """Meta data information""" + def to_dict(self) -> dict: + result: dict = {} + if self.end is not None: + result["end"] = from_union([from_bool, from_none], self.end) + if self.start is not None: + result["start"] = from_union([from_bool, from_none], self.start) + return result - name: Optional[str] - """The associated name""" - updated_at: float - """The timestamp (ms) when the instance was updated""" +class Type11(Enum): + """The schema type, must be "object\"""" - def __init__(self, created_at: float, description: str, examples: List[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: - self.created_at = created_at - self.description = description - self.examples = examples - self.id = id - self.meta = meta - self.name = name - self.updated_at = updated_at + OBJECT = "object" + + +class FluffyParameters: + """JSON Schema definition for the function parameters""" + + properties: Dict[str, Any] + """Object property definitions""" + + required: Optional[List[str]] + """Required property names""" + + type: Type11 + """The schema type, must be "object\"""" + + def __init__(self, properties: Dict[str, Any], required: Optional[List[str]], type: Type11) -> None: + self.properties = properties + self.required = required + self.type = type @staticmethod - def from_dict(obj: Any) -> 'PlatformActionListStreamItemData': + def from_dict(obj: Any) -> 'FluffyParameters': assert isinstance(obj, dict) - created_at = from_float(obj.get("createdAt")) - description = from_str(obj.get("description")) - examples = from_list(from_str, obj.get("examples")) - id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformActionListStreamItemData(created_at, description, examples, id, meta, name, updated_at) + properties = from_dict(lambda x: x, obj.get("properties")) + required = from_union([lambda x: from_list(from_str, x), from_none], obj.get("required")) + type = Type11(obj.get("type")) + return FluffyParameters(properties, required, type) def to_dict(self) -> dict: result: dict = {} - result["createdAt"] = to_float(self.created_at) - result["description"] = from_str(self.description) - result["examples"] = from_list(from_str, self.examples) - result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - result["updatedAt"] = to_float(self.updated_at) + result["properties"] = from_dict(lambda x: x, self.properties) + if self.required is not None: + result["required"] = from_union([lambda x: from_list(from_str, x), from_none], self.required) + result["type"] = to_enum(Type11, self.type) return result -class PlatformActionListStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - +class FluffyResult: + """The result of the function execution""" -class PlatformActionListStreamItem: - data: PlatformActionListStreamItemData - """Instance list properties""" + data: Any + """The data returned by the function (can be any type)""" - type: PlatformActionListStreamItemType - """The type of event""" + channel: Optional[str] + """The channel for streaming function results""" - def __init__(self, data: PlatformActionListStreamItemData, type: PlatformActionListStreamItemType) -> None: + def __init__(self, data: Any, channel: Optional[str]) -> None: self.data = data - self.type = type + self.channel = channel @staticmethod - def from_dict(obj: Any) -> 'PlatformActionListStreamItem': + def from_dict(obj: Any) -> 'FluffyResult': assert isinstance(obj, dict) - data = PlatformActionListStreamItemData.from_dict(obj.get("data")) - type = PlatformActionListStreamItemType(obj.get("type")) - return PlatformActionListStreamItem(data, type) + data = obj.get("data") + channel = from_union([from_str, from_none], obj.get("channel")) + return FluffyResult(data, channel) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(PlatformActionListStreamItemData, self.data) - result["type"] = to_enum(PlatformActionListStreamItemType, self.type) + if self.data is not None: + result["data"] = self.data + if self.channel is not None: + result["channel"] = from_union([from_str, from_none], self.channel) return result -class PlatformDocFetchParams: - doc_id: str - """The ID of the doc to fetch (e.g., "datasets", "skillsets")""" +class ConversationCompleteRequestFunction: + call: Optional[FluffyCall] + """Configuration for when this function should be automatically called""" + + description: str + """The description of the function""" + + name: str + """The name of the function (must be a valid JS identifier, max 64 chars)""" + + parameters: FluffyParameters + """JSON Schema definition for the function parameters""" + + result: Optional[FluffyResult] + """The result of the function execution""" - def __init__(self, doc_id: str) -> None: - self.doc_id = doc_id + def __init__(self, call: Optional[FluffyCall], description: str, name: str, parameters: FluffyParameters, result: Optional[FluffyResult]) -> None: + self.call = call + self.description = description + self.name = name + self.parameters = parameters + self.result = result @staticmethod - def from_dict(obj: Any) -> 'PlatformDocFetchParams': + def from_dict(obj: Any) -> 'ConversationCompleteRequestFunction': assert isinstance(obj, dict) - doc_id = from_str(obj.get("docId")) - return PlatformDocFetchParams(doc_id) + call = from_union([FluffyCall.from_dict, from_none], obj.get("call")) + description = from_str(obj.get("description")) + name = from_str(obj.get("name")) + parameters = FluffyParameters.from_dict(obj.get("parameters")) + result = from_union([FluffyResult.from_dict, from_none], obj.get("result")) + return ConversationCompleteRequestFunction(call, description, name, parameters, result) def to_dict(self) -> dict: result: dict = {} - result["docId"] = from_str(self.doc_id) + if self.call is not None: + result["call"] = from_union([lambda x: to_class(FluffyCall, x), from_none], self.call) + result["description"] = from_str(self.description) + result["name"] = from_str(self.name) + result["parameters"] = to_class(FluffyParameters, self.parameters) + if self.result is not None: + result["result"] = from_union([lambda x: to_class(FluffyResult, x), from_none], self.result) return result -class PlatformDocFetchResponse: - """Instance list properties""" +class ConversationCompleteRequestLimits: + """Execution limits to control conversation processing bounds""" + + calls: Optional[int] + """Maximum number of function/tool calls. Controls how many total function calls can be made + during the conversation. + """ + continuations: Optional[int] + """Maximum number of model continuations. Controls how many times the model can continue + generating after reaching a stop condition. + """ + iterations: Optional[int] + """Maximum number of agentic iterations. Controls how many times the model can iterate + through tool calls and responses. + """ - category: Optional[str] - """The category of the manual""" + def __init__(self, calls: Optional[int], continuations: Optional[int], iterations: Optional[int]) -> None: + self.calls = calls + self.continuations = continuations + self.iterations = iterations - content: str - """The markdown content of the doc""" + @staticmethod + def from_dict(obj: Any) -> 'ConversationCompleteRequestLimits': + assert isinstance(obj, dict) + calls = from_union([from_int, from_none], obj.get("calls")) + continuations = from_union([from_int, from_none], obj.get("continuations")) + iterations = from_union([from_int, from_none], obj.get("iterations")) + return ConversationCompleteRequestLimits(calls, continuations, iterations) - created_at: float - """The timestamp (ms) when the instance was created""" + def to_dict(self) -> dict: + result: dict = {} + if self.calls is not None: + result["calls"] = from_union([from_int, from_none], self.calls) + if self.continuations is not None: + result["continuations"] = from_union([from_int, from_none], self.continuations) + if self.iterations is not None: + result["iterations"] = from_union([from_int, from_none], self.iterations) + return result - description: Optional[str] - """The associated description""" - id: str - """The instance ID""" +class Type12(Enum): + """The type of the message""" + + ACTIVITY = "activity" + BACKSTORY = "backstory" + BOT = "bot" + CHECKPOINT = "checkpoint" + CONTEXT = "context" + INSTRUCTION = "instruction" + REASONING = "reasoning" + USER = "user" - index: Optional[float] - """The display order index""" - link: Optional[str] - """The URL to the official documentation page""" +class ConversationCompleteRequestMessage: + """A message in the conversation""" meta: Optional[Dict[str, Any]] """Meta data information""" - name: str - """The associated name""" - - tags: Optional[List[str]] - """Tags associated with the doc""" + text: str + """The text of the message""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + type: Type12 + """The type of the message""" - def __init__(self, category: Optional[str], content: str, created_at: float, description: Optional[str], id: str, index: Optional[float], link: Optional[str], meta: Optional[Dict[str, Any]], name: str, tags: Optional[List[str]], updated_at: float) -> None: - self.category = category - self.content = content - self.created_at = created_at - self.description = description - self.id = id - self.index = index - self.link = link + def __init__(self, meta: Optional[Dict[str, Any]], text: str, type: Type12) -> None: self.meta = meta - self.name = name - self.tags = tags - self.updated_at = updated_at + self.text = text + self.type = type @staticmethod - def from_dict(obj: Any) -> 'PlatformDocFetchResponse': + def from_dict(obj: Any) -> 'ConversationCompleteRequestMessage': assert isinstance(obj, dict) - category = from_union([from_str, from_none], obj.get("category")) - content = from_str(obj.get("content")) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) - index = from_union([from_float, from_none], obj.get("index")) - link = from_union([from_str, from_none], obj.get("link")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - tags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tags")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformDocFetchResponse(category, content, created_at, description, id, index, link, meta, name, tags, updated_at) + text = from_str(obj.get("text")) + type = Type12(obj.get("type")) + return ConversationCompleteRequestMessage(meta, text, type) def to_dict(self) -> dict: result: dict = {} - if self.category is not None: - result["category"] = from_union([from_str, from_none], self.category) - result["content"] = from_str(self.content) - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) - if self.index is not None: - result["index"] = from_union([to_float, from_none], self.index) - if self.link is not None: - result["link"] = from_union([from_str, from_none], self.link) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - if self.tags is not None: - result["tags"] = from_union([lambda x: from_list(from_str, x), from_none], self.tags) - result["updatedAt"] = to_float(self.updated_at) + result["text"] = from_str(self.text) + result["type"] = to_enum(Type12, self.type) return result -class PlatformDocListParamsOrder(Enum): - """The order of the paginated items""" +class ConversationCompleteRequest: + """A bot configuration or reference + + A bot configuration that can be applied without a dedicated bot instance. + """ + attachments: Optional[List[ConversationCompleteRequestAttachment]] + """An array of attachments to be added to the conversation""" - ASC = "asc" - DESC = "desc" + contact_id: Optional[Union[FluffyContactID, str]] + """The contact ID to associate with this conversation""" + extensions: Optional[ConversationCompleteRequestExtensions] + """Extensions to enhance the bot's capabilities""" -class PlatformDocListParams: - cursor: Optional[str] - """The cursor to use for pagination""" + functions: Optional[List[ConversationCompleteRequestFunction]] + """An array of functions to be added to the conversation""" - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" + limits: Optional[ConversationCompleteRequestLimits] + """Execution limits to control conversation processing bounds""" - order: Optional[PlatformDocListParamsOrder] - """The order of the paginated items""" + messages: List[ConversationCompleteRequestMessage] + """An array of messages to be added to the conversation""" - take: Optional[int] - """The number of items to retrieve""" + bot_id: Optional[str] + """The ID of the bot this configuration is using""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[PlatformDocListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take + backstory: Optional[str] + """The backstory this configuration is using""" + + dataset_id: Optional[str] + """The id of the dataset this configuration is using""" + + model: Optional[str] + """A model definition""" + + moderation: Optional[bool] + """The moderation flag for this configuration""" + + privacy: Optional[bool] + """The privacy flag for this configuration""" + + skillset_id: Optional[str] + """The id of the skillset this configuration is using""" + + def __init__(self, attachments: Optional[List[ConversationCompleteRequestAttachment]], contact_id: Optional[Union[FluffyContactID, str]], extensions: Optional[ConversationCompleteRequestExtensions], functions: Optional[List[ConversationCompleteRequestFunction]], limits: Optional[ConversationCompleteRequestLimits], messages: List[ConversationCompleteRequestMessage], bot_id: Optional[str], backstory: Optional[str], dataset_id: Optional[str], model: Optional[str], moderation: Optional[bool], privacy: Optional[bool], skillset_id: Optional[str]) -> None: + self.attachments = attachments + self.contact_id = contact_id + self.extensions = extensions + self.functions = functions + self.limits = limits + self.messages = messages + self.bot_id = bot_id + self.backstory = backstory + self.dataset_id = dataset_id + self.model = model + self.moderation = moderation + self.privacy = privacy + self.skillset_id = skillset_id @staticmethod - def from_dict(obj: Any) -> 'PlatformDocListParams': + def from_dict(obj: Any) -> 'ConversationCompleteRequest': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([PlatformDocListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return PlatformDocListParams(cursor, meta, order, take) + attachments = from_union([lambda x: from_list(ConversationCompleteRequestAttachment.from_dict, x), from_none], obj.get("attachments")) + contact_id = from_union([FluffyContactID.from_dict, from_str, from_none], obj.get("contactId")) + extensions = from_union([ConversationCompleteRequestExtensions.from_dict, from_none], obj.get("extensions")) + functions = from_union([lambda x: from_list(ConversationCompleteRequestFunction.from_dict, x), from_none], obj.get("functions")) + limits = from_union([ConversationCompleteRequestLimits.from_dict, from_none], obj.get("limits")) + messages = from_list(ConversationCompleteRequestMessage.from_dict, obj.get("messages")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + backstory = from_union([from_str, from_none], obj.get("backstory")) + dataset_id = from_union([from_str, from_none], obj.get("datasetId")) + model = from_union([from_str, from_none], obj.get("model")) + moderation = from_union([from_bool, from_none], obj.get("moderation")) + privacy = from_union([from_bool, from_none], obj.get("privacy")) + skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + return ConversationCompleteRequest(attachments, contact_id, extensions, functions, limits, messages, bot_id, backstory, dataset_id, model, moderation, privacy, skillset_id) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(PlatformDocListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + if self.attachments is not None: + result["attachments"] = from_union([lambda x: from_list(lambda x: to_class(ConversationCompleteRequestAttachment, x), x), from_none], self.attachments) + if self.contact_id is not None: + result["contactId"] = from_union([lambda x: to_class(FluffyContactID, x), from_str, from_none], self.contact_id) + if self.extensions is not None: + result["extensions"] = from_union([lambda x: to_class(ConversationCompleteRequestExtensions, x), from_none], self.extensions) + if self.functions is not None: + result["functions"] = from_union([lambda x: from_list(lambda x: to_class(ConversationCompleteRequestFunction, x), x), from_none], self.functions) + if self.limits is not None: + result["limits"] = from_union([lambda x: to_class(ConversationCompleteRequestLimits, x), from_none], self.limits) + result["messages"] = from_list(lambda x: to_class(ConversationCompleteRequestMessage, x), self.messages) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.backstory is not None: + result["backstory"] = from_union([from_str, from_none], self.backstory) + if self.dataset_id is not None: + result["datasetId"] = from_union([from_str, from_none], self.dataset_id) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) + if self.moderation is not None: + result["moderation"] = from_union([from_bool, from_none], self.moderation) + if self.privacy is not None: + result["privacy"] = from_union([from_bool, from_none], self.privacy) + if self.skillset_id is not None: + result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) return result -class PlatformDocListResponseItem: - """Instance list properties""" - - category: Optional[str] - """The category of the doc""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - description: str - """The associated description""" - - id: str - """The instance ID""" - - index: float - """The display order index""" - - link: str - """The URL to the official documentation page""" +class PurpleReason(Enum): + """The reason why the completion ended""" - meta: Optional[Dict[str, Any]] - """Meta data information""" + ABORT = "abort" + ACTIVITY = "activity" + ERROR = "error" + ITERATION = "iteration" + LENGTH = "length" + STOP = "stop" - name: str - """The associated name""" - tags: List[str] - """Tags associated with the doc""" +class ConversationCompleteResponseEnd: + """Information about why the completion ended""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + reason: PurpleReason + """The reason why the completion ended""" - def __init__(self, category: Optional[str], created_at: float, description: str, id: str, index: float, link: str, meta: Optional[Dict[str, Any]], name: str, tags: List[str], updated_at: float) -> None: - self.category = category - self.created_at = created_at - self.description = description - self.id = id - self.index = index - self.link = link - self.meta = meta - self.name = name - self.tags = tags - self.updated_at = updated_at + def __init__(self, reason: PurpleReason) -> None: + self.reason = reason @staticmethod - def from_dict(obj: Any) -> 'PlatformDocListResponseItem': + def from_dict(obj: Any) -> 'ConversationCompleteResponseEnd': assert isinstance(obj, dict) - category = from_union([from_str, from_none], obj.get("category")) - created_at = from_float(obj.get("createdAt")) - description = from_str(obj.get("description")) - id = from_str(obj.get("id")) - index = from_float(obj.get("index")) - link = from_str(obj.get("link")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - tags = from_list(from_str, obj.get("tags")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformDocListResponseItem(category, created_at, description, id, index, link, meta, name, tags, updated_at) + reason = PurpleReason(obj.get("reason")) + return ConversationCompleteResponseEnd(reason) def to_dict(self) -> dict: result: dict = {} - if self.category is not None: - result["category"] = from_union([from_str, from_none], self.category) - result["createdAt"] = to_float(self.created_at) - result["description"] = from_str(self.description) - result["id"] = from_str(self.id) - result["index"] = to_float(self.index) - result["link"] = from_str(self.link) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - result["tags"] = from_list(from_str, self.tags) - result["updatedAt"] = to_float(self.updated_at) + result["reason"] = to_enum(PurpleReason, self.reason) return result -class PlatformDocListResponse: - cursor: str - """Cursor for fetching the next page""" +class ConversationCompleteResponseUsage: + """Usage information""" - items: List[PlatformDocListResponseItem] + token: float + """The tokens used in this exchange""" - def __init__(self, cursor: str, items: List[PlatformDocListResponseItem]) -> None: - self.cursor = cursor - self.items = items + def __init__(self, token: float) -> None: + self.token = token @staticmethod - def from_dict(obj: Any) -> 'PlatformDocListResponse': + def from_dict(obj: Any) -> 'ConversationCompleteResponseUsage': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(PlatformDocListResponseItem.from_dict, obj.get("items")) - return PlatformDocListResponse(cursor, items) + token = from_float(obj.get("token")) + return ConversationCompleteResponseUsage(token) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(PlatformDocListResponseItem, x), self.items) + result["token"] = to_float(self.token) return result -class PlatformDocListStreamItemData: - """Instance list properties""" - - category: Optional[str] - """The category of the doc""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - description: str - """The associated description""" - - id: str - """The instance ID""" - - index: float - """The display order index""" - - link: str - """The URL to the official documentation page""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: str - """The associated name""" +class ConversationCompleteResponse: + end: ConversationCompleteResponseEnd + """Information about why the completion ended""" - tags: List[str] - """Tags associated with the doc""" + text: str + """The text of the message received""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + usage: ConversationCompleteResponseUsage + """Usage information""" - def __init__(self, category: Optional[str], created_at: float, description: str, id: str, index: float, link: str, meta: Optional[Dict[str, Any]], name: str, tags: List[str], updated_at: float) -> None: - self.category = category - self.created_at = created_at - self.description = description - self.id = id - self.index = index - self.link = link - self.meta = meta - self.name = name - self.tags = tags - self.updated_at = updated_at + def __init__(self, end: ConversationCompleteResponseEnd, text: str, usage: ConversationCompleteResponseUsage) -> None: + self.end = end + self.text = text + self.usage = usage @staticmethod - def from_dict(obj: Any) -> 'PlatformDocListStreamItemData': + def from_dict(obj: Any) -> 'ConversationCompleteResponse': assert isinstance(obj, dict) - category = from_union([from_str, from_none], obj.get("category")) - created_at = from_float(obj.get("createdAt")) - description = from_str(obj.get("description")) - id = from_str(obj.get("id")) - index = from_float(obj.get("index")) - link = from_str(obj.get("link")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - tags = from_list(from_str, obj.get("tags")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformDocListStreamItemData(category, created_at, description, id, index, link, meta, name, tags, updated_at) + end = ConversationCompleteResponseEnd.from_dict(obj.get("end")) + text = from_str(obj.get("text")) + usage = ConversationCompleteResponseUsage.from_dict(obj.get("usage")) + return ConversationCompleteResponse(end, text, usage) def to_dict(self) -> dict: result: dict = {} - if self.category is not None: - result["category"] = from_union([from_str, from_none], self.category) - result["createdAt"] = to_float(self.created_at) - result["description"] = from_str(self.description) - result["id"] = from_str(self.id) - result["index"] = to_float(self.index) - result["link"] = from_str(self.link) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - result["tags"] = from_list(from_str, self.tags) - result["updatedAt"] = to_float(self.updated_at) + result["end"] = to_class(ConversationCompleteResponseEnd, self.end) + result["text"] = from_str(self.text) + result["usage"] = to_class(ConversationCompleteResponseUsage, self.usage) return result -class PlatformDocListStreamItemType(Enum): - """The type of event""" +class FluffyReason(Enum): + """The reason why the completion ended""" - ITEM = "item" + ABORT = "abort" + ACTIVITY = "activity" + ERROR = "error" + ITERATION = "iteration" + LENGTH = "length" + STOP = "stop" -class PlatformDocListStreamItem: - data: PlatformDocListStreamItemData - """Instance list properties""" +class PurpleEnd: + """Information about why the completion ended""" - type: PlatformDocListStreamItemType - """The type of event""" + reason: FluffyReason + """The reason why the completion ended""" - def __init__(self, data: PlatformDocListStreamItemData, type: PlatformDocListStreamItemType) -> None: - self.data = data - self.type = type + def __init__(self, reason: FluffyReason) -> None: + self.reason = reason @staticmethod - def from_dict(obj: Any) -> 'PlatformDocListStreamItem': + def from_dict(obj: Any) -> 'PurpleEnd': assert isinstance(obj, dict) - data = PlatformDocListStreamItemData.from_dict(obj.get("data")) - type = PlatformDocListStreamItemType(obj.get("type")) - return PlatformDocListStreamItem(data, type) + reason = FluffyReason(obj.get("reason")) + return PurpleEnd(reason) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(PlatformDocListStreamItemData, self.data) - result["type"] = to_enum(PlatformDocListStreamItemType, self.type) + result["reason"] = to_enum(FluffyReason, self.reason) return result -class PlatformDocsSearchRequest: - search: str - """The search query to find relevant docs""" +class Type13(Enum): + """The type of the message""" - take: Optional[int] - """The maximum number of results to return (1-100, default 10)""" + ACTIVITY = "activity" + BACKSTORY = "backstory" + BOT = "bot" + CHECKPOINT = "checkpoint" + CONTEXT = "context" + INSTRUCTION = "instruction" + REASONING = "reasoning" + USER = "user" - def __init__(self, search: str, take: Optional[int]) -> None: - self.search = search - self.take = take + +class TentacledUsage: + """Usage information""" + + token: float + """The tokens used in this exchange""" + + def __init__(self, token: float) -> None: + self.token = token @staticmethod - def from_dict(obj: Any) -> 'PlatformDocsSearchRequest': + def from_dict(obj: Any) -> 'TentacledUsage': assert isinstance(obj, dict) - search = from_str(obj.get("search")) - take = from_union([from_int, from_none], obj.get("take")) - return PlatformDocsSearchRequest(search, take) + token = from_float(obj.get("token")) + return TentacledUsage(token) def to_dict(self) -> dict: result: dict = {} - result["search"] = from_str(self.search) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["token"] = to_float(self.token) return result -class PlatformDocsSearchResponseItem: - """Instance list properties""" - - category: Optional[str] - """The category of the doc""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - description: str - """The associated description""" - - excerpt: str - """An excerpt from the most relevant part of the doc""" +class ConversationCompleteStreamItemData: + """The data for the event + + A message in the conversation + + Information about an abort event in a streamed response + """ + end: Optional[PurpleEnd] + """Information about why the completion ended""" - id: str - """The instance ID""" + text: Optional[str] + """The text of the message received + + The text of the message + """ + usage: Optional[TentacledUsage] + """Usage information""" - index: float - """The display order index""" + message: Optional[str] + """The error message""" - link: str - """The URL to the official documentation page""" + token: Optional[str] + """The token generated""" meta: Optional[Dict[str, Any]] """Meta data information""" - name: str - """The associated name""" + type: Optional[Type13] + """The type of the message""" - score: float - """The similarity score of the search result""" + function_name: Optional[str] + """The function or tool associated with the abort""" - tags: List[str] - """Tags associated with the doc""" + reason: Any + """The abort reason if available""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + input_tokens_used: Optional[float] + """The number of input tokens used""" - def __init__(self, category: Optional[str], created_at: float, description: str, excerpt: str, id: str, index: float, link: str, meta: Optional[Dict[str, Any]], name: str, score: float, tags: List[str], updated_at: float) -> None: - self.category = category - self.created_at = created_at - self.description = description - self.excerpt = excerpt - self.id = id - self.index = index - self.link = link + model: Optional[str] + """The model used""" + + output_tokens_used: Optional[float] + """The number of output tokens used""" + + def __init__(self, end: Optional[PurpleEnd], text: Optional[str], usage: Optional[TentacledUsage], message: Optional[str], token: Optional[str], meta: Optional[Dict[str, Any]], type: Optional[Type13], function_name: Optional[str], reason: Any, input_tokens_used: Optional[float], model: Optional[str], output_tokens_used: Optional[float]) -> None: + self.end = end + self.text = text + self.usage = usage + self.message = message + self.token = token self.meta = meta - self.name = name - self.score = score - self.tags = tags - self.updated_at = updated_at + self.type = type + self.function_name = function_name + self.reason = reason + self.input_tokens_used = input_tokens_used + self.model = model + self.output_tokens_used = output_tokens_used @staticmethod - def from_dict(obj: Any) -> 'PlatformDocsSearchResponseItem': + def from_dict(obj: Any) -> 'ConversationCompleteStreamItemData': assert isinstance(obj, dict) - category = from_union([from_str, from_none], obj.get("category")) - created_at = from_float(obj.get("createdAt")) - description = from_str(obj.get("description")) - excerpt = from_str(obj.get("excerpt")) - id = from_str(obj.get("id")) - index = from_float(obj.get("index")) - link = from_str(obj.get("link")) + end = from_union([PurpleEnd.from_dict, from_none], obj.get("end")) + text = from_union([from_str, from_none], obj.get("text")) + usage = from_union([TentacledUsage.from_dict, from_none], obj.get("usage")) + message = from_union([from_str, from_none], obj.get("message")) + token = from_union([from_str, from_none], obj.get("token")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - score = from_float(obj.get("score")) - tags = from_list(from_str, obj.get("tags")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformDocsSearchResponseItem(category, created_at, description, excerpt, id, index, link, meta, name, score, tags, updated_at) + type = from_union([Type13, from_none], obj.get("type")) + function_name = from_union([from_str, from_none], obj.get("functionName")) + reason = obj.get("reason") + input_tokens_used = from_union([from_float, from_none], obj.get("inputTokensUsed")) + model = from_union([from_str, from_none], obj.get("model")) + output_tokens_used = from_union([from_float, from_none], obj.get("outputTokensUsed")) + return ConversationCompleteStreamItemData(end, text, usage, message, token, meta, type, function_name, reason, input_tokens_used, model, output_tokens_used) def to_dict(self) -> dict: result: dict = {} - if self.category is not None: - result["category"] = from_union([from_str, from_none], self.category) - result["createdAt"] = to_float(self.created_at) - result["description"] = from_str(self.description) - result["excerpt"] = from_str(self.excerpt) - result["id"] = from_str(self.id) - result["index"] = to_float(self.index) - result["link"] = from_str(self.link) + if self.end is not None: + result["end"] = from_union([lambda x: to_class(PurpleEnd, x), from_none], self.end) + if self.text is not None: + result["text"] = from_union([from_str, from_none], self.text) + if self.usage is not None: + result["usage"] = from_union([lambda x: to_class(TentacledUsage, x), from_none], self.usage) + if self.message is not None: + result["message"] = from_union([from_str, from_none], self.message) + if self.token is not None: + result["token"] = from_union([from_str, from_none], self.token) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - result["score"] = to_float(self.score) - result["tags"] = from_list(from_str, self.tags) - result["updatedAt"] = to_float(self.updated_at) + if self.type is not None: + result["type"] = from_union([lambda x: to_enum(Type13, x), from_none], self.type) + if self.function_name is not None: + result["functionName"] = from_union([from_str, from_none], self.function_name) + if self.reason is not None: + result["reason"] = self.reason + if self.input_tokens_used is not None: + result["inputTokensUsed"] = from_union([to_float, from_none], self.input_tokens_used) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) + if self.output_tokens_used is not None: + result["outputTokensUsed"] = from_union([to_float, from_none], self.output_tokens_used) return result -class PlatformDocsSearchResponse: - items: List[PlatformDocsSearchResponseItem] +class ConversationCompleteStreamItemType(Enum): + """The type of event""" - def __init__(self, items: List[PlatformDocsSearchResponseItem]) -> None: - self.items = items + ABORT = "abort" + COMPLETE_BEGIN = "completeBegin" + COMPLETE_END = "completeEnd" + ERROR = "error" + MESSAGE = "message" + REASONING_TOKEN = "reasoningToken" + RESULT = "result" + TOKEN = "token" + USAGE = "usage" + WAIT_FOR_CHANNEL_MESSAGE_BEGIN = "waitForChannelMessageBegin" + WAIT_FOR_CHANNEL_MESSAGE_END = "waitForChannelMessageEnd" + + +class ConversationCompleteStreamItem: + data: ConversationCompleteStreamItemData + """The data for the event + + A message in the conversation + + Information about an abort event in a streamed response + """ + type: ConversationCompleteStreamItemType + """The type of event""" + + def __init__(self, data: ConversationCompleteStreamItemData, type: ConversationCompleteStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'PlatformDocsSearchResponse': + def from_dict(obj: Any) -> 'ConversationCompleteStreamItem': assert isinstance(obj, dict) - items = from_list(PlatformDocsSearchResponseItem.from_dict, obj.get("items")) - return PlatformDocsSearchResponse(items) + data = ConversationCompleteStreamItemData.from_dict(obj.get("data")) + type = ConversationCompleteStreamItemType(obj.get("type")) + return ConversationCompleteStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["items"] = from_list(lambda x: to_class(PlatformDocsSearchResponseItem, x), self.items) + result["data"] = to_class(ConversationCompleteStreamItemData, self.data) + result["type"] = to_enum(ConversationCompleteStreamItemType, self.type) return result -class PlatformExampleCloneParams: - example_id: str - """The ID (slug) of the example to clone""" +class TentacledRecord: + meta: Optional[Dict[str, Any]] + """Additional metadata for the record""" - def __init__(self, example_id: str) -> None: - self.example_id = example_id + text: str + """The text content of the record""" + + def __init__(self, meta: Optional[Dict[str, Any]], text: str) -> None: + self.meta = meta + self.text = text @staticmethod - def from_dict(obj: Any) -> 'PlatformExampleCloneParams': + def from_dict(obj: Any) -> 'TentacledRecord': assert isinstance(obj, dict) - example_id = from_str(obj.get("exampleId")) - return PlatformExampleCloneParams(example_id) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + text = from_str(obj.get("text")) + return TentacledRecord(meta, text) def to_dict(self) -> dict: result: dict = {} - result["exampleId"] = from_str(self.example_id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + result["text"] = from_str(self.text) return result -class Resource: +class TentacledDataset: description: Optional[str] - """The description of the resource""" - - id: str - """The unique identifier of the resource""" + """The description of the dataset""" name: Optional[str] - """The name of the resource""" + """The name of the dataset""" - def __init__(self, description: Optional[str], id: str, name: Optional[str]) -> None: + records: List[TentacledRecord] + """The records in the dataset""" + + def __init__(self, description: Optional[str], name: Optional[str], records: List[TentacledRecord]) -> None: self.description = description - self.id = id self.name = name + self.records = records @staticmethod - def from_dict(obj: Any) -> 'Resource': + def from_dict(obj: Any) -> 'TentacledDataset': assert isinstance(obj, dict) description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) name = from_union([from_str, from_none], obj.get("name")) - return Resource(description, id, name) + records = from_list(TentacledRecord.from_dict, obj.get("records")) + return TentacledDataset(description, name, records) def to_dict(self) -> dict: result: dict = {} if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + result["records"] = from_list(lambda x: to_class(TentacledRecord, x), self.records) return result -class PlatformExampleCloneResponse: - resources: Dict[str, List[Resource]] - """A map of resource types to arrays of created resources""" - - def __init__(self, resources: Dict[str, List[Resource]]) -> None: - self.resources = resources - - @staticmethod - def from_dict(obj: Any) -> 'PlatformExampleCloneResponse': - assert isinstance(obj, dict) - resources = from_dict(lambda x: from_list(Resource.from_dict, x), obj.get("resources")) - return PlatformExampleCloneResponse(resources) - - def to_dict(self) -> dict: - result: dict = {} - result["resources"] = from_dict(lambda x: from_list(lambda x: to_class(Resource, x), x), self.resources) - return result - +class TentacledFeature: + name: str + """The name of the feature to enable""" -class PlatformExampleFetchParams: - example_id: str - """The ID (slug) of the example""" + options: Optional[Dict[str, Any]] + """Optional configuration options for the feature""" - def __init__(self, example_id: str) -> None: - self.example_id = example_id + def __init__(self, name: str, options: Optional[Dict[str, Any]]) -> None: + self.name = name + self.options = options @staticmethod - def from_dict(obj: Any) -> 'PlatformExampleFetchParams': + def from_dict(obj: Any) -> 'TentacledFeature': assert isinstance(obj, dict) - example_id = from_str(obj.get("exampleId")) - return PlatformExampleFetchParams(example_id) + name = from_str(obj.get("name")) + options = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("options")) + return TentacledFeature(name, options) def to_dict(self) -> dict: result: dict = {} - result["exampleId"] = from_str(self.example_id) - return result - - -class PlatformExampleFetchResponseType(Enum): - """The type of the example""" - - BLUEPRINT = "blueprint" - DISCORD = "discord" - EMAIL = "email" - MESSENGER = "messenger" - PROJECT = "project" - SLACK = "slack" - TELEGRAM = "telegram" - TRIGGER = "trigger" - TWILIO = "twilio" - WHATSAPP = "whatsapp" - WIDGET = "widget" - - -class PlatformExampleFetchResponse: - config: Dict[str, Any] - """The full configuration details of the example""" + result["name"] = from_str(self.name) + if self.options is not None: + result["options"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.options) + return result - created_at: Optional[float] - """The creation timestamp""" +class TentacledAbility: description: str - """The description of the example""" - - id: str - """The ID (slug) of the example""" + """The description of the ability""" - link: str - """The URL to the official example page""" + instruction: str + """The instruction for the ability""" - name: str - """The name of the example""" + linked_secret_id: Optional[str] + """Optional secret ID for the ability""" - tags: Optional[List[str]] - """Tags associated with the example""" + linked_space_id: Optional[str] + """Optional space ID for the ability""" - type: PlatformExampleFetchResponseType - """The type of the example""" + meta: Optional[Dict[str, Any]] + """Additional metadata for the ability""" - updated_at: Optional[float] - """The last update timestamp""" + name: str + """The name of the ability""" - def __init__(self, config: Dict[str, Any], created_at: Optional[float], description: str, id: str, link: str, name: str, tags: Optional[List[str]], type: PlatformExampleFetchResponseType, updated_at: Optional[float]) -> None: - self.config = config - self.created_at = created_at + def __init__(self, description: str, instruction: str, linked_secret_id: Optional[str], linked_space_id: Optional[str], meta: Optional[Dict[str, Any]], name: str) -> None: self.description = description - self.id = id - self.link = link + self.instruction = instruction + self.linked_secret_id = linked_secret_id + self.linked_space_id = linked_space_id + self.meta = meta self.name = name - self.tags = tags - self.type = type - self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'PlatformExampleFetchResponse': + def from_dict(obj: Any) -> 'TentacledAbility': assert isinstance(obj, dict) - config = from_dict(lambda x: x, obj.get("config")) - created_at = from_union([from_float, from_none], obj.get("createdAt")) description = from_str(obj.get("description")) - id = from_str(obj.get("id")) - link = from_str(obj.get("link")) + instruction = from_str(obj.get("instruction")) + linked_secret_id = from_union([from_str, from_none], obj.get("linkedSecretId")) + linked_space_id = from_union([from_str, from_none], obj.get("linkedSpaceId")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_str(obj.get("name")) - tags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tags")) - type = PlatformExampleFetchResponseType(obj.get("type")) - updated_at = from_union([from_float, from_none], obj.get("updatedAt")) - return PlatformExampleFetchResponse(config, created_at, description, id, link, name, tags, type, updated_at) + return TentacledAbility(description, instruction, linked_secret_id, linked_space_id, meta, name) def to_dict(self) -> dict: result: dict = {} - result["config"] = from_dict(lambda x: x, self.config) - if self.created_at is not None: - result["createdAt"] = from_union([to_float, from_none], self.created_at) result["description"] = from_str(self.description) - result["id"] = from_str(self.id) - result["link"] = from_str(self.link) + result["instruction"] = from_str(self.instruction) + if self.linked_secret_id is not None: + result["linkedSecretId"] = from_union([from_str, from_none], self.linked_secret_id) + if self.linked_space_id is not None: + result["linkedSpaceId"] = from_union([from_str, from_none], self.linked_space_id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) result["name"] = from_str(self.name) - if self.tags is not None: - result["tags"] = from_union([lambda x: from_list(from_str, x), from_none], self.tags) - result["type"] = to_enum(PlatformExampleFetchResponseType, self.type) - if self.updated_at is not None: - result["updatedAt"] = from_union([to_float, from_none], self.updated_at) return result -class PlatformExampleListParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" - - -class PlatformExampleListParams: - cursor: Optional[str] - """The cursor to use for pagination""" - - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" +class TentacledSkillset: + abilities: List[TentacledAbility] + """The abilities in the skillset""" - order: Optional[PlatformExampleListParamsOrder] - """The order of the paginated items""" + description: Optional[str] + """The description of the skillset""" - take: Optional[int] - """The number of items to retrieve""" + name: Optional[str] + """The name of the skillset""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[PlatformExampleListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take + def __init__(self, abilities: List[TentacledAbility], description: Optional[str], name: Optional[str]) -> None: + self.abilities = abilities + self.description = description + self.name = name @staticmethod - def from_dict(obj: Any) -> 'PlatformExampleListParams': + def from_dict(obj: Any) -> 'TentacledSkillset': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([PlatformExampleListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return PlatformExampleListParams(cursor, meta, order, take) + abilities = from_list(TentacledAbility.from_dict, obj.get("abilities")) + description = from_union([from_str, from_none], obj.get("description")) + name = from_union([from_str, from_none], obj.get("name")) + return TentacledSkillset(abilities, description, name) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(PlatformExampleListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["abilities"] = from_list(lambda x: to_class(TentacledAbility, x), self.abilities) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) return result -class Type11(Enum): - """The type of the example""" +class ConversationStatelessCompactRequestExtensions: + """Extensions to enhance the bot's capabilities""" - BLUEPRINT = "blueprint" - DISCORD = "discord" - EMAIL = "email" - MESSENGER = "messenger" - PROJECT = "project" - SLACK = "slack" - TELEGRAM = "telegram" - TRIGGER = "trigger" - TWILIO = "twilio" - WHATSAPP = "whatsapp" - WIDGET = "widget" + backstory: Optional[str] + """Additional backstory for the bot""" + datasets: Optional[List[TentacledDataset]] + """Inline datasets to provide additional context""" -class PlatformExampleListResponseItem: - """Instance list properties""" + features: Optional[List[TentacledFeature]] + """Feature flags to enable specific bot capabilities""" - created_at: float - """The timestamp (ms) when the instance was created""" + skillsets: Optional[List[TentacledSkillset]] + """Inline skillsets to provide additional abilities""" - description: str - """The associated description""" + def __init__(self, backstory: Optional[str], datasets: Optional[List[TentacledDataset]], features: Optional[List[TentacledFeature]], skillsets: Optional[List[TentacledSkillset]]) -> None: + self.backstory = backstory + self.datasets = datasets + self.features = features + self.skillsets = skillsets - id: str - """The instance ID""" + @staticmethod + def from_dict(obj: Any) -> 'ConversationStatelessCompactRequestExtensions': + assert isinstance(obj, dict) + backstory = from_union([from_str, from_none], obj.get("backstory")) + datasets = from_union([lambda x: from_list(TentacledDataset.from_dict, x), from_none], obj.get("datasets")) + features = from_union([lambda x: from_list(TentacledFeature.from_dict, x), from_none], obj.get("features")) + skillsets = from_union([lambda x: from_list(TentacledSkillset.from_dict, x), from_none], obj.get("skillsets")) + return ConversationStatelessCompactRequestExtensions(backstory, datasets, features, skillsets) - link: str - """The URL to the official example page""" + def to_dict(self) -> dict: + result: dict = {} + if self.backstory is not None: + result["backstory"] = from_union([from_str, from_none], self.backstory) + if self.datasets is not None: + result["datasets"] = from_union([lambda x: from_list(lambda x: to_class(TentacledDataset, x), x), from_none], self.datasets) + if self.features is not None: + result["features"] = from_union([lambda x: from_list(lambda x: to_class(TentacledFeature, x), x), from_none], self.features) + if self.skillsets is not None: + result["skillsets"] = from_union([lambda x: from_list(lambda x: to_class(TentacledSkillset, x), x), from_none], self.skillsets) + return result - meta: Optional[Dict[str, Any]] - """Meta data information""" - name: str - """The associated name""" +class Type14(Enum): + """The type of the message""" - tags: Optional[List[str]] - """Tags associated with the example""" + ACTIVITY = "activity" + BACKSTORY = "backstory" + BOT = "bot" + CHECKPOINT = "checkpoint" + CONTEXT = "context" + INSTRUCTION = "instruction" + REASONING = "reasoning" + USER = "user" - type: Type11 - """The type of the example""" - updated_at: float - """The timestamp (ms) when the instance was updated""" +class ConversationStatelessCompactRequestMessage: + """A message in the conversation""" - def __init__(self, created_at: float, description: str, id: str, link: str, meta: Optional[Dict[str, Any]], name: str, tags: Optional[List[str]], type: Type11, updated_at: float) -> None: - self.created_at = created_at - self.description = description - self.id = id - self.link = link + meta: Optional[Dict[str, Any]] + """Meta data information""" + + text: str + """The text of the message""" + + type: Type14 + """The type of the message""" + + def __init__(self, meta: Optional[Dict[str, Any]], text: str, type: Type14) -> None: self.meta = meta - self.name = name - self.tags = tags + self.text = text self.type = type - self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'PlatformExampleListResponseItem': + def from_dict(obj: Any) -> 'ConversationStatelessCompactRequestMessage': assert isinstance(obj, dict) - created_at = from_float(obj.get("createdAt")) - description = from_str(obj.get("description")) - id = from_str(obj.get("id")) - link = from_str(obj.get("link")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - tags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tags")) - type = Type11(obj.get("type")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformExampleListResponseItem(created_at, description, id, link, meta, name, tags, type, updated_at) + text = from_str(obj.get("text")) + type = Type14(obj.get("type")) + return ConversationStatelessCompactRequestMessage(meta, text, type) def to_dict(self) -> dict: result: dict = {} - result["createdAt"] = to_float(self.created_at) - result["description"] = from_str(self.description) - result["id"] = from_str(self.id) - result["link"] = from_str(self.link) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - if self.tags is not None: - result["tags"] = from_union([lambda x: from_list(from_str, x), from_none], self.tags) - result["type"] = to_enum(Type11, self.type) - result["updatedAt"] = to_float(self.updated_at) + result["text"] = from_str(self.text) + result["type"] = to_enum(Type14, self.type) return result -class PlatformExampleListResponse: - cursor: str - """Cursor for fetching the next page""" +class ConversationStatelessCompactRequest: + """A bot configuration or reference + + A bot configuration that can be applied without a dedicated bot instance. + """ + extensions: Optional[ConversationStatelessCompactRequestExtensions] + """Extensions to enhance the bot's capabilities""" - items: List[PlatformExampleListResponseItem] + messages: List[ConversationStatelessCompactRequestMessage] + """An array of messages to be compacted""" - def __init__(self, cursor: str, items: List[PlatformExampleListResponseItem]) -> None: - self.cursor = cursor - self.items = items + bot_id: Optional[str] + """The ID of the bot this configuration is using""" + + backstory: Optional[str] + """The backstory this configuration is using""" + + dataset_id: Optional[str] + """The id of the dataset this configuration is using""" + + model: Optional[str] + """A model definition""" + + moderation: Optional[bool] + """The moderation flag for this configuration""" + + privacy: Optional[bool] + """The privacy flag for this configuration""" + + skillset_id: Optional[str] + """The id of the skillset this configuration is using""" + + def __init__(self, extensions: Optional[ConversationStatelessCompactRequestExtensions], messages: List[ConversationStatelessCompactRequestMessage], bot_id: Optional[str], backstory: Optional[str], dataset_id: Optional[str], model: Optional[str], moderation: Optional[bool], privacy: Optional[bool], skillset_id: Optional[str]) -> None: + self.extensions = extensions + self.messages = messages + self.bot_id = bot_id + self.backstory = backstory + self.dataset_id = dataset_id + self.model = model + self.moderation = moderation + self.privacy = privacy + self.skillset_id = skillset_id @staticmethod - def from_dict(obj: Any) -> 'PlatformExampleListResponse': + def from_dict(obj: Any) -> 'ConversationStatelessCompactRequest': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(PlatformExampleListResponseItem.from_dict, obj.get("items")) - return PlatformExampleListResponse(cursor, items) + extensions = from_union([ConversationStatelessCompactRequestExtensions.from_dict, from_none], obj.get("extensions")) + messages = from_list(ConversationStatelessCompactRequestMessage.from_dict, obj.get("messages")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + backstory = from_union([from_str, from_none], obj.get("backstory")) + dataset_id = from_union([from_str, from_none], obj.get("datasetId")) + model = from_union([from_str, from_none], obj.get("model")) + moderation = from_union([from_bool, from_none], obj.get("moderation")) + privacy = from_union([from_bool, from_none], obj.get("privacy")) + skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + return ConversationStatelessCompactRequest(extensions, messages, bot_id, backstory, dataset_id, model, moderation, privacy, skillset_id) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(PlatformExampleListResponseItem, x), self.items) + if self.extensions is not None: + result["extensions"] = from_union([lambda x: to_class(ConversationStatelessCompactRequestExtensions, x), from_none], self.extensions) + result["messages"] = from_list(lambda x: to_class(ConversationStatelessCompactRequestMessage, x), self.messages) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.backstory is not None: + result["backstory"] = from_union([from_str, from_none], self.backstory) + if self.dataset_id is not None: + result["datasetId"] = from_union([from_str, from_none], self.dataset_id) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) + if self.moderation is not None: + result["moderation"] = from_union([from_bool, from_none], self.moderation) + if self.privacy is not None: + result["privacy"] = from_union([from_bool, from_none], self.privacy) + if self.skillset_id is not None: + result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) return result -class Type12(Enum): - """The type of the example""" +class ConversationStatelessCompactResponseUsage: + """Usage information""" - BLUEPRINT = "blueprint" - DISCORD = "discord" - EMAIL = "email" - MESSENGER = "messenger" - PROJECT = "project" - SLACK = "slack" - TELEGRAM = "telegram" - TRIGGER = "trigger" - TWILIO = "twilio" - WHATSAPP = "whatsapp" - WIDGET = "widget" + token: float + """The tokens used in this exchange""" + def __init__(self, token: float) -> None: + self.token = token -class PlatformExampleListStreamItemData: - """Instance list properties""" + @staticmethod + def from_dict(obj: Any) -> 'ConversationStatelessCompactResponseUsage': + assert isinstance(obj, dict) + token = from_float(obj.get("token")) + return ConversationStatelessCompactResponseUsage(token) - created_at: float - """The timestamp (ms) when the instance was created""" + def to_dict(self) -> dict: + result: dict = {} + result["token"] = to_float(self.token) + return result - description: str - """The associated description""" - id: str - """The instance ID""" +class ConversationStatelessCompactResponse: + text: str + """The compacted text of the messages, or an empty string if there was nothing to compact""" - link: str - """The URL to the official example page""" + usage: ConversationStatelessCompactResponseUsage + """Usage information""" - meta: Optional[Dict[str, Any]] - """Meta data information""" + def __init__(self, text: str, usage: ConversationStatelessCompactResponseUsage) -> None: + self.text = text + self.usage = usage - name: str - """The associated name""" + @staticmethod + def from_dict(obj: Any) -> 'ConversationStatelessCompactResponse': + assert isinstance(obj, dict) + text = from_str(obj.get("text")) + usage = ConversationStatelessCompactResponseUsage.from_dict(obj.get("usage")) + return ConversationStatelessCompactResponse(text, usage) - tags: Optional[List[str]] - """Tags associated with the example""" + def to_dict(self) -> dict: + result: dict = {} + result["text"] = from_str(self.text) + result["usage"] = to_class(ConversationStatelessCompactResponseUsage, self.usage) + return result - type: Type12 - """The type of the example""" - updated_at: float - """The timestamp (ms) when the instance was updated""" +class ConversationUpvoteParams: + conversation_id: str + """The ID of the conversation""" - def __init__(self, created_at: float, description: str, id: str, link: str, meta: Optional[Dict[str, Any]], name: str, tags: Optional[List[str]], type: Type12, updated_at: float) -> None: - self.created_at = created_at - self.description = description - self.id = id - self.link = link - self.meta = meta - self.name = name - self.tags = tags - self.type = type - self.updated_at = updated_at + def __init__(self, conversation_id: str) -> None: + self.conversation_id = conversation_id @staticmethod - def from_dict(obj: Any) -> 'PlatformExampleListStreamItemData': + def from_dict(obj: Any) -> 'ConversationUpvoteParams': assert isinstance(obj, dict) - created_at = from_float(obj.get("createdAt")) - description = from_str(obj.get("description")) - id = from_str(obj.get("id")) - link = from_str(obj.get("link")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - tags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tags")) - type = Type12(obj.get("type")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformExampleListStreamItemData(created_at, description, id, link, meta, name, tags, type, updated_at) + conversation_id = from_str(obj.get("conversationId")) + return ConversationUpvoteParams(conversation_id) def to_dict(self) -> dict: result: dict = {} - result["createdAt"] = to_float(self.created_at) - result["description"] = from_str(self.description) - result["id"] = from_str(self.id) - result["link"] = from_str(self.link) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - if self.tags is not None: - result["tags"] = from_union([lambda x: from_list(from_str, x), from_none], self.tags) - result["type"] = to_enum(Type12, self.type) - result["updatedAt"] = to_float(self.updated_at) + result["conversationId"] = from_str(self.conversation_id) return result -class PlatformExampleListStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - - -class PlatformExampleListStreamItem: - data: PlatformExampleListStreamItemData - """Instance list properties""" +class ConversationUpvoteRequest: + reason: Optional[str] + """The reason for the upvote""" - type: PlatformExampleListStreamItemType - """The type of event""" + value: Optional[int] + """The value of the upvote""" - def __init__(self, data: PlatformExampleListStreamItemData, type: PlatformExampleListStreamItemType) -> None: - self.data = data - self.type = type + def __init__(self, reason: Optional[str], value: Optional[int]) -> None: + self.reason = reason + self.value = value @staticmethod - def from_dict(obj: Any) -> 'PlatformExampleListStreamItem': + def from_dict(obj: Any) -> 'ConversationUpvoteRequest': assert isinstance(obj, dict) - data = PlatformExampleListStreamItemData.from_dict(obj.get("data")) - type = PlatformExampleListStreamItemType(obj.get("type")) - return PlatformExampleListStreamItem(data, type) + reason = from_union([from_str, from_none], obj.get("reason")) + value = from_union([from_int, from_none], obj.get("value")) + return ConversationUpvoteRequest(reason, value) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(PlatformExampleListStreamItemData, self.data) - result["type"] = to_enum(PlatformExampleListStreamItemType, self.type) + if self.reason is not None: + result["reason"] = from_union([from_str, from_none], self.reason) + if self.value is not None: + result["value"] = from_union([from_int, from_none], self.value) return result -class PlatformExamplesSearchRequest: - search: str - """The search query to find relevant examples""" - - take: Optional[int] - """The maximum number of results to return (1-100, default 10)""" +class ConversationUpvoteResponse: + id: str + """The ID of the upvoted conversation""" - def __init__(self, search: str, take: Optional[int]) -> None: - self.search = search - self.take = take + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'PlatformExamplesSearchRequest': + def from_dict(obj: Any) -> 'ConversationUpvoteResponse': assert isinstance(obj, dict) - search = from_str(obj.get("search")) - take = from_union([from_int, from_none], obj.get("take")) - return PlatformExamplesSearchRequest(search, take) + id = from_str(obj.get("id")) + return ConversationUpvoteResponse(id) def to_dict(self) -> dict: result: dict = {} - result["search"] = from_str(self.search) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["id"] = from_str(self.id) return result -class Type13(Enum): - """The type of the example""" - - BLUEPRINT = "blueprint" - DISCORD = "discord" - EMAIL = "email" - MESSENGER = "messenger" - PROJECT = "project" - SLACK = "slack" - TELEGRAM = "telegram" - TRIGGER = "trigger" - TWILIO = "twilio" - WHATSAPP = "whatsapp" - WIDGET = "widget" +class ConversationUpdateParams: + conversation_id: str + def __init__(self, conversation_id: str) -> None: + self.conversation_id = conversation_id -class PlatformExamplesSearchResponseItem: - """Instance list properties""" + @staticmethod + def from_dict(obj: Any) -> 'ConversationUpdateParams': + assert isinstance(obj, dict) + conversation_id = from_str(obj.get("conversationId")) + return ConversationUpdateParams(conversation_id) - created_at: float - """The timestamp (ms) when the instance was created""" + def to_dict(self) -> dict: + result: dict = {} + result["conversationId"] = from_str(self.conversation_id) + return result - description: str - """The associated description""" - id: str - """The instance ID""" +class ConversationUpdateRequest: + """A bot configuration or reference + + A bot configuration that can be applied without a dedicated bot instance. + """ + contact_id: Optional[str] + """The contact id assigned to this conversation""" - link: str - """The URL to the official example page""" + description: Optional[str] + """The associated description""" + expires_at: Optional[int] + """Epoch-ms timestamp at which the conversation is automatically deleted; null clears any + expiry + """ meta: Optional[Dict[str, Any]] """Meta data information""" - name: str + name: Optional[str] """The associated name""" - tags: Optional[List[str]] - """Tags associated with the example""" + space_id: Optional[str] + """The space id assigned to this conversation""" - type: Type13 - """The type of the example""" + task_id: Optional[str] + """The task id assigned to this conversation""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + bot_id: Optional[str] + """The ID of the bot this configuration is using""" - def __init__(self, created_at: float, description: str, id: str, link: str, meta: Optional[Dict[str, Any]], name: str, tags: Optional[List[str]], type: Type13, updated_at: float) -> None: - self.created_at = created_at + backstory: Optional[str] + """The backstory this configuration is using""" + + dataset_id: Optional[str] + """The id of the dataset this configuration is using""" + + model: Optional[str] + """A model definition""" + + moderation: Optional[bool] + """The moderation flag for this configuration""" + + privacy: Optional[bool] + """The privacy flag for this configuration""" + + skillset_id: Optional[str] + """The id of the skillset this configuration is using""" + + def __init__(self, contact_id: Optional[str], description: Optional[str], expires_at: Optional[int], meta: Optional[Dict[str, Any]], name: Optional[str], space_id: Optional[str], task_id: Optional[str], bot_id: Optional[str], backstory: Optional[str], dataset_id: Optional[str], model: Optional[str], moderation: Optional[bool], privacy: Optional[bool], skillset_id: Optional[str]) -> None: + self.contact_id = contact_id self.description = description - self.id = id - self.link = link + self.expires_at = expires_at self.meta = meta self.name = name - self.tags = tags - self.type = type - self.updated_at = updated_at + self.space_id = space_id + self.task_id = task_id + self.bot_id = bot_id + self.backstory = backstory + self.dataset_id = dataset_id + self.model = model + self.moderation = moderation + self.privacy = privacy + self.skillset_id = skillset_id @staticmethod - def from_dict(obj: Any) -> 'PlatformExamplesSearchResponseItem': + def from_dict(obj: Any) -> 'ConversationUpdateRequest': assert isinstance(obj, dict) - created_at = from_float(obj.get("createdAt")) - description = from_str(obj.get("description")) - id = from_str(obj.get("id")) - link = from_str(obj.get("link")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) + description = from_union([from_str, from_none], obj.get("description")) + expires_at = from_union([from_int, from_none], obj.get("expiresAt")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - tags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tags")) - type = Type13(obj.get("type")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformExamplesSearchResponseItem(created_at, description, id, link, meta, name, tags, type, updated_at) + name = from_union([from_str, from_none], obj.get("name")) + space_id = from_union([from_str, from_none], obj.get("spaceId")) + task_id = from_union([from_str, from_none], obj.get("taskId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + backstory = from_union([from_str, from_none], obj.get("backstory")) + dataset_id = from_union([from_str, from_none], obj.get("datasetId")) + model = from_union([from_str, from_none], obj.get("model")) + moderation = from_union([from_bool, from_none], obj.get("moderation")) + privacy = from_union([from_bool, from_none], obj.get("privacy")) + skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + return ConversationUpdateRequest(contact_id, description, expires_at, meta, name, space_id, task_id, bot_id, backstory, dataset_id, model, moderation, privacy, skillset_id) def to_dict(self) -> dict: result: dict = {} - result["createdAt"] = to_float(self.created_at) - result["description"] = from_str(self.description) - result["id"] = from_str(self.id) - result["link"] = from_str(self.link) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.expires_at is not None: + result["expiresAt"] = from_union([from_int, from_none], self.expires_at) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - if self.tags is not None: - result["tags"] = from_union([lambda x: from_list(from_str, x), from_none], self.tags) - result["type"] = to_enum(Type13, self.type) - result["updatedAt"] = to_float(self.updated_at) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.space_id is not None: + result["spaceId"] = from_union([from_str, from_none], self.space_id) + if self.task_id is not None: + result["taskId"] = from_union([from_str, from_none], self.task_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.backstory is not None: + result["backstory"] = from_union([from_str, from_none], self.backstory) + if self.dataset_id is not None: + result["datasetId"] = from_union([from_str, from_none], self.dataset_id) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) + if self.moderation is not None: + result["moderation"] = from_union([from_bool, from_none], self.moderation) + if self.privacy is not None: + result["privacy"] = from_union([from_bool, from_none], self.privacy) + if self.skillset_id is not None: + result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) return result -class PlatformExamplesSearchResponse: - items: List[PlatformExamplesSearchResponseItem] +class ConversationUpdateResponse: + id: str + """The ID of the updated conversation""" - def __init__(self, items: List[PlatformExamplesSearchResponseItem]) -> None: - self.items = items + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'PlatformExamplesSearchResponse': + def from_dict(obj: Any) -> 'ConversationUpdateResponse': assert isinstance(obj, dict) - items = from_list(PlatformExamplesSearchResponseItem.from_dict, obj.get("items")) - return PlatformExamplesSearchResponse(items) + id = from_str(obj.get("id")) + return ConversationUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} - result["items"] = from_list(lambda x: to_class(PlatformExamplesSearchResponseItem, x), self.items) + result["id"] = from_str(self.id) return result -class PlatformGuideFetchParams: - guide_id: str - """The ID of the guide to fetch""" +class ConversationMessageSendParams: + conversation_id: str + """The ID of the conversation to send the message to""" - def __init__(self, guide_id: str) -> None: - self.guide_id = guide_id + def __init__(self, conversation_id: str) -> None: + self.conversation_id = conversation_id @staticmethod - def from_dict(obj: Any) -> 'PlatformGuideFetchParams': + def from_dict(obj: Any) -> 'ConversationMessageSendParams': assert isinstance(obj, dict) - guide_id = from_str(obj.get("guideId")) - return PlatformGuideFetchParams(guide_id) + conversation_id = from_str(obj.get("conversationId")) + return ConversationMessageSendParams(conversation_id) def to_dict(self) -> dict: result: dict = {} - result["guideId"] = from_str(self.guide_id) + result["conversationId"] = from_str(self.conversation_id) return result -class PlatformGuideFetchResponse: - """Instance list properties""" +class PurpleReplacement: + begin: float + """Start offset""" - category: Optional[str] - """The category of the guide""" + end: float + """End offset""" - content: str - """The markdown content of the guide""" + text: str + """The text value of the replacement""" - created_at: float - """The timestamp (ms) when the instance was created""" + def __init__(self, begin: float, end: float, text: str) -> None: + self.begin = begin + self.end = end + self.text = text - description: Optional[str] - """The associated description""" + @staticmethod + def from_dict(obj: Any) -> 'PurpleReplacement': + assert isinstance(obj, dict) + begin = from_float(obj.get("begin")) + end = from_float(obj.get("end")) + text = from_str(obj.get("text")) + return PurpleReplacement(begin, end, text) - id: str - """The instance ID""" + def to_dict(self) -> dict: + result: dict = {} + result["begin"] = to_float(self.begin) + result["end"] = to_float(self.end) + result["text"] = from_str(self.text) + return result - index: Optional[float] - """The display order index""" - link: Optional[str] - """The URL to the official guide page""" +class ConversationMessageSendRequestEntity: + """Extracted entity from the message""" - meta: Optional[Dict[str, Any]] - """Meta data information""" + begin: float + """Start offset""" - name: str - """The associated name""" + end: float + """End offset""" - tags: Optional[List[str]] - """Tags associated with the guide""" + replacement: Optional[PurpleReplacement] + text: str + """The text value of the entity""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + type: str + """The entity type""" - def __init__(self, category: Optional[str], content: str, created_at: float, description: Optional[str], id: str, index: Optional[float], link: Optional[str], meta: Optional[Dict[str, Any]], name: str, tags: Optional[List[str]], updated_at: float) -> None: - self.category = category - self.content = content - self.created_at = created_at - self.description = description - self.id = id - self.index = index - self.link = link + def __init__(self, begin: float, end: float, replacement: Optional[PurpleReplacement], text: str, type: str) -> None: + self.begin = begin + self.end = end + self.replacement = replacement + self.text = text + self.type = type + + @staticmethod + def from_dict(obj: Any) -> 'ConversationMessageSendRequestEntity': + assert isinstance(obj, dict) + begin = from_float(obj.get("begin")) + end = from_float(obj.get("end")) + replacement = from_union([PurpleReplacement.from_dict, from_none], obj.get("replacement")) + text = from_str(obj.get("text")) + type = from_str(obj.get("type")) + return ConversationMessageSendRequestEntity(begin, end, replacement, text, type) + + def to_dict(self) -> dict: + result: dict = {} + result["begin"] = to_float(self.begin) + result["end"] = to_float(self.end) + if self.replacement is not None: + result["replacement"] = from_union([lambda x: to_class(PurpleReplacement, x), from_none], self.replacement) + result["text"] = from_str(self.text) + result["type"] = from_str(self.type) + return result + + +class StickyRecord: + meta: Optional[Dict[str, Any]] + """Additional metadata for the record""" + + text: str + """The text content of the record""" + + def __init__(self, meta: Optional[Dict[str, Any]], text: str) -> None: self.meta = meta - self.name = name - self.tags = tags - self.updated_at = updated_at + self.text = text @staticmethod - def from_dict(obj: Any) -> 'PlatformGuideFetchResponse': + def from_dict(obj: Any) -> 'StickyRecord': assert isinstance(obj, dict) - category = from_union([from_str, from_none], obj.get("category")) - content = from_str(obj.get("content")) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) - index = from_union([from_float, from_none], obj.get("index")) - link = from_union([from_str, from_none], obj.get("link")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - tags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tags")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformGuideFetchResponse(category, content, created_at, description, id, index, link, meta, name, tags, updated_at) + text = from_str(obj.get("text")) + return StickyRecord(meta, text) def to_dict(self) -> dict: result: dict = {} - if self.category is not None: - result["category"] = from_union([from_str, from_none], self.category) - result["content"] = from_str(self.content) - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) - if self.index is not None: - result["index"] = from_union([to_float, from_none], self.index) - if self.link is not None: - result["link"] = from_union([from_str, from_none], self.link) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - if self.tags is not None: - result["tags"] = from_union([lambda x: from_list(from_str, x), from_none], self.tags) - result["updatedAt"] = to_float(self.updated_at) + result["text"] = from_str(self.text) return result -class PlatformGuideListParamsOrder(Enum): - """The order of the paginated items""" +class StickyDataset: + description: Optional[str] + """The description of the dataset""" - ASC = "asc" - DESC = "desc" + name: Optional[str] + """The name of the dataset""" + records: List[StickyRecord] + """The records in the dataset""" -class PlatformGuideListParams: - cursor: Optional[str] - """The cursor to use for pagination""" + def __init__(self, description: Optional[str], name: Optional[str], records: List[StickyRecord]) -> None: + self.description = description + self.name = name + self.records = records - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" + @staticmethod + def from_dict(obj: Any) -> 'StickyDataset': + assert isinstance(obj, dict) + description = from_union([from_str, from_none], obj.get("description")) + name = from_union([from_str, from_none], obj.get("name")) + records = from_list(StickyRecord.from_dict, obj.get("records")) + return StickyDataset(description, name, records) - order: Optional[PlatformGuideListParamsOrder] - """The order of the paginated items""" + def to_dict(self) -> dict: + result: dict = {} + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + result["records"] = from_list(lambda x: to_class(StickyRecord, x), self.records) + return result - take: Optional[int] - """The number of items to retrieve""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[PlatformGuideListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take +class StickyFeature: + name: str + """The name of the feature to enable""" + + options: Optional[Dict[str, Any]] + """Optional configuration options for the feature""" + + def __init__(self, name: str, options: Optional[Dict[str, Any]]) -> None: + self.name = name + self.options = options @staticmethod - def from_dict(obj: Any) -> 'PlatformGuideListParams': + def from_dict(obj: Any) -> 'StickyFeature': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([PlatformGuideListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return PlatformGuideListParams(cursor, meta, order, take) + name = from_str(obj.get("name")) + options = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("options")) + return StickyFeature(name, options) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(PlatformGuideListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["name"] = from_str(self.name) + if self.options is not None: + result["options"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.options) return result -class PlatformGuideListResponseItem: - """Instance list properties""" - - category: Optional[str] - """The category of the guide""" - - created_at: float - """The timestamp (ms) when the instance was created""" - +class StickyAbility: description: str - """The associated description""" + """The description of the ability""" - id: str - """The instance ID""" + instruction: str + """The instruction for the ability""" - index: float - """The display order index""" + linked_secret_id: Optional[str] + """Optional secret ID for the ability""" - link: str - """The URL to the official guide page""" + linked_space_id: Optional[str] + """Optional space ID for the ability""" meta: Optional[Dict[str, Any]] - """Meta data information""" + """Additional metadata for the ability""" name: str - """The associated name""" - - tags: List[str] - """Tags associated with the guide""" - - updated_at: float - """The timestamp (ms) when the instance was updated""" + """The name of the ability""" - def __init__(self, category: Optional[str], created_at: float, description: str, id: str, index: float, link: str, meta: Optional[Dict[str, Any]], name: str, tags: List[str], updated_at: float) -> None: - self.category = category - self.created_at = created_at + def __init__(self, description: str, instruction: str, linked_secret_id: Optional[str], linked_space_id: Optional[str], meta: Optional[Dict[str, Any]], name: str) -> None: self.description = description - self.id = id - self.index = index - self.link = link + self.instruction = instruction + self.linked_secret_id = linked_secret_id + self.linked_space_id = linked_space_id self.meta = meta self.name = name - self.tags = tags - self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'PlatformGuideListResponseItem': + def from_dict(obj: Any) -> 'StickyAbility': assert isinstance(obj, dict) - category = from_union([from_str, from_none], obj.get("category")) - created_at = from_float(obj.get("createdAt")) description = from_str(obj.get("description")) - id = from_str(obj.get("id")) - index = from_float(obj.get("index")) - link = from_str(obj.get("link")) + instruction = from_str(obj.get("instruction")) + linked_secret_id = from_union([from_str, from_none], obj.get("linkedSecretId")) + linked_space_id = from_union([from_str, from_none], obj.get("linkedSpaceId")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_str(obj.get("name")) - tags = from_list(from_str, obj.get("tags")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformGuideListResponseItem(category, created_at, description, id, index, link, meta, name, tags, updated_at) + return StickyAbility(description, instruction, linked_secret_id, linked_space_id, meta, name) def to_dict(self) -> dict: result: dict = {} - if self.category is not None: - result["category"] = from_union([from_str, from_none], self.category) - result["createdAt"] = to_float(self.created_at) result["description"] = from_str(self.description) - result["id"] = from_str(self.id) - result["index"] = to_float(self.index) - result["link"] = from_str(self.link) + result["instruction"] = from_str(self.instruction) + if self.linked_secret_id is not None: + result["linkedSecretId"] = from_union([from_str, from_none], self.linked_secret_id) + if self.linked_space_id is not None: + result["linkedSpaceId"] = from_union([from_str, from_none], self.linked_space_id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) result["name"] = from_str(self.name) - result["tags"] = from_list(from_str, self.tags) - result["updatedAt"] = to_float(self.updated_at) return result -class PlatformGuideListResponse: - cursor: str - """Cursor for fetching the next page""" +class StickySkillset: + abilities: List[StickyAbility] + """The abilities in the skillset""" - items: List[PlatformGuideListResponseItem] + description: Optional[str] + """The description of the skillset""" - def __init__(self, cursor: str, items: List[PlatformGuideListResponseItem]) -> None: - self.cursor = cursor - self.items = items + name: Optional[str] + """The name of the skillset""" + + def __init__(self, abilities: List[StickyAbility], description: Optional[str], name: Optional[str]) -> None: + self.abilities = abilities + self.description = description + self.name = name @staticmethod - def from_dict(obj: Any) -> 'PlatformGuideListResponse': + def from_dict(obj: Any) -> 'StickySkillset': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(PlatformGuideListResponseItem.from_dict, obj.get("items")) - return PlatformGuideListResponse(cursor, items) + abilities = from_list(StickyAbility.from_dict, obj.get("abilities")) + description = from_union([from_str, from_none], obj.get("description")) + name = from_union([from_str, from_none], obj.get("name")) + return StickySkillset(abilities, description, name) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(PlatformGuideListResponseItem, x), self.items) + result["abilities"] = from_list(lambda x: to_class(StickyAbility, x), self.abilities) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) return result -class PlatformGuideListStreamItemData: - """Instance list properties""" +class ConversationMessageSendRequestExtensions: + """Extensions to enhance the bot's capabilities""" - category: Optional[str] - """The category of the guide""" + backstory: Optional[str] + """Additional backstory for the bot""" - created_at: float - """The timestamp (ms) when the instance was created""" + datasets: Optional[List[StickyDataset]] + """Inline datasets to provide additional context""" - description: str - """The associated description""" + features: Optional[List[StickyFeature]] + """Feature flags to enable specific bot capabilities""" - id: str - """The instance ID""" + skillsets: Optional[List[StickySkillset]] + """Inline skillsets to provide additional abilities""" - index: float - """The display order index""" + def __init__(self, backstory: Optional[str], datasets: Optional[List[StickyDataset]], features: Optional[List[StickyFeature]], skillsets: Optional[List[StickySkillset]]) -> None: + self.backstory = backstory + self.datasets = datasets + self.features = features + self.skillsets = skillsets - link: str - """The URL to the official guide page""" + @staticmethod + def from_dict(obj: Any) -> 'ConversationMessageSendRequestExtensions': + assert isinstance(obj, dict) + backstory = from_union([from_str, from_none], obj.get("backstory")) + datasets = from_union([lambda x: from_list(StickyDataset.from_dict, x), from_none], obj.get("datasets")) + features = from_union([lambda x: from_list(StickyFeature.from_dict, x), from_none], obj.get("features")) + skillsets = from_union([lambda x: from_list(StickySkillset.from_dict, x), from_none], obj.get("skillsets")) + return ConversationMessageSendRequestExtensions(backstory, datasets, features, skillsets) - meta: Optional[Dict[str, Any]] - """Meta data information""" + def to_dict(self) -> dict: + result: dict = {} + if self.backstory is not None: + result["backstory"] = from_union([from_str, from_none], self.backstory) + if self.datasets is not None: + result["datasets"] = from_union([lambda x: from_list(lambda x: to_class(StickyDataset, x), x), from_none], self.datasets) + if self.features is not None: + result["features"] = from_union([lambda x: from_list(lambda x: to_class(StickyFeature, x), x), from_none], self.features) + if self.skillsets is not None: + result["skillsets"] = from_union([lambda x: from_list(lambda x: to_class(StickySkillset, x), x), from_none], self.skillsets) + return result - name: str - """The associated name""" - tags: List[str] - """Tags associated with the guide""" +class TentacledCall: + """Configuration for when this function should be automatically called""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + end: Optional[bool] + """If true, this function will be force-called at the end of the conversation""" - def __init__(self, category: Optional[str], created_at: float, description: str, id: str, index: float, link: str, meta: Optional[Dict[str, Any]], name: str, tags: List[str], updated_at: float) -> None: - self.category = category - self.created_at = created_at - self.description = description - self.id = id - self.index = index - self.link = link - self.meta = meta - self.name = name - self.tags = tags - self.updated_at = updated_at + start: Optional[bool] + """If true, this function will be force-called at the start of the conversation""" + + def __init__(self, end: Optional[bool], start: Optional[bool]) -> None: + self.end = end + self.start = start @staticmethod - def from_dict(obj: Any) -> 'PlatformGuideListStreamItemData': + def from_dict(obj: Any) -> 'TentacledCall': assert isinstance(obj, dict) - category = from_union([from_str, from_none], obj.get("category")) - created_at = from_float(obj.get("createdAt")) - description = from_str(obj.get("description")) - id = from_str(obj.get("id")) - index = from_float(obj.get("index")) - link = from_str(obj.get("link")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - tags = from_list(from_str, obj.get("tags")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformGuideListStreamItemData(category, created_at, description, id, index, link, meta, name, tags, updated_at) + end = from_union([from_bool, from_none], obj.get("end")) + start = from_union([from_bool, from_none], obj.get("start")) + return TentacledCall(end, start) def to_dict(self) -> dict: result: dict = {} - if self.category is not None: - result["category"] = from_union([from_str, from_none], self.category) - result["createdAt"] = to_float(self.created_at) - result["description"] = from_str(self.description) - result["id"] = from_str(self.id) - result["index"] = to_float(self.index) - result["link"] = from_str(self.link) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - result["tags"] = from_list(from_str, self.tags) - result["updatedAt"] = to_float(self.updated_at) + if self.end is not None: + result["end"] = from_union([from_bool, from_none], self.end) + if self.start is not None: + result["start"] = from_union([from_bool, from_none], self.start) return result -class PlatformGuideListStreamItemType(Enum): - """The type of event""" +class Type15(Enum): + """The schema type, must be "object\"""" - ITEM = "item" + OBJECT = "object" -class PlatformGuideListStreamItem: - data: PlatformGuideListStreamItemData - """Instance list properties""" +class TentacledParameters: + """JSON Schema definition for the function parameters""" - type: PlatformGuideListStreamItemType - """The type of event""" + properties: Dict[str, Any] + """Object property definitions""" - def __init__(self, data: PlatformGuideListStreamItemData, type: PlatformGuideListStreamItemType) -> None: - self.data = data + required: Optional[List[str]] + """Required property names""" + + type: Type15 + """The schema type, must be "object\"""" + + def __init__(self, properties: Dict[str, Any], required: Optional[List[str]], type: Type15) -> None: + self.properties = properties + self.required = required self.type = type @staticmethod - def from_dict(obj: Any) -> 'PlatformGuideListStreamItem': + def from_dict(obj: Any) -> 'TentacledParameters': assert isinstance(obj, dict) - data = PlatformGuideListStreamItemData.from_dict(obj.get("data")) - type = PlatformGuideListStreamItemType(obj.get("type")) - return PlatformGuideListStreamItem(data, type) + properties = from_dict(lambda x: x, obj.get("properties")) + required = from_union([lambda x: from_list(from_str, x), from_none], obj.get("required")) + type = Type15(obj.get("type")) + return TentacledParameters(properties, required, type) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(PlatformGuideListStreamItemData, self.data) - result["type"] = to_enum(PlatformGuideListStreamItemType, self.type) + result["properties"] = from_dict(lambda x: x, self.properties) + if self.required is not None: + result["required"] = from_union([lambda x: from_list(from_str, x), from_none], self.required) + result["type"] = to_enum(Type15, self.type) return result -class PlatformGuidesSearchRequest: - search: str - """The search query to find relevant guides""" +class TentacledResult: + """The result of the function execution""" - take: Optional[int] - """The maximum number of results to return (1-100, default 10)""" + data: Any + """The data returned by the function (can be any type)""" - def __init__(self, search: str, take: Optional[int]) -> None: - self.search = search - self.take = take + channel: Optional[str] + """The channel for streaming function results""" + + def __init__(self, data: Any, channel: Optional[str]) -> None: + self.data = data + self.channel = channel @staticmethod - def from_dict(obj: Any) -> 'PlatformGuidesSearchRequest': + def from_dict(obj: Any) -> 'TentacledResult': assert isinstance(obj, dict) - search = from_str(obj.get("search")) - take = from_union([from_int, from_none], obj.get("take")) - return PlatformGuidesSearchRequest(search, take) + data = obj.get("data") + channel = from_union([from_str, from_none], obj.get("channel")) + return TentacledResult(data, channel) def to_dict(self) -> dict: result: dict = {} - result["search"] = from_str(self.search) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + if self.data is not None: + result["data"] = self.data + if self.channel is not None: + result["channel"] = from_union([from_str, from_none], self.channel) return result -class PlatformGuidesSearchResponseItem: - """Instance list properties""" - - category: Optional[str] - """The category of the guide""" - - created_at: float - """The timestamp (ms) when the instance was created""" +class ConversationMessageSendRequestFunction: + call: Optional[TentacledCall] + """Configuration for when this function should be automatically called""" description: str - """The associated description""" - - excerpt: str - """An excerpt from the most relevant part of the guide""" - - id: str - """The instance ID""" - - index: float - """The display order index""" - - link: str - """The URL to the official guide page""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" + """The description of the function""" name: str - """The associated name""" - - score: float - """The similarity score of the search result""" + """The name of the function (must be a valid JS identifier, max 64 chars)""" - tags: List[str] - """Tags associated with the guide""" + parameters: TentacledParameters + """JSON Schema definition for the function parameters""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + result: Optional[TentacledResult] + """The result of the function execution""" - def __init__(self, category: Optional[str], created_at: float, description: str, excerpt: str, id: str, index: float, link: str, meta: Optional[Dict[str, Any]], name: str, score: float, tags: List[str], updated_at: float) -> None: - self.category = category - self.created_at = created_at + def __init__(self, call: Optional[TentacledCall], description: str, name: str, parameters: TentacledParameters, result: Optional[TentacledResult]) -> None: + self.call = call self.description = description - self.excerpt = excerpt - self.id = id - self.index = index - self.link = link - self.meta = meta self.name = name - self.score = score - self.tags = tags - self.updated_at = updated_at + self.parameters = parameters + self.result = result @staticmethod - def from_dict(obj: Any) -> 'PlatformGuidesSearchResponseItem': + def from_dict(obj: Any) -> 'ConversationMessageSendRequestFunction': assert isinstance(obj, dict) - category = from_union([from_str, from_none], obj.get("category")) - created_at = from_float(obj.get("createdAt")) + call = from_union([TentacledCall.from_dict, from_none], obj.get("call")) description = from_str(obj.get("description")) - excerpt = from_str(obj.get("excerpt")) - id = from_str(obj.get("id")) - index = from_float(obj.get("index")) - link = from_str(obj.get("link")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_str(obj.get("name")) - score = from_float(obj.get("score")) - tags = from_list(from_str, obj.get("tags")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformGuidesSearchResponseItem(category, created_at, description, excerpt, id, index, link, meta, name, score, tags, updated_at) + parameters = TentacledParameters.from_dict(obj.get("parameters")) + result = from_union([TentacledResult.from_dict, from_none], obj.get("result")) + return ConversationMessageSendRequestFunction(call, description, name, parameters, result) def to_dict(self) -> dict: result: dict = {} - if self.category is not None: - result["category"] = from_union([from_str, from_none], self.category) - result["createdAt"] = to_float(self.created_at) + if self.call is not None: + result["call"] = from_union([lambda x: to_class(TentacledCall, x), from_none], self.call) result["description"] = from_str(self.description) - result["excerpt"] = from_str(self.excerpt) - result["id"] = from_str(self.id) - result["index"] = to_float(self.index) - result["link"] = from_str(self.link) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) result["name"] = from_str(self.name) - result["score"] = to_float(self.score) - result["tags"] = from_list(from_str, self.tags) - result["updatedAt"] = to_float(self.updated_at) + result["parameters"] = to_class(TentacledParameters, self.parameters) + if self.result is not None: + result["result"] = from_union([lambda x: to_class(TentacledResult, x), from_none], self.result) return result -class PlatformGuidesSearchResponse: - items: List[PlatformGuidesSearchResponseItem] +class ConversationMessageSendRequest: + entities: Optional[List[ConversationMessageSendRequestEntity]] + """Known entities""" + + extensions: Optional[ConversationMessageSendRequestExtensions] + """Extensions to enhance the bot's capabilities""" + + functions: Optional[List[ConversationMessageSendRequestFunction]] + """An array of functions to be added to the conversation""" - def __init__(self, items: List[PlatformGuidesSearchResponseItem]) -> None: - self.items = items + text: str + """The text of the message to send""" + + def __init__(self, entities: Optional[List[ConversationMessageSendRequestEntity]], extensions: Optional[ConversationMessageSendRequestExtensions], functions: Optional[List[ConversationMessageSendRequestFunction]], text: str) -> None: + self.entities = entities + self.extensions = extensions + self.functions = functions + self.text = text @staticmethod - def from_dict(obj: Any) -> 'PlatformGuidesSearchResponse': + def from_dict(obj: Any) -> 'ConversationMessageSendRequest': assert isinstance(obj, dict) - items = from_list(PlatformGuidesSearchResponseItem.from_dict, obj.get("items")) - return PlatformGuidesSearchResponse(items) + entities = from_union([lambda x: from_list(ConversationMessageSendRequestEntity.from_dict, x), from_none], obj.get("entities")) + extensions = from_union([ConversationMessageSendRequestExtensions.from_dict, from_none], obj.get("extensions")) + functions = from_union([lambda x: from_list(ConversationMessageSendRequestFunction.from_dict, x), from_none], obj.get("functions")) + text = from_str(obj.get("text")) + return ConversationMessageSendRequest(entities, extensions, functions, text) def to_dict(self) -> dict: result: dict = {} - result["items"] = from_list(lambda x: to_class(PlatformGuidesSearchResponseItem, x), self.items) + if self.entities is not None: + result["entities"] = from_union([lambda x: from_list(lambda x: to_class(ConversationMessageSendRequestEntity, x), x), from_none], self.entities) + if self.extensions is not None: + result["extensions"] = from_union([lambda x: to_class(ConversationMessageSendRequestExtensions, x), from_none], self.extensions) + if self.functions is not None: + result["functions"] = from_union([lambda x: from_list(lambda x: to_class(ConversationMessageSendRequestFunction, x), x), from_none], self.functions) + result["text"] = from_str(self.text) return result -class PlatformManualFetchParams: - manual_id: str - """The ID of the manual to fetch (e.g., "datasets", "skillsets")""" +class FluffyReplacement: + begin: float + """Start offset""" + + end: float + """End offset""" + + text: str + """The text value of the replacement""" - def __init__(self, manual_id: str) -> None: - self.manual_id = manual_id + def __init__(self, begin: float, end: float, text: str) -> None: + self.begin = begin + self.end = end + self.text = text @staticmethod - def from_dict(obj: Any) -> 'PlatformManualFetchParams': + def from_dict(obj: Any) -> 'FluffyReplacement': assert isinstance(obj, dict) - manual_id = from_str(obj.get("manualId")) - return PlatformManualFetchParams(manual_id) + begin = from_float(obj.get("begin")) + end = from_float(obj.get("end")) + text = from_str(obj.get("text")) + return FluffyReplacement(begin, end, text) def to_dict(self) -> dict: result: dict = {} - result["manualId"] = from_str(self.manual_id) + result["begin"] = to_float(self.begin) + result["end"] = to_float(self.end) + result["text"] = from_str(self.text) return result -class PlatformManualFetchResponse: - """Instance list properties""" - - category: Optional[str] - """The category of the manual""" +class ConversationMessageSendResponseEntity: + """Extracted entity from the message""" - content: str - """The markdown content of the manual""" + begin: float + """Start offset""" - created_at: float - """The timestamp (ms) when the instance was created""" + end: float + """End offset""" - description: Optional[str] - """The associated description""" + replacement: Optional[FluffyReplacement] + text: str + """The text value of the entity""" - id: str - """The instance ID""" + type: str + """The entity type""" - index: Optional[float] - """The display order index""" + def __init__(self, begin: float, end: float, replacement: Optional[FluffyReplacement], text: str, type: str) -> None: + self.begin = begin + self.end = end + self.replacement = replacement + self.text = text + self.type = type - link: Optional[str] - """The URL to the official documentation page""" + @staticmethod + def from_dict(obj: Any) -> 'ConversationMessageSendResponseEntity': + assert isinstance(obj, dict) + begin = from_float(obj.get("begin")) + end = from_float(obj.get("end")) + replacement = from_union([FluffyReplacement.from_dict, from_none], obj.get("replacement")) + text = from_str(obj.get("text")) + type = from_str(obj.get("type")) + return ConversationMessageSendResponseEntity(begin, end, replacement, text, type) - meta: Optional[Dict[str, Any]] - """Meta data information""" + def to_dict(self) -> dict: + result: dict = {} + result["begin"] = to_float(self.begin) + result["end"] = to_float(self.end) + if self.replacement is not None: + result["replacement"] = from_union([lambda x: to_class(FluffyReplacement, x), from_none], self.replacement) + result["text"] = from_str(self.text) + result["type"] = from_str(self.type) + return result - name: str - """The associated name""" - tags: Optional[List[str]] - """Tags associated with the manual""" +class ConversationMessageSendResponse: + entities: List[ConversationMessageSendResponseEntity] + """Extracted entities from the message""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + id: str + """The ID of the sent message""" - def __init__(self, category: Optional[str], content: str, created_at: float, description: Optional[str], id: str, index: Optional[float], link: Optional[str], meta: Optional[Dict[str, Any]], name: str, tags: Optional[List[str]], updated_at: float) -> None: - self.category = category - self.content = content - self.created_at = created_at - self.description = description + def __init__(self, entities: List[ConversationMessageSendResponseEntity], id: str) -> None: + self.entities = entities self.id = id - self.index = index - self.link = link - self.meta = meta - self.name = name - self.tags = tags - self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'PlatformManualFetchResponse': + def from_dict(obj: Any) -> 'ConversationMessageSendResponse': assert isinstance(obj, dict) - category = from_union([from_str, from_none], obj.get("category")) - content = from_str(obj.get("content")) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) + entities = from_list(ConversationMessageSendResponseEntity.from_dict, obj.get("entities")) id = from_str(obj.get("id")) - index = from_union([from_float, from_none], obj.get("index")) - link = from_union([from_str, from_none], obj.get("link")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - tags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tags")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformManualFetchResponse(category, content, created_at, description, id, index, link, meta, name, tags, updated_at) + return ConversationMessageSendResponse(entities, id) def to_dict(self) -> dict: result: dict = {} - if self.category is not None: - result["category"] = from_union([from_str, from_none], self.category) - result["content"] = from_str(self.content) - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) + result["entities"] = from_list(lambda x: to_class(ConversationMessageSendResponseEntity, x), self.entities) result["id"] = from_str(self.id) - if self.index is not None: - result["index"] = from_union([to_float, from_none], self.index) - if self.link is not None: - result["link"] = from_union([from_str, from_none], self.link) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - if self.tags is not None: - result["tags"] = from_union([lambda x: from_list(from_str, x), from_none], self.tags) - result["updatedAt"] = to_float(self.updated_at) return result -class PlatformManualListParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" - - -class PlatformManualListParams: - cursor: Optional[str] - """The cursor to use for pagination""" - - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" +class TentacledReplacement: + begin: float + """Start offset""" - order: Optional[PlatformManualListParamsOrder] - """The order of the paginated items""" + end: float + """End offset""" - take: Optional[int] - """The number of items to retrieve""" + text: str + """The text value of the replacement""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[PlatformManualListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take + def __init__(self, begin: float, end: float, text: str) -> None: + self.begin = begin + self.end = end + self.text = text @staticmethod - def from_dict(obj: Any) -> 'PlatformManualListParams': + def from_dict(obj: Any) -> 'TentacledReplacement': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([PlatformManualListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return PlatformManualListParams(cursor, meta, order, take) + begin = from_float(obj.get("begin")) + end = from_float(obj.get("end")) + text = from_str(obj.get("text")) + return TentacledReplacement(begin, end, text) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(PlatformManualListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["begin"] = to_float(self.begin) + result["end"] = to_float(self.end) + result["text"] = from_str(self.text) return result -class PlatformManualListResponseItem: - """Instance list properties""" - - category: Optional[str] - """The category of the manual""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - description: str - """The associated description""" - - id: str - """The instance ID""" - - index: float - """The display order index""" - - link: str - """The URL to the official documentation page""" +class DataEntity: + """Extracted entity from the message""" - meta: Optional[Dict[str, Any]] - """Meta data information""" + begin: float + """Start offset""" - name: str - """The associated name""" + end: float + """End offset""" - tags: List[str] - """Tags associated with the manual""" + replacement: Optional[TentacledReplacement] + text: str + """The text value of the entity""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + type: str + """The entity type""" - def __init__(self, category: Optional[str], created_at: float, description: str, id: str, index: float, link: str, meta: Optional[Dict[str, Any]], name: str, tags: List[str], updated_at: float) -> None: - self.category = category - self.created_at = created_at - self.description = description - self.id = id - self.index = index - self.link = link - self.meta = meta - self.name = name - self.tags = tags - self.updated_at = updated_at + def __init__(self, begin: float, end: float, replacement: Optional[TentacledReplacement], text: str, type: str) -> None: + self.begin = begin + self.end = end + self.replacement = replacement + self.text = text + self.type = type @staticmethod - def from_dict(obj: Any) -> 'PlatformManualListResponseItem': + def from_dict(obj: Any) -> 'DataEntity': assert isinstance(obj, dict) - category = from_union([from_str, from_none], obj.get("category")) - created_at = from_float(obj.get("createdAt")) - description = from_str(obj.get("description")) - id = from_str(obj.get("id")) - index = from_float(obj.get("index")) - link = from_str(obj.get("link")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - tags = from_list(from_str, obj.get("tags")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformManualListResponseItem(category, created_at, description, id, index, link, meta, name, tags, updated_at) + begin = from_float(obj.get("begin")) + end = from_float(obj.get("end")) + replacement = from_union([TentacledReplacement.from_dict, from_none], obj.get("replacement")) + text = from_str(obj.get("text")) + type = from_str(obj.get("type")) + return DataEntity(begin, end, replacement, text, type) def to_dict(self) -> dict: result: dict = {} - if self.category is not None: - result["category"] = from_union([from_str, from_none], self.category) - result["createdAt"] = to_float(self.created_at) - result["description"] = from_str(self.description) - result["id"] = from_str(self.id) - result["index"] = to_float(self.index) - result["link"] = from_str(self.link) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - result["tags"] = from_list(from_str, self.tags) - result["updatedAt"] = to_float(self.updated_at) + result["begin"] = to_float(self.begin) + result["end"] = to_float(self.end) + if self.replacement is not None: + result["replacement"] = from_union([lambda x: to_class(TentacledReplacement, x), from_none], self.replacement) + result["text"] = from_str(self.text) + result["type"] = from_str(self.type) return result -class PlatformManualListResponse: - cursor: str - """Cursor for fetching the next page""" - - items: List[PlatformManualListResponseItem] - - def __init__(self, cursor: str, items: List[PlatformManualListResponseItem]) -> None: - self.cursor = cursor - self.items = items +class Type16(Enum): + """The type of the message""" - @staticmethod - def from_dict(obj: Any) -> 'PlatformManualListResponse': - assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(PlatformManualListResponseItem.from_dict, obj.get("items")) - return PlatformManualListResponse(cursor, items) + ACTIVITY = "activity" + BACKSTORY = "backstory" + BOT = "bot" + CHECKPOINT = "checkpoint" + CONTEXT = "context" + INSTRUCTION = "instruction" + REASONING = "reasoning" + USER = "user" - def to_dict(self) -> dict: - result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(PlatformManualListResponseItem, x), self.items) - return result +class ConversationMessageSendStreamItemData: + """The data for the event + + A message in the conversation + + Information about an abort event in a streamed response + """ + entities: Optional[List[DataEntity]] + """Extracted entities from the message""" -class PlatformManualListStreamItemData: - """Instance list properties""" + id: Optional[str] + """The ID of the sent message""" - category: Optional[str] - """The category of the manual""" + message: Optional[str] + """The error message""" - created_at: float - """The timestamp (ms) when the instance was created""" + token: Optional[str] + """The token generated""" - description: str - """The associated description""" + meta: Optional[Dict[str, Any]] + """Meta data information""" - id: str - """The instance ID""" + text: Optional[str] + """The text of the message""" - index: float - """The display order index""" + type: Optional[Type16] + """The type of the message""" - link: str - """The URL to the official documentation page""" + function_name: Optional[str] + """The function or tool associated with the abort""" - meta: Optional[Dict[str, Any]] - """Meta data information""" + reason: Any + """The abort reason if available""" - name: str - """The associated name""" + input_tokens_used: Optional[float] + """The number of input tokens used""" - tags: List[str] - """Tags associated with the manual""" + model: Optional[str] + """The model used""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + output_tokens_used: Optional[float] + """The number of output tokens used""" - def __init__(self, category: Optional[str], created_at: float, description: str, id: str, index: float, link: str, meta: Optional[Dict[str, Any]], name: str, tags: List[str], updated_at: float) -> None: - self.category = category - self.created_at = created_at - self.description = description + def __init__(self, entities: Optional[List[DataEntity]], id: Optional[str], message: Optional[str], token: Optional[str], meta: Optional[Dict[str, Any]], text: Optional[str], type: Optional[Type16], function_name: Optional[str], reason: Any, input_tokens_used: Optional[float], model: Optional[str], output_tokens_used: Optional[float]) -> None: + self.entities = entities self.id = id - self.index = index - self.link = link + self.message = message + self.token = token self.meta = meta - self.name = name - self.tags = tags - self.updated_at = updated_at + self.text = text + self.type = type + self.function_name = function_name + self.reason = reason + self.input_tokens_used = input_tokens_used + self.model = model + self.output_tokens_used = output_tokens_used @staticmethod - def from_dict(obj: Any) -> 'PlatformManualListStreamItemData': + def from_dict(obj: Any) -> 'ConversationMessageSendStreamItemData': assert isinstance(obj, dict) - category = from_union([from_str, from_none], obj.get("category")) - created_at = from_float(obj.get("createdAt")) - description = from_str(obj.get("description")) - id = from_str(obj.get("id")) - index = from_float(obj.get("index")) - link = from_str(obj.get("link")) + entities = from_union([lambda x: from_list(DataEntity.from_dict, x), from_none], obj.get("entities")) + id = from_union([from_str, from_none], obj.get("id")) + message = from_union([from_str, from_none], obj.get("message")) + token = from_union([from_str, from_none], obj.get("token")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - tags = from_list(from_str, obj.get("tags")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformManualListStreamItemData(category, created_at, description, id, index, link, meta, name, tags, updated_at) + text = from_union([from_str, from_none], obj.get("text")) + type = from_union([Type16, from_none], obj.get("type")) + function_name = from_union([from_str, from_none], obj.get("functionName")) + reason = obj.get("reason") + input_tokens_used = from_union([from_float, from_none], obj.get("inputTokensUsed")) + model = from_union([from_str, from_none], obj.get("model")) + output_tokens_used = from_union([from_float, from_none], obj.get("outputTokensUsed")) + return ConversationMessageSendStreamItemData(entities, id, message, token, meta, text, type, function_name, reason, input_tokens_used, model, output_tokens_used) def to_dict(self) -> dict: result: dict = {} - if self.category is not None: - result["category"] = from_union([from_str, from_none], self.category) - result["createdAt"] = to_float(self.created_at) - result["description"] = from_str(self.description) - result["id"] = from_str(self.id) - result["index"] = to_float(self.index) - result["link"] = from_str(self.link) + if self.entities is not None: + result["entities"] = from_union([lambda x: from_list(lambda x: to_class(DataEntity, x), x), from_none], self.entities) + if self.id is not None: + result["id"] = from_union([from_str, from_none], self.id) + if self.message is not None: + result["message"] = from_union([from_str, from_none], self.message) + if self.token is not None: + result["token"] = from_union([from_str, from_none], self.token) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - result["tags"] = from_list(from_str, self.tags) - result["updatedAt"] = to_float(self.updated_at) + if self.text is not None: + result["text"] = from_union([from_str, from_none], self.text) + if self.type is not None: + result["type"] = from_union([lambda x: to_enum(Type16, x), from_none], self.type) + if self.function_name is not None: + result["functionName"] = from_union([from_str, from_none], self.function_name) + if self.reason is not None: + result["reason"] = self.reason + if self.input_tokens_used is not None: + result["inputTokensUsed"] = from_union([to_float, from_none], self.input_tokens_used) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) + if self.output_tokens_used is not None: + result["outputTokensUsed"] = from_union([to_float, from_none], self.output_tokens_used) return result -class PlatformManualListStreamItemType(Enum): +class ConversationMessageSendStreamItemType(Enum): """The type of event""" - ITEM = "item" - + ABORT = "abort" + COMPLETE_BEGIN = "completeBegin" + COMPLETE_END = "completeEnd" + ERROR = "error" + MESSAGE = "message" + REASONING_TOKEN = "reasoningToken" + RESULT = "result" + TOKEN = "token" + USAGE = "usage" + WAIT_FOR_CHANNEL_MESSAGE_BEGIN = "waitForChannelMessageBegin" + WAIT_FOR_CHANNEL_MESSAGE_END = "waitForChannelMessageEnd" -class PlatformManualListStreamItem: - data: PlatformManualListStreamItemData - """Instance list properties""" - type: PlatformManualListStreamItemType +class ConversationMessageSendStreamItem: + data: ConversationMessageSendStreamItemData + """The data for the event + + A message in the conversation + + Information about an abort event in a streamed response + """ + type: ConversationMessageSendStreamItemType """The type of event""" - def __init__(self, data: PlatformManualListStreamItemData, type: PlatformManualListStreamItemType) -> None: + def __init__(self, data: ConversationMessageSendStreamItemData, type: ConversationMessageSendStreamItemType) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'PlatformManualListStreamItem': + def from_dict(obj: Any) -> 'ConversationMessageSendStreamItem': assert isinstance(obj, dict) - data = PlatformManualListStreamItemData.from_dict(obj.get("data")) - type = PlatformManualListStreamItemType(obj.get("type")) - return PlatformManualListStreamItem(data, type) + data = ConversationMessageSendStreamItemData.from_dict(obj.get("data")) + type = ConversationMessageSendStreamItemType(obj.get("type")) + return ConversationMessageSendStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(PlatformManualListStreamItemData, self.data) - result["type"] = to_enum(PlatformManualListStreamItemType, self.type) + result["data"] = to_class(ConversationMessageSendStreamItemData, self.data) + result["type"] = to_enum(ConversationMessageSendStreamItemType, self.type) return result -class PlatformManualsSearchRequest: - search: str - """The search query to find relevant manuals""" - - take: Optional[int] - """The maximum number of results to return (1-100, default 10)""" +class ConversationMessageReceiveParams: + conversation_id: str + """The ID of the conversation to receive message from""" - def __init__(self, search: str, take: Optional[int]) -> None: - self.search = search - self.take = take + def __init__(self, conversation_id: str) -> None: + self.conversation_id = conversation_id @staticmethod - def from_dict(obj: Any) -> 'PlatformManualsSearchRequest': + def from_dict(obj: Any) -> 'ConversationMessageReceiveParams': assert isinstance(obj, dict) - search = from_str(obj.get("search")) - take = from_union([from_int, from_none], obj.get("take")) - return PlatformManualsSearchRequest(search, take) + conversation_id = from_str(obj.get("conversationId")) + return ConversationMessageReceiveParams(conversation_id) def to_dict(self) -> dict: result: dict = {} - result["search"] = from_str(self.search) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["conversationId"] = from_str(self.conversation_id) return result -class PlatformManualsSearchResponseItem: - """Instance list properties""" - - category: Optional[str] - """The category of the manual""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - description: str - """The associated description""" - - excerpt: str - """An excerpt from the most relevant part of the manual""" +class IndigoRecord: + meta: Optional[Dict[str, Any]] + """Additional metadata for the record""" - id: str - """The instance ID""" + text: str + """The text content of the record""" - index: float - """The display order index""" + def __init__(self, meta: Optional[Dict[str, Any]], text: str) -> None: + self.meta = meta + self.text = text - link: str - """The URL to the official documentation page""" + @staticmethod + def from_dict(obj: Any) -> 'IndigoRecord': + assert isinstance(obj, dict) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + text = from_str(obj.get("text")) + return IndigoRecord(meta, text) - meta: Optional[Dict[str, Any]] - """Meta data information""" + def to_dict(self) -> dict: + result: dict = {} + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + result["text"] = from_str(self.text) + return result - name: str - """The associated name""" - score: float - """The similarity score of the search result""" +class IndigoDataset: + description: Optional[str] + """The description of the dataset""" - tags: List[str] - """Tags associated with the manual""" + name: Optional[str] + """The name of the dataset""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + records: List[IndigoRecord] + """The records in the dataset""" - def __init__(self, category: Optional[str], created_at: float, description: str, excerpt: str, id: str, index: float, link: str, meta: Optional[Dict[str, Any]], name: str, score: float, tags: List[str], updated_at: float) -> None: - self.category = category - self.created_at = created_at + def __init__(self, description: Optional[str], name: Optional[str], records: List[IndigoRecord]) -> None: self.description = description - self.excerpt = excerpt - self.id = id - self.index = index - self.link = link - self.meta = meta self.name = name - self.score = score - self.tags = tags - self.updated_at = updated_at + self.records = records @staticmethod - def from_dict(obj: Any) -> 'PlatformManualsSearchResponseItem': + def from_dict(obj: Any) -> 'IndigoDataset': assert isinstance(obj, dict) - category = from_union([from_str, from_none], obj.get("category")) - created_at = from_float(obj.get("createdAt")) - description = from_str(obj.get("description")) - excerpt = from_str(obj.get("excerpt")) - id = from_str(obj.get("id")) - index = from_float(obj.get("index")) - link = from_str(obj.get("link")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - score = from_float(obj.get("score")) - tags = from_list(from_str, obj.get("tags")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformManualsSearchResponseItem(category, created_at, description, excerpt, id, index, link, meta, name, score, tags, updated_at) + description = from_union([from_str, from_none], obj.get("description")) + name = from_union([from_str, from_none], obj.get("name")) + records = from_list(IndigoRecord.from_dict, obj.get("records")) + return IndigoDataset(description, name, records) def to_dict(self) -> dict: result: dict = {} - if self.category is not None: - result["category"] = from_union([from_str, from_none], self.category) - result["createdAt"] = to_float(self.created_at) - result["description"] = from_str(self.description) - result["excerpt"] = from_str(self.excerpt) - result["id"] = from_str(self.id) - result["index"] = to_float(self.index) - result["link"] = from_str(self.link) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - result["score"] = to_float(self.score) - result["tags"] = from_list(from_str, self.tags) - result["updatedAt"] = to_float(self.updated_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + result["records"] = from_list(lambda x: to_class(IndigoRecord, x), self.records) return result -class PlatformManualsSearchResponse: - items: List[PlatformManualsSearchResponseItem] +class IndigoFeature: + name: str + """The name of the feature to enable""" + + options: Optional[Dict[str, Any]] + """Optional configuration options for the feature""" - def __init__(self, items: List[PlatformManualsSearchResponseItem]) -> None: - self.items = items + def __init__(self, name: str, options: Optional[Dict[str, Any]]) -> None: + self.name = name + self.options = options @staticmethod - def from_dict(obj: Any) -> 'PlatformManualsSearchResponse': + def from_dict(obj: Any) -> 'IndigoFeature': assert isinstance(obj, dict) - items = from_list(PlatformManualsSearchResponseItem.from_dict, obj.get("items")) - return PlatformManualsSearchResponse(items) + name = from_str(obj.get("name")) + options = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("options")) + return IndigoFeature(name, options) def to_dict(self) -> dict: result: dict = {} - result["items"] = from_list(lambda x: to_class(PlatformManualsSearchResponseItem, x), self.items) + result["name"] = from_str(self.name) + if self.options is not None: + result["options"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.options) return result -class PlatformModelListParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" +class IndigoAbility: + description: str + """The description of the ability""" + instruction: str + """The instruction for the ability""" -class PlatformModelListParams: - cursor: Optional[str] - """The cursor to use for pagination""" + linked_secret_id: Optional[str] + """Optional secret ID for the ability""" - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" + linked_space_id: Optional[str] + """Optional space ID for the ability""" - order: Optional[PlatformModelListParamsOrder] - """The order of the paginated items""" + meta: Optional[Dict[str, Any]] + """Additional metadata for the ability""" - take: Optional[int] - """The number of items to retrieve""" + name: str + """The name of the ability""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[PlatformModelListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor + def __init__(self, description: str, instruction: str, linked_secret_id: Optional[str], linked_space_id: Optional[str], meta: Optional[Dict[str, Any]], name: str) -> None: + self.description = description + self.instruction = instruction + self.linked_secret_id = linked_secret_id + self.linked_space_id = linked_space_id self.meta = meta - self.order = order - self.take = take + self.name = name @staticmethod - def from_dict(obj: Any) -> 'PlatformModelListParams': + def from_dict(obj: Any) -> 'IndigoAbility': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([PlatformModelListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return PlatformModelListParams(cursor, meta, order, take) + description = from_str(obj.get("description")) + instruction = from_str(obj.get("instruction")) + linked_secret_id = from_union([from_str, from_none], obj.get("linkedSecretId")) + linked_space_id = from_union([from_str, from_none], obj.get("linkedSpaceId")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_str(obj.get("name")) + return IndigoAbility(description, instruction, linked_secret_id, linked_space_id, meta, name) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) + result["description"] = from_str(self.description) + result["instruction"] = from_str(self.instruction) + if self.linked_secret_id is not None: + result["linkedSecretId"] = from_union([from_str, from_none], self.linked_secret_id) + if self.linked_space_id is not None: + result["linkedSpaceId"] = from_union([from_str, from_none], self.linked_space_id) if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(PlatformModelListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + result["name"] = from_str(self.name) return result -class PlatformModelListResponseItem: - """Instance list properties""" - - created_at: float - """The timestamp (ms) when the instance was created""" +class IndigoSkillset: + abilities: List[IndigoAbility] + """The abilities in the skillset""" description: Optional[str] - """The associated description""" - - family: str - """The model of the model""" - - id: str - """The instance ID""" - - max_input_tokens: float - """The maximum number of tokens the model can accept""" - - max_output_tokens: float - """The maximum number of tokens the model can generate""" - - max_tokens: float - """The maximum number of tokens the model can use""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" + """The description of the skillset""" name: Optional[str] - """The associated name""" - - provider: str - """The backstory of the model""" - - updated_at: float - """The timestamp (ms) when the instance was updated""" + """The name of the skillset""" - def __init__(self, created_at: float, description: Optional[str], family: str, id: str, max_input_tokens: float, max_output_tokens: float, max_tokens: float, meta: Optional[Dict[str, Any]], name: Optional[str], provider: str, updated_at: float) -> None: - self.created_at = created_at + def __init__(self, abilities: List[IndigoAbility], description: Optional[str], name: Optional[str]) -> None: + self.abilities = abilities self.description = description - self.family = family - self.id = id - self.max_input_tokens = max_input_tokens - self.max_output_tokens = max_output_tokens - self.max_tokens = max_tokens - self.meta = meta self.name = name - self.provider = provider - self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'PlatformModelListResponseItem': + def from_dict(obj: Any) -> 'IndigoSkillset': assert isinstance(obj, dict) - created_at = from_float(obj.get("createdAt")) + abilities = from_list(IndigoAbility.from_dict, obj.get("abilities")) description = from_union([from_str, from_none], obj.get("description")) - family = from_str(obj.get("family")) - id = from_str(obj.get("id")) - max_input_tokens = from_float(obj.get("maxInputTokens")) - max_output_tokens = from_float(obj.get("maxOutputTokens")) - max_tokens = from_float(obj.get("maxTokens")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - provider = from_str(obj.get("provider")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformModelListResponseItem(created_at, description, family, id, max_input_tokens, max_output_tokens, max_tokens, meta, name, provider, updated_at) + return IndigoSkillset(abilities, description, name) def to_dict(self) -> dict: result: dict = {} - result["createdAt"] = to_float(self.created_at) + result["abilities"] = from_list(lambda x: to_class(IndigoAbility, x), self.abilities) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - result["family"] = from_str(self.family) - result["id"] = from_str(self.id) - result["maxInputTokens"] = to_float(self.max_input_tokens) - result["maxOutputTokens"] = to_float(self.max_output_tokens) - result["maxTokens"] = to_float(self.max_tokens) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - result["provider"] = from_str(self.provider) - result["updatedAt"] = to_float(self.updated_at) return result -class PlatformModelListResponse: - cursor: str - """Cursor for fetching the next page""" +class ConversationMessageReceiveRequestExtensions: + """Extensions to enhance the bot's capabilities""" - items: List[PlatformModelListResponseItem] + backstory: Optional[str] + """Additional backstory for the bot""" - def __init__(self, cursor: str, items: List[PlatformModelListResponseItem]) -> None: - self.cursor = cursor - self.items = items + datasets: Optional[List[IndigoDataset]] + """Inline datasets to provide additional context""" + + features: Optional[List[IndigoFeature]] + """Feature flags to enable specific bot capabilities""" + + skillsets: Optional[List[IndigoSkillset]] + """Inline skillsets to provide additional abilities""" + + def __init__(self, backstory: Optional[str], datasets: Optional[List[IndigoDataset]], features: Optional[List[IndigoFeature]], skillsets: Optional[List[IndigoSkillset]]) -> None: + self.backstory = backstory + self.datasets = datasets + self.features = features + self.skillsets = skillsets @staticmethod - def from_dict(obj: Any) -> 'PlatformModelListResponse': + def from_dict(obj: Any) -> 'ConversationMessageReceiveRequestExtensions': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(PlatformModelListResponseItem.from_dict, obj.get("items")) - return PlatformModelListResponse(cursor, items) + backstory = from_union([from_str, from_none], obj.get("backstory")) + datasets = from_union([lambda x: from_list(IndigoDataset.from_dict, x), from_none], obj.get("datasets")) + features = from_union([lambda x: from_list(IndigoFeature.from_dict, x), from_none], obj.get("features")) + skillsets = from_union([lambda x: from_list(IndigoSkillset.from_dict, x), from_none], obj.get("skillsets")) + return ConversationMessageReceiveRequestExtensions(backstory, datasets, features, skillsets) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(PlatformModelListResponseItem, x), self.items) + if self.backstory is not None: + result["backstory"] = from_union([from_str, from_none], self.backstory) + if self.datasets is not None: + result["datasets"] = from_union([lambda x: from_list(lambda x: to_class(IndigoDataset, x), x), from_none], self.datasets) + if self.features is not None: + result["features"] = from_union([lambda x: from_list(lambda x: to_class(IndigoFeature, x), x), from_none], self.features) + if self.skillsets is not None: + result["skillsets"] = from_union([lambda x: from_list(lambda x: to_class(IndigoSkillset, x), x), from_none], self.skillsets) return result -class PlatformModelListStreamItemData: - """Instance list properties""" +class StickyCall: + """Configuration for when this function should be automatically called""" - created_at: float - """The timestamp (ms) when the instance was created""" + end: Optional[bool] + """If true, this function will be force-called at the end of the conversation""" - description: Optional[str] - """The associated description""" + start: Optional[bool] + """If true, this function will be force-called at the start of the conversation""" - family: str - """The model of the model""" + def __init__(self, end: Optional[bool], start: Optional[bool]) -> None: + self.end = end + self.start = start - id: str - """The instance ID""" + @staticmethod + def from_dict(obj: Any) -> 'StickyCall': + assert isinstance(obj, dict) + end = from_union([from_bool, from_none], obj.get("end")) + start = from_union([from_bool, from_none], obj.get("start")) + return StickyCall(end, start) - max_input_tokens: float - """The maximum number of tokens the model can accept""" + def to_dict(self) -> dict: + result: dict = {} + if self.end is not None: + result["end"] = from_union([from_bool, from_none], self.end) + if self.start is not None: + result["start"] = from_union([from_bool, from_none], self.start) + return result - max_output_tokens: float - """The maximum number of tokens the model can generate""" - max_tokens: float - """The maximum number of tokens the model can use""" +class Type17(Enum): + """The schema type, must be "object\"""" - meta: Optional[Dict[str, Any]] - """Meta data information""" + OBJECT = "object" - name: Optional[str] - """The associated name""" - provider: str - """The backstory of the model""" +class StickyParameters: + """JSON Schema definition for the function parameters""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + properties: Dict[str, Any] + """Object property definitions""" - def __init__(self, created_at: float, description: Optional[str], family: str, id: str, max_input_tokens: float, max_output_tokens: float, max_tokens: float, meta: Optional[Dict[str, Any]], name: Optional[str], provider: str, updated_at: float) -> None: - self.created_at = created_at - self.description = description - self.family = family - self.id = id - self.max_input_tokens = max_input_tokens - self.max_output_tokens = max_output_tokens - self.max_tokens = max_tokens - self.meta = meta - self.name = name - self.provider = provider - self.updated_at = updated_at + required: Optional[List[str]] + """Required property names""" + + type: Type17 + """The schema type, must be "object\"""" + + def __init__(self, properties: Dict[str, Any], required: Optional[List[str]], type: Type17) -> None: + self.properties = properties + self.required = required + self.type = type @staticmethod - def from_dict(obj: Any) -> 'PlatformModelListStreamItemData': + def from_dict(obj: Any) -> 'StickyParameters': assert isinstance(obj, dict) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - family = from_str(obj.get("family")) - id = from_str(obj.get("id")) - max_input_tokens = from_float(obj.get("maxInputTokens")) - max_output_tokens = from_float(obj.get("maxOutputTokens")) - max_tokens = from_float(obj.get("maxTokens")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - provider = from_str(obj.get("provider")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformModelListStreamItemData(created_at, description, family, id, max_input_tokens, max_output_tokens, max_tokens, meta, name, provider, updated_at) + properties = from_dict(lambda x: x, obj.get("properties")) + required = from_union([lambda x: from_list(from_str, x), from_none], obj.get("required")) + type = Type17(obj.get("type")) + return StickyParameters(properties, required, type) def to_dict(self) -> dict: result: dict = {} - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - result["family"] = from_str(self.family) - result["id"] = from_str(self.id) - result["maxInputTokens"] = to_float(self.max_input_tokens) - result["maxOutputTokens"] = to_float(self.max_output_tokens) - result["maxTokens"] = to_float(self.max_tokens) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - result["provider"] = from_str(self.provider) - result["updatedAt"] = to_float(self.updated_at) + result["properties"] = from_dict(lambda x: x, self.properties) + if self.required is not None: + result["required"] = from_union([lambda x: from_list(from_str, x), from_none], self.required) + result["type"] = to_enum(Type17, self.type) return result -class PlatformModelListStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - +class StickyResult: + """The result of the function execution""" -class PlatformModelListStreamItem: - data: PlatformModelListStreamItemData - """Instance list properties""" + data: Any + """The data returned by the function (can be any type)""" - type: PlatformModelListStreamItemType - """The type of event""" + channel: Optional[str] + """The channel for streaming function results""" - def __init__(self, data: PlatformModelListStreamItemData, type: PlatformModelListStreamItemType) -> None: + def __init__(self, data: Any, channel: Optional[str]) -> None: self.data = data - self.type = type + self.channel = channel @staticmethod - def from_dict(obj: Any) -> 'PlatformModelListStreamItem': + def from_dict(obj: Any) -> 'StickyResult': assert isinstance(obj, dict) - data = PlatformModelListStreamItemData.from_dict(obj.get("data")) - type = PlatformModelListStreamItemType(obj.get("type")) - return PlatformModelListStreamItem(data, type) + data = obj.get("data") + channel = from_union([from_str, from_none], obj.get("channel")) + return StickyResult(data, channel) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(PlatformModelListStreamItemData, self.data) - result["type"] = to_enum(PlatformModelListStreamItemType, self.type) + if self.data is not None: + result["data"] = self.data + if self.channel is not None: + result["channel"] = from_union([from_str, from_none], self.channel) return result -class PlatformSecretListParamsOrder(Enum): - """The order of the paginated items""" +class ConversationMessageReceiveRequestFunction: + call: Optional[StickyCall] + """Configuration for when this function should be automatically called""" - ASC = "asc" - DESC = "desc" + description: str + """The description of the function""" + name: str + """The name of the function (must be a valid JS identifier, max 64 chars)""" -class PlatformSecretListParams: - cursor: Optional[str] - """The cursor to use for pagination""" + parameters: StickyParameters + """JSON Schema definition for the function parameters""" - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" + result: Optional[StickyResult] + """The result of the function execution""" - order: Optional[PlatformSecretListParamsOrder] - """The order of the paginated items""" + def __init__(self, call: Optional[StickyCall], description: str, name: str, parameters: StickyParameters, result: Optional[StickyResult]) -> None: + self.call = call + self.description = description + self.name = name + self.parameters = parameters + self.result = result - take: Optional[int] - """The number of items to retrieve""" + @staticmethod + def from_dict(obj: Any) -> 'ConversationMessageReceiveRequestFunction': + assert isinstance(obj, dict) + call = from_union([StickyCall.from_dict, from_none], obj.get("call")) + description = from_str(obj.get("description")) + name = from_str(obj.get("name")) + parameters = StickyParameters.from_dict(obj.get("parameters")) + result = from_union([StickyResult.from_dict, from_none], obj.get("result")) + return ConversationMessageReceiveRequestFunction(call, description, name, parameters, result) - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[PlatformSecretListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take + def to_dict(self) -> dict: + result: dict = {} + if self.call is not None: + result["call"] = from_union([lambda x: to_class(StickyCall, x), from_none], self.call) + result["description"] = from_str(self.description) + result["name"] = from_str(self.name) + result["parameters"] = to_class(StickyParameters, self.parameters) + if self.result is not None: + result["result"] = from_union([lambda x: to_class(StickyResult, x), from_none], self.result) + return result + + +class ConversationMessageReceiveRequest: + extensions: Optional[ConversationMessageReceiveRequestExtensions] + """Extensions to enhance the bot's capabilities""" + + functions: Optional[List[ConversationMessageReceiveRequestFunction]] + """An array of functions to be added to the conversation""" + + def __init__(self, extensions: Optional[ConversationMessageReceiveRequestExtensions], functions: Optional[List[ConversationMessageReceiveRequestFunction]]) -> None: + self.extensions = extensions + self.functions = functions @staticmethod - def from_dict(obj: Any) -> 'PlatformSecretListParams': + def from_dict(obj: Any) -> 'ConversationMessageReceiveRequest': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([PlatformSecretListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return PlatformSecretListParams(cursor, meta, order, take) + extensions = from_union([ConversationMessageReceiveRequestExtensions.from_dict, from_none], obj.get("extensions")) + functions = from_union([lambda x: from_list(ConversationMessageReceiveRequestFunction.from_dict, x), from_none], obj.get("functions")) + return ConversationMessageReceiveRequest(extensions, functions) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(PlatformSecretListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + if self.extensions is not None: + result["extensions"] = from_union([lambda x: to_class(ConversationMessageReceiveRequestExtensions, x), from_none], self.extensions) + if self.functions is not None: + result["functions"] = from_union([lambda x: from_list(lambda x: to_class(ConversationMessageReceiveRequestFunction, x), x), from_none], self.functions) return result -class FluffyKind(Enum): - """The kind of the secret""" - - PERSONAL = "personal" - SHARED = "shared" - - -class Type14(Enum): - """The type of the secret""" +class ConversationMessageReceiveResponseUsage: + """Usage information""" - BASIC = "basic" - BEARER = "bearer" - JWT = "jwt" - OAUTH = "oauth" - PLAIN = "plain" - REFERENCE = "reference" - TEMPLATE = "template" + token: float + """The tokens used in this exchange""" + def __init__(self, token: float) -> None: + self.token = token -class PlatformSecretListResponseItem: - """Instance list properties""" + @staticmethod + def from_dict(obj: Any) -> 'ConversationMessageReceiveResponseUsage': + assert isinstance(obj, dict) + token = from_float(obj.get("token")) + return ConversationMessageReceiveResponseUsage(token) - commentary: Optional[str] - config: Optional[Dict[str, Any]] - created_at: float - """The timestamp (ms) when the instance was created""" + def to_dict(self) -> dict: + result: dict = {} + result["token"] = to_float(self.token) + return result - description: Optional[str] - """The associated description""" - icon: Optional[str] +class ConversationMessageReceiveResponse: id: str - """The instance ID""" - - kind: Optional[FluffyKind] - """The kind of the secret""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: Optional[str] - """The associated name""" - - setup: Optional[str] - tags: Optional[List[str]] - template: Optional[str] - """The original template identifier for the secret""" + """The ID of the created message""" - type: Type14 - """The type of the secret""" + text: str + """The text of the message received""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + usage: ConversationMessageReceiveResponseUsage + """Usage information""" - def __init__(self, commentary: Optional[str], config: Optional[Dict[str, Any]], created_at: float, description: Optional[str], icon: Optional[str], id: str, kind: Optional[FluffyKind], meta: Optional[Dict[str, Any]], name: Optional[str], setup: Optional[str], tags: Optional[List[str]], template: Optional[str], type: Type14, updated_at: float) -> None: - self.commentary = commentary - self.config = config - self.created_at = created_at - self.description = description - self.icon = icon + def __init__(self, id: str, text: str, usage: ConversationMessageReceiveResponseUsage) -> None: self.id = id - self.kind = kind - self.meta = meta - self.name = name - self.setup = setup - self.tags = tags - self.template = template - self.type = type - self.updated_at = updated_at + self.text = text + self.usage = usage @staticmethod - def from_dict(obj: Any) -> 'PlatformSecretListResponseItem': + def from_dict(obj: Any) -> 'ConversationMessageReceiveResponse': assert isinstance(obj, dict) - commentary = from_union([from_str, from_none], obj.get("commentary")) - config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - icon = from_union([from_str, from_none], obj.get("icon")) id = from_str(obj.get("id")) - kind = from_union([FluffyKind, from_none], obj.get("kind")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - setup = from_union([from_str, from_none], obj.get("setup")) - tags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tags")) - template = from_union([from_str, from_none], obj.get("template")) - type = Type14(obj.get("type")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformSecretListResponseItem(commentary, config, created_at, description, icon, id, kind, meta, name, setup, tags, template, type, updated_at) + text = from_str(obj.get("text")) + usage = ConversationMessageReceiveResponseUsage.from_dict(obj.get("usage")) + return ConversationMessageReceiveResponse(id, text, usage) def to_dict(self) -> dict: result: dict = {} - if self.commentary is not None: - result["commentary"] = from_union([from_str, from_none], self.commentary) - if self.config is not None: - result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.icon is not None: - result["icon"] = from_union([from_str, from_none], self.icon) result["id"] = from_str(self.id) - if self.kind is not None: - result["kind"] = from_union([lambda x: to_enum(FluffyKind, x), from_none], self.kind) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.setup is not None: - result["setup"] = from_union([from_str, from_none], self.setup) - if self.tags is not None: - result["tags"] = from_union([lambda x: from_list(from_str, x), from_none], self.tags) - if self.template is not None: - result["template"] = from_union([from_str, from_none], self.template) - result["type"] = to_enum(Type14, self.type) - result["updatedAt"] = to_float(self.updated_at) + result["text"] = from_str(self.text) + result["usage"] = to_class(ConversationMessageReceiveResponseUsage, self.usage) return result -class PlatformSecretListResponse: - cursor: str - """Cursor for fetching the next page""" +class Type18(Enum): + """The type of the message""" - items: List[PlatformSecretListResponseItem] + ACTIVITY = "activity" + BACKSTORY = "backstory" + BOT = "bot" + CHECKPOINT = "checkpoint" + CONTEXT = "context" + INSTRUCTION = "instruction" + REASONING = "reasoning" + USER = "user" - def __init__(self, cursor: str, items: List[PlatformSecretListResponseItem]) -> None: - self.cursor = cursor - self.items = items + +class StickyUsage: + """Usage information""" + + token: float + """The tokens used in this exchange""" + + def __init__(self, token: float) -> None: + self.token = token @staticmethod - def from_dict(obj: Any) -> 'PlatformSecretListResponse': + def from_dict(obj: Any) -> 'StickyUsage': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(PlatformSecretListResponseItem.from_dict, obj.get("items")) - return PlatformSecretListResponse(cursor, items) + token = from_float(obj.get("token")) + return StickyUsage(token) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(PlatformSecretListResponseItem, x), self.items) + result["token"] = to_float(self.token) return result -class TentacledKind(Enum): - """The kind of the secret""" - - PERSONAL = "personal" - SHARED = "shared" - - -class Type15(Enum): - """The type of the secret""" - - BASIC = "basic" - BEARER = "bearer" - JWT = "jwt" - OAUTH = "oauth" - PLAIN = "plain" - REFERENCE = "reference" - TEMPLATE = "template" - - -class PlatformSecretListStreamItemData: - """Instance list properties""" - - commentary: Optional[str] - config: Optional[Dict[str, Any]] - created_at: float - """The timestamp (ms) when the instance was created""" +class ConversationMessageReceiveStreamItemData: + """The data for the event + + A message in the conversation + + Information about an abort event in a streamed response + """ + id: Optional[str] + """The ID of the created message""" - description: Optional[str] - """The associated description""" + text: Optional[str] + """The text of the message received + + The text of the message + """ + usage: Optional[StickyUsage] + """Usage information""" - icon: Optional[str] - id: str - """The instance ID""" + message: Optional[str] + """The error message""" - kind: Optional[TentacledKind] - """The kind of the secret""" + token: Optional[str] + """The token generated""" meta: Optional[Dict[str, Any]] """Meta data information""" - name: Optional[str] - """The associated name""" + type: Optional[Type18] + """The type of the message""" - setup: Optional[str] - tags: Optional[List[str]] - template: Optional[str] - """The original template identifier for the secret""" + function_name: Optional[str] + """The function or tool associated with the abort""" - type: Type15 - """The type of the secret""" + reason: Any + """The abort reason if available""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + input_tokens_used: Optional[float] + """The number of input tokens used""" - def __init__(self, commentary: Optional[str], config: Optional[Dict[str, Any]], created_at: float, description: Optional[str], icon: Optional[str], id: str, kind: Optional[TentacledKind], meta: Optional[Dict[str, Any]], name: Optional[str], setup: Optional[str], tags: Optional[List[str]], template: Optional[str], type: Type15, updated_at: float) -> None: - self.commentary = commentary - self.config = config - self.created_at = created_at - self.description = description - self.icon = icon + model: Optional[str] + """The model used""" + + output_tokens_used: Optional[float] + """The number of output tokens used""" + + def __init__(self, id: Optional[str], text: Optional[str], usage: Optional[StickyUsage], message: Optional[str], token: Optional[str], meta: Optional[Dict[str, Any]], type: Optional[Type18], function_name: Optional[str], reason: Any, input_tokens_used: Optional[float], model: Optional[str], output_tokens_used: Optional[float]) -> None: self.id = id - self.kind = kind + self.text = text + self.usage = usage + self.message = message + self.token = token self.meta = meta - self.name = name - self.setup = setup - self.tags = tags - self.template = template self.type = type - self.updated_at = updated_at + self.function_name = function_name + self.reason = reason + self.input_tokens_used = input_tokens_used + self.model = model + self.output_tokens_used = output_tokens_used @staticmethod - def from_dict(obj: Any) -> 'PlatformSecretListStreamItemData': + def from_dict(obj: Any) -> 'ConversationMessageReceiveStreamItemData': assert isinstance(obj, dict) - commentary = from_union([from_str, from_none], obj.get("commentary")) - config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - icon = from_union([from_str, from_none], obj.get("icon")) - id = from_str(obj.get("id")) - kind = from_union([TentacledKind, from_none], obj.get("kind")) + id = from_union([from_str, from_none], obj.get("id")) + text = from_union([from_str, from_none], obj.get("text")) + usage = from_union([StickyUsage.from_dict, from_none], obj.get("usage")) + message = from_union([from_str, from_none], obj.get("message")) + token = from_union([from_str, from_none], obj.get("token")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - setup = from_union([from_str, from_none], obj.get("setup")) - tags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tags")) - template = from_union([from_str, from_none], obj.get("template")) - type = Type15(obj.get("type")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformSecretListStreamItemData(commentary, config, created_at, description, icon, id, kind, meta, name, setup, tags, template, type, updated_at) + type = from_union([Type18, from_none], obj.get("type")) + function_name = from_union([from_str, from_none], obj.get("functionName")) + reason = obj.get("reason") + input_tokens_used = from_union([from_float, from_none], obj.get("inputTokensUsed")) + model = from_union([from_str, from_none], obj.get("model")) + output_tokens_used = from_union([from_float, from_none], obj.get("outputTokensUsed")) + return ConversationMessageReceiveStreamItemData(id, text, usage, message, token, meta, type, function_name, reason, input_tokens_used, model, output_tokens_used) def to_dict(self) -> dict: result: dict = {} - if self.commentary is not None: - result["commentary"] = from_union([from_str, from_none], self.commentary) - if self.config is not None: - result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.icon is not None: - result["icon"] = from_union([from_str, from_none], self.icon) - result["id"] = from_str(self.id) - if self.kind is not None: - result["kind"] = from_union([lambda x: to_enum(TentacledKind, x), from_none], self.kind) + if self.id is not None: + result["id"] = from_union([from_str, from_none], self.id) + if self.text is not None: + result["text"] = from_union([from_str, from_none], self.text) + if self.usage is not None: + result["usage"] = from_union([lambda x: to_class(StickyUsage, x), from_none], self.usage) + if self.message is not None: + result["message"] = from_union([from_str, from_none], self.message) + if self.token is not None: + result["token"] = from_union([from_str, from_none], self.token) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.setup is not None: - result["setup"] = from_union([from_str, from_none], self.setup) - if self.tags is not None: - result["tags"] = from_union([lambda x: from_list(from_str, x), from_none], self.tags) - if self.template is not None: - result["template"] = from_union([from_str, from_none], self.template) - result["type"] = to_enum(Type15, self.type) - result["updatedAt"] = to_float(self.updated_at) + if self.type is not None: + result["type"] = from_union([lambda x: to_enum(Type18, x), from_none], self.type) + if self.function_name is not None: + result["functionName"] = from_union([from_str, from_none], self.function_name) + if self.reason is not None: + result["reason"] = self.reason + if self.input_tokens_used is not None: + result["inputTokensUsed"] = from_union([to_float, from_none], self.input_tokens_used) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) + if self.output_tokens_used is not None: + result["outputTokensUsed"] = from_union([to_float, from_none], self.output_tokens_used) return result -class PlatformSecretListStreamItemType(Enum): +class ConversationMessageReceiveStreamItemType(Enum): """The type of event""" - ITEM = "item" - + ABORT = "abort" + COMPLETE_BEGIN = "completeBegin" + COMPLETE_END = "completeEnd" + ERROR = "error" + MESSAGE = "message" + REASONING_TOKEN = "reasoningToken" + RESULT = "result" + TOKEN = "token" + USAGE = "usage" + WAIT_FOR_CHANNEL_MESSAGE_BEGIN = "waitForChannelMessageBegin" + WAIT_FOR_CHANNEL_MESSAGE_END = "waitForChannelMessageEnd" -class PlatformSecretListStreamItem: - data: PlatformSecretListStreamItemData - """Instance list properties""" - type: PlatformSecretListStreamItemType +class ConversationMessageReceiveStreamItem: + data: Optional[ConversationMessageReceiveStreamItemData] + """The data for the event + + A message in the conversation + + Information about an abort event in a streamed response + """ + type: Optional[ConversationMessageReceiveStreamItemType] """The type of event""" - def __init__(self, data: PlatformSecretListStreamItemData, type: PlatformSecretListStreamItemType) -> None: + def __init__(self, data: Optional[ConversationMessageReceiveStreamItemData], type: Optional[ConversationMessageReceiveStreamItemType]) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'PlatformSecretListStreamItem': + def from_dict(obj: Any) -> 'ConversationMessageReceiveStreamItem': assert isinstance(obj, dict) - data = PlatformSecretListStreamItemData.from_dict(obj.get("data")) - type = PlatformSecretListStreamItemType(obj.get("type")) - return PlatformSecretListStreamItem(data, type) + data = from_union([ConversationMessageReceiveStreamItemData.from_dict, from_none], obj.get("data")) + type = from_union([ConversationMessageReceiveStreamItemType, from_none], obj.get("type")) + return ConversationMessageReceiveStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(PlatformSecretListStreamItemData, self.data) - result["type"] = to_enum(PlatformSecretListStreamItemType, self.type) + if self.data is not None: + result["data"] = from_union([lambda x: to_class(ConversationMessageReceiveStreamItemData, x), from_none], self.data) + if self.type is not None: + result["type"] = from_union([lambda x: to_enum(ConversationMessageReceiveStreamItemType, x), from_none], self.type) return result -class PlatformSecretsSearchRequest: - search: str - """The search query to find relevant secrets""" - - take: Optional[int] - """The maximum number of results to return (1-100, default 10)""" +class ConversationFetchParams: + conversation_id: str + """The ID of the conversation to retrieve""" - def __init__(self, search: str, take: Optional[int]) -> None: - self.search = search - self.take = take + def __init__(self, conversation_id: str) -> None: + self.conversation_id = conversation_id @staticmethod - def from_dict(obj: Any) -> 'PlatformSecretsSearchRequest': + def from_dict(obj: Any) -> 'ConversationFetchParams': assert isinstance(obj, dict) - search = from_str(obj.get("search")) - take = from_union([from_int, from_none], obj.get("take")) - return PlatformSecretsSearchRequest(search, take) + conversation_id = from_str(obj.get("conversationId")) + return ConversationFetchParams(conversation_id) def to_dict(self) -> dict: result: dict = {} - result["search"] = from_str(self.search) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["conversationId"] = from_str(self.conversation_id) return result -class StickyKind(Enum): - """The kind of the secret""" - - PERSONAL = "personal" - SHARED = "shared" - - -class Type16(Enum): - """The type of the secret""" - - BASIC = "basic" - BEARER = "bearer" - JWT = "jwt" - OAUTH = "oauth" - PLAIN = "plain" - REFERENCE = "reference" - TEMPLATE = "template" - - -class PlatformSecretsSearchResponseItem: - """Instance list properties""" +class ConversationFetchResponse: + """A bot configuration or reference + + A bot configuration that can be applied without a dedicated bot instance. + """ + contact_id: Optional[str] + """The contact id assigned to this conversation""" - commentary: Optional[str] - config: Optional[Dict[str, Any]] created_at: float """The timestamp (ms) when the instance was created""" description: Optional[str] """The associated description""" - excerpt: str - """An excerpt from the most relevant part of the secret""" + expires_at: Optional[float] + """The timestamp (ms) at which the conversation expires and is automatically deleted""" - icon: Optional[str] id: str """The instance ID""" - kind: Optional[StickyKind] - """The kind of the secret""" - - link: Optional[str] - """The URL to the official secret page""" - meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - score: float - """The similarity score of the search result""" - - setup: Optional[str] - tags: Optional[List[str]] - template: Optional[str] - """The original template identifier for the secret""" - - type: Type16 - """The type of the secret""" + task_id: Optional[str] + """The task id assigned to this conversation""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, commentary: Optional[str], config: Optional[Dict[str, Any]], created_at: float, description: Optional[str], excerpt: str, icon: Optional[str], id: str, kind: Optional[StickyKind], link: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], score: float, setup: Optional[str], tags: Optional[List[str]], template: Optional[str], type: Type16, updated_at: float) -> None: - self.commentary = commentary - self.config = config + bot_id: Optional[str] + """The ID of the bot this configuration is using""" + + backstory: Optional[str] + """The backstory this configuration is using""" + + dataset_id: Optional[str] + """The id of the dataset this configuration is using""" + + model: Optional[str] + """A model definition""" + + moderation: Optional[bool] + """The moderation flag for this configuration""" + + privacy: Optional[bool] + """The privacy flag for this configuration""" + + skillset_id: Optional[str] + """The id of the skillset this configuration is using""" + + def __init__(self, contact_id: Optional[str], created_at: float, description: Optional[str], expires_at: Optional[float], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], task_id: Optional[str], updated_at: float, bot_id: Optional[str], backstory: Optional[str], dataset_id: Optional[str], model: Optional[str], moderation: Optional[bool], privacy: Optional[bool], skillset_id: Optional[str]) -> None: + self.contact_id = contact_id self.created_at = created_at self.description = description - self.excerpt = excerpt - self.icon = icon + self.expires_at = expires_at self.id = id - self.kind = kind - self.link = link self.meta = meta self.name = name - self.score = score - self.setup = setup - self.tags = tags - self.template = template - self.type = type + self.task_id = task_id self.updated_at = updated_at + self.bot_id = bot_id + self.backstory = backstory + self.dataset_id = dataset_id + self.model = model + self.moderation = moderation + self.privacy = privacy + self.skillset_id = skillset_id @staticmethod - def from_dict(obj: Any) -> 'PlatformSecretsSearchResponseItem': + def from_dict(obj: Any) -> 'ConversationFetchResponse': assert isinstance(obj, dict) - commentary = from_union([from_str, from_none], obj.get("commentary")) - config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - excerpt = from_str(obj.get("excerpt")) - icon = from_union([from_str, from_none], obj.get("icon")) + expires_at = from_union([from_float, from_none], obj.get("expiresAt")) id = from_str(obj.get("id")) - kind = from_union([StickyKind, from_none], obj.get("kind")) - link = from_union([from_str, from_none], obj.get("link")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - score = from_float(obj.get("score")) - setup = from_union([from_str, from_none], obj.get("setup")) - tags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tags")) - template = from_union([from_str, from_none], obj.get("template")) - type = Type16(obj.get("type")) + task_id = from_union([from_str, from_none], obj.get("taskId")) updated_at = from_float(obj.get("updatedAt")) - return PlatformSecretsSearchResponseItem(commentary, config, created_at, description, excerpt, icon, id, kind, link, meta, name, score, setup, tags, template, type, updated_at) + bot_id = from_union([from_str, from_none], obj.get("botId")) + backstory = from_union([from_str, from_none], obj.get("backstory")) + dataset_id = from_union([from_str, from_none], obj.get("datasetId")) + model = from_union([from_str, from_none], obj.get("model")) + moderation = from_union([from_bool, from_none], obj.get("moderation")) + privacy = from_union([from_bool, from_none], obj.get("privacy")) + skillset_id = from_union([from_str, from_none], obj.get("skillsetId")) + return ConversationFetchResponse(contact_id, created_at, description, expires_at, id, meta, name, task_id, updated_at, bot_id, backstory, dataset_id, model, moderation, privacy, skillset_id) def to_dict(self) -> dict: result: dict = {} - if self.commentary is not None: - result["commentary"] = from_union([from_str, from_none], self.commentary) - if self.config is not None: - result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - result["excerpt"] = from_str(self.excerpt) - if self.icon is not None: - result["icon"] = from_union([from_str, from_none], self.icon) + if self.expires_at is not None: + result["expiresAt"] = from_union([to_float, from_none], self.expires_at) result["id"] = from_str(self.id) - if self.kind is not None: - result["kind"] = from_union([lambda x: to_enum(StickyKind, x), from_none], self.kind) - if self.link is not None: - result["link"] = from_union([from_str, from_none], self.link) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - result["score"] = to_float(self.score) - if self.setup is not None: - result["setup"] = from_union([from_str, from_none], self.setup) - if self.tags is not None: - result["tags"] = from_union([lambda x: from_list(from_str, x), from_none], self.tags) - if self.template is not None: - result["template"] = from_union([from_str, from_none], self.template) - result["type"] = to_enum(Type16, self.type) + if self.task_id is not None: + result["taskId"] = from_union([from_str, from_none], self.task_id) result["updatedAt"] = to_float(self.updated_at) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.backstory is not None: + result["backstory"] = from_union([from_str, from_none], self.backstory) + if self.dataset_id is not None: + result["datasetId"] = from_union([from_str, from_none], self.dataset_id) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) + if self.moderation is not None: + result["moderation"] = from_union([from_bool, from_none], self.moderation) + if self.privacy is not None: + result["privacy"] = from_union([from_bool, from_none], self.privacy) + if self.skillset_id is not None: + result["skillsetId"] = from_union([from_str, from_none], self.skillset_id) return result -class PlatformSecretsSearchResponse: - items: List[PlatformSecretsSearchResponseItem] +class ConversationDownvoteParams: + conversation_id: str + """The ID of the conversation""" - def __init__(self, items: List[PlatformSecretsSearchResponseItem]) -> None: - self.items = items + def __init__(self, conversation_id: str) -> None: + self.conversation_id = conversation_id @staticmethod - def from_dict(obj: Any) -> 'PlatformSecretsSearchResponse': + def from_dict(obj: Any) -> 'ConversationDownvoteParams': assert isinstance(obj, dict) - items = from_list(PlatformSecretsSearchResponseItem.from_dict, obj.get("items")) - return PlatformSecretsSearchResponse(items) + conversation_id = from_str(obj.get("conversationId")) + return ConversationDownvoteParams(conversation_id) def to_dict(self) -> dict: result: dict = {} - result["items"] = from_list(lambda x: to_class(PlatformSecretsSearchResponseItem, x), self.items) + result["conversationId"] = from_str(self.conversation_id) return result -class PlatformTutorialFetchParams: - tutorial_id: str - """The ID of the tutorial to fetch (e.g., "how-to-get-started-with-chatbotkit")""" +class ConversationDownvoteRequest: + reason: Optional[str] + """The reason for the downvote""" + + value: Optional[int] + """The value of the downvote""" - def __init__(self, tutorial_id: str) -> None: - self.tutorial_id = tutorial_id + def __init__(self, reason: Optional[str], value: Optional[int]) -> None: + self.reason = reason + self.value = value @staticmethod - def from_dict(obj: Any) -> 'PlatformTutorialFetchParams': + def from_dict(obj: Any) -> 'ConversationDownvoteRequest': assert isinstance(obj, dict) - tutorial_id = from_str(obj.get("tutorialId")) - return PlatformTutorialFetchParams(tutorial_id) + reason = from_union([from_str, from_none], obj.get("reason")) + value = from_union([from_int, from_none], obj.get("value")) + return ConversationDownvoteRequest(reason, value) def to_dict(self) -> dict: result: dict = {} - result["tutorialId"] = from_str(self.tutorial_id) + if self.reason is not None: + result["reason"] = from_union([from_str, from_none], self.reason) + if self.value is not None: + result["value"] = from_union([from_int, from_none], self.value) return result -class PlatformTutorialFetchResponse: - """Instance list properties""" - - category: Optional[str] - """The category of the tutorial""" - - content: str - """The markdown content of the tutorial""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - description: Optional[str] - """The associated description""" - +class ConversationDownvoteResponse: id: str - """The instance ID""" - - index: Optional[float] - """The display order index""" - - link: Optional[str] - """The URL to the official tutorial page""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: str - """The associated name""" - - tags: Optional[List[str]] - """Tags associated with the tutorial""" - - updated_at: float - """The timestamp (ms) when the instance was updated""" + """The conversation ID of the downvoted conversation""" - def __init__(self, category: Optional[str], content: str, created_at: float, description: Optional[str], id: str, index: Optional[float], link: Optional[str], meta: Optional[Dict[str, Any]], name: str, tags: Optional[List[str]], updated_at: float) -> None: - self.category = category - self.content = content - self.created_at = created_at - self.description = description + def __init__(self, id: str) -> None: self.id = id - self.index = index - self.link = link - self.meta = meta - self.name = name - self.tags = tags - self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'PlatformTutorialFetchResponse': + def from_dict(obj: Any) -> 'ConversationDownvoteResponse': assert isinstance(obj, dict) - category = from_union([from_str, from_none], obj.get("category")) - content = from_str(obj.get("content")) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) - index = from_union([from_float, from_none], obj.get("index")) - link = from_union([from_str, from_none], obj.get("link")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - tags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tags")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformTutorialFetchResponse(category, content, created_at, description, id, index, link, meta, name, tags, updated_at) + return ConversationDownvoteResponse(id) def to_dict(self) -> dict: result: dict = {} - if self.category is not None: - result["category"] = from_union([from_str, from_none], self.category) - result["content"] = from_str(self.content) - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) - if self.index is not None: - result["index"] = from_union([to_float, from_none], self.index) - if self.link is not None: - result["link"] = from_union([from_str, from_none], self.link) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - if self.tags is not None: - result["tags"] = from_union([lambda x: from_list(from_str, x), from_none], self.tags) - result["updatedAt"] = to_float(self.updated_at) return result -class PlatformTutorialListParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" - - -class PlatformTutorialListParams: - cursor: Optional[str] - """The cursor to use for pagination""" - - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" +class StickyReplacement: + begin: float + """Start offset""" - order: Optional[PlatformTutorialListParamsOrder] - """The order of the paginated items""" + end: float + """End offset""" - take: Optional[int] - """The number of items to retrieve""" + text: str + """The text value of the replacement""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[PlatformTutorialListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take + def __init__(self, begin: float, end: float, text: str) -> None: + self.begin = begin + self.end = end + self.text = text @staticmethod - def from_dict(obj: Any) -> 'PlatformTutorialListParams': + def from_dict(obj: Any) -> 'StickyReplacement': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([PlatformTutorialListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return PlatformTutorialListParams(cursor, meta, order, take) + begin = from_float(obj.get("begin")) + end = from_float(obj.get("end")) + text = from_str(obj.get("text")) + return StickyReplacement(begin, end, text) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(PlatformTutorialListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["begin"] = to_float(self.begin) + result["end"] = to_float(self.end) + result["text"] = from_str(self.text) return result -class PlatformTutorialListResponseItem: - """Instance list properties""" +class StatefulConversationDispatchRequestEntity: + """Extracted entity from the message""" - category: Optional[str] - """The category of the tutorial""" + begin: float + """Start offset""" - created_at: float - """The timestamp (ms) when the instance was created""" + end: float + """End offset""" - description: str - """The associated description""" + replacement: Optional[StickyReplacement] + text: str + """The text value of the entity""" - id: str - """The instance ID""" + type: str + """The entity type""" - index: float - """The display order index""" + def __init__(self, begin: float, end: float, replacement: Optional[StickyReplacement], text: str, type: str) -> None: + self.begin = begin + self.end = end + self.replacement = replacement + self.text = text + self.type = type - link: str - """The URL to the official tutorial page""" + @staticmethod + def from_dict(obj: Any) -> 'StatefulConversationDispatchRequestEntity': + assert isinstance(obj, dict) + begin = from_float(obj.get("begin")) + end = from_float(obj.get("end")) + replacement = from_union([StickyReplacement.from_dict, from_none], obj.get("replacement")) + text = from_str(obj.get("text")) + type = from_str(obj.get("type")) + return StatefulConversationDispatchRequestEntity(begin, end, replacement, text, type) - meta: Optional[Dict[str, Any]] - """Meta data information""" + def to_dict(self) -> dict: + result: dict = {} + result["begin"] = to_float(self.begin) + result["end"] = to_float(self.end) + if self.replacement is not None: + result["replacement"] = from_union([lambda x: to_class(StickyReplacement, x), from_none], self.replacement) + result["text"] = from_str(self.text) + result["type"] = from_str(self.type) + return result - name: str - """The associated name""" - tags: List[str] - """Tags associated with the tutorial""" +class IndecentRecord: + meta: Optional[Dict[str, Any]] + """Additional metadata for the record""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + text: str + """The text content of the record""" - def __init__(self, category: Optional[str], created_at: float, description: str, id: str, index: float, link: str, meta: Optional[Dict[str, Any]], name: str, tags: List[str], updated_at: float) -> None: - self.category = category - self.created_at = created_at - self.description = description - self.id = id - self.index = index - self.link = link + def __init__(self, meta: Optional[Dict[str, Any]], text: str) -> None: self.meta = meta - self.name = name - self.tags = tags - self.updated_at = updated_at + self.text = text @staticmethod - def from_dict(obj: Any) -> 'PlatformTutorialListResponseItem': + def from_dict(obj: Any) -> 'IndecentRecord': assert isinstance(obj, dict) - category = from_union([from_str, from_none], obj.get("category")) - created_at = from_float(obj.get("createdAt")) - description = from_str(obj.get("description")) - id = from_str(obj.get("id")) - index = from_float(obj.get("index")) - link = from_str(obj.get("link")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - tags = from_list(from_str, obj.get("tags")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformTutorialListResponseItem(category, created_at, description, id, index, link, meta, name, tags, updated_at) + text = from_str(obj.get("text")) + return IndecentRecord(meta, text) def to_dict(self) -> dict: result: dict = {} - if self.category is not None: - result["category"] = from_union([from_str, from_none], self.category) - result["createdAt"] = to_float(self.created_at) - result["description"] = from_str(self.description) - result["id"] = from_str(self.id) - result["index"] = to_float(self.index) - result["link"] = from_str(self.link) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - result["tags"] = from_list(from_str, self.tags) - result["updatedAt"] = to_float(self.updated_at) + result["text"] = from_str(self.text) return result -class PlatformTutorialListResponse: - cursor: str - """Cursor for fetching the next page""" +class IndecentDataset: + description: Optional[str] + """The description of the dataset""" - items: List[PlatformTutorialListResponseItem] + name: Optional[str] + """The name of the dataset""" - def __init__(self, cursor: str, items: List[PlatformTutorialListResponseItem]) -> None: - self.cursor = cursor - self.items = items + records: List[IndecentRecord] + """The records in the dataset""" + + def __init__(self, description: Optional[str], name: Optional[str], records: List[IndecentRecord]) -> None: + self.description = description + self.name = name + self.records = records @staticmethod - def from_dict(obj: Any) -> 'PlatformTutorialListResponse': + def from_dict(obj: Any) -> 'IndecentDataset': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(PlatformTutorialListResponseItem.from_dict, obj.get("items")) - return PlatformTutorialListResponse(cursor, items) + description = from_union([from_str, from_none], obj.get("description")) + name = from_union([from_str, from_none], obj.get("name")) + records = from_list(IndecentRecord.from_dict, obj.get("records")) + return IndecentDataset(description, name, records) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(PlatformTutorialListResponseItem, x), self.items) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + result["records"] = from_list(lambda x: to_class(IndecentRecord, x), self.records) return result -class PlatformTutorialListStreamItemData: - """Instance list properties""" +class IndecentFeature: + name: str + """The name of the feature to enable""" - category: Optional[str] - """The category of the tutorial""" + options: Optional[Dict[str, Any]] + """Optional configuration options for the feature""" - created_at: float - """The timestamp (ms) when the instance was created""" + def __init__(self, name: str, options: Optional[Dict[str, Any]]) -> None: + self.name = name + self.options = options + + @staticmethod + def from_dict(obj: Any) -> 'IndecentFeature': + assert isinstance(obj, dict) + name = from_str(obj.get("name")) + options = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("options")) + return IndecentFeature(name, options) + + def to_dict(self) -> dict: + result: dict = {} + result["name"] = from_str(self.name) + if self.options is not None: + result["options"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.options) + return result + +class IndecentAbility: description: str - """The associated description""" + """The description of the ability""" - id: str - """The instance ID""" + instruction: str + """The instruction for the ability""" - index: float - """The display order index""" + linked_secret_id: Optional[str] + """Optional secret ID for the ability""" - link: str - """The URL to the official tutorial page""" + linked_space_id: Optional[str] + """Optional space ID for the ability""" meta: Optional[Dict[str, Any]] - """Meta data information""" + """Additional metadata for the ability""" name: str - """The associated name""" - - tags: List[str] - """Tags associated with the tutorial""" - - updated_at: float - """The timestamp (ms) when the instance was updated""" + """The name of the ability""" - def __init__(self, category: Optional[str], created_at: float, description: str, id: str, index: float, link: str, meta: Optional[Dict[str, Any]], name: str, tags: List[str], updated_at: float) -> None: - self.category = category - self.created_at = created_at + def __init__(self, description: str, instruction: str, linked_secret_id: Optional[str], linked_space_id: Optional[str], meta: Optional[Dict[str, Any]], name: str) -> None: self.description = description - self.id = id - self.index = index - self.link = link + self.instruction = instruction + self.linked_secret_id = linked_secret_id + self.linked_space_id = linked_space_id self.meta = meta self.name = name - self.tags = tags - self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'PlatformTutorialListStreamItemData': + def from_dict(obj: Any) -> 'IndecentAbility': assert isinstance(obj, dict) - category = from_union([from_str, from_none], obj.get("category")) - created_at = from_float(obj.get("createdAt")) description = from_str(obj.get("description")) - id = from_str(obj.get("id")) - index = from_float(obj.get("index")) - link = from_str(obj.get("link")) + instruction = from_str(obj.get("instruction")) + linked_secret_id = from_union([from_str, from_none], obj.get("linkedSecretId")) + linked_space_id = from_union([from_str, from_none], obj.get("linkedSpaceId")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_str(obj.get("name")) - tags = from_list(from_str, obj.get("tags")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformTutorialListStreamItemData(category, created_at, description, id, index, link, meta, name, tags, updated_at) + return IndecentAbility(description, instruction, linked_secret_id, linked_space_id, meta, name) def to_dict(self) -> dict: result: dict = {} - if self.category is not None: - result["category"] = from_union([from_str, from_none], self.category) - result["createdAt"] = to_float(self.created_at) result["description"] = from_str(self.description) - result["id"] = from_str(self.id) - result["index"] = to_float(self.index) - result["link"] = from_str(self.link) + result["instruction"] = from_str(self.instruction) + if self.linked_secret_id is not None: + result["linkedSecretId"] = from_union([from_str, from_none], self.linked_secret_id) + if self.linked_space_id is not None: + result["linkedSpaceId"] = from_union([from_str, from_none], self.linked_space_id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) result["name"] = from_str(self.name) - result["tags"] = from_list(from_str, self.tags) - result["updatedAt"] = to_float(self.updated_at) return result -class PlatformTutorialListStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - +class IndecentSkillset: + abilities: List[IndecentAbility] + """The abilities in the skillset""" -class PlatformTutorialListStreamItem: - data: PlatformTutorialListStreamItemData - """Instance list properties""" + description: Optional[str] + """The description of the skillset""" - type: PlatformTutorialListStreamItemType - """The type of event""" + name: Optional[str] + """The name of the skillset""" - def __init__(self, data: PlatformTutorialListStreamItemData, type: PlatformTutorialListStreamItemType) -> None: - self.data = data - self.type = type + def __init__(self, abilities: List[IndecentAbility], description: Optional[str], name: Optional[str]) -> None: + self.abilities = abilities + self.description = description + self.name = name @staticmethod - def from_dict(obj: Any) -> 'PlatformTutorialListStreamItem': + def from_dict(obj: Any) -> 'IndecentSkillset': assert isinstance(obj, dict) - data = PlatformTutorialListStreamItemData.from_dict(obj.get("data")) - type = PlatformTutorialListStreamItemType(obj.get("type")) - return PlatformTutorialListStreamItem(data, type) + abilities = from_list(IndecentAbility.from_dict, obj.get("abilities")) + description = from_union([from_str, from_none], obj.get("description")) + name = from_union([from_str, from_none], obj.get("name")) + return IndecentSkillset(abilities, description, name) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(PlatformTutorialListStreamItemData, self.data) - result["type"] = to_enum(PlatformTutorialListStreamItemType, self.type) + result["abilities"] = from_list(lambda x: to_class(IndecentAbility, x), self.abilities) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) return result -class PlatformTutorialsSearchRequest: - search: str - """The search query to find relevant tutorials""" +class StatefulConversationDispatchRequestExtensions: + """Extensions to enhance the bot's capabilities""" - take: Optional[int] - """The maximum number of results to return (1-100, default 10)""" + backstory: Optional[str] + """Additional backstory for the bot""" - def __init__(self, search: str, take: Optional[int]) -> None: - self.search = search - self.take = take + datasets: Optional[List[IndecentDataset]] + """Inline datasets to provide additional context""" + + features: Optional[List[IndecentFeature]] + """Feature flags to enable specific bot capabilities""" + + skillsets: Optional[List[IndecentSkillset]] + """Inline skillsets to provide additional abilities""" + + def __init__(self, backstory: Optional[str], datasets: Optional[List[IndecentDataset]], features: Optional[List[IndecentFeature]], skillsets: Optional[List[IndecentSkillset]]) -> None: + self.backstory = backstory + self.datasets = datasets + self.features = features + self.skillsets = skillsets @staticmethod - def from_dict(obj: Any) -> 'PlatformTutorialsSearchRequest': + def from_dict(obj: Any) -> 'StatefulConversationDispatchRequestExtensions': assert isinstance(obj, dict) - search = from_str(obj.get("search")) - take = from_union([from_int, from_none], obj.get("take")) - return PlatformTutorialsSearchRequest(search, take) + backstory = from_union([from_str, from_none], obj.get("backstory")) + datasets = from_union([lambda x: from_list(IndecentDataset.from_dict, x), from_none], obj.get("datasets")) + features = from_union([lambda x: from_list(IndecentFeature.from_dict, x), from_none], obj.get("features")) + skillsets = from_union([lambda x: from_list(IndecentSkillset.from_dict, x), from_none], obj.get("skillsets")) + return StatefulConversationDispatchRequestExtensions(backstory, datasets, features, skillsets) def to_dict(self) -> dict: result: dict = {} - result["search"] = from_str(self.search) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + if self.backstory is not None: + result["backstory"] = from_union([from_str, from_none], self.backstory) + if self.datasets is not None: + result["datasets"] = from_union([lambda x: from_list(lambda x: to_class(IndecentDataset, x), x), from_none], self.datasets) + if self.features is not None: + result["features"] = from_union([lambda x: from_list(lambda x: to_class(IndecentFeature, x), x), from_none], self.features) + if self.skillsets is not None: + result["skillsets"] = from_union([lambda x: from_list(lambda x: to_class(IndecentSkillset, x), x), from_none], self.skillsets) return result -class PlatformTutorialsSearchResponseItem: - """Instance list properties""" - - category: Optional[str] - """The category of the tutorial""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - description: str - """The associated description""" - - excerpt: str - """An excerpt from the most relevant part of the tutorial""" - - id: str - """The instance ID""" - - index: float - """The display order index""" - - link: str - """The URL to the official tutorial page""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: str - """The associated name""" - - score: float - """The similarity score of the search result""" +class IndigoCall: + """Configuration for when this function should be automatically called""" - tags: List[str] - """Tags associated with the tutorial""" + end: Optional[bool] + """If true, this function will be force-called at the end of the conversation""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + start: Optional[bool] + """If true, this function will be force-called at the start of the conversation""" - def __init__(self, category: Optional[str], created_at: float, description: str, excerpt: str, id: str, index: float, link: str, meta: Optional[Dict[str, Any]], name: str, score: float, tags: List[str], updated_at: float) -> None: - self.category = category - self.created_at = created_at - self.description = description - self.excerpt = excerpt - self.id = id - self.index = index - self.link = link - self.meta = meta - self.name = name - self.score = score - self.tags = tags - self.updated_at = updated_at + def __init__(self, end: Optional[bool], start: Optional[bool]) -> None: + self.end = end + self.start = start @staticmethod - def from_dict(obj: Any) -> 'PlatformTutorialsSearchResponseItem': + def from_dict(obj: Any) -> 'IndigoCall': assert isinstance(obj, dict) - category = from_union([from_str, from_none], obj.get("category")) - created_at = from_float(obj.get("createdAt")) - description = from_str(obj.get("description")) - excerpt = from_str(obj.get("excerpt")) - id = from_str(obj.get("id")) - index = from_float(obj.get("index")) - link = from_str(obj.get("link")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - score = from_float(obj.get("score")) - tags = from_list(from_str, obj.get("tags")) - updated_at = from_float(obj.get("updatedAt")) - return PlatformTutorialsSearchResponseItem(category, created_at, description, excerpt, id, index, link, meta, name, score, tags, updated_at) + end = from_union([from_bool, from_none], obj.get("end")) + start = from_union([from_bool, from_none], obj.get("start")) + return IndigoCall(end, start) def to_dict(self) -> dict: result: dict = {} - if self.category is not None: - result["category"] = from_union([from_str, from_none], self.category) - result["createdAt"] = to_float(self.created_at) - result["description"] = from_str(self.description) - result["excerpt"] = from_str(self.excerpt) - result["id"] = from_str(self.id) - result["index"] = to_float(self.index) - result["link"] = from_str(self.link) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - result["score"] = to_float(self.score) - result["tags"] = from_list(from_str, self.tags) - result["updatedAt"] = to_float(self.updated_at) + if self.end is not None: + result["end"] = from_union([from_bool, from_none], self.end) + if self.start is not None: + result["start"] = from_union([from_bool, from_none], self.start) return result -class PlatformTutorialsSearchResponse: - items: List[PlatformTutorialsSearchResponseItem] +class Type19(Enum): + """The schema type, must be "object\"""" + + OBJECT = "object" - def __init__(self, items: List[PlatformTutorialsSearchResponseItem]) -> None: - self.items = items - @staticmethod - def from_dict(obj: Any) -> 'PlatformTutorialsSearchResponse': - assert isinstance(obj, dict) - items = from_list(PlatformTutorialsSearchResponseItem.from_dict, obj.get("items")) - return PlatformTutorialsSearchResponse(items) +class IndigoParameters: + """JSON Schema definition for the function parameters""" - def to_dict(self) -> dict: - result: dict = {} - result["items"] = from_list(lambda x: to_class(PlatformTutorialsSearchResponseItem, x), self.items) - return result + properties: Dict[str, Any] + """Object property definitions""" + required: Optional[List[str]] + """Required property names""" -class PolicyDeleteParams: - policy_id: str - """The ID of the policy to delete""" + type: Type19 + """The schema type, must be "object\"""" - def __init__(self, policy_id: str) -> None: - self.policy_id = policy_id + def __init__(self, properties: Dict[str, Any], required: Optional[List[str]], type: Type19) -> None: + self.properties = properties + self.required = required + self.type = type @staticmethod - def from_dict(obj: Any) -> 'PolicyDeleteParams': + def from_dict(obj: Any) -> 'IndigoParameters': assert isinstance(obj, dict) - policy_id = from_str(obj.get("policyId")) - return PolicyDeleteParams(policy_id) + properties = from_dict(lambda x: x, obj.get("properties")) + required = from_union([lambda x: from_list(from_str, x), from_none], obj.get("required")) + type = Type19(obj.get("type")) + return IndigoParameters(properties, required, type) def to_dict(self) -> dict: result: dict = {} - result["policyId"] = from_str(self.policy_id) + result["properties"] = from_dict(lambda x: x, self.properties) + if self.required is not None: + result["required"] = from_union([lambda x: from_list(from_str, x), from_none], self.required) + result["type"] = to_enum(Type19, self.type) return result -class PolicyDeleteResponse: - id: str - """The ID of the deleted policy""" +class IndigoResult: + """The result of the function execution""" - def __init__(self, id: str) -> None: - self.id = id + data: Any + """The data returned by the function (can be any type)""" + + channel: Optional[str] + """The channel for streaming function results""" + + def __init__(self, data: Any, channel: Optional[str]) -> None: + self.data = data + self.channel = channel @staticmethod - def from_dict(obj: Any) -> 'PolicyDeleteResponse': + def from_dict(obj: Any) -> 'IndigoResult': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return PolicyDeleteResponse(id) + data = obj.get("data") + channel = from_union([from_str, from_none], obj.get("channel")) + return IndigoResult(data, channel) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + if self.data is not None: + result["data"] = self.data + if self.channel is not None: + result["channel"] = from_union([from_str, from_none], self.channel) return result -class PolicyFetchParams: - policy_id: str - """The ID of the policy to retrieve""" +class StatefulConversationDispatchRequestFunction: + call: Optional[IndigoCall] + """Configuration for when this function should be automatically called""" - def __init__(self, policy_id: str) -> None: - self.policy_id = policy_id + description: str + """The description of the function""" + + name: str + """The name of the function (must be a valid JS identifier, max 64 chars)""" + + parameters: IndigoParameters + """JSON Schema definition for the function parameters""" + + result: Optional[IndigoResult] + """The result of the function execution""" + + def __init__(self, call: Optional[IndigoCall], description: str, name: str, parameters: IndigoParameters, result: Optional[IndigoResult]) -> None: + self.call = call + self.description = description + self.name = name + self.parameters = parameters + self.result = result @staticmethod - def from_dict(obj: Any) -> 'PolicyFetchParams': + def from_dict(obj: Any) -> 'StatefulConversationDispatchRequestFunction': assert isinstance(obj, dict) - policy_id = from_str(obj.get("policyId")) - return PolicyFetchParams(policy_id) + call = from_union([IndigoCall.from_dict, from_none], obj.get("call")) + description = from_str(obj.get("description")) + name = from_str(obj.get("name")) + parameters = IndigoParameters.from_dict(obj.get("parameters")) + result = from_union([IndigoResult.from_dict, from_none], obj.get("result")) + return StatefulConversationDispatchRequestFunction(call, description, name, parameters, result) def to_dict(self) -> dict: result: dict = {} - result["policyId"] = from_str(self.policy_id) + if self.call is not None: + result["call"] = from_union([lambda x: to_class(IndigoCall, x), from_none], self.call) + result["description"] = from_str(self.description) + result["name"] = from_str(self.name) + result["parameters"] = to_class(IndigoParameters, self.parameters) + if self.result is not None: + result["result"] = from_union([lambda x: to_class(IndigoResult, x), from_none], self.result) return result -class PolicyFetchResponseType(Enum): - """The policy type""" - - RETENTION = "retention" - USAGE = "usage" - +class StatefulConversationDispatchRequestLimits: + """Execution limits to control conversation processing bounds""" -class PolicyFetchResponse: - """Blueprint properties""" + calls: Optional[int] + """Maximum number of function/tool calls. Controls how many total function calls can be made + during the conversation. + """ + continuations: Optional[int] + """Maximum number of model continuations. Controls how many times the model can continue + generating after reaching a stop condition. + """ + iterations: Optional[int] + """Maximum number of agentic iterations. Controls how many times the model can iterate + through tool calls and responses. + """ - alias: Optional[str] - """The unique alias for the instance""" + def __init__(self, calls: Optional[int], continuations: Optional[int], iterations: Optional[int]) -> None: + self.calls = calls + self.continuations = continuations + self.iterations = iterations - blueprint_id: Optional[str] - """The ID of the blueprint""" + @staticmethod + def from_dict(obj: Any) -> 'StatefulConversationDispatchRequestLimits': + assert isinstance(obj, dict) + calls = from_union([from_int, from_none], obj.get("calls")) + continuations = from_union([from_int, from_none], obj.get("continuations")) + iterations = from_union([from_int, from_none], obj.get("iterations")) + return StatefulConversationDispatchRequestLimits(calls, continuations, iterations) - bot_id: Optional[str] - """The ID of the bot this policy applies to. When omitted the policy is global and applies - to every bot. - """ - config: Optional[Dict[str, Any]] - """The policy configuration as JSON""" + def to_dict(self) -> dict: + result: dict = {} + if self.calls is not None: + result["calls"] = from_union([from_int, from_none], self.calls) + if self.continuations is not None: + result["continuations"] = from_union([from_int, from_none], self.continuations) + if self.iterations is not None: + result["iterations"] = from_union([from_int, from_none], self.iterations) + return result - created_at: float - """The timestamp (ms) when the instance was created""" - description: Optional[str] - """The associated description""" +class StatefulConversationDispatchRequest: + channel_id: Optional[str] + """A unique ID to deduplicate dispatch requests""" - id: str - """The instance ID""" + entities: Optional[List[StatefulConversationDispatchRequestEntity]] + """Known entities""" - meta: Optional[Dict[str, Any]] - """Meta data information""" + extensions: Optional[StatefulConversationDispatchRequestExtensions] + """Extensions to enhance the bot's capabilities""" - name: Optional[str] - """The associated name""" + functions: Optional[List[StatefulConversationDispatchRequestFunction]] + """An array of functions to be added to the conversation""" - type: PolicyFetchResponseType - """The policy type""" + limits: Optional[StatefulConversationDispatchRequestLimits] + """Execution limits to control conversation processing bounds""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + text: Optional[str] + """The text of the message to send. Omit to continue receiving from the existing + conversation state without sending a new user message. + """ - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], config: Optional[Dict[str, Any]], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], type: PolicyFetchResponseType, updated_at: float) -> None: - self.alias = alias - self.blueprint_id = blueprint_id - self.bot_id = bot_id - self.config = config - self.created_at = created_at - self.description = description - self.id = id - self.meta = meta - self.name = name - self.type = type - self.updated_at = updated_at + def __init__(self, channel_id: Optional[str], entities: Optional[List[StatefulConversationDispatchRequestEntity]], extensions: Optional[StatefulConversationDispatchRequestExtensions], functions: Optional[List[StatefulConversationDispatchRequestFunction]], limits: Optional[StatefulConversationDispatchRequestLimits], text: Optional[str]) -> None: + self.channel_id = channel_id + self.entities = entities + self.extensions = extensions + self.functions = functions + self.limits = limits + self.text = text @staticmethod - def from_dict(obj: Any) -> 'PolicyFetchResponse': + def from_dict(obj: Any) -> 'StatefulConversationDispatchRequest': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - type = PolicyFetchResponseType(obj.get("type")) - updated_at = from_float(obj.get("updatedAt")) - return PolicyFetchResponse(alias, blueprint_id, bot_id, config, created_at, description, id, meta, name, type, updated_at) + channel_id = from_union([from_str, from_none], obj.get("channelId")) + entities = from_union([lambda x: from_list(StatefulConversationDispatchRequestEntity.from_dict, x), from_none], obj.get("entities")) + extensions = from_union([StatefulConversationDispatchRequestExtensions.from_dict, from_none], obj.get("extensions")) + functions = from_union([lambda x: from_list(StatefulConversationDispatchRequestFunction.from_dict, x), from_none], obj.get("functions")) + limits = from_union([StatefulConversationDispatchRequestLimits.from_dict, from_none], obj.get("limits")) + text = from_union([from_str, from_none], obj.get("text")) + return StatefulConversationDispatchRequest(channel_id, entities, extensions, functions, limits, text) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.config is not None: - result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - result["type"] = to_enum(PolicyFetchResponseType, self.type) - result["updatedAt"] = to_float(self.updated_at) + if self.channel_id is not None: + result["channelId"] = from_union([from_str, from_none], self.channel_id) + if self.entities is not None: + result["entities"] = from_union([lambda x: from_list(lambda x: to_class(StatefulConversationDispatchRequestEntity, x), x), from_none], self.entities) + if self.extensions is not None: + result["extensions"] = from_union([lambda x: to_class(StatefulConversationDispatchRequestExtensions, x), from_none], self.extensions) + if self.functions is not None: + result["functions"] = from_union([lambda x: from_list(lambda x: to_class(StatefulConversationDispatchRequestFunction, x), x), from_none], self.functions) + if self.limits is not None: + result["limits"] = from_union([lambda x: to_class(StatefulConversationDispatchRequestLimits, x), from_none], self.limits) + if self.text is not None: + result["text"] = from_union([from_str, from_none], self.text) return result -class PolicyUpdateParams: - policy_id: str - """The ID of the policy to update""" +class StatefulConversationDispatchResponse: + channel_id: str + """The channel ID to subscribe to for completion events""" - def __init__(self, policy_id: str) -> None: - self.policy_id = policy_id + def __init__(self, channel_id: str) -> None: + self.channel_id = channel_id @staticmethod - def from_dict(obj: Any) -> 'PolicyUpdateParams': + def from_dict(obj: Any) -> 'StatefulConversationDispatchResponse': assert isinstance(obj, dict) - policy_id = from_str(obj.get("policyId")) - return PolicyUpdateParams(policy_id) + channel_id = from_str(obj.get("channelId")) + return StatefulConversationDispatchResponse(channel_id) def to_dict(self) -> dict: result: dict = {} - result["policyId"] = from_str(self.policy_id) + result["channelId"] = from_str(self.channel_id) return result -class PolicyUpdateRequestType(Enum): - """The policy type""" - - RETENTION = "retention" - USAGE = "usage" - - -class PolicyUpdateRequest: - """Blueprint properties""" - - alias: Optional[str] - """The unique alias for the instance""" - - blueprint_id: Optional[str] - """The ID of the blueprint""" - - bot_id: Optional[str] - """The ID of the bot this policy applies to. When omitted the policy is global and applies - to every bot. - """ - config: Optional[Dict[str, Any]] - """The policy configuration as JSON""" - - description: Optional[str] - """The associated description""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: Optional[str] - """The associated name""" - - type: Optional[PolicyUpdateRequestType] - """The policy type""" +class ConversationDeleteParams: + conversation_id: str + """The ID of the conversation to delete""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], config: Optional[Dict[str, Any]], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], type: Optional[PolicyUpdateRequestType]) -> None: - self.alias = alias - self.blueprint_id = blueprint_id - self.bot_id = bot_id - self.config = config - self.description = description - self.meta = meta - self.name = name - self.type = type + def __init__(self, conversation_id: str) -> None: + self.conversation_id = conversation_id @staticmethod - def from_dict(obj: Any) -> 'PolicyUpdateRequest': + def from_dict(obj: Any) -> 'ConversationDeleteParams': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) - description = from_union([from_str, from_none], obj.get("description")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - type = from_union([PolicyUpdateRequestType, from_none], obj.get("type")) - return PolicyUpdateRequest(alias, blueprint_id, bot_id, config, description, meta, name, type) + conversation_id = from_str(obj.get("conversationId")) + return ConversationDeleteParams(conversation_id) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.config is not None: - result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.type is not None: - result["type"] = from_union([lambda x: to_enum(PolicyUpdateRequestType, x), from_none], self.type) + result["conversationId"] = from_str(self.conversation_id) return result -class PolicyUpdateResponse: +class ConversationDeleteResponse: id: str - """The ID of the updated policy""" + """The ID of the deleted conversation""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'PolicyUpdateResponse': + def from_dict(obj: Any) -> 'ConversationDeleteResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return PolicyUpdateResponse(id) + return ConversationDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -42778,1422 +41755,1235 @@ def to_dict(self) -> dict: return result -class PolicyCreateRequestType(Enum): - """The policy type""" - - RETENTION = "retention" - USAGE = "usage" - - -class PolicyCreateRequest: - """Blueprint properties""" +class ConversationMessageCompleteParams: + conversation_id: str + """The ID of the conversation to receive message from""" - alias: Optional[str] - """The unique alias for the instance""" + def __init__(self, conversation_id: str) -> None: + self.conversation_id = conversation_id - blueprint_id: Optional[str] - """The ID of the blueprint""" + @staticmethod + def from_dict(obj: Any) -> 'ConversationMessageCompleteParams': + assert isinstance(obj, dict) + conversation_id = from_str(obj.get("conversationId")) + return ConversationMessageCompleteParams(conversation_id) - bot_id: Optional[str] - """The ID of the bot this policy applies to. When omitted the policy is global and applies - to every bot. - """ - config: Optional[Dict[str, Any]] - """The policy configuration as JSON""" + def to_dict(self) -> dict: + result: dict = {} + result["conversationId"] = from_str(self.conversation_id) + return result - description: Optional[str] - """The associated description""" - meta: Optional[Dict[str, Any]] - """Meta data information""" +class IndigoReplacement: + begin: float + """Start offset""" - name: Optional[str] - """The associated name""" + end: float + """End offset""" - type: PolicyCreateRequestType - """The policy type""" + text: str + """The text value of the replacement""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], config: Optional[Dict[str, Any]], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], type: PolicyCreateRequestType) -> None: - self.alias = alias - self.blueprint_id = blueprint_id - self.bot_id = bot_id - self.config = config - self.description = description - self.meta = meta - self.name = name - self.type = type + def __init__(self, begin: float, end: float, text: str) -> None: + self.begin = begin + self.end = end + self.text = text @staticmethod - def from_dict(obj: Any) -> 'PolicyCreateRequest': + def from_dict(obj: Any) -> 'IndigoReplacement': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) - description = from_union([from_str, from_none], obj.get("description")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - type = PolicyCreateRequestType(obj.get("type")) - return PolicyCreateRequest(alias, blueprint_id, bot_id, config, description, meta, name, type) + begin = from_float(obj.get("begin")) + end = from_float(obj.get("end")) + text = from_str(obj.get("text")) + return IndigoReplacement(begin, end, text) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.config is not None: - result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - result["type"] = to_enum(PolicyCreateRequestType, self.type) + result["begin"] = to_float(self.begin) + result["end"] = to_float(self.end) + result["text"] = from_str(self.text) return result -class PolicyCreateResponse: - id: str - """The ID of the created policy""" +class ConversationMessageCompleteRequestEntity: + """Extracted entity from the message""" - def __init__(self, id: str) -> None: - self.id = id + begin: float + """Start offset""" + + end: float + """End offset""" + + replacement: Optional[IndigoReplacement] + text: str + """The text value of the entity""" + + type: str + """The entity type""" + + def __init__(self, begin: float, end: float, replacement: Optional[IndigoReplacement], text: str, type: str) -> None: + self.begin = begin + self.end = end + self.replacement = replacement + self.text = text + self.type = type @staticmethod - def from_dict(obj: Any) -> 'PolicyCreateResponse': + def from_dict(obj: Any) -> 'ConversationMessageCompleteRequestEntity': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return PolicyCreateResponse(id) + begin = from_float(obj.get("begin")) + end = from_float(obj.get("end")) + replacement = from_union([IndigoReplacement.from_dict, from_none], obj.get("replacement")) + text = from_str(obj.get("text")) + type = from_str(obj.get("type")) + return ConversationMessageCompleteRequestEntity(begin, end, replacement, text, type) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["begin"] = to_float(self.begin) + result["end"] = to_float(self.end) + if self.replacement is not None: + result["replacement"] = from_union([lambda x: to_class(IndigoReplacement, x), from_none], self.replacement) + result["text"] = from_str(self.text) + result["type"] = from_str(self.type) return result -class PolicyListParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" - - -class PolicyListParams: - bot_id: Optional[str] - """Filter policies that apply to a specific bot""" - - cursor: Optional[str] - """The cursor to use for pagination""" - - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" - - order: Optional[PolicyListParamsOrder] - """The order of the paginated items""" +class HilariousRecord: + meta: Optional[Dict[str, Any]] + """Additional metadata for the record""" - take: Optional[int] - """The number of items to retrieve""" + text: str + """The text content of the record""" - def __init__(self, bot_id: Optional[str], cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[PolicyListParamsOrder], take: Optional[int]) -> None: - self.bot_id = bot_id - self.cursor = cursor + def __init__(self, meta: Optional[Dict[str, Any]], text: str) -> None: self.meta = meta - self.order = order - self.take = take + self.text = text @staticmethod - def from_dict(obj: Any) -> 'PolicyListParams': + def from_dict(obj: Any) -> 'HilariousRecord': assert isinstance(obj, dict) - bot_id = from_union([from_str, from_none], obj.get("botId")) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([PolicyListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return PolicyListParams(bot_id, cursor, meta, order, take) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + text = from_str(obj.get("text")) + return HilariousRecord(meta, text) def to_dict(self) -> dict: result: dict = {} - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(PolicyListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + result["text"] = from_str(self.text) return result -class Type17(Enum): - """The policy type""" - - RETENTION = "retention" - USAGE = "usage" - - -class PolicyListResponseItem: - """Blueprint properties""" - - alias: Optional[str] - """The unique alias for the instance""" - - blueprint_id: Optional[str] - """The ID of the blueprint""" - - bot_id: Optional[str] - """The ID of the bot this policy applies to. When omitted the policy is global and applies - to every bot. - """ - config: Optional[Dict[str, Any]] - """The policy configuration as JSON""" - - created_at: float - """The timestamp (ms) when the instance was created""" - +class HilariousDataset: description: Optional[str] - """The associated description""" - - id: str - """The instance ID""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" + """The description of the dataset""" name: Optional[str] - """The associated name""" - - type: Type17 - """The policy type""" + """The name of the dataset""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + records: List[HilariousRecord] + """The records in the dataset""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], config: Optional[Dict[str, Any]], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], type: Type17, updated_at: float) -> None: - self.alias = alias - self.blueprint_id = blueprint_id - self.bot_id = bot_id - self.config = config - self.created_at = created_at + def __init__(self, description: Optional[str], name: Optional[str], records: List[HilariousRecord]) -> None: self.description = description - self.id = id - self.meta = meta self.name = name - self.type = type - self.updated_at = updated_at + self.records = records @staticmethod - def from_dict(obj: Any) -> 'PolicyListResponseItem': + def from_dict(obj: Any) -> 'HilariousDataset': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) - created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - type = Type17(obj.get("type")) - updated_at = from_float(obj.get("updatedAt")) - return PolicyListResponseItem(alias, blueprint_id, bot_id, config, created_at, description, id, meta, name, type, updated_at) + records = from_list(HilariousRecord.from_dict, obj.get("records")) + return HilariousDataset(description, name, records) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.config is not None: - result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) - result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - result["type"] = to_enum(Type17, self.type) - result["updatedAt"] = to_float(self.updated_at) + result["records"] = from_list(lambda x: to_class(HilariousRecord, x), self.records) return result -class PolicyListResponse: - cursor: str - """Cursor for fetching the next page""" +class HilariousFeature: + name: str + """The name of the feature to enable""" - items: List[PolicyListResponseItem] + options: Optional[Dict[str, Any]] + """Optional configuration options for the feature""" - def __init__(self, cursor: str, items: List[PolicyListResponseItem]) -> None: - self.cursor = cursor - self.items = items + def __init__(self, name: str, options: Optional[Dict[str, Any]]) -> None: + self.name = name + self.options = options @staticmethod - def from_dict(obj: Any) -> 'PolicyListResponse': + def from_dict(obj: Any) -> 'HilariousFeature': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(PolicyListResponseItem.from_dict, obj.get("items")) - return PolicyListResponse(cursor, items) + name = from_str(obj.get("name")) + options = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("options")) + return HilariousFeature(name, options) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(PolicyListResponseItem, x), self.items) + result["name"] = from_str(self.name) + if self.options is not None: + result["options"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.options) return result -class Type18(Enum): - """The policy type""" - - RETENTION = "retention" - USAGE = "usage" +class HilariousAbility: + description: str + """The description of the ability""" + instruction: str + """The instruction for the ability""" -class PolicyListStreamItemData: - """Blueprint properties""" + linked_secret_id: Optional[str] + """Optional secret ID for the ability""" - alias: Optional[str] - """The unique alias for the instance""" + linked_space_id: Optional[str] + """Optional space ID for the ability""" - blueprint_id: Optional[str] - """The ID of the blueprint""" + meta: Optional[Dict[str, Any]] + """Additional metadata for the ability""" - bot_id: Optional[str] - """The ID of the bot this policy applies to. When omitted the policy is global and applies - to every bot. - """ - config: Optional[Dict[str, Any]] - """The policy configuration as JSON""" + name: str + """The name of the ability""" - created_at: float - """The timestamp (ms) when the instance was created""" + def __init__(self, description: str, instruction: str, linked_secret_id: Optional[str], linked_space_id: Optional[str], meta: Optional[Dict[str, Any]], name: str) -> None: + self.description = description + self.instruction = instruction + self.linked_secret_id = linked_secret_id + self.linked_space_id = linked_space_id + self.meta = meta + self.name = name - description: Optional[str] - """The associated description""" + @staticmethod + def from_dict(obj: Any) -> 'HilariousAbility': + assert isinstance(obj, dict) + description = from_str(obj.get("description")) + instruction = from_str(obj.get("instruction")) + linked_secret_id = from_union([from_str, from_none], obj.get("linkedSecretId")) + linked_space_id = from_union([from_str, from_none], obj.get("linkedSpaceId")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_str(obj.get("name")) + return HilariousAbility(description, instruction, linked_secret_id, linked_space_id, meta, name) - id: str - """The instance ID""" + def to_dict(self) -> dict: + result: dict = {} + result["description"] = from_str(self.description) + result["instruction"] = from_str(self.instruction) + if self.linked_secret_id is not None: + result["linkedSecretId"] = from_union([from_str, from_none], self.linked_secret_id) + if self.linked_space_id is not None: + result["linkedSpaceId"] = from_union([from_str, from_none], self.linked_space_id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + result["name"] = from_str(self.name) + return result - meta: Optional[Dict[str, Any]] - """Meta data information""" - name: Optional[str] - """The associated name""" +class HilariousSkillset: + abilities: List[HilariousAbility] + """The abilities in the skillset""" - type: Type18 - """The policy type""" + description: Optional[str] + """The description of the skillset""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + name: Optional[str] + """The name of the skillset""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], bot_id: Optional[str], config: Optional[Dict[str, Any]], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], type: Type18, updated_at: float) -> None: - self.alias = alias - self.blueprint_id = blueprint_id - self.bot_id = bot_id - self.config = config - self.created_at = created_at + def __init__(self, abilities: List[HilariousAbility], description: Optional[str], name: Optional[str]) -> None: + self.abilities = abilities self.description = description - self.id = id - self.meta = meta self.name = name - self.type = type - self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'PolicyListStreamItemData': + def from_dict(obj: Any) -> 'HilariousSkillset': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) - created_at = from_float(obj.get("createdAt")) + abilities = from_list(HilariousAbility.from_dict, obj.get("abilities")) description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - type = Type18(obj.get("type")) - updated_at = from_float(obj.get("updatedAt")) - return PolicyListStreamItemData(alias, blueprint_id, bot_id, config, created_at, description, id, meta, name, type, updated_at) + return HilariousSkillset(abilities, description, name) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.config is not None: - result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) - result["createdAt"] = to_float(self.created_at) + result["abilities"] = from_list(lambda x: to_class(HilariousAbility, x), self.abilities) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - result["type"] = to_enum(Type18, self.type) - result["updatedAt"] = to_float(self.updated_at) return result -class PolicyListStreamItemType(Enum): - """The type of event""" +class ConversationMessageCompleteRequestExtensions: + """Extensions to enhance the bot's capabilities""" - ITEM = "item" + backstory: Optional[str] + """Additional backstory for the bot""" + datasets: Optional[List[HilariousDataset]] + """Inline datasets to provide additional context""" -class PolicyListStreamItem: - data: PolicyListStreamItemData - """Blueprint properties""" + features: Optional[List[HilariousFeature]] + """Feature flags to enable specific bot capabilities""" - type: PolicyListStreamItemType - """The type of event""" + skillsets: Optional[List[HilariousSkillset]] + """Inline skillsets to provide additional abilities""" - def __init__(self, data: PolicyListStreamItemData, type: PolicyListStreamItemType) -> None: - self.data = data - self.type = type + def __init__(self, backstory: Optional[str], datasets: Optional[List[HilariousDataset]], features: Optional[List[HilariousFeature]], skillsets: Optional[List[HilariousSkillset]]) -> None: + self.backstory = backstory + self.datasets = datasets + self.features = features + self.skillsets = skillsets @staticmethod - def from_dict(obj: Any) -> 'PolicyListStreamItem': + def from_dict(obj: Any) -> 'ConversationMessageCompleteRequestExtensions': assert isinstance(obj, dict) - data = PolicyListStreamItemData.from_dict(obj.get("data")) - type = PolicyListStreamItemType(obj.get("type")) - return PolicyListStreamItem(data, type) + backstory = from_union([from_str, from_none], obj.get("backstory")) + datasets = from_union([lambda x: from_list(HilariousDataset.from_dict, x), from_none], obj.get("datasets")) + features = from_union([lambda x: from_list(HilariousFeature.from_dict, x), from_none], obj.get("features")) + skillsets = from_union([lambda x: from_list(HilariousSkillset.from_dict, x), from_none], obj.get("skillsets")) + return ConversationMessageCompleteRequestExtensions(backstory, datasets, features, skillsets) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(PolicyListStreamItemData, self.data) - result["type"] = to_enum(PolicyListStreamItemType, self.type) + if self.backstory is not None: + result["backstory"] = from_union([from_str, from_none], self.backstory) + if self.datasets is not None: + result["datasets"] = from_union([lambda x: from_list(lambda x: to_class(HilariousDataset, x), x), from_none], self.datasets) + if self.features is not None: + result["features"] = from_union([lambda x: from_list(lambda x: to_class(HilariousFeature, x), x), from_none], self.features) + if self.skillsets is not None: + result["skillsets"] = from_union([lambda x: from_list(lambda x: to_class(HilariousSkillset, x), x), from_none], self.skillsets) return result -class PortalDeleteParams: - portal_id: str - """The ID of the portal to delete""" +class IndecentCall: + """Configuration for when this function should be automatically called""" - def __init__(self, portal_id: str) -> None: - self.portal_id = portal_id + end: Optional[bool] + """If true, this function will be force-called at the end of the conversation""" + + start: Optional[bool] + """If true, this function will be force-called at the start of the conversation""" + + def __init__(self, end: Optional[bool], start: Optional[bool]) -> None: + self.end = end + self.start = start @staticmethod - def from_dict(obj: Any) -> 'PortalDeleteParams': + def from_dict(obj: Any) -> 'IndecentCall': assert isinstance(obj, dict) - portal_id = from_str(obj.get("portalId")) - return PortalDeleteParams(portal_id) + end = from_union([from_bool, from_none], obj.get("end")) + start = from_union([from_bool, from_none], obj.get("start")) + return IndecentCall(end, start) def to_dict(self) -> dict: result: dict = {} - result["portalId"] = from_str(self.portal_id) + if self.end is not None: + result["end"] = from_union([from_bool, from_none], self.end) + if self.start is not None: + result["start"] = from_union([from_bool, from_none], self.start) return result -class PortalDeleteResponse: - id: str - """The ID of the deleted portal""" +class Type20(Enum): + """The schema type, must be "object\"""" - def __init__(self, id: str) -> None: - self.id = id + OBJECT = "object" - @staticmethod - def from_dict(obj: Any) -> 'PortalDeleteResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return PortalDeleteResponse(id) - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result +class IndecentParameters: + """JSON Schema definition for the function parameters""" + properties: Dict[str, Any] + """Object property definitions""" -class PortalFetchParams: - portal_id: str - """The ID of the portal to retrieve""" + required: Optional[List[str]] + """Required property names""" - def __init__(self, portal_id: str) -> None: - self.portal_id = portal_id + type: Type20 + """The schema type, must be "object\"""" + + def __init__(self, properties: Dict[str, Any], required: Optional[List[str]], type: Type20) -> None: + self.properties = properties + self.required = required + self.type = type @staticmethod - def from_dict(obj: Any) -> 'PortalFetchParams': + def from_dict(obj: Any) -> 'IndecentParameters': assert isinstance(obj, dict) - portal_id = from_str(obj.get("portalId")) - return PortalFetchParams(portal_id) + properties = from_dict(lambda x: x, obj.get("properties")) + required = from_union([lambda x: from_list(from_str, x), from_none], obj.get("required")) + type = Type20(obj.get("type")) + return IndecentParameters(properties, required, type) def to_dict(self) -> dict: result: dict = {} - result["portalId"] = from_str(self.portal_id) + result["properties"] = from_dict(lambda x: x, self.properties) + if self.required is not None: + result["required"] = from_union([lambda x: from_list(from_str, x), from_none], self.required) + result["type"] = to_enum(Type20, self.type) return result -class PortalFetchResponse: - """Blueprint properties""" +class IndecentResult: + """The result of the function execution""" - alias: Optional[str] - """The unique alias for the instance""" + data: Any + """The data returned by the function (can be any type)""" - blueprint_id: Optional[str] - """The ID of the blueprint""" + channel: Optional[str] + """The channel for streaming function results""" - config: Optional[Dict[str, Any]] - """The config of the portal""" + def __init__(self, data: Any, channel: Optional[str]) -> None: + self.data = data + self.channel = channel - created_at: float - """The timestamp (ms) when the instance was created""" + @staticmethod + def from_dict(obj: Any) -> 'IndecentResult': + assert isinstance(obj, dict) + data = obj.get("data") + channel = from_union([from_str, from_none], obj.get("channel")) + return IndecentResult(data, channel) - description: Optional[str] - """The associated description""" + def to_dict(self) -> dict: + result: dict = {} + if self.data is not None: + result["data"] = self.data + if self.channel is not None: + result["channel"] = from_union([from_str, from_none], self.channel) + return result - id: str - """The instance ID""" - meta: Optional[Dict[str, Any]] - """Meta data information""" +class ConversationMessageCompleteRequestFunction: + call: Optional[IndecentCall] + """Configuration for when this function should be automatically called""" - name: Optional[str] - """The associated name""" + description: str + """The description of the function""" - slug: Optional[str] - """The slug of the portal""" + name: str + """The name of the function (must be a valid JS identifier, max 64 chars)""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + parameters: IndecentParameters + """JSON Schema definition for the function parameters""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], config: Optional[Dict[str, Any]], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], slug: Optional[str], updated_at: float) -> None: - self.alias = alias - self.blueprint_id = blueprint_id - self.config = config - self.created_at = created_at + result: Optional[IndecentResult] + """The result of the function execution""" + + def __init__(self, call: Optional[IndecentCall], description: str, name: str, parameters: IndecentParameters, result: Optional[IndecentResult]) -> None: + self.call = call self.description = description - self.id = id - self.meta = meta self.name = name - self.slug = slug - self.updated_at = updated_at + self.parameters = parameters + self.result = result @staticmethod - def from_dict(obj: Any) -> 'PortalFetchResponse': + def from_dict(obj: Any) -> 'ConversationMessageCompleteRequestFunction': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - slug = from_union([from_str, from_none], obj.get("slug")) - updated_at = from_float(obj.get("updatedAt")) - return PortalFetchResponse(alias, blueprint_id, config, created_at, description, id, meta, name, slug, updated_at) + call = from_union([IndecentCall.from_dict, from_none], obj.get("call")) + description = from_str(obj.get("description")) + name = from_str(obj.get("name")) + parameters = IndecentParameters.from_dict(obj.get("parameters")) + result = from_union([IndecentResult.from_dict, from_none], obj.get("result")) + return ConversationMessageCompleteRequestFunction(call, description, name, parameters, result) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.config is not None: - result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.slug is not None: - result["slug"] = from_union([from_str, from_none], self.slug) - result["updatedAt"] = to_float(self.updated_at) + if self.call is not None: + result["call"] = from_union([lambda x: to_class(IndecentCall, x), from_none], self.call) + result["description"] = from_str(self.description) + result["name"] = from_str(self.name) + result["parameters"] = to_class(IndecentParameters, self.parameters) + if self.result is not None: + result["result"] = from_union([lambda x: to_class(IndecentResult, x), from_none], self.result) return result -class PortalUpdateParams: - portal_id: str +class ConversationMessageCompleteRequestLimits: + """Execution limits to control conversation processing bounds""" - def __init__(self, portal_id: str) -> None: - self.portal_id = portal_id + calls: Optional[int] + """Maximum number of function/tool calls. Controls how many total function calls can be made + during the conversation. + """ + continuations: Optional[int] + """Maximum number of model continuations. Controls how many times the model can continue + generating after reaching a stop condition. + """ + iterations: Optional[int] + """Maximum number of agentic iterations. Controls how many times the model can iterate + through tool calls and responses. + """ + + def __init__(self, calls: Optional[int], continuations: Optional[int], iterations: Optional[int]) -> None: + self.calls = calls + self.continuations = continuations + self.iterations = iterations @staticmethod - def from_dict(obj: Any) -> 'PortalUpdateParams': + def from_dict(obj: Any) -> 'ConversationMessageCompleteRequestLimits': assert isinstance(obj, dict) - portal_id = from_str(obj.get("portalId")) - return PortalUpdateParams(portal_id) + calls = from_union([from_int, from_none], obj.get("calls")) + continuations = from_union([from_int, from_none], obj.get("continuations")) + iterations = from_union([from_int, from_none], obj.get("iterations")) + return ConversationMessageCompleteRequestLimits(calls, continuations, iterations) def to_dict(self) -> dict: result: dict = {} - result["portalId"] = from_str(self.portal_id) + if self.calls is not None: + result["calls"] = from_union([from_int, from_none], self.calls) + if self.continuations is not None: + result["continuations"] = from_union([from_int, from_none], self.continuations) + if self.iterations is not None: + result["iterations"] = from_union([from_int, from_none], self.iterations) return result -class PortalUpdateRequest: - """Blueprint properties""" - - alias: Optional[str] - """The unique alias for the instance""" - - blueprint_id: Optional[str] - """The ID of the blueprint""" - - config: Optional[Dict[str, Any]] - """The config for the portal""" +class ConversationMessageCompleteRequest: + entities: Optional[List[ConversationMessageCompleteRequestEntity]] + """Known entities""" - description: Optional[str] - """The associated description""" + extensions: Optional[ConversationMessageCompleteRequestExtensions] + """Extensions to enhance the bot's capabilities""" - meta: Optional[Dict[str, Any]] - """Meta data information""" + functions: Optional[List[ConversationMessageCompleteRequestFunction]] + """An array of functions to be added to the conversation""" - name: Optional[str] - """The associated name""" + limits: Optional[ConversationMessageCompleteRequestLimits] + """Execution limits to control conversation processing bounds""" - slug: Optional[str] - """The slug for the portal""" + text: Optional[str] + """The text of the message to send. Omit to continue receiving from the existing + conversation state without sending a new user message. + """ - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], config: Optional[Dict[str, Any]], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], slug: Optional[str]) -> None: - self.alias = alias - self.blueprint_id = blueprint_id - self.config = config - self.description = description - self.meta = meta - self.name = name - self.slug = slug + def __init__(self, entities: Optional[List[ConversationMessageCompleteRequestEntity]], extensions: Optional[ConversationMessageCompleteRequestExtensions], functions: Optional[List[ConversationMessageCompleteRequestFunction]], limits: Optional[ConversationMessageCompleteRequestLimits], text: Optional[str]) -> None: + self.entities = entities + self.extensions = extensions + self.functions = functions + self.limits = limits + self.text = text @staticmethod - def from_dict(obj: Any) -> 'PortalUpdateRequest': + def from_dict(obj: Any) -> 'ConversationMessageCompleteRequest': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) - description = from_union([from_str, from_none], obj.get("description")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - slug = from_union([from_str, from_none], obj.get("slug")) - return PortalUpdateRequest(alias, blueprint_id, config, description, meta, name, slug) + entities = from_union([lambda x: from_list(ConversationMessageCompleteRequestEntity.from_dict, x), from_none], obj.get("entities")) + extensions = from_union([ConversationMessageCompleteRequestExtensions.from_dict, from_none], obj.get("extensions")) + functions = from_union([lambda x: from_list(ConversationMessageCompleteRequestFunction.from_dict, x), from_none], obj.get("functions")) + limits = from_union([ConversationMessageCompleteRequestLimits.from_dict, from_none], obj.get("limits")) + text = from_union([from_str, from_none], obj.get("text")) + return ConversationMessageCompleteRequest(entities, extensions, functions, limits, text) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.config is not None: - result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.slug is not None: - result["slug"] = from_union([from_str, from_none], self.slug) + if self.entities is not None: + result["entities"] = from_union([lambda x: from_list(lambda x: to_class(ConversationMessageCompleteRequestEntity, x), x), from_none], self.entities) + if self.extensions is not None: + result["extensions"] = from_union([lambda x: to_class(ConversationMessageCompleteRequestExtensions, x), from_none], self.extensions) + if self.functions is not None: + result["functions"] = from_union([lambda x: from_list(lambda x: to_class(ConversationMessageCompleteRequestFunction, x), x), from_none], self.functions) + if self.limits is not None: + result["limits"] = from_union([lambda x: to_class(ConversationMessageCompleteRequestLimits, x), from_none], self.limits) + if self.text is not None: + result["text"] = from_union([from_str, from_none], self.text) return result -class PortalUpdateResponse: - id: str - """The ID of the updated portal""" +class TentacledReason(Enum): + """The reason why the completion ended""" - def __init__(self, id: str) -> None: - self.id = id + ABORT = "abort" + ACTIVITY = "activity" + ERROR = "error" + ITERATION = "iteration" + LENGTH = "length" + STOP = "stop" + + +class ConversationMessageCompleteResponseEnd: + """Information about why the completion ended""" + + reason: TentacledReason + """The reason why the completion ended""" + + def __init__(self, reason: TentacledReason) -> None: + self.reason = reason @staticmethod - def from_dict(obj: Any) -> 'PortalUpdateResponse': + def from_dict(obj: Any) -> 'ConversationMessageCompleteResponseEnd': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return PortalUpdateResponse(id) + reason = TentacledReason(obj.get("reason")) + return ConversationMessageCompleteResponseEnd(reason) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["reason"] = to_enum(TentacledReason, self.reason) return result -class PortalCreateRequest: - """Blueprint properties""" - - alias: Optional[str] - """The unique alias for the instance""" - - blueprint_id: Optional[str] - """The ID of the blueprint""" - - config: Optional[Dict[str, Any]] - """The config of the portal""" - - description: Optional[str] - """The associated description""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: Optional[str] - """The associated name""" +class ConversationMessageCompleteResponseUsage: + """Usage information""" - slug: Optional[str] - """The slug of the portal""" + token: float + """The tokens used in this exchange""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], config: Optional[Dict[str, Any]], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], slug: Optional[str]) -> None: - self.alias = alias - self.blueprint_id = blueprint_id - self.config = config - self.description = description - self.meta = meta - self.name = name - self.slug = slug + def __init__(self, token: float) -> None: + self.token = token @staticmethod - def from_dict(obj: Any) -> 'PortalCreateRequest': + def from_dict(obj: Any) -> 'ConversationMessageCompleteResponseUsage': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) - description = from_union([from_str, from_none], obj.get("description")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - slug = from_union([from_str, from_none], obj.get("slug")) - return PortalCreateRequest(alias, blueprint_id, config, description, meta, name, slug) + token = from_float(obj.get("token")) + return ConversationMessageCompleteResponseUsage(token) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.config is not None: - result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.slug is not None: - result["slug"] = from_union([from_str, from_none], self.slug) + result["token"] = to_float(self.token) return result -class PortalCreateResponse: +class ConversationMessageCompleteResponse: + end: ConversationMessageCompleteResponseEnd + """Information about why the completion ended""" + id: str - """The ID of the created portal""" + """The ID of the created message""" - def __init__(self, id: str) -> None: + text: str + """The text of the message received""" + + usage: ConversationMessageCompleteResponseUsage + """Usage information""" + + def __init__(self, end: ConversationMessageCompleteResponseEnd, id: str, text: str, usage: ConversationMessageCompleteResponseUsage) -> None: + self.end = end self.id = id + self.text = text + self.usage = usage @staticmethod - def from_dict(obj: Any) -> 'PortalCreateResponse': + def from_dict(obj: Any) -> 'ConversationMessageCompleteResponse': assert isinstance(obj, dict) + end = ConversationMessageCompleteResponseEnd.from_dict(obj.get("end")) id = from_str(obj.get("id")) - return PortalCreateResponse(id) + text = from_str(obj.get("text")) + usage = ConversationMessageCompleteResponseUsage.from_dict(obj.get("usage")) + return ConversationMessageCompleteResponse(end, id, text, usage) def to_dict(self) -> dict: result: dict = {} + result["end"] = to_class(ConversationMessageCompleteResponseEnd, self.end) result["id"] = from_str(self.id) + result["text"] = from_str(self.text) + result["usage"] = to_class(ConversationMessageCompleteResponseUsage, self.usage) return result -class PortalListParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" - +class StickyReason(Enum): + """The reason why the completion ended""" -class PortalListParams: - cursor: Optional[str] - """The cursor to use for pagination""" + ABORT = "abort" + ACTIVITY = "activity" + ERROR = "error" + ITERATION = "iteration" + LENGTH = "length" + STOP = "stop" - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" - order: Optional[PortalListParamsOrder] - """The order of the paginated items""" +class FluffyEnd: + """Information about why the completion ended""" - take: Optional[int] - """The number of items to retrieve""" + reason: StickyReason + """The reason why the completion ended""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[PortalListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take + def __init__(self, reason: StickyReason) -> None: + self.reason = reason @staticmethod - def from_dict(obj: Any) -> 'PortalListParams': + def from_dict(obj: Any) -> 'FluffyEnd': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([PortalListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return PortalListParams(cursor, meta, order, take) + reason = StickyReason(obj.get("reason")) + return FluffyEnd(reason) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(PortalListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["reason"] = to_enum(StickyReason, self.reason) return result -class PortalListResponseItem: - """Blueprint properties""" - - alias: Optional[str] - """The unique alias for the instance""" - - blueprint_id: Optional[str] - """The ID of the blueprint""" - - config: Optional[Dict[str, Any]] - """The config of the portal""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - description: Optional[str] - """The associated description""" - - id: str - """The instance ID""" +class Type21(Enum): + """The type of the message""" - meta: Optional[Dict[str, Any]] - """Meta data information""" + ACTIVITY = "activity" + BACKSTORY = "backstory" + BOT = "bot" + CHECKPOINT = "checkpoint" + CONTEXT = "context" + INSTRUCTION = "instruction" + REASONING = "reasoning" + USER = "user" - name: Optional[str] - """The associated name""" - slug: Optional[str] - """The slug of the portal""" +class IndigoUsage: + """Usage information""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + token: float + """The tokens used in this exchange""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], config: Optional[Dict[str, Any]], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], slug: Optional[str], updated_at: float) -> None: - self.alias = alias - self.blueprint_id = blueprint_id - self.config = config - self.created_at = created_at - self.description = description - self.id = id - self.meta = meta - self.name = name - self.slug = slug - self.updated_at = updated_at + def __init__(self, token: float) -> None: + self.token = token @staticmethod - def from_dict(obj: Any) -> 'PortalListResponseItem': + def from_dict(obj: Any) -> 'IndigoUsage': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - slug = from_union([from_str, from_none], obj.get("slug")) - updated_at = from_float(obj.get("updatedAt")) - return PortalListResponseItem(alias, blueprint_id, config, created_at, description, id, meta, name, slug, updated_at) + token = from_float(obj.get("token")) + return IndigoUsage(token) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.config is not None: - result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.slug is not None: - result["slug"] = from_union([from_str, from_none], self.slug) - result["updatedAt"] = to_float(self.updated_at) + result["token"] = to_float(self.token) return result -class PortalListResponse: - cursor: str - """Cursor for fetching the next page""" - - items: List[PortalListResponseItem] - - def __init__(self, cursor: str, items: List[PortalListResponseItem]) -> None: - self.cursor = cursor - self.items = items - - @staticmethod - def from_dict(obj: Any) -> 'PortalListResponse': - assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(PortalListResponseItem.from_dict, obj.get("items")) - return PortalListResponse(cursor, items) - - def to_dict(self) -> dict: - result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(PortalListResponseItem, x), self.items) - return result - +class ConversationMessageCompleteStreamItemData: + """The data for the event + + A message in the conversation + + Information about an abort event in a streamed response + """ + end: Optional[FluffyEnd] + """Information about why the completion ended""" -class PortalListStreamItemData: - """Blueprint properties""" + id: Optional[str] + """The ID of the created message""" - alias: Optional[str] - """The unique alias for the instance""" + text: Optional[str] + """The text of the message received + + The text of the message + """ + usage: Optional[IndigoUsage] + """Usage information""" - blueprint_id: Optional[str] - """The ID of the blueprint""" + message: Optional[str] + """The error message""" - config: Optional[Dict[str, Any]] - """The config of the portal""" + token: Optional[str] + """The token generated""" - created_at: float - """The timestamp (ms) when the instance was created""" + meta: Optional[Dict[str, Any]] + """Meta data information""" - description: Optional[str] - """The associated description""" + type: Optional[Type21] + """The type of the message""" - id: str - """The instance ID""" + function_name: Optional[str] + """The function or tool associated with the abort""" - meta: Optional[Dict[str, Any]] - """Meta data information""" + reason: Any + """The abort reason if available""" - name: Optional[str] - """The associated name""" + input_tokens_used: Optional[float] + """The number of input tokens used""" - slug: Optional[str] - """The slug of the portal""" + model: Optional[str] + """The model used""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + output_tokens_used: Optional[float] + """The number of output tokens used""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], config: Optional[Dict[str, Any]], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], slug: Optional[str], updated_at: float) -> None: - self.alias = alias - self.blueprint_id = blueprint_id - self.config = config - self.created_at = created_at - self.description = description + def __init__(self, end: Optional[FluffyEnd], id: Optional[str], text: Optional[str], usage: Optional[IndigoUsage], message: Optional[str], token: Optional[str], meta: Optional[Dict[str, Any]], type: Optional[Type21], function_name: Optional[str], reason: Any, input_tokens_used: Optional[float], model: Optional[str], output_tokens_used: Optional[float]) -> None: + self.end = end self.id = id + self.text = text + self.usage = usage + self.message = message + self.token = token self.meta = meta - self.name = name - self.slug = slug - self.updated_at = updated_at + self.type = type + self.function_name = function_name + self.reason = reason + self.input_tokens_used = input_tokens_used + self.model = model + self.output_tokens_used = output_tokens_used @staticmethod - def from_dict(obj: Any) -> 'PortalListStreamItemData': + def from_dict(obj: Any) -> 'ConversationMessageCompleteStreamItemData': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) + end = from_union([FluffyEnd.from_dict, from_none], obj.get("end")) + id = from_union([from_str, from_none], obj.get("id")) + text = from_union([from_str, from_none], obj.get("text")) + usage = from_union([IndigoUsage.from_dict, from_none], obj.get("usage")) + message = from_union([from_str, from_none], obj.get("message")) + token = from_union([from_str, from_none], obj.get("token")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - slug = from_union([from_str, from_none], obj.get("slug")) - updated_at = from_float(obj.get("updatedAt")) - return PortalListStreamItemData(alias, blueprint_id, config, created_at, description, id, meta, name, slug, updated_at) + type = from_union([Type21, from_none], obj.get("type")) + function_name = from_union([from_str, from_none], obj.get("functionName")) + reason = obj.get("reason") + input_tokens_used = from_union([from_float, from_none], obj.get("inputTokensUsed")) + model = from_union([from_str, from_none], obj.get("model")) + output_tokens_used = from_union([from_float, from_none], obj.get("outputTokensUsed")) + return ConversationMessageCompleteStreamItemData(end, id, text, usage, message, token, meta, type, function_name, reason, input_tokens_used, model, output_tokens_used) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.config is not None: - result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) + if self.end is not None: + result["end"] = from_union([lambda x: to_class(FluffyEnd, x), from_none], self.end) + if self.id is not None: + result["id"] = from_union([from_str, from_none], self.id) + if self.text is not None: + result["text"] = from_union([from_str, from_none], self.text) + if self.usage is not None: + result["usage"] = from_union([lambda x: to_class(IndigoUsage, x), from_none], self.usage) + if self.message is not None: + result["message"] = from_union([from_str, from_none], self.message) + if self.token is not None: + result["token"] = from_union([from_str, from_none], self.token) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.slug is not None: - result["slug"] = from_union([from_str, from_none], self.slug) - result["updatedAt"] = to_float(self.updated_at) + if self.type is not None: + result["type"] = from_union([lambda x: to_enum(Type21, x), from_none], self.type) + if self.function_name is not None: + result["functionName"] = from_union([from_str, from_none], self.function_name) + if self.reason is not None: + result["reason"] = self.reason + if self.input_tokens_used is not None: + result["inputTokensUsed"] = from_union([to_float, from_none], self.input_tokens_used) + if self.model is not None: + result["model"] = from_union([from_str, from_none], self.model) + if self.output_tokens_used is not None: + result["outputTokensUsed"] = from_union([to_float, from_none], self.output_tokens_used) return result -class PortalListStreamItemType(Enum): +class ConversationMessageCompleteStreamItemType(Enum): """The type of event""" - ITEM = "item" - + ABORT = "abort" + COMPLETE_BEGIN = "completeBegin" + COMPLETE_END = "completeEnd" + ERROR = "error" + MESSAGE = "message" + REASONING_TOKEN = "reasoningToken" + RESULT = "result" + TOKEN = "token" + USAGE = "usage" + WAIT_FOR_CHANNEL_MESSAGE_BEGIN = "waitForChannelMessageBegin" + WAIT_FOR_CHANNEL_MESSAGE_END = "waitForChannelMessageEnd" -class PortalListStreamItem: - data: PortalListStreamItemData - """Blueprint properties""" - type: PortalListStreamItemType +class ConversationMessageCompleteStreamItem: + data: ConversationMessageCompleteStreamItemData + """The data for the event + + A message in the conversation + + Information about an abort event in a streamed response + """ + type: ConversationMessageCompleteStreamItemType """The type of event""" - def __init__(self, data: PortalListStreamItemData, type: PortalListStreamItemType) -> None: + def __init__(self, data: ConversationMessageCompleteStreamItemData, type: ConversationMessageCompleteStreamItemType) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'PortalListStreamItem': + def from_dict(obj: Any) -> 'ConversationMessageCompleteStreamItem': assert isinstance(obj, dict) - data = PortalListStreamItemData.from_dict(obj.get("data")) - type = PortalListStreamItemType(obj.get("type")) - return PortalListStreamItem(data, type) + data = ConversationMessageCompleteStreamItemData.from_dict(obj.get("data")) + type = ConversationMessageCompleteStreamItemType(obj.get("type")) + return ConversationMessageCompleteStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(PortalListStreamItemData, self.data) - result["type"] = to_enum(PortalListStreamItemType, self.type) + result["data"] = to_class(ConversationMessageCompleteStreamItemData, self.data) + result["type"] = to_enum(ConversationMessageCompleteStreamItemType, self.type) return result -class SecretAuthenticateParams: - secret_id: str - """The ID of the secret to authenticate""" +class ConversationCompactParams: + conversation_id: str + """The ID of the conversation to compact""" - def __init__(self, secret_id: str) -> None: - self.secret_id = secret_id + def __init__(self, conversation_id: str) -> None: + self.conversation_id = conversation_id @staticmethod - def from_dict(obj: Any) -> 'SecretAuthenticateParams': + def from_dict(obj: Any) -> 'ConversationCompactParams': assert isinstance(obj, dict) - secret_id = from_str(obj.get("secretId")) - return SecretAuthenticateParams(secret_id) + conversation_id = from_str(obj.get("conversationId")) + return ConversationCompactParams(conversation_id) def to_dict(self) -> dict: result: dict = {} - result["secretId"] = from_str(self.secret_id) + result["conversationId"] = from_str(self.conversation_id) return result -class SecretAuthenticateResponse: - id: str - """The ID of the secret to authenticate""" - - url: str - """The URL to authenticate the secret""" - - def __init__(self, id: str, url: str) -> None: - self.id = id - self.url = url - - @staticmethod - def from_dict(obj: Any) -> 'SecretAuthenticateResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - url = from_str(obj.get("url")) - return SecretAuthenticateResponse(id, url) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - result["url"] = from_str(self.url) - return result - +class ConversationCompactResponseUsage: + """Usage information""" -class SecretDeleteParams: - secret_id: str - """The ID of the secret to delete""" + token: float + """The tokens used in this exchange""" - def __init__(self, secret_id: str) -> None: - self.secret_id = secret_id + def __init__(self, token: float) -> None: + self.token = token @staticmethod - def from_dict(obj: Any) -> 'SecretDeleteParams': + def from_dict(obj: Any) -> 'ConversationCompactResponseUsage': assert isinstance(obj, dict) - secret_id = from_str(obj.get("secretId")) - return SecretDeleteParams(secret_id) + token = from_float(obj.get("token")) + return ConversationCompactResponseUsage(token) def to_dict(self) -> dict: result: dict = {} - result["secretId"] = from_str(self.secret_id) + result["token"] = to_float(self.token) return result -class SecretDeleteResponse: +class ConversationCompactResponse: id: str - """The ID of the deleted secret""" + """The ID of the created checkpoint message, or the conversation ID if there was nothing to + compact + """ + text: str + """The compacted text of the messages, or an empty string if there was nothing to compact""" - def __init__(self, id: str) -> None: + usage: ConversationCompactResponseUsage + """Usage information""" + + def __init__(self, id: str, text: str, usage: ConversationCompactResponseUsage) -> None: self.id = id + self.text = text + self.usage = usage @staticmethod - def from_dict(obj: Any) -> 'SecretDeleteResponse': + def from_dict(obj: Any) -> 'ConversationCompactResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return SecretDeleteResponse(id) + text = from_str(obj.get("text")) + usage = ConversationCompactResponseUsage.from_dict(obj.get("usage")) + return ConversationCompactResponse(id, text, usage) def to_dict(self) -> dict: result: dict = {} result["id"] = from_str(self.id) + result["text"] = from_str(self.text) + result["usage"] = to_class(ConversationCompactResponseUsage, self.usage) return result -class SecretFetchParams: - secret_id: str - """The ID of the secret to retrieve""" +class ConversationUsageFetchParams: + conversation_id: str + """The ID of the conversation""" - def __init__(self, secret_id: str) -> None: - self.secret_id = secret_id + conversation_usage_fetch_params_from: Optional[datetime] + """Start date for the period (ISO 8601 format)""" + + to: Optional[datetime] + """End date for the period (ISO 8601 format)""" + + def __init__(self, conversation_id: str, conversation_usage_fetch_params_from: Optional[datetime], to: Optional[datetime]) -> None: + self.conversation_id = conversation_id + self.conversation_usage_fetch_params_from = conversation_usage_fetch_params_from + self.to = to @staticmethod - def from_dict(obj: Any) -> 'SecretFetchParams': + def from_dict(obj: Any) -> 'ConversationUsageFetchParams': assert isinstance(obj, dict) - secret_id = from_str(obj.get("secretId")) - return SecretFetchParams(secret_id) + conversation_id = from_str(obj.get("conversationId")) + conversation_usage_fetch_params_from = from_union([from_datetime, from_none], obj.get("from")) + to = from_union([from_datetime, from_none], obj.get("to")) + return ConversationUsageFetchParams(conversation_id, conversation_usage_fetch_params_from, to) def to_dict(self) -> dict: result: dict = {} - result["secretId"] = from_str(self.secret_id) + result["conversationId"] = from_str(self.conversation_id) + if self.conversation_usage_fetch_params_from is not None: + result["from"] = from_union([lambda x: x.isoformat(), from_none], self.conversation_usage_fetch_params_from) + if self.to is not None: + result["to"] = from_union([lambda x: x.isoformat(), from_none], self.to) return result -class SecretFetchResponseKind(Enum): - """The kind of the secret""" - - PERSONAL = "personal" - SHARED = "shared" - - -class SecretFetchResponseType(Enum): - """The type of the secret""" - - BASIC = "basic" - BEARER = "bearer" - JWT = "jwt" - OAUTH = "oauth" - PLAIN = "plain" - REFERENCE = "reference" - TEMPLATE = "template" - - -class SecretFetchResponseVisibility(Enum): - """The visibility of the secret""" - - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" - - -class SecretFetchResponse: - """Blueprint properties""" - - alias: Optional[str] - """The unique alias for the instance""" - - blueprint_id: Optional[str] - """The ID of the blueprint""" - - config: Optional[Dict[str, Any]] - """The config of the secret""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - description: Optional[str] - """The associated description""" - - id: str - """The instance ID""" +class ConversationUsageFetchResponse: + messages: Optional[int] + """Total number of messages""" - kind: Optional[SecretFetchResponseKind] - """The kind of the secret""" + tokens: Optional[int] + """Total number of BASE tokens used""" - meta: Optional[Dict[str, Any]] - """Meta data information""" + def __init__(self, messages: Optional[int], tokens: Optional[int]) -> None: + self.messages = messages + self.tokens = tokens - name: Optional[str] - """The associated name""" + @staticmethod + def from_dict(obj: Any) -> 'ConversationUsageFetchResponse': + assert isinstance(obj, dict) + messages = from_union([from_int, from_none], obj.get("messages")) + tokens = from_union([from_int, from_none], obj.get("tokens")) + return ConversationUsageFetchResponse(messages, tokens) - type: Optional[SecretFetchResponseType] - """The type of the secret""" + def to_dict(self) -> dict: + result: dict = {} + if self.messages is not None: + result["messages"] = from_union([from_int, from_none], self.messages) + if self.tokens is not None: + result["tokens"] = from_union([from_int, from_none], self.tokens) + return result - updated_at: float - """The timestamp (ms) when the instance was updated""" - visibility: Optional[SecretFetchResponseVisibility] - """The visibility of the secret""" +class ConversationSessionCreateParams: + conversation_id: str + """The ID of the conversation""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], config: Optional[Dict[str, Any]], created_at: float, description: Optional[str], id: str, kind: Optional[SecretFetchResponseKind], meta: Optional[Dict[str, Any]], name: Optional[str], type: Optional[SecretFetchResponseType], updated_at: float, visibility: Optional[SecretFetchResponseVisibility]) -> None: - self.alias = alias - self.blueprint_id = blueprint_id - self.config = config - self.created_at = created_at - self.description = description - self.id = id - self.kind = kind - self.meta = meta - self.name = name - self.type = type - self.updated_at = updated_at - self.visibility = visibility + def __init__(self, conversation_id: str) -> None: + self.conversation_id = conversation_id @staticmethod - def from_dict(obj: Any) -> 'SecretFetchResponse': + def from_dict(obj: Any) -> 'ConversationSessionCreateParams': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) - kind = from_union([SecretFetchResponseKind, from_none], obj.get("kind")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - type = from_union([SecretFetchResponseType, from_none], obj.get("type")) - updated_at = from_float(obj.get("updatedAt")) - visibility = from_union([SecretFetchResponseVisibility, from_none], obj.get("visibility")) - return SecretFetchResponse(alias, blueprint_id, config, created_at, description, id, kind, meta, name, type, updated_at, visibility) + conversation_id = from_str(obj.get("conversationId")) + return ConversationSessionCreateParams(conversation_id) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.config is not None: - result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) - if self.kind is not None: - result["kind"] = from_union([lambda x: to_enum(SecretFetchResponseKind, x), from_none], self.kind) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.type is not None: - result["type"] = from_union([lambda x: to_enum(SecretFetchResponseType, x), from_none], self.type) - result["updatedAt"] = to_float(self.updated_at) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(SecretFetchResponseVisibility, x), from_none], self.visibility) + result["conversationId"] = from_str(self.conversation_id) return result -class SecretMintParams: - secret_id: str - """The ID of the secret to mint""" +class ConversationSessionCreateRequest: + duration_in_seconds: Optional[float] + """The maximum amount of time this session will stay open""" - def __init__(self, secret_id: str) -> None: - self.secret_id = secret_id + def __init__(self, duration_in_seconds: Optional[float]) -> None: + self.duration_in_seconds = duration_in_seconds @staticmethod - def from_dict(obj: Any) -> 'SecretMintParams': + def from_dict(obj: Any) -> 'ConversationSessionCreateRequest': assert isinstance(obj, dict) - secret_id = from_str(obj.get("secretId")) - return SecretMintParams(secret_id) + duration_in_seconds = from_union([from_float, from_none], obj.get("durationInSeconds")) + return ConversationSessionCreateRequest(duration_in_seconds) def to_dict(self) -> dict: result: dict = {} - result["secretId"] = from_str(self.secret_id) + if self.duration_in_seconds is not None: + result["durationInSeconds"] = from_union([to_float, from_none], self.duration_in_seconds) return result -class SecretMintResponse: - expires_at: Optional[float] - """Token expiry as a unix timestamp in ms, or null""" +class ConversationSessionCreateResponse: + expires_at: float + """The time the token will expire in milliseconds""" + + id: str + """The ID of the conversation""" token: str - """The usable token to send to the provider""" + """The token for this conversation""" - def __init__(self, expires_at: Optional[float], token: str) -> None: + def __init__(self, expires_at: float, id: str, token: str) -> None: self.expires_at = expires_at + self.id = id self.token = token @staticmethod - def from_dict(obj: Any) -> 'SecretMintResponse': + def from_dict(obj: Any) -> 'ConversationSessionCreateResponse': assert isinstance(obj, dict) - expires_at = from_union([from_float, from_none], obj.get("expiresAt")) + expires_at = from_float(obj.get("expiresAt")) + id = from_str(obj.get("id")) token = from_str(obj.get("token")) - return SecretMintResponse(expires_at, token) + return ConversationSessionCreateResponse(expires_at, id, token) def to_dict(self) -> dict: result: dict = {} - if self.expires_at is not None: - result["expiresAt"] = from_union([to_float, from_none], self.expires_at) + result["expiresAt"] = to_float(self.expires_at) + result["id"] = from_str(self.id) result["token"] = from_str(self.token) return result -class SecretProxyParams: - secret_id: str - """The ID of the secret to inject""" - - def __init__(self, secret_id: str) -> None: - self.secret_id = secret_id - - @staticmethod - def from_dict(obj: Any) -> 'SecretProxyParams': - assert isinstance(obj, dict) - secret_id = from_str(obj.get("secretId")) - return SecretProxyParams(secret_id) +class ConversationMessageListParamsOrder(Enum): + """The order of the paginated items""" - def to_dict(self) -> dict: - result: dict = {} - result["secretId"] = from_str(self.secret_id) - return result + ASC = "asc" + DESC = "desc" -class SecretProxyRequest: - body: Optional[str] - """The request body""" +class ConversationMessageListParams: + conversation_id: str + """The ID of the conversation to list messages for""" - headers: Optional[Dict[str, str]] - """The request headers (may reference the secret)""" + cursor: Optional[str] + """The cursor to use for pagination""" - method: Optional[str] - """The HTTP method""" + order: Optional[ConversationMessageListParamsOrder] + """The order of the paginated items""" - url: str - """The destination URL""" + take: Optional[int] + """The number of items to retrieve""" - def __init__(self, body: Optional[str], headers: Optional[Dict[str, str]], method: Optional[str], url: str) -> None: - self.body = body - self.headers = headers - self.method = method - self.url = url + def __init__(self, conversation_id: str, cursor: Optional[str], order: Optional[ConversationMessageListParamsOrder], take: Optional[int]) -> None: + self.conversation_id = conversation_id + self.cursor = cursor + self.order = order + self.take = take @staticmethod - def from_dict(obj: Any) -> 'SecretProxyRequest': + def from_dict(obj: Any) -> 'ConversationMessageListParams': assert isinstance(obj, dict) - body = from_union([from_str, from_none], obj.get("body")) - headers = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("headers")) - method = from_union([from_str, from_none], obj.get("method")) - url = from_str(obj.get("url")) - return SecretProxyRequest(body, headers, method, url) + conversation_id = from_str(obj.get("conversationId")) + cursor = from_union([from_str, from_none], obj.get("cursor")) + order = from_union([ConversationMessageListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return ConversationMessageListParams(conversation_id, cursor, order, take) def to_dict(self) -> dict: result: dict = {} - if self.body is not None: - result["body"] = from_union([from_str, from_none], self.body) - if self.headers is not None: - result["headers"] = from_union([lambda x: from_dict(from_str, x), from_none], self.headers) - if self.method is not None: - result["method"] = from_union([from_str, from_none], self.method) - result["url"] = from_str(self.url) + result["conversationId"] = from_str(self.conversation_id) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(ConversationMessageListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class SecretRevokeParams: - secret_id: str +class Type22(Enum): + """The type of the message""" - def __init__(self, secret_id: str) -> None: - self.secret_id = secret_id + ACTIVITY = "activity" + BACKSTORY = "backstory" + BOT = "bot" + CHECKPOINT = "checkpoint" + CONTEXT = "context" + INSTRUCTION = "instruction" + REASONING = "reasoning" + USER = "user" - @staticmethod - def from_dict(obj: Any) -> 'SecretRevokeParams': - assert isinstance(obj, dict) - secret_id = from_str(obj.get("secretId")) - return SecretRevokeParams(secret_id) - def to_dict(self) -> dict: - result: dict = {} - result["secretId"] = from_str(self.secret_id) - return result +class ConversationMessageListResponseItem: + """Instance list properties""" + + created_at: float + """The timestamp (ms) when the instance was created""" + description: Optional[str] + """The associated description""" -class SecretRevokeResponse: id: str - """The ID of the revoked secret""" + """The instance ID""" - def __init__(self, id: str) -> None: - self.id = id + meta: Optional[Dict[str, Any]] + """Meta data information""" - @staticmethod - def from_dict(obj: Any) -> 'SecretRevokeResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return SecretRevokeResponse(id) + name: Optional[str] + """The associated name""" - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result + text: str + """The text of the message""" + type: Type22 + """The type of the message""" -class SecretUpdateParams: - secret_id: str + updated_at: float + """The timestamp (ms) when the instance was updated""" - def __init__(self, secret_id: str) -> None: - self.secret_id = secret_id + def __init__(self, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], text: str, type: Type22, updated_at: float) -> None: + self.created_at = created_at + self.description = description + self.id = id + self.meta = meta + self.name = name + self.text = text + self.type = type + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'SecretUpdateParams': + def from_dict(obj: Any) -> 'ConversationMessageListResponseItem': assert isinstance(obj, dict) - secret_id = from_str(obj.get("secretId")) - return SecretUpdateParams(secret_id) + created_at = from_float(obj.get("createdAt")) + description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) + meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) + text = from_str(obj.get("text")) + type = Type22(obj.get("type")) + updated_at = from_float(obj.get("updatedAt")) + return ConversationMessageListResponseItem(created_at, description, id, meta, name, text, type, updated_at) def to_dict(self) -> dict: result: dict = {} - result["secretId"] = from_str(self.secret_id) + result["createdAt"] = to_float(self.created_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + result["text"] = from_str(self.text) + result["type"] = to_enum(Type22, self.type) + result["updatedAt"] = to_float(self.updated_at) return result -class SecretUpdateRequestKind(Enum): - """The kind of the secret""" - - PERSONAL = "personal" - SHARED = "shared" - +class ConversationMessageListResponse: + cursor: str + """Cursor for fetching the next page""" -class SecretUpdateRequestType(Enum): - """The type of the secret""" + items: List[ConversationMessageListResponseItem] - BASIC = "basic" - BEARER = "bearer" - JWT = "jwt" - OAUTH = "oauth" - PLAIN = "plain" - REFERENCE = "reference" - TEMPLATE = "template" + def __init__(self, cursor: str, items: List[ConversationMessageListResponseItem]) -> None: + self.cursor = cursor + self.items = items + @staticmethod + def from_dict(obj: Any) -> 'ConversationMessageListResponse': + assert isinstance(obj, dict) + cursor = from_str(obj.get("cursor")) + items = from_list(ConversationMessageListResponseItem.from_dict, obj.get("items")) + return ConversationMessageListResponse(cursor, items) -class SecretUpdateRequestVisibility(Enum): - """The visibility of the secret""" + def to_dict(self) -> dict: + result: dict = {} + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(ConversationMessageListResponseItem, x), self.items) + return result - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" +class Type23(Enum): + """The type of the message""" -class SecretUpdateRequest: - """Blueprint properties""" + ACTIVITY = "activity" + BACKSTORY = "backstory" + BOT = "bot" + CHECKPOINT = "checkpoint" + CONTEXT = "context" + INSTRUCTION = "instruction" + REASONING = "reasoning" + USER = "user" - alias: Optional[str] - """The unique alias for the instance""" - blueprint_id: Optional[str] - """The ID of the blueprint""" +class ConversationMessageListStreamItemData: + """Instance list properties""" - config: Optional[Dict[str, Any]] - """The config of the secret""" + created_at: float + """The timestamp (ms) when the instance was created""" description: Optional[str] """The associated description""" - kind: Optional[SecretUpdateRequestKind] - """The kind of the secret""" + id: str + """The instance ID""" meta: Optional[Dict[str, Any]] """Meta data information""" @@ -44201,219 +42991,200 @@ class SecretUpdateRequest: name: Optional[str] """The associated name""" - type: Optional[SecretUpdateRequestType] - """The type of the secret""" + text: str + """The text of the message""" - value: Optional[str] - """The value of the secret""" + type: Type23 + """The type of the message""" - visibility: Optional[SecretUpdateRequestVisibility] - """The visibility of the secret""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], config: Optional[Dict[str, Any]], description: Optional[str], kind: Optional[SecretUpdateRequestKind], meta: Optional[Dict[str, Any]], name: Optional[str], type: Optional[SecretUpdateRequestType], value: Optional[str], visibility: Optional[SecretUpdateRequestVisibility]) -> None: - self.alias = alias - self.blueprint_id = blueprint_id - self.config = config + def __init__(self, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], text: str, type: Type23, updated_at: float) -> None: + self.created_at = created_at self.description = description - self.kind = kind + self.id = id self.meta = meta self.name = name + self.text = text self.type = type - self.value = value - self.visibility = visibility + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'SecretUpdateRequest': + def from_dict(obj: Any) -> 'ConversationMessageListStreamItemData': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - kind = from_union([SecretUpdateRequestKind, from_none], obj.get("kind")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - type = from_union([SecretUpdateRequestType, from_none], obj.get("type")) - value = from_union([from_str, from_none], obj.get("value")) - visibility = from_union([SecretUpdateRequestVisibility, from_none], obj.get("visibility")) - return SecretUpdateRequest(alias, blueprint_id, config, description, kind, meta, name, type, value, visibility) + text = from_str(obj.get("text")) + type = Type23(obj.get("type")) + updated_at = from_float(obj.get("updatedAt")) + return ConversationMessageListStreamItemData(created_at, description, id, meta, name, text, type, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.config is not None: - result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.kind is not None: - result["kind"] = from_union([lambda x: to_enum(SecretUpdateRequestKind, x), from_none], self.kind) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.type is not None: - result["type"] = from_union([lambda x: to_enum(SecretUpdateRequestType, x), from_none], self.type) - if self.value is not None: - result["value"] = from_union([from_str, from_none], self.value) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(SecretUpdateRequestVisibility, x), from_none], self.visibility) + result["text"] = from_str(self.text) + result["type"] = to_enum(Type23, self.type) + result["updatedAt"] = to_float(self.updated_at) return result -class SecretUpdateResponse: - id: str - """The ID of the updated secret""" +class ConversationMessageListStreamItemType(Enum): + """The type of event""" - def __init__(self, id: str) -> None: - self.id = id + ITEM = "item" + + +class ConversationMessageListStreamItem: + data: ConversationMessageListStreamItemData + """Instance list properties""" + + type: ConversationMessageListStreamItemType + """The type of event""" + + def __init__(self, data: ConversationMessageListStreamItemData, type: ConversationMessageListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'SecretUpdateResponse': + def from_dict(obj: Any) -> 'ConversationMessageListStreamItem': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return SecretUpdateResponse(id) + data = ConversationMessageListStreamItemData.from_dict(obj.get("data")) + type = ConversationMessageListStreamItemType(obj.get("type")) + return ConversationMessageListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["data"] = to_class(ConversationMessageListStreamItemData, self.data) + result["type"] = to_enum(ConversationMessageListStreamItemType, self.type) return result -class SecretVerifyParams: - secret_id: str - """The ID of the secret to be verified""" +class ConversationMessageCreateParams: + conversation_id: str + """The ID of the conversation""" - def __init__(self, secret_id: str) -> None: - self.secret_id = secret_id + def __init__(self, conversation_id: str) -> None: + self.conversation_id = conversation_id @staticmethod - def from_dict(obj: Any) -> 'SecretVerifyParams': + def from_dict(obj: Any) -> 'ConversationMessageCreateParams': assert isinstance(obj, dict) - secret_id = from_str(obj.get("secretId")) - return SecretVerifyParams(secret_id) + conversation_id = from_str(obj.get("conversationId")) + return ConversationMessageCreateParams(conversation_id) def to_dict(self) -> dict: result: dict = {} - result["secretId"] = from_str(self.secret_id) + result["conversationId"] = from_str(self.conversation_id) return result -class Type19(Enum): - """The type of action to take""" - - AUTHENTICATE = "authenticate" - - -class SecretVerifyResponseAction: - """The action to take next""" +class IndecentReplacement: + begin: float + """Start offset""" - type: Type19 - """The type of action to take""" + end: float + """End offset""" - url: str - """The URL to authenticate the secret""" + text: str + """The text value of the replacement""" - def __init__(self, type: Type19, url: str) -> None: - self.type = type - self.url = url + def __init__(self, begin: float, end: float, text: str) -> None: + self.begin = begin + self.end = end + self.text = text @staticmethod - def from_dict(obj: Any) -> 'SecretVerifyResponseAction': + def from_dict(obj: Any) -> 'IndecentReplacement': assert isinstance(obj, dict) - type = Type19(obj.get("type")) - url = from_str(obj.get("url")) - return SecretVerifyResponseAction(type, url) + begin = from_float(obj.get("begin")) + end = from_float(obj.get("end")) + text = from_str(obj.get("text")) + return IndecentReplacement(begin, end, text) def to_dict(self) -> dict: result: dict = {} - result["type"] = to_enum(Type19, self.type) - result["url"] = from_str(self.url) + result["begin"] = to_float(self.begin) + result["end"] = to_float(self.end) + result["text"] = from_str(self.text) return result -class SecretVerifyResponseStatus(Enum): - """The status of the secret""" +class ConversationMessageCreateRequestEntity: + """Extracted entity from the message""" - AUTHENTICATED = "authenticated" - UNAUTHENTICATED = "unauthenticated" + begin: float + """Start offset""" + end: float + """End offset""" -class SecretVerifyResponse: - action: Optional[SecretVerifyResponseAction] - id: str - """The ID of the verified secret""" + replacement: Optional[IndecentReplacement] + text: str + """The text value of the entity""" - status: SecretVerifyResponseStatus - """The status of the secret""" + type: str + """The entity type""" - def __init__(self, action: Optional[SecretVerifyResponseAction], id: str, status: SecretVerifyResponseStatus) -> None: - self.action = action - self.id = id - self.status = status + def __init__(self, begin: float, end: float, replacement: Optional[IndecentReplacement], text: str, type: str) -> None: + self.begin = begin + self.end = end + self.replacement = replacement + self.text = text + self.type = type @staticmethod - def from_dict(obj: Any) -> 'SecretVerifyResponse': + def from_dict(obj: Any) -> 'ConversationMessageCreateRequestEntity': assert isinstance(obj, dict) - action = from_union([SecretVerifyResponseAction.from_dict, from_none], obj.get("action")) - id = from_str(obj.get("id")) - status = SecretVerifyResponseStatus(obj.get("status")) - return SecretVerifyResponse(action, id, status) + begin = from_float(obj.get("begin")) + end = from_float(obj.get("end")) + replacement = from_union([IndecentReplacement.from_dict, from_none], obj.get("replacement")) + text = from_str(obj.get("text")) + type = from_str(obj.get("type")) + return ConversationMessageCreateRequestEntity(begin, end, replacement, text, type) def to_dict(self) -> dict: result: dict = {} - if self.action is not None: - result["action"] = from_union([lambda x: to_class(SecretVerifyResponseAction, x), from_none], self.action) - result["id"] = from_str(self.id) - result["status"] = to_enum(SecretVerifyResponseStatus, self.status) + result["begin"] = to_float(self.begin) + result["end"] = to_float(self.end) + if self.replacement is not None: + result["replacement"] = from_union([lambda x: to_class(IndecentReplacement, x), from_none], self.replacement) + result["text"] = from_str(self.text) + result["type"] = from_str(self.type) return result -class SecretCreateRequestKind(Enum): - """The kind of the secret""" - - PERSONAL = "personal" - SHARED = "shared" - - -class SecretCreateRequestType(Enum): - """The type of the secret""" - - BASIC = "basic" - BEARER = "bearer" - JWT = "jwt" - OAUTH = "oauth" - PLAIN = "plain" - REFERENCE = "reference" - TEMPLATE = "template" - - -class SecretCreateRequestVisibility(Enum): - """The visibility of the secret""" - - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" - - -class SecretCreateRequest: - """Blueprint properties""" +class ConversationMessageCreateRequestType(Enum): + """The type of the message""" - alias: Optional[str] - """The unique alias for the instance""" + ACTIVITY = "activity" + BACKSTORY = "backstory" + BOT = "bot" + CHECKPOINT = "checkpoint" + CONTEXT = "context" + INSTRUCTION = "instruction" + REASONING = "reasoning" + USER = "user" - blueprint_id: Optional[str] - """The ID of the blueprint""" - config: Optional[Dict[str, Any]] - """The config of the secret""" +class ConversationMessageCreateRequest: + """Instance crud properties""" description: Optional[str] """The associated description""" - kind: Optional[SecretCreateRequestKind] - """The kind of the secret""" + entities: Optional[List[ConversationMessageCreateRequestEntity]] + """Known entities""" meta: Optional[Dict[str, Any]] """Meta data information""" @@ -44421,331 +43192,338 @@ class SecretCreateRequest: name: Optional[str] """The associated name""" - type: Optional[SecretCreateRequestType] - """The type of the secret""" - - value: Optional[str] - """The value of the secret""" + text: str + """The text of the message""" - visibility: Optional[SecretCreateRequestVisibility] - """The visibility of the secret""" + type: ConversationMessageCreateRequestType + """The type of the message""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], config: Optional[Dict[str, Any]], description: Optional[str], kind: Optional[SecretCreateRequestKind], meta: Optional[Dict[str, Any]], name: Optional[str], type: Optional[SecretCreateRequestType], value: Optional[str], visibility: Optional[SecretCreateRequestVisibility]) -> None: - self.alias = alias - self.blueprint_id = blueprint_id - self.config = config + def __init__(self, description: Optional[str], entities: Optional[List[ConversationMessageCreateRequestEntity]], meta: Optional[Dict[str, Any]], name: Optional[str], text: str, type: ConversationMessageCreateRequestType) -> None: self.description = description - self.kind = kind + self.entities = entities self.meta = meta self.name = name + self.text = text self.type = type - self.value = value - self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'SecretCreateRequest': + def from_dict(obj: Any) -> 'ConversationMessageCreateRequest': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) description = from_union([from_str, from_none], obj.get("description")) - kind = from_union([SecretCreateRequestKind, from_none], obj.get("kind")) + entities = from_union([lambda x: from_list(ConversationMessageCreateRequestEntity.from_dict, x), from_none], obj.get("entities")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - type = from_union([SecretCreateRequestType, from_none], obj.get("type")) - value = from_union([from_str, from_none], obj.get("value")) - visibility = from_union([SecretCreateRequestVisibility, from_none], obj.get("visibility")) - return SecretCreateRequest(alias, blueprint_id, config, description, kind, meta, name, type, value, visibility) + text = from_str(obj.get("text")) + type = ConversationMessageCreateRequestType(obj.get("type")) + return ConversationMessageCreateRequest(description, entities, meta, name, text, type) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.config is not None: - result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.kind is not None: - result["kind"] = from_union([lambda x: to_enum(SecretCreateRequestKind, x), from_none], self.kind) + if self.entities is not None: + result["entities"] = from_union([lambda x: from_list(lambda x: to_class(ConversationMessageCreateRequestEntity, x), x), from_none], self.entities) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.type is not None: - result["type"] = from_union([lambda x: to_enum(SecretCreateRequestType, x), from_none], self.type) - if self.value is not None: - result["value"] = from_union([from_str, from_none], self.value) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(SecretCreateRequestVisibility, x), from_none], self.visibility) + result["text"] = from_str(self.text) + result["type"] = to_enum(ConversationMessageCreateRequestType, self.type) return result -class SecretCreateResponse: - id: str - """The ID of the created secret""" +class HilariousReplacement: + begin: float + """Start offset""" - def __init__(self, id: str) -> None: - self.id = id + end: float + """End offset""" + + text: str + """The text value of the replacement""" + + def __init__(self, begin: float, end: float, text: str) -> None: + self.begin = begin + self.end = end + self.text = text @staticmethod - def from_dict(obj: Any) -> 'SecretCreateResponse': + def from_dict(obj: Any) -> 'HilariousReplacement': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return SecretCreateResponse(id) + begin = from_float(obj.get("begin")) + end = from_float(obj.get("end")) + text = from_str(obj.get("text")) + return HilariousReplacement(begin, end, text) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["begin"] = to_float(self.begin) + result["end"] = to_float(self.end) + result["text"] = from_str(self.text) return result -class SecretListParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" - +class ConversationMessageCreateResponseEntity: + """Extracted entity from the message""" -class SecretListParams: - cursor: Optional[str] - """The cursor to use for pagination""" + begin: float + """Start offset""" - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" + end: float + """End offset""" - order: Optional[SecretListParamsOrder] - """The order of the paginated items""" + replacement: Optional[HilariousReplacement] + text: str + """The text value of the entity""" - take: Optional[int] - """The number of items to retrieve""" + type: str + """The entity type""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[SecretListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take + def __init__(self, begin: float, end: float, replacement: Optional[HilariousReplacement], text: str, type: str) -> None: + self.begin = begin + self.end = end + self.replacement = replacement + self.text = text + self.type = type @staticmethod - def from_dict(obj: Any) -> 'SecretListParams': + def from_dict(obj: Any) -> 'ConversationMessageCreateResponseEntity': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([SecretListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return SecretListParams(cursor, meta, order, take) + begin = from_float(obj.get("begin")) + end = from_float(obj.get("end")) + replacement = from_union([HilariousReplacement.from_dict, from_none], obj.get("replacement")) + text = from_str(obj.get("text")) + type = from_str(obj.get("type")) + return ConversationMessageCreateResponseEntity(begin, end, replacement, text, type) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(SecretListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["begin"] = to_float(self.begin) + result["end"] = to_float(self.end) + if self.replacement is not None: + result["replacement"] = from_union([lambda x: to_class(HilariousReplacement, x), from_none], self.replacement) + result["text"] = from_str(self.text) + result["type"] = from_str(self.type) return result -class IndigoKind(Enum): - """The kind of the secret""" +class ConversationMessageCreateResponse: + entities: List[ConversationMessageCreateResponseEntity] + """Extracted entities from the message""" - PERSONAL = "personal" - SHARED = "shared" + id: str + """The ID of the created message""" + def __init__(self, entities: List[ConversationMessageCreateResponseEntity], id: str) -> None: + self.entities = entities + self.id = id -class Type20(Enum): - """The type of the secret""" + @staticmethod + def from_dict(obj: Any) -> 'ConversationMessageCreateResponse': + assert isinstance(obj, dict) + entities = from_list(ConversationMessageCreateResponseEntity.from_dict, obj.get("entities")) + id = from_str(obj.get("id")) + return ConversationMessageCreateResponse(entities, id) - BASIC = "basic" - BEARER = "bearer" - JWT = "jwt" - OAUTH = "oauth" - PLAIN = "plain" - REFERENCE = "reference" - TEMPLATE = "template" + def to_dict(self) -> dict: + result: dict = {} + result["entities"] = from_list(lambda x: to_class(ConversationMessageCreateResponseEntity, x), self.entities) + result["id"] = from_str(self.id) + return result -class FriskyVisibility(Enum): - """The visibility of the secret""" +class ConversationMessageUpvoteParams: + conversation_id: str + """The ID of the conversation""" - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" + message_id: str + """The ID of the message""" + + def __init__(self, conversation_id: str, message_id: str) -> None: + self.conversation_id = conversation_id + self.message_id = message_id + + @staticmethod + def from_dict(obj: Any) -> 'ConversationMessageUpvoteParams': + assert isinstance(obj, dict) + conversation_id = from_str(obj.get("conversationId")) + message_id = from_str(obj.get("messageId")) + return ConversationMessageUpvoteParams(conversation_id, message_id) + def to_dict(self) -> dict: + result: dict = {} + result["conversationId"] = from_str(self.conversation_id) + result["messageId"] = from_str(self.message_id) + return result -class SecretListResponseItem: - """Blueprint properties""" - alias: Optional[str] - """The unique alias for the instance""" +class ConversationMessageUpvoteRequest: + reason: Optional[str] + """The reason for the upvote""" - blueprint_id: Optional[str] - """The ID of the blueprint""" + value: Optional[int] + """The value of the upvote""" - config: Optional[Dict[str, Any]] - """The config of the secret""" + def __init__(self, reason: Optional[str], value: Optional[int]) -> None: + self.reason = reason + self.value = value - created_at: float - """The timestamp (ms) when the instance was created""" + @staticmethod + def from_dict(obj: Any) -> 'ConversationMessageUpvoteRequest': + assert isinstance(obj, dict) + reason = from_union([from_str, from_none], obj.get("reason")) + value = from_union([from_int, from_none], obj.get("value")) + return ConversationMessageUpvoteRequest(reason, value) - description: Optional[str] - """The associated description""" + def to_dict(self) -> dict: + result: dict = {} + if self.reason is not None: + result["reason"] = from_union([from_str, from_none], self.reason) + if self.value is not None: + result["value"] = from_union([from_int, from_none], self.value) + return result + +class ConversationMessageUpvoteResponse: id: str - """The instance ID""" + """The ID of the upvoted message""" - kind: Optional[IndigoKind] - """The kind of the secret""" + def __init__(self, id: str) -> None: + self.id = id - meta: Optional[Dict[str, Any]] - """Meta data information""" + @staticmethod + def from_dict(obj: Any) -> 'ConversationMessageUpvoteResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return ConversationMessageUpvoteResponse(id) - name: Optional[str] - """The associated name""" + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result - type: Optional[Type20] - """The type of the secret""" - updated_at: float - """The timestamp (ms) when the instance was updated""" +class ConversationMessageUpdateParams: + conversation_id: str + """The ID of the conversation""" - visibility: Optional[FriskyVisibility] - """The visibility of the secret""" + message_id: str + """The ID of the message""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], config: Optional[Dict[str, Any]], created_at: float, description: Optional[str], id: str, kind: Optional[IndigoKind], meta: Optional[Dict[str, Any]], name: Optional[str], type: Optional[Type20], updated_at: float, visibility: Optional[FriskyVisibility]) -> None: - self.alias = alias - self.blueprint_id = blueprint_id - self.config = config - self.created_at = created_at - self.description = description - self.id = id - self.kind = kind - self.meta = meta - self.name = name - self.type = type - self.updated_at = updated_at - self.visibility = visibility + def __init__(self, conversation_id: str, message_id: str) -> None: + self.conversation_id = conversation_id + self.message_id = message_id @staticmethod - def from_dict(obj: Any) -> 'SecretListResponseItem': + def from_dict(obj: Any) -> 'ConversationMessageUpdateParams': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) - created_at = from_float(obj.get("createdAt")) - description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) - kind = from_union([IndigoKind, from_none], obj.get("kind")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - type = from_union([Type20, from_none], obj.get("type")) - updated_at = from_float(obj.get("updatedAt")) - visibility = from_union([FriskyVisibility, from_none], obj.get("visibility")) - return SecretListResponseItem(alias, blueprint_id, config, created_at, description, id, kind, meta, name, type, updated_at, visibility) + conversation_id = from_str(obj.get("conversationId")) + message_id = from_str(obj.get("messageId")) + return ConversationMessageUpdateParams(conversation_id, message_id) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.config is not None: - result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) - result["createdAt"] = to_float(self.created_at) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) - if self.kind is not None: - result["kind"] = from_union([lambda x: to_enum(IndigoKind, x), from_none], self.kind) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.type is not None: - result["type"] = from_union([lambda x: to_enum(Type20, x), from_none], self.type) - result["updatedAt"] = to_float(self.updated_at) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(FriskyVisibility, x), from_none], self.visibility) + result["conversationId"] = from_str(self.conversation_id) + result["messageId"] = from_str(self.message_id) return result -class SecretListResponse: - cursor: str - """Cursor for fetching the next page""" +class AmbitiousReplacement: + begin: float + """Start offset""" - items: List[SecretListResponseItem] + end: float + """End offset""" - def __init__(self, cursor: str, items: List[SecretListResponseItem]) -> None: - self.cursor = cursor - self.items = items + text: str + """The text value of the replacement""" + + def __init__(self, begin: float, end: float, text: str) -> None: + self.begin = begin + self.end = end + self.text = text @staticmethod - def from_dict(obj: Any) -> 'SecretListResponse': + def from_dict(obj: Any) -> 'AmbitiousReplacement': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(SecretListResponseItem.from_dict, obj.get("items")) - return SecretListResponse(cursor, items) + begin = from_float(obj.get("begin")) + end = from_float(obj.get("end")) + text = from_str(obj.get("text")) + return AmbitiousReplacement(begin, end, text) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(SecretListResponseItem, x), self.items) + result["begin"] = to_float(self.begin) + result["end"] = to_float(self.end) + result["text"] = from_str(self.text) return result -class IndecentKind(Enum): - """The kind of the secret""" - - PERSONAL = "personal" - SHARED = "shared" +class ConversationMessageUpdateRequestEntity: + """Extracted entity from the message""" + begin: float + """Start offset""" -class Type21(Enum): - """The type of the secret""" + end: float + """End offset""" - BASIC = "basic" - BEARER = "bearer" - JWT = "jwt" - OAUTH = "oauth" - PLAIN = "plain" - REFERENCE = "reference" - TEMPLATE = "template" + replacement: Optional[AmbitiousReplacement] + text: str + """The text value of the entity""" + type: str + """The entity type""" -class MischievousVisibility(Enum): - """The visibility of the secret""" + def __init__(self, begin: float, end: float, replacement: Optional[AmbitiousReplacement], text: str, type: str) -> None: + self.begin = begin + self.end = end + self.replacement = replacement + self.text = text + self.type = type - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" + @staticmethod + def from_dict(obj: Any) -> 'ConversationMessageUpdateRequestEntity': + assert isinstance(obj, dict) + begin = from_float(obj.get("begin")) + end = from_float(obj.get("end")) + replacement = from_union([AmbitiousReplacement.from_dict, from_none], obj.get("replacement")) + text = from_str(obj.get("text")) + type = from_str(obj.get("type")) + return ConversationMessageUpdateRequestEntity(begin, end, replacement, text, type) + def to_dict(self) -> dict: + result: dict = {} + result["begin"] = to_float(self.begin) + result["end"] = to_float(self.end) + if self.replacement is not None: + result["replacement"] = from_union([lambda x: to_class(AmbitiousReplacement, x), from_none], self.replacement) + result["text"] = from_str(self.text) + result["type"] = from_str(self.type) + return result -class SecretListStreamItemData: - """Blueprint properties""" - alias: Optional[str] - """The unique alias for the instance""" +class ConversationMessageUpdateRequestType(Enum): + """The type of the message""" - blueprint_id: Optional[str] - """The ID of the blueprint""" + ACTIVITY = "activity" + BACKSTORY = "backstory" + BOT = "bot" + CHECKPOINT = "checkpoint" + CONTEXT = "context" + INSTRUCTION = "instruction" + REASONING = "reasoning" + USER = "user" - config: Optional[Dict[str, Any]] - """The config of the secret""" - created_at: float - """The timestamp (ms) when the instance was created""" +class ConversationMessageUpdateRequest: + """Instance crud properties""" description: Optional[str] """The associated description""" - id: str - """The instance ID""" - - kind: Optional[IndecentKind] - """The kind of the secret""" + entities: Optional[List[ConversationMessageUpdateRequestEntity]] + """Known entities""" meta: Optional[Dict[str, Any]] """Meta data information""" @@ -44753,140 +43531,104 @@ class SecretListStreamItemData: name: Optional[str] """The associated name""" - type: Optional[Type21] - """The type of the secret""" - - updated_at: float - """The timestamp (ms) when the instance was updated""" + text: Optional[str] + """The updated text of the message""" - visibility: Optional[MischievousVisibility] - """The visibility of the secret""" + type: Optional[ConversationMessageUpdateRequestType] + """The type of the message""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], config: Optional[Dict[str, Any]], created_at: float, description: Optional[str], id: str, kind: Optional[IndecentKind], meta: Optional[Dict[str, Any]], name: Optional[str], type: Optional[Type21], updated_at: float, visibility: Optional[MischievousVisibility]) -> None: - self.alias = alias - self.blueprint_id = blueprint_id - self.config = config - self.created_at = created_at + def __init__(self, description: Optional[str], entities: Optional[List[ConversationMessageUpdateRequestEntity]], meta: Optional[Dict[str, Any]], name: Optional[str], text: Optional[str], type: Optional[ConversationMessageUpdateRequestType]) -> None: self.description = description - self.id = id - self.kind = kind + self.entities = entities self.meta = meta self.name = name + self.text = text self.type = type - self.updated_at = updated_at - self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'SecretListStreamItemData': + def from_dict(obj: Any) -> 'ConversationMessageUpdateRequest': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - config = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("config")) - created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) - kind = from_union([IndecentKind, from_none], obj.get("kind")) + entities = from_union([lambda x: from_list(ConversationMessageUpdateRequestEntity.from_dict, x), from_none], obj.get("entities")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - type = from_union([Type21, from_none], obj.get("type")) - updated_at = from_float(obj.get("updatedAt")) - visibility = from_union([MischievousVisibility, from_none], obj.get("visibility")) - return SecretListStreamItemData(alias, blueprint_id, config, created_at, description, id, kind, meta, name, type, updated_at, visibility) + text = from_union([from_str, from_none], obj.get("text")) + type = from_union([ConversationMessageUpdateRequestType, from_none], obj.get("type")) + return ConversationMessageUpdateRequest(description, entities, meta, name, text, type) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.config is not None: - result["config"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.config) - result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) - if self.kind is not None: - result["kind"] = from_union([lambda x: to_enum(IndecentKind, x), from_none], self.kind) + if self.entities is not None: + result["entities"] = from_union([lambda x: from_list(lambda x: to_class(ConversationMessageUpdateRequestEntity, x), x), from_none], self.entities) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.text is not None: + result["text"] = from_union([from_str, from_none], self.text) if self.type is not None: - result["type"] = from_union([lambda x: to_enum(Type21, x), from_none], self.type) - result["updatedAt"] = to_float(self.updated_at) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(MischievousVisibility, x), from_none], self.visibility) + result["type"] = from_union([lambda x: to_enum(ConversationMessageUpdateRequestType, x), from_none], self.type) return result -class SecretListStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - - -class SecretListStreamItem: - data: SecretListStreamItemData - """Blueprint properties""" - - type: SecretListStreamItemType - """The type of event""" +class ConversationMessageUpdateResponse: + id: str + """The ID of the updated message""" - def __init__(self, data: SecretListStreamItemData, type: SecretListStreamItemType) -> None: - self.data = data - self.type = type + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'SecretListStreamItem': + def from_dict(obj: Any) -> 'ConversationMessageUpdateResponse': assert isinstance(obj, dict) - data = SecretListStreamItemData.from_dict(obj.get("data")) - type = SecretListStreamItemType(obj.get("type")) - return SecretListStreamItem(data, type) + id = from_str(obj.get("id")) + return ConversationMessageUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(SecretListStreamItemData, self.data) - result["type"] = to_enum(SecretListStreamItemType, self.type) + result["id"] = from_str(self.id) return result -class SkillsetAbilityDeleteParams: - ability_id: str - """The ID of the ability to delete""" +class ConversationMessageSynthesizeParams: + conversation_id: str + """The ID of the conversation""" - skillset_id: str - """The ID of the skillset""" + message_id: str + """The ID of the message""" - def __init__(self, ability_id: str, skillset_id: str) -> None: - self.ability_id = ability_id - self.skillset_id = skillset_id + def __init__(self, conversation_id: str, message_id: str) -> None: + self.conversation_id = conversation_id + self.message_id = message_id @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilityDeleteParams': + def from_dict(obj: Any) -> 'ConversationMessageSynthesizeParams': assert isinstance(obj, dict) - ability_id = from_str(obj.get("abilityId")) - skillset_id = from_str(obj.get("skillsetId")) - return SkillsetAbilityDeleteParams(ability_id, skillset_id) + conversation_id = from_str(obj.get("conversationId")) + message_id = from_str(obj.get("messageId")) + return ConversationMessageSynthesizeParams(conversation_id, message_id) def to_dict(self) -> dict: result: dict = {} - result["abilityId"] = from_str(self.ability_id) - result["skillsetId"] = from_str(self.skillset_id) + result["conversationId"] = from_str(self.conversation_id) + result["messageId"] = from_str(self.message_id) return result -class SkillsetAbilityDeleteResponse: +class ConversationMessageSynthesizeResponse: id: str - """The ID of the deleted ability""" + """The ID of the synthesized message""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilityDeleteResponse': + def from_dict(obj: Any) -> 'ConversationMessageSynthesizeResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return SkillsetAbilityDeleteResponse(id) + return ConversationMessageSynthesizeResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -44894,64 +43636,32 @@ def to_dict(self) -> dict: return result -class SkillsetAbilityExecuteParams: - ability_id: str - """The ID of the ability to execute""" - - skillset_id: str - """The ID of the skillset containing the ability""" - - def __init__(self, ability_id: str, skillset_id: str) -> None: - self.ability_id = ability_id - self.skillset_id = skillset_id - - @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilityExecuteParams': - assert isinstance(obj, dict) - ability_id = from_str(obj.get("abilityId")) - skillset_id = from_str(obj.get("skillsetId")) - return SkillsetAbilityExecuteParams(ability_id, skillset_id) - - def to_dict(self) -> dict: - result: dict = {} - result["abilityId"] = from_str(self.ability_id) - result["skillsetId"] = from_str(self.skillset_id) - return result - - -class SkillsetAbilityExecuteRequest: - contact_id: Optional[str] - """The ID of the contact to associate with the execution""" +class ConversationMessageFetchParams: + conversation_id: str + """The ID of the conversation containing the message""" - input: Optional[str] - """The input to process with the ability. This can be structured - text such as JSON or YAML for precise parameter control, or - unstructured natural language text. When unstructured text is - provided, the system will automatically detect and extract the - relevant parameters from the input. - """ + message_id: str + """The ID of the message to retrieve""" - def __init__(self, contact_id: Optional[str], input: Optional[str]) -> None: - self.contact_id = contact_id - self.input = input + def __init__(self, conversation_id: str, message_id: str) -> None: + self.conversation_id = conversation_id + self.message_id = message_id @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilityExecuteRequest': + def from_dict(obj: Any) -> 'ConversationMessageFetchParams': assert isinstance(obj, dict) - contact_id = from_union([from_str, from_none], obj.get("contactId")) - input = from_union([from_str, from_none], obj.get("input")) - return SkillsetAbilityExecuteRequest(contact_id, input) + conversation_id = from_str(obj.get("conversationId")) + message_id = from_str(obj.get("messageId")) + return ConversationMessageFetchParams(conversation_id, message_id) def to_dict(self) -> dict: result: dict = {} - if self.contact_id is not None: - result["contactId"] = from_union([from_str, from_none], self.contact_id) - if self.input is not None: - result["input"] = from_union([from_str, from_none], self.input) + result["conversationId"] = from_str(self.conversation_id) + result["messageId"] = from_str(self.message_id) return result -class Type22(Enum): +class ConversationMessageFetchResponseType(Enum): """The type of the message""" ACTIVITY = "activity" @@ -44964,1423 +43674,1204 @@ class Type22(Enum): USER = "user" -class SkillsetAbilityExecuteResponseMessage: - """A message in the conversation""" +class ConversationMessageFetchResponse: + """Instance list properties""" + + created_at: float + """The timestamp (ms) when the instance was created""" + + description: Optional[str] + """The associated description""" + + id: str + """The instance ID""" meta: Optional[Dict[str, Any]] """Meta data information""" + name: Optional[str] + """The associated name""" + text: str - """The text of the message""" + """The text of the fetched message""" - type: Type22 + type: ConversationMessageFetchResponseType """The type of the message""" - def __init__(self, meta: Optional[Dict[str, Any]], text: str, type: Type22) -> None: + updated_at: float + """The timestamp (ms) when the instance was updated""" + + def __init__(self, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], text: str, type: ConversationMessageFetchResponseType, updated_at: float) -> None: + self.created_at = created_at + self.description = description + self.id = id self.meta = meta + self.name = name self.text = text self.type = type + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilityExecuteResponseMessage': + def from_dict(obj: Any) -> 'ConversationMessageFetchResponse': assert isinstance(obj, dict) + created_at = from_float(obj.get("createdAt")) + description = from_union([from_str, from_none], obj.get("description")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) + name = from_union([from_str, from_none], obj.get("name")) text = from_str(obj.get("text")) - type = Type22(obj.get("type")) - return SkillsetAbilityExecuteResponseMessage(meta, text, type) + type = ConversationMessageFetchResponseType(obj.get("type")) + updated_at = from_float(obj.get("updatedAt")) + return ConversationMessageFetchResponse(created_at, description, id, meta, name, text, type, updated_at) def to_dict(self) -> dict: result: dict = {} + result["createdAt"] = to_float(self.created_at) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) result["text"] = from_str(self.text) - result["type"] = to_enum(Type22, self.type) + result["type"] = to_enum(ConversationMessageFetchResponseType, self.type) + result["updatedAt"] = to_float(self.updated_at) return result -class SkillsetAbilityExecuteResponseUsage: - """Usage information""" +class ConversationMessageDownvoteParams: + conversation_id: str + """The ID of the conversation""" - token: float - """The tokens used in this exchange""" + message_id: str + """The ID of the message""" - def __init__(self, token: float) -> None: - self.token = token + def __init__(self, conversation_id: str, message_id: str) -> None: + self.conversation_id = conversation_id + self.message_id = message_id + + @staticmethod + def from_dict(obj: Any) -> 'ConversationMessageDownvoteParams': + assert isinstance(obj, dict) + conversation_id = from_str(obj.get("conversationId")) + message_id = from_str(obj.get("messageId")) + return ConversationMessageDownvoteParams(conversation_id, message_id) + + def to_dict(self) -> dict: + result: dict = {} + result["conversationId"] = from_str(self.conversation_id) + result["messageId"] = from_str(self.message_id) + return result + + +class ConversationMessageDownvoteRequest: + reason: Optional[str] + """The reason for the downvote""" + + value: Optional[int] + """The value of the downvote""" + + def __init__(self, reason: Optional[str], value: Optional[int]) -> None: + self.reason = reason + self.value = value @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilityExecuteResponseUsage': + def from_dict(obj: Any) -> 'ConversationMessageDownvoteRequest': assert isinstance(obj, dict) - token = from_float(obj.get("token")) - return SkillsetAbilityExecuteResponseUsage(token) + reason = from_union([from_str, from_none], obj.get("reason")) + value = from_union([from_int, from_none], obj.get("value")) + return ConversationMessageDownvoteRequest(reason, value) def to_dict(self) -> dict: result: dict = {} - result["token"] = to_float(self.token) + if self.reason is not None: + result["reason"] = from_union([from_str, from_none], self.reason) + if self.value is not None: + result["value"] = from_union([from_int, from_none], self.value) return result -class SkillsetAbilityExecuteResponse: - error: Optional[str] - """Error message if execution failed""" - - messages: Optional[List[SkillsetAbilityExecuteResponseMessage]] - """Messages generated during execution""" - - result: Any - """The result of the ability execution""" - - usage: SkillsetAbilityExecuteResponseUsage - """Usage information""" +class ConversationMessageDownvoteResponse: + id: str + """The ID of the downvoted message""" - def __init__(self, error: Optional[str], messages: Optional[List[SkillsetAbilityExecuteResponseMessage]], result: Any, usage: SkillsetAbilityExecuteResponseUsage) -> None: - self.error = error - self.messages = messages - self.result = result - self.usage = usage + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilityExecuteResponse': + def from_dict(obj: Any) -> 'ConversationMessageDownvoteResponse': assert isinstance(obj, dict) - error = from_union([from_str, from_none], obj.get("error")) - messages = from_union([lambda x: from_list(SkillsetAbilityExecuteResponseMessage.from_dict, x), from_none], obj.get("messages")) - result = obj.get("result") - usage = SkillsetAbilityExecuteResponseUsage.from_dict(obj.get("usage")) - return SkillsetAbilityExecuteResponse(error, messages, result, usage) + id = from_str(obj.get("id")) + return ConversationMessageDownvoteResponse(id) def to_dict(self) -> dict: result: dict = {} - if self.error is not None: - result["error"] = from_union([from_str, from_none], self.error) - if self.messages is not None: - result["messages"] = from_union([lambda x: from_list(lambda x: to_class(SkillsetAbilityExecuteResponseMessage, x), x), from_none], self.messages) - if self.result is not None: - result["result"] = self.result - result["usage"] = to_class(SkillsetAbilityExecuteResponseUsage, self.usage) + result["id"] = from_str(self.id) return result -class Type23(Enum): - """The type of the message""" +class ConversationMessageDeleteParams: + conversation_id: str + """The ID of the conversation containing the message""" - ACTIVITY = "activity" - BACKSTORY = "backstory" - BOT = "bot" - CHECKPOINT = "checkpoint" - CONTEXT = "context" - INSTRUCTION = "instruction" - REASONING = "reasoning" - USER = "user" + message_id: str + """The ID of the message to delete""" + def __init__(self, conversation_id: str, message_id: str) -> None: + self.conversation_id = conversation_id + self.message_id = message_id -class DataMessage: - """A message in the conversation""" + @staticmethod + def from_dict(obj: Any) -> 'ConversationMessageDeleteParams': + assert isinstance(obj, dict) + conversation_id = from_str(obj.get("conversationId")) + message_id = from_str(obj.get("messageId")) + return ConversationMessageDeleteParams(conversation_id, message_id) - meta: Optional[Dict[str, Any]] - """Meta data information""" + def to_dict(self) -> dict: + result: dict = {} + result["conversationId"] = from_str(self.conversation_id) + result["messageId"] = from_str(self.message_id) + return result - text: str - """The text of the message""" - type: Type23 - """The type of the message""" +class ConversationMessageDeleteResponse: + id: str + """The ID of the deleted message""" - def __init__(self, meta: Optional[Dict[str, Any]], text: str, type: Type23) -> None: - self.meta = meta - self.text = text - self.type = type + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'DataMessage': + def from_dict(obj: Any) -> 'ConversationMessageDeleteResponse': assert isinstance(obj, dict) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - text = from_str(obj.get("text")) - type = Type23(obj.get("type")) - return DataMessage(meta, text, type) + id = from_str(obj.get("id")) + return ConversationMessageDeleteResponse(id) def to_dict(self) -> dict: result: dict = {} - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["text"] = from_str(self.text) - result["type"] = to_enum(Type23, self.type) + result["id"] = from_str(self.id) return result -class Type24(Enum): - """The type of the message""" - - ACTIVITY = "activity" - BACKSTORY = "backstory" - BOT = "bot" - CHECKPOINT = "checkpoint" - CONTEXT = "context" - INSTRUCTION = "instruction" - REASONING = "reasoning" - USER = "user" - - -class IndigoUsage: - """Usage information""" - - token: float - """The tokens used in this exchange""" +class ConversationContactUpsertParams: + conversation_id: str + """The ID of the conversation""" - def __init__(self, token: float) -> None: - self.token = token + def __init__(self, conversation_id: str) -> None: + self.conversation_id = conversation_id @staticmethod - def from_dict(obj: Any) -> 'IndigoUsage': + def from_dict(obj: Any) -> 'ConversationContactUpsertParams': assert isinstance(obj, dict) - token = from_float(obj.get("token")) - return IndigoUsage(token) + conversation_id = from_str(obj.get("conversationId")) + return ConversationContactUpsertParams(conversation_id) def to_dict(self) -> dict: result: dict = {} - result["token"] = to_float(self.token) + result["conversationId"] = from_str(self.conversation_id) return result -class SkillsetAbilityExecuteStreamItemData: - """The data for the event - - A message in the conversation - - Information about an abort event in a streamed response - """ - error: Optional[str] - """Error message if execution failed""" - - messages: Optional[List[DataMessage]] - """Messages generated during execution""" - - result: Any - """The result of the ability execution""" +class ConversationContactUpsertRequest: + """Instance crud properties""" - usage: Optional[IndigoUsage] - """Usage information""" + description: Optional[str] + """The associated description""" - message: Optional[str] - """The error message""" + email: Optional[str] + """The email address of the contact""" - token: Optional[str] - """The token generated""" + fingerprint: Optional[str] + """The fingerprint of the contact""" meta: Optional[Dict[str, Any]] """Meta data information""" - text: Optional[str] - """The text of the message""" - - type: Optional[Type24] - """The type of the message""" - - function_name: Optional[str] - """The function or tool associated with the abort""" - - reason: Any - """The abort reason if available""" - - input_tokens_used: Optional[float] - """The number of input tokens used""" + name: Optional[str] + """The associated name""" - model: Optional[str] - """The model used""" + nick: Optional[str] + """The nickname of the contact""" - output_tokens_used: Optional[float] - """The number of output tokens used""" + phone: Optional[str] + """The phone number of the contact""" - def __init__(self, error: Optional[str], messages: Optional[List[DataMessage]], result: Any, usage: Optional[IndigoUsage], message: Optional[str], token: Optional[str], meta: Optional[Dict[str, Any]], text: Optional[str], type: Optional[Type24], function_name: Optional[str], reason: Any, input_tokens_used: Optional[float], model: Optional[str], output_tokens_used: Optional[float]) -> None: - self.error = error - self.messages = messages - self.result = result - self.usage = usage - self.message = message - self.token = token + def __init__(self, description: Optional[str], email: Optional[str], fingerprint: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], nick: Optional[str], phone: Optional[str]) -> None: + self.description = description + self.email = email + self.fingerprint = fingerprint self.meta = meta - self.text = text - self.type = type - self.function_name = function_name - self.reason = reason - self.input_tokens_used = input_tokens_used - self.model = model - self.output_tokens_used = output_tokens_used + self.name = name + self.nick = nick + self.phone = phone @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilityExecuteStreamItemData': + def from_dict(obj: Any) -> 'ConversationContactUpsertRequest': assert isinstance(obj, dict) - error = from_union([from_str, from_none], obj.get("error")) - messages = from_union([lambda x: from_list(DataMessage.from_dict, x), from_none], obj.get("messages")) - result = obj.get("result") - usage = from_union([IndigoUsage.from_dict, from_none], obj.get("usage")) - message = from_union([from_str, from_none], obj.get("message")) - token = from_union([from_str, from_none], obj.get("token")) + description = from_union([from_str, from_none], obj.get("description")) + email = from_union([from_str, from_none], obj.get("email")) + fingerprint = from_union([from_str, from_none], obj.get("fingerprint")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - text = from_union([from_str, from_none], obj.get("text")) - type = from_union([Type24, from_none], obj.get("type")) - function_name = from_union([from_str, from_none], obj.get("functionName")) - reason = obj.get("reason") - input_tokens_used = from_union([from_float, from_none], obj.get("inputTokensUsed")) - model = from_union([from_str, from_none], obj.get("model")) - output_tokens_used = from_union([from_float, from_none], obj.get("outputTokensUsed")) - return SkillsetAbilityExecuteStreamItemData(error, messages, result, usage, message, token, meta, text, type, function_name, reason, input_tokens_used, model, output_tokens_used) + name = from_union([from_str, from_none], obj.get("name")) + nick = from_union([from_str, from_none], obj.get("nick")) + phone = from_union([from_str, from_none], obj.get("phone")) + return ConversationContactUpsertRequest(description, email, fingerprint, meta, name, nick, phone) def to_dict(self) -> dict: result: dict = {} - if self.error is not None: - result["error"] = from_union([from_str, from_none], self.error) - if self.messages is not None: - result["messages"] = from_union([lambda x: from_list(lambda x: to_class(DataMessage, x), x), from_none], self.messages) - if self.result is not None: - result["result"] = self.result - if self.usage is not None: - result["usage"] = from_union([lambda x: to_class(IndigoUsage, x), from_none], self.usage) - if self.message is not None: - result["message"] = from_union([from_str, from_none], self.message) - if self.token is not None: - result["token"] = from_union([from_str, from_none], self.token) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.email is not None: + result["email"] = from_union([from_str, from_none], self.email) + if self.fingerprint is not None: + result["fingerprint"] = from_union([from_str, from_none], self.fingerprint) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.text is not None: - result["text"] = from_union([from_str, from_none], self.text) - if self.type is not None: - result["type"] = from_union([lambda x: to_enum(Type24, x), from_none], self.type) - if self.function_name is not None: - result["functionName"] = from_union([from_str, from_none], self.function_name) - if self.reason is not None: - result["reason"] = self.reason - if self.input_tokens_used is not None: - result["inputTokensUsed"] = from_union([to_float, from_none], self.input_tokens_used) - if self.model is not None: - result["model"] = from_union([from_str, from_none], self.model) - if self.output_tokens_used is not None: - result["outputTokensUsed"] = from_union([to_float, from_none], self.output_tokens_used) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.nick is not None: + result["nick"] = from_union([from_str, from_none], self.nick) + if self.phone is not None: + result["phone"] = from_union([from_str, from_none], self.phone) return result -class SkillsetAbilityExecuteStreamItemType(Enum): - """The type of event""" - - ABORT = "abort" - COMPLETE_BEGIN = "completeBegin" - COMPLETE_END = "completeEnd" - ERROR = "error" - MESSAGE = "message" - REASONING_TOKEN = "reasoningToken" - RESULT = "result" - TOKEN = "token" - USAGE = "usage" - WAIT_FOR_CHANNEL_MESSAGE_BEGIN = "waitForChannelMessageBegin" - WAIT_FOR_CHANNEL_MESSAGE_END = "waitForChannelMessageEnd" - - -class SkillsetAbilityExecuteStreamItem: - data: SkillsetAbilityExecuteStreamItemData - """The data for the event - - A message in the conversation - - Information about an abort event in a streamed response - """ - type: SkillsetAbilityExecuteStreamItemType - """The type of event""" +class ConversationContactUpsertResponse: + id: str + """The ID of the created contact""" - def __init__(self, data: SkillsetAbilityExecuteStreamItemData, type: SkillsetAbilityExecuteStreamItemType) -> None: - self.data = data - self.type = type + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilityExecuteStreamItem': + def from_dict(obj: Any) -> 'ConversationContactUpsertResponse': assert isinstance(obj, dict) - data = SkillsetAbilityExecuteStreamItemData.from_dict(obj.get("data")) - type = SkillsetAbilityExecuteStreamItemType(obj.get("type")) - return SkillsetAbilityExecuteStreamItem(data, type) + id = from_str(obj.get("id")) + return ConversationContactUpsertResponse(id) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(SkillsetAbilityExecuteStreamItemData, self.data) - result["type"] = to_enum(SkillsetAbilityExecuteStreamItemType, self.type) + result["id"] = from_str(self.id) return result -class SkillsetAbilityFetchParams: - ability_id: str - """The ID of the ability to retrieve""" - - skillset_id: str - """The ID of the skillset""" +class ConversationChannelSubscribeRequest: + history_length: Optional[int] + """Number of recent monitor events to replay before following + live, so a console opening mid-conversation can catch up. + """ - def __init__(self, ability_id: str, skillset_id: str) -> None: - self.ability_id = ability_id - self.skillset_id = skillset_id + def __init__(self, history_length: Optional[int]) -> None: + self.history_length = history_length @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilityFetchParams': + def from_dict(obj: Any) -> 'ConversationChannelSubscribeRequest': assert isinstance(obj, dict) - ability_id = from_str(obj.get("abilityId")) - skillset_id = from_str(obj.get("skillsetId")) - return SkillsetAbilityFetchParams(ability_id, skillset_id) + history_length = from_union([from_int, from_none], obj.get("historyLength")) + return ConversationChannelSubscribeRequest(history_length) def to_dict(self) -> dict: result: dict = {} - result["abilityId"] = from_str(self.ability_id) - result["skillsetId"] = from_str(self.skillset_id) + if self.history_length is not None: + result["historyLength"] = from_union([from_int, from_none], self.history_length) return result -class SkillsetAbilityFetchResponseState(Enum): - """The lifecycle state of a resource — toggle it on/off without deleting it""" - - DISABLED = "disabled" - ENABLED = "enabled" - - -class SkillsetAbilityFetchResponse: - """Blueprint properties""" - - blueprint_id: Optional[str] - """The ID of the blueprint""" - - bot_id: Optional[str] - """The ID of the bot associated with the ability""" - - created_at: float - """The timestamp (ms) when the instance was created""" - - description: str - """The associated description""" - - file_id: Optional[str] - """The ID of the file associated with the ability""" - - id: str - """The instance ID""" - - instruction: str - """The instruction of the skillset ability""" - - meta: Optional[Dict[str, Any]] - """Meta data information""" - - name: str - """The associated name""" +class ConversationChannelSubscribeStreamItemType(Enum): + """The type of event""" - secret_id: Optional[str] - """The ID of the secret associated with the ability""" + MESSAGE = "message" - space_id: Optional[str] - """The ID of the space associated with the ability""" - state: Optional[SkillsetAbilityFetchResponseState] - """The lifecycle state of a resource — toggle it on/off without deleting it""" +class ConversationChannelSubscribeStreamItem: + data: Dict[str, Any] + """The monitor event published to the channel""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + type: ConversationChannelSubscribeStreamItemType + """The type of event""" - def __init__(self, blueprint_id: Optional[str], bot_id: Optional[str], created_at: float, description: str, file_id: Optional[str], id: str, instruction: str, meta: Optional[Dict[str, Any]], name: str, secret_id: Optional[str], space_id: Optional[str], state: Optional[SkillsetAbilityFetchResponseState], updated_at: float) -> None: - self.blueprint_id = blueprint_id - self.bot_id = bot_id - self.created_at = created_at - self.description = description - self.file_id = file_id - self.id = id - self.instruction = instruction - self.meta = meta - self.name = name - self.secret_id = secret_id - self.space_id = space_id - self.state = state - self.updated_at = updated_at + def __init__(self, data: Dict[str, Any], type: ConversationChannelSubscribeStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilityFetchResponse': + def from_dict(obj: Any) -> 'ConversationChannelSubscribeStreamItem': assert isinstance(obj, dict) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - created_at = from_float(obj.get("createdAt")) - description = from_str(obj.get("description")) - file_id = from_union([from_str, from_none], obj.get("fileId")) - id = from_str(obj.get("id")) - instruction = from_str(obj.get("instruction")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - secret_id = from_union([from_str, from_none], obj.get("secretId")) - space_id = from_union([from_str, from_none], obj.get("spaceId")) - state = from_union([SkillsetAbilityFetchResponseState, from_none], obj.get("state")) - updated_at = from_float(obj.get("updatedAt")) - return SkillsetAbilityFetchResponse(blueprint_id, bot_id, created_at, description, file_id, id, instruction, meta, name, secret_id, space_id, state, updated_at) + data = from_dict(lambda x: x, obj.get("data")) + type = ConversationChannelSubscribeStreamItemType(obj.get("type")) + return ConversationChannelSubscribeStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - result["createdAt"] = to_float(self.created_at) - result["description"] = from_str(self.description) - if self.file_id is not None: - result["fileId"] = from_union([from_str, from_none], self.file_id) - result["id"] = from_str(self.id) - result["instruction"] = from_str(self.instruction) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - if self.secret_id is not None: - result["secretId"] = from_union([from_str, from_none], self.secret_id) - if self.space_id is not None: - result["spaceId"] = from_union([from_str, from_none], self.space_id) - if self.state is not None: - result["state"] = from_union([lambda x: to_enum(SkillsetAbilityFetchResponseState, x), from_none], self.state) - result["updatedAt"] = to_float(self.updated_at) + result["data"] = from_dict(lambda x: x, self.data) + result["type"] = to_enum(ConversationChannelSubscribeStreamItemType, self.type) return result -class SkillsetAbilityUpdateParams: - ability_id: str - skillset_id: str +class ConversationAttachmentUploadParams: + conversation_id: str - def __init__(self, ability_id: str, skillset_id: str) -> None: - self.ability_id = ability_id - self.skillset_id = skillset_id + def __init__(self, conversation_id: str) -> None: + self.conversation_id = conversation_id @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilityUpdateParams': + def from_dict(obj: Any) -> 'ConversationAttachmentUploadParams': assert isinstance(obj, dict) - ability_id = from_str(obj.get("abilityId")) - skillset_id = from_str(obj.get("skillsetId")) - return SkillsetAbilityUpdateParams(ability_id, skillset_id) + conversation_id = from_str(obj.get("conversationId")) + return ConversationAttachmentUploadParams(conversation_id) def to_dict(self) -> dict: result: dict = {} - result["abilityId"] = from_str(self.ability_id) - result["skillsetId"] = from_str(self.skillset_id) + result["conversationId"] = from_str(self.conversation_id) return result -class SkillsetAbilityUpdateRequestState(Enum): - """The lifecycle state of a resource — toggle it on/off without deleting it""" +class TentacledFile: + """The file definition to upload""" - DISABLED = "disabled" - ENABLED = "enabled" + name: Optional[str] + """The file name""" + size: float + """The file size""" -class SkillsetAbilityUpdateRequest: - """Blueprint properties""" + type: str + """The file type""" - blueprint_id: Optional[str] - """The ID of the blueprint""" + def __init__(self, name: Optional[str], size: float, type: str) -> None: + self.name = name + self.size = size + self.type = type - bot_id: Optional[str] - """The ID of the bot associated with the ability""" + @staticmethod + def from_dict(obj: Any) -> 'TentacledFile': + assert isinstance(obj, dict) + name = from_union([from_str, from_none], obj.get("name")) + size = from_float(obj.get("size")) + type = from_str(obj.get("type")) + return TentacledFile(name, size, type) + + def to_dict(self) -> dict: + result: dict = {} + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + result["size"] = to_float(self.size) + result["type"] = from_str(self.type) + return result + + +class ConversationAttachmentUploadRequest: + file: Union[str, TentacledFile] + """The file to upload either as http: or data: URL + + The file definition to upload + """ - description: Optional[str] - """The associated description""" + def __init__(self, file: Union[str, TentacledFile]) -> None: + self.file = file - file_id: Optional[str] - """The ID of the file associated with the ability""" + @staticmethod + def from_dict(obj: Any) -> 'ConversationAttachmentUploadRequest': + assert isinstance(obj, dict) + file = from_union([from_str, TentacledFile.from_dict], obj.get("file")) + return ConversationAttachmentUploadRequest(file) - instruction: Optional[str] - """The text to update the ability with""" + def to_dict(self) -> dict: + result: dict = {} + result["file"] = from_union([from_str, lambda x: to_class(TentacledFile, x)], self.file) + return result - meta: Optional[Dict[str, Any]] - """Meta data information""" - name: Optional[str] - """The associated name""" +class ConversationAttachmentUploadResponseUploadRequest: + """The request required to upload the file""" - secret_id: Optional[str] - """The ID of the secret associated with the ability""" + headers: Dict[str, Any] + """The HTTP headers to use""" - space_id: Optional[str] - """The ID of the space associated with the ability""" + method: str + """The HTTP method to use""" - state: Optional[SkillsetAbilityUpdateRequestState] - """The lifecycle state of a resource — toggle it on/off without deleting it""" + url: str + """The HTTP url to use""" - def __init__(self, blueprint_id: Optional[str], bot_id: Optional[str], description: Optional[str], file_id: Optional[str], instruction: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], secret_id: Optional[str], space_id: Optional[str], state: Optional[SkillsetAbilityUpdateRequestState]) -> None: - self.blueprint_id = blueprint_id - self.bot_id = bot_id - self.description = description - self.file_id = file_id - self.instruction = instruction - self.meta = meta - self.name = name - self.secret_id = secret_id - self.space_id = space_id - self.state = state + def __init__(self, headers: Dict[str, Any], method: str, url: str) -> None: + self.headers = headers + self.method = method + self.url = url @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilityUpdateRequest': + def from_dict(obj: Any) -> 'ConversationAttachmentUploadResponseUploadRequest': assert isinstance(obj, dict) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) - description = from_union([from_str, from_none], obj.get("description")) - file_id = from_union([from_str, from_none], obj.get("fileId")) - instruction = from_union([from_str, from_none], obj.get("instruction")) - meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_union([from_str, from_none], obj.get("name")) - secret_id = from_union([from_str, from_none], obj.get("secretId")) - space_id = from_union([from_str, from_none], obj.get("spaceId")) - state = from_union([SkillsetAbilityUpdateRequestState, from_none], obj.get("state")) - return SkillsetAbilityUpdateRequest(blueprint_id, bot_id, description, file_id, instruction, meta, name, secret_id, space_id, state) + headers = from_dict(lambda x: x, obj.get("headers")) + method = from_str(obj.get("method")) + url = from_str(obj.get("url")) + return ConversationAttachmentUploadResponseUploadRequest(headers, method, url) def to_dict(self) -> dict: result: dict = {} - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) - if self.description is not None: - result["description"] = from_union([from_str, from_none], self.description) - if self.file_id is not None: - result["fileId"] = from_union([from_str, from_none], self.file_id) - if self.instruction is not None: - result["instruction"] = from_union([from_str, from_none], self.instruction) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - if self.name is not None: - result["name"] = from_union([from_str, from_none], self.name) - if self.secret_id is not None: - result["secretId"] = from_union([from_str, from_none], self.secret_id) - if self.space_id is not None: - result["spaceId"] = from_union([from_str, from_none], self.space_id) - if self.state is not None: - result["state"] = from_union([lambda x: to_enum(SkillsetAbilityUpdateRequestState, x), from_none], self.state) + result["headers"] = from_dict(lambda x: x, self.headers) + result["method"] = from_str(self.method) + result["url"] = from_str(self.url) return result -class SkillsetAbilityUpdateResponse: +class ConversationAttachmentUploadResponse: id: str - """The ID of the updated ability""" + """The ID of the upload file""" - def __init__(self, id: str) -> None: + name: Optional[str] + """The name of the uploaded file""" + + upload_request: Optional[ConversationAttachmentUploadResponseUploadRequest] + """The request required to upload the file""" + + def __init__(self, id: str, name: Optional[str], upload_request: Optional[ConversationAttachmentUploadResponseUploadRequest]) -> None: self.id = id + self.name = name + self.upload_request = upload_request @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilityUpdateResponse': + def from_dict(obj: Any) -> 'ConversationAttachmentUploadResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return SkillsetAbilityUpdateResponse(id) + name = from_union([from_str, from_none], obj.get("name")) + upload_request = from_union([ConversationAttachmentUploadResponseUploadRequest.from_dict, from_none], obj.get("uploadRequest")) + return ConversationAttachmentUploadResponse(id, name, upload_request) def to_dict(self) -> dict: result: dict = {} result["id"] = from_str(self.id) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.upload_request is not None: + result["uploadRequest"] = from_union([lambda x: to_class(ConversationAttachmentUploadResponseUploadRequest, x), from_none], self.upload_request) return result -class SkillsetAbilityCreateParams: - skillset_id: str +class ConversationAttachmentListParams: + conversation_id: str + """The ID of the conversation to list attachments for""" - def __init__(self, skillset_id: str) -> None: - self.skillset_id = skillset_id + cursor: Optional[str] + """The cursor to use for pagination""" + + take: Optional[int] + """The number of items to retrieve""" + + def __init__(self, conversation_id: str, cursor: Optional[str], take: Optional[int]) -> None: + self.conversation_id = conversation_id + self.cursor = cursor + self.take = take @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilityCreateParams': + def from_dict(obj: Any) -> 'ConversationAttachmentListParams': assert isinstance(obj, dict) - skillset_id = from_str(obj.get("skillsetId")) - return SkillsetAbilityCreateParams(skillset_id) + conversation_id = from_str(obj.get("conversationId")) + cursor = from_union([from_str, from_none], obj.get("cursor")) + take = from_union([from_int, from_none], obj.get("take")) + return ConversationAttachmentListParams(conversation_id, cursor, take) def to_dict(self) -> dict: result: dict = {} - result["skillsetId"] = from_str(self.skillset_id) + result["conversationId"] = from_str(self.conversation_id) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class SkillsetAbilityCreateRequestState(Enum): - """The lifecycle state of a resource — toggle it on/off without deleting it""" - - DISABLED = "disabled" - ENABLED = "enabled" - - -class SkillsetAbilityCreateRequest: - """Blueprint properties""" - - blueprint_id: Optional[str] - """The ID of the blueprint""" +class ConversationAttachmentListResponseItem: + """Instance list properties""" - bot_id: Optional[str] - """The ID of the bot associated with the ability""" + created_at: float + """The timestamp (ms) when the instance was created""" description: Optional[str] """The associated description""" - file_id: Optional[str] - """The ID of the file associated with the ability""" - - instruction: Optional[str] - """The instruction of the ability""" + id: str + """The instance ID""" meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] - """The associated name""" + """The stored attachment file name""" - secret_id: Optional[str] - """The ID of the secret associated with the ability""" + size: Optional[float] + """The attachment size in bytes""" - space_id: Optional[str] - """The ID of the space associated with the ability""" + type: Optional[str] + """The inferred attachment MIME type""" - state: Optional[SkillsetAbilityCreateRequestState] - """The lifecycle state of a resource — toggle it on/off without deleting it""" + updated_at: float + """The timestamp (ms) when the instance was updated""" - def __init__(self, blueprint_id: Optional[str], bot_id: Optional[str], description: Optional[str], file_id: Optional[str], instruction: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], secret_id: Optional[str], space_id: Optional[str], state: Optional[SkillsetAbilityCreateRequestState]) -> None: - self.blueprint_id = blueprint_id - self.bot_id = bot_id + def __init__(self, created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], size: Optional[float], type: Optional[str], updated_at: float) -> None: + self.created_at = created_at self.description = description - self.file_id = file_id - self.instruction = instruction + self.id = id self.meta = meta self.name = name - self.secret_id = secret_id - self.space_id = space_id - self.state = state + self.size = size + self.type = type + self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilityCreateRequest': + def from_dict(obj: Any) -> 'ConversationAttachmentListResponseItem': assert isinstance(obj, dict) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) + created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - file_id = from_union([from_str, from_none], obj.get("fileId")) - instruction = from_union([from_str, from_none], obj.get("instruction")) + id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - secret_id = from_union([from_str, from_none], obj.get("secretId")) - space_id = from_union([from_str, from_none], obj.get("spaceId")) - state = from_union([SkillsetAbilityCreateRequestState, from_none], obj.get("state")) - return SkillsetAbilityCreateRequest(blueprint_id, bot_id, description, file_id, instruction, meta, name, secret_id, space_id, state) + size = from_union([from_float, from_none], obj.get("size")) + type = from_union([from_str, from_none], obj.get("type")) + updated_at = from_float(obj.get("updatedAt")) + return ConversationAttachmentListResponseItem(created_at, description, id, meta, name, size, type, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) + result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.file_id is not None: - result["fileId"] = from_union([from_str, from_none], self.file_id) - if self.instruction is not None: - result["instruction"] = from_union([from_str, from_none], self.instruction) + result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.secret_id is not None: - result["secretId"] = from_union([from_str, from_none], self.secret_id) - if self.space_id is not None: - result["spaceId"] = from_union([from_str, from_none], self.space_id) - if self.state is not None: - result["state"] = from_union([lambda x: to_enum(SkillsetAbilityCreateRequestState, x), from_none], self.state) + if self.size is not None: + result["size"] = from_union([to_float, from_none], self.size) + if self.type is not None: + result["type"] = from_union([from_str, from_none], self.type) + result["updatedAt"] = to_float(self.updated_at) return result -class SkillsetAbilityCreateResponse: - id: str - """The ID of the created ability""" +class ConversationAttachmentListResponse: + cursor: str + """Cursor for fetching the next page""" - def __init__(self, id: str) -> None: - self.id = id + items: List[ConversationAttachmentListResponseItem] + + def __init__(self, cursor: str, items: List[ConversationAttachmentListResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilityCreateResponse': + def from_dict(obj: Any) -> 'ConversationAttachmentListResponse': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return SkillsetAbilityCreateResponse(id) + cursor = from_str(obj.get("cursor")) + items = from_list(ConversationAttachmentListResponseItem.from_dict, obj.get("items")) + return ConversationAttachmentListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(ConversationAttachmentListResponseItem, x), self.items) return result -class SkillsetAbilitiesExportParamsOrder(Enum): +class ContactListParamsOrder(Enum): """The order of the paginated items""" ASC = "asc" DESC = "desc" -class SkillsetAbilitiesExportParams: +class ContactListParams: cursor: Optional[str] """The cursor to use for pagination""" - order: Optional[SkillsetAbilitiesExportParamsOrder] - """The order of the paginated items""" + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" - skillset_id: str - """The ID of the skillset to export""" + order: Optional[ContactListParamsOrder] + """The order of the paginated items""" take: Optional[int] """The number of items to retrieve""" - def __init__(self, cursor: Optional[str], order: Optional[SkillsetAbilitiesExportParamsOrder], skillset_id: str, take: Optional[int]) -> None: + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[ContactListParamsOrder], take: Optional[int]) -> None: self.cursor = cursor + self.meta = meta self.order = order - self.skillset_id = skillset_id self.take = take @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilitiesExportParams': + def from_dict(obj: Any) -> 'ContactListParams': assert isinstance(obj, dict) cursor = from_union([from_str, from_none], obj.get("cursor")) - order = from_union([SkillsetAbilitiesExportParamsOrder, from_none], obj.get("order")) - skillset_id = from_str(obj.get("skillsetId")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([ContactListParamsOrder, from_none], obj.get("order")) take = from_union([from_int, from_none], obj.get("take")) - return SkillsetAbilitiesExportParams(cursor, order, skillset_id, take) + return ContactListParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} if self.cursor is not None: result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(SkillsetAbilitiesExportParamsOrder, x), from_none], self.order) - result["skillsetId"] = from_str(self.skillset_id) + result["order"] = from_union([lambda x: to_enum(ContactListParamsOrder, x), from_none], self.order) if self.take is not None: result["take"] = from_union([from_int, from_none], self.take) return result -class SkillsetAbilitiesExportResponseItem: - """Blueprint properties""" - - blueprint_id: Optional[str] - """The ID of the blueprint""" - - bot_id: Optional[str] - """The ID of the bot associated with the ability""" +class ContactListResponseItem: + """Instance list properties""" created_at: float """The timestamp (ms) when the instance was created""" - description: str + description: Optional[str] """The associated description""" - file_id: Optional[str] - """The ID of the file associated with the ability""" + email: Optional[str] + """The email address of the contact""" + + fingerprint: str + """The fingerprint of the contact""" id: str """The instance ID""" - instruction: str meta: Optional[Dict[str, Any]] """Meta data information""" - name: str + name: Optional[str] """The associated name""" - secret_id: Optional[str] - """The ID of the secret associated with the ability""" + nick: Optional[str] + """The nickname of the contact""" - space_id: Optional[str] - """The ID of the space associated with the ability""" + phone: Optional[str] + """The phone number of the contact""" + + preferences: Optional[str] + """The preferences of the contact""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, blueprint_id: Optional[str], bot_id: Optional[str], created_at: float, description: str, file_id: Optional[str], id: str, instruction: str, meta: Optional[Dict[str, Any]], name: str, secret_id: Optional[str], space_id: Optional[str], updated_at: float) -> None: - self.blueprint_id = blueprint_id - self.bot_id = bot_id + verified_at: Optional[float] + """The timestamp (ms) when the contact was verified""" + + def __init__(self, created_at: float, description: Optional[str], email: Optional[str], fingerprint: str, id: str, meta: Optional[Dict[str, Any]], name: Optional[str], nick: Optional[str], phone: Optional[str], preferences: Optional[str], updated_at: float, verified_at: Optional[float]) -> None: self.created_at = created_at self.description = description - self.file_id = file_id + self.email = email + self.fingerprint = fingerprint self.id = id - self.instruction = instruction self.meta = meta self.name = name - self.secret_id = secret_id - self.space_id = space_id + self.nick = nick + self.phone = phone + self.preferences = preferences self.updated_at = updated_at + self.verified_at = verified_at @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilitiesExportResponseItem': + def from_dict(obj: Any) -> 'ContactListResponseItem': assert isinstance(obj, dict) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) created_at = from_float(obj.get("createdAt")) - description = from_str(obj.get("description")) - file_id = from_union([from_str, from_none], obj.get("fileId")) + description = from_union([from_str, from_none], obj.get("description")) + email = from_union([from_str, from_none], obj.get("email")) + fingerprint = from_str(obj.get("fingerprint")) id = from_str(obj.get("id")) - instruction = from_str(obj.get("instruction")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - secret_id = from_union([from_str, from_none], obj.get("secretId")) - space_id = from_union([from_str, from_none], obj.get("spaceId")) + name = from_union([from_str, from_none], obj.get("name")) + nick = from_union([from_str, from_none], obj.get("nick")) + phone = from_union([from_str, from_none], obj.get("phone")) + preferences = from_union([from_str, from_none], obj.get("preferences")) updated_at = from_float(obj.get("updatedAt")) - return SkillsetAbilitiesExportResponseItem(blueprint_id, bot_id, created_at, description, file_id, id, instruction, meta, name, secret_id, space_id, updated_at) + verified_at = from_union([from_float, from_none], obj.get("verifiedAt")) + return ContactListResponseItem(created_at, description, email, fingerprint, id, meta, name, nick, phone, preferences, updated_at, verified_at) def to_dict(self) -> dict: result: dict = {} - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) result["createdAt"] = to_float(self.created_at) - result["description"] = from_str(self.description) - if self.file_id is not None: - result["fileId"] = from_union([from_str, from_none], self.file_id) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.email is not None: + result["email"] = from_union([from_str, from_none], self.email) + result["fingerprint"] = from_str(self.fingerprint) result["id"] = from_str(self.id) - result["instruction"] = from_str(self.instruction) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - if self.secret_id is not None: - result["secretId"] = from_union([from_str, from_none], self.secret_id) - if self.space_id is not None: - result["spaceId"] = from_union([from_str, from_none], self.space_id) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.nick is not None: + result["nick"] = from_union([from_str, from_none], self.nick) + if self.phone is not None: + result["phone"] = from_union([from_str, from_none], self.phone) + if self.preferences is not None: + result["preferences"] = from_union([from_str, from_none], self.preferences) result["updatedAt"] = to_float(self.updated_at) + if self.verified_at is not None: + result["verifiedAt"] = from_union([to_float, from_none], self.verified_at) return result -class SkillsetAbilitiesExportResponse: +class ContactListResponse: cursor: str """Cursor for fetching the next page""" - items: List[SkillsetAbilitiesExportResponseItem] + items: List[ContactListResponseItem] - def __init__(self, cursor: str, items: List[SkillsetAbilitiesExportResponseItem]) -> None: + def __init__(self, cursor: str, items: List[ContactListResponseItem]) -> None: self.cursor = cursor self.items = items @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilitiesExportResponse': + def from_dict(obj: Any) -> 'ContactListResponse': assert isinstance(obj, dict) cursor = from_str(obj.get("cursor")) - items = from_list(SkillsetAbilitiesExportResponseItem.from_dict, obj.get("items")) - return SkillsetAbilitiesExportResponse(cursor, items) + items = from_list(ContactListResponseItem.from_dict, obj.get("items")) + return ContactListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(SkillsetAbilitiesExportResponseItem, x), self.items) + result["items"] = from_list(lambda x: to_class(ContactListResponseItem, x), self.items) return result -class SkillsetAbilitiesExportStreamItemData: - """Blueprint properties""" - - blueprint_id: Optional[str] - """The ID of the blueprint""" - - bot_id: Optional[str] - """The ID of the bot associated with the ability""" +class ContactListStreamItemData: + """Instance list properties""" created_at: float """The timestamp (ms) when the instance was created""" - description: str + description: Optional[str] """The associated description""" - file_id: Optional[str] - """The ID of the file associated with the ability""" + email: Optional[str] + """The email address of the contact""" + + fingerprint: str + """The fingerprint of the contact""" id: str """The instance ID""" - instruction: str meta: Optional[Dict[str, Any]] """Meta data information""" - name: str + name: Optional[str] """The associated name""" - secret_id: Optional[str] - """The ID of the secret associated with the ability""" + nick: Optional[str] + """The nickname of the contact""" - space_id: Optional[str] - """The ID of the space associated with the ability""" + phone: Optional[str] + """The phone number of the contact""" + + preferences: Optional[str] + """The preferences of the contact""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, blueprint_id: Optional[str], bot_id: Optional[str], created_at: float, description: str, file_id: Optional[str], id: str, instruction: str, meta: Optional[Dict[str, Any]], name: str, secret_id: Optional[str], space_id: Optional[str], updated_at: float) -> None: - self.blueprint_id = blueprint_id - self.bot_id = bot_id + verified_at: Optional[float] + """The timestamp (ms) when the contact was verified""" + + def __init__(self, created_at: float, description: Optional[str], email: Optional[str], fingerprint: str, id: str, meta: Optional[Dict[str, Any]], name: Optional[str], nick: Optional[str], phone: Optional[str], preferences: Optional[str], updated_at: float, verified_at: Optional[float]) -> None: self.created_at = created_at self.description = description - self.file_id = file_id + self.email = email + self.fingerprint = fingerprint self.id = id - self.instruction = instruction self.meta = meta self.name = name - self.secret_id = secret_id - self.space_id = space_id + self.nick = nick + self.phone = phone + self.preferences = preferences self.updated_at = updated_at + self.verified_at = verified_at @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilitiesExportStreamItemData': + def from_dict(obj: Any) -> 'ContactListStreamItemData': assert isinstance(obj, dict) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) created_at = from_float(obj.get("createdAt")) - description = from_str(obj.get("description")) - file_id = from_union([from_str, from_none], obj.get("fileId")) + description = from_union([from_str, from_none], obj.get("description")) + email = from_union([from_str, from_none], obj.get("email")) + fingerprint = from_str(obj.get("fingerprint")) id = from_str(obj.get("id")) - instruction = from_str(obj.get("instruction")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - secret_id = from_union([from_str, from_none], obj.get("secretId")) - space_id = from_union([from_str, from_none], obj.get("spaceId")) + name = from_union([from_str, from_none], obj.get("name")) + nick = from_union([from_str, from_none], obj.get("nick")) + phone = from_union([from_str, from_none], obj.get("phone")) + preferences = from_union([from_str, from_none], obj.get("preferences")) updated_at = from_float(obj.get("updatedAt")) - return SkillsetAbilitiesExportStreamItemData(blueprint_id, bot_id, created_at, description, file_id, id, instruction, meta, name, secret_id, space_id, updated_at) + verified_at = from_union([from_float, from_none], obj.get("verifiedAt")) + return ContactListStreamItemData(created_at, description, email, fingerprint, id, meta, name, nick, phone, preferences, updated_at, verified_at) def to_dict(self) -> dict: result: dict = {} - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) result["createdAt"] = to_float(self.created_at) - result["description"] = from_str(self.description) - if self.file_id is not None: - result["fileId"] = from_union([from_str, from_none], self.file_id) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.email is not None: + result["email"] = from_union([from_str, from_none], self.email) + result["fingerprint"] = from_str(self.fingerprint) result["id"] = from_str(self.id) - result["instruction"] = from_str(self.instruction) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - if self.secret_id is not None: - result["secretId"] = from_union([from_str, from_none], self.secret_id) - if self.space_id is not None: - result["spaceId"] = from_union([from_str, from_none], self.space_id) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.nick is not None: + result["nick"] = from_union([from_str, from_none], self.nick) + if self.phone is not None: + result["phone"] = from_union([from_str, from_none], self.phone) + if self.preferences is not None: + result["preferences"] = from_union([from_str, from_none], self.preferences) result["updatedAt"] = to_float(self.updated_at) + if self.verified_at is not None: + result["verifiedAt"] = from_union([to_float, from_none], self.verified_at) return result -class SkillsetAbilitiesExportStreamItemType(Enum): +class ContactListStreamItemType(Enum): """The type of event""" ITEM = "item" -class SkillsetAbilitiesExportStreamItem: - data: SkillsetAbilitiesExportStreamItemData - """Blueprint properties""" +class ContactListStreamItem: + data: ContactListStreamItemData + """Instance list properties""" - type: SkillsetAbilitiesExportStreamItemType + type: ContactListStreamItemType """The type of event""" - def __init__(self, data: SkillsetAbilitiesExportStreamItemData, type: SkillsetAbilitiesExportStreamItemType) -> None: + def __init__(self, data: ContactListStreamItemData, type: ContactListStreamItemType) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilitiesExportStreamItem': + def from_dict(obj: Any) -> 'ContactListStreamItem': assert isinstance(obj, dict) - data = SkillsetAbilitiesExportStreamItemData.from_dict(obj.get("data")) - type = SkillsetAbilitiesExportStreamItemType(obj.get("type")) - return SkillsetAbilitiesExportStreamItem(data, type) + data = ContactListStreamItemData.from_dict(obj.get("data")) + type = ContactListStreamItemType(obj.get("type")) + return ContactListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["data"] = to_class(SkillsetAbilitiesExportStreamItemData, self.data) - result["type"] = to_enum(SkillsetAbilitiesExportStreamItemType, self.type) + result["data"] = to_class(ContactListStreamItemData, self.data) + result["type"] = to_enum(ContactListStreamItemType, self.type) return result -class SkillsetAbilityListParamsOrder(Enum): +class ContactsExportParamsOrder(Enum): """The order of the paginated items""" ASC = "asc" DESC = "desc" -class SkillsetAbilityListParams: +class ContactsExportParams: cursor: Optional[str] """The cursor to use for pagination""" - order: Optional[SkillsetAbilityListParamsOrder] - """The order of the paginated items""" + meta: Optional[Dict[str, str]] + """Key-value pairs to filter the items by metadata""" - skillset_id: str - """The ID of the skillset""" + order: Optional[ContactsExportParamsOrder] + """The order of the paginated items""" take: Optional[int] """The number of items to retrieve""" - def __init__(self, cursor: Optional[str], order: Optional[SkillsetAbilityListParamsOrder], skillset_id: str, take: Optional[int]) -> None: + def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[ContactsExportParamsOrder], take: Optional[int]) -> None: self.cursor = cursor + self.meta = meta self.order = order - self.skillset_id = skillset_id self.take = take @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilityListParams': + def from_dict(obj: Any) -> 'ContactsExportParams': assert isinstance(obj, dict) cursor = from_union([from_str, from_none], obj.get("cursor")) - order = from_union([SkillsetAbilityListParamsOrder, from_none], obj.get("order")) - skillset_id = from_str(obj.get("skillsetId")) + meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) + order = from_union([ContactsExportParamsOrder, from_none], obj.get("order")) take = from_union([from_int, from_none], obj.get("take")) - return SkillsetAbilityListParams(cursor, order, skillset_id, take) + return ContactsExportParams(cursor, meta, order, take) def to_dict(self) -> dict: result: dict = {} if self.cursor is not None: result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.meta is not None: + result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) if self.order is not None: - result["order"] = from_union([lambda x: to_enum(SkillsetAbilityListParamsOrder, x), from_none], self.order) - result["skillsetId"] = from_str(self.skillset_id) + result["order"] = from_union([lambda x: to_enum(ContactsExportParamsOrder, x), from_none], self.order) if self.take is not None: result["take"] = from_union([from_int, from_none], self.take) return result -class PurpleState(Enum): - """The lifecycle state of a resource — toggle it on/off without deleting it""" - - DISABLED = "disabled" - ENABLED = "enabled" - - -class SkillsetAbilityListResponseItem: - """Blueprint properties""" - - blueprint_id: Optional[str] - """The ID of the blueprint""" - - bot_id: Optional[str] - """The ID of the bot associated with the ability""" +class ContactsExportResponseItem: + """Instance list properties""" created_at: float """The timestamp (ms) when the instance was created""" - description: str + description: Optional[str] """The associated description""" - file_id: Optional[str] - """The ID of the file associated with the ability""" + email: Optional[str] + """The email address of the contact""" + + fingerprint: str + """The fingerprint of the contact""" id: str """The instance ID""" - instruction: str meta: Optional[Dict[str, Any]] """Meta data information""" - name: str + name: Optional[str] """The associated name""" - secret_id: Optional[str] - """The ID of the secret associated with the ability""" + nick: Optional[str] + """The nickname of the contact""" - space_id: Optional[str] - """The ID of the space associated with the ability""" + phone: Optional[str] + """The phone number of the contact""" - state: Optional[PurpleState] - """The lifecycle state of a resource — toggle it on/off without deleting it""" + preferences: Optional[str] + """The preferences of the contact""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, blueprint_id: Optional[str], bot_id: Optional[str], created_at: float, description: str, file_id: Optional[str], id: str, instruction: str, meta: Optional[Dict[str, Any]], name: str, secret_id: Optional[str], space_id: Optional[str], state: Optional[PurpleState], updated_at: float) -> None: - self.blueprint_id = blueprint_id - self.bot_id = bot_id + verified_at: Optional[float] + """The timestamp (ms) when the contact was verified""" + + def __init__(self, created_at: float, description: Optional[str], email: Optional[str], fingerprint: str, id: str, meta: Optional[Dict[str, Any]], name: Optional[str], nick: Optional[str], phone: Optional[str], preferences: Optional[str], updated_at: float, verified_at: Optional[float]) -> None: self.created_at = created_at self.description = description - self.file_id = file_id + self.email = email + self.fingerprint = fingerprint self.id = id - self.instruction = instruction self.meta = meta self.name = name - self.secret_id = secret_id - self.space_id = space_id - self.state = state + self.nick = nick + self.phone = phone + self.preferences = preferences self.updated_at = updated_at + self.verified_at = verified_at @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilityListResponseItem': + def from_dict(obj: Any) -> 'ContactsExportResponseItem': assert isinstance(obj, dict) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) created_at = from_float(obj.get("createdAt")) - description = from_str(obj.get("description")) - file_id = from_union([from_str, from_none], obj.get("fileId")) + description = from_union([from_str, from_none], obj.get("description")) + email = from_union([from_str, from_none], obj.get("email")) + fingerprint = from_str(obj.get("fingerprint")) id = from_str(obj.get("id")) - instruction = from_str(obj.get("instruction")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - secret_id = from_union([from_str, from_none], obj.get("secretId")) - space_id = from_union([from_str, from_none], obj.get("spaceId")) - state = from_union([PurpleState, from_none], obj.get("state")) + name = from_union([from_str, from_none], obj.get("name")) + nick = from_union([from_str, from_none], obj.get("nick")) + phone = from_union([from_str, from_none], obj.get("phone")) + preferences = from_union([from_str, from_none], obj.get("preferences")) updated_at = from_float(obj.get("updatedAt")) - return SkillsetAbilityListResponseItem(blueprint_id, bot_id, created_at, description, file_id, id, instruction, meta, name, secret_id, space_id, state, updated_at) + verified_at = from_union([from_float, from_none], obj.get("verifiedAt")) + return ContactsExportResponseItem(created_at, description, email, fingerprint, id, meta, name, nick, phone, preferences, updated_at, verified_at) def to_dict(self) -> dict: result: dict = {} - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) result["createdAt"] = to_float(self.created_at) - result["description"] = from_str(self.description) - if self.file_id is not None: - result["fileId"] = from_union([from_str, from_none], self.file_id) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.email is not None: + result["email"] = from_union([from_str, from_none], self.email) + result["fingerprint"] = from_str(self.fingerprint) result["id"] = from_str(self.id) - result["instruction"] = from_str(self.instruction) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - if self.secret_id is not None: - result["secretId"] = from_union([from_str, from_none], self.secret_id) - if self.space_id is not None: - result["spaceId"] = from_union([from_str, from_none], self.space_id) - if self.state is not None: - result["state"] = from_union([lambda x: to_enum(PurpleState, x), from_none], self.state) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.nick is not None: + result["nick"] = from_union([from_str, from_none], self.nick) + if self.phone is not None: + result["phone"] = from_union([from_str, from_none], self.phone) + if self.preferences is not None: + result["preferences"] = from_union([from_str, from_none], self.preferences) result["updatedAt"] = to_float(self.updated_at) + if self.verified_at is not None: + result["verifiedAt"] = from_union([to_float, from_none], self.verified_at) return result -class SkillsetAbilityListResponse: +class ContactsExportResponse: cursor: str """Cursor for fetching the next page""" - items: List[SkillsetAbilityListResponseItem] + items: List[ContactsExportResponseItem] - def __init__(self, cursor: str, items: List[SkillsetAbilityListResponseItem]) -> None: + def __init__(self, cursor: str, items: List[ContactsExportResponseItem]) -> None: self.cursor = cursor self.items = items @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilityListResponse': + def from_dict(obj: Any) -> 'ContactsExportResponse': assert isinstance(obj, dict) cursor = from_str(obj.get("cursor")) - items = from_list(SkillsetAbilityListResponseItem.from_dict, obj.get("items")) - return SkillsetAbilityListResponse(cursor, items) + items = from_list(ContactsExportResponseItem.from_dict, obj.get("items")) + return ContactsExportResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(SkillsetAbilityListResponseItem, x), self.items) + result["items"] = from_list(lambda x: to_class(ContactsExportResponseItem, x), self.items) return result -class FluffyState(Enum): - """The lifecycle state of a resource — toggle it on/off without deleting it""" - - DISABLED = "disabled" - ENABLED = "enabled" - - -class SkillsetAbilityListStreamItemData: - """Blueprint properties""" - - blueprint_id: Optional[str] - """The ID of the blueprint""" - - bot_id: Optional[str] - """The ID of the bot associated with the ability""" +class ContactsExportStreamItemData: + """Instance list properties""" created_at: float """The timestamp (ms) when the instance was created""" - description: str + description: Optional[str] """The associated description""" - file_id: Optional[str] - """The ID of the file associated with the ability""" + email: Optional[str] + """The email address of the contact""" + + fingerprint: str + """The fingerprint of the contact""" id: str """The instance ID""" - instruction: str meta: Optional[Dict[str, Any]] """Meta data information""" - name: str + name: Optional[str] """The associated name""" - secret_id: Optional[str] - """The ID of the secret associated with the ability""" + nick: Optional[str] + """The nickname of the contact""" - space_id: Optional[str] - """The ID of the space associated with the ability""" + phone: Optional[str] + """The phone number of the contact""" - state: Optional[FluffyState] - """The lifecycle state of a resource — toggle it on/off without deleting it""" + preferences: Optional[str] + """The preferences of the contact""" updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, blueprint_id: Optional[str], bot_id: Optional[str], created_at: float, description: str, file_id: Optional[str], id: str, instruction: str, meta: Optional[Dict[str, Any]], name: str, secret_id: Optional[str], space_id: Optional[str], state: Optional[FluffyState], updated_at: float) -> None: - self.blueprint_id = blueprint_id - self.bot_id = bot_id + verified_at: Optional[float] + """The timestamp (ms) when the contact was verified""" + + def __init__(self, created_at: float, description: Optional[str], email: Optional[str], fingerprint: str, id: str, meta: Optional[Dict[str, Any]], name: Optional[str], nick: Optional[str], phone: Optional[str], preferences: Optional[str], updated_at: float, verified_at: Optional[float]) -> None: self.created_at = created_at self.description = description - self.file_id = file_id + self.email = email + self.fingerprint = fingerprint self.id = id - self.instruction = instruction self.meta = meta self.name = name - self.secret_id = secret_id - self.space_id = space_id - self.state = state + self.nick = nick + self.phone = phone + self.preferences = preferences self.updated_at = updated_at + self.verified_at = verified_at @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilityListStreamItemData': + def from_dict(obj: Any) -> 'ContactsExportStreamItemData': assert isinstance(obj, dict) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - bot_id = from_union([from_str, from_none], obj.get("botId")) created_at = from_float(obj.get("createdAt")) - description = from_str(obj.get("description")) - file_id = from_union([from_str, from_none], obj.get("fileId")) + description = from_union([from_str, from_none], obj.get("description")) + email = from_union([from_str, from_none], obj.get("email")) + fingerprint = from_str(obj.get("fingerprint")) id = from_str(obj.get("id")) - instruction = from_str(obj.get("instruction")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) - name = from_str(obj.get("name")) - secret_id = from_union([from_str, from_none], obj.get("secretId")) - space_id = from_union([from_str, from_none], obj.get("spaceId")) - state = from_union([FluffyState, from_none], obj.get("state")) + name = from_union([from_str, from_none], obj.get("name")) + nick = from_union([from_str, from_none], obj.get("nick")) + phone = from_union([from_str, from_none], obj.get("phone")) + preferences = from_union([from_str, from_none], obj.get("preferences")) updated_at = from_float(obj.get("updatedAt")) - return SkillsetAbilityListStreamItemData(blueprint_id, bot_id, created_at, description, file_id, id, instruction, meta, name, secret_id, space_id, state, updated_at) + verified_at = from_union([from_float, from_none], obj.get("verifiedAt")) + return ContactsExportStreamItemData(created_at, description, email, fingerprint, id, meta, name, nick, phone, preferences, updated_at, verified_at) def to_dict(self) -> dict: result: dict = {} - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - if self.bot_id is not None: - result["botId"] = from_union([from_str, from_none], self.bot_id) result["createdAt"] = to_float(self.created_at) - result["description"] = from_str(self.description) - if self.file_id is not None: - result["fileId"] = from_union([from_str, from_none], self.file_id) + if self.description is not None: + result["description"] = from_union([from_str, from_none], self.description) + if self.email is not None: + result["email"] = from_union([from_str, from_none], self.email) + result["fingerprint"] = from_str(self.fingerprint) result["id"] = from_str(self.id) - result["instruction"] = from_str(self.instruction) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) - result["name"] = from_str(self.name) - if self.secret_id is not None: - result["secretId"] = from_union([from_str, from_none], self.secret_id) - if self.space_id is not None: - result["spaceId"] = from_union([from_str, from_none], self.space_id) - if self.state is not None: - result["state"] = from_union([lambda x: to_enum(FluffyState, x), from_none], self.state) + if self.name is not None: + result["name"] = from_union([from_str, from_none], self.name) + if self.nick is not None: + result["nick"] = from_union([from_str, from_none], self.nick) + if self.phone is not None: + result["phone"] = from_union([from_str, from_none], self.phone) + if self.preferences is not None: + result["preferences"] = from_union([from_str, from_none], self.preferences) result["updatedAt"] = to_float(self.updated_at) + if self.verified_at is not None: + result["verifiedAt"] = from_union([to_float, from_none], self.verified_at) return result -class SkillsetAbilityListStreamItemType(Enum): +class ContactsExportStreamItemType(Enum): """The type of event""" ITEM = "item" -class SkillsetAbilityListStreamItem: - data: SkillsetAbilityListStreamItemData - """Blueprint properties""" +class ContactsExportStreamItem: + data: ContactsExportStreamItemData + """Instance list properties""" - type: SkillsetAbilityListStreamItemType + type: ContactsExportStreamItemType """The type of event""" - def __init__(self, data: SkillsetAbilityListStreamItemData, type: SkillsetAbilityListStreamItemType) -> None: + def __init__(self, data: ContactsExportStreamItemData, type: ContactsExportStreamItemType) -> None: self.data = data self.type = type @staticmethod - def from_dict(obj: Any) -> 'SkillsetAbilityListStreamItem': - assert isinstance(obj, dict) - data = SkillsetAbilityListStreamItemData.from_dict(obj.get("data")) - type = SkillsetAbilityListStreamItemType(obj.get("type")) - return SkillsetAbilityListStreamItem(data, type) - - def to_dict(self) -> dict: - result: dict = {} - result["data"] = to_class(SkillsetAbilityListStreamItemData, self.data) - result["type"] = to_enum(SkillsetAbilityListStreamItemType, self.type) - return result - - -class SkillsetDeleteParams: - skillset_id: str - """The ID of the skillset to delete""" - - def __init__(self, skillset_id: str) -> None: - self.skillset_id = skillset_id - - @staticmethod - def from_dict(obj: Any) -> 'SkillsetDeleteParams': - assert isinstance(obj, dict) - skillset_id = from_str(obj.get("skillsetId")) - return SkillsetDeleteParams(skillset_id) - - def to_dict(self) -> dict: - result: dict = {} - result["skillsetId"] = from_str(self.skillset_id) - return result - - -class SkillsetDeleteResponse: - id: str - """The ID of the deleted skillset""" - - def __init__(self, id: str) -> None: - self.id = id - - @staticmethod - def from_dict(obj: Any) -> 'SkillsetDeleteResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return SkillsetDeleteResponse(id) - - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result - - -class SkillsetFetchParams: - skillset_id: str - """The ID of the skillset to retrieve""" - - def __init__(self, skillset_id: str) -> None: - self.skillset_id = skillset_id - - @staticmethod - def from_dict(obj: Any) -> 'SkillsetFetchParams': + def from_dict(obj: Any) -> 'ContactsExportStreamItem': assert isinstance(obj, dict) - skillset_id = from_str(obj.get("skillsetId")) - return SkillsetFetchParams(skillset_id) + data = ContactsExportStreamItemData.from_dict(obj.get("data")) + type = ContactsExportStreamItemType(obj.get("type")) + return ContactsExportStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["skillsetId"] = from_str(self.skillset_id) + result["data"] = to_class(ContactsExportStreamItemData, self.data) + result["type"] = to_enum(ContactsExportStreamItemType, self.type) return result -class SkillsetFetchResponseState(Enum): - """The lifecycle state of a resource — toggle it on/off without deleting it""" - - DISABLED = "disabled" - ENABLED = "enabled" - - -class SkillsetFetchResponseVisibility(Enum): - """The skillset visibility""" - - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" - - -class SkillsetFetchResponse: - """Blueprint properties""" - - alias: Optional[str] - """The unique alias for the instance""" - - blueprint_id: Optional[str] - """The ID of the blueprint""" - - created_at: float - """The timestamp (ms) when the instance was created""" +class ContactEnsureRequest: + """Instance crud properties""" description: Optional[str] """The associated description""" - id: str - """The instance ID""" + email: Optional[str] + """The email address of the contact""" + + fingerprint: str + """The fingerprint of the contact""" meta: Optional[Dict[str, Any]] """Meta data information""" @@ -46388,173 +44879,174 @@ class SkillsetFetchResponse: name: Optional[str] """The associated name""" - state: Optional[SkillsetFetchResponseState] - """The lifecycle state of a resource — toggle it on/off without deleting it""" + nick: Optional[str] + """The nickname of the contact""" - updated_at: float - """The timestamp (ms) when the instance was updated""" + phone: Optional[str] + """The phone number of the contact""" - visibility: Optional[SkillsetFetchResponseVisibility] - """The skillset visibility""" + preferences: Optional[str] + """The preferences of the contact""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], state: Optional[SkillsetFetchResponseState], updated_at: float, visibility: Optional[SkillsetFetchResponseVisibility]) -> None: - self.alias = alias - self.blueprint_id = blueprint_id - self.created_at = created_at + verified_at: Optional[float] + """The timestamp (ms) when the contact was verified""" + + def __init__(self, description: Optional[str], email: Optional[str], fingerprint: str, meta: Optional[Dict[str, Any]], name: Optional[str], nick: Optional[str], phone: Optional[str], preferences: Optional[str], verified_at: Optional[float]) -> None: self.description = description - self.id = id + self.email = email + self.fingerprint = fingerprint self.meta = meta self.name = name - self.state = state - self.updated_at = updated_at - self.visibility = visibility + self.nick = nick + self.phone = phone + self.preferences = preferences + self.verified_at = verified_at @staticmethod - def from_dict(obj: Any) -> 'SkillsetFetchResponse': + def from_dict(obj: Any) -> 'ContactEnsureRequest': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) - created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - id = from_str(obj.get("id")) + email = from_union([from_str, from_none], obj.get("email")) + fingerprint = from_str(obj.get("fingerprint")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - state = from_union([SkillsetFetchResponseState, from_none], obj.get("state")) - updated_at = from_float(obj.get("updatedAt")) - visibility = from_union([SkillsetFetchResponseVisibility, from_none], obj.get("visibility")) - return SkillsetFetchResponse(alias, blueprint_id, created_at, description, id, meta, name, state, updated_at, visibility) + nick = from_union([from_str, from_none], obj.get("nick")) + phone = from_union([from_str, from_none], obj.get("phone")) + preferences = from_union([from_str, from_none], obj.get("preferences")) + verified_at = from_union([from_float, from_none], obj.get("verifiedAt")) + return ContactEnsureRequest(description, email, fingerprint, meta, name, nick, phone, preferences, verified_at) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) - result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - result["id"] = from_str(self.id) + if self.email is not None: + result["email"] = from_union([from_str, from_none], self.email) + result["fingerprint"] = from_str(self.fingerprint) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.state is not None: - result["state"] = from_union([lambda x: to_enum(SkillsetFetchResponseState, x), from_none], self.state) - result["updatedAt"] = to_float(self.updated_at) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(SkillsetFetchResponseVisibility, x), from_none], self.visibility) + if self.nick is not None: + result["nick"] = from_union([from_str, from_none], self.nick) + if self.phone is not None: + result["phone"] = from_union([from_str, from_none], self.phone) + if self.preferences is not None: + result["preferences"] = from_union([from_str, from_none], self.preferences) + if self.verified_at is not None: + result["verifiedAt"] = from_union([to_float, from_none], self.verified_at) return result -class SkillsetUpdateParams: - skillset_id: str +class ContactEnsureResponse: + id: str + """The ID of the ensured contact""" - def __init__(self, skillset_id: str) -> None: - self.skillset_id = skillset_id + def __init__(self, id: str) -> None: + self.id = id @staticmethod - def from_dict(obj: Any) -> 'SkillsetUpdateParams': + def from_dict(obj: Any) -> 'ContactEnsureResponse': assert isinstance(obj, dict) - skillset_id = from_str(obj.get("skillsetId")) - return SkillsetUpdateParams(skillset_id) + id = from_str(obj.get("id")) + return ContactEnsureResponse(id) def to_dict(self) -> dict: result: dict = {} - result["skillsetId"] = from_str(self.skillset_id) + result["id"] = from_str(self.id) return result -class SkillsetUpdateRequestState(Enum): - """The lifecycle state of a resource — toggle it on/off without deleting it""" - - DISABLED = "disabled" - ENABLED = "enabled" - - -class SkillsetUpdateRequestVisibility(Enum): - """The skillset visibility""" - - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" - - -class SkillsetUpdateRequest: - """Blueprint properties""" - - alias: Optional[str] - """The unique alias for the instance""" - - blueprint_id: Optional[str] - """The ID of the blueprint""" +class ContactCreateRequest: + """Instance crud properties""" description: Optional[str] """The associated description""" + email: Optional[str] + """The email address of the contact""" + + fingerprint: Optional[str] + """The fingerprint of the contact""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - state: Optional[SkillsetUpdateRequestState] - """The lifecycle state of a resource — toggle it on/off without deleting it""" + nick: Optional[str] + """The nickname of the contact""" - visibility: Optional[SkillsetUpdateRequestVisibility] - """The skillset visibility""" + phone: Optional[str] + """The phone number of the contact""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], state: Optional[SkillsetUpdateRequestState], visibility: Optional[SkillsetUpdateRequestVisibility]) -> None: - self.alias = alias - self.blueprint_id = blueprint_id + preferences: Optional[str] + """The preferences of the contact""" + + verified_at: Optional[float] + """The timestamp (ms) when the contact was verified""" + + def __init__(self, description: Optional[str], email: Optional[str], fingerprint: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], nick: Optional[str], phone: Optional[str], preferences: Optional[str], verified_at: Optional[float]) -> None: self.description = description + self.email = email + self.fingerprint = fingerprint self.meta = meta self.name = name - self.state = state - self.visibility = visibility + self.nick = nick + self.phone = phone + self.preferences = preferences + self.verified_at = verified_at @staticmethod - def from_dict(obj: Any) -> 'SkillsetUpdateRequest': - assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + def from_dict(obj: Any) -> 'ContactCreateRequest': + assert isinstance(obj, dict) description = from_union([from_str, from_none], obj.get("description")) + email = from_union([from_str, from_none], obj.get("email")) + fingerprint = from_union([from_str, from_none], obj.get("fingerprint")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - state = from_union([SkillsetUpdateRequestState, from_none], obj.get("state")) - visibility = from_union([SkillsetUpdateRequestVisibility, from_none], obj.get("visibility")) - return SkillsetUpdateRequest(alias, blueprint_id, description, meta, name, state, visibility) + nick = from_union([from_str, from_none], obj.get("nick")) + phone = from_union([from_str, from_none], obj.get("phone")) + preferences = from_union([from_str, from_none], obj.get("preferences")) + verified_at = from_union([from_float, from_none], obj.get("verifiedAt")) + return ContactCreateRequest(description, email, fingerprint, meta, name, nick, phone, preferences, verified_at) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.email is not None: + result["email"] = from_union([from_str, from_none], self.email) + if self.fingerprint is not None: + result["fingerprint"] = from_union([from_str, from_none], self.fingerprint) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.state is not None: - result["state"] = from_union([lambda x: to_enum(SkillsetUpdateRequestState, x), from_none], self.state) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(SkillsetUpdateRequestVisibility, x), from_none], self.visibility) + if self.nick is not None: + result["nick"] = from_union([from_str, from_none], self.nick) + if self.phone is not None: + result["phone"] = from_union([from_str, from_none], self.phone) + if self.preferences is not None: + result["preferences"] = from_union([from_str, from_none], self.preferences) + if self.verified_at is not None: + result["verifiedAt"] = from_union([to_float, from_none], self.verified_at) return result -class SkillsetUpdateResponse: +class ContactCreateResponse: id: str - """The ID of the updated skillset""" + """The ID of the created contact""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'SkillsetUpdateResponse': + def from_dict(obj: Any) -> 'ContactCreateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return SkillsetUpdateResponse(id) + return ContactCreateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -46562,97 +45054,114 @@ def to_dict(self) -> dict: return result -class SkillsetCreateRequestState(Enum): - """The lifecycle state of a resource — toggle it on/off without deleting it""" - - DISABLED = "disabled" - ENABLED = "enabled" - - -class SkillsetCreateRequestVisibility(Enum): - """The skillset visibility""" +class ContactUpdateParams: + contact_id: str - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" + def __init__(self, contact_id: str) -> None: + self.contact_id = contact_id + @staticmethod + def from_dict(obj: Any) -> 'ContactUpdateParams': + assert isinstance(obj, dict) + contact_id = from_str(obj.get("contactId")) + return ContactUpdateParams(contact_id) -class SkillsetCreateRequest: - """Blueprint properties""" + def to_dict(self) -> dict: + result: dict = {} + result["contactId"] = from_str(self.contact_id) + return result - alias: Optional[str] - """The unique alias for the instance""" - blueprint_id: Optional[str] - """The ID of the blueprint""" +class ContactUpdateRequest: + """Instance crud properties""" description: Optional[str] """The associated description""" + email: Optional[str] + """The email address of the contact""" + + fingerprint: Optional[str] + """The fingerprint of the contact""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - state: Optional[SkillsetCreateRequestState] - """The lifecycle state of a resource — toggle it on/off without deleting it""" + nick: Optional[str] + """The nickname of the contact""" - visibility: Optional[SkillsetCreateRequestVisibility] - """The skillset visibility""" + phone: Optional[str] + """The phone number of the contact""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], description: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], state: Optional[SkillsetCreateRequestState], visibility: Optional[SkillsetCreateRequestVisibility]) -> None: - self.alias = alias - self.blueprint_id = blueprint_id + preferences: Optional[str] + """The preferences of the contact""" + + verified_at: Optional[float] + """The timestamp (ms) when the contact was verified""" + + def __init__(self, description: Optional[str], email: Optional[str], fingerprint: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], nick: Optional[str], phone: Optional[str], preferences: Optional[str], verified_at: Optional[float]) -> None: self.description = description + self.email = email + self.fingerprint = fingerprint self.meta = meta self.name = name - self.state = state - self.visibility = visibility + self.nick = nick + self.phone = phone + self.preferences = preferences + self.verified_at = verified_at @staticmethod - def from_dict(obj: Any) -> 'SkillsetCreateRequest': + def from_dict(obj: Any) -> 'ContactUpdateRequest': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) description = from_union([from_str, from_none], obj.get("description")) + email = from_union([from_str, from_none], obj.get("email")) + fingerprint = from_union([from_str, from_none], obj.get("fingerprint")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - state = from_union([SkillsetCreateRequestState, from_none], obj.get("state")) - visibility = from_union([SkillsetCreateRequestVisibility, from_none], obj.get("visibility")) - return SkillsetCreateRequest(alias, blueprint_id, description, meta, name, state, visibility) + nick = from_union([from_str, from_none], obj.get("nick")) + phone = from_union([from_str, from_none], obj.get("phone")) + preferences = from_union([from_str, from_none], obj.get("preferences")) + verified_at = from_union([from_float, from_none], obj.get("verifiedAt")) + return ContactUpdateRequest(description, email, fingerprint, meta, name, nick, phone, preferences, verified_at) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.email is not None: + result["email"] = from_union([from_str, from_none], self.email) + if self.fingerprint is not None: + result["fingerprint"] = from_union([from_str, from_none], self.fingerprint) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.state is not None: - result["state"] = from_union([lambda x: to_enum(SkillsetCreateRequestState, x), from_none], self.state) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(SkillsetCreateRequestVisibility, x), from_none], self.visibility) + if self.nick is not None: + result["nick"] = from_union([from_str, from_none], self.nick) + if self.phone is not None: + result["phone"] = from_union([from_str, from_none], self.phone) + if self.preferences is not None: + result["preferences"] = from_union([from_str, from_none], self.preferences) + if self.verified_at is not None: + result["verifiedAt"] = from_union([to_float, from_none], self.verified_at) return result -class SkillsetCreateResponse: +class ContactUpdateResponse: id: str - """The ID of the created skillset""" + """The ID of the updated contact""" def __init__(self, id: str) -> None: self.id = id @staticmethod - def from_dict(obj: Any) -> 'SkillsetCreateResponse': + def from_dict(obj: Any) -> 'ContactUpdateResponse': assert isinstance(obj, dict) id = from_str(obj.get("id")) - return SkillsetCreateResponse(id) + return ContactUpdateResponse(id) def to_dict(self) -> dict: result: dict = {} @@ -46660,77 +45169,27 @@ def to_dict(self) -> dict: return result -class SkillsetListParamsOrder(Enum): - """The order of the paginated items""" - - ASC = "asc" - DESC = "desc" - - -class SkillsetListParams: - cursor: Optional[str] - """The cursor to use for pagination""" - - meta: Optional[Dict[str, str]] - """Key-value pairs to filter the partner users by metadata""" - - order: Optional[SkillsetListParamsOrder] - """The order of the paginated items""" - - take: Optional[int] - """The number of items to retrieve""" +class ContactFetchParams: + contact_id: str + """The ID of the contact to retrieve""" - def __init__(self, cursor: Optional[str], meta: Optional[Dict[str, str]], order: Optional[SkillsetListParamsOrder], take: Optional[int]) -> None: - self.cursor = cursor - self.meta = meta - self.order = order - self.take = take + def __init__(self, contact_id: str) -> None: + self.contact_id = contact_id @staticmethod - def from_dict(obj: Any) -> 'SkillsetListParams': + def from_dict(obj: Any) -> 'ContactFetchParams': assert isinstance(obj, dict) - cursor = from_union([from_str, from_none], obj.get("cursor")) - meta = from_union([lambda x: from_dict(from_str, x), from_none], obj.get("meta")) - order = from_union([SkillsetListParamsOrder, from_none], obj.get("order")) - take = from_union([from_int, from_none], obj.get("take")) - return SkillsetListParams(cursor, meta, order, take) + contact_id = from_str(obj.get("contactId")) + return ContactFetchParams(contact_id) def to_dict(self) -> dict: result: dict = {} - if self.cursor is not None: - result["cursor"] = from_union([from_str, from_none], self.cursor) - if self.meta is not None: - result["meta"] = from_union([lambda x: from_dict(from_str, x), from_none], self.meta) - if self.order is not None: - result["order"] = from_union([lambda x: to_enum(SkillsetListParamsOrder, x), from_none], self.order) - if self.take is not None: - result["take"] = from_union([from_int, from_none], self.take) + result["contactId"] = from_str(self.contact_id) return result -class TentacledState(Enum): - """The lifecycle state of a resource — toggle it on/off without deleting it""" - - DISABLED = "disabled" - ENABLED = "enabled" - - -class BraggadociousVisibility(Enum): - """The skillset visibility""" - - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" - - -class SkillsetListResponseItem: - """Blueprint properties""" - - alias: Optional[str] - """The unique alias for the instance""" - - blueprint_id: Optional[str] - """The ID of the blueprint""" +class ContactFetchResponse: + """Instance list properties""" created_at: float """The timestamp (ms) when the instance was created""" @@ -46738,6 +45197,12 @@ class SkillsetListResponseItem: description: Optional[str] """The associated description""" + email: Optional[str] + """The email address of the contact""" + + fingerprint: str + """The fingerprint of the contact""" + id: str """The instance ID""" @@ -46747,111 +45212,186 @@ class SkillsetListResponseItem: name: Optional[str] """The associated name""" - state: Optional[TentacledState] - """The lifecycle state of a resource — toggle it on/off without deleting it""" + nick: Optional[str] + """The nickname of the contact""" + + phone: Optional[str] + """The phone number of the contact""" + + preferences: Optional[str] + """The preferences of the contact""" updated_at: float """The timestamp (ms) when the instance was updated""" - visibility: Optional[BraggadociousVisibility] - """The skillset visibility""" + verified_at: Optional[float] + """The timestamp (ms) when the contact was verified""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], state: Optional[TentacledState], updated_at: float, visibility: Optional[BraggadociousVisibility]) -> None: - self.alias = alias - self.blueprint_id = blueprint_id + def __init__(self, created_at: float, description: Optional[str], email: Optional[str], fingerprint: str, id: str, meta: Optional[Dict[str, Any]], name: Optional[str], nick: Optional[str], phone: Optional[str], preferences: Optional[str], updated_at: float, verified_at: Optional[float]) -> None: self.created_at = created_at self.description = description + self.email = email + self.fingerprint = fingerprint self.id = id self.meta = meta self.name = name - self.state = state + self.nick = nick + self.phone = phone + self.preferences = preferences self.updated_at = updated_at - self.visibility = visibility + self.verified_at = verified_at @staticmethod - def from_dict(obj: Any) -> 'SkillsetListResponseItem': + def from_dict(obj: Any) -> 'ContactFetchResponse': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) + email = from_union([from_str, from_none], obj.get("email")) + fingerprint = from_str(obj.get("fingerprint")) id = from_str(obj.get("id")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - state = from_union([TentacledState, from_none], obj.get("state")) + nick = from_union([from_str, from_none], obj.get("nick")) + phone = from_union([from_str, from_none], obj.get("phone")) + preferences = from_union([from_str, from_none], obj.get("preferences")) updated_at = from_float(obj.get("updatedAt")) - visibility = from_union([BraggadociousVisibility, from_none], obj.get("visibility")) - return SkillsetListResponseItem(alias, blueprint_id, created_at, description, id, meta, name, state, updated_at, visibility) + verified_at = from_union([from_float, from_none], obj.get("verifiedAt")) + return ContactFetchResponse(created_at, description, email, fingerprint, id, meta, name, nick, phone, preferences, updated_at, verified_at) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) + if self.email is not None: + result["email"] = from_union([from_str, from_none], self.email) + result["fingerprint"] = from_str(self.fingerprint) result["id"] = from_str(self.id) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.state is not None: - result["state"] = from_union([lambda x: to_enum(TentacledState, x), from_none], self.state) + if self.nick is not None: + result["nick"] = from_union([from_str, from_none], self.nick) + if self.phone is not None: + result["phone"] = from_union([from_str, from_none], self.phone) + if self.preferences is not None: + result["preferences"] = from_union([from_str, from_none], self.preferences) result["updatedAt"] = to_float(self.updated_at) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(BraggadociousVisibility, x), from_none], self.visibility) + if self.verified_at is not None: + result["verifiedAt"] = from_union([to_float, from_none], self.verified_at) return result -class SkillsetListResponse: - cursor: str - """Cursor for fetching the next page""" +class ContactDeleteParams: + contact_id: str + """The ID of the contact to delete""" - items: List[SkillsetListResponseItem] + def __init__(self, contact_id: str) -> None: + self.contact_id = contact_id - def __init__(self, cursor: str, items: List[SkillsetListResponseItem]) -> None: + @staticmethod + def from_dict(obj: Any) -> 'ContactDeleteParams': + assert isinstance(obj, dict) + contact_id = from_str(obj.get("contactId")) + return ContactDeleteParams(contact_id) + + def to_dict(self) -> dict: + result: dict = {} + result["contactId"] = from_str(self.contact_id) + return result + + +class ContactDeleteResponse: + id: str + """The ID of the deleted contact""" + + def __init__(self, id: str) -> None: + self.id = id + + @staticmethod + def from_dict(obj: Any) -> 'ContactDeleteResponse': + assert isinstance(obj, dict) + id = from_str(obj.get("id")) + return ContactDeleteResponse(id) + + def to_dict(self) -> dict: + result: dict = {} + result["id"] = from_str(self.id) + return result + + +class ContactTaskListParamsOrder(Enum): + """The order of the paginated items""" + + ASC = "asc" + DESC = "desc" + + +class ContactTaskListParams: + contact_id: str + """The ID of the contact to list tasks for""" + + cursor: Optional[str] + """The cursor to use for pagination""" + + order: Optional[ContactTaskListParamsOrder] + """The order of the paginated items""" + + take: Optional[int] + """The number of items to retrieve""" + + def __init__(self, contact_id: str, cursor: Optional[str], order: Optional[ContactTaskListParamsOrder], take: Optional[int]) -> None: + self.contact_id = contact_id self.cursor = cursor - self.items = items + self.order = order + self.take = take @staticmethod - def from_dict(obj: Any) -> 'SkillsetListResponse': + def from_dict(obj: Any) -> 'ContactTaskListParams': assert isinstance(obj, dict) - cursor = from_str(obj.get("cursor")) - items = from_list(SkillsetListResponseItem.from_dict, obj.get("items")) - return SkillsetListResponse(cursor, items) + contact_id = from_str(obj.get("contactId")) + cursor = from_union([from_str, from_none], obj.get("cursor")) + order = from_union([ContactTaskListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return ContactTaskListParams(contact_id, cursor, order, take) def to_dict(self) -> dict: result: dict = {} - result["cursor"] = from_str(self.cursor) - result["items"] = from_list(lambda x: to_class(SkillsetListResponseItem, x), self.items) + result["contactId"] = from_str(self.contact_id) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(ContactTaskListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class StickyState(Enum): - """The lifecycle state of a resource — toggle it on/off without deleting it""" +class IndigoOutcome(Enum): + """The task execution outcome""" - DISABLED = "disabled" - ENABLED = "enabled" + FAILURE = "failure" + PENDING = "pending" + SUCCESS = "success" -class Visibility1(Enum): - """The skillset visibility""" +class IndigoStatus(Enum): + """The task execution status""" - PRIVATE = "private" - PROTECTED = "protected" - PUBLIC = "public" + CANCELED = "canceled" + IDLE = "idle" + RUNNING = "running" -class SkillsetListStreamItemData: - """Blueprint properties""" +class ContactTaskListResponseItem: + """Instance list properties""" - alias: Optional[str] - """The unique alias for the instance""" + bot_id: Optional[str] + """The bot associated with the task""" - blueprint_id: Optional[str] - """The ID of the blueprint""" + contact_id: Optional[str] + """The contact id assigned to this task""" created_at: float """The timestamp (ms) when the instance was created""" @@ -46862,169 +45402,167 @@ class SkillsetListStreamItemData: id: str """The instance ID""" + last_run_at: Optional[float] + """The timestamp (ms) of the last task execution""" + + max_iterations: Optional[float] + """The maximum number of iterations per task execution""" + + max_time: Optional[float] + """The maximum time per task execution (in milliseconds)""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - state: Optional[StickyState] - """The lifecycle state of a resource — toggle it on/off without deleting it""" + next_run_at: Optional[float] + """The timestamp (ms) of the next scheduled task execution""" + + outcome: Optional[IndigoOutcome] + """The task execution outcome""" + + schedule: Optional[str] + """The schedule of the task""" + + session_duration: Optional[float] + """The session duration of the task execution (in milliseconds)""" + + status: Optional[IndigoStatus] + """The task execution status""" + + timezone: Optional[str] + """The IANA timezone identifier used to evaluate the task schedule.""" updated_at: float """The timestamp (ms) when the instance was updated""" - visibility: Optional[Visibility1] - """The skillset visibility""" - - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], state: Optional[StickyState], updated_at: float, visibility: Optional[Visibility1]) -> None: - self.alias = alias - self.blueprint_id = blueprint_id + def __init__(self, bot_id: Optional[str], contact_id: Optional[str], created_at: float, description: Optional[str], id: str, last_run_at: Optional[float], max_iterations: Optional[float], max_time: Optional[float], meta: Optional[Dict[str, Any]], name: Optional[str], next_run_at: Optional[float], outcome: Optional[IndigoOutcome], schedule: Optional[str], session_duration: Optional[float], status: Optional[IndigoStatus], timezone: Optional[str], updated_at: float) -> None: + self.bot_id = bot_id + self.contact_id = contact_id self.created_at = created_at self.description = description self.id = id + self.last_run_at = last_run_at + self.max_iterations = max_iterations + self.max_time = max_time self.meta = meta self.name = name - self.state = state + self.next_run_at = next_run_at + self.outcome = outcome + self.schedule = schedule + self.session_duration = session_duration + self.status = status + self.timezone = timezone self.updated_at = updated_at - self.visibility = visibility @staticmethod - def from_dict(obj: Any) -> 'SkillsetListStreamItemData': + def from_dict(obj: Any) -> 'ContactTaskListResponseItem': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) + last_run_at = from_union([from_float, from_none], obj.get("lastRunAt")) + max_iterations = from_union([from_float, from_none], obj.get("maxIterations")) + max_time = from_union([from_float, from_none], obj.get("maxTime")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - state = from_union([StickyState, from_none], obj.get("state")) + next_run_at = from_union([from_float, from_none], obj.get("nextRunAt")) + outcome = from_union([IndigoOutcome, from_none], obj.get("outcome")) + schedule = from_union([from_str, from_none], obj.get("schedule")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + status = from_union([IndigoStatus, from_none], obj.get("status")) + timezone = from_union([from_str, from_none], obj.get("timezone")) updated_at = from_float(obj.get("updatedAt")) - visibility = from_union([Visibility1, from_none], obj.get("visibility")) - return SkillsetListStreamItemData(alias, blueprint_id, created_at, description, id, meta, name, state, updated_at, visibility) + return ContactTaskListResponseItem(bot_id, contact_id, created_at, description, id, last_run_at, max_iterations, max_time, meta, name, next_run_at, outcome, schedule, session_duration, status, timezone, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) + if self.last_run_at is not None: + result["lastRunAt"] = from_union([to_float, from_none], self.last_run_at) + if self.max_iterations is not None: + result["maxIterations"] = from_union([to_float, from_none], self.max_iterations) + if self.max_time is not None: + result["maxTime"] = from_union([to_float, from_none], self.max_time) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.state is not None: - result["state"] = from_union([lambda x: to_enum(StickyState, x), from_none], self.state) - result["updatedAt"] = to_float(self.updated_at) - if self.visibility is not None: - result["visibility"] = from_union([lambda x: to_enum(Visibility1, x), from_none], self.visibility) - return result - - -class SkillsetListStreamItemType(Enum): - """The type of event""" - - ITEM = "item" - - -class SkillsetListStreamItem: - data: SkillsetListStreamItemData - """Blueprint properties""" - - type: SkillsetListStreamItemType - """The type of event""" - - def __init__(self, data: SkillsetListStreamItemData, type: SkillsetListStreamItemType) -> None: - self.data = data - self.type = type - - @staticmethod - def from_dict(obj: Any) -> 'SkillsetListStreamItem': - assert isinstance(obj, dict) - data = SkillsetListStreamItemData.from_dict(obj.get("data")) - type = SkillsetListStreamItemType(obj.get("type")) - return SkillsetListStreamItem(data, type) - - def to_dict(self) -> dict: - result: dict = {} - result["data"] = to_class(SkillsetListStreamItemData, self.data) - result["type"] = to_enum(SkillsetListStreamItemType, self.type) + if self.next_run_at is not None: + result["nextRunAt"] = from_union([to_float, from_none], self.next_run_at) + if self.outcome is not None: + result["outcome"] = from_union([lambda x: to_enum(IndigoOutcome, x), from_none], self.outcome) + if self.schedule is not None: + result["schedule"] = from_union([from_str, from_none], self.schedule) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.status is not None: + result["status"] = from_union([lambda x: to_enum(IndigoStatus, x), from_none], self.status) + if self.timezone is not None: + result["timezone"] = from_union([from_str, from_none], self.timezone) + result["updatedAt"] = to_float(self.updated_at) return result -class SpaceDeleteParams: - space_id: str - """The ID of the space to delete""" - - def __init__(self, space_id: str) -> None: - self.space_id = space_id - - @staticmethod - def from_dict(obj: Any) -> 'SpaceDeleteParams': - assert isinstance(obj, dict) - space_id = from_str(obj.get("spaceId")) - return SpaceDeleteParams(space_id) - - def to_dict(self) -> dict: - result: dict = {} - result["spaceId"] = from_str(self.space_id) - return result - +class ContactTaskListResponse: + cursor: str + """Cursor for fetching the next page""" -class SpaceDeleteResponse: - id: str - """The ID of the deleted space""" + items: List[ContactTaskListResponseItem] - def __init__(self, id: str) -> None: - self.id = id + def __init__(self, cursor: str, items: List[ContactTaskListResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'SpaceDeleteResponse': + def from_dict(obj: Any) -> 'ContactTaskListResponse': assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return SpaceDeleteResponse(id) + cursor = from_str(obj.get("cursor")) + items = from_list(ContactTaskListResponseItem.from_dict, obj.get("items")) + return ContactTaskListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["id"] = from_str(self.id) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(ContactTaskListResponseItem, x), self.items) return result -class SpaceFetchParams: - space_id: str - """The ID of the space to retrieve""" +class IndecentOutcome(Enum): + """The task execution outcome""" - def __init__(self, space_id: str) -> None: - self.space_id = space_id + FAILURE = "failure" + PENDING = "pending" + SUCCESS = "success" - @staticmethod - def from_dict(obj: Any) -> 'SpaceFetchParams': - assert isinstance(obj, dict) - space_id = from_str(obj.get("spaceId")) - return SpaceFetchParams(space_id) - def to_dict(self) -> dict: - result: dict = {} - result["spaceId"] = from_str(self.space_id) - return result +class IndecentStatus(Enum): + """The task execution status""" + CANCELED = "canceled" + IDLE = "idle" + RUNNING = "running" -class SpaceFetchResponse: - """Blueprint properties""" - alias: Optional[str] - """The unique alias for the instance""" +class ContactTaskListStreamItemData: + """Instance list properties""" - blueprint_id: Optional[str] - """The ID of the blueprint""" + bot_id: Optional[str] + """The bot associated with the task""" contact_id: Optional[str] - """The contact associated with the space""" + """The contact id assigned to this task""" created_at: float """The timestamp (ms) when the instance was created""" @@ -47035,132 +45573,202 @@ class SpaceFetchResponse: id: str """The instance ID""" + last_run_at: Optional[float] + """The timestamp (ms) of the last task execution""" + + max_iterations: Optional[float] + """The maximum number of iterations per task execution""" + + max_time: Optional[float] + """The maximum time per task execution (in milliseconds)""" + meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" + next_run_at: Optional[float] + """The timestamp (ms) of the next scheduled task execution""" + + outcome: Optional[IndecentOutcome] + """The task execution outcome""" + + schedule: Optional[str] + """The schedule of the task""" + + session_duration: Optional[float] + """The session duration of the task execution (in milliseconds)""" + + status: Optional[IndecentStatus] + """The task execution status""" + + timezone: Optional[str] + """The IANA timezone identifier used to evaluate the task schedule.""" + updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], blueprint_id: Optional[str], contact_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: - self.alias = alias - self.blueprint_id = blueprint_id + def __init__(self, bot_id: Optional[str], contact_id: Optional[str], created_at: float, description: Optional[str], id: str, last_run_at: Optional[float], max_iterations: Optional[float], max_time: Optional[float], meta: Optional[Dict[str, Any]], name: Optional[str], next_run_at: Optional[float], outcome: Optional[IndecentOutcome], schedule: Optional[str], session_duration: Optional[float], status: Optional[IndecentStatus], timezone: Optional[str], updated_at: float) -> None: + self.bot_id = bot_id self.contact_id = contact_id self.created_at = created_at self.description = description self.id = id + self.last_run_at = last_run_at + self.max_iterations = max_iterations + self.max_time = max_time self.meta = meta self.name = name + self.next_run_at = next_run_at + self.outcome = outcome + self.schedule = schedule + self.session_duration = session_duration + self.status = status + self.timezone = timezone self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'SpaceFetchResponse': + def from_dict(obj: Any) -> 'ContactTaskListStreamItemData': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) - blueprint_id = from_union([from_str, from_none], obj.get("blueprintId")) + bot_id = from_union([from_str, from_none], obj.get("botId")) contact_id = from_union([from_str, from_none], obj.get("contactId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) id = from_str(obj.get("id")) + last_run_at = from_union([from_float, from_none], obj.get("lastRunAt")) + max_iterations = from_union([from_float, from_none], obj.get("maxIterations")) + max_time = from_union([from_float, from_none], obj.get("maxTime")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) + next_run_at = from_union([from_float, from_none], obj.get("nextRunAt")) + outcome = from_union([IndecentOutcome, from_none], obj.get("outcome")) + schedule = from_union([from_str, from_none], obj.get("schedule")) + session_duration = from_union([from_float, from_none], obj.get("sessionDuration")) + status = from_union([IndecentStatus, from_none], obj.get("status")) + timezone = from_union([from_str, from_none], obj.get("timezone")) updated_at = from_float(obj.get("updatedAt")) - return SpaceFetchResponse(alias, blueprint_id, contact_id, created_at, description, id, meta, name, updated_at) + return ContactTaskListStreamItemData(bot_id, contact_id, created_at, description, id, last_run_at, max_iterations, max_time, meta, name, next_run_at, outcome, schedule, session_duration, status, timezone, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) - if self.blueprint_id is not None: - result["blueprintId"] = from_union([from_str, from_none], self.blueprint_id) + if self.bot_id is not None: + result["botId"] = from_union([from_str, from_none], self.bot_id) if self.contact_id is not None: result["contactId"] = from_union([from_str, from_none], self.contact_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) result["id"] = from_str(self.id) + if self.last_run_at is not None: + result["lastRunAt"] = from_union([to_float, from_none], self.last_run_at) + if self.max_iterations is not None: + result["maxIterations"] = from_union([to_float, from_none], self.max_iterations) + if self.max_time is not None: + result["maxTime"] = from_union([to_float, from_none], self.max_time) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) + if self.next_run_at is not None: + result["nextRunAt"] = from_union([to_float, from_none], self.next_run_at) + if self.outcome is not None: + result["outcome"] = from_union([lambda x: to_enum(IndecentOutcome, x), from_none], self.outcome) + if self.schedule is not None: + result["schedule"] = from_union([from_str, from_none], self.schedule) + if self.session_duration is not None: + result["sessionDuration"] = from_union([to_float, from_none], self.session_duration) + if self.status is not None: + result["status"] = from_union([lambda x: to_enum(IndecentStatus, x), from_none], self.status) + if self.timezone is not None: + result["timezone"] = from_union([from_str, from_none], self.timezone) result["updatedAt"] = to_float(self.updated_at) return result -class SpaceSiteDeleteParams: - site_id: str - """The ID of the site to delete""" +class ContactTaskListStreamItemType(Enum): + """The type of event""" - space_id: str + ITEM = "item" - def __init__(self, site_id: str, space_id: str) -> None: - self.site_id = site_id - self.space_id = space_id + +class ContactTaskListStreamItem: + data: ContactTaskListStreamItemData + """Instance list properties""" + + type: ContactTaskListStreamItemType + """The type of event""" + + def __init__(self, data: ContactTaskListStreamItemData, type: ContactTaskListStreamItemType) -> None: + self.data = data + self.type = type @staticmethod - def from_dict(obj: Any) -> 'SpaceSiteDeleteParams': + def from_dict(obj: Any) -> 'ContactTaskListStreamItem': assert isinstance(obj, dict) - site_id = from_str(obj.get("siteId")) - space_id = from_str(obj.get("spaceId")) - return SpaceSiteDeleteParams(site_id, space_id) + data = ContactTaskListStreamItemData.from_dict(obj.get("data")) + type = ContactTaskListStreamItemType(obj.get("type")) + return ContactTaskListStreamItem(data, type) def to_dict(self) -> dict: result: dict = {} - result["siteId"] = from_str(self.site_id) - result["spaceId"] = from_str(self.space_id) + result["data"] = to_class(ContactTaskListStreamItemData, self.data) + result["type"] = to_enum(ContactTaskListStreamItemType, self.type) return result -class SpaceSiteDeleteResponse: - id: str - """The ID of the deleted site""" +class ContactSpaceListParamsOrder(Enum): + """The order of the paginated items""" - def __init__(self, id: str) -> None: - self.id = id + ASC = "asc" + DESC = "desc" - @staticmethod - def from_dict(obj: Any) -> 'SpaceSiteDeleteResponse': - assert isinstance(obj, dict) - id = from_str(obj.get("id")) - return SpaceSiteDeleteResponse(id) - def to_dict(self) -> dict: - result: dict = {} - result["id"] = from_str(self.id) - return result +class ContactSpaceListParams: + contact_id: str + """The ID of the contact to list spaces for""" + cursor: Optional[str] + """The cursor to use for pagination""" -class SpaceSiteFetchParams: - site_id: str - """The ID of the site to retrieve""" + order: Optional[ContactSpaceListParamsOrder] + """The order of the paginated items""" - space_id: str + take: Optional[int] + """The number of items to retrieve""" - def __init__(self, site_id: str, space_id: str) -> None: - self.site_id = site_id - self.space_id = space_id + def __init__(self, contact_id: str, cursor: Optional[str], order: Optional[ContactSpaceListParamsOrder], take: Optional[int]) -> None: + self.contact_id = contact_id + self.cursor = cursor + self.order = order + self.take = take @staticmethod - def from_dict(obj: Any) -> 'SpaceSiteFetchParams': + def from_dict(obj: Any) -> 'ContactSpaceListParams': assert isinstance(obj, dict) - site_id = from_str(obj.get("siteId")) - space_id = from_str(obj.get("spaceId")) - return SpaceSiteFetchParams(site_id, space_id) + contact_id = from_str(obj.get("contactId")) + cursor = from_union([from_str, from_none], obj.get("cursor")) + order = from_union([ContactSpaceListParamsOrder, from_none], obj.get("order")) + take = from_union([from_int, from_none], obj.get("take")) + return ContactSpaceListParams(contact_id, cursor, order, take) def to_dict(self) -> dict: result: dict = {} - result["siteId"] = from_str(self.site_id) - result["spaceId"] = from_str(self.space_id) + result["contactId"] = from_str(self.contact_id) + if self.cursor is not None: + result["cursor"] = from_union([from_str, from_none], self.cursor) + if self.order is not None: + result["order"] = from_union([lambda x: to_enum(ContactSpaceListParamsOrder, x), from_none], self.order) + if self.take is not None: + result["take"] = from_union([from_int, from_none], self.take) return result -class SpaceSiteFetchResponse: +class ContactSpaceListResponseItem: """Instance list properties""" - alias: Optional[str] - """The unique alias for the instance""" + contact_id: Optional[str] + """The contact id assigned to this space""" created_at: float """The timestamp (ms) when the instance was created""" @@ -47168,126 +45776,93 @@ class SpaceSiteFetchResponse: description: Optional[str] """The associated description""" - domain: Optional[str] - """The host the site is served at""" - id: str """The instance ID""" - index: Optional[str] - """Directory index filename""" - meta: Optional[Dict[str, Any]] """Meta data information""" name: Optional[str] """The associated name""" - not_found: Optional[str] - """Not found filename""" - - prefix: Optional[str] - """The folder prefix inside the space""" - - space_id: Optional[str] - """The space the site belongs to""" - updated_at: float """The timestamp (ms) when the instance was updated""" - def __init__(self, alias: Optional[str], created_at: float, description: Optional[str], domain: Optional[str], id: str, index: Optional[str], meta: Optional[Dict[str, Any]], name: Optional[str], not_found: Optional[str], prefix: Optional[str], space_id: Optional[str], updated_at: float) -> None: - self.alias = alias + def __init__(self, contact_id: Optional[str], created_at: float, description: Optional[str], id: str, meta: Optional[Dict[str, Any]], name: Optional[str], updated_at: float) -> None: + self.contact_id = contact_id self.created_at = created_at self.description = description - self.domain = domain self.id = id - self.index = index self.meta = meta self.name = name - self.not_found = not_found - self.prefix = prefix - self.space_id = space_id self.updated_at = updated_at @staticmethod - def from_dict(obj: Any) -> 'SpaceSiteFetchResponse': + def from_dict(obj: Any) -> 'ContactSpaceListResponseItem': assert isinstance(obj, dict) - alias = from_union([from_str, from_none], obj.get("alias")) + contact_id = from_union([from_str, from_none], obj.get("contactId")) created_at = from_float(obj.get("createdAt")) description = from_union([from_str, from_none], obj.get("description")) - domain = from_union([from_str, from_none], obj.get("domain")) id = from_str(obj.get("id")) - index = from_union([from_str, from_none], obj.get("index")) meta = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("meta")) name = from_union([from_str, from_none], obj.get("name")) - not_found = from_union([from_str, from_none], obj.get("notFound")) - prefix = from_union([from_str, from_none], obj.get("prefix")) - space_id = from_union([from_str, from_none], obj.get("spaceId")) updated_at = from_float(obj.get("updatedAt")) - return SpaceSiteFetchResponse(alias, created_at, description, domain, id, index, meta, name, not_found, prefix, space_id, updated_at) + return ContactSpaceListResponseItem(contact_id, created_at, description, id, meta, name, updated_at) def to_dict(self) -> dict: result: dict = {} - if self.alias is not None: - result["alias"] = from_union([from_str, from_none], self.alias) + if self.contact_id is not None: + result["contactId"] = from_union([from_str, from_none], self.contact_id) result["createdAt"] = to_float(self.created_at) if self.description is not None: result["description"] = from_union([from_str, from_none], self.description) - if self.domain is not None: - result["domain"] = from_union([from_str, from_none], self.domain) result["id"] = from_str(self.id) - if self.index is not None: - result["index"] = from_union([from_str, from_none], self.index) if self.meta is not None: result["meta"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.meta) if self.name is not None: result["name"] = from_union([from_str, from_none], self.name) - if self.not_found is not None: - result["notFound"] = from_union([from_str, from_none], self.not_found) - if self.prefix is not None: - result["prefix"] = from_union([from_str, from_none], self.prefix) - if self.space_id is not None: - result["spaceId"] = from_union([from_str, from_none], self.space_id) result["updatedAt"] = to_float(self.updated_at) return result -class SpaceSiteUpdateParams: - site_id: str - space_id: str +class ContactSpaceListResponse: + cursor: str + """Cursor for fetching the next page""" - def __init__(self, site_id: str, space_id: str) -> None: - self.site_id = site_id - self.space_id = space_id + items: List[ContactSpaceListResponseItem] + + def __init__(self, cursor: str, items: List[ContactSpaceListResponseItem]) -> None: + self.cursor = cursor + self.items = items @staticmethod - def from_dict(obj: Any) -> 'SpaceSiteUpdateParams': + def from_dict(obj: Any) -> 'ContactSpaceListResponse': assert isinstance(obj, dict) - site_id = from_str(obj.get("siteId")) - space_id = from_str(obj.get("spaceId")) - return SpaceSiteUpdateParams(site_id, space_id) + cursor = from_str(obj.get("cursor")) + items = from_list(ContactSpaceListResponseItem.from_dict, obj.get("items")) + return ContactSpaceListResponse(cursor, items) def to_dict(self) -> dict: result: dict = {} - result["siteId"] = from_str(self.site_id) - result["spaceId"] = from_str(self.space_id) + result["cursor"] = from_str(self.cursor) + result["items"] = from_list(lambda x: to_class(ContactSpaceListResponseItem, x), self.items) return result -class SpaceSiteUpdateRequest: - """Instance crud properties""" +class ContactSpaceListStreamItemData: + """Instance list properties""" - alias: Optional[str] - """The unique alias for the instance""" + contact_id: Optional[str] + """The contact id assigned to this space""" + + created_at: float + """The timestamp (ms) when the instance was created""" description: Optional[str] """The associated description""" - domain: Optional[str] - """The host the site is served at (a