@incodetech/core 0.0.0-dev-20260323-d5fdccb → 0.0.0-dev-20260324-90ddcfd

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.
Files changed (82) hide show
  1. package/dist/{addressSearch-BBIa1heY.esm.js → addressSearch-DCaEdoev.esm.js} +4 -4
  2. package/dist/authentication.d.ts +10 -10
  3. package/dist/authentication.esm.js +11 -10
  4. package/dist/{authenticationManager-DZFI79F5.d.ts → authenticationManager-C-Mmg1uU.d.ts} +2 -2
  5. package/dist/{authenticationManager-h6dB_vib.esm.js → authenticationManager-CEGYyu8r.esm.js} +6 -6
  6. package/dist/{backCameraStream-BPxNH3Pg.esm.js → backCameraStream-BPzo60FO.esm.js} +1 -1
  7. package/dist/browserSimulation-DYAk0Ipe.esm.js +20 -0
  8. package/dist/consent.d.ts +56 -56
  9. package/dist/consent.esm.js +4 -4
  10. package/dist/curp-validation.d.ts +4 -4
  11. package/dist/curp-validation.esm.js +4 -4
  12. package/dist/{deepsightLoader-CZ_4kZPK.esm.js → deepsightLoader-ErxPZUBZ.esm.js} +5 -4
  13. package/dist/{deepsightService-DFek2Sxh.esm.js → deepsightService-BcdwWkYD.esm.js} +5 -23
  14. package/dist/{deepsightService-foKxxo3y.d.ts → deepsightService-C47Uyf6m.d.ts} +1 -1
  15. package/dist/document-capture.d.ts +60 -60
  16. package/dist/document-capture.esm.js +5 -5
  17. package/dist/document-upload.d.ts +52 -52
  18. package/dist/document-upload.esm.js +5 -5
  19. package/dist/ekyb.d.ts +2 -2
  20. package/dist/ekyb.esm.js +8 -6
  21. package/dist/ekyc.d.ts +2 -2
  22. package/dist/ekyc.esm.js +5 -5
  23. package/dist/email.d.ts +3 -3
  24. package/dist/email.esm.js +5 -5
  25. package/dist/{emailManager-OpJLWD9-.esm.js → emailManager-1W2Uh6du.esm.js} +4 -4
  26. package/dist/{emailManager-lUXVfa0R.d.ts → emailManager-CN9sSCz6.d.ts} +2 -2
  27. package/dist/{endpoints-Bydn-Ave.esm.js → endpoints-b2PxFIku.esm.js} +2 -0
  28. package/dist/{events-DzHYCTUI.esm.js → events-CbNkXF2Q.esm.js} +2 -2
  29. package/dist/extensibility.d.ts +14 -14
  30. package/dist/extensibility.esm.js +16 -14
  31. package/dist/face-match.d.ts +1 -1
  32. package/dist/face-match.esm.js +4 -4
  33. package/dist/{faceCaptureManagerFactory-Bavynz5Q.d.ts → faceCaptureManagerFactory-UFhWTbej.d.ts} +7 -7
  34. package/dist/{faceCaptureSetup-BOmXn1op.esm.js → faceCaptureSetup-CoeOjXeo.esm.js} +8 -8
  35. package/dist/flow.d.ts +7 -7
  36. package/dist/flow.esm.js +8 -6
  37. package/dist/{flowCompletionService-C-pC9OZ9.esm.js → flowCompletionService-DkbMP576.esm.js} +2 -2
  38. package/dist/{flowServices-Cc1HxYIC.esm.js → flowServices-jrv5Zxbr.esm.js} +48 -4
  39. package/dist/geolocation.d.ts +1 -1
  40. package/dist/geolocation.esm.js +4 -4
  41. package/dist/government-validation.d.ts +1 -1
  42. package/dist/government-validation.esm.js +4 -4
  43. package/dist/id.d.ts +9 -9
  44. package/dist/id.esm.js +12 -10
  45. package/dist/{idCaptureManager-DPzinE1o.esm.js → idCaptureManager-BniIgM20.esm.js} +43 -226
  46. package/dist/{idCaptureManager-Ih_zvBCr.d.ts → idCaptureManager-Dn7_eHt9.d.ts} +22 -8
  47. package/dist/index.d.ts +19 -10
  48. package/dist/index.esm.js +12 -10
  49. package/dist/{lib-3ivDs79I.esm.js → lib-VFNBaz_7.esm.js} +1 -1
  50. package/dist/mandatory-consent.d.ts +411 -0
  51. package/dist/mandatory-consent.esm.js +198 -0
  52. package/dist/phone.d.ts +3 -3
  53. package/dist/phone.esm.js +5 -5
  54. package/dist/{phoneManager-pTIOvlCD.d.ts → phoneManager-B0MT8wYz.d.ts} +2 -2
  55. package/dist/{phoneManager-BwBW-tRA.esm.js → phoneManager-Cvp5LFN7.esm.js} +4 -4
  56. package/dist/{recordingsRepository-DVPWOR9j.esm.js → recordingsRepository-DGWSMj-_.esm.js} +3 -3
  57. package/dist/redirect-to-mobile.d.ts +1 -1
  58. package/dist/redirect-to-mobile.esm.js +4 -4
  59. package/dist/selfie.d.ts +10 -10
  60. package/dist/selfie.esm.js +11 -10
  61. package/dist/{selfieManager-DT0oJmpD.esm.js → selfieManager-BxwT4tDD.esm.js} +3 -3
  62. package/dist/{selfieManager-uSCpF37G.d.ts → selfieManager-DSn8EPLE.d.ts} +2 -2
  63. package/dist/session-4QVMNIs5.esm.js +243 -0
  64. package/dist/session.d.ts +1 -1
  65. package/dist/session.esm.js +3 -3
  66. package/dist/{src-Cmpz4Jmw.esm.js → src-BX-m0lbm.esm.js} +2 -2
  67. package/dist/{stats-D76Thmqp.esm.js → stats-BaWAv541.esm.js} +1 -1
  68. package/dist/stats.esm.js +2 -2
  69. package/dist/{types-DSJflCEU.d.ts → types-0A1THNYO.d.ts} +5 -2
  70. package/dist/{types-CHzupruc.d.ts → types-BYFeUhw0.d.ts} +1 -1
  71. package/package.json +7 -3
  72. /package/dist/{Actor-D6rhGxJy.d.ts → Actor-By8WNHi-.d.ts} +0 -0
  73. /package/dist/{Manager-CVDYGoSq.d.ts → Manager-BWqHEUjI.d.ts} +0 -0
  74. /package/dist/{StateMachine-BqtRw_hz.d.ts → StateMachine-dxjI9q0V.d.ts} +0 -0
  75. /package/dist/{api-3fZO5bmj.esm.js → api-C2uzxrpN.esm.js} +0 -0
  76. /package/dist/{camera-CVBwqx-j.d.ts → camera-BCRgkMoe.d.ts} +0 -0
  77. /package/dist/{chunk-C24vxluH.esm.js → chunk-NXK2ElUW.esm.js} +0 -0
  78. /package/dist/{displayErrors-BgtBHbfb.d.ts → displayErrors-CV7ux9Fr.d.ts} +0 -0
  79. /package/dist/{flowCompletionService-De8JDo87.d.ts → flowCompletionService-sG6KA8y2.d.ts} +0 -0
  80. /package/dist/{id-r_CoQ3r-.esm.js → id-C3aKMJhc.esm.js} +0 -0
  81. /package/dist/{index-LKrIp3Oo.d.ts → index-DGdyPh8A.d.ts} +0 -0
  82. /package/dist/{warmup-DoQLFT3z.d.ts → warmup-B_dntecl.d.ts} +0 -0
