import { APIResource } from "../../core/resource.mjs"; import { APIPromise } from "../../core/api-promise.mjs"; import { RequestOptions } from "../../internal/request-options.mjs"; export declare class Chat extends APIResource { /** * Retrieves feedback data for the organization with optional filtering * * @example * ```ts * await client.v1.chat.retrieveFeedback(); * ``` */ retrieveFeedback(query?: ChatRetrieveFeedbackParams | null | undefined, options?: RequestOptions): APIPromise; /** * Retrieves the specific message and full conversation for a feedback item * * @example * ```ts * await client.v1.chat.retrieveFeedbackContext('feedbackId'); * ``` */ retrieveFeedbackContext(feedbackID: string, options?: RequestOptions): APIPromise; /** * Streams a chat response in real-time using server-sent events (SSE). Supports * both AI SDK format (with messages array) and custom format (with message * object). * * @example * ```ts * await client.v1.chat.stream(); * ``` */ stream(params: ChatStreamParams, options?: RequestOptions): APIPromise; } export interface ChatRetrieveFeedbackParams { /** * Filter by component ID */ componentId?: string; /** * Filter by end date (ISO string) */ endDate?: string; /** * Filter by feedback type */ feedbackType?: 'thumbsUp' | 'thumbsDown'; /** * Filter by group ID */ groupId?: string; /** * Number of records to return (default: 100) */ limit?: string; /** * Number of records to skip (default: 0) */ skip?: string; /** * Filter by start date (ISO string) */ startDate?: string; /** * Filter by user ID */ userId?: string; } export interface ChatStreamParams { /** * Body param: Session ID (AI SDK uses "id") */ id?: string; /** * Body param: Component ID */ componentId?: string; /** * Body param: Additional context */ context?: unknown; /** * Body param: Group IDs for access control */ groupIds?: Array; /** * Body param: Single message for custom format - contains text and optional images */ message?: ChatStreamParams.Message; /** * Body param: Messages array for AI SDK format - list of conversation messages * with roles */ messages?: Array; /** * Body param: Session ID */ sessionId?: string; /** * Body param: Trigger for AI SDK (what triggered the message) */ trigger?: string; /** * Body param: User ID */ userId?: string; /** * Header param: Optional component ID for component-specific chat context */ 'x-component-id'?: string; } export declare namespace ChatStreamParams { /** * Single message for custom format - contains text and optional images */ interface Message { /** * Images attached to the message */ images?: Array; /** * Text content of the message */ text?: string; } namespace Message { interface Image { /** * Base64 encoded image data */ base64?: string; /** * Caption for the image */ caption?: string; /** * MIME type of the image */ mimeType?: string; /** * URL of the image */ url?: string; } } } export declare namespace Chat { export { type ChatRetrieveFeedbackParams as ChatRetrieveFeedbackParams, type ChatStreamParams as ChatStreamParams, }; } //# sourceMappingURL=chat.d.mts.map