@incodetech/core 2.4.1-agentic.1 → 2.4.1-agentic.10

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 (220) hide show
  1. package/dist/{BaseWasmProvider-Bq3OHo7P.d.ts → BaseWasmProvider-bBNquvYn.d.ts} +2 -2
  2. package/dist/DateFormattingProvider-DPq9zco-.esm.js +25 -0
  3. package/dist/{FaceDetectionProvider-CAY43vSI.esm.js → FaceDetectionProvider-BSLpXAGx.esm.js} +9 -9
  4. package/dist/{IIdCaptureCapability-CGcEt2Cw.d.ts → IIdCaptureCapability-C-5M8pP1.d.ts} +2 -2
  5. package/dist/{IWasmUtilCapability-Cqiaxydi.d.ts → IWasmUtilCapability-BRn0wz8v.d.ts} +2 -2
  6. package/dist/{MultipartRecordingProvider-D9mauUdS.esm.js → MultipartRecordingProvider-BfQPSgSO.esm.js} +5 -0
  7. package/dist/{StreamCanvasCapture-C3xNfOsv.d.ts → StreamCanvasCapture-ixfy84ys.d.ts} +2 -2
  8. package/dist/{WasmUtilProvider-Dp2V-Uct.esm.js → WasmUtilProvider-C_puwvVn.esm.js} +2 -2
  9. package/dist/{WorkerEncoderRecordingProvider-B1ODYtgN.esm.js → WorkerEncoderRecordingProvider-CyCrQnZR.esm.js} +1 -1
  10. package/dist/addressSearch-B_4JYKa-.esm.js +72 -0
  11. package/dist/ae-signature.esm.js +1 -1
  12. package/dist/antifraud.esm.js +2 -2
  13. package/dist/{antifraudManager-BObuHBjn.esm.js → antifraudManager-BWCVkSu2.esm.js} +2 -2
  14. package/dist/{antifraudStateMachine-Dfrd2-26.esm.js → antifraudStateMachine-CX9I2f3s.esm.js} +1 -1
  15. package/dist/{api-CpP4PS4S.esm.js → api-BSnbg4HO.esm.js} +2 -0
  16. package/dist/{apiError-DH-CH4Nz.esm.js → apiError-Bmwy1Fa7.esm.js} +1 -1
  17. package/dist/{attemptCarry-WOkfvFMw.esm.js → attemptCarry-zQH85Elh.esm.js} +1 -1
  18. package/dist/authentication.d.ts +3 -3
  19. package/dist/authentication.esm.js +2 -2
  20. package/dist/{authenticationManager-DjX0XDyH.esm.js → authenticationManager-BoiOaB0m.esm.js} +5 -5
  21. package/dist/{authenticationManager-CWmh7aSY.d.ts → authenticationManager-CISxaY6N.d.ts} +1 -1
  22. package/dist/{authenticationStateMachine-BMbZL8wm.esm.js → authenticationStateMachine-BMD1JLwr.esm.js} +3 -3
  23. package/dist/avatar.d.ts +1 -1
  24. package/dist/{browser-pQZA35G2-DtkAf6sn.esm.js → browser-pQZA35G2-PIj2uGBm.esm.js} +1 -1
  25. package/dist/camera.esm.js +1 -1
  26. package/dist/certificate-issuance.esm.js +2 -2
  27. package/dist/{certificateIssuanceManager-C1nETQos.esm.js → certificateIssuanceManager-DzDuQTsK.esm.js} +2 -2
  28. package/dist/{certificateIssuanceStateMachine-DThXMDqr.esm.js → certificateIssuanceStateMachine-BAOYLACb.esm.js} +2 -2
  29. package/dist/consent.d.ts +1 -1
  30. package/dist/consent.esm.js +2 -2
  31. package/dist/{consentManager-bjfVXO7p.d.ts → consentManager-7aHaehwF.d.ts} +6 -6
  32. package/dist/{consentManager-DMlSL6Ax.esm.js → consentManager-DFSKQTcR.esm.js} +2 -2
  33. package/dist/{consentStateMachine-DIYSMxKQ.esm.js → consentStateMachine-4nZIH2O8.esm.js} +1 -1
  34. package/dist/{cpf-uAZTPUBy.esm.js → cpf-BIADjddF.esm.js} +1 -25
  35. package/dist/{createFaceAvatar-lYX0VTYs.d.ts → createFaceAvatar-BimBTONm.d.ts} +1 -1
  36. package/dist/cross-document-data-match.esm.js +1 -1
  37. package/dist/{crossDocumentDataMatchManager-BFTdiEDB.esm.js → crossDocumentDataMatchManager-D7ka2qOC.esm.js} +2 -2
  38. package/dist/curp-validation.d.ts +1 -1
  39. package/dist/curp-validation.esm.js +2 -2
  40. package/dist/{curpValidationManager-DNpC3wyf.esm.js → curpValidationManager-BVTt7IgC.esm.js} +2 -2
  41. package/dist/{curpValidationManager-z8428oCM.d.ts → curpValidationManager-DEqTUWdu.d.ts} +1 -1
  42. package/dist/{curpValidationStateMachine-B3iVsDyt.esm.js → curpValidationStateMachine-FB_MRbZQ.esm.js} +2 -2
  43. package/dist/custom-fields.esm.js +1 -1
  44. package/dist/custom-watchlist.esm.js +2 -2
  45. package/dist/{customFieldsManager-CvI-pDT3.esm.js → customFieldsManager-gbsq53p6.esm.js} +2 -2
  46. package/dist/{customWatchlistManager-BuHtUb0y.esm.js → customWatchlistManager-50APwk4Z.esm.js} +2 -2
  47. package/dist/{customWatchlistStateMachine-CiVD9wyF.esm.js → customWatchlistStateMachine-CpEVPzuT.esm.js} +1 -1
  48. package/dist/{deepsightLoader-B7DEYoyY.esm.js → deepsightLoader-BKCT8UT1.esm.js} +5 -5
  49. package/dist/{addressSearch-DzbE9Ogt.esm.js → definitionSource-BHNxbuiv.esm.js} +2 -72
  50. package/dist/{desktopCameraElection-BGMtYwk3.esm.js → desktopCameraElection-Dvvw7PRY.esm.js} +4 -4
  51. package/dist/document-capture.d.ts +1 -1
  52. package/dist/document-capture.esm.js +2 -2
  53. package/dist/{documentCaptureManager-DLPqruXJ.esm.js → documentCaptureManager-BG5TuqJz.esm.js} +2 -2
  54. package/dist/{documentCaptureManager-CD5iQiUI.d.ts → documentCaptureManager-DDfviFg0.d.ts} +1 -1
  55. package/dist/{documentCaptureStateMachine-DCvWQhFG.esm.js → documentCaptureStateMachine-C7PW_Ah9.esm.js} +4 -4
  56. package/dist/dynamic-forms.esm.js +2 -2
  57. package/dist/{dynamicFormsManager-DfqCEPg9.esm.js → dynamicFormsManager-B0bpHhhJ.esm.js} +2 -2
  58. package/dist/{dynamicFormsStateMachine-USQMB-uV.esm.js → dynamicFormsStateMachine-2ZHyejBc.esm.js} +2 -2
  59. package/dist/ekyb.d.ts +1 -1
  60. package/dist/ekyb.esm.js +2 -2
  61. package/dist/{ekybManager-CR8YSYux.esm.js → ekybManager-P9mC7W9J.esm.js} +2 -2
  62. package/dist/{ekybStateMachine-kHwdz6hm.esm.js → ekybStateMachine-C7HKaeVr.esm.js} +6 -4
  63. package/dist/ekyc-prefill.d.ts +17 -0
  64. package/dist/ekyc-prefill.esm.js +3 -0
  65. package/dist/ekyc.d.ts +2 -2
  66. package/dist/ekyc.esm.js +3 -3
  67. package/dist/{ekycManager-DymCvmVB.esm.js → ekycManager-CeeJoRFY.esm.js} +2 -2
  68. package/dist/{ekycManager-DlGIn9wA.d.ts → ekycManager-q1fos6IY.d.ts} +1 -1
  69. package/dist/ekycPrefillManager-C6BFFKxc.esm.js +102 -0
  70. package/dist/ekycPrefillManager-PPGVZbWk.d.ts +565 -0
  71. package/dist/ekycPrefillStateMachine-Dku90kZL.esm.js +686 -0
  72. package/dist/ekycRules-BLX7Elcb.esm.js +319 -0
  73. package/dist/{ekycStateMachine-CoFCUJ2z.esm.js → ekycStateMachine-DBTczgGE.esm.js} +584 -534
  74. package/dist/{ekycUtils-GRuMELYr.esm.js → ekycUtils-Dcff8BOD.esm.js} +24 -6
  75. package/dist/electronic-signature.esm.js +1 -1
  76. package/dist/{electronicSignatureManager-BCE3uA3z.esm.js → electronicSignatureManager-BKQuhJm_.esm.js} +4 -4
  77. package/dist/email.esm.js +2 -2
  78. package/dist/{emailManager-CGoE3CUe.esm.js → emailManager-CGmKbsBL.esm.js} +2 -2
  79. package/dist/{emailStateMachine-KgHfDNvM.esm.js → emailStateMachine-CGY1UGs2.esm.js} +2 -2
  80. package/dist/{events-ggpBBaZ8.esm.js → events-C7h7oaTE.esm.js} +1 -1
  81. package/dist/events.esm.js +1 -1
  82. package/dist/extensibility.d.ts +18 -17
  83. package/dist/extensibility.esm.js +37 -36
  84. package/dist/{externalFetch-CQY41QT1.esm.js → externalFetch-cUjJYyXj.esm.js} +1 -1
  85. package/dist/face-match.d.ts +1 -1
  86. package/dist/face-match.esm.js +2 -2
  87. package/dist/{faceCaptureManagerFactory-DV2ULUYS.d.ts → faceCaptureManagerFactory-BVwVGa3z.d.ts} +7 -7
  88. package/dist/{faceCaptureManagerFactory-Dp90bedH.esm.js → faceCaptureManagerFactory-ClFsByZc.esm.js} +4 -4
  89. package/dist/{faceCaptureSetup-ZfiWg0fo.esm.js → faceCaptureSetup-9hv5GC_H.esm.js} +11 -11
  90. package/dist/{faceMatchManager-Z4UDLwAv.d.ts → faceMatchManager-BZtEw6bB.d.ts} +9 -3
  91. package/dist/{faceMatchManager-D2xKPjjQ.esm.js → faceMatchManager-CRe7Nvm6.esm.js} +2 -2
  92. package/dist/{faceMatchStateMachine-CUvwiQi9.esm.js → faceMatchStateMachine-EX9QhxFE.esm.js} +28 -14
  93. package/dist/{feature-management-BbCIA4og.esm.js → feature-management-CmKTG_T5.esm.js} +1 -1
  94. package/dist/feature-management.esm.js +1 -1
  95. package/dist/field-comparison.esm.js +1 -1
  96. package/dist/{fieldComparisonManager-DgDbEeFZ.esm.js → fieldComparisonManager-DuosZJso.esm.js} +2 -2
  97. package/dist/fiscal-qr.esm.js +1 -1
  98. package/dist/{fiscalQrManager-BZeklojR.esm.js → fiscalQrManager-ji0qDaTW.esm.js} +2 -2
  99. package/dist/flow-events.d.ts +1 -1
  100. package/dist/flow.d.ts +31 -16
  101. package/dist/flow.esm.js +76 -15
  102. package/dist/{flowCompletionService-CcCnPs_T.esm.js → flowCompletionService-DvcH16XO.esm.js} +24 -3
  103. package/dist/{flowServices-Dmnc8Rye.esm.js → flowServices-Ca2vKNt2.esm.js} +29 -10
  104. package/dist/geolocation.esm.js +2 -2
  105. package/dist/{geolocationManager-BJJ3m_I8.esm.js → geolocationManager-CiG32lIm.esm.js} +2 -2
  106. package/dist/{geolocationStateMachine-CTI3m4Ie.esm.js → geolocationStateMachine-5rnTEOuw.esm.js} +3 -3
  107. package/dist/government-validation.esm.js +2 -2
  108. package/dist/{governmentValidationManager-CjChjZ3C.esm.js → governmentValidationManager-BivVZNVe.esm.js} +2 -2
  109. package/dist/{governmentValidationStateMachine-AEbn3Afi.esm.js → governmentValidationStateMachine-CeSDNgha.esm.js} +1 -1
  110. package/dist/home.d.ts +1 -1
  111. package/dist/home.esm.js +1 -1
  112. package/dist/http.esm.js +1 -1
  113. package/dist/id-ocr.d.ts +2 -2
  114. package/dist/id-ocr.esm.js +3 -19
  115. package/dist/id-selfie-flow.d.ts +3 -3
  116. package/dist/id-selfie-flow.esm.js +8 -8
  117. package/dist/id-verification.esm.js +2 -2
  118. package/dist/id.d.ts +3 -3
  119. package/dist/id.esm.js +3 -3
  120. package/dist/{idCaptureDefaults-Dszuq9ng.esm.js → idCaptureDefaults-DBnOC28H.esm.js} +3 -3
  121. package/dist/{idCaptureManager-B3oR4RnA.esm.js → idCaptureManager-B5xqok0L.esm.js} +8 -8
  122. package/dist/{idCaptureManager-CCA2D1Ah.d.ts → idCaptureManager-CG8zbAp0.d.ts} +7 -7
  123. package/dist/{idCaptureServices-DK0QboqT.esm.js → idCaptureServices-BIF_7rub.esm.js} +6 -6
  124. package/dist/{idCaptureStateMachine-zzar9MPy.esm.js → idCaptureStateMachine-B5cfgKvn.esm.js} +47 -19
  125. package/dist/idOcrCpfUtils-Nfln1Psb.esm.js +18 -0
  126. package/dist/{idOcrManager-BTdHlJ9D.d.ts → idOcrManager-B5xeI2lg.d.ts} +2 -2
  127. package/dist/{idOcrManager-xyEZNOBa.esm.js → idOcrManager-DNbVTMIu.esm.js} +2 -2
  128. package/dist/{idOcrStateMachine-DNKXh4Rn.esm.js → idOcrStateMachine-MAGnpWkb.esm.js} +8 -7
  129. package/dist/{idVerificationManager-DdnvYfgN.esm.js → idVerificationManager-BEAkamNm.esm.js} +2 -2
  130. package/dist/{idVerificationStateMachine-DtIBCa32.esm.js → idVerificationStateMachine-D5mBN2Ye.esm.js} +1 -1
  131. package/dist/identity-reuse.esm.js +2 -2
  132. package/dist/{identityReuseManager-CcpovlfD.esm.js → identityReuseManager-M8-BTjar.esm.js} +2 -2
  133. package/dist/{identityReuseStateMachine-DxZFWy47.esm.js → identityReuseStateMachine-D5bXgw9h.esm.js} +1 -1
  134. package/dist/{index-DEfwds5y.d.ts → index-Btj1EhiM.d.ts} +43 -19
  135. package/dist/{index-DC0P2Vzw.d.ts → index-CSPOoqah.d.ts} +1 -1
  136. package/dist/index.d.ts +1 -1
  137. package/dist/index.esm.js +1 -1
  138. package/dist/{invokeOnCaptureCallback-BJ0GVHGr.esm.js → invokeOnCaptureCallback-C1-j4fsq.esm.js} +1 -1
  139. package/dist/kyb-checks.esm.js +2 -2
  140. package/dist/{kybChecksManager-DpGOp4Su.esm.js → kybChecksManager-CnqwgKoV.esm.js} +1 -1
  141. package/dist/{kybChecksStateMachine-B43NAnv7.esm.js → kybChecksStateMachine-Be41K_NS.esm.js} +5 -4
  142. package/dist/mandatory-consent.d.ts +2 -2
  143. package/dist/mandatory-consent.esm.js +2 -2
  144. package/dist/{mandatoryConsentManager-B88Sm5nd.d.ts → mandatoryConsentManager-CYOJd_IZ.d.ts} +22 -13
  145. package/dist/{mandatoryConsentManager-B4vCYslr.esm.js → mandatoryConsentManager-LFhUlLvO.esm.js} +2 -2
  146. package/dist/{mandatoryConsentStateMachine-DWslYPA3.esm.js → mandatoryConsentStateMachine-DTSyDqQs.esm.js} +11 -5
  147. package/dist/{multipartRecordingService-BTqkHGG9.esm.js → multipartRecordingService-CCiRpByl.esm.js} +2 -2
  148. package/dist/{permissionGuards-DFV-Ws0a.esm.js → permissionGuards-DjQUR1du.esm.js} +1 -1
  149. package/dist/{permissionServices-D190ATGD.esm.js → permissionServices-CZpORUWY.esm.js} +1 -1
  150. package/dist/phone.esm.js +2 -2
  151. package/dist/{phoneFormat-JJNaWthV.esm.js → phoneFormat-DEpESpz2.esm.js} +13 -1
  152. package/dist/{phoneManager-Dy5tODCU.esm.js → phoneManager-C-qD3p3N.esm.js} +2 -2
  153. package/dist/{phoneServices-DJgyOzU2.esm.js → phoneServices-BdR1nmSO.esm.js} +1 -1
  154. package/dist/{phoneStateMachine-DnlPhnw7.esm.js → phoneStateMachine-2FMTdjtJ.esm.js} +2 -2
  155. package/dist/{processFaceMatch-Bst83HaS.esm.js → processFaceMatch-B1YnoBer.esm.js} +1 -1
  156. package/dist/qe-signature.esm.js +1 -1
  157. package/dist/{recordingService-CTko6Cjn.esm.js → recordingService-BVSCo0ac.esm.js} +3 -3
  158. package/dist/redirect-to-mobile.esm.js +2 -2
  159. package/dist/{redirectToMobileManager-CgGaT2NP.esm.js → redirectToMobileManager-CqyDfDxs.esm.js} +2 -2
  160. package/dist/{redirectToMobileStateMachine-CbhN8uVN.esm.js → redirectToMobileStateMachine-CXqfo2Gd.esm.js} +2 -2
  161. package/dist/{resolveForm-O7-r79VA.esm.js → resolveForm-f9PhUo9j.esm.js} +1 -209
  162. package/dist/{runChildModule-BffFArwl.esm.js → runChildModule-BmteMhR7.esm.js} +2 -2
  163. package/dist/{sdkVersion-CDd_gaR7.esm.js → sdkVersion-KZROt6l3.esm.js} +1 -1
  164. package/dist/selfie.d.ts +4 -4
  165. package/dist/selfie.esm.js +10 -10
  166. package/dist/{selfieErrorUtils-f4MgAG2A.esm.js → selfieErrorUtils-fqxp645p.esm.js} +1 -1
  167. package/dist/{selfieManager-hopelYEk.esm.js → selfieManager-A-n3k9Tu.esm.js} +5 -5
  168. package/dist/{selfieManager-DmZFzs1-.d.ts → selfieManager-DREuBhXZ.d.ts} +1 -1
  169. package/dist/{selfieStateMachine-DaZIVv3Q.esm.js → selfieStateMachine-48PKdKrw.esm.js} +3 -3
  170. package/dist/{session-CdSX4wsZ.esm.js → session-D0DWDKp9.esm.js} +4 -4
  171. package/dist/session.d.ts +2 -2
  172. package/dist/session.esm.js +5 -5
  173. package/dist/{sessionInitializer-DsL7X2j9.esm.js → sessionInitializer-I92b2dmL.esm.js} +20 -9
  174. package/dist/{setup-DDahygZs.esm.js → setup-BpjzWqR1.esm.js} +12 -15
  175. package/dist/{setup-D9qt8YVU.d.ts → setup-CG6oLkAa.d.ts} +2 -2
  176. package/dist/signature.esm.js +2 -2
  177. package/dist/{signatureManager-CwqjcxPg.esm.js → signatureManager-M9vQBj19.esm.js} +2 -2
  178. package/dist/{signatureStateMachine-DBVDd1Eu.esm.js → signatureStateMachine-0_frzAN5.esm.js} +1 -1
  179. package/dist/{stats-CatA2dea.esm.js → stats-C2sigf9p.esm.js} +1 -1
  180. package/dist/stats.esm.js +1 -1
  181. package/dist/step-up.d.ts +378 -0
  182. package/dist/step-up.esm.js +639 -0
  183. package/dist/{tri-DG6priFa.esm.js → tri-DaUNvo-o.esm.js} +29 -34
  184. package/dist/tri.d.ts +2 -2
  185. package/dist/tri.esm-Df5eKLsY.esm.js +2165 -0
  186. package/dist/tri.esm.js +2 -2
  187. package/dist/{trueSightService-GuLthUVK.esm.js → trueSightService-DHYTBCIn.esm.js} +4 -4
  188. package/dist/trust-graph.esm.js +1 -1
  189. package/dist/types-B-PIc0en.d.ts +115 -0
  190. package/dist/{types-CJ7Yl9K-.d.ts → types-Bpo97EOh.d.ts} +4 -2
  191. package/dist/{types-BPm1JSu7.d.ts → types-BqlZSoZ-.d.ts} +5 -5
  192. package/dist/{types-Csh8vzPo.d.ts → types-Cbm9J2yF.d.ts} +1 -1
  193. package/dist/{types-BEVHQbbC.d.ts → types-CgihAhT_.d.ts} +3 -3
  194. package/dist/{types-CuMJ2M7D.d.ts → types-DEa3taWc.d.ts} +8 -1
  195. package/dist/{types-Cd0J0F9D.d.ts → types-P9LzsfRo.d.ts} +3 -2
  196. package/dist/{types-CRaFu6wS.d.ts → types-TisHEbBg.d.ts} +9 -3
  197. package/dist/types-kLsU6Jkt.d.ts +6 -0
  198. package/dist/{urlUtils-eYiyWjh0.esm.js → urlUtils-B2wagB5v.esm.js} +14 -1
  199. package/dist/usStates-CwOQ2kAx.esm.js +209 -0
  200. package/dist/video-selfie.d.ts +5 -4
  201. package/dist/video-selfie.esm.js +8 -8
  202. package/dist/{videoSelfieCameraWarmer-e3irGfcO.esm.js → videoSelfieCameraWarmer-CTOpqhov.esm.js} +14 -12
  203. package/dist/{videoSelfieStepDetector-Dv3Mgws-.d.ts → videoSelfieStepDetector-4XE2QI5q.d.ts} +4 -4
  204. package/dist/{warmup-DtB0DJpl.esm.js → warmup-9iKKNNuW.esm.js} +46 -4
  205. package/dist/{warmup-BO57syF6.d.ts → warmup-BNhIuURi.d.ts} +18 -2
  206. package/dist/wasm.d.ts +9 -3
  207. package/dist/wasm.esm.js +3 -3
  208. package/dist/{wasmDsFlagSync-BtiR5pig.esm.js → wasmDsFlagSync-lRIgn5Ic.esm.js} +1 -1
  209. package/dist/{wasmWebClient-BDrax6Eu.esm.js → wasmWebClient-C3v3s_4H.esm.js} +22 -10
  210. package/dist/watchlist-for-business.esm.js +2 -2
  211. package/dist/watchlist.esm.js +2 -2
  212. package/dist/{watchlistForBusinessManager-DqUpAEj_.esm.js → watchlistForBusinessManager-C1S5y5yj.esm.js} +2 -2
  213. package/dist/{watchlistForBusinessStateMachine-DdaPl2PS.esm.js → watchlistForBusinessStateMachine-Bj_hnoK5.esm.js} +1 -1
  214. package/dist/{watchlistManager-CdpXzT4B.esm.js → watchlistManager-BpegtZbc.esm.js} +2 -2
  215. package/dist/{watchlistStateMachine-ofHW_lPk.esm.js → watchlistStateMachine-Bgkh1gra.esm.js} +1 -1
  216. package/dist/workflow.d.ts +226 -41
  217. package/dist/workflow.esm.js +157 -61
  218. package/package.json +11 -1
  219. package/dist/tri.esm-CzTNi5Q_.esm.js +0 -3826
  220. package/dist/types-J6g6iKe_.d.ts +0 -6
