Types
Capture results
interface FaceCaptureResult {
imageBase64: string;
antispoofScore: number;
livenessCompleted: boolean;
challengeResults: ChallengeResult[];
deviceInfo: DeviceInfo;
}Network responses
interface FaceEnrollResponse {
id: string;
enrollee: string;
createdAt: string;
raw: unknown;
}
interface FaceMatchResponse {
matched: boolean;
distance?: number;
threshold?: number;
logId?: string;
raw: unknown;
}
interface FaceSearchResponse {
matched: boolean;
candidates: { enrollee: string; distance: number }[];
threshold?: number;
logId?: string;
raw: unknown;
}Enrollment status
type Modality = 'face' | 'fingerprint';
type EnrollmentStatusValue = 'fully_enrolled' | 'partially_enrolled' | 'not_enrolled';
interface EnrollmentStatusResponse {
enrollee: string;
modality: Modality;
enrolled: boolean;
status: EnrollmentStatusValue;
total: number;
verified?: number[]; // fingerprint-only
nonVerified?: number[]; // fingerprint-only
notes?: string;
raw: Record<string, unknown>;
}The fingerprint reader exposes the same three-member verdict under its own name, on EnrolledFingerprints.enrollmentStatus:
type EnrollmentStatus = 'fully_enrolled' | 'partially_enrolled' | 'not_enrolled';| Member | Meaning |
|---|---|
'fully_enrolled' | Every finger the backend’s enrollment-count policy requires is verified. |
'partially_enrolled' | Some records exist, but not enough verified fingers yet — resume from verified / nonVerified. |
'not_enrolled' | No records at all. The subject has never been enrolled; start from scratch. |
'not_enrolled' exists so a never-enrolled subject is distinguishable from a part-finished enrolment. The middleware answers an unknown subject with an empty body, which decodes to zero records and zero positions; before this member existed that collapsed into 'partially_enrolled', and a resume flow would prompt for “the remaining fingers” of an enrolment that had never started.
What counts as 'fully_enrolled' — and therefore how many fingers you must capture — is backend-configured. Read the status rather than counting positions yourself.