import type { FastifyInstance } from 'fastify';
export interface ProcessScanInput {
    tenantId: string;
    studentId: string;
    deviceId: string;
    scanTime: Date;
}
/**
 * Core attendance engine. Called by both ADMS push and ZKLib poller.
 * 1. Inserts a new attendance_logs row with the next scan_sequence.
 * 2. Recalculates attendance_records summary for the student/date.
 * 3. Emits Socket.IO event to the tenant room.
 */
export declare function processRawScan(fastify: FastifyInstance, input: ProcessScanInput): Promise<{
    log: {
        id: string;
        createdAt: Date;
        tenantId: string;
        studentId: string;
        deviceId: string | null;
        scanTime: Date;
        attendanceDate: string;
        scanSequence: number;
        punchType: "IN" | "OUT";
    };
    record: {
        id: string;
        status: "PRESENT" | "ABSENT" | "LATE" | "EARLY_EXIT";
        updatedAt: Date;
        tenantId: string;
        studentId: string;
        attendanceDate: string;
        totalPunches: number;
        firstIn: Date | null;
        lastOut: Date | null;
        totalPresentMinutes: number;
        totalBreakMinutes: number;
        isCurrentlyInside: boolean;
    };
}>;
//# sourceMappingURL=attendance.service.d.ts.map