@incodetech/core 0.0.0-dev-20260715-b208c5e1 → 0.0.0-dev-20260715-dcc78bcd
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{3dAvatarProvider-BYxFCuIv.esm.js → 3dAvatarProvider-D9H4rR6_.esm.js} +811 -880
- package/dist/Actor-iTq7YY48.d.ts +1 -0
- package/dist/{BrowserStorageProvider-CBXGCHnK.esm.js → BrowserStorageProvider-P6aUarE9.esm.js} +1 -2
- package/dist/{BrowserTimerProvider-CHloo0eQ.esm.js → BrowserTimerProvider-BXhgNxLt.esm.js} +1 -2
- package/dist/{BrowserVisibilityObserverProvider-B04zvOXW.esm.js → BrowserVisibilityObserverProvider-sJclps4C.esm.js} +1 -3
- package/dist/{Face2DProvider-TeN1Xqr0.esm.js → Face2DProvider-xWUeSJZI.esm.js} +10 -22
- package/dist/{createFaceAvatar-BjBu2CrU.d.ts → FaceDetectionProvider-BHweGBEM.d.ts} +108 -159
- package/dist/IFaceAvatarCapability-BrL19G0s.d.ts +23 -0
- package/dist/IStorageCapability-B8IGxCwe.d.ts +131 -0
- package/dist/{ITimerCapability-G7lQg-be.esm.js → ITimerCapability-DgdDzp8G.esm.js} +1 -2
- package/dist/{Manager-DE5DydXZ.d.ts → Manager-CQQ99QOI.d.ts} +1 -0
- package/dist/{MotionSensorProvider-BkHKMCPE.esm.js → MotionSensorProvider-DYvM90IX.esm.js} +1 -2
- package/dist/{OpenViduRecordingProvider-xR5osKzW.esm.js → OpenViduRecordingProvider-Du98qevC.esm.js} +2 -4
- package/dist/{PrivacyLensProvider-CqlsCaJv.esm.js → PrivacyLensProvider-BrYSd1dr.esm.js} +2 -5
- package/dist/StateMachine-EDpYWy0i.d.ts +6 -0
- package/dist/{StreamCanvasCapture-CRk7c7u7.esm.js → StreamCanvasCapture-D2XcXCZ4.esm.js} +2 -4
- package/dist/{WasmUtilProvider-BNQ2PBjG.esm.js → WasmUtilProvider-DAshwHhX.esm.js} +38 -71
- package/dist/{addressSearch-B2NxSpHl.esm.js → addressSearch-DH-IPF-w.esm.js} +10 -21
- package/dist/ae-signature.d.ts +2 -6
- package/dist/ae-signature.esm.js +10 -11
- package/dist/antifraud.d.ts +1 -6
- package/dist/antifraud.esm.js +3 -8
- package/dist/{antifraudManager-C490m0p4.d.ts → antifraudManager-BY36bS12.d.ts} +3 -3
- package/dist/{antifraudManager-C1xnhF2Q.esm.js → antifraudManager-CL2YhiVX.esm.js} +11 -8
- package/dist/{antifraudStateMachine-BQVw46N5.esm.js → antifraudStateMachine-Bf-IiCq7.esm.js} +5 -7
- package/dist/{api-DsbUi7TO.esm.js → api-BDTZNnca.esm.js} +1 -2
- package/dist/{apiError-DkOXfFBu.esm.js → apiError-COvIGYWe.esm.js} +1 -2
- package/dist/authentication.d.ts +2 -19
- package/dist/authentication.esm.js +3 -34
- package/dist/{authenticationManager-DZXQpCjQ.esm.js → authenticationManager-DM7ttL5V.esm.js} +7 -10
- package/dist/{authenticationManager-BD81fnrn.d.ts → authenticationManager-G-k-13Fe.d.ts} +3 -4
- package/dist/{authenticationStateMachine-CJrTbLWU.esm.js → authenticationStateMachine-DiI8jfmO.esm.js} +11 -15
- package/dist/avatar.d.ts +2 -2
- package/dist/avatar.esm.js +2 -3
- package/dist/{backCameraStream-DYnfq7Hr.esm.js → backCameraStream-Heg6vA1j.esm.js} +4 -7
- package/dist/browser-DlFgHpoC-DnyrCR8r.esm.js +1513 -0
- package/dist/callback-645_omgz.d.ts +133 -0
- package/dist/{camera-B0yWS33x.esm.js → camera-BmFEyPP_.esm.js} +1 -2
- package/dist/camera.d.ts +1 -2
- package/dist/camera.esm.js +2 -6
- package/dist/{canvas-DsJa51yU.esm.js → canvas-E1zGkel4.esm.js} +1 -2
- package/dist/certificate-issuance.d.ts +34 -39
- package/dist/certificate-issuance.esm.js +4 -11
- package/dist/{certificateIssuanceStateMachine-CpewPqas.esm.js → certificateIssuanceStateMachine-Ce568YfR.esm.js} +7 -11
- package/dist/{clientLifecycle-CCJMDjFe.esm.js → clientLifecycle-DzT65Fvf.esm.js} +23 -29
- package/dist/consent.d.ts +1 -4
- package/dist/consent.esm.js +3 -8
- package/dist/{consentManager-r4MTIoV3.esm.js → consentManager-D3GyyH5u.esm.js} +5 -7
- package/dist/{consentManager-QGuw4zmH.d.ts → consentManager-DLOyIZzt.d.ts} +58 -64
- package/dist/{consentStateMachine-DnqwsZ7o.esm.js → consentStateMachine-Pc3Ez3mV.esm.js} +5 -7
- package/dist/{cpf-B9htWzDt.esm.js → cpf-BIADjddF.esm.js} +1 -2
- package/dist/cpf-ocr.d.ts +1 -5
- package/dist/cpf-ocr.esm.js +2 -8
- package/dist/{cpfOcrManager-RkeZCqSz.d.ts → cpfOcrManager-CQkUAeWO.d.ts} +21 -23
- package/dist/{cpfOcrManager-D6ZQ9kkv.esm.js → cpfOcrManager-Cwm0MesJ.esm.js} +7 -12
- package/dist/createFaceAvatar-BEj18KXi.d.ts +50 -0
- package/dist/{createFaceAvatar-B_v2At2h.esm.js → createFaceAvatar-CwVapQiu.esm.js} +5 -9
- package/dist/cross-document-data-match.d.ts +1 -5
- package/dist/cross-document-data-match.esm.js +2 -8
- package/dist/{crossDocumentDataMatchManager-DoFG_S91.esm.js → crossDocumentDataMatchManager-9rdIO8Qk.esm.js} +12 -12
- package/dist/{crossDocumentDataMatchManager-CdiqxhJm.d.ts → crossDocumentDataMatchManager-Dq8Z3SOg.d.ts} +3 -3
- package/dist/curp-validation.d.ts +1 -11
- package/dist/curp-validation.esm.js +3 -8
- package/dist/{curpValidationManager-07oV78Bn.d.ts → curpValidationManager--HSBTwOy.d.ts} +4 -6
- package/dist/{curpValidationManager-D6jt1Gs9.esm.js → curpValidationManager-C2i9Lzx9.esm.js} +11 -7
- package/dist/{curpValidationStateMachine-Dlw4qfFb.esm.js → curpValidationStateMachine-7i3TD8J2.esm.js} +22 -14
- package/dist/custom-fields.d.ts +2 -5
- package/dist/custom-fields.esm.js +24 -11
- package/dist/custom-watchlist.d.ts +1 -3
- package/dist/custom-watchlist.esm.js +11 -10
- package/dist/{customWatchlistStateMachine-D8w0mNxm.esm.js → customWatchlistStateMachine-D23XTxl2.esm.js} +5 -7
- package/dist/{dateUtils-BW6mBV6p.esm.js → dateUtils-CvG0FvK8.esm.js} +1 -2
- package/dist/{deepsightService-CV1NAkg9.esm.js → deepsightLoader-CQWGVLP0.esm.js} +62 -14
- package/dist/deepsightService-CR-CYdka.d.ts +218 -0
- package/dist/device.d.ts +0 -1
- package/dist/device.esm.js +5 -10
- package/dist/document-capture.d.ts +1 -6
- package/dist/document-capture.esm.js +3 -16
- package/dist/document-upload.d.ts +48 -55
- package/dist/document-upload.esm.js +8 -14
- package/dist/{documentCaptureManager-HNu28khr.d.ts → documentCaptureManager-Biz_PFqs.d.ts} +190 -199
- package/dist/{documentCaptureManager-pufyUaQz.esm.js → documentCaptureManager-DijbJFun.esm.js} +5 -7
- package/dist/{documentCaptureStateMachine-CaJgb_Vn.esm.js → documentCaptureStateMachine-qgsrlcVh.esm.js} +11 -15
- package/dist/dynamic-forms.d.ts +1 -4
- package/dist/dynamic-forms.esm.js +3 -10
- package/dist/{dynamicFormsManager-C3jlNlWK.esm.js → dynamicFormsManager-COik5bJ7.esm.js} +41 -7
- package/dist/{dynamicFormsManager-HQhUJCLg.d.ts → dynamicFormsManager-Dposae2l.d.ts} +3 -4
- package/dist/{dynamicFormsStateMachine-DdpJI6ne.esm.js → dynamicFormsStateMachine-BV-Fn13x.esm.js} +7 -11
- package/dist/ekyb.d.ts +4 -11
- package/dist/ekyb.esm.js +3 -20
- package/dist/{ekybManager-l67BnqxH.esm.js → ekybManager-BTcW4poN.esm.js} +17 -7
- package/dist/{ekybManager-CZUVEWMw.d.ts → ekybManager-CBX0tM04.d.ts} +4 -5
- package/dist/{ekybStateMachine-BmfNaHRF.esm.js → ekybStateMachine-DmZLm35R.esm.js} +16 -25
- package/dist/ekyc.d.ts +2 -7
- package/dist/ekyc.esm.js +3 -11
- package/dist/{ekycManager-ClRqj2rg.d.ts → ekycManager-BFpHbBoT.d.ts} +4 -5
- package/dist/{ekycManager-B_uUa1iN.esm.js → ekycManager-BSMlIpGA.esm.js} +14 -7
- package/dist/{ekycStateMachine-BD8GjdL5.esm.js → ekycStateMachine-a7oP-XWo.esm.js} +140 -201
- package/dist/electronic-signature.d.ts +2 -5
- package/dist/electronic-signature.esm.js +2 -10
- package/dist/{electronicSignatureManager-CzMj-Tjm.esm.js → electronicSignatureManager-DSZu9OHT.esm.js} +9 -14
- package/dist/email.d.ts +1 -5
- package/dist/email.esm.js +3 -10
- package/dist/{emailManager-Lv9BHgel.d.ts → emailManager-CADXW_9X.d.ts} +4 -7
- package/dist/{emailManager-BsynjdWX.esm.js → emailManager-c-mDLieD.esm.js} +76 -12
- package/dist/{emailStateMachine-Z-Jf4qOc.esm.js → emailStateMachine-ChNwY22u.esm.js} +7 -9
- package/dist/{endpoints-CwrFQfW7.esm.js → endpoints-DLQ0g4-R.esm.js} +33 -2
- package/dist/{events-aeCkGlnn.esm.js → events-Dy8PyVO5.esm.js} +4 -168
- package/dist/events.d.ts +1 -9
- package/dist/events.esm.js +2 -4
- package/dist/extensibility.d.ts +30 -42
- package/dist/extensibility.esm.js +29 -87
- package/dist/{externalFetch-hvmz_npP.esm.js → externalFetch-BKBThAUC.esm.js} +2 -4
- package/dist/face-match.d.ts +1 -5
- package/dist/face-match.esm.js +3 -8
- package/dist/{faceCaptureManagerFactory-CGFQg1kl.d.ts → faceCaptureManagerFactory-BWD3O4Eg.d.ts} +50 -14
- package/dist/{faceCaptureManagerFactory-BIH53wvb.esm.js → faceCaptureManagerFactory-CZLSziU3.esm.js} +49 -28
- package/dist/{faceCaptureSetup-shrwrZaK.esm.js → faceCaptureSetup-__lVldUG.esm.js} +12 -15
- package/dist/{faceMatchManager-BrNYVk-p.esm.js → faceMatchManager-B7jlv77Q.esm.js} +24 -7
- package/dist/{faceMatchManager-X2eQo0o-.d.ts → faceMatchManager-CJQG1W1u.d.ts} +4 -4
- package/dist/{faceMatchStateMachine-CbeacEqd.esm.js → faceMatchStateMachine-DD7FxtUj.esm.js} +6 -9
- package/dist/field-comparison.d.ts +1 -4
- package/dist/field-comparison.esm.js +2 -7
- package/dist/{fieldComparisonManager-BxhleGNI.esm.js → fieldComparisonManager-5LlxYad-.esm.js} +6 -11
- package/dist/{fieldComparisonManager-Dg03uIX1.d.ts → fieldComparisonManager-CBvEGxFx.d.ts} +3 -5
- package/dist/fiscal-qr.d.ts +1 -6
- package/dist/fiscal-qr.esm.js +14 -29
- package/dist/flow-events.d.ts +2 -9
- package/dist/flow.d.ts +13 -19
- package/dist/flow.esm.js +109 -34
- package/dist/{flowCompletionService-qf-s8Uxl.esm.js → flowCompletionService-DQSC7Kso.esm.js} +4 -6
- package/dist/{flowServices-CJXaWFlZ.esm.js → flowServices-BQEUaMg6.esm.js} +10 -11
- package/dist/geolocation.d.ts +1 -4
- package/dist/geolocation.esm.js +3 -9
- package/dist/{geolocationManager-CAtyY00b.d.ts → geolocationManager-BWhRzBjk.d.ts} +3 -4
- package/dist/{geolocationManager-4j_DV3jW.esm.js → geolocationManager-D58ehBHU.esm.js} +19 -8
- package/dist/{geolocationStateMachine-BE72KBAX.esm.js → geolocationStateMachine-BorcBNZ6.esm.js} +6 -8
- package/dist/getBrowser-Cb8Zgrgp.esm.js +7 -0
- package/dist/{getDeviceClass-BdgmyOOu.esm.js → getDeviceClass-CeBiEayS.esm.js} +1 -2
- package/dist/{getDeviceClass-DsNb6nEl.esm.js → getDeviceClass-CkgnSJel.esm.js} +3 -5
- package/dist/{getBrowser-CZ66VtC7.esm.js → getParsedUserAgent-pJjATANs.esm.js} +109 -30
- package/dist/government-validation.d.ts +3 -6
- package/dist/government-validation.esm.js +7 -13
- package/dist/{governmentValidationStateMachine-BfZ_WQC0.esm.js → governmentValidationStateMachine-DkakcwTj.esm.js} +8 -11
- package/dist/home.d.ts +14 -22
- package/dist/home.esm.js +3 -8
- package/dist/http.d.ts +0 -1
- package/dist/http.esm.js +2 -4
- package/dist/id-ocr.d.ts +1 -5
- package/dist/id-ocr.esm.js +3 -9
- package/dist/id-verification.d.ts +1 -4
- package/dist/id-verification.esm.js +3 -8
- package/dist/id.d.ts +105 -18
- package/dist/id.esm.js +40 -50
- package/dist/{idCaptureDefaults-Df8XKQ0o.esm.js → idCaptureDefaults-Dzfws4i0.esm.js} +9 -16
- package/dist/{idCaptureManager-Fr9c67Rx.esm.js → idCaptureManager-BGAdNNVq.esm.js} +117 -23
- package/dist/{idCaptureManager-BXG8kVMW.d.ts → idCaptureManager-CSGbGORT.d.ts} +12 -113
- package/dist/{idCaptureStateMachine-CpjwdaYN.esm.js → idCaptureStateMachine-DYgckwCg.esm.js} +56 -195
- package/dist/{idOcrManager-DLF3J2cx.esm.js → idOcrManager-niAg-BE0.esm.js} +4 -7
- package/dist/{idOcrManager-DnhdGuVX.d.ts → idOcrManager-vXa7GdRh.d.ts} +60 -66
- package/dist/{idOcrStateMachine-BPXTUjNY.esm.js → idOcrStateMachine-CpZZL411.esm.js} +13 -18
- package/dist/{idVerificationManager-BD2FO09A.d.ts → idVerificationManager-BB4Pj_N6.d.ts} +31 -35
- package/dist/{idVerificationManager-23kPMn7T.esm.js → idVerificationManager-CujJqsiX.esm.js} +4 -7
- package/dist/{idVerificationStateMachine-C1eMEu_Y.esm.js → idVerificationStateMachine-D-1GlgC5.esm.js} +5 -7
- package/dist/identity-reuse.d.ts +1 -4
- package/dist/identity-reuse.esm.js +3 -8
- package/dist/{identityReuseManager-Ct-9qYpC.esm.js → identityReuseManager-DHfJZTVo.esm.js} +24 -7
- package/dist/{identityReuseManager-DOufEjLa.d.ts → identityReuseManager-aTyLyYrr.d.ts} +38 -43
- package/dist/{identityReuseStateMachine-Cqc-NwEQ.esm.js → identityReuseStateMachine-CM45EBrb.esm.js} +6 -8
- package/dist/index-B8weJxmL.d.ts +1 -0
- package/dist/index-BKOWUhxG.d.ts +258 -0
- package/dist/{index-WMHgnbC1.d.ts → index-CKbmDFNq.d.ts} +160 -165
- package/dist/{index-Bk5nhSg2.d.ts → index-DQ2fdqoI.d.ts} +3 -3
- package/dist/index.d.ts +1 -3
- package/dist/index.esm.js +2 -15
- package/dist/{invokeOnCaptureCallback-Bs09kdY_.esm.js → invokeOnCaptureCallback-B-QfsCQY.esm.js} +2 -4
- package/dist/{lib-DvZ6nVvW.esm.js → lib-DAyUtOTj.esm.js} +1510 -1589
- package/dist/mandatory-consent.d.ts +1 -10
- package/dist/mandatory-consent.esm.js +3 -8
- package/dist/{mandatoryConsentManager-D0qQHcl2.d.ts → mandatoryConsentManager-BlB4bX6_.d.ts} +59 -65
- package/dist/{mandatoryConsentManager-Bh_n0uEP.esm.js → mandatoryConsentManager-CQC-zA4P.esm.js} +4 -7
- package/dist/{mandatoryConsentStateMachine-DYeKH1L7.esm.js → mandatoryConsentStateMachine-BN4Obfl7.esm.js} +5 -7
- package/dist/{mediaRecorderOptions-BIn657lu.esm.js → mediaRecorderOptions-BhSZDDNb.esm.js} +2 -4
- package/dist/{mediapipeShared-B-RiRyLN.esm.js → mediapipeShared-B0iQQ5k7.esm.js} +2 -6
- package/dist/{onDeviceFaceResults-CJuDp67S.esm.js → onDeviceFaceResults-LRTvBL7m.esm.js} +18 -84
- package/dist/openviduLazy-CCDpFWg1.esm.js +10 -0
- package/dist/{otp-D_9QPNbs.d.ts → otp-CEWfTj9v.d.ts} +0 -1
- package/dist/{otp-Bbe_izFJ.esm.js → otp-D2k3PeSL.esm.js} +3 -14
- package/dist/{permissionGuards-CayfS8OY.esm.js → permissionGuards-DguX5vFY.esm.js} +2 -4
- package/dist/{permissionServices-B7lD6fiG.esm.js → permissionServices-DwNCUB2I.esm.js} +4 -9
- package/dist/personhood.d.ts +13 -20
- package/dist/personhood.esm.js +153 -72
- package/dist/phone.d.ts +1 -5
- package/dist/phone.esm.js +3 -10
- package/dist/{phoneManager-85eRUhJD.d.ts → phoneManager-BBU8Lq0O.d.ts} +4 -7
- package/dist/{phoneManager-Byive8Xl.esm.js → phoneManager-KbcmjEeH.esm.js} +82 -12
- package/dist/{phoneStateMachine-BlYF4nKx.esm.js → phoneStateMachine-wDQtaT38.esm.js} +7 -9
- package/dist/{platform-BoeUeUrV.esm.js → platform-wmV7oTAJ.esm.js} +1 -9
- package/dist/qe-signature.d.ts +2 -6
- package/dist/qe-signature.esm.js +10 -11
- package/dist/{recordingService-BzQUrf40.esm.js → recordingService-TuBlOjvH.esm.js} +15 -19
- package/dist/redirect-to-mobile.d.ts +1 -6
- package/dist/redirect-to-mobile.esm.js +3 -10
- package/dist/{redirectToMobileManager-DrxIfZr8.esm.js → redirectToMobileManager-EGXGKftv.esm.js} +25 -8
- package/dist/{redirectToMobileManager-2TtzpSOw.d.ts → redirectToMobileManager-NVQM3o5P.d.ts} +3 -4
- package/dist/{redirectToMobileStateMachine-BetR6r8p.esm.js → redirectToMobileStateMachine-D-8ipBq2.esm.js} +7 -9
- package/dist/rolldown-runtime-FZ4Itg2g.esm.js +42 -0
- package/dist/{runChildModule-FH_tixbR.esm.js → runChildModule-Crz1nHwJ.esm.js} +5 -9
- package/dist/selfie.d.ts +7 -20
- package/dist/selfie.esm.js +40 -46
- package/dist/{selfieManager-CdUnYjmt.esm.js → selfieManager-C4_2DgTF.esm.js} +7 -10
- package/dist/{selfieManager-d7nkO-UP.d.ts → selfieManager-CN8wJ14s.d.ts} +3 -4
- package/dist/{selfieStateMachine-zz4WqziP.esm.js → selfieStateMachine-ODRceav2.esm.js} +15 -20
- package/dist/selfieUploadService-B4LnSIf6.esm.js +62 -0
- package/dist/session-CQ2x2aLl.esm.js +1 -0
- package/dist/session.d.ts +2 -9
- package/dist/session.esm.js +153 -15
- package/dist/sessionInitializer-Cjpnacyg.esm.js +1801 -0
- package/dist/{setup-BxB6QUto.d.ts → setup-CgBvqGWw.d.ts} +2 -4
- package/dist/{setup-DCyhfufM.esm.js → setup-Hyb_Yiuu.esm.js} +126 -18
- package/dist/signature.d.ts +2 -6
- package/dist/signature.esm.js +6 -9
- package/dist/{signatureStateMachine-U8ewxW1t.esm.js → signatureStateMachine-BmKPC5A9.esm.js} +5 -7
- package/dist/spawn-D9jgw9pW.d.ts +1441 -0
- package/dist/{stats-BVy52wLy.esm.js → stats-Bu6bL_CX.esm.js} +3 -5
- package/dist/stats.esm.js +2 -5
- package/dist/topLevelStateName-B5i2avbh.esm.js +41 -0
- package/dist/{tri-Calc36Ny.esm.js → tri-N-xlKhZK.esm.js} +3 -7
- package/dist/tri.d.ts +2 -2
- package/dist/tri.esm-BIjHhBJ2.esm.js +2620 -0
- package/dist/tri.esm.js +2 -4
- package/dist/trust-graph.d.ts +4 -5
- package/dist/trust-graph.esm.js +13 -9
- package/dist/{types-Db2ooXIu.esm.js → types-BN5RPPIZ.esm.js} +1 -2
- package/dist/{types-ZezaAAbn.d.ts → types-BfgmV7s7.d.ts} +2 -2
- package/dist/{types-NizIIgLD.d.ts → types-BnEHzP1K.d.ts} +3 -5
- package/dist/{types-DCOl8zy6.d.ts → types-Vb4P9ovf.d.ts} +1 -3
- package/dist/{types-C0D4Brd6.d.ts → types-ctqh-iS4.d.ts} +80 -6
- package/dist/{urlUtils-CpiYwn7w.esm.js → urlUtils-D6phjq1-.esm.js} +1 -2
- package/dist/{video-DXf5H9rY.esm.js → video-BtSWtHy1.esm.js} +1 -2
- package/dist/video-selfie.d.ts +10 -15
- package/dist/video-selfie.esm.js +114 -106
- package/dist/{videoSelfieSteps-DAky5sq5.esm.js → videoSelfieSteps-DHcibfYH.esm.js} +1 -2
- package/dist/wasm.d.ts +2 -4
- package/dist/wasm.esm.js +3 -15
- package/dist/watchlist-for-business.d.ts +1 -3
- package/dist/watchlist-for-business.esm.js +9 -9
- package/dist/watchlist.d.ts +1 -3
- package/dist/watchlist.esm.js +11 -10
- package/dist/{watchlistForBusinessStateMachine-Bbn_dcVT.esm.js → watchlistForBusinessStateMachine-BC_-3fJs.esm.js} +5 -7
- package/dist/{watchlistStateMachine-SZ-1xpe4.esm.js → watchlistStateMachine-CL2j3aRl.esm.js} +5 -7
- package/dist/workflow.d.ts +124 -146
- package/dist/workflow.esm.js +75 -80
- package/dist/xstate-actors.esm-CtI5S0f4.esm.js +310 -0
- package/dist/{xstate.esm-nY3M5UYm.esm.js → xstate.esm-Cf4e0Cfd.esm.js} +136 -610
- package/package.json +2 -2
- package/dist/Actor-CdjYVucI.d.ts +0 -2
- package/dist/FaceDetectionProvider-D-zCGbS9.d.ts +0 -119
- package/dist/IWasmUtilCapability-CuiW_6d1.d.ts +0 -150
- package/dist/StateMachine-BTkXO3Na.d.ts +0 -2
- package/dist/StreamCanvasCapture-D9u4hwul.d.ts +0 -42
- package/dist/ae-signature-eQWjmzE8.esm.js +0 -12
- package/dist/browser-DlFgHpoC-BTB6a7n-.esm.js +0 -1425
- package/dist/browserSimulation-CQjwFn0Z.esm.js +0 -1256
- package/dist/canvas-COIxuirO.d.ts +0 -112
- package/dist/chunk-CIKcdghV.esm.js +0 -49
- package/dist/deepsightLoader-BppeThau.esm.js +0 -67
- package/dist/deepsightService-mkIAy_Eq.d.ts +0 -69
- package/dist/http-C3Pq6njG.esm.js +0 -0
- package/dist/index-BD6ZVw2f.d.ts +0 -93
- package/dist/openviduLazy-CuGqb-8Q.esm.js +0 -12
- package/dist/openviduLazy-DNb0xHJp.esm.js +0 -3
- package/dist/qe-signature-D9XM2d-F.esm.js +0 -12
- package/dist/session--C2lbjK5.esm.js +0 -152
- package/dist/sessionInitializer-Dx_oPfHP.esm.js +0 -548
- package/dist/tri.esm-BDhptA8x.esm.js +0 -2593
- /package/dist/{IVisibilityObserverCapability-C3tAkSfF.d.ts → IVisibilityObserverCapability-D4tvIB5v.d.ts} +0 -0
- /package/dist/{camera-DRH7co71.d.ts → camera-9wWD-pwg.d.ts} +0 -0
- /package/dist/{flowCompletionService-DGcE_OvO.d.ts → flowCompletionService-BlAHsKyv.d.ts} +0 -0
- /package/dist/{types-DawqnFVn.d.ts → types-BT-aiBYV.d.ts} +0 -0
- /package/dist/{types-B6KIOo6S.d.ts → types-Bk_6dmDa.d.ts} +0 -0
- /package/dist/{warmup-CE9Fhs6N.d.ts → warmup-Dv2alr2-.d.ts} +0 -0
package/dist/selfie.esm.js
CHANGED
|
@@ -1,37 +1,14 @@
|
|
|
1
|
-
import { t as WasmUtilProvider } from "./WasmUtilProvider-
|
|
2
|
-
import "./
|
|
3
|
-
import {
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import "./
|
|
9
|
-
import {
|
|
10
|
-
import { t as
|
|
11
|
-
import "./
|
|
12
|
-
import "./MotionSensorProvider-BkHKMCPE.esm.js";
|
|
13
|
-
import "./permissionServices-B7lD6fiG.esm.js";
|
|
14
|
-
import "./camera-B0yWS33x.esm.js";
|
|
15
|
-
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-BIH53wvb.esm.js";
|
|
16
|
-
import { t as BrowserStorageProvider } from "./BrowserStorageProvider-CBXGCHnK.esm.js";
|
|
17
|
-
import { p as processFace } from "./onDeviceFaceResults-CJuDp67S.esm.js";
|
|
18
|
-
import "./ITimerCapability-G7lQg-be.esm.js";
|
|
19
|
-
import "./canvas-DsJa51yU.esm.js";
|
|
20
|
-
import "./backCameraStream-DYnfq7Hr.esm.js";
|
|
21
|
-
import "./video-DXf5H9rY.esm.js";
|
|
22
|
-
import "./getDeviceClass-BdgmyOOu.esm.js";
|
|
23
|
-
import "./deepsightService-CV1NAkg9.esm.js";
|
|
24
|
-
import "./getDeviceClass-DsNb6nEl.esm.js";
|
|
25
|
-
import "./types-Db2ooXIu.esm.js";
|
|
26
|
-
import "./createFaceAvatar-B_v2At2h.esm.js";
|
|
27
|
-
import "./StreamCanvasCapture-CRk7c7u7.esm.js";
|
|
28
|
-
import "./permissionGuards-CayfS8OY.esm.js";
|
|
29
|
-
import "./recordingService-BzQUrf40.esm.js";
|
|
30
|
-
import "./mediaRecorderOptions-BIn657lu.esm.js";
|
|
31
|
-
import { t as selfieMachine } from "./selfieStateMachine-zz4WqziP.esm.js";
|
|
32
|
-
import { n as createSelfieManagerFromActor, t as createSelfieManager } from "./selfieManager-CdUnYjmt.esm.js";
|
|
33
|
-
import { t as invokeOnCaptureCallback } from "./invokeOnCaptureCallback-Bs09kdY_.esm.js";
|
|
34
|
-
|
|
1
|
+
import { t as WasmUtilProvider } from "./WasmUtilProvider-DAshwHhX.esm.js";
|
|
2
|
+
import { n as eventModuleNames } from "./events-Dy8PyVO5.esm.js";
|
|
3
|
+
import { o as createActor, r as assign } from "./xstate.esm-Cf4e0Cfd.esm.js";
|
|
4
|
+
import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
|
|
5
|
+
import { t as faceCaptureMachine } from "./faceCaptureSetup-__lVldUG.esm.js";
|
|
6
|
+
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-CZLSziU3.esm.js";
|
|
7
|
+
import { t as BrowserStorageProvider } from "./BrowserStorageProvider-P6aUarE9.esm.js";
|
|
8
|
+
import { t as processFace } from "./selfieUploadService-B4LnSIf6.esm.js";
|
|
9
|
+
import { t as selfieMachine } from "./selfieStateMachine-ODRceav2.esm.js";
|
|
10
|
+
import { n as createSelfieManagerFromActor, t as createSelfieManager } from "./selfieManager-C4_2DgTF.esm.js";
|
|
11
|
+
import { t as invokeOnCaptureCallback } from "./invokeOnCaptureCallback-B-QfsCQY.esm.js";
|
|
35
12
|
//#region src/modules/selfie/selfieCaptureOnlyStateMachine.ts
|
|
36
13
|
/**
|
|
37
14
|
* Performs local finalization of a captured face frame: stops local video
|
|
@@ -71,30 +48,49 @@ async function finalizeFaceCaptureOnly(ctx, signal) {
|
|
|
71
48
|
videoBase64
|
|
72
49
|
};
|
|
73
50
|
}
|
|
74
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Selfie state machine variant for the captureOnly flow. Shares the full base
|
|
53
|
+
* face-capture state tree; only the upload/process step is local instead of
|
|
54
|
+
* remote.
|
|
55
|
+
*/
|
|
56
|
+
const selfieCaptureOnlyMachine = faceCaptureMachine.provide({
|
|
75
57
|
actors: {
|
|
58
|
+
/**
|
|
59
|
+
* Pre-upload encryption + virtual-camera check are skipped: captureOnly is
|
|
60
|
+
* offline (no backend calls) and hands the canvas to the integrator
|
|
61
|
+
* unencrypted. The downstream `encryptedBase64Image`/`recordingId` fields
|
|
62
|
+
* are inert because `uploadFace` no longer reads them.
|
|
63
|
+
*/
|
|
76
64
|
prepareFaceUpload: fromPromise(async () => ({
|
|
77
65
|
encryptedBase64Image: "",
|
|
78
66
|
recordingId: null
|
|
79
67
|
})),
|
|
68
|
+
/**
|
|
69
|
+
* "Upload" becomes local finalize. The rich payload is routed to the
|
|
70
|
+
* typed `captureOnlyResult` context slot by the body-overridden
|
|
71
|
+
* `setUploadResponseFromEvent` action below, rather than the loose
|
|
72
|
+
* `uploadResponse: Record<string, unknown>` channel the base flow uses.
|
|
73
|
+
*/
|
|
80
74
|
uploadFace: fromPromise(async ({ input, signal }) => {
|
|
81
75
|
return await finalizeFaceCaptureOnly(input, signal);
|
|
82
76
|
}),
|
|
77
|
+
/** No backend processing in captureOnly. */
|
|
83
78
|
processFace: fromPromise(async () => ({}))
|
|
84
79
|
},
|
|
85
|
-
actions: {
|
|
80
|
+
actions: {
|
|
81
|
+
/**
|
|
82
|
+
* Override the regular upload-response handler to populate the typed
|
|
83
|
+
* `captureOnlyResult` slot the captureOnly manager reads on `finished`.
|
|
84
|
+
* The regular `uploadResponse` channel is left undefined — the variant's
|
|
85
|
+
* guards (`hasUploadValidationError`, `isTerminalUploadError`) both
|
|
86
|
+
* return false, so nothing downstream needs it.
|
|
87
|
+
*/
|
|
88
|
+
setUploadResponseFromEvent: assign({ captureOnlyResult: ({ event }) => event.output }) },
|
|
86
89
|
guards: {
|
|
87
90
|
hasUploadValidationError: () => false,
|
|
88
91
|
isTerminalUploadError: () => false
|
|
89
92
|
}
|
|
90
93
|
});
|
|
91
|
-
/**
|
|
92
|
-
* Selfie state machine variant for the captureOnly flow. Shares the full base
|
|
93
|
-
* face-capture state tree; only the upload/process step is local instead of
|
|
94
|
-
* remote.
|
|
95
|
-
*/
|
|
96
|
-
const selfieCaptureOnlyMachine = _selfieCaptureOnlyMachine;
|
|
97
|
-
|
|
98
94
|
//#endregion
|
|
99
95
|
//#region src/modules/selfie/selfieCaptureOnlyActor.ts
|
|
100
96
|
/**
|
|
@@ -132,7 +128,6 @@ function createSelfieCaptureOnlyActor(options) {
|
|
|
132
128
|
dependencies
|
|
133
129
|
} }).start();
|
|
134
130
|
}
|
|
135
|
-
|
|
136
131
|
//#endregion
|
|
137
132
|
//#region src/modules/selfie/selfieCaptureOnlyManager.ts
|
|
138
133
|
/**
|
|
@@ -182,6 +177,5 @@ function createSelfieCaptureOnlyManagerFromActor(actor, config, visibilityObserv
|
|
|
182
177
|
function createSelfieCaptureOnlyManager(options) {
|
|
183
178
|
return createSelfieCaptureOnlyManagerFromActor(createSelfieCaptureOnlyActor(options), options.config);
|
|
184
179
|
}
|
|
185
|
-
|
|
186
180
|
//#endregion
|
|
187
|
-
export { createSelfieCaptureOnlyManager, createSelfieCaptureOnlyManagerFromActor, createSelfieManager, createSelfieManagerFromActor, processFace, selfieCaptureOnlyMachine, selfieMachine };
|
|
181
|
+
export { createSelfieCaptureOnlyManager, createSelfieCaptureOnlyManagerFromActor, createSelfieManager, createSelfieManagerFromActor, processFace, selfieCaptureOnlyMachine, selfieMachine };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { t as WasmUtilProvider } from "./WasmUtilProvider-
|
|
2
|
-
import { n as eventModuleNames } from "./events-
|
|
3
|
-
import {
|
|
4
|
-
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-
|
|
5
|
-
import { t as BrowserStorageProvider } from "./BrowserStorageProvider-
|
|
6
|
-
import { t as selfieMachine } from "./selfieStateMachine-
|
|
7
|
-
|
|
1
|
+
import { t as WasmUtilProvider } from "./WasmUtilProvider-DAshwHhX.esm.js";
|
|
2
|
+
import { n as eventModuleNames } from "./events-Dy8PyVO5.esm.js";
|
|
3
|
+
import { o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
|
|
4
|
+
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-CZLSziU3.esm.js";
|
|
5
|
+
import { t as BrowserStorageProvider } from "./BrowserStorageProvider-P6aUarE9.esm.js";
|
|
6
|
+
import { t as selfieMachine } from "./selfieStateMachine-ODRceav2.esm.js";
|
|
8
7
|
//#region src/modules/selfie/selfieActor.ts
|
|
9
8
|
function createSelfieActor(options) {
|
|
10
9
|
const dependencies = options.dependencies ?? {
|
|
@@ -17,7 +16,6 @@ function createSelfieActor(options) {
|
|
|
17
16
|
authHint: options.authHint
|
|
18
17
|
} }).start();
|
|
19
18
|
}
|
|
20
|
-
|
|
21
19
|
//#endregion
|
|
22
20
|
//#region src/modules/selfie/selfieManager.ts
|
|
23
21
|
/**
|
|
@@ -64,6 +62,5 @@ function createSelfieManagerFromActor(actor, visibilityObserver) {
|
|
|
64
62
|
function createSelfieManager(options) {
|
|
65
63
|
return createFaceCaptureManagerFromActor(createSelfieActor(options), eventModuleNames.faceCapture);
|
|
66
64
|
}
|
|
67
|
-
|
|
68
65
|
//#endregion
|
|
69
|
-
export { createSelfieManagerFromActor as n, createSelfieManager as t };
|
|
66
|
+
export { createSelfieManagerFromActor as n, createSelfieManager as t };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { t as Manager } from "./Manager-
|
|
2
|
-
import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-
|
|
3
|
-
import { c as SelfieActor, n as FaceCaptureManagerState, s as CreateSelfieActorOptions, t as FaceCaptureManager } from "./faceCaptureManagerFactory-
|
|
4
|
-
|
|
1
|
+
import { t as Manager } from "./Manager-CQQ99QOI.js";
|
|
2
|
+
import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-D4tvIB5v.js";
|
|
3
|
+
import { c as SelfieActor, n as FaceCaptureManagerState, s as CreateSelfieActorOptions, t as FaceCaptureManager } from "./faceCaptureManagerFactory-BWD3O4Eg.js";
|
|
5
4
|
//#region src/modules/selfie/selfieUploadService.d.ts
|
|
6
5
|
type ProcessFaceImageType = 'selfie' | 'videoSelfie';
|
|
7
6
|
type ProcessFaceResponse = {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { r as assign } from "./xstate.esm-Cf4e0Cfd.esm.js";
|
|
2
|
+
import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
|
|
3
|
+
import { t as faceCaptureMachine } from "./faceCaptureSetup-__lVldUG.esm.js";
|
|
4
|
+
import { i as prepareOnDeviceFaceUpload, n as isOnDeviceMode, r as postOnDeviceFaceResults, t as defaultPrepareFaceUpload } from "./onDeviceFaceResults-LRTvBL7m.esm.js";
|
|
5
|
+
import { t as FACE_ERROR_CODES } from "./types-BN5RPPIZ.esm.js";
|
|
6
|
+
import { n as uploadSelfie, t as processFace } from "./selfieUploadService-B4LnSIf6.esm.js";
|
|
7
|
+
Object.values(FACE_ERROR_CODES);
|
|
8
8
|
const validateUploadResponse = ({ config, response }) => {
|
|
9
9
|
if (!response) return FACE_ERROR_CODES.SERVER;
|
|
10
10
|
if (response.confidence !== 0) return FACE_ERROR_CODES.LIVENESS;
|
|
@@ -14,10 +14,13 @@ const validateUploadResponse = ({ config, response }) => {
|
|
|
14
14
|
if (config.validateClosedEyes && response.hasClosedEyes) return FACE_ERROR_CODES.CLOSED_EYES;
|
|
15
15
|
if (config.validateHeadCover && response.hasHeadCover) return FACE_ERROR_CODES.HEAD_COVER;
|
|
16
16
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
/**
|
|
18
|
+
* The selfie capture state machine.
|
|
19
|
+
*
|
|
20
|
+
* Note: Uses AnyStateMachine type for declaration file portability.
|
|
21
|
+
* Type safety is ensured via the machine configuration.
|
|
22
|
+
*/
|
|
23
|
+
const selfieMachine = faceCaptureMachine.provide({
|
|
21
24
|
actors: {
|
|
22
25
|
prepareFaceUpload: fromPromise(async ({ input }) => {
|
|
23
26
|
const ctx = input;
|
|
@@ -58,13 +61,5 @@ const _selfieMachine = faceCaptureMachine.provide({
|
|
|
58
61
|
isTerminalUploadError: () => false
|
|
59
62
|
}
|
|
60
63
|
});
|
|
61
|
-
/**
|
|
62
|
-
* The selfie capture state machine.
|
|
63
|
-
*
|
|
64
|
-
* Note: Uses AnyStateMachine type for declaration file portability.
|
|
65
|
-
* Type safety is ensured via the machine configuration.
|
|
66
|
-
*/
|
|
67
|
-
const selfieMachine = _selfieMachine;
|
|
68
|
-
|
|
69
64
|
//#endregion
|
|
70
|
-
export { selfieMachine as t };
|
|
65
|
+
export { selfieMachine as t };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { t as api } from "./api-BDTZNnca.esm.js";
|
|
2
|
+
import { t as endpoints } from "./endpoints-DLQ0g4-R.esm.js";
|
|
3
|
+
import { t as addDeviceStats } from "./stats-Bu6bL_CX.esm.js";
|
|
4
|
+
import { t as getDeviceClass } from "./getDeviceClass-CkgnSJel.esm.js";
|
|
5
|
+
import { t as FACE_ERROR_CODES } from "./types-BN5RPPIZ.esm.js";
|
|
6
|
+
//#region src/modules/selfie/selfieUploadService.ts
|
|
7
|
+
/**
|
|
8
|
+
* Uploads a selfie image to the backend.
|
|
9
|
+
*/
|
|
10
|
+
async function uploadSelfie({ encryptedBase64Image, faceCoordinates, signal, metadata, recordingId, imageType = "selfie", deepsightService }) {
|
|
11
|
+
try {
|
|
12
|
+
const payload = {
|
|
13
|
+
base64Image: encryptedBase64Image,
|
|
14
|
+
faceCoordinates: faceCoordinates ?? void 0,
|
|
15
|
+
encrypted: true,
|
|
16
|
+
clientInfo: { deviceClass: getDeviceClass() },
|
|
17
|
+
metadata: metadata ?? void 0
|
|
18
|
+
};
|
|
19
|
+
const query = { imageType };
|
|
20
|
+
if (recordingId) query.recordingId = recordingId;
|
|
21
|
+
const res = await api.post(endpoints.selfie, payload, {
|
|
22
|
+
signal,
|
|
23
|
+
query
|
|
24
|
+
});
|
|
25
|
+
if (!res.ok) throw new Error(`POST ${endpoints.selfie} failed: ${res.status} ${res.statusText}`);
|
|
26
|
+
if (deepsightService) addDeviceStats({
|
|
27
|
+
frontIdStatsAnalysisStatus: "",
|
|
28
|
+
backIdStatsAnalysisStatus: "",
|
|
29
|
+
selfieStatsAnalysisStatus: deepsightService.getAnalysisStatus(),
|
|
30
|
+
motionStatus: deepsightService.getMotionStatus()
|
|
31
|
+
});
|
|
32
|
+
return res.data;
|
|
33
|
+
} catch (error) {
|
|
34
|
+
const errorCode = getFaceErrorCodeFromHttpError(error);
|
|
35
|
+
if (errorCode) throw new Error(errorCode);
|
|
36
|
+
throw new Error(FACE_ERROR_CODES.SERVER);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const getFaceErrorCodeFromHttpError = (error) => {
|
|
40
|
+
const err = error;
|
|
41
|
+
if (err.ok !== false || typeof err.status !== "number") return;
|
|
42
|
+
if (err.status !== 400) return FACE_ERROR_CODES.SERVER;
|
|
43
|
+
if (typeof err.data?.status !== "number") return FACE_ERROR_CODES.BAD_REQUEST;
|
|
44
|
+
return {
|
|
45
|
+
3004: FACE_ERROR_CODES.FACE_NOT_FOUND,
|
|
46
|
+
3005: FACE_ERROR_CODES.FACE_NOT_FOUND,
|
|
47
|
+
3006: FACE_ERROR_CODES.TOO_BLURRY,
|
|
48
|
+
3007: FACE_ERROR_CODES.TOO_DARK,
|
|
49
|
+
4010: FACE_ERROR_CODES.MULTIPLE_FACES,
|
|
50
|
+
4019: FACE_ERROR_CODES.FACE_NOT_FOUND,
|
|
51
|
+
4077: FACE_ERROR_CODES.BAD_PHOTO_QUALITY,
|
|
52
|
+
4078: FACE_ERROR_CODES.FACE_OCCLUDED
|
|
53
|
+
}[err.data.status] ?? FACE_ERROR_CODES.BAD_REQUEST;
|
|
54
|
+
};
|
|
55
|
+
async function processFace(imageType = "selfie", signal) {
|
|
56
|
+
return (await api.post(endpoints.processFace, {}, {
|
|
57
|
+
query: { imageType },
|
|
58
|
+
signal
|
|
59
|
+
})).data;
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
62
|
+
export { uploadSelfie as n, processFace as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./sessionInitializer-Cjpnacyg.esm.js";
|
package/dist/session.d.ts
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import "./types-B6KIOo6S.js";
|
|
4
|
-
import "./canvas-COIxuirO.js";
|
|
5
|
-
import "./createFaceAvatar-BjBu2CrU.js";
|
|
6
|
-
import { a as RegulationTypes } from "./types-NizIIgLD.js";
|
|
7
|
-
import { n as FinishStatus, r as GetFinishStatusFn, s as getFinishStatus } from "./flowCompletionService-DGcE_OvO.js";
|
|
8
|
-
|
|
1
|
+
import { a as RegulationTypes } from "./types-BnEHzP1K.js";
|
|
2
|
+
import { n as FinishStatus, r as GetFinishStatusFn, s as getFinishStatus } from "./flowCompletionService-BlAHsKyv.js";
|
|
9
3
|
//#region src/internal/fingerprint/types.d.ts
|
|
10
|
-
|
|
11
4
|
type DeviceFingerprintResult = {
|
|
12
5
|
success: boolean;
|
|
13
6
|
sessionStatus: string;
|
package/dist/session.esm.js
CHANGED
|
@@ -1,15 +1,153 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { n as getApi } from "./api-BDTZNnca.esm.js";
|
|
2
|
+
import { t as endpoints } from "./endpoints-DLQ0g4-R.esm.js";
|
|
3
|
+
import { i as initializeSession } from "./sessionInitializer-Cjpnacyg.esm.js";
|
|
4
|
+
import { n as toIncodeApiError, t as IncodeApiError } from "./apiError-COvIGYWe.esm.js";
|
|
5
|
+
import "./session-CQ2x2aLl.esm.js";
|
|
6
|
+
import { n as getFinishStatus } from "./flowCompletionService-DQSC7Kso.esm.js";
|
|
7
|
+
//#region src/internal/session/sessionService.ts
|
|
8
|
+
/**
|
|
9
|
+
* HTTP status codes the QR validation endpoint emits, keyed by their semantic
|
|
10
|
+
* name. Hosts switch on these to render distinct messaging — `invalidQRuuid`
|
|
11
|
+
* for an unknown/expired link, `onboardingUrlAlreadyUsed` for a one-time link
|
|
12
|
+
* that has already been consumed.
|
|
13
|
+
*/
|
|
14
|
+
const QR_VALIDATION_ERROR_CODES = {
|
|
15
|
+
expiredUUID: 4026,
|
|
16
|
+
invalidQRuuid: 4081,
|
|
17
|
+
onboardingUrlAlreadyUsed: 4083
|
|
18
|
+
};
|
|
19
|
+
var QrValidationError = class extends Error {
|
|
20
|
+
constructor(status, statusText) {
|
|
21
|
+
super(`POST ${endpoints.qrValidateUuid} failed: ${status} ${statusText}`);
|
|
22
|
+
this.name = "QrValidationError";
|
|
23
|
+
this.status = status;
|
|
24
|
+
this.statusText = statusText;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Creates a new onboarding session.
|
|
29
|
+
*
|
|
30
|
+
* @param apiKey - The API key from the Incode dashboard
|
|
31
|
+
* @param options - Session creation options
|
|
32
|
+
* @param signal - Optional AbortSignal for request cancellation
|
|
33
|
+
* @returns The created session with token
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const session = await createSession('your-api-key', {
|
|
38
|
+
* configurationId: 'your-flow-id',
|
|
39
|
+
* language: 'en-US',
|
|
40
|
+
* });
|
|
41
|
+
* console.log(session.token); // Use this token for subsequent API calls
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
async function createSession(apiKey, options, signal) {
|
|
45
|
+
try {
|
|
46
|
+
return (await getApi().post(endpoints.createSession, {
|
|
47
|
+
configurationId: options.configurationId,
|
|
48
|
+
externalId: options.externalId,
|
|
49
|
+
externalCustomerId: options.externalCustomerId,
|
|
50
|
+
language: options.language ?? "en-US",
|
|
51
|
+
customFields: options.customFields,
|
|
52
|
+
uuid: options.uuid ?? null,
|
|
53
|
+
urlUuid: options.urlUuid ?? null,
|
|
54
|
+
interviewId: options.interviewId ?? null,
|
|
55
|
+
...options.loginHint != null && options.loginHint !== "" ? { loginHint: options.loginHint } : {}
|
|
56
|
+
}, {
|
|
57
|
+
headers: {
|
|
58
|
+
"x-api-key": apiKey,
|
|
59
|
+
"api-version": "1.0"
|
|
60
|
+
},
|
|
61
|
+
signal
|
|
62
|
+
})).data;
|
|
63
|
+
} catch (error) {
|
|
64
|
+
toIncodeApiError(endpoints.createSession, error);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Validates and rotates a QR anti-phishing URL UUID before creating a session.
|
|
69
|
+
*
|
|
70
|
+
* This call is unauthenticated; the `{ onboardingId, urlUuid }` pair itself
|
|
71
|
+
* acts as the credential. The server burns the incoming `urlUuid` and returns
|
|
72
|
+
* a freshly minted one that must be used in the subsequent `createSession`
|
|
73
|
+
* call.
|
|
74
|
+
*
|
|
75
|
+
* @param options - `{ onboardingId, urlUuid }` from the incoming URL
|
|
76
|
+
* @param signal - Optional AbortSignal for request cancellation
|
|
77
|
+
* @returns The refreshed `urlUuid` to use for the session
|
|
78
|
+
* @throws {QrValidationError} When the server rejects the validation request.
|
|
79
|
+
*/
|
|
80
|
+
async function validateQrUuid(options, signal) {
|
|
81
|
+
try {
|
|
82
|
+
return (await getApi().post(endpoints.qrValidateUuid, {
|
|
83
|
+
onboardingId: options.onboardingId,
|
|
84
|
+
urlUuid: options.urlUuid
|
|
85
|
+
}, {
|
|
86
|
+
headers: { "api-version": "1.0" },
|
|
87
|
+
signal
|
|
88
|
+
})).data;
|
|
89
|
+
} catch (error) {
|
|
90
|
+
const httpError = error;
|
|
91
|
+
throw new QrValidationError(httpError.data?.status ?? httpError.status, httpError.statusText);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* One-shot QR phishing-resistance helper.
|
|
96
|
+
*
|
|
97
|
+
* When `urlUuid` is a non-empty string, burns the stale value via
|
|
98
|
+
* `validateQrUuid`, invokes `onRefreshed` with the fresh value, and returns
|
|
99
|
+
* it so callers can forward it into `createSession`. When `urlUuid` is
|
|
100
|
+
* absent, returns `undefined` without making any network call.
|
|
101
|
+
*
|
|
102
|
+
* Consolidates the rotation + callback logic shared by Flow self-loading and
|
|
103
|
+
* Workflow token-mode bootstraps.
|
|
104
|
+
*
|
|
105
|
+
* @throws {QrValidationError} When the server rejects the validation request.
|
|
106
|
+
*/
|
|
107
|
+
async function refreshQrUrlUuid(options, signal) {
|
|
108
|
+
if (typeof options.urlUuid !== "string" || options.urlUuid.length === 0) return;
|
|
109
|
+
const result = await validateQrUuid({
|
|
110
|
+
onboardingId: options.onboardingId ?? null,
|
|
111
|
+
urlUuid: options.urlUuid
|
|
112
|
+
}, signal);
|
|
113
|
+
options.onRefreshed?.(result.urlUuid);
|
|
114
|
+
return result.urlUuid;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Validates and rotates a QR anti-phishing `urlUuid` (when present), then
|
|
118
|
+
* creates a session bound to the refreshed value. When `urlUuid` is absent,
|
|
119
|
+
* behaves identically to {@link createSession}.
|
|
120
|
+
*
|
|
121
|
+
* Use this when the host owns session creation and wants the SDK to handle
|
|
122
|
+
* phishing-resistance rotation in a single call. For raw control, compose
|
|
123
|
+
* `refreshQrUrlUuid` and `createSession` directly.
|
|
124
|
+
*
|
|
125
|
+
* @throws {QrValidationError} When the server rejects the QR validation step.
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```ts
|
|
129
|
+
* const session = await bootstrapSession(apiKey, {
|
|
130
|
+
* configurationId,
|
|
131
|
+
* urlUuid,
|
|
132
|
+
* onUrlUuidRefreshed: (refreshed) => {
|
|
133
|
+
* const url = new URL(window.location.href);
|
|
134
|
+
* url.searchParams.set('url_uuid', refreshed);
|
|
135
|
+
* window.history.replaceState({}, '', url);
|
|
136
|
+
* },
|
|
137
|
+
* });
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
async function bootstrapSession(apiKey, options, signal) {
|
|
141
|
+
const { onUrlUuidRefreshed, ...createSessionOptions } = options;
|
|
142
|
+
const refreshedUrlUuid = await refreshQrUrlUuid({
|
|
143
|
+
urlUuid: options.urlUuid,
|
|
144
|
+
onboardingId: options.uuid ?? null,
|
|
145
|
+
onRefreshed: onUrlUuidRefreshed
|
|
146
|
+
}, signal);
|
|
147
|
+
return createSession(apiKey, {
|
|
148
|
+
...createSessionOptions,
|
|
149
|
+
urlUuid: refreshedUrlUuid
|
|
150
|
+
}, signal);
|
|
151
|
+
}
|
|
152
|
+
//#endregion
|
|
153
|
+
export { IncodeApiError, QR_VALIDATION_ERROR_CODES, QrValidationError, bootstrapSession, createSession, getFinishStatus, initializeSession, refreshQrUrlUuid, validateQrUuid };
|