@incodetech/core 2.0.1 → 2.1.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BrowserStorageProvider-CuOW1Er2.esm.js → BrowserStorageProvider-BpJM-gIl.esm.js} +8 -1
- package/dist/{IpifyProvider-D7jx52AL.esm.js → IpifyProvider-D4LWD15E.esm.js} +28 -0
- package/dist/{MotionSensorProvider-4v7xkqAp.esm.js → MotionSensorProvider-Bx7Mpzt0.esm.js} +63 -13
- package/dist/{OpenViduRecordingProvider-CMu6XVdc.esm.js → OpenViduRecordingProvider-O4GjBseO.esm.js} +1 -1
- package/dist/StateMachine-BC_nGvrc.d.ts +2 -0
- package/dist/StreamCanvasCapture-ImiDQdVA.esm.js +118 -0
- package/dist/StreamCanvasCapture-yyl20qd9.d.ts +152 -0
- package/dist/{BaseWasmProvider-C_DLEI40.esm.js → WasmUtilProvider-CiEN7Gjn.esm.js} +183 -11
- package/dist/{addressSearch-BpTbTWCa.esm.js → addressSearch-DvmWXKZg.esm.js} +63 -57
- package/dist/{ae-signature-DDDZmWXj.esm.js → ae-signature-BFZta3TZ.esm.js} +1 -1
- package/dist/ae-signature.d.ts +3 -3
- package/dist/ae-signature.esm.js +6 -5
- package/dist/antifraud.d.ts +5 -46
- package/dist/antifraud.esm.js +6 -43
- package/dist/antifraudManager-CkV4u-LE.esm.js +55 -0
- package/dist/antifraudManager-CznnhyvD.d.ts +63 -0
- package/dist/{antifraudStateMachine-O0TMf6yc.esm.js → antifraudStateMachine-Ccrb-Jxc.esm.js} +2 -2
- package/dist/apiError-B-j-gyDx.esm.js +51 -0
- package/dist/authentication.d.ts +13 -11
- package/dist/authentication.esm.js +26 -22
- package/dist/{authenticationManager-C83GNIhl.d.ts → authenticationManager-CIVY80H9.d.ts} +4 -4
- package/dist/{authenticationManager-5M-fKzXx.esm.js → authenticationManager-ZNotsWnC.esm.js} +6 -6
- package/dist/{authenticationStateMachine-BMZqatiF.esm.js → authenticationStateMachine-DksVbF_H.esm.js} +21 -9
- package/dist/{backCameraStream-DMdMeGk2.esm.js → backCameraStream-D7Wo4Nbx.esm.js} +95 -7
- package/dist/{session-CrkWAs-q.esm.js → browserSimulation-B1dWiXp7.esm.js} +61 -476
- package/dist/camera.d.ts +4 -3
- package/dist/camera.esm.js +4 -3
- package/dist/canvas-SKcRBxsk.esm.js +230 -0
- package/dist/consent.d.ts +4 -398
- package/dist/consent.esm.js +6 -77
- package/dist/consentManager-BLd51QiW.d.ts +419 -0
- package/dist/consentManager-BYo9Nu1r.esm.js +90 -0
- package/dist/{consentStateMachine-CCT-B60O.esm.js → consentStateMachine-BG3yL8aC.esm.js} +9 -6
- package/dist/cpf-ocr.d.ts +4 -199
- package/dist/cpf-ocr.esm.js +8 -177
- package/dist/cpfOcrManager-BnieFXuG.d.ts +216 -0
- package/dist/cpfOcrManager-sSKegxox.esm.js +190 -0
- package/dist/cross-document-data-match.d.ts +1 -1
- package/dist/cross-document-data-match.esm.js +4 -4
- package/dist/curp-validation.d.ts +8 -158
- package/dist/curp-validation.esm.js +6 -108
- package/dist/curpValidationManager-CFem6zP9.esm.js +122 -0
- package/dist/curpValidationManager-RttixpIc.d.ts +184 -0
- package/dist/{curpValidationStateMachine-CitWLr2c.esm.js → curpValidationStateMachine-B7V_qp66.esm.js} +20 -13
- package/dist/custom-fields.d.ts +2 -2
- package/dist/custom-fields.esm.js +4 -4
- package/dist/custom-watchlist.d.ts +1 -1
- package/dist/custom-watchlist.esm.js +4 -41
- package/dist/customWatchlistStateMachine-HmFybXLX.esm.js +50 -0
- package/dist/{deepsightLoader-Cm4JIT_z.esm.js → deepsightLoader-65k1Appi.esm.js} +19 -10
- package/dist/{deepsightService-CEVxzehb.d.ts → deepsightService-B7ShOkWL.d.ts} +8 -160
- package/dist/deepsightService-CrHmvx8X.esm.js +276 -0
- package/dist/device.esm.js +4 -3
- package/dist/document-capture.d.ts +995 -86
- package/dist/document-capture.esm.js +34 -8
- package/dist/document-upload.d.ts +47 -47
- package/dist/document-upload.esm.js +7 -7
- package/dist/{documentCaptureStateMachine-BqzTDy9k.esm.js → documentCaptureStateMachine-WYV1r9le.esm.js} +90 -6
- package/dist/dynamic-forms.d.ts +20 -5
- package/dist/dynamic-forms.esm.js +150 -61
- package/dist/ekyb.d.ts +32 -13
- package/dist/ekyb.esm.js +25 -15
- package/dist/{ekybStateMachine-CyMx_kg-.esm.js → ekybStateMachine-aYixw2sL.esm.js} +319 -207
- package/dist/ekyc.d.ts +10 -78
- package/dist/ekyc.esm.js +17 -12
- package/dist/{ekycStateMachine-oeO0Iekd.esm.js → ekycStateMachine-CXbpaJJn.esm.js} +201 -113
- package/dist/electronic-signature.d.ts +3 -3
- package/dist/electronic-signature.esm.js +5 -4
- package/dist/{electronicSignatureManager-D9OHzTpG.esm.js → electronicSignatureManager-BaECdJ1u.esm.js} +91 -23
- package/dist/email.d.ts +4 -3
- package/dist/email.esm.js +6 -5
- package/dist/{emailManager-wAV0LE-H.esm.js → emailManager--D5G3ChB.esm.js} +30 -7
- package/dist/{emailManager-DIfnS5g1.d.ts → emailManager-lAzDoQOs.d.ts} +66 -8
- package/dist/{emailStateMachine-DOf4j58N.esm.js → emailStateMachine-CxTOMAjC.esm.js} +46 -11
- package/dist/{endpoints-CnN3SyDa.esm.js → endpoints-BeTK0Mlt.esm.js} +6 -3
- package/dist/{events-D6-e4vok.esm.js → events-Dvvriq9l.esm.js} +3 -1
- package/dist/events.d.ts +2 -0
- package/dist/events.esm.js +1 -1
- package/dist/extensibility.d.ts +32 -16
- package/dist/extensibility.esm.js +55 -33
- package/dist/face-match.d.ts +32 -2
- package/dist/face-match.esm.js +5 -5
- package/dist/{faceCaptureManagerFactory-yqtpxjnN.d.ts → faceCaptureManagerFactory-C_hRHx8a.d.ts} +35 -11
- package/dist/{faceCaptureManagerFactory-Dh2PdGlF.esm.js → faceCaptureManagerFactory-kqbUqtrr.esm.js} +21 -5
- package/dist/{faceCaptureSetup-B3faSpYA.esm.js → faceCaptureSetup-CtvHWd3x.esm.js} +68 -183
- package/dist/{faceMatchStateMachine-DNFrxTFS.esm.js → faceMatchStateMachine-DdGXUBnx.esm.js} +60 -6
- package/dist/field-comparison.d.ts +4 -0
- package/dist/field-comparison.esm.js +7 -0
- package/dist/fieldComparisonManager-Bu5TaSr3.d.ts +76 -0
- package/dist/fieldComparisonManager-COGI2ARD.esm.js +162 -0
- package/dist/fiscal-qr.d.ts +59 -0
- package/dist/fiscal-qr.esm.js +323 -0
- package/dist/flow-events.d.ts +6 -5
- package/dist/flow.d.ts +23 -15
- package/dist/flow.esm.js +63 -17
- package/dist/flowCompletionService-BdR2cGgB.d.ts +19 -0
- package/dist/flowCompletionService-DdGojV9K.esm.js +20 -0
- package/dist/{flowServices-PiNsxLfK.esm.js → flowServices-BTuHLHVr.esm.js} +10 -5
- package/dist/geolocation.d.ts +4 -4
- package/dist/geolocation.esm.js +6 -6
- package/dist/{geolocationStateMachine-asasuHY2.esm.js → geolocationStateMachine-Dvh7X0wF.esm.js} +5 -5
- package/dist/getBrowser-C8DP7oTB.esm.js +8 -0
- package/dist/{getBrowser-BSXUTWXw.esm.js → getDeviceClass-C0olyNFS.esm.js} +1 -8
- package/dist/{getDeviceClass-BSntT9_j.esm.js → getDeviceClass-C8Do2qYu.esm.js} +1 -1
- package/dist/government-validation.d.ts +28 -8
- package/dist/government-validation.esm.js +19 -8
- package/dist/{governmentValidationStateMachine-BDDYrJTo.esm.js → governmentValidationStateMachine-DcJ-BfsC.esm.js} +35 -77
- package/dist/home.d.ts +15 -14
- package/dist/home.esm.js +2 -2
- package/dist/http-Cai3IoLS.esm.js +0 -0
- package/dist/http.esm.js +1 -0
- package/dist/id-ocr.d.ts +54 -54
- package/dist/id-ocr.esm.js +5 -5
- package/dist/id-verification.d.ts +27 -27
- package/dist/id-verification.esm.js +4 -4
- package/dist/id.d.ts +12 -10
- package/dist/id.esm.js +36 -26
- package/dist/{idCaptureManager-Fyd0eam-.d.ts → idCaptureManager-D-QYESvF.d.ts} +28 -14
- package/dist/{idCaptureManager-D0ktk7Hh.esm.js → idCaptureManager-DGVv5l1_.esm.js} +22 -7
- package/dist/{idCaptureStateMachine-dwlBUjbC.esm.js → idCaptureStateMachine-DHi7HydI.esm.js} +172 -123
- package/dist/{idOcrStateMachine-YbjjC_Gg.esm.js → idOcrStateMachine-CDQ5d_VM.esm.js} +4 -4
- package/dist/{idVerificationStateMachine-xbw9HP1Z.esm.js → idVerificationStateMachine-kRxwImzO.esm.js} +2 -2
- package/dist/identity-reuse.d.ts +4 -530
- package/dist/identity-reuse.esm.js +8 -274
- package/dist/identityReuseManager-C6n_97dw.esm.js +95 -0
- package/dist/identityReuseManager-DwLtVzUn.d.ts +428 -0
- package/dist/identityReuseStateMachine-BfE5YiEr.esm.js +148 -0
- package/dist/{index-BcRG8rtJ.d.ts → index-B5hPA0Bg.d.ts} +2 -2
- package/dist/{index-ChHWNH48.d.ts → index-B9NysVDB.d.ts} +469 -195
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +10 -8
- package/dist/{invokeOnCaptureCallback-rc6kBHo5.esm.js → invokeOnCaptureCallback-ygByVdnn.esm.js} +1 -1
- package/dist/{lib-BB0B_qQX.esm.js → lib-BY67lgbq.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +8 -412
- package/dist/mandatory-consent.esm.js +6 -76
- package/dist/mandatoryConsentManager-H6D18cZB.esm.js +89 -0
- package/dist/mandatoryConsentManager-KfIlURRY.d.ts +429 -0
- package/dist/{mandatoryConsentStateMachine-Cnco1jvn.esm.js → mandatoryConsentStateMachine-DtQNW1ji.esm.js} +6 -6
- package/dist/openviduLazy-B8L--0oe.esm.js +3 -0
- package/dist/{openviduLazy-Cok70ZSg.esm.js → openviduLazy-Dh14JNJc.esm.js} +2 -2
- package/dist/otp-CGMdUzBC.esm.js +33 -0
- package/dist/otp-DF5A0sFx.d.ts +8 -0
- package/dist/permissionGuards-C1ispV96.esm.js +23 -0
- package/dist/permissionServices-CG3bMSfG.esm.js +130 -0
- package/dist/phone.d.ts +4 -3
- package/dist/phone.esm.js +6 -5
- package/dist/{phoneManager-DAJbGhlY.esm.js → phoneManager-BmF-0Ez4.esm.js} +30 -7
- package/dist/{phoneManager-B6M30hKE.d.ts → phoneManager-fPmIBYQK.d.ts} +65 -7
- package/dist/{phoneStateMachine-CuPARRaT.esm.js → phoneStateMachine-BiV0yoEx.esm.js} +46 -11
- package/dist/{qe-signature-DFo_Cc-I.esm.js → qe-signature-CUYPcHVo.esm.js} +1 -1
- package/dist/qe-signature.d.ts +3 -3
- package/dist/qe-signature.esm.js +6 -5
- package/dist/{recordingService-Ig2UgbLv.esm.js → recordingService-Bn9EdCmz.esm.js} +197 -179
- package/dist/redirect-to-mobile.d.ts +6 -104
- package/dist/redirect-to-mobile.esm.js +6 -99
- package/dist/redirectToMobileManager-BNe3IzC_.d.ts +178 -0
- package/dist/redirectToMobileManager-Dy3t7o0C.esm.js +159 -0
- package/dist/{redirectToMobileStateMachine-BOEqe46A.esm.js → redirectToMobileStateMachine-DyAdRxfP.esm.js} +28 -19
- package/dist/{runChildModule-CqqwqAkW.esm.js → runChildModule-CuoHZ1cx.esm.js} +35 -3
- package/dist/selfie.d.ts +13 -11
- package/dist/selfie.esm.js +27 -23
- package/dist/{selfieManager-Duisl7qN.esm.js → selfieManager-BjCoKRy0.esm.js} +6 -6
- package/dist/{selfieManager-D0lSgd-J.d.ts → selfieManager-dUbKRzOh.d.ts} +4 -4
- package/dist/{selfieStateMachine-D76whWEf.esm.js → selfieStateMachine-b4F2q9zw.esm.js} +5 -3
- package/dist/session-DoVb-OcB.esm.js +152 -0
- package/dist/session.d.ts +37 -5
- package/dist/session.esm.js +12 -7
- package/dist/sessionInitializer-B8H5MsXM.esm.js +366 -0
- package/dist/{setup-C5AITV8m.d.ts → setup-BbkprdVv.d.ts} +57 -6
- package/dist/{setup-DPPAxmXf.esm.js → setup-BqEfrdja.esm.js} +162 -24
- package/dist/signature.d.ts +2 -2
- package/dist/signature.esm.js +4 -4
- package/dist/{signatureStateMachine-B5-QVUve.esm.js → signatureStateMachine-C5qqYLRz.esm.js} +3 -3
- package/dist/stats-BMNUG1AU.esm.js +41 -0
- package/dist/stats.d.ts +13 -2
- package/dist/stats.esm.js +3 -2
- package/dist/trust-graph.d.ts +33 -4
- package/dist/trust-graph.esm.js +21 -15
- package/dist/{types-CFV9G_7j.d.ts → types-Bj9hdFjU.d.ts} +1 -1
- package/dist/{types-BP1m8VRw.d.ts → types-DOUhndhT.d.ts} +14 -2
- package/dist/types-DsnEVMhr.esm.js +34 -0
- package/dist/types-DvGZI7BF.d.ts +131 -0
- package/dist/{types-B06Ypu2F.d.ts → types-NuT8ftBV.d.ts} +1 -1
- package/dist/types-ya0LN_MX.d.ts +5 -0
- package/dist/{warmup-CEcppFiS.d.ts → warmup-Dg8Lh-50.d.ts} +8 -0
- package/dist/wasm.d.ts +6 -4
- package/dist/wasm.esm.js +11 -9
- package/dist/watchlist-for-business.d.ts +1 -1
- package/dist/watchlist-for-business.esm.js +5 -73
- package/dist/watchlist.d.ts +1 -1
- package/dist/watchlist.esm.js +4 -41
- package/dist/watchlistForBusinessStateMachine-DMl8j2Ov.esm.js +74 -0
- package/dist/watchlistStateMachine-DmQlqI6L.esm.js +50 -0
- package/dist/workflow.d.ts +150 -97
- package/dist/workflow.esm.js +156 -80
- package/package.json +19 -1
- package/dist/StateMachine-BCQrZJhf.d.ts +0 -2
- package/dist/WasmUtilProvider-j98OJf-S.esm.js +0 -114
- package/dist/browserSimulation-gxD8cSpM.esm.js +0 -20
- package/dist/deepsightService-O74l4Y__.esm.js +0 -489
- package/dist/displayErrors-DqJ_IbsG.d.ts +0 -39
- package/dist/flowCompletionService-DhkT4SRY.d.ts +0 -10
- package/dist/flowCompletionService-P54yzGvA.esm.js +0 -13
- package/dist/openviduLazy-Cm0XFh_v.esm.js +0 -3
- package/dist/permissionServices-D_i6nzEw.esm.js +0 -50
- package/dist/stats-CIfiPzb1.esm.js +0 -16
- package/dist/types-CAD4va6a.d.ts +0 -5
- package/dist/watchlistServices-DMbUhkBX.esm.js +0 -12
- /package/dist/{Actor-CI32dTbG.d.ts → Actor-Y0_Fj-KL.d.ts} +0 -0
- /package/dist/{ITimerCapability-C67ZRskg.esm.js → ITimerCapability-CB0I1Uf2.esm.js} +0 -0
- /package/dist/{Manager-C8PrhBOx.d.ts → Manager-BHn8wH8K.d.ts} +0 -0
- /package/dist/{camera-PA2Ljri3.esm.js → camera-DJWm3V4g.esm.js} +0 -0
- /package/dist/{camera-DBSxa6ML.d.ts → camera-SRBpPq2X.d.ts} +0 -0
- /package/dist/{chunk-CRF6K_H_.esm.js → chunk-CMUKZ2uL.esm.js} +0 -0
- /package/dist/{cpf-PPz2Njto.esm.js → cpf-BRzggV8G.esm.js} +0 -0
- /package/dist/{dateUtils-UoN5xswP.esm.js → dateUtils-AksLQmgV.esm.js} +0 -0
- /package/dist/{platform-CfrjKhmi.esm.js → platform-SKvEfCBh.esm.js} +0 -0
- /package/dist/{xstate.esm-B70JrNqo.esm.js → xstate.esm-C9wncMQa.esm.js} +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { t as Manager } from "./Manager-
|
|
2
|
-
import "./Actor-
|
|
3
|
-
import { t as CameraStream } from "./camera-
|
|
4
|
-
import
|
|
1
|
+
import { t as Manager } from "./Manager-BHn8wH8K.js";
|
|
2
|
+
import "./Actor-Y0_Fj-KL.js";
|
|
3
|
+
import { t as CameraStream } from "./camera-SRBpPq2X.js";
|
|
4
|
+
import { n as PermissionStatus, t as PermissionResult } from "./types-ya0LN_MX.js";
|
|
5
|
+
import * as xstate130 from "xstate";
|
|
5
6
|
|
|
6
7
|
//#region src/modules/document-capture/types.d.ts
|
|
7
8
|
type DocumentType = 'addressStatement' | 'otherDocument1' | 'otherDocument2' | 'otherDocument3' | 'v5cMultiPageLogbook' | 'circulationCard' | 'financeSettlement' | 'carInvoice' | 'capture' | 'processPoaOcr' | 'processLoaOcr' | 'processAsylumSeekerVisaZaf' | 'processBankStatementOCR' | 'processBankCheck' | 'processV5CLogbook' | 'processCarInvoice' | 'processCirculationCard' | 'processFinanceSettlement';
|
|
@@ -71,6 +72,7 @@ type DocumentCaptureNextPageType = 'none' | 'required' | 'optional';
|
|
|
71
72
|
type DocumentCaptureContext = {
|
|
72
73
|
config: DocumentCaptureResolvedConfig;
|
|
73
74
|
stream: CameraStream | undefined;
|
|
75
|
+
permissionResult: PermissionResult | 'refresh' | undefined;
|
|
74
76
|
capturedDocument: CapturedDocument | undefined;
|
|
75
77
|
captureMethod: 'camera' | 'file' | 'gallery' | undefined;
|
|
76
78
|
progress: number;
|
|
@@ -84,7 +86,7 @@ type DocumentCaptureInput = {
|
|
|
84
86
|
};
|
|
85
87
|
//#endregion
|
|
86
88
|
//#region src/modules/document-capture/documentCaptureStateMachine.d.ts
|
|
87
|
-
declare const documentCaptureMachine:
|
|
89
|
+
declare const documentCaptureMachine: xstate130.StateMachine<DocumentCaptureContext, {
|
|
88
90
|
type: "CAPTURE";
|
|
89
91
|
} | {
|
|
90
92
|
type: "FILE_SELECTED";
|
|
@@ -110,112 +112,134 @@ declare const documentCaptureMachine: xstate763.StateMachine<DocumentCaptureCont
|
|
|
110
112
|
type: "ALL_PAGES_CAPTURED";
|
|
111
113
|
} | {
|
|
112
114
|
type: "SKIP";
|
|
115
|
+
} | {
|
|
116
|
+
type: "REQUEST_PERMISSION";
|
|
117
|
+
} | {
|
|
118
|
+
type: "GO_TO_LEARN_MORE";
|
|
119
|
+
} | {
|
|
120
|
+
type: "BACK";
|
|
113
121
|
} | {
|
|
114
122
|
type: "CLOSE";
|
|
115
123
|
}, {
|
|
116
|
-
[x: string]:
|
|
124
|
+
[x: string]: xstate130.ActorRefFromLogic<xstate130.PromiseActorLogic<DocumentUploadResponse, {
|
|
117
125
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
118
126
|
processingType: string;
|
|
119
127
|
onProgress: (progress: number) => void;
|
|
120
|
-
},
|
|
128
|
+
}, xstate130.EventObject>> | xstate130.ActorRefFromLogic<xstate130.PromiseActorLogic<PermissionResult, {
|
|
129
|
+
permissionResult?: PermissionResult;
|
|
130
|
+
requestMotionPermission: boolean;
|
|
131
|
+
}, xstate130.EventObject>> | xstate130.ActorRefFromLogic<xstate130.PromiseActorLogic<PermissionResult, void, xstate130.EventObject>> | xstate130.ActorRefFromLogic<xstate130.PromiseActorLogic<MediaStream, void, xstate130.EventObject>> | xstate130.ActorRefFromLogic<xstate130.PromiseActorLogic<FinalizeDocumentResponse, {
|
|
121
132
|
processingType: string;
|
|
122
|
-
},
|
|
123
|
-
},
|
|
133
|
+
}, xstate130.EventObject>> | undefined;
|
|
134
|
+
}, xstate130.Values<{
|
|
124
135
|
uploadDocument: {
|
|
125
136
|
src: "uploadDocument";
|
|
126
|
-
logic:
|
|
137
|
+
logic: xstate130.PromiseActorLogic<DocumentUploadResponse, {
|
|
127
138
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
128
139
|
processingType: string;
|
|
129
140
|
onProgress: (progress: number) => void;
|
|
130
|
-
},
|
|
141
|
+
}, xstate130.EventObject>;
|
|
142
|
+
id: string | undefined;
|
|
143
|
+
};
|
|
144
|
+
requestPermission: {
|
|
145
|
+
src: "requestPermission";
|
|
146
|
+
logic: xstate130.PromiseActorLogic<PermissionResult, {
|
|
147
|
+
permissionResult?: PermissionResult;
|
|
148
|
+
requestMotionPermission: boolean;
|
|
149
|
+
}, xstate130.EventObject>;
|
|
150
|
+
id: string | undefined;
|
|
151
|
+
};
|
|
152
|
+
checkPermission: {
|
|
153
|
+
src: "checkPermission";
|
|
154
|
+
logic: xstate130.PromiseActorLogic<PermissionResult, void, xstate130.EventObject>;
|
|
131
155
|
id: string | undefined;
|
|
132
156
|
};
|
|
133
157
|
initCamera: {
|
|
134
158
|
src: "initCamera";
|
|
135
|
-
logic:
|
|
159
|
+
logic: xstate130.PromiseActorLogic<MediaStream, void, xstate130.EventObject>;
|
|
136
160
|
id: string | undefined;
|
|
137
161
|
};
|
|
138
162
|
finalizeDocumentRequest: {
|
|
139
163
|
src: "finalizeDocumentRequest";
|
|
140
|
-
logic:
|
|
164
|
+
logic: xstate130.PromiseActorLogic<FinalizeDocumentResponse, {
|
|
141
165
|
processingType: string;
|
|
142
|
-
},
|
|
166
|
+
}, xstate130.EventObject>;
|
|
143
167
|
id: string | undefined;
|
|
144
168
|
};
|
|
145
|
-
}>,
|
|
169
|
+
}>, xstate130.Values<{
|
|
146
170
|
clearError: {
|
|
147
171
|
type: "clearError";
|
|
148
|
-
params:
|
|
172
|
+
params: xstate130.NonReducibleUnknown;
|
|
149
173
|
};
|
|
150
174
|
setStream: {
|
|
151
175
|
type: "setStream";
|
|
152
|
-
params:
|
|
153
|
-
};
|
|
154
|
-
setProgress: {
|
|
155
|
-
type: "setProgress";
|
|
156
|
-
params: xstate763.NonReducibleUnknown;
|
|
157
|
-
};
|
|
158
|
-
stopStream: {
|
|
159
|
-
type: "stopStream";
|
|
160
|
-
params: xstate763.NonReducibleUnknown;
|
|
176
|
+
params: xstate130.NonReducibleUnknown;
|
|
161
177
|
};
|
|
162
178
|
setCapturedDocument: {
|
|
163
179
|
type: "setCapturedDocument";
|
|
164
|
-
params:
|
|
180
|
+
params: xstate130.NonReducibleUnknown;
|
|
165
181
|
};
|
|
166
182
|
setFileTooLargeError: {
|
|
167
183
|
type: "setFileTooLargeError";
|
|
168
|
-
params:
|
|
184
|
+
params: xstate130.NonReducibleUnknown;
|
|
185
|
+
};
|
|
186
|
+
setProgress: {
|
|
187
|
+
type: "setProgress";
|
|
188
|
+
params: xstate130.NonReducibleUnknown;
|
|
169
189
|
};
|
|
170
190
|
setUploadError: {
|
|
171
191
|
type: "setUploadError";
|
|
172
|
-
params:
|
|
192
|
+
params: xstate130.NonReducibleUnknown;
|
|
173
193
|
};
|
|
174
194
|
setFinalizeError: {
|
|
175
195
|
type: "setFinalizeError";
|
|
176
|
-
params:
|
|
196
|
+
params: xstate130.NonReducibleUnknown;
|
|
177
197
|
};
|
|
178
198
|
decrementAttemptsRemaining: {
|
|
179
199
|
type: "decrementAttemptsRemaining";
|
|
180
|
-
params:
|
|
200
|
+
params: xstate130.NonReducibleUnknown;
|
|
181
201
|
};
|
|
182
202
|
setCaptureMethodFile: {
|
|
183
203
|
type: "setCaptureMethodFile";
|
|
184
|
-
params:
|
|
204
|
+
params: xstate130.NonReducibleUnknown;
|
|
185
205
|
};
|
|
186
206
|
setCaptureMethodCamera: {
|
|
187
207
|
type: "setCaptureMethodCamera";
|
|
188
|
-
params:
|
|
208
|
+
params: xstate130.NonReducibleUnknown;
|
|
189
209
|
};
|
|
190
210
|
setCaptureMethodGallery: {
|
|
191
211
|
type: "setCaptureMethodGallery";
|
|
192
|
-
params:
|
|
212
|
+
params: xstate130.NonReducibleUnknown;
|
|
193
213
|
};
|
|
194
214
|
clearCapturedDocument: {
|
|
195
215
|
type: "clearCapturedDocument";
|
|
196
|
-
params:
|
|
216
|
+
params: xstate130.NonReducibleUnknown;
|
|
197
217
|
};
|
|
198
218
|
resetPageNumber: {
|
|
199
219
|
type: "resetPageNumber";
|
|
200
|
-
params:
|
|
220
|
+
params: xstate130.NonReducibleUnknown;
|
|
201
221
|
};
|
|
202
222
|
clearCapturedDocumentGalleryRetake: {
|
|
203
223
|
type: "clearCapturedDocumentGalleryRetake";
|
|
204
|
-
params:
|
|
224
|
+
params: xstate130.NonReducibleUnknown;
|
|
205
225
|
};
|
|
206
226
|
setNextPageType: {
|
|
207
227
|
type: "setNextPageType";
|
|
208
|
-
params:
|
|
228
|
+
params: xstate130.NonReducibleUnknown;
|
|
209
229
|
};
|
|
210
230
|
clearForNextPage: {
|
|
211
231
|
type: "clearForNextPage";
|
|
212
|
-
params:
|
|
232
|
+
params: xstate130.NonReducibleUnknown;
|
|
213
233
|
};
|
|
214
234
|
resetProgress: {
|
|
215
235
|
type: "resetProgress";
|
|
216
|
-
params:
|
|
236
|
+
params: xstate130.NonReducibleUnknown;
|
|
237
|
+
};
|
|
238
|
+
stopStream: {
|
|
239
|
+
type: "stopStream";
|
|
240
|
+
params: xstate130.NonReducibleUnknown;
|
|
217
241
|
};
|
|
218
|
-
}>,
|
|
242
|
+
}>, xstate130.Values<{
|
|
219
243
|
allowSkip: {
|
|
220
244
|
type: "allowSkip";
|
|
221
245
|
params: unknown;
|
|
@@ -236,6 +260,14 @@ declare const documentCaptureMachine: xstate763.StateMachine<DocumentCaptureCont
|
|
|
236
260
|
type: "isCameraMode";
|
|
237
261
|
params: unknown;
|
|
238
262
|
};
|
|
263
|
+
isCameraPermissionGranted: {
|
|
264
|
+
type: "isCameraPermissionGranted";
|
|
265
|
+
params: unknown;
|
|
266
|
+
};
|
|
267
|
+
isCameraPermissionDenied: {
|
|
268
|
+
type: "isCameraPermissionDenied";
|
|
269
|
+
params: unknown;
|
|
270
|
+
};
|
|
239
271
|
isCaptureMethodCamera: {
|
|
240
272
|
type: "isCaptureMethodCamera";
|
|
241
273
|
params: unknown;
|
|
@@ -268,102 +300,153 @@ declare const documentCaptureMachine: xstate763.StateMachine<DocumentCaptureCont
|
|
|
268
300
|
type: "fileSizeOkForNonGallery";
|
|
269
301
|
params: unknown;
|
|
270
302
|
};
|
|
271
|
-
}>, never, "uploading" | "closed" | "success" | "finished" | "initCamera" | "
|
|
303
|
+
}>, never, "uploading" | "closed" | "success" | "finished" | "initCamera" | "tutorial" | "capturing" | "preview" | "failure" | "nextPage" | "finalizing" | {
|
|
304
|
+
permissions: "idle" | "denied" | "waitingForUser" | "requesting" | "learnMore";
|
|
305
|
+
}, string, DocumentCaptureInput, xstate130.NonReducibleUnknown, xstate130.EventObject, xstate130.MetaObject, {
|
|
272
306
|
readonly id: "documentCapture";
|
|
273
307
|
readonly initial: "tutorial";
|
|
274
308
|
readonly context: ({
|
|
275
309
|
input
|
|
276
310
|
}: {
|
|
277
311
|
spawn: {
|
|
278
|
-
<TSrc extends "uploadDocument" | "initCamera" | "finalizeDocumentRequest">(logic: TSrc, ...[options]: ({
|
|
312
|
+
<TSrc extends "uploadDocument" | "requestPermission" | "checkPermission" | "initCamera" | "finalizeDocumentRequest">(logic: TSrc, ...[options]: ({
|
|
279
313
|
src: "uploadDocument";
|
|
280
|
-
logic:
|
|
314
|
+
logic: xstate130.PromiseActorLogic<DocumentUploadResponse, {
|
|
281
315
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
282
316
|
processingType: string;
|
|
283
317
|
onProgress: (progress: number) => void;
|
|
284
|
-
},
|
|
318
|
+
}, xstate130.EventObject>;
|
|
285
319
|
id: string | undefined;
|
|
286
320
|
} extends infer T ? T extends {
|
|
287
321
|
src: "uploadDocument";
|
|
288
|
-
logic:
|
|
322
|
+
logic: xstate130.PromiseActorLogic<DocumentUploadResponse, {
|
|
289
323
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
290
324
|
processingType: string;
|
|
291
325
|
onProgress: (progress: number) => void;
|
|
292
|
-
},
|
|
326
|
+
}, xstate130.EventObject>;
|
|
293
327
|
id: string | undefined;
|
|
294
328
|
} ? T extends {
|
|
295
329
|
src: TSrc;
|
|
296
|
-
} ?
|
|
330
|
+
} ? xstate130.ConditionalRequired<[options?: ({
|
|
297
331
|
id?: T["id"] | undefined;
|
|
298
332
|
systemId?: string;
|
|
299
|
-
input?:
|
|
333
|
+
input?: xstate130.InputFrom<T["logic"]> | undefined;
|
|
300
334
|
syncSnapshot?: boolean;
|
|
301
|
-
} & { [K in
|
|
302
|
-
src: "
|
|
303
|
-
logic:
|
|
335
|
+
} & { [K in xstate130.RequiredActorOptions<T>]: unknown }) | undefined], xstate130.IsNotNever<xstate130.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
336
|
+
src: "requestPermission";
|
|
337
|
+
logic: xstate130.PromiseActorLogic<PermissionResult, {
|
|
338
|
+
permissionResult?: PermissionResult;
|
|
339
|
+
requestMotionPermission: boolean;
|
|
340
|
+
}, xstate130.EventObject>;
|
|
304
341
|
id: string | undefined;
|
|
305
342
|
} extends infer T_1 ? T_1 extends {
|
|
306
|
-
src: "
|
|
307
|
-
logic:
|
|
343
|
+
src: "requestPermission";
|
|
344
|
+
logic: xstate130.PromiseActorLogic<PermissionResult, {
|
|
345
|
+
permissionResult?: PermissionResult;
|
|
346
|
+
requestMotionPermission: boolean;
|
|
347
|
+
}, xstate130.EventObject>;
|
|
308
348
|
id: string | undefined;
|
|
309
349
|
} ? T_1 extends {
|
|
310
350
|
src: TSrc;
|
|
311
|
-
} ?
|
|
351
|
+
} ? xstate130.ConditionalRequired<[options?: ({
|
|
312
352
|
id?: T_1["id"] | undefined;
|
|
313
353
|
systemId?: string;
|
|
314
|
-
input?:
|
|
354
|
+
input?: xstate130.InputFrom<T_1["logic"]> | undefined;
|
|
315
355
|
syncSnapshot?: boolean;
|
|
316
|
-
} & { [K_1 in
|
|
356
|
+
} & { [K_1 in xstate130.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate130.IsNotNever<xstate130.RequiredActorOptions<T_1>>> : never : never : never) | ({
|
|
357
|
+
src: "checkPermission";
|
|
358
|
+
logic: xstate130.PromiseActorLogic<PermissionResult, void, xstate130.EventObject>;
|
|
359
|
+
id: string | undefined;
|
|
360
|
+
} extends infer T_2 ? T_2 extends {
|
|
361
|
+
src: "checkPermission";
|
|
362
|
+
logic: xstate130.PromiseActorLogic<PermissionResult, void, xstate130.EventObject>;
|
|
363
|
+
id: string | undefined;
|
|
364
|
+
} ? T_2 extends {
|
|
365
|
+
src: TSrc;
|
|
366
|
+
} ? xstate130.ConditionalRequired<[options?: ({
|
|
367
|
+
id?: T_2["id"] | undefined;
|
|
368
|
+
systemId?: string;
|
|
369
|
+
input?: xstate130.InputFrom<T_2["logic"]> | undefined;
|
|
370
|
+
syncSnapshot?: boolean;
|
|
371
|
+
} & { [K_2 in xstate130.RequiredActorOptions<T_2>]: unknown }) | undefined], xstate130.IsNotNever<xstate130.RequiredActorOptions<T_2>>> : never : never : never) | ({
|
|
372
|
+
src: "initCamera";
|
|
373
|
+
logic: xstate130.PromiseActorLogic<MediaStream, void, xstate130.EventObject>;
|
|
374
|
+
id: string | undefined;
|
|
375
|
+
} extends infer T_3 ? T_3 extends {
|
|
376
|
+
src: "initCamera";
|
|
377
|
+
logic: xstate130.PromiseActorLogic<MediaStream, void, xstate130.EventObject>;
|
|
378
|
+
id: string | undefined;
|
|
379
|
+
} ? T_3 extends {
|
|
380
|
+
src: TSrc;
|
|
381
|
+
} ? xstate130.ConditionalRequired<[options?: ({
|
|
382
|
+
id?: T_3["id"] | undefined;
|
|
383
|
+
systemId?: string;
|
|
384
|
+
input?: xstate130.InputFrom<T_3["logic"]> | undefined;
|
|
385
|
+
syncSnapshot?: boolean;
|
|
386
|
+
} & { [K_3 in xstate130.RequiredActorOptions<T_3>]: unknown }) | undefined], xstate130.IsNotNever<xstate130.RequiredActorOptions<T_3>>> : never : never : never) | ({
|
|
317
387
|
src: "finalizeDocumentRequest";
|
|
318
|
-
logic:
|
|
388
|
+
logic: xstate130.PromiseActorLogic<FinalizeDocumentResponse, {
|
|
319
389
|
processingType: string;
|
|
320
|
-
},
|
|
390
|
+
}, xstate130.EventObject>;
|
|
321
391
|
id: string | undefined;
|
|
322
|
-
} extends infer
|
|
392
|
+
} extends infer T_4 ? T_4 extends {
|
|
323
393
|
src: "finalizeDocumentRequest";
|
|
324
|
-
logic:
|
|
394
|
+
logic: xstate130.PromiseActorLogic<FinalizeDocumentResponse, {
|
|
325
395
|
processingType: string;
|
|
326
|
-
},
|
|
396
|
+
}, xstate130.EventObject>;
|
|
327
397
|
id: string | undefined;
|
|
328
|
-
} ?
|
|
398
|
+
} ? T_4 extends {
|
|
329
399
|
src: TSrc;
|
|
330
|
-
} ?
|
|
331
|
-
id?:
|
|
400
|
+
} ? xstate130.ConditionalRequired<[options?: ({
|
|
401
|
+
id?: T_4["id"] | undefined;
|
|
332
402
|
systemId?: string;
|
|
333
|
-
input?:
|
|
403
|
+
input?: xstate130.InputFrom<T_4["logic"]> | undefined;
|
|
334
404
|
syncSnapshot?: boolean;
|
|
335
|
-
} & { [
|
|
405
|
+
} & { [K_4 in xstate130.RequiredActorOptions<T_4>]: unknown }) | undefined], xstate130.IsNotNever<xstate130.RequiredActorOptions<T_4>>> : never : never : never)): xstate130.ActorRefFromLogic<xstate130.GetConcreteByKey<xstate130.Values<{
|
|
336
406
|
uploadDocument: {
|
|
337
407
|
src: "uploadDocument";
|
|
338
|
-
logic:
|
|
408
|
+
logic: xstate130.PromiseActorLogic<DocumentUploadResponse, {
|
|
339
409
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
340
410
|
processingType: string;
|
|
341
411
|
onProgress: (progress: number) => void;
|
|
342
|
-
},
|
|
412
|
+
}, xstate130.EventObject>;
|
|
413
|
+
id: string | undefined;
|
|
414
|
+
};
|
|
415
|
+
requestPermission: {
|
|
416
|
+
src: "requestPermission";
|
|
417
|
+
logic: xstate130.PromiseActorLogic<PermissionResult, {
|
|
418
|
+
permissionResult?: PermissionResult;
|
|
419
|
+
requestMotionPermission: boolean;
|
|
420
|
+
}, xstate130.EventObject>;
|
|
421
|
+
id: string | undefined;
|
|
422
|
+
};
|
|
423
|
+
checkPermission: {
|
|
424
|
+
src: "checkPermission";
|
|
425
|
+
logic: xstate130.PromiseActorLogic<PermissionResult, void, xstate130.EventObject>;
|
|
343
426
|
id: string | undefined;
|
|
344
427
|
};
|
|
345
428
|
initCamera: {
|
|
346
429
|
src: "initCamera";
|
|
347
|
-
logic:
|
|
430
|
+
logic: xstate130.PromiseActorLogic<MediaStream, void, xstate130.EventObject>;
|
|
348
431
|
id: string | undefined;
|
|
349
432
|
};
|
|
350
433
|
finalizeDocumentRequest: {
|
|
351
434
|
src: "finalizeDocumentRequest";
|
|
352
|
-
logic:
|
|
435
|
+
logic: xstate130.PromiseActorLogic<FinalizeDocumentResponse, {
|
|
353
436
|
processingType: string;
|
|
354
|
-
},
|
|
437
|
+
}, xstate130.EventObject>;
|
|
355
438
|
id: string | undefined;
|
|
356
439
|
};
|
|
357
440
|
}>, "src", TSrc>["logic"]>;
|
|
358
|
-
<TLogic extends
|
|
441
|
+
<TLogic extends xstate130.AnyActorLogic>(src: TLogic, ...[options]: xstate130.ConditionalRequired<[options?: ({
|
|
359
442
|
id?: never;
|
|
360
443
|
systemId?: string;
|
|
361
|
-
input?:
|
|
444
|
+
input?: xstate130.InputFrom<TLogic> | undefined;
|
|
362
445
|
syncSnapshot?: boolean;
|
|
363
|
-
} & { [K in
|
|
446
|
+
} & { [K in xstate130.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate130.IsNotNever<xstate130.RequiredLogicInput<TLogic>>>): xstate130.ActorRefFromLogic<TLogic>;
|
|
364
447
|
};
|
|
365
448
|
input: DocumentCaptureInput;
|
|
366
|
-
self:
|
|
449
|
+
self: xstate130.ActorRef<xstate130.MachineSnapshot<DocumentCaptureContext, {
|
|
367
450
|
type: "CAPTURE";
|
|
368
451
|
} | {
|
|
369
452
|
type: "FILE_SELECTED";
|
|
@@ -389,9 +472,15 @@ declare const documentCaptureMachine: xstate763.StateMachine<DocumentCaptureCont
|
|
|
389
472
|
type: "ALL_PAGES_CAPTURED";
|
|
390
473
|
} | {
|
|
391
474
|
type: "SKIP";
|
|
475
|
+
} | {
|
|
476
|
+
type: "REQUEST_PERMISSION";
|
|
477
|
+
} | {
|
|
478
|
+
type: "GO_TO_LEARN_MORE";
|
|
479
|
+
} | {
|
|
480
|
+
type: "BACK";
|
|
392
481
|
} | {
|
|
393
482
|
type: "CLOSE";
|
|
394
|
-
}, Record<string,
|
|
483
|
+
}, Record<string, xstate130.AnyActorRef | undefined>, xstate130.StateValue, string, unknown, any, any>, {
|
|
395
484
|
type: "CAPTURE";
|
|
396
485
|
} | {
|
|
397
486
|
type: "FILE_SELECTED";
|
|
@@ -417,9 +506,15 @@ declare const documentCaptureMachine: xstate763.StateMachine<DocumentCaptureCont
|
|
|
417
506
|
type: "ALL_PAGES_CAPTURED";
|
|
418
507
|
} | {
|
|
419
508
|
type: "SKIP";
|
|
509
|
+
} | {
|
|
510
|
+
type: "REQUEST_PERMISSION";
|
|
511
|
+
} | {
|
|
512
|
+
type: "GO_TO_LEARN_MORE";
|
|
513
|
+
} | {
|
|
514
|
+
type: "BACK";
|
|
420
515
|
} | {
|
|
421
516
|
type: "CLOSE";
|
|
422
|
-
},
|
|
517
|
+
}, xstate130.AnyEventObject>;
|
|
423
518
|
}) => {
|
|
424
519
|
config: {
|
|
425
520
|
processingType: DocumentType;
|
|
@@ -434,6 +529,7 @@ declare const documentCaptureMachine: xstate763.StateMachine<DocumentCaptureCont
|
|
|
434
529
|
step2Text: string | undefined;
|
|
435
530
|
};
|
|
436
531
|
stream: undefined;
|
|
532
|
+
permissionResult: undefined;
|
|
437
533
|
capturedDocument: undefined;
|
|
438
534
|
captureMethod: undefined;
|
|
439
535
|
progress: number;
|
|
@@ -446,7 +542,7 @@ declare const documentCaptureMachine: xstate763.StateMachine<DocumentCaptureCont
|
|
|
446
542
|
readonly tutorial: {
|
|
447
543
|
readonly on: {
|
|
448
544
|
readonly CAPTURE: readonly [{
|
|
449
|
-
readonly target: "
|
|
545
|
+
readonly target: "permissions";
|
|
450
546
|
readonly guard: "isCameraMode";
|
|
451
547
|
}, {
|
|
452
548
|
readonly target: "capturing";
|
|
@@ -468,6 +564,776 @@ declare const documentCaptureMachine: xstate763.StateMachine<DocumentCaptureCont
|
|
|
468
564
|
};
|
|
469
565
|
};
|
|
470
566
|
};
|
|
567
|
+
readonly permissions: {
|
|
568
|
+
readonly initial: "idle";
|
|
569
|
+
readonly states: {
|
|
570
|
+
readonly idle: {
|
|
571
|
+
readonly invoke: {
|
|
572
|
+
readonly id: "checkPermissionIdle";
|
|
573
|
+
readonly src: "checkPermission";
|
|
574
|
+
readonly onDone: readonly [{
|
|
575
|
+
readonly target: "#documentCapture.initCamera";
|
|
576
|
+
readonly guard: "isCameraPermissionGranted";
|
|
577
|
+
readonly actions: xstate130.ActionFunction<DocumentCaptureContext, xstate130.DoneActorEvent<PermissionResult, string>, {
|
|
578
|
+
type: "CAPTURE";
|
|
579
|
+
} | {
|
|
580
|
+
type: "FILE_SELECTED";
|
|
581
|
+
file: File;
|
|
582
|
+
imageBase64: string;
|
|
583
|
+
fileType: string;
|
|
584
|
+
} | {
|
|
585
|
+
type: "ACCEPT";
|
|
586
|
+
} | {
|
|
587
|
+
type: "RETAKE";
|
|
588
|
+
} | {
|
|
589
|
+
type: "UPLOAD_PROGRESS";
|
|
590
|
+
progress: number;
|
|
591
|
+
} | {
|
|
592
|
+
type: "RETRY";
|
|
593
|
+
} | {
|
|
594
|
+
type: "CONTINUE";
|
|
595
|
+
} | {
|
|
596
|
+
type: "NEXT_PAGE_CAMERA";
|
|
597
|
+
} | {
|
|
598
|
+
type: "NEXT_PAGE_PHOTO_LIBRARY";
|
|
599
|
+
} | {
|
|
600
|
+
type: "ALL_PAGES_CAPTURED";
|
|
601
|
+
} | {
|
|
602
|
+
type: "SKIP";
|
|
603
|
+
} | {
|
|
604
|
+
type: "REQUEST_PERMISSION";
|
|
605
|
+
} | {
|
|
606
|
+
type: "GO_TO_LEARN_MORE";
|
|
607
|
+
} | {
|
|
608
|
+
type: "BACK";
|
|
609
|
+
} | {
|
|
610
|
+
type: "CLOSE";
|
|
611
|
+
}, undefined, xstate130.Values<{
|
|
612
|
+
uploadDocument: {
|
|
613
|
+
src: "uploadDocument";
|
|
614
|
+
logic: xstate130.PromiseActorLogic<DocumentUploadResponse, {
|
|
615
|
+
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
616
|
+
processingType: string;
|
|
617
|
+
onProgress: (progress: number) => void;
|
|
618
|
+
}, xstate130.EventObject>;
|
|
619
|
+
id: string | undefined;
|
|
620
|
+
};
|
|
621
|
+
requestPermission: {
|
|
622
|
+
src: "requestPermission";
|
|
623
|
+
logic: xstate130.PromiseActorLogic<PermissionResult, {
|
|
624
|
+
permissionResult?: PermissionResult;
|
|
625
|
+
requestMotionPermission: boolean;
|
|
626
|
+
}, xstate130.EventObject>;
|
|
627
|
+
id: string | undefined;
|
|
628
|
+
};
|
|
629
|
+
checkPermission: {
|
|
630
|
+
src: "checkPermission";
|
|
631
|
+
logic: xstate130.PromiseActorLogic<PermissionResult, void, xstate130.EventObject>;
|
|
632
|
+
id: string | undefined;
|
|
633
|
+
};
|
|
634
|
+
initCamera: {
|
|
635
|
+
src: "initCamera";
|
|
636
|
+
logic: xstate130.PromiseActorLogic<MediaStream, void, xstate130.EventObject>;
|
|
637
|
+
id: string | undefined;
|
|
638
|
+
};
|
|
639
|
+
finalizeDocumentRequest: {
|
|
640
|
+
src: "finalizeDocumentRequest";
|
|
641
|
+
logic: xstate130.PromiseActorLogic<FinalizeDocumentResponse, {
|
|
642
|
+
processingType: string;
|
|
643
|
+
}, xstate130.EventObject>;
|
|
644
|
+
id: string | undefined;
|
|
645
|
+
};
|
|
646
|
+
}>, never, never, never, never>;
|
|
647
|
+
}, {
|
|
648
|
+
readonly target: "denied";
|
|
649
|
+
readonly guard: "isCameraPermissionDenied";
|
|
650
|
+
readonly actions: xstate130.ActionFunction<DocumentCaptureContext, xstate130.DoneActorEvent<PermissionResult, string>, {
|
|
651
|
+
type: "CAPTURE";
|
|
652
|
+
} | {
|
|
653
|
+
type: "FILE_SELECTED";
|
|
654
|
+
file: File;
|
|
655
|
+
imageBase64: string;
|
|
656
|
+
fileType: string;
|
|
657
|
+
} | {
|
|
658
|
+
type: "ACCEPT";
|
|
659
|
+
} | {
|
|
660
|
+
type: "RETAKE";
|
|
661
|
+
} | {
|
|
662
|
+
type: "UPLOAD_PROGRESS";
|
|
663
|
+
progress: number;
|
|
664
|
+
} | {
|
|
665
|
+
type: "RETRY";
|
|
666
|
+
} | {
|
|
667
|
+
type: "CONTINUE";
|
|
668
|
+
} | {
|
|
669
|
+
type: "NEXT_PAGE_CAMERA";
|
|
670
|
+
} | {
|
|
671
|
+
type: "NEXT_PAGE_PHOTO_LIBRARY";
|
|
672
|
+
} | {
|
|
673
|
+
type: "ALL_PAGES_CAPTURED";
|
|
674
|
+
} | {
|
|
675
|
+
type: "SKIP";
|
|
676
|
+
} | {
|
|
677
|
+
type: "REQUEST_PERMISSION";
|
|
678
|
+
} | {
|
|
679
|
+
type: "GO_TO_LEARN_MORE";
|
|
680
|
+
} | {
|
|
681
|
+
type: "BACK";
|
|
682
|
+
} | {
|
|
683
|
+
type: "CLOSE";
|
|
684
|
+
}, undefined, xstate130.Values<{
|
|
685
|
+
uploadDocument: {
|
|
686
|
+
src: "uploadDocument";
|
|
687
|
+
logic: xstate130.PromiseActorLogic<DocumentUploadResponse, {
|
|
688
|
+
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
689
|
+
processingType: string;
|
|
690
|
+
onProgress: (progress: number) => void;
|
|
691
|
+
}, xstate130.EventObject>;
|
|
692
|
+
id: string | undefined;
|
|
693
|
+
};
|
|
694
|
+
requestPermission: {
|
|
695
|
+
src: "requestPermission";
|
|
696
|
+
logic: xstate130.PromiseActorLogic<PermissionResult, {
|
|
697
|
+
permissionResult?: PermissionResult;
|
|
698
|
+
requestMotionPermission: boolean;
|
|
699
|
+
}, xstate130.EventObject>;
|
|
700
|
+
id: string | undefined;
|
|
701
|
+
};
|
|
702
|
+
checkPermission: {
|
|
703
|
+
src: "checkPermission";
|
|
704
|
+
logic: xstate130.PromiseActorLogic<PermissionResult, void, xstate130.EventObject>;
|
|
705
|
+
id: string | undefined;
|
|
706
|
+
};
|
|
707
|
+
initCamera: {
|
|
708
|
+
src: "initCamera";
|
|
709
|
+
logic: xstate130.PromiseActorLogic<MediaStream, void, xstate130.EventObject>;
|
|
710
|
+
id: string | undefined;
|
|
711
|
+
};
|
|
712
|
+
finalizeDocumentRequest: {
|
|
713
|
+
src: "finalizeDocumentRequest";
|
|
714
|
+
logic: xstate130.PromiseActorLogic<FinalizeDocumentResponse, {
|
|
715
|
+
processingType: string;
|
|
716
|
+
}, xstate130.EventObject>;
|
|
717
|
+
id: string | undefined;
|
|
718
|
+
};
|
|
719
|
+
}>, never, never, never, never>;
|
|
720
|
+
}, {
|
|
721
|
+
readonly target: "waitingForUser";
|
|
722
|
+
readonly actions: xstate130.ActionFunction<DocumentCaptureContext, xstate130.DoneActorEvent<PermissionResult, string>, {
|
|
723
|
+
type: "CAPTURE";
|
|
724
|
+
} | {
|
|
725
|
+
type: "FILE_SELECTED";
|
|
726
|
+
file: File;
|
|
727
|
+
imageBase64: string;
|
|
728
|
+
fileType: string;
|
|
729
|
+
} | {
|
|
730
|
+
type: "ACCEPT";
|
|
731
|
+
} | {
|
|
732
|
+
type: "RETAKE";
|
|
733
|
+
} | {
|
|
734
|
+
type: "UPLOAD_PROGRESS";
|
|
735
|
+
progress: number;
|
|
736
|
+
} | {
|
|
737
|
+
type: "RETRY";
|
|
738
|
+
} | {
|
|
739
|
+
type: "CONTINUE";
|
|
740
|
+
} | {
|
|
741
|
+
type: "NEXT_PAGE_CAMERA";
|
|
742
|
+
} | {
|
|
743
|
+
type: "NEXT_PAGE_PHOTO_LIBRARY";
|
|
744
|
+
} | {
|
|
745
|
+
type: "ALL_PAGES_CAPTURED";
|
|
746
|
+
} | {
|
|
747
|
+
type: "SKIP";
|
|
748
|
+
} | {
|
|
749
|
+
type: "REQUEST_PERMISSION";
|
|
750
|
+
} | {
|
|
751
|
+
type: "GO_TO_LEARN_MORE";
|
|
752
|
+
} | {
|
|
753
|
+
type: "BACK";
|
|
754
|
+
} | {
|
|
755
|
+
type: "CLOSE";
|
|
756
|
+
}, undefined, xstate130.Values<{
|
|
757
|
+
uploadDocument: {
|
|
758
|
+
src: "uploadDocument";
|
|
759
|
+
logic: xstate130.PromiseActorLogic<DocumentUploadResponse, {
|
|
760
|
+
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
761
|
+
processingType: string;
|
|
762
|
+
onProgress: (progress: number) => void;
|
|
763
|
+
}, xstate130.EventObject>;
|
|
764
|
+
id: string | undefined;
|
|
765
|
+
};
|
|
766
|
+
requestPermission: {
|
|
767
|
+
src: "requestPermission";
|
|
768
|
+
logic: xstate130.PromiseActorLogic<PermissionResult, {
|
|
769
|
+
permissionResult?: PermissionResult;
|
|
770
|
+
requestMotionPermission: boolean;
|
|
771
|
+
}, xstate130.EventObject>;
|
|
772
|
+
id: string | undefined;
|
|
773
|
+
};
|
|
774
|
+
checkPermission: {
|
|
775
|
+
src: "checkPermission";
|
|
776
|
+
logic: xstate130.PromiseActorLogic<PermissionResult, void, xstate130.EventObject>;
|
|
777
|
+
id: string | undefined;
|
|
778
|
+
};
|
|
779
|
+
initCamera: {
|
|
780
|
+
src: "initCamera";
|
|
781
|
+
logic: xstate130.PromiseActorLogic<MediaStream, void, xstate130.EventObject>;
|
|
782
|
+
id: string | undefined;
|
|
783
|
+
};
|
|
784
|
+
finalizeDocumentRequest: {
|
|
785
|
+
src: "finalizeDocumentRequest";
|
|
786
|
+
logic: xstate130.PromiseActorLogic<FinalizeDocumentResponse, {
|
|
787
|
+
processingType: string;
|
|
788
|
+
}, xstate130.EventObject>;
|
|
789
|
+
id: string | undefined;
|
|
790
|
+
};
|
|
791
|
+
}>, never, never, never, never>;
|
|
792
|
+
}];
|
|
793
|
+
readonly onError: {
|
|
794
|
+
readonly target: "waitingForUser";
|
|
795
|
+
readonly actions: xstate130.ActionFunction<DocumentCaptureContext, xstate130.ErrorActorEvent<unknown, string>, {
|
|
796
|
+
type: "CAPTURE";
|
|
797
|
+
} | {
|
|
798
|
+
type: "FILE_SELECTED";
|
|
799
|
+
file: File;
|
|
800
|
+
imageBase64: string;
|
|
801
|
+
fileType: string;
|
|
802
|
+
} | {
|
|
803
|
+
type: "ACCEPT";
|
|
804
|
+
} | {
|
|
805
|
+
type: "RETAKE";
|
|
806
|
+
} | {
|
|
807
|
+
type: "UPLOAD_PROGRESS";
|
|
808
|
+
progress: number;
|
|
809
|
+
} | {
|
|
810
|
+
type: "RETRY";
|
|
811
|
+
} | {
|
|
812
|
+
type: "CONTINUE";
|
|
813
|
+
} | {
|
|
814
|
+
type: "NEXT_PAGE_CAMERA";
|
|
815
|
+
} | {
|
|
816
|
+
type: "NEXT_PAGE_PHOTO_LIBRARY";
|
|
817
|
+
} | {
|
|
818
|
+
type: "ALL_PAGES_CAPTURED";
|
|
819
|
+
} | {
|
|
820
|
+
type: "SKIP";
|
|
821
|
+
} | {
|
|
822
|
+
type: "REQUEST_PERMISSION";
|
|
823
|
+
} | {
|
|
824
|
+
type: "GO_TO_LEARN_MORE";
|
|
825
|
+
} | {
|
|
826
|
+
type: "BACK";
|
|
827
|
+
} | {
|
|
828
|
+
type: "CLOSE";
|
|
829
|
+
}, undefined, xstate130.Values<{
|
|
830
|
+
uploadDocument: {
|
|
831
|
+
src: "uploadDocument";
|
|
832
|
+
logic: xstate130.PromiseActorLogic<DocumentUploadResponse, {
|
|
833
|
+
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
834
|
+
processingType: string;
|
|
835
|
+
onProgress: (progress: number) => void;
|
|
836
|
+
}, xstate130.EventObject>;
|
|
837
|
+
id: string | undefined;
|
|
838
|
+
};
|
|
839
|
+
requestPermission: {
|
|
840
|
+
src: "requestPermission";
|
|
841
|
+
logic: xstate130.PromiseActorLogic<PermissionResult, {
|
|
842
|
+
permissionResult?: PermissionResult;
|
|
843
|
+
requestMotionPermission: boolean;
|
|
844
|
+
}, xstate130.EventObject>;
|
|
845
|
+
id: string | undefined;
|
|
846
|
+
};
|
|
847
|
+
checkPermission: {
|
|
848
|
+
src: "checkPermission";
|
|
849
|
+
logic: xstate130.PromiseActorLogic<PermissionResult, void, xstate130.EventObject>;
|
|
850
|
+
id: string | undefined;
|
|
851
|
+
};
|
|
852
|
+
initCamera: {
|
|
853
|
+
src: "initCamera";
|
|
854
|
+
logic: xstate130.PromiseActorLogic<MediaStream, void, xstate130.EventObject>;
|
|
855
|
+
id: string | undefined;
|
|
856
|
+
};
|
|
857
|
+
finalizeDocumentRequest: {
|
|
858
|
+
src: "finalizeDocumentRequest";
|
|
859
|
+
logic: xstate130.PromiseActorLogic<FinalizeDocumentResponse, {
|
|
860
|
+
processingType: string;
|
|
861
|
+
}, xstate130.EventObject>;
|
|
862
|
+
id: string | undefined;
|
|
863
|
+
};
|
|
864
|
+
}>, never, never, never, never>;
|
|
865
|
+
};
|
|
866
|
+
};
|
|
867
|
+
readonly on: {
|
|
868
|
+
readonly REQUEST_PERMISSION: "requesting";
|
|
869
|
+
readonly GO_TO_LEARN_MORE: "learnMore";
|
|
870
|
+
};
|
|
871
|
+
};
|
|
872
|
+
readonly waitingForUser: {
|
|
873
|
+
readonly on: {
|
|
874
|
+
readonly REQUEST_PERMISSION: "requesting";
|
|
875
|
+
readonly GO_TO_LEARN_MORE: "learnMore";
|
|
876
|
+
};
|
|
877
|
+
};
|
|
878
|
+
readonly learnMore: {
|
|
879
|
+
readonly on: {
|
|
880
|
+
readonly BACK: "idle";
|
|
881
|
+
readonly REQUEST_PERMISSION: "requesting";
|
|
882
|
+
};
|
|
883
|
+
};
|
|
884
|
+
readonly requesting: {
|
|
885
|
+
readonly invoke: {
|
|
886
|
+
readonly id: "requestPermission";
|
|
887
|
+
readonly src: "requestPermission";
|
|
888
|
+
readonly input: ({
|
|
889
|
+
context
|
|
890
|
+
}: {
|
|
891
|
+
context: DocumentCaptureContext;
|
|
892
|
+
event: {
|
|
893
|
+
type: "CAPTURE";
|
|
894
|
+
} | {
|
|
895
|
+
type: "FILE_SELECTED";
|
|
896
|
+
file: File;
|
|
897
|
+
imageBase64: string;
|
|
898
|
+
fileType: string;
|
|
899
|
+
} | {
|
|
900
|
+
type: "ACCEPT";
|
|
901
|
+
} | {
|
|
902
|
+
type: "RETAKE";
|
|
903
|
+
} | {
|
|
904
|
+
type: "UPLOAD_PROGRESS";
|
|
905
|
+
progress: number;
|
|
906
|
+
} | {
|
|
907
|
+
type: "RETRY";
|
|
908
|
+
} | {
|
|
909
|
+
type: "CONTINUE";
|
|
910
|
+
} | {
|
|
911
|
+
type: "NEXT_PAGE_CAMERA";
|
|
912
|
+
} | {
|
|
913
|
+
type: "NEXT_PAGE_PHOTO_LIBRARY";
|
|
914
|
+
} | {
|
|
915
|
+
type: "ALL_PAGES_CAPTURED";
|
|
916
|
+
} | {
|
|
917
|
+
type: "SKIP";
|
|
918
|
+
} | {
|
|
919
|
+
type: "REQUEST_PERMISSION";
|
|
920
|
+
} | {
|
|
921
|
+
type: "GO_TO_LEARN_MORE";
|
|
922
|
+
} | {
|
|
923
|
+
type: "BACK";
|
|
924
|
+
} | {
|
|
925
|
+
type: "CLOSE";
|
|
926
|
+
};
|
|
927
|
+
self: xstate130.ActorRef<xstate130.MachineSnapshot<DocumentCaptureContext, {
|
|
928
|
+
type: "CAPTURE";
|
|
929
|
+
} | {
|
|
930
|
+
type: "FILE_SELECTED";
|
|
931
|
+
file: File;
|
|
932
|
+
imageBase64: string;
|
|
933
|
+
fileType: string;
|
|
934
|
+
} | {
|
|
935
|
+
type: "ACCEPT";
|
|
936
|
+
} | {
|
|
937
|
+
type: "RETAKE";
|
|
938
|
+
} | {
|
|
939
|
+
type: "UPLOAD_PROGRESS";
|
|
940
|
+
progress: number;
|
|
941
|
+
} | {
|
|
942
|
+
type: "RETRY";
|
|
943
|
+
} | {
|
|
944
|
+
type: "CONTINUE";
|
|
945
|
+
} | {
|
|
946
|
+
type: "NEXT_PAGE_CAMERA";
|
|
947
|
+
} | {
|
|
948
|
+
type: "NEXT_PAGE_PHOTO_LIBRARY";
|
|
949
|
+
} | {
|
|
950
|
+
type: "ALL_PAGES_CAPTURED";
|
|
951
|
+
} | {
|
|
952
|
+
type: "SKIP";
|
|
953
|
+
} | {
|
|
954
|
+
type: "REQUEST_PERMISSION";
|
|
955
|
+
} | {
|
|
956
|
+
type: "GO_TO_LEARN_MORE";
|
|
957
|
+
} | {
|
|
958
|
+
type: "BACK";
|
|
959
|
+
} | {
|
|
960
|
+
type: "CLOSE";
|
|
961
|
+
}, Record<string, xstate130.AnyActorRef>, xstate130.StateValue, string, unknown, any, any>, {
|
|
962
|
+
type: "CAPTURE";
|
|
963
|
+
} | {
|
|
964
|
+
type: "FILE_SELECTED";
|
|
965
|
+
file: File;
|
|
966
|
+
imageBase64: string;
|
|
967
|
+
fileType: string;
|
|
968
|
+
} | {
|
|
969
|
+
type: "ACCEPT";
|
|
970
|
+
} | {
|
|
971
|
+
type: "RETAKE";
|
|
972
|
+
} | {
|
|
973
|
+
type: "UPLOAD_PROGRESS";
|
|
974
|
+
progress: number;
|
|
975
|
+
} | {
|
|
976
|
+
type: "RETRY";
|
|
977
|
+
} | {
|
|
978
|
+
type: "CONTINUE";
|
|
979
|
+
} | {
|
|
980
|
+
type: "NEXT_PAGE_CAMERA";
|
|
981
|
+
} | {
|
|
982
|
+
type: "NEXT_PAGE_PHOTO_LIBRARY";
|
|
983
|
+
} | {
|
|
984
|
+
type: "ALL_PAGES_CAPTURED";
|
|
985
|
+
} | {
|
|
986
|
+
type: "SKIP";
|
|
987
|
+
} | {
|
|
988
|
+
type: "REQUEST_PERMISSION";
|
|
989
|
+
} | {
|
|
990
|
+
type: "GO_TO_LEARN_MORE";
|
|
991
|
+
} | {
|
|
992
|
+
type: "BACK";
|
|
993
|
+
} | {
|
|
994
|
+
type: "CLOSE";
|
|
995
|
+
}, xstate130.AnyEventObject>;
|
|
996
|
+
}) => {
|
|
997
|
+
permissionResult: PermissionResult | undefined;
|
|
998
|
+
requestMotionPermission: false;
|
|
999
|
+
};
|
|
1000
|
+
readonly onDone: readonly [{
|
|
1001
|
+
readonly target: "#documentCapture.initCamera";
|
|
1002
|
+
readonly guard: "isCameraPermissionGranted";
|
|
1003
|
+
readonly actions: xstate130.ActionFunction<DocumentCaptureContext, xstate130.DoneActorEvent<PermissionResult, string>, {
|
|
1004
|
+
type: "CAPTURE";
|
|
1005
|
+
} | {
|
|
1006
|
+
type: "FILE_SELECTED";
|
|
1007
|
+
file: File;
|
|
1008
|
+
imageBase64: string;
|
|
1009
|
+
fileType: string;
|
|
1010
|
+
} | {
|
|
1011
|
+
type: "ACCEPT";
|
|
1012
|
+
} | {
|
|
1013
|
+
type: "RETAKE";
|
|
1014
|
+
} | {
|
|
1015
|
+
type: "UPLOAD_PROGRESS";
|
|
1016
|
+
progress: number;
|
|
1017
|
+
} | {
|
|
1018
|
+
type: "RETRY";
|
|
1019
|
+
} | {
|
|
1020
|
+
type: "CONTINUE";
|
|
1021
|
+
} | {
|
|
1022
|
+
type: "NEXT_PAGE_CAMERA";
|
|
1023
|
+
} | {
|
|
1024
|
+
type: "NEXT_PAGE_PHOTO_LIBRARY";
|
|
1025
|
+
} | {
|
|
1026
|
+
type: "ALL_PAGES_CAPTURED";
|
|
1027
|
+
} | {
|
|
1028
|
+
type: "SKIP";
|
|
1029
|
+
} | {
|
|
1030
|
+
type: "REQUEST_PERMISSION";
|
|
1031
|
+
} | {
|
|
1032
|
+
type: "GO_TO_LEARN_MORE";
|
|
1033
|
+
} | {
|
|
1034
|
+
type: "BACK";
|
|
1035
|
+
} | {
|
|
1036
|
+
type: "CLOSE";
|
|
1037
|
+
}, undefined, xstate130.Values<{
|
|
1038
|
+
uploadDocument: {
|
|
1039
|
+
src: "uploadDocument";
|
|
1040
|
+
logic: xstate130.PromiseActorLogic<DocumentUploadResponse, {
|
|
1041
|
+
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
1042
|
+
processingType: string;
|
|
1043
|
+
onProgress: (progress: number) => void;
|
|
1044
|
+
}, xstate130.EventObject>;
|
|
1045
|
+
id: string | undefined;
|
|
1046
|
+
};
|
|
1047
|
+
requestPermission: {
|
|
1048
|
+
src: "requestPermission";
|
|
1049
|
+
logic: xstate130.PromiseActorLogic<PermissionResult, {
|
|
1050
|
+
permissionResult?: PermissionResult;
|
|
1051
|
+
requestMotionPermission: boolean;
|
|
1052
|
+
}, xstate130.EventObject>;
|
|
1053
|
+
id: string | undefined;
|
|
1054
|
+
};
|
|
1055
|
+
checkPermission: {
|
|
1056
|
+
src: "checkPermission";
|
|
1057
|
+
logic: xstate130.PromiseActorLogic<PermissionResult, void, xstate130.EventObject>;
|
|
1058
|
+
id: string | undefined;
|
|
1059
|
+
};
|
|
1060
|
+
initCamera: {
|
|
1061
|
+
src: "initCamera";
|
|
1062
|
+
logic: xstate130.PromiseActorLogic<MediaStream, void, xstate130.EventObject>;
|
|
1063
|
+
id: string | undefined;
|
|
1064
|
+
};
|
|
1065
|
+
finalizeDocumentRequest: {
|
|
1066
|
+
src: "finalizeDocumentRequest";
|
|
1067
|
+
logic: xstate130.PromiseActorLogic<FinalizeDocumentResponse, {
|
|
1068
|
+
processingType: string;
|
|
1069
|
+
}, xstate130.EventObject>;
|
|
1070
|
+
id: string | undefined;
|
|
1071
|
+
};
|
|
1072
|
+
}>, never, never, never, never>;
|
|
1073
|
+
}, {
|
|
1074
|
+
readonly target: "denied";
|
|
1075
|
+
readonly guard: "isCameraPermissionDenied";
|
|
1076
|
+
readonly actions: xstate130.ActionFunction<DocumentCaptureContext, xstate130.DoneActorEvent<PermissionResult, string>, {
|
|
1077
|
+
type: "CAPTURE";
|
|
1078
|
+
} | {
|
|
1079
|
+
type: "FILE_SELECTED";
|
|
1080
|
+
file: File;
|
|
1081
|
+
imageBase64: string;
|
|
1082
|
+
fileType: string;
|
|
1083
|
+
} | {
|
|
1084
|
+
type: "ACCEPT";
|
|
1085
|
+
} | {
|
|
1086
|
+
type: "RETAKE";
|
|
1087
|
+
} | {
|
|
1088
|
+
type: "UPLOAD_PROGRESS";
|
|
1089
|
+
progress: number;
|
|
1090
|
+
} | {
|
|
1091
|
+
type: "RETRY";
|
|
1092
|
+
} | {
|
|
1093
|
+
type: "CONTINUE";
|
|
1094
|
+
} | {
|
|
1095
|
+
type: "NEXT_PAGE_CAMERA";
|
|
1096
|
+
} | {
|
|
1097
|
+
type: "NEXT_PAGE_PHOTO_LIBRARY";
|
|
1098
|
+
} | {
|
|
1099
|
+
type: "ALL_PAGES_CAPTURED";
|
|
1100
|
+
} | {
|
|
1101
|
+
type: "SKIP";
|
|
1102
|
+
} | {
|
|
1103
|
+
type: "REQUEST_PERMISSION";
|
|
1104
|
+
} | {
|
|
1105
|
+
type: "GO_TO_LEARN_MORE";
|
|
1106
|
+
} | {
|
|
1107
|
+
type: "BACK";
|
|
1108
|
+
} | {
|
|
1109
|
+
type: "CLOSE";
|
|
1110
|
+
}, undefined, xstate130.Values<{
|
|
1111
|
+
uploadDocument: {
|
|
1112
|
+
src: "uploadDocument";
|
|
1113
|
+
logic: xstate130.PromiseActorLogic<DocumentUploadResponse, {
|
|
1114
|
+
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
1115
|
+
processingType: string;
|
|
1116
|
+
onProgress: (progress: number) => void;
|
|
1117
|
+
}, xstate130.EventObject>;
|
|
1118
|
+
id: string | undefined;
|
|
1119
|
+
};
|
|
1120
|
+
requestPermission: {
|
|
1121
|
+
src: "requestPermission";
|
|
1122
|
+
logic: xstate130.PromiseActorLogic<PermissionResult, {
|
|
1123
|
+
permissionResult?: PermissionResult;
|
|
1124
|
+
requestMotionPermission: boolean;
|
|
1125
|
+
}, xstate130.EventObject>;
|
|
1126
|
+
id: string | undefined;
|
|
1127
|
+
};
|
|
1128
|
+
checkPermission: {
|
|
1129
|
+
src: "checkPermission";
|
|
1130
|
+
logic: xstate130.PromiseActorLogic<PermissionResult, void, xstate130.EventObject>;
|
|
1131
|
+
id: string | undefined;
|
|
1132
|
+
};
|
|
1133
|
+
initCamera: {
|
|
1134
|
+
src: "initCamera";
|
|
1135
|
+
logic: xstate130.PromiseActorLogic<MediaStream, void, xstate130.EventObject>;
|
|
1136
|
+
id: string | undefined;
|
|
1137
|
+
};
|
|
1138
|
+
finalizeDocumentRequest: {
|
|
1139
|
+
src: "finalizeDocumentRequest";
|
|
1140
|
+
logic: xstate130.PromiseActorLogic<FinalizeDocumentResponse, {
|
|
1141
|
+
processingType: string;
|
|
1142
|
+
}, xstate130.EventObject>;
|
|
1143
|
+
id: string | undefined;
|
|
1144
|
+
};
|
|
1145
|
+
}>, never, never, never, never>;
|
|
1146
|
+
}, {
|
|
1147
|
+
readonly target: "waitingForUser";
|
|
1148
|
+
readonly actions: xstate130.ActionFunction<DocumentCaptureContext, xstate130.DoneActorEvent<PermissionResult, string>, {
|
|
1149
|
+
type: "CAPTURE";
|
|
1150
|
+
} | {
|
|
1151
|
+
type: "FILE_SELECTED";
|
|
1152
|
+
file: File;
|
|
1153
|
+
imageBase64: string;
|
|
1154
|
+
fileType: string;
|
|
1155
|
+
} | {
|
|
1156
|
+
type: "ACCEPT";
|
|
1157
|
+
} | {
|
|
1158
|
+
type: "RETAKE";
|
|
1159
|
+
} | {
|
|
1160
|
+
type: "UPLOAD_PROGRESS";
|
|
1161
|
+
progress: number;
|
|
1162
|
+
} | {
|
|
1163
|
+
type: "RETRY";
|
|
1164
|
+
} | {
|
|
1165
|
+
type: "CONTINUE";
|
|
1166
|
+
} | {
|
|
1167
|
+
type: "NEXT_PAGE_CAMERA";
|
|
1168
|
+
} | {
|
|
1169
|
+
type: "NEXT_PAGE_PHOTO_LIBRARY";
|
|
1170
|
+
} | {
|
|
1171
|
+
type: "ALL_PAGES_CAPTURED";
|
|
1172
|
+
} | {
|
|
1173
|
+
type: "SKIP";
|
|
1174
|
+
} | {
|
|
1175
|
+
type: "REQUEST_PERMISSION";
|
|
1176
|
+
} | {
|
|
1177
|
+
type: "GO_TO_LEARN_MORE";
|
|
1178
|
+
} | {
|
|
1179
|
+
type: "BACK";
|
|
1180
|
+
} | {
|
|
1181
|
+
type: "CLOSE";
|
|
1182
|
+
}, undefined, xstate130.Values<{
|
|
1183
|
+
uploadDocument: {
|
|
1184
|
+
src: "uploadDocument";
|
|
1185
|
+
logic: xstate130.PromiseActorLogic<DocumentUploadResponse, {
|
|
1186
|
+
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
1187
|
+
processingType: string;
|
|
1188
|
+
onProgress: (progress: number) => void;
|
|
1189
|
+
}, xstate130.EventObject>;
|
|
1190
|
+
id: string | undefined;
|
|
1191
|
+
};
|
|
1192
|
+
requestPermission: {
|
|
1193
|
+
src: "requestPermission";
|
|
1194
|
+
logic: xstate130.PromiseActorLogic<PermissionResult, {
|
|
1195
|
+
permissionResult?: PermissionResult;
|
|
1196
|
+
requestMotionPermission: boolean;
|
|
1197
|
+
}, xstate130.EventObject>;
|
|
1198
|
+
id: string | undefined;
|
|
1199
|
+
};
|
|
1200
|
+
checkPermission: {
|
|
1201
|
+
src: "checkPermission";
|
|
1202
|
+
logic: xstate130.PromiseActorLogic<PermissionResult, void, xstate130.EventObject>;
|
|
1203
|
+
id: string | undefined;
|
|
1204
|
+
};
|
|
1205
|
+
initCamera: {
|
|
1206
|
+
src: "initCamera";
|
|
1207
|
+
logic: xstate130.PromiseActorLogic<MediaStream, void, xstate130.EventObject>;
|
|
1208
|
+
id: string | undefined;
|
|
1209
|
+
};
|
|
1210
|
+
finalizeDocumentRequest: {
|
|
1211
|
+
src: "finalizeDocumentRequest";
|
|
1212
|
+
logic: xstate130.PromiseActorLogic<FinalizeDocumentResponse, {
|
|
1213
|
+
processingType: string;
|
|
1214
|
+
}, xstate130.EventObject>;
|
|
1215
|
+
id: string | undefined;
|
|
1216
|
+
};
|
|
1217
|
+
}>, never, never, never, never>;
|
|
1218
|
+
}];
|
|
1219
|
+
readonly onError: {
|
|
1220
|
+
readonly target: "denied";
|
|
1221
|
+
};
|
|
1222
|
+
};
|
|
1223
|
+
};
|
|
1224
|
+
readonly denied: {
|
|
1225
|
+
readonly entry: xstate130.ActionFunction<DocumentCaptureContext, {
|
|
1226
|
+
type: "CAPTURE";
|
|
1227
|
+
} | {
|
|
1228
|
+
type: "FILE_SELECTED";
|
|
1229
|
+
file: File;
|
|
1230
|
+
imageBase64: string;
|
|
1231
|
+
fileType: string;
|
|
1232
|
+
} | {
|
|
1233
|
+
type: "ACCEPT";
|
|
1234
|
+
} | {
|
|
1235
|
+
type: "RETAKE";
|
|
1236
|
+
} | {
|
|
1237
|
+
type: "UPLOAD_PROGRESS";
|
|
1238
|
+
progress: number;
|
|
1239
|
+
} | {
|
|
1240
|
+
type: "RETRY";
|
|
1241
|
+
} | {
|
|
1242
|
+
type: "CONTINUE";
|
|
1243
|
+
} | {
|
|
1244
|
+
type: "NEXT_PAGE_CAMERA";
|
|
1245
|
+
} | {
|
|
1246
|
+
type: "NEXT_PAGE_PHOTO_LIBRARY";
|
|
1247
|
+
} | {
|
|
1248
|
+
type: "ALL_PAGES_CAPTURED";
|
|
1249
|
+
} | {
|
|
1250
|
+
type: "SKIP";
|
|
1251
|
+
} | {
|
|
1252
|
+
type: "REQUEST_PERMISSION";
|
|
1253
|
+
} | {
|
|
1254
|
+
type: "GO_TO_LEARN_MORE";
|
|
1255
|
+
} | {
|
|
1256
|
+
type: "BACK";
|
|
1257
|
+
} | {
|
|
1258
|
+
type: "CLOSE";
|
|
1259
|
+
}, {
|
|
1260
|
+
type: "CAPTURE";
|
|
1261
|
+
} | {
|
|
1262
|
+
type: "FILE_SELECTED";
|
|
1263
|
+
file: File;
|
|
1264
|
+
imageBase64: string;
|
|
1265
|
+
fileType: string;
|
|
1266
|
+
} | {
|
|
1267
|
+
type: "ACCEPT";
|
|
1268
|
+
} | {
|
|
1269
|
+
type: "RETAKE";
|
|
1270
|
+
} | {
|
|
1271
|
+
type: "UPLOAD_PROGRESS";
|
|
1272
|
+
progress: number;
|
|
1273
|
+
} | {
|
|
1274
|
+
type: "RETRY";
|
|
1275
|
+
} | {
|
|
1276
|
+
type: "CONTINUE";
|
|
1277
|
+
} | {
|
|
1278
|
+
type: "NEXT_PAGE_CAMERA";
|
|
1279
|
+
} | {
|
|
1280
|
+
type: "NEXT_PAGE_PHOTO_LIBRARY";
|
|
1281
|
+
} | {
|
|
1282
|
+
type: "ALL_PAGES_CAPTURED";
|
|
1283
|
+
} | {
|
|
1284
|
+
type: "SKIP";
|
|
1285
|
+
} | {
|
|
1286
|
+
type: "REQUEST_PERMISSION";
|
|
1287
|
+
} | {
|
|
1288
|
+
type: "GO_TO_LEARN_MORE";
|
|
1289
|
+
} | {
|
|
1290
|
+
type: "BACK";
|
|
1291
|
+
} | {
|
|
1292
|
+
type: "CLOSE";
|
|
1293
|
+
}, undefined, xstate130.Values<{
|
|
1294
|
+
uploadDocument: {
|
|
1295
|
+
src: "uploadDocument";
|
|
1296
|
+
logic: xstate130.PromiseActorLogic<DocumentUploadResponse, {
|
|
1297
|
+
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
1298
|
+
processingType: string;
|
|
1299
|
+
onProgress: (progress: number) => void;
|
|
1300
|
+
}, xstate130.EventObject>;
|
|
1301
|
+
id: string | undefined;
|
|
1302
|
+
};
|
|
1303
|
+
requestPermission: {
|
|
1304
|
+
src: "requestPermission";
|
|
1305
|
+
logic: xstate130.PromiseActorLogic<PermissionResult, {
|
|
1306
|
+
permissionResult?: PermissionResult;
|
|
1307
|
+
requestMotionPermission: boolean;
|
|
1308
|
+
}, xstate130.EventObject>;
|
|
1309
|
+
id: string | undefined;
|
|
1310
|
+
};
|
|
1311
|
+
checkPermission: {
|
|
1312
|
+
src: "checkPermission";
|
|
1313
|
+
logic: xstate130.PromiseActorLogic<PermissionResult, void, xstate130.EventObject>;
|
|
1314
|
+
id: string | undefined;
|
|
1315
|
+
};
|
|
1316
|
+
initCamera: {
|
|
1317
|
+
src: "initCamera";
|
|
1318
|
+
logic: xstate130.PromiseActorLogic<MediaStream, void, xstate130.EventObject>;
|
|
1319
|
+
id: string | undefined;
|
|
1320
|
+
};
|
|
1321
|
+
finalizeDocumentRequest: {
|
|
1322
|
+
src: "finalizeDocumentRequest";
|
|
1323
|
+
logic: xstate130.PromiseActorLogic<FinalizeDocumentResponse, {
|
|
1324
|
+
processingType: string;
|
|
1325
|
+
}, xstate130.EventObject>;
|
|
1326
|
+
id: string | undefined;
|
|
1327
|
+
};
|
|
1328
|
+
}>, never, never, never, never>;
|
|
1329
|
+
};
|
|
1330
|
+
};
|
|
1331
|
+
readonly on: {
|
|
1332
|
+
readonly CLOSE: {
|
|
1333
|
+
readonly target: "closed";
|
|
1334
|
+
};
|
|
1335
|
+
};
|
|
1336
|
+
};
|
|
471
1337
|
readonly initCamera: {
|
|
472
1338
|
readonly invoke: {
|
|
473
1339
|
readonly id: "initCamera";
|
|
@@ -567,10 +1433,16 @@ declare const documentCaptureMachine: xstate763.StateMachine<DocumentCaptureCont
|
|
|
567
1433
|
type: "ALL_PAGES_CAPTURED";
|
|
568
1434
|
} | {
|
|
569
1435
|
type: "SKIP";
|
|
1436
|
+
} | {
|
|
1437
|
+
type: "REQUEST_PERMISSION";
|
|
1438
|
+
} | {
|
|
1439
|
+
type: "GO_TO_LEARN_MORE";
|
|
1440
|
+
} | {
|
|
1441
|
+
type: "BACK";
|
|
570
1442
|
} | {
|
|
571
1443
|
type: "CLOSE";
|
|
572
1444
|
};
|
|
573
|
-
self:
|
|
1445
|
+
self: xstate130.ActorRef<xstate130.MachineSnapshot<DocumentCaptureContext, {
|
|
574
1446
|
type: "CAPTURE";
|
|
575
1447
|
} | {
|
|
576
1448
|
type: "FILE_SELECTED";
|
|
@@ -596,9 +1468,15 @@ declare const documentCaptureMachine: xstate763.StateMachine<DocumentCaptureCont
|
|
|
596
1468
|
type: "ALL_PAGES_CAPTURED";
|
|
597
1469
|
} | {
|
|
598
1470
|
type: "SKIP";
|
|
1471
|
+
} | {
|
|
1472
|
+
type: "REQUEST_PERMISSION";
|
|
1473
|
+
} | {
|
|
1474
|
+
type: "GO_TO_LEARN_MORE";
|
|
1475
|
+
} | {
|
|
1476
|
+
type: "BACK";
|
|
599
1477
|
} | {
|
|
600
1478
|
type: "CLOSE";
|
|
601
|
-
}, Record<string,
|
|
1479
|
+
}, Record<string, xstate130.AnyActorRef>, xstate130.StateValue, string, unknown, any, any>, {
|
|
602
1480
|
type: "CAPTURE";
|
|
603
1481
|
} | {
|
|
604
1482
|
type: "FILE_SELECTED";
|
|
@@ -624,9 +1502,15 @@ declare const documentCaptureMachine: xstate763.StateMachine<DocumentCaptureCont
|
|
|
624
1502
|
type: "ALL_PAGES_CAPTURED";
|
|
625
1503
|
} | {
|
|
626
1504
|
type: "SKIP";
|
|
1505
|
+
} | {
|
|
1506
|
+
type: "REQUEST_PERMISSION";
|
|
1507
|
+
} | {
|
|
1508
|
+
type: "GO_TO_LEARN_MORE";
|
|
1509
|
+
} | {
|
|
1510
|
+
type: "BACK";
|
|
627
1511
|
} | {
|
|
628
1512
|
type: "CLOSE";
|
|
629
|
-
},
|
|
1513
|
+
}, xstate130.AnyEventObject>;
|
|
630
1514
|
}) => {
|
|
631
1515
|
capturedDocument: CapturedDocument;
|
|
632
1516
|
processingType: DocumentType;
|
|
@@ -666,7 +1550,7 @@ declare const documentCaptureMachine: xstate763.StateMachine<DocumentCaptureCont
|
|
|
666
1550
|
readonly nextPage: {
|
|
667
1551
|
readonly on: {
|
|
668
1552
|
readonly NEXT_PAGE_CAMERA: {
|
|
669
|
-
readonly target: "
|
|
1553
|
+
readonly target: "permissions";
|
|
670
1554
|
readonly actions: readonly ["clearForNextPage", "setCaptureMethodCamera"];
|
|
671
1555
|
};
|
|
672
1556
|
readonly NEXT_PAGE_PHOTO_LIBRARY: {
|
|
@@ -718,10 +1602,16 @@ declare const documentCaptureMachine: xstate763.StateMachine<DocumentCaptureCont
|
|
|
718
1602
|
type: "ALL_PAGES_CAPTURED";
|
|
719
1603
|
} | {
|
|
720
1604
|
type: "SKIP";
|
|
1605
|
+
} | {
|
|
1606
|
+
type: "REQUEST_PERMISSION";
|
|
1607
|
+
} | {
|
|
1608
|
+
type: "GO_TO_LEARN_MORE";
|
|
1609
|
+
} | {
|
|
1610
|
+
type: "BACK";
|
|
721
1611
|
} | {
|
|
722
1612
|
type: "CLOSE";
|
|
723
1613
|
};
|
|
724
|
-
self:
|
|
1614
|
+
self: xstate130.ActorRef<xstate130.MachineSnapshot<DocumentCaptureContext, {
|
|
725
1615
|
type: "CAPTURE";
|
|
726
1616
|
} | {
|
|
727
1617
|
type: "FILE_SELECTED";
|
|
@@ -747,9 +1637,15 @@ declare const documentCaptureMachine: xstate763.StateMachine<DocumentCaptureCont
|
|
|
747
1637
|
type: "ALL_PAGES_CAPTURED";
|
|
748
1638
|
} | {
|
|
749
1639
|
type: "SKIP";
|
|
1640
|
+
} | {
|
|
1641
|
+
type: "REQUEST_PERMISSION";
|
|
1642
|
+
} | {
|
|
1643
|
+
type: "GO_TO_LEARN_MORE";
|
|
1644
|
+
} | {
|
|
1645
|
+
type: "BACK";
|
|
750
1646
|
} | {
|
|
751
1647
|
type: "CLOSE";
|
|
752
|
-
}, Record<string,
|
|
1648
|
+
}, Record<string, xstate130.AnyActorRef>, xstate130.StateValue, string, unknown, any, any>, {
|
|
753
1649
|
type: "CAPTURE";
|
|
754
1650
|
} | {
|
|
755
1651
|
type: "FILE_SELECTED";
|
|
@@ -775,9 +1671,15 @@ declare const documentCaptureMachine: xstate763.StateMachine<DocumentCaptureCont
|
|
|
775
1671
|
type: "ALL_PAGES_CAPTURED";
|
|
776
1672
|
} | {
|
|
777
1673
|
type: "SKIP";
|
|
1674
|
+
} | {
|
|
1675
|
+
type: "REQUEST_PERMISSION";
|
|
1676
|
+
} | {
|
|
1677
|
+
type: "GO_TO_LEARN_MORE";
|
|
1678
|
+
} | {
|
|
1679
|
+
type: "BACK";
|
|
778
1680
|
} | {
|
|
779
1681
|
type: "CLOSE";
|
|
780
|
-
},
|
|
1682
|
+
}, xstate130.AnyEventObject>;
|
|
781
1683
|
}) => {
|
|
782
1684
|
processingType: DocumentType;
|
|
783
1685
|
};
|
|
@@ -832,6 +1734,10 @@ type DocumentCaptureTutorialState = {
|
|
|
832
1734
|
error: DocumentCaptureErrorCode | undefined;
|
|
833
1735
|
pageNumber: number;
|
|
834
1736
|
};
|
|
1737
|
+
type DocumentCapturePermissionsState = {
|
|
1738
|
+
status: 'permissions';
|
|
1739
|
+
permissionStatus: PermissionStatus;
|
|
1740
|
+
};
|
|
835
1741
|
type DocumentCaptureInitializingCameraState = {
|
|
836
1742
|
status: 'initializingCamera';
|
|
837
1743
|
};
|
|
@@ -887,7 +1793,7 @@ type DocumentCaptureNextPageState = {
|
|
|
887
1793
|
type DocumentCaptureFinalizingState = {
|
|
888
1794
|
status: 'finalizing';
|
|
889
1795
|
};
|
|
890
|
-
type DocumentCaptureState = DocumentCaptureTutorialState | DocumentCaptureInitializingCameraState | DocumentCaptureCapturingState | DocumentCapturePreviewState | DocumentCaptureUploadingState | DocumentCaptureSuccessState | DocumentCaptureFailureState | DocumentCaptureFinishedState | DocumentCaptureClosedState | DocumentCaptureNextPageState | DocumentCaptureFinalizingState;
|
|
1796
|
+
type DocumentCaptureState = DocumentCaptureTutorialState | DocumentCapturePermissionsState | DocumentCaptureInitializingCameraState | DocumentCaptureCapturingState | DocumentCapturePreviewState | DocumentCaptureUploadingState | DocumentCaptureSuccessState | DocumentCaptureFailureState | DocumentCaptureFinishedState | DocumentCaptureClosedState | DocumentCaptureNextPageState | DocumentCaptureFinalizingState;
|
|
891
1797
|
declare function createDocumentCaptureManager(options: CreateDocumentCaptureActorOptions): Manager<DocumentCaptureState> & {
|
|
892
1798
|
capture(): void;
|
|
893
1799
|
setFile(file: File, imageBase64: string): void;
|
|
@@ -897,6 +1803,9 @@ declare function createDocumentCaptureManager(options: CreateDocumentCaptureActo
|
|
|
897
1803
|
continue(): void;
|
|
898
1804
|
skip(): void;
|
|
899
1805
|
close(): void;
|
|
1806
|
+
requestPermission(): void;
|
|
1807
|
+
goToLearnMore(): void;
|
|
1808
|
+
back(): void;
|
|
900
1809
|
captureNextPageFromCamera(): void;
|
|
901
1810
|
captureNextPageFromFile(): void;
|
|
902
1811
|
finishPageCapture(): void;
|