mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
parent
2dcce03352
commit
84f7ca855a
150 changed files with 436 additions and 447 deletions
19
server/src/interfaces/library.repository.ts
Normal file
19
server/src/interfaces/library.repository.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { LibraryStatsResponseDto } from 'src/domain/library/library.dto';
|
||||
import { LibraryEntity, LibraryType } from 'src/infra/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[]>;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue