import { BaseRepositoryPort } from '@humand-packages/common';
import { OrphanedFaceAssignment } from '../../../business/interfaces/orphanedFaceAssignment';
import { PendingFaceAssignment } from '../../../business/interfaces/pendingFaceAssignment';
import { TimeTrackingFaceAssignment, TimeTrackingFaceAssignmentForCreation } from '../../../business/models/timeTracking/timeTrackingFaceAssignments';
import { TimeTrackingFaceAssignmentSource } from '../../constants/timeTracking/faceAssignmentSource';

export default abstract class TimeTrackingFaceAssignmentRepositoryPort extends BaseRepositoryPort {
    abstract getAll(
        instanceId: number,
        userId: number,
        options?: { source?: TimeTrackingFaceAssignmentSource; regionId?: number; siteId?: number },
    ): Promise<TimeTrackingFaceAssignment[]>;

    abstract getAllBySiteId(instanceId: number, siteId: number, source: TimeTrackingFaceAssignmentSource): Promise<TimeTrackingFaceAssignment[]>;
    abstract create(create: TimeTrackingFaceAssignmentForCreation): Promise<TimeTrackingFaceAssignment>;
    abstract bulkCreate(faceAssignments: TimeTrackingFaceAssignmentForCreation[]): Promise<TimeTrackingFaceAssignment[]>;
    abstract deleteAll(
        instanceId: number,
        userId: number,
        options?: { source?: TimeTrackingFaceAssignmentSource; regionId?: number; siteId?: number },
    ): Promise<void>;

    abstract deleteByIds(instanceId: number, ids: number[]): Promise<void>;

    abstract findPendingAssignments(options?: { limit?: number; maxInstances?: number }): Promise<PendingFaceAssignment[]>;

    abstract findOrphanedAssignments(options?: { limit?: number; maxInstances?: number }): Promise<OrphanedFaceAssignment[]>;
}
