@incodetech/core 0.0.0-dev-20260409-a38d5e8 → 0.0.0-dev-20260409-089e5c6
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/BrowserStorageProvider-ByxoNfxC.esm.js +55 -0
- package/dist/{OpenViduRecordingProvider-Bn2meybK.esm.js → OpenViduRecordingProvider-JatjSE3h.esm.js} +1 -1
- package/dist/{WasmUtilProvider-BpZSvZbg.esm.js → WasmUtilProvider-DRh0wrlm.esm.js} +1 -1
- package/dist/{addressSearch-DOFI7lwy.esm.js → addressSearch-CDdN30un.esm.js} +4 -4
- package/dist/antifraud.d.ts +1 -1
- package/dist/antifraud.esm.js +4 -37
- package/dist/antifraudStateMachine-C1AgS0nL.esm.js +39 -0
- package/dist/authentication.d.ts +11 -11
- package/dist/authentication.esm.js +22 -19
- package/dist/{authenticationManager-C2mk36yK.d.ts → authenticationManager-DYFYx68i.d.ts} +2 -2
- package/dist/authenticationManager-UaO9UTN7.esm.js +67 -0
- package/dist/{authenticationManager-C7dL_avf.esm.js → authenticationStateMachine-DWI65EwK.esm.js} +7 -67
- package/dist/{backCameraStream-tabTmwDS.esm.js → backCameraStream-BihRmMzc.esm.js} +3 -3
- package/dist/camera.d.ts +1 -1
- package/dist/camera.esm.js +3 -3
- package/dist/consent.d.ts +57 -57
- package/dist/consent.esm.js +4 -149
- package/dist/consentStateMachine-CpRu2hF0.esm.js +151 -0
- package/dist/cross-document-data-match.d.ts +1 -1
- package/dist/cross-document-data-match.esm.js +4 -4
- package/dist/curp-validation.d.ts +5 -5
- package/dist/curp-validation.esm.js +4 -417
- package/dist/curpValidationStateMachine-Czzgv2W1.esm.js +419 -0
- package/dist/{deepsightLoader-Cj6SyUQ-.esm.js → deepsightLoader-jIgoauFK.esm.js} +10 -10
- package/dist/{deepsightService-BjgXl5hs.esm.js → deepsightService-D4mM8yJ2.esm.js} +5 -5
- package/dist/{deepsightService-ByD6uIs7.d.ts → deepsightService-DAeakjDd.d.ts} +2 -2
- package/dist/device.esm.js +3 -3
- package/dist/document-capture.d.ts +75 -73
- package/dist/document-capture.esm.js +8 -403
- package/dist/document-upload.d.ts +50 -50
- package/dist/document-upload.esm.js +7 -7
- package/dist/documentCaptureStateMachine-XbpsHzh5.esm.js +403 -0
- package/dist/ekyb.d.ts +3 -3
- package/dist/ekyb.esm.js +10 -655
- package/dist/ekybStateMachine-BDuCae6s.esm.js +653 -0
- package/dist/ekyc.d.ts +3 -3
- package/dist/ekyc.esm.js +6 -10614
- package/dist/ekycStateMachine-BN4KBDYY.esm.js +10615 -0
- package/dist/email.d.ts +3 -3
- package/dist/email.esm.js +6 -5
- package/dist/emailManager-CAeo59lD.esm.js +238 -0
- package/dist/{emailManager-CU_hzrsl.d.ts → emailManager-CZYfcu0n.d.ts} +4 -3
- package/dist/{emailManager-_9R4vm6g.esm.js → emailStateMachine-Bqwe_sQS.esm.js} +6 -239
- package/dist/{events-DlHrOIRc.esm.js → events-CZ2ka3pu.esm.js} +8 -1
- package/dist/events.d.ts +1 -0
- package/dist/events.esm.js +2 -2
- package/dist/extensibility.d.ts +15 -15
- package/dist/extensibility.esm.js +33 -26
- package/dist/face-match.d.ts +7 -6
- package/dist/face-match.esm.js +8 -129
- package/dist/faceCaptureManagerFactory-D8zlMTvd.esm.js +117 -0
- package/dist/{faceCaptureManagerFactory-Da_-ohdg.d.ts → faceCaptureManagerFactory-DS-6yCya.d.ts} +8 -8
- package/dist/{faceCaptureSetup-CaVWkjvE.esm.js → faceCaptureSetup-1M6uUEjK.esm.js} +5 -119
- package/dist/faceMatchStateMachine-D3DuP_ya.esm.js +127 -0
- package/dist/flow.d.ts +8 -13
- package/dist/flow.esm.js +10 -29
- package/dist/{flowCompletionService-B5JemmC6.esm.js → flowCompletionService-W6bj7Xd3.esm.js} +2 -2
- package/dist/{flowServices-p22wrYPf.esm.js → flowServices-C4tjBD8q.esm.js} +3 -3
- package/dist/geolocation.d.ts +7 -6
- package/dist/geolocation.esm.js +7 -105
- package/dist/geolocationStateMachine-Bj2LkGwy.esm.js +105 -0
- package/dist/{getDeviceClass-DEzz4cmY.esm.js → getDeviceClass-BoiWvKAc.esm.js} +1 -1
- package/dist/government-validation.d.ts +2 -2
- package/dist/government-validation.esm.js +5 -269
- package/dist/governmentValidationStateMachine-W1CzRjVw.esm.js +271 -0
- package/dist/http.esm.js +1 -1
- package/dist/id.d.ts +10 -10
- package/dist/id.esm.js +22 -20
- package/dist/idCaptureManager-BcS8fgW4.esm.js +335 -0
- package/dist/{idCaptureManager-CV08v1e3.d.ts → idCaptureManager-oR6YPYHj.d.ts} +7 -7
- package/dist/{idCaptureManager-dyZzKv8L.esm.js → idCaptureStateMachine-MAzfM_2O.esm.js} +17 -346
- package/dist/identity-reuse.d.ts +530 -0
- package/dist/identity-reuse.esm.js +273 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +8 -8
- package/dist/{lib-Bavz2qmt.esm.js → lib-CxDxnzRd.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +55 -55
- package/dist/mandatory-consent.esm.js +4 -124
- package/dist/mandatoryConsentStateMachine-BMKi26Re.esm.js +126 -0
- package/dist/{openviduLazy-vhrVZCr_.esm.js → openviduLazy-B8tinh9W.esm.js} +2 -2
- package/dist/openviduLazy-CItjpMfL.esm.js +3 -0
- package/dist/{permissionServices-Cskq32Yd.esm.js → permissionServices-Cj120WaT.esm.js} +2 -2
- package/dist/phone.d.ts +3 -3
- package/dist/phone.esm.js +6 -5
- package/dist/phoneManager-Bvj6Jr4o.esm.js +258 -0
- package/dist/{phoneManager-ulJuGvJ8.d.ts → phoneManager-CCMCkyYr.d.ts} +2 -2
- package/dist/{phoneManager-DerdUfd4.esm.js → phoneStateMachine-B1t1Z-Dd.esm.js} +5 -258
- package/dist/{recordingService-483wQ6kR.esm.js → recordingService-8I_-hhNI.esm.js} +14 -68
- package/dist/redirect-to-mobile.d.ts +2 -2
- package/dist/redirect-to-mobile.esm.js +5 -247
- package/dist/redirectToMobileStateMachine-BVP1KcoO.esm.js +249 -0
- package/dist/runChildModule-B5DEiOS7.esm.js +27 -0
- package/dist/selfie.d.ts +11 -11
- package/dist/selfie.esm.js +22 -19
- package/dist/selfieManager-B6x3O5Ns.esm.js +60 -0
- package/dist/{selfieManager-DCRP7X75.d.ts → selfieManager-gizt3Zha.d.ts} +2 -2
- package/dist/selfieStateMachine-DHPSBFj0.esm.js +56 -0
- package/dist/{session-CUh77zj3.esm.js → session-DoI-X9FK.esm.js} +4 -4
- package/dist/session.d.ts +1 -1
- package/dist/session.esm.js +6 -6
- package/dist/{setup-XpxfZgKn.esm.js → setup-Bh2S53NT.esm.js} +6 -5
- package/dist/{setup-DpHakxsC.d.ts → setup-Bz3Ffaoc.d.ts} +1 -1
- package/dist/signature.d.ts +4 -3
- package/dist/signature.esm.js +6 -189
- package/dist/signatureStateMachine-Cv7yPuEf.esm.js +189 -0
- package/dist/{stats-DHDoqSBV.esm.js → stats-wkQyDFV3.esm.js} +1 -1
- package/dist/stats.esm.js +2 -2
- package/dist/types-BdEM5Jj7.d.ts +35 -0
- package/dist/{types-2OPf1pyv.d.ts → types-CdlQrTiZ.d.ts} +1 -1
- package/dist/{types-CVJVQ7fp.d.ts → types-m43DfiSx.d.ts} +1 -1
- package/dist/wasm.d.ts +2 -2
- package/dist/wasm.esm.js +8 -8
- package/dist/workflow.d.ts +813 -0
- package/dist/workflow.esm.js +600 -0
- package/package.json +11 -3
- package/dist/openviduLazy-BIPHozOu.esm.js +0 -3
- package/dist/selfieManager-DeOcNel4.esm.js +0 -110
- /package/dist/{Actor-Ba71-_30.d.ts → Actor-BkPcZGke.d.ts} +0 -0
- /package/dist/{BaseWasmProvider-D-s_6M5H.esm.js → BaseWasmProvider-C73c2nV9.esm.js} +0 -0
- /package/dist/{BrowserEnvironmentProvider-DaHeLJQw.esm.js → BrowserEnvironmentProvider-lxn4oxXn.esm.js} +0 -0
- /package/dist/{BrowserTimerProvider-BhD2MlHg.esm.js → BrowserTimerProvider-CSdm7__S.esm.js} +0 -0
- /package/dist/{ITimerCapability-oixwa6nj.esm.js → ITimerCapability-DAIaq369.esm.js} +0 -0
- /package/dist/{Manager-BN2g_I8W.d.ts → Manager-Bcnemkyi.d.ts} +0 -0
- /package/dist/{MotionSensorProvider-CodM3e0E.esm.js → MotionSensorProvider-BLnFo6My.esm.js} +0 -0
- /package/dist/{StateMachine-BoJsfMvg.d.ts → StateMachine-DIeoDJ7r.d.ts} +0 -0
- /package/dist/{api-DzpnV6O7.esm.js → api-CqKwkjJ3.esm.js} +0 -0
- /package/dist/{browserSimulation-B4ubb2OL.esm.js → browserSimulation-7W5-A3RV.esm.js} +0 -0
- /package/dist/{camera-DmkFpf5N.esm.js → camera-B-5traWf.esm.js} +0 -0
- /package/dist/{camera-1eeGnAaL.d.ts → camera-CgnuDuxy.d.ts} +0 -0
- /package/dist/{chunk-DsxENsBR.esm.js → chunk-Qw4qVmMx.esm.js} +0 -0
- /package/dist/{displayErrors-BZLX7idb.d.ts → displayErrors-C9-VaqmS.d.ts} +0 -0
- /package/dist/{flowCompletionService-D-3YCHyO.d.ts → flowCompletionService-CPLdZxe-.d.ts} +0 -0
- /package/dist/{getBrowser-Dtyt9J_h.esm.js → getBrowser-DJkbzQ5t.esm.js} +0 -0
- /package/dist/{platform-Dv7a2fv-.esm.js → platform-BfoqeM61.esm.js} +0 -0
- /package/dist/{types-D_QfFKxT.d.ts → types-CxU9jTRl.d.ts} +0 -0
- /package/dist/{warmup-CIj_wEV_.d.ts → warmup-Cs0uqxUW.d.ts} +0 -0
- /package/dist/{xstate.esm-Bv55-lJ4.esm.js → xstate.esm-D7D6CGwY.esm.js} +0 -0
|
@@ -1,29 +1,36 @@
|
|
|
1
|
-
import "./BaseWasmProvider-
|
|
2
|
-
import { t as WasmUtilProvider } from "./WasmUtilProvider-
|
|
3
|
-
import "./api-
|
|
4
|
-
import "./events-
|
|
5
|
-
import { a as IpifyProvider, o as FingerprintProvider, s as getDeviceFingerprintInfo, t as getDisableIpify } from "./session-
|
|
6
|
-
import "./BrowserEnvironmentProvider-
|
|
7
|
-
import "./browserSimulation-
|
|
8
|
-
import { a as createActor, i as fromPromise } from "./xstate.esm-
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import "./
|
|
12
|
-
import "./
|
|
13
|
-
import "./
|
|
14
|
-
import "./
|
|
15
|
-
import "./
|
|
16
|
-
import "./
|
|
17
|
-
import "./
|
|
18
|
-
import "./
|
|
19
|
-
import "./
|
|
20
|
-
import "./
|
|
21
|
-
import
|
|
22
|
-
import "./
|
|
23
|
-
import
|
|
24
|
-
import { n as
|
|
25
|
-
import
|
|
26
|
-
import
|
|
1
|
+
import "./BaseWasmProvider-C73c2nV9.esm.js";
|
|
2
|
+
import { t as WasmUtilProvider } from "./WasmUtilProvider-DRh0wrlm.esm.js";
|
|
3
|
+
import "./api-CqKwkjJ3.esm.js";
|
|
4
|
+
import "./events-CZ2ka3pu.esm.js";
|
|
5
|
+
import { a as IpifyProvider, o as FingerprintProvider, s as getDeviceFingerprintInfo, t as getDisableIpify } from "./session-DoI-X9FK.esm.js";
|
|
6
|
+
import "./BrowserEnvironmentProvider-lxn4oxXn.esm.js";
|
|
7
|
+
import "./browserSimulation-7W5-A3RV.esm.js";
|
|
8
|
+
import { a as createActor, i as fromPromise } from "./xstate.esm-D7D6CGwY.esm.js";
|
|
9
|
+
import "./faceCaptureManagerFactory-D8zlMTvd.esm.js";
|
|
10
|
+
import { t as BrowserStorageProvider } from "./BrowserStorageProvider-ByxoNfxC.esm.js";
|
|
11
|
+
import "./recordingService-8I_-hhNI.esm.js";
|
|
12
|
+
import "./deepsightService-D4mM8yJ2.esm.js";
|
|
13
|
+
import "./camera-B-5traWf.esm.js";
|
|
14
|
+
import "./getBrowser-DJkbzQ5t.esm.js";
|
|
15
|
+
import "./stats-wkQyDFV3.esm.js";
|
|
16
|
+
import "./MotionSensorProvider-BLnFo6My.esm.js";
|
|
17
|
+
import "./permissionServices-Cj120WaT.esm.js";
|
|
18
|
+
import "./platform-BfoqeM61.esm.js";
|
|
19
|
+
import "./ITimerCapability-DAIaq369.esm.js";
|
|
20
|
+
import "./backCameraStream-BihRmMzc.esm.js";
|
|
21
|
+
import "./getDeviceClass-BoiWvKAc.esm.js";
|
|
22
|
+
import { t as faceCaptureMachine } from "./faceCaptureSetup-1M6uUEjK.esm.js";
|
|
23
|
+
import "./authenticationStateMachine-DWI65EwK.esm.js";
|
|
24
|
+
import { n as createAuthenticationManagerFromActor } from "./authenticationManager-UaO9UTN7.esm.js";
|
|
25
|
+
import "./BrowserTimerProvider-CSdm7__S.esm.js";
|
|
26
|
+
import "./emailStateMachine-Bqwe_sQS.esm.js";
|
|
27
|
+
import { n as createEmailManagerFromActor } from "./emailManager-CAeo59lD.esm.js";
|
|
28
|
+
import "./selfieStateMachine-DHPSBFj0.esm.js";
|
|
29
|
+
import { n as createSelfieManagerFromActor } from "./selfieManager-B6x3O5Ns.esm.js";
|
|
30
|
+
import "./idCaptureStateMachine-MAzfM_2O.esm.js";
|
|
31
|
+
import { n as createIdCaptureManagerFromActor } from "./idCaptureManager-BcS8fgW4.esm.js";
|
|
32
|
+
import "./phoneStateMachine-B1t1Z-Dd.esm.js";
|
|
33
|
+
import { n as createPhoneManagerFromActor } from "./phoneManager-Bvj6Jr4o.esm.js";
|
|
27
34
|
|
|
28
35
|
//#region src/internal/fingerprint/fingerprintApi.ts
|
|
29
36
|
async function getFingerprint(disableIpify) {
|
package/dist/face-match.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as Manager } from "./Manager-
|
|
1
|
+
import { t as Manager } from "./Manager-Bcnemkyi.js";
|
|
2
2
|
|
|
3
3
|
//#region src/modules/face-match/types.d.ts
|
|
4
4
|
|
|
@@ -13,7 +13,7 @@ type FaceMatchVariant = 'selfieVsId' | 'selfieVsNfc' | 'idVsNfc' | 'nfc3Way' | '
|
|
|
13
13
|
* @example Standard face match with animation
|
|
14
14
|
* ```typescript
|
|
15
15
|
* const config: FaceMatchConfig = {
|
|
16
|
-
*
|
|
16
|
+
* matchingType: 'selfieVsId',
|
|
17
17
|
* disableFaceMatchAnimation: false,
|
|
18
18
|
* };
|
|
19
19
|
* ```
|
|
@@ -21,7 +21,7 @@ type FaceMatchVariant = 'selfieVsId' | 'selfieVsNfc' | 'idVsNfc' | 'nfc3Way' | '
|
|
|
21
21
|
* @example Auto-skip mode (headless)
|
|
22
22
|
* ```typescript
|
|
23
23
|
* const config: FaceMatchConfig = {
|
|
24
|
-
*
|
|
24
|
+
* matchingType: 'selfieVsId',
|
|
25
25
|
* disableFaceMatchAnimation: true,
|
|
26
26
|
* };
|
|
27
27
|
* ```
|
|
@@ -29,9 +29,10 @@ type FaceMatchVariant = 'selfieVsId' | 'selfieVsNfc' | 'idVsNfc' | 'nfc3Way' | '
|
|
|
29
29
|
type FaceMatchConfig = {
|
|
30
30
|
/**
|
|
31
31
|
* Which images to compare in the face match flow.
|
|
32
|
+
* Backend field name: `matchingType`.
|
|
32
33
|
* @default 'selfieVsId'
|
|
33
34
|
*/
|
|
34
|
-
|
|
35
|
+
matchingType?: FaceMatchVariant;
|
|
35
36
|
/**
|
|
36
37
|
* When true, skips the animation UI and auto-completes immediately after fetching data.
|
|
37
38
|
* Useful for headless integrations or silent verification flows.
|
|
@@ -155,7 +156,7 @@ type FaceMatchState = FaceMatchIdleState | FaceMatchLoadingState | FaceMatchAnim
|
|
|
155
156
|
*
|
|
156
157
|
* @param options - Configuration options
|
|
157
158
|
* @param options.config - Face match configuration
|
|
158
|
-
* @param options.config.
|
|
159
|
+
* @param options.config.matchingType - Which images to compare (default: 'selfieVsId')
|
|
159
160
|
* @param options.config.disableFaceMatchAnimation - Skip animation and auto-complete (default: false)
|
|
160
161
|
*
|
|
161
162
|
* @returns Face match manager with state, API methods, and subscription
|
|
@@ -163,7 +164,7 @@ type FaceMatchState = FaceMatchIdleState | FaceMatchLoadingState | FaceMatchAnim
|
|
|
163
164
|
* @example Headless usage
|
|
164
165
|
* ```typescript
|
|
165
166
|
* const manager = createFaceMatchManager({
|
|
166
|
-
* config: {
|
|
167
|
+
* config: { matchingType: 'selfieVsId', disableFaceMatchAnimation: true },
|
|
167
168
|
* });
|
|
168
169
|
*
|
|
169
170
|
* manager.subscribe((state) => console.log(state.status));
|
package/dist/face-match.esm.js
CHANGED
|
@@ -1,129 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { a as createActor,
|
|
1
|
+
import "./api-CqKwkjJ3.esm.js";
|
|
2
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CZ2ka3pu.esm.js";
|
|
3
|
+
import { a as createActor, o as createManager } from "./xstate.esm-D7D6CGwY.esm.js";
|
|
4
|
+
import { t as faceMatchMachine } from "./faceMatchStateMachine-D3DuP_ya.esm.js";
|
|
4
5
|
|
|
5
|
-
//#region src/modules/face-match/faceMatchServices.ts
|
|
6
|
-
/**
|
|
7
|
-
* Fetches cropped face images from the backend.
|
|
8
|
-
*/
|
|
9
|
-
async function fetchFaceMatchImages(signal) {
|
|
10
|
-
const res = await api.post(endpoints.getImagesV2, { images: [
|
|
11
|
-
"croppedFace",
|
|
12
|
-
"croppedIDFace",
|
|
13
|
-
"croppedAuthenticationSelfie"
|
|
14
|
-
] }, { signal });
|
|
15
|
-
if (!res.ok) throw new Error(`POST ${endpoints.getImagesV2} failed: ${res.status} ${res.statusText}`);
|
|
16
|
-
const data = res.data;
|
|
17
|
-
return {
|
|
18
|
-
idFace: data.croppedIDFace ?? null,
|
|
19
|
-
selfie: data.croppedFace ?? data.croppedAuthenticationSelfie ?? null,
|
|
20
|
-
secondIdFace: void 0
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Fetches face recognition score from the backend.
|
|
25
|
-
*/
|
|
26
|
-
async function fetchScore(signal) {
|
|
27
|
-
const res = await api.get(endpoints.getScore, { signal });
|
|
28
|
-
if (!res.ok) throw new Error(`GET ${endpoints.getScore} failed: ${res.status} ${res.statusText}`);
|
|
29
|
-
const data = res.data;
|
|
30
|
-
return {
|
|
31
|
-
matched: data.faceRecognition?.overall?.status === "OK" ? true : data.faceRecognition?.overall?.status === "FAIL" ? false : null,
|
|
32
|
-
liveness: data.deepsight ? data.deepsight.multimodalIntelligence?.overall?.status === "OK" : data.liveness?.overall?.status === "OK"
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Fetches second ID face images from the backend.
|
|
37
|
-
*/
|
|
38
|
-
async function fetchSecondIdImages(signal) {
|
|
39
|
-
const res = await api.post(endpoints.getImagesSecondId, { images: ["croppedIDFace"] }, { signal });
|
|
40
|
-
if (!res.ok) throw new Error(`POST ${endpoints.getImagesSecondId} failed: ${res.status} ${res.statusText}`);
|
|
41
|
-
return { secondIdFace: res.data.croppedIDFace ?? null };
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Fetches all face match data in parallel (images, score, and optionally second ID images).
|
|
45
|
-
*/
|
|
46
|
-
async function fetchFaceMatchData(config, signal) {
|
|
47
|
-
const promises = [fetchFaceMatchImages(signal), fetchScore(signal)];
|
|
48
|
-
if (config.variant === "secondId") promises.push(fetchSecondIdImages(signal));
|
|
49
|
-
const [imagesRes, resultRes, secondIdRes] = await Promise.all(promises);
|
|
50
|
-
return {
|
|
51
|
-
images: {
|
|
52
|
-
...imagesRes,
|
|
53
|
-
secondIdFace: secondIdRes?.secondIdFace ?? null
|
|
54
|
-
},
|
|
55
|
-
result: resultRes
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
//#endregion
|
|
60
|
-
//#region src/modules/face-match/faceMatchStateMachine.ts
|
|
61
|
-
const faceMatchMachine = setup({
|
|
62
|
-
types: {
|
|
63
|
-
context: {},
|
|
64
|
-
events: {},
|
|
65
|
-
input: {}
|
|
66
|
-
},
|
|
67
|
-
actors: { fetchData: fromPromise(async ({ input, signal }) => {
|
|
68
|
-
return fetchFaceMatchData(input.config, signal);
|
|
69
|
-
}) },
|
|
70
|
-
actions: {
|
|
71
|
-
setData: assign(({ event }) => {
|
|
72
|
-
const output = event.output;
|
|
73
|
-
return {
|
|
74
|
-
images: output.images,
|
|
75
|
-
result: output.result
|
|
76
|
-
};
|
|
77
|
-
}),
|
|
78
|
-
setError: assign(({ event }) => ({ error: String(event.error) })),
|
|
79
|
-
clearError: assign({ error: () => void 0 }),
|
|
80
|
-
resetContext: assign(({ context }) => ({
|
|
81
|
-
config: context.config,
|
|
82
|
-
images: null,
|
|
83
|
-
result: null,
|
|
84
|
-
error: void 0
|
|
85
|
-
}))
|
|
86
|
-
},
|
|
87
|
-
guards: { isAnimationDisabled: ({ context }) => context.config.disableFaceMatchAnimation === true }
|
|
88
|
-
}).createMachine({
|
|
89
|
-
id: "faceMatch",
|
|
90
|
-
initial: "idle",
|
|
91
|
-
context: ({ input }) => ({
|
|
92
|
-
config: input.config,
|
|
93
|
-
images: null,
|
|
94
|
-
result: null,
|
|
95
|
-
error: void 0
|
|
96
|
-
}),
|
|
97
|
-
states: {
|
|
98
|
-
idle: { on: { LOAD: { target: "loading" } } },
|
|
99
|
-
loading: { invoke: {
|
|
100
|
-
id: "fetchData",
|
|
101
|
-
src: "fetchData",
|
|
102
|
-
input: ({ context }) => ({ config: context.config }),
|
|
103
|
-
onDone: [{
|
|
104
|
-
target: "finished",
|
|
105
|
-
guard: "isAnimationDisabled",
|
|
106
|
-
actions: "setData"
|
|
107
|
-
}, {
|
|
108
|
-
target: "animating",
|
|
109
|
-
actions: "setData"
|
|
110
|
-
}],
|
|
111
|
-
onError: {
|
|
112
|
-
target: "error",
|
|
113
|
-
actions: "setError"
|
|
114
|
-
}
|
|
115
|
-
} },
|
|
116
|
-
animating: { on: { ANIMATION_COMPLETE: { target: "result" } } },
|
|
117
|
-
result: { on: { CONTINUE: { target: "finished" } } },
|
|
118
|
-
finished: { type: "final" },
|
|
119
|
-
error: { on: { RESET: {
|
|
120
|
-
target: "idle",
|
|
121
|
-
actions: "resetContext"
|
|
122
|
-
} } }
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
//#endregion
|
|
127
6
|
//#region src/modules/face-match/faceMatchActor.ts
|
|
128
7
|
function createFaceMatchActor(options) {
|
|
129
8
|
return createActor(faceMatchMachine, { input: { config: options.config } }).start();
|
|
@@ -153,7 +32,7 @@ function createFaceMatchActor(options) {
|
|
|
153
32
|
* // 2. Create the face match manager
|
|
154
33
|
* const faceMatchManager = createFaceMatchManager({
|
|
155
34
|
* config: {
|
|
156
|
-
*
|
|
35
|
+
* matchingType: 'selfieVsId',
|
|
157
36
|
* disableFaceMatchAnimation: true,
|
|
158
37
|
* },
|
|
159
38
|
* });
|
|
@@ -182,7 +61,7 @@ function createFaceMatchActor(options) {
|
|
|
182
61
|
* @example Headless face match with custom UI
|
|
183
62
|
* ```typescript
|
|
184
63
|
* const faceMatchManager = createFaceMatchManager({
|
|
185
|
-
* config: {
|
|
64
|
+
* config: { matchingType: 'selfieVsId', disableFaceMatchAnimation: false },
|
|
186
65
|
* });
|
|
187
66
|
*
|
|
188
67
|
* faceMatchManager.subscribe((state) => {
|
|
@@ -254,7 +133,7 @@ function createApi({ actor, trackElementClicked }) {
|
|
|
254
133
|
*
|
|
255
134
|
* @param options - Configuration options
|
|
256
135
|
* @param options.config - Face match configuration
|
|
257
|
-
* @param options.config.
|
|
136
|
+
* @param options.config.matchingType - Which images to compare (default: 'selfieVsId')
|
|
258
137
|
* @param options.config.disableFaceMatchAnimation - Skip animation and auto-complete (default: false)
|
|
259
138
|
*
|
|
260
139
|
* @returns Face match manager with state, API methods, and subscription
|
|
@@ -262,7 +141,7 @@ function createApi({ actor, trackElementClicked }) {
|
|
|
262
141
|
* @example Headless usage
|
|
263
142
|
* ```typescript
|
|
264
143
|
* const manager = createFaceMatchManager({
|
|
265
|
-
* config: {
|
|
144
|
+
* config: { matchingType: 'selfieVsId', disableFaceMatchAnimation: true },
|
|
266
145
|
* });
|
|
267
146
|
*
|
|
268
147
|
* manager.subscribe((state) => console.log(state.status));
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { o as createManagerInstrumentation } from "./events-CZ2ka3pu.esm.js";
|
|
2
|
+
import { o as createManager } from "./xstate.esm-D7D6CGwY.esm.js";
|
|
3
|
+
|
|
4
|
+
//#region src/internal/faceCapture/faceCaptureManagerFactory.ts
|
|
5
|
+
function getPermissionStatus(snapshot) {
|
|
6
|
+
if (!snapshot.matches("permissions")) return;
|
|
7
|
+
if (snapshot.matches({ permissions: "idle" })) return "idle";
|
|
8
|
+
if (snapshot.matches({ permissions: "learnMore" })) return "learnMore";
|
|
9
|
+
if (snapshot.matches({ permissions: "requesting" })) return "requesting";
|
|
10
|
+
if (snapshot.matches({ permissions: "denied" })) return "denied";
|
|
11
|
+
}
|
|
12
|
+
function getCaptureStatus(snapshot) {
|
|
13
|
+
if (snapshot.matches({ capture: "initializing" })) return "initializing";
|
|
14
|
+
if (snapshot.matches({ capture: "detecting" })) return "detecting";
|
|
15
|
+
if (snapshot.matches({ capture: "capturing" })) return "capturing";
|
|
16
|
+
if (snapshot.matches({ capture: "capturingManual" })) return "capturing";
|
|
17
|
+
if (snapshot.matches({ capture: "uploading" })) return "uploading";
|
|
18
|
+
if (snapshot.matches({ capture: "uploadError" })) return "uploadError";
|
|
19
|
+
if (snapshot.matches({ capture: "success" })) return "success";
|
|
20
|
+
}
|
|
21
|
+
function mapState(snapshot) {
|
|
22
|
+
const { context } = snapshot;
|
|
23
|
+
if (snapshot.matches("idle")) return { status: "idle" };
|
|
24
|
+
if (snapshot.matches("loading")) return { status: "loading" };
|
|
25
|
+
if (snapshot.matches("tutorial")) return { status: "tutorial" };
|
|
26
|
+
if (snapshot.matches("closed")) return { status: "closed" };
|
|
27
|
+
if (snapshot.matches("permissions")) {
|
|
28
|
+
const permissionStatus = getPermissionStatus(snapshot);
|
|
29
|
+
if (permissionStatus === void 0) return {
|
|
30
|
+
status: "permissions",
|
|
31
|
+
permissionStatus: "idle"
|
|
32
|
+
};
|
|
33
|
+
return {
|
|
34
|
+
status: "permissions",
|
|
35
|
+
permissionStatus
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
if (snapshot.matches("capture")) return {
|
|
39
|
+
status: "capture",
|
|
40
|
+
captureStatus: getCaptureStatus(snapshot) ?? "initializing",
|
|
41
|
+
stream: context.stream,
|
|
42
|
+
detectionStatus: context.detectionStatus ?? "idle",
|
|
43
|
+
debugFrame: context.debugFrame,
|
|
44
|
+
attemptsRemaining: context.attemptsRemaining ?? 0,
|
|
45
|
+
uploadError: context.uploadError,
|
|
46
|
+
assistedOnboarding: context.config?.assistedOnboarding ?? false
|
|
47
|
+
};
|
|
48
|
+
if (snapshot.matches("processing")) return { status: "processing" };
|
|
49
|
+
if (snapshot.matches("finished")) return {
|
|
50
|
+
status: "finished",
|
|
51
|
+
processResponse: context.processResponse
|
|
52
|
+
};
|
|
53
|
+
if (snapshot.matches("error")) {
|
|
54
|
+
const errorValue = context.error;
|
|
55
|
+
return {
|
|
56
|
+
status: "error",
|
|
57
|
+
error: typeof errorValue === "string" ? errorValue : errorValue ? errorValue.message : "Unknown error"
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
return { status: "idle" };
|
|
61
|
+
}
|
|
62
|
+
function createApi({ actor, trackElementClicked, trackCaptureAttemptFinished }) {
|
|
63
|
+
const snapshot = actor.getSnapshot();
|
|
64
|
+
snapshot.context.dependencies.trackCaptureAttemptFinished = trackCaptureAttemptFinished;
|
|
65
|
+
return {
|
|
66
|
+
load() {
|
|
67
|
+
actor.send({ type: "LOAD" });
|
|
68
|
+
},
|
|
69
|
+
nextStep() {
|
|
70
|
+
trackElementClicked?.("nextStep");
|
|
71
|
+
actor.send({ type: "NEXT_STEP" });
|
|
72
|
+
},
|
|
73
|
+
requestPermission() {
|
|
74
|
+
trackElementClicked?.("requestPermission");
|
|
75
|
+
actor.send({ type: "REQUEST_PERMISSION" });
|
|
76
|
+
},
|
|
77
|
+
goToLearnMore() {
|
|
78
|
+
trackElementClicked?.("goToLearnMore");
|
|
79
|
+
actor.send({ type: "GO_TO_LEARN_MORE" });
|
|
80
|
+
},
|
|
81
|
+
back() {
|
|
82
|
+
trackElementClicked?.("back");
|
|
83
|
+
actor.send({ type: "BACK" });
|
|
84
|
+
},
|
|
85
|
+
close() {
|
|
86
|
+
trackElementClicked?.("close");
|
|
87
|
+
actor.send({ type: "QUIT" });
|
|
88
|
+
},
|
|
89
|
+
reset() {
|
|
90
|
+
actor.send({ type: "RESET" });
|
|
91
|
+
},
|
|
92
|
+
retryCapture() {
|
|
93
|
+
trackElementClicked?.("retryCapture");
|
|
94
|
+
actor.send({ type: "RETRY_CAPTURE" });
|
|
95
|
+
},
|
|
96
|
+
capture() {
|
|
97
|
+
trackElementClicked?.("capture");
|
|
98
|
+
actor.send({ type: "MANUAL_CAPTURE" });
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
function getFaceCaptureErrorPayload(snapshot) {
|
|
103
|
+
const errorCode = snapshot.context.uploadError;
|
|
104
|
+
if (typeof errorCode !== "string" || errorCode.length === 0) return;
|
|
105
|
+
return { errorCode };
|
|
106
|
+
}
|
|
107
|
+
function createFaceCaptureManagerFromActor(actor, moduleName) {
|
|
108
|
+
return createManager({
|
|
109
|
+
actor,
|
|
110
|
+
mapState,
|
|
111
|
+
createApi,
|
|
112
|
+
instrumentation: createManagerInstrumentation(moduleName, { getErrorPayload: getFaceCaptureErrorPayload })
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
//#endregion
|
|
117
|
+
export { createFaceCaptureManagerFromActor as t };
|
package/dist/{faceCaptureManagerFactory-Da_-ohdg.d.ts → faceCaptureManagerFactory-DS-6yCya.d.ts}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { n as WasmPipeline } from "./warmup-
|
|
2
|
-
import { t as Manager } from "./Manager-
|
|
3
|
-
import { t as ActorRefFrom } from "./Actor-
|
|
4
|
-
import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-
|
|
5
|
-
import { t as CameraStream } from "./camera-
|
|
6
|
-
import { r as FlowModuleConfig, t as Flow } from "./types-
|
|
7
|
-
import { a as IWasmUtilCapability, c as IMLProviderCapability, d as IRecordingCapability, i as IncodeCanvas, l as MLProviderConfig, r as StreamCanvasCapture, t as DeepsightService, u as IStorageCapability } from "./deepsightService-
|
|
8
|
-
import { n as PermissionStatus, t as PermissionResult } from "./types-
|
|
1
|
+
import { n as WasmPipeline } from "./warmup-Cs0uqxUW.js";
|
|
2
|
+
import { t as Manager } from "./Manager-Bcnemkyi.js";
|
|
3
|
+
import { t as ActorRefFrom } from "./Actor-BkPcZGke.js";
|
|
4
|
+
import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-DIeoDJ7r.js";
|
|
5
|
+
import { t as CameraStream } from "./camera-CgnuDuxy.js";
|
|
6
|
+
import { r as FlowModuleConfig, t as Flow } from "./types-m43DfiSx.js";
|
|
7
|
+
import { a as IWasmUtilCapability, c as IMLProviderCapability, d as IRecordingCapability, i as IncodeCanvas, l as MLProviderConfig, r as StreamCanvasCapture, t as DeepsightService, u as IStorageCapability } from "./deepsightService-DAeakjDd.js";
|
|
8
|
+
import { n as PermissionStatus, t as PermissionResult } from "./types-CxU9jTRl.js";
|
|
9
9
|
|
|
10
10
|
//#region src/modules/authentication/authenticationStateMachine.d.ts
|
|
11
11
|
declare const _authenticationMachine: AnyStateMachine;
|
|
@@ -1,122 +1,8 @@
|
|
|
1
|
-
import { r as getToken } from "./api-
|
|
2
|
-
import {
|
|
3
|
-
import { i as
|
|
4
|
-
import {
|
|
5
|
-
import { n as requestPermission, t as checkPermission } from "./permissionServices-Cskq32Yd.esm.js";
|
|
1
|
+
import { r as getToken } from "./api-CqKwkjJ3.esm.js";
|
|
2
|
+
import { i as fromPromise, n as assign, r as fromCallback, t as setup } from "./xstate.esm-D7D6CGwY.esm.js";
|
|
3
|
+
import { _ as StreamCanvasCapture, a as initializeDeepsightSession, c as stopStream, h as flagFaceManualReview, i as initializeCamera, n as preloadOpenViduProvider, o as sendLabelInspectionEvent, r as encryptSelfieImage, s as startDetection, t as createRecordingService, v as FACE_ERROR_CODES } from "./recordingService-8I_-hhNI.esm.js";
|
|
4
|
+
import { n as requestPermission, t as checkPermission } from "./permissionServices-Cj120WaT.esm.js";
|
|
6
5
|
|
|
7
|
-
//#region src/internal/faceCapture/faceCaptureManagerFactory.ts
|
|
8
|
-
function getPermissionStatus(snapshot) {
|
|
9
|
-
if (!snapshot.matches("permissions")) return;
|
|
10
|
-
if (snapshot.matches({ permissions: "idle" })) return "idle";
|
|
11
|
-
if (snapshot.matches({ permissions: "learnMore" })) return "learnMore";
|
|
12
|
-
if (snapshot.matches({ permissions: "requesting" })) return "requesting";
|
|
13
|
-
if (snapshot.matches({ permissions: "denied" })) return "denied";
|
|
14
|
-
}
|
|
15
|
-
function getCaptureStatus(snapshot) {
|
|
16
|
-
if (snapshot.matches({ capture: "initializing" })) return "initializing";
|
|
17
|
-
if (snapshot.matches({ capture: "detecting" })) return "detecting";
|
|
18
|
-
if (snapshot.matches({ capture: "capturing" })) return "capturing";
|
|
19
|
-
if (snapshot.matches({ capture: "capturingManual" })) return "capturing";
|
|
20
|
-
if (snapshot.matches({ capture: "uploading" })) return "uploading";
|
|
21
|
-
if (snapshot.matches({ capture: "uploadError" })) return "uploadError";
|
|
22
|
-
if (snapshot.matches({ capture: "success" })) return "success";
|
|
23
|
-
}
|
|
24
|
-
function mapState(snapshot) {
|
|
25
|
-
const { context } = snapshot;
|
|
26
|
-
if (snapshot.matches("idle")) return { status: "idle" };
|
|
27
|
-
if (snapshot.matches("loading")) return { status: "loading" };
|
|
28
|
-
if (snapshot.matches("tutorial")) return { status: "tutorial" };
|
|
29
|
-
if (snapshot.matches("closed")) return { status: "closed" };
|
|
30
|
-
if (snapshot.matches("permissions")) {
|
|
31
|
-
const permissionStatus = getPermissionStatus(snapshot);
|
|
32
|
-
if (permissionStatus === void 0) return {
|
|
33
|
-
status: "permissions",
|
|
34
|
-
permissionStatus: "idle"
|
|
35
|
-
};
|
|
36
|
-
return {
|
|
37
|
-
status: "permissions",
|
|
38
|
-
permissionStatus
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
if (snapshot.matches("capture")) return {
|
|
42
|
-
status: "capture",
|
|
43
|
-
captureStatus: getCaptureStatus(snapshot) ?? "initializing",
|
|
44
|
-
stream: context.stream,
|
|
45
|
-
detectionStatus: context.detectionStatus ?? "idle",
|
|
46
|
-
debugFrame: context.debugFrame,
|
|
47
|
-
attemptsRemaining: context.attemptsRemaining ?? 0,
|
|
48
|
-
uploadError: context.uploadError,
|
|
49
|
-
assistedOnboarding: context.config?.assistedOnboarding ?? false
|
|
50
|
-
};
|
|
51
|
-
if (snapshot.matches("processing")) return { status: "processing" };
|
|
52
|
-
if (snapshot.matches("finished")) return {
|
|
53
|
-
status: "finished",
|
|
54
|
-
processResponse: context.processResponse
|
|
55
|
-
};
|
|
56
|
-
if (snapshot.matches("error")) {
|
|
57
|
-
const errorValue = context.error;
|
|
58
|
-
return {
|
|
59
|
-
status: "error",
|
|
60
|
-
error: typeof errorValue === "string" ? errorValue : errorValue ? errorValue.message : "Unknown error"
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
return { status: "idle" };
|
|
64
|
-
}
|
|
65
|
-
function createApi({ actor, trackElementClicked, trackCaptureAttemptFinished }) {
|
|
66
|
-
const snapshot = actor.getSnapshot();
|
|
67
|
-
snapshot.context.dependencies.trackCaptureAttemptFinished = trackCaptureAttemptFinished;
|
|
68
|
-
return {
|
|
69
|
-
load() {
|
|
70
|
-
actor.send({ type: "LOAD" });
|
|
71
|
-
},
|
|
72
|
-
nextStep() {
|
|
73
|
-
trackElementClicked?.("nextStep");
|
|
74
|
-
actor.send({ type: "NEXT_STEP" });
|
|
75
|
-
},
|
|
76
|
-
requestPermission() {
|
|
77
|
-
trackElementClicked?.("requestPermission");
|
|
78
|
-
actor.send({ type: "REQUEST_PERMISSION" });
|
|
79
|
-
},
|
|
80
|
-
goToLearnMore() {
|
|
81
|
-
trackElementClicked?.("goToLearnMore");
|
|
82
|
-
actor.send({ type: "GO_TO_LEARN_MORE" });
|
|
83
|
-
},
|
|
84
|
-
back() {
|
|
85
|
-
trackElementClicked?.("back");
|
|
86
|
-
actor.send({ type: "BACK" });
|
|
87
|
-
},
|
|
88
|
-
close() {
|
|
89
|
-
trackElementClicked?.("close");
|
|
90
|
-
actor.send({ type: "QUIT" });
|
|
91
|
-
},
|
|
92
|
-
reset() {
|
|
93
|
-
actor.send({ type: "RESET" });
|
|
94
|
-
},
|
|
95
|
-
retryCapture() {
|
|
96
|
-
trackElementClicked?.("retryCapture");
|
|
97
|
-
actor.send({ type: "RETRY_CAPTURE" });
|
|
98
|
-
},
|
|
99
|
-
capture() {
|
|
100
|
-
trackElementClicked?.("capture");
|
|
101
|
-
actor.send({ type: "MANUAL_CAPTURE" });
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
function getFaceCaptureErrorPayload(snapshot) {
|
|
106
|
-
const errorCode = snapshot.context.uploadError;
|
|
107
|
-
if (typeof errorCode !== "string" || errorCode.length === 0) return;
|
|
108
|
-
return { errorCode };
|
|
109
|
-
}
|
|
110
|
-
function createFaceCaptureManagerFromActor(actor, moduleName) {
|
|
111
|
-
return createManager({
|
|
112
|
-
actor,
|
|
113
|
-
mapState,
|
|
114
|
-
createApi,
|
|
115
|
-
instrumentation: createManagerInstrumentation(moduleName, { getErrorPayload: getFaceCaptureErrorPayload })
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
//#endregion
|
|
120
6
|
//#region src/internal/faceCapture/faceCaptureSetup.ts
|
|
121
7
|
const getAttemptsFromConfig = (config) => {
|
|
122
8
|
return config.captureAttempts ?? config.numberOfAttempts ?? 3;
|
|
@@ -825,4 +711,4 @@ const _faceCaptureMachine = setup({
|
|
|
825
711
|
const faceCaptureMachine = _faceCaptureMachine;
|
|
826
712
|
|
|
827
713
|
//#endregion
|
|
828
|
-
export {
|
|
714
|
+
export { faceCaptureMachine as t };
|