@incodetech/core 0.0.0-dev-20260512-e44bacb → 0.0.0-dev-20260512-95ef244
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/ae-signature.d.ts +1 -1
- package/dist/consent.d.ts +50 -50
- package/dist/cpf-ocr.d.ts +17 -17
- package/dist/document-capture.d.ts +76 -76
- package/dist/document-upload.d.ts +46 -46
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybStateMachine-Cq7M50sN.esm.js → ekybStateMachine-DeQU4Shn.esm.js} +1 -1
- package/dist/electronic-signature.d.ts +1 -1
- package/dist/extensibility.d.ts +1 -1
- package/dist/extensibility.esm.js +3 -3
- package/dist/flow.d.ts +2 -2
- package/dist/flow.esm.js +2 -2
- package/dist/{flowServices-CLnM71N7.esm.js → flowServices-CpdnbZ2S.esm.js} +1 -1
- package/dist/home.d.ts +10 -10
- package/dist/id.d.ts +1 -1
- package/dist/id.esm.js +3 -3
- package/dist/{idCaptureManager-vkJ6QLuk.esm.js → idCaptureManager-74SoNR3l.esm.js} +64 -1
- package/dist/{idCaptureManager-C4xBRJNt.d.ts → idCaptureManager-DiFBYm7h.d.ts} +43 -1
- package/dist/{idCaptureStateMachine-C94NHeR2.esm.js → idCaptureStateMachine-YNISzeyJ.esm.js} +355 -11
- package/dist/identity-reuse.d.ts +40 -40
- package/dist/{index-CNrrk1gH.d.ts → index-B58eizRV.d.ts} +119 -119
- package/dist/index.esm.js +2 -2
- package/dist/mandatory-consent.d.ts +50 -50
- package/dist/qe-signature.d.ts +1 -1
- package/dist/{session-DWFMKdX6.esm.js → session-BuTr4wgh.esm.js} +1 -1
- package/dist/session.esm.js +1 -1
- package/dist/{setup-h75-vL1d.esm.js → setup-DKHwPajl.esm.js} +1 -1
- package/dist/wasm.esm.js +2 -2
- package/dist/workflow.d.ts +84 -84
- package/dist/workflow.esm.js +4 -4
- package/package.json +3 -3
package/dist/flow.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { i as FlowModuleConfig, n as Flow, r as FlowModule } from "./types-BA181
|
|
|
7
7
|
import { n as GetFinishStatusFn, t as FinishStatus } from "./flowCompletionService-C376JZwA.js";
|
|
8
8
|
import { o as FlowEventSubscribable } from "./index-CmFkidgy.js";
|
|
9
9
|
import { t as ModuleRegistry } from "./types-WKAQ7Ai4.js";
|
|
10
|
-
import * as
|
|
10
|
+
import * as xstate454 from "xstate";
|
|
11
11
|
|
|
12
12
|
//#region src/modules/flow/flowUtils.d.ts
|
|
13
13
|
type NormalizeFlowModulesOptions = {
|
|
@@ -55,7 +55,7 @@ type GetFlow = (signal: AbortSignal, options?: GetFlowOptions) => Promise<Flow>;
|
|
|
55
55
|
declare const getFlow: GetFlow;
|
|
56
56
|
//#endregion
|
|
57
57
|
//#region src/modules/flow/noOpFlowModuleMachine.d.ts
|
|
58
|
-
declare const noOpFlowModuleMachine:
|
|
58
|
+
declare const noOpFlowModuleMachine: xstate454.StateMachine<xstate454.MachineContext, xstate454.AnyEventObject, {}, never, never, never, never, "finished", string, xstate454.NonReducibleUnknown, xstate454.NonReducibleUnknown, xstate454.EventObject, xstate454.MetaObject, {
|
|
59
59
|
readonly id: "noOpFlowModule";
|
|
60
60
|
readonly initial: "finished";
|
|
61
61
|
readonly states: {
|
package/dist/flow.esm.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "./api-eqRXuVG-.esm.js";
|
|
2
2
|
import "./events-Bt1azl2B.esm.js";
|
|
3
3
|
import "./endpoints-B3V1U9Dg.esm.js";
|
|
4
|
-
import "./session-
|
|
4
|
+
import "./session-BuTr4wgh.esm.js";
|
|
5
5
|
import "./IpifyProvider-ByL6JYxg.esm.js";
|
|
6
6
|
import "./browserSimulation-CAH-V_iE.esm.js";
|
|
7
7
|
import { a as fromPromise, o as createActor, r as assign, s as createManager, t as setup } from "./xstate.esm-7GmmAwg6.esm.js";
|
|
8
|
-
import { n as getRequiredWasmPipelines, r as normalizeFlowModules, t as getFlow } from "./flowServices-
|
|
8
|
+
import { n as getRequiredWasmPipelines, r as normalizeFlowModules, t as getFlow } from "./flowServices-CpdnbZ2S.esm.js";
|
|
9
9
|
import { n as attachFlowEventEmitter, t as runChildModule } from "./runChildModule-B16ocpd4.esm.js";
|
|
10
10
|
import { t as getFinishStatus } from "./flowCompletionService-BuVIVPT_.esm.js";
|
|
11
11
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as api } from "./api-eqRXuVG-.esm.js";
|
|
2
2
|
import { t as endpoints } from "./endpoints-B3V1U9Dg.esm.js";
|
|
3
|
-
import { n as getSessionFingerprintResult, r as initializeSession } from "./session-
|
|
3
|
+
import { n as getSessionFingerprintResult, r as initializeSession } from "./session-BuTr4wgh.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/flow/flowUtils.ts
|
|
6
6
|
const WASM_MODULE_PIPELINES = {
|
package/dist/home.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { t as Manager } from "./Manager-D9pehGyp.js";
|
|
|
2
2
|
import "./camera-B6UAKpM1.js";
|
|
3
3
|
import "./types-DJSt3Ovt.js";
|
|
4
4
|
import { t as EmptyConfig } from "./types-BA181GDD.js";
|
|
5
|
-
import * as
|
|
5
|
+
import * as xstate756 from "xstate";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/home/types.d.ts
|
|
8
8
|
type HomeConfig = EmptyConfig;
|
|
@@ -34,41 +34,41 @@ type HomeContext = {
|
|
|
34
34
|
type HomeInput = {
|
|
35
35
|
config: EmptyConfig;
|
|
36
36
|
};
|
|
37
|
-
declare const homeMachine:
|
|
37
|
+
declare const homeMachine: xstate756.StateMachine<HomeContext, {
|
|
38
38
|
type: "LOAD";
|
|
39
39
|
} | {
|
|
40
40
|
type: "COMPLETE";
|
|
41
41
|
} | {
|
|
42
42
|
type: "RESET";
|
|
43
|
-
}, {}, never, never, never, never, "idle" | "finished" | "main", string, HomeInput,
|
|
43
|
+
}, {}, never, never, never, never, "idle" | "finished" | "main", string, HomeInput, xstate756.NonReducibleUnknown, xstate756.EventObject, xstate756.MetaObject, {
|
|
44
44
|
readonly id: "home";
|
|
45
45
|
readonly initial: "idle";
|
|
46
46
|
readonly context: ({
|
|
47
47
|
input
|
|
48
48
|
}: {
|
|
49
49
|
spawn: {
|
|
50
|
-
<TSrc extends never>(logic: TSrc, ...[options]: never):
|
|
51
|
-
<TLogic extends
|
|
50
|
+
<TSrc extends never>(logic: TSrc, ...[options]: never): xstate756.ActorRefFromLogic<never>;
|
|
51
|
+
<TLogic extends xstate756.AnyActorLogic>(src: TLogic, ...[options]: xstate756.ConditionalRequired<[options?: ({
|
|
52
52
|
id?: never;
|
|
53
53
|
systemId?: string;
|
|
54
|
-
input?:
|
|
54
|
+
input?: xstate756.InputFrom<TLogic> | undefined;
|
|
55
55
|
syncSnapshot?: boolean;
|
|
56
|
-
} & { [K in
|
|
56
|
+
} & { [K in xstate756.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate756.IsNotNever<xstate756.RequiredLogicInput<TLogic>>>): xstate756.ActorRefFromLogic<TLogic>;
|
|
57
57
|
};
|
|
58
58
|
input: HomeInput;
|
|
59
|
-
self:
|
|
59
|
+
self: xstate756.ActorRef<xstate756.MachineSnapshot<HomeContext, {
|
|
60
60
|
type: "LOAD";
|
|
61
61
|
} | {
|
|
62
62
|
type: "COMPLETE";
|
|
63
63
|
} | {
|
|
64
64
|
type: "RESET";
|
|
65
|
-
}, Record<string,
|
|
65
|
+
}, Record<string, xstate756.AnyActorRef | undefined>, xstate756.StateValue, string, unknown, any, any>, {
|
|
66
66
|
type: "LOAD";
|
|
67
67
|
} | {
|
|
68
68
|
type: "COMPLETE";
|
|
69
69
|
} | {
|
|
70
70
|
type: "RESET";
|
|
71
|
-
},
|
|
71
|
+
}, xstate756.AnyEventObject>;
|
|
72
72
|
}) => {
|
|
73
73
|
config: EmptyConfig;
|
|
74
74
|
};
|
package/dist/id.d.ts
CHANGED
|
@@ -7,5 +7,5 @@ import "./types-DJSt3Ovt.js";
|
|
|
7
7
|
import "./types-BA181GDD.js";
|
|
8
8
|
import "./deepsightService-CGSDjjBz.js";
|
|
9
9
|
import { n as PermissionStatus, t as PermissionResult } from "./types-CarMMtoz.js";
|
|
10
|
-
import { A as IdCaptureConfig, B as IdErrorCode, C as IdCaptureMachine, D as DetectionArea, E as CapturedImage, F as IdCaptureInput, G as MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, H as RecordingSession, I as IdCaptureMode, J as ManualUploadSide, K as MANUAL_UPLOAD_MAX_RETRIES, L as IdCaptureThresholds, M as IdCaptureDependencies, N as IdCaptureEvent, O as DetectionStatus, P as IdCaptureGeometry, R as IdDocumentType, S as createIdCaptureActor, T as CaptureIdResponse, U as UploadIdResponse, V as IdFlowStep, W as MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, X as DetectionOrientation, Y as ManualUploadTab, Z as IdCaptureSettings, _ as uploadIdImage, a as IdCaptureInitResult, b as CreateIdCaptureActorOptions, c as UploadIdImageParams, d as initializeIdCapture, f as preloadIdRecordingProvider, g as stopStream, h as stopRecording, j as IdCaptureContext, k as ID_ERROR_CODES, l as UploadManualIdFileParams, m as startRecordingSession, n as IdCaptureState, o as InitializeIdCaptureParams, p as processId, q as ManualUploadContext, r as createIdCaptureManager, s as StartRecordingParams, t as IdCaptureManager, u as ValidationError, v as uploadManualIdFile, w as idCaptureMachine, x as IdCaptureActor, y as validateUploadResponse, z as IdError } from "./idCaptureManager-
|
|
10
|
+
import { A as IdCaptureConfig, B as IdErrorCode, C as IdCaptureMachine, D as DetectionArea, E as CapturedImage, F as IdCaptureInput, G as MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, H as RecordingSession, I as IdCaptureMode, J as ManualUploadSide, K as MANUAL_UPLOAD_MAX_RETRIES, L as IdCaptureThresholds, M as IdCaptureDependencies, N as IdCaptureEvent, O as DetectionStatus, P as IdCaptureGeometry, R as IdDocumentType, S as createIdCaptureActor, T as CaptureIdResponse, U as UploadIdResponse, V as IdFlowStep, W as MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, X as DetectionOrientation, Y as ManualUploadTab, Z as IdCaptureSettings, _ as uploadIdImage, a as IdCaptureInitResult, b as CreateIdCaptureActorOptions, c as UploadIdImageParams, d as initializeIdCapture, f as preloadIdRecordingProvider, g as stopStream, h as stopRecording, j as IdCaptureContext, k as ID_ERROR_CODES, l as UploadManualIdFileParams, m as startRecordingSession, n as IdCaptureState, o as InitializeIdCaptureParams, p as processId, q as ManualUploadContext, r as createIdCaptureManager, s as StartRecordingParams, t as IdCaptureManager, u as ValidationError, v as uploadManualIdFile, w as idCaptureMachine, x as IdCaptureActor, y as validateUploadResponse, z as IdError } from "./idCaptureManager-DiFBYm7h.js";
|
|
11
11
|
export { CameraStream, CaptureIdResponse, CapturedImage, type CreateIdCaptureActorOptions, DetectionArea, DetectionOrientation, DetectionStatus, ID_ERROR_CODES, type IdCaptureActor, IdCaptureConfig, type IdCaptureContext, IdCaptureDependencies, type IdCaptureEvent, IdCaptureGeometry, IdCaptureInitResult, type IdCaptureInput, type IdCaptureMachine, type IdCaptureManager, IdCaptureMode, IdCaptureSettings, type IdCaptureState, IdCaptureThresholds, IdDocumentType, IdError, IdErrorCode, IdFlowStep, InitializeIdCaptureParams, MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, MANUAL_UPLOAD_MAX_RETRIES, ManualUploadContext, ManualUploadSide, ManualUploadTab, PermissionResult, PermissionStatus, RecordingSession, StartRecordingParams, UploadIdImageParams, UploadIdResponse, UploadManualIdFileParams, ValidationError, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, preloadIdRecordingProvider, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, uploadManualIdFile, validateUploadResponse };
|
package/dist/id.esm.js
CHANGED
|
@@ -3,7 +3,7 @@ import "./BrowserTimerProvider-BZGH3sYJ.esm.js";
|
|
|
3
3
|
import "./api-eqRXuVG-.esm.js";
|
|
4
4
|
import "./events-Bt1azl2B.esm.js";
|
|
5
5
|
import "./endpoints-B3V1U9Dg.esm.js";
|
|
6
|
-
import "./session-
|
|
6
|
+
import "./session-BuTr4wgh.esm.js";
|
|
7
7
|
import "./IpifyProvider-ByL6JYxg.esm.js";
|
|
8
8
|
import "./browserSimulation-CAH-V_iE.esm.js";
|
|
9
9
|
import "./xstate.esm-7GmmAwg6.esm.js";
|
|
@@ -19,7 +19,7 @@ import "./platform-Dpzd9p3X.esm.js";
|
|
|
19
19
|
import "./ITimerCapability-2pw-S97e.esm.js";
|
|
20
20
|
import "./backCameraStream-DWZ1cNVA.esm.js";
|
|
21
21
|
import "./getDeviceClass-DmoqR7G2.esm.js";
|
|
22
|
-
import { a as
|
|
23
|
-
import { r as createIdCaptureActor, t as createIdCaptureManager } from "./idCaptureManager-
|
|
22
|
+
import { a as preloadIdRecordingProvider, c as stopRecording, d as uploadManualIdFile, f as validateUploadResponse, g as MANUAL_UPLOAD_MAX_RETRIES, h as MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, i as initializeIdCapture, l as stopStream, m as MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, o as processId, p as ID_ERROR_CODES, s as startRecordingSession, t as idCaptureMachine, u as uploadIdImage } from "./idCaptureStateMachine-YNISzeyJ.esm.js";
|
|
23
|
+
import { r as createIdCaptureActor, t as createIdCaptureManager } from "./idCaptureManager-74SoNR3l.esm.js";
|
|
24
24
|
|
|
25
25
|
export { ID_ERROR_CODES, MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, MANUAL_UPLOAD_MAX_RETRIES, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, preloadIdRecordingProvider, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, uploadManualIdFile, validateUploadResponse };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Bt1azl2B.esm.js";
|
|
2
2
|
import { o as createActor, s as createManager } from "./xstate.esm-7GmmAwg6.esm.js";
|
|
3
3
|
import { t as BrowserStorageProvider } from "./BrowserStorageProvider-CoUfuy0u.esm.js";
|
|
4
|
-
import {
|
|
4
|
+
import { g as MANUAL_UPLOAD_MAX_RETRIES, n as mapDigitalIdScreenName, r as DIGITAL_UPLOAD_MAX_RETRIES, t as idCaptureMachine } from "./idCaptureStateMachine-YNISzeyJ.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/id/idCaptureActor.ts
|
|
7
7
|
function createIdCaptureActor(options) {
|
|
@@ -176,6 +176,32 @@ function mapManualUploadState(snapshot) {
|
|
|
176
176
|
errorKey: childCtx?.errorMessage ?? null
|
|
177
177
|
};
|
|
178
178
|
}
|
|
179
|
+
function mapDigitalUploadState(snapshot) {
|
|
180
|
+
const childSnapshot = snapshot.children["digitalIdUpload"]?.getSnapshot();
|
|
181
|
+
const childCtx = childSnapshot?.context;
|
|
182
|
+
const childValue = childSnapshot?.value;
|
|
183
|
+
return {
|
|
184
|
+
status: "digitalIdUpload",
|
|
185
|
+
phase: (() => {
|
|
186
|
+
if (childValue === "tutorial") return "tutorial";
|
|
187
|
+
if (childValue === "selecting") return "selecting";
|
|
188
|
+
if (childValue === "reviewing") return "reviewing";
|
|
189
|
+
if (childValue === "success") return "success";
|
|
190
|
+
if (childValue === "error") return "error";
|
|
191
|
+
if (childValue === "fileTooLarge") return "fileTooLarge";
|
|
192
|
+
if (childValue === "retriesExhausted") return "exhausted";
|
|
193
|
+
if (childSnapshot?.matches({ uploading: "holding" })) return "holding";
|
|
194
|
+
if (childSnapshot?.matches({ uploading: "analyzing" })) return "uploading";
|
|
195
|
+
return "selecting";
|
|
196
|
+
})(),
|
|
197
|
+
file: childCtx?.file ?? null,
|
|
198
|
+
fileName: childCtx?.file?.name,
|
|
199
|
+
failReason: childCtx?.failReason ?? null,
|
|
200
|
+
attemptsRemaining: childCtx?.attemptsRemaining ?? DIGITAL_UPLOAD_MAX_RETRIES,
|
|
201
|
+
uploadProgress: childCtx?.uploadProgress ?? 0,
|
|
202
|
+
pickerRequestId: childCtx?.pickerRequestId ?? 0
|
|
203
|
+
};
|
|
204
|
+
}
|
|
179
205
|
function mapState(snapshot) {
|
|
180
206
|
const { context } = snapshot;
|
|
181
207
|
if (snapshot.matches("idle")) return { status: "idle" };
|
|
@@ -218,6 +244,7 @@ function mapState(snapshot) {
|
|
|
218
244
|
error: context.error ?? "Unknown error"
|
|
219
245
|
};
|
|
220
246
|
if (snapshot.matches("manualIdUpload")) return mapManualUploadState(snapshot);
|
|
247
|
+
if (snapshot.matches("digitalIdUpload")) return mapDigitalUploadState(snapshot);
|
|
221
248
|
return { status: "idle" };
|
|
222
249
|
}
|
|
223
250
|
function createApi({ actor, trackElementClicked, trackCaptureAttemptFinished }) {
|
|
@@ -321,6 +348,37 @@ function createApi({ actor, trackElementClicked, trackCaptureAttemptFinished })
|
|
|
321
348
|
manualUploadReset() {
|
|
322
349
|
trackElementClicked?.("manualUpload.reset");
|
|
323
350
|
actor.send({ type: "MANUAL_UPLOAD_RESET" });
|
|
351
|
+
},
|
|
352
|
+
digitalUploadNextStep() {
|
|
353
|
+
trackElementClicked?.("digitalUpload.nextStep");
|
|
354
|
+
actor.send({ type: "DIGITAL_UPLOAD_NEXT_STEP" });
|
|
355
|
+
},
|
|
356
|
+
digitalUploadPickFile(file) {
|
|
357
|
+
trackElementClicked?.("digitalUpload.pickFile");
|
|
358
|
+
actor.send({
|
|
359
|
+
type: "DIGITAL_UPLOAD_FILE_PICKED",
|
|
360
|
+
file
|
|
361
|
+
});
|
|
362
|
+
},
|
|
363
|
+
digitalUploadConfirm() {
|
|
364
|
+
trackElementClicked?.("digitalUpload.confirmFile");
|
|
365
|
+
actor.send({ type: "DIGITAL_UPLOAD_CONFIRM" });
|
|
366
|
+
},
|
|
367
|
+
digitalUploadReplace() {
|
|
368
|
+
trackElementClicked?.("digitalUpload.replaceFile");
|
|
369
|
+
actor.send({ type: "DIGITAL_UPLOAD_REPLACE" });
|
|
370
|
+
},
|
|
371
|
+
digitalUploadRetry() {
|
|
372
|
+
trackElementClicked?.("digitalUpload.retry");
|
|
373
|
+
actor.send({ type: "DIGITAL_UPLOAD_RETRY" });
|
|
374
|
+
},
|
|
375
|
+
digitalUploadScanInstead() {
|
|
376
|
+
trackElementClicked?.("digitalUpload.scanInstead");
|
|
377
|
+
actor.send({ type: "DIGITAL_UPLOAD_SCAN_INSTEAD" });
|
|
378
|
+
},
|
|
379
|
+
digitalUploadChooseAnother() {
|
|
380
|
+
trackElementClicked?.("digitalUpload.chooseAnother");
|
|
381
|
+
actor.send({ type: "DIGITAL_UPLOAD_CHOOSE_ANOTHER" });
|
|
324
382
|
}
|
|
325
383
|
};
|
|
326
384
|
}
|
|
@@ -454,6 +512,11 @@ function getIdCaptureScreenName(snapshot) {
|
|
|
454
512
|
case "finished": return "idCapture.finished";
|
|
455
513
|
case "closed": return "idCapture.closed";
|
|
456
514
|
case "error": return "idCapture.error";
|
|
515
|
+
case "digitalIdUpload": {
|
|
516
|
+
const child = snapshot.children["digitalIdUpload"]?.getSnapshot();
|
|
517
|
+
const childContext = child?.context;
|
|
518
|
+
return mapDigitalIdScreenName(child?.value, childContext?.failReason ?? null);
|
|
519
|
+
}
|
|
457
520
|
default: return `idCapture.${topLevel}`;
|
|
458
521
|
}
|
|
459
522
|
}
|
|
@@ -469,6 +469,21 @@ type IdCaptureEvent = {
|
|
|
469
469
|
type: 'MANUAL_UPLOAD_CONTINUE';
|
|
470
470
|
} | {
|
|
471
471
|
type: 'MANUAL_UPLOAD_RESET';
|
|
472
|
+
} | {
|
|
473
|
+
type: 'DIGITAL_UPLOAD_NEXT_STEP';
|
|
474
|
+
} | {
|
|
475
|
+
type: 'DIGITAL_UPLOAD_FILE_PICKED';
|
|
476
|
+
file: File;
|
|
477
|
+
} | {
|
|
478
|
+
type: 'DIGITAL_UPLOAD_CONFIRM';
|
|
479
|
+
} | {
|
|
480
|
+
type: 'DIGITAL_UPLOAD_REPLACE';
|
|
481
|
+
} | {
|
|
482
|
+
type: 'DIGITAL_UPLOAD_RETRY';
|
|
483
|
+
} | {
|
|
484
|
+
type: 'DIGITAL_UPLOAD_SCAN_INSTEAD';
|
|
485
|
+
} | {
|
|
486
|
+
type: 'DIGITAL_UPLOAD_CHOOSE_ANOTHER';
|
|
472
487
|
};
|
|
473
488
|
type IdCaptureDependencies = {
|
|
474
489
|
storage: IStorageCapability;
|
|
@@ -582,6 +597,9 @@ type UploadManualIdFileParams = {
|
|
|
582
597
|
*/
|
|
583
598
|
declare function uploadManualIdFile(params: UploadManualIdFileParams): Promise<UploadIdResponse>;
|
|
584
599
|
//#endregion
|
|
600
|
+
//#region src/modules/id/digitalUpload/types.d.ts
|
|
601
|
+
type DigitalUploadFailReason = 'DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED' | 'ID_TYPE_UNACCEPTABLE' | 'FILE_CHANGED_ERROR' | 'INVALID_FILE_TYPE' | 'NETWORK_ERROR' | 'GENERIC';
|
|
602
|
+
//#endregion
|
|
585
603
|
//#region src/modules/id/idCaptureManager.d.ts
|
|
586
604
|
type CaptureStatus = 'initializing' | 'detecting' | 'capturing' | 'uploading' | 'uploadError' | 'success';
|
|
587
605
|
type IdCaptureIdleState = {
|
|
@@ -679,7 +697,17 @@ type IdCaptureManualUploadState = {
|
|
|
679
697
|
/** i18n key for the current error message, if any. */
|
|
680
698
|
errorKey: string | null;
|
|
681
699
|
};
|
|
682
|
-
type
|
|
700
|
+
type IdCaptureDigitalUploadState = {
|
|
701
|
+
status: 'digitalIdUpload';
|
|
702
|
+
phase: 'tutorial' | 'selecting' | 'reviewing' | 'uploading' | 'holding' | 'success' | 'error' | 'fileTooLarge' | 'exhausted';
|
|
703
|
+
file: File | null;
|
|
704
|
+
fileName: string | undefined;
|
|
705
|
+
failReason: DigitalUploadFailReason | null;
|
|
706
|
+
attemptsRemaining: number;
|
|
707
|
+
uploadProgress: number;
|
|
708
|
+
pickerRequestId: number;
|
|
709
|
+
};
|
|
710
|
+
type IdCaptureState = IdCaptureIdleState | IdCaptureChooserState | IdCaptureLoadingState | IdCaptureTutorialState | IdCaptureAgeVerificationState | IdCapturePermissionsState | IdCaptureCaptureState | IdCaptureMandatoryConsentState | IdCaptureFrontFinishedState | IdCaptureBackFinishedState | IdCaptureProcessingState | IdCaptureExpiredState | IdCaptureFinishedState | IdCaptureClosedState | IdCaptureErrorState | IdCaptureManualUploadState | IdCaptureDigitalUploadState;
|
|
683
711
|
declare function createIdCaptureManager(options: CreateIdCaptureActorOptions): Manager<IdCaptureState> & {
|
|
684
712
|
load(): void;
|
|
685
713
|
selectDocument(documentType: IdDocumentType): void;
|
|
@@ -714,6 +742,13 @@ declare function createIdCaptureManager(options: CreateIdCaptureActorOptions): M
|
|
|
714
742
|
manualUploadSelectFile(side: ManualUploadSide, file: File): void;
|
|
715
743
|
manualUploadContinue(): void;
|
|
716
744
|
manualUploadReset(): void;
|
|
745
|
+
digitalUploadNextStep(): void;
|
|
746
|
+
digitalUploadPickFile(file: File): void;
|
|
747
|
+
digitalUploadConfirm(): void;
|
|
748
|
+
digitalUploadReplace(): void;
|
|
749
|
+
digitalUploadRetry(): void;
|
|
750
|
+
digitalUploadScanInstead(): void;
|
|
751
|
+
digitalUploadChooseAnother(): void;
|
|
717
752
|
};
|
|
718
753
|
declare function createIdCaptureManagerFromActor(actor: IdCaptureActor): Manager<IdCaptureState> & {
|
|
719
754
|
load(): void;
|
|
@@ -749,6 +784,13 @@ declare function createIdCaptureManagerFromActor(actor: IdCaptureActor): Manager
|
|
|
749
784
|
manualUploadSelectFile(side: ManualUploadSide, file: File): void;
|
|
750
785
|
manualUploadContinue(): void;
|
|
751
786
|
manualUploadReset(): void;
|
|
787
|
+
digitalUploadNextStep(): void;
|
|
788
|
+
digitalUploadPickFile(file: File): void;
|
|
789
|
+
digitalUploadConfirm(): void;
|
|
790
|
+
digitalUploadReplace(): void;
|
|
791
|
+
digitalUploadRetry(): void;
|
|
792
|
+
digitalUploadScanInstead(): void;
|
|
793
|
+
digitalUploadChooseAnother(): void;
|
|
752
794
|
};
|
|
753
795
|
type IdCaptureManager = ReturnType<typeof createIdCaptureManager>;
|
|
754
796
|
//#endregion
|