import { APIResource } from "../../core/resource.js"; import * as MessageAPI from "../message/message.js"; import { APIPromise } from "../../core/api-promise.js"; import { RequestOptions } from "../../internal/request-options.js"; export declare class Shared extends APIResource { /** * Get a shared conversation by its share ID, including all messages and * attachments. */ retrieve(sharedConversationID: string, params?: SharedRetrieveParams | null | undefined, options?: RequestOptions): APIPromise; /** * Get all shared conversations of current user. */ list(params?: SharedListParams | null | undefined, options?: RequestOptions): APIPromise; /** * Delete a shared conversation by its share ID. */ delete(sharedConversationID: string, params?: SharedDeleteParams | null | undefined, options?: RequestOptions): APIPromise; /** * Clone a shared conversation to a new conversation. */ clone(sharedConversationID: string, params: SharedCloneParams, options?: RequestOptions): APIPromise; } /** * Conversation model. * * Attributes: id (str): The conversation ID. user*id (str): The user ID. title * (str | None): The conversation title. created_time (datetime): The creation * time. updated_time (datetime): The last update time. is_active (bool): Whether * the conversation is active. chatbot_id (str): The chatbot ID. is_anonymized * (bool): Whether the conversation is anonymized. deanonymized_mapping (dict[str, * str]): Mapping of anonymized to original values. first_matching_message_id (str * | None): First message ID that matches search query. first_matching_message (str * | None): First message that matches search query. metadata* (dict[str, Any] | * None): Additional metadata for the conversation. digital_employee_id (str | * None): The active Digital Employee's local id, or None if no Digital Employee is * active on this conversation. de_activated_at (datetime | None): When the active * Digital Employee became active. */ export interface Conversation { id: string; chatbot_id: string; created_time: string; is_active: boolean; is_anonymized: boolean; updated_time: string; user_id: string; de_activated_at?: string | null; deanonymized_mapping?: { [key: string]: string; }; digital_employee_id?: string | null; first_matching_message?: string | null; first_matching_message_id?: string | null; metadata_?: { [key: string]: unknown; } | null; title?: string | null; } /** * Response model for getting a shared conversation. * * Attributes: messages (list[Message]): List of messages in the shared * conversation. conversation (Conversation): The conversation details. * conversation_title (str): The title of the conversation by the time of sharing. * last_updated_time (datetime): The last time the shared conversation was updated. * expired_time (datetime | None): When the shared conversation access id expires. * attachments (list[dict[str, Any]]): List of attachments in the conversation. * chatbot (dict[str, Any]): The chatbot associated with the conversation. */ export interface GetSharedConversation { chatbot: { [key: string]: unknown; }; /** * Conversation model. * * Attributes: id (str): The conversation ID. user*id (str): The user ID. title * (str | None): The conversation title. created_time (datetime): The creation * time. updated_time (datetime): The last update time. is_active (bool): Whether * the conversation is active. chatbot_id (str): The chatbot ID. is_anonymized * (bool): Whether the conversation is anonymized. deanonymized_mapping (dict[str, * str]): Mapping of anonymized to original values. first_matching_message_id (str * | None): First message ID that matches search query. first_matching_message (str * | None): First message that matches search query. metadata* (dict[str, Any] | * None): Additional metadata for the conversation. digital_employee_id (str | * None): The active Digital Employee's local id, or None if no Digital Employee is * active on this conversation. de_activated_at (datetime | None): When the active * Digital Employee became active. */ conversation: Conversation; last_updated_time: string; messages: Array; attachments?: Array<{ [key: string]: unknown; }>; expired_time?: string | null; } export type SharedListResponse = { [key: string]: Array; }; export declare namespace SharedListResponse { /** * shared conversation model. * * Attributes: id (str): The shared conversation ID. user_id (str): The user ID. * conversation_id (str): The conversation ID. conversation_title (str): The * conversation title by the time of sharing. created_time (datetime): The creation * time. last_updated_time (datetime): The last snapshot time. expired_time * (datetime | None): The expiration time for the shared conversation. * first_matching_word (str | None): The first matching word. is_active (bool): * Whether the shared conversation is active. mind_map (str | None): The JSON * string of mind map for the shared conversation. */ interface Item { id: string; conversation_id: string; conversation_title: string; created_time: string; last_updated_time: string; user_id: string; expired_time?: string | null; first_matching_word?: string | null; is_active?: boolean; mind_map?: string | null; } } export type SharedDeleteResponse = { [key: string]: string; }; export type SharedCloneResponse = unknown; export interface SharedRetrieveParams { 'Accept-Language'?: string; 'If-None-Match'?: string; /** * Set to `structured` to receive errors in the structured envelope. Omit it to * keep the legacy error body. */ 'X-Error-Format'?: string; } export interface SharedListParams { /** * Query param: Search query for conversation title */ query?: string | null; /** * Header param */ 'Accept-Language'?: 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 SharedDeleteParams { '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 interface SharedCloneParams { /** * Body param */ old_parent_id: string; /** * Body param */ user_id: string; /** * Body param */ new_conversation_id?: string | null; /** * Header param */ 'Accept-Language'?: 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 declare namespace Shared { export { type Conversation as Conversation, type GetSharedConversation as GetSharedConversation, type SharedListResponse as SharedListResponse, type SharedDeleteResponse as SharedDeleteResponse, type SharedCloneResponse as SharedCloneResponse, type SharedRetrieveParams as SharedRetrieveParams, type SharedListParams as SharedListParams, type SharedDeleteParams as SharedDeleteParams, type SharedCloneParams as SharedCloneParams, }; } //# sourceMappingURL=shared.d.ts.map