@incodetech/core 0.0.0-dev-20260413-de45fd6 → 0.0.0-dev-20260414-db434be
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/{OpenViduRecordingProvider-JatjSE3h.esm.js → OpenViduRecordingProvider-CCUuM9nV.esm.js} +1 -1
- package/dist/{WasmUtilProvider-DRh0wrlm.esm.js → WasmUtilProvider-CYe0Xlh-.esm.js} +1 -1
- package/dist/{addressSearch-DdrQw-hp.esm.js → addressSearch-Ui2rQ1v-.esm.js} +4 -4
- package/dist/antifraud.d.ts +1 -1
- package/dist/antifraud.esm.js +4 -4
- package/dist/{antifraudStateMachine-DZKc03yw.esm.js → antifraudStateMachine-ZNM45OSv.esm.js} +3 -3
- package/dist/authentication.d.ts +11 -11
- package/dist/authentication.esm.js +22 -22
- package/dist/{authenticationManager-FnMwzV2u.d.ts → authenticationManager-BuWdnIab.d.ts} +2 -2
- package/dist/{authenticationManager-BAYd8gOR.esm.js → authenticationManager-CwWzwxMp.esm.js} +6 -6
- package/dist/{authenticationStateMachine-D12jAEkO.esm.js → authenticationStateMachine-CAvcWS_b.esm.js} +6 -6
- package/dist/{backCameraStream-BihRmMzc.esm.js → backCameraStream-amVBjSd6.esm.js} +3 -3
- package/dist/camera.d.ts +1 -1
- package/dist/camera.esm.js +3 -3
- package/dist/consent.d.ts +55 -55
- package/dist/consent.esm.js +4 -4
- package/dist/{consentStateMachine-BPQ4O1Ye.esm.js → consentStateMachine-YbOlYveq.esm.js} +3 -3
- 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 -4
- package/dist/{curpValidationStateMachine-DxuEodU2.esm.js → curpValidationStateMachine-D3NZ1SVG.esm.js} +3 -3
- package/dist/{deepsightLoader-jIgoauFK.esm.js → deepsightLoader-BqeQIeno.esm.js} +10 -10
- package/dist/{deepsightService-D4mM8yJ2.esm.js → deepsightService-B14izXzw.esm.js} +5 -5
- package/dist/{deepsightService-DAeakjDd.d.ts → deepsightService-CNR9-7As.d.ts} +2 -2
- package/dist/device.esm.js +3 -3
- package/dist/document-capture.d.ts +3 -3
- package/dist/document-capture.esm.js +8 -8
- package/dist/document-upload.d.ts +44 -44
- package/dist/document-upload.esm.js +7 -7
- package/dist/{documentCaptureStateMachine-DLhPQTCu.esm.js → documentCaptureStateMachine-CFNsZHSs.esm.js} +5 -5
- package/dist/ekyb.d.ts +3 -3
- package/dist/ekyb.esm.js +10 -10
- package/dist/{ekybStateMachine-M7Upw7fD.esm.js → ekybStateMachine-BJS8bjot.esm.js} +5 -5
- package/dist/ekyc.d.ts +3 -3
- package/dist/ekyc.esm.js +6 -6
- package/dist/{ekycStateMachine-DHyAEUnE.esm.js → ekycStateMachine-CYGpzMDd.esm.js} +4 -4
- package/dist/email.d.ts +3 -3
- package/dist/email.esm.js +6 -6
- package/dist/{emailManager-C8Zbw5xl.esm.js → emailManager-BNmWTggA.esm.js} +3 -3
- package/dist/{emailManager-NVkr3gYf.d.ts → emailManager-DT0plT1F.d.ts} +2 -2
- package/dist/{emailStateMachine-DSaFON9T.esm.js → emailStateMachine-vD2VtYZM.esm.js} +4 -4
- package/dist/{events-BjiB9Q1C.esm.js → events-B3HfNWqp.esm.js} +3 -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 -33
- package/dist/face-match.d.ts +1 -1
- package/dist/face-match.esm.js +4 -4
- package/dist/{faceCaptureManagerFactory-D5WpBtSM.d.ts → faceCaptureManagerFactory-BBwp70tn.d.ts} +8 -8
- package/dist/{faceCaptureManagerFactory-B1-bhK3L.esm.js → faceCaptureManagerFactory-odfjA0d8.esm.js} +2 -2
- package/dist/{faceCaptureSetup-CnpsYL-c.esm.js → faceCaptureSetup-CdYYDgN6.esm.js} +4 -4
- package/dist/{faceMatchStateMachine-DfGqIm8j.esm.js → faceMatchStateMachine-DptHGpKT.esm.js} +3 -3
- package/dist/flow.d.ts +16 -11
- package/dist/flow.esm.js +9 -9
- package/dist/{flowCompletionService-8Udg-BwW.esm.js → flowCompletionService-BhzS182Y.esm.js} +2 -2
- package/dist/{flowServices-D4yGOYZG.esm.js → flowServices-D_yVNocO.esm.js} +16 -10
- package/dist/geolocation.d.ts +2 -2
- package/dist/geolocation.esm.js +5 -5
- package/dist/{geolocationStateMachine-NFrAD2gH.esm.js → geolocationStateMachine-DY8eWROq.esm.js} +4 -4
- package/dist/{getDeviceClass-BoiWvKAc.esm.js → getDeviceClass-CkdEWjAM.esm.js} +1 -1
- package/dist/government-validation.d.ts +2 -2
- package/dist/government-validation.esm.js +5 -5
- package/dist/{governmentValidationStateMachine-CAxpYlz3.esm.js → governmentValidationStateMachine-DCqdkm8Z.esm.js} +4 -4
- package/dist/home.d.ts +129 -0
- package/dist/home.esm.js +73 -0
- package/dist/http.esm.js +1 -1
- package/dist/id.d.ts +10 -10
- package/dist/id.esm.js +22 -22
- package/dist/{idCaptureManager-DfaZzJV3.d.ts → idCaptureManager-D1MiNNuR.d.ts} +7 -7
- package/dist/{idCaptureManager-DruPQ5pA.esm.js → idCaptureManager-_e78xuEM.esm.js} +4 -4
- package/dist/{idCaptureStateMachine-CEHQVPXX.esm.js → idCaptureStateMachine-CYPfS8iO.esm.js} +16 -16
- package/dist/identity-reuse.d.ts +46 -46
- package/dist/identity-reuse.esm.js +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +8 -8
- package/dist/{lib-CxDxnzRd.esm.js → lib-BcTqNgYu.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +55 -55
- package/dist/mandatory-consent.esm.js +4 -4
- package/dist/{mandatoryConsentStateMachine-zHii57mc.esm.js → mandatoryConsentStateMachine-D0weA8Cn.esm.js} +3 -3
- package/dist/{openviduLazy-B8tinh9W.esm.js → openviduLazy-BiBkiXcn.esm.js} +2 -2
- package/dist/openviduLazy-CrjlHYIL.esm.js +3 -0
- package/dist/{permissionServices-Cj120WaT.esm.js → permissionServices-ElKNJ-9J.esm.js} +2 -2
- package/dist/phone.d.ts +3 -3
- package/dist/phone.esm.js +6 -6
- package/dist/{phoneManager-KeGunMJF.d.ts → phoneManager-BxWESUBK.d.ts} +2 -2
- package/dist/{phoneManager-Cpd4VD3O.esm.js → phoneManager-CRVt9rvr.esm.js} +3 -3
- package/dist/{phoneStateMachine-Bhzv058R.esm.js → phoneStateMachine-BMTT0tvu.esm.js} +4 -4
- package/dist/{recordingService-Drvj5nOf.esm.js → recordingService-BNOxJMAM.esm.js} +13 -13
- package/dist/redirect-to-mobile.d.ts +2 -2
- package/dist/redirect-to-mobile.esm.js +5 -5
- package/dist/{redirectToMobileStateMachine-ChdhlqsE.esm.js → redirectToMobileStateMachine-8yOC9dnH.esm.js} +4 -4
- package/dist/{runChildModule-B5DEiOS7.esm.js → runChildModule-eBqC5Z25.esm.js} +1 -1
- package/dist/selfie.d.ts +11 -11
- package/dist/selfie.esm.js +22 -22
- package/dist/{selfieManager-LrnnqNh8.d.ts → selfieManager-B7XmNptL.d.ts} +2 -2
- package/dist/{selfieManager-VXvYzqpE.esm.js → selfieManager-C6pl5f2B.esm.js} +6 -6
- package/dist/{selfieStateMachine-UFiVoA2o.esm.js → selfieStateMachine-B88Q3SFX.esm.js} +3 -3
- package/dist/{session-DFNlZPO2.esm.js → session-D2s2kUoa.esm.js} +4 -4
- package/dist/session.d.ts +1 -1
- package/dist/session.esm.js +6 -6
- package/dist/{setup-Bz3Ffaoc.d.ts → setup-DR4SBtyZ.d.ts} +1 -1
- package/dist/{setup-D4wIfKMo.esm.js → setup-nE0hEkGl.esm.js} +5 -5
- package/dist/signature.d.ts +2 -2
- package/dist/signature.esm.js +4 -4
- package/dist/{signatureStateMachine-BwEaOwbU.esm.js → signatureStateMachine-BOdPhzPM.esm.js} +3 -3
- package/dist/{stats-wkQyDFV3.esm.js → stats-D0m-GAIR.esm.js} +1 -1
- package/dist/stats.esm.js +2 -2
- package/dist/{types-CvrR1E0A.d.ts → types-BoV6HZZE.d.ts} +1 -1
- package/dist/{types-m43DfiSx.d.ts → types-DR5Xxm-c.d.ts} +3 -2
- package/dist/{types-CdlQrTiZ.d.ts → types-vklwHgIM.d.ts} +1 -1
- package/dist/wasm.d.ts +2 -2
- package/dist/wasm.esm.js +8 -8
- package/dist/watchlist.d.ts +62 -0
- package/dist/watchlist.esm.js +99 -0
- package/dist/workflow.d.ts +116 -116
- package/dist/workflow.esm.js +41 -41
- package/package.json +9 -1
- package/dist/openviduLazy-CItjpMfL.esm.js +0 -3
- /package/dist/{Actor-KC-0sV1E.d.ts → Actor-iMyH_hBY.d.ts} +0 -0
- /package/dist/{BaseWasmProvider-C73c2nV9.esm.js → BaseWasmProvider-DFM6aa1Z.esm.js} +0 -0
- /package/dist/{BrowserEnvironmentProvider-lxn4oxXn.esm.js → BrowserEnvironmentProvider-4Vr7ceoW.esm.js} +0 -0
- /package/dist/{BrowserStorageProvider-ByxoNfxC.esm.js → BrowserStorageProvider-Dp9k9EzW.esm.js} +0 -0
- /package/dist/{BrowserTimerProvider-CSdm7__S.esm.js → BrowserTimerProvider-BfL0cWbj.esm.js} +0 -0
- /package/dist/{ITimerCapability-DAIaq369.esm.js → ITimerCapability-_YySEUj7.esm.js} +0 -0
- /package/dist/{Manager-Bcnemkyi.d.ts → Manager-BzPNdMJn.d.ts} +0 -0
- /package/dist/{MotionSensorProvider-BLnFo6My.esm.js → MotionSensorProvider-Bi6DuLLP.esm.js} +0 -0
- /package/dist/{StateMachine-BQSmCXnT.d.ts → StateMachine-DIeoDJ7r.d.ts} +0 -0
- /package/dist/{api-CqKwkjJ3.esm.js → api-CGdjmBzR.esm.js} +0 -0
- /package/dist/{browserSimulation-7W5-A3RV.esm.js → browserSimulation-D9FTZt0Z.esm.js} +0 -0
- /package/dist/{camera-B-5traWf.esm.js → camera-C4T2nh2F.esm.js} +0 -0
- /package/dist/{camera-CgnuDuxy.d.ts → camera-DdgjYGQh.d.ts} +0 -0
- /package/dist/{chunk-Qw4qVmMx.esm.js → chunk-CT7w1OiQ.esm.js} +0 -0
- /package/dist/{displayErrors-C9-VaqmS.d.ts → displayErrors-CGztf2Nk.d.ts} +0 -0
- /package/dist/{flowCompletionService-CPLdZxe-.d.ts → flowCompletionService-CNpeRlnP.d.ts} +0 -0
- /package/dist/{getBrowser-DJkbzQ5t.esm.js → getBrowser-DR_WEE3I.esm.js} +0 -0
- /package/dist/{platform-BfoqeM61.esm.js → platform-B81QvKKx.esm.js} +0 -0
- /package/dist/{types-CxU9jTRl.d.ts → types-Bo7LR34d.d.ts} +0 -0
- /package/dist/{warmup-Cs0uqxUW.d.ts → warmup-C5bT21Jo.d.ts} +0 -0
- /package/dist/{xstate.esm-D7D6CGwY.esm.js → xstate.esm-DW_uPCba.esm.js} +0 -0
package/dist/phone.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./api-
|
|
2
|
-
import "./events-
|
|
3
|
-
import "./xstate.esm-
|
|
4
|
-
import "./BrowserTimerProvider-
|
|
5
|
-
import { t as phoneMachine } from "./phoneStateMachine-
|
|
6
|
-
import { t as createPhoneManager } from "./phoneManager-
|
|
1
|
+
import "./api-CGdjmBzR.esm.js";
|
|
2
|
+
import "./events-B3HfNWqp.esm.js";
|
|
3
|
+
import "./xstate.esm-DW_uPCba.esm.js";
|
|
4
|
+
import "./BrowserTimerProvider-BfL0cWbj.esm.js";
|
|
5
|
+
import { t as phoneMachine } from "./phoneStateMachine-BMTT0tvu.esm.js";
|
|
6
|
+
import { t as createPhoneManager } from "./phoneManager-CRVt9rvr.esm.js";
|
|
7
7
|
|
|
8
8
|
export { createPhoneManager, phoneMachine };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Manager } from "./Manager-
|
|
2
|
-
import { t as ActorRefFrom } from "./Actor-
|
|
1
|
+
import { t as Manager } from "./Manager-BzPNdMJn.js";
|
|
2
|
+
import { t as ActorRefFrom } from "./Actor-iMyH_hBY.js";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/phone/types.d.ts
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
2
|
-
import { a as createActor, o as createManager } from "./xstate.esm-
|
|
3
|
-
import { t as phoneMachine } from "./phoneStateMachine-
|
|
1
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-B3HfNWqp.esm.js";
|
|
2
|
+
import { a as createActor, o as createManager } from "./xstate.esm-DW_uPCba.esm.js";
|
|
3
|
+
import { t as phoneMachine } from "./phoneStateMachine-BMTT0tvu.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/phone/phoneActor.ts
|
|
6
6
|
function createPhoneActor(options) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as api } from "./api-
|
|
2
|
-
import { _ as endpoints } from "./events-
|
|
3
|
-
import { i as fromPromise, n as assign, r as fromCallback, t as setup } from "./xstate.esm-
|
|
4
|
-
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-
|
|
1
|
+
import { t as api } from "./api-CGdjmBzR.esm.js";
|
|
2
|
+
import { _ as endpoints } from "./events-B3HfNWqp.esm.js";
|
|
3
|
+
import { i as fromPromise, n as assign, r as fromCallback, t as setup } from "./xstate.esm-DW_uPCba.esm.js";
|
|
4
|
+
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BfL0cWbj.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/phone/phoneServices.ts
|
|
7
7
|
async function fetchPhone(signal) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { i as WasmPipelineType, r as mlWasmJSApi_default, t as BaseWasmProvider } from "./BaseWasmProvider-
|
|
2
|
-
import { t as api } from "./api-
|
|
3
|
-
import { _ as endpoints } from "./events-
|
|
4
|
-
import { n as IncodeCanvas } from "./deepsightService-
|
|
5
|
-
import { i as stopCameraStream, r as requestCameraAccess } from "./camera-
|
|
6
|
-
import { t as addDeviceStats } from "./stats-
|
|
7
|
-
import { a as isIPhone14OrHigher, n as isDesktop, r as isIOS, t as isAndroid } from "./platform-
|
|
8
|
-
import { n as getDesktopCameraStream, t as getBackCameraStream } from "./backCameraStream-
|
|
9
|
-
import { t as getDeviceClass } from "./getDeviceClass-
|
|
1
|
+
import { i as WasmPipelineType, r as mlWasmJSApi_default, t as BaseWasmProvider } from "./BaseWasmProvider-DFM6aa1Z.esm.js";
|
|
2
|
+
import { t as api } from "./api-CGdjmBzR.esm.js";
|
|
3
|
+
import { _ as endpoints } from "./events-B3HfNWqp.esm.js";
|
|
4
|
+
import { n as IncodeCanvas } from "./deepsightService-B14izXzw.esm.js";
|
|
5
|
+
import { i as stopCameraStream, r as requestCameraAccess } from "./camera-C4T2nh2F.esm.js";
|
|
6
|
+
import { t as addDeviceStats } from "./stats-D0m-GAIR.esm.js";
|
|
7
|
+
import { a as isIPhone14OrHigher, n as isDesktop, r as isIOS, t as isAndroid } from "./platform-B81QvKKx.esm.js";
|
|
8
|
+
import { n as getDesktopCameraStream, t as getBackCameraStream } from "./backCameraStream-amVBjSd6.esm.js";
|
|
9
|
+
import { t as getDeviceClass } from "./getDeviceClass-CkdEWjAM.esm.js";
|
|
10
10
|
|
|
11
11
|
//#region src/internal/faceCapture/types.ts
|
|
12
12
|
const FACE_ERROR_CODES = {
|
|
@@ -593,7 +593,7 @@ function buildResolutionFromStream(stream) {
|
|
|
593
593
|
if (typeof width === "number" && typeof height === "number") return `${width}x${height}`;
|
|
594
594
|
}
|
|
595
595
|
async function createOpenViduRecordingProvider() {
|
|
596
|
-
const { OpenViduRecordingProvider } = await import("./OpenViduRecordingProvider-
|
|
596
|
+
const { OpenViduRecordingProvider } = await import("./OpenViduRecordingProvider-CCUuM9nV.esm.js");
|
|
597
597
|
return new OpenViduRecordingProvider();
|
|
598
598
|
}
|
|
599
599
|
async function startRecordingSession(params) {
|
|
@@ -633,7 +633,7 @@ async function stopRecording(session) {
|
|
|
633
633
|
}
|
|
634
634
|
}
|
|
635
635
|
async function initializeDeepsightSession(options) {
|
|
636
|
-
const { loadDeepsightSession } = await import("./deepsightLoader-
|
|
636
|
+
const { loadDeepsightSession } = await import("./deepsightLoader-BqeQIeno.esm.js");
|
|
637
637
|
return loadDeepsightSession({
|
|
638
638
|
ds: options.ds,
|
|
639
639
|
storage: options.storage
|
|
@@ -891,12 +891,12 @@ var LocalRecordingProvider = class {
|
|
|
891
891
|
let openViduProviderImportPromise;
|
|
892
892
|
let openViduBrowserImportPromise;
|
|
893
893
|
function loadOpenViduProviderModule() {
|
|
894
|
-
if (!openViduProviderImportPromise) openViduProviderImportPromise = import("./OpenViduRecordingProvider-
|
|
894
|
+
if (!openViduProviderImportPromise) openViduProviderImportPromise = import("./OpenViduRecordingProvider-CCUuM9nV.esm.js");
|
|
895
895
|
return openViduProviderImportPromise;
|
|
896
896
|
}
|
|
897
897
|
function loadOpenViduBrowserModule() {
|
|
898
898
|
if (!openViduBrowserImportPromise) openViduBrowserImportPromise = (async () => {
|
|
899
|
-
return (await import("./openviduLazy-
|
|
899
|
+
return (await import("./openviduLazy-CrjlHYIL.esm.js")).loadOpenVidu();
|
|
900
900
|
})();
|
|
901
901
|
return openViduBrowserImportPromise;
|
|
902
902
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./api-
|
|
2
|
-
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
3
|
-
import { a as createActor, o as createManager } from "./xstate.esm-
|
|
4
|
-
import "./BrowserTimerProvider-
|
|
5
|
-
import { t as redirectToMobileMachine } from "./redirectToMobileStateMachine-
|
|
1
|
+
import "./api-CGdjmBzR.esm.js";
|
|
2
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-B3HfNWqp.esm.js";
|
|
3
|
+
import { a as createActor, o as createManager } from "./xstate.esm-DW_uPCba.esm.js";
|
|
4
|
+
import "./BrowserTimerProvider-BfL0cWbj.esm.js";
|
|
5
|
+
import { t as redirectToMobileMachine } from "./redirectToMobileStateMachine-8yOC9dnH.esm.js";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/redirect-to-mobile/redirectToMobileActor.ts
|
|
8
8
|
function createRedirectToMobileActor(options) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as api } from "./api-
|
|
2
|
-
import { _ as endpoints } from "./events-
|
|
3
|
-
import { i as fromPromise, n as assign, r as fromCallback, t as setup } from "./xstate.esm-
|
|
4
|
-
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-
|
|
1
|
+
import { t as api } from "./api-CGdjmBzR.esm.js";
|
|
2
|
+
import { _ as endpoints } from "./events-B3HfNWqp.esm.js";
|
|
3
|
+
import { i as fromPromise, n as assign, r as fromCallback, t as setup } from "./xstate.esm-DW_uPCba.esm.js";
|
|
4
|
+
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BfL0cWbj.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region ../infra/src/url/urlUtils.ts
|
|
7
7
|
function getUrlSearchParam(url, param) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as createActor, r as fromCallback } from "./xstate.esm-
|
|
1
|
+
import { a as createActor, r as fromCallback } from "./xstate.esm-DW_uPCba.esm.js";
|
|
2
2
|
|
|
3
3
|
//#region src/internal/orchestration/runChildModule.ts
|
|
4
4
|
const runChildModule = fromCallback(({ sendBack, input }) => {
|
package/dist/selfie.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import "./warmup-
|
|
2
|
-
import "./Manager-
|
|
3
|
-
import "./StateMachine-
|
|
4
|
-
import "./Actor-
|
|
5
|
-
import { a as SelfieMachine, d as SelfieConfig, o as selfieMachine, v as DetectionStatus, y as FaceErrorCode } from "./faceCaptureManagerFactory-
|
|
6
|
-
import { t as CameraStream } from "./camera-
|
|
7
|
-
import "./types-
|
|
8
|
-
import "./types-
|
|
9
|
-
import { t as DeepsightService } from "./deepsightService-
|
|
10
|
-
import { n as PermissionStatus, t as PermissionResult } from "./types-
|
|
11
|
-
import { a as ProcessFaceResponse, n as SelfieState, o as processFace, r as createSelfieManager, t as SelfieManager } from "./selfieManager-
|
|
1
|
+
import "./warmup-C5bT21Jo.js";
|
|
2
|
+
import "./Manager-BzPNdMJn.js";
|
|
3
|
+
import "./StateMachine-DIeoDJ7r.js";
|
|
4
|
+
import "./Actor-iMyH_hBY.js";
|
|
5
|
+
import { a as SelfieMachine, d as SelfieConfig, o as selfieMachine, v as DetectionStatus, y as FaceErrorCode } from "./faceCaptureManagerFactory-BBwp70tn.js";
|
|
6
|
+
import { t as CameraStream } from "./camera-DdgjYGQh.js";
|
|
7
|
+
import "./types-vklwHgIM.js";
|
|
8
|
+
import "./types-DR5Xxm-c.js";
|
|
9
|
+
import { t as DeepsightService } from "./deepsightService-CNR9-7As.js";
|
|
10
|
+
import { n as PermissionStatus, t as PermissionResult } from "./types-Bo7LR34d.js";
|
|
11
|
+
import { a as ProcessFaceResponse, n as SelfieState, o as processFace, r as createSelfieManager, t as SelfieManager } from "./selfieManager-B7XmNptL.js";
|
|
12
12
|
export { type CameraStream, type DeepsightService, type DetectionStatus, type FaceErrorCode, type PermissionResult, type PermissionStatus, type ProcessFaceResponse, type SelfieConfig, type SelfieMachine, type SelfieManager, type SelfieState, createSelfieManager, processFace, selfieMachine };
|
package/dist/selfie.esm.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import "./BaseWasmProvider-
|
|
2
|
-
import "./WasmUtilProvider-
|
|
3
|
-
import "./api-
|
|
4
|
-
import "./events-
|
|
5
|
-
import "./browserSimulation-
|
|
6
|
-
import "./xstate.esm-
|
|
7
|
-
import "./faceCaptureManagerFactory-
|
|
8
|
-
import "./BrowserStorageProvider-
|
|
9
|
-
import { l as processFace } from "./recordingService-
|
|
10
|
-
import "./deepsightService-
|
|
11
|
-
import "./camera-
|
|
12
|
-
import "./getBrowser-
|
|
13
|
-
import "./stats-
|
|
14
|
-
import "./MotionSensorProvider-
|
|
15
|
-
import "./permissionServices-
|
|
16
|
-
import "./platform-
|
|
17
|
-
import "./ITimerCapability-
|
|
18
|
-
import "./backCameraStream-
|
|
19
|
-
import "./getDeviceClass-
|
|
20
|
-
import "./faceCaptureSetup-
|
|
21
|
-
import { t as selfieMachine } from "./selfieStateMachine-
|
|
22
|
-
import { t as createSelfieManager } from "./selfieManager-
|
|
1
|
+
import "./BaseWasmProvider-DFM6aa1Z.esm.js";
|
|
2
|
+
import "./WasmUtilProvider-CYe0Xlh-.esm.js";
|
|
3
|
+
import "./api-CGdjmBzR.esm.js";
|
|
4
|
+
import "./events-B3HfNWqp.esm.js";
|
|
5
|
+
import "./browserSimulation-D9FTZt0Z.esm.js";
|
|
6
|
+
import "./xstate.esm-DW_uPCba.esm.js";
|
|
7
|
+
import "./faceCaptureManagerFactory-odfjA0d8.esm.js";
|
|
8
|
+
import "./BrowserStorageProvider-Dp9k9EzW.esm.js";
|
|
9
|
+
import { l as processFace } from "./recordingService-BNOxJMAM.esm.js";
|
|
10
|
+
import "./deepsightService-B14izXzw.esm.js";
|
|
11
|
+
import "./camera-C4T2nh2F.esm.js";
|
|
12
|
+
import "./getBrowser-DR_WEE3I.esm.js";
|
|
13
|
+
import "./stats-D0m-GAIR.esm.js";
|
|
14
|
+
import "./MotionSensorProvider-Bi6DuLLP.esm.js";
|
|
15
|
+
import "./permissionServices-ElKNJ-9J.esm.js";
|
|
16
|
+
import "./platform-B81QvKKx.esm.js";
|
|
17
|
+
import "./ITimerCapability-_YySEUj7.esm.js";
|
|
18
|
+
import "./backCameraStream-amVBjSd6.esm.js";
|
|
19
|
+
import "./getDeviceClass-CkdEWjAM.esm.js";
|
|
20
|
+
import "./faceCaptureSetup-CdYYDgN6.esm.js";
|
|
21
|
+
import { t as selfieMachine } from "./selfieStateMachine-B88Q3SFX.esm.js";
|
|
22
|
+
import { t as createSelfieManager } from "./selfieManager-C6pl5f2B.esm.js";
|
|
23
23
|
|
|
24
24
|
export { createSelfieManager, processFace, selfieMachine };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Manager } from "./Manager-
|
|
2
|
-
import { i as SelfieActor, n as FaceCaptureManagerState, r as CreateSelfieActorOptions, t as FaceCaptureManager } from "./faceCaptureManagerFactory-
|
|
1
|
+
import { t as Manager } from "./Manager-BzPNdMJn.js";
|
|
2
|
+
import { i as SelfieActor, n as FaceCaptureManagerState, r as CreateSelfieActorOptions, t as FaceCaptureManager } from "./faceCaptureManagerFactory-BBwp70tn.js";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/selfie/selfieUploadService.d.ts
|
|
5
5
|
type ProcessFaceImageType = 'selfie' | 'videoSelfie';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as WasmUtilProvider } from "./WasmUtilProvider-
|
|
2
|
-
import { n as eventModuleNames } from "./events-
|
|
3
|
-
import { a as createActor } from "./xstate.esm-
|
|
4
|
-
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-
|
|
5
|
-
import { t as BrowserStorageProvider } from "./BrowserStorageProvider-
|
|
6
|
-
import { t as selfieMachine } from "./selfieStateMachine-
|
|
1
|
+
import { t as WasmUtilProvider } from "./WasmUtilProvider-CYe0Xlh-.esm.js";
|
|
2
|
+
import { n as eventModuleNames } from "./events-B3HfNWqp.esm.js";
|
|
3
|
+
import { a as createActor } from "./xstate.esm-DW_uPCba.esm.js";
|
|
4
|
+
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-odfjA0d8.esm.js";
|
|
5
|
+
import { t as BrowserStorageProvider } from "./BrowserStorageProvider-Dp9k9EzW.esm.js";
|
|
6
|
+
import { t as selfieMachine } from "./selfieStateMachine-B88Q3SFX.esm.js";
|
|
7
7
|
|
|
8
8
|
//#region src/modules/selfie/selfieActor.ts
|
|
9
9
|
function createSelfieActor(options) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as fromPromise, n as assign } from "./xstate.esm-
|
|
2
|
-
import { l as processFace, u as uploadSelfie, v as FACE_ERROR_CODES } from "./recordingService-
|
|
3
|
-
import { t as faceCaptureMachine } from "./faceCaptureSetup-
|
|
1
|
+
import { i as fromPromise, n as assign } from "./xstate.esm-DW_uPCba.esm.js";
|
|
2
|
+
import { l as processFace, u as uploadSelfie, v as FACE_ERROR_CODES } from "./recordingService-BNOxJMAM.esm.js";
|
|
3
|
+
import { t as faceCaptureMachine } from "./faceCaptureSetup-CdYYDgN6.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/selfie/selfieErrorUtils.ts
|
|
6
6
|
const FACE_ERROR_CODE_VALUES = Object.values(FACE_ERROR_CODES);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as getApi, t as api } from "./api-
|
|
2
|
-
import { _ as endpoints, m as addEvent } from "./events-
|
|
3
|
-
import { t as BrowserEnvironmentProvider } from "./BrowserEnvironmentProvider-
|
|
4
|
-
import { t as isBrowserSimulation } from "./browserSimulation-
|
|
1
|
+
import { n as getApi, t as api } from "./api-CGdjmBzR.esm.js";
|
|
2
|
+
import { _ as endpoints, m as addEvent } from "./events-B3HfNWqp.esm.js";
|
|
3
|
+
import { t as BrowserEnvironmentProvider } from "./BrowserEnvironmentProvider-4Vr7ceoW.esm.js";
|
|
4
|
+
import { t as isBrowserSimulation } from "./browserSimulation-D9FTZt0Z.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/internal/session/sessionService.ts
|
|
7
7
|
/**
|
package/dist/session.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as GetFinishStatusFn, r as getFinishStatus, t as FinishStatus } from "./flowCompletionService-
|
|
1
|
+
import { n as GetFinishStatusFn, r as getFinishStatus, t as FinishStatus } from "./flowCompletionService-CNpeRlnP.js";
|
|
2
2
|
|
|
3
3
|
//#region src/internal/session/sessionService.d.ts
|
|
4
4
|
type CreateSessionOptions = {
|
package/dist/session.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./api-
|
|
2
|
-
import "./events-
|
|
3
|
-
import { c as createSession } from "./session-
|
|
4
|
-
import "./BrowserEnvironmentProvider-
|
|
5
|
-
import "./browserSimulation-
|
|
6
|
-
import { t as getFinishStatus } from "./flowCompletionService-
|
|
1
|
+
import "./api-CGdjmBzR.esm.js";
|
|
2
|
+
import "./events-B3HfNWqp.esm.js";
|
|
3
|
+
import { c as createSession } from "./session-D2s2kUoa.esm.js";
|
|
4
|
+
import "./BrowserEnvironmentProvider-4Vr7ceoW.esm.js";
|
|
5
|
+
import "./browserSimulation-D9FTZt0Z.esm.js";
|
|
6
|
+
import { t as getFinishStatus } from "./flowCompletionService-BhzS182Y.esm.js";
|
|
7
7
|
|
|
8
8
|
export { createSession, getFinishStatus };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as warmupWasm } from "./BaseWasmProvider-
|
|
2
|
-
import { t as WasmUtilProvider } from "./WasmUtilProvider-
|
|
3
|
-
import { a as resetApi, o as setClient, s as setToken } from "./api-
|
|
4
|
-
import { h as flushEventQueue } from "./events-
|
|
5
|
-
import { i as resetSessionInit, r as initializeSession } from "./session-
|
|
1
|
+
import { n as warmupWasm } from "./BaseWasmProvider-DFM6aa1Z.esm.js";
|
|
2
|
+
import { t as WasmUtilProvider } from "./WasmUtilProvider-CYe0Xlh-.esm.js";
|
|
3
|
+
import { a as resetApi, o as setClient, s as setToken } from "./api-CGdjmBzR.esm.js";
|
|
4
|
+
import { h as flushEventQueue } from "./events-B3HfNWqp.esm.js";
|
|
5
|
+
import { i as resetSessionInit, r as initializeSession } from "./session-D2s2kUoa.esm.js";
|
|
6
6
|
|
|
7
7
|
//#region ../infra/src/http/createApi.ts
|
|
8
8
|
var FetchHttpError = class extends Error {
|
package/dist/signature.d.ts
CHANGED
package/dist/signature.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./api-
|
|
2
|
-
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
3
|
-
import { a as createActor, o as createManager } from "./xstate.esm-
|
|
4
|
-
import { t as signatureMachine } from "./signatureStateMachine-
|
|
1
|
+
import "./api-CGdjmBzR.esm.js";
|
|
2
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-B3HfNWqp.esm.js";
|
|
3
|
+
import { a as createActor, o as createManager } from "./xstate.esm-DW_uPCba.esm.js";
|
|
4
|
+
import { t as signatureMachine } from "./signatureStateMachine-BOdPhzPM.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/signature/signatureActor.ts
|
|
7
7
|
function createSignatureActor(options) {
|
package/dist/{signatureStateMachine-BwEaOwbU.esm.js → signatureStateMachine-BOdPhzPM.esm.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as api } from "./api-
|
|
2
|
-
import { _ as endpoints, m as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-
|
|
3
|
-
import { i as fromPromise, n as assign, t as setup } from "./xstate.esm-
|
|
1
|
+
import { t as api } from "./api-CGdjmBzR.esm.js";
|
|
2
|
+
import { _ as endpoints, m as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-B3HfNWqp.esm.js";
|
|
3
|
+
import { i as fromPromise, n as assign, t as setup } from "./xstate.esm-DW_uPCba.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/signature/signatureServices.ts
|
|
6
6
|
/**
|
package/dist/stats.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as DocumentUploadConfig } from "./types-
|
|
1
|
+
import { t as DocumentUploadConfig } from "./types-vklwHgIM.js";
|
|
2
2
|
|
|
3
3
|
//#region src/modules/flow/types.d.ts
|
|
4
4
|
type EmptyConfig = Record<string, never>;
|
|
@@ -266,6 +266,7 @@ type FlowModuleConfig = {
|
|
|
266
266
|
FIELD_COMPARISON: EmptyConfig;
|
|
267
267
|
FISCAL_QR: EmptyConfig;
|
|
268
268
|
GENERATE_QR: EmptyConfig;
|
|
269
|
+
HOME: EmptyConfig;
|
|
269
270
|
INSTANT_VERIFY: EmptyConfig;
|
|
270
271
|
IP_ADDRESS: EmptyConfig;
|
|
271
272
|
NAME_CAPTURE: EmptyConfig;
|
|
@@ -307,4 +308,4 @@ type Flow = {
|
|
|
307
308
|
ds?: boolean;
|
|
308
309
|
};
|
|
309
310
|
//#endregion
|
|
310
|
-
export {
|
|
311
|
+
export { RegulationTypes as a, FlowModuleConfig as i, Flow as n, TutorialIdConfig as o, FlowModule as r, EmptyConfig as t };
|
package/dist/wasm.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as WasmPipeline, r as warmupWasm, t as WarmupConfig } from "./warmup-
|
|
2
|
-
import { n as WasmConfig, o as setWasmConfig, r as initializeWasmUtil } from "./setup-
|
|
1
|
+
import { n as WasmPipeline, r as warmupWasm, t as WarmupConfig } from "./warmup-C5bT21Jo.js";
|
|
2
|
+
import { n as WasmConfig, o as setWasmConfig, r as initializeWasmUtil } from "./setup-DR4SBtyZ.js";
|
|
3
3
|
|
|
4
4
|
//#region ../infra/src/wasm/wasmDefaults.d.ts
|
|
5
5
|
/** The WASM version bundled and tested with this SDK release. */
|
package/dist/wasm.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { c as resolveWasmConfig, i as setWasmConfig, o as DEFAULT_WASM_VERSION, s as buildDefaultWasmConfig, t as initializeWasmUtil } from "./setup-
|
|
2
|
-
import { n as warmupWasm } from "./BaseWasmProvider-
|
|
3
|
-
import "./WasmUtilProvider-
|
|
4
|
-
import "./api-
|
|
5
|
-
import "./events-
|
|
6
|
-
import "./session-
|
|
7
|
-
import "./BrowserEnvironmentProvider-
|
|
8
|
-
import "./browserSimulation-
|
|
1
|
+
import { c as resolveWasmConfig, i as setWasmConfig, o as DEFAULT_WASM_VERSION, s as buildDefaultWasmConfig, t as initializeWasmUtil } from "./setup-nE0hEkGl.esm.js";
|
|
2
|
+
import { n as warmupWasm } from "./BaseWasmProvider-DFM6aa1Z.esm.js";
|
|
3
|
+
import "./WasmUtilProvider-CYe0Xlh-.esm.js";
|
|
4
|
+
import "./api-CGdjmBzR.esm.js";
|
|
5
|
+
import "./events-B3HfNWqp.esm.js";
|
|
6
|
+
import "./session-D2s2kUoa.esm.js";
|
|
7
|
+
import "./BrowserEnvironmentProvider-4Vr7ceoW.esm.js";
|
|
8
|
+
import "./browserSimulation-D9FTZt0Z.esm.js";
|
|
9
9
|
|
|
10
10
|
export { DEFAULT_WASM_VERSION, buildDefaultWasmConfig, initializeWasmUtil, resolveWasmConfig, setWasmConfig, warmupWasm };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { t as Manager } from "./Manager-BzPNdMJn.js";
|
|
2
|
+
|
|
3
|
+
//#region src/modules/watchlist/watchlistStateMachine.d.ts
|
|
4
|
+
type WatchlistResult = 'success' | 'skipped';
|
|
5
|
+
declare const watchlistMachine: any;
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region src/modules/watchlist/watchlistManager.d.ts
|
|
8
|
+
type WatchlistIdleState = {
|
|
9
|
+
status: 'idle';
|
|
10
|
+
};
|
|
11
|
+
type WatchlistProcessingState = {
|
|
12
|
+
status: 'processing';
|
|
13
|
+
};
|
|
14
|
+
type WatchlistSuccessState = {
|
|
15
|
+
status: 'success';
|
|
16
|
+
};
|
|
17
|
+
type WatchlistFinishedState = {
|
|
18
|
+
status: 'finished';
|
|
19
|
+
result: WatchlistResult;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Union of all possible global watchlist manager states.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```typescript
|
|
26
|
+
* const state = watchlistManager.getState();
|
|
27
|
+
* if (state.status === 'finished') {
|
|
28
|
+
* console.log('Global watchlist check complete');
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
type WatchlistState = WatchlistIdleState | WatchlistProcessingState | WatchlistSuccessState | WatchlistFinishedState;
|
|
33
|
+
/**
|
|
34
|
+
* Creates a global watchlist manager for headless or UI-driven usage.
|
|
35
|
+
*
|
|
36
|
+
* @example Headless usage
|
|
37
|
+
* ```typescript
|
|
38
|
+
* const manager = createWatchlistManager();
|
|
39
|
+
* manager.subscribe((state) => console.log(state.status));
|
|
40
|
+
* manager.load();
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
declare function createWatchlistManager(): Manager<WatchlistState> & {
|
|
44
|
+
/**
|
|
45
|
+
* Kicks off the global watchlist check.
|
|
46
|
+
* Transitions from 'idle' to 'processing'.
|
|
47
|
+
*/
|
|
48
|
+
load(): void;
|
|
49
|
+
};
|
|
50
|
+
type WatchlistManager = ReturnType<typeof createWatchlistManager>;
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/modules/watchlist/types.d.ts
|
|
53
|
+
/**
|
|
54
|
+
* Configuration options for the global watchlist module.
|
|
55
|
+
*
|
|
56
|
+
* The global watchlist module requires no configuration — it is a fire-and-forget
|
|
57
|
+
* process that runs the backend global watchlist check (OFAC, PEP, etc.) and
|
|
58
|
+
* completes regardless of the API outcome.
|
|
59
|
+
*/
|
|
60
|
+
type WatchlistConfig = Record<string, never>;
|
|
61
|
+
//#endregion
|
|
62
|
+
export { type WatchlistConfig, type WatchlistManager, type WatchlistState, createWatchlistManager, watchlistMachine };
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { t as api } from "./api-CGdjmBzR.esm.js";
|
|
2
|
+
import { _ as endpoints, n as eventModuleNames, o as createManagerInstrumentation } from "./events-B3HfNWqp.esm.js";
|
|
3
|
+
import { a as createActor, i as fromPromise, n as assign, o as createManager, t as setup } from "./xstate.esm-DW_uPCba.esm.js";
|
|
4
|
+
|
|
5
|
+
//#region src/modules/watchlist/watchlistServices.ts
|
|
6
|
+
async function processWatchlist(signal) {
|
|
7
|
+
const res = await api.post(endpoints.processWatchlist, {}, { signal });
|
|
8
|
+
if (!res.ok) throw new Error(`POST ${endpoints.processWatchlist} failed: ${res.status} ${res.statusText}`);
|
|
9
|
+
return res.data;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/modules/watchlist/watchlistStateMachine.ts
|
|
14
|
+
const watchlistMachine = setup({
|
|
15
|
+
types: {
|
|
16
|
+
context: {},
|
|
17
|
+
events: {}
|
|
18
|
+
},
|
|
19
|
+
actors: { processWatchlist: fromPromise(async ({ signal }) => {
|
|
20
|
+
return processWatchlist(signal);
|
|
21
|
+
}) },
|
|
22
|
+
actions: {
|
|
23
|
+
markSuccess: assign({ result: "success" }),
|
|
24
|
+
markSkipped: assign({ result: "skipped" })
|
|
25
|
+
},
|
|
26
|
+
guards: { apiSucceeded: ({ event }) => event.output.success }
|
|
27
|
+
}).createMachine({
|
|
28
|
+
id: "watchlist",
|
|
29
|
+
initial: "idle",
|
|
30
|
+
context: { result: null },
|
|
31
|
+
states: {
|
|
32
|
+
idle: { on: { LOAD: { target: "processing" } } },
|
|
33
|
+
processing: { invoke: {
|
|
34
|
+
id: "processWatchlist",
|
|
35
|
+
src: "processWatchlist",
|
|
36
|
+
onDone: [{
|
|
37
|
+
target: "success",
|
|
38
|
+
guard: "apiSucceeded"
|
|
39
|
+
}, {
|
|
40
|
+
target: "finished",
|
|
41
|
+
actions: "markSkipped"
|
|
42
|
+
}],
|
|
43
|
+
onError: {
|
|
44
|
+
target: "finished",
|
|
45
|
+
actions: "markSkipped"
|
|
46
|
+
}
|
|
47
|
+
} },
|
|
48
|
+
success: { after: { 3e3: {
|
|
49
|
+
target: "finished",
|
|
50
|
+
actions: "markSuccess"
|
|
51
|
+
} } },
|
|
52
|
+
finished: { type: "final" }
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/modules/watchlist/watchlistActor.ts
|
|
58
|
+
function createWatchlistActor() {
|
|
59
|
+
return createActor(watchlistMachine).start();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/modules/watchlist/watchlistManager.ts
|
|
64
|
+
function mapState(snapshot) {
|
|
65
|
+
const typedSnapshot = snapshot;
|
|
66
|
+
if (typedSnapshot.matches("processing")) return { status: "processing" };
|
|
67
|
+
if (typedSnapshot.matches("success")) return { status: "success" };
|
|
68
|
+
if (typedSnapshot.matches("finished")) return {
|
|
69
|
+
status: "finished",
|
|
70
|
+
result: typedSnapshot.context.result ?? "skipped"
|
|
71
|
+
};
|
|
72
|
+
return { status: "idle" };
|
|
73
|
+
}
|
|
74
|
+
function createApi({ actor }) {
|
|
75
|
+
return { load() {
|
|
76
|
+
actor.send({ type: "LOAD" });
|
|
77
|
+
} };
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Creates a global watchlist manager for headless or UI-driven usage.
|
|
81
|
+
*
|
|
82
|
+
* @example Headless usage
|
|
83
|
+
* ```typescript
|
|
84
|
+
* const manager = createWatchlistManager();
|
|
85
|
+
* manager.subscribe((state) => console.log(state.status));
|
|
86
|
+
* manager.load();
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
function createWatchlistManager() {
|
|
90
|
+
return createManager({
|
|
91
|
+
actor: createWatchlistActor(),
|
|
92
|
+
mapState,
|
|
93
|
+
createApi,
|
|
94
|
+
instrumentation: createManagerInstrumentation(eventModuleNames.watchlist)
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
//#endregion
|
|
99
|
+
export { createWatchlistManager, watchlistMachine };
|