@@ -1,228 +1,12 @@
1
- import { C as revokeObjectURL, S as createActor, b as fromCallback, h as addEvent, n as eventModuleNames, o as createManagerInstrumentation, s as getDefaultManagerScreenName, v as setup, x as fromPromise, y as assign } from "./events-DzHYCTUI.esm.js";
2
- import { t as getBackCameraStream } from "./backCameraStream-BPxNH3Pg.esm.js";
3
- import { A as createManager, I as isDesktop, N as getWindowDimensions, S as StreamCanvasCapture, T as IncodeCanvas, _ as BrowserStorageProvider, d as OpenViduRecordingProvider, g as BrowserTimerProvider, h as FingerprintProvider, i as DEFAULT_ID_CAPTURE_THRESHOLDS, m as IpifyProvider, o as IdCaptureProvider, r as DEFAULT_ID_CAPTURE_MODEL_VERSION, v as BrowserInfoProvider, x as StreamCanvasProcessingSession, y as BrowserEnvironmentProvider } from "./src-Cmpz4Jmw.esm.js";
4
- import { a as checkPermission, c as getDeviceClass, n as startRecording, o as requestPermission, r as stopRecording$1, t as createRecordingSession } from "./recordingsRepository-DVPWOR9j.esm.js";
5
- import { n as isBrowserSimulation } from "./deepsightService-DFek2Sxh.esm.js";
6
- import { n as getApi, r as getToken, t as api } from "./api-3fZO5bmj.esm.js";
7
- import { t as endpoints } from "./endpoints-Bydn-Ave.esm.js";
8
- import { t as addDeviceStats } from "./stats-D76Thmqp.esm.js";
1
+ import { C as revokeObjectURL, S as createActor, b as fromCallback, n as eventModuleNames, o as createManagerInstrumentation, s as getDefaultManagerScreenName, v as setup, x as fromPromise, y as assign } from "./events-CbNkXF2Q.esm.js";
2
+ import { t as getBackCameraStream } from "./backCameraStream-BPzo60FO.esm.js";
3
+ import { A as createManager, I as isDesktop, N as getWindowDimensions, S as StreamCanvasCapture, T as IncodeCanvas, _ as BrowserStorageProvider, d as OpenViduRecordingProvider, g as BrowserTimerProvider, i as DEFAULT_ID_CAPTURE_THRESHOLDS, o as IdCaptureProvider, r as DEFAULT_ID_CAPTURE_MODEL_VERSION, x as StreamCanvasProcessingSession } from "./src-BX-m0lbm.esm.js";
4
+ import { a as checkPermission, c as getDeviceClass, n as startRecording, o as requestPermission, r as stopRecording$1, t as createRecordingSession } from "./recordingsRepository-DGWSMj-_.esm.js";
5
+ import { r as getToken, t as api } from "./api-C2uzxrpN.esm.js";
6
+ import { t as endpoints } from "./endpoints-b2PxFIku.esm.js";
7
+ import { t as getDisableIpify } from "./session-4QVMNIs5.esm.js";
8
+ import { t as addDeviceStats } from "./stats-BaWAv541.esm.js";
9
9
 
