@incodetech/core 0.0.0-dev-20260403-eccc51c → 0.0.0-dev-20260407-4677d7f

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 (109) hide show
  1. package/dist/{BaseWasmProvider--AzPfwOm.esm.js → BaseWasmProvider-CQgeReKV.esm.js} +1 -785
  2. package/dist/MotionSensorProvider-BTDLt08l.esm.js +254 -0
  3. package/dist/StateMachine-8d441d6x.d.ts +2 -0
  4. package/dist/{WasmUtilProvider-BonqBWdj.esm.js → WasmUtilProvider-C45HStLj.esm.js} +1 -1
  5. package/dist/{addressSearch-DC5By0cC.esm.js → addressSearch-C5qzDvkN.esm.js} +15 -8
  6. package/dist/antifraud.d.ts +1 -1
  7. package/dist/antifraud.esm.js +3 -3
  8. package/dist/authentication.d.ts +11 -9
  9. package/dist/authentication.esm.js +18 -13
  10. package/dist/{authenticationManager-B4gSCgrO.esm.js → authenticationManager-CW4qxgcq.esm.js} +7 -6
  11. package/dist/{authenticationManager-Bd10YGSO.d.ts → authenticationManager-CiXsOTdM.d.ts} +2 -2
  12. package/dist/{backCameraStream-DF_d7hTz.esm.js → backCameraStream-CUo1USCT.esm.js} +2 -2
  13. package/dist/camera.d.ts +16 -0
  14. package/dist/camera.esm.js +5 -0
  15. package/dist/consent.d.ts +52 -52
  16. package/dist/consent.esm.js +3 -3
  17. package/dist/curp-validation.d.ts +5 -5
  18. package/dist/curp-validation.esm.js +3 -3
  19. package/dist/{deepsightLoader-DKgEdLIS.esm.js → deepsightLoader-Bs5jHgca.esm.js} +10 -7
  20. package/dist/deepsightService-C3gQ_9Ml.esm.js +493 -0
  21. package/dist/{deepsightService-Ciu0atv5.d.ts → deepsightService-CMAtxAC9.d.ts} +193 -197
  22. package/dist/device.d.ts +46 -0
  23. package/dist/device.esm.js +106 -0
  24. package/dist/document-capture.d.ts +78 -78
  25. package/dist/document-capture.esm.js +6 -6
  26. package/dist/document-upload.d.ts +53 -53
  27. package/dist/document-upload.esm.js +6 -6
  28. package/dist/ekyb.d.ts +3 -3
  29. package/dist/ekyb.esm.js +11 -10
  30. package/dist/ekyc.d.ts +3 -3
  31. package/dist/ekyc.esm.js +104 -22
  32. package/dist/email.d.ts +3 -3
  33. package/dist/email.esm.js +5 -5
  34. package/dist/{emailManager-CpAwvP3v.esm.js → emailManager-CZ2IGW0g.esm.js} +4 -4
  35. package/dist/{emailManager-BQPIJR_O.d.ts → emailManager-DEIxY7l6.d.ts} +2 -2
  36. package/dist/events-BlVGS-8F.esm.js +472 -0
  37. package/dist/events.d.ts +232 -0
  38. package/dist/events.esm.js +4 -0
  39. package/dist/extensibility.d.ts +15 -13
  40. package/dist/extensibility.esm.js +25 -20
  41. package/dist/face-match.d.ts +1 -1
  42. package/dist/face-match.esm.js +3 -3
  43. package/dist/{faceCaptureManagerFactory-CdwpYykv.d.ts → faceCaptureManagerFactory-CWj-nXdx.d.ts} +8 -6
  44. package/dist/{faceCaptureSetup-DbXgtcp7.esm.js → faceCaptureSetup-DIE5cftl.esm.js} +13 -10
  45. package/dist/flow.d.ts +7 -6
  46. package/dist/flow.esm.js +8 -8
  47. package/dist/{flowCompletionService-TnWijsSw.esm.js → flowCompletionService-N6-xypy-.esm.js} +2 -2
  48. package/dist/{flowServices-CO2sIR3D.esm.js → flowServices-xgqnJ64L.esm.js} +3 -3
  49. package/dist/geolocation.d.ts +2 -2
  50. package/dist/geolocation.esm.js +4 -4
  51. package/dist/getBrowser-B800KRAi.esm.js +41 -0
  52. package/dist/getDeviceClass-BKd2FOAf.esm.js +14 -0
  53. package/dist/government-validation.d.ts +2 -2
  54. package/dist/government-validation.esm.js +4 -4
  55. package/dist/http.d.ts +57 -0
  56. package/dist/http.esm.js +3 -0
  57. package/dist/id.d.ts +11 -10
  58. package/dist/id.esm.js +19 -15
  59. package/dist/{idCaptureManager-IdqsAASp.d.ts → idCaptureManager-H-rkXnbK.d.ts} +7 -6
  60. package/dist/{idCaptureManager-DaLU1ug7.esm.js → idCaptureManager-SHBRQ-X_.esm.js} +15 -11
  61. package/dist/index.d.ts +3 -611
  62. package/dist/index.esm.js +10 -562
  63. package/dist/{lib-i-4qLKdG.esm.js → lib-Cq5Wc-Hd.esm.js} +1 -1
  64. package/dist/mandatory-consent.d.ts +58 -58
  65. package/dist/mandatory-consent.esm.js +3 -3
  66. package/dist/permissionServices-CDqkkway.esm.js +50 -0
  67. package/dist/phone.d.ts +3 -3
  68. package/dist/phone.esm.js +5 -5
  69. package/dist/{phoneManager-DA8WUJtl.d.ts → phoneManager-Clfbrs6b.d.ts} +2 -2
  70. package/dist/{phoneManager-BAPHSXx8.esm.js → phoneManager-CscgaER2.esm.js} +4 -4
  71. package/dist/{StreamCanvasCapture-DkpkIgyL.esm.js → recordingsRepository-blYn-iKZ.esm.js} +157 -215
  72. package/dist/redirect-to-mobile.d.ts +2 -2
  73. package/dist/redirect-to-mobile.esm.js +4 -4
  74. package/dist/selfie.d.ts +11 -9
  75. package/dist/selfie.esm.js +18 -13
  76. package/dist/{selfieManager-BSkzncsa.esm.js → selfieManager-DeGqD5aN.esm.js} +5 -4
  77. package/dist/{selfieManager-Dft5wZQ_.d.ts → selfieManager-h_hhEefT.d.ts} +2 -2
  78. package/dist/{session-OglUYC9l.esm.js → session-PLjFj_T3.esm.js} +5 -19
  79. package/dist/session.d.ts +46 -2
  80. package/dist/session.esm.js +7 -4
  81. package/dist/setup-DJ3dFl5k.d.ts +120 -0
  82. package/dist/setup-fvDWE7f8.esm.js +450 -0
  83. package/dist/signature.d.ts +2 -2
  84. package/dist/signature.esm.js +3 -3
  85. package/dist/{stats-BVigf5Rn.esm.js → stats-BZ1kFW4p.esm.js} +1 -1
  86. package/dist/stats.esm.js +2 -2
  87. package/dist/{types-CiLyvJGb.d.ts → types-T0VjZW3T.d.ts} +1 -1
  88. package/dist/types-qhLxpptI.d.ts +5 -0
  89. package/dist/{types-D8Y1faI5.d.ts → types-zH5PDmSe.d.ts} +1 -1
  90. package/dist/{StateMachine-CM_aOfNL.d.ts → warmup-CEOVQKby.d.ts} +1 -4
  91. package/dist/wasm.d.ts +15 -0
  92. package/dist/wasm.esm.js +10 -0
  93. package/dist/{Manager-C6AGXEq_.esm.js → xstate.esm-BXrcOcSC.esm.js} +103 -507
  94. package/package.json +18 -2
  95. package/dist/endpoints-CI5-28jT.esm.js +0 -69
  96. package/dist/id-CzDAG_kM.esm.js +0 -0
  97. package/dist/index-BuVKc9bv.d.ts +0 -1
  98. /package/dist/{Actor-By8WNHi-.d.ts → Actor-C-jivmFF.d.ts} +0 -0
  99. /package/dist/{BrowserEnvironmentProvider-BECjyw3_.esm.js → BrowserEnvironmentProvider--xQUs3sg.esm.js} +0 -0
  100. /package/dist/{BrowserTimerProvider-CIqH6hJp.esm.js → BrowserTimerProvider-CkHEwJFa.esm.js} +0 -0
  101. /package/dist/{Manager-CCT_-HuZ.d.ts → Manager-BqFybBV-.d.ts} +0 -0
  102. /package/dist/{api-C2uzxrpN.esm.js → api-CyI8qTie.esm.js} +0 -0
  103. /package/dist/{browserSimulation-DYAk0Ipe.esm.js → browserSimulation-yzDdWSBf.esm.js} +0 -0
  104. /package/dist/{camera-6XJdOeBF.d.ts → camera-CKsQVNlH.d.ts} +0 -0
  105. /package/dist/{camera-DAuRUvnp.esm.js → camera-CsT06Zqy.esm.js} +0 -0
  106. /package/dist/{chunk-D6hkk-hd.esm.js → chunk-BcQWkoAq.esm.js} +0 -0
  107. /package/dist/{displayErrors-CGJwvrTl.d.ts → displayErrors-CjMXlBnu.d.ts} +0 -0
  108. /package/dist/{flowCompletionService-BOd4Rk8n.d.ts → flowCompletionService-BV6ThEJ1.d.ts} +0 -0
  109. /package/dist/{platform-DdhkonXk.esm.js → platform-Dcuv6w60.esm.js} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,611 +1,3 @@
