@incodetech/core 0.0.0-dev-20260729-9461bce1 → 0.0.0-dev-20260729-e2dda0b0

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 (145) hide show
  1. package/dist/BrowserDiagnosticsCryptoProvider-BZqV7sJR.esm.js +96 -0
  2. package/dist/IBrowserEnvironmentCapability-DEaRRk-R.esm.js +9 -0
  3. package/dist/{WasmUtilProvider-BrWOTaVG.esm.js → WasmUtilProvider-D13sxEmA.esm.js} +2 -406
  4. package/dist/{addressSearch-oyJf4OZO.esm.js → addressSearch-D_0t2Wdn.esm.js} +2 -2
  5. package/dist/ae-signature.esm.js +1 -1
  6. package/dist/antifraud.esm.js +2 -2
  7. package/dist/{antifraudManager-CQ0zC0jZ.esm.js → antifraudManager-COYh4O_y.esm.js} +2 -2
  8. package/dist/{antifraudStateMachine-MfVOsgZf.esm.js → antifraudStateMachine-NuzlVVte.esm.js} +2 -2
  9. package/dist/api-Bx3gKW_y.esm.js +129 -0
  10. package/dist/{apiError-B-PkYxln.esm.js → apiError-GA6MbJpI.esm.js} +12 -1
  11. package/dist/authentication.esm.js +2 -2
  12. package/dist/{authenticationManager-G4OrneRc.esm.js → authenticationManager-B7v0Jy-x.esm.js} +5 -5
  13. package/dist/{authenticationStateMachine-CRaoYKLp.esm.js → authenticationStateMachine-DAh9ziFC.esm.js} +5 -5
  14. package/dist/camera.esm.js +1 -1
  15. package/dist/certificate-issuance.esm.js +2 -2
  16. package/dist/{certificateIssuanceStateMachine-BrbhvQ3k.esm.js → certificateIssuanceStateMachine-N__sTAgu.esm.js} +2 -2
  17. package/dist/consent.d.ts +1 -1
  18. package/dist/consent.esm.js +2 -2
  19. package/dist/{consentManager-DLOyIZzt.d.ts → consentManager-BhYFeKiG.d.ts} +9 -9
  20. package/dist/{consentManager-fOURtjzF.esm.js → consentManager-CWEAhAJ5.esm.js} +2 -2
  21. package/dist/{consentStateMachine-BCVxc6mI.esm.js → consentStateMachine-DWL-X0Jb.esm.js} +2 -2
  22. package/dist/cross-document-data-match.esm.js +1 -1
  23. package/dist/{crossDocumentDataMatchManager-DaJvZ8m1.esm.js → crossDocumentDataMatchManager-Bk4W2TDJ.esm.js} +3 -3
  24. package/dist/curp-validation.esm.js +2 -2
  25. package/dist/{curpValidationManager-CKRo8Mch.esm.js → curpValidationManager-B6gYKygj.esm.js} +2 -2
  26. package/dist/{curpValidationStateMachine-DMdmcv5-.esm.js → curpValidationStateMachine-42RbYcam.esm.js} +2 -2
  27. package/dist/custom-fields.esm.js +3 -3
  28. package/dist/custom-watchlist.esm.js +2 -2
  29. package/dist/{customWatchlistStateMachine-DB2I9_OR.esm.js → customWatchlistStateMachine-BbDtH5kk.esm.js} +2 -2
  30. package/dist/{deepsightLoader-AdX0vjwb.esm.js → deepsightLoader-CHG26pOB.esm.js} +14 -4
  31. package/dist/document-capture.d.ts +1 -1
  32. package/dist/document-capture.esm.js +2 -2
  33. package/dist/document-upload.d.ts +4 -4
  34. package/dist/document-upload.esm.js +3 -3
  35. package/dist/{documentCaptureManager-pEqMY_Oo.d.ts → documentCaptureManager-BK_4RbHt.d.ts} +69 -69
  36. package/dist/{documentCaptureManager-iTx0jqU4.esm.js → documentCaptureManager-FvcNYpkS.esm.js} +2 -2
  37. package/dist/{documentCaptureStateMachine-CrdQsDn2.esm.js → documentCaptureStateMachine-BlzN0-mU.esm.js} +4 -4
  38. package/dist/dynamic-forms.esm.js +2 -2
  39. package/dist/{dynamicFormsManager-BNIbGJmh.esm.js → dynamicFormsManager-CfJixpOW.esm.js} +2 -2
  40. package/dist/{dynamicFormsStateMachine-DKUOlqmi.esm.js → dynamicFormsStateMachine-DrPO1i45.esm.js} +3 -3
  41. package/dist/ekyb.esm.js +3 -3
  42. package/dist/{ekybManager-BUWJUews.esm.js → ekybManager-DVCqaSzz.esm.js} +2 -2
  43. package/dist/{ekybStateMachine-CYLZDKC7.esm.js → ekybStateMachine-C3y-Qx1a.esm.js} +4 -4
  44. package/dist/ekyc.esm.js +2 -2
  45. package/dist/{ekycManager-C6Wc4wRj.esm.js → ekycManager-dimNksoE.esm.js} +2 -2
  46. package/dist/{ekycStateMachine-fHXM6pc0.esm.js → ekycStateMachine-Yl3sQmhm.esm.js} +3 -3
  47. package/dist/electronic-signature.esm.js +1 -1
  48. package/dist/{electronicSignatureManager-hJ9YaAvD.esm.js → electronicSignatureManager-D0X7P-de.esm.js} +4 -4
  49. package/dist/email.esm.js +2 -2
  50. package/dist/{emailManager-B_Q6MfUq.esm.js → emailManager-BqJMritP.esm.js} +2 -2
  51. package/dist/{emailStateMachine-DHfDd8LI.esm.js → emailStateMachine-CLtrh2Ot.esm.js} +2 -2
  52. package/dist/{endpoints-BwKx4Gne.esm.js → endpoints-DOfmJylF.esm.js} +7 -1
  53. package/dist/{events-Dy8PyVO5.esm.js → events-CMFCCu1H.esm.js} +2 -9
  54. package/dist/events.esm.js +1 -1
  55. package/dist/extensibility.d.ts +5 -5
  56. package/dist/extensibility.esm.js +26 -32
  57. package/dist/face-match.esm.js +2 -2
  58. package/dist/{faceCaptureManagerFactory-Bkc1HLRL.esm.js → faceCaptureManagerFactory-D2pR3ZnX.esm.js} +3 -3
  59. package/dist/{faceCaptureSetup-BQEQriDi.esm.js → faceCaptureSetup-DbhDPMjb.esm.js} +5 -5
  60. package/dist/{faceMatchManager-Bh5wFMyh.esm.js → faceMatchManager-XxTEAj9C.esm.js} +2 -2
  61. package/dist/{faceMatchStateMachine-QIf8gak4.esm.js → faceMatchStateMachine-ubds4WlI.esm.js} +2 -2
  62. package/dist/field-comparison.esm.js +1 -1
  63. package/dist/{fieldComparisonManager-B_3cIH9t.esm.js → fieldComparisonManager-BzaX4TvX.esm.js} +3 -3
  64. package/dist/fiscal-qr.esm.js +3 -3
  65. package/dist/flow.esm.js +4 -4
  66. package/dist/{flowCompletionService-6yWz7xwZ.esm.js → flowCompletionService-BdZR6HyE.esm.js} +3 -3
  67. package/dist/{flowServices-Cf63iD-o.esm.js → flowServices-CPti9am-.esm.js} +5 -5
  68. package/dist/geolocation.esm.js +2 -2
  69. package/dist/{geolocationManager-gKopAolS.esm.js → geolocationManager-DW27-LTL.esm.js} +2 -2
  70. package/dist/{geolocationStateMachine-Cac3eKge.esm.js → geolocationStateMachine-Cz3Q6az0.esm.js} +3 -3
  71. package/dist/government-validation.esm.js +2 -2
  72. package/dist/{governmentValidationStateMachine-Be1ruaNj.esm.js → governmentValidationStateMachine-CtG3bIdM.esm.js} +2 -2
  73. package/dist/home.esm.js +1 -1
  74. package/dist/http.esm.js +1 -1
  75. package/dist/id-ocr.d.ts +1 -1
  76. package/dist/id-ocr.esm.js +2 -2
  77. package/dist/id-verification.esm.js +2 -2
  78. package/dist/id.esm.js +5 -5
  79. package/dist/{idCaptureDefaults-DCrjeNl5.esm.js → idCaptureDefaults-BDS43fFL.esm.js} +2 -2
  80. package/dist/{idCaptureManager-Dg8pxseH.esm.js → idCaptureManager-CPzgzVu8.esm.js} +4 -4
  81. package/dist/{idCaptureStateMachine-B2e_wX0x.esm.js → idCaptureStateMachine-CAKztWBq.esm.js} +28 -17
  82. package/dist/{idOcrManager-dLuxey6y.d.ts → idOcrManager-DXc_xRN7.d.ts} +1 -1
  83. package/dist/{idOcrManager-8WPK22Kq.esm.js → idOcrManager-Drs6frVO.esm.js} +2 -2
  84. package/dist/{idOcrStateMachine-Cfq5gJ0f.esm.js → idOcrStateMachine-s08FLvEh.esm.js} +3 -3
  85. package/dist/{idVerificationManager-DBVs8TRS.esm.js → idVerificationManager-Df97Bf0n.esm.js} +2 -2
  86. package/dist/{idVerificationStateMachine-xtTSJDrB.esm.js → idVerificationStateMachine-tAF7pvC8.esm.js} +2 -2
  87. package/dist/identity-reuse.d.ts +1 -1
  88. package/dist/identity-reuse.esm.js +2 -2
  89. package/dist/{identityReuseManager-B8jNZNHu.esm.js → identityReuseManager-0ZHGWr9T.esm.js} +2 -2
  90. package/dist/{identityReuseManager-D6pD4hcZ.d.ts → identityReuseManager-v2TH5g7e.d.ts} +1 -1
  91. package/dist/{identityReuseStateMachine-DdwSrghH.esm.js → identityReuseStateMachine-DG8kbKuy.esm.js} +2 -2
  92. package/dist/index.d.ts +1 -1
  93. package/dist/index.esm.js +1 -1
  94. package/dist/{invokeOnCaptureCallback-B-QfsCQY.esm.js → invokeOnCaptureCallback-Cgl54qED.esm.js} +1 -1
  95. package/dist/mandatory-consent.d.ts +1 -1
  96. package/dist/mandatory-consent.esm.js +2 -2
  97. package/dist/{mandatoryConsentManager-Dcgmj1Cd.d.ts → mandatoryConsentManager-CzsVFG33.d.ts} +5 -5
  98. package/dist/{mandatoryConsentManager-BAKnA7U_.esm.js → mandatoryConsentManager-DaKK7S4q.esm.js} +2 -2
  99. package/dist/{mandatoryConsentStateMachine-3a1psaoK.esm.js → mandatoryConsentStateMachine-CjKpOQXU.esm.js} +2 -2
  100. package/dist/{onDeviceFaceResults-DbSP6iTw.esm.js → onDeviceFaceResults-CVhk1BWp.esm.js} +13 -6
  101. package/dist/{permissionGuards-5Cu6a8iN.esm.js → permissionGuards-UMiLlPfq.esm.js} +1 -1
  102. package/dist/{permissionServices-CkHL1BjH.esm.js → permissionServices-C4qKxOl4.esm.js} +1 -1
  103. package/dist/personhood.esm.js +9 -22
  104. package/dist/phone.esm.js +2 -2
  105. package/dist/{phoneManager-dizEvG20.esm.js → phoneManager-WImoAp4i.esm.js} +2 -2
  106. package/dist/{phoneStateMachine-DxmYoLg8.esm.js → phoneStateMachine-FJ-_x1G4.esm.js} +2 -2
  107. package/dist/qe-signature.esm.js +1 -1
  108. package/dist/{recordingService-C8jFtEKZ.esm.js → recordingService-BGPq5vGr.esm.js} +3 -3
  109. package/dist/redirect-to-mobile.esm.js +2 -2
  110. package/dist/{redirectToMobileManager-BCInKNqp.esm.js → redirectToMobileManager-CxEu6KnV.esm.js} +2 -2
  111. package/dist/{redirectToMobileStateMachine-TSHtrr5D.esm.js → redirectToMobileStateMachine-jI5XPtZJ.esm.js} +2 -2
  112. package/dist/{runChildModule-Crz1nHwJ.esm.js → runChildModule-fagPe5Ct.esm.js} +6 -1
  113. package/dist/selfie.esm.js +9 -9
  114. package/dist/{selfieErrorUtils-1aFaxF3Q.esm.js → selfieErrorUtils-DCRRRj38.esm.js} +3 -3
  115. package/dist/{selfieManager-KbDEkivf.esm.js → selfieManager-DTiBsQNn.esm.js} +5 -5
  116. package/dist/{selfieStateMachine-BiuQiED3.esm.js → selfieStateMachine-CxabK5_3.esm.js} +3 -3
  117. package/dist/session-Ccob4IUP.esm.js +161 -0
  118. package/dist/session.d.ts +8 -1
  119. package/dist/session.esm.js +4 -152
  120. package/dist/{sessionInitializer-DyJ4nLFJ.esm.js → sessionInitializer-DEd0CQ74.esm.js} +27 -32
  121. package/dist/{setup-MlGXfrG8.esm.js → setup-BR4G3NHV.esm.js} +78 -11
  122. package/dist/{setup-B1WTXTQV.d.ts → setup-Dj8n_YLP.d.ts} +22 -0
  123. package/dist/signature.esm.js +2 -2
  124. package/dist/{signatureStateMachine-CCcFhvuv.esm.js → signatureStateMachine-Dx92l8pR.esm.js} +2 -2
  125. package/dist/{stats-CKtpeAhi.esm.js → stats-6sK3f5pc.esm.js} +2 -2
  126. package/dist/stats.esm.js +1 -1
  127. package/dist/trueSight-4L5GCqKy.esm.js +1 -0
  128. package/dist/trueSightService-DKC-gmQC.esm.js +1891 -0
  129. package/dist/trust-graph.esm.js +1 -1
  130. package/dist/video-selfie.esm.js +9 -9
  131. package/dist/wasm.d.ts +1 -1
  132. package/dist/wasm.esm.js +3 -3
  133. package/dist/{wasmDefaults-B4DUtYET.esm.js → wasmDefaults-DJiEvV7f.esm.js} +1 -1
  134. package/dist/wasmWebClient-DM8lkb0z.esm.js +407 -0
  135. package/dist/watchlist-for-business.esm.js +2 -2
  136. package/dist/watchlist.esm.js +2 -2
  137. package/dist/{watchlistForBusinessStateMachine-DZZNfYsA.esm.js → watchlistForBusinessStateMachine-Eo-WEYha.esm.js} +2 -2
  138. package/dist/{watchlistManager-CMFZ0aqP.esm.js → watchlistManager-DnVfNc1v.esm.js} +2 -2
  139. package/dist/{watchlistStateMachine-CmhlwIhk.esm.js → watchlistStateMachine-DZSOauwp.esm.js} +2 -2
  140. package/dist/workflow.d.ts +12 -4
  141. package/dist/workflow.esm.js +55 -40
  142. package/package.json +3 -3
  143. package/dist/api-BDTZNnca.esm.js +0 -71
  144. package/dist/clientLifecycle-BX83zwtT.esm.js +0 -528
  145. package/dist/session-CrAUqlgX.esm.js +0 -1