10
- //#region src/internal/session/sessionService.ts
11
- /**
12
- * Creates a new onboarding session.
13
- *
14
- * @param apiKey - The API key from the Incode dashboard
15
- * @param options - Session creation options
16
- * @param signal - Optional AbortSignal for request cancellation
17
- * @returns The created session with token
18
- *
19
- * @example
20
- * ```ts
21
- * const session = await createSession('your-api-key', {
22
- * configurationId: 'your-flow-id',
23
- * language: 'en-US',
24
- * });
25
- * console.log(session.token); // Use this token for subsequent API calls
26
- * ```
27
- */
28
- async function createSession(apiKey, options, signal) {
29
- const res = await getApi().post(endpoints.createSession, {
30
- configurationId: options.configurationId,
31
- externalId: options.externalId,
32
- externalCustomerId: options.externalCustomerId,
33
- language: options.language ?? "en-US",
34
- customFields: options.customFields,
35
- uuid: options.uuid ?? null,
36
- interviewId: options.interviewId ?? null
37
- }, {
38
- headers: {
39
- "x-api-key": apiKey,
40
- "api-version": "1.0"
41
- },
42
- signal
43
- });
44
- if (!res.ok) throw new Error(`POST ${endpoints.createSession} failed: ${res.status} ${res.statusText}`);
45
- return res.data;
46
- }
47
-
48
- //#endregion
49
- //#region src/internal/featureConfig/featureConfigService.ts
50
- let cachedFeatures$1 = null;
51
- /**
52
- * Checks if a feature is enabled in the feature config.
53
- */
54
- function isFeatureEnabled(feature, features) {
55
- return features?.find((f) => f.feature === feature)?.enabled ?? false;
56
- }
57
- /**
58
- * Fetches feature configuration from the backend.
59
- * Results are cached for the session lifetime.
60
- */
61
- async function fetchFeatureConfig(signal) {
62
- if (cachedFeatures$1) return cachedFeatures$1;
63
- const response = await api.get(endpoints.featureConfig, { signal });
64
- if (!response.ok) throw new Error(`Failed to fetch feature config: ${response.status} ${response.statusText}`);
65
- cachedFeatures$1 = response.data;
66
- return cachedFeatures$1;
67
- }
68
- /**
69
- * Resets the cached feature config (useful for testing).
70
- */
71
- function resetFeatureConfigCache() {
72
- cachedFeatures$1 = null;
73
- }
74
-
75
- //#endregion
76
- //#region src/internal/fingerprint/fingerprintService.ts
77
- const SDK_VERSION = "2.0.0";
78
- function formatOsVersion(os) {
79
- return `${os.name || "Unknown"} ${os.version || ""}`.trim();
80
- }
81
- function formatBrowser(browser) {
82
- if (!browser.name || !browser.version) return "Unknown";
83
- return `${browser.name} ${browser.version}`;
84
- }
85
- async function submitDeviceFingerprint(options = {}, dependencies) {
86
- const { disableIpify = false, hostingApp, signal } = options;
87
- const fingerprint = await dependencies.fingerprintProvider.getFingerprint(disableIpify);
88
- const hasLiedBrowser = isBrowserSimulation(dependencies.browserEnv);
89
- const payload = {
90
- hash: fingerprint.visitorId || "",
91
- ip: fingerprint.ip || "",
92
- deviceType: "WEBAPP",
93
- data: JSON.stringify(fingerprint),
94
- osVersion: formatOsVersion(fingerprint.deviceInfo.os),
95
- deviceModel: fingerprint.deviceInfo.device.model || "",
96
- browser: formatBrowser(fingerprint.deviceInfo.browser),
97
- hasLiedBrowser,
98
- sdkVersion: SDK_VERSION,
99
- hostingApp: hostingApp ?? "Web SDK"
100
- };
101
- const response = await api.post(endpoints.deviceFingerprint, payload, { signal });
102
- if (!response.ok) throw new Error(`Failed to submit fingerprint: ${response.status} ${response.statusText}`);
103
- return response.data;
104
- }
105
-
106
- //#endregion
107
- //#region src/internal/session/sessionInitializer.ts
108
- let sessionInitialized = false;
109
- let cachedFeatures = null;
110
- let cachedDisableIpify = false;
111
- /**
112
- * Initializes session-level services after the token is set.
113
- * This should be called once after createSession() or setToken().
114
- *
115
- * Performs:
116
- * 1. Fetches feature configuration from backend
117
- * 2. Submits device fingerprint
118
- *
119
- * Results are cached for the session lifetime.
120
- *
121
- * @param options - Optional configuration
122
- * @returns Session initialization result with feature config
123
- *
124
- * @example
125
- * ```ts
126
- * // After creating a session
127
- * const session = await createSession('api-key', options);
128
- * setup({ apiURL, token: session.token });
129
- * const { features } = await initializeSession();
130
- *
131
- * // Check feature flags
132
- * if (isFeatureEnabled('DISABLE_IPIFY', features.features)) {
133
- * // Handle disabled ipify
134
- * }
135
- * ```
136
- */
137
- async function initializeSession(options = {}) {
138
- const { hostingApp, signal } = options;
139
- if (sessionInitialized && cachedFeatures) return {
140
- features: cachedFeatures,
141
- disableIpify: cachedDisableIpify,
142
- fingerprintSuccess: true
143
- };
144
- let features;
145
- let disableIpify = false;
146
- try {
147
- features = await fetchFeatureConfig(signal);
148
- disableIpify = isFeatureEnabled("DISABLE_IPIFY", features.features);
149
- } catch {
150
- features = { sessionIdentifier: "" };
151
- }
152
- let fingerprintSuccess = false;
153
- try {
154
- const fingerprintProvider = new FingerprintProvider(new IpifyProvider());
155
- const browserEnv = new BrowserEnvironmentProvider();
156
- await submitDeviceFingerprint({
157
- disableIpify,
158
- hostingApp,
159
- signal
160
- }, {
161
- fingerprintProvider,
162
- browserEnv
163
- });
164
- fingerprintSuccess = true;
165
- } catch (error) {
166
- console.warn("Failed to submit device fingerprint:", error);
167
- }
168
- try {
169
- const browserInfo = new BrowserInfoProvider().getBrowserInfo();
170
- addEvent({
171
- code: "browser",
172
- payload: {
173
- userAgent: browserInfo.userAgent,
174
- isWebRtcSupported: browserInfo.isWebRtcSupported,
175
- browser: browserInfo.browser,
176
- os: browserInfo.os,
177
- device: browserInfo.device,
178
- engine: browserInfo.engine,
179
- cpu: browserInfo.cpu
180
- }
181
- });
182
- } catch (error) {
183
- console.warn("Failed to send browser info event:", error);
184
- }
185
- sessionInitialized = true;
186
- cachedFeatures = features;
187
- cachedDisableIpify = disableIpify;
188
- return {
189
- features,
190
- disableIpify,
191
- fingerprintSuccess
192
- };
193
- }
194
- /**
195
- * Gets the cached feature configuration.
196
- * Returns undefined if session hasn't been initialized.
197
- */
198
- function getSessionFeatures() {
199
- return cachedFeatures ?? void 0;
200
- }
201
- /**
202
- * Gets the cached disableIpify flag.
203
- * Returns false if session hasn't been initialized.
204
- */
205
- function getDisableIpify() {
206
- return cachedDisableIpify;
207
- }
208
- /**
209
- * Checks if the session has been initialized.
210
- */
211
- function isSessionInitialized() {
212
- return sessionInitialized;
213
- }
214
- /**
215
- * Resets session initialization state.
216
- * Useful for testing or when starting a new session.
217
- */
218
- function resetSessionInit() {
219
- sessionInitialized = false;
220
- cachedFeatures = null;
221
- cachedDisableIpify = false;
222
- resetFeatureConfigCache();
223
- }
224
-
225
- //#endregion
226
10
  //#region src/modules/id/idCaptureHelpers.ts
