import { APIResource } from "../core/resource.js"; import * as ChatbotsAPI from "./chatbots.js"; import * as MessageAPI from "./message/message.js"; import * as V2API from "./auth/whatsapp/v2.js"; import * as V2ChatbotsAPI from "./v2/chatbots/chatbots.js"; import * as ModelsAPI from "./v2/chatbots/models.js"; import { APIPromise } from "../core/api-promise.js"; import { RequestOptions } from "../internal/request-options.js"; export declare class Chatbots extends APIResource { /** * Retrieve a list of chatbots available for the specified user, including their * models, agents, search types, and other configurations */ list(params?: ChatbotListParams | null | undefined, options?: RequestOptions): APIPromise; /** * Retrieve the right-sidebar filter for a specific chatbot. This filter is fetched * from the chatbot's preset. */ retrieveFilters(chatbotID: string, params?: ChatbotRetrieveFiltersParams | null | undefined, options?: RequestOptions): APIPromise; } /** * Chatbot payload for `GET /v2/chatbots` (models are fetched on demand via * dedicated endpoints). */ export interface ChatbotItemV2 { /** * The unique identifier for the chatbot */ id: string; /** * List of agents supported by the chatbot */ agents: Array<{ [key: string]: unknown; }>; /** * The maximum number of chat history messages to keep for this chatbot */ chat_history_limit: number; /** * Whether the chatbot anonymizes PII by default */ default_pii_anonymization: boolean; /** * A brief description of the chatbot */ description: string; /** * Dictionary of discovery providers and their configurations */ discovery_providers: { [key: string]: string; }; /** * The display name of the chatbot */ display_name: string; /** * List of supported search types for the chatbot */ search_types: Array; /** * Whether the chatbot supports anonymizing personally identifiable information * (PII) */ support_pii_anonymization: boolean; /** * The tenant ID for the chatbot */ tenant_id: string; /** * Whether the chatbot's pipeline anonymizes PII in language model (LLM) * interactions */ anonymize_lm?: boolean; /** * Enum for click behaviour. */ click_behaviour?: ClickBehaviour | null; /** * List of connectors for the chatbot */ connectors?: Array | null; /** * The dark logo URL for the chatbot */ dark_logo_url?: string | null; /** * The default agent object for this chatbot when enable_default_agent is True */ default_agent?: { [key: string]: unknown; } | null; /** * The Digital Employee a project is locked to in focus mode, as shown in the * chatbot response. * * Built best-effort: when the profile can't be fetched from GL Runner, only `id` * is set and `is_available` is False, so a GL Runner outage never fails the * chatbot response. * * Attributes: id (str): GLChat's local Digital Employee id (the * `digital_employee_id` `/message` takes). name (str | None): Display name, or * None when the profile couldn't be fetched. role_title (str | None): * Human-readable role/title. avatar_url (str | None): Avatar image URL. * description (str): Short "who this DE is" blurb. is_available (bool): True only * when GL Runner reports the Digital Employee as active. False when it is * inactive, no longer exists, or the lookup failed. is_pinned (bool): Whether the * calling user has pinned this Digital Employee in the project it is listed under. * Always False for guests and wherever no project/user context applies. */ default_digital_employee?: V2ChatbotsAPI.DefaultDigitalEmployee | null; /** * Available Digital Employees bound to this project, like `agents`. Guests get it * too. Empty when none are bound, the feature is off, or GL Runner can't be * reached */ digital_employees?: Array; /** * Enum for display type. */ display_type?: DisplayType | null; /** * File extensions supported by the chatbot's DPO/knowledge base ingestion; null * when the chatbot's pipeline has use_docproc disabled */ dpo_supported_files?: Array | null; /** * @deprecated Deprecated: use `enable_focus_mode`. Whether the project is locked * to its default agent. */ enable_default_agent?: boolean; /** * Whether focus mode is on: the project is locked to either `default_agent` or * `default_digital_employee` */ enable_focus_mode?: boolean; /** * Whether live chat feature is enabled for this chatbot */ enable_live_chat?: boolean; /** * Whether the smart prompt suggestion feature is enabled for the chat page */ enable_smart_prompt_suggestion?: boolean; /** * Whether the chatbot supports smart search integration */ enable_smart_search_integration?: boolean; /** * Whether the prompt enhancement feature is enabled for this chatbot */ is_enhance_prompt_enabled?: boolean; /** * Whether the chatbot uses an external pipeline */ is_external_pipeline?: boolean; /** * Whether question library is enabled for this chatbot */ is_question_library?: boolean; /** * The light logo URL for the chatbot */ light_logo_url?: string | null; /** * The maximum file count supported by the chatbot */ max_file_count?: number | null; /** * The maximum file size supported by the chatbot */ max_file_size?: number | null; /** * Maximum number of questions to show */ max_question_show?: number | null; /** * Phone number for the chatbot */ phone_number?: string | null; /** * Full question library with categories and questions */ question_library?: Array<{ [key: string]: string; }> | null; /** * List of questions to show based on max_question_show and display_type */ question_show_list?: Array | null; /** * The query-routing strategy for retrieval: Off / Query Transformation / Smart * Retrieve */ retrieval_query_strategy?: string; /** * Whether to show app logo */ show_app_logo?: boolean; /** * Whether the smart mode toggle is visible to users in the UI */ show_smart_mode_toggle?: boolean; /** * Default on/off state of the smart mode toggle for the FE */ smart_mode_default_value?: boolean; /** * Whether to use tenant logo */ use_tenant_logo?: boolean; } /** * Enum for click behaviour. */ export type ClickBehaviour = 'SEND' | 'EDIT'; /** * Enum for display type. */ export type DisplayType = 'BY_ORDER' | 'RANDOM'; /** * Response model for getting user chatbots. * * Attributes: chatbots (list[ChatbotItem]): List of chatbots available to the * user. */ export interface ChatbotListResponse { chatbots: Array; } export declare namespace ChatbotListResponse { /** * Model for a chatbot item (includes embedded model list). * * Attributes: models (list[ChatbotModelItem]): List of models supported by the * chatbot. */ interface Chatbot { /** * The unique identifier for the chatbot */ id: string; /** * List of agents supported by the chatbot */ agents: Array<{ [key: string]: unknown; }>; /** * The maximum number of chat history messages to keep for this chatbot */ chat_history_limit: number; /** * Whether the chatbot anonymizes PII by default */ default_pii_anonymization: boolean; /** * A brief description of the chatbot */ description: string; /** * Dictionary of discovery providers and their configurations */ discovery_providers: { [key: string]: string; }; /** * The display name of the chatbot */ display_name: string; /** * List of models supported by the chatbot */ models: Array; /** * List of supported search types for the chatbot */ search_types: Array; /** * Whether the chatbot supports anonymizing personally identifiable information * (PII) */ support_pii_anonymization: boolean; /** * The tenant ID for the chatbot */ tenant_id: string; /** * Whether the chatbot's pipeline anonymizes PII in language model (LLM) * interactions */ anonymize_lm?: boolean; /** * Enum for click behaviour. */ click_behaviour?: ChatbotsAPI.ClickBehaviour | null; /** * List of connectors for the chatbot */ connectors?: Array | null; /** * The dark logo URL for the chatbot */ dark_logo_url?: string | null; /** * The default agent object for this chatbot when enable_default_agent is True */ default_agent?: { [key: string]: unknown; } | null; /** * The Digital Employee a project is locked to in focus mode, as shown in the * chatbot response. * * Built best-effort: when the profile can't be fetched from GL Runner, only `id` * is set and `is_available` is False, so a GL Runner outage never fails the * chatbot response. * * Attributes: id (str): GLChat's local Digital Employee id (the * `digital_employee_id` `/message` takes). name (str | None): Display name, or * None when the profile couldn't be fetched. role_title (str | None): * Human-readable role/title. avatar_url (str | None): Avatar image URL. * description (str): Short "who this DE is" blurb. is_available (bool): True only * when GL Runner reports the Digital Employee as active. False when it is * inactive, no longer exists, or the lookup failed. is_pinned (bool): Whether the * calling user has pinned this Digital Employee in the project it is listed under. * Always False for guests and wherever no project/user context applies. */ default_digital_employee?: V2ChatbotsAPI.DefaultDigitalEmployee | null; /** * Available Digital Employees bound to this project, like `agents`. Guests get it * too. Empty when none are bound, the feature is off, or GL Runner can't be * reached */ digital_employees?: Array; /** * Enum for display type. */ display_type?: ChatbotsAPI.DisplayType | null; /** * File extensions supported by the chatbot's DPO/knowledge base ingestion; null * when the chatbot's pipeline has use_docproc disabled */ dpo_supported_files?: Array | null; /** * @deprecated Deprecated: use `enable_focus_mode`. Whether the project is locked * to its default agent. */ enable_default_agent?: boolean; /** * Whether focus mode is on: the project is locked to either `default_agent` or * `default_digital_employee` */ enable_focus_mode?: boolean; /** * Whether live chat feature is enabled for this chatbot */ enable_live_chat?: boolean; /** * Whether the smart prompt suggestion feature is enabled for the chat page */ enable_smart_prompt_suggestion?: boolean; /** * Whether the chatbot supports smart search integration */ enable_smart_search_integration?: boolean; /** * Whether the prompt enhancement feature is enabled for this chatbot */ is_enhance_prompt_enabled?: boolean; /** * Whether the chatbot uses an external pipeline */ is_external_pipeline?: boolean; /** * Whether question library is enabled for this chatbot */ is_question_library?: boolean; /** * The light logo URL for the chatbot */ light_logo_url?: string | null; /** * The maximum file count supported by the chatbot */ max_file_count?: number | null; /** * The maximum file size supported by the chatbot */ max_file_size?: number | null; /** * Maximum number of questions to show */ max_question_show?: number | null; /** * Phone number for the chatbot */ phone_number?: string | null; /** * Full question library with categories and questions */ question_library?: Array<{ [key: string]: string; }> | null; /** * List of questions to show based on max_question_show and display_type */ question_show_list?: Array | null; /** * The query-routing strategy for retrieval: Off / Query Transformation / Smart * Retrieve */ retrieval_query_strategy?: string; /** * Whether to show app logo */ show_app_logo?: boolean; /** * Whether the smart mode toggle is visible to users in the UI */ show_smart_mode_toggle?: boolean; /** * Default on/off state of the smart mode toggle for the FE */ smart_mode_default_value?: boolean; /** * Whether to use tenant logo */ use_tenant_logo?: boolean; } } export type ChatbotRetrieveFiltersResponse = Array; export declare namespace ChatbotRetrieveFiltersResponse { /** * Config value column definition type. * * Attributes: name (str): The name of the column. label (str): The label of the * column. default (Any | None): The default value of the column. placeholder (str * | None): The placeholder of the column. type (ConfigValueType): The type of the * column. is_range (bool): Whether the column is a range. is_multi (bool): Whether * the column is a multi-select. min_date (datetime.date | datetime.time | str | * None): The minimum date of the column. max_date (datetime.date | datetime.time | * str | None): The maximum date of the column. min (datetime.date | datetime.time * | str | int | float | None): The minimum value of the column. max (datetime.date * | datetime.time | str | int | float | None): The maximum value of the column. * step (int | float | None): The step of the column. options * (list[ConfigValueOption] | None): The options of the column. */ interface ChatbotRetrieveFiltersResponseItem { csv_name: string; is_field_of_interest: boolean; is_filter: boolean; label: string; name: string; default?: unknown; is_multi?: boolean | null; is_range?: boolean | null; max?: (string & {}) | (string & {}) | string | number | null; max_date?: (string & {}) | (string & {}) | string | null; min?: (string & {}) | (string & {}) | string | number | null; min_date?: (string & {}) | (string & {}) | string | null; options?: Array | null; placeholder?: string | null; step?: number | null; /** * Input type enum. */ type?: 'select' | 'date' | 'boolean' | 'number' | 'time' | 'string' | null; } namespace ChatbotRetrieveFiltersResponseItem { /** * Config value option type. */ interface Option { label: string; value: string; } } } export interface ChatbotListParams { /** * Query param: The phone number of the provider */ phone_number?: string | null; /** * Header param */ 'Accept-Language'?: string; /** * Header param */ 'If-None-Match'?: string; /** * Header param: Set to `structured` to receive errors in the structured envelope. * Omit it to keep the legacy error body. */ 'X-Error-Format'?: string; } export interface ChatbotRetrieveFiltersParams { 'Accept-Language'?: string; /** * Set to `structured` to receive errors in the structured envelope. Omit it to * keep the legacy error body. */ 'X-Error-Format'?: string; } export declare namespace Chatbots { export { type ChatbotItemV2 as ChatbotItemV2, type ClickBehaviour as ClickBehaviour, type DisplayType as DisplayType, type ChatbotListResponse as ChatbotListResponse, type ChatbotRetrieveFiltersResponse as ChatbotRetrieveFiltersResponse, type ChatbotListParams as ChatbotListParams, type ChatbotRetrieveFiltersParams as ChatbotRetrieveFiltersParams, }; } //# sourceMappingURL=chatbots.d.ts.map