/// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// import type { FilterQuery } from 'mongoose'; import type { AppConfig, IConversation } from '~/types'; import type { MessageMethods } from './message'; import type { DeleteResult } from 'mongoose'; export interface ConversationMethods { getConvoFiles(conversationId: string): Promise; searchConversation(conversationId: string): Promise; deleteNullOrEmptyConversations(): Promise<{ conversations: { deletedCount?: number; }; messages: { deletedCount?: number; }; }>; saveConvo(ctx: { userId: string; isTemporary?: boolean; interfaceConfig?: AppConfig['interfaceConfig']; }, data: { conversationId: string; newConversationId?: string; [key: string]: unknown; }, metadata?: { context?: string; unsetFields?: Record; noUpsert?: boolean; }): Promise; bulkSaveConvos(conversations: Array>): Promise; getConvosByCursor(user: string, options?: { cursor?: string | null; limit?: number; isArchived?: boolean; tags?: string[]; search?: string; sortBy?: string; sortDirection?: string; }): Promise<{ conversations: IConversation[]; nextCursor: string | null; }>; getConvosQueried(user: string, convoIds: Array<{ conversationId: string; }> | null, cursor?: string | null, limit?: number): Promise<{ conversations: IConversation[]; nextCursor: string | null; convoMap: Record; }>; getConvo(user: string, conversationId: string): Promise; getConvoTitle(user: string, conversationId: string): Promise; deleteConvos(user: string, filter: FilterQuery): Promise; } export declare function createConversationMethods(mongoose: typeof import('mongoose'), messageMethods?: Pick): ConversationMethods;