227
11
  /**
228
12
  * Map of config properties received from the backend to adjusted, internal document types.
@@ -824,7 +608,7 @@ const checkMotionSensorActor = fromCallback(({ input, sendBack }) => {
824
608
  });
825
609
  const initializeDeepsightSessionActor = fromPromise(async ({ input }) => {
826
610
  if (!input.dependencies) return;
827
- const { loadDeepsightSession } = await import("./deepsightLoader-CZ_4kZPK.esm.js");
611
+ const { loadDeepsightSession } = await import("./deepsightLoader-ErxPZUBZ.esm.js");
828
612
  return loadDeepsightSession({
829
613
  ds: input.ds,
830
614
  storage: input.dependencies.storage,
@@ -1100,6 +884,7 @@ const shouldContinueToBackGuard = ({ context }) => {
1100
884
  return true;
1101
885
  };
1102
886
  const shouldContinueToFrontGuard = ({ context }) => context.config.usSmartCapture === true && context.currentMode === "back" && context.uploadResponse?.forceFrontIdCapture === true;
887
+ const hasMandatoryConsentGuard = ({ context }) => context.uploadResponse?.showMandatoryConsent === true;
1103
888
  const isDeepsightEnabledGuard = ({ context }) => context.dependencies !== void 0;
1104
889
  const isDeepsightReadyGuard = ({ context }) => context.deepsightService !== void 0;
1105
890
  const needsDeepsightInitGuard = ({ context }) => context.dependencies !== void 0 && context.deepsightService === void 0 && !context.deepsightInitAttempted;
@@ -1281,6 +1066,7 @@ const _idCaptureMachine = setup({
1281
1066
  isOnlyFront: isOnlyFrontGuard,
1282
1067
  shouldContinueToBack: shouldContinueToBackGuard,
1283
1068
  shouldContinueToFront: shouldContinueToFrontGuard,
1069
+ hasMandatoryConsent: hasMandatoryConsentGuard,
1284
1070
  isDeepsightEnabled: isDeepsightEnabledGuard,
1285
1071
  isDeepsightReady: isDeepsightReadyGuard,
1286
1072
  needsDeepsightInit: needsDeepsightInitGuard
@@ -1782,6 +1568,10 @@ const _idCaptureMachine = setup({
1782
1568
  { target: "#idCapture.processing" }
1783
1569
  ] } },
1784
1570
  success: { on: { NEXT_STEP: [
1571
+ {
1572
+ target: "#idCapture.mandatoryConsent",
1573
+ guard: "hasMandatoryConsent"
1574
+ },
1785
1575
  {
1786
1576
  target: "#idCapture.frontFinished",
1787
1577
  guard: "shouldContinueToBack"
@@ -1794,6 +1584,20 @@ const _idCaptureMachine = setup({
1794
1584
  ] } }
1795
1585
  }
1796
1586
  },
1587
+ mandatoryConsent: { on: {
1588
+ CONSENT_ACCEPT: [
1589
+ {
1590
+ target: "frontFinished",
1591
+ guard: "shouldContinueToBack"
1592
+ },
1593
+ {
1594
+ target: "backFinished",
1595
+ guard: "shouldContinueToFront"
1596
+ },
1597
+ { target: "processing" }
1598
+ ],
1599
+ CONSENT_CANCEL: { target: "closed" }
1600
+ } },
1797
1601
  frontFinished: {
1798
1602
  entry: ["stopMediaRecording", "resetForBackCapture"],
1799
1603
  type: "parallel",
@@ -2082,6 +1886,10 @@ function mapState(snapshot) {
2082
1886
  canRetry: context.attemptsRemaining > 0
2083
1887
  };
2084
1888
  }
1889
+ if (snapshot.matches("mandatoryConsent")) return {
1890
+ status: "mandatoryConsent",
1891
+ regulationType: context.uploadResponse?.regulationType ?? "Other"
1892
+ };
2085
1893
  if (snapshot.matches("frontFinished")) return { status: "frontFinished" };
2086
1894
  if (snapshot.matches("backFinished")) return { status: "backFinished" };
2087
1895
  if (snapshot.matches("processing")) return { status: "processing" };
@@ -2158,6 +1966,14 @@ function createApi({ actor, trackElementClicked, trackCaptureAttemptFinished })
2158
1966
  trackElementClicked?.("skipBack");
2159
1967
  actor.send({ type: "SKIP_BACK" });
2160
1968
  },
1969
+ acceptMandatoryConsent() {
1970
+ trackElementClicked?.("acceptMandatoryConsent");
1971
+ actor.send({ type: "CONSENT_ACCEPT" });
1972
+ },
1973
+ cancelMandatoryConsent() {
1974
+ trackElementClicked?.("cancelMandatoryConsent");
1975
+ actor.send({ type: "CONSENT_CANCEL" });
1976
+ },
2161
1977
  updateDetectionArea(detectionArea) {
2162
1978
  actor.send({
2163
1979
  type: "UPDATE_DETECTION_AREA",
@@ -2175,6 +1991,7 @@ function getTopLevelStateValue(value) {
2175
1991
  const SIDE_AWARE_STATES = new Set([
2176
1992
  "tutorial",
2177
1993
  "capture",
1994
+ "mandatoryConsent",
2178
1995
  "frontFinished",
2179
1996
  "backFinished",
2180
1997
  "processing",
@@ -2223,4 +2040,4 @@ function createIdCaptureManagerFromActor(actor) {
2223
2040
  }
2224
2041
 
2225
2042
  //#endregion
2226
- export { resetSessionInit as _, initializeIdCapture as a, stopRecording as c, validateUploadResponse as d, ID_ERROR_CODES as f, isSessionInitialized as g, initializeSession as h, idCaptureMachine as i, stopStream as l, getSessionFeatures as m, createIdCaptureManagerFromActor as n, processId as o, getDisableIpify as p, createIdCaptureActor as r, startRecordingSession as s, createIdCaptureManager as t, uploadIdImage as u, createSession as v };
2043
+ export { initializeIdCapture as a, stopRecording as c, validateUploadResponse as d, ID_ERROR_CODES as f, idCaptureMachine as i, stopStream as l, createIdCaptureManagerFromActor as n, processId as o, createIdCaptureActor as r, startRecordingSession as s, createIdCaptureManager as t, uploadIdImage as u };
@@ -1,9 +1,9 @@
1
- import { a as IStorageCapability, c as IMotionSensorCapability, d as IncodeCanvas, i as StreamCanvasCapture, l as IMLProviderCapability, n as PermissionResult, o as IRecordingCapability, r as PermissionStatus, s as RecordingConnection, t as DeepsightService, u as MLProviderConfig } from "./deepsightService-foKxxo3y.js";
2
- import { t as Manager } from "./Manager-CVDYGoSq.js";
3
- import { t as CameraStream } from "./camera-CVBwqx-j.js";
4
- import { t as ActorRefFrom } from "./Actor-D6rhGxJy.js";
5
- import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-BqtRw_hz.js";
6
- import { i as TutorialIdConfig, t as Flow } from "./types-DSJflCEU.js";
1
+ import { a as IStorageCapability, c as IMotionSensorCapability, d as IncodeCanvas, i as StreamCanvasCapture, l as IMLProviderCapability, n as PermissionResult, o as IRecordingCapability, r as PermissionStatus, s as RecordingConnection, t as DeepsightService, u as MLProviderConfig } from "./deepsightService-C47Uyf6m.js";
2
+ import { t as Manager } from "./Manager-BWqHEUjI.js";
3
+ import { t as CameraStream } from "./camera-BCRgkMoe.js";
4
+ import { t as ActorRefFrom } from "./Actor-By8WNHi-.js";
5
+ import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-dxjI9q0V.js";
6
+ import { a as TutorialIdConfig, i as RegulationTypes, t as Flow } from "./types-0A1THNYO.js";
7
7
 
8
8
  //#region ../infra/src/capabilities/IAnalyticsCapability.d.ts
9
9
  interface IAnalyticsCapability {
@@ -170,7 +170,7 @@ type IdCaptureMode = 'front' | 'back' | 'passport';
170
170
  * Used for selection and for the list of available options derived from config.
171
171
  */
