mirror of
https://github.com/immich-app/immich.git
synced 2025-12-21 17:25:35 +03:00
18 lines
787 B
TypeScript
18 lines
787 B
TypeScript
import { Insertable, Updateable } from 'kysely';
|
|
import { Libraries } from 'src/db';
|
|
import { LibraryStatsResponseDto } from 'src/dtos/library.dto';
|
|
import { LibraryEntity } from 'src/entities/library.entity';
|
|
|
|
export const ILibraryRepository = 'ILibraryRepository';
|
|
|
|
export interface ILibraryRepository {
|
|
getAll(withDeleted?: boolean): Promise<LibraryEntity[]>;
|
|
getAllDeleted(): Promise<LibraryEntity[]>;
|
|
get(id: string, withDeleted?: boolean): Promise<LibraryEntity | undefined>;
|
|
create(library: Insertable<Libraries>): Promise<LibraryEntity>;
|
|
delete(id: string): Promise<void>;
|
|
softDelete(id: string): Promise<void>;
|
|
update(id: string, library: Updateable<Libraries>): Promise<LibraryEntity>;
|
|
getStatistics(id: string): Promise<LibraryStatsResponseDto | undefined>;
|
|
}
|