@incodetech/core 0.0.0-dev-20260512-cffbe28 → 0.0.0-dev-20260512-20def2c

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 (77) hide show
  1. package/dist/{BaseWasmProvider-IiHnsP8E.esm.js → BaseWasmProvider-CVktpSfA.esm.js} +230 -5
  2. package/dist/{WasmUtilProvider-BrEYcdhY.esm.js → WasmUtilProvider-BEQWy5_K.esm.js} +1 -1
  3. package/dist/ae-signature.d.ts +1 -1
  4. package/dist/authentication.d.ts +5 -5
  5. package/dist/authentication.esm.js +16 -16
  6. package/dist/{authenticationManager-BuChl5GH.d.ts → authenticationManager-BnltMEfq.d.ts} +1 -1
  7. package/dist/{authenticationManager-CKDxnLtG.esm.js → authenticationManager-DsauZR1g.esm.js} +3 -3
  8. package/dist/{authenticationStateMachine-BNs4VCxh.esm.js → authenticationStateMachine-B4FQ52zK.esm.js} +11 -3
  9. package/dist/{backCameraStream-DWZ1cNVA.esm.js → backCameraStream-BKC7QXRJ.esm.js} +2 -2
  10. package/dist/camera.esm.js +2 -2
  11. package/dist/consent.d.ts +50 -50
  12. package/dist/cpf-ocr.d.ts +17 -17
  13. package/dist/cross-document-data-match.esm.js +1 -1
  14. package/dist/curp-validation.d.ts +1 -1
  15. package/dist/{deepsightLoader-BMeAmiNh.esm.js → deepsightLoader-VJ3nFjie.esm.js} +6 -6
  16. package/dist/{deepsightService-IxmrmdKl.esm.js → deepsightService-Dv6kvzph.esm.js} +2 -2
  17. package/dist/{deepsightService-CGSDjjBz.d.ts → deepsightService-Kuw9roIJ.d.ts} +1 -1
  18. package/dist/device.esm.js +3 -3
  19. package/dist/document-capture.d.ts +71 -71
  20. package/dist/document-capture.esm.js +4 -4
  21. package/dist/document-upload.d.ts +46 -46
  22. package/dist/document-upload.esm.js +3 -3
  23. package/dist/{documentCaptureStateMachine-CuanhXvs.esm.js → documentCaptureStateMachine-CEm-9zrh.esm.js} +1 -1
  24. package/dist/ekyb.esm.js +3 -3
  25. package/dist/{ekybStateMachine-tZ1_L9vE.esm.js → ekybStateMachine-DqzhMm0r.esm.js} +1 -1
  26. package/dist/electronic-signature.d.ts +1 -1
  27. package/dist/extensibility.d.ts +7 -7
  28. package/dist/extensibility.esm.js +21 -21
  29. package/dist/{faceCaptureManagerFactory-FX5Lw2Q5.d.ts → faceCaptureManagerFactory-DmHbKbyC.d.ts} +66 -3
  30. package/dist/{faceCaptureManagerFactory-ByAGjOLF.esm.js → faceCaptureManagerFactory-fu-9hWf5.esm.js} +2 -0
  31. package/dist/{faceCaptureSetup-CUzqUwkP.esm.js → faceCaptureSetup-D607PhdL.esm.js} +141 -19
  32. package/dist/flow-events.d.ts +2 -2
  33. package/dist/flow.d.ts +7 -3
  34. package/dist/flow.esm.js +2 -2
  35. package/dist/{flowServices-CLo2qihS.esm.js → flowServices-BVVnH_Fn.esm.js} +14 -1
  36. package/dist/geolocation.esm.js +2 -2
  37. package/dist/{geolocationStateMachine-15aagr2_.esm.js → geolocationStateMachine-BYWUPbNs.esm.js} +1 -1
  38. package/dist/{getDeviceClass-DmoqR7G2.esm.js → getDeviceClass-C1ZS2XJL.esm.js} +1 -1
  39. package/dist/home.d.ts +11 -11
  40. package/dist/http.d.ts +9 -0
  41. package/dist/id-ocr.d.ts +52 -52
  42. package/dist/id.d.ts +4 -4
  43. package/dist/id.esm.js +14 -14
  44. package/dist/{idCaptureManager-DiFBYm7h.d.ts → idCaptureManager-Bg2va24b.d.ts} +2 -2
  45. package/dist/{idCaptureManager-ZtfBOR6V.esm.js → idCaptureManager-DbP4E8PO.esm.js} +1 -1
  46. package/dist/{idCaptureStateMachine-BuX1-VlB.esm.js → idCaptureStateMachine-g5cYnHGD.esm.js} +11 -11
  47. package/dist/identity-reuse.d.ts +40 -40
  48. package/dist/{index-BRdxM5zm.d.ts → index-DXB9aRs0.d.ts} +119 -119
  49. package/dist/{index-CmFkidgy.d.ts → index-UH-vOq3x.d.ts} +1 -1
  50. package/dist/index.d.ts +2 -2
  51. package/dist/index.esm.js +4 -4
  52. package/dist/mandatory-consent.d.ts +51 -51
  53. package/dist/{permissionServices-ACBX6sNZ.esm.js → permissionServices-Cdxqlwqz.esm.js} +1 -1
  54. package/dist/qe-signature.d.ts +1 -1
  55. package/dist/{recordingService-DMaVUhWY.esm.js → recordingService-Dp-3nA-h.esm.js} +204 -174
  56. package/dist/selfie.d.ts +5 -5
  57. package/dist/selfie.esm.js +16 -16
  58. package/dist/{selfieManager-DC9hKgt7.esm.js → selfieManager-5AG9bMT1.esm.js} +3 -3
  59. package/dist/{selfieManager-DPQzO4ua.d.ts → selfieManager-CQtRqcjI.d.ts} +1 -1
  60. package/dist/{selfieStateMachine-DvOTE42w.esm.js → selfieStateMachine-D0rrAFIs.esm.js} +22 -10
  61. package/dist/{session-DAspZUCj.esm.js → session-BxtuBDwz.esm.js} +1 -1
  62. package/dist/session.esm.js +1 -1
  63. package/dist/{setup-DyspWyTY.esm.js → setup-B2Van3Nc.esm.js} +38 -183
  64. package/dist/{setup-DM301Lyz.d.ts → setup-CsJ6FYyF.d.ts} +1 -1
  65. package/dist/stats.esm.js +1 -1
  66. package/dist/{types-BA181GDD.d.ts → types-DkXZpS0R.d.ts} +14 -0
  67. package/dist/{warmup-DHGg8wQZ.d.ts → warmup-C6O7yhfX.d.ts} +5 -2
  68. package/dist/wasm.d.ts +3 -3
  69. package/dist/wasm.esm.js +4 -4
  70. package/dist/workflow.d.ts +2 -2
  71. package/dist/workflow.esm.js +20 -20
  72. package/package.json +1 -1
  73. /package/dist/{ITimerCapability-2pw-S97e.esm.js → ITimerCapability-3xSd36bT.esm.js} +0 -0
  74. /package/dist/{MotionSensorProvider-DJMsPght.esm.js → MotionSensorProvider-Dt_lF3Z8.esm.js} +0 -0
  75. /package/dist/{getBrowser-Y88tNVud.esm.js → getBrowser-Bl0PlyDu.esm.js} +0 -0
  76. /package/dist/{platform-Dpzd9p3X.esm.js → platform-CDh4uv5Y.esm.js} +0 -0
  77. /package/dist/{stats-Bqq9IKre.esm.js → stats-qUsejORa.esm.js} +0 -0