172
172
  type IdDocumentType = 'id' | 'passport' | 'manualIdUpload' | 'digitalIdUpload' | 'digitalId';
173
- type IdFlowStep = 'chooser' | 'tutorial' | 'permissions' | 'capture' | 'frontFinished' | 'backFinished' | 'success' | 'processing' | 'expired' | 'finished' | 'error' | 'closed' | 'manualIdUpload' | 'digitalIdUpload';
173
+ type IdFlowStep = 'chooser' | 'tutorial' | 'permissions' | 'capture' | 'mandatoryConsent' | 'frontFinished' | 'backFinished' | 'success' | 'processing' | 'expired' | 'finished' | 'error' | 'closed' | 'manualIdUpload' | 'digitalIdUpload';
174
174
  type DetectionStatus = 'idle' | 'detecting' | 'farAway' | 'blur' | 'glare' | 'wrongSide' | 'capturing' | 'manualCapture' | 'idNotDetected' | 'offline';
175
175
  /**
176
176
  * Represents the detection area dimensions in pixels.
@@ -253,6 +253,8 @@ type UploadIdResponse = {
253
253
  name: string;
254
254
  }>;
255
255
  forceFrontIdCapture?: boolean;
256
+ showMandatoryConsent?: boolean;
257
+ regulationType?: RegulationTypes;
256
258
  failReason?: string;
257
259
  side?: 'front' | 'back';
258
260
  };
@@ -400,6 +402,10 @@ type IdCaptureEvent = {
400
402
  type: 'PROCESS_COMPLETE';
401
403
  } | {
402
404
  type: 'PROCESS_EXPIRED';
405
+ } | {
406
+ type: 'CONSENT_ACCEPT';
407
+ } | {
408
+ type: 'CONSENT_CANCEL';
403
409
  } | {
404
410
  type: 'SKIP_BACK';
405
411
  } | {
@@ -550,6 +556,10 @@ type IdCaptureCaptureState = {
550
556
  /** Whether retry is available (attemptsRemaining > 0) */