@@ -1,10 +1,10 @@
1
- import { r as getToken } from "./api-CpP4PS4S.esm.js";
1
+ import { r as getToken } from "./api-BSnbg4HO.esm.js";
2
2
  import { r as subscribeHttpErrors } from "./HttpRequestError-Bh0pNGSC.esm.js";
3
- import { a as initializeSession, f as whenSessionFingerprintSettled } from "./sessionInitializer-DsL7X2j9.esm.js";
3
+ import { a as initializeSession, f as whenSessionFingerprintSettled } from "./sessionInitializer-I92b2dmL.esm.js";
4
4
  import { n as onConnectivityChange, r as resumeConnectivity, t as isConnectivityLost } from "./connectivity-BCuEoQ-n.esm.js";
5
- import { t as IncodeApiError } from "./apiError-DH-CH4Nz.esm.js";
6
- import { a as continueSession, c as validateQrUuid, i as bootstrapSession, n as QrValidationError, o as createSession, r as SESSION_CONTINUE_ERROR_CODES, s as refreshQrUrlUuid, t as QR_VALIDATION_ERROR_CODES } from "./session-CdSX4wsZ.esm.js";
7
- import { n as getFinishStatus } from "./flowCompletionService-CcCnPs_T.esm.js";
5
+ import { t as IncodeApiError } from "./apiError-Bmwy1Fa7.esm.js";
6
+ import { a as continueSession, c as validateQrUuid, i as bootstrapSession, n as QrValidationError, o as createSession, r as SESSION_CONTINUE_ERROR_CODES, s as refreshQrUrlUuid, t as QR_VALIDATION_ERROR_CODES } from "./session-D0DWDKp9.esm.js";
7
+ import { r as getFinishStatus } from "./flowCompletionService-DvcH16XO.esm.js";
8
8
  //#region src/internal/session/sessionExpired.ts
