@incodetech/core 2.5.0-agentic.2 → 2.5.0-agentic.3

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 (121) hide show
  1. package/dist/{FaceDetectionProvider-ClZEDaLF.esm.js → FaceDetectionProvider-CAPKXGuF.esm.js} +4 -4
  2. package/dist/ae-signature.esm.js +1 -1
  3. package/dist/{apiError-CWjo9dzH.esm.js → apiError-CmvdtW2M.esm.js} +1 -1
  4. package/dist/authentication.d.ts +3 -3
  5. package/dist/authentication.esm.js +2 -2
  6. package/dist/{authenticationManager-D_qFuB3y.esm.js → authenticationManager-CsioEjTk.esm.js} +3 -3
  7. package/dist/{authenticationManager-CkD0JR7Q.d.ts → authenticationManager-D_dz2zK4.d.ts} +1 -1
  8. package/dist/{authenticationStateMachine-DJJWTDZS.esm.js → authenticationStateMachine-BoGEvdpR.esm.js} +3 -3
  9. package/dist/{browser-pQZA35G2-B4Dwja1e.esm.js → browser-pQZA35G2-DveVe0Ui.esm.js} +1 -1
  10. package/dist/consent.d.ts +1 -1
  11. package/dist/{consentManager-B0YKqYtZ.d.ts → consentManager-CMed_O5F.d.ts} +8 -8
  12. package/dist/curp-validation.d.ts +1 -1
  13. package/dist/{curpValidationManager-HOidAKvT.d.ts → curpValidationManager-tNhzv7vZ.d.ts} +1 -1
  14. package/dist/{deepsightCaptureConfig-XPx0BN30.esm.js → deepsightCaptureConfig-tYJhVK_Z.esm.js} +2 -2
  15. package/dist/{deepsightLoader-Bvs8HYaK.esm.js → deepsightLoader-VASYET0q.esm.js} +4 -4
  16. package/dist/{desktopCameraElection-CdrLiJTn.esm.js → desktopCameraElection-Bx8PyF2-.esm.js} +4 -4
  17. package/dist/document-capture.d.ts +1 -1
  18. package/dist/document-signature.esm.js +1 -1
  19. package/dist/{documentCaptureManager-sJWgqtUy.d.ts → documentCaptureManager-Bul0b4KJ.d.ts} +5 -5
  20. package/dist/{documentSignatureStateMachine-oqU3EPca.esm.js → documentSignatureStateMachine-BeA6fc5n.esm.js} +1 -1
  21. package/dist/dynamic-forms.esm.js +2 -2
  22. package/dist/{dynamicFormsManager-YGL7Avp-.esm.js → dynamicFormsManager-f5Uyu4UK.esm.js} +1 -1
  23. package/dist/{dynamicFormsStateMachine-BE_WfmVE.esm.js → dynamicFormsStateMachine-Dkug_fKn.esm.js} +1 -1
  24. package/dist/ekyb.d.ts +1 -1
  25. package/dist/ekyb.esm.js +2 -2
  26. package/dist/{ekybManager-35NxvxZK.esm.js → ekybManager-KiG_tDCV.esm.js} +1 -1
  27. package/dist/{ekybStateMachine-BD4zpC3O.esm.js → ekybStateMachine-dDlZntM8.esm.js} +1 -1
  28. package/dist/ekyc-prefill.d.ts +1 -1
  29. package/dist/ekyc-prefill.esm.js +2 -2
  30. package/dist/ekyc.d.ts +2 -2
  31. package/dist/ekyc.esm.js +3 -3
  32. package/dist/{ekycManager-D2K8AaMV.esm.js → ekycManager-SUIAHlrm.esm.js} +1 -1
  33. package/dist/{ekycManager-DusmB-4j.d.ts → ekycManager-mv2rWxc4.d.ts} +1 -1
  34. package/dist/{ekycPrefillManager-CxzjSch2.esm.js → ekycPrefillManager-BsFZnV2a.esm.js} +1 -1
  35. package/dist/{ekycPrefillManager-BwmPXfhY.d.ts → ekycPrefillManager-QKqXYPH_.d.ts} +5 -5
  36. package/dist/{ekycPrefillStateMachine-x6skDqhq.esm.js → ekycPrefillStateMachine-B6ZTcy7R.esm.js} +21 -4
  37. package/dist/{ekycStateMachine-6EKndBd7.esm.js → ekycStateMachine-Czn2CaTV.esm.js} +134 -3
  38. package/dist/{ekycUtils-C6HZB46m.esm.js → ekycUtils-BnTyeA-_.esm.js} +12 -0
  39. package/dist/electronic-signature.esm.js +1 -1
  40. package/dist/{electronicSignatureManager-BYJHywZK.esm.js → electronicSignatureManager-BIjhPcO0.esm.js} +1 -1
  41. package/dist/extensibility.d.ts +15 -15
  42. package/dist/extensibility.esm.js +13 -13
  43. package/dist/{faceCaptureManagerFactory-CYr2rVEj.esm.js → faceCaptureManagerFactory-6Hk2GxNz.esm.js} +2 -2
  44. package/dist/{faceCaptureManagerFactory-D1EJw36F.d.ts → faceCaptureManagerFactory-B1WfKaGJ.d.ts} +3 -3
  45. package/dist/{faceCaptureSetup-DadLKnMf.esm.js → faceCaptureSetup-BM0mj2GE.esm.js} +7 -7
  46. package/dist/{feature-management-CUzbPq54.esm.js → feature-management-DG39VwqE.esm.js} +1 -1
  47. package/dist/feature-management.esm.js +1 -1
  48. package/dist/flow-events.d.ts +1 -1
  49. package/dist/flow.d.ts +6 -6
  50. package/dist/flow.esm.js +3 -3
  51. package/dist/{flowCompletionService-BSiUcHmU.esm.js → flowCompletionService-QycHxT5Z.esm.js} +1 -1
  52. package/dist/{flowServices-BIMnpB8Q.esm.js → flowServices-5d7en_Aq.esm.js} +5 -5
  53. package/dist/geolocation.d.ts +1 -1
  54. package/dist/geolocation.esm.js +2 -2
  55. package/dist/{geolocationManager-CENrvxpK.d.ts → geolocationManager-Del2ddmt.d.ts} +1 -1
  56. package/dist/{geolocationManager-D7J-rLJp.esm.js → geolocationManager-_DJwOuei.esm.js} +1 -1
  57. package/dist/{geolocationStateMachine-5g2Quxbz.esm.js → geolocationStateMachine-CyjGgKJ7.esm.js} +1 -1
  58. package/dist/home.d.ts +1 -1
  59. package/dist/id-ocr.d.ts +1 -1
  60. package/dist/id-selfie-flow.d.ts +1 -1
  61. package/dist/id-selfie-flow.esm.js +6 -6
  62. package/dist/id.d.ts +2 -2
  63. package/dist/id.esm.js +3 -3
  64. package/dist/{idCaptureManager-Du5jr3gJ.esm.js → idCaptureManager-BjTr4lOA.esm.js} +4 -4
  65. package/dist/{idCaptureManager-CNFBeYgV.d.ts → idCaptureManager-DXqvtLr9.d.ts} +2 -2
  66. package/dist/{idCaptureServices-N0sn1AOF.esm.js → idCaptureServices-D6sRW-qd.esm.js} +2 -2
  67. package/dist/{idCaptureStateMachine-CHk0uv1U.esm.js → idCaptureStateMachine-BBlWr1aL.esm.js} +45 -25
  68. package/dist/{idOcrManager-DflRx-_u.d.ts → idOcrManager-voLpv_jJ.d.ts} +1 -1
  69. package/dist/identity-reuse.d.ts +1 -1
  70. package/dist/{identityReuseManager-CZ-qJ_Aa.d.ts → identityReuseManager-D_jiHp1n.d.ts} +4 -4
  71. package/dist/{index-bsGvWr9-.d.ts → index-B3BI8mVu.d.ts} +12 -3
  72. package/dist/{index-BoGlwLGK.d.ts → index-BnKhmWhM.d.ts} +1 -1
  73. package/dist/index.d.ts +1 -1
  74. package/dist/index.esm.js +1 -1
  75. package/dist/kyb-checks.esm.js +2 -2
  76. package/dist/{kybChecksManager-CDxP2pYP.esm.js → kybChecksManager-Cpm2waJh.esm.js} +1 -1
  77. package/dist/{kybChecksStateMachine-ZOKNXTUx.esm.js → kybChecksStateMachine-Cg96E65N.esm.js} +1 -1
  78. package/dist/mandatory-consent.d.ts +2 -2
  79. package/dist/{mandatoryConsentManager-BcxCesP5.d.ts → mandatoryConsentManager-D2LkPii6.d.ts} +9 -9
  80. package/dist/qe-signature.esm.js +1 -1
  81. package/dist/{recordingService-Cg-DwTxA.esm.js → recordingService-wGNpJV_s.esm.js} +1 -1
  82. package/dist/{runChildModule-Dd-tXDh2.esm.js → runChildModule-DCXy_h7V.esm.js} +1 -1
  83. package/dist/{numericRange-2e1vw1W0.esm.js → scriptCharacters-D7swUycV.esm.js} +13 -1
  84. package/dist/{sdkVersion-DDHH3E2F.esm.js → sdkVersion-CzRrIbvf.esm.js} +1 -1
  85. package/dist/selfie.d.ts +3 -3
  86. package/dist/selfie.esm.js +7 -7
  87. package/dist/{selfieErrorUtils-Dtm9bDS7.esm.js → selfieErrorUtils-DFJC36jx.esm.js} +1 -1
  88. package/dist/{selfieManager-CqDlUy6B.d.ts → selfieManager-B2j448t4.d.ts} +1 -1
  89. package/dist/{selfieManager-BYJPzJW1.esm.js → selfieManager-KXkwfGvO.esm.js} +3 -3
  90. package/dist/{selfieStateMachine-DGg7S9O6.esm.js → selfieStateMachine-CqHL6qf_.esm.js} +3 -3
  91. package/dist/{session-B49EJzZg.esm.js → session-DhNeT_WW.esm.js} +4 -4
  92. package/dist/session.d.ts +1 -1
  93. package/dist/session.esm.js +4 -4
  94. package/dist/{sessionInitializer-CaY5gnUl.esm.js → sessionInitializer-CfF_kFfS.esm.js} +6 -6
  95. package/dist/{setup-B7SDCbtu.esm.js → setup-BoCn7daH.esm.js} +8 -7
  96. package/dist/{setup-CTnxQSQW.d.ts → setup-DprzbOsJ.d.ts} +1 -1
  97. package/dist/tri-D5hWs0qJ.esm.js +559 -0
  98. package/dist/tri.d.ts +1 -1
  99. package/dist/{tri.esm-CftnGf9w.esm.js → tri.esm-DnXGKdlE.esm.js} +1296 -1057
  100. package/dist/tri.esm.js +1 -1
  101. package/dist/trueSight-CXzqdA0V.esm.js +1 -0
  102. package/dist/{trueSightService-BWDGk571.esm.js → trueSightService-BYsRo-fK.esm.js} +1 -1
  103. package/dist/{types-BZsmNYom.d.ts → types-BFoC3IpR.d.ts} +2 -2
  104. package/dist/{types-PnJXvTkV.d.ts → types-BkxI3PHf.d.ts} +1 -1
  105. package/dist/{types-D-FEM1rT.d.ts → types-BxJWsAHc.d.ts} +4 -4
  106. package/dist/{types-HHgsFhZn.d.ts → types-CAzi8tyi.d.ts} +1 -1
  107. package/dist/types-CEdI4tfR.d.ts +6 -0
  108. package/dist/{types-tOSLpcSa.d.ts → types-CkzE2gPZ.d.ts} +5 -0
  109. package/dist/{types-LbccjQYX.d.ts → types-DuARPzVa.d.ts} +1 -1
  110. package/dist/video-selfie.d.ts +1 -1
  111. package/dist/video-selfie.esm.js +3 -3
  112. package/dist/{videoSelfieCameraWarmer-DFhlGeRd.esm.js → videoSelfieCameraWarmer-Co4dAC64.esm.js} +3 -3
  113. package/dist/{videoSelfieStepDetector-CxOc3kSI.d.ts → videoSelfieStepDetector-CrlbZ-rN.d.ts} +2 -2
  114. package/dist/wasm.d.ts +1 -1
  115. package/dist/wasm.esm.js +1 -1
  116. package/dist/workflow.d.ts +1 -1
  117. package/dist/workflow.esm.js +19 -19
  118. package/package.json +4 -3
  119. package/dist/tri-DBB-iiN3.esm.js +0 -385
  120. package/dist/trueSight-Dg3TSVN7.esm.js +0 -1
  121. package/dist/types-BinnzVrL.d.ts +0 -6
