@incodetech/core 0.0.0-dev-20260407-4677d7f → 0.0.0-dev-20260407-ebd92aa
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/OpenViduRecordingProvider-PvkEhhDq.esm.js +87 -0
- package/dist/antifraud.d.ts +1 -1
- package/dist/authentication.d.ts +11 -11
- package/dist/authentication.esm.js +3 -3
- package/dist/{authenticationManager-CiXsOTdM.d.ts → authenticationManager-CXTPgE_2.d.ts} +2 -2
- package/dist/{authenticationManager-CW4qxgcq.esm.js → authenticationManager-D4esVx-z.esm.js} +2 -2
- package/dist/camera.d.ts +1 -1
- package/dist/consent.d.ts +49 -49
- package/dist/curp-validation.d.ts +5 -5
- package/dist/{deepsightService-CMAtxAC9.d.ts → deepsightService-CyEcAH-I.d.ts} +2 -2
- package/dist/document-capture.d.ts +70 -70
- package/dist/document-upload.d.ts +4 -4
- package/dist/ekyb.d.ts +3 -3
- package/dist/ekyc.d.ts +3 -3
- package/dist/email.d.ts +3 -3
- package/dist/{emailManager-DEIxY7l6.d.ts → emailManager-CtA6Tvry.d.ts} +2 -2
- package/dist/extensibility.d.ts +15 -15
- package/dist/extensibility.esm.js +5 -5
- package/dist/face-match.d.ts +1 -1
- package/dist/{faceCaptureManagerFactory-CWj-nXdx.d.ts → faceCaptureManagerFactory-Bp_mC9b2.d.ts} +8 -8
- package/dist/faceCaptureSetup-DzlTPjT9.esm.js +828 -0
- package/dist/flow.d.ts +17 -10
- package/dist/flow.esm.js +60 -13
- package/dist/geolocation.d.ts +2 -2
- package/dist/government-validation.d.ts +2 -2
- package/dist/id.d.ts +11 -11
- package/dist/id.esm.js +3 -3
- package/dist/{idCaptureManager-H-rkXnbK.d.ts → idCaptureManager-Bx298yFC.d.ts} +9 -8
- package/dist/{idCaptureManager-SHBRQ-X_.esm.js → idCaptureManager-bowLKHEs.esm.js} +61 -48
- package/dist/index.d.ts +2 -2
- package/dist/mandatory-consent.d.ts +52 -52
- package/dist/openviduLazy-BdsxPGgp.esm.js +12 -0
- package/dist/openviduLazy-NTgGtkeK.esm.js +3 -0
- package/dist/phone.d.ts +3 -3
- package/dist/{phoneManager-Clfbrs6b.d.ts → phoneManager-DlaiZtwZ.d.ts} +2 -2
- package/dist/recordingService-BDx_6XR9.esm.js +1024 -0
- package/dist/redirect-to-mobile.d.ts +2 -2
- package/dist/selfie.d.ts +11 -11
- package/dist/selfie.esm.js +3 -3
- package/dist/{selfieManager-DeGqD5aN.esm.js → selfieManager-DVvvlMMf.esm.js} +2 -2
- package/dist/{selfieManager-h_hhEefT.d.ts → selfieManager-UBgYgVnw.d.ts} +2 -2
- package/dist/session.d.ts +1 -1
- package/dist/{setup-DJ3dFl5k.d.ts → setup-DfinQjIF.d.ts} +1 -1
- package/dist/signature.d.ts +2 -2
- package/dist/{types-T0VjZW3T.d.ts → types-DcqFYowa.d.ts} +1 -1
- package/dist/{types-zH5PDmSe.d.ts → types-DufUK-_f.d.ts} +1 -1
- package/dist/wasm.d.ts +2 -2
- package/package.json +1 -1
- package/dist/faceCaptureSetup-DIE5cftl.esm.js +0 -1564
- package/dist/recordingsRepository-blYn-iKZ.esm.js +0 -352
- /package/dist/{Actor-C-jivmFF.d.ts → Actor-Cz_KnN47.d.ts} +0 -0
- /package/dist/{Manager-BqFybBV-.d.ts → Manager-N01KfnVA.d.ts} +0 -0
- /package/dist/{StateMachine-8d441d6x.d.ts → StateMachine-DU1S4Cik.d.ts} +0 -0
- /package/dist/{camera-CKsQVNlH.d.ts → camera-BcVDCZxW.d.ts} +0 -0
- /package/dist/{displayErrors-CjMXlBnu.d.ts → displayErrors-C0mf2glb.d.ts} +0 -0
- /package/dist/{flowCompletionService-BV6ThEJ1.d.ts → flowCompletionService-Dloh6J8n.d.ts} +0 -0
- /package/dist/{types-qhLxpptI.d.ts → types-UPqCMQKa.d.ts} +0 -0
- /package/dist/{warmup-CEOVQKby.d.ts → warmup-yzJJKXFi.d.ts} +0 -0
package/dist/flow.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as WasmPipeline } from "./warmup-
|
|
2
|
-
import { t as Manager } from "./Manager-
|
|
3
|
-
import { t as AnyStateMachine } from "./StateMachine-
|
|
4
|
-
import "./camera-
|
|
5
|
-
import "./types-
|
|
6
|
-
import { n as FlowModule, r as FlowModuleConfig, t as Flow } from "./types-
|
|
7
|
-
import { n as GetFinishStatusFn, t as FinishStatus } from "./flowCompletionService-
|
|
1
|
+
import { n as WasmPipeline } from "./warmup-yzJJKXFi.js";
|
|
2
|
+
import { t as Manager } from "./Manager-N01KfnVA.js";
|
|
3
|
+
import { t as AnyStateMachine } from "./StateMachine-DU1S4Cik.js";
|
|
4
|
+
import "./camera-BcVDCZxW.js";
|
|
5
|
+
import "./types-DcqFYowa.js";
|
|
6
|
+
import { n as FlowModule, r as FlowModuleConfig, t as Flow } from "./types-DufUK-_f.js";
|
|
7
|
+
import { n as GetFinishStatusFn, t as FinishStatus } from "./flowCompletionService-Dloh6J8n.js";
|
|
8
8
|
|
|
9
9
|
//#region src/modules/flow/flowUtils.d.ts
|
|
10
10
|
|
|
@@ -182,9 +182,15 @@ type ModuleRegistry = {
|
|
|
182
182
|
SELFIE?: AnyStateMachine;
|
|
183
183
|
[key: string]: AnyStateMachine | undefined;
|
|
184
184
|
};
|
|
185
|
+
type LazyModuleRegistry = {
|
|
186
|
+
[key: string]: (() => Promise<AnyStateMachine | {
|
|
187
|
+
default: AnyStateMachine;
|
|
188
|
+
}>) | undefined;
|
|
189
|
+
};
|
|
185
190
|
type OrchestratedFlowInput = {
|
|
186
191
|
getFlow: GetFlowFn;
|
|
187
|
-
modules
|
|
192
|
+
modules?: ModuleRegistry;
|
|
193
|
+
lazyModules?: LazyModuleRegistry;
|
|
188
194
|
getFinishStatus?: GetFinishStatusFn;
|
|
189
195
|
};
|
|
190
196
|
type OrchestratedFlowEvent = {
|
|
@@ -237,7 +243,8 @@ type OrchestratedFlowErrorState = {
|
|
|
237
243
|
type OrchestratedFlowState = OrchestratedFlowIdleState | OrchestratedFlowLoadingState | OrchestratedFlowReadyState | OrchestratedFlowFinishedState | OrchestratedFlowErrorState;
|
|
238
244
|
type CreateOrchestratedFlowActorOptions = {
|
|
239
245
|
getFlow?: GetFlowFn;
|
|
240
|
-
modules
|
|
246
|
+
modules?: ModuleRegistry;
|
|
247
|
+
lazyModules?: LazyModuleRegistry;
|
|
241
248
|
getFinishStatus?: OrchestratedFlowInput['getFinishStatus'];
|
|
242
249
|
};
|
|
243
250
|
declare function createOrchestratedFlowManager(options: CreateOrchestratedFlowActorOptions): Manager<OrchestratedFlowState> & {
|
|
@@ -289,4 +296,4 @@ declare function createOrchestratedFlowManager(options: CreateOrchestratedFlowAc
|
|
|
289
296
|
isModuleEnabled: (moduleKey: string) => boolean;
|
|
290
297
|
};
|
|
291
298
|
//#endregion
|
|
292
|
-
export { type FinishStatus, type Flow, type FlowModule, type FlowModuleConfig, type FlowReadyState, type FlowState, type LazyModule, type ModuleLoader, type ModuleLoaderRegistry, type ModuleRegistry, type OrchestratedFlowFinishedState, type OrchestratedFlowInput, type OrchestratedFlowReadyState, type OrchestratedFlowState, createFlowManager, createModuleLoader, createOrchestratedFlowManager, getRequiredWasmPipelines, normalizeFlowModules };
|
|
299
|
+
export { type FinishStatus, type Flow, type FlowModule, type FlowModuleConfig, type FlowReadyState, type FlowState, type LazyModule, type LazyModuleRegistry, type ModuleLoader, type ModuleLoaderRegistry, type ModuleRegistry, type OrchestratedFlowFinishedState, type OrchestratedFlowInput, type OrchestratedFlowReadyState, type OrchestratedFlowState, createFlowManager, createModuleLoader, createOrchestratedFlowManager, getRequiredWasmPipelines, normalizeFlowModules };
|
package/dist/flow.esm.js
CHANGED
|
@@ -319,6 +319,16 @@ const orchestratedFlowMachine = setup({
|
|
|
319
319
|
subscription.unsubscribe();
|
|
320
320
|
actor.stop();
|
|
321
321
|
};
|
|
322
|
+
}),
|
|
323
|
+
resolveCurrentModuleMachine: fromPromise(async ({ input }) => {
|
|
324
|
+
if (!input.moduleKey) return;
|
|
325
|
+
const eagerMachine = input.modules[input.moduleKey];
|
|
326
|
+
if (eagerMachine) return eagerMachine;
|
|
327
|
+
const lazyLoader = input.lazyModules[input.moduleKey];
|
|
328
|
+
if (!lazyLoader) return;
|
|
329
|
+
const loaded = await lazyLoader();
|
|
330
|
+
if (loaded && typeof loaded === "object" && "default" in loaded && loaded.default) return loaded.default;
|
|
331
|
+
return loaded;
|
|
322
332
|
})
|
|
323
333
|
},
|
|
324
334
|
actions: {
|
|
@@ -331,6 +341,8 @@ const orchestratedFlowMachine = setup({
|
|
|
331
341
|
config: void 0,
|
|
332
342
|
getFlow: context.getFlow,
|
|
333
343
|
registeredModules: context.registeredModules,
|
|
344
|
+
lazyRegisteredModules: context.lazyRegisteredModules,
|
|
345
|
+
currentModuleMachine: void 0,
|
|
334
346
|
getFinishStatus: context.getFinishStatus,
|
|
335
347
|
finishStatus: void 0
|
|
336
348
|
})),
|
|
@@ -347,7 +359,8 @@ const orchestratedFlowMachine = setup({
|
|
|
347
359
|
steps: flowModules.map((m) => m.key),
|
|
348
360
|
currentStepIndex: flowModules.length > 0 ? 0 : -1,
|
|
349
361
|
currentStep: firstModule?.key,
|
|
350
|
-
config
|
|
362
|
+
config,
|
|
363
|
+
currentModuleMachine: void 0
|
|
351
364
|
};
|
|
352
365
|
}),
|
|
353
366
|
setError: assign(({ event }) => ({ error: String(event.error) })),
|
|
@@ -361,9 +374,11 @@ const orchestratedFlowMachine = setup({
|
|
|
361
374
|
return {
|
|
362
375
|
currentStepIndex: nextIndex,
|
|
363
376
|
currentStep: module?.key,
|
|
364
|
-
config
|
|
377
|
+
config,
|
|
378
|
+
currentModuleMachine: void 0
|
|
365
379
|
};
|
|
366
380
|
}),
|
|
381
|
+
setCurrentModuleMachine: assign(({ event }) => ({ currentModuleMachine: event.output })),
|
|
367
382
|
setFinishStatus: assign(({ event }) => ({ finishStatus: event.output }))
|
|
368
383
|
},
|
|
369
384
|
guards: {
|
|
@@ -373,7 +388,11 @@ const orchestratedFlowMachine = setup({
|
|
|
373
388
|
if (!("output" in event)) return false;
|
|
374
389
|
const firstModuleKey = event.output.flowModules?.[0]?.key;
|
|
375
390
|
if (!firstModuleKey) return false;
|
|
376
|
-
return context.registeredModules[firstModuleKey] != null;
|
|
391
|
+
return context.registeredModules[firstModuleKey] != null || context.lazyRegisteredModules[firstModuleKey] != null;
|
|
392
|
+
},
|
|
393
|
+
hasCurrentModuleMachine: ({ event }) => {
|
|
394
|
+
if (!("output" in event)) return false;
|
|
395
|
+
return event.output != null;
|
|
377
396
|
}
|
|
378
397
|
}
|
|
379
398
|
}).createMachine({
|
|
@@ -387,7 +406,9 @@ const orchestratedFlowMachine = setup({
|
|
|
387
406
|
currentStep: void 0,
|
|
388
407
|
config: void 0,
|
|
389
408
|
getFlow: input.getFlow,
|
|
390
|
-
registeredModules: input.modules,
|
|
409
|
+
registeredModules: input.modules ?? {},
|
|
410
|
+
lazyRegisteredModules: input.lazyModules ?? {},
|
|
411
|
+
currentModuleMachine: void 0,
|
|
391
412
|
getFinishStatus: input.getFinishStatus ?? getFinishStatus,
|
|
392
413
|
finishStatus: void 0
|
|
393
414
|
}),
|
|
@@ -402,7 +423,7 @@ const orchestratedFlowMachine = setup({
|
|
|
402
423
|
src: "fetchFlow",
|
|
403
424
|
input: ({ context }) => ({ getFlow: context.getFlow }),
|
|
404
425
|
onDone: [{
|
|
405
|
-
target: "
|
|
426
|
+
target: "resolvingModule",
|
|
406
427
|
guard: "hasModule",
|
|
407
428
|
actions: "setFlowData"
|
|
408
429
|
}, {
|
|
@@ -422,6 +443,33 @@ const orchestratedFlowMachine = setup({
|
|
|
422
443
|
actions: "resetContext"
|
|
423
444
|
} }
|
|
424
445
|
},
|
|
446
|
+
resolvingModule: {
|
|
447
|
+
invoke: {
|
|
448
|
+
id: "resolveCurrentModuleMachine",
|
|
449
|
+
src: "resolveCurrentModuleMachine",
|
|
450
|
+
input: ({ context }) => ({
|
|
451
|
+
moduleKey: context.currentStep,
|
|
452
|
+
modules: context.registeredModules,
|
|
453
|
+
lazyModules: context.lazyRegisteredModules
|
|
454
|
+
}),
|
|
455
|
+
onDone: [{
|
|
456
|
+
target: "runningModule",
|
|
457
|
+
guard: "hasCurrentModuleMachine",
|
|
458
|
+
actions: "setCurrentModuleMachine"
|
|
459
|
+
}, {
|
|
460
|
+
target: "error",
|
|
461
|
+
actions: assign(({ context }) => ({ error: context.currentStep ? `No registered module found for: ${context.currentStep}` : "No registered module found: flow has no modules" }))
|
|
462
|
+
}],
|
|
463
|
+
onError: {
|
|
464
|
+
target: "error",
|
|
465
|
+
actions: "setError"
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
on: { RESET: {
|
|
469
|
+
target: "idle",
|
|
470
|
+
actions: "resetContext"
|
|
471
|
+
} }
|
|
472
|
+
},
|
|
425
473
|
runningModule: {
|
|
426
474
|
invoke: {
|
|
427
475
|
id: "currentModule",
|
|
@@ -429,7 +477,7 @@ const orchestratedFlowMachine = setup({
|
|
|
429
477
|
input: ({ context }) => {
|
|
430
478
|
if (!context.currentStep) throw new Error("No current step");
|
|
431
479
|
return {
|
|
432
|
-
machine: context.
|
|
480
|
+
machine: context.currentModuleMachine,
|
|
433
481
|
config: context.config
|
|
434
482
|
};
|
|
435
483
|
},
|
|
@@ -437,9 +485,8 @@ const orchestratedFlowMachine = setup({
|
|
|
437
485
|
target: "completing",
|
|
438
486
|
guard: "isLastStep"
|
|
439
487
|
}, {
|
|
440
|
-
target: "
|
|
441
|
-
actions: "incrementStep"
|
|
442
|
-
reenter: true
|
|
488
|
+
target: "resolvingModule",
|
|
489
|
+
actions: "incrementStep"
|
|
443
490
|
}],
|
|
444
491
|
onError: {
|
|
445
492
|
target: "error",
|
|
@@ -451,9 +498,8 @@ const orchestratedFlowMachine = setup({
|
|
|
451
498
|
target: "completing",
|
|
452
499
|
guard: "isLastStep"
|
|
453
500
|
}, {
|
|
454
|
-
target: "
|
|
455
|
-
actions: "incrementStep"
|
|
456
|
-
reenter: true
|
|
501
|
+
target: "resolvingModule",
|
|
502
|
+
actions: "incrementStep"
|
|
457
503
|
}],
|
|
458
504
|
MODULE_ERROR: {
|
|
459
505
|
target: "error",
|
|
@@ -504,7 +550,7 @@ const orchestratedFlowMachine = setup({
|
|
|
504
550
|
function mapState(snapshot) {
|
|
505
551
|
const { value, context } = snapshot;
|
|
506
552
|
if (value === "idle") return { status: "idle" };
|
|
507
|
-
if (value === "loading" || typeof value === "object") return { status: "loading" };
|
|
553
|
+
if (value === "loading" || value === "resolvingModule" || typeof value === "object") return { status: "loading" };
|
|
508
554
|
switch (value) {
|
|
509
555
|
case "runningModule": {
|
|
510
556
|
const childSnapshot = snapshot.children.currentModule?.getSnapshot();
|
|
@@ -589,6 +635,7 @@ function createOrchestratedFlowActor(options) {
|
|
|
589
635
|
return createActor(orchestratedFlowMachine, { input: {
|
|
590
636
|
getFlow: options.getFlow ?? getFlow,
|
|
591
637
|
modules: options.modules,
|
|
638
|
+
lazyModules: options.lazyModules,
|
|
592
639
|
getFinishStatus: options.getFinishStatus
|
|
593
640
|
} }).start();
|
|
594
641
|
}
|
package/dist/geolocation.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Manager } from "./Manager-
|
|
2
|
-
import "./Actor-
|
|
1
|
+
import { t as Manager } from "./Manager-N01KfnVA.js";
|
|
2
|
+
import "./Actor-Cz_KnN47.js";
|
|
3
3
|
|
|
4
4
|
//#region ../infra/src/capabilities/IGeolocationCapability.d.ts
|
|
5
5
|
type GeolocationCoords = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Manager } from "./Manager-
|
|
2
|
-
import "./Actor-
|
|
1
|
+
import { t as Manager } from "./Manager-N01KfnVA.js";
|
|
2
|
+
import "./Actor-Cz_KnN47.js";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/government-validation/types.d.ts
|
|
5
5
|
type GovernmentValidationConfig = {
|
package/dist/id.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./warmup-
|
|
2
|
-
import "./Manager-
|
|
3
|
-
import "./Actor-
|
|
4
|
-
import "./StateMachine-
|
|
5
|
-
import { t as CameraStream } from "./camera-
|
|
6
|
-
import "./types-
|
|
7
|
-
import "./types-
|
|
8
|
-
import "./deepsightService-
|
|
9
|
-
import { n as PermissionStatus, t as PermissionResult } from "./types-
|
|
10
|
-
import { A as
|
|
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, PermissionResult, PermissionStatus, RecordingSession, StartRecordingParams, UploadIdImageParams, UploadIdResponse, ValidationError, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
|
|
1
|
+
import "./warmup-yzJJKXFi.js";
|
|
2
|
+
import "./Manager-N01KfnVA.js";
|
|
3
|
+
import "./Actor-Cz_KnN47.js";
|
|
4
|
+
import "./StateMachine-DU1S4Cik.js";
|
|
5
|
+
import { t as CameraStream } from "./camera-BcVDCZxW.js";
|
|
6
|
+
import "./types-DcqFYowa.js";
|
|
7
|
+
import "./types-DufUK-_f.js";
|
|
8
|
+
import "./deepsightService-CyEcAH-I.js";
|
|
9
|
+
import { n as PermissionStatus, t as PermissionResult } from "./types-UPqCMQKa.js";
|
|
10
|
+
import { A as IdCaptureDependencies, B as RecordingSession, C as CaptureIdResponse, D as ID_ERROR_CODES, E as DetectionStatus, F as IdCaptureThresholds, H as DetectionOrientation, I as IdDocumentType, L as IdError, M as IdCaptureGeometry, N as IdCaptureInput, O as IdCaptureConfig, P as IdCaptureMode, R as IdErrorCode, S as idCaptureMachine, T as DetectionArea, U as IdCaptureSettings, V as UploadIdResponse, _ as validateUploadResponse, a as IdCaptureInitResult, b as createIdCaptureActor, c as UploadIdImageParams, d as preloadIdRecordingProvider, f as processId, g as uploadIdImage, h as stopStream, j as IdCaptureEvent, k as IdCaptureContext, l as ValidationError, m as stopRecording, n as IdCaptureState, o as InitializeIdCaptureParams, p as startRecordingSession, r as createIdCaptureManager, s as StartRecordingParams, t as IdCaptureManager, u as initializeIdCapture, v as CreateIdCaptureActorOptions, w as CapturedImage, x as IdCaptureMachine, y as IdCaptureActor, z as IdFlowStep } from "./idCaptureManager-Bx298yFC.js";
|
|
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, PermissionResult, PermissionStatus, RecordingSession, StartRecordingParams, UploadIdImageParams, UploadIdResponse, ValidationError, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, preloadIdRecordingProvider, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
|
package/dist/id.esm.js
CHANGED
|
@@ -5,7 +5,7 @@ import "./session-PLjFj_T3.esm.js";
|
|
|
5
5
|
import "./BrowserEnvironmentProvider--xQUs3sg.esm.js";
|
|
6
6
|
import "./browserSimulation-yzDdWSBf.esm.js";
|
|
7
7
|
import "./xstate.esm-BXrcOcSC.esm.js";
|
|
8
|
-
import "./
|
|
8
|
+
import "./recordingService-BDx_6XR9.esm.js";
|
|
9
9
|
import "./deepsightService-C3gQ_9Ml.esm.js";
|
|
10
10
|
import "./camera-CsT06Zqy.esm.js";
|
|
11
11
|
import "./getBrowser-B800KRAi.esm.js";
|
|
@@ -16,6 +16,6 @@ import "./platform-Dcuv6w60.esm.js";
|
|
|
16
16
|
import "./backCameraStream-CUo1USCT.esm.js";
|
|
17
17
|
import "./getDeviceClass-BKd2FOAf.esm.js";
|
|
18
18
|
import "./BrowserTimerProvider-CkHEwJFa.esm.js";
|
|
19
|
-
import { a as initializeIdCapture, c as
|
|
19
|
+
import { a as initializeIdCapture, c as startRecordingSession, d as uploadIdImage, f as validateUploadResponse, i as idCaptureMachine, l as stopRecording, o as preloadIdRecordingProvider, p as ID_ERROR_CODES, r as createIdCaptureActor, s as processId, t as createIdCaptureManager, u as stopStream } from "./idCaptureManager-bowLKHEs.esm.js";
|
|
20
20
|
|
|
21
|
-
export { ID_ERROR_CODES, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
|
|
21
|
+
export { ID_ERROR_CODES, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, preloadIdRecordingProvider, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as Manager } from "./Manager-
|
|
2
|
-
import { t as ActorRefFrom } from "./Actor-
|
|
3
|
-
import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-
|
|
4
|
-
import { t as CameraStream } from "./camera-
|
|
5
|
-
import { a as TutorialIdConfig, i as RegulationTypes, t as Flow } from "./types-
|
|
6
|
-
import { c as IMLProviderCapability, d as IRecordingCapability, f as RecordingConnection, i as IncodeCanvas, l as MLProviderConfig, n as IMotionSensorCapability, r as StreamCanvasCapture, t as DeepsightService, u as IStorageCapability } from "./deepsightService-
|
|
7
|
-
import { n as PermissionStatus, t as PermissionResult } from "./types-
|
|
1
|
+
import { t as Manager } from "./Manager-N01KfnVA.js";
|
|
2
|
+
import { t as ActorRefFrom } from "./Actor-Cz_KnN47.js";
|
|
3
|
+
import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-DU1S4Cik.js";
|
|
4
|
+
import { t as CameraStream } from "./camera-BcVDCZxW.js";
|
|
5
|
+
import { a as TutorialIdConfig, i as RegulationTypes, t as Flow } from "./types-DufUK-_f.js";
|
|
6
|
+
import { c as IMLProviderCapability, d as IRecordingCapability, f as RecordingConnection, i as IncodeCanvas, l as MLProviderConfig, n as IMotionSensorCapability, r as StreamCanvasCapture, t as DeepsightService, u as IStorageCapability } from "./deepsightService-CyEcAH-I.js";
|
|
7
|
+
import { n as PermissionStatus, t as PermissionResult } from "./types-UPqCMQKa.js";
|
|
8
8
|
|
|
9
9
|
//#region ../infra/src/capabilities/IIdCaptureCapability.d.ts
|
|
10
10
|
/**
|
|
@@ -514,6 +514,7 @@ type StartRecordingParams = {
|
|
|
514
514
|
existing?: RecordingSession;
|
|
515
515
|
type: 'frontId' | 'backId';
|
|
516
516
|
};
|
|
517
|
+
declare function preloadIdRecordingProvider(config: IdCaptureConfig): void;
|
|
517
518
|
declare function startRecordingSession(params: StartRecordingParams): Promise<RecordingSession | undefined>;
|
|
518
519
|
declare function stopRecording(session: RecordingSession): void;
|
|
519
520
|
declare function processId(isSecondId?: boolean, queueName?: string, signal?: AbortSignal): Promise<{
|
|
@@ -644,4 +645,4 @@ declare function createIdCaptureManagerFromActor(actor: IdCaptureActor): Manager
|
|
|
644
645
|
};
|
|
645
646
|
type IdCaptureManager = ReturnType<typeof createIdCaptureManager>;
|
|
646
647
|
//#endregion
|
|
647
|
-
export {
|
|
648
|
+
export { IdCaptureDependencies as A, RecordingSession as B, CaptureIdResponse as C, ID_ERROR_CODES as D, DetectionStatus as E, IdCaptureThresholds as F, DetectionOrientation as H, IdDocumentType as I, IdError as L, IdCaptureGeometry as M, IdCaptureInput as N, IdCaptureConfig as O, IdCaptureMode as P, IdErrorCode as R, idCaptureMachine as S, DetectionArea as T, IdCaptureSettings as U, UploadIdResponse as V, validateUploadResponse as _, IdCaptureInitResult as a, createIdCaptureActor as b, UploadIdImageParams as c, preloadIdRecordingProvider as d, processId as f, uploadIdImage as g, stopStream as h, createIdCaptureManagerFromActor as i, IdCaptureEvent as j, IdCaptureContext as k, ValidationError as l, stopRecording as m, IdCaptureState as n, InitializeIdCaptureParams as o, startRecordingSession as p, createIdCaptureManager as r, StartRecordingParams as s, IdCaptureManager as t, initializeIdCapture as u, CreateIdCaptureActorOptions as v, CapturedImage as w, IdCaptureMachine as x, IdCaptureActor as y, IdFlowStep as z };
|
|
@@ -3,7 +3,7 @@ import { r as getToken, t as api } from "./api-CyI8qTie.esm.js";
|
|
|
3
3
|
import { _ as endpoints, n as eventModuleNames, o as createManagerInstrumentation, r as eventScreenNames, v as revokeObjectURL } from "./events-BlVGS-8F.esm.js";
|
|
4
4
|
import { t as getDisableIpify } from "./session-PLjFj_T3.esm.js";
|
|
5
5
|
import { a as createActor, i as fromPromise, n as assign, o as createManager, r as fromCallback, t as setup } from "./xstate.esm-BXrcOcSC.esm.js";
|
|
6
|
-
import {
|
|
6
|
+
import { _ as StreamCanvasCapture, d as createRecordingSession, f as startRecording, g as flagIdManualReview, m as StreamCanvasProcessingSession, n as preloadOpenViduProvider, p as stopRecording$1, y as BrowserStorageProvider } from "./recordingService-BDx_6XR9.esm.js";
|
|
7
7
|
import { n as IncodeCanvas } from "./deepsightService-C3gQ_9Ml.esm.js";
|
|
8
8
|
import { r as getWindowDimensions } from "./getBrowser-B800KRAi.esm.js";
|
|
9
9
|
import { t as addDeviceStats } from "./stats-BZ1kFW4p.esm.js";
|
|
@@ -37,49 +37,6 @@ function getAvailableDocumentTypes(config) {
|
|
|
37
37
|
return adjustedDocumentTypes;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
//#endregion
|
|
41
|
-
//#region src/modules/id/types.ts
|
|
42
|
-
const ID_ERROR_CODES = {
|
|
43
|
-
UPLOAD_ERROR: "UPLOAD_ERROR",
|
|
44
|
-
CLASSIFICATION_FAILED: "CLASSIFICATION_FAILED",
|
|
45
|
-
LOW_SHARPNESS: "LOW_SHARPNESS",
|
|
46
|
-
GLARE_DETECTED: "GLARE_DETECTED",
|
|
47
|
-
WRONG_DOCUMENT_SIDE: "WRONG_DOCUMENT_SIDE",
|
|
48
|
-
ID_TYPE_UNACCEPTABLE: "ID_TYPE_UNACCEPTABLE",
|
|
49
|
-
READABILITY_ISSUE: "READABILITY_ISSUE",
|
|
50
|
-
RETRY_EXHAUSTED_CONTINUE_TO_BACK: "RETRY_EXHAUSTED_CONTINUE_TO_BACK",
|
|
51
|
-
RETRY_EXHAUSTED_SKIP_BACK: "RETRY_EXHAUSTED_SKIP_BACK",
|
|
52
|
-
NO_MORE_TRIES: "NO_MORE_TRIES",
|
|
53
|
-
UNEXPECTED_ERROR: "UNEXPECTED_ERROR",
|
|
54
|
-
NO_TOKEN: "NO_TOKEN",
|
|
55
|
-
PERMISSION_DENIED: "PERMISSION_DENIED",
|
|
56
|
-
USER_CANCELLED: "USER_CANCELLED",
|
|
57
|
-
SERVER: "SERVER_ERROR"
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
//#endregion
|
|
61
|
-
//#region ../infra/src/wasm/idCaptureDefaults.ts
|
|
62
|
-
/**
|
|
63
|
-
* Default WASM thresholds for ID capture quality checks.
|
|
64
|
-
* Based on legacy pipelinesConfig.ts values.
|
|
65
|
-
*/
|
|
66
|
-
const DEFAULT_ID_CAPTURE_THRESHOLDS = {
|
|
67
|
-
blurThreshold: .2,
|
|
68
|
-
blurChangeThreshold: .2,
|
|
69
|
-
glareThreshold: .3,
|
|
70
|
-
clsThreshold: .98,
|
|
71
|
-
sideThreshold: .8,
|
|
72
|
-
iouThreshold: .8,
|
|
73
|
-
idDetectedTimeout: 1e4,
|
|
74
|
-
autocaptureTimeout: 5e3,
|
|
75
|
-
framesAggregationInterval: 3e3,
|
|
76
|
-
minFaceIdQualityScore: .62
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* Default model version for ID capture.
|
|
80
|
-
*/
|
|
81
|
-
const DEFAULT_ID_CAPTURE_MODEL_VERSION = "v2";
|
|
82
|
-
|
|
83
40
|
//#endregion
|
|
84
41
|
//#region ../infra/src/providers/wasm/IdCaptureProvider.ts
|
|
85
42
|
var IdCaptureProvider = class extends BaseWasmProvider {
|
|
@@ -239,6 +196,26 @@ async function getIdCameraStream(deviceId) {
|
|
|
239
196
|
return getBackCameraStream(deviceId);
|
|
240
197
|
}
|
|
241
198
|
|
|
199
|
+
//#endregion
|
|
200
|
+
//#region src/modules/id/types.ts
|
|
201
|
+
const ID_ERROR_CODES = {
|
|
202
|
+
UPLOAD_ERROR: "UPLOAD_ERROR",
|
|
203
|
+
CLASSIFICATION_FAILED: "CLASSIFICATION_FAILED",
|
|
204
|
+
LOW_SHARPNESS: "LOW_SHARPNESS",
|
|
205
|
+
GLARE_DETECTED: "GLARE_DETECTED",
|
|
206
|
+
WRONG_DOCUMENT_SIDE: "WRONG_DOCUMENT_SIDE",
|
|
207
|
+
ID_TYPE_UNACCEPTABLE: "ID_TYPE_UNACCEPTABLE",
|
|
208
|
+
READABILITY_ISSUE: "READABILITY_ISSUE",
|
|
209
|
+
RETRY_EXHAUSTED_CONTINUE_TO_BACK: "RETRY_EXHAUSTED_CONTINUE_TO_BACK",
|
|
210
|
+
RETRY_EXHAUSTED_SKIP_BACK: "RETRY_EXHAUSTED_SKIP_BACK",
|
|
211
|
+
NO_MORE_TRIES: "NO_MORE_TRIES",
|
|
212
|
+
UNEXPECTED_ERROR: "UNEXPECTED_ERROR",
|
|
213
|
+
NO_TOKEN: "NO_TOKEN",
|
|
214
|
+
PERMISSION_DENIED: "PERMISSION_DENIED",
|
|
215
|
+
USER_CANCELLED: "USER_CANCELLED",
|
|
216
|
+
SERVER: "SERVER_ERROR"
|
|
217
|
+
};
|
|
218
|
+
|
|
242
219
|
//#endregion
|
|
243
220
|
//#region src/modules/id/idCaptureServices.ts
|
|
244
221
|
/**
|
|
@@ -444,10 +421,18 @@ function buildResolutionFromStream(stream) {
|
|
|
444
421
|
}
|
|
445
422
|
return "1080x1920";
|
|
446
423
|
}
|
|
424
|
+
function preloadIdRecordingProvider(config) {
|
|
425
|
+
if (config.enableIdRecording !== true) return;
|
|
426
|
+
preloadOpenViduProvider();
|
|
427
|
+
}
|
|
428
|
+
async function createOpenViduRecordingProvider() {
|
|
429
|
+
const { OpenViduRecordingProvider } = await import("./OpenViduRecordingProvider-PvkEhhDq.esm.js");
|
|
430
|
+
return new OpenViduRecordingProvider();
|
|
431
|
+
}
|
|
447
432
|
async function startRecordingSession(params) {
|
|
448
433
|
if (params.config.enableIdRecording !== true) return;
|
|
449
434
|
if (params.existing) return params.existing;
|
|
450
|
-
const provider = params.config.recording?.capability ??
|
|
435
|
+
const provider = params.config.recording?.capability ?? await createOpenViduRecordingProvider();
|
|
451
436
|
const clonedStream = params.stream.clone();
|
|
452
437
|
const hasAudio = clonedStream.getAudioTracks().length > 0;
|
|
453
438
|
const resolution = buildResolutionFromStream(clonedStream);
|
|
@@ -487,6 +472,29 @@ async function processId(isSecondId = false, queueName = "", signal) {
|
|
|
487
472
|
return { isDocumentExpired: (await api.post(url, {}, { signal })).data?.isDocumentExpired ?? false };
|
|
488
473
|
}
|
|
489
474
|
|
|
475
|
+
//#endregion
|
|
476
|
+
//#region ../infra/src/wasm/idCaptureDefaults.ts
|
|
477
|
+
/**
|
|
478
|
+
* Default WASM thresholds for ID capture quality checks.
|
|
479
|
+
* Based on legacy pipelinesConfig.ts values.
|
|
480
|
+
*/
|
|
481
|
+
const DEFAULT_ID_CAPTURE_THRESHOLDS = {
|
|
482
|
+
blurThreshold: .2,
|
|
483
|
+
blurChangeThreshold: .2,
|
|
484
|
+
glareThreshold: .3,
|
|
485
|
+
clsThreshold: .98,
|
|
486
|
+
sideThreshold: .8,
|
|
487
|
+
iouThreshold: .8,
|
|
488
|
+
idDetectedTimeout: 1e4,
|
|
489
|
+
autocaptureTimeout: 5e3,
|
|
490
|
+
framesAggregationInterval: 3e3,
|
|
491
|
+
minFaceIdQualityScore: .62
|
|
492
|
+
};
|
|
493
|
+
/**
|
|
494
|
+
* Default model version for ID capture.
|
|
495
|
+
*/
|
|
496
|
+
const DEFAULT_ID_CAPTURE_MODEL_VERSION = "v2";
|
|
497
|
+
|
|
490
498
|
//#endregion
|
|
491
499
|
//#region src/modules/id/idCaptureActors.ts
|
|
492
500
|
const checkPermissionActor = fromPromise(async () => {
|
|
@@ -1198,6 +1206,9 @@ const _idCaptureMachine = setup({
|
|
|
1198
1206
|
trackCameraId: ({ context }) => {
|
|
1199
1207
|
/* @__PURE__ */ performTrackCameraId(context);
|
|
1200
1208
|
},
|
|
1209
|
+
preloadRecordingProvider: ({ context }) => {
|
|
1210
|
+
preloadIdRecordingProvider(context.config);
|
|
1211
|
+
},
|
|
1201
1212
|
resetContext: assign(({ context }) => getResetContextValues(context)),
|
|
1202
1213
|
resetDetection: ({ context }) => {
|
|
1203
1214
|
performResetDetection(context);
|
|
@@ -1340,6 +1351,7 @@ const _idCaptureMachine = setup({
|
|
|
1340
1351
|
actions: ["setSelectedDocument", "setCurrentMode"]
|
|
1341
1352
|
}] } },
|
|
1342
1353
|
loading: {
|
|
1354
|
+
entry: "preloadRecordingProvider",
|
|
1343
1355
|
type: "parallel",
|
|
1344
1356
|
states: {
|
|
1345
1357
|
permissionCheck: {
|
|
@@ -1394,7 +1406,7 @@ const _idCaptureMachine = setup({
|
|
|
1394
1406
|
},
|
|
1395
1407
|
tutorial: {
|
|
1396
1408
|
initial: "checkingPermission",
|
|
1397
|
-
entry: "trackTutorialId",
|
|
1409
|
+
entry: ["trackTutorialId", "preloadRecordingProvider"],
|
|
1398
1410
|
states: {
|
|
1399
1411
|
checkingPermission: {
|
|
1400
1412
|
invoke: {
|
|
@@ -1495,6 +1507,7 @@ const _idCaptureMachine = setup({
|
|
|
1495
1507
|
}
|
|
1496
1508
|
},
|
|
1497
1509
|
permissions: {
|
|
1510
|
+
entry: "preloadRecordingProvider",
|
|
1498
1511
|
initial: "idle",
|
|
1499
1512
|
states: {
|
|
1500
1513
|
idle: {
|
|
@@ -1561,7 +1574,7 @@ const _idCaptureMachine = setup({
|
|
|
1561
1574
|
},
|
|
1562
1575
|
capture: {
|
|
1563
1576
|
initial: "checkingStream",
|
|
1564
|
-
entry: "trackCameraId",
|
|
1577
|
+
entry: ["trackCameraId", "preloadRecordingProvider"],
|
|
1565
1578
|
exit: ["stopMediaRecording", "clearRecordingSession"],
|
|
1566
1579
|
on: { SET_FRAME_RECT: { actions: "setFrameRect" } },
|
|
1567
1580
|
states: {
|
|
@@ -2298,4 +2311,4 @@ function createIdCaptureManagerFromActor(actor) {
|
|
|
2298
2311
|
}
|
|
2299
2312
|
|
|
2300
2313
|
//#endregion
|
|
2301
|
-
export { initializeIdCapture as a,
|
|
2314
|
+
export { initializeIdCapture as a, startRecordingSession as c, uploadIdImage as d, validateUploadResponse as f, idCaptureMachine as i, stopRecording as l, createIdCaptureManagerFromActor as n, preloadIdRecordingProvider as o, ID_ERROR_CODES as p, createIdCaptureActor as r, processId as s, createIdCaptureManager as t, stopStream as u };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./warmup-
|
|
2
|
-
import { a as reset, i as isConfigured, s as setup, t as SetupOptions } from "./setup-
|
|
1
|
+
import "./warmup-yzJJKXFi.js";
|
|
2
|
+
import { a as reset, i as isConfigured, s as setup, t as SetupOptions } from "./setup-DfinQjIF.js";
|
|
3
3
|
export { type SetupOptions, isConfigured, reset, setup };
|