@incodetech/core 2.4.0 → 2.4.1-agentic.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/dist/BrowserNetworkStatusProvider-BrDXBEDd.esm.js +21 -0
- package/dist/{multipartRecordingService-CLwrF5wD.esm.js → CameraCompositor-DN7NkJzV.esm.js} +7 -744
- package/dist/{FaceDetectionProvider-DcPOC2gS.esm.js → FaceDetectionProvider-CAY43vSI.esm.js} +28 -64
- package/dist/IBrowserEnvironmentCapability-D7JG7ML3.esm.js +16 -0
- package/dist/IGeolocationCapability-r49Qo7rR.d.ts +10 -0
- package/dist/{IWasmUtilCapability-GF2n7sfm.d.ts → IWasmUtilCapability-Cqiaxydi.d.ts} +31 -4
- package/dist/MultipartRecordingProvider-D9mauUdS.esm.js +146 -0
- package/dist/{PhoneValidationProvider-SZiOS0jB.esm.js → PhoneValidationProvider-Co4zk2en.esm.js} +7 -0
- package/dist/{StreamCanvasCapture-7JRf-2ck.d.ts → StreamCanvasCapture-C3xNfOsv.d.ts} +12 -3
- package/dist/StreamCanvasProcessingSession-CBnbTnOr.esm.js +42 -0
- package/dist/{WasmUtilProvider-DtJuBdt-.esm.js → WasmUtilProvider-Dp2V-Uct.esm.js} +75 -22
- package/dist/WorkerEncoderRecordingProvider-B1ODYtgN.esm.js +80 -0
- package/dist/addressSearch-DzbE9Ogt.esm.js +254 -0
- package/dist/{advanceableErrors-q_pfU3Cn.esm.js → advanceableErrors-k-U-cL5m.esm.js} +1 -2
- package/dist/ae-signature.esm.js +1 -1
- package/dist/antifraud.esm.js +2 -2
- package/dist/{antifraudManager-CaweCYnY.esm.js → antifraudManager-BObuHBjn.esm.js} +2 -2
- package/dist/{antifraudStateMachine-DRl0UVyA.esm.js → antifraudStateMachine-Dfrd2-26.esm.js} +1 -1
- package/dist/{api-Cz90EHyu.esm.js → api-CpP4PS4S.esm.js} +8 -5
- package/dist/{apiError-DPwFas2f.esm.js → apiError-DH-CH4Nz.esm.js} +1 -1
- package/dist/attemptCarry-WOkfvFMw.esm.js +45 -0
- package/dist/authentication.d.ts +3 -3
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-BIZC55Bi.d.ts → authenticationManager-CWmh7aSY.d.ts} +1 -1
- package/dist/{authenticationManager-2Lr5V_7p.esm.js → authenticationManager-DjX0XDyH.esm.js} +5 -5
- package/dist/{authenticationStateMachine-C99B0GFP.esm.js → authenticationStateMachine-BMbZL8wm.esm.js} +3 -3
- package/dist/backCameraLabel-yda5ugE4.esm.js +67 -0
- package/dist/{backCameraStream-CMvXj4X4.esm.js → backCameraStream-DS1oDiUq.esm.js} +12 -107
- package/dist/{browser-DlFgHpoC-DnyrCR8r.esm.js → browser-pQZA35G2-DtkAf6sn.esm.js} +161 -150
- package/dist/{camera-sIa9ceW2.esm.js → camera-E_Kcre4O.esm.js} +15 -23
- package/dist/camera.d.ts +2 -2
- package/dist/camera.esm.js +1 -1
- package/dist/certificate-issuance.esm.js +2 -2
- package/dist/{certificateIssuanceManager-BfeMv2PU.esm.js → certificateIssuanceManager-C1nETQos.esm.js} +2 -2
- package/dist/{certificateIssuanceStateMachine-Frgjbjw8.esm.js → certificateIssuanceStateMachine-DThXMDqr.esm.js} +2 -2
- package/dist/cnpj-Co1ottYN.esm.js +77 -0
- package/dist/connectivity-BCuEoQ-n.esm.js +114 -0
- package/dist/consent.d.ts +1 -1
- package/dist/consent.esm.js +2 -2
- package/dist/{consentManager-CvEu8h_W.esm.js → consentManager-DMlSL6Ax.esm.js} +4 -3
- package/dist/{consentManager-Cv_0QKLD.d.ts → consentManager-bjfVXO7p.d.ts} +9 -2
- package/dist/{consentStateMachine-DJTgN_-1.esm.js → consentStateMachine-DIYSMxKQ.esm.js} +20 -7
- package/dist/cross-document-data-match.esm.js +1 -1
- package/dist/{crossDocumentDataMatchManager-Cu141CE8.esm.js → crossDocumentDataMatchManager-BFTdiEDB.esm.js} +2 -2
- package/dist/curp-validation.d.ts +1 -1
- package/dist/curp-validation.esm.js +2 -2
- package/dist/{curpValidationManager-B-z9q5V3.esm.js → curpValidationManager-DNpC3wyf.esm.js} +3 -2
- package/dist/{curpValidationManager-C9sqoh9n.d.ts → curpValidationManager-z8428oCM.d.ts} +1 -1
- package/dist/{curpValidationStateMachine-vDEFLMPw.esm.js → curpValidationStateMachine-B3iVsDyt.esm.js} +28 -20
- package/dist/custom-fields.esm.js +1 -1
- package/dist/custom-watchlist.esm.js +2 -2
- package/dist/{customFieldsManager-D1ex2cFM.esm.js → customFieldsManager-CvI-pDT3.esm.js} +2 -2
- package/dist/{customWatchlistManager-CTI-SGk0.esm.js → customWatchlistManager-BuHtUb0y.esm.js} +2 -2
- package/dist/{customWatchlistStateMachine-hmRd0f2I.esm.js → customWatchlistStateMachine-CiVD9wyF.esm.js} +1 -1
- package/dist/{deepsightService-CKTYDIXD.esm.js → deepsightLoader-B7DEYoyY.esm.js} +40 -74
- package/dist/{createCameraCycleOwnership-Dj_LHUvN.esm.js → desktopCameraElection-BGMtYwk3.esm.js} +177 -40
- package/dist/device.esm.js +2 -2
- package/dist/document-capture.d.ts +3 -3
- package/dist/document-capture.esm.js +2 -2
- package/dist/{documentCaptureManager-DkyDtm3Y.d.ts → documentCaptureManager-CD5iQiUI.d.ts} +37 -4
- package/dist/{documentCaptureManager-DUJwpKC5.esm.js → documentCaptureManager-DLPqruXJ.esm.js} +27 -19
- package/dist/{documentCaptureStateMachine-B8i7GnLh.esm.js → documentCaptureStateMachine-DCvWQhFG.esm.js} +105 -56
- package/dist/dynamic-forms.d.ts +2 -2
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-C0dHs1ty.d.ts → dynamicFormsManager-9kwY8Bf5.d.ts} +1 -1
- package/dist/{dynamicFormsManager-DiKYjcF3.esm.js → dynamicFormsManager-DfqCEPg9.esm.js} +2 -2
- package/dist/{dynamicFormsStateMachine-DEI45xYW.esm.js → dynamicFormsStateMachine-USQMB-uV.esm.js} +2 -2
- package/dist/ekyb.d.ts +4 -4
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-BaZ_7CEu.d.ts → ekybManager-BLOkwmWO.d.ts} +2 -2
- package/dist/{ekybManager-8WLkNcqg.esm.js → ekybManager-CR8YSYux.esm.js} +2 -2
- package/dist/{ekybStateMachine-BLRT45Ex.esm.js → ekybStateMachine-kHwdz6hm.esm.js} +28 -44
- package/dist/ekybUtils-Cw8Ta9Qi.esm.js +140 -0
- package/dist/ekyc.d.ts +4 -3
- package/dist/ekyc.esm.js +3 -3
- package/dist/{ekycManager-DW-ynodd.d.ts → ekycManager-DlGIn9wA.d.ts} +2 -1
- package/dist/{ekycManager-BO-Lui3t.esm.js → ekycManager-DymCvmVB.esm.js} +2 -2
- package/dist/ekycStateMachine-CoFCUJ2z.esm.js +7578 -0
- package/dist/ekycUtils-GRuMELYr.esm.js +1472 -0
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-CcIMOb_Y.esm.js → electronicSignatureManager-BCE3uA3z.esm.js} +4 -4
- package/dist/email.esm.js +2 -2
- package/dist/{emailManager-ButFktRm.esm.js → emailManager-CGoE3CUe.esm.js} +2 -2
- package/dist/{emailStateMachine-BXtlC0NV.esm.js → emailStateMachine-KgHfDNvM.esm.js} +32 -20
- package/dist/{events-Du2A4-Qr.esm.js → events-ggpBBaZ8.esm.js} +2 -2
- package/dist/events.esm.js +1 -1
- package/dist/extensibility.d.ts +37 -22
- package/dist/extensibility.esm.js +36 -35
- package/dist/{externalFetch-DrR9xshk.esm.js → externalFetch-CQY41QT1.esm.js} +4 -1
- package/dist/face-match.d.ts +1 -1
- package/dist/face-match.esm.js +2 -2
- package/dist/{faceCaptureManagerFactory-1hzeS_rB.d.ts → faceCaptureManagerFactory-DV2ULUYS.d.ts} +71 -66
- package/dist/{faceCaptureManagerFactory-BlGvXzXA.esm.js → faceCaptureManagerFactory-Dp90bedH.esm.js} +4 -4
- package/dist/{faceCaptureSetup-TY8RXc2N.esm.js → faceCaptureSetup-ZfiWg0fo.esm.js} +84 -457
- package/dist/{faceMatchManager-DWFUQjMQ.esm.js → faceMatchManager-D2xKPjjQ.esm.js} +2 -2
- package/dist/{faceMatchManager-DIgG-UFS.d.ts → faceMatchManager-Z4UDLwAv.d.ts} +16 -7
- package/dist/{faceMatchStateMachine-CUCvlydD.esm.js → faceMatchStateMachine-CUvwiQi9.esm.js} +40 -27
- package/dist/{feature-management-B5rR10uS.esm.js → feature-management-BbCIA4og.esm.js} +35 -21
- package/dist/feature-management.esm.js +1 -1
- package/dist/field-comparison.esm.js +1 -1
- package/dist/{fieldComparisonManager-v3knTYV_.esm.js → fieldComparisonManager-DgDbEeFZ.esm.js} +2 -2
- package/dist/fiscal-qr.esm.js +1 -1
- package/dist/{fiscalQrManager-Dt9fHG7h.esm.js → fiscalQrManager-BZeklojR.esm.js} +4 -4
- package/dist/flow-events.d.ts +1 -1
- package/dist/flow.d.ts +10 -10
- package/dist/flow.esm.js +10 -9
- package/dist/{flowCompletionService-BDI5QpfR.esm.js → flowCompletionService-CcCnPs_T.esm.js} +2 -2
- package/dist/{flowServices-roD0oIQL.esm.js → flowServices-Dmnc8Rye.esm.js} +69 -185
- package/dist/geolocation.d.ts +1 -1
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-Dn24g1fl.d.ts → geolocationManager-6e1i9UIR.d.ts} +15 -17
- package/dist/{geolocationManager-DnONzWL5.esm.js → geolocationManager-BJJ3m_I8.esm.js} +6 -8
- package/dist/{geolocationStateMachine-eWy_G4Os.esm.js → geolocationStateMachine-CTI3m4Ie.esm.js} +12 -8
- package/dist/{getDeviceClass-bsWdEDxP.esm.js → getDeviceClass-DoIWuKI8.esm.js} +1 -1
- package/dist/government-validation.esm.js +2 -2
- package/dist/{governmentValidationManager-BtXWHICu.esm.js → governmentValidationManager-CjChjZ3C.esm.js} +2 -2
- package/dist/{governmentValidationStateMachine-COL-Vs48.esm.js → governmentValidationStateMachine-AEbn3Afi.esm.js} +1 -1
- package/dist/home.d.ts +1 -1
- package/dist/home.esm.js +1 -1
- 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 +1 -1
- package/dist/id-selfie-flow.esm.js +10 -9
- package/dist/id-verification.esm.js +2 -2
- package/dist/id.d.ts +3 -16
- package/dist/id.esm.js +4 -4
- package/dist/{idCaptureDefaults-BGsG2OAs.esm.js → idCaptureDefaults-Dszuq9ng.esm.js} +3 -3
- package/dist/{idCaptureManager-BrfYjCm_.esm.js → idCaptureManager-B3oR4RnA.esm.js} +64 -17
- package/dist/{idCaptureManager-0M02hSuC.d.ts → idCaptureManager-CCA2D1Ah.d.ts} +68 -5
- package/dist/{idCaptureServices-BSj6EH2l.esm.js → idCaptureServices-DK0QboqT.esm.js} +29 -198
- package/dist/{idCaptureStateMachine-dXKBYHQp.esm.js → idCaptureStateMachine-zzar9MPy.esm.js} +914 -536
- package/dist/{idOcrManager-DT3kPIB3.d.ts → idOcrManager-BTdHlJ9D.d.ts} +1 -1
- package/dist/{idOcrManager-D3-HNMXP.esm.js → idOcrManager-xyEZNOBa.esm.js} +2 -2
- package/dist/{idOcrStateMachine-DyENX6Ki.esm.js → idOcrStateMachine-DNKXh4Rn.esm.js} +2 -2
- package/dist/{idVerificationManager-iWz7Avkr.esm.js → idVerificationManager-DdnvYfgN.esm.js} +2 -2
- package/dist/{idVerificationStateMachine-CL1kUdBe.esm.js → idVerificationStateMachine-DtIBCa32.esm.js} +1 -1
- package/dist/identity-reuse.esm.js +2 -2
- package/dist/{identityReuseManager-CD1ucp1d.esm.js → identityReuseManager-CcpovlfD.esm.js} +2 -2
- package/dist/{identityReuseStateMachine-DfV81wQC.esm.js → identityReuseStateMachine-DxZFWy47.esm.js} +1 -1
- package/dist/{index-CKQ9QBZP.d.ts → index-DC0P2Vzw.d.ts} +1 -1
- package/dist/{index-BKOWUhxG.d.ts → index-DEfwds5y.d.ts} +55 -8
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/{invokeOnCaptureCallback-DYrkOXO6.esm.js → invokeOnCaptureCallback-BJ0GVHGr.esm.js} +1 -1
- package/dist/kyb-checks.d.ts +3 -0
- package/dist/kyb-checks.esm.js +3 -0
- package/dist/kybChecksManager-CblEL97E.d.ts +95 -0
- package/dist/kybChecksManager-DpGOp4Su.esm.js +89 -0
- package/dist/kybChecksStateMachine-B43NAnv7.esm.js +718 -0
- package/dist/mandatory-consent.d.ts +2 -2
- package/dist/mandatory-consent.esm.js +2 -2
- package/dist/{mandatoryConsentManager-Cwqx1nK7.esm.js → mandatoryConsentManager-B4vCYslr.esm.js} +4 -3
- package/dist/{mandatoryConsentManager-BQ43yndC.d.ts → mandatoryConsentManager-B88Sm5nd.d.ts} +10 -3
- package/dist/{mandatoryConsentStateMachine-pXWqAHo_.esm.js → mandatoryConsentStateMachine-DWslYPA3.esm.js} +20 -7
- package/dist/mediaRecorderOptions-B9-IEVtV.esm.js +70 -0
- package/dist/multipartRecordingService-BTqkHGG9.esm.js +407 -0
- package/dist/nationalIds-B91f_RuB.esm.js +99 -0
- package/dist/{permissionGuards-gcy3U0SL.esm.js → permissionGuards-DFV-Ws0a.esm.js} +1 -1
- package/dist/{permissionServices-Ca-tSNhT.esm.js → permissionServices-D190ATGD.esm.js} +11 -9
- package/dist/phone-number.d.ts +7 -1
- package/dist/phone-number.esm.js +15 -2
- package/dist/phone.d.ts +1 -1
- package/dist/phone.esm.js +2 -2
- package/dist/phoneFormat-JJNaWthV.esm.js +75 -0
- package/dist/{phoneManager-BO-LTih5.d.ts → phoneManager-6nrJkvkG.d.ts} +5 -0
- package/dist/{phoneManager-KKUq-Vgo.esm.js → phoneManager-Dy5tODCU.esm.js} +3 -3
- package/dist/phoneServices-DJgyOzU2.esm.js +77 -0
- package/dist/{phoneStateMachine-D2QWS2cu.esm.js → phoneStateMachine-DnlPhnw7.esm.js} +54 -82
- package/dist/{phoneValidation-DnBcNUNh.esm.js → phoneValidation-OggtfjRt.esm.js} +1 -2
- package/dist/{platform-DkcRc9JV.esm.js → platform-aPh7gTWh.esm.js} +15 -1
- package/dist/processFaceMatch-Bst83HaS.esm.js +21 -0
- package/dist/qe-signature.esm.js +1 -1
- package/dist/recordingService-CTko6Cjn.esm.js +397 -0
- package/dist/redirect-to-mobile.d.ts +2 -2
- package/dist/redirect-to-mobile.esm.js +2 -2
- package/dist/{redirectToMobileManager-uHW3dyuQ.esm.js → redirectToMobileManager-CgGaT2NP.esm.js} +5 -4
- package/dist/{redirectToMobileManager-CVsvpVbQ.d.ts → redirectToMobileManager-Dm9ctRCC.d.ts} +3 -1
- package/dist/{redirectToMobileStateMachine-b-H-ipGM.esm.js → redirectToMobileStateMachine-CbhN8uVN.esm.js} +65 -26
- package/dist/resolveForm-O7-r79VA.esm.js +351 -0
- package/dist/{runChildModule-BF_atgNx.esm.js → runChildModule-BffFArwl.esm.js} +3 -3
- package/dist/{sdkVersion-CsIbltJF.esm.js → sdkVersion-CDd_gaR7.esm.js} +1 -1
- package/dist/selfie.d.ts +4 -4
- package/dist/selfie.esm.js +10 -10
- package/dist/{selfieErrorUtils-BY0-YbPW.esm.js → selfieErrorUtils-f4MgAG2A.esm.js} +1 -1
- package/dist/{selfieManager-BJdNu_nd.d.ts → selfieManager-DmZFzs1-.d.ts} +1 -1
- package/dist/{selfieManager-vAAwzsHk.esm.js → selfieManager-hopelYEk.esm.js} +5 -5
- package/dist/{selfieStateMachine-BFVp3ElQ.esm.js → selfieStateMachine-DaZIVv3Q.esm.js} +3 -3
- package/dist/{session-CpwfoVdH.esm.js → session-CdSX4wsZ.esm.js} +77 -9
- package/dist/session.d.ts +96 -10
- package/dist/session.esm.js +7 -6
- package/dist/{sessionInitializer-BTjYgE-V.esm.js → sessionInitializer-DsL7X2j9.esm.js} +465 -206
- package/dist/{setup-YPKTUCY5.d.ts → setup-D9qt8YVU.d.ts} +2 -2
- package/dist/{setup-BInNAvQw.esm.js → setup-DDahygZs.esm.js} +44 -30
- package/dist/signature.esm.js +2 -2
- package/dist/{signatureManager-f_dPAGXn.esm.js → signatureManager-CwqjcxPg.esm.js} +2 -2
- package/dist/{signatureStateMachine-C-nUq_oq.esm.js → signatureStateMachine-DBVDd1Eu.esm.js} +1 -1
- package/dist/{stats-BEvexnKC.esm.js → stats-CatA2dea.esm.js} +1 -1
- package/dist/stats.esm.js +1 -1
- package/dist/textRules-D4NRinKY.d.ts +41 -0
- package/dist/{tri-xzRLIIMN.esm.js → tri-DG6priFa.esm.js} +142 -8
- package/dist/tri.d.ts +1 -1
- package/dist/tri.esm-CzTNi5Q_.esm.js +3826 -0
- package/dist/tri.esm.js +1 -1
- package/dist/{trueSightService-BMT-TubT.esm.js → trueSightService-GuLthUVK.esm.js} +19 -10
- package/dist/trust-graph.esm.js +1 -1
- package/dist/types-B9C8W01q.d.ts +34 -0
- package/dist/{types-yPH8lAH-.d.ts → types-BEVHQbbC.d.ts} +2 -2
- package/dist/{types-BAxn7MpY.d.ts → types-BPm1JSu7.d.ts} +123 -48
- package/dist/{types-0L-eFDmr.d.ts → types-BgRHw-dR.d.ts} +1 -1
- package/dist/{types-B6HsSzpk.d.ts → types-CRaFu6wS.d.ts} +6 -3
- package/dist/types-CTaL0XJz.d.ts +80 -0
- package/dist/{types-Ckir_BEs.d.ts → types-Cd0J0F9D.d.ts} +1 -1
- package/dist/{types-CK8Jbjkp.d.ts → types-Csh8vzPo.d.ts} +1 -1
- package/dist/types-CuMJ2M7D.d.ts +210 -0
- package/dist/{types-DUnFZ08M.d.ts → types-CyNndVAT.d.ts} +16 -8
- package/dist/{types-DPIDuhut.d.ts → types-DNVzoRvi.d.ts} +2 -1
- package/dist/types-J6g6iKe_.d.ts +6 -0
- package/dist/{urlUtils-6jsE6rKp.esm.js → urlUtils-eYiyWjh0.esm.js} +4 -1
- package/dist/video-selfie.d.ts +8 -8
- package/dist/video-selfie.esm.js +97 -22
- package/dist/{videoSelfieCameraWarmer-D1xA0u8y.esm.js → videoSelfieCameraWarmer-e3irGfcO.esm.js} +18 -21
- package/dist/{videoSelfieStepDetector-CGsTltqB.d.ts → videoSelfieStepDetector-Dv3Mgws-.d.ts} +9 -4
- package/dist/virtualCameraCheck-eFOm2C9q.esm.js +27 -0
- package/dist/{warmup-BElYWRh7.esm.js → warmup-DtB0DJpl.esm.js} +198 -27
- package/dist/wasm.d.ts +2 -2
- package/dist/wasm.esm.js +3 -3
- package/dist/{wasmDsFlagSync-CYj5LL9z.esm.js → wasmDsFlagSync-BtiR5pig.esm.js} +1 -1
- package/dist/wasmMetadataVersionSync-U8EFUr1T.esm.js +27 -0
- package/dist/{wasmWebClient-BjZw_7OB.esm.js → wasmWebClient-BDrax6Eu.esm.js} +55 -26
- package/dist/watchlist-for-business.d.ts +2 -1
- package/dist/watchlist-for-business.esm.js +2 -2
- package/dist/watchlist.esm.js +2 -2
- package/dist/{watchlistForBusinessManager-B3GDPZrr.d.ts → watchlistForBusinessManager-DX2AyM4Y.d.ts} +54 -18
- package/dist/{watchlistForBusinessManager-CZZOFkGl.esm.js → watchlistForBusinessManager-DqUpAEj_.esm.js} +37 -7
- package/dist/watchlistForBusinessStateMachine-DdaPl2PS.esm.js +166 -0
- package/dist/{watchlistManager-DXtX94SN.esm.js → watchlistManager-CdpXzT4B.esm.js} +2 -2
- package/dist/{watchlistStateMachine-McALifag.esm.js → watchlistStateMachine-ofHW_lPk.esm.js} +1 -1
- package/dist/workflow.d.ts +5 -2
- package/dist/workflow.esm.js +60 -50
- package/package.json +12 -5
- package/dist/IBrowserEnvironmentCapability-DEaRRk-R.esm.js +0 -9
- package/dist/addressSearch-DPjIKJrX.esm.js +0 -563
- package/dist/deepsightLoader-DeNvGU3c.esm.js +0 -55
- package/dist/ekycStateMachine-CDnI_NRq.esm.js +0 -1443
- package/dist/ekycUtils-zY8CdKJL.esm.js +0 -300
- package/dist/thumbmark.esm-CRc0cYvz.esm.js +0 -1242
- package/dist/tri.esm-BIjHhBJ2.esm.js +0 -2620
- package/dist/types-BvLo3U4u.d.ts +0 -134
- package/dist/types-zOgZqMni.d.ts +0 -6
- package/dist/watchlistForBusinessStateMachine-B66E7jud.esm.js +0 -78
- /package/dist/{types-BSBzhHRH2.d.ts → types-BSBzhHRH.d.ts} +0 -0
|
@@ -2,7 +2,7 @@ import { A as StateMachine, C as StateValue, D as PromiseActorLogic, a as ActorR
|
|
|
2
2
|
import { t as Manager } from "./Manager-C9T5amUN.js";
|
|
3
3
|
import "./Actor-DpTj5PFb.js";
|
|
4
4
|
import { n as PermissionStatus, t as PermissionResult } from "./types-BEwVKkLJ.js";
|
|
5
|
-
import { a as DocumentCaptureErrorCode, c as DocumentType, i as DocumentCaptureContext, l as DocumentUploadResponse, o as DocumentCaptureInput, r as DocumentCaptureConfig, s as DocumentCaptureNextPageType, t as CapturedDocument, u as
|
|
5
|
+
import { a as DocumentCaptureErrorCode, c as DocumentType, d as FinalizeDocumentResponse, i as DocumentCaptureContext, l as DocumentUploadResponse, o as DocumentCaptureInput, r as DocumentCaptureConfig, s as DocumentCaptureNextPageType, t as CapturedDocument, u as DocumentUploadStatus } from "./types-CyNndVAT.js";
|
|
6
6
|
//#region src/modules/document-capture/documentCaptureStateMachine.d.ts
|
|
7
7
|
declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
8
8
|
type: "CAPTURE";
|
|
@@ -55,6 +55,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
55
55
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
56
56
|
processingType: string;
|
|
57
57
|
sendBase64: boolean;
|
|
58
|
+
title: string | undefined;
|
|
58
59
|
onProgress: (progress: number) => void;
|
|
59
60
|
}, EventObject>> | ActorRefFromLogic<PromiseActorLogic<PermissionResult, {
|
|
60
61
|
permissionResult?: PermissionResult;
|
|
@@ -69,6 +70,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
69
70
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
70
71
|
processingType: string;
|
|
71
72
|
sendBase64: boolean;
|
|
73
|
+
title: string | undefined;
|
|
72
74
|
onProgress: (progress: number) => void;
|
|
73
75
|
}, EventObject>;
|
|
74
76
|
id: string | undefined;
|
|
@@ -131,6 +133,10 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
131
133
|
type: "setFinalizeError";
|
|
132
134
|
params: NonReducibleUnknown;
|
|
133
135
|
};
|
|
136
|
+
setRejectionStatus: {
|
|
137
|
+
type: "setRejectionStatus";
|
|
138
|
+
params: NonReducibleUnknown;
|
|
139
|
+
};
|
|
134
140
|
setCaptureMethodFile: {
|
|
135
141
|
type: "setCaptureMethodFile";
|
|
136
142
|
params: NonReducibleUnknown;
|
|
@@ -192,6 +198,10 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
192
198
|
params: NonReducibleUnknown;
|
|
193
199
|
};
|
|
194
200
|
}>, Values<{
|
|
201
|
+
isOutOfAttempts: {
|
|
202
|
+
type: "isOutOfAttempts";
|
|
203
|
+
params: unknown;
|
|
204
|
+
};
|
|
195
205
|
allowSkip: {
|
|
196
206
|
type: "allowSkip";
|
|
197
207
|
params: unknown;
|
|
@@ -260,7 +270,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
260
270
|
readonly on: {
|
|
261
271
|
readonly CLOSE: ".closed";
|
|
262
272
|
};
|
|
263
|
-
readonly context: ({ input }: {
|
|
273
|
+
readonly context: ({ input, self }: {
|
|
264
274
|
spawn: {
|
|
265
275
|
<TSrc extends "uploadDocument" | "requestPermission" | "checkPermission" | "initCamera" | "finalizeDocumentRequest">(logic: TSrc, ...[options]: ({
|
|
266
276
|
src: "uploadDocument";
|
|
@@ -268,6 +278,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
268
278
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
269
279
|
processingType: string;
|
|
270
280
|
sendBase64: boolean;
|
|
281
|
+
title: string | undefined;
|
|
271
282
|
onProgress: (progress: number) => void;
|
|
272
283
|
}, EventObject>;
|
|
273
284
|
id: string | undefined;
|
|
@@ -277,6 +288,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
277
288
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
278
289
|
processingType: string;
|
|
279
290
|
sendBase64: boolean;
|
|
291
|
+
title: string | undefined;
|
|
280
292
|
onProgress: (progress: number) => void;
|
|
281
293
|
}, EventObject>;
|
|
282
294
|
id: string | undefined;
|
|
@@ -364,6 +376,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
364
376
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
365
377
|
processingType: string;
|
|
366
378
|
sendBase64: boolean;
|
|
379
|
+
title: string | undefined;
|
|
367
380
|
onProgress: (progress: number) => void;
|
|
368
381
|
}, EventObject>;
|
|
369
382
|
id: string | undefined;
|
|
@@ -518,12 +531,17 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
518
531
|
helpOpen: false;
|
|
519
532
|
progress: number;
|
|
520
533
|
error: undefined;
|
|
534
|
+
rejectionStatus: undefined;
|
|
521
535
|
attemptsRemaining: number;
|
|
522
536
|
pageNumber: number;
|
|
523
537
|
nextPageType: "none";
|
|
524
538
|
};
|
|
525
539
|
readonly states: {
|
|
526
540
|
readonly tutorial: {
|
|
541
|
+
readonly always: {
|
|
542
|
+
readonly target: "finished";
|
|
543
|
+
readonly guard: "isOutOfAttempts";
|
|
544
|
+
};
|
|
527
545
|
readonly on: {
|
|
528
546
|
readonly OPEN_METHOD_SELECTION: {
|
|
529
547
|
readonly actions: "openMethodSelection";
|
|
@@ -622,6 +640,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
622
640
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
623
641
|
processingType: string;
|
|
624
642
|
sendBase64: boolean;
|
|
643
|
+
title: string | undefined;
|
|
625
644
|
onProgress: (progress: number) => void;
|
|
626
645
|
}, EventObject>;
|
|
627
646
|
id: string | undefined;
|
|
@@ -708,6 +727,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
708
727
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
709
728
|
processingType: string;
|
|
710
729
|
sendBase64: boolean;
|
|
730
|
+
title: string | undefined;
|
|
711
731
|
onProgress: (progress: number) => void;
|
|
712
732
|
}, EventObject>;
|
|
713
733
|
id: string | undefined;
|
|
@@ -793,6 +813,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
793
813
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
794
814
|
processingType: string;
|
|
795
815
|
sendBase64: boolean;
|
|
816
|
+
title: string | undefined;
|
|
796
817
|
onProgress: (progress: number) => void;
|
|
797
818
|
}, EventObject>;
|
|
798
819
|
id: string | undefined;
|
|
@@ -879,6 +900,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
879
900
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
880
901
|
processingType: string;
|
|
881
902
|
sendBase64: boolean;
|
|
903
|
+
title: string | undefined;
|
|
882
904
|
onProgress: (progress: number) => void;
|
|
883
905
|
}, EventObject>;
|
|
884
906
|
id: string | undefined;
|
|
@@ -1134,6 +1156,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
1134
1156
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
1135
1157
|
processingType: string;
|
|
1136
1158
|
sendBase64: boolean;
|
|
1159
|
+
title: string | undefined;
|
|
1137
1160
|
onProgress: (progress: number) => void;
|
|
1138
1161
|
}, EventObject>;
|
|
1139
1162
|
id: string | undefined;
|
|
@@ -1220,6 +1243,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
1220
1243
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
1221
1244
|
processingType: string;
|
|
1222
1245
|
sendBase64: boolean;
|
|
1246
|
+
title: string | undefined;
|
|
1223
1247
|
onProgress: (progress: number) => void;
|
|
1224
1248
|
}, EventObject>;
|
|
1225
1249
|
id: string | undefined;
|
|
@@ -1305,6 +1329,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
1305
1329
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
1306
1330
|
processingType: string;
|
|
1307
1331
|
sendBase64: boolean;
|
|
1332
|
+
title: string | undefined;
|
|
1308
1333
|
onProgress: (progress: number) => void;
|
|
1309
1334
|
}, EventObject>;
|
|
1310
1335
|
id: string | undefined;
|
|
@@ -1441,6 +1466,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
1441
1466
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
1442
1467
|
processingType: string;
|
|
1443
1468
|
sendBase64: boolean;
|
|
1469
|
+
title: string | undefined;
|
|
1444
1470
|
onProgress: (progress: number) => void;
|
|
1445
1471
|
}, EventObject>;
|
|
1446
1472
|
id: string | undefined;
|
|
@@ -1681,6 +1707,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
1681
1707
|
capturedDocument: CapturedDocument;
|
|
1682
1708
|
processingType: DocumentType;
|
|
1683
1709
|
sendBase64: boolean;
|
|
1710
|
+
title: string | undefined;
|
|
1684
1711
|
onProgress: (progress: number) => void;
|
|
1685
1712
|
};
|
|
1686
1713
|
readonly onDone: {
|
|
@@ -1689,7 +1716,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
1689
1716
|
};
|
|
1690
1717
|
readonly onError: {
|
|
1691
1718
|
readonly target: "failure";
|
|
1692
|
-
readonly actions: readonly ["setUploadError", "decrementAttemptsRemaining", "stopStream"];
|
|
1719
|
+
readonly actions: readonly ["setUploadError", "setRejectionStatus", "decrementAttemptsRemaining", "stopStream"];
|
|
1693
1720
|
};
|
|
1694
1721
|
};
|
|
1695
1722
|
readonly on: {
|
|
@@ -1883,7 +1910,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
1883
1910
|
};
|
|
1884
1911
|
readonly onError: {
|
|
1885
1912
|
readonly target: "failure";
|
|
1886
|
-
readonly actions: readonly ["setFinalizeError", "decrementAttemptsRemaining"];
|
|
1913
|
+
readonly actions: readonly ["setFinalizeError", "setRejectionStatus", "decrementAttemptsRemaining"];
|
|
1887
1914
|
};
|
|
1888
1915
|
};
|
|
1889
1916
|
};
|
|
@@ -1951,6 +1978,8 @@ type DocumentCaptureCapturingState = {
|
|
|
1951
1978
|
pageNumber: number;
|
|
1952
1979
|
/** Resolved max upload size in bytes (defaults to 10MB when unconfigured). */
|
|
1953
1980
|
maxFileSize: number;
|
|
1981
|
+
title: string | undefined;
|
|
1982
|
+
text: string | undefined;
|
|
1954
1983
|
};
|
|
1955
1984
|
type DocumentCapturePreviewState = {
|
|
1956
1985
|
status: 'preview';
|
|
@@ -1975,6 +2004,8 @@ type DocumentCaptureSuccessState = {
|
|
|
1975
2004
|
type DocumentCaptureFailureState = {
|
|
1976
2005
|
status: 'failure';
|
|
1977
2006
|
error: DocumentCaptureErrorCode;
|
|
2007
|
+
/** Server status that rejected the document (v3), when the server sent one. */
|
|
2008
|
+
rejectionStatus?: DocumentUploadStatus;
|
|
1978
2009
|
attemptsRemaining: number;
|
|
1979
2010
|
};
|
|
1980
2011
|
type DocumentCaptureFinishedState = {
|
|
@@ -1985,6 +2016,8 @@ type DocumentCaptureClosedState = {
|
|
|
1985
2016
|
};
|
|
1986
2017
|
type DocumentCaptureNextPageState = {
|
|
1987
2018
|
status: 'nextPage';
|
|
2019
|
+
title: string | undefined;
|
|
2020
|
+
text: string | undefined;
|
|
1988
2021
|
imageBase64: string;
|
|
1989
2022
|
fileType: string;
|
|
1990
2023
|
fileName: string;
|
package/dist/{documentCaptureManager-DUJwpKC5.esm.js → documentCaptureManager-DLPqruXJ.esm.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
1
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-ggpBBaZ8.esm.js";
|
|
2
2
|
import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
|
|
3
3
|
import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
|
|
4
|
-
import { n as DEFAULT_MAX_FILE_SIZE, r as DOCUMENT_CAPTURE_ERROR_CODES, t as documentCaptureMachine } from "./documentCaptureStateMachine-
|
|
4
|
+
import { n as DEFAULT_MAX_FILE_SIZE, r as DOCUMENT_CAPTURE_ERROR_CODES, t as documentCaptureMachine } from "./documentCaptureStateMachine-DCvWQhFG.esm.js";
|
|
5
5
|
//#region src/modules/document-capture/documentCaptureActor.ts
|
|
6
6
|
function createDocumentCaptureActor(options) {
|
|
7
7
|
return createActor(documentCaptureMachine, { input: { config: options.config } }).start();
|
|
@@ -90,25 +90,30 @@ function getPermissionStatus(snapshot) {
|
|
|
90
90
|
if (snapshot.matches({ permissions: "idle" })) return "checking";
|
|
91
91
|
return "idle";
|
|
92
92
|
}
|
|
93
|
+
function getPageCopy(config, pageNumber) {
|
|
94
|
+
return pageNumber > 1 ? {
|
|
95
|
+
title: config.step2Title,
|
|
96
|
+
text: config.step2Text
|
|
97
|
+
} : {
|
|
98
|
+
title: config.title,
|
|
99
|
+
text: config.text
|
|
100
|
+
};
|
|
101
|
+
}
|
|
93
102
|
function mapState(snapshot) {
|
|
94
103
|
const typedSnapshot = snapshot;
|
|
95
104
|
const { context } = typedSnapshot;
|
|
96
|
-
if (typedSnapshot.matches("tutorial")) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
pageNumber: context.pageNumber,
|
|
109
|
-
maxFileSize: context.config.maxFileSize
|
|
110
|
-
};
|
|
111
|
-
}
|
|
105
|
+
if (typedSnapshot.matches("tutorial")) return {
|
|
106
|
+
status: "tutorial",
|
|
107
|
+
...getPageCopy(context.config, context.pageNumber),
|
|
108
|
+
allowSkipDocumentCapture: context.config.allowSkipDocumentCapture && context.pageNumber === 1,
|
|
109
|
+
onlyCapture: context.config.onlyCapture,
|
|
110
|
+
onlyUpload: context.config.onlyUpload,
|
|
111
|
+
methodSelectionOpen: context.methodSelectionOpen,
|
|
112
|
+
onlyPdf: context.config.onlyPdf,
|
|
113
|
+
error: context.error,
|
|
114
|
+
pageNumber: context.pageNumber,
|
|
115
|
+
maxFileSize: context.config.maxFileSize
|
|
116
|
+
};
|
|
112
117
|
if (typedSnapshot.matches("permissions")) return {
|
|
113
118
|
status: "permissions",
|
|
114
119
|
permissionStatus: getPermissionStatus(typedSnapshot)
|
|
@@ -124,7 +129,8 @@ function mapState(snapshot) {
|
|
|
124
129
|
onlyPdf: context.config.onlyPdf,
|
|
125
130
|
error: context.error,
|
|
126
131
|
pageNumber: context.pageNumber,
|
|
127
|
-
maxFileSize: context.config.maxFileSize
|
|
132
|
+
maxFileSize: context.config.maxFileSize,
|
|
133
|
+
...getPageCopy(context.config, context.pageNumber)
|
|
128
134
|
};
|
|
129
135
|
if (typedSnapshot.matches("preview")) return {
|
|
130
136
|
status: "preview",
|
|
@@ -149,12 +155,14 @@ function mapState(snapshot) {
|
|
|
149
155
|
if (typedSnapshot.matches("failure")) return {
|
|
150
156
|
status: "failure",
|
|
151
157
|
error: context.error ?? DOCUMENT_CAPTURE_ERROR_CODES.UPLOAD_FAILED,
|
|
158
|
+
rejectionStatus: context.rejectionStatus,
|
|
152
159
|
attemptsRemaining: context.attemptsRemaining
|
|
153
160
|
};
|
|
154
161
|
if (typedSnapshot.matches("finished")) return { status: "finished" };
|
|
155
162
|
if (typedSnapshot.matches("closed")) return { status: "closed" };
|
|
156
163
|
if (typedSnapshot.matches("nextPage")) return {
|
|
157
164
|
status: "nextPage",
|
|
165
|
+
...getPageCopy(context.config, context.pageNumber + 1),
|
|
158
166
|
imageBase64: context.capturedDocument?.imageBase64 ?? "",
|
|
159
167
|
fileType: context.capturedDocument?.fileType ?? "",
|
|
160
168
|
fileName: context.capturedDocument?.file.name ?? "",
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { t as api, u as endpoints } from "./api-
|
|
1
|
+
import { t as api, u as endpoints } from "./api-CpP4PS4S.esm.js";
|
|
2
2
|
import { i as assign, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
|
|
3
3
|
import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
|
|
4
|
-
import {
|
|
5
|
-
import { n as invokeRequestPermissionActor, t as checkPermission } from "./permissionServices-
|
|
6
|
-
import { r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-
|
|
7
|
-
import {
|
|
4
|
+
import { a as stopCameraStream } from "./camera-E_Kcre4O.esm.js";
|
|
5
|
+
import { n as invokeRequestPermissionActor, t as checkPermission } from "./permissionServices-D190ATGD.esm.js";
|
|
6
|
+
import { r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-DFV-Ws0a.esm.js";
|
|
7
|
+
import { t as carryAttempts } from "./attemptCarry-WOkfvFMw.esm.js";
|
|
8
|
+
import { n as getBackCameraStream } from "./backCameraStream-DS1oDiUq.esm.js";
|
|
8
9
|
//#region src/modules/document-capture/types.ts
|
|
9
10
|
const PROCESSING_TYPE_MAP = {
|
|
10
11
|
processV5CLogbook: "v5cMultiPageLogbook",
|
|
@@ -17,13 +18,27 @@ const PROCESSING_TYPE_MAP = {
|
|
|
17
18
|
processW8BenOcr: "w8Ben",
|
|
18
19
|
processW8BenEOcr: "w8BenE"
|
|
19
20
|
};
|
|
21
|
+
const V3_TYPES = /* @__PURE__ */ new Set([
|
|
22
|
+
"signature",
|
|
23
|
+
"document",
|
|
24
|
+
"medicalDoc",
|
|
25
|
+
"thirdId",
|
|
26
|
+
"contract",
|
|
27
|
+
"v5cMultiPageLogbook",
|
|
28
|
+
"carInvoice",
|
|
29
|
+
"financeSettlement",
|
|
30
|
+
"circulationCard",
|
|
31
|
+
"w8Ben",
|
|
32
|
+
"w8BenE"
|
|
33
|
+
]);
|
|
20
34
|
const MULTI_PAGE_TYPES = [
|
|
21
35
|
"v5cMultiPageLogbook",
|
|
36
|
+
"carInvoice",
|
|
22
37
|
"circulationCard",
|
|
23
38
|
"financeSettlement",
|
|
24
39
|
"w8BenE"
|
|
25
40
|
];
|
|
26
|
-
const
|
|
41
|
+
const ASYNC_LEGACY_TYPES = /* @__PURE__ */ new Set(["asyncProcessCarInvoice", "asyncProcessCirculationCard"]);
|
|
27
42
|
const DEFAULT_MAX_FILE_SIZE = 10 * 1024 * 1024;
|
|
28
43
|
const OTHER_DOCUMENT_TYPES = /* @__PURE__ */ new Set([
|
|
29
44
|
"otherDocument1",
|
|
@@ -37,6 +52,17 @@ const DOCUMENT_CAPTURE_ERROR_CODES = {
|
|
|
37
52
|
const DOCUMENT_CAPTURE_FINALIZE_ERROR_CODES = { UNEXPECTED_ERROR: "UNEXPECTED_ERROR" };
|
|
38
53
|
//#endregion
|
|
39
54
|
//#region src/modules/document-capture/documentCaptureUploadService.ts
|
|
55
|
+
/** Thrown when the server answers 2xx but rejects the document with a status. */
|
|
56
|
+
var DocumentUploadRejectedError = class extends Error {
|
|
57
|
+
constructor(message, status) {
|
|
58
|
+
super(message);
|
|
59
|
+
this.name = "DocumentUploadRejectedError";
|
|
60
|
+
this.status = status;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
function getRejectionStatus(error) {
|
|
64
|
+
return error instanceof DocumentUploadRejectedError ? error.status : void 0;
|
|
65
|
+
}
|
|
40
66
|
const ADDRESS_STATEMENT_PROCESSING_TYPES = /* @__PURE__ */ new Set([
|
|
41
67
|
"processPoaOcr",
|
|
42
68
|
"processLoaOcr",
|
|
@@ -52,23 +78,30 @@ function isMultiPageDocumentType(processingType) {
|
|
|
52
78
|
function normalizeProcessingType(processingType) {
|
|
53
79
|
return PROCESSING_TYPE_MAP[processingType] ?? processingType;
|
|
54
80
|
}
|
|
55
|
-
function buildUrl(baseUrl, type, format) {
|
|
56
|
-
|
|
81
|
+
function buildUrl(baseUrl, type, format, extraParams = {}) {
|
|
82
|
+
const params = new URLSearchParams({
|
|
83
|
+
type,
|
|
84
|
+
format
|
|
85
|
+
});
|
|
86
|
+
for (const [key, value] of Object.entries(extraParams)) if (value) params.set(key, value);
|
|
87
|
+
return `${baseUrl}?${params.toString()}`;
|
|
57
88
|
}
|
|
58
|
-
function resolveUploadUrl(processingType, fileFormat, sendBase64 = false) {
|
|
89
|
+
function resolveUploadUrl(processingType, fileFormat, sendBase64 = false, { title } = {}) {
|
|
59
90
|
const format = fileFormat === "application/pdf" ? "pdf" : "image";
|
|
60
91
|
const resolvedType = normalizeProcessingType(processingType);
|
|
61
|
-
if (
|
|
62
|
-
if (
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
if (
|
|
67
|
-
if (
|
|
68
|
-
return buildUrl(endpoints.
|
|
92
|
+
if (ASYNC_LEGACY_TYPES.has(processingType)) return buildUrl(endpoints.cfdi, resolvedType, format, { title });
|
|
93
|
+
if (V3_TYPES.has(resolvedType)) return buildUrl(endpoints.documentV3, resolvedType, format, {
|
|
94
|
+
processingMethod: resolvedType === "carInvoice" ? "sync" : void 0,
|
|
95
|
+
title
|
|
96
|
+
});
|
|
97
|
+
if (ADDRESS_STATEMENT_PROCESSING_TYPES.has(resolvedType)) return buildUrl(endpoints.addressStatement, resolvedType, format, { title });
|
|
98
|
+
if (!sendBase64) return buildUrl(endpoints.documentLegacy, OTHER_DOCUMENT_TYPES.has(resolvedType) ? resolvedType : "addressStatement", format, { title });
|
|
99
|
+
if (OTHER_DOCUMENT_TYPES.has(resolvedType)) return buildUrl(endpoints.addDocument, resolvedType, format, { title });
|
|
100
|
+
if (resolvedType === "addressStatement" || !resolvedType) return buildUrl(endpoints.addressStatement, resolvedType || "addressStatement", format, { title });
|
|
101
|
+
return buildUrl(endpoints.addressStatement, processingType, format, { title });
|
|
69
102
|
}
|
|
70
|
-
async function uploadDocumentCapture({ file, base64Image, sendBase64 = false, processingType, fileFormat, onProgress, signal }) {
|
|
71
|
-
const url = resolveUploadUrl(processingType, fileFormat, sendBase64);
|
|
103
|
+
async function uploadDocumentCapture({ file, base64Image, sendBase64 = false, processingType, fileFormat, title, onProgress, signal }) {
|
|
104
|
+
const url = resolveUploadUrl(processingType, fileFormat, sendBase64, { title });
|
|
72
105
|
const useBase64 = !url.startsWith(`${endpoints.documentLegacy}?`);
|
|
73
106
|
const body = useBase64 ? { base64Image: base64Image.includes(",") ? base64Image.split(",")[1] : base64Image } : file;
|
|
74
107
|
const response = await api.post(url, body, {
|
|
@@ -77,7 +110,7 @@ async function uploadDocumentCapture({ file, base64Image, sendBase64 = false, pr
|
|
|
77
110
|
onUploadProgress: onProgress
|
|
78
111
|
});
|
|
79
112
|
if (!response.ok) throw new Error(`Document upload failed: ${response.status}`);
|
|
80
|
-
if (!(response.data.success || response.data.status === "SUCCESS" || response.data.status === "ADD_NEXT_PAGE" || response.data.status === "OPTIONAL_PAGE_CAPTURE")) throw new
|
|
113
|
+
if (!(response.data.success || response.data.status === "SUCCESS" || response.data.status === "ADD_NEXT_PAGE" || response.data.status === "OPTIONAL_PAGE_CAPTURE")) throw new DocumentUploadRejectedError("Document upload rejected by server", response.data.status);
|
|
81
114
|
return response.data;
|
|
82
115
|
}
|
|
83
116
|
function resolveMultiPageDocumentType(processingType) {
|
|
@@ -91,10 +124,7 @@ async function finalizeDocument({ processingType, signal }) {
|
|
|
91
124
|
if (!response.ok) throw new Error(`Document finalize failed: ${response.status}`);
|
|
92
125
|
const data = response.data;
|
|
93
126
|
if (!data) throw new Error("Document finalize rejected by server");
|
|
94
|
-
if (!(data.success || data.status === "SUCCESS")) {
|
|
95
|
-
const serverStatus = typeof data.status === "string" ? data.status : "unknown";
|
|
96
|
-
throw new Error(`Document finalize rejected by server (status: ${serverStatus})`);
|
|
97
|
-
}
|
|
127
|
+
if (!(data.success || data.status === "SUCCESS")) throw new DocumentUploadRejectedError(`Document finalize rejected by server (status: ${data.status ?? "unknown"})`, data.status);
|
|
98
128
|
return data;
|
|
99
129
|
}
|
|
100
130
|
//#endregion
|
|
@@ -123,6 +153,7 @@ const documentCaptureMachine = setup({
|
|
|
123
153
|
sendBase64: input.sendBase64,
|
|
124
154
|
processingType: input.processingType,
|
|
125
155
|
fileFormat: input.capturedDocument.fileType,
|
|
156
|
+
title: input.title,
|
|
126
157
|
onProgress: input.onProgress,
|
|
127
158
|
signal
|
|
128
159
|
});
|
|
@@ -151,6 +182,7 @@ const documentCaptureMachine = setup({
|
|
|
151
182
|
setProgress: assign(({ event }) => ({ progress: event.progress })),
|
|
152
183
|
setUploadError: assign({ error: () => DOCUMENT_CAPTURE_ERROR_CODES.UPLOAD_FAILED }),
|
|
153
184
|
setFinalizeError: assign({ error: () => DOCUMENT_CAPTURE_FINALIZE_ERROR_CODES.UNEXPECTED_ERROR }),
|
|
185
|
+
setRejectionStatus: assign(({ event }) => ({ rejectionStatus: getRejectionStatus(event.error) })),
|
|
154
186
|
decrementAttemptsRemaining: assign(({ context }) => ({ attemptsRemaining: context.attemptsRemaining - 1 })),
|
|
155
187
|
setCaptureMethodFile: assign({ captureMethod: () => "file" }),
|
|
156
188
|
setCaptureMethodCamera: assign({ captureMethod: () => "camera" }),
|
|
@@ -185,7 +217,10 @@ const documentCaptureMachine = setup({
|
|
|
185
217
|
nextPageType: "none",
|
|
186
218
|
captureMethod: void 0
|
|
187
219
|
})),
|
|
188
|
-
clearError: assign({
|
|
220
|
+
clearError: assign({
|
|
221
|
+
error: () => void 0,
|
|
222
|
+
rejectionStatus: () => void 0
|
|
223
|
+
}),
|
|
189
224
|
resetProgress: assign({ progress: () => 0 }),
|
|
190
225
|
stopStream: assign(({ context }) => {
|
|
191
226
|
if (context.stream) stopCameraStream(context.stream);
|
|
@@ -193,6 +228,7 @@ const documentCaptureMachine = setup({
|
|
|
193
228
|
})
|
|
194
229
|
},
|
|
195
230
|
guards: {
|
|
231
|
+
isOutOfAttempts: ({ context }) => context.attemptsRemaining <= 0 && context.attemptsRemaining < context.config.captureAttempts,
|
|
196
232
|
allowSkip: ({ context }) => context.config.allowSkipDocumentCapture && context.pageNumber === 1,
|
|
197
233
|
fileSizeOk: ({ context, event }) => {
|
|
198
234
|
return event.file.size <= context.config.maxFileSize;
|
|
@@ -222,7 +258,7 @@ const documentCaptureMachine = setup({
|
|
|
222
258
|
id: "documentCapture",
|
|
223
259
|
initial: "tutorial",
|
|
224
260
|
on: { CLOSE: ".closed" },
|
|
225
|
-
context: ({ input }) => {
|
|
261
|
+
context: ({ input, self }) => {
|
|
226
262
|
const { processingType = "addressStatement", captureMode, allowSkipDocumentCapture, disableSkipPoa, captureAttempts = 3, sendBase64 = false, maxFileSize = DEFAULT_MAX_FILE_SIZE, onlyPdf = false, title, text, step2Title, step2Text } = input.config;
|
|
227
263
|
return {
|
|
228
264
|
config: {
|
|
@@ -247,42 +283,49 @@ const documentCaptureMachine = setup({
|
|
|
247
283
|
helpOpen: false,
|
|
248
284
|
progress: 0,
|
|
249
285
|
error: void 0,
|
|
250
|
-
|
|
286
|
+
rejectionStatus: void 0,
|
|
287
|
+
attemptsRemaining: carryAttempts("documentCapture", self, (s) => ({ attemptsRemaining: s.context.attemptsRemaining })).attemptsRemaining ?? captureAttempts,
|
|
251
288
|
pageNumber: 1,
|
|
252
289
|
nextPageType: "none"
|
|
253
290
|
};
|
|
254
291
|
},
|
|
255
292
|
states: {
|
|
256
|
-
tutorial: {
|
|
257
|
-
|
|
258
|
-
CLOSE_METHOD_SELECTION: { actions: ["closeMethodSelection", "clearCaptureMethod"] },
|
|
259
|
-
SELECT_UPLOAD_METHOD: { actions: "setCaptureMethodFile" },
|
|
260
|
-
DESELECT_UPLOAD_METHOD: { actions: "clearCaptureMethod" },
|
|
261
|
-
CAPTURE: [{
|
|
262
|
-
target: "permissions",
|
|
263
|
-
guard: "allowsCameraCapture",
|
|
264
|
-
actions: ["closeMethodSelection", "clearCaptureMethod"]
|
|
265
|
-
}, {
|
|
266
|
-
target: "capturing",
|
|
267
|
-
actions: ["closeMethodSelection", "clearCaptureMethod"]
|
|
268
|
-
}],
|
|
269
|
-
FILE_SELECTED: [{
|
|
270
|
-
target: "preview",
|
|
271
|
-
guard: "fileSizeOk",
|
|
272
|
-
actions: [
|
|
273
|
-
"setCapturedDocument",
|
|
274
|
-
"setCaptureMethodFile",
|
|
275
|
-
"closeMethodSelection"
|
|
276
|
-
]
|
|
277
|
-
}, {
|
|
278
|
-
target: "tutorial",
|
|
279
|
-
actions: ["setFileTooLargeError", "closeMethodSelection"]
|
|
280
|
-
}],
|
|
281
|
-
SKIP: {
|
|
293
|
+
tutorial: {
|
|
294
|
+
always: {
|
|
282
295
|
target: "finished",
|
|
283
|
-
guard: "
|
|
296
|
+
guard: "isOutOfAttempts"
|
|
297
|
+
},
|
|
298
|
+
on: {
|
|
299
|
+
OPEN_METHOD_SELECTION: { actions: "openMethodSelection" },
|
|
300
|
+
CLOSE_METHOD_SELECTION: { actions: ["closeMethodSelection", "clearCaptureMethod"] },
|
|
301
|
+
SELECT_UPLOAD_METHOD: { actions: "setCaptureMethodFile" },
|
|
302
|
+
DESELECT_UPLOAD_METHOD: { actions: "clearCaptureMethod" },
|
|
303
|
+
CAPTURE: [{
|
|
304
|
+
target: "permissions",
|
|
305
|
+
guard: "allowsCameraCapture",
|
|
306
|
+
actions: ["closeMethodSelection", "clearCaptureMethod"]
|
|
307
|
+
}, {
|
|
308
|
+
target: "capturing",
|
|
309
|
+
actions: ["closeMethodSelection", "clearCaptureMethod"]
|
|
310
|
+
}],
|
|
311
|
+
FILE_SELECTED: [{
|
|
312
|
+
target: "preview",
|
|
313
|
+
guard: "fileSizeOk",
|
|
314
|
+
actions: [
|
|
315
|
+
"setCapturedDocument",
|
|
316
|
+
"setCaptureMethodFile",
|
|
317
|
+
"closeMethodSelection"
|
|
318
|
+
]
|
|
319
|
+
}, {
|
|
320
|
+
target: "tutorial",
|
|
321
|
+
actions: ["setFileTooLargeError", "closeMethodSelection"]
|
|
322
|
+
}],
|
|
323
|
+
SKIP: {
|
|
324
|
+
target: "finished",
|
|
325
|
+
guard: "allowSkip"
|
|
326
|
+
}
|
|
284
327
|
}
|
|
285
|
-
}
|
|
328
|
+
},
|
|
286
329
|
permissions: {
|
|
287
330
|
initial: "idle",
|
|
288
331
|
states: {
|
|
@@ -421,6 +464,7 @@ const documentCaptureMachine = setup({
|
|
|
421
464
|
capturedDocument: context.capturedDocument,
|
|
422
465
|
processingType: context.config.processingType,
|
|
423
466
|
sendBase64: context.config.sendBase64,
|
|
467
|
+
title: context.config.title,
|
|
424
468
|
onProgress: (progress) => {
|
|
425
469
|
self.send({
|
|
426
470
|
type: "UPLOAD_PROGRESS",
|
|
@@ -437,6 +481,7 @@ const documentCaptureMachine = setup({
|
|
|
437
481
|
target: "failure",
|
|
438
482
|
actions: [
|
|
439
483
|
"setUploadError",
|
|
484
|
+
"setRejectionStatus",
|
|
440
485
|
"decrementAttemptsRemaining",
|
|
441
486
|
"stopStream"
|
|
442
487
|
]
|
|
@@ -476,7 +521,11 @@ const documentCaptureMachine = setup({
|
|
|
476
521
|
onDone: { target: "finished" },
|
|
477
522
|
onError: {
|
|
478
523
|
target: "failure",
|
|
479
|
-
actions: [
|
|
524
|
+
actions: [
|
|
525
|
+
"setFinalizeError",
|
|
526
|
+
"setRejectionStatus",
|
|
527
|
+
"decrementAttemptsRemaining"
|
|
528
|
+
]
|
|
480
529
|
}
|
|
481
530
|
} },
|
|
482
531
|
failure: { on: {
|
package/dist/dynamic-forms.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as Screen, n as InputType, r as Question, t as DynamicFormsConfig } from "./types-
|
|
2
|
-
import { c as DynamicFormsValidationErrors, n as DynamicFormsState, o as DynamicFormsResult, r as createDynamicFormsManager, s as dynamicFormsMachine, t as DynamicFormsManager } from "./dynamicFormsManager-
|
|
1
|
+
import { i as Screen, n as InputType, r as Question, t as DynamicFormsConfig } from "./types-BSBzhHRH.js";
|
|
2
|
+
import { c as DynamicFormsValidationErrors, n as DynamicFormsState, o as DynamicFormsResult, r as createDynamicFormsManager, s as dynamicFormsMachine, t as DynamicFormsManager } from "./dynamicFormsManager-9kwY8Bf5.js";
|
|
3
3
|
export { type DynamicFormsConfig, type DynamicFormsManager, type DynamicFormsResult, type DynamicFormsState, type DynamicFormsValidationErrors, type InputType, type Question, type Screen, createDynamicFormsManager, dynamicFormsMachine };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-
|
|
2
|
-
import { t as createDynamicFormsManager } from "./dynamicFormsManager-
|
|
1
|
+
import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-USQMB-uV.esm.js";
|
|
2
|
+
import { t as createDynamicFormsManager } from "./dynamicFormsManager-DfqCEPg9.esm.js";
|
|
3
3
|
export { createDynamicFormsManager, dynamicFormsMachine };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as ActorRefFrom } from "./spawn-D9jgw9pW.js";
|
|
2
2
|
import { t as Manager } from "./Manager-C9T5amUN.js";
|
|
3
3
|
import "./Actor-DpTj5PFb.js";
|
|
4
|
-
import { i as Screen, t as DynamicFormsConfig } from "./types-
|
|
4
|
+
import { i as Screen, t as DynamicFormsConfig } from "./types-BSBzhHRH.js";
|
|
5
5
|
//#region src/modules/dynamic-forms/dynamicFormsFields.d.ts
|
|
6
6
|
/** Map of `questionId` → currently-displayed i18n error key. */
|
|
7
7
|
type DynamicFormsValidationErrors = Partial<Record<string, string>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
1
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-ggpBBaZ8.esm.js";
|
|
2
2
|
import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
|
|
3
3
|
import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
|
|
4
|
-
import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-
|
|
4
|
+
import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-USQMB-uV.esm.js";
|
|
5
5
|
//#region src/modules/dynamic-forms/dynamicFormsActor.ts
|
|
6
6
|
function createDynamicFormsActor(options) {
|
|
7
7
|
return createActor(dynamicFormsMachine, { input: { config: options.config } }).start();
|
package/dist/{dynamicFormsStateMachine-DEI45xYW.esm.js → dynamicFormsStateMachine-USQMB-uV.esm.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as api, u as endpoints } from "./api-
|
|
2
|
-
import { i as toIncodeApiError, r as isServerError, t as IncodeApiError } from "./apiError-
|
|
1
|
+
import { t as api, u as endpoints } from "./api-CpP4PS4S.esm.js";
|
|
2
|
+
import { i as toIncodeApiError, r as isServerError, t as IncodeApiError } from "./apiError-DH-CH4Nz.esm.js";
|
|
3
3
|
import { i as assign, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
|
|
4
4
|
import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
|
|
5
5
|
import { t as isoDateToMs } from "./dateUtils-CvG0FvK8.esm.js";
|
package/dist/ekyb.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./Manager-C9T5amUN.js";
|
|
2
|
-
import {
|
|
3
|
-
import { i as FlowModuleConfig } from "./types-
|
|
4
|
-
import { a as EkybValidationError, n as EkybCountry, o as EkybValidationErrors, r as EkybFieldDef, s as UboEntry, t as EkybConfig } from "./types-
|
|
5
|
-
import { n as EkybState, o as ekybMachine, r as createEkybManager, t as EkybManager } from "./ekybManager-
|
|
2
|
+
import { n as AddressSuggestion } from "./textRules-D4NRinKY.js";
|
|
3
|
+
import { i as FlowModuleConfig } from "./types-CRaFu6wS.js";
|
|
4
|
+
import { a as EkybValidationError, n as EkybCountry, o as EkybValidationErrors, r as EkybFieldDef, s as UboEntry, t as EkybConfig } from "./types-BgRHw-dR.js";
|
|
5
|
+
import { n as EkybState, o as ekybMachine, r as createEkybManager, t as EkybManager } from "./ekybManager-BLOkwmWO.js";
|
|
6
6
|
//#region src/modules/ekyb/ekybServices.d.ts
|
|
7
7
|
type EkybFlowConfig = FlowModuleConfig['EKYB'];
|
|
8
8
|
//#endregion
|
package/dist/ekyb.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as ekybMachine } from "./ekybStateMachine-
|
|
3
|
-
import { t as createEkybManager } from "./ekybManager-
|
|
1
|
+
import { c as ALL_COUNTRIES, f as SUPPORTED_COUNTRIES, l as DEV_ONLY_COUNTRIES, m as isSupportedCountry, o as toEkybConfig } from "./ekybUtils-Cw8Ta9Qi.esm.js";
|
|
2
|
+
import { t as ekybMachine } from "./ekybStateMachine-kHwdz6hm.esm.js";
|
|
3
|
+
import { t as createEkybManager } from "./ekybManager-CR8YSYux.esm.js";
|
|
4
4
|
export { ALL_COUNTRIES, DEV_ONLY_COUNTRIES, SUPPORTED_COUNTRIES, createEkybManager, ekybMachine, isSupportedCountry, toEkybConfig };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as ActorRefFrom } from "./spawn-D9jgw9pW.js";
|
|
2
2
|
import { t as Manager } from "./Manager-C9T5amUN.js";
|
|
3
3
|
import "./Actor-DpTj5PFb.js";
|
|
4
|
-
import {
|
|
5
|
-
import { i as EkybFormValues, o as EkybValidationErrors, r as EkybFieldDef, s as UboEntry, t as EkybConfig } from "./types-
|
|
4
|
+
import { n as AddressSuggestion } from "./textRules-D4NRinKY.js";
|
|
5
|
+
import { i as EkybFormValues, o as EkybValidationErrors, r as EkybFieldDef, s as UboEntry, t as EkybConfig } from "./types-BgRHw-dR.js";
|
|
6
6
|
//#region src/modules/ekyb/ekybStateMachine.d.ts
|
|
7
7
|
declare const ekybMachine: any;
|
|
8
8
|
type EkybMachine = typeof ekybMachine;
|