Files
prism/backend/dist/modules/messages/messages.service.d.ts

14 lines
771 B
TypeScript

import { Repository } from 'typeorm';
import { Message } from './entities/message.entity';
import { ConversationsService } from '../conversations/conversations.service';
export declare class MessagesService {
private messagesRepository;
private conversationsService;
constructor(messagesRepository: Repository<Message>, conversationsService: ConversationsService);
create(conversationId: string, senderId: string, content: string): Promise<Message>;
findAllInConversation(conversationId: string, userId: string): Promise<Message[]>;
update(messageId: string, userId: string, content: string): Promise<Message>;
markAsRead(messageId: string, userId: string): Promise<Message>;
delete(messageId: string, userId: string): Promise<boolean>;
}