@incodetech/core 2.1.0-rc.1 → 2.1.0-rc.3
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-ChciZmjE.esm.js +28214 -0
- package/dist/{BrowserStorageProvider-BpJM-gIl.esm.js → BrowserStorageProvider-CrrN540a.esm.js} +1 -8
- package/dist/BrowserVisibilityObserverProvider-rim9Jrz-.esm.js +25 -0
- package/dist/Face2DProvider-BeLlYBbB.esm.js +824 -0
- package/dist/FaceDetectionProvider-B78455D4.d.ts +119 -0
- package/dist/IVisibilityObserverCapability-BbWjgpiF.d.ts +12 -0
- package/dist/IWasmUtilCapability-d2XvzaCk.d.ts +145 -0
- package/dist/IpifyProvider-BRW14_uo.esm.js +51 -0
- package/dist/{OpenViduRecordingProvider-O4GjBseO.esm.js → OpenViduRecordingProvider-B_0GKkzc.esm.js} +1 -1
- package/dist/PrivacyLensProvider-hDzaDzZ6.esm.js +339 -0
- package/dist/{StreamCanvasCapture-ImiDQdVA.esm.js → StreamCanvasCapture-Bz17q4FP.esm.js} +1 -1
- package/dist/StreamCanvasCapture-DS1TOoiH.d.ts +42 -0
- package/dist/{WasmUtilProvider-BKWm8rSA.esm.js → WasmUtilProvider-ADG54T6M.esm.js} +26 -2
- package/dist/{addressSearch-DvmWXKZg.esm.js → addressSearch-DJyNTg5S.esm.js} +4 -4
- package/dist/{ae-signature-BFZta3TZ.esm.js → ae-signature-DlElqFrZ.esm.js} +1 -1
- package/dist/ae-signature.d.ts +4 -3
- package/dist/ae-signature.esm.js +10 -7
- package/dist/antifraud.d.ts +4 -3
- package/dist/antifraud.esm.js +7 -6
- package/dist/antifraudManager-BKdQoMFf.esm.js +84 -0
- package/dist/{antifraudManager-CznnhyvD.d.ts → antifraudManager-DpIvbrZP.d.ts} +2 -2
- package/dist/{antifraudStateMachine-Ccrb-Jxc.esm.js → antifraudStateMachine-C0NGnP9W.esm.js} +3 -3
- package/dist/{api-CESGtpbH.esm.js → api-DsbUi7TO.esm.js} +21 -2
- package/dist/authentication.d.ts +19 -13
- package/dist/authentication.esm.js +33 -27
- package/dist/{authenticationManager-CaiQbp-q.d.ts → authenticationManager-CdPbNS2H.d.ts} +13 -3
- package/dist/{authenticationManager-BlR6mSaG.esm.js → authenticationManager-Dtl1vcET.esm.js} +17 -8
- package/dist/{authenticationStateMachine-DkcGUMw5.esm.js → authenticationStateMachine-D-hOlg8p.esm.js} +20 -23
- package/dist/avatar.d.ts +3 -0
- package/dist/avatar.esm.js +3 -0
- package/dist/{backCameraStream-D7Wo4Nbx.esm.js → backCameraStream-ZyqrFyjO.esm.js} +3 -3
- package/dist/browser-DlFgHpoC-qLKs75Qp.esm.js +1425 -0
- package/dist/{browserSimulation-B1dWiXp7.esm.js → browserSimulation-TsSoavQv.esm.js} +153 -1216
- package/dist/camera-DUkgmYMo.esm.js +79 -0
- package/dist/camera.d.ts +7 -1
- package/dist/camera.esm.js +4 -4
- package/dist/{StreamCanvasCapture-yyl20qd9.d.ts → canvas-CJUmoXSD.d.ts} +1 -41
- package/dist/certificate-issuance.d.ts +312 -0
- package/dist/certificate-issuance.esm.js +74 -0
- package/dist/certificateIssuanceStateMachine-C07m7qtP.esm.js +127 -0
- package/dist/clientLifecycle-Ct7h9uxx.esm.js +534 -0
- package/dist/consent.d.ts +4 -3
- package/dist/consent.esm.js +7 -6
- package/dist/{consentManager-BYo9Nu1r.esm.js → consentManager-BtnPZUW4.esm.js} +30 -5
- package/dist/{consentManager-Cg5Sk2tv.d.ts → consentManager-DufVo9D9.d.ts} +55 -55
- package/dist/{consentStateMachine-BG3yL8aC.esm.js → consentStateMachine-DO2JqoZW.esm.js} +3 -3
- package/dist/cpf-ocr.d.ts +4 -3
- package/dist/cpf-ocr.esm.js +7 -6
- package/dist/{cpfOcrManager-sSKegxox.esm.js → cpfOcrManager-C4rLgKsu.esm.js} +6 -5
- package/dist/{cpfOcrManager-Dg1s_TY5.d.ts → cpfOcrManager-DqZZ94Gt.d.ts} +19 -19
- package/dist/createFaceAvatar-B8pFpy6o.d.ts +401 -0
- package/dist/createFaceAvatar-BOHDKQRq.esm.js +46 -0
- package/dist/cross-document-data-match.d.ts +2 -1
- package/dist/cross-document-data-match.esm.js +6 -5
- package/dist/curp-validation.d.ts +10 -7
- package/dist/curp-validation.esm.js +7 -6
- package/dist/{curpValidationManager-CFem6zP9.esm.js → curpValidationManager-BafobPXC.esm.js} +52 -5
- package/dist/{curpValidationManager-RttixpIc.d.ts → curpValidationManager-Co6LZAHT.d.ts} +4 -3
- package/dist/{curpValidationStateMachine-B7V_qp66.esm.js → curpValidationStateMachine-DXTPK6vI.esm.js} +3 -3
- package/dist/custom-fields.d.ts +4 -2
- package/dist/custom-fields.esm.js +49 -6
- package/dist/custom-watchlist.d.ts +2 -1
- package/dist/custom-watchlist.esm.js +27 -6
- package/dist/{customWatchlistStateMachine-HmFybXLX.esm.js → customWatchlistStateMachine-B4G3Chkx.esm.js} +3 -3
- package/dist/{deepsightLoader-8tnddNx-.esm.js → deepsightLoader-DHSVD776.esm.js} +14 -13
- package/dist/{deepsightService-CrHmvx8X.esm.js → deepsightService-CDahSjGP.esm.js} +9 -38
- package/dist/deepsightService-CMB9XjES.d.ts +69 -0
- package/dist/device.d.ts +9 -1
- package/dist/device.esm.js +5 -5
- package/dist/document-capture.d.ts +178 -177
- package/dist/document-capture.esm.js +78 -14
- package/dist/document-upload.d.ts +51 -50
- package/dist/document-upload.esm.js +10 -9
- package/dist/{documentCaptureStateMachine-CUTUzUw_.esm.js → documentCaptureStateMachine-DSOX2epf.esm.js} +7 -7
- package/dist/dynamic-forms.d.ts +4 -192
- package/dist/dynamic-forms.esm.js +8 -410
- package/dist/dynamicFormsManager-BOefZbyF.esm.js +168 -0
- package/dist/dynamicFormsManager-CUYLOj9g.d.ts +239 -0
- package/dist/dynamicFormsStateMachine-BXHcaocI.esm.js +284 -0
- package/dist/ekyb.d.ts +10 -6
- package/dist/ekyb.esm.js +62 -17
- package/dist/{ekybStateMachine-klc-AImJ.esm.js → ekybStateMachine-CCSeqjCt.esm.js} +5 -5
- package/dist/ekyc.d.ts +5 -3
- package/dist/ekyc.esm.js +55 -9
- package/dist/{ekycStateMachine-CXbpaJJn.esm.js → ekycStateMachine-DkLVTOyA.esm.js} +5 -5
- package/dist/electronic-signature.d.ts +4 -3
- package/dist/electronic-signature.esm.js +9 -6
- package/dist/{electronicSignatureManager-BaECdJ1u.esm.js → electronicSignatureManager-DjzUzqZj.esm.js} +135 -92
- package/dist/email.d.ts +5 -4
- package/dist/email.esm.js +9 -8
- package/dist/{emailManager--D5G3ChB.esm.js → emailManager-B_XzEsXH.esm.js} +47 -6
- package/dist/{emailManager-lAzDoQOs.d.ts → emailManager-fHASH6uo.d.ts} +4 -3
- package/dist/{emailStateMachine-CxTOMAjC.esm.js → emailStateMachine-fqJ42b19.esm.js} +5 -5
- package/dist/{endpoints-BeTK0Mlt.esm.js → endpoints-BzMJFAPV.esm.js} +15 -0
- package/dist/{events-Dvvriq9l.esm.js → events-CqGY1yMq.esm.js} +87 -206
- package/dist/events.d.ts +23 -16
- package/dist/events.esm.js +3 -2
- package/dist/extensibility.d.ts +37 -27
- package/dist/extensibility.esm.js +74 -57
- package/dist/externalFetch-CyhBfD-n.esm.js +22 -0
- package/dist/face-match.d.ts +2 -2
- package/dist/face-match.esm.js +6 -5
- package/dist/{faceCaptureManagerFactory-ej2j1LMr.esm.js → faceCaptureManagerFactory-2brKTzMb.esm.js} +115 -25
- package/dist/faceCaptureManagerFactory-CGKbf7zt.d.ts +400 -0
- package/dist/{faceCaptureSetup-B9t6bYze.esm.js → faceCaptureSetup-CDUVU1nl.esm.js} +97 -13
- package/dist/{faceMatchStateMachine-DeXXzSuz.esm.js → faceMatchStateMachine-DUeUjEPx.esm.js} +3 -3
- package/dist/field-comparison.d.ts +4 -3
- package/dist/field-comparison.esm.js +6 -5
- package/dist/{fieldComparisonManager-COGI2ARD.esm.js → fieldComparisonManager-B9W0a9A5.esm.js} +5 -4
- package/dist/{fieldComparisonManager-Bu5TaSr3.d.ts → fieldComparisonManager-DdLqDeB2.d.ts} +2 -2
- package/dist/fiscal-qr.d.ts +5 -3
- package/dist/fiscal-qr.esm.js +13 -12
- package/dist/flow-events.d.ts +8 -6
- package/dist/flow.d.ts +34 -16
- package/dist/flow.esm.js +53 -30
- package/dist/flowCompletionService-BIqSTZcd.d.ts +28 -0
- package/dist/flowCompletionService-qEqh_g14.esm.js +42 -0
- package/dist/{flowServices-ChgTNggJ.esm.js → flowServices-C4piblgx.esm.js} +24 -9
- package/dist/geolocation.d.ts +4 -126
- package/dist/geolocation.esm.js +8 -87
- package/dist/geolocationManager-BP2Do9O-.esm.js +123 -0
- package/dist/geolocationManager-Cs50eRlC.d.ts +156 -0
- package/dist/{geolocationStateMachine-Dvh7X0wF.esm.js → geolocationStateMachine-BYfOOOG0.esm.js} +4 -4
- package/dist/{getDeviceClass-C8Do2qYu.esm.js → getDeviceClass-DGGzzfqm.esm.js} +1 -1
- package/dist/getDeviceData-TrKM8NPh.esm.js +101 -0
- package/dist/government-validation.d.ts +4 -3
- package/dist/government-validation.esm.js +43 -8
- package/dist/{governmentValidationStateMachine-DcJ-BfsC.esm.js → governmentValidationStateMachine-CwoPPO8b.esm.js} +5 -5
- package/dist/home.d.ts +18 -15
- package/dist/home.esm.js +5 -4
- package/dist/http.d.ts +1 -0
- package/dist/http.esm.js +2 -2
- package/dist/id-ocr.d.ts +4 -625
- package/dist/id-ocr.esm.js +8 -84
- package/dist/id-verification.d.ts +28 -27
- package/dist/id-verification.esm.js +6 -5
- package/dist/id.d.ts +24 -13
- package/dist/id.esm.js +48 -33
- package/dist/idCaptureDefaults-DNJON8Xo.esm.js +188 -0
- package/dist/{idCaptureManager-ChCNmgBj.d.ts → idCaptureManager-BVdvfJys.d.ts} +47 -12
- package/dist/{idCaptureManager-D3pwWutw.esm.js → idCaptureManager-Bo9DCQSU.esm.js} +100 -15
- package/dist/{idCaptureStateMachine-B3AiDIsT.esm.js → idCaptureStateMachine-BeDidMLU.esm.js} +525 -439
- package/dist/idOcrManager-BkRDrpZu.esm.js +92 -0
- package/dist/idOcrManager-CJzrmM91.d.ts +641 -0
- package/dist/{idOcrStateMachine-CDQ5d_VM.esm.js → idOcrStateMachine-DRZc4FBl.esm.js} +5 -5
- package/dist/{idVerificationStateMachine-kRxwImzO.esm.js → idVerificationStateMachine-oqiERKpg.esm.js} +3 -3
- package/dist/identity-reuse.d.ts +4 -3
- package/dist/identity-reuse.esm.js +7 -6
- package/dist/{identityReuseManager-C6n_97dw.esm.js → identityReuseManager-Bu62LToE.esm.js} +4 -3
- package/dist/{identityReuseManager-Cww-NDtd.d.ts → identityReuseManager-TWKbXuvY.d.ts} +33 -33
- package/dist/{identityReuseStateMachine-BfE5YiEr.esm.js → identityReuseStateMachine-BmONeF6B.esm.js} +3 -3
- package/dist/{index-B5hPA0Bg.d.ts → index-DtUlD-bz.d.ts} +2 -2
- package/dist/{index-B9NysVDB.d.ts → index-Icld-cKW.d.ts} +175 -295
- package/dist/index-XTtxaahe.d.ts +93 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.esm.js +16 -12
- package/dist/{invokeOnCaptureCallback-ygByVdnn.esm.js → invokeOnCaptureCallback-v_PV_IJz.esm.js} +1 -1
- package/dist/{lib-BY67lgbq.esm.js → lib-B050WTth.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +10 -7
- package/dist/mandatory-consent.esm.js +7 -6
- package/dist/{mandatoryConsentManager-Dq6WiOZh.d.ts → mandatoryConsentManager-Bmdjo14S.d.ts} +50 -50
- package/dist/{mandatoryConsentManager-H6D18cZB.esm.js → mandatoryConsentManager-CQ3jirlZ.esm.js} +4 -3
- package/dist/{mandatoryConsentStateMachine-DtQNW1ji.esm.js → mandatoryConsentStateMachine-DkJJLHqC.esm.js} +3 -3
- package/dist/mediaRecorderOptions-C3NAkVgK.esm.js +42 -0
- package/dist/mediapipeShared-CRAKVElv.esm.js +67 -0
- package/dist/{recordingService-yRw7hfzU.esm.js → onDeviceFaceResults-DVBggeq8.esm.js} +71 -389
- package/dist/{openviduLazy-Dh14JNJc.esm.js → openviduLazy-BTOIauGP.esm.js} +2 -2
- package/dist/openviduLazy-Dov8oKfL.esm.js +3 -0
- package/dist/{permissionGuards-D0wGddy7.esm.js → permissionGuards-BR2oN573.esm.js} +1 -1
- package/dist/{permissionServices-Doec4X5L.esm.js → permissionServices-BJhGL13R.esm.js} +7 -4
- package/dist/personhood.d.ts +534 -0
- package/dist/personhood.esm.js +1494 -0
- package/dist/phone.d.ts +5 -4
- package/dist/phone.esm.js +9 -8
- package/dist/{phoneManager-fPmIBYQK.d.ts → phoneManager-BOTcjXgs.d.ts} +4 -3
- package/dist/{phoneManager-BmF-0Ez4.esm.js → phoneManager-BWlxqbyD.esm.js} +48 -6
- package/dist/{phoneStateMachine-BiV0yoEx.esm.js → phoneStateMachine-B_V9nODs.esm.js} +5 -5
- package/dist/{qe-signature-CUYPcHVo.esm.js → qe-signature-BhFnI9pT.esm.js} +1 -1
- package/dist/qe-signature.d.ts +4 -3
- package/dist/qe-signature.esm.js +10 -7
- package/dist/recordingService-m_1xCthr.esm.js +347 -0
- package/dist/redirect-to-mobile.d.ts +4 -3
- package/dist/redirect-to-mobile.esm.js +9 -7
- package/dist/{redirectToMobileManager-Dy3t7o0C.esm.js → redirectToMobileManager-BaAo9rgi.esm.js} +5 -4
- package/dist/{redirectToMobileManager-BNe3IzC_.d.ts → redirectToMobileManager-Br0KZK1G.d.ts} +2 -2
- package/dist/{redirectToMobileStateMachine-DyAdRxfP.esm.js → redirectToMobileStateMachine-DoAnf2ql.esm.js} +16 -28
- package/dist/{runChildModule-CuoHZ1cx.esm.js → runChildModule-0nQfjVVo.esm.js} +14 -24
- package/dist/selfie.d.ts +27 -14
- package/dist/selfie.esm.js +43 -30
- package/dist/{selfieManager-BNuTIGAz.esm.js → selfieManager-D_ZFERsE.esm.js} +17 -8
- package/dist/{selfieManager-C2y_t6DG.d.ts → selfieManager-R0Jw5sjb.d.ts} +13 -3
- package/dist/{selfieStateMachine-Bv99bZJE.esm.js → selfieStateMachine-CIgeeiN9.esm.js} +4 -4
- package/dist/{session-DoVb-OcB.esm.js → session-9jIfKFCc.esm.js} +3 -3
- package/dist/session.d.ts +11 -8
- package/dist/session.esm.js +16 -12
- package/dist/{sessionInitializer-DRB-hgbV.esm.js → sessionInitializer-C_TYIgyk.esm.js} +16 -109
- package/dist/{setup-BwCluiw3.d.ts → setup-CpRnXxn8.d.ts} +61 -2
- package/dist/setup-DHc6OaHm.esm.js +562 -0
- package/dist/signature.d.ts +4 -2
- package/dist/signature.esm.js +49 -6
- package/dist/{signatureStateMachine-C5qqYLRz.esm.js → signatureStateMachine-DtoiPzys.esm.js} +21 -39
- package/dist/{stats-BMNUG1AU.esm.js → stats-CYcScXcO.esm.js} +2 -2
- package/dist/stats.esm.js +3 -3
- package/dist/thumbmarkAdapter-fHBUDlAP.esm.js +1194 -0
- package/dist/tri-BG1iJsr4.esm.js +399 -0
- package/dist/tri.d.ts +2 -0
- package/dist/tri.esm-DUC01NgO.esm.js +2593 -0
- package/dist/tri.esm.js +4 -0
- package/dist/trust-graph.d.ts +4 -3
- package/dist/trust-graph.esm.js +4 -3
- package/dist/{types-NuT8ftBV.d.ts → types-BklZ_Wne.d.ts} +2 -1
- package/dist/{types-DOUhndhT.d.ts → types-BsYXnC5s.d.ts} +39 -3
- package/dist/{types-DsnEVMhr.esm.js → types-CMcxlSmH.esm.js} +2 -1
- package/dist/types-CxW2e0Ar.d.ts +132 -0
- package/dist/{types-Bj9hdFjU.d.ts → types-DgGlgyZT.d.ts} +1 -1
- package/dist/types-ElOJAGaM.esm.js +189 -0
- package/dist/urlUtils-BZqFU9rR.esm.js +16 -0
- package/dist/video-C2WIj6TS.esm.js +36 -0
- package/dist/video-selfie.d.ts +351 -0
- package/dist/video-selfie.esm.js +1509 -0
- package/dist/videoSelfieSteps-7M5vxKn-.esm.js +58 -0
- package/dist/{warmup-Dg8Lh-50.d.ts → warmup-BJZPQIiX.d.ts} +5 -1
- package/dist/wasm.d.ts +4 -3
- package/dist/wasm.esm.js +17 -13
- package/dist/watchlist-for-business.d.ts +2 -1
- package/dist/watchlist-for-business.esm.js +30 -7
- package/dist/watchlist.d.ts +2 -1
- package/dist/watchlist.esm.js +28 -6
- package/dist/{watchlistForBusinessStateMachine-DMl8j2Ov.esm.js → watchlistForBusinessStateMachine-DvEunDxs.esm.js} +3 -3
- package/dist/{watchlistStateMachine-DmQlqI6L.esm.js → watchlistStateMachine-AHXVf-TB.esm.js} +3 -3
- package/dist/workflow.d.ts +296 -103
- package/dist/workflow.esm.js +137 -74
- package/dist/{xstate.esm-C9wncMQa.esm.js → xstate.esm-Bomq1a0z.esm.js} +54 -5
- package/package.json +26 -1
- package/dist/IpifyProvider-D4LWD15E.esm.js +0 -167
- package/dist/antifraudManager-CkV4u-LE.esm.js +0 -55
- package/dist/camera-DJWm3V4g.esm.js +0 -22
- package/dist/deepsightService-Dh5P-hLf.d.ts +0 -265
- package/dist/faceCaptureManagerFactory-CjdBUS6s.d.ts +0 -721
- package/dist/flowCompletionService-BdR2cGgB.d.ts +0 -19
- package/dist/flowCompletionService-DdGojV9K.esm.js +0 -20
- package/dist/getBrowser-C8DP7oTB.esm.js +0 -8
- package/dist/openviduLazy-B8L--0oe.esm.js +0 -3
- package/dist/setup-CUO4mErT.esm.js +0 -1037
- /package/dist/{Actor-Y0_Fj-KL.d.ts → Actor-CGEelYtQ.d.ts} +0 -0
- /package/dist/{BrowserTimerProvider-DhNc_x02.esm.js → BrowserTimerProvider-CHloo0eQ.esm.js} +0 -0
- /package/dist/{ITimerCapability-CB0I1Uf2.esm.js → ITimerCapability-pltuG1E8.esm.js} +0 -0
- /package/dist/{Manager-BHn8wH8K.d.ts → Manager-CJ3G2zqi.d.ts} +0 -0
- /package/dist/{MotionSensorProvider-Bx7Mpzt0.esm.js → MotionSensorProvider-DCbId4De.esm.js} +0 -0
- /package/dist/{StateMachine-BC_nGvrc.d.ts → StateMachine-C_AY4cs7.d.ts} +0 -0
- /package/dist/{apiError-B-j-gyDx.esm.js → apiError-DNS2OCEX.esm.js} +0 -0
- /package/dist/{camera-SRBpPq2X.d.ts → camera-CNVUo-bC.d.ts} +0 -0
- /package/dist/{canvas-SKcRBxsk.esm.js → canvas-_I95hkPg.esm.js} +0 -0
- /package/dist/{chunk-CMUKZ2uL.esm.js → chunk-CIKcdghV.esm.js} +0 -0
- /package/dist/{cpf-BRzggV8G.esm.js → cpf-BKaho0j_.esm.js} +0 -0
- /package/dist/{dateUtils-AksLQmgV.esm.js → dateUtils-7-tQYRNN.esm.js} +0 -0
- /package/dist/{getDeviceClass-C0olyNFS.esm.js → getDeviceClass-DavNdcxh.esm.js} +0 -0
- /package/dist/{http-Cai3IoLS.esm.js → http-BkiUT7EB.esm.js} +0 -0
- /package/dist/{otp-CGMdUzBC.esm.js → otp-Bfnzf7I3.esm.js} +0 -0
- /package/dist/{otp-DF5A0sFx.d.ts → otp-M4iy57XY.d.ts} +0 -0
- /package/dist/{platform-SKvEfCBh.esm.js → platform-uIVQUnJP.esm.js} +0 -0
- /package/dist/{types-DvGZI7BF.d.ts → types-D_IceWxT.d.ts} +0 -0
- /package/dist/{types-ya0LN_MX.d.ts → types-Duy2rDxF.d.ts} +0 -0
|
@@ -0,0 +1,641 @@
|
|
|
1
|
+
import { t as Manager } from "./Manager-CJ3G2zqi.js";
|
|
2
|
+
import { t as ActorRefFrom } from "./Actor-CGEelYtQ.js";
|
|
3
|
+
import * as xstate365 from "xstate";
|
|
4
|
+
|
|
5
|
+
//#region src/modules/id-ocr/types.d.ts
|
|
6
|
+
type IdOcrConfig = {
|
|
7
|
+
/** Allows user to edit OCR information @default false */
|
|
8
|
+
editableOcr?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* When true (from flow/onboarding), after the first ID OCR step completes the
|
|
11
|
+
* machine loads and optionally edits OCR for the second captured ID.
|
|
12
|
+
*/
|
|
13
|
+
secondId?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Session flow id (injected by orchestrated flow UI). When listed in `CPFFlowIds`
|
|
16
|
+
* (`idOcrConsts`), only the CPF field is shown and validated; it maps to `documentNumber` on OCR.
|
|
17
|
+
*/
|
|
18
|
+
flowId?: string;
|
|
19
|
+
};
|
|
20
|
+
type NameBean = {
|
|
21
|
+
fullName?: string;
|
|
22
|
+
firstName?: string;
|
|
23
|
+
middleName?: string;
|
|
24
|
+
givenName?: string;
|
|
25
|
+
nameSuffix?: string;
|
|
26
|
+
paternalLastName?: string;
|
|
27
|
+
maternalLastName?: string;
|
|
28
|
+
lastNameMrz?: string;
|
|
29
|
+
};
|
|
30
|
+
type AddressBean = {
|
|
31
|
+
street?: string;
|
|
32
|
+
colony?: string;
|
|
33
|
+
postalCode?: string;
|
|
34
|
+
city?: string;
|
|
35
|
+
state?: string;
|
|
36
|
+
label?: string;
|
|
37
|
+
confidentGeolocation?: boolean;
|
|
38
|
+
};
|
|
39
|
+
type AddressStatements = {
|
|
40
|
+
_id: string;
|
|
41
|
+
dateType: string;
|
|
42
|
+
addressStatementTimestamp: number;
|
|
43
|
+
};
|
|
44
|
+
type OcrData = {
|
|
45
|
+
name: NameBean;
|
|
46
|
+
givenName?: string;
|
|
47
|
+
firstName?: string;
|
|
48
|
+
middleName?: string;
|
|
49
|
+
nameSuffix?: string;
|
|
50
|
+
mothersSurname?: string;
|
|
51
|
+
fathersSurname?: string;
|
|
52
|
+
nickName?: string;
|
|
53
|
+
address?: string;
|
|
54
|
+
street?: string;
|
|
55
|
+
colony?: string;
|
|
56
|
+
postalCode?: string;
|
|
57
|
+
city?: string;
|
|
58
|
+
state?: string;
|
|
59
|
+
stateCode?: string;
|
|
60
|
+
countryCode?: string;
|
|
61
|
+
addressFields?: AddressBean;
|
|
62
|
+
fullAddress?: boolean;
|
|
63
|
+
invalidAddress?: boolean;
|
|
64
|
+
checkedAddress?: string;
|
|
65
|
+
checkedAddressBean?: AddressBean;
|
|
66
|
+
exteriorNumber?: string;
|
|
67
|
+
interiorNumber?: string;
|
|
68
|
+
addressFromStatement?: string;
|
|
69
|
+
addressFieldsFromStatement?: AddressBean;
|
|
70
|
+
invalidAddressFromStatement?: boolean;
|
|
71
|
+
addressStatementEmissionDate?: number;
|
|
72
|
+
documentType?: string;
|
|
73
|
+
addressStatementTimestamps?: AddressStatements[];
|
|
74
|
+
poaName?: string;
|
|
75
|
+
typeOfId?: string;
|
|
76
|
+
documentFrontSubtype?: string;
|
|
77
|
+
documentBackSubtype?: string;
|
|
78
|
+
birthDate?: number | string;
|
|
79
|
+
gender?: string;
|
|
80
|
+
claveDeElector?: string;
|
|
81
|
+
curp?: string;
|
|
82
|
+
numeroEmisionCredencial?: string;
|
|
83
|
+
cic?: string;
|
|
84
|
+
ocr?: string;
|
|
85
|
+
documentNumber?: string;
|
|
86
|
+
personalNumber?: string;
|
|
87
|
+
refNumber?: string;
|
|
88
|
+
nue?: string;
|
|
89
|
+
externalId?: string;
|
|
90
|
+
issuedAt?: string;
|
|
91
|
+
expireAt?: string;
|
|
92
|
+
expirationDate?: number;
|
|
93
|
+
issueDate?: number;
|
|
94
|
+
registrationDate?: number;
|
|
95
|
+
issuingCountry?: string;
|
|
96
|
+
issuingState?: string;
|
|
97
|
+
birthPlace?: string;
|
|
98
|
+
issuingAuthority?: string;
|
|
99
|
+
height?: string;
|
|
100
|
+
weight?: string;
|
|
101
|
+
eyeColor?: string;
|
|
102
|
+
hairColor?: string;
|
|
103
|
+
bloodType?: string;
|
|
104
|
+
maritalStatus?: string;
|
|
105
|
+
nationality?: string;
|
|
106
|
+
nationalityMrz?: string;
|
|
107
|
+
classes?: string;
|
|
108
|
+
cond?: string;
|
|
109
|
+
mentions?: string;
|
|
110
|
+
restrictions?: string;
|
|
111
|
+
mrz1?: string;
|
|
112
|
+
mrz2?: string;
|
|
113
|
+
mrz3?: string;
|
|
114
|
+
fullNameMrz?: string;
|
|
115
|
+
documentNumberCheckDigit?: string;
|
|
116
|
+
dateOfBirthCheckDigit?: string;
|
|
117
|
+
expirationDateCheckDigit?: string;
|
|
118
|
+
fathersName?: string;
|
|
119
|
+
mothersName?: string;
|
|
120
|
+
federalRevenueNumber?: string;
|
|
121
|
+
originDocumentId?: string;
|
|
122
|
+
driversLicenseCategory?: string;
|
|
123
|
+
controlNumber?: string;
|
|
124
|
+
renach?: string;
|
|
125
|
+
ocrReliabilityConfidence?: number;
|
|
126
|
+
ocrDataConfidence?: unknown;
|
|
127
|
+
};
|
|
128
|
+
type UpdateOcrDataParams = {
|
|
129
|
+
address?: string;
|
|
130
|
+
documentNumber?: string;
|
|
131
|
+
name?: string;
|
|
132
|
+
firstName?: string;
|
|
133
|
+
lastName?: string;
|
|
134
|
+
paternalLastName?: string;
|
|
135
|
+
maternalLastName?: string;
|
|
136
|
+
personalNumber?: string;
|
|
137
|
+
curp?: string;
|
|
138
|
+
email?: string;
|
|
139
|
+
birthDate?: string;
|
|
140
|
+
expireAt?: string;
|
|
141
|
+
gender?: string;
|
|
142
|
+
issuingCountry?: string;
|
|
143
|
+
};
|
|
144
|
+
type ValidationRule = {
|
|
145
|
+
type: 'required';
|
|
146
|
+
} | {
|
|
147
|
+
type: 'minAge';
|
|
148
|
+
years: number;
|
|
149
|
+
} | {
|
|
150
|
+
type: 'cpf';
|
|
151
|
+
};
|
|
152
|
+
type OcrFieldConfig = {
|
|
153
|
+
key: keyof UpdateOcrDataParams;
|
|
154
|
+
labelKey: string;
|
|
155
|
+
type: 'text' | 'date' | 'radio';
|
|
156
|
+
options?: {
|
|
157
|
+
label: string;
|
|
158
|
+
value: string;
|
|
159
|
+
}[];
|
|
160
|
+
validation?: ValidationRule[];
|
|
161
|
+
required: boolean;
|
|
162
|
+
};
|
|
163
|
+
type UpdateOcrResponse = {
|
|
164
|
+
success: boolean;
|
|
165
|
+
};
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region src/modules/id-ocr/idOcrStateMachine.d.ts
|
|
168
|
+
type IdOcrOcrDocument = 'first' | 'second';
|
|
169
|
+
type IdOcrContext = {
|
|
170
|
+
config: IdOcrConfig;
|
|
171
|
+
error?: string;
|
|
172
|
+
formData: UpdateOcrDataParams;
|
|
173
|
+
editedFields: UpdateOcrDataParams;
|
|
174
|
+
activeOcrDocument: IdOcrOcrDocument;
|
|
175
|
+
validationErrors?: Partial<Record<keyof UpdateOcrDataParams, string>>;
|
|
176
|
+
};
|
|
177
|
+
type IdOcrInput = {
|
|
178
|
+
config: IdOcrConfig;
|
|
179
|
+
};
|
|
180
|
+
declare const idOcrStateMachine: xstate365.StateMachine<IdOcrContext, {
|
|
181
|
+
type: "LOAD";
|
|
182
|
+
} | {
|
|
183
|
+
type: "DATA_CHANGED";
|
|
184
|
+
field: keyof UpdateOcrDataParams;
|
|
185
|
+
value: string;
|
|
186
|
+
} | {
|
|
187
|
+
type: "VALIDATE_FIELD";
|
|
188
|
+
field: keyof UpdateOcrDataParams;
|
|
189
|
+
} | {
|
|
190
|
+
type: "CONTINUE";
|
|
191
|
+
} | {
|
|
192
|
+
type: "RETRY";
|
|
193
|
+
}, {
|
|
194
|
+
[x: string]: xstate365.ActorRefFromLogic<xstate365.PromiseActorLogic<OcrData, {
|
|
195
|
+
isSecondId: boolean;
|
|
196
|
+
}, xstate365.EventObject>> | xstate365.ActorRefFromLogic<xstate365.PromiseActorLogic<UpdateOcrResponse, {
|
|
197
|
+
params: UpdateOcrDataParams;
|
|
198
|
+
isSecondId: boolean;
|
|
199
|
+
}, xstate365.EventObject>> | undefined;
|
|
200
|
+
}, xstate365.Values<{
|
|
201
|
+
getOcrData: {
|
|
202
|
+
src: "getOcrData";
|
|
203
|
+
logic: xstate365.PromiseActorLogic<OcrData, {
|
|
204
|
+
isSecondId: boolean;
|
|
205
|
+
}, xstate365.EventObject>;
|
|
206
|
+
id: string | undefined;
|
|
207
|
+
};
|
|
208
|
+
updateOcrData: {
|
|
209
|
+
src: "updateOcrData";
|
|
210
|
+
logic: xstate365.PromiseActorLogic<UpdateOcrResponse, {
|
|
211
|
+
params: UpdateOcrDataParams;
|
|
212
|
+
isSecondId: boolean;
|
|
213
|
+
}, xstate365.EventObject>;
|
|
214
|
+
id: string | undefined;
|
|
215
|
+
};
|
|
216
|
+
}>, xstate365.Values<{
|
|
217
|
+
setError: {
|
|
218
|
+
type: "setError";
|
|
219
|
+
params: xstate365.NonReducibleUnknown;
|
|
220
|
+
};
|
|
221
|
+
setInitialData: {
|
|
222
|
+
type: "setInitialData";
|
|
223
|
+
params: xstate365.NonReducibleUnknown;
|
|
224
|
+
};
|
|
225
|
+
updateField: {
|
|
226
|
+
type: "updateField";
|
|
227
|
+
params: xstate365.NonReducibleUnknown;
|
|
228
|
+
};
|
|
229
|
+
clearFieldValidationError: {
|
|
230
|
+
type: "clearFieldValidationError";
|
|
231
|
+
params: xstate365.NonReducibleUnknown;
|
|
232
|
+
};
|
|
233
|
+
setOcrValidationErrors: {
|
|
234
|
+
type: "setOcrValidationErrors";
|
|
235
|
+
params: xstate365.NonReducibleUnknown;
|
|
236
|
+
};
|
|
237
|
+
validateFormField: {
|
|
238
|
+
type: "validateFormField";
|
|
239
|
+
params: xstate365.NonReducibleUnknown;
|
|
240
|
+
};
|
|
241
|
+
beginSecondIdOcrPhase: {
|
|
242
|
+
type: "beginSecondIdOcrPhase";
|
|
243
|
+
params: xstate365.NonReducibleUnknown;
|
|
244
|
+
};
|
|
245
|
+
resetForRetry: {
|
|
246
|
+
type: "resetForRetry";
|
|
247
|
+
params: xstate365.NonReducibleUnknown;
|
|
248
|
+
};
|
|
249
|
+
computeValidationResult: {
|
|
250
|
+
type: "computeValidationResult";
|
|
251
|
+
params: xstate365.NonReducibleUnknown;
|
|
252
|
+
};
|
|
253
|
+
}>, xstate365.Values<{
|
|
254
|
+
isOcrEditable: {
|
|
255
|
+
type: "isOcrEditable";
|
|
256
|
+
params: unknown;
|
|
257
|
+
};
|
|
258
|
+
shouldLoadSecondOcrAfterFirst: {
|
|
259
|
+
type: "shouldLoadSecondOcrAfterFirst";
|
|
260
|
+
params: unknown;
|
|
261
|
+
};
|
|
262
|
+
isOcrFormValid: {
|
|
263
|
+
type: "isOcrFormValid";
|
|
264
|
+
params: unknown;
|
|
265
|
+
};
|
|
266
|
+
shouldSubmit: {
|
|
267
|
+
type: "shouldSubmit";
|
|
268
|
+
params: unknown;
|
|
269
|
+
};
|
|
270
|
+
shouldProceedWithoutSubmitToSecondId: {
|
|
271
|
+
type: "shouldProceedWithoutSubmitToSecondId";
|
|
272
|
+
params: unknown;
|
|
273
|
+
};
|
|
274
|
+
}>, never, "error" | "idle" | "success" | "finished" | "loading" | "submitting" | "inputting" | "readonly" | "validatingContinue", string, IdOcrInput, xstate365.NonReducibleUnknown, xstate365.EventObject, xstate365.MetaObject, {
|
|
275
|
+
readonly id: "idOcr";
|
|
276
|
+
readonly initial: "idle";
|
|
277
|
+
readonly context: ({
|
|
278
|
+
input
|
|
279
|
+
}: {
|
|
280
|
+
spawn: {
|
|
281
|
+
<TSrc extends "getOcrData" | "updateOcrData">(logic: TSrc, ...[options]: ({
|
|
282
|
+
src: "getOcrData";
|
|
283
|
+
logic: xstate365.PromiseActorLogic<OcrData, {
|
|
284
|
+
isSecondId: boolean;
|
|
285
|
+
}, xstate365.EventObject>;
|
|
286
|
+
id: string | undefined;
|
|
287
|
+
} extends infer T ? T extends {
|
|
288
|
+
src: "getOcrData";
|
|
289
|
+
logic: xstate365.PromiseActorLogic<OcrData, {
|
|
290
|
+
isSecondId: boolean;
|
|
291
|
+
}, xstate365.EventObject>;
|
|
292
|
+
id: string | undefined;
|
|
293
|
+
} ? T extends {
|
|
294
|
+
src: TSrc;
|
|
295
|
+
} ? xstate365.ConditionalRequired<[options?: ({
|
|
296
|
+
id?: T["id"] | undefined;
|
|
297
|
+
systemId?: string;
|
|
298
|
+
input?: xstate365.InputFrom<T["logic"]> | undefined;
|
|
299
|
+
syncSnapshot?: boolean;
|
|
300
|
+
} & { [K in xstate365.RequiredActorOptions<T>]: unknown }) | undefined], xstate365.IsNotNever<xstate365.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
301
|
+
src: "updateOcrData";
|
|
302
|
+
logic: xstate365.PromiseActorLogic<UpdateOcrResponse, {
|
|
303
|
+
params: UpdateOcrDataParams;
|
|
304
|
+
isSecondId: boolean;
|
|
305
|
+
}, xstate365.EventObject>;
|
|
306
|
+
id: string | undefined;
|
|
307
|
+
} extends infer T_1 ? T_1 extends {
|
|
308
|
+
src: "updateOcrData";
|
|
309
|
+
logic: xstate365.PromiseActorLogic<UpdateOcrResponse, {
|
|
310
|
+
params: UpdateOcrDataParams;
|
|
311
|
+
isSecondId: boolean;
|
|
312
|
+
}, xstate365.EventObject>;
|
|
313
|
+
id: string | undefined;
|
|
314
|
+
} ? T_1 extends {
|
|
315
|
+
src: TSrc;
|
|
316
|
+
} ? xstate365.ConditionalRequired<[options?: ({
|
|
317
|
+
id?: T_1["id"] | undefined;
|
|
318
|
+
systemId?: string;
|
|
319
|
+
input?: xstate365.InputFrom<T_1["logic"]> | undefined;
|
|
320
|
+
syncSnapshot?: boolean;
|
|
321
|
+
} & { [K_1 in xstate365.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate365.IsNotNever<xstate365.RequiredActorOptions<T_1>>> : never : never : never)): xstate365.ActorRefFromLogic<xstate365.GetConcreteByKey<xstate365.Values<{
|
|
322
|
+
getOcrData: {
|
|
323
|
+
src: "getOcrData";
|
|
324
|
+
logic: xstate365.PromiseActorLogic<OcrData, {
|
|
325
|
+
isSecondId: boolean;
|
|
326
|
+
}, xstate365.EventObject>;
|
|
327
|
+
id: string | undefined;
|
|
328
|
+
};
|
|
329
|
+
updateOcrData: {
|
|
330
|
+
src: "updateOcrData";
|
|
331
|
+
logic: xstate365.PromiseActorLogic<UpdateOcrResponse, {
|
|
332
|
+
params: UpdateOcrDataParams;
|
|
333
|
+
isSecondId: boolean;
|
|
334
|
+
}, xstate365.EventObject>;
|
|
335
|
+
id: string | undefined;
|
|
336
|
+
};
|
|
337
|
+
}>, "src", TSrc>["logic"]>;
|
|
338
|
+
<TLogic extends xstate365.AnyActorLogic>(src: TLogic, ...[options]: xstate365.ConditionalRequired<[options?: ({
|
|
339
|
+
id?: never;
|
|
340
|
+
systemId?: string;
|
|
341
|
+
input?: xstate365.InputFrom<TLogic> | undefined;
|
|
342
|
+
syncSnapshot?: boolean;
|
|
343
|
+
} & { [K in xstate365.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate365.IsNotNever<xstate365.RequiredLogicInput<TLogic>>>): xstate365.ActorRefFromLogic<TLogic>;
|
|
344
|
+
};
|
|
345
|
+
input: IdOcrInput;
|
|
346
|
+
self: xstate365.ActorRef<xstate365.MachineSnapshot<IdOcrContext, {
|
|
347
|
+
type: "LOAD";
|
|
348
|
+
} | {
|
|
349
|
+
type: "DATA_CHANGED";
|
|
350
|
+
field: keyof UpdateOcrDataParams;
|
|
351
|
+
value: string;
|
|
352
|
+
} | {
|
|
353
|
+
type: "VALIDATE_FIELD";
|
|
354
|
+
field: keyof UpdateOcrDataParams;
|
|
355
|
+
} | {
|
|
356
|
+
type: "CONTINUE";
|
|
357
|
+
} | {
|
|
358
|
+
type: "RETRY";
|
|
359
|
+
}, Record<string, xstate365.AnyActorRef | undefined>, xstate365.StateValue, string, unknown, any, any>, {
|
|
360
|
+
type: "LOAD";
|
|
361
|
+
} | {
|
|
362
|
+
type: "DATA_CHANGED";
|
|
363
|
+
field: keyof UpdateOcrDataParams;
|
|
364
|
+
value: string;
|
|
365
|
+
} | {
|
|
366
|
+
type: "VALIDATE_FIELD";
|
|
367
|
+
field: keyof UpdateOcrDataParams;
|
|
368
|
+
} | {
|
|
369
|
+
type: "CONTINUE";
|
|
370
|
+
} | {
|
|
371
|
+
type: "RETRY";
|
|
372
|
+
}, xstate365.AnyEventObject>;
|
|
373
|
+
}) => {
|
|
374
|
+
config: IdOcrConfig;
|
|
375
|
+
formData: UpdateOcrDataParams;
|
|
376
|
+
editedFields: {};
|
|
377
|
+
activeOcrDocument: IdOcrOcrDocument;
|
|
378
|
+
};
|
|
379
|
+
readonly states: {
|
|
380
|
+
readonly idle: {
|
|
381
|
+
readonly on: {
|
|
382
|
+
readonly LOAD: readonly [{
|
|
383
|
+
readonly target: "loading";
|
|
384
|
+
}];
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
readonly loading: {
|
|
388
|
+
readonly invoke: {
|
|
389
|
+
readonly src: "getOcrData";
|
|
390
|
+
readonly input: ({
|
|
391
|
+
context
|
|
392
|
+
}: {
|
|
393
|
+
context: IdOcrContext;
|
|
394
|
+
event: {
|
|
395
|
+
type: "LOAD";
|
|
396
|
+
} | {
|
|
397
|
+
type: "DATA_CHANGED";
|
|
398
|
+
field: keyof UpdateOcrDataParams;
|
|
399
|
+
value: string;
|
|
400
|
+
} | {
|
|
401
|
+
type: "VALIDATE_FIELD";
|
|
402
|
+
field: keyof UpdateOcrDataParams;
|
|
403
|
+
} | {
|
|
404
|
+
type: "CONTINUE";
|
|
405
|
+
} | {
|
|
406
|
+
type: "RETRY";
|
|
407
|
+
};
|
|
408
|
+
self: xstate365.ActorRef<xstate365.MachineSnapshot<IdOcrContext, {
|
|
409
|
+
type: "LOAD";
|
|
410
|
+
} | {
|
|
411
|
+
type: "DATA_CHANGED";
|
|
412
|
+
field: keyof UpdateOcrDataParams;
|
|
413
|
+
value: string;
|
|
414
|
+
} | {
|
|
415
|
+
type: "VALIDATE_FIELD";
|
|
416
|
+
field: keyof UpdateOcrDataParams;
|
|
417
|
+
} | {
|
|
418
|
+
type: "CONTINUE";
|
|
419
|
+
} | {
|
|
420
|
+
type: "RETRY";
|
|
421
|
+
}, Record<string, xstate365.AnyActorRef>, xstate365.StateValue, string, unknown, any, any>, {
|
|
422
|
+
type: "LOAD";
|
|
423
|
+
} | {
|
|
424
|
+
type: "DATA_CHANGED";
|
|
425
|
+
field: keyof UpdateOcrDataParams;
|
|
426
|
+
value: string;
|
|
427
|
+
} | {
|
|
428
|
+
type: "VALIDATE_FIELD";
|
|
429
|
+
field: keyof UpdateOcrDataParams;
|
|
430
|
+
} | {
|
|
431
|
+
type: "CONTINUE";
|
|
432
|
+
} | {
|
|
433
|
+
type: "RETRY";
|
|
434
|
+
}, xstate365.AnyEventObject>;
|
|
435
|
+
}) => {
|
|
436
|
+
isSecondId: boolean;
|
|
437
|
+
};
|
|
438
|
+
readonly onDone: readonly [{
|
|
439
|
+
readonly target: "inputting";
|
|
440
|
+
readonly guard: "isOcrEditable";
|
|
441
|
+
readonly actions: "setInitialData";
|
|
442
|
+
}, {
|
|
443
|
+
readonly target: "readonly";
|
|
444
|
+
readonly actions: "setInitialData";
|
|
445
|
+
}];
|
|
446
|
+
readonly onError: {
|
|
447
|
+
readonly target: "error";
|
|
448
|
+
readonly actions: "setError";
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
};
|
|
452
|
+
readonly readonly: {
|
|
453
|
+
readonly on: {
|
|
454
|
+
readonly CONTINUE: readonly [{
|
|
455
|
+
readonly target: "loading";
|
|
456
|
+
readonly guard: "shouldLoadSecondOcrAfterFirst";
|
|
457
|
+
readonly actions: "beginSecondIdOcrPhase";
|
|
458
|
+
}, {
|
|
459
|
+
readonly target: "success";
|
|
460
|
+
}];
|
|
461
|
+
};
|
|
462
|
+
};
|
|
463
|
+
readonly inputting: {
|
|
464
|
+
readonly on: {
|
|
465
|
+
readonly DATA_CHANGED: {
|
|
466
|
+
readonly actions: readonly ["updateField", "clearFieldValidationError"];
|
|
467
|
+
};
|
|
468
|
+
readonly VALIDATE_FIELD: {
|
|
469
|
+
readonly actions: "validateFormField";
|
|
470
|
+
};
|
|
471
|
+
readonly CONTINUE: {
|
|
472
|
+
readonly target: "validatingContinue";
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
};
|
|
476
|
+
readonly validatingContinue: {
|
|
477
|
+
readonly entry: "computeValidationResult";
|
|
478
|
+
readonly always: readonly [{
|
|
479
|
+
readonly guard: "shouldSubmit";
|
|
480
|
+
readonly target: "submitting";
|
|
481
|
+
}, {
|
|
482
|
+
readonly guard: "shouldProceedWithoutSubmitToSecondId";
|
|
483
|
+
readonly target: "loading";
|
|
484
|
+
readonly actions: "beginSecondIdOcrPhase";
|
|
485
|
+
}, {
|
|
486
|
+
readonly guard: "isOcrFormValid";
|
|
487
|
+
readonly target: "success";
|
|
488
|
+
}, {
|
|
489
|
+
readonly target: "inputting";
|
|
490
|
+
}];
|
|
491
|
+
};
|
|
492
|
+
readonly submitting: {
|
|
493
|
+
readonly invoke: {
|
|
494
|
+
readonly src: "updateOcrData";
|
|
495
|
+
readonly input: ({
|
|
496
|
+
context
|
|
497
|
+
}: {
|
|
498
|
+
context: IdOcrContext;
|
|
499
|
+
event: {
|
|
500
|
+
type: "LOAD";
|
|
501
|
+
} | {
|
|
502
|
+
type: "DATA_CHANGED";
|
|
503
|
+
field: keyof UpdateOcrDataParams;
|
|
504
|
+
value: string;
|
|
505
|
+
} | {
|
|
506
|
+
type: "VALIDATE_FIELD";
|
|
507
|
+
field: keyof UpdateOcrDataParams;
|
|
508
|
+
} | {
|
|
509
|
+
type: "CONTINUE";
|
|
510
|
+
} | {
|
|
511
|
+
type: "RETRY";
|
|
512
|
+
};
|
|
513
|
+
self: xstate365.ActorRef<xstate365.MachineSnapshot<IdOcrContext, {
|
|
514
|
+
type: "LOAD";
|
|
515
|
+
} | {
|
|
516
|
+
type: "DATA_CHANGED";
|
|
517
|
+
field: keyof UpdateOcrDataParams;
|
|
518
|
+
value: string;
|
|
519
|
+
} | {
|
|
520
|
+
type: "VALIDATE_FIELD";
|
|
521
|
+
field: keyof UpdateOcrDataParams;
|
|
522
|
+
} | {
|
|
523
|
+
type: "CONTINUE";
|
|
524
|
+
} | {
|
|
525
|
+
type: "RETRY";
|
|
526
|
+
}, Record<string, xstate365.AnyActorRef>, xstate365.StateValue, string, unknown, any, any>, {
|
|
527
|
+
type: "LOAD";
|
|
528
|
+
} | {
|
|
529
|
+
type: "DATA_CHANGED";
|
|
530
|
+
field: keyof UpdateOcrDataParams;
|
|
531
|
+
value: string;
|
|
532
|
+
} | {
|
|
533
|
+
type: "VALIDATE_FIELD";
|
|
534
|
+
field: keyof UpdateOcrDataParams;
|
|
535
|
+
} | {
|
|
536
|
+
type: "CONTINUE";
|
|
537
|
+
} | {
|
|
538
|
+
type: "RETRY";
|
|
539
|
+
}, xstate365.AnyEventObject>;
|
|
540
|
+
}) => {
|
|
541
|
+
params: UpdateOcrDataParams;
|
|
542
|
+
isSecondId: boolean;
|
|
543
|
+
};
|
|
544
|
+
readonly onDone: readonly [{
|
|
545
|
+
readonly target: "loading";
|
|
546
|
+
readonly guard: "shouldLoadSecondOcrAfterFirst";
|
|
547
|
+
readonly actions: "beginSecondIdOcrPhase";
|
|
548
|
+
}, {
|
|
549
|
+
readonly target: "success";
|
|
550
|
+
}];
|
|
551
|
+
readonly onError: {
|
|
552
|
+
readonly target: "error";
|
|
553
|
+
readonly actions: "setError";
|
|
554
|
+
};
|
|
555
|
+
};
|
|
556
|
+
};
|
|
557
|
+
readonly error: {
|
|
558
|
+
readonly on: {
|
|
559
|
+
readonly RETRY: {
|
|
560
|
+
readonly target: "loading";
|
|
561
|
+
readonly actions: "resetForRetry";
|
|
562
|
+
};
|
|
563
|
+
};
|
|
564
|
+
};
|
|
565
|
+
readonly success: {
|
|
566
|
+
readonly after: {
|
|
567
|
+
readonly 3000: "finished";
|
|
568
|
+
};
|
|
569
|
+
};
|
|
570
|
+
readonly finished: {
|
|
571
|
+
readonly type: "final";
|
|
572
|
+
};
|
|
573
|
+
};
|
|
574
|
+
}>;
|
|
575
|
+
type IdOcrMachine = typeof idOcrStateMachine;
|
|
576
|
+
//#endregion
|
|
577
|
+
//#region src/modules/id-ocr/idOcrActor.d.ts
|
|
578
|
+
type IdOcrActor = ActorRefFrom<IdOcrMachine>;
|
|
579
|
+
type CreateIdOcrActorOptions = {
|
|
580
|
+
config: IdOcrConfig;
|
|
581
|
+
};
|
|
582
|
+
//#endregion
|
|
583
|
+
//#region src/modules/id-ocr/idOcrManager.d.ts
|
|
584
|
+
type IdOcrIdleState = {
|
|
585
|
+
status: 'idle';
|
|
586
|
+
};
|
|
587
|
+
type IdOcrLoadingState = {
|
|
588
|
+
status: 'loading';
|
|
589
|
+
ocrDocument: IdOcrOcrDocument;
|
|
590
|
+
};
|
|
591
|
+
type IdOcrReadonlyState = {
|
|
592
|
+
status: 'readonly';
|
|
593
|
+
formData: UpdateOcrDataParams;
|
|
594
|
+
editableOcr: boolean;
|
|
595
|
+
ocrDocument: IdOcrOcrDocument;
|
|
596
|
+
};
|
|
597
|
+
type IdOcrInputtingState = {
|
|
598
|
+
status: 'inputting';
|
|
599
|
+
formData: UpdateOcrDataParams;
|
|
600
|
+
editedFields: UpdateOcrDataParams;
|
|
601
|
+
editableOcr: boolean;
|
|
602
|
+
ocrDocument: IdOcrOcrDocument;
|
|
603
|
+
validationErrors?: Partial<Record<keyof UpdateOcrDataParams, string>>;
|
|
604
|
+
};
|
|
605
|
+
type IdOcrSubmittingState = {
|
|
606
|
+
status: 'submitting';
|
|
607
|
+
ocrDocument: IdOcrOcrDocument;
|
|
608
|
+
};
|
|
609
|
+
type IdOcrFinishedState = {
|
|
610
|
+
status: 'finished';
|
|
611
|
+
};
|
|
612
|
+
type IdOcrErrorState = {
|
|
613
|
+
status: 'error';
|
|
614
|
+
error: string;
|
|
615
|
+
};
|
|
616
|
+
type IdOcrSuccessState = {
|
|
617
|
+
status: 'success';
|
|
618
|
+
};
|
|
619
|
+
type IdOcrState = IdOcrIdleState | IdOcrLoadingState | IdOcrReadonlyState | IdOcrInputtingState | IdOcrSubmittingState | IdOcrFinishedState | IdOcrErrorState | IdOcrSuccessState;
|
|
620
|
+
declare function createIdOcrManager(options: CreateIdOcrActorOptions): Manager<IdOcrState> & {
|
|
621
|
+
load(): void;
|
|
622
|
+
setField(field: keyof UpdateOcrDataParams, value: string): void;
|
|
623
|
+
validateField(field: keyof UpdateOcrDataParams): void;
|
|
624
|
+
continue(): void;
|
|
625
|
+
retry(): void;
|
|
626
|
+
};
|
|
627
|
+
/**
|
|
628
|
+
* Creates an ID-OCR manager from a pre-built actor.
|
|
629
|
+
* Use this when overriding the machine via `.provide()` for custom backends
|
|
630
|
+
* or for story-isolation testing.
|
|
631
|
+
*/
|
|
632
|
+
declare function createIdOcrManagerFromActor(actor: IdOcrActor): Manager<IdOcrState> & {
|
|
633
|
+
load(): void;
|
|
634
|
+
setField(field: keyof UpdateOcrDataParams, value: string): void;
|
|
635
|
+
validateField(field: keyof UpdateOcrDataParams): void;
|
|
636
|
+
continue(): void;
|
|
637
|
+
retry(): void;
|
|
638
|
+
};
|
|
639
|
+
type IdOcrManager = ReturnType<typeof createIdOcrManager>;
|
|
640
|
+
//#endregion
|
|
641
|
+
export { IdOcrActor as a, IdOcrConfig as c, UpdateOcrDataParams as d, ValidationRule as f, createIdOcrManagerFromActor as i, OcrData as l, IdOcrState as n, IdOcrOcrDocument as o, createIdOcrManager as r, idOcrStateMachine as s, IdOcrManager as t, OcrFieldConfig as u };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as api } from "./api-
|
|
2
|
-
import {
|
|
3
|
-
import { t as endpoints } from "./endpoints-
|
|
4
|
-
import { a as fromPromise, r as assign, t as setup } from "./xstate.esm-
|
|
5
|
-
import { t as validateCPF } from "./cpf-
|
|
1
|
+
import { t as api } from "./api-DsbUi7TO.esm.js";
|
|
2
|
+
import { _ as getTimestamp } from "./events-CqGY1yMq.esm.js";
|
|
3
|
+
import { t as endpoints } from "./endpoints-BzMJFAPV.esm.js";
|
|
4
|
+
import { a as fromPromise, r as assign, t as setup } from "./xstate.esm-Bomq1a0z.esm.js";
|
|
5
|
+
import { t as validateCPF } from "./cpf-BKaho0j_.esm.js";
|
|
6
6
|
|
|
7
7
|
//#region ../infra/src/providers/browser/DateFormattingProvider.ts
|
|
8
8
|
var DateFormattingProvider = class {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as api } from "./api-
|
|
2
|
-
import { t as endpoints } from "./endpoints-
|
|
3
|
-
import { a as fromPromise, t as setup } from "./xstate.esm-
|
|
1
|
+
import { t as api } from "./api-DsbUi7TO.esm.js";
|
|
2
|
+
import { t as endpoints } from "./endpoints-BzMJFAPV.esm.js";
|
|
3
|
+
import { a as fromPromise, t as setup } from "./xstate.esm-Bomq1a0z.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/id-verification/idVerificationServices.ts
|
|
6
6
|
/**
|
package/dist/identity-reuse.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import
|
|
1
|
+
import "./StateMachine-C_AY4cs7.js";
|
|
2
|
+
import "./Manager-CJ3G2zqi.js";
|
|
3
|
+
import "./Actor-CGEelYtQ.js";
|
|
4
|
+
import { c as identityReuseMachine, d as ReusableDocument, f as SubmitResponse, i as createIdentityReuseManagerFromActor, l as FetchDocumentsResponse, n as IdentityReuseState, o as SCAN_NEW_DOCUMENT, r as createIdentityReuseManager, s as SelectedDocumentId, t as IdentityReuseManager, u as IdentityReuseConfig } from "./identityReuseManager-TWKbXuvY.js";
|
|
4
5
|
export { type FetchDocumentsResponse, type IdentityReuseConfig, type IdentityReuseManager, type IdentityReuseState, type ReusableDocument, SCAN_NEW_DOCUMENT, type SelectedDocumentId, type SubmitResponse, createIdentityReuseManager, createIdentityReuseManagerFromActor, identityReuseMachine };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import "./api-
|
|
2
|
-
import "./events-
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import
|
|
6
|
-
import { n as
|
|
1
|
+
import "./api-DsbUi7TO.esm.js";
|
|
2
|
+
import "./events-CqGY1yMq.esm.js";
|
|
3
|
+
import "./types-ElOJAGaM.esm.js";
|
|
4
|
+
import "./endpoints-BzMJFAPV.esm.js";
|
|
5
|
+
import "./xstate.esm-Bomq1a0z.esm.js";
|
|
6
|
+
import { n as identityReuseMachine, t as SCAN_NEW_DOCUMENT } from "./identityReuseStateMachine-BmONeF6B.esm.js";
|
|
7
|
+
import { n as createIdentityReuseManagerFromActor, t as createIdentityReuseManager } from "./identityReuseManager-Bu62LToE.esm.js";
|
|
7
8
|
|
|
8
9
|
export { SCAN_NEW_DOCUMENT, createIdentityReuseManager, createIdentityReuseManagerFromActor, identityReuseMachine };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { n as createManagerInstrumentation } from "./events-CqGY1yMq.esm.js";
|
|
2
|
+
import { n as eventModuleNames } from "./types-ElOJAGaM.esm.js";
|
|
3
|
+
import { l as createManager, s as createActor } from "./xstate.esm-Bomq1a0z.esm.js";
|
|
4
|
+
import { n as identityReuseMachine } from "./identityReuseStateMachine-BmONeF6B.esm.js";
|
|
4
5
|
|
|
5
6
|
//#region src/modules/identity-reuse/identityReuseActor.ts
|
|
6
7
|
/**
|