@incodetech/core 0.0.0-dev-20260320-80a2d6d → 0.0.0-dev-20260323-4991693
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/{addressSearch-BpdtojH_.esm.js → addressSearch-IJq48WDV.esm.js} +2 -2
- package/dist/authentication.esm.js +7 -7
- package/dist/{authenticationManager-Yjdutfo0.esm.js → authenticationManager-DACsi9Bs.esm.js} +4 -10
- package/dist/{backCameraStream-DQY36Tsq.esm.js → backCameraStream-THvMPTG_.esm.js} +1 -1
- package/dist/consent.d.ts +53 -58
- package/dist/consent.esm.js +4 -13
- package/dist/curp-validation.esm.js +18 -59
- package/dist/{deepsightLoader-De-U_lRn.esm.js → deepsightLoader-DfXPJe4B.esm.js} +2 -2
- package/dist/{deepsightService-PlHPx0yD.esm.js → deepsightService-DaDUTB6Q.esm.js} +1 -1
- package/dist/document-capture.d.ts +52 -82
- package/dist/document-capture.esm.js +58 -90
- package/dist/document-upload.d.ts +46 -46
- package/dist/document-upload.esm.js +3 -3
- package/dist/ekyb.esm.js +4 -12
- package/dist/ekyc.esm.js +48 -92
- package/dist/email.esm.js +3 -3
- package/dist/{emailManager-B5pmZ3O4.esm.js → emailManager-DPTdyYgi.esm.js} +5 -16
- package/dist/{events-BKOSYNaw.esm.js → events-BfIbM5SS.esm.js} +49 -3
- package/dist/extensibility.esm.js +11 -11
- package/dist/face-match.esm.js +4 -14
- package/dist/{faceCaptureSetup-BQ7cV8vo.esm.js → faceCaptureSetup-CW_ZDHuU.esm.js} +8 -113
- package/dist/flow.esm.js +2 -2
- package/dist/geolocation.esm.js +5 -21
- package/dist/government-validation.esm.js +2 -2
- package/dist/id.esm.js +6 -6
- package/dist/{idCaptureManager-hbqwL7Qt.esm.js → idCaptureManager-Ctn8I9Rf.esm.js} +41 -126
- package/dist/index.esm.js +6 -6
- package/dist/phone.esm.js +3 -3
- package/dist/{phoneManager-CXYPFfUs.esm.js → phoneManager-BzZI460X.esm.js} +5 -16
- package/dist/{streamingEvents-BNVENF4-.esm.js → recordingsRepository-D5Tfsc2D.esm.js} +2 -15
- package/dist/redirect-to-mobile.esm.js +2 -2
- package/dist/selfie.esm.js +7 -7
- package/dist/{selfieManager-DMnrP5LU.esm.js → selfieManager-BXRLyPy4.esm.js} +7 -15
- package/dist/{src-xUbMTjnz.esm.js → src-D9pJSMO5.esm.js} +12 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as Manager } from "./Manager-CVDYGoSq.js";
|
|
2
2
|
import { t as CameraStream } from "./camera-CVBwqx-j.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as xstate67 from "xstate";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/document-capture/types.d.ts
|
|
6
6
|
type DocumentType = 'addressStatement' | 'otherDocument1' | 'otherDocument2' | 'otherDocument3' | 'v5cMultiPageLogbook' | 'circulationCard' | 'financeSettlement' | 'carInvoice' | 'capture' | 'processPoaOcr' | 'processLoaOcr' | 'processAsylumSeekerVisaZaf' | 'processBankStatementOCR' | 'processBankCheck' | 'processV5CLogbook' | 'processCarInvoice' | 'processCirculationCard' | 'processFinanceSettlement';
|
|
@@ -72,7 +72,7 @@ type DocumentCaptureInput = {
|
|
|
72
72
|
};
|
|
73
73
|
//#endregion
|
|
74
74
|
//#region src/modules/document-capture/documentCaptureStateMachine.d.ts
|
|
75
|
-
declare const documentCaptureMachine:
|
|
75
|
+
declare const documentCaptureMachine: xstate67.StateMachine<DocumentCaptureContext, {
|
|
76
76
|
type: "CAPTURE";
|
|
77
77
|
} | {
|
|
78
78
|
type: "FILE_SELECTED";
|
|
@@ -95,108 +95,84 @@ declare const documentCaptureMachine: xstate0.StateMachine<DocumentCaptureContex
|
|
|
95
95
|
} | {
|
|
96
96
|
type: "CLOSE";
|
|
97
97
|
}, {
|
|
98
|
-
[x: string]:
|
|
98
|
+
[x: string]: xstate67.ActorRefFromLogic<xstate67.PromiseActorLogic<MediaStream, void, xstate67.EventObject>> | xstate67.ActorRefFromLogic<xstate67.PromiseActorLogic<DocumentUploadResponse, {
|
|
99
99
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
100
100
|
processingType: string;
|
|
101
101
|
onProgress: (progress: number) => void;
|
|
102
|
-
},
|
|
103
|
-
},
|
|
102
|
+
}, xstate67.EventObject>> | undefined;
|
|
103
|
+
}, xstate67.Values<{
|
|
104
104
|
initCamera: {
|
|
105
105
|
src: "initCamera";
|
|
106
|
-
logic:
|
|
106
|
+
logic: xstate67.PromiseActorLogic<MediaStream, void, xstate67.EventObject>;
|
|
107
107
|
id: string | undefined;
|
|
108
108
|
};
|
|
109
109
|
uploadDocument: {
|
|
110
110
|
src: "uploadDocument";
|
|
111
|
-
logic:
|
|
111
|
+
logic: xstate67.PromiseActorLogic<DocumentUploadResponse, {
|
|
112
112
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
113
113
|
processingType: string;
|
|
114
114
|
onProgress: (progress: number) => void;
|
|
115
|
-
},
|
|
115
|
+
}, xstate67.EventObject>;
|
|
116
116
|
id: string | undefined;
|
|
117
117
|
};
|
|
118
|
-
}>,
|
|
118
|
+
}>, xstate67.Values<{
|
|
119
|
+
clearError: {
|
|
120
|
+
type: "clearError";
|
|
121
|
+
params: xstate67.NonReducibleUnknown;
|
|
122
|
+
};
|
|
119
123
|
setStream: {
|
|
120
124
|
type: "setStream";
|
|
121
|
-
params:
|
|
125
|
+
params: xstate67.NonReducibleUnknown;
|
|
122
126
|
};
|
|
123
127
|
setCapturedDocument: {
|
|
124
128
|
type: "setCapturedDocument";
|
|
125
|
-
params:
|
|
129
|
+
params: xstate67.NonReducibleUnknown;
|
|
126
130
|
};
|
|
127
131
|
setFileTooLargeError: {
|
|
128
132
|
type: "setFileTooLargeError";
|
|
129
|
-
params:
|
|
133
|
+
params: xstate67.NonReducibleUnknown;
|
|
130
134
|
};
|
|
131
135
|
setProgress: {
|
|
132
136
|
type: "setProgress";
|
|
133
|
-
params:
|
|
137
|
+
params: xstate67.NonReducibleUnknown;
|
|
134
138
|
};
|
|
135
139
|
setUploadError: {
|
|
136
140
|
type: "setUploadError";
|
|
137
|
-
params:
|
|
141
|
+
params: xstate67.NonReducibleUnknown;
|
|
138
142
|
};
|
|
139
143
|
decrementAttemptsRemaining: {
|
|
140
144
|
type: "decrementAttemptsRemaining";
|
|
141
|
-
params:
|
|
145
|
+
params: xstate67.NonReducibleUnknown;
|
|
142
146
|
};
|
|
143
147
|
setCaptureMethodFile: {
|
|
144
148
|
type: "setCaptureMethodFile";
|
|
145
|
-
params:
|
|
149
|
+
params: xstate67.NonReducibleUnknown;
|
|
146
150
|
};
|
|
147
151
|
setCaptureMethodCamera: {
|
|
148
152
|
type: "setCaptureMethodCamera";
|
|
149
|
-
params:
|
|
153
|
+
params: xstate67.NonReducibleUnknown;
|
|
150
154
|
};
|
|
151
155
|
clearCapturedDocument: {
|
|
152
156
|
type: "clearCapturedDocument";
|
|
153
|
-
params:
|
|
157
|
+
params: xstate67.NonReducibleUnknown;
|
|
154
158
|
};
|
|
155
159
|
setPendingNextPage: {
|
|
156
160
|
type: "setPendingNextPage";
|
|
157
|
-
params:
|
|
161
|
+
params: xstate67.NonReducibleUnknown;
|
|
158
162
|
};
|
|
159
163
|
clearForNextPage: {
|
|
160
164
|
type: "clearForNextPage";
|
|
161
|
-
params:
|
|
162
|
-
};
|
|
163
|
-
clearError: {
|
|
164
|
-
type: "clearError";
|
|
165
|
-
params: unknown;
|
|
165
|
+
params: xstate67.NonReducibleUnknown;
|
|
166
166
|
};
|
|
167
167
|
resetProgress: {
|
|
168
168
|
type: "resetProgress";
|
|
169
|
-
params:
|
|
169
|
+
params: xstate67.NonReducibleUnknown;
|
|
170
170
|
};
|
|
171
171
|
stopStream: {
|
|
172
172
|
type: "stopStream";
|
|
173
|
-
params:
|
|
174
|
-
};
|
|
175
|
-
trackTutorial: {
|
|
176
|
-
type: "trackTutorial";
|
|
177
|
-
params: unknown;
|
|
178
|
-
};
|
|
179
|
-
trackCapture: {
|
|
180
|
-
type: "trackCapture";
|
|
181
|
-
params: unknown;
|
|
182
|
-
};
|
|
183
|
-
trackPreview: {
|
|
184
|
-
type: "trackPreview";
|
|
185
|
-
params: unknown;
|
|
186
|
-
};
|
|
187
|
-
trackUploading: {
|
|
188
|
-
type: "trackUploading";
|
|
189
|
-
params: unknown;
|
|
190
|
-
};
|
|
191
|
-
trackSuccess: {
|
|
192
|
-
type: "trackSuccess";
|
|
193
|
-
params: unknown;
|
|
194
|
-
};
|
|
195
|
-
trackFailure: {
|
|
196
|
-
type: "trackFailure";
|
|
197
|
-
params: unknown;
|
|
173
|
+
params: xstate67.NonReducibleUnknown;
|
|
198
174
|
};
|
|
199
|
-
}>,
|
|
175
|
+
}>, xstate67.Values<{
|
|
200
176
|
allowSkip: {
|
|
201
177
|
type: "allowSkip";
|
|
202
178
|
params: unknown;
|
|
@@ -233,7 +209,7 @@ declare const documentCaptureMachine: xstate0.StateMachine<DocumentCaptureContex
|
|
|
233
209
|
type: "isPendingNextPage";
|
|
234
210
|
params: unknown;
|
|
235
211
|
};
|
|
236
|
-
}>, never, "
|
|
212
|
+
}>, never, "finished" | "initCamera" | "tutorial" | "capturing" | "preview" | "closed" | "failure" | "uploading" | "success", string, DocumentCaptureInput, xstate67.NonReducibleUnknown, xstate67.EventObject, xstate67.MetaObject, {
|
|
237
213
|
readonly id: "documentCapture";
|
|
238
214
|
readonly initial: "tutorial";
|
|
239
215
|
readonly context: ({
|
|
@@ -242,67 +218,67 @@ declare const documentCaptureMachine: xstate0.StateMachine<DocumentCaptureContex
|
|
|
242
218
|
spawn: {
|
|
243
219
|
<TSrc extends "initCamera" | "uploadDocument">(logic: TSrc, ...[options]: ({
|
|
244
220
|
src: "initCamera";
|
|
245
|
-
logic:
|
|
221
|
+
logic: xstate67.PromiseActorLogic<MediaStream, void, xstate67.EventObject>;
|
|
246
222
|
id: string | undefined;
|
|
247
223
|
} extends infer T ? T extends {
|
|
248
224
|
src: "initCamera";
|
|
249
|
-
logic:
|
|
225
|
+
logic: xstate67.PromiseActorLogic<MediaStream, void, xstate67.EventObject>;
|
|
250
226
|
id: string | undefined;
|
|
251
227
|
} ? T extends {
|
|
252
228
|
src: TSrc;
|
|
253
|
-
} ?
|
|
229
|
+
} ? xstate67.ConditionalRequired<[options?: ({
|
|
254
230
|
id?: T["id"] | undefined;
|
|
255
231
|
systemId?: string;
|
|
256
|
-
input?:
|
|
232
|
+
input?: xstate67.InputFrom<T["logic"]> | undefined;
|
|
257
233
|
syncSnapshot?: boolean;
|
|
258
|
-
} & { [K in
|
|
234
|
+
} & { [K in xstate67.RequiredActorOptions<T>]: unknown }) | undefined], xstate67.IsNotNever<xstate67.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
259
235
|
src: "uploadDocument";
|
|
260
|
-
logic:
|
|
236
|
+
logic: xstate67.PromiseActorLogic<DocumentUploadResponse, {
|
|
261
237
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
262
238
|
processingType: string;
|
|
263
239
|
onProgress: (progress: number) => void;
|
|
264
|
-
},
|
|
240
|
+
}, xstate67.EventObject>;
|
|
265
241
|
id: string | undefined;
|
|
266
242
|
} extends infer T_1 ? T_1 extends {
|
|
267
243
|
src: "uploadDocument";
|
|
268
|
-
logic:
|
|
244
|
+
logic: xstate67.PromiseActorLogic<DocumentUploadResponse, {
|
|
269
245
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
270
246
|
processingType: string;
|
|
271
247
|
onProgress: (progress: number) => void;
|
|
272
|
-
},
|
|
248
|
+
}, xstate67.EventObject>;
|
|
273
249
|
id: string | undefined;
|
|
274
250
|
} ? T_1 extends {
|
|
275
251
|
src: TSrc;
|
|
276
|
-
} ?
|
|
252
|
+
} ? xstate67.ConditionalRequired<[options?: ({
|
|
277
253
|
id?: T_1["id"] | undefined;
|
|
278
254
|
systemId?: string;
|
|
279
|
-
input?:
|
|
255
|
+
input?: xstate67.InputFrom<T_1["logic"]> | undefined;
|
|
280
256
|
syncSnapshot?: boolean;
|
|
281
|
-
} & { [K_1 in
|
|
257
|
+
} & { [K_1 in xstate67.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate67.IsNotNever<xstate67.RequiredActorOptions<T_1>>> : never : never : never)): xstate67.ActorRefFromLogic<xstate67.GetConcreteByKey<xstate67.Values<{
|
|
282
258
|
initCamera: {
|
|
283
259
|
src: "initCamera";
|
|
284
|
-
logic:
|
|
260
|
+
logic: xstate67.PromiseActorLogic<MediaStream, void, xstate67.EventObject>;
|
|
285
261
|
id: string | undefined;
|
|
286
262
|
};
|
|
287
263
|
uploadDocument: {
|
|
288
264
|
src: "uploadDocument";
|
|
289
|
-
logic:
|
|
265
|
+
logic: xstate67.PromiseActorLogic<DocumentUploadResponse, {
|
|
290
266
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
291
267
|
processingType: string;
|
|
292
268
|
onProgress: (progress: number) => void;
|
|
293
|
-
},
|
|
269
|
+
}, xstate67.EventObject>;
|
|
294
270
|
id: string | undefined;
|
|
295
271
|
};
|
|
296
272
|
}>, "src", TSrc>["logic"]>;
|
|
297
|
-
<TLogic extends
|
|
273
|
+
<TLogic extends xstate67.AnyActorLogic>(src: TLogic, ...[options]: xstate67.ConditionalRequired<[options?: ({
|
|
298
274
|
id?: never;
|
|
299
275
|
systemId?: string;
|
|
300
|
-
input?:
|
|
276
|
+
input?: xstate67.InputFrom<TLogic> | undefined;
|
|
301
277
|
syncSnapshot?: boolean;
|
|
302
|
-
} & { [K in
|
|
278
|
+
} & { [K in xstate67.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate67.IsNotNever<xstate67.RequiredLogicInput<TLogic>>>): xstate67.ActorRefFromLogic<TLogic>;
|
|
303
279
|
};
|
|
304
280
|
input: DocumentCaptureInput;
|
|
305
|
-
self:
|
|
281
|
+
self: xstate67.ActorRef<xstate67.MachineSnapshot<DocumentCaptureContext, {
|
|
306
282
|
type: "CAPTURE";
|
|
307
283
|
} | {
|
|
308
284
|
type: "FILE_SELECTED";
|
|
@@ -324,7 +300,7 @@ declare const documentCaptureMachine: xstate0.StateMachine<DocumentCaptureContex
|
|
|
324
300
|
type: "SKIP";
|
|
325
301
|
} | {
|
|
326
302
|
type: "CLOSE";
|
|
327
|
-
}, Record<string,
|
|
303
|
+
}, Record<string, xstate67.AnyActorRef | undefined>, xstate67.StateValue, string, unknown, any, any>, {
|
|
328
304
|
type: "CAPTURE";
|
|
329
305
|
} | {
|
|
330
306
|
type: "FILE_SELECTED";
|
|
@@ -346,7 +322,7 @@ declare const documentCaptureMachine: xstate0.StateMachine<DocumentCaptureContex
|
|
|
346
322
|
type: "SKIP";
|
|
347
323
|
} | {
|
|
348
324
|
type: "CLOSE";
|
|
349
|
-
},
|
|
325
|
+
}, xstate67.AnyEventObject>;
|
|
350
326
|
}) => {
|
|
351
327
|
config: {
|
|
352
328
|
processingType: DocumentType;
|
|
@@ -371,7 +347,6 @@ declare const documentCaptureMachine: xstate0.StateMachine<DocumentCaptureContex
|
|
|
371
347
|
};
|
|
372
348
|
readonly states: {
|
|
373
349
|
readonly tutorial: {
|
|
374
|
-
readonly entry: "trackTutorial";
|
|
375
350
|
readonly on: {
|
|
376
351
|
readonly CAPTURE: readonly [{
|
|
377
352
|
readonly target: "initCamera";
|
|
@@ -417,7 +392,6 @@ declare const documentCaptureMachine: xstate0.StateMachine<DocumentCaptureContex
|
|
|
417
392
|
};
|
|
418
393
|
};
|
|
419
394
|
readonly capturing: {
|
|
420
|
-
readonly entry: "trackCapture";
|
|
421
395
|
readonly on: {
|
|
422
396
|
readonly FILE_SELECTED: readonly [{
|
|
423
397
|
readonly target: "preview";
|
|
@@ -434,7 +408,6 @@ declare const documentCaptureMachine: xstate0.StateMachine<DocumentCaptureContex
|
|
|
434
408
|
};
|
|
435
409
|
};
|
|
436
410
|
readonly preview: {
|
|
437
|
-
readonly entry: "trackPreview";
|
|
438
411
|
readonly on: {
|
|
439
412
|
readonly ACCEPT: {
|
|
440
413
|
readonly target: "uploading";
|
|
@@ -455,7 +428,6 @@ declare const documentCaptureMachine: xstate0.StateMachine<DocumentCaptureContex
|
|
|
455
428
|
};
|
|
456
429
|
};
|
|
457
430
|
readonly uploading: {
|
|
458
|
-
readonly entry: "trackUploading";
|
|
459
431
|
readonly invoke: {
|
|
460
432
|
readonly id: "uploadDocument";
|
|
461
433
|
readonly src: "uploadDocument";
|
|
@@ -487,7 +459,7 @@ declare const documentCaptureMachine: xstate0.StateMachine<DocumentCaptureContex
|
|
|
487
459
|
} | {
|
|
488
460
|
type: "CLOSE";
|
|
489
461
|
};
|
|
490
|
-
self:
|
|
462
|
+
self: xstate67.ActorRef<xstate67.MachineSnapshot<DocumentCaptureContext, {
|
|
491
463
|
type: "CAPTURE";
|
|
492
464
|
} | {
|
|
493
465
|
type: "FILE_SELECTED";
|
|
@@ -509,7 +481,7 @@ declare const documentCaptureMachine: xstate0.StateMachine<DocumentCaptureContex
|
|
|
509
481
|
type: "SKIP";
|
|
510
482
|
} | {
|
|
511
483
|
type: "CLOSE";
|
|
512
|
-
}, Record<string,
|
|
484
|
+
}, Record<string, xstate67.AnyActorRef>, xstate67.StateValue, string, unknown, any, any>, {
|
|
513
485
|
type: "CAPTURE";
|
|
514
486
|
} | {
|
|
515
487
|
type: "FILE_SELECTED";
|
|
@@ -531,7 +503,7 @@ declare const documentCaptureMachine: xstate0.StateMachine<DocumentCaptureContex
|
|
|
531
503
|
type: "SKIP";
|
|
532
504
|
} | {
|
|
533
505
|
type: "CLOSE";
|
|
534
|
-
},
|
|
506
|
+
}, xstate67.AnyEventObject>;
|
|
535
507
|
}) => {
|
|
536
508
|
capturedDocument: CapturedDocument;
|
|
537
509
|
processingType: DocumentType;
|
|
@@ -553,7 +525,6 @@ declare const documentCaptureMachine: xstate0.StateMachine<DocumentCaptureContex
|
|
|
553
525
|
};
|
|
554
526
|
};
|
|
555
527
|
readonly success: {
|
|
556
|
-
readonly entry: "trackSuccess";
|
|
557
528
|
readonly on: {
|
|
558
529
|
readonly CONTINUE: readonly [{
|
|
559
530
|
readonly target: "tutorial";
|
|
@@ -565,7 +536,6 @@ declare const documentCaptureMachine: xstate0.StateMachine<DocumentCaptureContex
|
|
|
565
536
|
};
|
|
566
537
|
};
|
|
567
538
|
readonly failure: {
|
|
568
|
-
readonly entry: "trackFailure";
|
|
569
539
|
readonly on: {
|
|
570
540
|
readonly RETRY: readonly [{
|
|
571
541
|
readonly target: "initCamera";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as getBackCameraStream } from "./backCameraStream-
|
|
3
|
-
import { A as createManager, k as stopCameraStream } from "./src-
|
|
1
|
+
import { _ as assign, b as createActor, g as setup, n as eventModuleNames, o as createManagerInstrumentation, y as fromPromise } from "./events-BfIbM5SS.esm.js";
|
|
2
|
+
import { t as getBackCameraStream } from "./backCameraStream-THvMPTG_.esm.js";
|
|
3
|
+
import { A as createManager, k as stopCameraStream } from "./src-D9pJSMO5.esm.js";
|
|
4
4
|
import { t as api } from "./api-3fZO5bmj.esm.js";
|
|
5
5
|
import { t as endpoints } from "./endpoints-Bydn-Ave.esm.js";
|
|
6
6
|
|
|
@@ -116,25 +116,7 @@ const documentCaptureMachine = setup({
|
|
|
116
116
|
stopStream: assign(({ context }) => {
|
|
117
117
|
if (context.stream) stopCameraStream(context.stream);
|
|
118
118
|
return { stream: void 0 };
|
|
119
|
-
})
|
|
120
|
-
trackTutorial: () => {
|
|
121
|
-
screenOpened(eventModuleNames.document, eventScreenNames.documentTutorial);
|
|
122
|
-
},
|
|
123
|
-
trackCapture: () => {
|
|
124
|
-
screenOpened(eventModuleNames.document, eventScreenNames.documentCameraCapture);
|
|
125
|
-
},
|
|
126
|
-
trackPreview: () => {
|
|
127
|
-
screenOpened(eventModuleNames.document, eventScreenNames.documentReviewPhoto);
|
|
128
|
-
},
|
|
129
|
-
trackUploading: () => {
|
|
130
|
-
screenOpened(eventModuleNames.document, eventScreenNames.documentUploadProgress);
|
|
131
|
-
},
|
|
132
|
-
trackSuccess: () => {
|
|
133
|
-
screenOpened(eventModuleNames.document, eventScreenNames.documentUploadSuccess);
|
|
134
|
-
},
|
|
135
|
-
trackFailure: () => {
|
|
136
|
-
screenOpened(eventModuleNames.document, eventScreenNames.documentAttemptFailed);
|
|
137
|
-
}
|
|
119
|
+
})
|
|
138
120
|
},
|
|
139
121
|
guards: {
|
|
140
122
|
allowSkip: ({ context }) => context.config.allowSkipDocumentCapture && context.pageNumber === 1,
|
|
@@ -178,28 +160,25 @@ const documentCaptureMachine = setup({
|
|
|
178
160
|
};
|
|
179
161
|
},
|
|
180
162
|
states: {
|
|
181
|
-
tutorial: {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
CLOSE: { target: "closed" }
|
|
201
|
-
}
|
|
202
|
-
},
|
|
163
|
+
tutorial: { on: {
|
|
164
|
+
CAPTURE: [{
|
|
165
|
+
target: "initCamera",
|
|
166
|
+
guard: "isCameraMode"
|
|
167
|
+
}, { target: "capturing" }],
|
|
168
|
+
FILE_SELECTED: [{
|
|
169
|
+
target: "preview",
|
|
170
|
+
guard: "fileSizeOk",
|
|
171
|
+
actions: ["setCapturedDocument", "setCaptureMethodFile"]
|
|
172
|
+
}, {
|
|
173
|
+
target: "tutorial",
|
|
174
|
+
actions: "setFileTooLargeError"
|
|
175
|
+
}],
|
|
176
|
+
SKIP: {
|
|
177
|
+
target: "finished",
|
|
178
|
+
guard: "allowSkip"
|
|
179
|
+
},
|
|
180
|
+
CLOSE: { target: "closed" }
|
|
181
|
+
} },
|
|
203
182
|
initCamera: {
|
|
204
183
|
invoke: {
|
|
205
184
|
id: "initCamera",
|
|
@@ -216,46 +195,39 @@ const documentCaptureMachine = setup({
|
|
|
216
195
|
},
|
|
217
196
|
on: { CLOSE: { target: "closed" } }
|
|
218
197
|
},
|
|
219
|
-
capturing: {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
target: "closed",
|
|
232
|
-
actions: "stopStream"
|
|
233
|
-
}
|
|
198
|
+
capturing: { on: {
|
|
199
|
+
FILE_SELECTED: [{
|
|
200
|
+
target: "preview",
|
|
201
|
+
guard: "fileSizeOk",
|
|
202
|
+
actions: ["setCapturedDocument", "setCaptureMethodCamera"]
|
|
203
|
+
}, {
|
|
204
|
+
target: "capturing",
|
|
205
|
+
actions: "setFileTooLargeError"
|
|
206
|
+
}],
|
|
207
|
+
CLOSE: {
|
|
208
|
+
target: "closed",
|
|
209
|
+
actions: "stopStream"
|
|
234
210
|
}
|
|
235
|
-
},
|
|
236
|
-
preview: {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
target: "closed",
|
|
253
|
-
actions: "stopStream"
|
|
254
|
-
}
|
|
211
|
+
} },
|
|
212
|
+
preview: { on: {
|
|
213
|
+
ACCEPT: {
|
|
214
|
+
target: "uploading",
|
|
215
|
+
actions: "resetProgress"
|
|
216
|
+
},
|
|
217
|
+
RETAKE: [{
|
|
218
|
+
target: "tutorial",
|
|
219
|
+
guard: "isCaptureMethodFile",
|
|
220
|
+
actions: "clearCapturedDocument"
|
|
221
|
+
}, {
|
|
222
|
+
target: "capturing",
|
|
223
|
+
actions: "clearCapturedDocument"
|
|
224
|
+
}],
|
|
225
|
+
CLOSE: {
|
|
226
|
+
target: "closed",
|
|
227
|
+
actions: "stopStream"
|
|
255
228
|
}
|
|
256
|
-
},
|
|
229
|
+
} },
|
|
257
230
|
uploading: {
|
|
258
|
-
entry: "trackUploading",
|
|
259
231
|
invoke: {
|
|
260
232
|
id: "uploadDocument",
|
|
261
233
|
src: "uploadDocument",
|
|
@@ -287,16 +259,12 @@ const documentCaptureMachine = setup({
|
|
|
287
259
|
},
|
|
288
260
|
on: { UPLOAD_PROGRESS: { actions: "setProgress" } }
|
|
289
261
|
},
|
|
290
|
-
success: {
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
actions: "clearForNextPage"
|
|
296
|
-
}, { target: "finished" }] }
|
|
297
|
-
},
|
|
262
|
+
success: { on: { CONTINUE: [{
|
|
263
|
+
target: "tutorial",
|
|
264
|
+
guard: "isPendingNextPage",
|
|
265
|
+
actions: "clearForNextPage"
|
|
266
|
+
}, { target: "finished" }] } },
|
|
298
267
|
failure: {
|
|
299
|
-
entry: "trackFailure",
|
|
300
268
|
on: {
|
|
301
269
|
RETRY: [{
|
|
302
270
|
target: "initCamera",
|