@simprints/simface-sdk 0.4.1 → 0.6.1
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/dist/components/simface-capture.d.ts +69 -0
- package/dist/components/simface-capture.js +746 -0
- package/dist/components/simface-capture.js.map +1 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.js +69 -0
- package/dist/index.js.map +1 -0
- package/dist/services/api-client.d.ts +10 -0
- package/dist/services/api-client.js +61 -0
- package/dist/services/api-client.js.map +1 -0
- package/dist/services/camera.d.ts +18 -0
- package/dist/services/camera.js +616 -0
- package/dist/services/camera.js.map +1 -0
- package/dist/services/face-detection.d.ts +9 -0
- package/dist/services/face-detection.js +69 -0
- package/dist/services/face-detection.js.map +1 -0
- package/dist/services/face-quality.d.ts +23 -0
- package/dist/services/face-quality.js +136 -0
- package/dist/services/face-quality.js.map +1 -0
- package/dist/shared/auto-capture.d.ts +7 -0
- package/dist/shared/auto-capture.js +23 -0
- package/dist/shared/auto-capture.js.map +1 -0
- package/dist/simface-sdk.js +2862 -2370
- package/dist/simface-sdk.umd.cjs +221 -38
- package/dist/types/index.d.ts +61 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/** Configuration for the SimFace SDK. */
|
|
2
|
+
export interface SimFaceConfig {
|
|
3
|
+
/** Base URL of the SimFace API backend. */
|
|
4
|
+
apiUrl: string;
|
|
5
|
+
/** Unique identifier for the project. */
|
|
6
|
+
projectId: string;
|
|
7
|
+
/** API key for authentication. */
|
|
8
|
+
apiKey: string;
|
|
9
|
+
}
|
|
10
|
+
/** Result of an enrollment operation. */
|
|
11
|
+
export interface EnrollResult {
|
|
12
|
+
success: boolean;
|
|
13
|
+
clientId: string;
|
|
14
|
+
message?: string;
|
|
15
|
+
/** True if the user was already enrolled and verification is needed instead. */
|
|
16
|
+
alreadyEnrolled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** Result of a verification operation. */
|
|
19
|
+
export interface VerifyResult {
|
|
20
|
+
match: boolean;
|
|
21
|
+
score: number;
|
|
22
|
+
threshold: number;
|
|
23
|
+
message?: string;
|
|
24
|
+
/** True if the user was not found and enrollment is needed instead. */
|
|
25
|
+
notEnrolled?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/** Result of API key validation. */
|
|
28
|
+
export interface ValidateResult {
|
|
29
|
+
valid: boolean;
|
|
30
|
+
projectId: string;
|
|
31
|
+
name: string;
|
|
32
|
+
}
|
|
33
|
+
/** Face quality assessment result from MediaPipe. */
|
|
34
|
+
export type FaceFeedbackCode = 'no-face' | 'multiple-faces' | 'too-far' | 'too-close' | 'move-left' | 'move-right' | 'move-up' | 'move-down' | 'turn-left' | 'turn-right' | 'face-unclear' | 'good';
|
|
35
|
+
export interface FaceQualityResult {
|
|
36
|
+
hasFace: boolean;
|
|
37
|
+
faceCount: number;
|
|
38
|
+
confidence: number;
|
|
39
|
+
captureScore: number;
|
|
40
|
+
isCentered: boolean;
|
|
41
|
+
passesQualityChecks: boolean;
|
|
42
|
+
feedback: FaceFeedbackCode;
|
|
43
|
+
message: string;
|
|
44
|
+
}
|
|
45
|
+
/** Events emitted by the SimFace capture component. */
|
|
46
|
+
export interface SimFaceCaptureEvents {
|
|
47
|
+
/** Fired when a face image is captured and quality-checked. */
|
|
48
|
+
'simface-captured': CustomEvent<{
|
|
49
|
+
imageBlob: Blob;
|
|
50
|
+
}>;
|
|
51
|
+
/** Fired when the user cancels the capture flow. */
|
|
52
|
+
'simface-cancelled': CustomEvent<void>;
|
|
53
|
+
/** Fired when an error occurs during capture. */
|
|
54
|
+
'simface-error': CustomEvent<{
|
|
55
|
+
error: string;
|
|
56
|
+
}>;
|
|
57
|
+
}
|
|
58
|
+
/** API error response from the backend. */
|
|
59
|
+
export interface APIError {
|
|
60
|
+
error: string;
|
|
61
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":""}
|