import { BaseRepositoryPort } from '@humand-packages/common';
import { User } from '../../../users/business/models/user';
import TimeTrackingKiosksFilters from '../../business/interfaces/timeTrackingKioskFilters';
import TimeTrackingKiosksOptions from '../../business/interfaces/timeTrackingKioskOptions';
import { TimeTrackingKiosk, TimeTrackingKioskForCreation } from '../../business/models/timeTrackingKiosk';

export default abstract class TimeTrackingKioskRepositoryPort extends BaseRepositoryPort {
    abstract list(
        user: User,
        filters: TimeTrackingKiosksFilters,
        options: TimeTrackingKiosksOptions,
    ): Promise<{ count: number; rows: TimeTrackingKiosk[] }>;

    abstract getById(instanceId: number, id: number): Promise<TimeTrackingKiosk | null>;

    abstract getByIdOrFail(instanceId: number, id: number): Promise<TimeTrackingKiosk>;

    abstract create(user: User, kiosk: TimeTrackingKioskForCreation): Promise<TimeTrackingKiosk>;

    abstract update(updated: TimeTrackingKiosk): Promise<TimeTrackingKiosk>;

    abstract eliminate(id: number, instanceId: number): Promise<void>;

    abstract getByIdIncludeInstance(id: number): Promise<TimeTrackingKiosk | null>;

    abstract getByBotAppId(botAppId: number, instanceId: number): Promise<TimeTrackingKiosk | null>;

    abstract removeKiosksFromSite(siteId: number, instanceId: number): Promise<void>;
}
