import { ChatMessage, Conversation, CreateMessageDTO, CreateEventDTO, GetMessagesOptions, UpdateMessageDTO, ConflictingEvent, } from "@calchat/shared"; export interface ChatRepository { // Conversations getConversationsByUser(userId: string): Promise; getConversationById(conversationId: string): Promise; createConversation(userId: string): Promise; // Messages (cursor-based pagination) getMessages( conversationId: string, options?: GetMessagesOptions, ): Promise; createMessage( conversationId: string, message: CreateMessageDTO, ): Promise; updateMessage( messageId: string, updates: UpdateMessageDTO, ): Promise; updateProposalResponse( messageId: string, proposalId: string, respondedAction: "confirm" | "reject", ): Promise; updateProposalEvent( messageId: string, proposalId: string, event: CreateEventDTO, conflictingEvents?: ConflictingEvent[], ): Promise; getMessageById(messageId: string): Promise; }