1
- import { a as WasmPipeline, i as WarmupConfig, o as warmupWasm } from "./StateMachine-CM_aOfNL.js";
2
- import "./Actor-By8WNHi-.js";
3
- import { c as PermissionResult, l as PermissionStatus } from "./deepsightService-Ciu0atv5.js";
4
- 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-IdqsAASp.js";
5
- import { t as CameraStream } from "./camera-6XJdOeBF.js";
6
- import "./types-CiLyvJGb.js";
7
- import { i as RegulationTypes } from "./types-D8Y1faI5.js";
8
- import "./Manager-CCT_-HuZ.js";
9
- import "./index-BuVKc9bv.js";
10
-
11
- //#region ../infra/src/wasm/wasmDefaults.d.ts
12
- /** The WASM version bundled and tested with this SDK release. */
13
- declare const DEFAULT_WASM_VERSION = "v2.12.84";
14
- /** Builds the standard WarmupConfig from the Incode CDN. */
15
- declare function buildDefaultWasmConfig(): WarmupConfig;
16
- /**
17
- * Merges optional WASM path overrides with CDN defaults. Explicit non-blank
18
- * paths take precedence. Blank override strings log a warning and fall back to defaults.
19
- */
20
- declare function resolveWasmConfig(overrides?: Partial<WarmupConfig>): WarmupConfig;
21
- //#endregion
22
- //#region ../infra/src/http/types.d.ts
23
- type CreateApiConfig = {
24
- apiURL: string;
25
- customHeaders?: Record<string, string>;
26
- timeout?: number;
27
- };
28
- type RequestConfig = {
29
- method?: string;
30
- url: string;
31
- headers?: Record<string, string>;
32
- query?: Record<string, string | number | boolean | undefined>;
33
- params?: Record<string, string | number | boolean | undefined>;
34
- body?: unknown;
35
- signal?: AbortSignal;
36
- timeout?: number;
37
- parse?: 'json' | 'text' | 'blob' | 'arrayBuffer' | 'response';
38
- onUploadProgress?: (progress: number) => void;
39
- };
40
- type HttpResponse<T = unknown> = {
41
- ok: boolean;
42
- status: number;
43
- statusText: string;
44
- url: string;
45
- headers: Record<string, string>;
46
- data: T;
47
- };
48
- type HttpClient = {
49
- defaults: {
50
- baseURL: string;
51
- headers: Record<string, string>;
52
- };
53
- request<T = unknown>(config: RequestConfig): Promise<HttpResponse<T>>;
54
- get<T = unknown>(url: string, config?: Omit<RequestConfig, 'method' | 'url'>): Promise<HttpResponse<T>>;
55
- post<T = unknown>(url: string, body?: unknown, config?: Omit<RequestConfig, 'method' | 'url' | 'body'>): Promise<HttpResponse<T>>;
56
- put<T = unknown>(url: string, body?: unknown, config?: Omit<RequestConfig, 'method' | 'url' | 'body'>): Promise<HttpResponse<T>>;
57
- patch<T = unknown>(url: string, body?: unknown, config?: Omit<RequestConfig, 'method' | 'url' | 'body'>): Promise<HttpResponse<T>>;
58
- delete<T = unknown>(url: string, config?: Omit<RequestConfig, 'method' | 'url'>): Promise<HttpResponse<T>>;
59
- head<T = unknown>(url: string, config?: Omit<RequestConfig, 'method' | 'url'>): Promise<HttpResponse<T>>;
60
- options<T = unknown>(url: string, config?: Omit<RequestConfig, 'method' | 'url'>): Promise<HttpResponse<T>>;
61
- setHeader(name: string, value: string): void;
62
- };
63
- //#endregion
64
- //#region ../infra/src/http/createApi.d.ts
65
- declare const createApi: (config: CreateApiConfig) => HttpClient;
66
- //#endregion
67
- //#region ../infra/src/capabilities/platform.d.ts
68
- declare function isIPad(userAgent?: string): boolean;
69
- //#endregion
70
- //#region ../infra/src/capabilities/IScreenOrientationCapability.d.ts
71
- type ScreenOrientationState = 'portrait' | 'landscape';
72
- type IScreenOrientationCapability = {
73
- readonly current: ScreenOrientationState;
74
- subscribe(callback: (state: ScreenOrientationState) => void): () => void;
75
- cleanup(): void;
76
- };
77
- //#endregion
78
- //#region ../infra/src/providers/browser/ScreenOrientationProvider.d.ts
79
- declare class ScreenOrientationProvider implements IScreenOrientationCapability {
80
- private _current;
81
- private subscribers;
82
- private orientationChangeHandler;
83
- private resizeHandler;
84
- private mediaQueryList;
85
- private mediaQueryHandler;
86
- constructor();
87
- get current(): ScreenOrientationState;
88
- subscribe(callback: (state: ScreenOrientationState) => void): () => void;
89
- cleanup(): void;
90
- private handleOrientationChange;
91
- private handleResize;
92
- private updateState;
93
- }
94
- //#endregion
95
- //#region src/internal/device/getBrowser.d.ts
96
- type Browser = 'chrome' | 'firefox' | 'safari' | 'edge' | 'opera' | 'other' | 'samsung_browser';
97
- declare function getBrowser(): Browser;
98
- //#endregion
99
- //#region src/internal/device/getDeviceClass.d.ts
100
- type DeviceClass = 'ios' | 'android' | 'desktop';
101
- declare function getDeviceClass(): DeviceClass;
102
- //#endregion
103
- //#region src/internal/device/screenOrientation.d.ts
104
- type ScreenOrientationObserver = {
105
- get isLandscapeMobile(): boolean;
106
- subscribe(callback: (isLandscapeMobile: boolean) => void): () => void;
107
- cleanup(): void;
108
- };
109
- declare function createScreenOrientationObserver(provider: IScreenOrientationCapability, deviceClass: DeviceClass): ScreenOrientationObserver;
110
- //#endregion
111
- //#region src/internal/http/api.d.ts
112
- type MethodConfig = {
113
- headers?: Record<string, string>;
114
- signal?: AbortSignal;
115
- timeout?: number;
116
- query?: Record<string, string | number | boolean | undefined>;
117
- onUploadProgress?: (progress: number) => void;
118
- };
119
- type ApiClient = {
120
- get<T>(url: string, config?: MethodConfig): Promise<HttpResponse<T>>;
121
- post<T>(url: string, data?: unknown, config?: MethodConfig): Promise<HttpResponse<T>>;
122
- put<T>(url: string, data?: unknown, config?: MethodConfig): Promise<HttpResponse<T>>;
123
- patch<T>(url: string, data?: unknown, config?: MethodConfig): Promise<HttpResponse<T>>;
124
- delete<T>(url: string, config?: MethodConfig): Promise<HttpResponse<T>>;
125
- };
126
- declare function getApi(): HttpClient;
127
- declare const api: ApiClient;
128
- //#endregion
129
- //#region src/internal/permissions/permissionServices.d.ts
130
- /**
131
- * Checks the current camera permission state without prompting the user.
132
- */
133
- declare function checkPermission(): Promise<PermissionResult>;
134
- /**
135
- * Requests camera permission by attempting to access the camera, then immediately
136
- * stops the obtained stream. Also requests motion sensor permission (required on iOS
137
- * to be called during a user gesture). This function does not keep or return the stream.
138
- */
139
- declare function requestPermission(): Promise<PermissionResult>;
140
- //#endregion
141
- //#region src/internal/session/sessionService.d.ts
142
- type CreateSessionOptions = {
143
- /** The configuration/flow ID from the Incode dashboard */
144
- configurationId: string;
145
- /** External ID to associate with this session */
146
- externalId?: string;
147
- /** External customer ID */
148
- externalCustomerId?: string;
149
- /** Language for the session (e.g., 'en-US', 'es-MX') */
150
- language?: string;
151
- /** Custom fields to attach to the session */
152
- customFields?: Record<string, unknown>;
153
- /** UUID for continuing an existing session */
154
- uuid?: string;
155
- /** Interview ID for continuing an existing interview */
156
- interviewId?: string;
157
- };
158
- type Session = {
159
- token: string;
160
- interviewId: string;
161
- uuid?: string;
162
- regulationType?: string;
163
- showMandatoryConsent?: boolean;
164
- };
165
- /**
166
- * Creates a new onboarding session.
167
- *
168
- * @param apiKey - The API key from the Incode dashboard
169
- * @param options - Session creation options
170
- * @param signal - Optional AbortSignal for request cancellation
171
- * @returns The created session with token
172
- *
173
- * @example
174
- * ```ts
175
- * const session = await createSession('your-api-key', {
176
- * configurationId: 'your-flow-id',
177
- * language: 'en-US',
178
- * });
179
- * console.log(session.token); // Use this token for subsequent API calls
180
- * ```
181
- */
182
- declare function createSession(apiKey: string, options: CreateSessionOptions, signal?: AbortSignal): Promise<Session>;
183
- //#endregion
184
- //#region src/internal/featureConfig/types.d.ts
185
- type FeatureName = 'VIDEO_SELFIE_V2' | 'USE_CLIENT_GLARE' | 'USE_OPEN_VIDU' | 'DISABLE_IPIFY';
186
- type FeatureConfig = {
187
- enabled: boolean;
188
- feature: FeatureName;
189
- config?: number | string;
190
- };
191
- type Features = {
192
- features?: FeatureConfig[];
193
- sessionIdentifier: string;
194
- };
195
- //#endregion
196
- //#region src/internal/fingerprint/types.d.ts
197
- type DeviceFingerprintResult = {
198
- success: boolean;
199
- sessionStatus: string;
200
- showMandatoryConsent?: boolean;
201
- regulationType?: RegulationTypes;
202
- };
203
- //#endregion
204
- //#region src/internal/session/sessionInitializer.d.ts
205
- type SessionInitOptions = {
206
- /** Custom hosting app name for fingerprint */
207
- hostingApp?: string;
208
- /** Abort signal for cancellation */
209
- signal?: AbortSignal;
210
- };
211
- type SessionInitResult = {
212
- features: Features;
213
- disableIpify: boolean;
214
- fingerprintSuccess: boolean;
215
- fingerprintResult: DeviceFingerprintResult | undefined;
216
- };
217
- /**
218
- * Initializes session-level services after the token is set.
219
- * This should be called once after createSession() or setToken().
220
- *
221
- * Performs:
222
- * 1. Fetches feature configuration from backend
223
- * 2. Submits device fingerprint
224
- *
225
- * Results are cached for the session lifetime.
226
- *
227
- * @param options - Optional configuration
228
- * @returns Session initialization result with feature config
229
- *
230
- * @example
231
- * ```ts
232
- * // After creating a session
233
- * const session = await createSession('api-key', options);
234
- * setup({ apiURL, token: session.token });
235
- * const { features } = await initializeSession();
236
- *
237
- * // Check feature flags
238
- * if (isFeatureEnabled('DISABLE_IPIFY', features.features)) {
239
- * // Handle disabled ipify
240
- * }
241
- * ```
242
- */
243
- declare function initializeSession(options?: SessionInitOptions): Promise<SessionInitResult>;
244
- /**
245
- * Gets the cached feature configuration.
246
- * Returns undefined if session hasn't been initialized.
247
- */
248
- declare function getSessionFeatures(): Features | undefined;
249
- /**
250
- * Gets the cached disableIpify flag.
251
- * Returns false if session hasn't been initialized.
252
- */
253
- declare function getDisableIpify(): boolean;
254
- /**
255
- * Checks if the session has been initialized.
256
- */
257
- declare function isSessionInitialized(): boolean;
258
- /**
259
- * Resets session initialization state.
260
- * Useful for testing or when starting a new session.
261
- */
262
- declare function resetSessionInit(): void;
263
- //#endregion
264
- //#region src/setup.d.ts
265
- /**
266
- * WASM warmup configuration. Path fields are optional; omitted values resolve to the Incode CDN defaults.
267
- */
268
- type WasmConfig = {
269
- /** Path to the WASM binary */
270
- wasmPath?: string;
271
- /** Path to the SIMD-optimized WASM binary (optional) */
272
- wasmSimdPath?: string;
273
- /** Path to the WASM glue code */
274
- glueCodePath?: string;
275
- /** Whether to use SIMD optimizations (default: true) */
276
- useSimd?: boolean;
277
- /** Which pipelines to preload models for */
278
- pipelines?: WasmPipeline[];
279
- /**
280
- * Base path for ML model files. Models will be loaded from `${modelsBasePath}/${modelFileName}`.
281
- * If not provided, models are expected in a 'models' subdirectory relative to the WASM binary.
282
- */
283
- modelsBasePath?: string;
284
- };
285
- /**
286
- * Configuration options for the SDK setup.
287
- */
288
- type SetupOptions = {
289
- /** The base URL for the API. When omitted, no HTTP client is created — useful when all API actors are overridden via .provide(). */
290
- apiURL?: string;
291
- /** The session token for API requests (optional - can be set later or omitted for createSession calls) */
292
- token?: string;
293
- /** Custom headers to include in all requests */
294
- customHeaders?: Record<string, string>;
295
- /** Request timeout in milliseconds */
296
- timeout?: number;
297
- /**
298
- * WASM warmup config.
299
- * - Omit (default): loads automatically from the Incode CDN using the SDK's built-in version.
300
- * - `false`: opt out of WASM entirely.
301
- * - Object: override paths for self-hosting or a specific version.
302
- */
303
- wasm?: WasmConfig | false;
304
- /** Optional hosting app identifier for fingerprint tracking */
305
- hostingApp?: string;
306
- };
307
- /**
308
- * Initializes the SDK with the provided configuration.
309
- * Must be called before using any SDK functionality.
310
- *
311
- * WASM loads automatically from the Incode CDN unless explicitly disabled or overridden.
312
- *
313
- * @param options - Configuration options for the SDK
314
- *
315
- * @example
316
- * ```ts
317
- * import { setup, createSession } from '@incodetech/core';
318
- *
319
- * // Zero-config: WASM loads automatically from CDN
320
- * await setup({ apiURL: 'https://api.incode.com', token: 'session-token' });
321
- *
322
- * // Opt out of WASM
323
- * await setup({ apiURL: 'https://api.incode.com', token: 'session-token', wasm: false });
324
- *
325
- * // Self-hosted / custom version (full or partial path overrides)
326
- * await setup({
327
- * apiURL: 'https://api.incode.com',
328
- * token: 'session-token',
329
- * wasm: {
330
- * wasmPath: '/my-cdn/webLib.wasm',
331
- * glueCodePath: '/my-cdn/webLib.js',
332
- * },
333
- * });
334
- *
335
- * // Partial override: only models path, rest from CDN
336
- * await setup({
337
- * apiURL: 'https://api.incode.com',
338
- * token: 'session-token',
339
- * wasm: { modelsBasePath: 'https://my-cdn/models' },
340
- * });
341
- *
342
- * // Sessionless setup (all API actors overridden via .provide())
343
- * await setup({
344
- * wasm: {
345
- * wasmPath: '/wasm/ml-wasm.wasm',
346
- * glueCodePath: '/wasm/ml-wasm.js',
347
- * pipelines: ['selfie'],
348
- * },
349
- * });
350
- * ```
351
- */
352
- declare function setup(options: SetupOptions): Promise<void>;
353
- /**
354
- * Sets the WASM configuration without performing warmup.
355
- * Useful when WASM warmup is handled separately (e.g., conditionally based on flow).
356
- *
357
- * @param config - WASM configuration to store
358
- */
359
- declare function setWasmConfig(config: WasmConfig): void;
360
- /**
361
- * Initializes WasmUtilProvider with the stored WASM configuration.
362
- * Should be called after warmupWasm() completes when using conditional warmup.
363
- * This ensures image encryption works properly.
364
- *
365
- * @param config - Optional WASM configuration. If not provided, uses the stored config from setWasmConfig().
366
- * @throws Error if no config is provided and none is stored
367
- */
368
- declare function initializeWasmUtil(config?: WasmConfig): Promise<void>;
369
- /**
370
- * Checks if the SDK has been configured.
371
- *
372
- * @returns true if setup() has been called, false otherwise
373
- */
374
- declare function isConfigured(): boolean;
375
- /**
376
- * Resets the SDK configuration. Useful for testing.
377
- */
378
- declare function reset(): void;
379
- //#endregion
380
- //#region src/internal/events/types.d.ts
381
- type Event = {
382
- code: string;
383
- module?: string;
384
- screen?: string;
385
- payload?: Record<string, unknown>;
386
- clientTimestamp?: number;
387
- };
388
- declare const eventModuleNames: {
389
- readonly selfie: "SELFIE";
390
- readonly authentication: "AUTHENTICATION";
391
- readonly authFace: "AUTH_FACE";
392
- readonly mlConsent: "ML_CONSENT";
393
- readonly combinedConsent: "COMBINED_CONSENT";
394
- readonly curpValidation: "CURP_VALIDATION";
395
- readonly faceMatch: "FACE_MATCH";
396
- readonly qr: "QR";
397
- readonly videoSelfie: "VIDEO_ONBOARDING";
398
- readonly passport: "ID";
399
- readonly front: "ID";
400
- readonly back: "ID";
401
- readonly id: "ID";
402
- readonly document: "DOCUMENT_CAPTURE";
403
- readonly creditCard: "CREDIT_CARD_FRONT";
404
- readonly creditCardBack: "CREDIT_CARD_BACK";
405
- readonly conference: "CONFERENCE";
406
- readonly otp: "OTP";
407
- readonly signature: "SIGNATURE";
408
- readonly ekyc: "EXTERNAL_VERIFICATION";
409
- readonly globalWatchList: "GLOBAL_WATCHLIST";
410
- readonly customWatchList: "CUSTOM_WATCHLIST";
411
- readonly email: "EMAIL";
412
- readonly phone: "PHONE";
413
- readonly instantVerifyEmail: "INSTANT_VERIFY_EMAIL";
414
- readonly instantVerifyConsent: "INSTANT_VERIFY_CONSENT";
415
- readonly forms: "FORMS";
416
- readonly customModule: "CUSTOM_MODULE";
417
- readonly geolocation: "GEOLOCATION";
418
- readonly ekyb: "EKYB";
419
- readonly antifraud: "ANTIFRAUD";
420
- };
421
- declare const eventScreenNames: {
422
- readonly faceMatch: "FACE_MATCH";
423
- readonly faceCaptureTutorial: "SELFIE_CAPTURE_TUTORIAL";
424
- readonly faceCaptureCamera: "SELFIE_CAMERA_CAPTURE";
425
- readonly faceCaptureError: "SELFIE_ATTEMPT_FAILED";
426
- readonly faceCaptureSuccess: "SELFIE_UPLOAD_SUCCEEDED";
427
- readonly faceCaptureUpload: "SELFIE_UPLOAD_PROGRESS";
428
- readonly mlConsent: "MACHINE_LEARNING_CONSENT";
429
- readonly combinedConsent: "COMBINED_CONSENT";
430
- readonly curpEnter: "ENTER_CURP";
431
- readonly curpValidate: "VALIDATE_CURP";
432
- readonly curpGenerate: "GENERATE_CURP";
433
- readonly curpValidation: "CURP_VALIDATION_PROGRESS";
434
- readonly curpValidationFailed: "CURP_VALIDATION_FAILED";
435
- readonly curpValidationSuccess: "CURP_VALIDATION_SUCCEEDED";
436
- readonly qrTutorial: "QR_TUTORIAL";
437
- readonly qrScan: "QR_SCAN";
438
- readonly smsOtp: "OTP";
439
- readonly simpleOTP: "OTP";
440
- readonly signatureInput: "SIGNATURE_INPUT";
441
- readonly signatureInitialsInput: "INITIALS_INPUT";
442
- readonly frontTutorial: "FRONT_ID_CAPTURE_TUTORIAL";
443
- readonly frontCameraCapture: "FRONT_ID_CAMERA_CAPTURE";
444
- readonly frontHelp: "FRONT_ID_HELP";
445
- readonly frontReviewPhoto: "FRONT_ID_REVIEW_PHOTO";
446
- readonly frontUploadProgress: "FRONT_ID_UPLOAD_PROGRESS";
447
- readonly frontAttemptFailed: "FRONT_ID_ATTEMPT_FAILED";
448
- readonly frontUploadSuccess: "FRONT_ID_UPLOAD_SUCCEEDED";
449
- readonly backTutorial: "BACK_ID_CAPTURE_TUTORIAL";
450
- readonly backCameraCapture: "BACK_ID_CAMERA_CAPTURE";
451
- readonly backReviewPhoto: "BACK_ID_REVIEW_PHOTO";
452
- readonly backUploadProgress: "BACK_ID_UPLOAD_PROGRESS";
453
- readonly backAttemptFailed: "BACK_ID_ATTEMPT_FAILED";
454
- readonly backUploadSuccess: "BACK_ID_UPLOAD_SUCCEEDED";
455
- readonly backHelp: "BACK_ID_HELP";
456
- readonly passportTutorial: "TUTORIAL_PASSPORT";
457
- readonly documentTutorial: "DOCUMENT_CAPTURE_TUTORIAL";
458
- readonly documentCameraCapture: "DOCUMENT_CAMERA_CAPTURE";
459
- readonly documentHelp: "DOCUMENT_HELP";
460
- readonly documentReviewPhoto: "DOCUMENT_REVIEW_PHOTO";
461
- readonly documentUploadProgress: "DOCUMENT_UPLOAD_IN_PROGRESS";
462
- readonly documentAttemptFailed: "DOCUMENT_ATTEMPT_FAILED";
463
- readonly documentUploadSuccess: "DOCUMENT_UPLOAD_SUCCEEDED";
464
- readonly conferenceWait: "CONFERENCE_WAIT";
465
- readonly conferenceVideoChat: "CONFERENCE_VIDEO_CHAT";
466
- readonly conferenceMessageChat: "CONFERENCE_MESSAGE_CHAT";
467
- readonly videoSelfieTutorial: "VIDEO_SELFIE_TUTORIAL";
468
- readonly videoSelfie: "VIDEO_SELFIE";
469
- readonly videoSelfieFaceCapture: "VIDEO_SELFIE_FACE_CAPTURE";
470
- readonly videoSelfieFaceUploadProgress: "VIDEO_SELFIE_FACE_UPLOAD_PROGRESS";
471
- readonly videoSelfieFaceAttemptFailed: "VIDEO_SELFIE_FACE_ATTEMPT_FAILED";
472
- readonly videoSelfieFaceUploadSucceeded: "VIDEO_SELFIE_FACE_UPLOAD_SUCCEEDED";
473
- readonly videoSelfieFrontIdCapture: "VIDEO_SELFIE_FRONT_ID_CAPTURE";
474
- readonly videoSelfieFrontIdUploadProgress: "VIDEO_SELFIE_FRONT_ID_UPLOAD_PROGRESS";
475
- readonly videoSelfieFrontIdAttemptFailed: "VIDEO_SELFIE_FRONT_ID_ATTEMPT_FAILED";
476
- readonly videoSelfieFrontIdUploadSucceeded: "VIDEO_SELFIE_FRONT_ID_UPLOAD_SUCCEEDED";
477
- readonly videoSelfieBackIdCapture: "VIDEO_SELFIE_BACK_ID_CAPTURE";
478
- readonly videoSelfieBackIdUploadProgress: "VIDEO_SELFIE_BACK_ID_UPLOAD_PROGRESS";
479
- readonly videoSelfieBackIdAttemptFailed: "VIDEO_SELFIE_BACK_ID_ATTEMPT_FAILED";
480
- readonly videoSelfieBackIdUploadSucceeded: "VIDEO_SELFIE_BACK_ID_UPLOAD_SUCCEEDED";
481
- readonly videoSelfieDocumentCapture: "VIDEO_SELFIE_DOCUMENT_CAPTURE";
482
- readonly videoSelfieVoiceQuestion: "VIDEO_SELFIE_VOICE_QUESTION";
483
- readonly videoSelfieVoiceFinalQuestion: "VIDEO_SELFIE_VOICE_FINAL_QUESTION";
484
- readonly videoSelfieVideoUpload: "VIDEO SELFIE VIDEO UPLOAD";
485
- readonly ekycInput: "EKYC_INPUT";
486
- readonly ekycProgress: "EKYC_PROGRESS";
487
- readonly ekycSucceeded: "EKYC_SUCCEEDED";
488
- readonly ekycFailed: "EKYC_FAILED";
489
- readonly forms: "FORMS";
490
- readonly globalWatchListInput: "GLOBAL_WATCHLIST_INPUT";
491
- readonly globalWatchListProgress: "GLOBAL_WATCHLIST_PROGRESS";
492
- readonly globalWatchListSuccess: "GLOBAL_WATCHLIST_SUCCEEDED";
493
- readonly globalWatchListFailed: "GLOBAL_WATCHLIST_FAILED";
494
- readonly customWatchListInput: "CUSTOM_WATCHLIST_INPUT";
495
- readonly customWatchListProgress: "CUSTOM_WATCHLIST_PROGRESS";
496
- readonly customWatchListSuccess: "CUSTOM_WATCHLIST_SUCCEEDED";
497
- readonly customWatchListFailed: "CUSTOM_WATCHLIST_FAILED";
498
- readonly emailInput: "EMAIL_INPUT";
499
- readonly phoneInput: "PHONE_INPUT";
500
- readonly instantVerify: "INSTANT_VERIFY";
501
- readonly authFace: "AUTH_FACE";
502
- readonly authFaceError: "AUTH_FACE_ATTEMPT_FAILED";
503
- readonly authFaceUpload: "AUTH_FACE_UPLOAD_PROGRESS";
504
- readonly authFaceUploadSuccess: "AUTH_FACE_UPLOAD_SUCCEEDED";
505
- readonly authFaceUploadFailed: "AUTH_FACE_UPLOAD_FAILED";
506
- readonly customModuleCallback: "CUSTOM_MODULE_CALLBACK";
507
- readonly customModuleProcessing: "CUSTOM_MODULE_PROCESSING";
508
- readonly digitalIdFileSelection: "DIGITAL_ID_FILE_SELECTION";
509
- readonly digitalIdFileReview: "DIGITAL_ID_FILE_REVIEW";
510
- readonly digitalIdUploadProgress: "DIGITAL_ID_UPLOAD_PROGRESS";
511
- readonly digitalIdUploadSuccess: "DIGITAL_ID_UPLOAD_SUCCEEDED";
512
- readonly digitalIdUploadFailed: "DIGITAL_ID_UPLOAD_FAILED";
513
- readonly digitalIdAnalysisProgress: "DIGITAL_ID_ANALYSIS_PROGRESS";
514
- readonly digitalIdVerificationSuccess: "DIGITAL_ID_VERIFICATION_SUCCESS";
515
- readonly digitalIdVerificationFailed: "DIGITAL_ID_VERIFICATION_FAILED";
516
- readonly ekybForm: "EKYB_FORM";
517
- };
518
- declare const videoSelfieEvents: {
519
- readonly imageTooBlurry: "imageTooBlurry";
520
- readonly fillFrame: "fillFrame";
521
- readonly checkCameraOrLighting: "checkCameraOrLighting";
522
- readonly frontIdCaptureStarted: "frontIdCaptureStarted";
523
- readonly lookAtCamera: "lookAtCamera";
524
- readonly moveCloser: "moveCloser";
525
- readonly lookingForFrontId: "lookingForFrontId";
526
- readonly lookingForBackId: "lookingForBackId";
527
- readonly cameraSwitchToBack: "cameraSwitchToBack";
528
- readonly cameraSwitchToFront: "cameraSwitchToFront";
529
- readonly audioStreamOpened: "audioStreamOpened";
530
- readonly audioStreamClosed: "audioStreamClosed";
531
- readonly videoSelfieVideoUploadInProgress: "videoSelfieVideoUploadInProgress";
532
- readonly videoSelfieTosNotAccepted: "videoSelfieTosNotAccepted";
533
- readonly videoSelfieTosAccepted: "videoSelfieTosAccepted";
534
- readonly videoSelfieStreamCreated: "videoSelfieStreamCreated";
535
- readonly videoSelfieStreamDestroyed: "videoSelfieStreamDestroyed";
536
- readonly videoSelfieReconnecting: "videoSelfieReconnecting";
537
- readonly videoSelfieReconnected: "videoSelfieReconnected";
538
- };
539
- declare const tutorialScreenNamesMapper: {
540
- readonly passport: "TUTORIAL_PASSPORT";
541
- readonly front: "FRONT_ID_CAPTURE_TUTORIAL";
542
- readonly back: "BACK_ID_CAPTURE_TUTORIAL";
543
- readonly selfie: "SELFIE_CAPTURE_TUTORIAL";
544
- };
545
- declare const cameraScreenNamesMapper: {
546
- readonly front: "front";
547
- readonly back: "back";
548
- readonly passport: "passport";
549
- readonly creditCard: "front";
550
- readonly creditCardBack: "back";
551
- readonly document: "document";
552
- };
553
- type EventModule = (typeof eventModuleNames)[keyof typeof eventModuleNames];
554
- type EventScreen = (typeof eventScreenNames)[keyof typeof eventScreenNames];
555
- //#endregion
556
- //#region src/internal/events/addEvent.d.ts
557
- type EventSubscriber = (event: Event) => void;
558
- /**
559
- * Subscribes to all SDK events for logging, debugging, or custom analytics.
560
- * Returns an unsubscribe function.
561
- *
562
- * @param listener - Callback function that receives each event
563
- * @returns Unsubscribe function to remove the listener
564
- *
565
- * @example
566
- * ```typescript
567
- * const unsubscribe = subscribeEvent((event) => {
568
- * console.log('[Event]', event.code, event.module);
569
- * });
570
- *
571
- * // Later
572
- * unsubscribe();
573
- * ```
574
- */
575
- declare function subscribeEvent(listener: EventSubscriber): () => void;
576
- /**
577
- * Sends an event to the dashboard for tracking.
578
- * Fire-and-forget: never blocks, never throws.
579
- * Events are queued if SDK is not configured yet.
580
- */
581
- declare function addEvent(event: Event): void;
582
- /**
583
- * Flushes any queued events that were sent before SDK was configured.
584
- * Called automatically by setup() after token is set.
585
- */
586
- declare function flushEventQueue(): void;
587
- //#endregion
588
- //#region src/internal/events/helpers.d.ts
589
- type ScreenEventParams = {
590
- module: EventModule | string;
591
- screen?: EventScreen | string;
592
- code: string;
593
- payload?: Record<string, unknown>;
594
- };
595
- type ElementClickedPayload = {
596
- element: string;
597
- action?: string;
598
- metadata?: Record<string, unknown>;
599
- };
600
- type CaptureAttemptFinishedPayload = {
601
- logs: string;
602
- };
603
- declare function screenEvent(params: ScreenEventParams): void;
604
- declare function moduleOpened(module: EventModule | string, screen?: EventScreen | string, payload?: Record<string, unknown>): void;
605
- declare function moduleClosed(module: EventModule | string, screen?: EventScreen | string, payload?: Record<string, unknown>): void;
606
- declare function screenOpened(module: EventModule | string, screen: EventScreen | string, payload?: Record<string, unknown>): void;
607
- declare function screenClosed(module: EventModule | string, screen: EventScreen | string, payload?: Record<string, unknown>): void;
608
- declare function elementClicked(module: EventModule | string, screen: EventScreen | string | undefined, payload: ElementClickedPayload): void;
609
- declare function captureAttemptFinished(module: EventModule | string, screen: EventScreen | string | undefined, payload: CaptureAttemptFinishedPayload): void;
610
- //#endregion
611
- export { type Browser, CameraStream, type CaptureAttemptFinishedPayload, CaptureIdResponse, CapturedImage, CreateIdCaptureActorOptions, type CreateSessionOptions, DEFAULT_WASM_VERSION, DetectionArea, DetectionOrientation, DetectionStatus, type DeviceClass, type ElementClickedPayload, type Event, type EventModule, type EventScreen, type HttpClient, ID_ERROR_CODES, IdCaptureActor, IdCaptureConfig, IdCaptureContext, IdCaptureDependencies, IdCaptureEvent, IdCaptureGeometry, IdCaptureInitResult, IdCaptureInput, IdCaptureMachine, IdCaptureManager, IdCaptureMode, IdCaptureSettings, IdCaptureState, IdCaptureThresholds, IdDocumentType, IdError, IdErrorCode, IdFlowStep, InitializeIdCaptureParams, type PermissionResult, type PermissionStatus, RecordingSession, type ScreenOrientationObserver, ScreenOrientationProvider, type Session, type SessionInitOptions, type SessionInitResult, type SetupOptions, StartRecordingParams, UploadIdImageParams, UploadIdResponse, ValidationError, type WasmConfig, type WasmPipeline, addEvent, api, buildDefaultWasmConfig, cameraScreenNamesMapper, captureAttemptFinished, checkPermission as checkCameraPermission, createApi, createIdCaptureActor, createIdCaptureManager, createScreenOrientationObserver, createSession, elementClicked, eventModuleNames, eventScreenNames, flushEventQueue, getApi, getBrowser, getDeviceClass, getDisableIpify, getSessionFeatures, idCaptureMachine, initializeIdCapture, initializeSession, initializeWasmUtil, isConfigured, isIPad, isSessionInitialized, moduleClosed, moduleOpened, processId, requestPermission as requestCameraPermission, reset, resetSessionInit, resolveWasmConfig, screenClosed, screenEvent, screenOpened, setWasmConfig, setup, startRecordingSession, stopRecording, stopStream, subscribeEvent, tutorialScreenNamesMapper, uploadIdImage, validateUploadResponse, videoSelfieEvents, warmupWasm };
1
+ import "./warmup-CEOVQKby.js";
2
+ import { a as reset, i as isConfigured, s as setup, t as SetupOptions } from "./setup-DJ3dFl5k.js";
3
+ export { type SetupOptions, isConfigured, reset, setup };