@incodetech/core 0.0.0-dev-20260207-ef0d08c → 0.0.0-dev-20260209-c0e857b
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/Actor-uC1hxvGo.d.ts +2 -0
- package/dist/{OpenViduLogger-DrE4_cHh.esm.js → OpenViduLogger-Cut9zn-U.esm.js} +1 -1
- package/dist/OpenViduLogger-D_YCgaLD.esm.js +3 -0
- package/dist/authentication.d.ts +75 -0
- package/dist/authentication.esm.js +194 -0
- package/dist/{deepsightLoader-CHzDt5p2.esm.js → deepsightLoader-DHzfMqHS.esm.js} +4 -4
- package/dist/{deepsightService-D8qaikEi.d.ts → deepsightService-D9Isk8fg.d.ts} +4 -134
- package/dist/{deepsightService-C_AyxXhJ.esm.js → deepsightService-DLabZ49g.esm.js} +3 -3
- package/dist/email.d.ts +1 -1
- package/dist/email.esm.js +4 -4
- package/dist/{endpoints-Q2cBwc8v.esm.js → endpoints-CJtl25ka.esm.js} +1 -0
- package/dist/{events-BN5bIhsN.esm.js → events-CieIKgPk.esm.js} +3 -2
- package/dist/face-match.d.ts +1 -1
- package/dist/face-match.esm.js +4 -4
- package/dist/faceCaptureManagerFactory-CZgmP4pc.d.ts +227 -0
- package/dist/faceCaptureSetup-DRbBF7AJ.esm.js +1202 -0
- package/dist/flow.d.ts +2 -2
- package/dist/flow.esm.js +3 -3
- package/dist/{id-B6VREnGU.esm.js → id-2r4nZyH_.esm.js} +8 -8
- package/dist/id.d.ts +6 -4
- package/dist/id.esm.js +8 -8
- package/dist/{index-BOpNqAs7.d.ts → index-C0SJR9cc.d.ts} +5 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.esm.js +8 -8
- package/dist/{lib-ieMlAKG1.esm.js → lib-BbiUxUyg.esm.js} +2 -2
- package/dist/phone.d.ts +1 -1
- package/dist/phone.esm.js +4 -4
- package/dist/selfie.d.ts +38 -224
- package/dist/selfie.esm.js +22 -1145
- package/dist/{src-B0UBQ8zw.esm.js → src-BFHUdMI6.esm.js} +3 -3
- package/dist/{stats-CpcCA-Ml.esm.js → stats-DuS7aVaJ.esm.js} +1 -1
- package/dist/stats.esm.js +2 -2
- package/dist/{streamingEvents-DhMoimL8.esm.js → streamingEvents-DM6KFfsz.esm.js} +3 -3
- package/dist/types-u31qr1MR.d.ts +133 -0
- package/package.json +5 -1
- package/dist/OpenViduLogger-B6-UWyJe.esm.js +0 -3
- /package/dist/{Manager-CWwvSZqZ.d.ts → Manager-BiAYYF50.d.ts} +0 -0
- /package/dist/{api-BkkE6cfa.esm.js → api-Cqrn4bGi.esm.js} +0 -0
- /package/dist/{chunk-CiY78uGR.esm.js → chunk-CbPq_V01.esm.js} +0 -0
- /package/dist/{types-BHcijCvX.d.ts → types-Dc1nBvy2.d.ts} +0 -0
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { a as IRecordingCapability, c as MLProviderConfig, i as IStorageCapability, n as PermissionStatus, r as CameraStream } from "./types-u31qr1MR.js";
|
|
2
|
+
import { s as WasmPipeline, t as Flow } from "./types-Dc1nBvy2.js";
|
|
3
|
+
import { t as Manager } from "./Manager-BiAYYF50.js";
|
|
4
|
+
|
|
5
|
+
//#region ../infra/src/capabilities/IWasmUtilCapability.d.ts
|
|
6
|
+
type WasmUtilConfig = MLProviderConfig & {
|
|
7
|
+
pipelines?: WasmPipeline[];
|
|
8
|
+
};
|
|
9
|
+
type VirtualCameraCheckOutput = {
|
|
10
|
+
canvas: HTMLCanvasElement | null;
|
|
11
|
+
itr: boolean | null;
|
|
12
|
+
skipped: boolean | null;
|
|
13
|
+
};
|
|
14
|
+
type IWasmUtilCapability = {
|
|
15
|
+
/**
|
|
16
|
+
* Whether the provider has been initialized and is ready to be used.
|
|
17
|
+
*/
|
|
18
|
+
readonly initialized: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Initializes the provider with the given configuration.
|
|
21
|
+
* If WASM was already warmed up via `warmupWasm()`, this returns almost instantly.
|
|
22
|
+
* @param config - Provider configuration including WASM paths
|
|
23
|
+
*/
|
|
24
|
+
initialize(config: WasmUtilConfig): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Encrypts a base64 image using the WASM utility API.
|
|
27
|
+
* @param image - Base64 image string (no data URL prefix)
|
|
28
|
+
* @returns Encrypted string
|
|
29
|
+
*/
|
|
30
|
+
encryptImage(image: string): string;
|
|
31
|
+
setSdkVersion(version: string): void;
|
|
32
|
+
setSdkPlatform(platform: string): void;
|
|
33
|
+
setDeviceInfo(deviceInfo: object, overrideExisting?: boolean): void;
|
|
34
|
+
setBrowserInfo(browserInfo: object, overrideExisting?: boolean): void;
|
|
35
|
+
setCameraInfo(cameraInfo: object, overrideExisting?: boolean): void;
|
|
36
|
+
setMotionStatus(status: string): void;
|
|
37
|
+
setBackgroundMode(backgroundMode: boolean): void;
|
|
38
|
+
setZc(zc: string): void;
|
|
39
|
+
setInspectorOpened(opened: boolean): void;
|
|
40
|
+
getMetadata(): string;
|
|
41
|
+
analyzeFrame(image: ImageData): Promise<void>;
|
|
42
|
+
getCheck(): string;
|
|
43
|
+
/**
|
|
44
|
+
* Gets the current pipeline state. Must be called before setMotionStatus(),
|
|
45
|
+
* getCheck(), setBackgroundMode(), and getMetadata() for proper metadata generation.
|
|
46
|
+
*/
|
|
47
|
+
getPipelineState(): string;
|
|
48
|
+
estimatePerformance(): string;
|
|
49
|
+
isVirtualCamera(label: string | null): boolean;
|
|
50
|
+
prc(): Promise<void>;
|
|
51
|
+
poc(output: VirtualCameraCheckOutput): Promise<void>;
|
|
52
|
+
ckvcks(data: ArrayBuffer): void;
|
|
53
|
+
getVersions(): Promise<unknown>;
|
|
54
|
+
/**
|
|
55
|
+
* Disposes of resources and resets initialization state.
|
|
56
|
+
*/
|
|
57
|
+
dispose(): Promise<void>;
|
|
58
|
+
};
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/internal/faceCapture/types.d.ts
|
|
61
|
+
type BaseFaceCaptureConfig = {
|
|
62
|
+
showTutorial: boolean;
|
|
63
|
+
showPreview?: boolean;
|
|
64
|
+
assistedOnboarding?: boolean;
|
|
65
|
+
enableFaceRecording?: boolean;
|
|
66
|
+
autoCaptureTimeout: number;
|
|
67
|
+
captureAttempts?: number;
|
|
68
|
+
numberOfAttempts?: number;
|
|
69
|
+
validateLenses?: boolean;
|
|
70
|
+
validateFaceMask?: boolean;
|
|
71
|
+
validateHeadCover?: boolean;
|
|
72
|
+
validateClosedEyes?: boolean;
|
|
73
|
+
validateBrightness?: boolean;
|
|
74
|
+
deepsightLiveness?: 'SINGLE_FRAME' | 'MULTIMODAL' | 'VIDEOLIVENESS';
|
|
75
|
+
recording?: {
|
|
76
|
+
capability?: IRecordingCapability;
|
|
77
|
+
};
|
|
78
|
+
ds?: Flow['ds'];
|
|
79
|
+
};
|
|
80
|
+
type FaceCaptureDependencies = {
|
|
81
|
+
storage: IStorageCapability;
|
|
82
|
+
getWasmUtil: () => Promise<IWasmUtilCapability>;
|
|
83
|
+
};
|
|
84
|
+
type DetectionStatus = 'idle' | 'detecting' | 'noFace' | 'tooManyFaces' | 'tooClose' | 'tooFar' | 'blur' | 'dark' | 'faceAngle' | 'headWear' | 'lenses' | 'eyesClosed' | 'faceMask' | 'centerFace' | 'manualCapture' | 'success' | 'error' | 'capturing' | 'getReady' | 'getReadyFinished' | 'offline';
|
|
85
|
+
declare const FACE_ERROR_CODES: {
|
|
86
|
+
readonly FACE_OCCLUDED: "FACE_OCCLUDED";
|
|
87
|
+
readonly LIVENESS: "LIVENESS_ERROR";
|
|
88
|
+
readonly BRIGHTNESS: "BRIGHTNESS_ERROR";
|
|
89
|
+
readonly LENSES: "LENSES_ERROR";
|
|
90
|
+
readonly MASK: "MASK_ERROR";
|
|
91
|
+
readonly CLOSED_EYES: "CLOSED_EYES_ERROR";
|
|
92
|
+
readonly HEAD_COVER: "HEAD_COVER_ERROR";
|
|
93
|
+
readonly SERVER: "SERVER_ERROR";
|
|
94
|
+
readonly FACE_NOT_FOUND: "FACE_NOT_FOUND";
|
|
95
|
+
readonly MULTIPLE_FACES: "MULTIPLE_FACES";
|
|
96
|
+
readonly TOO_BLURRY: "TOO_BLURRY_ERROR";
|
|
97
|
+
readonly TOO_DARK: "TOO_DARK_ERROR";
|
|
98
|
+
readonly USER_IS_NOT_RECOGNIZED: "USER_IS_NOT_RECOGNIZED";
|
|
99
|
+
readonly SPOOF_ATTEMPT_DETECTED: "SPOOF_ATTEMPT_DETECTED";
|
|
100
|
+
readonly FACE_TOO_DARK: "FACE_TOO_DARK";
|
|
101
|
+
readonly LENSES_DETECTED: "LENSES_DETECTED";
|
|
102
|
+
readonly FACE_MASK_DETECTED: "FACE_MASK_DETECTED";
|
|
103
|
+
readonly CLOSED_EYES_DETECTED: "CLOSED_EYES_DETECTED";
|
|
104
|
+
readonly HEAD_COVER_DETECTED: "HEAD_COVER_DETECTED";
|
|
105
|
+
readonly FACE_CROPPING_FAILED: "FACE_CROPPING_FAILED";
|
|
106
|
+
readonly FACE_TOO_SMALL: "FACE_TOO_SMALL";
|
|
107
|
+
readonly FACE_TOO_BLURRY: "FACE_TOO_BLURRY";
|
|
108
|
+
readonly BAD_PHOTO_QUALITY: "BAD_PHOTO_QUALITY";
|
|
109
|
+
readonly PROCESSING_ERROR: "PROCESSING_ERROR";
|
|
110
|
+
readonly BAD_REQUEST: "BAD_REQUEST";
|
|
111
|
+
readonly NONEXISTENT_CUSTOMER: "NONEXISTENT_CUSTOMER";
|
|
112
|
+
readonly HINT_NOT_PROVIDED: "HINT_NOT_PROVIDED";
|
|
113
|
+
readonly SELFIE_IMAGE_LOW_QUALITY: "SELFIE_IMAGE_LOW_QUALITY";
|
|
114
|
+
};
|
|
115
|
+
type FaceErrorCode = (typeof FACE_ERROR_CODES)[keyof typeof FACE_ERROR_CODES];
|
|
116
|
+
//#endregion
|
|
117
|
+
//#region src/internal/faceCapture/faceCaptureManagerFactory.d.ts
|
|
118
|
+
type CaptureStatus = 'initializing' | 'detecting' | 'capturing' | 'uploading' | 'uploadError' | 'success';
|
|
119
|
+
/** Face capture manager is waiting to be started */
|
|
120
|
+
type FaceCaptureIdleState = {
|
|
121
|
+
status: 'idle';
|
|
122
|
+
};
|
|
123
|
+
/** Checking camera permissions (when no tutorial) */
|
|
124
|
+
type FaceCaptureLoadingState = {
|
|
125
|
+
status: 'loading';
|
|
126
|
+
};
|
|
127
|
+
/** Showing face capture tutorial */
|
|
128
|
+
type FaceCaptureTutorialState = {
|
|
129
|
+
status: 'tutorial';
|
|
130
|
+
};
|
|
131
|
+
/** Handling camera permissions */
|
|
132
|
+
type FaceCapturePermissionsState = {
|
|
133
|
+
status: 'permissions';
|
|
134
|
+
/** Current permission sub-state: initial, requesting, denied, or learnMore */
|
|
135
|
+
permissionStatus: PermissionStatus;
|
|
136
|
+
};
|
|
137
|
+
/** Camera is ready for face capture */
|
|
138
|
+
type FaceCaptureCaptureState = {
|
|
139
|
+
status: 'capture';
|
|
140
|
+
/** Current capture sub-state */
|
|
141
|
+
captureStatus: CaptureStatus;
|
|
142
|
+
/** The active camera stream */
|
|
143
|
+
stream: CameraStream | undefined;
|
|
144
|
+
/** Current face detection status */
|
|
145
|
+
detectionStatus: DetectionStatus;
|
|
146
|
+
/** Latest frame processed in the detection loop (for UI debug rendering) */
|
|
147
|
+
debugFrame: ImageData | undefined;
|
|
148
|
+
/** Number of capture attempts remaining */
|
|
149
|
+
attemptsRemaining: number;
|
|
150
|
+
/** Error message from failed upload */
|
|
151
|
+
uploadError: string | undefined;
|
|
152
|
+
};
|
|
153
|
+
/** Processing the captured face */
|
|
154
|
+
type FaceCaptureProcessingState = {
|
|
155
|
+
status: 'processing';
|
|
156
|
+
};
|
|
157
|
+
/** Face capture completed successfully */
|
|
158
|
+
type FaceCaptureFinishedState = {
|
|
159
|
+
status: 'finished';
|
|
160
|
+
/** Face processing result (face match, confidence, existing user) */
|
|
161
|
+
processResponse: Record<string, unknown> | undefined;
|
|
162
|
+
};
|
|
163
|
+
/** User closed the face capture flow */
|
|
164
|
+
type FaceCaptureClosedState = {
|
|
165
|
+
status: 'closed';
|
|
166
|
+
};
|
|
167
|
+
/** An error occurred during the flow */
|
|
168
|
+
type FaceCaptureErrorState = {
|
|
169
|
+
status: 'error';
|
|
170
|
+
/** The error message */
|
|
171
|
+
error: string;
|
|
172
|
+
};
|
|
173
|
+
/** Union of all possible face capture states */
|
|
174
|
+
type FaceCaptureManagerState = FaceCaptureIdleState | FaceCaptureLoadingState | FaceCaptureTutorialState | FaceCapturePermissionsState | FaceCaptureCaptureState | FaceCaptureProcessingState | FaceCaptureFinishedState | FaceCaptureClosedState | FaceCaptureErrorState;
|
|
175
|
+
declare function createFaceCaptureManager(actor: unknown): Manager<FaceCaptureManagerState> & {
|
|
176
|
+
/**
|
|
177
|
+
* Starts the face capture flow.
|
|
178
|
+
* Goes to `tutorial` if showTutorial is true, otherwise to `loading`.
|
|
179
|
+
* Requires setup() to have been called with a token first.
|
|
180
|
+
*/
|
|
181
|
+
load(): void;
|
|
182
|
+
/**
|
|
183
|
+
* Advances to the next step.
|
|
184
|
+
* From `tutorial` → permissions or capture (based on permission status).
|
|
185
|
+
* From `capture` → finished.
|
|
186
|
+
*/
|
|
187
|
+
nextStep(): void;
|
|
188
|
+
/**
|
|
189
|
+
* Requests camera permission via getUserMedia.
|
|
190
|
+
* Only effective when in `permissions.idle` or `permissions.learnMore` state.
|
|
191
|
+
*/
|
|
192
|
+
requestPermission(): void;
|
|
193
|
+
/**
|
|
194
|
+
* Navigates to the "learn more" permission screen.
|
|
195
|
+
* Only effective when in `permissions.idle` state.
|
|
196
|
+
*/
|
|
197
|
+
goToLearnMore(): void;
|
|
198
|
+
/**
|
|
199
|
+
* Goes back from "learn more" to the initial permission screen.
|
|
200
|
+
* Only effective when in `permissions.learnMore` state.
|
|
201
|
+
*/
|
|
202
|
+
back(): void;
|
|
203
|
+
/**
|
|
204
|
+
* Closes the face capture flow and transitions to `closed` state.
|
|
205
|
+
* Can be called from any state.
|
|
206
|
+
*/
|
|
207
|
+
close(): void;
|
|
208
|
+
/**
|
|
209
|
+
* Resets the face capture manager to its initial `idle` state.
|
|
210
|
+
* Can be called from `error` state. Not available from `finished` (final state).
|
|
211
|
+
*/
|
|
212
|
+
reset(): void;
|
|
213
|
+
/**
|
|
214
|
+
* Retries the capture after an upload error.
|
|
215
|
+
* Only effective when in `capture.uploadError` state and `attemptsRemaining > 0`.
|
|
216
|
+
* If no attempts remaining, the transition is blocked.
|
|
217
|
+
*/
|
|
218
|
+
retryCapture(): void;
|
|
219
|
+
/**
|
|
220
|
+
* Captures a face in manual capture mode.
|
|
221
|
+
* Only effective when in `capture.detecting` state and `detectionStatus === 'manualCapture'`.
|
|
222
|
+
*/
|
|
223
|
+
capture(): void;
|
|
224
|
+
};
|
|
225
|
+
type FaceCaptureManager = ReturnType<typeof createFaceCaptureManager>;
|
|
226
|
+
//#endregion
|
|
227
|
+
export { FaceCaptureDependencies as a, DetectionStatus as i, FaceCaptureManagerState as n, FaceErrorCode as o, BaseFaceCaptureConfig as r, FaceCaptureManager as t };
|