7947f4db4c
* add migration * verify running migration populate new value * implemented service * generate api * FE works * FR Works * fix test * fix test fixture * fix test * fix test * consolidate api * fix test * added test * pr feedback * refactor * click ont humbnail to show feature selection as well
22 lines
853 B
TypeScript
22 lines
853 B
TypeScript
import { AssetFaceId } from '@app/domain';
|
|
import { AssetEntity, AssetFaceEntity, 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>;
|
|
|
|
getFaceById(payload: AssetFaceId): Promise<AssetFaceEntity | null>;
|
|
}
|