import api from './api'; export interface FacialEnrollResponse { id: number; user_id: number; encoding_length: number; message: string; } export interface FacialRecognizeResponse { success: boolean; user_id: number | null; name: string | null; lastname: string | null; card_id: string | null; confidence: number | null; message: string; attendance_id: number | null; } export async function enrollFace(userId: number, image: string): Promise { const { data } = await api.post('/facial/enroll', { user_id: userId, image }); return data; } export async function recognizeFace(image: string, late_note?: string): Promise { const { data } = await api.post('/facial/recognize', { image, late_note }); return data; } export async function facialCheckout(image: string, late_note?: string): Promise { const { data } = await api.post('/facial/checkout', { image, late_note }); return data; }