551
557
  canRetry: boolean;
552
558
  };
559
+ type IdCaptureMandatoryConsentState = {
560
+ status: 'mandatoryConsent';
561
+ regulationType: RegulationTypes;
562
+ };
553
563
  type IdCaptureFrontFinishedState = {
554
564
  status: 'frontFinished';
555
565
  };
@@ -572,7 +582,7 @@ type IdCaptureErrorState = {
572
582
  status: 'error';
573
583
  error: string;
574
584
  };
575
- type IdCaptureState = IdCaptureIdleState | IdCaptureChooserState | IdCaptureLoadingState | IdCaptureTutorialState | IdCapturePermissionsState | IdCaptureCaptureState | IdCaptureFrontFinishedState | IdCaptureBackFinishedState | IdCaptureProcessingState | IdCaptureExpiredState | IdCaptureFinishedState | IdCaptureClosedState | IdCaptureErrorState;
585
+ type IdCaptureState = IdCaptureIdleState | IdCaptureChooserState | IdCaptureLoadingState | IdCaptureTutorialState | IdCapturePermissionsState | IdCaptureCaptureState | IdCaptureMandatoryConsentState | IdCaptureFrontFinishedState | IdCaptureBackFinishedState | IdCaptureProcessingState | IdCaptureExpiredState | IdCaptureFinishedState | IdCaptureClosedState | IdCaptureErrorState;
576
586
  declare function createIdCaptureManager(options: CreateIdCaptureActorOptions): Manager<IdCaptureState> & {
577
587
  load(): void;
578
588
  selectDocument(documentType: IdDocumentType): void;
@@ -589,6 +599,8 @@ declare function createIdCaptureManager(options: CreateIdCaptureActorOptions): M
589
599
  continueToBack(): void;
590
600
  continueToFront(): void;
591
601
  skipBack(): void;
602
+ acceptMandatoryConsent(): void;
603
+ cancelMandatoryConsent(): void;
592
604
  /**
593
605
  * Updates the detection area used for WASM geometry calculation.
594
606
  * Call this when the UI detection area dimensions change (e.g., on resize or orientation change).
@@ -612,6 +624,8 @@ declare function createIdCaptureManagerFromActor(actor: IdCaptureActor): Manager
612
624
  continueToBack(): void;
613
625
  continueToFront(): void;
614
626
  skipBack(): void;
627
+ acceptMandatoryConsent(): void;
628
+ cancelMandatoryConsent(): void;
615
629
  /**
616
630
  * Updates the detection area used for WASM geometry calculation.
617
631
  * Call this when the UI detection area dimensions change (e.g., on resize or orientation change).
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- import { A as IdCaptureEvent, B as UploadIdResponse, C as CapturedImage, D as IdCaptureConfig, E as ID_ERROR_CODES, F as IdDocumentType, H as IdCaptureSettings, I as IdError, L as IdErrorCode, M as IdCaptureInput, N as IdCaptureMode, O as IdCaptureContext, P as IdCaptureThresholds, R as IdFlowStep, S as CaptureIdResponse, T as DetectionStatus, V as DetectionOrientation, _ as CreateIdCaptureActorOptions, a as IdCaptureInitResult, b as IdCaptureMachine, c as UploadIdImageParams, d as processId, f as startRecordingSession, g as validateUploadResponse, h as uploadIdImage, j as IdCaptureGeometry, k as IdCaptureDependencies, l as ValidationError, m as stopStream, n as IdCaptureState, o as InitializeIdCaptureParams, p as stopRecording, r as createIdCaptureManager, s as StartRecordingParams, t as IdCaptureManager, u as initializeIdCapture, v as IdCaptureActor, w as DetectionArea, x as idCaptureMachine, y as createIdCaptureActor, z as RecordingSession } from "./idCaptureManager-Ih_zvBCr.js";
2
- import { n as PermissionResult, r as PermissionStatus } from "./deepsightService-foKxxo3y.js";
3
- import { n as WasmPipeline, r as warmupWasm, t as WarmupConfig } from "./warmup-DoQLFT3z.js";
4
- import "./Manager-CVDYGoSq.js";
5
- import { t as CameraStream } from "./camera-CVBwqx-j.js";
6
- import "./Actor-D6rhGxJy.js";
7
- import "./StateMachine-BqtRw_hz.js";
8
- import "./types-CHzupruc.js";
9
- import "./types-DSJflCEU.js";
10
- import "./index-LKrIp3Oo.js";
1
+ import { A as IdCaptureEvent, B as UploadIdResponse, C as CapturedImage, D as IdCaptureConfig, E as ID_ERROR_CODES, F as IdDocumentType, H as IdCaptureSettings, I as IdError, L as IdErrorCode, M as IdCaptureInput, N as IdCaptureMode, O as IdCaptureContext, P as IdCaptureThresholds, R as IdFlowStep, S as CaptureIdResponse, T as DetectionStatus, V as DetectionOrientation, _ as CreateIdCaptureActorOptions, a as IdCaptureInitResult, b as IdCaptureMachine, c as UploadIdImageParams, d as processId, f as startRecordingSession, g as validateUploadResponse, h as uploadIdImage, j as IdCaptureGeometry, k as IdCaptureDependencies, l as ValidationError, m as stopStream, n as IdCaptureState, o as InitializeIdCaptureParams, p as stopRecording, r as createIdCaptureManager, s as StartRecordingParams, t as IdCaptureManager, u as initializeIdCapture, v as IdCaptureActor, w as DetectionArea, x as idCaptureMachine, y as createIdCaptureActor, z as RecordingSession } from "./idCaptureManager-Dn7_eHt9.js";
2
+ import { n as PermissionResult, r as PermissionStatus } from "./deepsightService-C47Uyf6m.js";
3
+ import { n as WasmPipeline, r as warmupWasm, t as WarmupConfig } from "./warmup-B_dntecl.js";
4
+ import "./Manager-BWqHEUjI.js";
5
+ import { t as CameraStream } from "./camera-BCRgkMoe.js";
6
+ import "./Actor-By8WNHi-.js";
7
+ import "./StateMachine-dxjI9q0V.js";
8
+ import "./types-BYFeUhw0.js";
9
+ import { i as RegulationTypes } from "./types-0A1THNYO.js";
10
+ import "./index-DGdyPh8A.js";
11
11
 
12
12
  //#region ../infra/src/capabilities/IScreenOrientationCapability.d.ts
13
13
  type ScreenOrientationState = 'portrait' | 'landscape';
@@ -189,6 +189,14 @@ type Features = {
189
189
  sessionIdentifier: string;
190
190
  };
191
191
  //#endregion
192
+ //#region src/internal/fingerprint/types.d.ts
193
+ type DeviceFingerprintResult = {
194
+ success: boolean;
195
+ sessionStatus: string;
196
+ showMandatoryConsent?: boolean;
197
+ regulationType?: RegulationTypes;
198
+ };
199
+ //#endregion
192
200
  //#region src/internal/session/sessionInitializer.d.ts
193
201
  type SessionInitOptions = {
194
202
  /** Custom hosting app name for fingerprint */
@@ -200,6 +208,7 @@ type SessionInitResult = {
200
208
  features: Features;
201
209
  disableIpify: boolean;
202
210
  fingerprintSuccess: boolean;
211
+ fingerprintResult: DeviceFingerprintResult | undefined;
203
212
  };
204
213
  /**
205
214
  * Initializes session-level services after the token is set.
package/dist/index.esm.js CHANGED
@@ -1,13 +1,15 @@
1
- import { _ as subscribeEvent, a as videoSelfieEvents, c as captureAttemptFinished, d as moduleOpened, f as screenClosed, g as flushEventQueue, h as addEvent, i as tutorialScreenNamesMapper, l as elementClicked, m as screenOpened, n as eventModuleNames, p as screenEvent, r as eventScreenNames, t as cameraScreenNamesMapper, u as moduleClosed } from "./events-DzHYCTUI.esm.js";
2
- import "./backCameraStream-BPxNH3Pg.esm.js";
3
- import { R as isIPad, a as WasmUtilProvider, c as warmupWasm, j as createApi_default, n as buildDefaultWasmConfig, t as DEFAULT_WASM_VERSION, u as ScreenOrientationProvider } from "./src-Cmpz4Jmw.esm.js";
4
- import { a as checkPermission, c as getDeviceClass, l as getBrowser, o as requestPermission, s as createScreenOrientationObserver } from "./recordingsRepository-DVPWOR9j.esm.js";
5
- import "./deepsightService-DFek2Sxh.esm.js";
6
- import { a as resetApi, n as getApi, o as setClient, s as setToken, t as api } from "./api-3fZO5bmj.esm.js";
7
- import "./endpoints-Bydn-Ave.esm.js";
8
- import { _ as resetSessionInit, a as initializeIdCapture, c as stopRecording, d as validateUploadResponse, f as ID_ERROR_CODES, g as isSessionInitialized, h as initializeSession, i as idCaptureMachine, l as stopStream, m as getSessionFeatures, o as processId, p as getDisableIpify, r as createIdCaptureActor, s as startRecordingSession, t as createIdCaptureManager, u as uploadIdImage, v as createSession } from "./idCaptureManager-DPzinE1o.esm.js";
9
- import "./stats-D76Thmqp.esm.js";
10
- import "./id-r_CoQ3r-.esm.js";
1
+ import { _ as subscribeEvent, a as videoSelfieEvents, c as captureAttemptFinished, d as moduleOpened, f as screenClosed, g as flushEventQueue, h as addEvent, i as tutorialScreenNamesMapper, l as elementClicked, m as screenOpened, n as eventModuleNames, p as screenEvent, r as eventScreenNames, t as cameraScreenNamesMapper, u as moduleClosed } from "./events-CbNkXF2Q.esm.js";
2
+ import "./backCameraStream-BPzo60FO.esm.js";
3
+ import { R as isIPad, a as WasmUtilProvider, c as warmupWasm, j as createApi_default, n as buildDefaultWasmConfig, t as DEFAULT_WASM_VERSION, u as ScreenOrientationProvider } from "./src-BX-m0lbm.esm.js";
4
+ import { a as checkPermission, c as getDeviceClass, l as getBrowser, o as requestPermission, s as createScreenOrientationObserver } from "./recordingsRepository-DGWSMj-_.esm.js";
5
+ import "./browserSimulation-DYAk0Ipe.esm.js";
6
+ import { a as resetApi, n as getApi, o as setClient, s as setToken, t as api } from "./api-C2uzxrpN.esm.js";
7
+ import "./endpoints-b2PxFIku.esm.js";
8
+ import { a as isSessionInitialized, i as initializeSession, n as getSessionFeatures, o as resetSessionInit, s as createSession, t as getDisableIpify } from "./session-4QVMNIs5.esm.js";
9
+ import { a as initializeIdCapture, c as stopRecording, d as validateUploadResponse, f as ID_ERROR_CODES, i as idCaptureMachine, l as stopStream, o as processId, r as createIdCaptureActor, s as startRecordingSession, t as createIdCaptureManager, u as uploadIdImage } from "./idCaptureManager-BniIgM20.esm.js";
10
+ import "./deepsightService-BcdwWkYD.esm.js";
11
+ import "./stats-BaWAv541.esm.js";
12
+ import "./id-C3aKMJhc.esm.js";
11
13
 
12
14
  //#region src/setup.ts
13
15
  let wasmConfig;
@@ -1,4 +1,4 @@
1
- import { i as __toCommonJS, n as __esm, r as __export, t as __commonJS } from "./chunk-C24vxluH.esm.js";
1
+ import { i as __toCommonJS, n as __esm, r as __export, t as __commonJS } from "./chunk-NXK2ElUW.esm.js";
2
2
 
3
3
  //#region ../../node_modules/.pnpm/jsnlog@2.30.0/node_modules/jsnlog/jsnlog.js
4
4
  var require_jsnlog = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/jsnlog@2.30.0/node_modules/jsnlog/jsnlog.js": ((exports) => {