mirror of
https://github.com/immich-app/immich.git
synced 2025-01-10 13:56:47 +01:00
20 lines
723 B
TypeScript
20 lines
723 B
TypeScript
|
import { AssetEntity, PersonEntity } from '@app/infra/entities';
|
||
|
|
||
|
export const IPersonRepository = 'IPersonRepository';
|
||
|
|
||
|
export interface PersonSearchOptions {
|
||
|
minimumFaceCount: number;
|
||
|
}
|
||
|
|
||
|
export interface IPersonRepository {
|
||
|
getAll(userId: string, options: PersonSearchOptions): Promise<PersonEntity[]>;
|
||
|
getAllWithoutFaces(): Promise<PersonEntity[]>;
|
||
|
getById(userId: string, personId: string): Promise<PersonEntity | null>;
|
||
|
getAssets(userId: string, id: string): Promise<AssetEntity[]>;
|
||
|
|
||
|
create(entity: Partial<PersonEntity>): Promise<PersonEntity>;
|
||
|
update(entity: Partial<PersonEntity>): Promise<PersonEntity>;
|
||
|
delete(entity: PersonEntity): Promise<PersonEntity | null>;
|
||
|
deleteAll(): Promise<number>;
|
||
|
}
|