// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../../core/resource'; import * as ConnectorsAPI from '../../connectors'; import * as Shared from '../../shared'; export class V2 extends APIResource {} /** * Admin Connector model. * * Attributes: id (str): The unique identifier of the connector. name (str): The * name of the connector. display_name (str): The display name of the connector. * description (str | None, optional): The description of the connector. Defaults * to None. icon (str | None, optional): The icon of the connector. Defaults to * None. is_active (bool): Whether the connector is active. knowledge_source(bool): * Determine if the connector will be shown in /connectors endpoint and admin * chatbot endpoints. is_connected (bool, optional): Whether the current user is * connected to the connector and can use it. Defaults to False. status * (ConnectorStatus, optional): The current user's connection state, including * whether the connector must be reconnected. Defaults to * ConnectorStatus.NOT_CONNECTED. chatbots (list[AdminChatbotConnectorModel], * optional): List of chatbot connectors. Defaults to []. */ export interface AdminConnector { id: string; display_name: string; is_active: boolean; name: string; chatbots?: Array; description?: string | null; icon?: string | null; is_connected?: boolean; knowledge_source?: boolean; organization_id?: string | null; /** * A user's connection state for a connector. */ status?: ConnectorsAPI.ConnectorStatus; } export namespace AdminConnector { /** * Admin Chatbot Connector model. * * Attributes: id (str): Chatbot connector ID. chatbot_id (str): Chatbot ID. * chatbot_name (str): Chatbot name. */ export interface Chatbot { id: string; chatbot_id: string; chatbot_name: string; } } /** * Admin User model. */ export interface AdminUser { id: string; username: string; /** * Account type. */ account_type?: 'regular' | 'sso' | null; auth_id?: string | null; bosa_secret?: string | null; chatbots?: Array; display_name?: string | null; email?: string | null; is_active?: boolean; is_locked?: boolean; /** * Whether the account is suspended globally by a global admin. `is_active` is * scoped to the organization the request was made for, so a client that needs the * account-wide status must read this field instead. `null` means this endpoint * does not report it; treat that as unknown rather than as not suspended. */ is_suspended?: boolean | null; is_verified?: boolean; llm_labs_user_id?: string | null; organizations?: Array; phone_number?: string | null; picture?: string | null; privacy_policy_consent?: boolean; /** * Effective quota status for this user in the current organisation context. */ quotas?: Array; requires_mfa?: boolean; roles?: Array; teams?: Array; use_memory?: boolean; use_personalization?: boolean; user_accounts?: Array; /** * Admin User Domain model. */ user_domain?: Shared.AdminUserDomainModel | null; } export namespace AdminUser { /** * Base schema for organization response data. * * This class serves as a base for organization-related response schemas, providing * common fields that are used across different response types. * * Args: id (str): Unique identifier for the organization. name (str): Organization * name. slug (str | None): URL-friendly organization identifier. Defaults to None. * team_id (str | None): Associated team identifier. Defaults to None. * encrypt_messages_enabled (bool | None): Whether encryption is enabled. Defaults * to None. aip_account_id (str | None): Encrypted AIP account ID. Defaults to * None. aip_api_key (str | None): Encrypted AIP API key. Defaults to None * crypto_normalized_mode (CryptoNormalizedMode | None): The crypto normalized * mode. Defaults to None. glconnector_api_key (str | None): Encrypted GLConnector * API key. Defaults to None. glmessaging_api_key (str | None): Encrypted GL * Messaging organization API key. Defaults to None. smart_search_client_id (str | * None): Encrypted SmartSearch client ID. Defaults to None. smart_search_api_key * (str | None): Encrypted SmartSearch API key. Defaults to None. */ export interface Organization { id: string; name: string; aip_account_id?: string | null; aip_api_key?: string | null; allow_all_domains?: boolean | null; /** * Enumeration for crypto normalization modes. */ crypto_normalized_mode?: 'PLAINTEXT' | 'CIPHERTEXT' | 'NORMALIZING' | 'ENCRYPT_FAILED' | 'DECRYPT_FAILED' | null; encrypt_messages_enabled?: boolean | null; glconnector_api_key?: string | null; glmessaging_api_key?: string | null; slug?: string | null; smart_search_api_key?: string | null; smart_search_client_id?: string | null; team_id?: string | null; } /** * Resource Quota with Remaining Response. */ export interface Quota { id: string; limit: number; /** * Enum for quota names. */ name: 'message' | 'message_per_user' | 'application' | 'admin' | 'user'; usage: number; } /** * Admin Role model. */ export interface Role { id: string; name: string; display_name?: string | null; organization_id?: string | null; } /** * Team response schema. * * This model represents the complete team data returned by the API. It includes * all team information along with related entities like users and chatbots. * * Attributes: id (str): Internal database ID of the team. name (str): Team name. * description (str | None): Description of the team. is_active (bool): Whether the * team is active. organization_id (str): Organization ID for multi-tenancy. users * (list[UserInfo]): List of users assigned to the team. chatbots * (list[ChatbotInfo]): List of chatbots assigned to the team. created_at (datetime * | None): Creation timestamp. updated_at (datetime | None): Last update * timestamp. creator (UserInfo | None): User who created the team. updater * (UserInfo | None): User who last updated the team. */ export interface Team { id: string; name: string; organization_id: string; chatbots?: Array; /** * Number of chatbots assigned to the team */ chatbots_count?: number | null; created_at?: string | null; /** * User information shared across all providers. */ creator?: Shared.UserInfo | null; description?: string | null; is_active?: boolean; updated_at?: string | null; /** * User information shared across all providers. */ updater?: Shared.UserInfo | null; users?: Array; /** * Number of users assigned to the team */ users_count?: number | null; } export namespace Team { /** * Model for chatbot in preset response. */ export interface Chatbot { chatbot_id: string; chatbot_name?: string | null; } } /** * Admin User account model. */ export interface UserAccount { id: string; provider: string; provider_account_id?: string | null; } } export declare namespace V2 { export { type AdminConnector as AdminConnector, type AdminUser as AdminUser }; }