@@ -1,385 +0,0 @@
1
- import { t as SDK_VERSION } from "./sdkVersion-DDHH3E2F.esm.js";
2
- import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
3
- import { t as BrowserLazyImportProvider } from "./BrowserLazyImportProvider-BhoA957O.esm.js";
4
- //#region ../infra/src/providers/browser/TransactionalRiskIntelligenceProvider.ts
5
- const LAZY_IMPORT_OPTIONS = {
6
- label: "TRI",
7
- moduleName: "@incodetech/tri-sdk",
8
- timeoutMs: 1e4,
9
- disabledMessage: "TRI will be disabled for this session."
10
- };
11
- const importSdk = () => import("./tri.esm-CftnGf9w.esm.js");
12
- /**
13
- * Concrete implementation of {@link ITransactionalRiskIntelligenceCapability}.
14
- *
15
- * This is the **only** file in the repo that references `@incodetech/tri-sdk`.
16
- * The third-party module is loaded via a dynamic `import()` the first time
17
- * {@link setup} is called, so consumers that never opt into TRI (i.e. never
18
- * pass `tri` to `setup()`) do not pay the bundle cost.
19
- *
20
- * `start()`, `stop()`, `reset()`, and `linkInterview()` require a prior
21
- * successful `setup()` call. The SDK cannot start without the foundation,
22
- * collection-status check, and managers that `setup()` establishes. Calling
23
- * these methods before `setup()` is a no-op that returns `'init-failed'` or
24
- * `false` respectively.
25
- *
26
- * The dynamic `import('@incodetech/tri-sdk')` is managed by
27
- * {@link BrowserLazyImportProvider}, which races the import against a
28
- * {@link LOAD_TIMEOUT_MS}-ms timeout. On timeout the provider warns, clears
29
- * the cached promise (so a subsequent `setup()` can retry), and resolves
30
- * `undefined`, gracefully disabling TRI for the session.
31
- */
32
- var TransactionalRiskIntelligenceProvider = class TransactionalRiskIntelligenceProvider {
33
- constructor() {
34
- this._isStarted = false;
35
- this._isSetUp = false;
36
- this._lazySdk = BrowserLazyImportProvider.getInstance().create(importSdk, LAZY_IMPORT_OPTIONS);
37
- }
38
- static getInstance() {
39
- return this._instance ??= new TransactionalRiskIntelligenceProvider();
40
- }
41
- static resetInstance() {
42
- this._instance = void 0;
43
- }
44
- get isStarted() {
45
- return this._isStarted;
46
- }
47
- get isSetUp() {
48
- return this._isSetUp;
49
- }
50
- get pendingSetup() {
51
- return this._pendingSetup;
52
- }
53
- async createSession(apiKeyOrOptions, options) {
54
- const module = await this._lazySdk.load();
55
- if (!module) return {
56
- token: null,
57
- expiresAt: null,
58
- tokenType: null,
59
- eventsCollectionEnabled: false,
60
- error: {
61
- status: 0,
62
- message: "TRI SDK failed to load"
63
- }
64
- };
65
- if (typeof apiKeyOrOptions === "object" && apiKeyOrOptions !== null) return module.createSession(apiKeyOrOptions);
66
- return module.createSession(apiKeyOrOptions, {
67
- ...options,
68
- apiURL: options?.apiURL ?? ""
69
- });
70
- }
71
- /**
72
- * Lazy-loads `@incodetech/tri-sdk` on first call (with a {@link LOAD_TIMEOUT_MS}-ms
73
- * timeout), then delegates to its `setup()`. Returns a promise that resolves
74
- * once the SDK module has been fetched and the backend collection-status
75
- * check has completed.
76
- *
77
- * When `config.autostart` is `true` (the default), the underlying `setup()`
78
- * also calls `start()` and returns `'started'` on success. `_isStarted` is
79
- * updated to reflect the resulting state so that `isTRIStarted()` is
80
- * accurate immediately after `setup()` returns.
81
- *
82
- * The call is {@link pendingSetup} until it settles.
83
- */
84
- setup(config) {
85
- const setup = this._setup(config).finally(() => {
86
- if (this._pendingSetup === setup) this._pendingSetup = void 0;
87
- });
88
- this._pendingSetup = setup;
89
- return setup;
90
- }
91
- async _setup(config) {
92
- try {
93
- const module = await this._lazySdk.load();
94
- if (!module) return "init-failed";
95
- const state = await module.default.setup(config);
96
- this._isSetUp = true;
97
- if (state === "started") this._isStarted = true;
98
- return state;
99
- } catch {
100
- return "init-failed";
101
- }
102
- }
103
- /**
104
- * Begins behavioral data collection. Requires a prior successful `setup()`.
105
- * Returns `'init-failed'` without starting if called before `setup()`.
106
- */
107
- async start() {
108
- const state = await (this._getSdk()?.start() ?? Promise.resolve("init-failed"));
109
- this._isStarted = state === "started";
110
- return state;
111
- }
112
- /**
113
- * Stops all collectors and managers. No-op when called before `setup()`.
114
- */
115
- async stop() {
116
- const state = await (this._getSdk()?.stop() ?? Promise.resolve("init-failed"));
117
- this._isStarted = false;
118
- return state;
119
- }
120
- /**
121
- * Resets the TRI SDK to its initial state. No-op when called before `setup()`.
122
- */
123
- async reset() {
124
- const state = await (this._getSdk()?.reset() ?? Promise.resolve("init-failed"));
125
- this._isStarted = false;
126
- this._isSetUp = false;
127
- return state;
128
- }
129
- /**
130
- * Links an interview to the current TRI activity. Returns `false` when
131
- * called before `setup()` or when the backend request fails. Never throws,
132
- * so the boot/flow path is never blocked by a failed link.
133
- *
134
- * @param sessionToken - The Incode session token to link.
135
- */
136
- async linkInterview(sessionToken) {
137
- try {
138
- return await this._getSdk()?.linkInterview(sessionToken) ?? false;
139
- } catch {
140
- return false;
141
- }
142
- }
143
- /**
144
- * TRI's fpSignals PID and DEVICE results. Resolves `null` before `setup()`
145
- * and on any failure, so a caller can always fall back to its own runtime.
146
- */
147
- async getFpSignals() {
148
- try {
149
- return await this._getSdk()?.getFpSignals() ?? null;
150
- } catch {
151
- return null;
152
- }
153
- }
154
- /**
155
- * Passes one signed result of the host's runtime to TRI, unchanged. Returns
156
- * `false` before `setup()` and on any failure.
157
- */
158
- addFpSignals(signals) {
159
- try {
160
- return this._getSdk()?.addFpSignals(signals) ?? false;
161
- } catch {
162
- return false;
163
- }
164
- }
165
- /**
166
- * The current activity id, or `null` when TRI is not loaded or not set up,
167
- * has no active activity, or fails. Reads only an already loaded TRI.
168
- */
169
- getActivityId() {
170
- try {
171
- return this._getSdk()?.getActivityId() ?? null;
172
- } catch {
173
- return null;
174
- }
175
- }
176
- _getSdk() {
177
- return this._lazySdk.get()?.default ?? null;
178
- }
179
- };
180
- //#endregion
181
- //#region src/integrations/tri/tri.ts
182
- const SDK_HOST = {
183
- platform: "sdk2",
184
- version: SDK_VERSION
185
- };
186
- const FP_SIGNALS_WAIT_MS = 5e3;
187
- let sdkOwnsTRI = false;
188
- /**
189
- * Returns the active TRI capability implementation.
190
- *
191
- * Core functions depend on {@link ITransactionalRiskIntelligenceCapability}
192
- * (the interface) rather than the concrete provider class. The provider is
193
- * referenced here only to supply the default singleton. This integration
194
- * module is the single owner of the concrete provider reference — the rest of
195
- * core goes through these functions ({@link isTRIStarted},
196
- * {@link resetTRIProviderInstance}, etc.) instead of importing the provider.
197
- */
198
- function getProvider() {
199
- return TransactionalRiskIntelligenceProvider.getInstance();
200
- }
201
- /**
202
- * Returns `true` when TRI collectors are currently running (a successful
203
- * `setupTRI()` autostart or explicit `startTRI()`, with no subsequent
204
- * `stopTRI()`/`resetTRI()`). Returns `false` before setup or after teardown.
205
- */
206
- function isTRIStarted() {
207
- return getProvider().isStarted;
208
- }
209
- /**
210
- * Discards the cached TRI provider singleton so the next access constructs a
211
- * fresh instance. Call from the SDK's `reset()` after `resetTRI()` to clear
212
- * the `isStarted` flag and lazy-import state.
213
- */
214
- function resetTRIProviderInstance() {
215
- TransactionalRiskIntelligenceProvider.resetInstance();
216
- }
217
- async function createTRISession(apiKeyOrOptions, options) {
218
- if (typeof apiKeyOrOptions === "object" && apiKeyOrOptions !== null) return getProvider().createSession(apiKeyOrOptions);
219
- return getProvider().createSession(apiKeyOrOptions, options);
220
- }
221
- /**
222
- * Initializes TRI in a single step: resolves the config, calls `setupTRI`
223
- * (which autostarts unless `config.autostart` is `false`), and optionally
224
- * links the current Incode session.
225
- *
226
- * Returns the resolved {@link TransactionalRiskIntelligenceState}. If the
227
- * config cannot be resolved (e.g. missing `token` or `apiURL`), returns
228
- * `'init-failed'` after emitting a `[TRI]` warning.
229
- *
230
- * When `config.autostart` is `false`, the underlying `setupTRI` returns
231
- * `'ready'` without starting collection — call `startTRI()` explicitly when
232
- * ready (e.g. after a consent gate). Linking is skipped in that case since
233
- * TRI has not started.
234
- *
235
- * A TRI that is already set up, typically by the host through
236
- * `@incodetech/core/tri`, is reused instead, after any setup still in flight
237
- * finishes: `config` is ignored (with a `[TRI]` warning), the session is linked
238
- * to the running activity, and the result is `'started'`, or `'ready'` when it
239
- * is not running. The host keeps owning it, so `reset()` leaves it running.
240
- *
241
- * @param config - TRI setup config (must include `token` and `apiURL`).
242
- * @param options - Optional session-linking hints (`sessionToken`).
243
- */
244
- async function initializeTRI(config, options = {}) {
245
- const resolvedTriConfig = resolveTRIConfig(config);
246
- if (!resolvedTriConfig) return "init-failed";
247
- const provider = getProvider();
248
- while (provider.pendingSetup) await provider.pendingSetup;
249
- if (provider.isSetUp) {
250
- console.warn("[TRI] Already set up: reusing the running TRI. This tri config is ignored.");
251
- if (isTRIStarted() && options.sessionToken) await linkSessionWithTRI(options.sessionToken);
252
- return isTRIStarted() ? "started" : "ready";
253
- }
254
- sdkOwnsTRI = true;
255
- const state = await setupTRI(resolvedTriConfig);
256
- if (isTRIStarted() && options.sessionToken) await linkSessionWithTRI(options.sessionToken);
257
- return state;
258
- }
259
- /**
260
- * TRI's fpSignals PID and DEVICE results, waiting at most
261
- * {@link FP_SIGNALS_WAIT_MS} for the module to finish. Resolves `null` when
262
- * TRI is not started, its `fpsignals` collector is off or failed (CSP, load
263
- * error), or the wait ran out. The strings are signed: pass them on unchanged.
264
- */
265
- async function readTRIFpSignals() {
266
- if (!isTRIStarted()) return null;
267
- const timer = BrowserTimerProvider.getInstance();
268
- let timeout;
269
- const timedOut = new Promise((resolve) => {
270
- timeout = timer.setTimeout(() => resolve(null), FP_SIGNALS_WAIT_MS);
271
- });
272
- try {
273
- return await Promise.race([getProvider().getFpSignals(), timedOut]);
274
- } finally {
275
- if (timeout !== void 0) timer.clearTimeout(timeout);
276
- }
277
- }
278
- /**
279
- * Passes one signed result of the SDK's runtime to TRI as an `fp_signals`
280
- * event, unchanged. Returns `false` when TRI is not started or runs its own
281
- * `fpsignals` collector.
282
- */
283
- function addTRIFpSignals(signals) {
284
- return getProvider().addFpSignals(signals);
285
- }
286
- /**
287
- * The id of TRI's current activity, for the host's server to send to the
288
- * Decision API. Read it right before each request and never keep it: the
289
- * activity can change while the page is open (after 60 minutes, or on a
290
- * back-forward cache restore). Returns `null` when TRI is not started or no
291
- * activity is active. Synchronous; never throws and never loads TRI.
292
- */
293
- function getTRIActivityId() {
294
- return getProvider().getActivityId();
295
- }
296
- /**
297
- * Calls the provider's `setup()` with the given config. This is the step that
298
- * lazy-loads `@incodetech/tri-sdk`, validates the config, and checks the
299
- * backend collection-status endpoint. When `config.autostart` is `true` (the
300
- * default), also calls `start()` internally and returns `'started'` on
301
- * success. Pass `autostart: false` to receive `'ready'` and start explicitly.
302
- *
303
- * TRI reports the SDK as its host: `{ platform: 'sdk2', version }`.
304
- *
305
- * @param config - Resolved TRI config (`token` and `apiURL` required).
306
- * @returns The resulting {@link TransactionalRiskIntelligenceState}.
307
- */
308
- async function setupTRI(config) {
309
- return getProvider().setup({
310
- ...config,
311
- host: SDK_HOST
312
- });
313
- }
314
- /**
315
- * Begins behavioral data collection. Requires a prior successful `setupTRI()`
316
- * call with `autostart: false`. Returns `'init-failed'` without starting if
317
- * called before setup, or is a no-op if already started.
318
- *
319
- * @returns The resulting {@link TransactionalRiskIntelligenceState}.
320
- */
321
- async function startTRI() {
322
- return getProvider().start();
323
- }
324
- /**
325
- * Stops all TRI collectors and managers. Idempotent. No-op if TRI was never
326
- * set up.
327
- */
328
- async function stopTRI() {
329
- return getProvider().stop();
330
- }
331
- /**
332
- * Resets the TRI SDK to its initial state. Call this from the SDK's `reset()`
333
- * so that a subsequent `setupTRI` / `startTRI` can begin fresh.
334
- */
335
- async function resetTRI() {
336
- return getProvider().reset();
337
- }
338
- /**
339
- * The SDK's `reset()` step for TRI: resets TRI and discards the provider only
340
- * when `setup({ tri })` set TRI up. A TRI the host set up through
341
- * `@incodetech/core/tri` keeps its activity, and the next session still links
342
- * to it.
343
- */
344
- function resetSdkOwnedTRI() {
345
- if (!sdkOwnsTRI) return;
346
- sdkOwnsTRI = false;
347
- resetTRI();
348
- resetTRIProviderInstance();
349
- }
350
- /**
351
- * Links the current Incode interview session to the active TRI activity.
352
- *
353
- * Returns `false` when the session token is missing or TRI has not been set up.
354
- *
355
- * @param sessionToken - Incode session JWT.
356
- */
357
- async function linkSessionWithTRI(sessionToken) {
358
- if (!sessionToken) return false;
359
- return getProvider().linkInterview(sessionToken);
360
- }
361
- /**
362
- * @private This function is not used outside of this file.
363
- *
364
- * Validates a {@link TransactionalRiskIntelligenceSetupConfig} before it is
365
- * passed to {@link setupTRI}.
366
- *
367
- * Returns `null` (with a `[TRI]` warning) when a required field is missing.
368
- * Returns `null` silently when `config` is `undefined` (intentional opt-out).
369
- *
370
- * @param config - Raw setup-time config from `SetupOptions.tri`.
371
- */
372
- function resolveTRIConfig(config) {
373
- if (!config) return null;
374
- if (!config.token) {
375
- console.warn("[TRI] Not initialized: token is required.");
376
- return null;
377
- }
378
- if (!config.apiURL) {
379
- console.warn("[TRI] Not initialized: apiURL is required.");
380
- return null;
381
- }
382
- return config;
383
- }
384
- //#endregion
385
- export { isTRIStarted as a, resetSdkOwnedTRI as c, startTRI as d, stopTRI as f, initializeTRI as i, resetTRI as l, createTRISession as n, linkSessionWithTRI as o, getTRIActivityId as r, readTRIFpSignals as s, addTRIFpSignals as t, setupTRI as u };
@@ -1 +0,0 @@
1
- import "./trueSightService-BWDGk571.esm.js";
@@ -1,6 +0,0 @@
1
- import { i as FlowModuleConfig } from "./types-BZsmNYom.js";
2
- import { t as BaseFaceCaptureConfig } from "./types-HHgsFhZn.js";
3
- //#region src/modules/authentication/types.d.ts
4
- type AuthenticationConfig = FlowModuleConfig['AUTHENTICATION'] & BaseFaceCaptureConfig;
5
- //#endregion
6
- export { AuthenticationConfig as t };