@incodetech/core 2.3.2 → 2.4.0-rc.1
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-Bq3OHo7P.d.ts} +2 -2
- package/dist/BrowserDiagnosticsEnvelopeProvider-BQca6KPG.esm.js +43 -0
- package/dist/{FaceDetectionProvider-DtmtCKa9.esm.js → FaceDetectionProvider-BIImDZrc.esm.js} +125 -10
- package/dist/HttpRequestError-Bh0pNGSC.esm.js +35 -0
- package/dist/{IIdCaptureCapability-RNiFhvXR.d.ts → IIdCaptureCapability-CGcEt2Cw.d.ts} +2 -2
- package/dist/{IWasmUtilCapability-CNWRl7jr.d.ts → IWasmUtilCapability-GF2n7sfm.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-7JRf-2ck.d.ts} +2 -2
- package/dist/{safeStorage-BdU9_m2E.esm.js → WasmUtilProvider-DtJuBdt-.esm.js} +111 -49
- package/dist/{addressSearch-DyHGgeX8.esm.js → addressSearch-DPjIKJrX.esm.js} +142 -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-DNkw66oW.esm.js → antifraudManager-CaweCYnY.esm.js} +3 -3
- package/dist/{antifraudManager-BY36bS12.d.ts → antifraudManager-DbGCvlJs.d.ts} +2 -2
- package/dist/{antifraudStateMachine-DBeq47D2.esm.js → antifraudStateMachine-DRl0UVyA.esm.js} +3 -4
- package/dist/{endpoints-B-3Q-LUw.esm.js → api-Cz90EHyu.esm.js} +151 -1
- package/dist/{apiError-CmGEmaGU.esm.js → apiError-D5u6HIDG.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-BIZC55Bi.d.ts} +2 -8
- package/dist/{authenticationManager-BFjSjtQ_.esm.js → authenticationManager-CB3YW6EK.esm.js} +6 -6
- package/dist/{authenticationStateMachine-Dfo34ZiI.esm.js → authenticationStateMachine-BJJhLmdH.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-BfeMv2PU.esm.js} +3 -3
- package/dist/{certificateIssuanceManager-DCgEidHz.d.ts → certificateIssuanceManager-Dr8A4Lgr.d.ts} +2 -3
- package/dist/{certificateIssuanceStateMachine-CxqS_nD-.esm.js → certificateIssuanceStateMachine-Frgjbjw8.esm.js} +4 -5
- package/dist/consent.d.ts +1 -1
- package/dist/consent.esm.js +2 -2
- package/dist/{consentManager-B6E1XJDw.esm.js → consentManager-CvEu8h_W.esm.js} +3 -3
- package/dist/{consentManager-2h_w6wFc.d.ts → consentManager-Cv_0QKLD.d.ts} +7 -8
- package/dist/{consentStateMachine-DTSfdGiW.esm.js → consentStateMachine-DJTgN_-1.esm.js} +3 -4
- package/dist/{createCameraCycleOwnership-DnwTl1ad.esm.js → createCameraCycleOwnership-Dj_LHUvN.esm.js} +71 -66
- package/dist/{createFaceAvatar-BlcTYgJv.d.ts → createFaceAvatar-lYX0VTYs.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-Cu141CE8.esm.js} +4 -5
- 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-DbIMYFcJ.esm.js → curpValidationManager-B-z9q5V3.esm.js} +15 -22
- package/dist/{curpValidationManager-DNuZn9fn.d.ts → curpValidationManager-C9sqoh9n.d.ts} +3 -3
- package/dist/{curpValidationStateMachine-g5kMfuLj.esm.js → curpValidationStateMachine-vDEFLMPw.esm.js} +4 -5
- 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-8-W2KY4n.d.ts → customFieldsManager-CF-cO8ap.d.ts} +2 -2
- package/dist/{customFieldsManager-CzWZTkW-.esm.js → customFieldsManager-D1ex2cFM.esm.js} +4 -5
- package/dist/{customWatchlistManager-DWTED5Ur.esm.js → customWatchlistManager-CTI-SGk0.esm.js} +3 -3
- package/dist/{customWatchlistManager-PBWHr_oM.d.ts → customWatchlistManager-DolUswyR.d.ts} +2 -2
- package/dist/{customWatchlistStateMachine-DOQou6TW.esm.js → customWatchlistStateMachine-hmRd0f2I.esm.js} +3 -4
- package/dist/deepsightLoader-DZMdYSl-.esm.js +55 -0
- package/dist/{deepsightLoader-v-dLejS-.esm.js → deepsightService-tGP53cSS.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-DUJwpKC5.esm.js} +17 -18
- package/dist/{documentCaptureManager-lEtCM320.d.ts → documentCaptureManager-DkyDtm3Y.d.ts} +11 -34
- package/dist/{documentCaptureStateMachine-D312sSIu.esm.js → documentCaptureStateMachine-B8i7GnLh.esm.js} +55 -59
- package/dist/dynamic-forms.d.ts +2 -2
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-C-9Jhnd3.esm.js → dynamicFormsManager-Bxmv_9PB.esm.js} +3 -3
- package/dist/{dynamicFormsManager-D5R_uxLQ.d.ts → dynamicFormsManager-C0dHs1ty.d.ts} +3 -3
- package/dist/{dynamicFormsStateMachine-DGI_F2PP.esm.js → dynamicFormsStateMachine-CoOWTzyM.esm.js} +4 -5
- package/dist/ekyb.d.ts +5 -5
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-DeoMcZEz.esm.js → ekybManager-BBkdPxUY.esm.js} +23 -27
- package/dist/{ekybManager-BwRuGAwt.d.ts → ekybManager-BaZ_7CEu.d.ts} +4 -4
- package/dist/{ekybStateMachine-D1IJ1Z72.esm.js → ekybStateMachine-n4Iz9iLc.esm.js} +338 -14
- package/dist/ekyc.d.ts +2 -2
- package/dist/ekyc.esm.js +3 -3
- package/dist/{ekycManager-BX2d46FY.esm.js → ekycManager-BO-Lui3t.esm.js} +29 -36
- package/dist/{ekycManager-DLzDuBzI.d.ts → ekycManager-DW-ynodd.d.ts} +3 -3
- package/dist/ekycStateMachine-CDnI_NRq.esm.js +1443 -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-yYUc30na.esm.js → electronicSignatureManager-BtWCrz5_.esm.js} +10 -11
- 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-ButFktRm.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-BXtlC0NV.esm.js} +3 -4
- package/dist/{events-ijlbX_Wx.esm.js → events-Du2A4-Qr.esm.js} +203 -8
- 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-1hzeS_rB.d.ts} +11 -51
- package/dist/{faceCaptureManagerFactory-B6i9QcAk.esm.js → faceCaptureManagerFactory-CwZUeYfq.esm.js} +19 -54
- package/dist/{faceCaptureSetup-DU1mjRr6.esm.js → faceCaptureSetup-CYbdKNlI.esm.js} +104 -396
- package/dist/{faceMatchManager-BnvrZM2F.d.ts → faceMatchManager-DIgG-UFS.d.ts} +1 -2
- package/dist/{faceMatchManager-Bmv0HzuY.esm.js → faceMatchManager-DWFUQjMQ.esm.js} +3 -3
- package/dist/{faceMatchStateMachine-mRIHQ3dA.esm.js → faceMatchStateMachine-CUCvlydD.esm.js} +6 -5
- package/dist/{feature-management-C8CuN0os.esm.js → feature-management-rTfjzdDa.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-v3knTYV_.esm.js} +35 -18
- 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-Dt9fHG7h.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-DccgtDnm.esm.js → flowCompletionService-oiK1PjPr.esm.js} +2 -3
- package/dist/{flowServices-CdsWsppG.esm.js → flowServices-CTc-zqfN.esm.js} +11 -8
- package/dist/geolocation.d.ts +1 -1
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-CGHBxtMb.esm.js → geolocationManager-BOdtVuR8.esm.js} +6 -7
- package/dist/{geolocationManager-Cz744E5S.d.ts → geolocationManager-Dn24g1fl.d.ts} +2 -3
- package/dist/{geolocationStateMachine-CdEb1Gn0.esm.js → geolocationStateMachine-BnGuZ3hn.esm.js} +4 -5
- 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-BtXWHICu.esm.js} +3 -3
- package/dist/{governmentValidationStateMachine-CoaZOSTP.esm.js → governmentValidationStateMachine-COL-Vs48.esm.js} +3 -4
- package/dist/home.d.ts +3 -26
- package/dist/home.esm.js +2 -2
- package/dist/http.esm.js +1 -1
- 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-Dl64Trv5.esm.js → idCaptureDefaults-BGsG2OAs.esm.js} +7 -5
- package/dist/{idCaptureManager-BHwL2Z0V.d.ts → idCaptureManager-0M02hSuC.d.ts} +242 -98
- package/dist/{idCaptureManager-BNmVJQkd.esm.js → idCaptureManager-BKedt48Y.esm.js} +276 -210
- package/dist/{idCaptureServices-dtDG2HXS.esm.js → idCaptureServices-D0p_RFqk.esm.js} +21 -40
- package/dist/{idCaptureStateMachine-BbiZD3uf.esm.js → idCaptureStateMachine-CxwoN5ff.esm.js} +992 -872
- package/dist/{idOcrManager-ByWuQ4ej.esm.js → idOcrManager-D3-HNMXP.esm.js} +3 -3
- package/dist/{idOcrManager-CFlDwUvN.d.ts → idOcrManager-DT3kPIB3.d.ts} +3 -4
- package/dist/{idOcrStateMachine-Bt_abXQQ.esm.js → idOcrStateMachine-DyENX6Ki.esm.js} +3 -4
- package/dist/{idVerificationManager-BB4Pj_N6.d.ts → idVerificationManager-BJapZfpy.d.ts} +2 -3
- package/dist/{idVerificationManager-DT42c77H.esm.js → idVerificationManager-iWz7Avkr.esm.js} +3 -3
- package/dist/{idVerificationStateMachine-DbDVIh9t.esm.js → idVerificationStateMachine-CL1kUdBe.esm.js} +3 -4
- package/dist/identity-reuse.d.ts +2 -2
- package/dist/identity-reuse.esm.js +2 -2
- package/dist/{identityReuseManager-BXEBBI3N.d.ts → identityReuseManager-B1birg5X.d.ts} +162 -44
- package/dist/{identityReuseManager-yG3acUrQ.esm.js → identityReuseManager-CD1ucp1d.esm.js} +26 -13
- package/dist/{identityReuseStateMachine-BhAkuIra.esm.js → identityReuseStateMachine-DfV81wQC.esm.js} +89 -24
- package/dist/{index-CeaC32qI.d.ts → index-CKQ9QBZP.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-DYrkOXO6.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-Cwqx1nK7.esm.js} +3 -3
- package/dist/{mandatoryConsentManager-DFVm_i2B.d.ts → mandatoryConsentManager-okPILEru.d.ts} +8 -9
- package/dist/{mandatoryConsentStateMachine-DC5Mo6M1.esm.js → mandatoryConsentStateMachine-pXWqAHo_.esm.js} +3 -4
- package/dist/{multipartRecordingService-mwKFTlhR.esm.js → multipartRecordingService-CLwrF5wD.esm.js} +1 -2
- package/dist/{permissionGuards-D6TfVop2.esm.js → permissionGuards-gcy3U0SL.esm.js} +1 -1
- package/dist/{permissionServices-EY3_Vx6c.esm.js → permissionServices-Ca-tSNhT.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-BBU8Lq0O.d.ts → phoneManager-BO-LTih5.d.ts} +16 -3
- package/dist/{phoneManager-IjhSv5XS.esm.js → phoneManager-KKUq-Vgo.esm.js} +31 -22
- package/dist/{phoneStateMachine-CXdXufKg.esm.js → phoneStateMachine-D2QWS2cu.esm.js} +38 -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-BD2PvT5B.d.ts → redirectToMobileManager-CVsvpVbQ.d.ts} +2 -2
- package/dist/{redirectToMobileManager-FLEWJtv8.esm.js → redirectToMobileManager-uHW3dyuQ.esm.js} +4 -4
- package/dist/{redirectToMobileStateMachine-CSWWgUTO.esm.js → redirectToMobileStateMachine-b-H-ipGM.esm.js} +4 -5
- package/dist/{rolldown-runtime-FDOR9p9I.esm.js → rolldown-runtime-B-1-B7_t.esm.js} +10 -1
- package/dist/{runChildModule-B2Y_hlix.esm.js → runChildModule-CPa0i2_C.esm.js} +13 -12
- package/dist/safeStorage-UxDrnjwa.esm.js +35 -0
- package/dist/{sdkVersion-N1UiyFiY.esm.js → sdkVersion-BtROs6OA.esm.js} +1 -1
- package/dist/selfie.d.ts +4 -4
- package/dist/selfie.esm.js +12 -12
- package/dist/selfieErrorUtils-sMc0MaNh.esm.js +21 -0
- package/dist/{selfieManager-BSZG891S.d.ts → selfieManager-BJdNu_nd.d.ts} +2 -8
- package/dist/{selfieManager-AS6wfUvZ.esm.js → selfieManager-Ch9xJbWJ.esm.js} +6 -6
- package/dist/selfieStateMachine-DT8QCfKR.esm.js +41 -0
- package/dist/{session-BESZc05k.esm.js → session-CNNTckUS.esm.js} +5 -6
- package/dist/session.d.ts +15 -3
- package/dist/session.esm.js +30 -5
- package/dist/sessionInitializer-DVWMJh25.esm.js +973 -0
- package/dist/{setup-BuPbxpwF.esm.js → setup-B7ehQ-lf.esm.js} +155 -140
- package/dist/{setup-Cyko6cAn.d.ts → setup-YPKTUCY5.d.ts} +42 -15
- 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-f_dPAGXn.esm.js} +7 -11
- package/dist/{signatureStateMachine-ce_XMA3l.esm.js → signatureStateMachine-C-nUq_oq.esm.js} +3 -4
- 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-BEvexnKC.esm.js} +1 -2
- package/dist/stats.esm.js +1 -1
- package/dist/{sessionInitializer-CnhAkMUN.esm.js → thumbmark.esm-CRc0cYvz.esm.js} +33 -776
- package/dist/{trueSightService-M5VpCo96.esm.js → trueSightService-BzLdXpmJ.esm.js} +1391 -709
- 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-B6HsSzpk.d.ts} +6 -7
- package/dist/{types-DEGVXwsk2.d.ts → types-BAxn7MpY.d.ts} +110 -62
- package/dist/{types-BfgmV7s7.d.ts → types-BQA7lRDV.d.ts} +1 -1
- package/dist/{types-Cx-1zo-i.d.ts → types-BvLo3U4u.d.ts} +1 -1
- package/dist/{types-Bx-BWveD.d.ts → types-CK8Jbjkp.d.ts} +1 -1
- package/dist/{types-CxGdmzxa.d.ts → types-Ckir_BEs.d.ts} +1 -1
- package/dist/{types-BjSly8cp.d.ts → types-DUnFZ08M.d.ts} +1 -1
- package/dist/{types-ESdtnHtg.d.ts → types-yPH8lAH-.d.ts} +3 -4
- package/dist/types-zOgZqMni.d.ts +6 -0
- 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 +1390 -1349
- package/dist/{videoSelfieCameraWarmer-q9ZjvXu9.esm.js → videoSelfieCameraWarmer-DWoFBJAn.esm.js} +10 -11
- package/dist/{videoSelfieFlowModuleMachine-BUe2uACW.esm.js → videoSelfieFlowModuleMachine-BCFVHBQ1.esm.js} +1 -1
- package/dist/{videoSelfieStepDetector-ChYgFM15.d.ts → videoSelfieStepDetector-CGsTltqB.d.ts} +4 -4
- package/dist/videoTrimByCopy-BFfAiNpv.esm.js +15901 -0
- package/dist/{warmup-ChDwHSel.esm.js → warmup-BElYWRh7.esm.js} +348 -11
- package/dist/{warmup-Cis2p6O0.d.ts → warmup-BO57syF6.d.ts} +8 -0
- package/dist/wasm.d.ts +2 -2
- package/dist/wasm.esm.js +3 -4
- package/dist/{wasmDsFlagSync-DYrLUEII.esm.js → wasmDsFlagSync-CYj5LL9z.esm.js} +1 -1
- package/dist/{wasmWebClient-B7baE-Wf.esm.js → wasmWebClient-BjZw_7OB.esm.js} +570 -33
- 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-CZZOFkGl.esm.js} +7 -5
- package/dist/{watchlistForBusinessStateMachine-CJ-MvUre.esm.js → watchlistForBusinessStateMachine-B66E7jud.esm.js} +3 -4
- package/dist/{watchlistManager-DLXef90v.d.ts → watchlistManager-DJQOd8Pw.d.ts} +2 -2
- package/dist/{watchlistManager-CixcLNDT.esm.js → watchlistManager-DXtX94SN.esm.js} +3 -3
- package/dist/{watchlistStateMachine-CBqk2w-h.esm.js → watchlistStateMachine-McALifag.esm.js} +3 -4
- package/dist/workflow.d.ts +34 -5
- package/dist/workflow.esm.js +64 -47
- 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/BrowserDiagnosticsCryptoProvider-BuzqvbhN.esm.js +0 -77
- package/dist/StateMachine-EDpYWy0i.d.ts +0 -6
- package/dist/api-Bx3gKW_y.esm.js +0 -129
- 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-DY7vJVNY.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,9 +1,8 @@
|
|
|
1
|
-
import { t as api } from "./api-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { n as
|
|
6
|
-
import { a as getPostalCodeMaxLength, c as STREET_LEVEL_REQUIRED_ERROR, d as usStateOptions, i as getPostalCodeErrorKey, l as fillFromSuggestion, n as FIXED_DIGIT_POSTAL_CODE_LENGTH, o as validatePostalCode, r as formatPostalCode, s as DYNAMIC_REQUIRED_KEY, t as debounceSearchActor, u as getStreetLevelErrorForSuggestion } from "./addressSearch-DyHGgeX8.esm.js";
|
|
1
|
+
import { t as api, u as endpoints } from "./api-Cz90EHyu.esm.js";
|
|
2
|
+
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-CTc-zqfN.esm.js";
|
|
3
|
+
import { i as assign, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
|
|
4
|
+
import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
|
|
5
|
+
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-DPjIKJrX.esm.js";
|
|
7
6
|
//#region src/modules/ekyb/ekybValidators.ts
|
|
8
7
|
function cleanCnpjString(cnpj) {
|
|
9
8
|
return cnpj.replace(/\./g, "").replace(/\//g, "").replace(/-/g, "");
|
|
@@ -175,6 +174,309 @@ function requiresCnpjValidation(country) {
|
|
|
175
174
|
return COUNTRIES_WITH_CNPJ_VALIDATION.includes(country);
|
|
176
175
|
}
|
|
177
176
|
//#endregion
|
|
177
|
+
//#region ../form-definitions/generated/ekyb.ts
|
|
178
|
+
const EKYB_DEFINITIONS = {
|
|
179
|
+
"ekyb/MX": {
|
|
180
|
+
schemaVersion: 1,
|
|
181
|
+
vocabulary: "1.0",
|
|
182
|
+
id: "ekyb/MX",
|
|
183
|
+
module: "ekyb",
|
|
184
|
+
country: "MX",
|
|
185
|
+
fields: [
|
|
186
|
+
{
|
|
187
|
+
name: "businessName",
|
|
188
|
+
kind: "text",
|
|
189
|
+
group: "businessName",
|
|
190
|
+
required: true,
|
|
191
|
+
label: { key: "ekyb.businessName" },
|
|
192
|
+
input: { autofill: "organization" }
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
name: "taxId",
|
|
196
|
+
kind: "text",
|
|
197
|
+
group: "taxId",
|
|
198
|
+
required: true,
|
|
199
|
+
label: { key: "ekyb.taxId" }
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
name: "postalCode",
|
|
203
|
+
kind: "text",
|
|
204
|
+
group: "address",
|
|
205
|
+
required: true,
|
|
206
|
+
label: { key: "ekyb.postalCode" },
|
|
207
|
+
input: {
|
|
208
|
+
maxLength: 5,
|
|
209
|
+
autofill: "postalCode"
|
|
210
|
+
},
|
|
211
|
+
rules: [{ id: "postalCodeFormat" }]
|
|
212
|
+
}
|
|
213
|
+
],
|
|
214
|
+
submit: {
|
|
215
|
+
static: { plugins: ["ekyb"] },
|
|
216
|
+
context: { country: "country" }
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"ekyb/US": {
|
|
220
|
+
schemaVersion: 1,
|
|
221
|
+
vocabulary: "1.0",
|
|
222
|
+
id: "ekyb/US",
|
|
223
|
+
module: "ekyb",
|
|
224
|
+
country: "US",
|
|
225
|
+
fields: [
|
|
226
|
+
{
|
|
227
|
+
name: "businessName",
|
|
228
|
+
kind: "text",
|
|
229
|
+
group: "businessName",
|
|
230
|
+
required: true,
|
|
231
|
+
label: { key: "ekyb.businessName" },
|
|
232
|
+
input: { autofill: "organization" }
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
name: "taxId",
|
|
236
|
+
kind: "text",
|
|
237
|
+
group: "taxId",
|
|
238
|
+
required: true,
|
|
239
|
+
label: { key: "ekyb.taxId" }
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
name: "street",
|
|
243
|
+
kind: "text",
|
|
244
|
+
group: "address",
|
|
245
|
+
required: true,
|
|
246
|
+
widget: "addressSearch",
|
|
247
|
+
label: { key: "ekyb.street" },
|
|
248
|
+
input: { autofill: "addressLine1" }
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
name: "houseNo",
|
|
252
|
+
kind: "text",
|
|
253
|
+
group: "address",
|
|
254
|
+
required: true,
|
|
255
|
+
label: { key: "ekyb.houseNo" }
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
name: "addressLine2",
|
|
259
|
+
kind: "text",
|
|
260
|
+
group: "address",
|
|
261
|
+
label: { key: "ekyb.addressLine2" },
|
|
262
|
+
input: { autofill: "addressLine2" }
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
name: "city",
|
|
266
|
+
kind: "text",
|
|
267
|
+
group: "address",
|
|
268
|
+
required: true,
|
|
269
|
+
label: { key: "ekyb.city" },
|
|
270
|
+
input: { autofill: "addressLevel2" }
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
name: "state",
|
|
274
|
+
kind: "choice",
|
|
275
|
+
group: "address",
|
|
276
|
+
required: true,
|
|
277
|
+
widget: "select",
|
|
278
|
+
label: { key: "ekyb.state" },
|
|
279
|
+
placeholder: { key: "verification.placeholder.state" },
|
|
280
|
+
input: { autofill: "addressLevel1" },
|
|
281
|
+
optionsRef: "US_STATES"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
name: "postalCode",
|
|
285
|
+
kind: "text",
|
|
286
|
+
group: "address",
|
|
287
|
+
required: true,
|
|
288
|
+
label: { key: "ekyb.postalCode" },
|
|
289
|
+
input: {
|
|
290
|
+
maxLength: 10,
|
|
291
|
+
autofill: "postalCode"
|
|
292
|
+
},
|
|
293
|
+
rules: [{ id: "postalCodeFormat" }]
|
|
294
|
+
}
|
|
295
|
+
],
|
|
296
|
+
collections: [{
|
|
297
|
+
id: "ubos",
|
|
298
|
+
group: "ubos",
|
|
299
|
+
min: 1,
|
|
300
|
+
max: 8,
|
|
301
|
+
fields: [{
|
|
302
|
+
name: "name",
|
|
303
|
+
kind: "text",
|
|
304
|
+
group: "ubos",
|
|
305
|
+
required: true,
|
|
306
|
+
label: { key: "ekyb.uboName" }
|
|
307
|
+
}, {
|
|
308
|
+
name: "surname",
|
|
309
|
+
kind: "text",
|
|
310
|
+
group: "ubos",
|
|
311
|
+
required: true,
|
|
312
|
+
label: { key: "ekyb.uboSurname" }
|
|
313
|
+
}],
|
|
314
|
+
payload: {
|
|
315
|
+
key: "uboNames",
|
|
316
|
+
join: ["name", "surname"]
|
|
317
|
+
}
|
|
318
|
+
}],
|
|
319
|
+
submit: {
|
|
320
|
+
static: { plugins: ["ekyb"] },
|
|
321
|
+
context: { country: "country" }
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
//#endregion
|
|
326
|
+
//#region src/modules/ekyb/ekybForm.ts
|
|
327
|
+
/**
|
|
328
|
+
* eKYB adapter for form definitions.
|
|
329
|
+
*
|
|
330
|
+
* Selects the bundled definition for a country, resolves it against the
|
|
331
|
+
* verification fields from module configuration, and projects the result to
|
|
332
|
+
* today's public `EkybFieldDef[]` shape. A country without a projectable
|
|
333
|
+
* definition, or a custom field list that can't be expressed as groups, keeps
|
|
334
|
+
* the current builder.
|
|
335
|
+
*/
|
|
336
|
+
/** eKYB group id → the verification-field entries that turn it on. */
|
|
337
|
+
const EKYB_GROUP_ENTRIES = {
|
|
338
|
+
businessName: ["name-user_input"],
|
|
339
|
+
taxId: ["taxId-user_input"],
|
|
340
|
+
address: [
|
|
341
|
+
"street-user_input",
|
|
342
|
+
"houseNo-user_input",
|
|
343
|
+
"address2-user_input",
|
|
344
|
+
"city-user_input",
|
|
345
|
+
"state-user_input",
|
|
346
|
+
"postalCode-user_input"
|
|
347
|
+
],
|
|
348
|
+
ubos: ["ubos-user_input"]
|
|
349
|
+
};
|
|
350
|
+
const KNOWN_ENTRIES = new Set(Object.values(EKYB_GROUP_ENTRIES).flat());
|
|
351
|
+
const OPTION_LISTS = { US_STATES: usStateOptions };
|
|
352
|
+
/** Vocabulary rules expressed as today's `EkybValidationRule` objects. */
|
|
353
|
+
const RULES = {
|
|
354
|
+
cnpj: () => ({ type: "cnpj" }),
|
|
355
|
+
postalCodeFormat: (country) => ({
|
|
356
|
+
type: "postalCodeFormat",
|
|
357
|
+
country
|
|
358
|
+
})
|
|
359
|
+
};
|
|
360
|
+
const EKYB_SUPPORTED_IDS = {
|
|
361
|
+
schemaVersions: [1],
|
|
362
|
+
vocabulary: "1.0",
|
|
363
|
+
kinds: /* @__PURE__ */ new Set(["text", "choice"]),
|
|
364
|
+
groups: new Set(Object.keys(EKYB_GROUP_ENTRIES)),
|
|
365
|
+
rules: new Set(Object.keys(RULES)),
|
|
366
|
+
transforms: /* @__PURE__ */ new Set(),
|
|
367
|
+
groupRules: /* @__PURE__ */ new Set(),
|
|
368
|
+
optionLists: new Set(Object.keys(OPTION_LISTS)),
|
|
369
|
+
conditions: /* @__PURE__ */ new Set()
|
|
370
|
+
};
|
|
371
|
+
/** Today's UBO actions use a fixed limit and a single collection. */
|
|
372
|
+
const UBO_COLLECTION = "ubos";
|
|
373
|
+
/**
|
|
374
|
+
* Whether today's code handles a field the way its definition says. Today's
|
|
375
|
+
* validators show their own message, so a rule can't carry one. The field
|
|
376
|
+
* shape has no hint, suggestions, sections or Text params, and the UI shows a
|
|
377
|
+
* placeholder only on dropdowns. `buildEkybSubmitPayload` sends the value
|
|
378
|
+
* under the field name, unchanged. Input formatting and request bodies stay
|
|
379
|
+
* in today's code until P2.
|
|
380
|
+
*/
|
|
381
|
+
function isProjectableField(field) {
|
|
382
|
+
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;
|
|
383
|
+
}
|
|
384
|
+
/** The only properties today's owner fields honor. */
|
|
385
|
+
const UBO_FIELD_KEYS = /* @__PURE__ */ new Set([
|
|
386
|
+
"name",
|
|
387
|
+
"kind",
|
|
388
|
+
"group",
|
|
389
|
+
"required",
|
|
390
|
+
"label"
|
|
391
|
+
]);
|
|
392
|
+
/**
|
|
393
|
+
* Today's owner code is fixed: owner 1 is required, up to `UBO_INPUT_LIMIT`
|
|
394
|
+
* owners, each with a required name and surname under `UBO_FIELD_LABELS`, and
|
|
395
|
+
* the request body joins them into `uboNames`. A collection is projectable
|
|
396
|
+
* only when it declares exactly that.
|
|
397
|
+
*/
|
|
398
|
+
function isProjectableUboCollection(collection) {
|
|
399
|
+
const { key, join } = collection.payload;
|
|
400
|
+
const names = collection.fields.map((field) => field.name);
|
|
401
|
+
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]);
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Caches the check per definition object. Bundled definitions are singletons
|
|
405
|
+
* created once at module load, so each is checked once. A served source (P4)
|
|
406
|
+
* that builds new objects per call would still be correct, but would miss
|
|
407
|
+
* this cache; key it by definition id and version then.
|
|
408
|
+
*/
|
|
409
|
+
const projectable = /* @__PURE__ */ new WeakMap();
|
|
410
|
+
/** Whether every part of a definition maps onto today's `EkybFieldDef`. */
|
|
411
|
+
function isProjectableEkybDefinition(definition) {
|
|
412
|
+
let result = projectable.get(definition);
|
|
413
|
+
if (result === void 0) {
|
|
414
|
+
result = definition.module === "ekyb" && checkSupport(definition, EKYB_SUPPORTED_IDS).supported && !definition.sections?.length && definition.fields.every(isProjectableField) && (definition.collections ?? []).every(isProjectableUboCollection);
|
|
415
|
+
projectable.set(definition, result);
|
|
416
|
+
}
|
|
417
|
+
return result;
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Maps module configuration to groups. Returns `undefined` when the field
|
|
421
|
+
* list can't be expressed as whole groups (an unknown entry, or part of the
|
|
422
|
+
* address), so the current builder keeps handling it.
|
|
423
|
+
*/
|
|
424
|
+
function toEkybResolveContext(config, verificationFields) {
|
|
425
|
+
const entries = verificationFields.filter((entry) => !entry.startsWith("socure"));
|
|
426
|
+
if (entries.some((entry) => !KNOWN_ENTRIES.has(entry))) return void 0;
|
|
427
|
+
const groups = {};
|
|
428
|
+
for (const [group, groupEntries] of Object.entries(EKYB_GROUP_ENTRIES)) {
|
|
429
|
+
const present = groupEntries.filter((e) => entries.includes(e)).length;
|
|
430
|
+
if (present !== 0 && present !== groupEntries.length) return void 0;
|
|
431
|
+
groups[group] = present > 0;
|
|
432
|
+
}
|
|
433
|
+
groups.ubos = groups.ubos === true && config.checkUniqueBeneficialOwner !== false;
|
|
434
|
+
return { groups };
|
|
435
|
+
}
|
|
436
|
+
const bundled = createBundledDefinitionSource(EKYB_DEFINITIONS);
|
|
437
|
+
/** The resolved definition for this country and configuration, if one applies. */
|
|
438
|
+
function selectEkybForm(config, verificationFields, country) {
|
|
439
|
+
const context = toEkybResolveContext(config, verificationFields);
|
|
440
|
+
if (!context) return void 0;
|
|
441
|
+
const definition = bundled.select({
|
|
442
|
+
module: "ekyb",
|
|
443
|
+
country
|
|
444
|
+
});
|
|
445
|
+
if (!definition || !isProjectableEkybDefinition(definition)) return void 0;
|
|
446
|
+
return resolveForm(definition, context);
|
|
447
|
+
}
|
|
448
|
+
function projectField(field, required, country) {
|
|
449
|
+
const def = {
|
|
450
|
+
name: field.name,
|
|
451
|
+
type: field.kind === "choice" ? "dropdown" : "text",
|
|
452
|
+
label: field.label.key,
|
|
453
|
+
required
|
|
454
|
+
};
|
|
455
|
+
if (field.placeholder) def.placeholder = field.placeholder.key;
|
|
456
|
+
if (field.displayLabel) def.displayLabel = field.displayLabel.text ?? field.displayLabel.key;
|
|
457
|
+
if (field.input?.maxLength !== void 0) def.maxLength = field.input.maxLength;
|
|
458
|
+
if (field.optionsRef) def.options = OPTION_LISTS[field.optionsRef];
|
|
459
|
+
else if (field.options) def.options = field.options.map((option) => ({
|
|
460
|
+
value: option.value,
|
|
461
|
+
label: option.label.key
|
|
462
|
+
}));
|
|
463
|
+
const validation = required ? [{ type: "required" }] : [];
|
|
464
|
+
for (const rule of field.rules ?? []) {
|
|
465
|
+
const project = RULES[rule.id];
|
|
466
|
+
if (project) validation.push(project(country));
|
|
467
|
+
}
|
|
468
|
+
if (validation.length > 0) def.validation = validation;
|
|
469
|
+
return def;
|
|
470
|
+
}
|
|
471
|
+
/** Projects a resolved definition to today's `EkybFieldDef[]`. */
|
|
472
|
+
function projectEkybFields(form, country) {
|
|
473
|
+
return form.fields.map(({ field, required }) => projectField(field, required, country));
|
|
474
|
+
}
|
|
475
|
+
/** Whether the resolved form collects beneficial owners. */
|
|
476
|
+
function hasUboCollection(form) {
|
|
477
|
+
return form.collections.some((c) => c.collection.id === UBO_COLLECTION);
|
|
478
|
+
}
|
|
479
|
+
//#endregion
|
|
178
480
|
//#region src/modules/ekyb/ekybActions.ts
|
|
179
481
|
function buildEkybValidationRules(fieldName, required, country) {
|
|
180
482
|
const rules = [];
|
|
@@ -186,6 +488,25 @@ function buildEkybValidationRules(fieldName, required, country) {
|
|
|
186
488
|
});
|
|
187
489
|
return rules;
|
|
188
490
|
}
|
|
491
|
+
/**
|
|
492
|
+
* Fields and beneficial-owner state for a country. A country with a form
|
|
493
|
+
* definition (`packages/form-definitions/catalog/ekyb`) reads it; any other
|
|
494
|
+
* country, or a custom field list that isn't whole groups, keeps the current
|
|
495
|
+
* builder and its UBO rule.
|
|
496
|
+
*/
|
|
497
|
+
function buildEkybForm(config, verificationFields, country) {
|
|
498
|
+
const form = selectEkybForm(config, verificationFields, country);
|
|
499
|
+
if (form) return {
|
|
500
|
+
fields: projectEkybFields(form, country),
|
|
501
|
+
hasUbos: hasUboCollection(form)
|
|
502
|
+
};
|
|
503
|
+
const hasUbos = config.checkUniqueBeneficialOwner !== false && verificationFields.includes("ubos-user_input") && country !== "MX";
|
|
504
|
+
return {
|
|
505
|
+
fields: buildEkybFields(verificationFields, country, hasUbos),
|
|
506
|
+
hasUbos
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
/** The per-country builder for countries without a form definition yet. */
|
|
189
510
|
function buildEkybFields(verificationFields, country, _hasUbos) {
|
|
190
511
|
let modules = verificationFields.filter((f) => f !== "ubos-user_input" && !f.startsWith("socure"));
|
|
191
512
|
if (country === "GB") modules = modules.filter((m) => m !== "state-user_input");
|
|
@@ -233,6 +554,12 @@ function processEkybFieldValue(name, value, country) {
|
|
|
233
554
|
if (name === "postalCode") return formatPostalCode(value, country);
|
|
234
555
|
return value;
|
|
235
556
|
}
|
|
557
|
+
/**
|
|
558
|
+
* Builds the request body. Keep it in sync with `isProjectableField` and
|
|
559
|
+
* `isProjectableUboCollection` in `ekybForm.ts`: definitions are projectable
|
|
560
|
+
* only when they declare exactly this handling, until P2 builds request
|
|
561
|
+
* bodies from them.
|
|
562
|
+
*/
|
|
236
563
|
function buildEkybSubmitPayload(ctx) {
|
|
237
564
|
const uboNames = ctx.ubos.filter((u) => u.name.trim() || u.surname.trim()).map((u) => `${u.name.trim()} ${u.surname.trim()}`.trim());
|
|
238
565
|
const payload = {
|
|
@@ -307,13 +634,12 @@ const ekybMachine = setup({
|
|
|
307
634
|
checkUniqueBeneficialOwner: fetched.checkUniqueBeneficialOwner
|
|
308
635
|
};
|
|
309
636
|
const country = "US";
|
|
310
|
-
const
|
|
311
|
-
const hasUbos = config.checkUniqueBeneficialOwner !== false && vFields.includes("ubos-user_input");
|
|
637
|
+
const { fields, hasUbos } = buildEkybForm(config, getDefaultVerificationFields(config), country);
|
|
312
638
|
return {
|
|
313
639
|
config,
|
|
314
640
|
country,
|
|
315
641
|
availableCountries: ALL_COUNTRIES,
|
|
316
|
-
fields
|
|
642
|
+
fields,
|
|
317
643
|
values: { country },
|
|
318
644
|
validationErrors: void 0,
|
|
319
645
|
ubos: hasUbos ? [{
|
|
@@ -331,8 +657,7 @@ const ekybMachine = setup({
|
|
|
331
657
|
setCountry: assign(({ context, event }) => {
|
|
332
658
|
const { country } = event;
|
|
333
659
|
const vFields = getDefaultVerificationFields(context.config);
|
|
334
|
-
const hasUbos = context.config
|
|
335
|
-
const fields = buildEkybFields(vFields, country, hasUbos);
|
|
660
|
+
const { fields, hasUbos } = buildEkybForm(context.config, vFields, country);
|
|
336
661
|
let nextId = context._nextUboId;
|
|
337
662
|
let ubos;
|
|
338
663
|
if (hasUbos) if (context.ubos.length > 0) ubos = context.ubos;
|
|
@@ -485,13 +810,12 @@ const ekybMachine = setup({
|
|
|
485
810
|
context: ({ input }) => {
|
|
486
811
|
const config = toEkybConfig(input.config);
|
|
487
812
|
const country = "US";
|
|
488
|
-
const
|
|
489
|
-
const hasUbos = config.checkUniqueBeneficialOwner !== false && vFields.includes("ubos-user_input");
|
|
813
|
+
const { fields, hasUbos } = buildEkybForm(config, getDefaultVerificationFields(config), country);
|
|
490
814
|
return {
|
|
491
815
|
config,
|
|
492
816
|
country,
|
|
493
817
|
availableCountries: ALL_COUNTRIES,
|
|
494
|
-
fields
|
|
818
|
+
fields,
|
|
495
819
|
values: { country },
|
|
496
820
|
validationErrors: void 0,
|
|
497
821
|
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-CDnI_NRq.esm.js";
|
|
3
|
+
import { t as createEkycManager } from "./ekycManager-BO-Lui3t.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-Du2A4-Qr.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-CDnI_NRq.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;
|