@incodetech/core 0.0.0-dev-20261104-870ec947 → 0.0.0-dev-20261104-4a75fc6f
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/{FaceDetectionProvider-Dn4ujf7F.esm.js → FaceDetectionProvider-BefEylit.esm.js} +4 -4
- package/dist/ae-signature.esm.js +1 -1
- package/dist/{apiError-Bn5pm13c.esm.js → apiError-DkDbuoEH.esm.js} +1 -1
- package/dist/authentication.d.ts +3 -3
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-C-cOki0Y.d.ts → authenticationManager--l6e_7Pr.d.ts} +1 -1
- package/dist/{authenticationManager-NTK5hDEQ.esm.js → authenticationManager-C_i4Xe1Y.esm.js} +3 -3
- package/dist/{authenticationStateMachine-D3K_bql8.esm.js → authenticationStateMachine-CO2-fTly.esm.js} +2 -2
- package/dist/consent.d.ts +1 -1
- package/dist/{consentManager-D8rgr5Dv.d.ts → consentManager-DXetSxcx.d.ts} +5 -5
- package/dist/curp-validation.d.ts +1 -1
- package/dist/{curpValidationManager-CXpFE-Mv.d.ts → curpValidationManager-B9LuZ0tj.d.ts} +1 -1
- package/dist/{deepsightLoader-C9x_NgZI.esm.js → deepsightLoader-B7zw-vfE.esm.js} +3 -3
- package/dist/document-capture.d.ts +3 -3
- package/dist/document-capture.esm.js +2 -2
- package/dist/{documentCaptureManager-Cip3bTcD.esm.js → documentCaptureManager-BfXguEU3.esm.js} +2 -1
- package/dist/{documentCaptureManager-6tnnDkMX.d.ts → documentCaptureManager-DDfviFg0.d.ts} +25 -4
- package/dist/{documentCaptureStateMachine-I8uUm8ek.esm.js → documentCaptureStateMachine-DJPyCwQu.esm.js} +62 -21
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-BjWv12-P.esm.js → dynamicFormsManager-mKQUeWmr.esm.js} +1 -1
- package/dist/{dynamicFormsStateMachine-Bkoxk9tn.esm.js → dynamicFormsStateMachine-szDPdJra.esm.js} +1 -1
- package/dist/ekyb.d.ts +1 -1
- package/dist/ekyb.esm.js +2 -2
- package/dist/{ekybManager-BgHDBUtq.esm.js → ekybManager-CMgIU5Gb.esm.js} +1 -1
- package/dist/{ekybStateMachine-C3DFFDE2.esm.js → ekybStateMachine-t3PSLqBv.esm.js} +1 -1
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-Dp0avVEW.esm.js → electronicSignatureManager-DknIW020.esm.js} +1 -1
- package/dist/extensibility.d.ts +11 -11
- package/dist/extensibility.esm.js +11 -11
- package/dist/{faceCaptureManagerFactory-C-xKdj-d.d.ts → faceCaptureManagerFactory-BQtDMMuq.d.ts} +3 -3
- package/dist/{faceCaptureManagerFactory-DEwha0CJ.esm.js → faceCaptureManagerFactory-DN9iKVpF.esm.js} +1 -1
- package/dist/{faceCaptureSetup-Btz_qVce.esm.js → faceCaptureSetup-CpSB7ahj.esm.js} +3 -3
- package/dist/{feature-management-DdBbUJHe.esm.js → feature-management-dp0Yk9hl.esm.js} +1 -1
- package/dist/feature-management.esm.js +1 -1
- package/dist/flow-events.d.ts +1 -1
- package/dist/flow.d.ts +6 -6
- package/dist/flow.esm.js +3 -3
- package/dist/{flowCompletionService-6WvSaorE.esm.js → flowCompletionService-CG4vj9m7.esm.js} +1 -1
- package/dist/{flowServices-DtYT0mnL.esm.js → flowServices-CEFP6bMS.esm.js} +4 -4
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-BAymFDhC.esm.js → geolocationManager-zPE9eWYf.esm.js} +1 -1
- package/dist/{geolocationStateMachine-CIy7dRvw.esm.js → geolocationStateMachine-D7vZRm09.esm.js} +1 -1
- package/dist/home.d.ts +1 -1
- package/dist/id-ocr.d.ts +1 -1
- package/dist/id-selfie-flow.d.ts +1 -1
- package/dist/id-selfie-flow.esm.js +6 -6
- package/dist/id.d.ts +3 -3
- package/dist/id.esm.js +4 -4
- package/dist/{idCaptureManager-DzTfQ1Am.d.ts → idCaptureManager-BwnhLz9C.d.ts} +5 -3
- package/dist/{idCaptureManager-CAe75bEd.esm.js → idCaptureManager-Cq5uyOJD.esm.js} +3 -3
- package/dist/{idCaptureServices-DogZGn6R.esm.js → idCaptureServices-CKQLKT1C.esm.js} +16 -9
- package/dist/{idCaptureStateMachine-S26Aots6.esm.js → idCaptureStateMachine-B8EwVvdU.esm.js} +8 -8
- package/dist/{idOcrManager-DT3kPIB3.d.ts → idOcrManager-BTdHlJ9D.d.ts} +1 -1
- package/dist/{index-DMDAk85K.d.ts → index-D2xVKjpi.d.ts} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/mandatory-consent.d.ts +2 -2
- package/dist/{mandatoryConsentManager-Cl2VSGNY.d.ts → mandatoryConsentManager-BxASdYW8.d.ts} +6 -6
- package/dist/qe-signature.esm.js +1 -1
- package/dist/{runChildModule-1ce3jIgm.esm.js → runChildModule-DeCi3qY7.esm.js} +1 -1
- package/dist/{sdkVersion-U-c8wf_m.esm.js → sdkVersion-Cx2Onf4X.esm.js} +1 -1
- package/dist/selfie.d.ts +3 -3
- package/dist/selfie.esm.js +6 -6
- package/dist/{selfieErrorUtils-BdIDyTT0.esm.js → selfieErrorUtils-DSBUe7dE.esm.js} +1 -1
- package/dist/{selfieManager-M-EKwv_P.esm.js → selfieManager-Cs0mxN-Q.esm.js} +3 -3
- package/dist/{selfieManager-BMmpUii2.d.ts → selfieManager-DMFBTmjl.d.ts} +1 -1
- package/dist/{selfieStateMachine-B3EETiXO.esm.js → selfieStateMachine-BPXuA_jf.esm.js} +3 -3
- package/dist/{session-D0gwZz7y.esm.js → session-GzzvqUKN.esm.js} +3 -3
- package/dist/session.d.ts +1 -1
- package/dist/session.esm.js +4 -4
- package/dist/{sessionInitializer-EnfC4u5t.esm.js → sessionInitializer-0JrZQKBv.esm.js} +3 -3
- package/dist/{setup-BfPzrq71.esm.js → setup-etGBX4dx.esm.js} +4 -4
- package/dist/{trueSightService-CEyCgQ61.esm.js → trueSightService-Bm9PHS9s.esm.js} +1 -1
- package/dist/types-BZ_Hjz-X.d.ts +6 -0
- package/dist/{types-e8fCsvvk.d.ts → types-CAawq94W.d.ts} +1 -1
- package/dist/{types--3HDl2SF.d.ts → types-CfGxl1G0.d.ts} +1 -1
- package/dist/{types-ZTZelfbM.d.ts → types-CyNndVAT.d.ts} +14 -6
- package/dist/{types-DuD8TRJU.d.ts → types-DPc-3Uo6.d.ts} +1 -1
- package/dist/{types-xEEWCx1j.d.ts → types-XwxtmhWC.d.ts} +1 -1
- package/dist/{types-PTZHRhGX.d.ts → types-bn0ZpYF1.d.ts} +1 -1
- package/dist/video-selfie.d.ts +1 -1
- package/dist/video-selfie.esm.js +3 -3
- package/dist/{videoSelfieCameraWarmer-BQR2tKc1.esm.js → videoSelfieCameraWarmer-Bsr-x7Y0.esm.js} +3 -3
- package/dist/{videoSelfieStepDetector-RfSmlFFW.d.ts → videoSelfieStepDetector-C8uL2RCz.d.ts} +2 -2
- package/dist/wasm.esm.js +1 -1
- package/dist/workflow.d.ts +1 -1
- package/dist/workflow.esm.js +14 -14
- package/package.json +3 -3
- package/dist/types-D9r3zRfY.d.ts +0 -6
package/dist/{FaceDetectionProvider-Dn4ujf7F.esm.js → FaceDetectionProvider-BefEylit.esm.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { l as wasmRuntime } from "./warmup-DPfXWeBq.esm.js";
|
|
2
|
-
import { t as ensureWasmPipelines } from "./setup-
|
|
2
|
+
import { t as ensureWasmPipelines } from "./setup-etGBX4dx.esm.js";
|
|
3
3
|
import { r as BaseWasmProvider } from "./WasmUtilProvider-DZOGC2HE.esm.js";
|
|
4
4
|
import { t as api, u as endpoints } from "./api-BO8JA7Pf.esm.js";
|
|
5
|
-
import { l as trueSightHintTransition, r as noteTrueSightCaptureActivity } from "./trueSightService-
|
|
6
|
-
import "./sessionInitializer-
|
|
5
|
+
import { l as trueSightHintTransition, r as noteTrueSightCaptureActivity } from "./trueSightService-Bm9PHS9s.esm.js";
|
|
6
|
+
import "./sessionInitializer-0JrZQKBv.esm.js";
|
|
7
7
|
import { t as addDeviceStats } from "./stats-BpMz-hTP.esm.js";
|
|
8
8
|
import { t as IncodeCanvas } from "./canvas-BxFzWTt-.esm.js";
|
|
9
9
|
import { t as StreamCanvasProcessingSession } from "./StreamCanvasProcessingSession-CBnbTnOr.esm.js";
|
|
@@ -235,7 +235,7 @@ function startDetection(params) {
|
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
237
|
async function initializeDeepsightSession(options) {
|
|
238
|
-
const { loadDeepsightSession } = await import("./deepsightLoader-
|
|
238
|
+
const { loadDeepsightSession } = await import("./deepsightLoader-B7zw-vfE.esm.js");
|
|
239
239
|
return loadDeepsightSession({
|
|
240
240
|
ds: options.ds,
|
|
241
241
|
storage: options.storage
|
package/dist/ae-signature.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as areAllConsented, i as AE_CONSENT_KEYS, r as electronicSignatureMachine, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-
|
|
1
|
+
import { c as areAllConsented, i as AE_CONSENT_KEYS, r as electronicSignatureMachine, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-DknIW020.esm.js";
|
|
2
2
|
//#region src/modules/ae-signature/index.ts
|
|
3
3
|
function createAeSignatureManager(options) {
|
|
4
4
|
return createElectronicSignatureManager({ config: {
|
package/dist/authentication.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as authenticationMachine, S as createAuthenticationActor, b as AuthenticationActor, x as CreateAuthenticationActorOptions } from "./faceCaptureManagerFactory-
|
|
2
|
-
import { t as AuthenticationConfig } from "./types-
|
|
3
|
-
import { n as AuthenticationState, r as createAuthenticationManager, t as AuthenticationManager } from "./authenticationManager
|
|
1
|
+
import { C as authenticationMachine, S as createAuthenticationActor, b as AuthenticationActor, x as CreateAuthenticationActorOptions } from "./faceCaptureManagerFactory-BQtDMMuq.js";
|
|
2
|
+
import { t as AuthenticationConfig } from "./types-BZ_Hjz-X.js";
|
|
3
|
+
import { n as AuthenticationState, r as createAuthenticationManager, t as AuthenticationManager } from "./authenticationManager--l6e_7Pr.js";
|
|
4
4
|
export { type AuthenticationActor, type AuthenticationConfig, type AuthenticationManager, type AuthenticationState, type CreateAuthenticationActorOptions, authenticationMachine, createAuthenticationActor, createAuthenticationManager };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as authenticationMachine } from "./authenticationStateMachine-
|
|
2
|
-
import { r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-
|
|
1
|
+
import { t as authenticationMachine } from "./authenticationStateMachine-CO2-fTly.esm.js";
|
|
2
|
+
import { r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-C_i4Xe1Y.esm.js";
|
|
3
3
|
export { authenticationMachine, createAuthenticationActor, createAuthenticationManager };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as Manager } from "./Manager-C9T5amUN.js";
|
|
2
2
|
import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-D4tvIB5v.js";
|
|
3
|
-
import { b as AuthenticationActor, n as FaceCaptureManagerState, t as FaceCaptureManager, x as CreateAuthenticationActorOptions } from "./faceCaptureManagerFactory-
|
|
3
|
+
import { b as AuthenticationActor, n as FaceCaptureManagerState, t as FaceCaptureManager, x as CreateAuthenticationActorOptions } from "./faceCaptureManagerFactory-BQtDMMuq.js";
|
|
4
4
|
//#region src/modules/authentication/authenticationManager.d.ts
|
|
5
5
|
type AuthenticationState = FaceCaptureManagerState;
|
|
6
6
|
/**
|
package/dist/{authenticationManager-NTK5hDEQ.esm.js → authenticationManager-C_i4Xe1Y.esm.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { u as BrowserStorageProvider } from "./setup-
|
|
1
|
+
import { u as BrowserStorageProvider } from "./setup-etGBX4dx.esm.js";
|
|
2
2
|
import { t as WasmUtilProvider } from "./WasmUtilProvider-DZOGC2HE.esm.js";
|
|
3
3
|
import { n as eventModuleNames } from "./events-CQteqXfy.esm.js";
|
|
4
4
|
import { s as createActor } from "./xstate.esm-DSajW7CJ.esm.js";
|
|
5
|
-
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-
|
|
6
|
-
import { t as authenticationMachine } from "./authenticationStateMachine-
|
|
5
|
+
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-DN9iKVpF.esm.js";
|
|
6
|
+
import { t as authenticationMachine } from "./authenticationStateMachine-CO2-fTly.esm.js";
|
|
7
7
|
//#region src/modules/authentication/authenticationActor.ts
|
|
8
8
|
function createAuthenticationActor(options) {
|
|
9
9
|
const dependencies = options.dependencies ?? {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as assign } from "./xstate.esm-DSajW7CJ.esm.js";
|
|
2
2
|
import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
|
|
3
|
-
import { n as createDefaultProtectedFaceControllerActor, t as faceCaptureMachine } from "./faceCaptureSetup-
|
|
4
|
-
import { d as isOnDeviceMode, u as FACE_ERROR_CODES } from "./FaceDetectionProvider-
|
|
3
|
+
import { n as createDefaultProtectedFaceControllerActor, t as faceCaptureMachine } from "./faceCaptureSetup-CpSB7ahj.esm.js";
|
|
4
|
+
import { d as isOnDeviceMode, u as FACE_ERROR_CODES } from "./FaceDetectionProvider-BefEylit.esm.js";
|
|
5
5
|
import { s as PROTECTED_CAPTURE_TARGET } from "./desktopCameraElection-CzF8HsJn.esm.js";
|
|
6
6
|
//#region src/modules/authentication/authenticationErrorUtils.ts
|
|
7
7
|
const AUTH_ERROR_MAP = {
|
package/dist/consent.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ConsentActor, c as ConsentConfig, i as createConsentManagerFromActor, n as ConsentState, o as consentMachine, r as createConsentManager, s as ConsentCheckbox, t as ConsentManager } from "./consentManager-
|
|
1
|
+
import { a as ConsentActor, c as ConsentConfig, i as createConsentManagerFromActor, n as ConsentState, o as consentMachine, r as createConsentManager, s as ConsentCheckbox, t as ConsentManager } from "./consentManager-DXetSxcx.js";
|
|
2
2
|
export { type ConsentActor, type ConsentCheckbox, type ConsentConfig, type ConsentManager, type ConsentState, consentMachine, createConsentManager, createConsentManagerFromActor };
|
|
@@ -86,6 +86,10 @@ declare const consentMachine: StateMachine<ConsentContext, {
|
|
|
86
86
|
type: "setLoadError";
|
|
87
87
|
params: NonReducibleUnknown;
|
|
88
88
|
};
|
|
89
|
+
resetContext: {
|
|
90
|
+
type: "resetContext";
|
|
91
|
+
params: NonReducibleUnknown;
|
|
92
|
+
};
|
|
89
93
|
setConsentData: {
|
|
90
94
|
type: "setConsentData";
|
|
91
95
|
params: NonReducibleUnknown;
|
|
@@ -94,14 +98,10 @@ declare const consentMachine: StateMachine<ConsentContext, {
|
|
|
94
98
|
type: "toggleCheckbox";
|
|
95
99
|
params: NonReducibleUnknown;
|
|
96
100
|
};
|
|
97
|
-
resetContext: {
|
|
98
|
-
type: "resetContext";
|
|
99
|
-
params: NonReducibleUnknown;
|
|
100
|
-
};
|
|
101
101
|
}>, {
|
|
102
102
|
type: "canSubmit";
|
|
103
103
|
params: unknown;
|
|
104
|
-
}, never, "error" | "idle" | "finished" | "
|
|
104
|
+
}, never, "error" | "idle" | "finished" | "loading" | "submitting" | "display", string, ConsentInput, NonReducibleUnknown, EventObject, MetaObject, {
|
|
105
105
|
readonly id: "consent";
|
|
106
106
|
readonly initial: "idle";
|
|
107
107
|
readonly context: ({ input }: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as CurpValidationActor, c as CurpValidationErrors, d as GenerateCurpFieldDef, f as GenerateCurpFieldType, i as createCurpValidationManagerFromActor, l as CurpValidationRule, n as CurpValidationState, o as curpValidationMachine, p as GenerateCurpForm, r as createCurpValidationManager, s as CurpValidationConfig, t as CurpValidationManager, u as EnterCurpFieldDef } from "./curpValidationManager-
|
|
1
|
+
import { a as CurpValidationActor, c as CurpValidationErrors, d as GenerateCurpFieldDef, f as GenerateCurpFieldType, i as createCurpValidationManagerFromActor, l as CurpValidationRule, n as CurpValidationState, o as curpValidationMachine, p as GenerateCurpForm, r as createCurpValidationManager, s as CurpValidationConfig, t as CurpValidationManager, u as EnterCurpFieldDef } from "./curpValidationManager-B9LuZ0tj.js";
|
|
2
2
|
//#region src/modules/curp-validation/curpValidationUtils.d.ts
|
|
3
3
|
type MexicanState = {
|
|
4
4
|
value: string;
|
|
@@ -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 FlowModuleConfig } from "./types-
|
|
4
|
+
import { i as FlowModuleConfig } from "./types-DPc-3Uo6.js";
|
|
5
5
|
//#region src/modules/curp-validation/types.d.ts
|
|
6
6
|
type CurpValidationConfig = FlowModuleConfig['CURP_VALIDATION'] & {
|
|
7
7
|
/** Maximum validation retries before auto-advancing. @default 1 */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as WasmUtilProvider } from "./WasmUtilProvider-DZOGC2HE.esm.js";
|
|
2
|
-
import { u as trueSightLog } from "./trueSightService-
|
|
3
|
-
import { t as SDK_VERSION } from "./sdkVersion-
|
|
4
|
-
import { C as BrowserEnvironmentProvider, S as IpifyProvider, b as getThumbmarkId, n as getDisableIpify, r as getFingerprintEnabled, v as isBrowserSimulation, w as fingerprintSignalsReporter } from "./sessionInitializer-
|
|
2
|
+
import { u as trueSightLog } from "./trueSightService-Bm9PHS9s.esm.js";
|
|
3
|
+
import { t as SDK_VERSION } from "./sdkVersion-Cx2Onf4X.esm.js";
|
|
4
|
+
import { C as BrowserEnvironmentProvider, S as IpifyProvider, b as getThumbmarkId, n as getDisableIpify, r as getFingerprintEnabled, v as isBrowserSimulation, w as fingerprintSignalsReporter } from "./sessionInitializer-0JrZQKBv.esm.js";
|
|
5
5
|
import { t as getParsedUserAgent } from "./getParsedUserAgent-DhQPeKqw.esm.js";
|
|
6
6
|
import { t as getUserAgent } from "./getBrowser-CBiibsL-.esm.js";
|
|
7
7
|
import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-Ck2Lt6OY.esm.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as DocumentCaptureErrorCode, c as DocumentType, n as DOCUMENT_CAPTURE_ERROR_CODES, r as DocumentCaptureConfig, s as DocumentCaptureNextPageType } from "./types-
|
|
2
|
-
import { a as DocumentCaptureActor, i as createDocumentCaptureManagerFromActor, n as DocumentCaptureState, o as documentCaptureMachine, r as createDocumentCaptureManager, t as DocumentCaptureManager } from "./documentCaptureManager-
|
|
3
|
-
export { DOCUMENT_CAPTURE_ERROR_CODES, type DocumentCaptureActor, type DocumentCaptureConfig, type DocumentCaptureErrorCode, type DocumentCaptureManager, type DocumentCaptureNextPageType, type DocumentCaptureState, type DocumentType, createDocumentCaptureManager, createDocumentCaptureManagerFromActor, documentCaptureMachine };
|
|
1
|
+
import { a as DocumentCaptureErrorCode, c as DocumentType, n as DOCUMENT_CAPTURE_ERROR_CODES, r as DocumentCaptureConfig, s as DocumentCaptureNextPageType, u as DocumentUploadStatus } from "./types-CyNndVAT.js";
|
|
2
|
+
import { a as DocumentCaptureActor, i as createDocumentCaptureManagerFromActor, n as DocumentCaptureState, o as documentCaptureMachine, r as createDocumentCaptureManager, t as DocumentCaptureManager } from "./documentCaptureManager-DDfviFg0.js";
|
|
3
|
+
export { DOCUMENT_CAPTURE_ERROR_CODES, type DocumentCaptureActor, type DocumentCaptureConfig, type DocumentCaptureErrorCode, type DocumentCaptureManager, type DocumentCaptureNextPageType, type DocumentCaptureState, type DocumentType, type DocumentUploadStatus, createDocumentCaptureManager, createDocumentCaptureManagerFromActor, documentCaptureMachine };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { r as DOCUMENT_CAPTURE_ERROR_CODES, t as documentCaptureMachine } from "./documentCaptureStateMachine-
|
|
2
|
-
import { n as createDocumentCaptureManagerFromActor, t as createDocumentCaptureManager } from "./documentCaptureManager-
|
|
1
|
+
import { r as DOCUMENT_CAPTURE_ERROR_CODES, t as documentCaptureMachine } from "./documentCaptureStateMachine-DJPyCwQu.esm.js";
|
|
2
|
+
import { n as createDocumentCaptureManagerFromActor, t as createDocumentCaptureManager } from "./documentCaptureManager-BfXguEU3.esm.js";
|
|
3
3
|
export { DOCUMENT_CAPTURE_ERROR_CODES, createDocumentCaptureManager, createDocumentCaptureManagerFromActor, documentCaptureMachine };
|
package/dist/{documentCaptureManager-Cip3bTcD.esm.js → documentCaptureManager-BfXguEU3.esm.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CQteqXfy.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-DJPyCwQu.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();
|
|
@@ -155,6 +155,7 @@ function mapState(snapshot) {
|
|
|
155
155
|
if (typedSnapshot.matches("failure")) return {
|
|
156
156
|
status: "failure",
|
|
157
157
|
error: context.error ?? DOCUMENT_CAPTURE_ERROR_CODES.UPLOAD_FAILED,
|
|
158
|
+
rejectionStatus: context.rejectionStatus,
|
|
158
159
|
attemptsRemaining: context.attemptsRemaining
|
|
159
160
|
};
|
|
160
161
|
if (typedSnapshot.matches("finished")) return { status: "finished" };
|
|
@@ -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;
|
|
@@ -256,7 +262,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
256
262
|
type: "fileSizeOkForNonGallery";
|
|
257
263
|
params: unknown;
|
|
258
264
|
};
|
|
259
|
-
}>, never, "uploading" | "closed" | "success" | "finished" | "
|
|
265
|
+
}>, never, "uploading" | "closed" | "success" | "finished" | "capturing" | "failure" | "initCamera" | "tutorial" | "preview" | "nextPage" | "finalizing" | {
|
|
260
266
|
permissions: "idle" | "denied" | "waitingForUser" | "requesting" | "learnMore";
|
|
261
267
|
}, string, DocumentCaptureInput, NonReducibleUnknown, EventObject, MetaObject, {
|
|
262
268
|
readonly id: "documentCapture";
|
|
@@ -272,6 +278,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
272
278
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
273
279
|
processingType: string;
|
|
274
280
|
sendBase64: boolean;
|
|
281
|
+
title: string | undefined;
|
|
275
282
|
onProgress: (progress: number) => void;
|
|
276
283
|
}, EventObject>;
|
|
277
284
|
id: string | undefined;
|
|
@@ -281,6 +288,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
281
288
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
282
289
|
processingType: string;
|
|
283
290
|
sendBase64: boolean;
|
|
291
|
+
title: string | undefined;
|
|
284
292
|
onProgress: (progress: number) => void;
|
|
285
293
|
}, EventObject>;
|
|
286
294
|
id: string | undefined;
|
|
@@ -368,6 +376,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
368
376
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
369
377
|
processingType: string;
|
|
370
378
|
sendBase64: boolean;
|
|
379
|
+
title: string | undefined;
|
|
371
380
|
onProgress: (progress: number) => void;
|
|
372
381
|
}, EventObject>;
|
|
373
382
|
id: string | undefined;
|
|
@@ -522,6 +531,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
522
531
|
helpOpen: false;
|
|
523
532
|
progress: number;
|
|
524
533
|
error: undefined;
|
|
534
|
+
rejectionStatus: undefined;
|
|
525
535
|
attemptsRemaining: number;
|
|
526
536
|
pageNumber: number;
|
|
527
537
|
nextPageType: "none";
|
|
@@ -630,6 +640,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
630
640
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
631
641
|
processingType: string;
|
|
632
642
|
sendBase64: boolean;
|
|
643
|
+
title: string | undefined;
|
|
633
644
|
onProgress: (progress: number) => void;
|
|
634
645
|
}, EventObject>;
|
|
635
646
|
id: string | undefined;
|
|
@@ -716,6 +727,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
716
727
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
717
728
|
processingType: string;
|
|
718
729
|
sendBase64: boolean;
|
|
730
|
+
title: string | undefined;
|
|
719
731
|
onProgress: (progress: number) => void;
|
|
720
732
|
}, EventObject>;
|
|
721
733
|
id: string | undefined;
|
|
@@ -801,6 +813,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
801
813
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
802
814
|
processingType: string;
|
|
803
815
|
sendBase64: boolean;
|
|
816
|
+
title: string | undefined;
|
|
804
817
|
onProgress: (progress: number) => void;
|
|
805
818
|
}, EventObject>;
|
|
806
819
|
id: string | undefined;
|
|
@@ -887,6 +900,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
887
900
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
888
901
|
processingType: string;
|
|
889
902
|
sendBase64: boolean;
|
|
903
|
+
title: string | undefined;
|
|
890
904
|
onProgress: (progress: number) => void;
|
|
891
905
|
}, EventObject>;
|
|
892
906
|
id: string | undefined;
|
|
@@ -1142,6 +1156,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
1142
1156
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
1143
1157
|
processingType: string;
|
|
1144
1158
|
sendBase64: boolean;
|
|
1159
|
+
title: string | undefined;
|
|
1145
1160
|
onProgress: (progress: number) => void;
|
|
1146
1161
|
}, EventObject>;
|
|
1147
1162
|
id: string | undefined;
|
|
@@ -1228,6 +1243,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
1228
1243
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
1229
1244
|
processingType: string;
|
|
1230
1245
|
sendBase64: boolean;
|
|
1246
|
+
title: string | undefined;
|
|
1231
1247
|
onProgress: (progress: number) => void;
|
|
1232
1248
|
}, EventObject>;
|
|
1233
1249
|
id: string | undefined;
|
|
@@ -1313,6 +1329,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
1313
1329
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
1314
1330
|
processingType: string;
|
|
1315
1331
|
sendBase64: boolean;
|
|
1332
|
+
title: string | undefined;
|
|
1316
1333
|
onProgress: (progress: number) => void;
|
|
1317
1334
|
}, EventObject>;
|
|
1318
1335
|
id: string | undefined;
|
|
@@ -1449,6 +1466,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
1449
1466
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
1450
1467
|
processingType: string;
|
|
1451
1468
|
sendBase64: boolean;
|
|
1469
|
+
title: string | undefined;
|
|
1452
1470
|
onProgress: (progress: number) => void;
|
|
1453
1471
|
}, EventObject>;
|
|
1454
1472
|
id: string | undefined;
|
|
@@ -1689,6 +1707,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
1689
1707
|
capturedDocument: CapturedDocument;
|
|
1690
1708
|
processingType: DocumentType;
|
|
1691
1709
|
sendBase64: boolean;
|
|
1710
|
+
title: string | undefined;
|
|
1692
1711
|
onProgress: (progress: number) => void;
|
|
1693
1712
|
};
|
|
1694
1713
|
readonly onDone: {
|
|
@@ -1697,7 +1716,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
1697
1716
|
};
|
|
1698
1717
|
readonly onError: {
|
|
1699
1718
|
readonly target: "failure";
|
|
1700
|
-
readonly actions: readonly ["setUploadError", "decrementAttemptsRemaining", "stopStream"];
|
|
1719
|
+
readonly actions: readonly ["setUploadError", "setRejectionStatus", "decrementAttemptsRemaining", "stopStream"];
|
|
1701
1720
|
};
|
|
1702
1721
|
};
|
|
1703
1722
|
readonly on: {
|
|
@@ -1891,7 +1910,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
1891
1910
|
};
|
|
1892
1911
|
readonly onError: {
|
|
1893
1912
|
readonly target: "failure";
|
|
1894
|
-
readonly actions: readonly ["setFinalizeError", "decrementAttemptsRemaining"];
|
|
1913
|
+
readonly actions: readonly ["setFinalizeError", "setRejectionStatus", "decrementAttemptsRemaining"];
|
|
1895
1914
|
};
|
|
1896
1915
|
};
|
|
1897
1916
|
};
|
|
@@ -1985,6 +2004,8 @@ type DocumentCaptureSuccessState = {
|
|
|
1985
2004
|
type DocumentCaptureFailureState = {
|
|
1986
2005
|
status: 'failure';
|
|
1987
2006
|
error: DocumentCaptureErrorCode;
|
|
2007
|
+
/** Server status that rejected the document (v3), when the server sent one. */
|
|
2008
|
+
rejectionStatus?: DocumentUploadStatus;
|
|
1988
2009
|
attemptsRemaining: number;
|
|
1989
2010
|
};
|
|
1990
2011
|
type DocumentCaptureFinishedState = {
|
|
@@ -18,13 +18,27 @@ const PROCESSING_TYPE_MAP = {
|
|
|
18
18
|
processW8BenOcr: "w8Ben",
|
|
19
19
|
processW8BenEOcr: "w8BenE"
|
|
20
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
|
+
]);
|
|
21
34
|
const MULTI_PAGE_TYPES = [
|
|
22
35
|
"v5cMultiPageLogbook",
|
|
36
|
+
"carInvoice",
|
|
23
37
|
"circulationCard",
|
|
24
38
|
"financeSettlement",
|
|
25
39
|
"w8BenE"
|
|
26
40
|
];
|
|
27
|
-
const
|
|
41
|
+
const ASYNC_LEGACY_TYPES = /* @__PURE__ */ new Set(["asyncProcessCarInvoice", "asyncProcessCirculationCard"]);
|
|
28
42
|
const DEFAULT_MAX_FILE_SIZE = 10 * 1024 * 1024;
|
|
29
43
|
const OTHER_DOCUMENT_TYPES = /* @__PURE__ */ new Set([
|
|
30
44
|
"otherDocument1",
|
|
@@ -38,6 +52,17 @@ const DOCUMENT_CAPTURE_ERROR_CODES = {
|
|
|
38
52
|
const DOCUMENT_CAPTURE_FINALIZE_ERROR_CODES = { UNEXPECTED_ERROR: "UNEXPECTED_ERROR" };
|
|
39
53
|
//#endregion
|
|
40
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
|
+
}
|
|
41
66
|
const ADDRESS_STATEMENT_PROCESSING_TYPES = /* @__PURE__ */ new Set([
|
|
42
67
|
"processPoaOcr",
|
|
43
68
|
"processLoaOcr",
|
|
@@ -53,23 +78,30 @@ function isMultiPageDocumentType(processingType) {
|
|
|
53
78
|
function normalizeProcessingType(processingType) {
|
|
54
79
|
return PROCESSING_TYPE_MAP[processingType] ?? processingType;
|
|
55
80
|
}
|
|
56
|
-
function buildUrl(baseUrl, type, format) {
|
|
57
|
-
|
|
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()}`;
|
|
58
88
|
}
|
|
59
|
-
function resolveUploadUrl(processingType, fileFormat, sendBase64 = false) {
|
|
89
|
+
function resolveUploadUrl(processingType, fileFormat, sendBase64 = false, { title } = {}) {
|
|
60
90
|
const format = fileFormat === "application/pdf" ? "pdf" : "image";
|
|
61
91
|
const resolvedType = normalizeProcessingType(processingType);
|
|
62
|
-
if (
|
|
63
|
-
if (
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
if (
|
|
68
|
-
if (
|
|
69
|
-
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 });
|
|
70
102
|
}
|
|
71
|
-
async function uploadDocumentCapture({ file, base64Image, sendBase64 = false, processingType, fileFormat, onProgress, signal }) {
|
|
72
|
-
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 });
|
|
73
105
|
const useBase64 = !url.startsWith(`${endpoints.documentLegacy}?`);
|
|
74
106
|
const body = useBase64 ? { base64Image: base64Image.includes(",") ? base64Image.split(",")[1] : base64Image } : file;
|
|
75
107
|
const response = await api.post(url, body, {
|
|
@@ -78,7 +110,7 @@ async function uploadDocumentCapture({ file, base64Image, sendBase64 = false, pr
|
|
|
78
110
|
onUploadProgress: onProgress
|
|
79
111
|
});
|
|
80
112
|
if (!response.ok) throw new Error(`Document upload failed: ${response.status}`);
|
|
81
|
-
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);
|
|
82
114
|
return response.data;
|
|
83
115
|
}
|
|
84
116
|
function resolveMultiPageDocumentType(processingType) {
|
|
@@ -92,10 +124,7 @@ async function finalizeDocument({ processingType, signal }) {
|
|
|
92
124
|
if (!response.ok) throw new Error(`Document finalize failed: ${response.status}`);
|
|
93
125
|
const data = response.data;
|
|
94
126
|
if (!data) throw new Error("Document finalize rejected by server");
|
|
95
|
-
if (!(data.success || data.status === "SUCCESS")) {
|
|
96
|
-
const serverStatus = typeof data.status === "string" ? data.status : "unknown";
|
|
97
|
-
throw new Error(`Document finalize rejected by server (status: ${serverStatus})`);
|
|
98
|
-
}
|
|
127
|
+
if (!(data.success || data.status === "SUCCESS")) throw new DocumentUploadRejectedError(`Document finalize rejected by server (status: ${data.status ?? "unknown"})`, data.status);
|
|
99
128
|
return data;
|
|
100
129
|
}
|
|
101
130
|
//#endregion
|
|
@@ -124,6 +153,7 @@ const documentCaptureMachine = setup({
|
|
|
124
153
|
sendBase64: input.sendBase64,
|
|
125
154
|
processingType: input.processingType,
|
|
126
155
|
fileFormat: input.capturedDocument.fileType,
|
|
156
|
+
title: input.title,
|
|
127
157
|
onProgress: input.onProgress,
|
|
128
158
|
signal
|
|
129
159
|
});
|
|
@@ -152,6 +182,7 @@ const documentCaptureMachine = setup({
|
|
|
152
182
|
setProgress: assign(({ event }) => ({ progress: event.progress })),
|
|
153
183
|
setUploadError: assign({ error: () => DOCUMENT_CAPTURE_ERROR_CODES.UPLOAD_FAILED }),
|
|
154
184
|
setFinalizeError: assign({ error: () => DOCUMENT_CAPTURE_FINALIZE_ERROR_CODES.UNEXPECTED_ERROR }),
|
|
185
|
+
setRejectionStatus: assign(({ event }) => ({ rejectionStatus: getRejectionStatus(event.error) })),
|
|
155
186
|
decrementAttemptsRemaining: assign(({ context }) => ({ attemptsRemaining: context.attemptsRemaining - 1 })),
|
|
156
187
|
setCaptureMethodFile: assign({ captureMethod: () => "file" }),
|
|
157
188
|
setCaptureMethodCamera: assign({ captureMethod: () => "camera" }),
|
|
@@ -186,7 +217,10 @@ const documentCaptureMachine = setup({
|
|
|
186
217
|
nextPageType: "none",
|
|
187
218
|
captureMethod: void 0
|
|
188
219
|
})),
|
|
189
|
-
clearError: assign({
|
|
220
|
+
clearError: assign({
|
|
221
|
+
error: () => void 0,
|
|
222
|
+
rejectionStatus: () => void 0
|
|
223
|
+
}),
|
|
190
224
|
resetProgress: assign({ progress: () => 0 }),
|
|
191
225
|
stopStream: assign(({ context }) => {
|
|
192
226
|
if (context.stream) stopCameraStream(context.stream);
|
|
@@ -249,6 +283,7 @@ const documentCaptureMachine = setup({
|
|
|
249
283
|
helpOpen: false,
|
|
250
284
|
progress: 0,
|
|
251
285
|
error: void 0,
|
|
286
|
+
rejectionStatus: void 0,
|
|
252
287
|
attemptsRemaining: carryAttempts("documentCapture", self, (s) => ({ attemptsRemaining: s.context.attemptsRemaining })).attemptsRemaining ?? captureAttempts,
|
|
253
288
|
pageNumber: 1,
|
|
254
289
|
nextPageType: "none"
|
|
@@ -429,6 +464,7 @@ const documentCaptureMachine = setup({
|
|
|
429
464
|
capturedDocument: context.capturedDocument,
|
|
430
465
|
processingType: context.config.processingType,
|
|
431
466
|
sendBase64: context.config.sendBase64,
|
|
467
|
+
title: context.config.title,
|
|
432
468
|
onProgress: (progress) => {
|
|
433
469
|
self.send({
|
|
434
470
|
type: "UPLOAD_PROGRESS",
|
|
@@ -445,6 +481,7 @@ const documentCaptureMachine = setup({
|
|
|
445
481
|
target: "failure",
|
|
446
482
|
actions: [
|
|
447
483
|
"setUploadError",
|
|
484
|
+
"setRejectionStatus",
|
|
448
485
|
"decrementAttemptsRemaining",
|
|
449
486
|
"stopStream"
|
|
450
487
|
]
|
|
@@ -484,7 +521,11 @@ const documentCaptureMachine = setup({
|
|
|
484
521
|
onDone: { target: "finished" },
|
|
485
522
|
onError: {
|
|
486
523
|
target: "failure",
|
|
487
|
-
actions: [
|
|
524
|
+
actions: [
|
|
525
|
+
"setFinalizeError",
|
|
526
|
+
"setRejectionStatus",
|
|
527
|
+
"decrementAttemptsRemaining"
|
|
528
|
+
]
|
|
488
529
|
}
|
|
489
530
|
} },
|
|
490
531
|
failure: { on: {
|
|
@@ -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-szDPdJra.esm.js";
|
|
2
|
+
import { t as createDynamicFormsManager } from "./dynamicFormsManager-mKQUeWmr.esm.js";
|
|
3
3
|
export { createDynamicFormsManager, dynamicFormsMachine };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CQteqXfy.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-szDPdJra.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-Bkoxk9tn.esm.js → dynamicFormsStateMachine-szDPdJra.esm.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as api, u as endpoints } from "./api-BO8JA7Pf.esm.js";
|
|
2
|
-
import { i as toIncodeApiError, r as isServerError, t as IncodeApiError } from "./apiError-
|
|
2
|
+
import { i as toIncodeApiError, r as isServerError, t as IncodeApiError } from "./apiError-DkDbuoEH.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,6 +1,6 @@
|
|
|
1
1
|
import "./Manager-C9T5amUN.js";
|
|
2
2
|
import { u as AddressSuggestion } from "./types-B2FK_wYb.js";
|
|
3
|
-
import { i as FlowModuleConfig } from "./types-
|
|
3
|
+
import { i as FlowModuleConfig } from "./types-DPc-3Uo6.js";
|
|
4
4
|
import { a as EkybValidationError, n as EkybCountry, o as EkybValidationErrors, r as EkybFieldDef, s as UboEntry, t as EkybConfig } from "./types-C397LhmN.js";
|
|
5
5
|
import { n as EkybState, o as ekybMachine, r as createEkybManager, t as EkybManager } from "./ekybManager-TB6ZG5lX.js";
|
|
6
6
|
//#region src/modules/ekyb/ekybServices.d.ts
|
package/dist/ekyb.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
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-
|
|
3
|
-
import { t as createEkybManager } from "./ekybManager-
|
|
2
|
+
import { t as ekybMachine } from "./ekybStateMachine-t3PSLqBv.esm.js";
|
|
3
|
+
import { t as createEkybManager } from "./ekybManager-CMgIU5Gb.esm.js";
|
|
4
4
|
export { ALL_COUNTRIES, DEV_ONLY_COUNTRIES, SUPPORTED_COUNTRIES, createEkybManager, ekybMachine, isSupportedCountry, toEkybConfig };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CQteqXfy.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 ekybMachine } from "./ekybStateMachine-
|
|
4
|
+
import { t as ekybMachine } from "./ekybStateMachine-t3PSLqBv.esm.js";
|
|
5
5
|
//#region src/modules/ekyb/ekybActor.ts
|
|
6
6
|
/**
|
|
7
7
|
* Creates and starts an eKYB actor.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as api, u as endpoints } from "./api-BO8JA7Pf.esm.js";
|
|
2
|
-
import { n as getFlow } from "./flowServices-
|
|
2
|
+
import { n as getFlow } from "./flowServices-CEFP6bMS.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 { a as sortModulesByOrder, c as ALL_COUNTRIES, d as FIELD_ORDER, i as requiresAddressValidation, m as isSupportedCountry, n as hasAtLeastOneAddressField, o as toEkybConfig, p as UBO_FIELD_LABELS, r as isFieldOptional, s as ADDRESS_FIELDS, u as FIELD_NAME_MAPPING } from "./ekybUtils-Cw8Ta9Qi.esm.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as NAMIRIAL_QES_CONSENT_KEYS, c as areAllConsented, i as AE_CONSENT_KEYS, l as getConsentKeys, n as createElectronicSignatureManagerFromActor, o as NAMIRIAL_QES_PROVIDER_CODE, r as electronicSignatureMachine, s as QE_CONSENT_KEYS, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-
|
|
1
|
+
import { a as NAMIRIAL_QES_CONSENT_KEYS, c as areAllConsented, i as AE_CONSENT_KEYS, l as getConsentKeys, n as createElectronicSignatureManagerFromActor, o as NAMIRIAL_QES_PROVIDER_CODE, r as electronicSignatureMachine, s as QE_CONSENT_KEYS, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-DknIW020.esm.js";
|
|
2
2
|
export { AE_CONSENT_KEYS, NAMIRIAL_QES_CONSENT_KEYS, NAMIRIAL_QES_PROVIDER_CODE, QE_CONSENT_KEYS, areAllConsented, createElectronicSignatureManager, createElectronicSignatureManagerFromActor, electronicSignatureMachine, getConsentKeys, getDefaultConsentChecks };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CQteqXfy.esm.js";
|
|
2
2
|
import { t as api, u as endpoints } from "./api-BO8JA7Pf.esm.js";
|
|
3
3
|
import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
|
|
4
|
-
import { i as toIncodeApiError, n as isConnectivityError, t as IncodeApiError } from "./apiError-
|
|
4
|
+
import { i as toIncodeApiError, n as isConnectivityError, t as IncodeApiError } from "./apiError-DkDbuoEH.esm.js";
|
|
5
5
|
import { i as assign, s as createActor, t as setup, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
|
|
6
6
|
import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
|
|
7
7
|
import { t as externalFetch } from "./externalFetch-CQY41QT1.esm.js";
|