@incodetech/core 0.0.0-dev-20260407-690b1a8 → 0.0.0-dev-20260408-6cf064e
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-CUpyIZFm.esm.js → addressSearch-DOFI7lwy.esm.js} +1 -1
- package/dist/antifraud.esm.js +1 -1
- package/dist/authentication.esm.js +4 -4
- package/dist/{authenticationManager-CgnkS8vY.esm.js → authenticationManager-C7dL_avf.esm.js} +3 -3
- package/dist/consent.d.ts +50 -50
- package/dist/consent.esm.js +1 -1
- package/dist/cross-document-data-match.esm.js +1 -1
- package/dist/curp-validation.esm.js +1 -1
- package/dist/document-capture.d.ts +79 -71
- package/dist/document-capture.esm.js +20 -11
- package/dist/document-upload.d.ts +46 -46
- package/dist/document-upload.esm.js +1 -1
- package/dist/ekyb.esm.js +4 -4
- package/dist/ekyc.esm.js +2 -2
- package/dist/email.esm.js +2 -2
- package/dist/{emailManager-vEDs15ZG.esm.js → emailManager-_9R4vm6g.esm.js} +1 -1
- package/dist/{events-Eg8xe-Yf.esm.js → events-DlHrOIRc.esm.js} +1 -1
- package/dist/events.esm.js +1 -1
- package/dist/extensibility.esm.js +9 -9
- package/dist/face-match.esm.js +1 -1
- package/dist/{faceCaptureSetup-KdDqG9e8.esm.js → faceCaptureSetup-CaVWkjvE.esm.js} +2 -2
- package/dist/flow.d.ts +2 -1
- package/dist/flow.esm.js +5 -5
- package/dist/{flowCompletionService-QZVT-TEp.esm.js → flowCompletionService-B5JemmC6.esm.js} +1 -1
- package/dist/{flowServices-CKu0cMWh.esm.js → flowServices-p22wrYPf.esm.js} +2 -2
- package/dist/geolocation.esm.js +1 -1
- package/dist/government-validation.esm.js +1 -1
- package/dist/id.esm.js +4 -4
- package/dist/{idCaptureManager-DbWmUEJo.esm.js → idCaptureManager-dyZzKv8L.esm.js} +3 -3
- package/dist/index.esm.js +3 -3
- package/dist/mandatory-consent.d.ts +53 -53
- package/dist/mandatory-consent.esm.js +1 -1
- package/dist/phone.esm.js +2 -2
- package/dist/{phoneManager-BFbZDpKO.esm.js → phoneManager-DerdUfd4.esm.js} +1 -1
- package/dist/{recordingService-B896Supr.esm.js → recordingService-483wQ6kR.esm.js} +1 -1
- package/dist/redirect-to-mobile.esm.js +1 -1
- package/dist/selfie.esm.js +4 -4
- package/dist/{selfieManager-Dn89KOGE.esm.js → selfieManager-DeOcNel4.esm.js} +3 -3
- package/dist/{session-jtJ8k-IF.esm.js → session-CUh77zj3.esm.js} +1 -1
- package/dist/session.esm.js +3 -3
- package/dist/{setup-Q8hlJT8S.esm.js → setup-XpxfZgKn.esm.js} +2 -2
- package/dist/signature.d.ts +1 -0
- package/dist/signature.esm.js +33 -9
- package/dist/wasm.esm.js +3 -3
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as Manager } from "./Manager-BN2g_I8W.js";
|
|
2
2
|
import "./Actor-Ba71-_30.js";
|
|
3
3
|
import { t as CameraStream } from "./camera-1eeGnAaL.js";
|
|
4
|
-
import * as
|
|
4
|
+
import * as xstate63 from "xstate";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/document-capture/types.d.ts
|
|
7
7
|
type DocumentType = 'addressStatement' | 'otherDocument1' | 'otherDocument2' | 'otherDocument3' | 'v5cMultiPageLogbook' | 'circulationCard' | 'financeSettlement' | 'carInvoice' | 'capture' | 'processPoaOcr' | 'processLoaOcr' | 'processAsylumSeekerVisaZaf' | 'processBankStatementOCR' | 'processBankCheck' | 'processV5CLogbook' | 'processCarInvoice' | 'processCirculationCard' | 'processFinanceSettlement';
|
|
@@ -82,7 +82,7 @@ type DocumentCaptureInput = {
|
|
|
82
82
|
};
|
|
83
83
|
//#endregion
|
|
84
84
|
//#region src/modules/document-capture/documentCaptureStateMachine.d.ts
|
|
85
|
-
declare const documentCaptureMachine:
|
|
85
|
+
declare const documentCaptureMachine: xstate63.StateMachine<DocumentCaptureContext, {
|
|
86
86
|
type: "CAPTURE";
|
|
87
87
|
} | {
|
|
88
88
|
type: "FILE_SELECTED";
|
|
@@ -111,105 +111,105 @@ declare const documentCaptureMachine: xstate131.StateMachine<DocumentCaptureCont
|
|
|
111
111
|
} | {
|
|
112
112
|
type: "CLOSE";
|
|
113
113
|
}, {
|
|
114
|
-
[x: string]:
|
|
114
|
+
[x: string]: xstate63.ActorRefFromLogic<xstate63.PromiseActorLogic<MediaStream, void, xstate63.EventObject>> | xstate63.ActorRefFromLogic<xstate63.PromiseActorLogic<DocumentUploadResponse, {
|
|
115
115
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
116
116
|
processingType: string;
|
|
117
117
|
onProgress: (progress: number) => void;
|
|
118
|
-
},
|
|
118
|
+
}, xstate63.EventObject>> | xstate63.ActorRefFromLogic<xstate63.PromiseActorLogic<FinalizeDocumentResponse, {
|
|
119
119
|
processingType: string;
|
|
120
|
-
},
|
|
121
|
-
},
|
|
120
|
+
}, xstate63.EventObject>> | undefined;
|
|
121
|
+
}, xstate63.Values<{
|
|
122
122
|
initCamera: {
|
|
123
123
|
src: "initCamera";
|
|
124
|
-
logic:
|
|
124
|
+
logic: xstate63.PromiseActorLogic<MediaStream, void, xstate63.EventObject>;
|
|
125
125
|
id: string | undefined;
|
|
126
126
|
};
|
|
127
127
|
uploadDocument: {
|
|
128
128
|
src: "uploadDocument";
|
|
129
|
-
logic:
|
|
129
|
+
logic: xstate63.PromiseActorLogic<DocumentUploadResponse, {
|
|
130
130
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
131
131
|
processingType: string;
|
|
132
132
|
onProgress: (progress: number) => void;
|
|
133
|
-
},
|
|
133
|
+
}, xstate63.EventObject>;
|
|
134
134
|
id: string | undefined;
|
|
135
135
|
};
|
|
136
136
|
finalizeDocumentRequest: {
|
|
137
137
|
src: "finalizeDocumentRequest";
|
|
138
|
-
logic:
|
|
138
|
+
logic: xstate63.PromiseActorLogic<FinalizeDocumentResponse, {
|
|
139
139
|
processingType: string;
|
|
140
|
-
},
|
|
140
|
+
}, xstate63.EventObject>;
|
|
141
141
|
id: string | undefined;
|
|
142
142
|
};
|
|
143
|
-
}>,
|
|
144
|
-
clearError: {
|
|
145
|
-
type: "clearError";
|
|
146
|
-
params: xstate131.NonReducibleUnknown;
|
|
147
|
-
};
|
|
143
|
+
}>, xstate63.Values<{
|
|
148
144
|
setStream: {
|
|
149
145
|
type: "setStream";
|
|
150
|
-
params:
|
|
146
|
+
params: xstate63.NonReducibleUnknown;
|
|
151
147
|
};
|
|
152
148
|
setProgress: {
|
|
153
149
|
type: "setProgress";
|
|
154
|
-
params:
|
|
150
|
+
params: xstate63.NonReducibleUnknown;
|
|
151
|
+
};
|
|
152
|
+
clearError: {
|
|
153
|
+
type: "clearError";
|
|
154
|
+
params: xstate63.NonReducibleUnknown;
|
|
155
155
|
};
|
|
156
156
|
stopStream: {
|
|
157
157
|
type: "stopStream";
|
|
158
|
-
params:
|
|
158
|
+
params: xstate63.NonReducibleUnknown;
|
|
159
159
|
};
|
|
160
160
|
setCapturedDocument: {
|
|
161
161
|
type: "setCapturedDocument";
|
|
162
|
-
params:
|
|
162
|
+
params: xstate63.NonReducibleUnknown;
|
|
163
163
|
};
|
|
164
164
|
setFileTooLargeError: {
|
|
165
165
|
type: "setFileTooLargeError";
|
|
166
|
-
params:
|
|
166
|
+
params: xstate63.NonReducibleUnknown;
|
|
167
167
|
};
|
|
168
168
|
setUploadError: {
|
|
169
169
|
type: "setUploadError";
|
|
170
|
-
params:
|
|
170
|
+
params: xstate63.NonReducibleUnknown;
|
|
171
171
|
};
|
|
172
172
|
setFinalizeError: {
|
|
173
173
|
type: "setFinalizeError";
|
|
174
|
-
params:
|
|
174
|
+
params: xstate63.NonReducibleUnknown;
|
|
175
175
|
};
|
|
176
176
|
decrementAttemptsRemaining: {
|
|
177
177
|
type: "decrementAttemptsRemaining";
|
|
178
|
-
params:
|
|
178
|
+
params: xstate63.NonReducibleUnknown;
|
|
179
179
|
};
|
|
180
180
|
setCaptureMethodFile: {
|
|
181
181
|
type: "setCaptureMethodFile";
|
|
182
|
-
params:
|
|
182
|
+
params: xstate63.NonReducibleUnknown;
|
|
183
183
|
};
|
|
184
184
|
setCaptureMethodCamera: {
|
|
185
185
|
type: "setCaptureMethodCamera";
|
|
186
|
-
params:
|
|
186
|
+
params: xstate63.NonReducibleUnknown;
|
|
187
187
|
};
|
|
188
188
|
setCaptureMethodGallery: {
|
|
189
189
|
type: "setCaptureMethodGallery";
|
|
190
|
-
params:
|
|
190
|
+
params: xstate63.NonReducibleUnknown;
|
|
191
191
|
};
|
|
192
192
|
clearCapturedDocument: {
|
|
193
193
|
type: "clearCapturedDocument";
|
|
194
|
-
params:
|
|
194
|
+
params: xstate63.NonReducibleUnknown;
|
|
195
195
|
};
|
|
196
196
|
clearCapturedDocumentGalleryRetake: {
|
|
197
197
|
type: "clearCapturedDocumentGalleryRetake";
|
|
198
|
-
params:
|
|
198
|
+
params: xstate63.NonReducibleUnknown;
|
|
199
199
|
};
|
|
200
200
|
setNextPageType: {
|
|
201
201
|
type: "setNextPageType";
|
|
202
|
-
params:
|
|
202
|
+
params: xstate63.NonReducibleUnknown;
|
|
203
203
|
};
|
|
204
204
|
clearForNextPage: {
|
|
205
205
|
type: "clearForNextPage";
|
|
206
|
-
params:
|
|
206
|
+
params: xstate63.NonReducibleUnknown;
|
|
207
207
|
};
|
|
208
208
|
resetProgress: {
|
|
209
209
|
type: "resetProgress";
|
|
210
|
-
params:
|
|
210
|
+
params: xstate63.NonReducibleUnknown;
|
|
211
211
|
};
|
|
212
|
-
}>,
|
|
212
|
+
}>, xstate63.Values<{
|
|
213
213
|
allowSkip: {
|
|
214
214
|
type: "allowSkip";
|
|
215
215
|
params: unknown;
|
|
@@ -226,6 +226,10 @@ declare const documentCaptureMachine: xstate131.StateMachine<DocumentCaptureCont
|
|
|
226
226
|
type: "canRetryFile";
|
|
227
227
|
params: unknown;
|
|
228
228
|
};
|
|
229
|
+
canRetryNextDocumentCapture: {
|
|
230
|
+
type: "canRetryNextDocumentCapture";
|
|
231
|
+
params: unknown;
|
|
232
|
+
};
|
|
229
233
|
attemptsExhausted: {
|
|
230
234
|
type: "attemptsExhausted";
|
|
231
235
|
params: unknown;
|
|
@@ -266,7 +270,7 @@ declare const documentCaptureMachine: xstate131.StateMachine<DocumentCaptureCont
|
|
|
266
270
|
type: "fileSizeOkForNonGallery";
|
|
267
271
|
params: unknown;
|
|
268
272
|
};
|
|
269
|
-
}>, never, "
|
|
273
|
+
}>, never, "initCamera" | "capturing" | "closed" | "uploading" | "finished" | "tutorial" | "preview" | "failure" | "success" | "nextPage" | "finalizing", string, DocumentCaptureInput, xstate63.NonReducibleUnknown, xstate63.EventObject, xstate63.MetaObject, {
|
|
270
274
|
readonly id: "documentCapture";
|
|
271
275
|
readonly initial: "tutorial";
|
|
272
276
|
readonly context: ({
|
|
@@ -275,93 +279,93 @@ declare const documentCaptureMachine: xstate131.StateMachine<DocumentCaptureCont
|
|
|
275
279
|
spawn: {
|
|
276
280
|
<TSrc extends "initCamera" | "uploadDocument" | "finalizeDocumentRequest">(logic: TSrc, ...[options]: ({
|
|
277
281
|
src: "initCamera";
|
|
278
|
-
logic:
|
|
282
|
+
logic: xstate63.PromiseActorLogic<MediaStream, void, xstate63.EventObject>;
|
|
279
283
|
id: string | undefined;
|
|
280
284
|
} extends infer T ? T extends {
|
|
281
285
|
src: "initCamera";
|
|
282
|
-
logic:
|
|
286
|
+
logic: xstate63.PromiseActorLogic<MediaStream, void, xstate63.EventObject>;
|
|
283
287
|
id: string | undefined;
|
|
284
288
|
} ? T extends {
|
|
285
289
|
src: TSrc;
|
|
286
|
-
} ?
|
|
290
|
+
} ? xstate63.ConditionalRequired<[options?: ({
|
|
287
291
|
id?: T["id"] | undefined;
|
|
288
292
|
systemId?: string;
|
|
289
|
-
input?:
|
|
293
|
+
input?: xstate63.InputFrom<T["logic"]> | undefined;
|
|
290
294
|
syncSnapshot?: boolean;
|
|
291
|
-
} & { [K in
|
|
295
|
+
} & { [K in xstate63.RequiredActorOptions<T>]: unknown }) | undefined], xstate63.IsNotNever<xstate63.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
292
296
|
src: "uploadDocument";
|
|
293
|
-
logic:
|
|
297
|
+
logic: xstate63.PromiseActorLogic<DocumentUploadResponse, {
|
|
294
298
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
295
299
|
processingType: string;
|
|
296
300
|
onProgress: (progress: number) => void;
|
|
297
|
-
},
|
|
301
|
+
}, xstate63.EventObject>;
|
|
298
302
|
id: string | undefined;
|
|
299
303
|
} extends infer T_1 ? T_1 extends {
|
|
300
304
|
src: "uploadDocument";
|
|
301
|
-
logic:
|
|
305
|
+
logic: xstate63.PromiseActorLogic<DocumentUploadResponse, {
|
|
302
306
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
303
307
|
processingType: string;
|
|
304
308
|
onProgress: (progress: number) => void;
|
|
305
|
-
},
|
|
309
|
+
}, xstate63.EventObject>;
|
|
306
310
|
id: string | undefined;
|
|
307
311
|
} ? T_1 extends {
|
|
308
312
|
src: TSrc;
|
|
309
|
-
} ?
|
|
313
|
+
} ? xstate63.ConditionalRequired<[options?: ({
|
|
310
314
|
id?: T_1["id"] | undefined;
|
|
311
315
|
systemId?: string;
|
|
312
|
-
input?:
|
|
316
|
+
input?: xstate63.InputFrom<T_1["logic"]> | undefined;
|
|
313
317
|
syncSnapshot?: boolean;
|
|
314
|
-
} & { [K_1 in
|
|
318
|
+
} & { [K_1 in xstate63.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate63.IsNotNever<xstate63.RequiredActorOptions<T_1>>> : never : never : never) | ({
|
|
315
319
|
src: "finalizeDocumentRequest";
|
|
316
|
-
logic:
|
|
320
|
+
logic: xstate63.PromiseActorLogic<FinalizeDocumentResponse, {
|
|
317
321
|
processingType: string;
|
|
318
|
-
},
|
|
322
|
+
}, xstate63.EventObject>;
|
|
319
323
|
id: string | undefined;
|
|
320
324
|
} extends infer T_2 ? T_2 extends {
|
|
321
325
|
src: "finalizeDocumentRequest";
|
|
322
|
-
logic:
|
|
326
|
+
logic: xstate63.PromiseActorLogic<FinalizeDocumentResponse, {
|
|
323
327
|
processingType: string;
|
|
324
|
-
},
|
|
328
|
+
}, xstate63.EventObject>;
|
|
325
329
|
id: string | undefined;
|
|
326
330
|
} ? T_2 extends {
|
|
327
331
|
src: TSrc;
|
|
328
|
-
} ?
|
|
332
|
+
} ? xstate63.ConditionalRequired<[options?: ({
|
|
329
333
|
id?: T_2["id"] | undefined;
|
|
330
334
|
systemId?: string;
|
|
331
|
-
input?:
|
|
335
|
+
input?: xstate63.InputFrom<T_2["logic"]> | undefined;
|
|
332
336
|
syncSnapshot?: boolean;
|
|
333
|
-
} & { [K_2 in
|
|
337
|
+
} & { [K_2 in xstate63.RequiredActorOptions<T_2>]: unknown }) | undefined], xstate63.IsNotNever<xstate63.RequiredActorOptions<T_2>>> : never : never : never)): xstate63.ActorRefFromLogic<xstate63.GetConcreteByKey<xstate63.Values<{
|
|
334
338
|
initCamera: {
|
|
335
339
|
src: "initCamera";
|
|
336
|
-
logic:
|
|
340
|
+
logic: xstate63.PromiseActorLogic<MediaStream, void, xstate63.EventObject>;
|
|
337
341
|
id: string | undefined;
|
|
338
342
|
};
|
|
339
343
|
uploadDocument: {
|
|
340
344
|
src: "uploadDocument";
|
|
341
|
-
logic:
|
|
345
|
+
logic: xstate63.PromiseActorLogic<DocumentUploadResponse, {
|
|
342
346
|
capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
|
|
343
347
|
processingType: string;
|
|
344
348
|
onProgress: (progress: number) => void;
|
|
345
|
-
},
|
|
349
|
+
}, xstate63.EventObject>;
|
|
346
350
|
id: string | undefined;
|
|
347
351
|
};
|
|
348
352
|
finalizeDocumentRequest: {
|
|
349
353
|
src: "finalizeDocumentRequest";
|
|
350
|
-
logic:
|
|
354
|
+
logic: xstate63.PromiseActorLogic<FinalizeDocumentResponse, {
|
|
351
355
|
processingType: string;
|
|
352
|
-
},
|
|
356
|
+
}, xstate63.EventObject>;
|
|
353
357
|
id: string | undefined;
|
|
354
358
|
};
|
|
355
359
|
}>, "src", TSrc>["logic"]>;
|
|
356
|
-
<TLogic extends
|
|
360
|
+
<TLogic extends xstate63.AnyActorLogic>(src: TLogic, ...[options]: xstate63.ConditionalRequired<[options?: ({
|
|
357
361
|
id?: never;
|
|
358
362
|
systemId?: string;
|
|
359
|
-
input?:
|
|
363
|
+
input?: xstate63.InputFrom<TLogic> | undefined;
|
|
360
364
|
syncSnapshot?: boolean;
|
|
361
|
-
} & { [K in
|
|
365
|
+
} & { [K in xstate63.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate63.IsNotNever<xstate63.RequiredLogicInput<TLogic>>>): xstate63.ActorRefFromLogic<TLogic>;
|
|
362
366
|
};
|
|
363
367
|
input: DocumentCaptureInput;
|
|
364
|
-
self:
|
|
368
|
+
self: xstate63.ActorRef<xstate63.MachineSnapshot<DocumentCaptureContext, {
|
|
365
369
|
type: "CAPTURE";
|
|
366
370
|
} | {
|
|
367
371
|
type: "FILE_SELECTED";
|
|
@@ -389,7 +393,7 @@ declare const documentCaptureMachine: xstate131.StateMachine<DocumentCaptureCont
|
|
|
389
393
|
type: "SKIP";
|
|
390
394
|
} | {
|
|
391
395
|
type: "CLOSE";
|
|
392
|
-
}, Record<string,
|
|
396
|
+
}, Record<string, xstate63.AnyActorRef | undefined>, xstate63.StateValue, string, unknown, any, any>, {
|
|
393
397
|
type: "CAPTURE";
|
|
394
398
|
} | {
|
|
395
399
|
type: "FILE_SELECTED";
|
|
@@ -417,7 +421,7 @@ declare const documentCaptureMachine: xstate131.StateMachine<DocumentCaptureCont
|
|
|
417
421
|
type: "SKIP";
|
|
418
422
|
} | {
|
|
419
423
|
type: "CLOSE";
|
|
420
|
-
},
|
|
424
|
+
}, xstate63.AnyEventObject>;
|
|
421
425
|
}) => {
|
|
422
426
|
config: {
|
|
423
427
|
processingType: DocumentType;
|
|
@@ -568,7 +572,7 @@ declare const documentCaptureMachine: xstate131.StateMachine<DocumentCaptureCont
|
|
|
568
572
|
} | {
|
|
569
573
|
type: "CLOSE";
|
|
570
574
|
};
|
|
571
|
-
self:
|
|
575
|
+
self: xstate63.ActorRef<xstate63.MachineSnapshot<DocumentCaptureContext, {
|
|
572
576
|
type: "CAPTURE";
|
|
573
577
|
} | {
|
|
574
578
|
type: "FILE_SELECTED";
|
|
@@ -596,7 +600,7 @@ declare const documentCaptureMachine: xstate131.StateMachine<DocumentCaptureCont
|
|
|
596
600
|
type: "SKIP";
|
|
597
601
|
} | {
|
|
598
602
|
type: "CLOSE";
|
|
599
|
-
}, Record<string,
|
|
603
|
+
}, Record<string, xstate63.AnyActorRef>, xstate63.StateValue, string, unknown, any, any>, {
|
|
600
604
|
type: "CAPTURE";
|
|
601
605
|
} | {
|
|
602
606
|
type: "FILE_SELECTED";
|
|
@@ -624,7 +628,7 @@ declare const documentCaptureMachine: xstate131.StateMachine<DocumentCaptureCont
|
|
|
624
628
|
type: "SKIP";
|
|
625
629
|
} | {
|
|
626
630
|
type: "CLOSE";
|
|
627
|
-
},
|
|
631
|
+
}, xstate63.AnyEventObject>;
|
|
628
632
|
}) => {
|
|
629
633
|
capturedDocument: CapturedDocument;
|
|
630
634
|
processingType: DocumentType;
|
|
@@ -719,7 +723,7 @@ declare const documentCaptureMachine: xstate131.StateMachine<DocumentCaptureCont
|
|
|
719
723
|
} | {
|
|
720
724
|
type: "CLOSE";
|
|
721
725
|
};
|
|
722
|
-
self:
|
|
726
|
+
self: xstate63.ActorRef<xstate63.MachineSnapshot<DocumentCaptureContext, {
|
|
723
727
|
type: "CAPTURE";
|
|
724
728
|
} | {
|
|
725
729
|
type: "FILE_SELECTED";
|
|
@@ -747,7 +751,7 @@ declare const documentCaptureMachine: xstate131.StateMachine<DocumentCaptureCont
|
|
|
747
751
|
type: "SKIP";
|
|
748
752
|
} | {
|
|
749
753
|
type: "CLOSE";
|
|
750
|
-
}, Record<string,
|
|
754
|
+
}, Record<string, xstate63.AnyActorRef>, xstate63.StateValue, string, unknown, any, any>, {
|
|
751
755
|
type: "CAPTURE";
|
|
752
756
|
} | {
|
|
753
757
|
type: "FILE_SELECTED";
|
|
@@ -775,7 +779,7 @@ declare const documentCaptureMachine: xstate131.StateMachine<DocumentCaptureCont
|
|
|
775
779
|
type: "SKIP";
|
|
776
780
|
} | {
|
|
777
781
|
type: "CLOSE";
|
|
778
|
-
},
|
|
782
|
+
}, xstate63.AnyEventObject>;
|
|
779
783
|
}) => {
|
|
780
784
|
processingType: DocumentType;
|
|
781
785
|
};
|
|
@@ -784,13 +788,17 @@ declare const documentCaptureMachine: xstate131.StateMachine<DocumentCaptureCont
|
|
|
784
788
|
};
|
|
785
789
|
readonly onError: {
|
|
786
790
|
readonly target: "failure";
|
|
787
|
-
readonly actions: "setFinalizeError";
|
|
791
|
+
readonly actions: readonly ["setFinalizeError", "decrementAttemptsRemaining"];
|
|
788
792
|
};
|
|
789
793
|
};
|
|
790
794
|
};
|
|
791
795
|
readonly failure: {
|
|
792
796
|
readonly on: {
|
|
793
797
|
readonly RETRY: readonly [{
|
|
798
|
+
readonly target: "nextPage";
|
|
799
|
+
readonly guard: "canRetryNextDocumentCapture";
|
|
800
|
+
readonly actions: readonly ["clearError", "clearCapturedDocument"];
|
|
801
|
+
}, {
|
|
794
802
|
readonly target: "initCamera";
|
|
795
803
|
readonly guard: "canRetryCamera";
|
|
796
804
|
readonly actions: readonly ["clearError", "clearCapturedDocument"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as api } from "./api-DzpnV6O7.esm.js";
|
|
2
|
-
import { _ as endpoints, n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
2
|
+
import { _ as endpoints, n as eventModuleNames, o as createManagerInstrumentation } from "./events-DlHrOIRc.esm.js";
|
|
3
3
|
import { a as createActor, i as fromPromise, n as assign, o as createManager, t as setup } from "./xstate.esm-Bv55-lJ4.esm.js";
|
|
4
4
|
import { i as stopCameraStream } from "./camera-DmkFpf5N.esm.js";
|
|
5
5
|
import "./platform-Dv7a2fv-.esm.js";
|
|
@@ -171,6 +171,7 @@ const documentCaptureMachine = setup({
|
|
|
171
171
|
},
|
|
172
172
|
canRetryCamera: ({ context }) => context.attemptsRemaining > 0 && context.captureMethod === "camera",
|
|
173
173
|
canRetryFile: ({ context }) => context.attemptsRemaining > 0 && context.captureMethod !== "camera",
|
|
174
|
+
canRetryNextDocumentCapture: ({ context }) => context.attemptsRemaining > 0 && context.nextPageType === "optional",
|
|
174
175
|
attemptsExhausted: ({ context }) => context.attemptsRemaining <= 0,
|
|
175
176
|
isCameraMode: ({ context }) => context.config.captureMode === "camera",
|
|
176
177
|
isCaptureMethodCamera: ({ context }) => context.captureMethod === "camera",
|
|
@@ -366,20 +367,28 @@ const documentCaptureMachine = setup({
|
|
|
366
367
|
onDone: { target: "finished" },
|
|
367
368
|
onError: {
|
|
368
369
|
target: "failure",
|
|
369
|
-
actions: "setFinalizeError"
|
|
370
|
+
actions: ["setFinalizeError", "decrementAttemptsRemaining"]
|
|
370
371
|
}
|
|
371
372
|
} },
|
|
372
373
|
failure: {
|
|
373
374
|
on: {
|
|
374
|
-
RETRY: [
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
375
|
+
RETRY: [
|
|
376
|
+
{
|
|
377
|
+
target: "nextPage",
|
|
378
|
+
guard: "canRetryNextDocumentCapture",
|
|
379
|
+
actions: ["clearError", "clearCapturedDocument"]
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
target: "initCamera",
|
|
383
|
+
guard: "canRetryCamera",
|
|
384
|
+
actions: ["clearError", "clearCapturedDocument"]
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
target: "tutorial",
|
|
388
|
+
guard: "canRetryFile",
|
|
389
|
+
actions: ["clearError", "clearCapturedDocument"]
|
|
390
|
+
}
|
|
391
|
+
],
|
|
383
392
|
CLOSE: { target: "closed" }
|
|
384
393
|
},
|
|
385
394
|
after: { 3e3: {
|
|
@@ -2,10 +2,10 @@ import { t as Manager } from "./Manager-BN2g_I8W.js";
|
|
|
2
2
|
import "./Actor-Ba71-_30.js";
|
|
3
3
|
import "./camera-1eeGnAaL.js";
|
|
4
4
|
import { n as DocumentUploadContext, r as DocumentUploadInput, t as DocumentUploadConfig } from "./types-2OPf1pyv.js";
|
|
5
|
-
import * as
|
|
5
|
+
import * as xstate0 from "xstate";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/document-upload/documentUploadStateMachine.d.ts
|
|
8
|
-
declare const documentUploadMachine:
|
|
8
|
+
declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext, {
|
|
9
9
|
type: "START";
|
|
10
10
|
} | {
|
|
11
11
|
type: "CAPTURE";
|
|
@@ -18,52 +18,52 @@ declare const documentUploadMachine: xstate67.StateMachine<DocumentUploadContext
|
|
|
18
18
|
} | {
|
|
19
19
|
type: "CLOSE";
|
|
20
20
|
}, {
|
|
21
|
-
[x: string]:
|
|
21
|
+
[x: string]: xstate0.ActorRefFromLogic<xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>> | xstate0.ActorRefFromLogic<xstate0.PromiseActorLogic<void, {
|
|
22
22
|
imageBase64: string;
|
|
23
23
|
documentType: string;
|
|
24
24
|
onProgress: (progress: number) => void;
|
|
25
|
-
},
|
|
26
|
-
},
|
|
25
|
+
}, xstate0.EventObject>> | undefined;
|
|
26
|
+
}, xstate0.Values<{
|
|
27
27
|
initCamera: {
|
|
28
28
|
src: "initCamera";
|
|
29
|
-
logic:
|
|
29
|
+
logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
|
|
30
30
|
id: string | undefined;
|
|
31
31
|
};
|
|
32
32
|
uploadDocument: {
|
|
33
33
|
src: "uploadDocument";
|
|
34
|
-
logic:
|
|
34
|
+
logic: xstate0.PromiseActorLogic<void, {
|
|
35
35
|
imageBase64: string;
|
|
36
36
|
documentType: string;
|
|
37
37
|
onProgress: (progress: number) => void;
|
|
38
|
-
},
|
|
38
|
+
}, xstate0.EventObject>;
|
|
39
39
|
id: string | undefined;
|
|
40
40
|
};
|
|
41
|
-
}>,
|
|
42
|
-
setError: {
|
|
43
|
-
type: "setError";
|
|
44
|
-
params: xstate67.NonReducibleUnknown;
|
|
45
|
-
};
|
|
46
|
-
clearError: {
|
|
47
|
-
type: "clearError";
|
|
48
|
-
params: xstate67.NonReducibleUnknown;
|
|
49
|
-
};
|
|
41
|
+
}>, xstate0.Values<{
|
|
50
42
|
setStream: {
|
|
51
43
|
type: "setStream";
|
|
52
|
-
params:
|
|
44
|
+
params: xstate0.NonReducibleUnknown;
|
|
53
45
|
};
|
|
54
46
|
setImageAndClearError: {
|
|
55
47
|
type: "setImageAndClearError";
|
|
56
|
-
params:
|
|
48
|
+
params: xstate0.NonReducibleUnknown;
|
|
57
49
|
};
|
|
58
50
|
setProgress: {
|
|
59
51
|
type: "setProgress";
|
|
60
|
-
params:
|
|
52
|
+
params: xstate0.NonReducibleUnknown;
|
|
53
|
+
};
|
|
54
|
+
setError: {
|
|
55
|
+
type: "setError";
|
|
56
|
+
params: xstate0.NonReducibleUnknown;
|
|
57
|
+
};
|
|
58
|
+
clearError: {
|
|
59
|
+
type: "clearError";
|
|
60
|
+
params: xstate0.NonReducibleUnknown;
|
|
61
61
|
};
|
|
62
62
|
stopStream: {
|
|
63
63
|
type: "stopStream";
|
|
64
|
-
params:
|
|
64
|
+
params: xstate0.NonReducibleUnknown;
|
|
65
65
|
};
|
|
66
|
-
}>, never, never, "error" | "
|
|
66
|
+
}>, never, never, "error" | "initCamera" | "idle" | "capturing" | "closed" | "uploading" | "finished", string, DocumentUploadInput, xstate0.NonReducibleUnknown, xstate0.EventObject, xstate0.MetaObject, {
|
|
67
67
|
readonly id: "documentUpload";
|
|
68
68
|
readonly initial: "idle";
|
|
69
69
|
readonly context: ({
|
|
@@ -72,67 +72,67 @@ declare const documentUploadMachine: xstate67.StateMachine<DocumentUploadContext
|
|
|
72
72
|
spawn: {
|
|
73
73
|
<TSrc extends "initCamera" | "uploadDocument">(logic: TSrc, ...[options]: ({
|
|
74
74
|
src: "initCamera";
|
|
75
|
-
logic:
|
|
75
|
+
logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
|
|
76
76
|
id: string | undefined;
|
|
77
77
|
} extends infer T ? T extends {
|
|
78
78
|
src: "initCamera";
|
|
79
|
-
logic:
|
|
79
|
+
logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
|
|
80
80
|
id: string | undefined;
|
|
81
81
|
} ? T extends {
|
|
82
82
|
src: TSrc;
|
|
83
|
-
} ?
|
|
83
|
+
} ? xstate0.ConditionalRequired<[options?: ({
|
|
84
84
|
id?: T["id"] | undefined;
|
|
85
85
|
systemId?: string;
|
|
86
|
-
input?:
|
|
86
|
+
input?: xstate0.InputFrom<T["logic"]> | undefined;
|
|
87
87
|
syncSnapshot?: boolean;
|
|
88
|
-
} & { [K in
|
|
88
|
+
} & { [K in xstate0.RequiredActorOptions<T>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
89
89
|
src: "uploadDocument";
|
|
90
|
-
logic:
|
|
90
|
+
logic: xstate0.PromiseActorLogic<void, {
|
|
91
91
|
imageBase64: string;
|
|
92
92
|
documentType: string;
|
|
93
93
|
onProgress: (progress: number) => void;
|
|
94
|
-
},
|
|
94
|
+
}, xstate0.EventObject>;
|
|
95
95
|
id: string | undefined;
|
|
96
96
|
} extends infer T_1 ? T_1 extends {
|
|
97
97
|
src: "uploadDocument";
|
|
98
|
-
logic:
|
|
98
|
+
logic: xstate0.PromiseActorLogic<void, {
|
|
99
99
|
imageBase64: string;
|
|
100
100
|
documentType: string;
|
|
101
101
|
onProgress: (progress: number) => void;
|
|
102
|
-
},
|
|
102
|
+
}, xstate0.EventObject>;
|
|
103
103
|
id: string | undefined;
|
|
104
104
|
} ? T_1 extends {
|
|
105
105
|
src: TSrc;
|
|
106
|
-
} ?
|
|
106
|
+
} ? xstate0.ConditionalRequired<[options?: ({
|
|
107
107
|
id?: T_1["id"] | undefined;
|
|
108
108
|
systemId?: string;
|
|
109
|
-
input?:
|
|
109
|
+
input?: xstate0.InputFrom<T_1["logic"]> | undefined;
|
|
110
110
|
syncSnapshot?: boolean;
|
|
111
|
-
} & { [K_1 in
|
|
111
|
+
} & { [K_1 in xstate0.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredActorOptions<T_1>>> : never : never : never)): xstate0.ActorRefFromLogic<xstate0.GetConcreteByKey<xstate0.Values<{
|
|
112
112
|
initCamera: {
|
|
113
113
|
src: "initCamera";
|
|
114
|
-
logic:
|
|
114
|
+
logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
|
|
115
115
|
id: string | undefined;
|
|
116
116
|
};
|
|
117
117
|
uploadDocument: {
|
|
118
118
|
src: "uploadDocument";
|
|
119
|
-
logic:
|
|
119
|
+
logic: xstate0.PromiseActorLogic<void, {
|
|
120
120
|
imageBase64: string;
|
|
121
121
|
documentType: string;
|
|
122
122
|
onProgress: (progress: number) => void;
|
|
123
|
-
},
|
|
123
|
+
}, xstate0.EventObject>;
|
|
124
124
|
id: string | undefined;
|
|
125
125
|
};
|
|
126
126
|
}>, "src", TSrc>["logic"]>;
|
|
127
|
-
<TLogic extends
|
|
127
|
+
<TLogic extends xstate0.AnyActorLogic>(src: TLogic, ...[options]: xstate0.ConditionalRequired<[options?: ({
|
|
128
128
|
id?: never;
|
|
129
129
|
systemId?: string;
|
|
130
|
-
input?:
|
|
130
|
+
input?: xstate0.InputFrom<TLogic> | undefined;
|
|
131
131
|
syncSnapshot?: boolean;
|
|
132
|
-
} & { [K in
|
|
132
|
+
} & { [K in xstate0.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredLogicInput<TLogic>>>): xstate0.ActorRefFromLogic<TLogic>;
|
|
133
133
|
};
|
|
134
134
|
input: DocumentUploadInput;
|
|
135
|
-
self:
|
|
135
|
+
self: xstate0.ActorRef<xstate0.MachineSnapshot<DocumentUploadContext, {
|
|
136
136
|
type: "START";
|
|
137
137
|
} | {
|
|
138
138
|
type: "CAPTURE";
|
|
@@ -144,7 +144,7 @@ declare const documentUploadMachine: xstate67.StateMachine<DocumentUploadContext
|
|
|
144
144
|
type: "RETRY";
|
|
145
145
|
} | {
|
|
146
146
|
type: "CLOSE";
|
|
147
|
-
}, Record<string,
|
|
147
|
+
}, Record<string, xstate0.AnyActorRef | undefined>, xstate0.StateValue, string, unknown, any, any>, {
|
|
148
148
|
type: "START";
|
|
149
149
|
} | {
|
|
150
150
|
type: "CAPTURE";
|
|
@@ -156,7 +156,7 @@ declare const documentUploadMachine: xstate67.StateMachine<DocumentUploadContext
|
|
|
156
156
|
type: "RETRY";
|
|
157
157
|
} | {
|
|
158
158
|
type: "CLOSE";
|
|
159
|
-
},
|
|
159
|
+
}, xstate0.AnyEventObject>;
|
|
160
160
|
}) => {
|
|
161
161
|
config: DocumentUploadConfig;
|
|
162
162
|
stream: undefined;
|
|
@@ -226,7 +226,7 @@ declare const documentUploadMachine: xstate67.StateMachine<DocumentUploadContext
|
|
|
226
226
|
} | {
|
|
227
227
|
type: "CLOSE";
|
|
228
228
|
};
|
|
229
|
-
self:
|
|
229
|
+
self: xstate0.ActorRef<xstate0.MachineSnapshot<DocumentUploadContext, {
|
|
230
230
|
type: "START";
|
|
231
231
|
} | {
|
|
232
232
|
type: "CAPTURE";
|
|
@@ -238,7 +238,7 @@ declare const documentUploadMachine: xstate67.StateMachine<DocumentUploadContext
|
|
|
238
238
|
type: "RETRY";
|
|
239
239
|
} | {
|
|
240
240
|
type: "CLOSE";
|
|
241
|
-
}, Record<string,
|
|
241
|
+
}, Record<string, xstate0.AnyActorRef>, xstate0.StateValue, string, unknown, any, any>, {
|
|
242
242
|
type: "START";
|
|
243
243
|
} | {
|
|
244
244
|
type: "CAPTURE";
|
|
@@ -250,7 +250,7 @@ declare const documentUploadMachine: xstate67.StateMachine<DocumentUploadContext
|
|
|
250
250
|
type: "RETRY";
|
|
251
251
|
} | {
|
|
252
252
|
type: "CLOSE";
|
|
253
|
-
},
|
|
253
|
+
}, xstate0.AnyEventObject>;
|
|
254
254
|
}) => {
|
|
255
255
|
imageBase64: string;
|
|
256
256
|
documentType: string;
|