import { APIResource } from "../../../../resource.js"; import * as Core from "../../../../core.js"; import { Page, type PageParams } from "../../../../pagination.js"; export declare class Messages extends APIResource { /** * Adds a message to a session */ create(appId: string, userId: string, sessionId: string, body: MessageCreateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Update the metadata of a Message */ update(appId: string, userId: string, sessionId: string, messageId: string, body: MessageUpdateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Get all messages for a session */ list(appId: string, userId: string, sessionId: string, params?: MessageListParams, options?: Core.RequestOptions): Core.PagePromise; list(appId: string, userId: string, sessionId: string, options?: Core.RequestOptions): Core.PagePromise; /** * Bulk create messages for a session while maintaining order. Maximum 100 messages * per batch. */ batch(appId: string, userId: string, sessionId: string, body: MessageBatchParams, options?: Core.RequestOptions): Core.APIPromise; /** * Get a Message by ID */ get(appId: string, userId: string, sessionId: string, messageId: string, options?: Core.RequestOptions): Core.APIPromise; } export declare class MessagesPage extends Page { } export interface Message { id: string; app_id: string; content: string; created_at: string; is_user: boolean; session_id: string; user_id: string; metadata?: Record; } export interface PageMessage { items: Array; page: number; size: number; total: number; pages?: number; } export type MessageBatchResponse = Array; export interface MessageCreateParams { content: string; is_user: boolean; metadata?: Record; } export interface MessageUpdateParams { metadata: Record; } export interface MessageListParams extends PageParams { /** * Query param: Whether to reverse the order of results */ reverse?: boolean | null; /** * Body param: */ filter?: Record | null; } export interface MessageBatchParams { messages: Array; } export declare namespace MessageBatchParams { interface Message { content: string; is_user: boolean; metadata?: Record; } } export declare namespace Messages { export { type Message as Message, type PageMessage as PageMessage, type MessageBatchResponse as MessageBatchResponse, MessagesPage as MessagesPage, type MessageCreateParams as MessageCreateParams, type MessageUpdateParams as MessageUpdateParams, type MessageListParams as MessageListParams, type MessageBatchParams as MessageBatchParams, }; } //# sourceMappingURL=messages.d.ts.map