import { BasePort } from '@humand-packages/common';
import { UserInterface } from '../../../users/business/models/userInterface';
import { UserDAO } from '../../../users/infrastructure/dataAccessObjects/userDAO';
import { UserDTO } from '../../../users/presentation/dataTransferObjects/userDTO';
import { KioskCollabsFilters } from '../interfaces/kioskCollabsFilters';
import KioskCollabsOptions from '../interfaces/kioskCollabsOptions';
import TimeTrackingKiosksFilters from '../interfaces/timeTrackingKioskFilters';
import TimeTrackingKiosksOptions from '../interfaces/timeTrackingKioskOptions';
import { TimeTrackingKiosk, TimeTrackingKioskForCreation } from '../models/timeTrackingKiosk';

export abstract class TimeTrackingKioskPort extends BasePort {
    abstract getByIdOrFail(user: UserInterface, id: number): Promise<TimeTrackingKiosk>;

    abstract list(
        user: UserInterface,
        filters: TimeTrackingKiosksFilters,
        options: TimeTrackingKiosksOptions,
    ): Promise<{ count: number; rows: TimeTrackingKiosk[] }>;

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

    abstract update(user: UserInterface, id: number, newAttributes: Partial<TimeTrackingKioskForCreation>): Promise<TimeTrackingKiosk>;

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

    abstract listCollabs(
        instanceId: number,
        filters: KioskCollabsFilters,
        options: KioskCollabsOptions,
        botAppId: number,
    ): Promise<{ count: number; rows: UserDAO[] }>;

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

    abstract getByBotAppIdOrFail(botAppId: number, instanceId: number): Promise<TimeTrackingKiosk>;

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

    abstract verifyPin(instanceId: number, botAppId: number, kioskPin: string): Promise<UserDTO>;
}
