Operations
The client.operations object (OpsManager) provides methods for fingerprint identification, person management, and image retrieval.
Overview
All operations automatically include the scanner's sensor serial number and device information when a DriverSocket is available. If no imageBase64 is provided, the SDK uses the last captured fingerprint result from the scanner.
Finger index
Finger indices follow the standard mapping:
Left hand
| Index | Finger |
|---|---|
| 0 | Thumb |
| 1 | Index |
| 2 | Middle |
| 3 | Ring |
| 4 | Little |
Right hand
| Index | Finger |
|---|---|
| 5 | Little |
| 6 | Ring |
| 7 | Middle |
| 8 | Index |
| 9 | Thumb |
Identify person
Identifies an existing person by their fingerprint. If the fingerprint matches a registered person, it returns their HHID.
const hhid = await client.operations.identifyPerson(
1, // idFinger — finger index
// score and imageBase64 are optional; uses last scanner result if omitted
);
console.log('Matched HHID:', hhid);
Check fingerprint
Returns a temporary hash for the given fingerprint, used as input when registering a new person with createPerson. If the fingerprint is already registered, the response may also include the HHID.
const result = await client.operations.checkFingerprint(
1, // idFinger — finger index
// score and imageBase64 are optional; uses last scanner result if omitted
);
// result is the raw API response object:
// result.id — temporary hash (pass to createPerson)
console.log('Hash:', result.id);
Create person
Register a new person with their fingerprint data. Requires a hash list obtained from prior checkFingerprint calls and a consent flag.
// 1. Capture and check fingerprints to build hash list
const hash1 = await client.operations.checkFingerprint(1);
const hash2 = await client.operations.checkFingerprint(2);
// 2. Create person with collected hashes
const hhid = await client.operations.createPerson(
[hash1, hash2], // hashList
true, // consentTraining
);
console.log('Created person:', hhid);
Delete person
Delete a person and all their fingerprint data by HHID.
await client.operations.deletePerson(
'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
);
The HHID is validated as a UUID v4 before the request is sent. A ConfigError is thrown if the format is invalid.
Image retrieval
Access to fingerprint images requires specific permissions that must be granted by Heuristik. Contact the Heuristik team to request access.
| Method | Returns | Description |
|---|---|---|
getFingerprintImageAvailable(hhid) | number[] | List finger indices with stored images |
getFingerprintImage(hhid, idFinger) | string | Presigned URL — use as <img src> to display in the browser |
getFingerprintImageRaw(hhid, idFinger) | ArrayBuffer | Raw binary data — use to download as a file or process server-side |
getFingerprintImproveImage(hhid, idFinger) | string | Presigned URL for the enhanced image — use as <img src> to display |
getFingerprintImprove(hhid, idFinger) | ArrayBuffer | Raw binary data (enhanced) — use to download as a file |
// List available fingers
const fingers = await client.operations.getFingerprintImageAvailable(hhid);
// Returns an array of finger indices that have stored images
// e.g. [0, 5, 7] → Left Thumb, Right Little, Right Middle
// Get presigned URL (use directly as <img src="...">)
const url = await client.operations.getFingerprintImage(hhid, 1);
// Get raw BMP binary
const buffer = await client.operations.getFingerprintImageRaw(hhid, 1);
const blob = new Blob([buffer], { type: 'image/bmp' });
Method summary
| Method | Description |
|---|---|
identifyPerson(idFinger, score?, imageBase64?) | Identify person by fingerprint |
checkFingerprint(idFinger, score?, imageBase64?) | Get temporary hash for registration |
createPerson(hashList, consentTraining) | Register new person |
deletePerson(hhid) | Delete person by HHID |
getFingerprintImageAvailable(hhid) | List available finger indices |
getFingerprintImage(hhid, idFinger) | Presigned URL for browser display |
getFingerprintImageRaw(hhid, idFinger) | Raw binary for download |
getFingerprintImproveImage(hhid, idFinger) | Enhanced image presigned URL for display |
getFingerprintImprove(hhid, idFinger) | Enhanced image raw binary for download |