2024-03-20 23:53:07 +01:00
|
|
|
import { LibraryStatsResponseDto } from 'src/dtos/library.dto';
|
2024-05-20 18:09:10 -04:00
|
|
|
import { LibraryEntity } from 'src/entities/library.entity';
|
2023-09-20 13:16:33 +02:00
|
|
|
|
|
|
|
|
export const ILibraryRepository = 'ILibraryRepository';
|
|
|
|
|
|
|
|
|
|
export interface ILibraryRepository {
|
2024-05-20 18:09:10 -04:00
|
|
|
getAll(withDeleted?: boolean): Promise<LibraryEntity[]>;
|
2023-09-20 13:16:33 +02:00
|
|
|
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>;
|
|
|
|
|
update(library: Partial<LibraryEntity>): Promise<LibraryEntity>;
|
2024-05-25 06:15:07 -04:00
|
|
|
getStatistics(id: string): Promise<LibraryStatsResponseDto | undefined>;
|
2023-09-20 13:16:33 +02:00
|
|
|
getAssetIds(id: string, withDeleted?: boolean): Promise<string[]>;
|
|
|
|
|
}
|