@@ -61,18 +61,18 @@ declare const mandatoryConsentMachine: StateMachine<MandatoryConsentContext, {
61
61
  type: "clearError";
62
62
  params: NonReducibleUnknown;
63
63
  };
64
- toggleSigned: {
65
- type: "toggleSigned";
66
- params: NonReducibleUnknown;
67
- };
68
64
  resetContext: {
69
65
  type: "resetContext";
70
66
  params: NonReducibleUnknown;
71
67
  };
68
+ toggleSigned: {
69
+ type: "toggleSigned";
70
+ params: NonReducibleUnknown;
71
+ };
72
72
  }>, {
73
73
  type: "canSubmit";
74
74
  params: unknown;
75
- }, never, "error" | "idle" | "closed" | "finished" | "loading" | "submitting" | "display", string, MandatoryConsentInput, NonReducibleUnknown, EventObject, MetaObject, {
75
+ }, never, "error" | "idle" | "closed" | "finished" | "submitting" | "loading" | "display", string, MandatoryConsentInput, NonReducibleUnknown, EventObject, MetaObject, {
76
76
  readonly id: "mandatoryConsent";
77
77
  readonly initial: "idle";
78
78
  readonly context: ({ input }: {
@@ -1,6 +1,6 @@
1
- import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dy8PyVO5.esm.js";
1
+ import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CMFCCu1H.esm.js";
2
2
  import { c as createManager, o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
3
- import { t as mandatoryConsentMachine } from "./mandatoryConsentStateMachine-3a1psaoK.esm.js";
3
+ import { t as mandatoryConsentMachine } from "./mandatoryConsentStateMachine-CjKpOQXU.esm.js";
4
4
  //#region src/modules/mandatory-consent/mandatoryConsentActor.ts
5
5
  function createMandatoryConsentActor(options) {
6
6
  return createActor(mandatoryConsentMachine, { input: { config: options.config } }).start();
@@ -1,5 +1,5 @@
1
- import { t as api } from "./api-BDTZNnca.esm.js";
2
- import { t as endpoints } from "./endpoints-BwKx4Gne.esm.js";
1
+ import { t as api } from "./api-Bx3gKW_y.esm.js";
2
+ import { t as endpoints } from "./endpoints-DOfmJylF.esm.js";
3
3
  import { r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
4
4
  import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
5
5
  //#region src/modules/mandatory-consent/mandatoryConsentServices.ts
@@ -1,7 +1,9 @@
1
- import { n as BaseWasmProvider, o as mlWasmJSApi_default } from "./WasmUtilProvider-BrWOTaVG.esm.js";
2
- import { r as getToken, t as api } from "./api-BDTZNnca.esm.js";
3
- import { t as endpoints } from "./endpoints-BwKx4Gne.esm.js";
4
- import { t as addDeviceStats } from "./stats-CKtpeAhi.esm.js";
1
+ import { n as BaseWasmProvider, o as mlWasmJSApi_default } from "./WasmUtilProvider-D13sxEmA.esm.js";
2
+ import { r as getToken, t as api } from "./api-Bx3gKW_y.esm.js";
3
+ import { c as trueSightHintTransition, l as trueSightLog, r as noteTrueSightCaptureActivity } from "./trueSightService-DKC-gmQC.esm.js";
4
+ import { t as endpoints } from "./endpoints-DOfmJylF.esm.js";
5
+ import "./trueSight-4L5GCqKy.esm.js";
6
+ import { t as addDeviceStats } from "./stats-6sK3f5pc.esm.js";
5
7
  import { a as isIPhone14OrHigher, n as isDesktop } from "./platform-Cd_yWGNG.esm.js";
6
8
  import { a as stopCameraStream, r as requestCameraAccess } from "./camera-BmFEyPP_.esm.js";
7
9
  import { t as sleep } from "./ITimerCapability-DgdDzp8G.esm.js";
@@ -401,10 +403,12 @@ function startDetection(params) {
401
403
  if (session?.isDisposed() === true) return;
402
404
  if (lastStatus === status) return;
403
405
  lastStatus = status;
406
+ trueSightHintTransition("module.face-capture", "faceScan", status);
404
407
  params.onUpdate(status);
405
408
  };
406
409
  const stopDetectionLoop = () => {
407
410
  session?.dispose();
411
+ noteTrueSightCaptureActivity(false);
408
412
  };
409
413
  const reset = () => {
410
414
  provider.reset();
@@ -457,6 +461,7 @@ function startDetection(params) {
457
461
  provider,
458
462
  onFrame: params.onFrame
459
463
  });
464
+ noteTrueSightCaptureActivity(true);
460
465
  } catch {
461
466
  setStatus("error");
462
467
  cleanup();
@@ -516,7 +521,7 @@ async function stopRecording(session) {
516
521
  }
517
522
  }
518
523
  async function initializeDeepsightSession(options) {
519
- const { loadDeepsightSession } = await import("./deepsightLoader-AdX0vjwb.esm.js");
524
+ const { loadDeepsightSession } = await import("./deepsightLoader-CHG26pOB.esm.js");
520
525
  return loadDeepsightSession({
521
526
  ds: options.ds,
522
527
  storage: options.storage
@@ -561,7 +566,9 @@ async function defaultPrepareFaceUpload(ctx) {
561
566
  const recordingId = (await ctx.recordingService?.stop())?.recordingId ?? null;
562
567
  try {
563
568
  if (ctx.deepsightService) await Promise.all([ctx.deepsightService.performVirtualCameraCheck(sessionToken, "SELFIE"), ctx.deepsightService.analyzeFrame(ctx.capturedImage.getImageData())]);
564
- } catch (error) {}
569
+ } catch (error) {
570
+ trueSightLog("warning", "deepsight", "faceScan", `deepsight selfie analysis failed error=${String(error)}`);
571
+ }
565
572
  const logs = ctx.deepsightService?.getPipelineState() ?? "";
566
573
  ctx.dependencies.trackCaptureAttemptFinished?.({ logs });
567
574
  return {
@@ -1,4 +1,4 @@
1
- import { a as isWasmMotionPrimedForModule } from "./permissionServices-CkHL1BjH.esm.js";
1
+ import { a as isWasmMotionPrimedForModule } from "./permissionServices-C4qKxOl4.esm.js";
2
2
  //#region src/internal/permissions/permissionGuards.ts
3
3
  function resolveStoredPermissionResult(fromEvent, fromContext) {
4
4
  if (fromEvent === "granted" || fromEvent === "denied" || fromEvent === "prompt" || fromEvent === "refresh") return fromEvent;
@@ -1,4 +1,4 @@
1
- import { t as WasmUtilProvider } from "./WasmUtilProvider-BrWOTaVG.esm.js";
1
+ import { t as WasmUtilProvider } from "./WasmUtilProvider-D13sxEmA.esm.js";
2
2
  import { t as MotionSensorProvider } from "./MotionSensorProvider-DYvM90IX.esm.js";
3
3
  import { a as stopCameraStream, r as requestCameraAccess } from "./camera-BmFEyPP_.esm.js";
4
4
  //#region ../infra/src/media/cameraPermissionSession.ts
@@ -1,31 +1,18 @@
1
- import { t as WasmUtilProvider } from "./WasmUtilProvider-BrWOTaVG.esm.js";
1
+ import { t as WasmUtilProvider } from "./WasmUtilProvider-D13sxEmA.esm.js";
2
+ import { t as BrowserStorageProvider } from "./BrowserStorageProvider-P6aUarE9.esm.js";
2
3
  import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
3
- import { t as api } from "./api-BDTZNnca.esm.js";
4
- import { a as createApi$1, t as getStoredHttpConfig } from "./clientLifecycle-BX83zwtT.esm.js";
5
- import { n as eventModuleNames } from "./events-Dy8PyVO5.esm.js";
6
- import { t as endpoints } from "./endpoints-BwKx4Gne.esm.js";
7
- import { _ as getDeviceFingerprintInfo, g as getThumbmarkId, n as getFingerprintEnabled, p as isBrowserSimulation, v as BrowserEnvironmentProvider } from "./sessionInitializer-DyJ4nLFJ.esm.js";
4
+ import { t as api } from "./api-Bx3gKW_y.esm.js";
5
+ import { b as getStoredHttpConfig, w as createApi$1, y as randomUUID } from "./trueSightService-DKC-gmQC.esm.js";
6
+ import { n as eventModuleNames } from "./events-CMFCCu1H.esm.js";
7
+ import { _ as getDeviceFingerprintInfo, g as getThumbmarkId, n as getFingerprintEnabled, p as isBrowserSimulation, v as BrowserEnvironmentProvider } from "./sessionInitializer-DEd0CQ74.esm.js";
8
+ import { t as endpoints } from "./endpoints-DOfmJylF.esm.js";
8
9
  import { c as createManager, o as createActor, r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
9
10
  import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-CtI5S0f4.esm.js";
10
- import { i as requestPermission, t as checkPermission } from "./permissionServices-CkHL1BjH.esm.js";
11
+ import { i as requestPermission, t as checkPermission } from "./permissionServices-C4qKxOl4.esm.js";
11
12
  import { a as stopCameraStream, r as requestCameraAccess } from "./camera-BmFEyPP_.esm.js";
12
- import { t as BrowserStorageProvider } from "./BrowserStorageProvider-P6aUarE9.esm.js";
13
- import { f as stopStream, l as startDetection, s as initializeDeepsightSession, v as FaceDetectionProvider } from "./onDeviceFaceResults-DbSP6iTw.esm.js";
13
+ import { f as stopStream, l as startDetection, s as initializeDeepsightSession, v as FaceDetectionProvider } from "./onDeviceFaceResults-CVhk1BWp.esm.js";
14
14
  import { t as sleep } from "./ITimerCapability-DgdDzp8G.esm.js";
15
15
  import { t as StreamCanvasCapture } from "./StreamCanvasCapture-D2XcXCZ4.esm.js";
16
- //#region ../infra/src/crypto/randomUUID.ts
17
- /**
18
- * Cryptographically-strong UUID v4 (RFC 4122).
19
- *
20
- * Lives in infra (L0) so Core (L1) can mint secure identifiers without touching
21
- * the `crypto` browser API directly — Core delegates here, keeping it free of
22
- * browser globals (enforced by the `no-browser-api-in-core` lint rule). Backed
23
- * by `crypto.randomUUID`, available in every browser the SDK targets.
24
- */
25
- function randomUUID() {
26
- return crypto.randomUUID();
27
- }
28
- //#endregion
29
16
  //#region src/modules/personhood/personhoodServices.ts
30
17
  /**
31
18
  * Config used for the passive liveness pass. Deliberately stripped down from
package/dist/phone.esm.js CHANGED
@@ -1,3 +1,3 @@
1
- import { t as phoneMachine } from "./phoneStateMachine-DxmYoLg8.esm.js";
2
- import { t as createPhoneManager } from "./phoneManager-dizEvG20.esm.js";
1
+ import { t as phoneMachine } from "./phoneStateMachine-FJ-_x1G4.esm.js";
2
+ import { t as createPhoneManager } from "./phoneManager-WImoAp4i.esm.js";
3
3
  export { createPhoneManager, phoneMachine };
@@ -1,6 +1,6 @@
1
- import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dy8PyVO5.esm.js";
1
+ import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CMFCCu1H.esm.js";
2
2
  import { c as createManager, o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
3
- import { t as phoneMachine } from "./phoneStateMachine-DxmYoLg8.esm.js";
3
+ import { t as phoneMachine } from "./phoneStateMachine-FJ-_x1G4.esm.js";
4
4
  //#region src/modules/phone/phoneActor.ts
5
5
  function createPhoneActor(options) {
6
6
  return createActor(phoneMachine, { input: { config: options.config } }).start();
@@ -1,6 +1,6 @@
1
1
  import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
2
- import { t as api } from "./api-BDTZNnca.esm.js";
3
- import { t as endpoints } from "./endpoints-BwKx4Gne.esm.js";
2
+ import { t as api } from "./api-Bx3gKW_y.esm.js";
3
+ import { t as endpoints } from "./endpoints-DOfmJylF.esm.js";
4
4
  import { r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
5
5
  import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-CtI5S0f4.esm.js";
6
6
  import { n as isOtpComplete, t as computeOtpValidationErrors } from "./otp-D2k3PeSL.esm.js";
@@ -1,4 +1,4 @@
1
- import { a as areAllConsented, i as QE_CONSENT_KEYS, n as electronicSignatureMachine, s as getDefaultConsentChecks, t as createElectronicSignatureManager } from "./electronicSignatureManager-hJ9YaAvD.esm.js";
1
+ import { a as areAllConsented, i as QE_CONSENT_KEYS, n as electronicSignatureMachine, s as getDefaultConsentChecks, t as createElectronicSignatureManager } from "./electronicSignatureManager-D0X7P-de.esm.js";
2
2
  //#region src/modules/qe-signature/index.ts
3
3
  function createQeSignatureManager(options) {
4
4
  return createElectronicSignatureManager({ config: {
@@ -1,7 +1,7 @@
1
- import { t as api } from "./api-BDTZNnca.esm.js";
2
- import { t as endpoints } from "./endpoints-BwKx4Gne.esm.js";
1
+ import { t as api } from "./api-Bx3gKW_y.esm.js";
2
+ import { t as endpoints } from "./endpoints-DOfmJylF.esm.js";
3
3
  import { t as isAndroid } from "./platform-Cd_yWGNG.esm.js";
4
- import { d as stopRecording, g as uploadDeepsightVideo, u as startRecordingSession } from "./onDeviceFaceResults-DbSP6iTw.esm.js";
4
+ import { d as stopRecording, g as uploadDeepsightVideo, u as startRecordingSession } from "./onDeviceFaceResults-CVhk1BWp.esm.js";
5
5
  import { t as getAdaptiveMediaRecorderOptions } from "./mediaRecorderOptions-CUsftWlH.esm.js";
6
6
  //#region src/internal/manualReview/manualReviewService.ts
7
7
  async function flagFaceManualReview() {
@@ -1,3 +1,3 @@
1
- import { n as redirectToMobileMachine, r as defaultRedirectToMobileServices } from "./redirectToMobileStateMachine-TSHtrr5D.esm.js";
2
- import { n as createRedirectToMobileManagerFromActor, t as createRedirectToMobileManager } from "./redirectToMobileManager-BCInKNqp.esm.js";
1
+ import { n as redirectToMobileMachine, r as defaultRedirectToMobileServices } from "./redirectToMobileStateMachine-jI5XPtZJ.esm.js";
2
+ import { n as createRedirectToMobileManagerFromActor, t as createRedirectToMobileManager } from "./redirectToMobileManager-CxEu6KnV.esm.js";
3
3
  export { createRedirectToMobileManager, createRedirectToMobileManagerFromActor, defaultRedirectToMobileServices, redirectToMobileMachine };
@@ -1,8 +1,8 @@
1
1
  import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
2
- import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dy8PyVO5.esm.js";
2
+ import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CMFCCu1H.esm.js";
3
3
  import { c as createManager, o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
4
4
  import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-CtI5S0f4.esm.js";
5
- import { n as redirectToMobileMachine, r as defaultRedirectToMobileServices, t as canResendSmsFromContext } from "./redirectToMobileStateMachine-TSHtrr5D.esm.js";
5
+ import { n as redirectToMobileMachine, r as defaultRedirectToMobileServices, t as canResendSmsFromContext } from "./redirectToMobileStateMachine-jI5XPtZJ.esm.js";
6
6
  //#region src/modules/redirect-to-mobile/redirectToMobileActor.ts
7
7
  const POLL_INTERVAL_MS = 5e3;
8
8
  const QR_REFRESH_INTERVAL_MS = 5e3;
@@ -1,6 +1,6 @@
1
1
  import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
2
- import { t as api } from "./api-BDTZNnca.esm.js";
3
- import { t as endpoints } from "./endpoints-BwKx4Gne.esm.js";
2
+ import { t as api } from "./api-Bx3gKW_y.esm.js";
3
+ import { t as endpoints } from "./endpoints-DOfmJylF.esm.js";
4
4
  import { r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
5
5
  import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-CtI5S0f4.esm.js";
6
6
  import { n as getUrlSearchParam, t as buildUrlWithSearchParams } from "./urlUtils-D6phjq1-.esm.js";
@@ -1,4 +1,6 @@
1
- import { b as getTimestamp, y as createEventBus } from "./events-Dy8PyVO5.esm.js";
1
+ import { t as getTimestamp } from "./IBrowserEnvironmentCapability-DEaRRk-R.esm.js";
2
+ import { a as notifyTrueSightManagerStopped, i as notifyTrueSightFlowEvent } from "./trueSightService-DKC-gmQC.esm.js";
3
+ import { y as createEventBus } from "./events-CMFCCu1H.esm.js";
2
4
  import { o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
3
5
  import { t as fromCallback } from "./xstate-actors.esm-CtI5S0f4.esm.js";
4
6
  import { t as FACE_ERROR_CODES } from "./types-BN5RPPIZ.esm.js";
@@ -61,6 +63,8 @@ function getActiveModule(state, includeHomeModule) {
61
63
  }
62
64
  function attachFlowEventEmitter(manager, options = {}) {
63
65
  const flowEventBus = createFlowEventBus();
66
+ const managerKind = options.managerKind ?? "flow";
67
+ flowEventBus.subscribe((event) => notifyTrueSightFlowEvent(event, managerKind));
64
68
  let hasStartedCurrentRun = false;
65
69
  let hasReadyCurrentRun = false;
66
70
  let hasCompletedCurrentRun = false;
@@ -183,6 +187,7 @@ function attachFlowEventEmitter(manager, options = {}) {
183
187
  value() {
184
188
  if (isStopped) return;
185
189
  isStopped = true;
190
+ notifyTrueSightManagerStopped(managerKind);
186
191
  unsubscribe();
187
192
  stop();
188
193
  },
@@ -1,14 +1,14 @@
1
- import { t as WasmUtilProvider } from "./WasmUtilProvider-BrWOTaVG.esm.js";
2
- import { n as eventModuleNames } from "./events-Dy8PyVO5.esm.js";
1
+ import { t as WasmUtilProvider } from "./WasmUtilProvider-D13sxEmA.esm.js";
2
+ import { t as BrowserStorageProvider } from "./BrowserStorageProvider-P6aUarE9.esm.js";
3
+ import { n as eventModuleNames } from "./events-CMFCCu1H.esm.js";
3
4
  import { o as createActor, r as assign } from "./xstate.esm-Cf4e0Cfd.esm.js";
4
5
  import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
5
- import { t as faceCaptureMachine } from "./faceCaptureSetup-BQEQriDi.esm.js";
6
- import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-Bkc1HLRL.esm.js";
7
- import { t as BrowserStorageProvider } from "./BrowserStorageProvider-P6aUarE9.esm.js";
8
- import { r as processFace } from "./selfieErrorUtils-1aFaxF3Q.esm.js";
9
- import { t as selfieMachine } from "./selfieStateMachine-BiuQiED3.esm.js";
10
- import { n as createSelfieManagerFromActor, t as createSelfieManager } from "./selfieManager-KbDEkivf.esm.js";
11
- import { t as invokeOnCaptureCallback } from "./invokeOnCaptureCallback-B-QfsCQY.esm.js";
6
+ import { t as faceCaptureMachine } from "./faceCaptureSetup-DbhDPMjb.esm.js";
7
+ import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-D2pR3ZnX.esm.js";
8
+ import { r as processFace } from "./selfieErrorUtils-DCRRRj38.esm.js";
9
+ import { t as selfieMachine } from "./selfieStateMachine-CxabK5_3.esm.js";
10
+ import { n as createSelfieManagerFromActor, t as createSelfieManager } from "./selfieManager-DTiBsQNn.esm.js";
11
+ import { t as invokeOnCaptureCallback } from "./invokeOnCaptureCallback-Cgl54qED.esm.js";
12
12
  //#region src/modules/selfie/selfieCaptureOnlyStateMachine.ts
13
13
  /**
14
14
  * Performs local finalization of a captured face frame: stops local video
@@ -1,6 +1,6 @@
1
- import { t as api } from "./api-BDTZNnca.esm.js";
2
- import { t as endpoints } from "./endpoints-BwKx4Gne.esm.js";
3
- import { t as addDeviceStats } from "./stats-CKtpeAhi.esm.js";
1
+ import { t as api } from "./api-Bx3gKW_y.esm.js";
2
+ import { t as endpoints } from "./endpoints-DOfmJylF.esm.js";
3
+ import { t as addDeviceStats } from "./stats-6sK3f5pc.esm.js";
4
4
  import { t as getDeviceClass } from "./getDeviceClass-BGmoQmjj.esm.js";
5
5
  import { t as FACE_ERROR_CODES } from "./types-BN5RPPIZ.esm.js";
6
6
  //#region src/modules/selfie/selfieUploadService.ts
@@ -1,9 +1,9 @@
1
- import { t as WasmUtilProvider } from "./WasmUtilProvider-BrWOTaVG.esm.js";
2
- import { n as eventModuleNames } from "./events-Dy8PyVO5.esm.js";
3
- import { o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
4
- import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-Bkc1HLRL.esm.js";
1
+ import { t as WasmUtilProvider } from "./WasmUtilProvider-D13sxEmA.esm.js";
5
2
  import { t as BrowserStorageProvider } from "./BrowserStorageProvider-P6aUarE9.esm.js";
6
- import { t as selfieMachine } from "./selfieStateMachine-BiuQiED3.esm.js";
3
+ import { n as eventModuleNames } from "./events-CMFCCu1H.esm.js";
4
+ import { o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
5
+ import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-D2pR3ZnX.esm.js";
6
+ import { t as selfieMachine } from "./selfieStateMachine-CxabK5_3.esm.js";
7
7
  //#region src/modules/selfie/selfieActor.ts
8
8
  function createSelfieActor(options) {
9
9
  const dependencies = options.dependencies ?? {
@@ -1,9 +1,9 @@
1
1
  import { r as assign } from "./xstate.esm-Cf4e0Cfd.esm.js";
2
2
  import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
3
- import { t as faceCaptureMachine } from "./faceCaptureSetup-BQEQriDi.esm.js";
4
- import { i as prepareOnDeviceFaceUpload, n as isOnDeviceMode, r as postOnDeviceFaceResults, t as defaultPrepareFaceUpload } from "./onDeviceFaceResults-DbSP6iTw.esm.js";
3
+ import { t as faceCaptureMachine } from "./faceCaptureSetup-DbhDPMjb.esm.js";
4
+ import { i as prepareOnDeviceFaceUpload, n as isOnDeviceMode, r as postOnDeviceFaceResults, t as defaultPrepareFaceUpload } from "./onDeviceFaceResults-CVhk1BWp.esm.js";
5
5
  import { t as FACE_ERROR_CODES } from "./types-BN5RPPIZ.esm.js";
6
- import { i as uploadSelfie, n as validateUploadResponse, r as processFace } from "./selfieErrorUtils-1aFaxF3Q.esm.js";
6
+ import { i as uploadSelfie, n as validateUploadResponse, r as processFace } from "./selfieErrorUtils-DCRRRj38.esm.js";
7
7
  /**
8
8
  * The selfie capture state machine.
9
9
  *
@@ -0,0 +1,161 @@
1
+ import { n as getApi } from "./api-Bx3gKW_y.esm.js";
2
+ import { h as noteSessionCreated, l as trueSightLog } from "./trueSightService-DKC-gmQC.esm.js";
3
+ import "./sessionInitializer-DEd0CQ74.esm.js";
4
+ import { t as endpoints } from "./endpoints-DOfmJylF.esm.js";
5
+ import "./trueSight-4L5GCqKy.esm.js";
6
+ import { r as toIncodeApiError } from "./apiError-GA6MbJpI.esm.js";
7
+ //#region src/internal/session/sessionService.ts
8
+ /**
9
+ * HTTP status codes the QR validation endpoint emits, keyed by their semantic
10
+ * name. Hosts switch on these to render distinct messaging — `invalidQRuuid`
11
+ * for an unknown/expired link, `onboardingUrlAlreadyUsed` for a one-time link
12
+ * that has already been consumed.
13
+ */
14
+ const QR_VALIDATION_ERROR_CODES = {
15
+ expiredUUID: 4026,
16
+ invalidQRuuid: 4081,
17
+ onboardingUrlAlreadyUsed: 4083
18
+ };
19
+ var QrValidationError = class extends Error {
20
+ constructor(status, statusText) {
21
+ super(`POST ${endpoints.qrValidateUuid} failed: ${status} ${statusText}`);
22
+ this.name = "QrValidationError";
23
+ this.status = status;
24
+ this.statusText = statusText;
25
+ }
26
+ };
27
+ /**
28
+ * Creates a new onboarding session.
29
+ *
30
+ * @param apiKey - The API key from the Incode dashboard
31
+ * @param options - Session creation options
32
+ * @param signal - Optional AbortSignal for request cancellation
33
+ * @returns The created session with token
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * const session = await createSession('your-api-key', {
38
+ * configurationId: 'your-flow-id',
39
+ * language: 'en-US',
40
+ * });
41
+ * console.log(session.token); // Use this token for subsequent API calls
42
+ * ```
43
+ */
44
+ async function createSession(apiKey, options, signal) {
45
+ try {
46
+ const session = (await getApi().post(endpoints.createSession, {
47
+ configurationId: options.configurationId,
48
+ externalId: options.externalId,
49
+ externalCustomerId: options.externalCustomerId,
50
+ language: options.language ?? "en-US",
51
+ customFields: options.customFields,
52
+ uuid: options.uuid ?? null,
53
+ urlUuid: options.urlUuid ?? null,
54
+ interviewId: options.interviewId ?? null,
55
+ ...options.loginHint != null && options.loginHint !== "" ? { loginHint: options.loginHint } : {}
56
+ }, {
57
+ headers: {
58
+ "x-api-key": apiKey,
59
+ "api-version": "1.0"
60
+ },
61
+ signal
62
+ })).data;
63
+ noteSessionCreated(session, {
64
+ configurationId: options.configurationId,
65
+ externalCustomerId: options.externalCustomerId,
66
+ interviewId: options.interviewId,
67
+ language: options.language
68
+ });
69
+ trueSightLog("info", "session", "orchestration", "session created");
70
+ return session;
71
+ } catch (error) {
72
+ toIncodeApiError(endpoints.createSession, error);
73
+ }
74
+ }
75
+ /**
76
+ * Validates and rotates a QR anti-phishing URL UUID before creating a session.
77
+ *
78
+ * This call is unauthenticated; the `{ onboardingId, urlUuid }` pair itself
79
+ * acts as the credential. The server burns the incoming `urlUuid` and returns
80
+ * a freshly minted one that must be used in the subsequent `createSession`
81
+ * call.
82
+ *
83
+ * @param options - `{ onboardingId, urlUuid }` from the incoming URL
84
+ * @param signal - Optional AbortSignal for request cancellation
85
+ * @returns The refreshed `urlUuid` to use for the session
86
+ * @throws {QrValidationError} When the server rejects the validation request.
87
+ */
88
+ async function validateQrUuid(options, signal) {
89
+ try {
90
+ return (await getApi().post(endpoints.qrValidateUuid, {
91
+ onboardingId: options.onboardingId,
92
+ urlUuid: options.urlUuid
93
+ }, {
94
+ headers: { "api-version": "1.0" },
95
+ signal
96
+ })).data;
97
+ } catch (error) {
98
+ const httpError = error;
99
+ throw new QrValidationError(httpError.data?.status ?? httpError.status, httpError.statusText);
100
+ }
101
+ }
102
+ /**
103
+ * One-shot QR phishing-resistance helper.
104
+ *
105
+ * When `urlUuid` is a non-empty string, burns the stale value via
106
+ * `validateQrUuid`, invokes `onRefreshed` with the fresh value, and returns
107
+ * it so callers can forward it into `createSession`. When `urlUuid` is
108
+ * absent, returns `undefined` without making any network call.
109
+ *
110
+ * Consolidates the rotation + callback logic shared by Flow self-loading and
111
+ * Workflow token-mode bootstraps.
112
+ *
113
+ * @throws {QrValidationError} When the server rejects the validation request.
114
+ */
115
+ async function refreshQrUrlUuid(options, signal) {
116
+ if (typeof options.urlUuid !== "string" || options.urlUuid.length === 0) return;
117
+ const result = await validateQrUuid({
118
+ onboardingId: options.onboardingId ?? null,
119
+ urlUuid: options.urlUuid
120
+ }, signal);
121
+ options.onRefreshed?.(result.urlUuid);
122
+ return result.urlUuid;
123
+ }
124
+ /**
125
+ * Validates and rotates a QR anti-phishing `urlUuid` (when present), then
126
+ * creates a session bound to the refreshed value. When `urlUuid` is absent,
127
+ * behaves identically to {@link createSession}.
128
+ *
129
+ * Use this when the host owns session creation and wants the SDK to handle
130
+ * phishing-resistance rotation in a single call. For raw control, compose
131
+ * `refreshQrUrlUuid` and `createSession` directly.
132
+ *
133
+ * @throws {QrValidationError} When the server rejects the QR validation step.
134
+ *
135
+ * @example
136
+ * ```ts
137
+ * const session = await bootstrapSession(apiKey, {
138
+ * configurationId,
139
+ * urlUuid,
140
+ * onUrlUuidRefreshed: (refreshed) => {
141
+ * const url = new URL(window.location.href);
142
+ * url.searchParams.set('url_uuid', refreshed);
143
+ * window.history.replaceState({}, '', url);
144
+ * },
145
+ * });
146
+ * ```
147
+ */
148
+ async function bootstrapSession(apiKey, options, signal) {
149
+ const { onUrlUuidRefreshed, ...createSessionOptions } = options;
150
+ const refreshedUrlUuid = await refreshQrUrlUuid({
151
+ urlUuid: options.urlUuid,
152
+ onboardingId: options.uuid ?? null,
153
+ onRefreshed: onUrlUuidRefreshed
154
+ }, signal);
155
+ return createSession(apiKey, {
156
+ ...createSessionOptions,
157
+ urlUuid: refreshedUrlUuid
158
+ }, signal);
159
+ }
160
+ //#endregion
161
+ export { refreshQrUrlUuid as a, createSession as i, QrValidationError as n, validateQrUuid as o, bootstrapSession as r, QR_VALIDATION_ERROR_CODES as t };
package/dist/session.d.ts CHANGED
@@ -177,7 +177,14 @@ declare class IncodeApiError extends Error {
177
177
  }
178
178
  //#endregion
179
179
  //#region src/internal/featureConfig/types.d.ts
180
- type FeatureName = 'VIDEO_SELFIE_V2' | 'USE_CLIENT_GLARE' | 'USE_OPEN_VIDU' | 'DISABLE_IPIFY';
180
+ type FeatureName = 'VIDEO_SELFIE_V2' | 'USE_CLIENT_GLARE' | 'USE_OPEN_VIDU' | 'DISABLE_IPIFY' |
181
+ /**
182
+ * TrueSight diagnostics remote kill-switch (ENG-48677). Only an explicit
183
+ * `enabled: false` entry disables uploads — `true`, absent, or an
184
+ * unresolvable config all proceed (fail-open; the proxy's
185
+ * `truesight.api.enabled` is the environment authority).
186
+ */
187
+ 'TRUESIGHT_DIAGNOSTICS';
181
188
  type FeatureConfig = {
182
189
  enabled: boolean;
183
190
  feature: FeatureName;