@incodetech/core 2.1.0-rc.2 → 2.1.0-rc.4
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/3dAvatarProvider-9zb-7MLE.esm.js +28214 -0
- package/dist/{BrowserStorageProvider-D5xc7Lqo.esm.js → BrowserStorageProvider-CBXGCHnK.esm.js} +1 -25
- package/dist/BrowserVisibilityObserverProvider-B04zvOXW.esm.js +25 -0
- package/dist/Face2DProvider-DqFSo9Ls.esm.js +824 -0
- package/dist/FaceDetectionProvider-BcPv1ruX.d.ts +119 -0
- package/dist/IVisibilityObserverCapability-BxPj7hsu.d.ts +12 -0
- package/dist/IWasmUtilCapability-Bf91iomn.d.ts +145 -0
- package/dist/{Manager-B2OEDYqf.d.ts → Manager-BfBOhrjh.d.ts} +1 -4
- package/dist/{OpenViduRecordingProvider-DF7A4ZNJ.esm.js → OpenViduRecordingProvider-DmA__QfK.esm.js} +1 -1
- package/dist/PrivacyLensProvider-CfmaSQy3.esm.js +339 -0
- package/dist/StateMachine-20ahmASR.d.ts +2 -0
- package/dist/{StreamCanvasCapture-Dr5n_iK1.esm.js → StreamCanvasCapture-CRk7c7u7.esm.js} +1 -1
- package/dist/StreamCanvasCapture-DHDxv6hH.d.ts +42 -0
- package/dist/{WasmUtilProvider-CIu373BZ.esm.js → WasmUtilProvider-ADG54T6M.esm.js} +16 -1
- package/dist/{addressSearch-BH96a3fq.esm.js → addressSearch-B9iJdbn8.esm.js} +4 -4
- package/dist/{ae-signature-CDEN8y-w.esm.js → ae-signature-Pp4oCAHD.esm.js} +1 -1
- package/dist/ae-signature.d.ts +4 -3
- package/dist/ae-signature.esm.js +9 -9
- package/dist/antifraud.d.ts +4 -3
- package/dist/antifraud.esm.js +6 -6
- package/dist/{antifraudManager-DZifA5zX.esm.js → antifraudManager-5KA84wtF.esm.js} +3 -3
- package/dist/{antifraudManager-B7WQTIdu.d.ts → antifraudManager-D-nGY1T9.d.ts} +2 -2
- package/dist/{antifraudStateMachine-DlKrK2hL.esm.js → antifraudStateMachine-BQVw46N5.esm.js} +3 -3
- package/dist/{api-DUZwyz0o.esm.js → api-DsbUi7TO.esm.js} +21 -2
- package/dist/authentication.d.ts +19 -12
- package/dist/authentication.esm.js +32 -27
- package/dist/{authenticationManager-Dve7mGLe.d.ts → authenticationManager-BnAY9lOO.d.ts} +3 -3
- package/dist/{authenticationManager-BM4LzyV7.esm.js → authenticationManager-BnPgoiL_.esm.js} +6 -6
- package/dist/{authenticationStateMachine-Chx3ySdT.esm.js → authenticationStateMachine-D50Q6Nvp.esm.js} +8 -8
- package/dist/avatar.d.ts +3 -0
- package/dist/avatar.esm.js +3 -0
- package/dist/{backCameraStream-iftkf3rd.esm.js → backCameraStream-POavVKz4.esm.js} +3 -3
- package/dist/{browser-DlFgHpoC-7tbRR1aR.esm.js → browser-DlFgHpoC-CR6x7ypG.esm.js} +1 -1
- package/dist/{browserSimulation-CGjpdNA1.esm.js → browserSimulation-DFpmweuc.esm.js} +153 -1216
- package/dist/camera-B0yWS33x.esm.js +79 -0
- package/dist/camera.d.ts +7 -1
- package/dist/camera.esm.js +4 -4
- package/dist/{StreamCanvasCapture-Ctgyx-oD.d.ts → canvas-pLrXU1id.d.ts} +1 -41
- package/dist/certificate-issuance.d.ts +31 -30
- package/dist/certificate-issuance.esm.js +7 -7
- package/dist/{certificateIssuanceStateMachine-CLNXtXaC.esm.js → certificateIssuanceStateMachine-CpewPqas.esm.js} +4 -4
- package/dist/clientLifecycle-Ct7h9uxx.esm.js +534 -0
- package/dist/consent.d.ts +4 -3
- package/dist/consent.esm.js +6 -6
- package/dist/{consentManager-BqUGU_YD.d.ts → consentManager-BuiDVAGn.d.ts} +52 -52
- package/dist/{consentManager-psDCeJ0E.esm.js → consentManager-DL93cPSU.esm.js} +3 -3
- package/dist/{consentStateMachine-DRsFFSHE.esm.js → consentStateMachine-DnqwsZ7o.esm.js} +3 -3
- package/dist/cpf-ocr.d.ts +4 -3
- package/dist/cpf-ocr.esm.js +6 -6
- package/dist/{cpfOcrManager-BxcgxvgO.esm.js → cpfOcrManager-BW8wlEU_.esm.js} +5 -5
- package/dist/{cpfOcrManager-B2u9hMzd.d.ts → cpfOcrManager-D_cnGuB7.d.ts} +19 -19
- package/dist/createFaceAvatar-CpmQJA8E.esm.js +46 -0
- package/dist/createFaceAvatar-DNMSIcRb.d.ts +401 -0
- package/dist/cross-document-data-match.d.ts +2 -1
- package/dist/cross-document-data-match.esm.js +5 -5
- package/dist/curp-validation.d.ts +10 -7
- package/dist/curp-validation.esm.js +6 -6
- package/dist/{curpValidationManager-Bt6CVD8b.d.ts → curpValidationManager-CJdVrCex.d.ts} +3 -3
- package/dist/{curpValidationManager-BgLDw0Ub.esm.js → curpValidationManager-u2FkvveY.esm.js} +3 -3
- package/dist/{curpValidationStateMachine-BK_wJ48C.esm.js → curpValidationStateMachine-CeqDh2V5.esm.js} +3 -3
- package/dist/custom-fields.d.ts +3 -2
- package/dist/custom-fields.esm.js +5 -5
- package/dist/custom-watchlist.d.ts +2 -1
- package/dist/custom-watchlist.esm.js +5 -5
- package/dist/{customWatchlistStateMachine-Bi4P59HM.esm.js → customWatchlistStateMachine-dovMwTLv.esm.js} +3 -3
- package/dist/{deepsightLoader-BMmvk0X6.esm.js → deepsightLoader-CgK9h2KF.esm.js} +20 -14
- package/dist/{deepsightService-CEZrdiW0.esm.js → deepsightService-BsLpJT8o.esm.js} +13 -42
- package/dist/deepsightService-CbaqT7bP.d.ts +69 -0
- package/dist/device.d.ts +9 -1
- package/dist/device.esm.js +5 -5
- package/dist/document-capture.d.ts +179 -178
- package/dist/document-capture.esm.js +13 -13
- package/dist/document-upload.d.ts +48 -47
- package/dist/document-upload.esm.js +8 -8
- package/dist/{documentCaptureStateMachine-MpwpJO7t.esm.js → documentCaptureStateMachine-DK3nD2UZ.esm.js} +7 -7
- package/dist/dynamic-forms.d.ts +4 -192
- package/dist/dynamic-forms.esm.js +7 -160
- package/dist/dynamicFormsManager-B_4qA_CB.d.ts +239 -0
- package/dist/dynamicFormsManager-CNg60mlv.esm.js +167 -0
- package/dist/{dynamicFormsStateMachine-Do84A4uU.esm.js → dynamicFormsStateMachine-BfLLcxua.esm.js} +4 -4
- package/dist/ekyb.d.ts +9 -6
- package/dist/ekyb.esm.js +17 -17
- package/dist/{ekybStateMachine-nsuPOw3f.esm.js → ekybStateMachine-DJ9lWfdc.esm.js} +5 -5
- package/dist/ekyc.d.ts +4 -3
- package/dist/ekyc.esm.js +8 -8
- package/dist/{ekycStateMachine-DcynX0rj.esm.js → ekycStateMachine-BcPEEqMA.esm.js} +5 -5
- package/dist/electronic-signature.d.ts +4 -3
- package/dist/electronic-signature.esm.js +8 -8
- package/dist/{electronicSignatureManager-B63aAuI5.esm.js → electronicSignatureManager-DESRgObX.esm.js} +49 -87
- package/dist/email.d.ts +5 -4
- package/dist/email.esm.js +8 -8
- package/dist/{emailManager-DxHjAe5u.esm.js → emailManager-C9O7k0-m.esm.js} +4 -4
- package/dist/{emailManager-C6D2u4mQ.d.ts → emailManager-CTOXMlVd.d.ts} +3 -3
- package/dist/{emailStateMachine-758f34gg.esm.js → emailStateMachine-Bk4pkysV.esm.js} +5 -5
- package/dist/{endpoints-BM2_j_IE.esm.js → endpoints-CwrFQfW7.esm.js} +13 -0
- package/dist/{events-DN-u67gb.esm.js → events-1wxZ97yf.esm.js} +3 -1
- package/dist/events.d.ts +2 -0
- package/dist/events.esm.js +2 -2
- package/dist/extensibility.d.ts +37 -26
- package/dist/extensibility.esm.js +71 -59
- package/dist/{externalFetch-crimxkN9.esm.js → externalFetch-hvmz_npP.esm.js} +1 -1
- package/dist/face-match.d.ts +2 -2
- package/dist/face-match.esm.js +5 -5
- package/dist/faceCaptureManagerFactory-DKBvmRxO.d.ts +400 -0
- package/dist/{faceCaptureManagerFactory-BNXZchWX.esm.js → faceCaptureManagerFactory-bJiqzRoj.esm.js} +24 -16
- package/dist/{faceCaptureSetup-Dqb09D24.esm.js → faceCaptureSetup-jYJNhw2K.esm.js} +97 -13
- package/dist/{faceMatchStateMachine-FikRaUZH.esm.js → faceMatchStateMachine-C6J09ygk.esm.js} +3 -3
- package/dist/field-comparison.d.ts +4 -3
- package/dist/field-comparison.esm.js +5 -5
- package/dist/{fieldComparisonManager-BXc6-DJv.d.ts → fieldComparisonManager-BOEgiOw_.d.ts} +2 -2
- package/dist/{fieldComparisonManager-Dic0DVgl.esm.js → fieldComparisonManager-kk2RkWeb.esm.js} +4 -4
- package/dist/fiscal-qr.d.ts +5 -3
- package/dist/fiscal-qr.esm.js +12 -12
- package/dist/flow-events.d.ts +8 -6
- package/dist/flow.d.ts +21 -13
- package/dist/flow.esm.js +25 -19
- package/dist/{flowCompletionService-D_CsiDZM.esm.js → flowCompletionService-BDcDfyoA.esm.js} +3 -3
- package/dist/{flowCompletionService-CdGDKv0z.d.ts → flowCompletionService-nF7e8At0.d.ts} +2 -1
- package/dist/{flowServices-ar5DXv71.esm.js → flowServices-DTQUals9.esm.js} +24 -9
- package/dist/geolocation.d.ts +4 -127
- package/dist/geolocation.esm.js +7 -115
- package/dist/geolocationManager-B3lahU1a.d.ts +156 -0
- package/dist/geolocationManager-CVKUo6a4.esm.js +122 -0
- package/dist/{geolocationStateMachine-BWjrMGS_.esm.js → geolocationStateMachine-CdYh-pwi.esm.js} +4 -4
- package/dist/{getDeviceClass-rXKlXywy.esm.js → getDeviceClass-QxbJwsOO.esm.js} +1 -1
- package/dist/government-validation.d.ts +4 -3
- package/dist/government-validation.esm.js +7 -7
- package/dist/{governmentValidationStateMachine-BoF7U1of.esm.js → governmentValidationStateMachine-CjCs0_fG.esm.js} +5 -5
- package/dist/home.d.ts +18 -15
- package/dist/home.esm.js +3 -3
- package/dist/http.esm.js +2 -2
- package/dist/id-ocr.d.ts +4 -625
- package/dist/id-ocr.esm.js +7 -84
- package/dist/id-verification.d.ts +28 -27
- package/dist/id-verification.esm.js +5 -5
- package/dist/id.d.ts +16 -11
- package/dist/id.esm.js +36 -32
- package/dist/idCaptureDefaults-DJmo-U3D.esm.js +188 -0
- package/dist/{idCaptureManager-BvGUSN2e.d.ts → idCaptureManager-58R91WU3.d.ts} +40 -10
- package/dist/{idCaptureManager-Bm6Wm6Qv.esm.js → idCaptureManager-Cd7THjha.esm.js} +13 -11
- package/dist/{idCaptureStateMachine-D1YhOj6n.esm.js → idCaptureStateMachine-BFMIWmBu.esm.js} +395 -382
- package/dist/idOcrManager-CDIHkP-v.d.ts +641 -0
- package/dist/idOcrManager-CiEzYor8.esm.js +91 -0
- package/dist/{idOcrStateMachine-YMCDGplq.esm.js → idOcrStateMachine-CGeY01rX.esm.js} +5 -5
- package/dist/{idVerificationStateMachine-Bo1IYuZH.esm.js → idVerificationStateMachine-B6Ccvut4.esm.js} +3 -3
- package/dist/identity-reuse.d.ts +4 -3
- package/dist/identity-reuse.esm.js +6 -6
- package/dist/{identityReuseManager-DcWSvC-A.d.ts → identityReuseManager-BlJpsh9U.d.ts} +33 -33
- package/dist/{identityReuseManager-D0knIrOy.esm.js → identityReuseManager-CrbjKac7.esm.js} +3 -3
- package/dist/{identityReuseStateMachine-CSQfZOqD.esm.js → identityReuseStateMachine-Do_M-z6z.esm.js} +3 -3
- package/dist/{index-DV134v62.d.ts → index-BgJYOyFO.d.ts} +175 -295
- package/dist/{index-BgxYUYuD.d.ts → index-CVgIGwUy.d.ts} +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.esm.js +13 -13
- package/dist/{invokeOnCaptureCallback-Dzemudhk.esm.js → invokeOnCaptureCallback-gKRaO24Q.esm.js} +1 -1
- package/dist/{lib-7ZQ9BdKH.esm.js → lib-TRTXfron.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +10 -7
- package/dist/mandatory-consent.esm.js +6 -6
- package/dist/{mandatoryConsentManager-Tzl5Qd35.d.ts → mandatoryConsentManager-Da8pFx0L.d.ts} +53 -53
- package/dist/{mandatoryConsentManager-Lon46nPQ.esm.js → mandatoryConsentManager-b1QKgIKi.esm.js} +3 -3
- package/dist/{mandatoryConsentStateMachine-D_dZ7IF6.esm.js → mandatoryConsentStateMachine-VPbrLLfo.esm.js} +3 -3
- package/dist/mediaRecorderOptions-BIn657lu.esm.js +42 -0
- package/dist/mediapipeShared-yKDdOf_V.esm.js +67 -0
- package/dist/{recordingService-CxMJP4tQ.esm.js → onDeviceFaceResults-BdfKrQrf.esm.js} +71 -389
- package/dist/{openviduLazy-oAXXI9w_.esm.js → openviduLazy-BXDnVFe2.esm.js} +2 -2
- package/dist/openviduLazy-lAZzee_g.esm.js +3 -0
- package/dist/{permissionGuards-D-Z-lgNj.esm.js → permissionGuards-CaZl9t7f.esm.js} +1 -1
- package/dist/{permissionServices-CPDboRoE.esm.js → permissionServices-D9lmzFYc.esm.js} +7 -4
- package/dist/personhood.d.ts +534 -0
- package/dist/personhood.esm.js +1500 -0
- package/dist/phone.d.ts +5 -4
- package/dist/phone.esm.js +8 -8
- package/dist/{phoneManager-TSq1Ief6.d.ts → phoneManager-CG1vTJiG.d.ts} +3 -3
- package/dist/{phoneManager-Blt4Oc2P.esm.js → phoneManager-DNTrIq-D.esm.js} +4 -4
- package/dist/{phoneStateMachine-W3c6Z8sj.esm.js → phoneStateMachine-MqNDf1Nh.esm.js} +5 -5
- package/dist/{qe-signature-CQLK6LKE.esm.js → qe-signature-CVnJ4RaW.esm.js} +1 -1
- package/dist/qe-signature.d.ts +4 -3
- package/dist/qe-signature.esm.js +9 -9
- package/dist/recordingService-B5QNBYnv.esm.js +347 -0
- package/dist/redirect-to-mobile.d.ts +4 -3
- package/dist/redirect-to-mobile.esm.js +8 -8
- package/dist/{redirectToMobileManager-yOHAmwg-.d.ts → redirectToMobileManager-D7U9k-Xs.d.ts} +2 -2
- package/dist/{redirectToMobileManager-DCvpKdkD.esm.js → redirectToMobileManager-DuD03ggR.esm.js} +4 -4
- package/dist/{redirectToMobileStateMachine-DC9z4Vfu.esm.js → redirectToMobileStateMachine-WVg-n2is.esm.js} +10 -12
- package/dist/{runChildModule-C9G0wfVC.esm.js → runChildModule-XHWWqs39.esm.js} +3 -3
- package/dist/selfie.d.ts +19 -12
- package/dist/selfie.esm.js +33 -28
- package/dist/{selfieManager-imY2dAcH.d.ts → selfieManager-CXmUuCSV.d.ts} +3 -3
- package/dist/{selfieManager-BRL6c_Oc.esm.js → selfieManager-Cw29cKuL.esm.js} +6 -6
- package/dist/{selfieStateMachine-D2Q0uwDK.esm.js → selfieStateMachine-DUruCKBS.esm.js} +4 -4
- package/dist/{session-Be_IA1e0.esm.js → session-BWCjVIr6.esm.js} +3 -3
- package/dist/session.d.ts +7 -5
- package/dist/session.esm.js +13 -14
- package/dist/{sessionInitializer-CaiGA8GP.esm.js → sessionInitializer-CzPdr0Q1.esm.js} +73 -10
- package/dist/{setup-BJZAkajt.d.ts → setup-BbAMk9Rg.d.ts} +31 -3
- package/dist/setup-hKBHwm6K.esm.js +564 -0
- package/dist/signature.d.ts +3 -2
- package/dist/signature.esm.js +5 -5
- package/dist/{signatureStateMachine-DAxXmMrk.esm.js → signatureStateMachine-iT9BhNUf.esm.js} +3 -3
- package/dist/{stats-DntyIiGr.esm.js → stats-BVy52wLy.esm.js} +2 -2
- package/dist/stats.esm.js +3 -3
- package/dist/thumbmarkAdapter-CVyiGp0-.esm.js +1194 -0
- package/dist/{tri-CtxWthxz.esm.js → tri-CFBjqf5E.esm.js} +12 -2
- package/dist/tri.d.ts +1 -1
- package/dist/{tri.esm-CrWAulDi.esm.js → tri.esm-BzYyqlPa.esm.js} +27 -23
- package/dist/tri.esm.js +2 -2
- package/dist/trust-graph.d.ts +4 -3
- package/dist/trust-graph.esm.js +3 -3
- package/dist/{types-Z9wv19v2.d.ts → types-B_YCuHZx.d.ts} +1 -1
- package/dist/{types-DpTWgfKY.d.ts → types-CRPns2d9.d.ts} +1 -1
- package/dist/{types-Dv-9WPJX.d.ts → types-Cyi3gwPK.d.ts} +39 -3
- package/dist/types-DWmubDie.d.ts +132 -0
- package/dist/video-DXf5H9rY.esm.js +36 -0
- package/dist/video-selfie.d.ts +351 -0
- package/dist/video-selfie.esm.js +1506 -0
- package/dist/videoSelfieSteps-C6E7mKFt.esm.js +58 -0
- package/dist/{warmup--6HA3yUR.d.ts → warmup-DzJ0I4Kv.d.ts} +5 -1
- package/dist/wasm.d.ts +4 -4
- package/dist/wasm.esm.js +14 -14
- package/dist/watchlist-for-business.d.ts +2 -1
- package/dist/watchlist-for-business.esm.js +5 -5
- package/dist/watchlist.d.ts +2 -1
- package/dist/watchlist.esm.js +5 -5
- package/dist/{watchlistForBusinessStateMachine-DtefJb-D.esm.js → watchlistForBusinessStateMachine-CyhTEi3N.esm.js} +3 -3
- package/dist/{watchlistStateMachine-B0aIS2_n.esm.js → watchlistStateMachine-CgKG-KSf.esm.js} +3 -3
- package/dist/workflow.d.ts +232 -100
- package/dist/workflow.esm.js +120 -79
- package/dist/{xstate.esm-Dkm1jy5u.esm.js → xstate.esm-nY3M5UYm.esm.js} +41 -1
- package/package.json +18 -3
- package/dist/IpifyProvider-oZf7Ke1O.esm.js +0 -167
- package/dist/camera-x4LjGTjZ.esm.js +0 -22
- package/dist/deepsightService-ByNKY5Jv.d.ts +0 -276
- package/dist/faceCaptureManagerFactory-CL-7T_vH.d.ts +0 -731
- package/dist/getBrowser-Dv8LZyHE.esm.js +0 -8
- package/dist/openviduLazy-B_s6jnEk.esm.js +0 -3
- package/dist/setup-C7tintPc.esm.js +0 -1064
- /package/dist/{Actor-fIPLXfoi.d.ts → Actor-DYjXVMQm.d.ts} +0 -0
- /package/dist/{BrowserTimerProvider-BVgutW_b.esm.js → BrowserTimerProvider-CHloo0eQ.esm.js} +0 -0
- /package/dist/{ITimerCapability-BvH0pDwp.esm.js → ITimerCapability-G7lQg-be.esm.js} +0 -0
- /package/dist/{MotionSensorProvider-C9fPAJdS.esm.js → MotionSensorProvider-BkHKMCPE.esm.js} +0 -0
- /package/dist/{apiError-D-GTvFrH.esm.js → apiError-DkOXfFBu.esm.js} +0 -0
- /package/dist/{camera-biGPWlmx.d.ts → camera-CWO06Lu5.d.ts} +0 -0
- /package/dist/{canvas-7uX2izHb.esm.js → canvas-DsJa51yU.esm.js} +0 -0
- /package/dist/{chunk-BK1xu56N.esm.js → chunk-CIKcdghV.esm.js} +0 -0
- /package/dist/{cpf-xBg-DFNn.esm.js → cpf-B9htWzDt.esm.js} +0 -0
- /package/dist/{dateUtils-8dCcuArE.esm.js → dateUtils-PXB_WRYL.esm.js} +0 -0
- /package/dist/{getDeviceClass-C0zrM97a.esm.js → getDeviceClass-BdgmyOOu.esm.js} +0 -0
- /package/dist/{http-CfVTgMfU.esm.js → http-CBbBcnBa.esm.js} +0 -0
- /package/dist/{index-52_qi4bd.d.ts → index-CCG6MnCO.d.ts} +0 -0
- /package/dist/{otp-BHJnjEEc.d.ts → otp-CETbFjXH.d.ts} +0 -0
- /package/dist/{otp-D87RTwrx.esm.js → otp-DepQPUIA.esm.js} +0 -0
- /package/dist/{platform-BfoqeM61.esm.js → platform-BoeUeUrV.esm.js} +0 -0
- /package/dist/{types-F0IXbaCB.d.ts → types-BOiKESZY.d.ts} +0 -0
- /package/dist/{types-DYZja-k9.d.ts → types-CTnn7kUK.d.ts} +0 -0
- /package/dist/{types-BdVOWGGW.esm.js → types-Db2ooXIu.esm.js} +0 -0
- /package/dist/{urlUtils-8RNHyW3x.esm.js → urlUtils-CpiYwn7w.esm.js} +0 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { t as Manager } from "./Manager-BfBOhrjh.js";
|
|
2
|
+
import { t as ActorRefFrom } from "./Actor-DYjXVMQm.js";
|
|
3
|
+
|
|
4
|
+
//#region ../infra/src/capabilities/IGeolocationCapability.d.ts
|
|
5
|
+
type GeolocationCoords = {
|
|
6
|
+
latitude: number;
|
|
7
|
+
longitude: number;
|
|
8
|
+
};
|
|
9
|
+
type IGeolocationCapability = {
|
|
10
|
+
getCurrentPosition(): Promise<GeolocationCoords>;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/modules/geolocation/types.d.ts
|
|
14
|
+
/**
|
|
15
|
+
* Configuration options for the Geolocation module.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* const config: GeolocationConfig = {
|
|
20
|
+
* allowUserToSkipGeolocation: true,
|
|
21
|
+
* };
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
type GeolocationConfig = {
|
|
25
|
+
/**
|
|
26
|
+
* Whether the user is allowed to skip geolocation capture.
|
|
27
|
+
* When true, a skip button is shown on the permission-denied screen.
|
|
28
|
+
* Backend field name from flow/workflow configuration.
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
allowUserToSkipGeolocation?: boolean;
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/modules/geolocation/geolocationStateMachine.d.ts
|
|
35
|
+
type GeolocationDeviceType = 'ios' | 'android' | 'desktop';
|
|
36
|
+
declare const geolocationMachine: any;
|
|
37
|
+
type GeolocationMachine = typeof geolocationMachine;
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/modules/geolocation/geolocationActor.d.ts
|
|
40
|
+
type CreateGeolocationActorOptions = {
|
|
41
|
+
config: GeolocationConfig;
|
|
42
|
+
geolocation?: IGeolocationCapability;
|
|
43
|
+
};
|
|
44
|
+
type GeolocationActor = ActorRefFrom<GeolocationMachine>;
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/modules/geolocation/geolocationManager.d.ts
|
|
47
|
+
|
|
48
|
+
/** Geolocation manager is in initial state, waiting for `request()` to be called */
|
|
49
|
+
type GeolocationIdleState = {
|
|
50
|
+
status: 'idle';
|
|
51
|
+
};
|
|
52
|
+
/** Browser geolocation permission prompt is active */
|
|
53
|
+
type GeolocationRequestingState = {
|
|
54
|
+
status: 'requestingLocation';
|
|
55
|
+
};
|
|
56
|
+
/** Coordinates are being submitted to the backend */
|
|
57
|
+
type GeolocationSubmittingState = {
|
|
58
|
+
status: 'submitting';
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Location successfully acquired — call `continue()` to proceed
|
|
62
|
+
* @property location - Location name returned from backend, or null
|
|
63
|
+
*/
|
|
64
|
+
type GeolocationAcquiredState = {
|
|
65
|
+
status: 'locationAcquired';
|
|
66
|
+
location: string | null;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* User denied geolocation permission — shows device-specific instructions
|
|
70
|
+
* @property deviceType - Used by UI to render the correct instruction panel
|
|
71
|
+
* @property canSkip - Whether the skip button should be shown
|
|
72
|
+
*/
|
|
73
|
+
type GeolocationPermissionDeniedState = {
|
|
74
|
+
status: 'permissionDenied';
|
|
75
|
+
deviceType: GeolocationDeviceType;
|
|
76
|
+
canSkip: boolean;
|
|
77
|
+
};
|
|
78
|
+
/** Geolocation flow completed successfully */
|
|
79
|
+
type GeolocationFinishedState = {
|
|
80
|
+
status: 'finished';
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Union of all possible geolocation manager states.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```typescript
|
|
87
|
+
* const state = geolocationManager.getState();
|
|
88
|
+
* if (state.status === 'locationAcquired') {
|
|
89
|
+
* console.log(state.location);
|
|
90
|
+
* }
|
|
91
|
+
* if (state.status === 'permissionDenied') {
|
|
92
|
+
* console.log(state.deviceType); // 'ios' | 'android' | 'desktop'
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
type GeolocationState = GeolocationIdleState | GeolocationRequestingState | GeolocationSubmittingState | GeolocationAcquiredState | GeolocationPermissionDeniedState | GeolocationFinishedState;
|
|
97
|
+
/**
|
|
98
|
+
* Creates a geolocation manager for headless or UI-driven usage.
|
|
99
|
+
*
|
|
100
|
+
* @example Headless usage
|
|
101
|
+
* ```typescript
|
|
102
|
+
* const manager = createGeolocationManager({ config: { allowUserToSkipGeolocation: true } });
|
|
103
|
+
* manager.subscribe((state) => console.log(state.status));
|
|
104
|
+
* manager.request();
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
declare function createGeolocationManager(options: CreateGeolocationActorOptions): Manager<GeolocationState> & {
|
|
108
|
+
/**
|
|
109
|
+
* Initiates the browser geolocation permission request.
|
|
110
|
+
* Transitions from 'idle' to 'requestingLocation'.
|
|
111
|
+
*/
|
|
112
|
+
request(): void;
|
|
113
|
+
/**
|
|
114
|
+
* Confirms the acquired location and completes the module.
|
|
115
|
+
* Should be called when state is 'locationAcquired'.
|
|
116
|
+
*/
|
|
117
|
+
continue(): void;
|
|
118
|
+
/**
|
|
119
|
+
* Skips geolocation when the user has denied permission.
|
|
120
|
+
* Only works when `config.allowUserToSkipGeolocation` is true.
|
|
121
|
+
*/
|
|
122
|
+
skip(): void;
|
|
123
|
+
/**
|
|
124
|
+
* Resets the manager back to initial state.
|
|
125
|
+
*/
|
|
126
|
+
reset(): void;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Creates a geolocation manager from a pre-built actor.
|
|
130
|
+
* Use this when overriding the machine via `.provide()` for custom backends
|
|
131
|
+
* or for story-isolation testing.
|
|
132
|
+
*/
|
|
133
|
+
declare function createGeolocationManagerFromActor(actor: GeolocationActor): Manager<GeolocationState> & {
|
|
134
|
+
/**
|
|
135
|
+
* Initiates the browser geolocation permission request.
|
|
136
|
+
* Transitions from 'idle' to 'requestingLocation'.
|
|
137
|
+
*/
|
|
138
|
+
request(): void;
|
|
139
|
+
/**
|
|
140
|
+
* Confirms the acquired location and completes the module.
|
|
141
|
+
* Should be called when state is 'locationAcquired'.
|
|
142
|
+
*/
|
|
143
|
+
continue(): void;
|
|
144
|
+
/**
|
|
145
|
+
* Skips geolocation when the user has denied permission.
|
|
146
|
+
* Only works when `config.allowUserToSkipGeolocation` is true.
|
|
147
|
+
*/
|
|
148
|
+
skip(): void;
|
|
149
|
+
/**
|
|
150
|
+
* Resets the manager back to initial state.
|
|
151
|
+
*/
|
|
152
|
+
reset(): void;
|
|
153
|
+
};
|
|
154
|
+
type GeolocationManager = ReturnType<typeof createGeolocationManager>;
|
|
155
|
+
//#endregion
|
|
156
|
+
export { GeolocationActor as a, createGeolocationManagerFromActor as i, GeolocationState as n, geolocationMachine as o, createGeolocationManager as r, GeolocationConfig as s, GeolocationManager as t };
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { n as eventModuleNames, s as createManagerInstrumentation } from "./events-1wxZ97yf.esm.js";
|
|
2
|
+
import { l as createManager, s as createActor } from "./xstate.esm-nY3M5UYm.esm.js";
|
|
3
|
+
import { t as geolocationMachine } from "./geolocationStateMachine-CdYh-pwi.esm.js";
|
|
4
|
+
|
|
5
|
+
//#region ../infra/src/providers/browser/BrowserGeolocationProvider.ts
|
|
6
|
+
var BrowserGeolocationProvider = class {
|
|
7
|
+
getCurrentPosition() {
|
|
8
|
+
return new Promise((resolve, reject) => {
|
|
9
|
+
navigator.geolocation.getCurrentPosition((pos) => resolve({
|
|
10
|
+
latitude: pos.coords.latitude,
|
|
11
|
+
longitude: pos.coords.longitude
|
|
12
|
+
}), reject);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/modules/geolocation/geolocationActor.ts
|
|
19
|
+
function createGeolocationActor(options) {
|
|
20
|
+
const geolocation = options.geolocation ?? new BrowserGeolocationProvider();
|
|
21
|
+
return createActor(geolocationMachine, { input: {
|
|
22
|
+
config: options.config,
|
|
23
|
+
geolocation
|
|
24
|
+
} }).start();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/modules/geolocation/geolocationManager.ts
|
|
29
|
+
/**
|
|
30
|
+
* Maps a Geolocation state-machine snapshot to the exact Figma "Tracked
|
|
31
|
+
* Events" screen name. Returned strings are the absolute analytics screen
|
|
32
|
+
* (module prefix included) and are emitted verbatim by
|
|
33
|
+
* `createManagerInstrumentation`'s `getEventScreenName` short-circuit.
|
|
34
|
+
*
|
|
35
|
+
* Source of truth: Geolocation Figma file → Tracked Events canvas
|
|
36
|
+
* (`https://www.figma.com/design/xg1t3GnUS95A4bLrM3lyOG/Geolocation---Latest-Design?node-id=2652-17008`).
|
|
37
|
+
*
|
|
38
|
+
* Deferred Figma screens that have no state-machine counterpart yet:
|
|
39
|
+
* `Geolocation.error.locationUnavailable` and `Geolocation.error.noNetwork`.
|
|
40
|
+
* Both kinds of failure currently collapse into `permissionDenied`
|
|
41
|
+
* (`requestPosition` `onError`) or `locationAcquired` with `location: null`
|
|
42
|
+
* (`submitPosition` `onError`), so the machine cannot distinguish them today.
|
|
43
|
+
*/
|
|
44
|
+
function getGeolocationScreenName(snapshot) {
|
|
45
|
+
const { value } = snapshot;
|
|
46
|
+
if (typeof value !== "string") return void 0;
|
|
47
|
+
switch (value) {
|
|
48
|
+
case "idle": return "Geolocation.default";
|
|
49
|
+
case "requestingLocation":
|
|
50
|
+
case "submitting": return "Geolocation.permission";
|
|
51
|
+
case "locationAcquired":
|
|
52
|
+
case "finished": return "Geolocation.continue";
|
|
53
|
+
case "permissionDenied": return "Geolocation.allowLocation";
|
|
54
|
+
default: return;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function mapState(snapshot) {
|
|
58
|
+
const typedSnapshot = snapshot;
|
|
59
|
+
const { context } = typedSnapshot;
|
|
60
|
+
if (typedSnapshot.matches("idle")) return { status: "idle" };
|
|
61
|
+
if (typedSnapshot.matches("requestingLocation")) return { status: "requestingLocation" };
|
|
62
|
+
if (typedSnapshot.matches("submitting")) return { status: "submitting" };
|
|
63
|
+
if (typedSnapshot.matches("locationAcquired")) return {
|
|
64
|
+
status: "locationAcquired",
|
|
65
|
+
location: context.location ?? null
|
|
66
|
+
};
|
|
67
|
+
if (typedSnapshot.matches("permissionDenied")) return {
|
|
68
|
+
status: "permissionDenied",
|
|
69
|
+
deviceType: context.deviceType,
|
|
70
|
+
canSkip: context.config.allowUserToSkipGeolocation === true
|
|
71
|
+
};
|
|
72
|
+
if (typedSnapshot.matches("finished")) return { status: "finished" };
|
|
73
|
+
return { status: "idle" };
|
|
74
|
+
}
|
|
75
|
+
function createApi({ actor, trackElementClicked }) {
|
|
76
|
+
return {
|
|
77
|
+
request() {
|
|
78
|
+
trackElementClicked?.("request");
|
|
79
|
+
actor.send({ type: "REQUEST" });
|
|
80
|
+
},
|
|
81
|
+
continue() {
|
|
82
|
+
trackElementClicked?.("continue");
|
|
83
|
+
actor.send({ type: "CONTINUE" });
|
|
84
|
+
},
|
|
85
|
+
skip() {
|
|
86
|
+
trackElementClicked?.("skip");
|
|
87
|
+
actor.send({ type: "SKIP" });
|
|
88
|
+
},
|
|
89
|
+
reset() {
|
|
90
|
+
actor.send({ type: "RESET" });
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Creates a geolocation manager for headless or UI-driven usage.
|
|
96
|
+
*
|
|
97
|
+
* @example Headless usage
|
|
98
|
+
* ```typescript
|
|
99
|
+
* const manager = createGeolocationManager({ config: { allowUserToSkipGeolocation: true } });
|
|
100
|
+
* manager.subscribe((state) => console.log(state.status));
|
|
101
|
+
* manager.request();
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
function createGeolocationManager(options) {
|
|
105
|
+
return createGeolocationManagerFromActor(createGeolocationActor(options));
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Creates a geolocation manager from a pre-built actor.
|
|
109
|
+
* Use this when overriding the machine via `.provide()` for custom backends
|
|
110
|
+
* or for story-isolation testing.
|
|
111
|
+
*/
|
|
112
|
+
function createGeolocationManagerFromActor(actor) {
|
|
113
|
+
return createManager({
|
|
114
|
+
actor,
|
|
115
|
+
mapState,
|
|
116
|
+
createApi,
|
|
117
|
+
instrumentation: createManagerInstrumentation(eventModuleNames.geolocation, { getEventScreenName: getGeolocationScreenName })
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
//#endregion
|
|
122
|
+
export { createGeolocationManagerFromActor as n, createGeolocationManager as t };
|
package/dist/{geolocationStateMachine-BWjrMGS_.esm.js → geolocationStateMachine-CdYh-pwi.esm.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as api } from "./api-
|
|
2
|
-
import { t as endpoints } from "./endpoints-
|
|
3
|
-
import { r as isIOS, t as isAndroid } from "./platform-
|
|
4
|
-
import { a as fromPromise, r as assign, t as setup } from "./xstate.esm-
|
|
1
|
+
import { t as api } from "./api-DsbUi7TO.esm.js";
|
|
2
|
+
import { t as endpoints } from "./endpoints-CwrFQfW7.esm.js";
|
|
3
|
+
import { r as isIOS, t as isAndroid } from "./platform-BoeUeUrV.esm.js";
|
|
4
|
+
import { a as fromPromise, r as assign, t as setup } from "./xstate.esm-nY3M5UYm.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/geolocation/geolocationServices.ts
|
|
7
7
|
async function addGeolocation(params, signal) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "./
|
|
3
|
-
import
|
|
1
|
+
import "./StateMachine-20ahmASR.js";
|
|
2
|
+
import { t as Manager } from "./Manager-BfBOhrjh.js";
|
|
3
|
+
import "./Actor-DYjXVMQm.js";
|
|
4
|
+
import { t as OtpValidationErrors } from "./otp-CETbFjXH.js";
|
|
4
5
|
|
|
5
6
|
//#region src/modules/government-validation/types.d.ts
|
|
6
7
|
type GovernmentValidationConfig = {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./BrowserTimerProvider-
|
|
2
|
-
import "./api-
|
|
3
|
-
import { n as eventModuleNames, o as topLevelStateName, s as createManagerInstrumentation } from "./events-
|
|
4
|
-
import "./endpoints-
|
|
5
|
-
import {
|
|
6
|
-
import { t as OTP_CODE_LENGTH } from "./otp-
|
|
7
|
-
import { t as governmentValidationMachine } from "./governmentValidationStateMachine-
|
|
1
|
+
import "./BrowserTimerProvider-CHloo0eQ.esm.js";
|
|
2
|
+
import "./api-DsbUi7TO.esm.js";
|
|
3
|
+
import { n as eventModuleNames, o as topLevelStateName, s as createManagerInstrumentation } from "./events-1wxZ97yf.esm.js";
|
|
4
|
+
import "./endpoints-CwrFQfW7.esm.js";
|
|
5
|
+
import { l as createManager, s as createActor } from "./xstate.esm-nY3M5UYm.esm.js";
|
|
6
|
+
import { t as OTP_CODE_LENGTH } from "./otp-DepQPUIA.esm.js";
|
|
7
|
+
import { t as governmentValidationMachine } from "./governmentValidationStateMachine-CjCs0_fG.esm.js";
|
|
8
8
|
|
|
9
9
|
//#region src/modules/government-validation/governmentValidationActor.ts
|
|
10
10
|
function createGovernmentValidationActor(options) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-
|
|
2
|
-
import { t as api } from "./api-
|
|
3
|
-
import { t as endpoints } from "./endpoints-
|
|
4
|
-
import { a as fromPromise, i as fromCallback, r as assign, t as setup } from "./xstate.esm-
|
|
5
|
-
import { n as computeOtpValidationErrors, r as isOtpComplete } from "./otp-
|
|
1
|
+
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-CHloo0eQ.esm.js";
|
|
2
|
+
import { t as api } from "./api-DsbUi7TO.esm.js";
|
|
3
|
+
import { t as endpoints } from "./endpoints-CwrFQfW7.esm.js";
|
|
4
|
+
import { a as fromPromise, i as fromCallback, r as assign, t as setup } from "./xstate.esm-nY3M5UYm.esm.js";
|
|
5
|
+
import { n as computeOtpValidationErrors, r as isOtpComplete } from "./otp-DepQPUIA.esm.js";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/government-validation/governmentValidationServices.ts
|
|
8
8
|
async function processGovernmentValidation(signal) {
|
package/dist/home.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import "./types-
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import "./StateMachine-20ahmASR.js";
|
|
2
|
+
import { t as Manager } from "./Manager-BfBOhrjh.js";
|
|
3
|
+
import "./camera-CWO06Lu5.js";
|
|
4
|
+
import "./types-B_YCuHZx.js";
|
|
5
|
+
import "./types-CTnn7kUK.js";
|
|
6
|
+
import "./canvas-pLrXU1id.js";
|
|
7
|
+
import "./createFaceAvatar-DNMSIcRb.js";
|
|
8
|
+
import { t as EmptyConfig } from "./types-Cyi3gwPK.js";
|
|
9
|
+
import * as xstate188 from "xstate";
|
|
7
10
|
|
|
8
11
|
//#region src/modules/home/types.d.ts
|
|
9
12
|
type HomeConfig = EmptyConfig;
|
|
@@ -35,41 +38,41 @@ type HomeContext = {
|
|
|
35
38
|
type HomeInput = {
|
|
36
39
|
config: EmptyConfig;
|
|
37
40
|
};
|
|
38
|
-
declare const homeMachine:
|
|
41
|
+
declare const homeMachine: xstate188.StateMachine<HomeContext, {
|
|
39
42
|
type: "LOAD";
|
|
40
43
|
} | {
|
|
41
44
|
type: "COMPLETE";
|
|
42
45
|
} | {
|
|
43
46
|
type: "RESET";
|
|
44
|
-
}, {}, never, never, never, never, "idle" | "finished" | "main", string, HomeInput,
|
|
47
|
+
}, {}, never, never, never, never, "idle" | "finished" | "main", string, HomeInput, xstate188.NonReducibleUnknown, xstate188.EventObject, xstate188.MetaObject, {
|
|
45
48
|
readonly id: "home";
|
|
46
49
|
readonly initial: "idle";
|
|
47
50
|
readonly context: ({
|
|
48
51
|
input
|
|
49
52
|
}: {
|
|
50
53
|
spawn: {
|
|
51
|
-
<TSrc extends never>(logic: TSrc, ...[options]: never):
|
|
52
|
-
<TLogic extends
|
|
54
|
+
<TSrc extends never>(logic: TSrc, ...[options]: never): xstate188.ActorRefFromLogic<never>;
|
|
55
|
+
<TLogic extends xstate188.AnyActorLogic>(src: TLogic, ...[options]: xstate188.ConditionalRequired<[options?: ({
|
|
53
56
|
id?: never;
|
|
54
57
|
systemId?: string;
|
|
55
|
-
input?:
|
|
58
|
+
input?: xstate188.InputFrom<TLogic> | undefined;
|
|
56
59
|
syncSnapshot?: boolean;
|
|
57
|
-
} & { [K in
|
|
60
|
+
} & { [K in xstate188.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate188.IsNotNever<xstate188.RequiredLogicInput<TLogic>>>): xstate188.ActorRefFromLogic<TLogic>;
|
|
58
61
|
};
|
|
59
62
|
input: HomeInput;
|
|
60
|
-
self:
|
|
63
|
+
self: xstate188.ActorRef<xstate188.MachineSnapshot<HomeContext, {
|
|
61
64
|
type: "LOAD";
|
|
62
65
|
} | {
|
|
63
66
|
type: "COMPLETE";
|
|
64
67
|
} | {
|
|
65
68
|
type: "RESET";
|
|
66
|
-
}, Record<string,
|
|
69
|
+
}, Record<string, xstate188.AnyActorRef | undefined>, xstate188.StateValue, string, unknown, any, any>, {
|
|
67
70
|
type: "LOAD";
|
|
68
71
|
} | {
|
|
69
72
|
type: "COMPLETE";
|
|
70
73
|
} | {
|
|
71
74
|
type: "RESET";
|
|
72
|
-
},
|
|
75
|
+
}, xstate188.AnyEventObject>;
|
|
73
76
|
}) => {
|
|
74
77
|
config: EmptyConfig;
|
|
75
78
|
};
|
package/dist/home.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./api-
|
|
2
|
-
import { n as eventModuleNames, s as createManagerInstrumentation } from "./events-
|
|
3
|
-
import {
|
|
1
|
+
import "./api-DsbUi7TO.esm.js";
|
|
2
|
+
import { n as eventModuleNames, s as createManagerInstrumentation } from "./events-1wxZ97yf.esm.js";
|
|
3
|
+
import { l as createManager, s as createActor, t as setup } from "./xstate.esm-nY3M5UYm.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/home/homeStateMachine.ts
|
|
6
6
|
const homeMachine = setup({ types: {
|
package/dist/http.esm.js
CHANGED