mongodb-chatbot-ui
Version:
UI React components for the MongoDB Assistant
21 lines (20 loc) • 999 B
TypeScript
import { ConversationData, type MessageData } from "../services/conversations";
export declare abstract class ConversationCache {
protected version: number;
/**
* Get the current version of the cache. This number increments whenever
* the cache is modified and can be used to trigger UI updates.
*/
getVersion(): number;
abstract generateConversationName(): Promise<string>;
abstract getInfo(): Promise<{
_id: string;
name: string;
}[]>;
abstract getConversation(conversationId: string): Promise<ConversationData | null>;
abstract addConversation(conversation: ConversationData): Promise<void>;
abstract setConversation(conversation: ConversationData): Promise<void>;
abstract addMessagesToConversation(conversationId: string, messages: MessageData[]): Promise<void>;
abstract renameConversation(conversationId: string, name: string): Promise<void>;
abstract deleteConversation(conversationId: string): Promise<void>;
}