import type { ScanOutput, ScanMethod } from '../types/index'; export interface ScanDeps { /** Find ticket by code value (QR code, barcode, etc.) */ findTicketByCode: (code: string) => Promise; /** Find client access by ID */ findAccessById: (id: string) => Promise; /** Find client by ID */ findClientById: (id: string) => Promise; /** Check if this ticket was already scanned (granted) today */ wasScannedToday: (ticketId: string) => Promise; /** Update ticket fields */ updateTicket: (id: string, data: Record) => Promise; /** Update client access fields */ updateAccess: (id: string, data: Record) => Promise; /** Create a scan log entry */ createScanLog: (data: Record) => Promise; /** Extract the raw ID from a relation field (may be object or string) */ resolveId: (ref: any) => string; /** Format a client's display name */ formatClientName: (client: any) => string; } /** * Process a ticket scan through the 8-step validation pipeline. * * This is a pure business-logic function with zero coupling to any framework, * ORM, or database. All I/O is performed via the injected `deps` callbacks. * * Steps: * 1. Find ticket by code * 2. Check ticket status * 3. Check validUntil expiry * 4. Load client access * 5. Check client status * 6. Process validity mode (day_reentry / single_use / time_slot / unlimited) * 7. Update ticket + access, create scan log * 8. Return result */ export declare function processScan(code: string, scanMethod: ScanMethod, scannedBy: string, deps: ScanDeps): Promise; //# sourceMappingURL=scan-processor.d.ts.map