@incodetech/core 0.0.0-dev-20260504-8289e2f → 0.0.0-dev-20260505-23151a2
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/authentication.d.ts +2 -2
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-Cv8f-EY0.d.ts → authenticationManager-CQz8LKMD.d.ts} +1 -1
- package/dist/{authenticationManager-q_PFIkEl.esm.js → authenticationManager-D2cV2RYg.esm.js} +1 -1
- package/dist/consent.d.ts +47 -47
- package/dist/cpf-ocr.d.ts +23 -23
- package/dist/document-capture.d.ts +71 -71
- package/dist/document-upload.d.ts +43 -43
- package/dist/electronic-signature.d.ts +1 -1
- package/dist/extensibility.d.ts +4 -4
- package/dist/extensibility.esm.js +5 -5
- package/dist/{faceCaptureManagerFactory-3F-SgVzB.esm.js → faceCaptureManagerFactory-DM_o6znS.esm.js} +6 -2
- package/dist/{faceCaptureManagerFactory-DDXc7vZC.d.ts → faceCaptureManagerFactory-DfY95mko.d.ts} +3 -0
- package/dist/flow.d.ts +2 -2
- package/dist/flow.esm.js +17 -12
- package/dist/home.d.ts +10 -10
- package/dist/id-ocr.d.ts +52 -52
- package/dist/id.d.ts +1 -1
- package/dist/id.esm.js +2 -2
- package/dist/{idCaptureManager-BDTqAYim.esm.js → idCaptureManager-CEJN1LTW.esm.js} +4 -1
- package/dist/{idCaptureManager-BqeriSuc.d.ts → idCaptureManager-X3CG5c3T.d.ts} +6 -2
- package/dist/{idCaptureStateMachine-DLTCi-K-.esm.js → idCaptureStateMachine-Doo9KqTB.esm.js} +26 -1
- package/dist/identity-reuse.d.ts +40 -40
- package/dist/{index-BaZskbWt.d.ts → index-CJT4brJN.d.ts} +119 -119
- package/dist/mandatory-consent.d.ts +47 -47
- package/dist/qe-signature.d.ts +1 -1
- package/dist/selfie.d.ts +2 -2
- package/dist/selfie.esm.js +2 -2
- package/dist/{selfieManager-BNrwN1q6.d.ts → selfieManager-Bqf4qfIp.d.ts} +1 -1
- package/dist/{selfieManager--At6fdHu.esm.js → selfieManager-pGHW3GaN.esm.js} +1 -1
- package/dist/workflow.d.ts +85 -85
- package/dist/workflow.esm.js +1 -1
- package/package.json +1 -1
package/dist/{faceCaptureManagerFactory-3F-SgVzB.esm.js → faceCaptureManagerFactory-DM_o6znS.esm.js}
RENAMED
|
@@ -22,7 +22,10 @@ function mapState(snapshot) {
|
|
|
22
22
|
const { context } = snapshot;
|
|
23
23
|
if (snapshot.matches("idle")) return { status: "idle" };
|
|
24
24
|
if (snapshot.matches("loading")) return { status: "loading" };
|
|
25
|
-
if (snapshot.matches("tutorial")) return {
|
|
25
|
+
if (snapshot.matches("tutorial")) return {
|
|
26
|
+
status: "tutorial",
|
|
27
|
+
ageAssurance: context.config?.ageAssurance === true
|
|
28
|
+
};
|
|
26
29
|
if (snapshot.matches("closed")) return { status: "closed" };
|
|
27
30
|
if (snapshot.matches("permissions")) {
|
|
28
31
|
const permissionStatus = getPermissionStatus(snapshot);
|
|
@@ -43,7 +46,8 @@ function mapState(snapshot) {
|
|
|
43
46
|
debugFrame: context.debugFrame,
|
|
44
47
|
attemptsRemaining: context.attemptsRemaining ?? 0,
|
|
45
48
|
uploadError: context.uploadError,
|
|
46
|
-
assistedOnboarding: context.config?.assistedOnboarding ?? false
|
|
49
|
+
assistedOnboarding: context.config?.assistedOnboarding ?? false,
|
|
50
|
+
ageAssurance: context.config?.ageAssurance === true
|
|
47
51
|
};
|
|
48
52
|
if (snapshot.matches("processing")) return { status: "processing" };
|
|
49
53
|
if (snapshot.matches("finished")) return {
|
package/dist/{faceCaptureManagerFactory-DDXc7vZC.d.ts → faceCaptureManagerFactory-DfY95mko.d.ts}
RENAMED
|
@@ -32,6 +32,7 @@ type BaseFaceCaptureConfig = {
|
|
|
32
32
|
validateBrightness?: boolean;
|
|
33
33
|
deepsightLiveness?: 'SINGLE_FRAME' | 'MULTIMODAL' | 'VIDEOLIVENESS';
|
|
34
34
|
cameraResolution?: CameraResolution;
|
|
35
|
+
ageAssurance?: boolean;
|
|
35
36
|
recording?: {
|
|
36
37
|
capability?: IRecordingCapability;
|
|
37
38
|
};
|
|
@@ -462,6 +463,7 @@ type FaceCaptureLoadingState = {
|
|
|
462
463
|
/** Showing face capture tutorial */
|
|
463
464
|
type FaceCaptureTutorialState = {
|
|
464
465
|
status: 'tutorial';
|
|
466
|
+
ageAssurance?: boolean;
|
|
465
467
|
};
|
|
466
468
|
/** Handling camera permissions */
|
|
467
469
|
type FaceCapturePermissionsState = {
|
|
@@ -486,6 +488,7 @@ type FaceCaptureCaptureState = {
|
|
|
486
488
|
uploadError: string | undefined;
|
|
487
489
|
/** Whether assisted onboarding mode is active (back camera, no mirror) */
|
|
488
490
|
assistedOnboarding: boolean;
|
|
491
|
+
ageAssurance?: boolean;
|
|
489
492
|
};
|
|
490
493
|
/** Processing the captured face */
|
|
491
494
|
type FaceCaptureProcessingState = {
|
package/dist/flow.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { i as FlowModuleConfig, n as Flow, r as FlowModule } from "./types-DFwAu
|
|
|
7
7
|
import { n as GetFinishStatusFn, t as FinishStatus } from "./flowCompletionService-U6Ov6LFb.js";
|
|
8
8
|
import { o as FlowEventSubscribable } from "./index-BIhqszMN.js";
|
|
9
9
|
import { t as ModuleRegistry } from "./types-DxQ9z4r7.js";
|
|
10
|
-
import * as
|
|
10
|
+
import * as xstate961 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: xstate961.StateMachine<xstate961.MachineContext, xstate961.AnyEventObject, {}, never, never, never, never, "finished", string, xstate961.NonReducibleUnknown, xstate961.NonReducibleUnknown, xstate961.EventObject, xstate961.MetaObject, {
|
|
59
59
|
readonly id: "noOpFlowModule";
|
|
60
60
|
readonly initial: "finished";
|
|
61
61
|
readonly states: {
|
package/dist/flow.esm.js
CHANGED
|
@@ -179,7 +179,7 @@ function createApi({ actor, getSnapshot, trackElementClicked }) {
|
|
|
179
179
|
const snapshot = getSnapshot();
|
|
180
180
|
return snapshot.matches("ready") && snapshot.context.currentStepIndex > 0;
|
|
181
181
|
}
|
|
182
|
-
function getModuleConfig(moduleKey) {
|
|
182
|
+
function getModuleConfig$1(moduleKey) {
|
|
183
183
|
const snapshot = getSnapshot();
|
|
184
184
|
if (!snapshot.matches("ready")) return;
|
|
185
185
|
return (snapshot.context.flow?.flowModules.find((m) => m.key === moduleKey))?.configuration;
|
|
@@ -214,7 +214,7 @@ function createApi({ actor, getSnapshot, trackElementClicked }) {
|
|
|
214
214
|
get canPrev() {
|
|
215
215
|
return getCanPrev();
|
|
216
216
|
},
|
|
217
|
-
getModuleConfig,
|
|
217
|
+
getModuleConfig: getModuleConfig$1,
|
|
218
218
|
isModuleEnabled
|
|
219
219
|
};
|
|
220
220
|
}
|
|
@@ -295,6 +295,17 @@ function createModuleLoader(registry) {
|
|
|
295
295
|
|
|
296
296
|
//#endregion
|
|
297
297
|
//#region src/modules/flow/orchestratedFlowStateMachine.ts
|
|
298
|
+
function getModuleConfig(module, flow) {
|
|
299
|
+
const config = {
|
|
300
|
+
...module?.configuration,
|
|
301
|
+
ds: flow?.ds
|
|
302
|
+
};
|
|
303
|
+
if (module?.key === "ID" || module?.key === "TUTORIAL_ID" || module?.key === "SECOND_ID" || module?.key === "SELFIE") return {
|
|
304
|
+
...config,
|
|
305
|
+
ageAssurance: config.ageAssurance ?? flow?.ageAssurance
|
|
306
|
+
};
|
|
307
|
+
return config;
|
|
308
|
+
}
|
|
298
309
|
function createBaseContext(context, isHomeContinueLoading) {
|
|
299
310
|
return {
|
|
300
311
|
flow: void 0,
|
|
@@ -375,10 +386,7 @@ const orchestratedFlowMachine = setup({
|
|
|
375
386
|
const flow = event.output;
|
|
376
387
|
const flowModules = flow.flowModules ?? [];
|
|
377
388
|
const firstModule = flowModules[0];
|
|
378
|
-
const config =
|
|
379
|
-
...firstModule?.configuration,
|
|
380
|
-
ds: flow.ds
|
|
381
|
-
};
|
|
389
|
+
const config = getModuleConfig(firstModule, flow);
|
|
382
390
|
return {
|
|
383
391
|
flow,
|
|
384
392
|
steps: flowModules.map((m) => m.key),
|
|
@@ -392,10 +400,7 @@ const orchestratedFlowMachine = setup({
|
|
|
392
400
|
incrementStep: assign(({ context }) => {
|
|
393
401
|
const nextIndex = context.currentStepIndex + 1;
|
|
394
402
|
const module = context.flow?.flowModules?.[nextIndex];
|
|
395
|
-
const config =
|
|
396
|
-
...module?.configuration,
|
|
397
|
-
ds: context.flow?.ds
|
|
398
|
-
};
|
|
403
|
+
const config = getModuleConfig(module, context.flow);
|
|
399
404
|
return {
|
|
400
405
|
currentStepIndex: nextIndex,
|
|
401
406
|
currentStep: module?.key,
|
|
@@ -713,7 +718,7 @@ function createOrchestratedFlowApi({ actor, getSnapshot, trackElementClicked },
|
|
|
713
718
|
const { currentStepIndex, steps } = snapshot.context;
|
|
714
719
|
return snapshot.value === "runningModule" && currentStepIndex >= 0 && currentStepIndex < steps.length - 1;
|
|
715
720
|
}
|
|
716
|
-
function getModuleConfig(moduleKey) {
|
|
721
|
+
function getModuleConfig$1(moduleKey) {
|
|
717
722
|
const snapshot = getSnapshot();
|
|
718
723
|
if (snapshot.value !== "runningModule") return;
|
|
719
724
|
return (snapshot.context.flow?.flowModules.find((m) => m.key === moduleKey))?.configuration;
|
|
@@ -754,7 +759,7 @@ function createOrchestratedFlowApi({ actor, getSnapshot, trackElementClicked },
|
|
|
754
759
|
get canNext() {
|
|
755
760
|
return getCanNext();
|
|
756
761
|
},
|
|
757
|
-
getModuleConfig,
|
|
762
|
+
getModuleConfig: getModuleConfig$1,
|
|
758
763
|
isModuleEnabled,
|
|
759
764
|
isAwaitingOrchestratorReady() {
|
|
760
765
|
return mapSnapshot().presentation.isAwaitingReady;
|
package/dist/home.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { t as Manager } from "./Manager-CcbnIt3T.js";
|
|
|
2
2
|
import "./camera-CS1twtEg.js";
|
|
3
3
|
import "./types-DdYIMV6w.js";
|
|
4
4
|
import { t as EmptyConfig } from "./types-DFwAuzk2.js";
|
|
5
|
-
import * as
|
|
5
|
+
import * as xstate618 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: xstate618.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, xstate618.NonReducibleUnknown, xstate618.EventObject, xstate618.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): xstate618.ActorRefFromLogic<never>;
|
|
51
|
+
<TLogic extends xstate618.AnyActorLogic>(src: TLogic, ...[options]: xstate618.ConditionalRequired<[options?: ({
|
|
52
52
|
id?: never;
|
|
53
53
|
systemId?: string;
|
|
54
|
-
input?:
|
|
54
|
+
input?: xstate618.InputFrom<TLogic> | undefined;
|
|
55
55
|
syncSnapshot?: boolean;
|
|
56
|
-
} & { [K in
|
|
56
|
+
} & { [K in xstate618.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate618.IsNotNever<xstate618.RequiredLogicInput<TLogic>>>): xstate618.ActorRefFromLogic<TLogic>;
|
|
57
57
|
};
|
|
58
58
|
input: HomeInput;
|
|
59
|
-
self:
|
|
59
|
+
self: xstate618.ActorRef<xstate618.MachineSnapshot<HomeContext, {
|
|
60
60
|
type: "LOAD";
|
|
61
61
|
} | {
|
|
62
62
|
type: "COMPLETE";
|
|
63
63
|
} | {
|
|
64
64
|
type: "RESET";
|
|
65
|
-
}, Record<string,
|
|
65
|
+
}, Record<string, xstate618.AnyActorRef | undefined>, xstate618.StateValue, string, unknown, any, any>, {
|
|
66
66
|
type: "LOAD";
|
|
67
67
|
} | {
|
|
68
68
|
type: "COMPLETE";
|
|
69
69
|
} | {
|
|
70
70
|
type: "RESET";
|
|
71
|
-
},
|
|
71
|
+
}, xstate618.AnyEventObject>;
|
|
72
72
|
}) => {
|
|
73
73
|
config: EmptyConfig;
|
|
74
74
|
};
|
package/dist/id-ocr.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as Manager } from "./Manager-CcbnIt3T.js";
|
|
2
2
|
import "./Actor-CazhiaK7.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as xstate452 from "xstate";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/id-ocr/types.d.ts
|
|
6
6
|
type IdOcrConfig = {
|
|
@@ -177,7 +177,7 @@ type IdOcrContext = {
|
|
|
177
177
|
type IdOcrInput = {
|
|
178
178
|
config: IdOcrConfig;
|
|
179
179
|
};
|
|
180
|
-
declare const idOcrStateMachine:
|
|
180
|
+
declare const idOcrStateMachine: xstate452.StateMachine<IdOcrContext, {
|
|
181
181
|
type: "LOAD";
|
|
182
182
|
} | {
|
|
183
183
|
type: "DATA_CHANGED";
|
|
@@ -191,66 +191,66 @@ declare const idOcrStateMachine: xstate1190.StateMachine<IdOcrContext, {
|
|
|
191
191
|
} | {
|
|
192
192
|
type: "RETRY";
|
|
193
193
|
}, {
|
|
194
|
-
[x: string]:
|
|
194
|
+
[x: string]: xstate452.ActorRefFromLogic<xstate452.PromiseActorLogic<OcrData, {
|
|
195
195
|
isSecondId: boolean;
|
|
196
|
-
},
|
|
196
|
+
}, xstate452.EventObject>> | xstate452.ActorRefFromLogic<xstate452.PromiseActorLogic<UpdateOcrResponse, {
|
|
197
197
|
params: UpdateOcrDataParams;
|
|
198
198
|
isSecondId: boolean;
|
|
199
|
-
},
|
|
200
|
-
},
|
|
199
|
+
}, xstate452.EventObject>> | undefined;
|
|
200
|
+
}, xstate452.Values<{
|
|
201
201
|
getOcrData: {
|
|
202
202
|
src: "getOcrData";
|
|
203
|
-
logic:
|
|
203
|
+
logic: xstate452.PromiseActorLogic<OcrData, {
|
|
204
204
|
isSecondId: boolean;
|
|
205
|
-
},
|
|
205
|
+
}, xstate452.EventObject>;
|
|
206
206
|
id: string | undefined;
|
|
207
207
|
};
|
|
208
208
|
updateOcrData: {
|
|
209
209
|
src: "updateOcrData";
|
|
210
|
-
logic:
|
|
210
|
+
logic: xstate452.PromiseActorLogic<UpdateOcrResponse, {
|
|
211
211
|
params: UpdateOcrDataParams;
|
|
212
212
|
isSecondId: boolean;
|
|
213
|
-
},
|
|
213
|
+
}, xstate452.EventObject>;
|
|
214
214
|
id: string | undefined;
|
|
215
215
|
};
|
|
216
|
-
}>,
|
|
216
|
+
}>, xstate452.Values<{
|
|
217
217
|
setError: {
|
|
218
218
|
type: "setError";
|
|
219
|
-
params:
|
|
219
|
+
params: xstate452.NonReducibleUnknown;
|
|
220
220
|
};
|
|
221
221
|
setInitialData: {
|
|
222
222
|
type: "setInitialData";
|
|
223
|
-
params:
|
|
223
|
+
params: xstate452.NonReducibleUnknown;
|
|
224
224
|
};
|
|
225
225
|
updateField: {
|
|
226
226
|
type: "updateField";
|
|
227
|
-
params:
|
|
227
|
+
params: xstate452.NonReducibleUnknown;
|
|
228
228
|
};
|
|
229
229
|
clearFieldValidationError: {
|
|
230
230
|
type: "clearFieldValidationError";
|
|
231
|
-
params:
|
|
231
|
+
params: xstate452.NonReducibleUnknown;
|
|
232
232
|
};
|
|
233
233
|
setOcrValidationErrors: {
|
|
234
234
|
type: "setOcrValidationErrors";
|
|
235
|
-
params:
|
|
235
|
+
params: xstate452.NonReducibleUnknown;
|
|
236
236
|
};
|
|
237
237
|
validateFormField: {
|
|
238
238
|
type: "validateFormField";
|
|
239
|
-
params:
|
|
239
|
+
params: xstate452.NonReducibleUnknown;
|
|
240
240
|
};
|
|
241
241
|
beginSecondIdOcrPhase: {
|
|
242
242
|
type: "beginSecondIdOcrPhase";
|
|
243
|
-
params:
|
|
243
|
+
params: xstate452.NonReducibleUnknown;
|
|
244
244
|
};
|
|
245
245
|
resetForRetry: {
|
|
246
246
|
type: "resetForRetry";
|
|
247
|
-
params:
|
|
247
|
+
params: xstate452.NonReducibleUnknown;
|
|
248
248
|
};
|
|
249
249
|
computeValidationResult: {
|
|
250
250
|
type: "computeValidationResult";
|
|
251
|
-
params:
|
|
251
|
+
params: xstate452.NonReducibleUnknown;
|
|
252
252
|
};
|
|
253
|
-
}>,
|
|
253
|
+
}>, xstate452.Values<{
|
|
254
254
|
isOcrEditable: {
|
|
255
255
|
type: "isOcrEditable";
|
|
256
256
|
params: unknown;
|
|
@@ -271,7 +271,7 @@ declare const idOcrStateMachine: xstate1190.StateMachine<IdOcrContext, {
|
|
|
271
271
|
type: "shouldProceedWithoutSubmitToSecondId";
|
|
272
272
|
params: unknown;
|
|
273
273
|
};
|
|
274
|
-
}>, never, "error" | "idle" | "success" | "finished" | "loading" | "
|
|
274
|
+
}>, never, "error" | "idle" | "success" | "finished" | "loading" | "submitting" | "inputting" | "readonly" | "validatingContinue", string, IdOcrInput, xstate452.NonReducibleUnknown, xstate452.EventObject, xstate452.MetaObject, {
|
|
275
275
|
readonly id: "idOcr";
|
|
276
276
|
readonly initial: "idle";
|
|
277
277
|
readonly context: ({
|
|
@@ -280,70 +280,70 @@ declare const idOcrStateMachine: xstate1190.StateMachine<IdOcrContext, {
|
|
|
280
280
|
spawn: {
|
|
281
281
|
<TSrc extends "getOcrData" | "updateOcrData">(logic: TSrc, ...[options]: ({
|
|
282
282
|
src: "getOcrData";
|
|
283
|
-
logic:
|
|
283
|
+
logic: xstate452.PromiseActorLogic<OcrData, {
|
|
284
284
|
isSecondId: boolean;
|
|
285
|
-
},
|
|
285
|
+
}, xstate452.EventObject>;
|
|
286
286
|
id: string | undefined;
|
|
287
287
|
} extends infer T ? T extends {
|
|
288
288
|
src: "getOcrData";
|
|
289
|
-
logic:
|
|
289
|
+
logic: xstate452.PromiseActorLogic<OcrData, {
|
|
290
290
|
isSecondId: boolean;
|
|
291
|
-
},
|
|
291
|
+
}, xstate452.EventObject>;
|
|
292
292
|
id: string | undefined;
|
|
293
293
|
} ? T extends {
|
|
294
294
|
src: TSrc;
|
|
295
|
-
} ?
|
|
295
|
+
} ? xstate452.ConditionalRequired<[options?: ({
|
|
296
296
|
id?: T["id"] | undefined;
|
|
297
297
|
systemId?: string;
|
|
298
|
-
input?:
|
|
298
|
+
input?: xstate452.InputFrom<T["logic"]> | undefined;
|
|
299
299
|
syncSnapshot?: boolean;
|
|
300
|
-
} & { [K in
|
|
300
|
+
} & { [K in xstate452.RequiredActorOptions<T>]: unknown }) | undefined], xstate452.IsNotNever<xstate452.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
301
301
|
src: "updateOcrData";
|
|
302
|
-
logic:
|
|
302
|
+
logic: xstate452.PromiseActorLogic<UpdateOcrResponse, {
|
|
303
303
|
params: UpdateOcrDataParams;
|
|
304
304
|
isSecondId: boolean;
|
|
305
|
-
},
|
|
305
|
+
}, xstate452.EventObject>;
|
|
306
306
|
id: string | undefined;
|
|
307
307
|
} extends infer T_1 ? T_1 extends {
|
|
308
308
|
src: "updateOcrData";
|
|
309
|
-
logic:
|
|
309
|
+
logic: xstate452.PromiseActorLogic<UpdateOcrResponse, {
|
|
310
310
|
params: UpdateOcrDataParams;
|
|
311
311
|
isSecondId: boolean;
|
|
312
|
-
},
|
|
312
|
+
}, xstate452.EventObject>;
|
|
313
313
|
id: string | undefined;
|
|
314
314
|
} ? T_1 extends {
|
|
315
315
|
src: TSrc;
|
|
316
|
-
} ?
|
|
316
|
+
} ? xstate452.ConditionalRequired<[options?: ({
|
|
317
317
|
id?: T_1["id"] | undefined;
|
|
318
318
|
systemId?: string;
|
|
319
|
-
input?:
|
|
319
|
+
input?: xstate452.InputFrom<T_1["logic"]> | undefined;
|
|
320
320
|
syncSnapshot?: boolean;
|
|
321
|
-
} & { [K_1 in
|
|
321
|
+
} & { [K_1 in xstate452.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate452.IsNotNever<xstate452.RequiredActorOptions<T_1>>> : never : never : never)): xstate452.ActorRefFromLogic<xstate452.GetConcreteByKey<xstate452.Values<{
|
|
322
322
|
getOcrData: {
|
|
323
323
|
src: "getOcrData";
|
|
324
|
-
logic:
|
|
324
|
+
logic: xstate452.PromiseActorLogic<OcrData, {
|
|
325
325
|
isSecondId: boolean;
|
|
326
|
-
},
|
|
326
|
+
}, xstate452.EventObject>;
|
|
327
327
|
id: string | undefined;
|
|
328
328
|
};
|
|
329
329
|
updateOcrData: {
|
|
330
330
|
src: "updateOcrData";
|
|
331
|
-
logic:
|
|
331
|
+
logic: xstate452.PromiseActorLogic<UpdateOcrResponse, {
|
|
332
332
|
params: UpdateOcrDataParams;
|
|
333
333
|
isSecondId: boolean;
|
|
334
|
-
},
|
|
334
|
+
}, xstate452.EventObject>;
|
|
335
335
|
id: string | undefined;
|
|
336
336
|
};
|
|
337
337
|
}>, "src", TSrc>["logic"]>;
|
|
338
|
-
<TLogic extends
|
|
338
|
+
<TLogic extends xstate452.AnyActorLogic>(src: TLogic, ...[options]: xstate452.ConditionalRequired<[options?: ({
|
|
339
339
|
id?: never;
|
|
340
340
|
systemId?: string;
|
|
341
|
-
input?:
|
|
341
|
+
input?: xstate452.InputFrom<TLogic> | undefined;
|
|
342
342
|
syncSnapshot?: boolean;
|
|
343
|
-
} & { [K in
|
|
343
|
+
} & { [K in xstate452.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate452.IsNotNever<xstate452.RequiredLogicInput<TLogic>>>): xstate452.ActorRefFromLogic<TLogic>;
|
|
344
344
|
};
|
|
345
345
|
input: IdOcrInput;
|
|
346
|
-
self:
|
|
346
|
+
self: xstate452.ActorRef<xstate452.MachineSnapshot<IdOcrContext, {
|
|
347
347
|
type: "LOAD";
|
|
348
348
|
} | {
|
|
349
349
|
type: "DATA_CHANGED";
|
|
@@ -356,7 +356,7 @@ declare const idOcrStateMachine: xstate1190.StateMachine<IdOcrContext, {
|
|
|
356
356
|
type: "CONTINUE";
|
|
357
357
|
} | {
|
|
358
358
|
type: "RETRY";
|
|
359
|
-
}, Record<string,
|
|
359
|
+
}, Record<string, xstate452.AnyActorRef | undefined>, xstate452.StateValue, string, unknown, any, any>, {
|
|
360
360
|
type: "LOAD";
|
|
361
361
|
} | {
|
|
362
362
|
type: "DATA_CHANGED";
|
|
@@ -369,7 +369,7 @@ declare const idOcrStateMachine: xstate1190.StateMachine<IdOcrContext, {
|
|
|
369
369
|
type: "CONTINUE";
|
|
370
370
|
} | {
|
|
371
371
|
type: "RETRY";
|
|
372
|
-
},
|
|
372
|
+
}, xstate452.AnyEventObject>;
|
|
373
373
|
}) => {
|
|
374
374
|
config: IdOcrConfig;
|
|
375
375
|
formData: UpdateOcrDataParams;
|
|
@@ -405,7 +405,7 @@ declare const idOcrStateMachine: xstate1190.StateMachine<IdOcrContext, {
|
|
|
405
405
|
} | {
|
|
406
406
|
type: "RETRY";
|
|
407
407
|
};
|
|
408
|
-
self:
|
|
408
|
+
self: xstate452.ActorRef<xstate452.MachineSnapshot<IdOcrContext, {
|
|
409
409
|
type: "LOAD";
|
|
410
410
|
} | {
|
|
411
411
|
type: "DATA_CHANGED";
|
|
@@ -418,7 +418,7 @@ declare const idOcrStateMachine: xstate1190.StateMachine<IdOcrContext, {
|
|
|
418
418
|
type: "CONTINUE";
|
|
419
419
|
} | {
|
|
420
420
|
type: "RETRY";
|
|
421
|
-
}, Record<string,
|
|
421
|
+
}, Record<string, xstate452.AnyActorRef>, xstate452.StateValue, string, unknown, any, any>, {
|
|
422
422
|
type: "LOAD";
|
|
423
423
|
} | {
|
|
424
424
|
type: "DATA_CHANGED";
|
|
@@ -431,7 +431,7 @@ declare const idOcrStateMachine: xstate1190.StateMachine<IdOcrContext, {
|
|
|
431
431
|
type: "CONTINUE";
|
|
432
432
|
} | {
|
|
433
433
|
type: "RETRY";
|
|
434
|
-
},
|
|
434
|
+
}, xstate452.AnyEventObject>;
|
|
435
435
|
}) => {
|
|
436
436
|
isSecondId: boolean;
|
|
437
437
|
};
|
|
@@ -510,7 +510,7 @@ declare const idOcrStateMachine: xstate1190.StateMachine<IdOcrContext, {
|
|
|
510
510
|
} | {
|
|
511
511
|
type: "RETRY";
|
|
512
512
|
};
|
|
513
|
-
self:
|
|
513
|
+
self: xstate452.ActorRef<xstate452.MachineSnapshot<IdOcrContext, {
|
|
514
514
|
type: "LOAD";
|
|
515
515
|
} | {
|
|
516
516
|
type: "DATA_CHANGED";
|
|
@@ -523,7 +523,7 @@ declare const idOcrStateMachine: xstate1190.StateMachine<IdOcrContext, {
|
|
|
523
523
|
type: "CONTINUE";
|
|
524
524
|
} | {
|
|
525
525
|
type: "RETRY";
|
|
526
|
-
}, Record<string,
|
|
526
|
+
}, Record<string, xstate452.AnyActorRef>, xstate452.StateValue, string, unknown, any, any>, {
|
|
527
527
|
type: "LOAD";
|
|
528
528
|
} | {
|
|
529
529
|
type: "DATA_CHANGED";
|
|
@@ -536,7 +536,7 @@ declare const idOcrStateMachine: xstate1190.StateMachine<IdOcrContext, {
|
|
|
536
536
|
type: "CONTINUE";
|
|
537
537
|
} | {
|
|
538
538
|
type: "RETRY";
|
|
539
|
-
},
|
|
539
|
+
}, xstate452.AnyEventObject>;
|
|
540
540
|
}) => {
|
|
541
541
|
params: UpdateOcrDataParams;
|
|
542
542
|
isSecondId: boolean;
|
package/dist/id.d.ts
CHANGED
|
@@ -7,5 +7,5 @@ import "./types-DdYIMV6w.js";
|
|
|
7
7
|
import "./types-DFwAuzk2.js";
|
|
8
8
|
import "./deepsightService-Cxp-yJjr.js";
|
|
9
9
|
import { n as PermissionStatus, t as PermissionResult } from "./types-D5fKjOcr.js";
|
|
10
|
-
import { A as IdCaptureConfig, B as IdErrorCode, C as IdCaptureMachine, D as DetectionArea, E as CapturedImage, F as IdCaptureInput, G as ManualUploadContext, H as MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, I as IdCaptureMode, J as RecordingSession, K as ManualUploadSide, 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 MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, V as IdFlowStep, W as MANUAL_UPLOAD_MAX_RETRIES, X as DetectionOrientation, Y as UploadIdResponse, 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 ManualUploadTab, 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 ManualUploadContext, H as MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, I as IdCaptureMode, J as RecordingSession, K as ManualUploadSide, 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 MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, V as IdFlowStep, W as MANUAL_UPLOAD_MAX_RETRIES, X as DetectionOrientation, Y as UploadIdResponse, 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 ManualUploadTab, 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-X3CG5c3T.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
|
@@ -18,7 +18,7 @@ import "./ITimerCapability-r7XXQS6a.esm.js";
|
|
|
18
18
|
import "./backCameraStream-BIzYKDy2.esm.js";
|
|
19
19
|
import "./getDeviceClass-AjL3Pr7R.esm.js";
|
|
20
20
|
import "./BrowserTimerProvider-Bc6BRm6-.esm.js";
|
|
21
|
-
import { a as startRecordingSession, c as uploadIdImage, d as ID_ERROR_CODES, f as MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, i as processId, l as uploadManualIdFile, m as MANUAL_UPLOAD_MAX_RETRIES, n as initializeIdCapture, o as stopRecording, p as MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, r as preloadIdRecordingProvider, s as stopStream, t as idCaptureMachine, u as validateUploadResponse } from "./idCaptureStateMachine-
|
|
22
|
-
import { r as createIdCaptureActor, t as createIdCaptureManager } from "./idCaptureManager-
|
|
21
|
+
import { a as startRecordingSession, c as uploadIdImage, d as ID_ERROR_CODES, f as MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, i as processId, l as uploadManualIdFile, m as MANUAL_UPLOAD_MAX_RETRIES, n as initializeIdCapture, o as stopRecording, p as MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, r as preloadIdRecordingProvider, s as stopStream, t as idCaptureMachine, u as validateUploadResponse } from "./idCaptureStateMachine-Doo9KqTB.esm.js";
|
|
22
|
+
import { r as createIdCaptureActor, t as createIdCaptureManager } from "./idCaptureManager-CEJN1LTW.esm.js";
|
|
23
23
|
|
|
24
24
|
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, r as eventScreenNames } from "./events-237AXtL7.esm.js";
|
|
2
2
|
import { a as createActor, o as createManager } from "./xstate.esm-CSiDcEjt.esm.js";
|
|
3
3
|
import { t as BrowserStorageProvider } from "./BrowserStorageProvider-DeByegPK.esm.js";
|
|
4
|
-
import { t as idCaptureMachine } from "./idCaptureStateMachine-
|
|
4
|
+
import { t as idCaptureMachine } from "./idCaptureStateMachine-Doo9KqTB.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/id/idCaptureActor.ts
|
|
7
7
|
function createIdCaptureActor(options) {
|
|
@@ -129,6 +129,7 @@ function mapCaptureState(snapshot, context) {
|
|
|
129
129
|
idType: context.idType,
|
|
130
130
|
previewImageUrl: context.previewImageUrl,
|
|
131
131
|
uploadProgress: context.uploadProgress ?? 0,
|
|
132
|
+
ageAssurance: context.config.ageAssurance === true,
|
|
132
133
|
uploadErrorMessage: uploadError ? getErrorTitleKey(uploadError, context.currentMode) : void 0,
|
|
133
134
|
uploadErrorDescription: uploadError ? getErrorSubtitleKey(uploadError, uploadResponse, context.currentMode) : void 0,
|
|
134
135
|
needsBackCapture: shouldCaptureBack(context),
|
|
@@ -187,6 +188,7 @@ function mapState(snapshot) {
|
|
|
187
188
|
selectedDocumentType: context.selectedDocumentType,
|
|
188
189
|
currentMode: context.currentMode
|
|
189
190
|
};
|
|
191
|
+
if (snapshot.matches("ageVerification")) return { status: "ageVerification" };
|
|
190
192
|
if (snapshot.matches("closed")) return { status: "closed" };
|
|
191
193
|
if (snapshot.matches("permissions")) {
|
|
192
194
|
const permissionStatus = getPermissionStatus(snapshot);
|
|
@@ -380,6 +382,7 @@ function getIdCaptureScreenName(snapshot) {
|
|
|
380
382
|
case "chooser": return "DOCUMENT_CHOOSER";
|
|
381
383
|
case "loading": return "LOADING";
|
|
382
384
|
case "tutorial": return screens.tutorial;
|
|
385
|
+
case "ageVerification": return "AGE_VERIFICATION";
|
|
383
386
|
case "permissions": return "PERMISSIONS";
|
|
384
387
|
case "capture": return getCaptureSubstateScreen(value, screens);
|
|
385
388
|
case "mandatoryConsent": return "MANDATORY_CONSENT";
|
|
@@ -171,7 +171,7 @@ type IdCaptureMode = 'front' | 'back' | 'passport';
|
|
|
171
171
|
* Used for selection and for the list of available options derived from config.
|
|
172
172
|
*/
|
|
173
173
|
type IdDocumentType = 'id' | 'passport' | 'manualIdUpload' | 'digitalIdUpload' | 'digitalId';
|
|
174
|
-
type IdFlowStep = 'chooser' | 'tutorial' | 'permissions' | 'capture' | 'mandatoryConsent' | 'frontFinished' | 'backFinished' | 'success' | 'processing' | 'expired' | 'finished' | 'error' | 'closed' | 'manualIdUpload' | 'digitalIdUpload';
|
|
174
|
+
type IdFlowStep = 'chooser' | 'ageVerification' | 'tutorial' | 'permissions' | 'capture' | 'mandatoryConsent' | 'frontFinished' | 'backFinished' | 'success' | 'processing' | 'expired' | 'finished' | 'error' | 'closed' | 'manualIdUpload' | 'digitalIdUpload';
|
|
175
175
|
type DetectionStatus = 'idle' | 'detecting' | 'farAway' | 'blur' | 'glare' | 'wrongSide' | 'capturing' | 'manualCapture' | 'idNotDetected' | 'offline';
|
|
176
176
|
/**
|
|
177
177
|
* Represents the detection area dimensions in pixels.
|
|
@@ -603,6 +603,9 @@ type IdCaptureTutorialState = {
|
|
|
603
603
|
selectedDocumentType: IdDocumentType | undefined;
|
|
604
604
|
currentMode: IdCaptureMode;
|
|
605
605
|
};
|
|
606
|
+
type IdCaptureAgeVerificationState = {
|
|
607
|
+
status: 'ageVerification';
|
|
608
|
+
};
|
|
606
609
|
type IdCapturePermissionsState = {
|
|
607
610
|
status: 'permissions';
|
|
608
611
|
permissionStatus: PermissionStatus;
|
|
@@ -621,6 +624,7 @@ type IdCaptureCaptureState = {
|
|
|
621
624
|
idType: string | undefined;
|
|
622
625
|
previewImageUrl?: string;
|
|
623
626
|
uploadProgress?: number;
|
|
627
|
+
ageAssurance: boolean;
|
|
624
628
|
uploadErrorMessage?: string;
|
|
625
629
|
uploadErrorDescription?: string;
|
|
626
630
|
/** Whether back capture is needed after front capture completes */
|
|
@@ -679,7 +683,7 @@ type IdCaptureManualUploadState = {
|
|
|
679
683
|
/** i18n key for the current error message, if any. */
|
|
680
684
|
errorKey: string | null;
|
|
681
685
|
};
|
|
682
|
-
type IdCaptureState = IdCaptureIdleState | IdCaptureChooserState | IdCaptureLoadingState | IdCaptureTutorialState | IdCapturePermissionsState | IdCaptureCaptureState | IdCaptureMandatoryConsentState | IdCaptureFrontFinishedState | IdCaptureBackFinishedState | IdCaptureProcessingState | IdCaptureExpiredState | IdCaptureFinishedState | IdCaptureClosedState | IdCaptureErrorState | IdCaptureManualUploadState;
|
|
686
|
+
type IdCaptureState = IdCaptureIdleState | IdCaptureChooserState | IdCaptureLoadingState | IdCaptureTutorialState | IdCaptureAgeVerificationState | IdCapturePermissionsState | IdCaptureCaptureState | IdCaptureMandatoryConsentState | IdCaptureFrontFinishedState | IdCaptureBackFinishedState | IdCaptureProcessingState | IdCaptureExpiredState | IdCaptureFinishedState | IdCaptureClosedState | IdCaptureErrorState | IdCaptureManualUploadState;
|
|
683
687
|
declare function createIdCaptureManager(options: CreateIdCaptureActorOptions): Manager<IdCaptureState> & {
|
|
684
688
|
load(): void;
|
|
685
689
|
selectDocument(documentType: IdDocumentType): void;
|
package/dist/{idCaptureStateMachine-DLTCi-K-.esm.js → idCaptureStateMachine-Doo9KqTB.esm.js}
RENAMED
|
@@ -800,7 +800,7 @@ const uploadIdImageActor = fromPromise(async ({ input, signal }) => {
|
|
|
800
800
|
sendBase64: true,
|
|
801
801
|
glare: input.qualityElements?.glare,
|
|
802
802
|
sharpness: input.qualityElements?.sharpness,
|
|
803
|
-
ageAssurance:
|
|
803
|
+
ageAssurance: input.ageAssurance,
|
|
804
804
|
signal,
|
|
805
805
|
onProgress: input.onProgress,
|
|
806
806
|
metadata,
|
|
@@ -1177,6 +1177,7 @@ function getCurrentModeFromEvent(context, event) {
|
|
|
1177
1177
|
//#endregion
|
|
1178
1178
|
//#region src/modules/id/idCaptureGuards.ts
|
|
1179
1179
|
const hasShowTutorialGuard = ({ context }) => context.config.showTutorial;
|
|
1180
|
+
const hasAgeAssuranceGuard = ({ context }) => context.config.ageAssurance === true;
|
|
1180
1181
|
const hasShowDocumentChooserGuard = ({ context }) => !context.config.onlyBack && (context.config.showDocumentChooserScreen ?? false);
|
|
1181
1182
|
const isPermissionGrantedGuard = ({ event }) => {
|
|
1182
1183
|
if ("output" in event) return event.output === "granted";
|
|
@@ -1528,6 +1529,7 @@ const _idCaptureMachine = setup({
|
|
|
1528
1529
|
},
|
|
1529
1530
|
guards: {
|
|
1530
1531
|
hasShowTutorial: hasShowTutorialGuard,
|
|
1532
|
+
hasAgeAssurance: hasAgeAssuranceGuard,
|
|
1531
1533
|
hasShowDocumentChooser: hasShowDocumentChooserGuard,
|
|
1532
1534
|
isPermissionGranted: isPermissionGrantedGuard,
|
|
1533
1535
|
isPermissionDeniedError: isPermissionDeniedErrorGuard,
|
|
@@ -1622,6 +1624,10 @@ const _idCaptureMachine = setup({
|
|
|
1622
1624
|
target: "chooser",
|
|
1623
1625
|
guard: "hasShowDocumentChooser"
|
|
1624
1626
|
},
|
|
1627
|
+
{
|
|
1628
|
+
target: "ageVerification",
|
|
1629
|
+
guard: "hasAgeAssurance"
|
|
1630
|
+
},
|
|
1625
1631
|
{
|
|
1626
1632
|
target: "tutorial",
|
|
1627
1633
|
guard: "hasShowTutorial"
|
|
@@ -1634,6 +1640,11 @@ const _idCaptureMachine = setup({
|
|
|
1634
1640
|
guard: "isManualIdUploadSelected",
|
|
1635
1641
|
actions: ["setSelectedDocument"]
|
|
1636
1642
|
},
|
|
1643
|
+
{
|
|
1644
|
+
target: "ageVerification",
|
|
1645
|
+
guard: "hasAgeAssurance",
|
|
1646
|
+
actions: ["setSelectedDocument", "setCurrentMode"]
|
|
1647
|
+
},
|
|
1637
1648
|
{
|
|
1638
1649
|
target: "tutorial",
|
|
1639
1650
|
guard: "hasShowTutorial",
|
|
@@ -1644,6 +1655,14 @@ const _idCaptureMachine = setup({
|
|
|
1644
1655
|
actions: ["setSelectedDocument", "setCurrentMode"]
|
|
1645
1656
|
}
|
|
1646
1657
|
] } },
|
|
1658
|
+
ageVerification: { on: { NEXT_STEP: [{
|
|
1659
|
+
target: "tutorial",
|
|
1660
|
+
guard: "hasShowTutorial",
|
|
1661
|
+
actions: "trackContinue"
|
|
1662
|
+
}, {
|
|
1663
|
+
target: "loading",
|
|
1664
|
+
actions: "trackContinue"
|
|
1665
|
+
}] } },
|
|
1647
1666
|
loading: {
|
|
1648
1667
|
entry: "preloadRecordingProvider",
|
|
1649
1668
|
type: "parallel",
|
|
@@ -2040,6 +2059,7 @@ const _idCaptureMachine = setup({
|
|
|
2040
2059
|
stream: context.stream,
|
|
2041
2060
|
isSecondId: context.config.isSecondId ?? false,
|
|
2042
2061
|
onlyFront: context.config.onlyFront,
|
|
2062
|
+
ageAssurance: context.config.ageAssurance,
|
|
2043
2063
|
dependencies: context.dependencies,
|
|
2044
2064
|
captureResolution: context.captureResolution,
|
|
2045
2065
|
cameraFallbackLevel: context.cameraFallbackLevel
|
|
@@ -2238,6 +2258,11 @@ const _idCaptureMachine = setup({
|
|
|
2238
2258
|
guard: "hasShowDocumentChooser",
|
|
2239
2259
|
actions: ["resetContext"]
|
|
2240
2260
|
},
|
|
2261
|
+
{
|
|
2262
|
+
target: "ageVerification",
|
|
2263
|
+
guard: "hasAgeAssurance",
|
|
2264
|
+
actions: "resetContext"
|
|
2265
|
+
},
|
|
2241
2266
|
{
|
|
2242
2267
|
target: "tutorial",
|
|
2243
2268
|
guard: "hasShowTutorial",
|