Files
SerpentRace/SerpentRace_Backend/dist/Domain/IRepository/IChatRepository.d.ts
T

27 lines
1.4 KiB
TypeScript

import { ChatAggregate } from '../Chat/ChatAggregate';
import { ChatArchiveAggregate } from '../Chat/ChatArchiveAggregate';
export interface IChatRepository {
create(chat: Partial<ChatAggregate>): Promise<ChatAggregate>;
findByPage(from: number, to: number): Promise<{
chats: ChatAggregate[];
totalCount: number;
}>;
findByPageIncludingDeleted(from: number, to: number): Promise<{
chats: ChatAggregate[];
totalCount: number;
}>;
findById(id: string): Promise<ChatAggregate | null>;
findByIdIncludingDeleted(id: string): Promise<ChatAggregate | null>;
findByUserId(userId: string): Promise<ChatAggregate[]>;
findByUserIdIncludingDeleted(userId: string): Promise<ChatAggregate[]>;
findByGameId(gameId: string): Promise<ChatAggregate | null>;
findActiveChatsForUser(userId: string): Promise<ChatAggregate[]>;
findInactiveChats(inactivityMinutes: number): Promise<ChatAggregate[]>;
update(id: string, update: Partial<ChatAggregate>): Promise<ChatAggregate | null>;
delete(id: string): Promise<any>;
softDelete(id: string): Promise<ChatAggregate | null>;
archiveChat(chat: ChatAggregate): Promise<ChatArchiveAggregate>;
getArchivedChat(chatId: string): Promise<ChatArchiveAggregate | null>;
restoreFromArchive(chatId: string): Promise<ChatAggregate | null>;
}
//# sourceMappingURL=IChatRepository.d.ts.map