@@ -1,15 +1,15 @@
1
- import { c as SemaphoreProvider, i as wasmCallWrapper, n as warmupWasm, s as loadWasmModule } from "./BaseWasmProvider-IiHnsP8E.esm.js";
2
- import { t as WasmUtilProvider } from "./WasmUtilProvider-BrEYcdhY.esm.js";
1
+ import { a as enableWasmEncryption, c as setWebApiHttpTransport, i as WasmWebClientError, l as setupWasmConnection, n as warmupWasm, o as executeWasmRequest, s as initializeWasmWebClient } from "./BaseWasmProvider-CVktpSfA.esm.js";
2
+ import { t as WasmUtilProvider } from "./WasmUtilProvider-BEQWy5_K.esm.js";
3
3
  import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BZGH3sYJ.esm.js";
4
4
  import { a as resetApi, i as isApiConfigured, n as getApi, o as setClient, r as getToken, s as setToken, t as api } from "./api-eqRXuVG-.esm.js";
5
5
  import { _ as resetAnalyticsBatcher, g as getAnalyticsBatcher, m as createAnalyticsBatchingService, v as setAnalyticsBatcher } from "./events-Bt1azl2B.esm.js";
6
6
  import { t as endpoints } from "./endpoints-B3V1U9Dg.esm.js";
7
- import { i as resetSessionInit, r as initializeSession } from "./session-DAspZUCj.esm.js";
7
+ import { i as resetSessionInit, r as initializeSession } from "./session-BxtuBDwz.esm.js";
8
8
 
9
9
  //#region ../infra/src/wasm/wasmDefaults.ts
