@incodetech/core 2.3.2-rc.4 → 2.4.0-rc.0
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/THIRD_PARTY_NOTICES.txt +1243 -3
- package/dist/Actor-DpTj5PFb.d.ts +1 -0
- package/dist/{BaseWasmProvider-Dyi6dKp1.d.ts → BaseWasmProvider-BL9wIRnN.d.ts} +2 -2
- package/dist/{FaceDetectionProvider-B5Fxc_y9.esm.js → FaceDetectionProvider-BjTer9h3.esm.js} +126 -10
- package/dist/HttpRequestError-Bh0pNGSC.esm.js +35 -0
- package/dist/{IIdCaptureCapability-RNiFhvXR.d.ts → IIdCaptureCapability-DBsv9-7M.d.ts} +2 -2
- package/dist/{IWasmUtilCapability-CNWRl7jr.d.ts → IWasmUtilCapability-CPX0RGdQ.d.ts} +28 -5
- package/dist/{Manager-CQQ99QOI.d.ts → Manager-C9T5amUN.d.ts} +7 -1
- package/dist/{MotionSensorProvider-DyhbM4Si.esm.js → MotionSensorProvider-DYxh8TjR.esm.js} +1 -1
- package/dist/{ekycStateMachine-UeJRO8_p.esm.js → PhoneValidationProvider-SZiOS0jB.esm.js} +232 -827
- package/dist/{StreamCanvasCapture-_8gdW5Lk.d.ts → StreamCanvasCapture-DVmzJux5.d.ts} +2 -2
- package/dist/{safeStorage-BdU9_m2E.esm.js → WasmUtilProvider-CIdnE7Fx.esm.js} +95 -46
- package/dist/{addressSearch-DyHGgeX8.esm.js → addressSearch-BiYZjvp3.esm.js} +143 -4
- package/dist/{advanceableErrors-CpF2cBy6.esm.js → advanceableErrors-q_pfU3Cn.esm.js} +5 -4
- package/dist/ae-signature.d.ts +2 -2
- package/dist/ae-signature.esm.js +1 -1
- package/dist/antifraud.d.ts +1 -1
- package/dist/antifraud.esm.js +2 -2
- package/dist/{antifraudManager-BY36bS12.d.ts → antifraudManager-DbGCvlJs.d.ts} +2 -2
- package/dist/{antifraudManager-DNkw66oW.esm.js → antifraudManager-HL08jeDX.esm.js} +3 -3
- package/dist/{antifraudStateMachine-DBeq47D2.esm.js → antifraudStateMachine-DoJVzblM.esm.js} +3 -3
- package/dist/{apiError--p429c2X.esm.js → apiError-DcSWedC6.esm.js} +2 -1
- package/dist/authentication.d.ts +3 -3
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-CboRCl_N.d.ts → authenticationManager-CANv5-W5.d.ts} +2 -8
- package/dist/{authenticationManager-CWmZMFJH.esm.js → authenticationManager-SaiAxqvS.esm.js} +6 -6
- package/dist/{authenticationStateMachine-BQ7ZW-8a.esm.js → authenticationStateMachine-CHSxmV7z.esm.js} +5 -6
- package/dist/avatar.d.ts +1 -1
- package/dist/{backCameraStream-B0-YgP_y.esm.js → backCameraStream-CMvXj4X4.esm.js} +1 -1
- package/dist/camera.esm.js +1 -1
- package/dist/certificate-issuance.d.ts +1 -1
- package/dist/certificate-issuance.esm.js +2 -2
- package/dist/{certificateIssuanceManager-C3-CI0_s.esm.js → certificateIssuanceManager-CMg4SgL4.esm.js} +3 -3
- package/dist/{certificateIssuanceManager-DCgEidHz.d.ts → certificateIssuanceManager-Dr8A4Lgr.d.ts} +2 -3
- package/dist/{certificateIssuanceStateMachine-CxqS_nD-.esm.js → certificateIssuanceStateMachine-Cs64QmYH.esm.js} +4 -4
- package/dist/consent.d.ts +1 -1
- package/dist/consent.esm.js +2 -2
- package/dist/{consentManager-B6E1XJDw.esm.js → consentManager-CjrxY737.esm.js} +3 -3
- package/dist/{consentManager-uhDPdU6i.d.ts → consentManager-DgzWQpAR.d.ts} +11 -12
- package/dist/{consentStateMachine-DTSfdGiW.esm.js → consentStateMachine-BCj5Jb3g.esm.js} +3 -3
- package/dist/{createCameraCycleOwnership-DnwTl1ad.esm.js → createCameraCycleOwnership-kdlhkmmY.esm.js} +71 -65
- package/dist/{createFaceAvatar-BlcTYgJv.d.ts → createFaceAvatar-DXgmQmQy.d.ts} +1 -1
- package/dist/cross-document-data-match.d.ts +1 -1
- package/dist/cross-document-data-match.esm.js +1 -1
- package/dist/{crossDocumentDataMatchManager-9XhFVZ5S.esm.js → crossDocumentDataMatchManager-BHnGRsto.esm.js} +4 -4
- package/dist/{crossDocumentDataMatchManager-Dq8Z3SOg.d.ts → crossDocumentDataMatchManager-yCWCOzcU.d.ts} +2 -2
- package/dist/curp-validation.d.ts +1 -1
- package/dist/curp-validation.esm.js +2 -2
- package/dist/{curpValidationManager-DNuZn9fn.d.ts → curpValidationManager-B-1EZbP_.d.ts} +3 -3
- package/dist/{curpValidationManager-DbIMYFcJ.esm.js → curpValidationManager-DBNIn8BF.esm.js} +15 -22
- package/dist/{curpValidationStateMachine-g5kMfuLj.esm.js → curpValidationStateMachine-DAxImy8p.esm.js} +4 -4
- package/dist/custom-fields.d.ts +1 -1
- package/dist/custom-fields.esm.js +1 -1
- package/dist/custom-watchlist.d.ts +1 -1
- package/dist/custom-watchlist.esm.js +2 -2
- package/dist/{customFieldsManager-CzWZTkW-.esm.js → customFieldsManager-BV6UyLFV.esm.js} +4 -4
- package/dist/{customFieldsManager-8-W2KY4n.d.ts → customFieldsManager-CF-cO8ap.d.ts} +2 -2
- package/dist/{customWatchlistManager-DWTED5Ur.esm.js → customWatchlistManager-DML0UPzf.esm.js} +3 -3
- package/dist/{customWatchlistManager-PBWHr_oM.d.ts → customWatchlistManager-DolUswyR.d.ts} +2 -2
- package/dist/{customWatchlistStateMachine-DOQou6TW.esm.js → customWatchlistStateMachine-D9gI5uu7.esm.js} +3 -3
- package/dist/deepsightLoader-DvfAYnzg.esm.js +55 -0
- package/dist/{deepsightLoader-BtYvACzG.esm.js → deepsightService-DLGO9yv1.esm.js} +51 -56
- package/dist/device.esm.js +1 -1
- package/dist/document-capture.d.ts +2 -2
- package/dist/document-capture.esm.js +2 -2
- package/dist/{documentCaptureManager-BRPxqYD2.esm.js → documentCaptureManager-C9XUnYU6.esm.js} +17 -18
- package/dist/{documentCaptureManager-lEtCM320.d.ts → documentCaptureManager-DkyDtm3Y.d.ts} +11 -34
- package/dist/{documentCaptureStateMachine-D312sSIu.esm.js → documentCaptureStateMachine-BHDsCfhL.esm.js} +55 -58
- package/dist/dynamic-forms.d.ts +2 -2
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-66GzzBTx.esm.js → dynamicFormsManager-5uIXobxi.esm.js} +3 -3
- package/dist/{dynamicFormsManager-D5R_uxLQ.d.ts → dynamicFormsManager-C0dHs1ty.d.ts} +3 -3
- package/dist/{dynamicFormsStateMachine-DLnr2ZtX.esm.js → dynamicFormsStateMachine-DQmok084.esm.js} +4 -4
- package/dist/ekyb.d.ts +5 -5
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-BwRuGAwt.d.ts → ekybManager-BaZ_7CEu.d.ts} +4 -4
- package/dist/{ekybManager-CsQMgJDL.esm.js → ekybManager-CazShiQz.esm.js} +23 -27
- package/dist/{ekybStateMachine-DBeQNOMo.esm.js → ekybStateMachine-hstiCNmW.esm.js} +338 -13
- package/dist/ekyc.d.ts +2 -2
- package/dist/ekyc.esm.js +3 -3
- package/dist/{ekycManager-BX2d46FY.esm.js → ekycManager-BdJRUsz0.esm.js} +29 -36
- package/dist/{ekycManager-DLzDuBzI.d.ts → ekycManager-DW-ynodd.d.ts} +3 -3
- package/dist/ekycStateMachine-x6Klot8g.esm.js +1444 -0
- package/dist/{ekycUtils-D6wfSpPN.esm.js → ekycUtils-zY8CdKJL.esm.js} +53 -3
- package/dist/electronic-signature.d.ts +1 -1
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-Boj_xbGN.esm.js → electronicSignatureManager-Bc8spG8p.esm.js} +10 -10
- package/dist/{electronicSignatureManager-Ds-KEVTq.d.ts → electronicSignatureManager-DTSLOvKR.d.ts} +2 -3
- package/dist/email.d.ts +1 -1
- package/dist/email.esm.js +2 -2
- package/dist/{emailManager-bR1N5rV_.esm.js → emailManager-CtlKRRaR.esm.js} +20 -26
- package/dist/{emailManager-CADXW_9X.d.ts → emailManager-Dy6omJVp.d.ts} +2 -2
- package/dist/{emailStateMachine-Bc_6oIYw.esm.js → emailStateMachine-5Neq3rE5.esm.js} +4 -4
- package/dist/{endpoints-B-3Q-LUw.esm.js → endpoints-DHzlkQNe.esm.js} +2 -0
- package/dist/{events-ijlbX_Wx.esm.js → events-CAgFE-k3.esm.js} +19 -7
- package/dist/events.d.ts +3 -2
- package/dist/events.esm.js +1 -1
- package/dist/extensibility.d.ts +38 -38
- package/dist/extensibility.esm.js +36 -36
- package/dist/{externalFetch-BKBThAUC.esm.js → externalFetch-DrR9xshk.esm.js} +3 -2
- package/dist/face-match.d.ts +1 -1
- package/dist/face-match.esm.js +2 -2
- package/dist/{faceCaptureManagerFactory-m-7ae67q.d.ts → faceCaptureManagerFactory-jKQ2QtY-.d.ts} +11 -51
- package/dist/{faceCaptureManagerFactory-BKpeQIZu.esm.js → faceCaptureManagerFactory-uFm1AcaY.esm.js} +19 -54
- package/dist/{faceCaptureSetup-DOrt8-Sn.esm.js → faceCaptureSetup-Cu2wabzo.esm.js} +99 -395
- package/dist/{faceMatchManager-Bmv0HzuY.esm.js → faceMatchManager-9Nj9aPci.esm.js} +3 -3
- package/dist/{faceMatchManager-BnvrZM2F.d.ts → faceMatchManager-DIgG-UFS.d.ts} +1 -2
- package/dist/{faceMatchStateMachine-mRIHQ3dA.esm.js → faceMatchStateMachine-B9ZUnlyU.esm.js} +6 -4
- package/dist/{feature-management-zY6FcYx_.esm.js → feature-management-BTbYruNe.esm.js} +3 -3
- package/dist/feature-management.esm.js +1 -1
- package/dist/field-comparison.d.ts +2 -2
- package/dist/field-comparison.esm.js +1 -1
- package/dist/{fieldComparisonManager-CBvEGxFx.d.ts → fieldComparisonManager-CUX4gza2.d.ts} +6 -3
- package/dist/{fieldComparisonManager-CC-klG0h.esm.js → fieldComparisonManager-Dk38hXZP.esm.js} +35 -17
- package/dist/fiscal-qr.d.ts +1 -1
- package/dist/fiscal-qr.esm.js +1 -1
- package/dist/{fiscalQrManager-B1STmT6z.d.ts → fiscalQrManager-D0Iy7EKR.d.ts} +2 -2
- package/dist/fiscalQrManager-DmBkQfs0.esm.js +6798 -0
- package/dist/flow-events.d.ts +1 -1
- package/dist/flow.d.ts +14 -13
- package/dist/flow.esm.js +14 -14
- package/dist/{flowCompletionService-CBa6YyI5.esm.js → flowCompletionService-xnn_SlJU.esm.js} +2 -2
- package/dist/{flowServices-JW6uRaUt.esm.js → flowServices-DA64AEZC.esm.js} +11 -7
- package/dist/geolocation.d.ts +1 -1
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-DD5J1T_p.esm.js → geolocationManager-CqNLY45e.esm.js} +6 -7
- package/dist/{geolocationManager-Cz744E5S.d.ts → geolocationManager-Dn24g1fl.d.ts} +2 -3
- package/dist/{geolocationStateMachine-DoelwBqs.esm.js → geolocationStateMachine-D-cQi7ar.esm.js} +4 -4
- package/dist/{getDeviceClass-5NYZg9s6.esm.js → getDeviceClass-bsWdEDxP.esm.js} +1 -1
- package/dist/{getParsedUserAgent-B2iFDql1.esm.js → getParsedUserAgent-DhQPeKqw.esm.js} +1 -1
- package/dist/government-validation.d.ts +1 -1
- package/dist/government-validation.esm.js +2 -2
- package/dist/{governmentValidationManager-D02vT4yY.d.ts → governmentValidationManager-B82zOut8.d.ts} +3 -3
- package/dist/{governmentValidationManager-CacFOtKO.esm.js → governmentValidationManager-CP0SiOOe.esm.js} +3 -3
- package/dist/{governmentValidationStateMachine-CoaZOSTP.esm.js → governmentValidationStateMachine-C3YQ8yCZ.esm.js} +3 -3
- package/dist/home.d.ts +3 -26
- package/dist/home.esm.js +2 -2
- package/dist/id-ocr.d.ts +1 -1
- package/dist/id-ocr.esm.js +2 -2
- package/dist/id-selfie-flow.d.ts +6 -9
- package/dist/id-selfie-flow.esm.js +23 -28
- package/dist/id-verification.d.ts +1 -1
- package/dist/id-verification.esm.js +2 -2
- package/dist/id.d.ts +4 -4
- package/dist/id.esm.js +4 -205
- package/dist/{idCaptureDefaults-Chne8cyb.esm.js → idCaptureDefaults-CBg73RnV.esm.js} +8 -5
- package/dist/{idCaptureManager-BHwL2Z0V.d.ts → idCaptureManager-BY97SRCV.d.ts} +242 -98
- package/dist/{idCaptureManager-0504dfcD.esm.js → idCaptureManager-D4V8vXtY.esm.js} +276 -210
- package/dist/{idCaptureServices-B-Ynn67N.esm.js → idCaptureServices-DJ33k3-p.esm.js} +21 -39
- package/dist/{idCaptureStateMachine-B7ET-hfq.esm.js → idCaptureStateMachine-PJt0yzom.esm.js} +989 -872
- package/dist/{idOcrManager-BF_cXZq8.d.ts → idOcrManager-BTdHlJ9D.d.ts} +3 -4
- package/dist/{idOcrManager-ByWuQ4ej.esm.js → idOcrManager-DxoCesYP.esm.js} +3 -3
- package/dist/{idOcrStateMachine-Bt_abXQQ.esm.js → idOcrStateMachine-kPn7DB2I.esm.js} +3 -3
- package/dist/{idVerificationManager-BB4Pj_N6.d.ts → idVerificationManager-BJapZfpy.d.ts} +2 -3
- package/dist/{idVerificationManager-DT42c77H.esm.js → idVerificationManager-CDhRUU5n.esm.js} +3 -3
- package/dist/{idVerificationStateMachine-DbDVIh9t.esm.js → idVerificationStateMachine-0HTVVxse.esm.js} +3 -3
- package/dist/identity-reuse.d.ts +2 -2
- package/dist/identity-reuse.esm.js +2 -2
- package/dist/{identityReuseManager-yG3acUrQ.esm.js → identityReuseManager-BleUi6TK.esm.js} +26 -13
- package/dist/{identityReuseManager-v2TH5g7e.d.ts → identityReuseManager-ooAbp6Kc.d.ts} +162 -44
- package/dist/{identityReuseStateMachine-BhAkuIra.esm.js → identityReuseStateMachine-BrBUpfn5.esm.js} +89 -23
- package/dist/{index-CeaC32qI.d.ts → index-DfEuu-Ew.d.ts} +2 -2
- package/dist/index-DpTj5PFb.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/{invokeOnCaptureCallback-BjzPjJ_p.esm.js → invokeOnCaptureCallback-BW7V3vub.esm.js} +1 -1
- package/dist/lamejs-B6TzhU5q.esm.js +10 -0
- package/dist/mandatory-consent.d.ts +2 -2
- package/dist/mandatory-consent.esm.js +2 -2
- package/dist/{mandatoryConsentManager-7dI0D08q.esm.js → mandatoryConsentManager-CX_Dyht7.esm.js} +3 -3
- package/dist/{mandatoryConsentManager-BYRnWbIC.d.ts → mandatoryConsentManager-TkX57U6f.d.ts} +8 -9
- package/dist/{mandatoryConsentStateMachine-DC5Mo6M1.esm.js → mandatoryConsentStateMachine-CoaSB7P7.esm.js} +3 -3
- package/dist/{multipartRecordingService-mwKFTlhR.esm.js → multipartRecordingService-DbeQpXdU.esm.js} +2 -2
- package/dist/{permissionGuards-D6TfVop2.esm.js → permissionGuards-Bf4LbHjC.esm.js} +1 -1
- package/dist/{permissionServices-EY3_Vx6c.esm.js → permissionServices-d2UW0r_L.esm.js} +34 -3
- package/dist/phone-number.d.ts +24 -0
- package/dist/phone-number.esm.js +1922 -0
- package/dist/phone.d.ts +1 -1
- package/dist/phone.esm.js +2 -2
- package/dist/{phoneManager-IjhSv5XS.esm.js → phoneManager-BGBcpqsk.esm.js} +31 -22
- package/dist/{phoneManager-BBU8Lq0O.d.ts → phoneManager-BO-LTih5.d.ts} +16 -3
- package/dist/{phoneStateMachine-CXdXufKg.esm.js → phoneStateMachine-CEm2y7yG.esm.js} +39 -20
- package/dist/phoneValidation-DnBcNUNh.esm.js +48 -0
- package/dist/qe-signature.d.ts +2 -2
- package/dist/qe-signature.esm.js +1 -1
- package/dist/redirect-to-mobile.d.ts +1 -1
- package/dist/redirect-to-mobile.esm.js +2 -2
- package/dist/{redirectToMobileManager-FLEWJtv8.esm.js → redirectToMobileManager-B1yQHFLu.esm.js} +4 -4
- package/dist/{redirectToMobileManager-BD2PvT5B.d.ts → redirectToMobileManager-CVsvpVbQ.d.ts} +2 -2
- package/dist/{redirectToMobileStateMachine-CSWWgUTO.esm.js → redirectToMobileStateMachine--Sr9NEVT.esm.js} +5 -5
- package/dist/{rolldown-runtime-FDOR9p9I.esm.js → rolldown-runtime-B-1-B7_t.esm.js} +10 -1
- package/dist/{runChildModule-CZU29-IV.esm.js → runChildModule-vdxQMCmO.esm.js} +13 -12
- package/dist/safeStorage-UxDrnjwa.esm.js +35 -0
- package/dist/{sdkVersion-DOhxIxQQ.esm.js → sdkVersion-F5YZbjip.esm.js} +1 -1
- package/dist/selfie.d.ts +4 -4
- package/dist/selfie.esm.js +12 -12
- package/dist/selfieErrorUtils-D-tsgEuX.esm.js +21 -0
- package/dist/{selfieManager-BSZG891S.d.ts → selfieManager-1J0IEyFq.d.ts} +2 -8
- package/dist/{selfieManager-CWhbwRdb.esm.js → selfieManager-26pENXxw.esm.js} +6 -6
- package/dist/selfieStateMachine-BhfKsl3I.esm.js +41 -0
- package/dist/{session-CctUSSCx.esm.js → session-Bu7djCsj.esm.js} +5 -5
- package/dist/session.d.ts +15 -3
- package/dist/session.esm.js +30 -5
- package/dist/sessionInitializer-jxbfCnE-.esm.js +974 -0
- package/dist/{setup-DmB0JHAB.esm.js → setup-C38QkrSP.esm.js} +232 -112
- package/dist/{setup-Cyko6cAn.d.ts → setup-lgkQ8dJW.d.ts} +20 -11
- package/dist/signature.d.ts +1 -1
- package/dist/signature.esm.js +2 -2
- package/dist/{signatureManager-DGBSWz2_.d.ts → signatureManager-BpVt_Jv7.d.ts} +2 -2
- package/dist/{signatureManager-B72np4ZO.esm.js → signatureManager-qqXyH93e.esm.js} +7 -11
- package/dist/{signatureStateMachine-ce_XMA3l.esm.js → signatureStateMachine-BkRSrkKp.esm.js} +3 -3
- package/dist/splitTrackedName-3zJRd2RD.esm.js +19 -0
- package/dist/{src-35ekGRzK.esm.js → src-DJAJjRYQ.esm.js} +1 -1
- package/dist/{stats-CZcy2J53.esm.js → stats-DmG_tkGk.esm.js} +1 -1
- package/dist/stats.esm.js +1 -1
- package/dist/{sessionInitializer-Ce9zO78j.esm.js → thumbmark.esm-CRc0cYvz.esm.js} +33 -776
- package/dist/{trueSightService-oMFESSSb.esm.js → trueSightService-BWgRVGIT.esm.js} +893 -900
- package/dist/trust-graph.d.ts +1 -2
- package/dist/trust-graph.esm.js +2 -2
- package/dist/{types-C0oWGUzg.d.ts → types-0L-eFDmr.d.ts} +1 -1
- package/dist/{types-C1g9itHE.d.ts → types-BGXxRwQM.d.ts} +6 -7
- package/dist/{types-BfgmV7s7.d.ts → types-BQA7lRDV.d.ts} +1 -1
- package/dist/{types-CxGdmzxa.d.ts → types-BvFmYX5c.d.ts} +1 -1
- package/dist/{types-Cx-1zo-i.d.ts → types-BvLo3U4u.d.ts} +1 -1
- package/dist/types-C71Zo6vl.d.ts +6 -0
- package/dist/{types-DEGVXwsk2.d.ts → types-CyPUIpzf.d.ts} +110 -62
- package/dist/{types-Bx-BWveD.d.ts → types-DTYr9pCB.d.ts} +1 -1
- package/dist/{types-BjSly8cp.d.ts → types-DUnFZ08M.d.ts} +1 -1
- package/dist/{types-ESdtnHtg.d.ts → types-zpO4fU6a.d.ts} +3 -4
- package/dist/{urlUtils-D6phjq1-.esm.js → urlUtils-6jsE6rKp.esm.js} +9 -1
- package/dist/video-selfie.d.ts +6 -9
- package/dist/video-selfie.esm.js +1386 -1344
- package/dist/{videoSelfieCameraWarmer-D_4NwYM-.esm.js → videoSelfieCameraWarmer-C366RKqu.esm.js} +11 -11
- package/dist/{videoSelfieFlowModuleMachine-BUe2uACW.esm.js → videoSelfieFlowModuleMachine-BCFVHBQ1.esm.js} +1 -1
- package/dist/{videoSelfieStepDetector-ChYgFM15.d.ts → videoSelfieStepDetector-C5QHOvWb.d.ts} +4 -4
- package/dist/videoTrimByCopy-BFfAiNpv.esm.js +15901 -0
- package/dist/{warmup-Cis2p6O0.d.ts → warmup-BUPPRAA1.d.ts} +7 -0
- package/dist/{warmup-ChDwHSel.esm.js → warmup-DMtbyb2l.esm.js} +27 -9
- package/dist/wasm.d.ts +2 -2
- package/dist/wasm.esm.js +4 -4
- package/dist/{wasmDsFlagSync-DYrLUEII.esm.js → wasmDsFlagSync-BXCGqP48.esm.js} +1 -1
- package/dist/{wasmWebClient-B7baE-Wf.esm.js → wasmWebClient-kbYZ2sxw.esm.js} +259 -20
- package/dist/watchlist-for-business.d.ts +1 -1
- package/dist/watchlist-for-business.esm.js +2 -2
- package/dist/watchlist.d.ts +1 -1
- package/dist/watchlist.esm.js +2 -2
- package/dist/{watchlistForBusinessManager-CsnJnG-C.d.ts → watchlistForBusinessManager-B3GDPZrr.d.ts} +2 -2
- package/dist/{watchlistForBusinessManager-CIMkpEhu.esm.js → watchlistForBusinessManager-BvF4jK3S.esm.js} +7 -5
- package/dist/{watchlistForBusinessStateMachine-CJ-MvUre.esm.js → watchlistForBusinessStateMachine-121XK-Et.esm.js} +3 -3
- package/dist/{watchlistManager-CixcLNDT.esm.js → watchlistManager-CNWEOYSq.esm.js} +3 -3
- package/dist/{watchlistManager-DLXef90v.d.ts → watchlistManager-DJQOd8Pw.d.ts} +2 -2
- package/dist/{watchlistStateMachine-CBqk2w-h.esm.js → watchlistStateMachine-Dgfm42w2.esm.js} +3 -3
- package/dist/workflow.d.ts +34 -5
- package/dist/workflow.esm.js +64 -46
- package/dist/{xstate-actors.esm-BXeQ-Ucz.esm.js → xstate-actors.esm-8Gzepa_A.esm.js} +1 -1
- package/dist/{xstate.esm-BuFLFuzz.esm.js → xstate.esm-DSajW7CJ.esm.js} +24 -10
- package/package.json +13 -5
- package/dist/Actor-iTq7YY48.d.ts +0 -1
- package/dist/StateMachine-EDpYWy0i.d.ts +0 -6
- package/dist/fiscalQrManager-DbCVMIBx.esm.js +0 -34143
- package/dist/index-B8weJxmL.d.ts +0 -1
- package/dist/selfieErrorUtils-UiQ46EBa.esm.js +0 -116
- package/dist/selfieStateMachine-CtMCi4KZ.esm.js +0 -71
- package/dist/types-BN5RPPIZ.esm.js +0 -34
- package/dist/types-Bt9RuRqt.d.ts +0 -6
- package/dist/virtualCameraCheck-Cjab7FTI.esm.js +0 -48
- /package/dist/{types-BSBzhHRH.d.ts → types-BSBzhHRH2.d.ts} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as ActorRefFrom } from "./spawn-D9jgw9pW.js";
|
|
2
|
-
import { t as Manager } from "./Manager-
|
|
3
|
-
import "./Actor-
|
|
4
|
-
import { c as AddressSuggestion } from "./types-
|
|
5
|
-
import { i as EkybFormValues, o as EkybValidationErrors, r as EkybFieldDef, s as UboEntry, t as EkybConfig } from "./types-
|
|
2
|
+
import { t as Manager } from "./Manager-C9T5amUN.js";
|
|
3
|
+
import "./Actor-DpTj5PFb.js";
|
|
4
|
+
import { c as AddressSuggestion } from "./types-BvLo3U4u.js";
|
|
5
|
+
import { i as EkybFormValues, o as EkybValidationErrors, r as EkybFieldDef, s as UboEntry, t as EkybConfig } from "./types-0L-eFDmr.js";
|
|
6
6
|
//#region src/modules/ekyb/ekybStateMachine.d.ts
|
|
7
7
|
declare const ekybMachine: any;
|
|
8
8
|
type EkybMachine = typeof ekybMachine;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
1
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CAgFE-k3.esm.js";
|
|
2
2
|
import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
|
|
3
|
-
import { s as createActor, u as createManager } from "./xstate.esm-
|
|
4
|
-
import { t as ekybMachine } from "./ekybStateMachine-
|
|
3
|
+
import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
|
|
4
|
+
import { t as ekybMachine } from "./ekybStateMachine-hstiCNmW.esm.js";
|
|
5
5
|
//#region src/modules/ekyb/ekybActor.ts
|
|
6
6
|
/**
|
|
7
7
|
* Creates and starts an eKYB actor.
|
|
@@ -13,31 +13,17 @@ function createEkybActor(options) {
|
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/modules/ekyb/ekybManager.ts
|
|
15
15
|
/**
|
|
16
|
-
* Maps
|
|
17
|
-
*
|
|
18
|
-
* canvas
|
|
19
|
-
* (`https://www.figma.com/design/TWgYZVhurQCizfC4tfLEut/eKYC---eKYB---Ready-for-Dev?node-id=2977-10474`).
|
|
20
|
-
* Family is `eKYB.*` and section names are returned verbatim, emitted as-is
|
|
21
|
-
* on `event.screen` by `createManagerInstrumentation` (e.g. `eKYB.default`,
|
|
22
|
-
* `eKYB.processing`). See `docs/patterns/INSTRUMENTATION.md`.
|
|
16
|
+
* Maps the existing combined eKYB form and its outcome screens.
|
|
17
|
+
* https://www.figma.com/design/TWgYZVhurQCizfC4tfLEut?node-id=2977-10474
|
|
23
18
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
19
|
+
* ENG-45716 F3 remains a baseline/UX decision: Figma defines country.empty,
|
|
20
|
+
* country.filled, bdetails.empty, bdetails.filled, director.empty,
|
|
21
|
+
* director.filled and directorloading, while this runtime has one form.
|
|
22
|
+
* Keep its existing eKYB.default until a combined-form taxonomy is approved
|
|
23
|
+
* or the actual steps are implemented. Do not emit fictional step visits.
|
|
24
|
+
* processing/success/error already match the baseline.
|
|
27
25
|
*
|
|
28
|
-
*
|
|
29
|
-
* selection.
|
|
30
|
-
* - `eKYB.filled` (business details filled) — UI sub-state when required
|
|
31
|
-
* fields have values.
|
|
32
|
-
* - `eKYB.UBO` (empty / filled — the Figma canvas duplicates the section
|
|
33
|
-
* name for both variants) — UBO entry step.
|
|
34
|
-
*
|
|
35
|
-
* All three collapse onto `eKYB.default` (the country selection / form
|
|
36
|
-
* entry surface). Promoting them requires the state machine to surface
|
|
37
|
-
* step-based sub-states; tracked for a follow-up.
|
|
38
|
-
*
|
|
39
|
-
* `closed` is intentionally unmapped (terminal user-dismissed state —
|
|
40
|
-
* handled by `moduleClosed`).
|
|
26
|
+
* `closed` is a terminal dismissal handled by module lifecycle instrumentation.
|
|
41
27
|
*/
|
|
42
28
|
function getEkybScreenName(snapshot) {
|
|
43
29
|
const stateName = topLevelStateName(snapshot.value);
|
|
@@ -160,12 +146,22 @@ function createApi({ actor, trackElementClicked }) {
|
|
|
160
146
|
}
|
|
161
147
|
};
|
|
162
148
|
}
|
|
149
|
+
function hasFormValidationErrors(snapshot) {
|
|
150
|
+
return topLevelStateName(snapshot.value) === "form" && Object.keys(snapshot.context.validationErrors ?? {}).length > 0;
|
|
151
|
+
}
|
|
163
152
|
function createEkybManagerFromActor(actor) {
|
|
164
153
|
return createManager({
|
|
165
154
|
actor,
|
|
166
155
|
mapState,
|
|
167
156
|
createApi,
|
|
168
|
-
instrumentation: createManagerInstrumentation(eventModuleNames.ekyb, {
|
|
157
|
+
instrumentation: createManagerInstrumentation(eventModuleNames.ekyb, {
|
|
158
|
+
getEventScreenName: getEkybScreenName,
|
|
159
|
+
getErrorName: (snapshot) => hasFormValidationErrors(snapshot) ? "error.validation" : void 0,
|
|
160
|
+
getErrorPayload: (snapshot) => hasFormValidationErrors(snapshot) ? {
|
|
161
|
+
reason: "validation",
|
|
162
|
+
errorCode: "VALIDATION_FAILED"
|
|
163
|
+
} : void 0
|
|
164
|
+
})
|
|
169
165
|
});
|
|
170
166
|
}
|
|
171
167
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as api } from "./api-Bx3gKW_y.esm.js";
|
|
2
|
-
import { t as endpoints } from "./endpoints-
|
|
3
|
-
import { A as isSupportedCountry, C as COUNTRIES_WITH_CNPJ_VALIDATION, D as INVALID_CNPJ_PATTERNS, E as FIELD_ORDER, S as CNPJ_SECOND_DIGIT_FACTORS, T as FIELD_NAME_MAPPING, _ as sortModulesByOrder, b as ALL_COUNTRIES, g as requiresAddressValidation, h as isFieldOptional, k as UBO_FIELD_LABELS, m as hasAtLeastOneAddressField, n as getFlow, v as toEkybConfig, x as CNPJ_FIRST_DIGIT_FACTORS, y as ADDRESS_FIELDS } from "./flowServices-
|
|
4
|
-
import { i as assign, t as setup } from "./xstate.esm-
|
|
5
|
-
import { n as fromPromise } from "./xstate-actors.esm-
|
|
6
|
-
import { a as
|
|
2
|
+
import { t as endpoints } from "./endpoints-DHzlkQNe.esm.js";
|
|
3
|
+
import { A as isSupportedCountry, C as COUNTRIES_WITH_CNPJ_VALIDATION, D as INVALID_CNPJ_PATTERNS, E as FIELD_ORDER, S as CNPJ_SECOND_DIGIT_FACTORS, T as FIELD_NAME_MAPPING, _ as sortModulesByOrder, b as ALL_COUNTRIES, g as requiresAddressValidation, h as isFieldOptional, k as UBO_FIELD_LABELS, m as hasAtLeastOneAddressField, n as getFlow, v as toEkybConfig, x as CNPJ_FIRST_DIGIT_FACTORS, y as ADDRESS_FIELDS } from "./flowServices-DA64AEZC.esm.js";
|
|
4
|
+
import { i as assign, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
|
|
5
|
+
import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
|
|
6
|
+
import { a as FIXED_DIGIT_POSTAL_CODE_LENGTH, c as getPostalCodeMaxLength, d as STREET_LEVEL_REQUIRED_ERROR, f as fillFromSuggestion, i as checkSupport, l as validatePostalCode, m as usStateOptions, n as resolveForm, o as formatPostalCode, p as getStreetLevelErrorForSuggestion, r as createBundledDefinitionSource, s as getPostalCodeErrorKey, t as debounceSearchActor, u as DYNAMIC_REQUIRED_KEY } from "./addressSearch-BiYZjvp3.esm.js";
|
|
7
7
|
//#region src/modules/ekyb/ekybValidators.ts
|
|
8
8
|
function cleanCnpjString(cnpj) {
|
|
9
9
|
return cnpj.replace(/\./g, "").replace(/\//g, "").replace(/-/g, "");
|
|
@@ -175,6 +175,309 @@ function requiresCnpjValidation(country) {
|
|
|
175
175
|
return COUNTRIES_WITH_CNPJ_VALIDATION.includes(country);
|
|
176
176
|
}
|
|
177
177
|
//#endregion
|
|
178
|
+
//#region ../form-definitions/generated/ekyb.ts
|
|
179
|
+
const EKYB_DEFINITIONS = {
|
|
180
|
+
"ekyb/MX": {
|
|
181
|
+
schemaVersion: 1,
|
|
182
|
+
vocabulary: "1.0",
|
|
183
|
+
id: "ekyb/MX",
|
|
184
|
+
module: "ekyb",
|
|
185
|
+
country: "MX",
|
|
186
|
+
fields: [
|
|
187
|
+
{
|
|
188
|
+
name: "businessName",
|
|
189
|
+
kind: "text",
|
|
190
|
+
group: "businessName",
|
|
191
|
+
required: true,
|
|
192
|
+
label: { key: "ekyb.businessName" },
|
|
193
|
+
input: { autofill: "organization" }
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
name: "taxId",
|
|
197
|
+
kind: "text",
|
|
198
|
+
group: "taxId",
|
|
199
|
+
required: true,
|
|
200
|
+
label: { key: "ekyb.taxId" }
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
name: "postalCode",
|
|
204
|
+
kind: "text",
|
|
205
|
+
group: "address",
|
|
206
|
+
required: true,
|
|
207
|
+
label: { key: "ekyb.postalCode" },
|
|
208
|
+
input: {
|
|
209
|
+
maxLength: 5,
|
|
210
|
+
autofill: "postalCode"
|
|
211
|
+
},
|
|
212
|
+
rules: [{ id: "postalCodeFormat" }]
|
|
213
|
+
}
|
|
214
|
+
],
|
|
215
|
+
submit: {
|
|
216
|
+
static: { plugins: ["ekyb"] },
|
|
217
|
+
context: { country: "country" }
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"ekyb/US": {
|
|
221
|
+
schemaVersion: 1,
|
|
222
|
+
vocabulary: "1.0",
|
|
223
|
+
id: "ekyb/US",
|
|
224
|
+
module: "ekyb",
|
|
225
|
+
country: "US",
|
|
226
|
+
fields: [
|
|
227
|
+
{
|
|
228
|
+
name: "businessName",
|
|
229
|
+
kind: "text",
|
|
230
|
+
group: "businessName",
|
|
231
|
+
required: true,
|
|
232
|
+
label: { key: "ekyb.businessName" },
|
|
233
|
+
input: { autofill: "organization" }
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
name: "taxId",
|
|
237
|
+
kind: "text",
|
|
238
|
+
group: "taxId",
|
|
239
|
+
required: true,
|
|
240
|
+
label: { key: "ekyb.taxId" }
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
name: "street",
|
|
244
|
+
kind: "text",
|
|
245
|
+
group: "address",
|
|
246
|
+
required: true,
|
|
247
|
+
widget: "addressSearch",
|
|
248
|
+
label: { key: "ekyb.street" },
|
|
249
|
+
input: { autofill: "addressLine1" }
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
name: "houseNo",
|
|
253
|
+
kind: "text",
|
|
254
|
+
group: "address",
|
|
255
|
+
required: true,
|
|
256
|
+
label: { key: "ekyb.houseNo" }
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
name: "addressLine2",
|
|
260
|
+
kind: "text",
|
|
261
|
+
group: "address",
|
|
262
|
+
label: { key: "ekyb.addressLine2" },
|
|
263
|
+
input: { autofill: "addressLine2" }
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
name: "city",
|
|
267
|
+
kind: "text",
|
|
268
|
+
group: "address",
|
|
269
|
+
required: true,
|
|
270
|
+
label: { key: "ekyb.city" },
|
|
271
|
+
input: { autofill: "addressLevel2" }
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
name: "state",
|
|
275
|
+
kind: "choice",
|
|
276
|
+
group: "address",
|
|
277
|
+
required: true,
|
|
278
|
+
widget: "select",
|
|
279
|
+
label: { key: "ekyb.state" },
|
|
280
|
+
placeholder: { key: "verification.placeholder.state" },
|
|
281
|
+
input: { autofill: "addressLevel1" },
|
|
282
|
+
optionsRef: "US_STATES"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
name: "postalCode",
|
|
286
|
+
kind: "text",
|
|
287
|
+
group: "address",
|
|
288
|
+
required: true,
|
|
289
|
+
label: { key: "ekyb.postalCode" },
|
|
290
|
+
input: {
|
|
291
|
+
maxLength: 10,
|
|
292
|
+
autofill: "postalCode"
|
|
293
|
+
},
|
|
294
|
+
rules: [{ id: "postalCodeFormat" }]
|
|
295
|
+
}
|
|
296
|
+
],
|
|
297
|
+
collections: [{
|
|
298
|
+
id: "ubos",
|
|
299
|
+
group: "ubos",
|
|
300
|
+
min: 1,
|
|
301
|
+
max: 8,
|
|
302
|
+
fields: [{
|
|
303
|
+
name: "name",
|
|
304
|
+
kind: "text",
|
|
305
|
+
group: "ubos",
|
|
306
|
+
required: true,
|
|
307
|
+
label: { key: "ekyb.uboName" }
|
|
308
|
+
}, {
|
|
309
|
+
name: "surname",
|
|
310
|
+
kind: "text",
|
|
311
|
+
group: "ubos",
|
|
312
|
+
required: true,
|
|
313
|
+
label: { key: "ekyb.uboSurname" }
|
|
314
|
+
}],
|
|
315
|
+
payload: {
|
|
316
|
+
key: "uboNames",
|
|
317
|
+
join: ["name", "surname"]
|
|
318
|
+
}
|
|
319
|
+
}],
|
|
320
|
+
submit: {
|
|
321
|
+
static: { plugins: ["ekyb"] },
|
|
322
|
+
context: { country: "country" }
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
//#endregion
|
|
327
|
+
//#region src/modules/ekyb/ekybForm.ts
|
|
328
|
+
/**
|
|
329
|
+
* eKYB adapter for form definitions.
|
|
330
|
+
*
|
|
331
|
+
* Selects the bundled definition for a country, resolves it against the
|
|
332
|
+
* verification fields from module configuration, and projects the result to
|
|
333
|
+
* today's public `EkybFieldDef[]` shape. A country without a projectable
|
|
334
|
+
* definition, or a custom field list that can't be expressed as groups, keeps
|
|
335
|
+
* the current builder.
|
|
336
|
+
*/
|
|
337
|
+
/** eKYB group id → the verification-field entries that turn it on. */
|
|
338
|
+
const EKYB_GROUP_ENTRIES = {
|
|
339
|
+
businessName: ["name-user_input"],
|
|
340
|
+
taxId: ["taxId-user_input"],
|
|
341
|
+
address: [
|
|
342
|
+
"street-user_input",
|
|
343
|
+
"houseNo-user_input",
|
|
344
|
+
"address2-user_input",
|
|
345
|
+
"city-user_input",
|
|
346
|
+
"state-user_input",
|
|
347
|
+
"postalCode-user_input"
|
|
348
|
+
],
|
|
349
|
+
ubos: ["ubos-user_input"]
|
|
350
|
+
};
|
|
351
|
+
const KNOWN_ENTRIES = new Set(Object.values(EKYB_GROUP_ENTRIES).flat());
|
|
352
|
+
const OPTION_LISTS = { US_STATES: usStateOptions };
|
|
353
|
+
/** Vocabulary rules expressed as today's `EkybValidationRule` objects. */
|
|
354
|
+
const RULES = {
|
|
355
|
+
cnpj: () => ({ type: "cnpj" }),
|
|
356
|
+
postalCodeFormat: (country) => ({
|
|
357
|
+
type: "postalCodeFormat",
|
|
358
|
+
country
|
|
359
|
+
})
|
|
360
|
+
};
|
|
361
|
+
const EKYB_SUPPORTED_IDS = {
|
|
362
|
+
schemaVersions: [1],
|
|
363
|
+
vocabulary: "1.0",
|
|
364
|
+
kinds: /* @__PURE__ */ new Set(["text", "choice"]),
|
|
365
|
+
groups: new Set(Object.keys(EKYB_GROUP_ENTRIES)),
|
|
366
|
+
rules: new Set(Object.keys(RULES)),
|
|
367
|
+
transforms: /* @__PURE__ */ new Set(),
|
|
368
|
+
groupRules: /* @__PURE__ */ new Set(),
|
|
369
|
+
optionLists: new Set(Object.keys(OPTION_LISTS)),
|
|
370
|
+
conditions: /* @__PURE__ */ new Set()
|
|
371
|
+
};
|
|
372
|
+
/** Today's UBO actions use a fixed limit and a single collection. */
|
|
373
|
+
const UBO_COLLECTION = "ubos";
|
|
374
|
+
/**
|
|
375
|
+
* Whether today's code handles a field the way its definition says. Today's
|
|
376
|
+
* validators show their own message, so a rule can't carry one. The field
|
|
377
|
+
* shape has no hint, suggestions, sections or Text params, and the UI shows a
|
|
378
|
+
* placeholder only on dropdowns. `buildEkybSubmitPayload` sends the value
|
|
379
|
+
* under the field name, unchanged. Input formatting and request bodies stay
|
|
380
|
+
* in today's code until P2.
|
|
381
|
+
*/
|
|
382
|
+
function isProjectableField(field) {
|
|
383
|
+
return !field.hint && !field.suggestionsRef && !field.section && !field.label.params && !field.displayLabel?.params && (field.options ?? []).every((option) => !option.label.params) && (!field.placeholder || field.kind === "choice" && !field.placeholder.params) && (field.rules ?? []).every((rule) => !rule.message) && !field.input?.format?.length && (field.payload?.key ?? field.name) === field.name && !field.payload?.omit;
|
|
384
|
+
}
|
|
385
|
+
/** The only properties today's owner fields honor. */
|
|
386
|
+
const UBO_FIELD_KEYS = /* @__PURE__ */ new Set([
|
|
387
|
+
"name",
|
|
388
|
+
"kind",
|
|
389
|
+
"group",
|
|
390
|
+
"required",
|
|
391
|
+
"label"
|
|
392
|
+
]);
|
|
393
|
+
/**
|
|
394
|
+
* Today's owner code is fixed: owner 1 is required, up to `UBO_INPUT_LIMIT`
|
|
395
|
+
* owners, each with a required name and surname under `UBO_FIELD_LABELS`, and
|
|
396
|
+
* the request body joins them into `uboNames`. A collection is projectable
|
|
397
|
+
* only when it declares exactly that.
|
|
398
|
+
*/
|
|
399
|
+
function isProjectableUboCollection(collection) {
|
|
400
|
+
const { key, join } = collection.payload;
|
|
401
|
+
const names = collection.fields.map((field) => field.name);
|
|
402
|
+
return collection.id === UBO_COLLECTION && collection.min === 1 && collection.max === 8 && key === "uboNames" && join.length === 2 && join[0] === "name" && join[1] === "surname" && names.length === 2 && names[0] === "name" && names[1] === "surname" && collection.fields.every((field) => Object.keys(field).every((prop) => UBO_FIELD_KEYS.has(prop)) && field.kind === "text" && field.required === true && Object.keys(field.label).length === 1 && field.label.key === UBO_FIELD_LABELS[field.name]);
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* Caches the check per definition object. Bundled definitions are singletons
|
|
406
|
+
* created once at module load, so each is checked once. A served source (P4)
|
|
407
|
+
* that builds new objects per call would still be correct, but would miss
|
|
408
|
+
* this cache; key it by definition id and version then.
|
|
409
|
+
*/
|
|
410
|
+
const projectable = /* @__PURE__ */ new WeakMap();
|
|
411
|
+
/** Whether every part of a definition maps onto today's `EkybFieldDef`. */
|
|
412
|
+
function isProjectableEkybDefinition(definition) {
|
|
413
|
+
let result = projectable.get(definition);
|
|
414
|
+
if (result === void 0) {
|
|
415
|
+
result = definition.module === "ekyb" && checkSupport(definition, EKYB_SUPPORTED_IDS).supported && !definition.sections?.length && definition.fields.every(isProjectableField) && (definition.collections ?? []).every(isProjectableUboCollection);
|
|
416
|
+
projectable.set(definition, result);
|
|
417
|
+
}
|
|
418
|
+
return result;
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Maps module configuration to groups. Returns `undefined` when the field
|
|
422
|
+
* list can't be expressed as whole groups (an unknown entry, or part of the
|
|
423
|
+
* address), so the current builder keeps handling it.
|
|
424
|
+
*/
|
|
425
|
+
function toEkybResolveContext(config, verificationFields) {
|
|
426
|
+
const entries = verificationFields.filter((entry) => !entry.startsWith("socure"));
|
|
427
|
+
if (entries.some((entry) => !KNOWN_ENTRIES.has(entry))) return void 0;
|
|
428
|
+
const groups = {};
|
|
429
|
+
for (const [group, groupEntries] of Object.entries(EKYB_GROUP_ENTRIES)) {
|
|
430
|
+
const present = groupEntries.filter((e) => entries.includes(e)).length;
|
|
431
|
+
if (present !== 0 && present !== groupEntries.length) return void 0;
|
|
432
|
+
groups[group] = present > 0;
|
|
433
|
+
}
|
|
434
|
+
groups.ubos = groups.ubos === true && config.checkUniqueBeneficialOwner !== false;
|
|
435
|
+
return { groups };
|
|
436
|
+
}
|
|
437
|
+
const bundled = createBundledDefinitionSource(EKYB_DEFINITIONS);
|
|
438
|
+
/** The resolved definition for this country and configuration, if one applies. */
|
|
439
|
+
function selectEkybForm(config, verificationFields, country) {
|
|
440
|
+
const context = toEkybResolveContext(config, verificationFields);
|
|
441
|
+
if (!context) return void 0;
|
|
442
|
+
const definition = bundled.select({
|
|
443
|
+
module: "ekyb",
|
|
444
|
+
country
|
|
445
|
+
});
|
|
446
|
+
if (!definition || !isProjectableEkybDefinition(definition)) return void 0;
|
|
447
|
+
return resolveForm(definition, context);
|
|
448
|
+
}
|
|
449
|
+
function projectField(field, required, country) {
|
|
450
|
+
const def = {
|
|
451
|
+
name: field.name,
|
|
452
|
+
type: field.kind === "choice" ? "dropdown" : "text",
|
|
453
|
+
label: field.label.key,
|
|
454
|
+
required
|
|
455
|
+
};
|
|
456
|
+
if (field.placeholder) def.placeholder = field.placeholder.key;
|
|
457
|
+
if (field.displayLabel) def.displayLabel = field.displayLabel.text ?? field.displayLabel.key;
|
|
458
|
+
if (field.input?.maxLength !== void 0) def.maxLength = field.input.maxLength;
|
|
459
|
+
if (field.optionsRef) def.options = OPTION_LISTS[field.optionsRef];
|
|
460
|
+
else if (field.options) def.options = field.options.map((option) => ({
|
|
461
|
+
value: option.value,
|
|
462
|
+
label: option.label.key
|
|
463
|
+
}));
|
|
464
|
+
const validation = required ? [{ type: "required" }] : [];
|
|
465
|
+
for (const rule of field.rules ?? []) {
|
|
466
|
+
const project = RULES[rule.id];
|
|
467
|
+
if (project) validation.push(project(country));
|
|
468
|
+
}
|
|
469
|
+
if (validation.length > 0) def.validation = validation;
|
|
470
|
+
return def;
|
|
471
|
+
}
|
|
472
|
+
/** Projects a resolved definition to today's `EkybFieldDef[]`. */
|
|
473
|
+
function projectEkybFields(form, country) {
|
|
474
|
+
return form.fields.map(({ field, required }) => projectField(field, required, country));
|
|
475
|
+
}
|
|
476
|
+
/** Whether the resolved form collects beneficial owners. */
|
|
477
|
+
function hasUboCollection(form) {
|
|
478
|
+
return form.collections.some((c) => c.collection.id === UBO_COLLECTION);
|
|
479
|
+
}
|
|
480
|
+
//#endregion
|
|
178
481
|
//#region src/modules/ekyb/ekybActions.ts
|
|
179
482
|
function buildEkybValidationRules(fieldName, required, country) {
|
|
180
483
|
const rules = [];
|
|
@@ -186,6 +489,25 @@ function buildEkybValidationRules(fieldName, required, country) {
|
|
|
186
489
|
});
|
|
187
490
|
return rules;
|
|
188
491
|
}
|
|
492
|
+
/**
|
|
493
|
+
* Fields and beneficial-owner state for a country. A country with a form
|
|
494
|
+
* definition (`packages/form-definitions/catalog/ekyb`) reads it; any other
|
|
495
|
+
* country, or a custom field list that isn't whole groups, keeps the current
|
|
496
|
+
* builder and its UBO rule.
|
|
497
|
+
*/
|
|
498
|
+
function buildEkybForm(config, verificationFields, country) {
|
|
499
|
+
const form = selectEkybForm(config, verificationFields, country);
|
|
500
|
+
if (form) return {
|
|
501
|
+
fields: projectEkybFields(form, country),
|
|
502
|
+
hasUbos: hasUboCollection(form)
|
|
503
|
+
};
|
|
504
|
+
const hasUbos = config.checkUniqueBeneficialOwner !== false && verificationFields.includes("ubos-user_input") && country !== "MX";
|
|
505
|
+
return {
|
|
506
|
+
fields: buildEkybFields(verificationFields, country, hasUbos),
|
|
507
|
+
hasUbos
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
/** The per-country builder for countries without a form definition yet. */
|
|
189
511
|
function buildEkybFields(verificationFields, country, _hasUbos) {
|
|
190
512
|
let modules = verificationFields.filter((f) => f !== "ubos-user_input" && !f.startsWith("socure"));
|
|
191
513
|
if (country === "GB") modules = modules.filter((m) => m !== "state-user_input");
|
|
@@ -233,6 +555,12 @@ function processEkybFieldValue(name, value, country) {
|
|
|
233
555
|
if (name === "postalCode") return formatPostalCode(value, country);
|
|
234
556
|
return value;
|
|
235
557
|
}
|
|
558
|
+
/**
|
|
559
|
+
* Builds the request body. Keep it in sync with `isProjectableField` and
|
|
560
|
+
* `isProjectableUboCollection` in `ekybForm.ts`: definitions are projectable
|
|
561
|
+
* only when they declare exactly this handling, until P2 builds request
|
|
562
|
+
* bodies from them.
|
|
563
|
+
*/
|
|
236
564
|
function buildEkybSubmitPayload(ctx) {
|
|
237
565
|
const uboNames = ctx.ubos.filter((u) => u.name.trim() || u.surname.trim()).map((u) => `${u.name.trim()} ${u.surname.trim()}`.trim());
|
|
238
566
|
const payload = {
|
|
@@ -307,13 +635,12 @@ const ekybMachine = setup({
|
|
|
307
635
|
checkUniqueBeneficialOwner: fetched.checkUniqueBeneficialOwner
|
|
308
636
|
};
|
|
309
637
|
const country = "US";
|
|
310
|
-
const
|
|
311
|
-
const hasUbos = config.checkUniqueBeneficialOwner !== false && vFields.includes("ubos-user_input");
|
|
638
|
+
const { fields, hasUbos } = buildEkybForm(config, getDefaultVerificationFields(config), country);
|
|
312
639
|
return {
|
|
313
640
|
config,
|
|
314
641
|
country,
|
|
315
642
|
availableCountries: ALL_COUNTRIES,
|
|
316
|
-
fields
|
|
643
|
+
fields,
|
|
317
644
|
values: { country },
|
|
318
645
|
validationErrors: void 0,
|
|
319
646
|
ubos: hasUbos ? [{
|
|
@@ -331,8 +658,7 @@ const ekybMachine = setup({
|
|
|
331
658
|
setCountry: assign(({ context, event }) => {
|
|
332
659
|
const { country } = event;
|
|
333
660
|
const vFields = getDefaultVerificationFields(context.config);
|
|
334
|
-
const hasUbos = context.config
|
|
335
|
-
const fields = buildEkybFields(vFields, country, hasUbos);
|
|
661
|
+
const { fields, hasUbos } = buildEkybForm(context.config, vFields, country);
|
|
336
662
|
let nextId = context._nextUboId;
|
|
337
663
|
let ubos;
|
|
338
664
|
if (hasUbos) if (context.ubos.length > 0) ubos = context.ubos;
|
|
@@ -485,13 +811,12 @@ const ekybMachine = setup({
|
|
|
485
811
|
context: ({ input }) => {
|
|
486
812
|
const config = toEkybConfig(input.config);
|
|
487
813
|
const country = "US";
|
|
488
|
-
const
|
|
489
|
-
const hasUbos = config.checkUniqueBeneficialOwner !== false && vFields.includes("ubos-user_input");
|
|
814
|
+
const { fields, hasUbos } = buildEkybForm(config, getDefaultVerificationFields(config), country);
|
|
490
815
|
return {
|
|
491
816
|
config,
|
|
492
817
|
country,
|
|
493
818
|
availableCountries: ALL_COUNTRIES,
|
|
494
|
-
fields
|
|
819
|
+
fields,
|
|
495
820
|
values: { country },
|
|
496
821
|
validationErrors: void 0,
|
|
497
822
|
ubos: hasUbos ? [{
|
package/dist/ekyc.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as EkycValidationError, c as AddressSuggestion, i as EkycModuleConfig, o as EkycValidationErrors, t as EkycConfig } from "./types-
|
|
2
|
-
import { n as EkycState, o as ekycMachine, r as createEkycManager, t as EkycManager } from "./ekycManager-
|
|
1
|
+
import { a as EkycValidationError, c as AddressSuggestion, i as EkycModuleConfig, o as EkycValidationErrors, t as EkycConfig } from "./types-BvLo3U4u.js";
|
|
2
|
+
import { n as EkycState, o as ekycMachine, r as createEkycManager, t as EkycManager } from "./ekycManager-DW-ynodd.js";
|
|
3
3
|
//#region src/modules/ekyc/ekycUtils.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Normalizes any supported eKYC config input into a manager-ready `EkycConfig`.
|
package/dist/ekyc.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as ekycMachine } from "./ekycStateMachine-
|
|
3
|
-
import { t as createEkycManager } from "./ekycManager-
|
|
1
|
+
import { a as toEkycConfig } from "./ekycUtils-zY8CdKJL.esm.js";
|
|
2
|
+
import { t as ekycMachine } from "./ekycStateMachine-x6Klot8g.esm.js";
|
|
3
|
+
import { t as createEkycManager } from "./ekycManager-BdJRUsz0.esm.js";
|
|
4
4
|
export { createEkycManager, ekycMachine, toEkycConfig };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
1
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CAgFE-k3.esm.js";
|
|
2
2
|
import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
|
|
3
|
-
import { s as createActor, u as createManager } from "./xstate.esm-
|
|
4
|
-
import { t as ekycMachine } from "./ekycStateMachine-
|
|
3
|
+
import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
|
|
4
|
+
import { t as ekycMachine } from "./ekycStateMachine-x6Klot8g.esm.js";
|
|
5
5
|
//#region src/modules/ekyc/ekycActor.ts
|
|
6
6
|
/**
|
|
7
7
|
* Creates and starts an eKYC actor.
|
|
@@ -13,34 +13,12 @@ function createEkycActor(options) {
|
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/modules/ekyc/ekycManager.ts
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* (`https://www.figma.com/design/TWgYZVhurQCizfC4tfLEut/eKYC---eKYB---Ready-for-Dev?node-id=2977-10474`).
|
|
19
|
-
* Family is `eKYC.*` and section names are returned verbatim, emitted as-is
|
|
20
|
-
* on `event.screen` by `createManagerInstrumentation` (e.g. `eKYC.filled`,
|
|
21
|
-
* `eKYC.verify`). See `docs/patterns/INSTRUMENTATION.md`.
|
|
16
|
+
* Screen taxonomy: ENG-45716 v4 QA baseline and the eKYC Tracked Events canvas:
|
|
17
|
+
* https://www.figma.com/design/TWgYZVhurQCizfC4tfLEut?node-id=2977-10474
|
|
22
18
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* State → screen mapping rationale:
|
|
28
|
-
*
|
|
29
|
-
* - `idle` / `loading` / `prefilling` collapse onto `eKYC.filled` — the
|
|
30
|
-
* prefill round-trip happens before the user sees the form, but Figma does
|
|
31
|
-
* not define a dedicated loading/prefill surface (the per-country
|
|
32
|
-
* `eKYC-empty *` instances in the `eKYC-States` section are visual
|
|
33
|
-
* references, not analytics screens). Keeping the family on `eKYC.filled`
|
|
34
|
-
* avoids falling back to a generic `eKYC.loading` default and mixing
|
|
35
|
-
* taxonomies in dashboards.
|
|
36
|
-
* - `submitting` → `eKYC.verify` (verifying surface).
|
|
37
|
-
* - `success`/`finished` → `eKYC.success` so the terminal `finished` state
|
|
38
|
-
* stays on the visible success canvas.
|
|
39
|
-
* - `misconfigured` is intentionally unmapped — Figma does not define a
|
|
40
|
-
* misconfiguration surface, and the misconfigured state is an SDK
|
|
41
|
-
* configuration error rather than a user-visible journey screen.
|
|
42
|
-
* - `closed` is intentionally unmapped (terminal user-dismissed state —
|
|
43
|
-
* handled by `moduleClosed`).
|
|
19
|
+
* Form completeness follows configured required fields, independently of the
|
|
20
|
+
* optimistic Continue button and validation timing. Finalization can follow a
|
|
21
|
+
* skip, so only the success state reports success.
|
|
44
22
|
*/
|
|
45
23
|
function getEkycScreenName(snapshot) {
|
|
46
24
|
const stateName = topLevelStateName(snapshot.value);
|
|
@@ -48,11 +26,16 @@ function getEkycScreenName(snapshot) {
|
|
|
48
26
|
switch (stateName) {
|
|
49
27
|
case "idle":
|
|
50
28
|
case "loading":
|
|
51
|
-
case "prefilling":
|
|
52
|
-
case "form":
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
29
|
+
case "prefilling": return "eKYC.loading";
|
|
30
|
+
case "form": {
|
|
31
|
+
const { fields, values } = snapshot.context;
|
|
32
|
+
const required = fields.filter((field) => field.required);
|
|
33
|
+
const hasValue = (field) => (values[field.name]?.trim().length ?? 0) > 0;
|
|
34
|
+
return (required.length > 0 ? required.every(hasValue) : fields.some(hasValue)) ? "eKYC.filled" : "eKYC.default";
|
|
35
|
+
}
|
|
36
|
+
case "submitting": return "eKYC.processing";
|
|
37
|
+
case "success": return "eKYC.success";
|
|
38
|
+
case "finished": return "";
|
|
56
39
|
case "error": return "eKYC.error";
|
|
57
40
|
default: return;
|
|
58
41
|
}
|
|
@@ -141,12 +124,22 @@ function createApi({ actor, trackElementClicked }) {
|
|
|
141
124
|
}
|
|
142
125
|
};
|
|
143
126
|
}
|
|
127
|
+
function hasFormValidationErrors(snapshot) {
|
|
128
|
+
return topLevelStateName(snapshot.value) === "form" && Object.keys(snapshot.context.validationErrors ?? {}).length > 0;
|
|
129
|
+
}
|
|
144
130
|
function createEkycManagerFromActor(actor) {
|
|
145
131
|
return createManager({
|
|
146
132
|
actor,
|
|
147
133
|
mapState,
|
|
148
134
|
createApi,
|
|
149
|
-
instrumentation: createManagerInstrumentation(eventModuleNames.ekyc, {
|
|
135
|
+
instrumentation: createManagerInstrumentation(eventModuleNames.ekyc, {
|
|
136
|
+
getEventScreenName: getEkycScreenName,
|
|
137
|
+
getErrorName: (snapshot) => hasFormValidationErrors(snapshot) ? "error.validation" : void 0,
|
|
138
|
+
getErrorPayload: (snapshot) => hasFormValidationErrors(snapshot) ? {
|
|
139
|
+
reason: "validation",
|
|
140
|
+
errorCode: "VALIDATION_FAILED"
|
|
141
|
+
} : void 0
|
|
142
|
+
})
|
|
150
143
|
});
|
|
151
144
|
}
|
|
152
145
|
function createEkycManager(options) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as ActorRefFrom } from "./spawn-D9jgw9pW.js";
|
|
2
|
-
import { t as Manager } from "./Manager-
|
|
3
|
-
import "./Actor-
|
|
4
|
-
import { c as AddressSuggestion, n as EkycFieldDef, o as EkycValidationErrors, r as EkycFormValues, t as EkycConfig } from "./types-
|
|
2
|
+
import { t as Manager } from "./Manager-C9T5amUN.js";
|
|
3
|
+
import "./Actor-DpTj5PFb.js";
|
|
4
|
+
import { c as AddressSuggestion, n as EkycFieldDef, o as EkycValidationErrors, r as EkycFormValues, t as EkycConfig } from "./types-BvLo3U4u.js";
|
|
5
5
|
//#region src/modules/ekyc/ekycStateMachine.d.ts
|
|
6
6
|
declare const ekycMachine: any;
|
|
7
7
|
type EkycMachine = typeof ekycMachine;
|