@incodetech/core 2.0.1-rc.0 → 2.1.0-rc.0

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 (218) hide show
  1. package/dist/{BrowserStorageProvider-CuOW1Er2.esm.js → BrowserStorageProvider-BpJM-gIl.esm.js} +8 -1
  2. package/dist/{IpifyProvider-D7jx52AL.esm.js → IpifyProvider-D4LWD15E.esm.js} +28 -0
  3. package/dist/{MotionSensorProvider-4v7xkqAp.esm.js → MotionSensorProvider-Bx7Mpzt0.esm.js} +63 -13
  4. package/dist/{OpenViduRecordingProvider-CMu6XVdc.esm.js → OpenViduRecordingProvider-O4GjBseO.esm.js} +1 -1
  5. package/dist/StateMachine-BC_nGvrc.d.ts +2 -0
  6. package/dist/StreamCanvasCapture-ImiDQdVA.esm.js +118 -0
  7. package/dist/StreamCanvasCapture-yyl20qd9.d.ts +152 -0
  8. package/dist/{BaseWasmProvider-C_DLEI40.esm.js → WasmUtilProvider-CiEN7Gjn.esm.js} +183 -11
  9. package/dist/{addressSearch-BpTbTWCa.esm.js → addressSearch-DvmWXKZg.esm.js} +63 -57
  10. package/dist/{ae-signature-DDDZmWXj.esm.js → ae-signature-BFZta3TZ.esm.js} +1 -1
  11. package/dist/ae-signature.d.ts +3 -3
  12. package/dist/ae-signature.esm.js +6 -5
  13. package/dist/antifraud.d.ts +5 -46
  14. package/dist/antifraud.esm.js +6 -43
  15. package/dist/antifraudManager-CkV4u-LE.esm.js +55 -0
  16. package/dist/antifraudManager-CznnhyvD.d.ts +63 -0
  17. package/dist/{antifraudStateMachine-O0TMf6yc.esm.js → antifraudStateMachine-Ccrb-Jxc.esm.js} +2 -2
  18. package/dist/apiError-B-j-gyDx.esm.js +51 -0
  19. package/dist/authentication.d.ts +13 -11
  20. package/dist/authentication.esm.js +26 -22
  21. package/dist/{authenticationManager-C83GNIhl.d.ts → authenticationManager-CIVY80H9.d.ts} +4 -4
  22. package/dist/{authenticationManager-5M-fKzXx.esm.js → authenticationManager-ZNotsWnC.esm.js} +6 -6
  23. package/dist/{authenticationStateMachine-BMZqatiF.esm.js → authenticationStateMachine-DksVbF_H.esm.js} +21 -9
  24. package/dist/{backCameraStream-DMdMeGk2.esm.js → backCameraStream-D7Wo4Nbx.esm.js} +95 -7
  25. package/dist/{session-CGtQJJzB.esm.js → browserSimulation-B1dWiXp7.esm.js} +61 -476
  26. package/dist/camera.d.ts +4 -3
  27. package/dist/camera.esm.js +4 -3
  28. package/dist/canvas-SKcRBxsk.esm.js +230 -0
  29. package/dist/consent.d.ts +4 -398
  30. package/dist/consent.esm.js +6 -77
  31. package/dist/consentManager-BLd51QiW.d.ts +419 -0
  32. package/dist/consentManager-BYo9Nu1r.esm.js +90 -0
  33. package/dist/{consentStateMachine-CCT-B60O.esm.js → consentStateMachine-BG3yL8aC.esm.js} +9 -6
  34. package/dist/cpf-ocr.d.ts +4 -199
  35. package/dist/cpf-ocr.esm.js +8 -177
  36. package/dist/cpfOcrManager-BnieFXuG.d.ts +216 -0
  37. package/dist/cpfOcrManager-sSKegxox.esm.js +190 -0
  38. package/dist/cross-document-data-match.d.ts +1 -1
  39. package/dist/cross-document-data-match.esm.js +4 -4
  40. package/dist/curp-validation.d.ts +8 -158
  41. package/dist/curp-validation.esm.js +6 -108
  42. package/dist/curpValidationManager-CFem6zP9.esm.js +122 -0
  43. package/dist/curpValidationManager-RttixpIc.d.ts +184 -0
  44. package/dist/{curpValidationStateMachine-CitWLr2c.esm.js → curpValidationStateMachine-B7V_qp66.esm.js} +20 -13
  45. package/dist/custom-fields.d.ts +2 -2
  46. package/dist/custom-fields.esm.js +4 -4
  47. package/dist/custom-watchlist.d.ts +1 -1
  48. package/dist/custom-watchlist.esm.js +4 -41
  49. package/dist/customWatchlistStateMachine-HmFybXLX.esm.js +50 -0
  50. package/dist/{deepsightLoader-Cm4JIT_z.esm.js → deepsightLoader-65k1Appi.esm.js} +19 -10
  51. package/dist/{deepsightService-CEVxzehb.d.ts → deepsightService-B7ShOkWL.d.ts} +8 -160
  52. package/dist/deepsightService-CrHmvx8X.esm.js +276 -0
  53. package/dist/device.esm.js +4 -3
  54. package/dist/document-capture.d.ts +992 -83
  55. package/dist/document-capture.esm.js +34 -8
  56. package/dist/document-upload.d.ts +47 -47
  57. package/dist/document-upload.esm.js +7 -7
  58. package/dist/{documentCaptureStateMachine-BqzTDy9k.esm.js → documentCaptureStateMachine-WYV1r9le.esm.js} +90 -6
  59. package/dist/dynamic-forms.d.ts +20 -5
  60. package/dist/dynamic-forms.esm.js +150 -61
  61. package/dist/ekyb.d.ts +32 -13
  62. package/dist/ekyb.esm.js +25 -15
  63. package/dist/{ekybStateMachine-BR2let5f.esm.js → ekybStateMachine-aYixw2sL.esm.js} +319 -207
  64. package/dist/ekyc.d.ts +10 -78
  65. package/dist/ekyc.esm.js +17 -12
  66. package/dist/{ekycStateMachine-oeO0Iekd.esm.js → ekycStateMachine-CXbpaJJn.esm.js} +201 -113
  67. package/dist/electronic-signature.d.ts +3 -3
  68. package/dist/electronic-signature.esm.js +5 -4
  69. package/dist/{electronicSignatureManager-D9OHzTpG.esm.js → electronicSignatureManager-BaECdJ1u.esm.js} +91 -23
  70. package/dist/email.d.ts +4 -3
  71. package/dist/email.esm.js +6 -5
  72. package/dist/{emailManager-wAV0LE-H.esm.js → emailManager--D5G3ChB.esm.js} +30 -7
  73. package/dist/{emailManager-DIfnS5g1.d.ts → emailManager-lAzDoQOs.d.ts} +66 -8
  74. package/dist/{emailStateMachine-DOf4j58N.esm.js → emailStateMachine-CxTOMAjC.esm.js} +46 -11
  75. package/dist/{endpoints-CnN3SyDa.esm.js → endpoints-BeTK0Mlt.esm.js} +6 -3
  76. package/dist/{events-D6-e4vok.esm.js → events-Dvvriq9l.esm.js} +3 -1
  77. package/dist/events.d.ts +2 -0
  78. package/dist/events.esm.js +1 -1
  79. package/dist/extensibility.d.ts +32 -16
  80. package/dist/extensibility.esm.js +55 -33
  81. package/dist/face-match.d.ts +32 -2
  82. package/dist/face-match.esm.js +5 -5
  83. package/dist/{faceCaptureManagerFactory-yqtpxjnN.d.ts → faceCaptureManagerFactory-C_hRHx8a.d.ts} +35 -11
  84. package/dist/{faceCaptureManagerFactory-Dh2PdGlF.esm.js → faceCaptureManagerFactory-kqbUqtrr.esm.js} +21 -5
  85. package/dist/{faceCaptureSetup-B3faSpYA.esm.js → faceCaptureSetup-CtvHWd3x.esm.js} +68 -183
  86. package/dist/{faceMatchStateMachine-DNFrxTFS.esm.js → faceMatchStateMachine-DdGXUBnx.esm.js} +60 -6
  87. package/dist/field-comparison.d.ts +4 -0
  88. package/dist/field-comparison.esm.js +7 -0
  89. package/dist/fieldComparisonManager-Bu5TaSr3.d.ts +76 -0
  90. package/dist/fieldComparisonManager-COGI2ARD.esm.js +162 -0
  91. package/dist/fiscal-qr.d.ts +59 -0
  92. package/dist/fiscal-qr.esm.js +323 -0
  93. package/dist/flow-events.d.ts +6 -5
  94. package/dist/flow.d.ts +23 -15
  95. package/dist/flow.esm.js +63 -17
  96. package/dist/flowCompletionService-BdR2cGgB.d.ts +19 -0
  97. package/dist/flowCompletionService-DdGojV9K.esm.js +20 -0
  98. package/dist/{flowServices-DG3IdWw6.esm.js → flowServices-BTuHLHVr.esm.js} +10 -5
  99. package/dist/geolocation.d.ts +4 -4
  100. package/dist/geolocation.esm.js +6 -6
  101. package/dist/{geolocationStateMachine-asasuHY2.esm.js → geolocationStateMachine-Dvh7X0wF.esm.js} +5 -5
  102. package/dist/getBrowser-C8DP7oTB.esm.js +8 -0
  103. package/dist/{getBrowser-BSXUTWXw.esm.js → getDeviceClass-C0olyNFS.esm.js} +1 -8
  104. package/dist/{getDeviceClass-BSntT9_j.esm.js → getDeviceClass-C8Do2qYu.esm.js} +1 -1
  105. package/dist/government-validation.d.ts +28 -8
  106. package/dist/government-validation.esm.js +19 -8
  107. package/dist/{governmentValidationStateMachine-BDDYrJTo.esm.js → governmentValidationStateMachine-DcJ-BfsC.esm.js} +35 -77
  108. package/dist/home.d.ts +15 -14
  109. package/dist/home.esm.js +2 -2
  110. package/dist/http-Cai3IoLS.esm.js +0 -0
  111. package/dist/http.esm.js +1 -0
  112. package/dist/id-ocr.d.ts +54 -54
  113. package/dist/id-ocr.esm.js +5 -5
  114. package/dist/id-verification.d.ts +27 -27
  115. package/dist/id-verification.esm.js +4 -4
  116. package/dist/id.d.ts +12 -10
  117. package/dist/id.esm.js +36 -26
  118. package/dist/{idCaptureManager-Fyd0eam-.d.ts → idCaptureManager-D-QYESvF.d.ts} +28 -14
  119. package/dist/{idCaptureManager-ZPkD7Gjk.esm.js → idCaptureManager-DGVv5l1_.esm.js} +22 -7
  120. package/dist/{idCaptureStateMachine-BK0bPHoc.esm.js → idCaptureStateMachine-DHi7HydI.esm.js} +172 -123
  121. package/dist/{idOcrStateMachine-YbjjC_Gg.esm.js → idOcrStateMachine-CDQ5d_VM.esm.js} +4 -4
  122. package/dist/{idVerificationStateMachine-xbw9HP1Z.esm.js → idVerificationStateMachine-kRxwImzO.esm.js} +2 -2
  123. package/dist/identity-reuse.d.ts +4 -530
  124. package/dist/identity-reuse.esm.js +8 -274
  125. package/dist/identityReuseManager-C6n_97dw.esm.js +95 -0
  126. package/dist/identityReuseManager-DwLtVzUn.d.ts +428 -0
  127. package/dist/identityReuseStateMachine-BfE5YiEr.esm.js +148 -0
  128. package/dist/{index-BcRG8rtJ.d.ts → index-B5hPA0Bg.d.ts} +2 -2
  129. package/dist/{index-DZoqeAo9.d.ts → index-B9NysVDB.d.ts} +469 -195
  130. package/dist/index.d.ts +2 -2
  131. package/dist/index.esm.js +10 -8
  132. package/dist/{invokeOnCaptureCallback-rc6kBHo5.esm.js → invokeOnCaptureCallback-ygByVdnn.esm.js} +1 -1
  133. package/dist/{lib-BB0B_qQX.esm.js → lib-BY67lgbq.esm.js} +1 -1
  134. package/dist/mandatory-consent.d.ts +8 -412
  135. package/dist/mandatory-consent.esm.js +6 -76
  136. package/dist/mandatoryConsentManager-H6D18cZB.esm.js +89 -0
  137. package/dist/mandatoryConsentManager-KfIlURRY.d.ts +429 -0
  138. package/dist/{mandatoryConsentStateMachine-Cnco1jvn.esm.js → mandatoryConsentStateMachine-DtQNW1ji.esm.js} +6 -6
  139. package/dist/openviduLazy-B8L--0oe.esm.js +3 -0
  140. package/dist/{openviduLazy-Cok70ZSg.esm.js → openviduLazy-Dh14JNJc.esm.js} +2 -2
  141. package/dist/otp-CGMdUzBC.esm.js +33 -0
  142. package/dist/otp-DF5A0sFx.d.ts +8 -0
  143. package/dist/permissionGuards-C1ispV96.esm.js +23 -0
  144. package/dist/permissionServices-CG3bMSfG.esm.js +130 -0
  145. package/dist/phone.d.ts +4 -3
  146. package/dist/phone.esm.js +6 -5
  147. package/dist/{phoneManager-DAJbGhlY.esm.js → phoneManager-BmF-0Ez4.esm.js} +30 -7
  148. package/dist/{phoneManager-B6M30hKE.d.ts → phoneManager-fPmIBYQK.d.ts} +65 -7
  149. package/dist/{phoneStateMachine-CuPARRaT.esm.js → phoneStateMachine-BiV0yoEx.esm.js} +46 -11
  150. package/dist/{qe-signature-DFo_Cc-I.esm.js → qe-signature-CUYPcHVo.esm.js} +1 -1
  151. package/dist/qe-signature.d.ts +3 -3
  152. package/dist/qe-signature.esm.js +6 -5
  153. package/dist/{recordingService-Ig2UgbLv.esm.js → recordingService-Bn9EdCmz.esm.js} +197 -179
  154. package/dist/redirect-to-mobile.d.ts +6 -104
  155. package/dist/redirect-to-mobile.esm.js +6 -99
  156. package/dist/redirectToMobileManager-BNe3IzC_.d.ts +178 -0
  157. package/dist/redirectToMobileManager-Dy3t7o0C.esm.js +159 -0
  158. package/dist/{redirectToMobileStateMachine-BOEqe46A.esm.js → redirectToMobileStateMachine-DyAdRxfP.esm.js} +28 -19
  159. package/dist/{runChildModule-CqqwqAkW.esm.js → runChildModule-CuoHZ1cx.esm.js} +35 -3
  160. package/dist/selfie.d.ts +13 -11
  161. package/dist/selfie.esm.js +27 -23
  162. package/dist/{selfieManager-Duisl7qN.esm.js → selfieManager-BjCoKRy0.esm.js} +6 -6
  163. package/dist/{selfieManager-D0lSgd-J.d.ts → selfieManager-dUbKRzOh.d.ts} +4 -4
  164. package/dist/{selfieStateMachine-D76whWEf.esm.js → selfieStateMachine-b4F2q9zw.esm.js} +5 -3
  165. package/dist/session-DoVb-OcB.esm.js +152 -0
  166. package/dist/session.d.ts +37 -5
  167. package/dist/session.esm.js +12 -7
  168. package/dist/sessionInitializer-B8H5MsXM.esm.js +366 -0
  169. package/dist/{setup-C5AITV8m.d.ts → setup-BbkprdVv.d.ts} +57 -6
  170. package/dist/{setup-DsM8IG7k.esm.js → setup-BqEfrdja.esm.js} +162 -24
  171. package/dist/signature.d.ts +2 -2
  172. package/dist/signature.esm.js +4 -4
  173. package/dist/{signatureStateMachine-B5-QVUve.esm.js → signatureStateMachine-C5qqYLRz.esm.js} +3 -3
  174. package/dist/stats-BMNUG1AU.esm.js +41 -0
  175. package/dist/stats.d.ts +13 -2
  176. package/dist/stats.esm.js +3 -2
  177. package/dist/trust-graph.d.ts +33 -4
  178. package/dist/trust-graph.esm.js +21 -15
  179. package/dist/{types-CFV9G_7j.d.ts → types-Bj9hdFjU.d.ts} +1 -1
  180. package/dist/{types-BP1m8VRw.d.ts → types-DOUhndhT.d.ts} +14 -2
  181. package/dist/types-DsnEVMhr.esm.js +34 -0
  182. package/dist/types-DvGZI7BF.d.ts +131 -0
  183. package/dist/{types-B06Ypu2F.d.ts → types-NuT8ftBV.d.ts} +1 -1
  184. package/dist/types-ya0LN_MX.d.ts +5 -0
  185. package/dist/{warmup-CEcppFiS.d.ts → warmup-Dg8Lh-50.d.ts} +8 -0
  186. package/dist/wasm.d.ts +6 -4
  187. package/dist/wasm.esm.js +11 -9
  188. package/dist/watchlist-for-business.d.ts +1 -1
  189. package/dist/watchlist-for-business.esm.js +5 -73
  190. package/dist/watchlist.d.ts +1 -1
  191. package/dist/watchlist.esm.js +4 -41
  192. package/dist/watchlistForBusinessStateMachine-DMl8j2Ov.esm.js +74 -0
  193. package/dist/watchlistStateMachine-DmQlqI6L.esm.js +50 -0
  194. package/dist/workflow.d.ts +153 -100
  195. package/dist/workflow.esm.js +156 -80
  196. package/package.json +19 -1
  197. package/dist/StateMachine-BCQrZJhf.d.ts +0 -2
  198. package/dist/WasmUtilProvider-j98OJf-S.esm.js +0 -114
  199. package/dist/browserSimulation-gxD8cSpM.esm.js +0 -20
  200. package/dist/deepsightService-O74l4Y__.esm.js +0 -489
  201. package/dist/displayErrors-DqJ_IbsG.d.ts +0 -39
  202. package/dist/flowCompletionService-DhkT4SRY.d.ts +0 -10
  203. package/dist/flowCompletionService-P54yzGvA.esm.js +0 -13
  204. package/dist/openviduLazy-Cm0XFh_v.esm.js +0 -3
  205. package/dist/permissionServices-D_i6nzEw.esm.js +0 -50
  206. package/dist/stats-CIfiPzb1.esm.js +0 -16
  207. package/dist/types-CAD4va6a.d.ts +0 -5
  208. package/dist/watchlistServices-DMbUhkBX.esm.js +0 -12
  209. /package/dist/{Actor-CI32dTbG.d.ts → Actor-Y0_Fj-KL.d.ts} +0 -0
  210. /package/dist/{ITimerCapability-C67ZRskg.esm.js → ITimerCapability-CB0I1Uf2.esm.js} +0 -0
  211. /package/dist/{Manager-C8PrhBOx.d.ts → Manager-BHn8wH8K.d.ts} +0 -0
  212. /package/dist/{camera-PA2Ljri3.esm.js → camera-DJWm3V4g.esm.js} +0 -0
  213. /package/dist/{camera-DBSxa6ML.d.ts → camera-SRBpPq2X.d.ts} +0 -0
  214. /package/dist/{chunk-CRF6K_H_.esm.js → chunk-CMUKZ2uL.esm.js} +0 -0
  215. /package/dist/{cpf-PPz2Njto.esm.js → cpf-BRzggV8G.esm.js} +0 -0
  216. /package/dist/{dateUtils-UoN5xswP.esm.js → dateUtils-AksLQmgV.esm.js} +0 -0
  217. /package/dist/{platform-CfrjKhmi.esm.js → platform-SKvEfCBh.esm.js} +0 -0
  218. /package/dist/{xstate.esm-B70JrNqo.esm.js → xstate.esm-C9wncMQa.esm.js} +0 -0
