@facesignai/api 1.0.36 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -0
- package/build/package.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -349,6 +349,57 @@ Sends a one-time password (OTP) to the user's email address and verifies the cod
|
|
|
349
349
|
}
|
|
350
350
|
```
|
|
351
351
|
|
|
352
|
+
### FACE_COMPARE Node
|
|
353
|
+
|
|
354
|
+
Compares faces from two different sources to verify they belong to the same person. Unlike FACE_SCAN (which captures a photo and compares it against a single reference), this node takes already-existing images from different session sources and compares them.
|
|
355
|
+
|
|
356
|
+
**Available sources:**
|
|
357
|
+
- `sessionVideo` — a frame captured from the live video feed during the session
|
|
358
|
+
- `faceScan` — a higher-quality photo from a FACE_SCAN node (oval capture). Uses the most recent completed FACE_SCAN node in the session.
|
|
359
|
+
- `providedData` — an image URL from a `providedData` field. Requires `providedDataKey` to specify which field contains the URL.
|
|
360
|
+
- `documentPhoto` — a photo extracted from a scanned document (DOCUMENT_SCAN node). Uses the most recent completed DOCUMENT_SCAN node in the session.
|
|
361
|
+
|
|
362
|
+
**Configuration:**
|
|
363
|
+
- `sourceA` — first image source
|
|
364
|
+
- `sourceB` — second image source
|
|
365
|
+
- `similarityThreshold` — optional minimum similarity score (0–1) required for a match
|
|
366
|
+
|
|
367
|
+
**Outcomes:**
|
|
368
|
+
- `match` — faces from both sources match
|
|
369
|
+
- `noMatch` — faces do not match
|
|
370
|
+
- `imageUnavailable` — at least one image could not be obtained (e.g., no person detected on camera, missing `providedData` field, no photo on document, etc.)
|
|
371
|
+
|
|
372
|
+
**Example — compare live video with a photo from providedData:**
|
|
373
|
+
```typescript
|
|
374
|
+
{
|
|
375
|
+
id: "compare-faces",
|
|
376
|
+
type: "face_compare",
|
|
377
|
+
sourceA: { source: "sessionVideo" },
|
|
378
|
+
sourceB: { source: "providedData", providedDataKey: "photoUrl" },
|
|
379
|
+
similarityThreshold: 0.8,
|
|
380
|
+
outcomes: {
|
|
381
|
+
match: "next-node-id",
|
|
382
|
+
noMatch: "end-fail",
|
|
383
|
+
imageUnavailable: "end-error"
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
**Example — compare face scan capture with document photo:**
|
|
389
|
+
```typescript
|
|
390
|
+
{
|
|
391
|
+
id: "compare-scan-vs-doc",
|
|
392
|
+
type: "face_compare",
|
|
393
|
+
sourceA: { source: "faceScan" },
|
|
394
|
+
sourceB: { source: "documentPhoto" },
|
|
395
|
+
outcomes: {
|
|
396
|
+
match: "next-node-id",
|
|
397
|
+
noMatch: "end-fail",
|
|
398
|
+
imageUnavailable: "end-error"
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
```
|
|
402
|
+
|
|
352
403
|
### TWO_FACTOR_SMS Node
|
|
353
404
|
|
|
354
405
|
Same as TWO_FACTOR_EMAIL but sends the OTP via SMS. If no phone number was provided via `providedData` or collected by a previous node, the phone number will be requested automatically during this node.
|
package/build/package.json
CHANGED