- Add controllers (Auth, Chat, Event) with placeholder implementations - Add services (Auth, Chat, Event) with business logic interfaces - Add repositories with MongoDB/Mongoose models (User, Event, Chat) - Add middleware for JWT authentication - Add Claude AI adapter implementing AIProvider interface - Add utility modules for JWT and password handling - Add shared types and DTOs for User, CalendarEvent, ChatMessage - Configure routes with proper endpoint structure - Update app.ts with dependency injection setup - Add required dependencies: mongoose, bcrypt, jsonwebtoken, @anthropic-ai/sdk
24 lines
863 B
TypeScript
24 lines
863 B
TypeScript
import { ChatMessage, Conversation, CreateMessageDTO, GetMessagesOptions } from '@caldav/shared';
|
|
import { ChatRepository } from '../../services/interfaces';
|
|
import { ChatMessageModel, ConversationModel } from './models';
|
|
|
|
export class MongoChatRepository implements ChatRepository {
|
|
// Conversations
|
|
async getConversationsByUser(userId: string): Promise<Conversation[]> {
|
|
throw new Error('Not implemented');
|
|
}
|
|
|
|
async createConversation(userId: string): Promise<Conversation> {
|
|
throw new Error('Not implemented');
|
|
}
|
|
|
|
// Messages (cursor-based pagination)
|
|
async getMessages(conversationId: string, options?: GetMessagesOptions): Promise<ChatMessage[]> {
|
|
throw new Error('Not implemented');
|
|
}
|
|
|
|
async createMessage(conversationId: string, message: CreateMessageDTO): Promise<ChatMessage> {
|
|
throw new Error('Not implemented');
|
|
}
|
|
}
|