@@ -1,4 +1,4 @@
1
- import { n as WasmPipeline } from "./warmup-CEcppFiS.js";
1
+ import { n as WasmPipeline } from "./warmup-Dg8Lh-50.js";
2
2
 
3
3
  //#region src/setup.d.ts
4
4
 
@@ -6,6 +6,17 @@ import { n as WasmPipeline } from "./warmup-CEcppFiS.js";
6
6
  * WASM warmup configuration. Path fields are optional; omitted values resolve to the Incode CDN defaults.
7
7
  */
8
8
  type WasmConfig = {
9
+ /**
10
+ * Self-hosted WASM root directory. Resolves standard ml-wasm-kit filenames
11
+ * under this path (`webLib.wasm`, `webLib.js`, `models/`, etc.). Pin a
12
+ * specific version folder when self-hosting so SDK updates do not change
13
+ * which binaries your app loads until you update this path.
14
+ *
15
+ * Example: `https://my-cdn.example.com/ml-wasm-kit-release/v2.13.21`
16
+ *
17
+ * Individual path fields override values derived from `basePath`.
18
+ */
19
+ basePath?: string;
9
20
  /** Path to the WASM binary */
10
21
  wasmPath?: string;
11
22
  /** Path to the SIMD-optimized WASM binary (optional) */
@@ -92,6 +103,18 @@ type SetupOptions = {
92
103
  * handshake at `setup()`. Coordinate with your Incode account team before
93
104
  * flipping this on.
94
105
  *
106
+ * **API key transmission.** E2EE requests must identify the tenant in one
107
+ * of two ways:
108
+ * - Append `/0` to the `apiURL` (e.g. `https://<e2ee-host>/0`) — the
109
+ * trailing `/0` instructs the server to derive the API key from the
110
+ * session JWT. Use this whenever a session token is in play.
111
+ * - Pass `customHeaders: { 'x-api-key': '<api key>' }` — required when
112
+ * the `apiURL` does not include `/0` (sessionless setup, or any flow
113
+ * that supplies the API key in the header instead of via JWT).
114
+ *
115
+ * Without one of these the server cannot identify the tenant and
116
+ * post-handshake requests fail.
117
+ *
95
118
  * Accepts:
96
119
  * - `true` → enabled with the default OAEP MGF1 hash (`'sha1'`).
97
120
  * - `false` (or omitted) → disabled.
@@ -122,6 +145,15 @@ type SetupOptions = {
122
145
  encryption?: boolean | EncryptionOptions;
123
146
  /** Optional hosting app identifier for fingerprint tracking */
124
147
  hostingApp?: string;
148
+ /**
149
+ * Disables the third-party public-IP lookup (`api.ipify.org`) used to
150
+ * enrich fingerprint and deepsight payloads. When `false`, the SDK uses
151
+ * an empty IP string and never hits ipify.
152
+ *
153
+ * OR'd with the server-side `DISABLE_IPIFY` feature flag. Default: `true`
154
+ * (lookup enabled).
155
+ */
156
+ ipLookup?: boolean;
125
157
  };
126
158
  /**
127
159
  * Initializes the SDK with the provided configuration.
@@ -165,13 +197,12 @@ type SetupOptions = {
165
197
  * });
166
198
  * ```
167
199
  *
168
- * @example Self-hosted / custom version (full or partial path overrides)
200
+ * @example Self-hosted WASM (pin a version folder on your CDN)
169
201
  * ```ts
170
202
  * await setup({
171
203
  * apiURL: 'https://api.incode.com',
172
204
  * wasm: {
173
- * wasmPath: '/my-cdn/webLib.wasm',
174
- * glueCodePath: '/my-cdn/webLib.js',
205
+ * basePath: 'https://my-cdn.example.com/ml-wasm-kit-release/v2.13.21',
175
206
  * },
176
207
  * });
177
208
  * ```
@@ -197,16 +228,36 @@ type SetupOptions = {
197
228
  *
198
229
  * @example Enable end-to-end encryption at boot (defaults to MGF1 = SHA-1)
199
230
  * ```ts
200
- * await setup({ apiURL: 'https://api.incode.com', encryption: true });
231
+ * // `/0` lets the server read the API key from the session JWT.
232
+ * await setup({
233
+ * apiURL: 'https://your-e2ee-api.incodesmile.com/0',
234
+ * encryption: true,
235
+ * });
201
236
  * ```
202
237
  *
203
238
  * @example Enable encryption with the SHA-256 MGF1 padding
204
239
  * ```ts
205
240
  * await setup({
206
- * apiURL: 'https://api.incode.com',
241
+ * apiURL: 'https://your-e2ee-api.incodesmile.com/0',
207
242
  * encryption: { mgf1: 'sha256' },
208
243
  * });
209
244
  * ```
245
+ *
246
+ * @example E2EE without the `/0` suffix — pass the API key explicitly
247
+ * ```ts
248
+ * await setup({
249
+ * apiURL: 'https://your-e2ee-api.incodesmile.com',
250
+ * encryption: true,
251
+ * customHeaders: { 'x-api-key': process.env.INCODE_API_KEY },
252
+ * });
253
+ * ```
254
+ * @example Disable third-party IP lookup
255
+ * ```ts
256
+ * await setup({
257
+ * apiURL: 'https://api.incode.com',
258
+ * ipLookup: false,
259
+ * });
260
+ * ```
210
261
  */
211
262
  declare function setup(options: SetupOptions): Promise<void>;
212
263
  /**
@@ -1,15 +1,15 @@
1
- import { a as executeWasmRequest, c as setupWasmConnection, i as WasmWebClientError, n as warmupWasm, o as initializeWasmWebClient, s as setWebApiHttpTransport } from "./BaseWasmProvider-C_DLEI40.esm.js";
2
- import { t as WasmUtilProvider } from "./WasmUtilProvider-j98OJf-S.esm.js";
1
+ import { a as WasmWebClientError, c as setWebApiHttpTransport, f as deriveSiblingJsPath, l as setupWasmConnection, o as executeWasmRequest, r as warmupWasm, s as initializeWasmWebClient, t as WasmUtilProvider } from "./WasmUtilProvider-CiEN7Gjn.esm.js";
3
2
  import { t as BrowserTimerProvider } from "./BrowserTimerProvider-DhNc_x02.esm.js";
4
3
  import { a as resetApi, i as isApiConfigured, n as getApi, o as setClient, r as getToken, t as api } from "./api-CESGtpbH.esm.js";
5
- import { _ as resetAnalyticsBatcher, g as getAnalyticsBatcher, m as createAnalyticsBatchingService, v as setAnalyticsBatcher } from "./events-D6-e4vok.esm.js";
6
- import { t as endpoints } from "./endpoints-CnN3SyDa.esm.js";
7
- import { i as resetSessionInit, r as initializeSession } from "./session-CGtQJJzB.esm.js";
4
+ import { _ as resetAnalyticsBatcher, g as getAnalyticsBatcher, m as createAnalyticsBatchingService, v as setAnalyticsBatcher } from "./events-Dvvriq9l.esm.js";
5
+ import { t as endpoints } from "./endpoints-BeTK0Mlt.esm.js";
6
+ import { r as resetDeviceStatsQueue, t as addDeviceStats } from "./stats-BMNUG1AU.esm.js";
7
+ import { a as setClientIpLookupEnabled, i as resetSessionInit, r as initializeSession } from "./sessionInitializer-B8H5MsXM.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.21";
12
+ const DEFAULT_WASM_VERSION = "v2.14.07-post7";
13
13
  const PATH_KEYS = [
14
14
  "wasmPath",
15
15
  "wasmSimdPath",
@@ -74,9 +74,9 @@ function pickPath(key, overrides, defaultValue) {
74
74
  }
75
75
  return raw.trim();
76
76
  }
77
- /** Builds the standard WarmupConfig from the Incode CDN. */
78
- function buildDefaultWasmConfig() {
79
- const base = `${WASM_CDN_BASE_URL}/${DEFAULT_WASM_VERSION}`;
77
+ /** Builds a WarmupConfig from a directory that mirrors the ml-wasm-kit CDN layout. */
78
+ function buildWasmConfigFromBasePath(basePath) {
79
+ const base = basePath.endsWith("/") ? basePath.slice(0, -1) : basePath;
80
80
  return {
81
81
  wasmPath: `${base}/webLib.wasm`,
82
82
  wasmSimdPath: `${base}/webLibSimd.wasm`,
@@ -85,21 +85,17 @@ function buildDefaultWasmConfig() {
85
85
  modelsBasePath: `${base}/models`
86
86
  };
87
87
  }
88
- /**
89
- * Derives a sibling `.js` glue path from a `.wasm` binary path. Used when the
90
- * caller supplies `wasmSimdPath` but no explicit `glueCodeSimdPath`, mirroring
91
- * the legacy CDN naming convention (`webLibSimd.wasm` <-> `webLibSimd.js`).
92
- */
93
- function deriveSiblingJsPath(wasmPath) {
94
- return wasmPath.replace(/\.wasm($|\?)/, ".js$1");
88
+ /** Builds the standard WarmupConfig from the Incode CDN. */
89
+ function buildDefaultWasmConfig() {
90
+ return buildWasmConfigFromBasePath(`${WASM_CDN_BASE_URL}/${DEFAULT_WASM_VERSION}`);
95
91
  }
96
92
  /**
97
93
  * Merges optional WASM path overrides with CDN defaults. Explicit non-blank
98
94
  * paths take precedence. Blank override strings log a warning and fall back to defaults.
99
95
  */
100
96
  function resolveWasmConfig(overrides) {
101
- const defaults = buildDefaultWasmConfig();
102
- if (!overrides) return defaults;
97
+ if (!overrides) return buildDefaultWasmConfig();
98
+ const defaults = buildWasmConfigFromBasePath(pickPath("basePath", overrides, `${WASM_CDN_BASE_URL}/${DEFAULT_WASM_VERSION}`));
103
99
  const simdDefault = defaults.wasmSimdPath ?? defaults.wasmPath;
104
100
  const modelsDefault = defaults.modelsBasePath ?? (() => {
105
101
  const lastSlash = defaults.wasmPath.lastIndexOf("/");
@@ -670,9 +666,127 @@ async function withHandshakeFailureContext(wantsEncryption, fn) {
670
666
  }
671
667
  }
672
668
 
669
+ //#endregion
670
+ //#region ../infra/src/providers/browser/DevtoolsDetectorProvider.ts
671
+ var DevtoolsDetectorProvider = class {
672
+ constructor() {
673
+ this.detectorPaused = true;
674
+ this.isDevtoolsOpen = false;
675
+ }
676
+ start(options) {
677
+ if (!this.canUseDevtoolsDetector() || this.heart) return;
678
+ this.startDetector({
679
+ pollingIntervalSeconds: .25,
680
+ maxMillisBeforeAckWhenClosed: 100,
681
+ moreAnnoyingDebuggerStatements: 1,
682
+ onDetectOpen: options.onInspectorOpened,
683
+ onDetectClose: void 0,
684
+ startup: "asap"
685
+ });
686
+ }
687
+ stop() {
688
+ this.clearNextPulse();
689
+ this.resolveVerdict?.(null);
690
+ this.resolveVerdict = void 0;
691
+ this.heart?.terminate();
692
+ this.heart = void 0;
693
+ this.detectorPaused = true;
694
+ this.isDevtoolsOpen = false;
695
+ }
696
+ canUseDevtoolsDetector() {
697
+ return typeof globalThis !== "undefined" && typeof Worker !== "undefined" && typeof URL !== "undefined" && typeof URL.createObjectURL === "function" && typeof Blob !== "undefined";
698
+ }
699
+ createDetectorWorker() {
700
+ return new Worker(URL.createObjectURL(new Blob([`"use strict";
701
+ onmessage = (ev) => { postMessage({isOpenBeat:true});
702
+ debugger; for (let i = 0; i < ev.data.moreDebugs; i++) { debugger; }
703
+ postMessage({isOpenBeat:false});
704
+ };`], { type: "text/javascript" })));
705
+ }
706
+ clearNextPulse() {
707
+ if (this.nextPulseTimeout !== void 0) {
708
+ clearTimeout(this.nextPulseTimeout);
709
+ this.nextPulseTimeout = void 0;
710
+ }
711
+ }
712
+ doOnePulse(moreDebugs) {
713
+ this.heart?.postMessage({ moreDebugs });
714
+ }
715
+ startDetector(config) {
716
+ this.heart = this.createDetectorWorker();
717
+ const onHeartMsg = (msg) => {
718
+ if (msg.data.isOpenBeat) new Promise((resolve) => {
719
+ this.resolveVerdict = resolve;
720
+ setTimeout(() => {
721
+ this.resolveVerdict?.(true);
722
+ }, config.maxMillisBeforeAckWhenClosed + 1);
723
+ }).then((verdict) => {
724
+ if (verdict === null) return;
725
+ if (verdict !== this.isDevtoolsOpen) {
726
+ this.isDevtoolsOpen = verdict;
727
+ if (verdict) config.onDetectOpen();
728
+ else if (config.onDetectClose) config.onDetectClose();
729
+ }
730
+ this.clearNextPulse();
731
+ this.nextPulseTimeout = setTimeout(() => {
732
+ this.nextPulseTimeout = void 0;
733
+ this.doOnePulse(config.moreAnnoyingDebuggerStatements);
734
+ }, config.pollingIntervalSeconds * 1e3);
735
+ });
736
+ else this.resolveVerdict?.(false);
737
+ };
738
+ this.heart.addEventListener("message", onHeartMsg);
739
+ const resume = () => {
740
+ if (!this.detectorPaused) return;
741
+ this.detectorPaused = false;
742
+ this.doOnePulse(config.moreAnnoyingDebuggerStatements);
743
+ };
744
+ switch (config.startup) {
745
+ case "manual": break;
746
+ case "asap":
747
+ resume();
748
+ break;
749
+ case "domContentLoaded":
750
+ if (typeof document !== "undefined" && document.readyState !== "loading") resume();
751
+ else if (typeof document !== "undefined") document.addEventListener("DOMContentLoaded", resume, { once: true });
752
+ break;
753
+ }
754
+ }
755
+ };
756
+
757
+ //#endregion
758
+ //#region src/internal/device/devtoolsDetectorBridge.ts
759
+ const devtoolsDetector = new DevtoolsDetectorProvider();
760
+ async function reportInspectorOpened() {
761
+ try {
762
+ (await WasmUtilProvider.getInstance()).setInspectorOpened(true);
763
+ } catch {
764
+ return;
765
+ }
766
+ addDeviceStats({ inspectorOpened: true });
767
+ }
768
+ /**
769
+ * Starts the devtools inspector detector (ported from legacy welcome `setupFiles`).
770
+ */
771
+ function startDevtoolsDetector() {
772
+ devtoolsDetector.start({ onInspectorOpened: () => {
773
+ reportInspectorOpened();
774
+ } });
775
+ }
776
+ /**
777
+ * Stops the devtools detector. Invoked from {@link reset}.
778
+ */
779
+ function stopDevtoolsDetector() {
780
+ devtoolsDetector.stop();
781
+ }
782
+
673
783
  //#endregion
674
784
  //#region src/setup.ts
675
785
  let wasmConfig;
786
+ /**
787
+ * Legacy Java backend default for OAEP MGF1 padding compatibility.
788
+ * Most existing Incode E2EE environments expect this.
789
+ */
676
790
  const DEFAULT_MGF1 = "sha1";
677
791
  /**
678
792
  * Normalizes the public `encryption` option into the internal shape used by
@@ -738,13 +852,12 @@ let configured = false;
738
852
  * });
739
853
  * ```
740
854
  *
741
- * @example Self-hosted / custom version (full or partial path overrides)
855
+ * @example Self-hosted WASM (pin a version folder on your CDN)
742
856
  * ```ts
743
857
  * await setup({
744
858
  * apiURL: 'https://api.incode.com',
745
859
  * wasm: {
746
- * wasmPath: '/my-cdn/webLib.wasm',
747
- * glueCodePath: '/my-cdn/webLib.js',
860
+ * basePath: 'https://my-cdn.example.com/ml-wasm-kit-release/v2.13.21',
748
861
  * },
749
862
  * });
750
863
  * ```
@@ -770,18 +883,39 @@ let configured = false;
770
883
  *
771
884
  * @example Enable end-to-end encryption at boot (defaults to MGF1 = SHA-1)
772
885
  * ```ts
773
- * await setup({ apiURL: 'https://api.incode.com', encryption: true });
886
+ * // `/0` lets the server read the API key from the session JWT.
887
+ * await setup({
888
+ * apiURL: 'https://your-e2ee-api.incodesmile.com/0',
889
+ * encryption: true,
890
+ * });
774
891
  * ```
775
892
  *
776
893
  * @example Enable encryption with the SHA-256 MGF1 padding
777
894
  * ```ts
778
895
  * await setup({
779
- * apiURL: 'https://api.incode.com',
896
+ * apiURL: 'https://your-e2ee-api.incodesmile.com/0',
780
897
  * encryption: { mgf1: 'sha256' },
781
898
  * });
782
899
  * ```
900
+ *
901
+ * @example E2EE without the `/0` suffix — pass the API key explicitly
902
+ * ```ts
903
+ * await setup({
904
+ * apiURL: 'https://your-e2ee-api.incodesmile.com',
905
+ * encryption: true,
906
+ * customHeaders: { 'x-api-key': process.env.INCODE_API_KEY },
907
+ * });
908
+ * ```
909
+ * @example Disable third-party IP lookup
910
+ * ```ts
911
+ * await setup({
912
+ * apiURL: 'https://api.incode.com',
913
+ * ipLookup: false,
914
+ * });
915
+ * ```
783
916
  */
784
917
  async function setup(options) {
918
+ if (options.ipLookup !== void 0) setClientIpLookupEnabled(options.ipLookup);
785
919
  if (!getAnalyticsBatcher()) setAnalyticsBatcher(createAnalyticsBatchingService({
786
920
  endpoint: endpoints.events,
787
921
  authToken: () => getToken(),
@@ -815,6 +949,7 @@ async function setup(options) {
815
949
  ...effectiveWasm,
816
950
  pipelines: effectiveWasm.pipelines ? [...effectiveWasm.pipelines] : void 0
817
951
  });
952
+ startDevtoolsDetector();
818
953
  }
819
954
  }
820
955
  /**
@@ -874,8 +1009,11 @@ function isConfigured() {
874
1009
  * Resets the SDK configuration. Useful for testing.
875
1010
  */
876
1011
  function reset() {
1012
+ stopDevtoolsDetector();
1013
+ resetDeviceStatsQueue();
877
1014
  resetApi();
878
1015
  resetSessionInit();
1016
+ setClientIpLookupEnabled(true);
879
1017
  resetAnalyticsBatcher();
880
1018
  resetHttpClientState();
881
1019
  configured = false;
@@ -884,4 +1022,4 @@ function reset() {
884
1022
  }
885
1023
 
886
1024
  //#endregion
887
- export { setup as a, buildDefaultWasmConfig as c, setWasmConfig as i, resolveWasmConfig as l, isConfigured as n, upgradeToWasmHttpClient$1 as o, reset as r, DEFAULT_WASM_VERSION as s, initializeWasmUtil as t };
1025
+ export { setup as a, buildDefaultWasmConfig as c, setWasmConfig as i, buildWasmConfigFromBasePath as l, isConfigured as n, upgradeToWasmHttpClient$1 as o, reset as r, DEFAULT_WASM_VERSION as s, initializeWasmUtil as t, resolveWasmConfig as u };
@@ -1,5 +1,5 @@
1
- import { t as Manager } from "./Manager-C8PrhBOx.js";
2
- import "./Actor-CI32dTbG.js";
1
+ import { t as Manager } from "./Manager-BHn8wH8K.js";
2
+ import "./Actor-Y0_Fj-KL.js";
3
3
 
4
4
  //#region src/modules/signature/types.d.ts
5
5
  /**
@@ -1,8 +1,8 @@
1
1
  import "./api-CESGtpbH.esm.js";
2
- import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-D6-e4vok.esm.js";
3
- import "./endpoints-CnN3SyDa.esm.js";
4
- import { c as createManager, s as createActor } from "./xstate.esm-B70JrNqo.esm.js";
5
- import { t as signatureMachine } from "./signatureStateMachine-B5-QVUve.esm.js";
2
+ import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dvvriq9l.esm.js";
3
+ import "./endpoints-BeTK0Mlt.esm.js";
4
+ import { c as createManager, s as createActor } from "./xstate.esm-C9wncMQa.esm.js";
5
+ import { t as signatureMachine } from "./signatureStateMachine-C5qqYLRz.esm.js";
6
6
 
7
7
  //#region src/modules/signature/signatureActor.ts
8
8
  function createSignatureActor(options) {
@@ -1,7 +1,7 @@
1
1
  import { t as api } from "./api-CESGtpbH.esm.js";
2
- import { h as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-D6-e4vok.esm.js";
3
- import { t as endpoints } from "./endpoints-CnN3SyDa.esm.js";
4
- import { a as fromPromise, r as assign, t as setup } from "./xstate.esm-B70JrNqo.esm.js";
2
+ import { h as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-Dvvriq9l.esm.js";
3
+ import { t as endpoints } from "./endpoints-BeTK0Mlt.esm.js";
4
+ import { a as fromPromise, r as assign, t as setup } from "./xstate.esm-C9wncMQa.esm.js";
5
5
 
6
6
  //#region src/modules/signature/signatureServices.ts
7
7
  /**
@@ -0,0 +1,41 @@
1
+ import { r as getToken, t as api } from "./api-CESGtpbH.esm.js";
2
+ import { t as endpoints } from "./endpoints-BeTK0Mlt.esm.js";
3
+
4
+ //#region src/modules/stats/statsServices.ts
5
+ const deviceStatsQueue = [];
6
+ async function postDeviceStatsNow(stats) {
7
+ try {
8
+ await api.post(endpoints.deviceStats, stats);
9
+ } catch {
10
+ return;
11
+ }
12
+ }
13
+ /**
14
+ * Sends device stats to the backend. Queues payloads until a session token is set
15
+ * and {@link flushDeviceStatsQueue} runs after fingerprint submission.
16
+ */
17
+ async function addDeviceStats(stats) {
18
+ if (!getToken()) {
19
+ deviceStatsQueue.push(stats);
20
+ return;
21
+ }
22
+ await postDeviceStatsNow(stats);
23
+ }
24
+ /**
25
+ * Flushes stats queued before the session token was available. Call after device
26
+ * fingerprint submission succeeds (legacy `emptyDeviceStatsQueue` parity).
27
+ */
28
+ function flushDeviceStatsQueue() {
29
+ if (!getToken()) return;
30
+ const queued = deviceStatsQueue.splice(0);
31
+ for (const stats of queued) postDeviceStatsNow(stats);
32
+ }
33
+ /**
34
+ * Clears the pre-session queue. For testing only.
35
+ */
36
+ function resetDeviceStatsQueue() {
37
+ deviceStatsQueue.length = 0;
38
+ }
39
+
40
+ //#endregion
41
+ export { flushDeviceStatsQueue as n, resetDeviceStatsQueue as r, addDeviceStats as t };
package/dist/stats.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  //#region src/modules/stats/statsServices.d.ts
2
2
  type LabelInspectionStatus = 'FAIL' | 'PASS';
3
3
  type DeviceStats = {
4
+ inspectorOpened?: boolean;
4
5
  cameraLabelInspectionStatus?: LabelInspectionStatus;
5
6
  virtualCameraDetected?: boolean;
6
7
  frontIdStatsAnalysisStatus?: string;
@@ -9,8 +10,18 @@ type DeviceStats = {
9
10
  motionStatus?: string;
10
11
  };
11
12
  /**
12
- * Sends device stats to the backend.
13
+ * Sends device stats to the backend. Queues payloads until a session token is set
14
+ * and {@link flushDeviceStatsQueue} runs after fingerprint submission.
13
15
  */
14
16
  declare function addDeviceStats(stats: DeviceStats): Promise<void>;
17
+ /**
18
+ * Flushes stats queued before the session token was available. Call after device
19
+ * fingerprint submission succeeds (legacy `emptyDeviceStatsQueue` parity).
20
+ */
21
+ declare function flushDeviceStatsQueue(): void;
22
+ /**
23
+ * Clears the pre-session queue. For testing only.
24
+ */
25
+ declare function resetDeviceStatsQueue(): void;
15
26
  //#endregion
16
- export { type DeviceStats, type LabelInspectionStatus, addDeviceStats };
27
+ export { type DeviceStats, type LabelInspectionStatus, addDeviceStats, flushDeviceStatsQueue, resetDeviceStatsQueue };
package/dist/stats.esm.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import "./api-CESGtpbH.esm.js";
2
- import { t as addDeviceStats } from "./stats-CIfiPzb1.esm.js";
2
+ import "./endpoints-BeTK0Mlt.esm.js";
3
+ import { n as flushDeviceStatsQueue, r as resetDeviceStatsQueue, t as addDeviceStats } from "./stats-BMNUG1AU.esm.js";
3
4
 
4
- export { addDeviceStats };
5
+ export { addDeviceStats, flushDeviceStatsQueue, resetDeviceStatsQueue };
@@ -1,4 +1,5 @@
1
- import { t as Manager } from "./Manager-C8PrhBOx.js";
1
+ import { t as Manager } from "./Manager-BHn8wH8K.js";
2
+ import * as xstate585 from "xstate";
2
3
 
3
4
  //#region src/modules/trust-graph/trustGraphManager.d.ts
4
5
  type TrustGraphIdleState = {
@@ -31,15 +32,43 @@ type TrustGraphState = TrustGraphIdleState | TrustGraphFinishedState;
31
32
  */
32
33
  declare function createTrustGraphManager(): Manager<TrustGraphState> & {
33
34
  /**
34
- * Kicks off the trust-graph module.
35
- * Transitions immediately from 'idle' to 'finished' (backend-only, no SDK action).
35
+ * Retained for API compatibility. Trust-graph is a headless skip module
36
+ * whose machine starts in `finished` (backend-only, no SDK action), so there
37
+ * is nothing to kick off and calling this has no effect.
38
+ *
39
+ * @deprecated The module completes on its own as soon as the manager is
40
+ * created; reading `getState()` / subscribing is sufficient.
36
41
  */
37
42
  load(): void;
38
43
  };
39
44
  type TrustGraphManager = ReturnType<typeof createTrustGraphManager>;
40
45
  //#endregion
41
46
  //#region src/modules/trust-graph/trustGraphStateMachine.d.ts
42
- declare const trustGraphMachine: any;
47
+ type TrustGraphContext = Record<string, never>;
48
+ /**
49
+ * Trust-graph is a headless "skip" module: it has no UI and the SDK performs no
50
+ * client-side action. The backend runs the analysis from session data already
51
+ * collected, so the machine must reach its `final` state as soon as it starts.
52
+ *
53
+ * The flow orchestrator invokes this machine via `runChildModule` and advances
54
+ * the flow only when the invoked machine *completes* (reaches a top-level
55
+ * `final` state) — it never sends a kickoff event. A machine that waited for an
56
+ * external event (e.g. `LOAD`) would therefore never complete inside a flow,
57
+ * leaving an empty shell on screen and the session permanently incomplete.
58
+ *
59
+ * Mirror the `noOpFlowModuleMachine` / `identitySearchMachine` headless pattern:
60
+ * start directly in the `final` state.
61
+ */
62
+ declare const trustGraphMachine: xstate585.StateMachine<TrustGraphContext, xstate585.AnyEventObject, {}, never, never, never, never, "finished", string, xstate585.NonReducibleUnknown, xstate585.NonReducibleUnknown, xstate585.EventObject, xstate585.MetaObject, {
63
+ readonly id: "trust-graph";
64
+ readonly initial: "finished";
65
+ readonly context: {};
66
+ readonly states: {
67
+ readonly finished: {
68
+ readonly type: "final";
69
+ };
70
+ };
71
+ }>;
43
72
  //#endregion
44
73
  //#region src/modules/trust-graph/types.d.ts
45
74
  /**
@@ -1,19 +1,27 @@
1
1
  import "./api-CESGtpbH.esm.js";
2
- import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-D6-e4vok.esm.js";
3
- import { c as createManager, s as createActor, t as setup } from "./xstate.esm-B70JrNqo.esm.js";
2
+ import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dvvriq9l.esm.js";
3
+ import { c as createManager, s as createActor, t as setup } from "./xstate.esm-C9wncMQa.esm.js";
4
4
 
5
5
  //#region src/modules/trust-graph/trustGraphStateMachine.ts
6
- const trustGraphMachine = setup({ types: {
7
- context: {},
8
- events: {}
9
- } }).createMachine({
6
+ /**
7
+ * Trust-graph is a headless "skip" module: it has no UI and the SDK performs no
8
+ * client-side action. The backend runs the analysis from session data already
9
+ * collected, so the machine must reach its `final` state as soon as it starts.
10
+ *
11
+ * The flow orchestrator invokes this machine via `runChildModule` and advances
12
+ * the flow only when the invoked machine *completes* (reaches a top-level
13
+ * `final` state) — it never sends a kickoff event. A machine that waited for an
14
+ * external event (e.g. `LOAD`) would therefore never complete inside a flow,
15
+ * leaving an empty shell on screen and the session permanently incomplete.
16
+ *
17
+ * Mirror the `noOpFlowModuleMachine` / `identitySearchMachine` headless pattern:
18
+ * start directly in the `final` state.
19
+ */
20
+ const trustGraphMachine = setup({ types: { context: {} } }).createMachine({
10
21
  id: "trust-graph",
11
- initial: "idle",
22
+ initial: "finished",
12
23
  context: {},
13
- states: {
14
- idle: { on: { LOAD: { target: "finished" } } },
15
- finished: { type: "final" }
16
- }
24
+ states: { finished: { type: "final" } }
17
25
  });
18
26
 
19
27
  //#endregion
@@ -28,10 +36,8 @@ function mapState(snapshot) {
28
36
  if (snapshot.matches("finished")) return { status: "finished" };
29
37
  return { status: "idle" };
30
38
  }
31
- function createApi({ actor }) {
32
- return { load() {
33
- actor.send({ type: "LOAD" });
34
- } };
39
+ function createApi(_options) {
40
+ return { load() {} };
35
41
  }
36
42
  /**
37
43
  * Creates a trust-graph manager for headless usage.
@@ -1,4 +1,4 @@
1
- import { t as CameraStream } from "./camera-DBSxa6ML.js";
1
+ import { t as CameraStream } from "./camera-SRBpPq2X.js";
2
2
 
3
3
  //#region src/modules/document-upload/types.d.ts
4
4
 
@@ -1,4 +1,5 @@
1
- import { t as DocumentUploadConfig } from "./types-CFV9G_7j.js";
1
+ import { t as DocumentUploadConfig } from "./types-Bj9hdFjU.js";
2
+ import { s as RiskAddon } from "./types-DvGZI7BF.js";
2
3
 
3
4
  //#region src/modules/flow/types.d.ts
4
5
  type EmptyConfig = Record<string, never>;
@@ -25,6 +26,16 @@ type TutorialIdConfig = {
25
26
  usSmartCapture: boolean;
26
27
  showCaptureButtonInAuto?: boolean;
27
28
  alwaysCaptureBackOfId?: boolean;
29
+ /**
30
+ * [ENG-44176] When `false`, the SDK forwards `extractIdFace=false` to
31
+ * `POST /omni/add/front-id/v2` (and to the manual-upload + digital-upload
32
+ * variants), so the backend skips biometric face extraction and no
33
+ * biometric template is created. Omitted / `true` preserves current
34
+ * behavior. Use in jurisdictions with biometric-consent restrictions
35
+ * (e.g. Quebec / Law 25); downstream face-match will not be available
36
+ * for the resulting session.
37
+ */
38
+ extractIdFace?: boolean;
28
39
  perCountryPerDocOverrides: Record<string, Record<string, {
29
40
  onlyFront: boolean;
30
41
  onlyBack: boolean;
@@ -91,7 +102,7 @@ type FlowModuleConfig = {
91
102
  uniqueBeneficialOwnerSource: 'userInput';
92
103
  };
93
104
  EXTERNAL_VERIFICATION: {
94
- source: 'US_DRIVERS_LICENSE_1' | 'US_TELCO_1' | 'US_TELCO_2' | 'US_CONSUMER_1' | 'US_CREDIT_BUREAU_1' | 'MX_CONSUMER_1' | 'BR_GOVT_1' | 'CA_RES_CREDIT' | 'UK_CREDIT_BUREAU_1' | 'ES_1' | 'CL_1' | 'AR_1' | 'GR_1' | 'GT_1' | 'BR_CPF_1';
105
+ source: 'US_DRIVERS_LICENSE_1' | 'US_TELCO_1' | 'US_TELCO_2' | 'US_CONSUMER_1' | 'US_CREDIT_BUREAU_1' | 'MX_CONSUMER_1' | 'BR_GOVT_1' | 'CA_RES_CREDIT' | 'UK_CREDIT_BUREAU_1' | 'ES_1' | 'CL_1' | 'AR_1' | 'GR_1' | 'GT_1' | 'BR_CPF_1' | 'RISK_ADDONS_ONLY';
95
106
  checkName: boolean;
96
107
  nameSource: 'userInput' | 'document' | 'poa' | 'phoneModuleInput' | 'emailModuleInput';
97
108
  checkEmail: boolean;
@@ -120,6 +131,7 @@ type FlowModuleConfig = {
120
131
  idNum1Source: 'userInput' | 'document' | 'poa' | 'phoneModuleInput' | 'emailModuleInput';
121
132
  checkGender: boolean;
122
133
  genderSource: 'userInput' | 'document' | 'poa' | 'phoneModuleInput' | 'emailModuleInput';
134
+ riskAddons?: RiskAddon[];
123
135
  };
124
136
  EMAIL: {
125
137
  otpVerification: boolean;