9
9
  var SessionExpiredError = class extends Error {
10
10
  constructor() {
@@ -1,16 +1,16 @@
1
1
  import { n as getTimestamp } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
2
2
  import { n as setWasmMetadataV2Enabled } from "./wasmMetadataVersionSync-U8EFUr1T.esm.js";
3
- import { C as subscribeEvent, b as getAnalyticsBatcher, y as addEvent } from "./events-ggpBBaZ8.esm.js";
4
- import { c as setToken, r as getToken, t as api, u as endpoints } from "./api-CpP4PS4S.esm.js";
5
- import { C as noteTokenActivated, _ as isFeatureEnabled, b as noteEnvironment, c as startTrueSightCollection, g as fetchFeatureConfig, u as trueSightLog, v as resetFeatureConfigCache } from "./trueSightService-GuLthUVK.esm.js";
6
- import { t as SDK_VERSION } from "./sdkVersion-CDd_gaR7.esm.js";
3
+ import { C as subscribeEvent, b as getAnalyticsBatcher, y as addEvent } from "./events-C7h7oaTE.esm.js";
4
+ import { c as setToken, r as getToken, t as api, u as endpoints } from "./api-BSnbg4HO.esm.js";
5
+ import { C as noteTokenActivated, _ as isFeatureEnabled, b as noteEnvironment, c as startTrueSightCollection, g as fetchFeatureConfig, u as trueSightLog, v as resetFeatureConfigCache } from "./trueSightService-DHYTBCIn.esm.js";
6
+ import { t as SDK_VERSION } from "./sdkVersion-KZROt6l3.esm.js";
7
7
  import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
8
- import { E as updateFeatureManagementUser } from "./feature-management-BbCIA4og.esm.js";
9
- import { n as flushDeviceStatsQueue, r as resetDeviceStatsQueue } from "./stats-CatA2dea.esm.js";
8
+ import { E as updateFeatureManagementUser } from "./feature-management-CmKTG_T5.esm.js";
9
+ import { n as flushDeviceStatsQueue, r as resetDeviceStatsQueue } from "./stats-C2sigf9p.esm.js";
10
10
  import { t as getParsedUserAgent } from "./getParsedUserAgent-DhQPeKqw.esm.js";
11
11
  import { a as isIOS } from "./platform-aPh7gTWh.esm.js";
12
12
  import { t as getUserAgent } from "./getBrowser-CBiibsL-.esm.js";
13
- import { a as linkSessionWithTRI, i as isTRIStarted, o as readTRIFpSignals } from "./tri-DG6priFa.esm.js";
13
+ import { a as isTRIStarted, o as linkSessionWithTRI, s as readTRIFpSignals } from "./tri-DaUNvo-o.esm.js";
14
14
  import { i as retryAfterReconnect } from "./connectivity-BCuEoQ-n.esm.js";
15
15
  //#region src/internal/version/sdkPlatform.ts
16
16
  /**
@@ -98,6 +98,7 @@ const START_INTERVIEW_EVENT = "modelLoadEnd";
98
98
  const CAPTURE_INTERVIEW_EVENT = "captureAttemptFinished";
99
99
  const START_SIGNALS = ["device"];
100
100
  const MAX_KEPT_SIGNALS = 20;
101
+ const EMPTY_BEHAVIOUR_BASELINE_MESSAGE = "first read was empty, native collection is not running";
101
102
  /**
102
103
  * The native envelope reads the SDK platform and version, and the start batch
103
104
  * goes out before any capture's Deepsight session has set them. A failure is
@@ -141,6 +142,7 @@ function createFingerprintSignalsReporter(deps) {
141
142
  keptSignals.push(metadata);
142
143
  if (keptSignals.length > MAX_KEPT_SIGNALS) keptSignals.shift();
143
144
  }
145
+ let behaviourBaselinePending = true;
144
146
  function enqueue(work) {
145
147
  const scheduledGeneration = generation;
146
148
  queue = queue.then(async () => {
@@ -155,6 +157,14 @@ function createFingerprintSignalsReporter(deps) {
155
157
  const wasmUtil = await deps.getWasmUtil();
156
158
  setSdkIdentity(wasmUtil);
157
159
  const metadata = await wasmUtil.getFingerprintSignals(type);
160
+ if (type === "behaviour" && behaviourBaselinePending) {
161
+ behaviourBaselinePending = false;
162
+ if (!metadata) deps.reportFailure({
163
+ message: EMPTY_BEHAVIOUR_BASELINE_MESSAGE,
164
+ signalsType: type,
165
+ interviewEvent
166
+ });
167
+ }
158
168
  if (!metadata || deps.getToken() !== token) return;
159
169
  keepOrForward(metadata);
160
170
  const response = await deps.post(endpoints.deviceFingerprintSignals, isPid ? {
@@ -189,6 +199,7 @@ function createFingerprintSignalsReporter(deps) {
189
199
  }
190
200
  /** Switches native behaviour collection (`sbc`); resolves to whether it worked. */
191
201
  async function applyNativeCollection(on) {
202
+ if (!on) behaviourBaselinePending = false;
192
203
  try {
193
204
  (await deps.getWasmUtil()).setBehaviourSignalsCollection(on);
194
205
  return true;
@@ -377,7 +388,7 @@ function createFingerprintSignalsReporter(deps) {
377
388
  }
378
389
  const fingerprintSignalsReporter = createFingerprintSignalsReporter({
379
390
  getWasmUtil: async () => {
380
- return (await import("./WasmUtilProvider-Dp2V-Uct.esm.js").then((n) => n.n)).WasmUtilProvider.getInstance();
391
+ return (await import("./WasmUtilProvider-C_puwvVn.esm.js").then((n) => n.n)).WasmUtilProvider.getInstance();
381
392
  },
382
393
  getToken: () => getToken(),
383
394
  post: async (url, body, headers) => (await api.post(url, body, { headers })).data,
@@ -938,7 +949,7 @@ function startSessionPid(token, config) {
938
949
  function startSessionWasm(token, config) {
939
950
  (async () => {
940
951
  try {
941
- const warmupModule = await import("./warmup-DtB0DJpl.esm.js").then((n) => n.c);
952
+ const warmupModule = await import("./warmup-9iKKNNuW.esm.js").then((n) => n.c);
942
953
  const warmup = warmupModule.warmupWasm({
943
954
  ...config,
944
955
  pipelines: []
@@ -1,16 +1,16 @@
1
- import { F as setWasmIntegrityObserver, T as resolveWasmConfig, b as DEFAULT_WASM_VERSION, g as setWasmStartGate, v as setWasmDiagnosticsHandler } from "./wasmWebClient-BDrax6Eu.esm.js";
2
- import { a as setWasmOnDeviceMode, f as drainWasmDiagnostics, i as isWasmReady, m as rearmWasmDiagnostics, n as getWarmupFacts, p as getWasmDiagnosticsMode, r as getWasmStatus, s as warmupWasm } from "./warmup-DtB0DJpl.esm.js";
3
- import { t as WasmUtilProvider } from "./WasmUtilProvider-Dp2V-Uct.esm.js";
4
- import { S as setAnalyticsBatcher, b as getAnalyticsBatcher, c as resetExperimentAssignments, v as createAnalyticsBatchingService, x as resetAnalyticsBatcher } from "./events-ggpBBaZ8.esm.js";
5
- import { a as resetApi, i as isApiConfigured, n as getApi, r as getToken, s as setHttpRequestObserver, t as api, u as endpoints } from "./api-CpP4PS4S.esm.js";
6
- import { S as noteTestingSignals, d as categoryForEndpoint, f as getStoredHttpConfig, h as upgradeToWasmHttpClient$1, m as resetHttpClientState, n as initializeTrueSightDiagnostics, o as resetTrueSight, p as installFreshHttpClient, s as setTrueSightExternalDrain, t as finalizeTrueSight, u as trueSightLog } from "./trueSightService-GuLthUVK.esm.js";
7
- import { C as fingerprintSignalsReporter, S as BrowserEnvironmentProvider, _ as setStandaloneFlowPolicy, a as initializeSession, c as setClientHostingApp, d as setClientWasmDisabled, g as resolveStandaloneFlowPolicy, h as resetStandaloneFlowPolicy, l as setClientIpLookupEnabled, m as registerFlowPreloader, o as resetSessionInit, s as setClientFingerprintEnabled, u as setClientWasmConfig } from "./sessionInitializer-DsL7X2j9.esm.js";
1
+ import { E as resolveWasmConfig, I as setWasmIntegrityObserver, _ as setWasmStartGate, x as DEFAULT_WASM_VERSION, y as setWasmDiagnosticsHandler } from "./wasmWebClient-C3v3s_4H.esm.js";
2
+ import { a as setWasmOnDeviceMode, f as drainWasmDiagnostics, m as rearmWasmDiagnostics, n as getWarmupFacts, p as getWasmDiagnosticsMode, s as warmupWasm } from "./warmup-9iKKNNuW.esm.js";
3
+ import { t as WasmUtilProvider } from "./WasmUtilProvider-C_puwvVn.esm.js";
4
+ import { S as setAnalyticsBatcher, b as getAnalyticsBatcher, c as resetExperimentAssignments, v as createAnalyticsBatchingService, x as resetAnalyticsBatcher } from "./events-C7h7oaTE.esm.js";
5
+ import { a as resetApi, i as isApiConfigured, n as getApi, r as getToken, s as setHttpRequestObserver, t as api, u as endpoints } from "./api-BSnbg4HO.esm.js";
6
+ import { S as noteTestingSignals, d as categoryForEndpoint, f as getStoredHttpConfig, h as upgradeToWasmHttpClient$1, m as resetHttpClientState, n as initializeTrueSightDiagnostics, o as resetTrueSight, p as installFreshHttpClient, s as setTrueSightExternalDrain, t as finalizeTrueSight, u as trueSightLog } from "./trueSightService-DHYTBCIn.esm.js";
7
+ import { C as fingerprintSignalsReporter, S as BrowserEnvironmentProvider, _ as setStandaloneFlowPolicy, a as initializeSession, c as setClientHostingApp, d as setClientWasmDisabled, g as resolveStandaloneFlowPolicy, h as resetStandaloneFlowPolicy, l as setClientIpLookupEnabled, m as registerFlowPreloader, o as resetSessionInit, s as setClientFingerprintEnabled, u as setClientWasmConfig } from "./sessionInitializer-I92b2dmL.esm.js";
8
8
  import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
9
9
  import { t as resolveLocalStorage } from "./safeStorage-UxDrnjwa.esm.js";
10
- import { C as resetFeatureManagement, D as applyEnvironment, O as getEnvironment, S as optOutFeatureManagement, b as initializeFeatureManagement, c as resetResolvedExperiments, k as resetEnvironment, v as getIsFeatureManagementLocked, w as resetFeatureManagementProviderInstance } from "./feature-management-BbCIA4og.esm.js";
11
- import { r as resetDeviceStatsQueue, t as addDeviceStats } from "./stats-CatA2dea.esm.js";
12
- import { i as isTRIStarted, o as readTRIFpSignals, r as initializeTRI, s as resetSdkOwnedTRI, t as addTRIFpSignals } from "./tri-DG6priFa.esm.js";
13
- import { i as resetDashboardFlowCache, r as preloadDashboardFlow } from "./flowServices-Dmnc8Rye.esm.js";
10
+ import { C as resetFeatureManagement, D as applyEnvironment, O as getEnvironment, S as optOutFeatureManagement, b as initializeFeatureManagement, c as resetResolvedExperiments, k as resetEnvironment, v as getIsFeatureManagementLocked, w as resetFeatureManagementProviderInstance } from "./feature-management-CmKTG_T5.esm.js";
11
+ import { r as resetDeviceStatsQueue, t as addDeviceStats } from "./stats-C2sigf9p.esm.js";
12
+ import { a as isTRIStarted, c as resetSdkOwnedTRI, i as initializeTRI, s as readTRIFpSignals, t as addTRIFpSignals } from "./tri-DaUNvo-o.esm.js";
13
+ import { i as resetDashboardFlowCache, r as preloadDashboardFlow } from "./flowServices-Ca2vKNt2.esm.js";
14
14
  //#region ../infra/src/wasm/wasmRuntimeProfile.ts
15
15
  /**
16
16
  * The WASM facts TrueSight reports as `session.webProfile.wasm`
@@ -581,10 +581,7 @@ async function setup(options) {
581
581
  if (featureManagementSetupOptions.awaitInitialization === true) featureManagementReady = initialization;
582
582
  }
583
583
  else if (options.featureManagement !== void 0) console.error("[FeatureManagement] Feature management is locked after the first setup() call and cannot be changed (re-enabled, disabled, or reconfigured). Ignoring this change. Call reset() before changing it.");
584
- const triReady = options.tri ? initializeTRI(options.tri, {
585
- sessionToken: options.token,
586
- fpSignalsFromSdk: Boolean(effectiveWasm) || isWasmReady() || getWasmStatus().isLoading
587
- }) : void 0;
584
+ const triReady = options.tri ? initializeTRI(options.tri, { sessionToken: options.token }) : void 0;
588
585
  if (effectiveWasm) {
589
586
  await warmupWasm(effectiveWasm);
590
587
  await (await WasmUtilProvider.getInstance()).initialize({
@@ -1,5 +1,5 @@
1
- import { c as WasmPipeline, i as WasmModuleConfig, n as WasmModelsConfig, t as WarmupConfig } from "./warmup-BO57syF6.js";
2
- import { s as TransactionalRiskIntelligenceSetupConfig } from "./index-DEfwds5y.js";
1
+ import { c as WasmPipeline, i as WasmModuleConfig, n as WasmModelsConfig, t as WarmupConfig } from "./warmup-BNhIuURi.js";
2
+ import { c as TransactionalRiskIntelligenceSetupConfig } from "./index-Btj1EhiM.js";
3
3
  import { c as FeatureManagementRedactedUserInfo } from "./IFeatureManagementCapability-De8wpbGh.js";
4
4
  //#region src/internal/environment/environment.d.ts
5
5
  /**
@@ -1,3 +1,3 @@
1
- import { t as signatureMachine } from "./signatureStateMachine-DBVDd1Eu.esm.js";
2
- import { n as createSignatureManagerFromActor, t as createSignatureManager } from "./signatureManager-CwqjcxPg.esm.js";
1
+ import { t as signatureMachine } from "./signatureStateMachine-0_frzAN5.esm.js";
2
+ import { n as createSignatureManagerFromActor, t as createSignatureManager } from "./signatureManager-M9vQBj19.esm.js";
3
3
  export { createSignatureManager, createSignatureManagerFromActor, signatureMachine };
@@ -1,7 +1,7 @@
1
- import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-ggpBBaZ8.esm.js";
1
+ import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-C7h7oaTE.esm.js";
2
2
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
3
  import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
4
- import { t as signatureMachine } from "./signatureStateMachine-DBVDd1Eu.esm.js";
4
+ import { t as signatureMachine } from "./signatureStateMachine-0_frzAN5.esm.js";
5
5
  //#region src/modules/signature/signatureActor.ts
6
6
  function createSignatureActor(options) {
7
7
  return createActor(signatureMachine, { input: { config: options.config } }).start();
@@ -1,4 +1,4 @@
1
- import { t as api, u as endpoints } from "./api-CpP4PS4S.esm.js";
1
+ import { t as api, u as endpoints } from "./api-BSnbg4HO.esm.js";
2
2
  import { i as assign, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
3
3
  import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
4
4
  //#region src/modules/signature/signatureServices.ts
@@ -1,4 +1,4 @@
1
- import { r as getToken, t as api, u as endpoints } from "./api-CpP4PS4S.esm.js";
1
+ import { r as getToken, t as api, u as endpoints } from "./api-BSnbg4HO.esm.js";
2
2
  //#region src/modules/stats/statsServices.ts
3
3
  const deviceStatsQueue = [];
4
4
  async function postDeviceStatsNow(stats) {
package/dist/stats.esm.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as flushDeviceStatsQueue, r as resetDeviceStatsQueue, t as addDeviceStats } from "./stats-CatA2dea.esm.js";
1
+ import { n as flushDeviceStatsQueue, r as resetDeviceStatsQueue, t as addDeviceStats } from "./stats-C2sigf9p.esm.js";
2
2
  export { addDeviceStats, flushDeviceStatsQueue, resetDeviceStatsQueue };
@@ -0,0 +1,378 @@
1
+ import { t as Manager } from "./Manager-C9T5amUN.js";
2
+ import "./Actor-DpTj5PFb.js";
3
+ import { n as FinishStatus } from "./flowCompletionService-BlAHsKyv.js";
4
+ //#region src/modules/step-up/types.d.ts
5
+ /**
6
+ * One scope the agent class asks for, as shown on the permissions screen.
7
+ */
8
+ type StepUpScope = {
9
+ /** Machine name sent back in `approvedScopes`, e.g. `tx.read`. */
10
+ name: string;
11
+ /** Human label, e.g. `Read transactions`. Falls back to `name`. */
12
+ displayName: string;
13
+ description?: string;
14
+ /**
15
+ * Whether the permissions screen starts with this scope ticked (contract
16
+ * v0.5). Incode sets it from the agent class: the scope that triggered the
17
+ * step-up and `auto-select` scopes are ticked, `dynamic-select` ones only
18
+ * when suggested; missing means unticked.
19
+ */
20
+ autoSelect?: boolean;
21
+ /**
22
+ * `auto-select`: starts ticked. `dynamic-select`: starts ticked only when
23
+ * suggested (see `autoSelect`). The person may untick either. Missing reads
24
+ * as `dynamic-select`.
25
+ */
26
+ selectionMode?: 'auto-select' | 'dynamic-select';
27
+ };
28
+ /**
29
+ * The step-up's `consent`, exactly as the Decision API start response
30
+ * returns it (contract v0.2 §6.1: camelCase everywhere).
31
+ */
32
+ type StepUpPermissions = {
33
+ agentClassId?: string;
34
+ purpose?: string;
35
+ scopes: StepUpScope[];
36
+ /** Limits keyed by scope name; only scopes that have one are listed. */
37
+ limits?: Record<string, StepUpLimit>;
38
+ /** How long the approval lasts, in seconds. */
39
+ durationSeconds: number;
40
+ };
41
+ /** The agent class's limit on one scope. Amounts carry no currency. */
42
+ type StepUpLimit = {
43
+ budgetLimit?: number;
44
+ usageLimit?: number;
45
+ /** What one use is called, e.g. `reads`. */
46
+ usageLimitLabel?: string;
47
+ };
48
+ /** When the SDK's permissions screen shows, relative to the face check. */
49
+ type StepUpPermissionsOrder = 'afterFaceCheck' | 'beforeFaceCheck';
50
+ /**
51
+ * The Decision API's step-up modes: `embedded` runs the workflow in this page,
52
+ * `hosted` frames Incode's hosted page at `onboardingUrl`.
53
+ */
54
+ type StepUpMode = 'embedded' | 'hosted';
55
+ type StepUpPermissionsUi = 'sdk' | 'none';
56
+ /**
57
+ * What `onFinish` receives. A hint only: the bank server's status read
58
+ * (`GET /step-ups/{id}`) is what checks the face check and activates the
59
+ * mandate.
60
+ */
61
+ type StepUpResult = {
62
+ stepUpId: string;
63
+ approvedScopes: string[];
64
+ };
65
+ /**
66
+ * Error codes on {@link StepUpError.code} (contract v0.2 §6.3). Public API:
67
+ * hosts branch on them.
68
+ *
69
+ * - `INVALID_OPTIONS` — `renderStepUp` was called with bad options (thrown).
70
+ * - `USER_DENIED` — the user pressed Deny on the permissions screen.
71
+ * - `FACE_CHECK_FAILED` — the face check ran and failed: the workflow finished
72
+ * `rejected` or with score `FAIL` / `MANUAL_FAIL`, or the hosted page
73
+ * reported `FACE_CHECK_FAILED`.
74
+ * - `VERIFICATION_PENDING` — the workflow ended without a result yet (async
75
+ * resolution, e.g. manual review), or the hosted page reported
76
+ * `VERIFICATION_PENDING`. The bank server's status read answers `pending`
77
+ * until Incode decides.
78
+ * - `VERIFICATION_ERROR` — the verification could not finish: network,
79
+ * expired token, camera denied, any other workflow or hosted-page error, a
80
+ * hosted result that approved none of the agent class's scopes, a hosted
81
+ * page that never sent `ready` (`detail.code` `READY_TIMEOUT`), or an
82
+ * `onPermissionsApproved` that rejected (`detail.code`
83
+ * `PERMISSIONS_NOT_SAVED`).
84
+ * {@link StepUpError.detail} carries the original code and message.
85
+ * - `IFRAME_ORIGIN_MISMATCH` — the step-up iframe posted from an origin other
86
+ * than `onboardingUrl`'s (for example it was redirected elsewhere).
87
+ */
88
+ type StepUpErrorCode = 'INVALID_OPTIONS' | 'USER_DENIED' | 'FACE_CHECK_FAILED' | 'VERIFICATION_PENDING' | 'VERIFICATION_ERROR' | 'IFRAME_ORIGIN_MISMATCH';
89
+ /** The codes the verification step (workflow or hosted page) can end with. */
90
+ type StepUpVerificationErrorCode = Extract<StepUpErrorCode, 'FACE_CHECK_FAILED' | 'VERIFICATION_PENDING' | 'VERIFICATION_ERROR'>;
91
+ /**
92
+ * What the workflow or hosted page reported underneath a step-up error, as
93
+ * given (for logs and support; not stable API).
94
+ */
95
+ type StepUpErrorDetail = {
96
+ /** E.g. a workflow module error code, an HTTP status, or a hosted code. */
97
+ code?: string;
98
+ message?: string;
99
+ };
100
+ /** Options validated by core. The DOM container is checked by the UI layer. */
101
+ type StepUpOptionsInput = {
102
+ stepUpId: string;
103
+ sessionToken: string;
104
+ interviewId?: string;
105
+ /** The start response's `consent`, passed on unchanged. */
106
+ consent: StepUpPermissions;
107
+ mode?: StepUpMode;
108
+ onboardingUrl?: string;
109
+ permissionsUi?: StepUpPermissionsUi;
110
+ /**
111
+ * Embedded mode: show the permissions screen before the face check
112
+ * (default) or after it. Ignored with `permissionsUi: 'none'`. Incode
113
+ * activates the mandate once it has both the scope choice and a passed face
114
+ * check, in either order.
115
+ */
116
+ permissionsOrder?: StepUpPermissionsOrder;
117
+ /**
118
+ * Embedded mode: called when the person approves, with the scopes they kept.
119
+ * The step-up waits for the returned promise, then runs the face check (or
120
+ * finishes, after it). Use it to have the bank server record the choice
121
+ * (`POST /api/v1/step-ups/{id}/scopes`). A rejection ends the step-up with
122
+ * `VERIFICATION_ERROR`, `detail.code` `PERMISSIONS_NOT_SAVED`.
123
+ */
124
+ onPermissionsApproved?: (result: StepUpResult) => void | Promise<unknown>;
125
+ /**
126
+ * Hosted mode: how long to wait for the hosted page's `ready` before
127
+ * failing with `VERIFICATION_ERROR` (`detail.code` `READY_TIMEOUT`).
128
+ * Default 15000.
129
+ */
130
+ readyTimeoutMs?: number;
131
+ /** Default language, as `<incode-workflow lang>`. Embedded mode. */
132
+ lang?: string;
133
+ /** Skips the tenant's dashboard theme, as on `<incode-workflow>`. Embedded mode. */
134
+ disableDashboardTheme?: boolean;
135
+ onFinish: (result: StepUpResult) => void;
136
+ onError?: (error: Error) => void;
137
+ };
138
+ /** Options after validation: defaults filled in, permissions normalized. */
139
+ type NormalizedStepUpOptions = {
140
+ stepUpId: string;
141
+ sessionToken: string;
142
+ interviewId?: string;
143
+ permissions: StepUpPermissions;
144
+ mode: StepUpMode;
145
+ onboardingUrl?: string;
146
+ /** Exact origin of `onboardingUrl` (hosted mode only). */
147
+ onboardingOrigin?: string;
148
+ permissionsUi: StepUpPermissionsUi;
149
+ permissionsOrder: StepUpPermissionsOrder;
150
+ readyTimeoutMs: number;
151
+ lang?: string;
152
+ disableDashboardTheme: boolean;
153
+ onPermissionsApproved?: (result: StepUpResult) => void | Promise<unknown>;
154
+ onFinish: (result: StepUpResult) => void;
155
+ onError?: (error: Error) => void;
156
+ };
157
+ /** Duration in the largest whole unit, for the i18n layer to phrase. */
158
+ type StepUpDuration = {
159
+ unit: 'days' | 'hours' | 'minutes' | 'seconds';
160
+ count: number;
161
+ };
162
+ /** What a message from the hosted onboarding page means to the step-up. */
163
+ type HostedPageMessage = {
164
+ kind: 'ready';
165
+ } | {
166
+ kind: 'finished';
167
+ approvedScopes: string[];
168
+ } | {
169
+ kind: 'error';
170
+ code: string;
171
+ message?: string;
172
+ } | {
173
+ kind: 'originMismatch';
174
+ } | {
175
+ kind: 'ignored';
176
+ };
177
+ //#endregion
178
+ //#region src/modules/step-up/stepUpStateMachine.d.ts
179
+ type StepUpInput = {
180
+ stepUpId: string;
181
+ permissions: StepUpPermissions;
182
+ permissionsUi: StepUpPermissionsUi;
183
+ permissionsOrder: StepUpPermissionsOrder;
184
+ /** The host saves the approved scopes before the step-up goes on. */
185
+ hostSavesPermissions: boolean;
186
+ };
187
+ //#endregion
188
+ //#region src/modules/step-up/stepUpActor.d.ts
189
+ type CreateStepUpActorOptions = StepUpInput;
190
+ //#endregion
191
+ //#region src/modules/step-up/stepUpManager.d.ts
192
+ type StepUpVerifyingState = {
193
+ status: 'verifying';
194
+ };
195
+ type StepUpPermissionsState = {
196
+ status: 'permissions';
197
+ purpose?: string;
198
+ scopes: Array<StepUpScope & {
199
+ checked: boolean;
200
+ limit?: StepUpLimit;
201
+ }>;
202
+ duration: StepUpDuration;
203
+ /** False when no scope is checked: Approve needs at least one. */
204
+ canApprove: boolean;
205
+ /** Approved; the host is saving the choice before the step-up goes on. */
206
+ saving: boolean;
207
+ };
208
+ type StepUpFinishedState = {
209
+ status: 'finished';
210
+ result: StepUpResult;
211
+ };
212
+ type StepUpClosedState = {
213
+ status: 'closed';
214
+ };
215
+ type StepUpErrorState = {
216
+ status: 'error';
217
+ /** The `StepUpError` code to report. */
218
+ code: StepUpVerificationErrorCode;
219
+ error: string;
220
+ detail?: StepUpErrorDetail;
221
+ };
222
+ /** The parts of the workflow's `FinishStatus` the step-up reads. */
223
+ type StepUpWorkflowResult = Pick<FinishStatus, 'action' | 'scoreStatus'>;
224
+ /**
225
+ * What the workflow's `onFinish` result means for the step-up:
226
+ * - `failed` — `action: 'rejected'`, or score `FAIL` / `MANUAL_FAIL`.
227
+ * - `pending` — no result (the workflow went to async resolution).
228
+ * - `passed` — anything else, `WARN` and `UNKNOWN` included. That is only a
229
+ * UI hint: Incode passes the face check only on `OK` / `MANUAL_OK`, so
230
+ * `onFinish` is never an approval.
231
+ */
232
+ declare function readWorkflowResult(result: StepUpWorkflowResult | undefined): 'passed' | 'failed' | 'pending';
233
+ type StepUpState = StepUpVerifyingState | StepUpPermissionsState | StepUpFinishedState | StepUpClosedState | StepUpErrorState;
234
+ type CreateStepUpManagerOptions = {
235
+ stepUpId: string;
236
+ permissions: StepUpPermissions;
237
+ permissionsUi?: CreateStepUpActorOptions['permissionsUi'];
238
+ permissionsOrder?: CreateStepUpActorOptions['permissionsOrder'];
239
+ /** Approve waits for `permissionsSaved()` before going on. */
240
+ hostSavesPermissions?: boolean;
241
+ };
242
+ /**
243
+ * Creates the step-up manager. Pass permissions already normalized by
244
+ * `validateStepUpOptions` / `normalizeStepUpPermissions`.
245
+ */
246
+ declare function createStepUpManager(options: CreateStepUpManagerOptions): Manager<StepUpState> & {
247
+ /** Verification passed: show the permissions (or finish, `'none'`). */
248
+ verificationFinished(): void;
249
+ /**
250
+ * The workflow's `onFinish`, with its result. A failed face check goes to
251
+ * `error` (`FACE_CHECK_FAILED`) and no result to `error`
252
+ * (`VERIFICATION_PENDING`); neither shows the permissions.
253
+ */
254
+ workflowFinished(result?: StepUpWorkflowResult): void;
255
+ /**
256
+ * The workflow or hosted page ended without a passed check. `code`
257
+ * defaults to `VERIFICATION_ERROR` (could not finish); pass
258
+ * `FACE_CHECK_FAILED` only for a check that ran and failed.
259
+ */
260
+ verificationFailed(error: string, code?: StepUpVerificationErrorCode, detail?: StepUpErrorDetail): void;
261
+ /** Hosted mode: the hosted page finished, with the scopes it approved. */
262
+ hostedFinished(approvedScopes: string[]): void;
263
+ /** Hosted mode: the user denied on the hosted page. */
264
+ hostedDenied(): void;
265
+ toggleScope(name: string): void;
266
+ /** Ignored while no scope is checked. */
267
+ approve(): void;
268
+ deny(): void;
269
+ /** The host saved the approved scopes: go on to the face check or finish. */
270
+ permissionsSaved(): void;
271
+ /** The host could not save them: the step-up ends in error. */
272
+ permissionsSaveFailed(error: string): void;
273
+ };
274
+ type StepUpManager = ReturnType<typeof createStepUpManager>;
275
+ //#endregion
276
+ //#region src/modules/step-up/stepUpError.d.ts
277
+ /**
278
+ * Error passed to the step-up `onError` callback (and thrown for invalid
279
+ * options). `code` is stable; `message` is for developers, not end users.
280
+ * `detail` is what the workflow or hosted page reported underneath (set for
281
+ * `VERIFICATION_ERROR`, and for `FACE_CHECK_FAILED` from the workflow).
282
+ */
283
+ declare class StepUpError extends Error {
284
+ readonly code: StepUpErrorCode;
285
+ readonly stepUpId?: string;
286
+ readonly detail?: StepUpErrorDetail;
287
+ constructor(code: StepUpErrorCode, message: string, stepUpId?: string, detail?: StepUpErrorDetail);
288
+ }
289
+ declare function isStepUpError(error: unknown): error is StepUpError;
290
+ //#endregion
291
+ //#region src/modules/step-up/stepUpOptions.d.ts
292
+ /**
293
+ * Checks the consent block from the start response and fills in
294
+ * `displayName` (falls back to the scope name). Keeps each scope's boolean
295
+ * `autoSelect` and known `selectionMode`, and the valid limits of known
296
+ * scopes. Throws `INVALID_OPTIONS` when a required field is missing, or
297
+ * `durationSeconds` is not a positive number.
298
+ */
299
+ declare function normalizeStepUpPermissions(raw: unknown): StepUpPermissions;
300
+ /**
301
+ * Exact origin (`scheme://host[:port]`) of an absolute http(s) URL, or
302
+ * `undefined` when the URL is not one.
303
+ */
304
+ declare function getUrlOrigin(url: string): string | undefined;
305
+ /**
306
+ * Validates the `renderStepUp` options (everything except the DOM container,
307
+ * which the UI layer checks) and fills in defaults:
308
+ * `mode: 'embedded'`, `permissionsUi: 'sdk'`,
309
+ * `permissionsOrder: 'beforeFaceCheck'` (`'afterFaceCheck'` in hosted mode),
310
+ * `readyTimeoutMs: DEFAULT_STEP_UP_READY_TIMEOUT_MS` (15 s),
311
+ * `disableDashboardTheme: false`.
312
+ *
313
+ * Throws {@link StepUpError} with code `INVALID_OPTIONS`.
314
+ */
315
+ declare function validateStepUpOptions(raw: unknown): NormalizedStepUpOptions;
316
+ /**
317
+ * Picks the largest unit that divides the duration exactly, so
318
+ * 36000 s → 10 hours, 5400 s → 90 minutes. A duration that is not a whole
319
+ * number of minutes is rounded up to minutes (never shown shorter than it is),
320
+ * and anything under a minute stays in seconds.
321
+ */
322
+ declare function describeStepUpDuration(durationSeconds: number): StepUpDuration;
323
+ //#endregion
324
+ //#region src/modules/step-up/stepUpHostedMessage.d.ts
325
+ /**
326
+ * Tag on every step-up `postMessage`, both directions. Matches the local
327
+ * step-up mock's hosted page (contract P4.7 §6.6 reference implementation).
328
+ */
329
+ declare const STEP_UP_MESSAGE_SOURCE = "incode-step-up";
330
+ /**
331
+ * The parts of a browser `MessageEvent` the check needs. Kept structural so
332
+ * core never touches DOM types.
333
+ */
334
+ type HostedMessageEventLike = {
335
+ origin: string;
336
+ data: unknown;
337
+ };
338
+ /**
339
+ * True only when the message came from exactly `expectedOrigin`
340
+ * (scheme, host and port). No suffix or prefix matching:
341
+ * `https://onboarding.incode.com.evil.com` does not match
342
+ * `https://onboarding.incode.com`.
343
+ */
344
+ declare function isTrustedHostedOrigin(origin: string, expectedOrigin: string): boolean;
345
+ /**
346
+ * Reads a `postMessage` from the hosted step-up page.
347
+ *
348
+ * Pass only messages whose `source` is the step-up iframe's own window. The
349
+ * page tags messages `{ source: 'incode-step-up', type, ... }`:
350
+ * - `ready` — loaded; the parent answers with {@link createStepUpInitMessage}.
351
+ * - `finish` — `{ stepUpId, approvedScopes }`; the hosted page ran the face
352
+ * check and its own permissions screen. Read only when `stepUpId` is
353
+ * exactly `expectedStepUpId`; otherwise (missing or another step-up's)
354
+ * it is ignored, not relayed.
355
+ * - `error` — `{ code, message? }`, e.g. `USER_DENIED` or
356
+ * `FACE_CHECK_FAILED`. Ignored when it names another `stepUpId`.
357
+ *
358
+ * A tagged message from another origin returns `originMismatch` (the frame
359
+ * left the onboarding origin, for example after a redirect). Untagged
360
+ * messages are ignored.
361
+ */
362
+ declare function readHostedPageMessage(event: HostedMessageEventLike, expectedOrigin: string, expectedStepUpId: string): HostedPageMessage;
363
+ /** Message the parent posts to the hosted page after its `ready`. */
364
+ type StepUpInitMessage = {
365
+ source: typeof STEP_UP_MESSAGE_SOURCE;
366
+ type: 'init';
367
+ permissions: StepUpPermissions;
368
+ parentOrigin: string;
369
+ };
370
+ /**
371
+ * Builds the `init` message that hands the hosted page the permissions and
372
+ * the parent's origin (contract v0.2 §6.6; the page checks `parentOrigin`
373
+ * against its `returnOrigin`). The caller posts it with `targetOrigin` set to
374
+ * the exact onboarding origin, never `'*'`.
375
+ */
376
+ declare function createStepUpInitMessage(permissions: StepUpPermissions, parentOrigin: string): StepUpInitMessage;
377
+ //#endregion
378
+ export { type CreateStepUpManagerOptions, type HostedMessageEventLike, type HostedPageMessage, type NormalizedStepUpOptions, STEP_UP_MESSAGE_SOURCE, type StepUpClosedState, type StepUpDuration, StepUpError, type StepUpErrorCode, type StepUpErrorDetail, type StepUpErrorState, type StepUpFinishedState, type StepUpInitMessage, type StepUpLimit, type StepUpManager, type StepUpMode, type StepUpOptionsInput, type StepUpPermissions, type StepUpPermissionsOrder, type StepUpPermissionsState, type StepUpPermissionsUi, type StepUpResult, type StepUpScope, type StepUpState, type StepUpVerificationErrorCode, type StepUpVerifyingState, type StepUpWorkflowResult, createStepUpInitMessage, createStepUpManager, describeStepUpDuration, getUrlOrigin, isStepUpError, isTrustedHostedOrigin, normalizeStepUpPermissions, readHostedPageMessage, readWorkflowResult, validateStepUpOptions };