chore(server): rename domain repositories -> interfaces (#8147)

rename domain repositories
This commit is contained in:
Daniel Dietzler 2024-03-21 12:59:49 +01:00 committed by GitHub
parent 44ed1f0919
commit b588a87d4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
155 changed files with 385 additions and 390 deletions

View file

@ -0,0 +1,19 @@
import { LibraryStatsResponseDto } from 'src/dtos/library.dto';
import { LibraryEntity, LibraryType } from 'src/entities/library.entity';
export const ILibraryRepository = 'ILibraryRepository';
export interface ILibraryRepository {
getCountForUser(ownerId: string): Promise<number>;
getAll(withDeleted?: boolean, type?: LibraryType): Promise<LibraryEntity[]>;
getAllDeleted(): Promise<LibraryEntity[]>;
get(id: string, withDeleted?: boolean): Promise<LibraryEntity | null>;
create(library: Partial<LibraryEntity>): Promise<LibraryEntity>;
delete(id: string): Promise<void>;
softDelete(id: string): Promise<void>;
getDefaultUploadLibrary(ownerId: string): Promise<LibraryEntity | null>;
getUploadLibraryCount(ownerId: string): Promise<number>;
update(library: Partial<LibraryEntity>): Promise<LibraryEntity>;
getStatistics(id: string): Promise<LibraryStatsResponseDto>;
getAssetIds(id: string, withDeleted?: boolean): Promise<string[]>;
}