10
10
  const WASM_CDN_BASE_URL = "https://cdn.incodesmile.com/ml-wasm-kit-release";
11
11
  /** The WASM version bundled and tested with this SDK release. */
12
- const DEFAULT_WASM_VERSION = "v2.13.14";
12
+ const DEFAULT_WASM_VERSION = "v2.13.20";
13
13
  const PATH_KEYS = [
14
14
  "wasmPath",
15
15
  "wasmSimdPath",
@@ -353,162 +353,6 @@ const createApi = (config) => {
353
353
  };
354
354
  var createApi_default = createApi;
355
355
 
356
- //#endregion
357
- //#region ../infra/src/wasm/wasmWebClient.ts
358
- /**
359
- * JavaScript bridge for the C++ `WebClient` exposed by `webLib.wasm`.
360
- *
361
- * The pinned WASM bundle ships a `WebClient` class alongside the ML pipeline
362
- * APIs. This module instantiates it once (sharing the singleton `wasmModule`
363
- * with `mlWasmJSApi`) and exposes a small TypeScript-friendly surface that
364
- * `createWasmApi` can drive.
365
- *
366
- * Concurrency model mirrors the legacy implementation:
367
- * - 4-slot semaphore keyed by per-request `threadId` so multiple HTTP calls
368
- * can run in parallel without trampling shared C++ state.
369
- * - Each WASM-side request method returns `false` while in flight; we
370
- * busy-poll via {@link wasmCallWrapper}.
371
- * - Result extraction (`getRequestResult`) is per-thread.
372
- *
373
- * Encryption support: `setupConnection` accepts an `encryptionEnabled` flag
374
- * that triggers the in-binary RSA/AES handshake (always using SHA-256 OAEP).
375
- * {@link enableWasmEncryption} is a stateless helper that re-runs the
376
- * handshake with the caller-supplied connection params. State lives in the
377
- * C++ binary and (for SDK config) in `@incodetech/core`'s `setup.ts` — this
378
- * module caches nothing.
379
- */
380
- const HTTP_CONCURRENCY = 4;
381
- var WasmWebClientError = class extends Error {
382
- constructor(message, statusCode, data) {
383
- super(message);
384
- this.name = "WasmWebClientError";
385
- this.status = statusCode;
386
- this.statusCode = statusCode;
387
- if (statusCode > 0 || data !== void 0) this.response = {
388
- status: statusCode,
389
- data
390
- };
391
- }
392
- };
393
- let webClientApi = null;
394
- let initPromise = null;
395
- let semaphore = new SemaphoreProvider(HTTP_CONCURRENCY);
396
- const isWebClientWasm = (mod) => {
397
- return typeof mod.WebClient === "function";
398
- };
399
- const toStringRecord = (obj) => {
400
- if (!obj) return void 0;
401
- const result = {};
402
- for (const key of Object.keys(obj)) {
403
- const value = obj[key];
404
- if (value === void 0 || value === null) continue;
405
- result[key] = String(value);
406
- }
407
- return result;
408
- };
409
- /**
410
- * Loads the shared WASM module (if not already loaded) and instantiates the
411
- * C++ `WebClient`. Idempotent — repeated calls reuse the existing instance.
412
- */
413
- async function initializeWasmWebClient(wasmPath, wasmSimdPath, glueCodePath, useSimd) {
414
- if (webClientApi) return;
415
- if (initPromise) return initPromise;
416
- initPromise = (async () => {
417
- try {
418
- const { wasmModule } = await loadWasmModule({
419
- wasmPath,
420
- wasmSimdPath,
421
- glueCodePath,
422
- useSimd
423
- });
424
- if (!isWebClientWasm(wasmModule)) throw new Error("WASM module does not expose a WebClient class. Update webLib.wasm to a build that includes WebClient.");
425
- webClientApi = new wasmModule.WebClient();
426
- } catch (error) {
427
- initPromise = null;
428
- throw error;
429
- }
430
- })();
431
- return initPromise;
432
- }
433
- /**
434
- * Configures the C++ WebClient connection. Safe to call multiple times — each
435
- * call resets the underlying session and re-applies default headers.
436
- *
437
- * `defaultHeaders` are applied **before** `createApi`, so the in-binary RSA
438
- * handshake (`GET /e2ee/key/v2` + `POST /e2ee/key`) sees the same headers as
439
- * data requests. Without this ordering, environments that require auth/version
440
- * headers on the handshake (e.g. `x-api-key`, `api-version`) would 401/4xx
441
- * before any encrypted traffic ever flowed.
442
- *
443
- * OAEP padding is hardcoded to SHA-256 (we always pass `useSha256 = true` into
444
- * the C++ binary).
445
- */
446
- async function setupWasmConnection(apiURL, token, encryptionEnabled, defaultHeaders) {
447
- const api$1 = ensureReady();
448
- api$1.resetSessionState?.();
449
- api$1.setDefaultHeaders?.(defaultHeaders);
450
- api$1.createApi(apiURL, token, true, encryptionEnabled);
451
- }
452
- /**
453
- * Re-runs the connection handshake with `encryptionEnabled = true`. Stateless:
454
- * callers (currently `@incodetech/core`'s `setup()`) own the connection params
455
- * and supply them on every call. Use this to upgrade an existing non-encrypted
456
- * WASM connection to encrypted at runtime.
457
- */
458
- async function enableWasmEncryption(params) {
459
- await setupWasmConnection(params.apiURL, params.token ?? "", true, params.defaultHeaders);
460
- }
461
- /**
462
- * Executes a single HTTP request through the WASM WebClient.
463
- *
464
- * Acquires a semaphore slot for `threadId`, registers progress callbacks, runs
465
- * the request via {@link wasmCallWrapper} (busy-polls until the WASM method
466
- * returns `true`), then extracts the per-thread result. Throws
467
- * {@link WasmWebClientError} on non-2xx or transport errors.
468
- */
469
- async function executeWasmRequest(method, url, body, headers, params, timeout, onUploadProgress) {
470
- const api$1 = ensureReady();
471
- const stringParams = toStringRecord(params);
472
- return semaphore.withLock(async (threadId) => {
473
- if (onUploadProgress && api$1.setOnUploadProgress) api$1.setOnUploadProgress((event) => {
474
- try {
475
- onUploadProgress(event);
476
- } catch (error) {
477
- console.error("WasmWebClient: error in onUploadProgress callback", error);
478
- }
479
- });
480
- try {
481
- await wasmCallWrapper(semaphore, () => callWasmMethod(api$1, method, threadId, url, body, headers, stringParams, timeout), false);
482
- return readResult(api$1, threadId);
483
- } finally {
484
- api$1.clearOnUploadProgress?.(threadId);
485
- api$1.clearOnDownloadProgress?.(threadId);
486
- }
487
- });
488
- }
489
- function callWasmMethod(api$1, method, threadId, url, body, headers, params, timeout) {
490
- switch (method) {
491
- case "GET": return api$1.get(threadId, url, params, headers, timeout);
492
- case "POST": return api$1.post(threadId, url, body ?? {}, headers, params, timeout, false);
493
- case "PUT": return api$1.put(threadId, url, body ?? {}, headers, params, timeout, false);
494
- case "PATCH": return api$1.patch(threadId, url, body ?? {}, headers, params, timeout, false);
495
- case "DELETE": return api$1.del(threadId, url, body ?? {}, headers, params, timeout, false);
496
- default: throw new Error(`Unsupported WASM HTTP method: ${method}`);
497
- }
498
- }
499
- function readResult(api$1, threadId) {
500
- const response = api$1.getRequestResult(threadId);
501
- if (response.hasError) throw new WasmWebClientError(response.errorMessage || "WasmWebClient request failed", response.statusCode, response.result);
502
- return {
503
- data: response.result,
504
- status: response.statusCode
505
- };
506
- }
507
- function ensureReady() {
508
- if (!webClientApi) throw new Error("WasmWebClient not initialized. Call initializeWasmWebClient() first.");
509
- return webClientApi;
510
- }
511
-
512
356
  //#endregion
513
357
  //#region ../infra/src/http/createWasmApi.ts
514
358
  const RSA_OAEP_SHA256_SCHEME = "RSA/NONE/OAEPWITHSHA-256ANDMGF1PADDING";
@@ -613,13 +457,14 @@ const createWasmApi = async (config) => {
613
457
  const client = {
614
458
  defaults,
615
459
  async request(requestConfig) {
616
- const { method = "GET", url, headers: requestHeaders = {}, query, params, body, signal, timeout = config.timeout ?? DEFAULT_TIMEOUT, onUploadProgress } = requestConfig;
460
+ const { method = "GET", url, headers: requestHeaders = {}, query, params, body, signal, timeout = config.timeout ?? DEFAULT_TIMEOUT, onUploadProgress, ie = false } = requestConfig;
617
461
  const upperMethod = normalizeMethod(method);
618
462
  const requestParams = params ?? query;
619
463
  const fullUrl = buildUrl(defaults.baseURL, url, requestParams);
464
+ const needsSchemeHeader = ie || isEncryptionEnabled();
620
465
  const mergedHeaders = {
621
466
  ...defaults.headers,
622
- ...isEncryptionEnabled() ? { "X-RSA-Encryption-Scheme": RSA_OAEP_SHA256_SCHEME } : {},
467
+ ...needsSchemeHeader ? { "X-RSA-Encryption-Scheme": RSA_OAEP_SHA256_SCHEME } : {},
623
468
  ...requestHeaders
624
469
  };
625
470
  const requestBody = prepareBody(body);
@@ -629,7 +474,7 @@ const createWasmApi = async (config) => {
629
474
  const abortError = new WasmHttpError(0, "Request aborted", fullUrl, upperMethod, {}, null);
630
475
  if (signal?.aborted) throw abortError;
631
476
  try {
632
- const response = await withAbortSignal(executeWasmRequest(upperMethod, url, requestBody, mergedHeaders, requestParams, timeout, wasmProgress), signal, abortError);
477
+ const response = await withAbortSignal(executeWasmRequest(upperMethod, url, requestBody, mergedHeaders, requestParams, timeout, wasmProgress, ie), signal, abortError);
633
478
  if (response.status < 200 || response.status >= 300) throw new WasmHttpError(response.status, "", fullUrl, upperMethod, {}, response.data);
634
479
  return {
635
480
  ok: true,
@@ -699,24 +544,33 @@ var createWasmApi_default = createWasmApi;
699
544
  //#endregion
700
545
  //#region src/internal/http/clientLifecycle.ts
701
546
  /**
702
- * HTTP client lifecycle for the SDK.
703
- *
704
- * Owns the active `StoredHttpConfig` and the procedures that mutate it:
705
- *
706
- * - {@link installFreshHttpClient} first-time setup, or full reconfigure
707
- * when a new `apiURL` is provided to `setup()`.
708
- * - {@link enableEncryptionOnExistingClient} — runtime upgrade from a plain
709
- * or non-encrypted WASM client to an encrypted WASM client.
710
- * - {@link upgradeToWasmHttpClient} — lazy XHR→WASM swap used by
711
- * `<incode-flow>` / `<incode-workflow>` when WASM finishes warming up.
712
- *
713
- * Everything that touches the encrypted-transport handshake is wrapped in
714
- * {@link withHandshakeFailureContext} so callers see a single descriptive
715
- * error instead of an opaque infra exception.
716
- *
717
- * Module-scoped state intentional: there is one HTTP client per SDK
718
- * instance.
547
+ * Wraps the active HttpClient as a transport for the C++ `WebApi` host
548
+ * adapter. Lets the on-device face-results POST flow through the same
549
+ * `httpClient.request()` pipeline as every other endpoint — header
550
+ * injection, encryption-state handling, default headers, timeout — instead
551
+ * of bypassing it via `executeWasmRequest` directly.
719
552
  */
553
+ function bindWebApiTransport(client) {
554
+ return async (url, body, config) => {
555
+ const response = await client.request({
556
+ method: "POST",
557
+ url,
558
+ body,
559
+ headers: config.headers,
560
+ params: config.params,
561
+ timeout: config.timeout,
562
+ ie: config.ie
563
+ });
564
+ return {
565
+ data: response.data,
566
+ status: response.status
567
+ };
568
+ };
569
+ }
570
+ function installClient(client) {
571
+ setClient(client);
572
+ setWebApiHttpTransport(bindWebApiTransport(client));
573
+ }
720
574
  let storedHttpConfig;
721
575
  /** Reads the current HTTP-client config (or `undefined` if none installed). */
722
576
  function getStoredHttpConfig() {
@@ -729,6 +583,7 @@ function isHttpEncrypted() {
729
583
  /** Clears all HTTP-client state. Called by `reset()`. */
730
584
  function resetHttpClientState() {
731
585
  storedHttpConfig = void 0;
586
+ setWebApiHttpTransport(null);
732
587
  }
733
588
  /**
734
589
  * Builds (or replaces) the HTTP client when `setup()` receives an `apiURL`.
@@ -737,7 +592,7 @@ function resetHttpClientState() {
737
592
  * is requested.
738
593
  */
739
594
  async function installFreshHttpClient(apiURL, options, effectiveWasm, wantsEncryption) {
740
- setClient(effectiveWasm ? await withHandshakeFailureContext(wantsEncryption, () => createWasmApi_default({
595
+ installClient(effectiveWasm ? await withHandshakeFailureContext(wantsEncryption, () => createWasmApi_default({
741
596
  apiURL,
742
597
  customHeaders: options.customHeaders,
743
598
  timeout: options.timeout,
@@ -770,7 +625,7 @@ async function enableEncryptionOnExistingClient(options, effectiveWasm) {
770
625
  if (!stored) return;
771
626
  const customHeaders = mergeHeaders(stored.customHeaders, options.customHeaders);
772
627
  const timeout = options.timeout ?? stored.timeout;
773
- if (!stored.isWasm) setClient(await withHandshakeFailureContext(true, () => createWasmApi_default({
628
+ if (!stored.isWasm) installClient(await withHandshakeFailureContext(true, () => createWasmApi_default({
774
629
  apiURL: stored.apiURL,
775
630
  customHeaders,
776
631
  timeout,
@@ -805,7 +660,7 @@ async function enableEncryptionOnExistingClient(options, effectiveWasm) {
805
660
  async function upgradeToWasmHttpClient(resolved) {
806
661
  const stored = storedHttpConfig;
807
662
  if (!stored || stored.isWasm) return;
808
- setClient(await createWasmApi_default({
663
+ installClient(await createWasmApi_default({
809
664
  apiURL: stored.apiURL,
810
665
  customHeaders: stored.customHeaders,
811
666
  timeout: stored.timeout,
@@ -1,4 +1,4 @@
1
- import { n as WasmPipeline } from "./warmup-DHGg8wQZ.js";
1
+ import { n as WasmPipeline } from "./warmup-C6O7yhfX.js";
2
2
 
3
3
  //#region src/setup.d.ts
4
4
 
package/dist/stats.esm.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import "./api-eqRXuVG-.esm.js";
2
- import { t as addDeviceStats } from "./stats-Bqq9IKre.esm.js";
2
+ import { t as addDeviceStats } from "./stats-qUsejORa.esm.js";
3
3
 
4
4
  export { addDeviceStats };
@@ -42,6 +42,13 @@ type FlowModuleConfig = {
42
42
  validateFaceMask: boolean;
43
43
  validateHeadCover: boolean;
44
44
  validateLenses: boolean;
45
+ /**
46
+ * When true, the AUTHENTICATION module runs face analysis on-device via
47
+ * the OnDevice WASM workflow and POSTs only the results JSON to
48
+ * `/omni/add/face-results` instead of `/omni/onboarding-authentications/authenticate`.
49
+ * Recording is skipped.
50
+ */
51
+ onDeviceFaceResultsSubmissionEnabled?: boolean;
45
52
  };
46
53
  ADDRESS: {
47
54
  disableSkipPoa: boolean;
@@ -203,6 +210,13 @@ type FlowModuleConfig = {
203
210
  validateClosedEyes: boolean;
204
211
  validateBrightness: boolean;
205
212
  deepsightLiveness: 'SINGLE_FRAME' | 'MULTIMODAL' | 'VIDEOLIVENESS';
213
+ /**
214
+ * When true, the SELFIE module runs face analysis on-device via the
215
+ * OnDevice WASM workflow and POSTs only the results JSON to
216
+ * `/omni/add/face-results` instead of `/omni/add/face`. Recording is
217
+ * skipped and the `/omni/process/face` step is bypassed.
218
+ */
219
+ onDeviceFaceResultsSubmissionEnabled?: boolean;
206
220
  };
207
221
  SIGNATURE: {
208
222
  title: string;
@@ -1,10 +1,13 @@
1
1
  //#region ../infra/src/wasm/warmup.d.ts
2
2
  /**
3
3
  * All available ML pipelines in the SDK.
4
- * - 'selfie' - Face detection for selfie capture
4
+ * - 'selfie' - Face detection for selfie capture (default 4-model bundle)
5
+ * - 'onDeviceSelfie' - Face detection + on-device liveness + age estimation
6
+ * (6-model bundle for the on-device face-results submission flow). Mutually
7
+ * exclusive with 'selfie' for a given session — both use FaceProcessingApi.
5
8
  * - 'idCapture' - Document detection for ID capture
6
9
  */
7
- type WasmPipeline = 'selfie' | 'idCapture';
10
+ type WasmPipeline = 'selfie' | 'onDeviceSelfie' | 'idCapture';
8
11
  interface WarmupConfig {
9
12
  wasmPath: string;
10
13
  wasmSimdPath?: string;
package/dist/wasm.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { n as WasmPipeline, r as warmupWasm, t as WarmupConfig } from "./warmup-DHGg8wQZ.js";
2
- import { c as upgradeToWasmHttpClient, n as WasmConfig, o as setWasmConfig, r as initializeWasmUtil } from "./setup-DM301Lyz.js";
1
+ import { n as WasmPipeline, r as warmupWasm, t as WarmupConfig } from "./warmup-C6O7yhfX.js";
2
+ import { c as upgradeToWasmHttpClient, n as WasmConfig, o as setWasmConfig, r as initializeWasmUtil } from "./setup-CsJ6FYyF.js";
3
3
 
4
4
  //#region ../infra/src/wasm/wasmDefaults.d.ts
5
5
  /** The WASM version bundled and tested with this SDK release. */
6
- declare const DEFAULT_WASM_VERSION = "v2.13.14";
6
+ declare const DEFAULT_WASM_VERSION = "v2.13.20";
7
7
  /** Builds the standard WarmupConfig from the Incode CDN. */
8
8
  declare function buildDefaultWasmConfig(): WarmupConfig;
9
9
  /**
package/dist/wasm.esm.js CHANGED
@@ -1,11 +1,11 @@
1
- import { c as buildDefaultWasmConfig, i as setWasmConfig, l as resolveWasmConfig, o as upgradeToWasmHttpClient, s as DEFAULT_WASM_VERSION, t as initializeWasmUtil } from "./setup-DyspWyTY.esm.js";
2
- import { n as warmupWasm } from "./BaseWasmProvider-IiHnsP8E.esm.js";
3
- import "./WasmUtilProvider-BrEYcdhY.esm.js";
1
+ import { c as buildDefaultWasmConfig, i as setWasmConfig, l as resolveWasmConfig, o as upgradeToWasmHttpClient, s as DEFAULT_WASM_VERSION, t as initializeWasmUtil } from "./setup-B2Van3Nc.esm.js";
2
+ import { n as warmupWasm } from "./BaseWasmProvider-CVktpSfA.esm.js";
3
+ import "./WasmUtilProvider-BEQWy5_K.esm.js";
4
4
  import "./BrowserTimerProvider-BZGH3sYJ.esm.js";
5
5
  import "./api-eqRXuVG-.esm.js";
6
6
  import "./events-Bt1azl2B.esm.js";
7
7
  import "./endpoints-B3V1U9Dg.esm.js";
8
- import "./session-DAspZUCj.esm.js";
8
+ import "./session-BxtuBDwz.esm.js";
9
9
  import "./IpifyProvider-ByL6JYxg.esm.js";
10
10
  import "./browserSimulation-CAH-V_iE.esm.js";
11
11
 
@@ -2,9 +2,9 @@ import { t as Manager } from "./Manager-D9pehGyp.js";
2
2
  import { t as AnyStateMachine } from "./StateMachine-CJG7thvx.js";
3
3
  import "./camera-B6UAKpM1.js";
4
4
  import "./types-DJSt3Ovt.js";
5
- import "./types-BA181GDD.js";
5
+ import "./types-DkXZpS0R.js";
6
6
  import { n as GetFinishStatusFn, t as FinishStatus } from "./flowCompletionService-C376JZwA.js";
7
- import { o as FlowEventSubscribable } from "./index-CmFkidgy.js";
7
+ import { o as FlowEventSubscribable } from "./index-UH-vOq3x.js";
8
8
  import { i as WorkflowModuleRegistry, n as RunChildModuleEvent, r as RunChildModuleInput } from "./types-WKAQ7Ai4.js";
9
9
  import * as xstate811 from "xstate";
10
10
 
@@ -1,44 +1,44 @@
1
- import "./BaseWasmProvider-IiHnsP8E.esm.js";
1
+ import "./BaseWasmProvider-CVktpSfA.esm.js";
2
2
  import "./BrowserTimerProvider-BZGH3sYJ.esm.js";
3
3
  import { t as api } from "./api-eqRXuVG-.esm.js";
4
4
  import { o as createManagerInstrumentation } from "./events-Bt1azl2B.esm.js";
5
5
  import { t as endpoints } from "./endpoints-B3V1U9Dg.esm.js";
6
- import { n as getSessionFingerprintResult, r as initializeSession } from "./session-DAspZUCj.esm.js";
6
+ import { n as getSessionFingerprintResult, r as initializeSession } from "./session-BxtuBDwz.esm.js";
7
7
  import "./IpifyProvider-ByL6JYxg.esm.js";
8
8
  import "./browserSimulation-CAH-V_iE.esm.js";
9
9
  import { a as fromPromise, o as createActor, r as assign, s as createManager, t as setup } from "./xstate.esm-7GmmAwg6.esm.js";
10
10
  import { n as electronicSignatureMachine } from "./electronicSignatureManager-DYooXM8e.esm.js";
11
11
  import "./ae-signature-DsoDilvy.esm.js";
12
12
  import { t as antifraudMachine } from "./antifraudStateMachine-Dcg1T07S.esm.js";
13
- import "./recordingService-DMaVUhWY.esm.js";
14
- import "./deepsightService-IxmrmdKl.esm.js";
13
+ import "./faceCaptureSetup-D607PhdL.esm.js";
14
+ import "./ITimerCapability-3xSd36bT.esm.js";
15
15
  import "./camera-Bm3wb89Z.esm.js";
16
- import "./getBrowser-Y88tNVud.esm.js";
17
- import "./stats-Bqq9IKre.esm.js";
18
- import "./MotionSensorProvider-DJMsPght.esm.js";
19
- import "./permissionServices-ACBX6sNZ.esm.js";
20
- import "./platform-Dpzd9p3X.esm.js";
21
- import "./ITimerCapability-2pw-S97e.esm.js";
22
- import "./backCameraStream-DWZ1cNVA.esm.js";
23
- import "./getDeviceClass-DmoqR7G2.esm.js";
24
- import "./faceCaptureSetup-CUzqUwkP.esm.js";
25
- import { t as authenticationMachine } from "./authenticationStateMachine-BNs4VCxh.esm.js";
16
+ import "./deepsightService-Dv6kvzph.esm.js";
17
+ import "./recordingService-Dp-3nA-h.esm.js";
18
+ import "./platform-CDh4uv5Y.esm.js";
19
+ import "./backCameraStream-BKC7QXRJ.esm.js";
20
+ import "./getBrowser-Bl0PlyDu.esm.js";
21
+ import "./stats-qUsejORa.esm.js";
22
+ import "./getDeviceClass-C1ZS2XJL.esm.js";
23
+ import "./MotionSensorProvider-Dt_lF3Z8.esm.js";
24
+ import "./permissionServices-Cdxqlwqz.esm.js";
25
+ import { t as authenticationMachine } from "./authenticationStateMachine-B4FQ52zK.esm.js";
26
26
  import { t as consentMachine } from "./consentStateMachine-arnGM2iE.esm.js";
27
27
  import "./cpf-DTvbZfOI.esm.js";
28
28
  import { t as curpValidationMachine } from "./curpValidationStateMachine-B0Yhzej1.esm.js";
29
- import { t as documentCaptureMachine } from "./documentCaptureStateMachine-CuanhXvs.esm.js";
30
- import { t as ekybMachine } from "./ekybStateMachine-tZ1_L9vE.esm.js";
29
+ import { t as documentCaptureMachine } from "./documentCaptureStateMachine-CEm-9zrh.esm.js";
30
+ import { t as ekybMachine } from "./ekybStateMachine-DqzhMm0r.esm.js";
31
31
  import "./addressSearch-DayrVNF_.esm.js";
32
- import "./flowServices-CLo2qihS.esm.js";
32
+ import "./flowServices-BVVnH_Fn.esm.js";
33
33
  import { t as ekycMachine } from "./ekycStateMachine-6OaK23Ab.esm.js";
34
34
  import { t as emailMachine } from "./emailStateMachine-BW4tiYqt.esm.js";
35
- import { t as selfieMachine } from "./selfieStateMachine-DvOTE42w.esm.js";
36
- import { t as idCaptureMachine } from "./idCaptureStateMachine-BuX1-VlB.esm.js";
35
+ import { t as selfieMachine } from "./selfieStateMachine-D0rrAFIs.esm.js";
36
+ import { t as idCaptureMachine } from "./idCaptureStateMachine-g5cYnHGD.esm.js";
37
37
  import { t as phoneMachine } from "./phoneStateMachine-dDqWuk_Q.esm.js";
38
38
  import { t as faceMatchMachine } from "./faceMatchStateMachine-Fwkg2Q37.esm.js";
39
39
  import { n as attachFlowEventEmitter, t as runChildModule } from "./runChildModule-B16ocpd4.esm.js";
40
40
  import { t as getFinishStatus } from "./flowCompletionService-BuVIVPT_.esm.js";
41
- import { t as geolocationMachine } from "./geolocationStateMachine-15aagr2_.esm.js";
41
+ import { t as geolocationMachine } from "./geolocationStateMachine-BYWUPbNs.esm.js";
42
42
  import { t as governmentValidationMachine } from "./governmentValidationStateMachine-Bg4F9j-0.esm.js";
43
43
  import { t as idOcrStateMachine } from "./idOcrStateMachine-Dw4i2Yyo.esm.js";
44
44
  import { t as mandatoryConsentMachine } from "./mandatoryConsentStateMachine-D0CiwKkK.esm.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/core",
3
- "version": "0.0.0-dev-20260512-cffbe28",
3
+ "version": "0.0.0-dev-20260512-20def2c",
4
4
  "type": "module",
5
5
  "main": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",