import { APIResource } from "../core/resource.mjs"; import { APIPromise } from "../core/api-promise.mjs"; import { Cursor, type CursorParams, PagePromise } from "../core/pagination.mjs"; import { RequestOptions } from "../internal/request-options.mjs"; export declare class Conversations extends APIResource { /** * Get details of a specific conversation including all messages. */ retrieve(id: string, options?: RequestOptions): APIPromise; /** * List conversations for the project with optional filtering. * * Conversations store chat history between users and agents. Use filters to narrow * down results by agent name or identity fields. * * **Filters:** * * - `agent_name`: Filter by agent name * - `identity.*`: Filter by identity fields (e.g., identity.user_id=user_123) */ list(query?: ConversationListParams | null | undefined, options?: RequestOptions): PagePromise; /** * Delete a conversation and all its messages. This action cannot be undone. */ delete(id: string, options?: RequestOptions): APIPromise; } export type ConversationsCursor = Cursor; export interface Conversation { /** * Unique conversation ID */ id: string; /** * Agent name */ agentName: string; /** * When the conversation was created */ createdAt: string; /** * Identity fields for conversation scoping */ identity: { [key: string]: unknown; }; /** * Project ID */ projectId: string; /** * When the conversation was last updated */ updatedAt: string; } export interface ConversationRetrieveResponse extends Conversation { /** * Conversation messages */ messages: Array; } export declare namespace ConversationRetrieveResponse { interface Message { /** * Unique message ID */ id: string; /** * Message content */ content: string | Array | null; /** * Conversation ID */ conversationId: string; /** * When the message was created */ createdAt: string; /** * Tool name (for tool messages) */ name: string | null; /** * Message role */ role: 'system' | 'user' | 'assistant' | 'tool' | 'developer'; /** * Tool call ID (for tool messages) */ toolCallId: string | null; /** * Tool calls (for assistant messages) */ toolCalls?: unknown; } } export interface ConversationListParams extends CursorParams { /** * Filter by agent name */ agent_name?: string; } export declare namespace Conversations { export { type Conversation as Conversation, type ConversationRetrieveResponse as ConversationRetrieveResponse, type ConversationsCursor as ConversationsCursor, type ConversationListParams as ConversationListParams, }; } //# sourceMappingURL=conversations.d.mts.map