import { APIResource } from "../../../resource.js"; import * as Core from "../../../core.js"; import * as WorkspacesAPI from "../workspaces.js"; import { Page, type PageParams } from "../../../pagination.js"; export declare class Messages extends APIResource { /** * Add new message(s) to a session. */ create(workspaceId: string, sessionId: string, body: MessageCreateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Update the metadata of a message. * * This will overwrite any existing metadata for the message. */ update(workspaceId: string, sessionId: string, messageId: string, body: MessageUpdateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Get all messages for a Session with optional filters. Results are paginated. */ list(workspaceId: string, sessionId: string, params?: MessageListParams, options?: Core.RequestOptions): Core.PagePromise; list(workspaceId: string, sessionId: string, options?: Core.RequestOptions): Core.PagePromise; /** * Get a single message by ID from a Session. */ get(workspaceId: string, sessionId: string, messageId: string, options?: Core.RequestOptions): Core.APIPromise; /** * Create messages from uploaded files. Files are converted to text and split into * multiple messages. */ upload(workspaceId: string, sessionId: string, body: MessageUploadParams, options?: Core.RequestOptions): Core.APIPromise; } export declare class MessagesPage extends Page { } export interface Message { id: string; content: string; created_at: string; peer_id: string; session_id: string; token_count: number; workspace_id: string; metadata?: { [key: string]: unknown; }; } export interface MessageCreate { content: string; peer_id: string; /** * The set of options that can be in a message DB-level configuration dictionary. * * All fields are optional. Message-level configuration overrides all other * configurations. */ configuration?: MessageCreate.Configuration | null; created_at?: string | null; metadata?: { [key: string]: unknown; } | null; } export declare namespace MessageCreate { /** * The set of options that can be in a message DB-level configuration dictionary. * * All fields are optional. Message-level configuration overrides all other * configurations. */ interface Configuration { /** * Configuration for reasoning functionality. */ reasoning?: WorkspacesAPI.ReasoningConfiguration | null; } } export type MessageCreateResponse = Array; export type MessageUploadResponse = Array; export interface MessageCreateParams { messages: Array; } export interface MessageUpdateParams { metadata?: { [key: string]: unknown; } | null; } export interface MessageListParams extends PageParams { /** * Query param: Whether to reverse the order of results */ reverse?: boolean | null; /** * Body param: */ filters?: { [key: string]: unknown; } | null; } export interface MessageUploadParams { file: Core.Uploadable; peer_id: string; configuration?: string | null; created_at?: string | null; metadata?: string | null; } export declare namespace Messages { export { type Message as Message, type MessageCreate as MessageCreate, type MessageCreateResponse as MessageCreateResponse, type MessageUploadResponse as MessageUploadResponse, MessagesPage as MessagesPage, type MessageCreateParams as MessageCreateParams, type MessageUpdateParams as MessageUpdateParams, type MessageListParams as MessageListParams, type MessageUploadParams as MessageUploadParams, }; } //# sourceMappingURL=messages.d.ts.map