@incodetech/core 0.0.0-dev-20260723-e73d5099 → 0.0.0-dev-20260723-397b76d8
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 +2 -1
- package/dist/ae-signature.esm.js +1 -1
- package/dist/authentication.d.ts +3 -2
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-BCm7eGoK.d.ts → authenticationManager-Ce1nLm5y.d.ts} +1 -1
- package/dist/{authenticationManager-Cmio9w7i.esm.js → authenticationManager-DW449fW3.esm.js} +2 -2
- package/dist/{authenticationStateMachine-CrkXvIhE.esm.js → authenticationStateMachine-CrvxMmoJ.esm.js} +2 -2
- package/dist/consent.d.ts +1 -1
- package/dist/{consentManager-3Pbtj-RV.d.ts → consentManager-uhDPdU6i.d.ts} +4 -4
- package/dist/{deepsightLoader-Be2xONxN.esm.js → deepsightLoader-BCxEZjuI.esm.js} +1 -1
- package/dist/document-capture.d.ts +2 -1
- package/dist/document-upload.d.ts +4 -4
- package/dist/{documentCaptureManager-CBP2DkPr.d.ts → documentCaptureManager-pEqMY_Oo.d.ts} +2 -104
- package/dist/dynamic-forms.d.ts +2 -1
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-Dposae2l.d.ts → dynamicFormsManager-BYac2uEY.d.ts} +2 -48
- package/dist/{dynamicFormsManager-Fi2O2RUM.esm.js → dynamicFormsManager-DI0sCyVB.esm.js} +1 -1
- package/dist/ekyb.d.ts +2 -1
- package/dist/ekyb.esm.js +3 -2
- package/dist/{ekybManager-CObZ7foB.esm.js → ekybManager-D46NN7cx.esm.js} +1 -1
- package/dist/{ekybManager-CBX0tM04.d.ts → ekybManager-Dzswb_b8.d.ts} +3 -48
- package/dist/{ekybStateMachine-Cw4pz_hf.esm.js → ekybStateMachine-DX7KeqlM.esm.js} +2 -170
- package/dist/ekyc.esm.js +3 -2
- package/dist/{ekycManager-CI7sN4Ln.esm.js → ekycManager-DRrG5I6e.esm.js} +1 -1
- package/dist/{ekycStateMachine-DFQdmBXl.esm.js → ekycStateMachine-DRbbavZy.esm.js} +2 -223
- package/dist/ekycUtils-Dew1rBG0.esm.js +223 -0
- package/dist/electronic-signature.d.ts +2 -1
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/extensibility.d.ts +12 -11
- package/dist/extensibility.esm.js +9 -9
- package/dist/{faceCaptureManagerFactory-DPf1rRsd.d.ts → faceCaptureManagerFactory-BUE6z9iY.d.ts} +2 -4
- package/dist/{faceCaptureManagerFactory-CeUzH_6U.esm.js → faceCaptureManagerFactory-BcntOvvC.esm.js} +1 -1
- package/dist/{faceCaptureSetup-CtiVwaPe.esm.js → faceCaptureSetup-BUAw6zY_.esm.js} +2 -2
- package/dist/flow.d.ts +44 -1
- package/dist/flow.esm.js +4 -11
- package/dist/flowServices-BU1mMxoQ.esm.js +596 -0
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-bZDyI0gy.esm.js → geolocationManager-zeqAcVHC.esm.js} +1 -1
- package/dist/id-ocr.d.ts +2 -1
- package/dist/id.d.ts +2 -1
- package/dist/id.esm.js +2 -2
- package/dist/{idCaptureManager-Dqn6U25Q.esm.js → idCaptureManager-BqmmPXFm.esm.js} +3 -4
- package/dist/idCaptureManager-CtsYvX-Z.d.ts +405 -0
- package/dist/{idCaptureStateMachine-B7atraNp.esm.js → idCaptureStateMachine-CnKkMNrI.esm.js} +8 -50
- package/dist/{idOcrManager-B-JyjyPb.d.ts → idOcrManager-DlYG277_.d.ts} +2 -163
- package/dist/{index-CKbmDFNq.d.ts → index-DGcdhk8Y.d.ts} +2 -64
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/mandatory-consent.d.ts +2 -1
- package/dist/{mandatoryConsentManager-Bc9AKBft.d.ts → mandatoryConsentManager-Ck2e2W4o.d.ts} +6 -25
- package/dist/{onDeviceFaceResults-CbO3AqMC.esm.js → onDeviceFaceResults-CWMT6JTR.esm.js} +1 -1
- package/dist/personhood.esm.js +2 -2
- package/dist/qe-signature.d.ts +2 -1
- package/dist/qe-signature.esm.js +1 -1
- package/dist/{recordingService-YhyXG0Ch.esm.js → recordingService-CfT3nmFO.esm.js} +1 -1
- package/dist/redirect-to-mobile.d.ts +2 -1
- package/dist/{redirectToMobileManager-NVQM3o5P.d.ts → redirectToMobileManager-DZlJhqvq.d.ts} +2 -40
- package/dist/selfie.d.ts +2 -2
- package/dist/selfie.esm.js +4 -4
- package/dist/{selfieManager-CgmJu62N.esm.js → selfieManager-D-QJUh3X.esm.js} +2 -2
- package/dist/{selfieManager-Dq9wNlcg.d.ts → selfieManager-LabfZln4.d.ts} +1 -1
- package/dist/{selfieStateMachine-C_piZ4gb.esm.js → selfieStateMachine-BH-U-y6R.esm.js} +2 -2
- package/dist/session-BU4MkUEc.esm.js +1 -0
- package/dist/session.d.ts +2 -0
- package/dist/session.esm.js +2 -2
- package/dist/{sessionInitializer-B5tU3IQv.esm.js → sessionInitializer-DT7IYwRx.esm.js} +58 -11
- package/dist/{setup-BBfVpTog.d.ts → setup-B1WTXTQV.d.ts} +15 -0
- package/dist/{setup-Cx9IY17e.esm.js → setup-DXdKnXXf.esm.js} +21 -7
- package/dist/types-B4BObr_7.d.ts +105 -0
- package/dist/types-BAvkiv6L.d.ts +6 -0
- package/dist/types-BQgIv5p8.d.ts +21 -0
- package/dist/types-BfHiko5D.d.ts +48 -0
- package/dist/types-CBJI9n6h.d.ts +163 -0
- package/dist/{idCaptureManager-DTe_5dcI.d.ts → types-D0ohdBDu.d.ts} +2 -407
- package/dist/types-DPIDuhut2.d.ts +40 -0
- package/dist/types-DWaEoU0I.d.ts +64 -0
- package/dist/types-xIEGXWk8.d.ts +48 -0
- package/dist/video-selfie.esm.js +3 -3
- package/dist/wasm.d.ts +1 -1
- package/dist/wasm.esm.js +1 -1
- package/dist/workflow.d.ts +4 -4
- package/dist/workflow.esm.js +16 -11
- package/package.json +1 -1
- package/dist/flowServices-Caz-Bdol.esm.js +0 -209
- package/dist/session-CoL4WBRi.esm.js +0 -1
- package/dist/videoSelfieSteps-DHcibfYH.esm.js +0 -57
- package/dist/{dynamicFormsStateMachine-DiPpuHgF.esm.js → dynamicFormsStateMachine-BQqAwNQ-.esm.js} +1 -1
- package/dist/{electronicSignatureManager-DGFwHdro.esm.js → electronicSignatureManager-BXIpAJ5m.esm.js} +1 -1
- package/dist/{geolocationStateMachine-ByU6-nbM.esm.js → geolocationStateMachine-DxSETS9_.esm.js} +1 -1
package/dist/workflow.esm.js
CHANGED
|
@@ -2,31 +2,33 @@ import { g as updateFeatureManagementUser } from "./feature-management-Dw96qEMs.
|
|
|
2
2
|
import { t as api } from "./api-BDTZNnca.esm.js";
|
|
3
3
|
import { m as addEvent, n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dy8PyVO5.esm.js";
|
|
4
4
|
import { t as endpoints } from "./endpoints-CfRg7iAr.esm.js";
|
|
5
|
-
import { i as initializeSession, r as getSessionFingerprintResult } from "./sessionInitializer-
|
|
5
|
+
import { i as initializeSession, r as getSessionFingerprintResult } from "./sessionInitializer-DT7IYwRx.esm.js";
|
|
6
|
+
import { r as toIncodeApiError } from "./apiError-B-PkYxln.esm.js";
|
|
7
|
+
import { g as toEkybConfig } from "./flowServices-BU1mMxoQ.esm.js";
|
|
8
|
+
import { i as toEkycConfig } from "./ekycUtils-Dew1rBG0.esm.js";
|
|
6
9
|
import { c as createManager, o as createActor, r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
|
|
7
10
|
import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
|
|
8
|
-
import {
|
|
9
|
-
import { n as electronicSignatureMachine } from "./electronicSignatureManager-DGFwHdro.esm.js";
|
|
11
|
+
import { n as electronicSignatureMachine } from "./electronicSignatureManager-BXIpAJ5m.esm.js";
|
|
10
12
|
import "./ae-signature.esm.js";
|
|
11
13
|
import { t as antifraudMachine } from "./antifraudStateMachine-VB-aXHct.esm.js";
|
|
12
|
-
import { t as authenticationMachine } from "./authenticationStateMachine-
|
|
14
|
+
import { t as authenticationMachine } from "./authenticationStateMachine-CrvxMmoJ.esm.js";
|
|
13
15
|
import { t as certificateIssuanceMachine } from "./certificateIssuanceStateMachine-Di_bLlkP.esm.js";
|
|
14
16
|
import { t as consentMachine } from "./consentStateMachine-STURxpEc.esm.js";
|
|
15
17
|
import { t as curpValidationMachine } from "./curpValidationStateMachine-Dq6l4oeZ.esm.js";
|
|
16
18
|
import { t as customWatchlistMachine } from "./customWatchlistStateMachine-BuQML-pk.esm.js";
|
|
17
19
|
import { t as documentCaptureMachine } from "./documentCaptureStateMachine-BXgH9gGq.esm.js";
|
|
18
|
-
import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
20
|
+
import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-BQqAwNQ-.esm.js";
|
|
21
|
+
import { t as ekybMachine } from "./ekybStateMachine-DX7KeqlM.esm.js";
|
|
22
|
+
import { t as ekycMachine } from "./ekycStateMachine-DRbbavZy.esm.js";
|
|
21
23
|
import { t as emailMachine } from "./emailStateMachine-DQS-QMgQ.esm.js";
|
|
22
|
-
import { t as selfieMachine } from "./selfieStateMachine-
|
|
23
|
-
import { t as idCaptureMachine } from "./idCaptureStateMachine-
|
|
24
|
+
import { t as selfieMachine } from "./selfieStateMachine-BH-U-y6R.esm.js";
|
|
25
|
+
import { t as idCaptureMachine } from "./idCaptureStateMachine-CnKkMNrI.esm.js";
|
|
24
26
|
import { t as phoneMachine } from "./phoneStateMachine-CLGcLA8t.esm.js";
|
|
25
27
|
import { n as identityReuseMachine } from "./identityReuseStateMachine-B0IFF3R7.esm.js";
|
|
26
28
|
import { t as mandatoryConsentMachine } from "./mandatoryConsentStateMachine-BP3npRnI.esm.js";
|
|
27
29
|
import { t as idOcrStateMachine } from "./idOcrStateMachine-jfAyK4Bb.esm.js";
|
|
28
30
|
import { t as redirectToMobileMachine } from "./redirectToMobileStateMachine-D78eaxsp.esm.js";
|
|
29
|
-
import { t as geolocationMachine } from "./geolocationStateMachine-
|
|
31
|
+
import { t as geolocationMachine } from "./geolocationStateMachine-DxSETS9_.esm.js";
|
|
30
32
|
import { t as idVerificationMachine } from "./idVerificationStateMachine-7BSciEJk.esm.js";
|
|
31
33
|
import { t as faceMatchMachine } from "./faceMatchStateMachine-D_7UX1rV.esm.js";
|
|
32
34
|
import { n as getFinishStatus, r as getTotalScoreStatus } from "./flowCompletionService-D5oIlcza.esm.js";
|
|
@@ -156,7 +158,10 @@ async function processCustomNode(data, signal) {
|
|
|
156
158
|
//#endregion
|
|
157
159
|
//#region src/modules/workflow/workflowActors.ts
|
|
158
160
|
async function loadWorkflow(input, signal) {
|
|
159
|
-
await initializeSession({
|
|
161
|
+
await initializeSession({
|
|
162
|
+
signal,
|
|
163
|
+
preloadFlow: false
|
|
164
|
+
}).catch(() => void 0);
|
|
160
165
|
const workflowConfig = await getWorkflowConfig(signal);
|
|
161
166
|
await updateFeatureManagementUser({ customIDs: { workflow_id: workflowConfig.id } });
|
|
162
167
|
const realNode = await getCurrentNode(signal);
|
package/package.json
CHANGED
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
import { g as updateFeatureManagementUser } from "./feature-management-Dw96qEMs.esm.js";
|
|
2
|
-
import { t as api } from "./api-BDTZNnca.esm.js";
|
|
3
|
-
import { t as endpoints } from "./endpoints-CfRg7iAr.esm.js";
|
|
4
|
-
import { i as initializeSession, r as getSessionFingerprintResult } from "./sessionInitializer-B5tU3IQv.esm.js";
|
|
5
|
-
import { r as toIncodeApiError } from "./apiError-B-PkYxln.esm.js";
|
|
6
|
-
import "./session-CoL4WBRi.esm.js";
|
|
7
|
-
import { r as videoSelfieWasmPipelines } from "./videoSelfieSteps-DHcibfYH.esm.js";
|
|
8
|
-
//#region src/modules/flow/flowUtils.ts
|
|
9
|
-
const WASM_MODULE_PIPELINES = {
|
|
10
|
-
SELFIE: "selfie",
|
|
11
|
-
AUTHENTICATION: "selfie",
|
|
12
|
-
FACE_MATCH: "selfie",
|
|
13
|
-
ID: "idCapture",
|
|
14
|
-
TUTORIAL_ID: "idCapture",
|
|
15
|
-
SECOND_ID: "idCapture"
|
|
16
|
-
};
|
|
17
|
-
const FACE_MODULES_WITH_ON_DEVICE_VARIANT = /* @__PURE__ */ new Set(["SELFIE", "AUTHENTICATION"]);
|
|
18
|
-
function isOnDeviceFaceModule(module) {
|
|
19
|
-
if (!FACE_MODULES_WITH_ON_DEVICE_VARIANT.has(module.key)) return false;
|
|
20
|
-
return module.configuration?.onDeviceFaceResultsSubmissionEnabled === true;
|
|
21
|
-
}
|
|
22
|
-
function isVideoOnboardingModule(module) {
|
|
23
|
-
return module.key === "VIDEO_ONBOARDING";
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Analyzes a flow configuration and returns the WASM pipelines needed.
|
|
27
|
-
* Use this to conditionally warmup WASM only when required by the flow.
|
|
28
|
-
*
|
|
29
|
-
* Modules with `onDeviceFaceResultsSubmissionEnabled: true` (currently SELFIE
|
|
30
|
-
* and AUTHENTICATION) select the 6-model `'onDeviceSelfie'` bundle instead of
|
|
31
|
-
* the default 4-model `'selfie'` bundle.
|
|
32
|
-
*
|
|
33
|
-
* @param flow - The flow configuration from /omni/onboarding/flow
|
|
34
|
-
* @returns Array of WASM pipelines needed (e.g., ['selfie', 'idCapture'])
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* ```typescript
|
|
38
|
-
* const pipelines = getRequiredWasmPipelines(flow);
|
|
39
|
-
* if (pipelines.length > 0) {
|
|
40
|
-
* warmupWasm({ ...wasmConfig, pipelines });
|
|
41
|
-
* }
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
function getRequiredWasmPipelines(flow) {
|
|
45
|
-
const pipelines = /* @__PURE__ */ new Set();
|
|
46
|
-
for (const module of flow.flowModules) {
|
|
47
|
-
if (isOnDeviceFaceModule(module)) {
|
|
48
|
-
pipelines.add("onDeviceSelfie");
|
|
49
|
-
continue;
|
|
50
|
-
}
|
|
51
|
-
if (isVideoOnboardingModule(module)) {
|
|
52
|
-
for (const p of videoSelfieWasmPipelines(module.configuration)) pipelines.add(p);
|
|
53
|
-
continue;
|
|
54
|
-
}
|
|
55
|
-
const pipeline = WASM_MODULE_PIPELINES[module.key];
|
|
56
|
-
if (pipeline) pipelines.add(pipeline);
|
|
57
|
-
}
|
|
58
|
-
return [...pipelines];
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Normalizes flow modules by expanding TUTORIAL_ID into ID + SECOND_ID
|
|
62
|
-
* based on configuration flags. Matches legacy flowService behavior.
|
|
63
|
-
*
|
|
64
|
-
* - TUTORIAL_ID becomes ID (with same config)
|
|
65
|
-
* - If secondId: true, adds SECOND_ID module with isSecondId: true
|
|
66
|
-
* - thirdId is deprecated and ignored; the flow continues to the next step
|
|
67
|
-
* - Bare ID following TUTORIAL_ID is dropped (already merged)
|
|
68
|
-
*/
|
|
69
|
-
function normalizeFlowModules(flow, options = {}) {
|
|
70
|
-
let modules = normalizeIdModules(flow.flowModules);
|
|
71
|
-
modules = normalizeCpfModules(modules, options);
|
|
72
|
-
modules = dropWatchlistBusinessIfEkyb(modules);
|
|
73
|
-
modules = dropSelfieIfVideoSelfieUsesAsSelfie(modules);
|
|
74
|
-
if (shouldInjectRedirect(flow, modules, options)) modules = addRedirect(flow, modules, options);
|
|
75
|
-
return modules;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Drops WATCHLIST_BUSINESS when EKYB is present in the same flow.
|
|
79
|
-
* The EKYB module performs a superset of the watchlist-for-business check,
|
|
80
|
-
* so running both would be redundant.
|
|
81
|
-
*/
|
|
82
|
-
function dropWatchlistBusinessIfEkyb(modules) {
|
|
83
|
-
if (!hasModule(modules, "EKYB")) return modules;
|
|
84
|
-
return modules.filter((m) => m.key !== "WATCHLIST_BUSINESS");
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Drops standalone SELFIE modules when a VIDEO_ONBOARDING module has
|
|
88
|
-
* `useAsSelfie: true`. The video-selfie sequence captures the onboarding selfie
|
|
89
|
-
* itself (its own `selfie` step), so a separate SELFIE step would be redundant.
|
|
90
|
-
* Only SELFIE is removed (not AUTHENTICATION / FACE_MATCH). Mirrors legacy
|
|
91
|
-
* flowService `removeSelfie`.
|
|
92
|
-
*/
|
|
93
|
-
function dropSelfieIfVideoSelfieUsesAsSelfie(modules) {
|
|
94
|
-
if (!modules.some((m) => m.key === "VIDEO_ONBOARDING" && m.configuration.useAsSelfie === true)) return modules;
|
|
95
|
-
return modules.filter((m) => m.key !== "SELFIE");
|
|
96
|
-
}
|
|
97
|
-
function normalizeIdModules(modules) {
|
|
98
|
-
return modules.flatMap((module, idx, arr) => {
|
|
99
|
-
if (module.key === "TUTORIAL_ID") {
|
|
100
|
-
const idConfig = module.configuration;
|
|
101
|
-
const result = [{
|
|
102
|
-
key: "ID",
|
|
103
|
-
configuration: idConfig
|
|
104
|
-
}];
|
|
105
|
-
if (idConfig.secondId) result.push({
|
|
106
|
-
key: "SECOND_ID",
|
|
107
|
-
configuration: {
|
|
108
|
-
...idConfig,
|
|
109
|
-
isSecondId: true
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
return result;
|
|
113
|
-
}
|
|
114
|
-
const prev = arr[idx - 1];
|
|
115
|
-
if (module.key === "ID" && prev?.key === "TUTORIAL_ID") return [];
|
|
116
|
-
return [module];
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
function normalizeCpfModules(modules, options) {
|
|
120
|
-
if (options.useCPF !== true) return modules;
|
|
121
|
-
return modules.map((module) => module.key === "ID_OCR" ? {
|
|
122
|
-
key: "CPF_OCR",
|
|
123
|
-
configuration: {}
|
|
124
|
-
} : module);
|
|
125
|
-
}
|
|
126
|
-
function shouldInjectRedirect(flow, modules, options) {
|
|
127
|
-
return options.isDesktop === true && flow.redirectDesktopToMobile === true && !hasModule(modules, "REDIRECT_TO_MOBILE");
|
|
128
|
-
}
|
|
129
|
-
function addRedirect(flow, modules, options) {
|
|
130
|
-
return [{
|
|
131
|
-
key: "REDIRECT_TO_MOBILE",
|
|
132
|
-
configuration: {
|
|
133
|
-
flowId: flow.flowId,
|
|
134
|
-
disableSmsOption: flow.disableSmsOption ?? false,
|
|
135
|
-
addContinueToDesktop: flow.addContinueToDesktop ?? false,
|
|
136
|
-
qrPhishingResistance: flow.qrPhishingResistance ?? false,
|
|
137
|
-
authHint: options.authHint,
|
|
138
|
-
lang: options.lang
|
|
139
|
-
}
|
|
140
|
-
}, ...modules];
|
|
141
|
-
}
|
|
142
|
-
function hasModule(modules, key) {
|
|
143
|
-
return modules.some((module) => module.key === key);
|
|
144
|
-
}
|
|
145
|
-
//#endregion
|
|
146
|
-
//#region src/modules/flow/flowServices.ts
|
|
147
|
-
const REGULATION_TYPES = [
|
|
148
|
-
"US",
|
|
149
|
-
"Worldwide",
|
|
150
|
-
"Other",
|
|
151
|
-
"US_Illinois",
|
|
152
|
-
"US_Texas",
|
|
153
|
-
"US_California",
|
|
154
|
-
"US_Washington"
|
|
155
|
-
];
|
|
156
|
-
const REGULATION_TYPE_ALIASES = {
|
|
157
|
-
us: "US",
|
|
158
|
-
worldwide: "Worldwide",
|
|
159
|
-
worldwide_consent: "Worldwide",
|
|
160
|
-
other: "Other",
|
|
161
|
-
us_illinois: "US_Illinois",
|
|
162
|
-
usillinois: "US_Illinois",
|
|
163
|
-
us_texas: "US_Texas",
|
|
164
|
-
ustexas: "US_Texas",
|
|
165
|
-
us_california: "US_California",
|
|
166
|
-
uscalifornia: "US_California",
|
|
167
|
-
us_washington: "US_Washington",
|
|
168
|
-
uswashington: "US_Washington"
|
|
169
|
-
};
|
|
170
|
-
function toRegulationType(value) {
|
|
171
|
-
if (!value) return "Other";
|
|
172
|
-
if (REGULATION_TYPES.includes(value)) return value;
|
|
173
|
-
const normalized = value.trim().toLowerCase().replace(/[\s-]+/g, "_");
|
|
174
|
-
return REGULATION_TYPE_ALIASES[normalized] ?? "Other";
|
|
175
|
-
}
|
|
176
|
-
function prependMandatoryConsent(flow) {
|
|
177
|
-
if (flow.mandatoryConsentCheck === false) return flow;
|
|
178
|
-
const fingerprintResult = getSessionFingerprintResult();
|
|
179
|
-
if (!fingerprintResult?.showMandatoryConsent) return flow;
|
|
180
|
-
if (flow.flowModules.find((module) => module.key === "MANDATORY_CONSENT")) return flow;
|
|
181
|
-
const mandatoryConsentModule = {
|
|
182
|
-
key: "MANDATORY_CONSENT",
|
|
183
|
-
configuration: { consentType: toRegulationType(fingerprintResult.regulationType) }
|
|
184
|
-
};
|
|
185
|
-
return {
|
|
186
|
-
...flow,
|
|
187
|
-
flowModules: [mandatoryConsentModule, ...flow.flowModules]
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
|
-
const getFlow = async (signal, options = {}) => {
|
|
191
|
-
const sessionPromise = initializeSession({ signal }).catch(() => void 0);
|
|
192
|
-
const flowResponsePromise = api.get(endpoints.flow, { signal });
|
|
193
|
-
let data;
|
|
194
|
-
try {
|
|
195
|
-
data = (await flowResponsePromise).data;
|
|
196
|
-
} catch (error) {
|
|
197
|
-
toIncodeApiError(endpoints.flow, error);
|
|
198
|
-
}
|
|
199
|
-
await sessionPromise;
|
|
200
|
-
await updateFeatureManagementUser({ customIDs: { flow_id: data.flowId } });
|
|
201
|
-
const flow = prependMandatoryConsent(data);
|
|
202
|
-
const normalizedModules = normalizeFlowModules(flow, options);
|
|
203
|
-
return {
|
|
204
|
-
...flow,
|
|
205
|
-
flowModules: normalizedModules
|
|
206
|
-
};
|
|
207
|
-
};
|
|
208
|
-
//#endregion
|
|
209
|
-
export { getRequiredWasmPipelines as n, normalizeFlowModules as r, getFlow as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./sessionInitializer-B5tU3IQv.esm.js";
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
//#region src/modules/video-selfie/videoSelfieSteps.ts
|
|
2
|
-
/** Steps that use the rear (environment) camera; everything else uses the front (user) camera. */
|
|
3
|
-
const REAR_CAMERA_STEPS = [
|
|
4
|
-
"frontId",
|
|
5
|
-
"backId",
|
|
6
|
-
"poa"
|
|
7
|
-
];
|
|
8
|
-
/**
|
|
9
|
-
* The camera facing mode a given step should use. ID and proof-of-address steps
|
|
10
|
-
* use the rear camera; selfie / questions / speech use the front camera.
|
|
11
|
-
*/
|
|
12
|
-
function facingModeForStep(step) {
|
|
13
|
-
return REAR_CAMERA_STEPS.includes(step) ? "environment" : "user";
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Resolves the ordered list of active capture steps from the module config.
|
|
17
|
-
* The order mirrors V1 `getVideoSelfieModules`: the rear-camera document steps
|
|
18
|
-
* (`frontId` → `backId` → `poa`) run first, then the front-camera steps
|
|
19
|
-
* (`selfie` → `questions` → `speech`). This keeps the user from flipping the
|
|
20
|
-
* device between front and rear cameras mid-session. `selfie` is always present;
|
|
21
|
-
* the document and voice-consent steps are gated by their config flags.
|
|
22
|
-
*
|
|
23
|
-
* Both ID sides are captured whenever `checkIdScan` is on (a normal two-sided ID
|
|
24
|
-
* scan) — mirroring V1, which gated `back` on `checkIdScan`, not on the compare
|
|
25
|
-
* flags. `compareBackIdEnabled`/`compareBackOcrEnabled` only decide whether the
|
|
26
|
-
* captured back is *validated* against the backend (see `validateIdFrame` in
|
|
27
|
-
* `videoSelfieStepDetector`); with both off the back is captured passively on
|
|
28
|
-
* the first well-framed frame.
|
|
29
|
-
*/
|
|
30
|
-
function resolveVideoSelfieSteps(config) {
|
|
31
|
-
const steps = [];
|
|
32
|
-
if (config.checkIdScan) {
|
|
33
|
-
steps.push("frontId");
|
|
34
|
-
steps.push("backId");
|
|
35
|
-
}
|
|
36
|
-
if (config.checkDocumentScan) steps.push("poa");
|
|
37
|
-
steps.push("selfie");
|
|
38
|
-
if (config.checkVoiceConsent) {
|
|
39
|
-
if ((config.voiceConsentQuestions ?? 0) > 0) steps.push("questions");
|
|
40
|
-
steps.push("speech");
|
|
41
|
-
}
|
|
42
|
-
return steps;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* The WASM pipelines a Video Selfie session loads. The selfie step always runs
|
|
46
|
-
* face detection (`videoSelfie`); the ID steps run the simplified ID-capture
|
|
47
|
-
* pipeline (`videoSelfieId`), gated by `checkIdScan`. Used both for the
|
|
48
|
-
* flow-level eager warmup ({@link getRequiredWasmPipelines}) and the
|
|
49
|
-
* tutorial-time lazy warmup (`warmupVideoSelfieWasm`).
|
|
50
|
-
*/
|
|
51
|
-
function videoSelfieWasmPipelines(config) {
|
|
52
|
-
const pipelines = ["videoSelfie"];
|
|
53
|
-
if (config.checkIdScan) pipelines.push("videoSelfieId");
|
|
54
|
-
return pipelines;
|
|
55
|
-
}
|
|
56
|
-
//#endregion
|
|
57
|
-
export { resolveVideoSelfieSteps as n, videoSelfieWasmPipelines as r, facingModeForStep as t };
|
package/dist/{dynamicFormsStateMachine-DiPpuHgF.esm.js → dynamicFormsStateMachine-BQqAwNQ-.esm.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as api } from "./api-BDTZNnca.esm.js";
|
|
2
2
|
import { t as endpoints } from "./endpoints-CfRg7iAr.esm.js";
|
|
3
|
+
import { r as toIncodeApiError, t as IncodeApiError } from "./apiError-B-PkYxln.esm.js";
|
|
3
4
|
import { r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
|
|
4
5
|
import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
|
|
5
|
-
import { r as toIncodeApiError, t as IncodeApiError } from "./apiError-B-PkYxln.esm.js";
|
|
6
6
|
import { t as isoDateToMs } from "./dateUtils-CvG0FvK8.esm.js";
|
|
7
7
|
//#region src/modules/dynamic-forms/dynamicFormsFields.ts
|
|
8
8
|
function getEffectiveType(question) {
|
|
@@ -2,10 +2,10 @@ import { t as api } from "./api-BDTZNnca.esm.js";
|
|
|
2
2
|
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dy8PyVO5.esm.js";
|
|
3
3
|
import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
|
|
4
4
|
import { t as endpoints } from "./endpoints-CfRg7iAr.esm.js";
|
|
5
|
+
import { r as toIncodeApiError } from "./apiError-B-PkYxln.esm.js";
|
|
5
6
|
import { c as createManager, o as createActor, r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
|
|
6
7
|
import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
|
|
7
8
|
import { t as externalFetch } from "./externalFetch-BKBThAUC.esm.js";
|
|
8
|
-
import { r as toIncodeApiError } from "./apiError-B-PkYxln.esm.js";
|
|
9
9
|
//#region src/modules/electronic-signature/electronicSignatureServices.ts
|
|
10
10
|
async function fetchUnsignedDocuments(signal) {
|
|
11
11
|
const res = await api.get(endpoints.aesUnsignedDocuments, { signal });
|
package/dist/{geolocationStateMachine-ByU6-nbM.esm.js → geolocationStateMachine-DxSETS9_.esm.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as api } from "./api-BDTZNnca.esm.js";
|
|
2
2
|
import { t as endpoints } from "./endpoints-CfRg7iAr.esm.js";
|
|
3
3
|
import { r as isIOS, t as isAndroid } from "./platform-Cd_yWGNG.esm.js";
|
|
4
|
+
import { n as isConnectivityError } from "./apiError-B-PkYxln.esm.js";
|
|
4
5
|
import { r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
|
|
5
6
|
import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
|
|
6
|
-
import { n as isConnectivityError } from "./apiError-B-PkYxln.esm.js";
|
|
7
7
|
//#region src/modules/geolocation/geolocationServices.ts
|
|
8
8
|
async function addGeolocation(params, signal) {
|
|
9
9
|
const res = await api.post(endpoints.addGeolocation, {
|