Files
immich/server/src/interfaces/partner.repository.ts
T
Daniel Dietzler 84f7ca855a chore(server): move domain interfaces (#8124)
move domain interfaces
2024-03-20 16:42:58 -04:00

22 lines
614 B
TypeScript

import { PartnerEntity } from 'src/infra/entities/partner.entity';
export interface PartnerIds {
sharedById: string;
sharedWithId: string;
}
export enum PartnerDirection {
SharedBy = 'shared-by',
SharedWith = 'shared-with',
}
export const IPartnerRepository = 'IPartnerRepository';
export interface IPartnerRepository {
getAll(userId: string): Promise<PartnerEntity[]>;
get(partner: PartnerIds): Promise<PartnerEntity | null>;
create(partner: PartnerIds): Promise<PartnerEntity>;
remove(entity: PartnerEntity): Promise<void>;
update(entity: Partial<PartnerEntity>): Promise<PartnerEntity>;
}