@incodetech/core 0.0.0-dev-20260409-a38d5e8 → 0.0.0-dev-20260409-09dfd52

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 (134) hide show
  1. package/dist/BrowserStorageProvider-CXaS5Ooj.esm.js +55 -0
  2. package/dist/{OpenViduRecordingProvider-Bn2meybK.esm.js → OpenViduRecordingProvider-D_cVAwYQ.esm.js} +1 -1
  3. package/dist/{WasmUtilProvider-BpZSvZbg.esm.js → WasmUtilProvider-mWSXzp7b.esm.js} +1 -1
  4. package/dist/{addressSearch-DOFI7lwy.esm.js → addressSearch-C26OZIx0.esm.js} +4 -4
  5. package/dist/antifraud.d.ts +1 -1
  6. package/dist/antifraud.esm.js +4 -37
  7. package/dist/antifraudStateMachine-B74mO8vr.esm.js +39 -0
  8. package/dist/authentication.d.ts +11 -11
  9. package/dist/authentication.esm.js +22 -19
  10. package/dist/authenticationManager-BBQHippG.esm.js +67 -0
  11. package/dist/{authenticationManager-C2mk36yK.d.ts → authenticationManager-DOTo1EYF.d.ts} +2 -2
  12. package/dist/{authenticationManager-C7dL_avf.esm.js → authenticationStateMachine-DCJ0ArAt.esm.js} +7 -67
  13. package/dist/{backCameraStream-tabTmwDS.esm.js → backCameraStream-D9g2wyil.esm.js} +3 -3
  14. package/dist/camera.d.ts +1 -1
  15. package/dist/camera.esm.js +3 -3
  16. package/dist/consent.d.ts +55 -55
  17. package/dist/consent.esm.js +4 -149
  18. package/dist/consentStateMachine-DIdJXJW0.esm.js +151 -0
  19. package/dist/cross-document-data-match.d.ts +1 -1
  20. package/dist/cross-document-data-match.esm.js +4 -4
  21. package/dist/curp-validation.d.ts +5 -5
  22. package/dist/curp-validation.esm.js +4 -417
  23. package/dist/curpValidationStateMachine-Dp5WB6__.esm.js +419 -0
  24. package/dist/{deepsightLoader-Cj6SyUQ-.esm.js → deepsightLoader-CaULV07H.esm.js} +10 -10
  25. package/dist/{deepsightService-ByD6uIs7.d.ts → deepsightService-S-tU77m-.d.ts} +2 -2
  26. package/dist/{deepsightService-BjgXl5hs.esm.js → deepsightService-rPGLH8Xp.esm.js} +5 -5
  27. package/dist/device.esm.js +3 -3
  28. package/dist/document-capture.d.ts +80 -78
  29. package/dist/document-capture.esm.js +8 -403
  30. package/dist/document-upload.d.ts +53 -53
  31. package/dist/document-upload.esm.js +7 -7
  32. package/dist/documentCaptureStateMachine-ByYOCKz5.esm.js +403 -0
  33. package/dist/ekyb.d.ts +3 -3
  34. package/dist/ekyb.esm.js +10 -655
  35. package/dist/ekybStateMachine-DRku_YmR.esm.js +653 -0
  36. package/dist/ekyc.d.ts +3 -3
  37. package/dist/ekyc.esm.js +6 -10614
  38. package/dist/ekycStateMachine-CSWaaWVl.esm.js +10615 -0
  39. package/dist/email.d.ts +3 -3
  40. package/dist/email.esm.js +6 -5
  41. package/dist/{emailManager-CU_hzrsl.d.ts → emailManager-D6CHM2QO.d.ts} +4 -3
  42. package/dist/emailManager-DByjyeY8.esm.js +238 -0
  43. package/dist/{emailManager-_9R4vm6g.esm.js → emailStateMachine-BoIkeCw5.esm.js} +6 -239
  44. package/dist/{events-DlHrOIRc.esm.js → events-W91zLpx4.esm.js} +5 -1
  45. package/dist/events.esm.js +2 -2
  46. package/dist/extensibility.d.ts +15 -15
  47. package/dist/extensibility.esm.js +33 -26
  48. package/dist/face-match.d.ts +7 -6
  49. package/dist/face-match.esm.js +8 -129
  50. package/dist/faceCaptureManagerFactory-Bspg2Tyf.esm.js +117 -0
  51. package/dist/{faceCaptureManagerFactory-Da_-ohdg.d.ts → faceCaptureManagerFactory-P2yy30KU.d.ts} +8 -8
  52. package/dist/{faceCaptureSetup-CaVWkjvE.esm.js → faceCaptureSetup-CQevz86q.esm.js} +5 -119
  53. package/dist/faceMatchStateMachine-CLterVEC.esm.js +127 -0
  54. package/dist/flow.d.ts +8 -13
  55. package/dist/flow.esm.js +10 -29
  56. package/dist/{flowCompletionService-B5JemmC6.esm.js → flowCompletionService-DZSDUXus.esm.js} +2 -2
  57. package/dist/{flowServices-p22wrYPf.esm.js → flowServices-YATk0fgY.esm.js} +3 -3
  58. package/dist/geolocation.d.ts +7 -6
  59. package/dist/geolocation.esm.js +7 -105
  60. package/dist/geolocationStateMachine-CRRUCl9K.esm.js +105 -0
  61. package/dist/{getDeviceClass-DEzz4cmY.esm.js → getDeviceClass-DBF-ExLR.esm.js} +1 -1
  62. package/dist/government-validation.d.ts +2 -2
  63. package/dist/government-validation.esm.js +5 -269
  64. package/dist/governmentValidationStateMachine-C_iPX9VE.esm.js +271 -0
  65. package/dist/http.esm.js +1 -1
  66. package/dist/id.d.ts +10 -10
  67. package/dist/id.esm.js +22 -20
  68. package/dist/idCaptureManager-CJfatzuY.esm.js +335 -0
  69. package/dist/{idCaptureManager-CV08v1e3.d.ts → idCaptureManager-CbZvdr9y.d.ts} +7 -7
  70. package/dist/{idCaptureManager-dyZzKv8L.esm.js → idCaptureStateMachine-gf-Q9piu.esm.js} +17 -346
  71. package/dist/index.d.ts +2 -2
  72. package/dist/index.esm.js +8 -8
  73. package/dist/{lib-Bavz2qmt.esm.js → lib-BzVJ-zxG.esm.js} +1 -1
  74. package/dist/mandatory-consent.d.ts +55 -55
  75. package/dist/mandatory-consent.esm.js +4 -124
  76. package/dist/mandatoryConsentStateMachine-BZNBJ1fK.esm.js +126 -0
  77. package/dist/{openviduLazy-vhrVZCr_.esm.js → openviduLazy-CLg_-u0m.esm.js} +2 -2
  78. package/dist/openviduLazy-rFXBtZVZ.esm.js +3 -0
  79. package/dist/{permissionServices-Cskq32Yd.esm.js → permissionServices-Cisv73eQ.esm.js} +2 -2
  80. package/dist/phone.d.ts +3 -3
  81. package/dist/phone.esm.js +6 -5
  82. package/dist/phoneManager-DhC4obPF.esm.js +258 -0
  83. package/dist/{phoneManager-ulJuGvJ8.d.ts → phoneManager-Zwr-qCnC.d.ts} +2 -2
  84. package/dist/{phoneManager-DerdUfd4.esm.js → phoneStateMachine-Cc_w4tC0.esm.js} +5 -258
  85. package/dist/{recordingService-483wQ6kR.esm.js → recordingService-CCfxUY7-.esm.js} +14 -68
  86. package/dist/redirect-to-mobile.d.ts +2 -2
  87. package/dist/redirect-to-mobile.esm.js +5 -247
  88. package/dist/redirectToMobileStateMachine-vOe27Ufw.esm.js +249 -0
  89. package/dist/runChildModule-DVC4JEjp.esm.js +27 -0
  90. package/dist/selfie.d.ts +11 -11
  91. package/dist/selfie.esm.js +22 -19
  92. package/dist/selfieManager-CorEST5h.esm.js +60 -0
  93. package/dist/{selfieManager-DCRP7X75.d.ts → selfieManager-DNwfxieF.d.ts} +2 -2
  94. package/dist/selfieStateMachine-3b19ON1z.esm.js +56 -0
  95. package/dist/{session-CUh77zj3.esm.js → session-B_rKSRql.esm.js} +4 -4
  96. package/dist/session.d.ts +1 -1
  97. package/dist/session.esm.js +6 -6
  98. package/dist/{setup-DpHakxsC.d.ts → setup-BYqwVLiv.d.ts} +1 -1
  99. package/dist/{setup-XpxfZgKn.esm.js → setup-DLvhsDol.esm.js} +6 -5
  100. package/dist/signature.d.ts +4 -3
  101. package/dist/signature.esm.js +6 -189
  102. package/dist/signatureStateMachine-CU92zCXU.esm.js +189 -0
  103. package/dist/{stats-DHDoqSBV.esm.js → stats-gFD2351t.esm.js} +1 -1
  104. package/dist/stats.esm.js +2 -2
  105. package/dist/{types-2OPf1pyv.d.ts → types-CYJ0Ish6.d.ts} +1 -1
  106. package/dist/types-CjsEZRcz.d.ts +35 -0
  107. package/dist/{types-CVJVQ7fp.d.ts → types-DU8HmI5U.d.ts} +1 -1
  108. package/dist/wasm.d.ts +2 -2
  109. package/dist/wasm.esm.js +8 -8
  110. package/dist/workflow.d.ts +813 -0
  111. package/dist/workflow.esm.js +600 -0
  112. package/package.json +7 -3
  113. package/dist/openviduLazy-BIPHozOu.esm.js +0 -3
  114. package/dist/selfieManager-DeOcNel4.esm.js +0 -110
  115. /package/dist/{Actor-Ba71-_30.d.ts → Actor-DbWH1K6E.d.ts} +0 -0
  116. /package/dist/{BaseWasmProvider-D-s_6M5H.esm.js → BaseWasmProvider-DoYDYH1z.esm.js} +0 -0
  117. /package/dist/{BrowserEnvironmentProvider-DaHeLJQw.esm.js → BrowserEnvironmentProvider-BtKLxTx4.esm.js} +0 -0
  118. /package/dist/{BrowserTimerProvider-BhD2MlHg.esm.js → BrowserTimerProvider-v7bpbrAk.esm.js} +0 -0
  119. /package/dist/{ITimerCapability-oixwa6nj.esm.js → ITimerCapability-BZO_FsCo.esm.js} +0 -0
  120. /package/dist/{Manager-BN2g_I8W.d.ts → Manager-DcPMRgTm.d.ts} +0 -0
  121. /package/dist/{MotionSensorProvider-CodM3e0E.esm.js → MotionSensorProvider-D90R4qwV.esm.js} +0 -0
  122. /package/dist/{StateMachine-BoJsfMvg.d.ts → StateMachine-BBuIgsHT.d.ts} +0 -0
  123. /package/dist/{api-DzpnV6O7.esm.js → api-aa9Mx20l.esm.js} +0 -0
  124. /package/dist/{browserSimulation-B4ubb2OL.esm.js → browserSimulation-DFqGKQAD.esm.js} +0 -0
  125. /package/dist/{camera-1eeGnAaL.d.ts → camera-DATT31my.d.ts} +0 -0
  126. /package/dist/{camera-DmkFpf5N.esm.js → camera-DpPQS_-5.esm.js} +0 -0
  127. /package/dist/{chunk-DsxENsBR.esm.js → chunk-YGHKo4MY.esm.js} +0 -0
  128. /package/dist/{displayErrors-BZLX7idb.d.ts → displayErrors-xrg0ejaS.d.ts} +0 -0
  129. /package/dist/{flowCompletionService-D-3YCHyO.d.ts → flowCompletionService-gxt5reFV.d.ts} +0 -0
  130. /package/dist/{getBrowser-Dtyt9J_h.esm.js → getBrowser-DCcD7H-M.esm.js} +0 -0
  131. /package/dist/{platform-Dv7a2fv-.esm.js → platform-DctkySJU.esm.js} +0 -0
  132. /package/dist/{types-D_QfFKxT.d.ts → types-CIjb0FKu.d.ts} +0 -0
  133. /package/dist/{warmup-CIj_wEV_.d.ts → warmup-Ckb1hN85.d.ts} +0 -0
  134. /package/dist/{xstate.esm-Bv55-lJ4.esm.js → xstate.esm-B7FPE6br.esm.js} +0 -0
package/dist/email.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import "./Manager-BN2g_I8W.js";
2
- import "./Actor-Ba71-_30.js";
3
- import { a as emailMachine, n as EmailState, o as EmailConfig, r as createEmailManager, t as EmailManager } from "./emailManager-CU_hzrsl.js";
1
+ import "./Manager-DcPMRgTm.js";
2
+ import "./Actor-DbWH1K6E.js";
3
+ import { a as emailMachine, n as EmailState, o as EmailConfig, r as createEmailManager, t as EmailManager } from "./emailManager-D6CHM2QO.js";
4
4
  export { type EmailConfig, type EmailManager, type EmailState, createEmailManager, emailMachine };
package/dist/email.esm.js CHANGED
@@ -1,7 +1,8 @@
1
- import "./api-DzpnV6O7.esm.js";
2
- import "./events-DlHrOIRc.esm.js";
3
- import "./xstate.esm-Bv55-lJ4.esm.js";
4
- import "./BrowserTimerProvider-BhD2MlHg.esm.js";
5
- import { r as emailMachine, t as createEmailManager } from "./emailManager-_9R4vm6g.esm.js";
1
+ import "./api-aa9Mx20l.esm.js";
2
+ import "./events-W91zLpx4.esm.js";
3
+ import "./xstate.esm-B7FPE6br.esm.js";
4
+ import "./BrowserTimerProvider-v7bpbrAk.esm.js";
5
+ import { t as emailMachine } from "./emailStateMachine-BoIkeCw5.esm.js";
6
+ import { t as createEmailManager } from "./emailManager-DByjyeY8.esm.js";
6
7
 
7
8
  export { createEmailManager, emailMachine };
@@ -1,5 +1,5 @@
1
- import { t as Manager } from "./Manager-BN2g_I8W.js";
2
- import { t as ActorRefFrom } from "./Actor-Ba71-_30.js";
1
+ import { t as Manager } from "./Manager-DcPMRgTm.js";
2
+ import { t as ActorRefFrom } from "./Actor-DbWH1K6E.js";
3
3
 
4
4
  //#region src/modules/email/types.d.ts
5
5
 
@@ -39,8 +39,9 @@ type EmailConfig = {
39
39
  /**
40
40
  * Whether to pre-populate with user's previously stored email address.
41
41
  * Useful for returning users.
42
+ * @default false
42
43
  */
43
- prefill: boolean;
44
+ prefill?: boolean;
44
45
  /**
45
46
  * Maximum number of OTP verification attempts before lockout.
46
47
  * After exhausting attempts, user sees an error state.
@@ -0,0 +1,238 @@
1
+ import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-W91zLpx4.esm.js";
2
+ import { a as createActor, o as createManager } from "./xstate.esm-B7FPE6br.esm.js";
3
+ import { t as emailMachine } from "./emailStateMachine-BoIkeCw5.esm.js";
4
+
5
+ //#region src/modules/email/emailActor.ts
6
+ function createEmailActor(options) {
7
+ return createActor(emailMachine, { input: { config: options.config } }).start();
8
+ }
9
+
10
+ //#endregion
11
+ //#region src/modules/email/emailManager.ts
12
+ /**
13
+ * @module @incodetech/core/email
14
+ *
15
+ * Email verification module for the Incode Web SDK.
16
+ * Supports both headless (programmatic) and UI-driven usage patterns.
17
+ *
18
+ * ## Headless Usage
19
+ *
20
+ * The email manager can be used entirely without UI for backend integrations,
21
+ * custom UI implementations, or automated workflows.
22
+ *
23
+ * @example Basic headless email verification with OTP
24
+ * ```typescript
25
+ * import { createEmailManager } from '@incodetech/core/email';
26
+ * import { setup } from '@incodetech/core';
27
+ *
28
+ * // 1. Configure the SDK (required before using any module)
29
+ * setup({ apiURL: 'https://api.example.com', token: 'your-token' });
30
+ *
31
+ * // 2. Create the email manager
32
+ * const emailManager = createEmailManager({
33
+ * config: {
34
+ * otpVerification: true,
35
+ * otpExpirationInMinutes: 5,
36
+ * prefill: false,
37
+ * },
38
+ * });
39
+ *
40
+ * // 3. Subscribe to state changes (optional but recommended)
41
+ * emailManager.subscribe((state) => {
42
+ * console.log('Email state:', state.status);
43
+ * if (state.status === 'finished') {
44
+ * console.log('Email verified successfully!');
45
+ * }
46
+ * if (state.status === 'error') {
47
+ * console.error('Error:', state.error);
48
+ * }
49
+ * });
50
+ *
51
+ * // 4. Start the flow
52
+ * emailManager.load();
53
+ *
54
+ * // 5. When state is 'inputting', set the email address
55
+ * emailManager.setEmail('user@example.com', true);
56
+ *
57
+ * // 6. Submit the email address
58
+ * emailManager.submit();
59
+ *
60
+ * // 7. When state is 'awaitingOtp', submit the OTP code
61
+ * emailManager.submitOtp('ABC123');
62
+ *
63
+ * // 8. Clean up when done
64
+ * emailManager.stop();
65
+ * ```
66
+ *
67
+ * @example Polling-based headless usage
68
+ * ```typescript
69
+ * const emailManager = createEmailManager({ config });
70
+ *
71
+ * emailManager.load();
72
+ *
73
+ * // Poll for state changes
74
+ * const interval = setInterval(() => {
75
+ * const state = emailManager.getState();
76
+ *
77
+ * switch (state.status) {
78
+ * case 'inputting':
79
+ * emailManager.setEmail('user@example.com', true);
80
+ * emailManager.submit();
81
+ * break;
82
+ * case 'awaitingOtp':
83
+ * // Get OTP from user or external source
84
+ * emailManager.submitOtp(otpCode);
85
+ * break;
86
+ * case 'finished':
87
+ * clearInterval(interval);
88
+ * emailManager.stop();
89
+ * break;
90
+ * case 'error':
91
+ * clearInterval(interval);
92
+ * console.error(state.error);
93
+ * emailManager.stop();
94
+ * break;
95
+ * }
96
+ * }, 100);
97
+ * ```
98
+ */
99
+ function mapState(snapshot) {
100
+ const typedSnapshot = snapshot;
101
+ const { context } = typedSnapshot;
102
+ if (typedSnapshot.matches("idle")) return { status: "idle" };
103
+ if (typedSnapshot.matches("loadingPrefill")) return { status: "loadingPrefill" };
104
+ if (typedSnapshot.matches("inputting")) return {
105
+ status: "inputting",
106
+ prefilledEmail: context.prefilledEmail,
107
+ emailError: context.emailError,
108
+ otpVerification: context.config.otpVerification
109
+ };
110
+ if (typedSnapshot.matches("submitting")) return { status: "submitting" };
111
+ if (typedSnapshot.matches("resendingOtp")) return { status: "resendingOtp" };
112
+ if (typedSnapshot.matches("sendingInitialOtp")) return { status: "sendingInitialOtp" };
113
+ if (typedSnapshot.matches("awaitingOtp")) return {
114
+ status: "awaitingOtp",
115
+ resendTimer: context.resendTimer,
116
+ canResend: !context.resendTimerActive,
117
+ attemptsRemaining: context.attemptsRemaining
118
+ };
119
+ if (typedSnapshot.matches("verifyingOtp")) return {
120
+ status: "verifyingOtp",
121
+ resendTimer: context.resendTimer,
122
+ canResend: !context.resendTimerActive
123
+ };
124
+ if (typedSnapshot.matches("otpError")) return {
125
+ status: "otpError",
126
+ otpError: context.otpError ?? "Invalid OTP code",
127
+ attemptsRemaining: context.attemptsRemaining,
128
+ resendTimer: context.resendTimer,
129
+ canResend: !context.resendTimerActive
130
+ };
131
+ if (typedSnapshot.matches("finished")) return { status: "finished" };
132
+ if (typedSnapshot.matches("error")) return {
133
+ status: "error",
134
+ error: context.error ?? "An error occurred"
135
+ };
136
+ return { status: "idle" };
137
+ }
138
+ function createApi({ actor, trackElementClicked }) {
139
+ return {
140
+ load() {
141
+ actor.send({ type: "LOAD" });
142
+ },
143
+ setEmail(email, isValid) {
144
+ actor.send({
145
+ type: "EMAIL_CHANGED",
146
+ email,
147
+ isValid
148
+ });
149
+ },
150
+ submit() {
151
+ trackElementClicked?.("submit");
152
+ actor.send({ type: "SUBMIT" });
153
+ },
154
+ setOtpCode(code) {
155
+ actor.send({
156
+ type: "OTP_CHANGED",
157
+ code
158
+ });
159
+ },
160
+ submitOtp(code) {
161
+ trackElementClicked?.("submitOtp");
162
+ actor.send({
163
+ type: "OTP_CHANGED",
164
+ code
165
+ });
166
+ actor.send({ type: "VERIFY_OTP" });
167
+ },
168
+ resendOtp() {
169
+ trackElementClicked?.("resendOtp");
170
+ actor.send({ type: "RESEND_OTP" });
171
+ },
172
+ back() {
173
+ trackElementClicked?.("back");
174
+ actor.send({ type: "BACK" });
175
+ },
176
+ reset() {
177
+ actor.send({ type: "RESET" });
178
+ }
179
+ };
180
+ }
181
+ /**
182
+ * Creates an email verification manager for headless or UI-driven usage.
183
+ *
184
+ * The manager provides a state machine-based API for email address verification
185
+ * with optional OTP (one-time password) verification.
186
+ *
187
+ * @param options - Configuration options
188
+ * @param options.config - Email verification configuration
189
+ * @param options.config.otpVerification - Whether to require OTP verification
190
+ * @param options.config.otpExpirationInMinutes - How long the OTP is valid
191
+ * @param options.config.prefill - Whether to fetch a pre-filled email address
192
+ * @param options.config.maxOtpAttempts - Maximum OTP verification attempts (default: 3)
193
+ *
194
+ * @returns Email manager with state, API methods, and subscription
195
+ *
196
+ * @example Headless usage
197
+ * ```typescript
198
+ * const manager = createEmailManager({
199
+ * config: { otpVerification: true, otpExpirationInMinutes: 5, prefill: false },
200
+ * });
201
+ *
202
+ * manager.subscribe((state) => console.log(state.status));
203
+ * manager.load();
204
+ * manager.setEmail('user@example.com', true);
205
+ * manager.submit();
206
+ * // ... wait for 'awaitingOtp' state ...
207
+ * manager.submitOtp('ABC123');
208
+ * manager.stop();
209
+ * ```
210
+ *
211
+ * @example With React/Preact UI hook
212
+ * ```tsx
213
+ * const [state, manager] = useManager(() => createEmailManager({ config }));
214
+ *
215
+ * if (state.status === 'inputting') {
216
+ * return <input onChange={(e) => manager.setEmail(e.target.value, true)} />;
217
+ * }
218
+ * ```
219
+ */
220
+ function createEmailManager(options) {
221
+ return createManager({
222
+ actor: createEmailActor(options),
223
+ mapState,
224
+ createApi,
225
+ instrumentation: createManagerInstrumentation(eventModuleNames.email)
226
+ });
227
+ }
228
+ function createEmailManagerFromActor(actor) {
229
+ return createManager({
230
+ actor,
231
+ mapState,
232
+ createApi,
233
+ instrumentation: createManagerInstrumentation(eventModuleNames.email)
234
+ });
235
+ }
236
+
237
+ //#endregion
238
+ export { createEmailManagerFromActor as n, createEmailManager as t };
@@ -1,7 +1,7 @@
1
- import { t as api } from "./api-DzpnV6O7.esm.js";
2
- import { _ as endpoints, n as eventModuleNames, o as createManagerInstrumentation } from "./events-DlHrOIRc.esm.js";
3
- import { a as createActor, i as fromPromise, n as assign, o as createManager, r as fromCallback, t as setup } from "./xstate.esm-Bv55-lJ4.esm.js";
4
- import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BhD2MlHg.esm.js";
1
+ import { t as api } from "./api-aa9Mx20l.esm.js";
2
+ import { _ as endpoints } from "./events-W91zLpx4.esm.js";
3
+ import { i as fromPromise, n as assign, r as fromCallback, t as setup } from "./xstate.esm-B7FPE6br.esm.js";
4
+ import { t as BrowserTimerProvider } from "./BrowserTimerProvider-v7bpbrAk.esm.js";
5
5
 
6
6
  //#region src/modules/email/emailServices.ts
7
7
  async function fetchEmail(signal) {
@@ -116,7 +116,7 @@ const emailMachine = setup({
116
116
  }))
117
117
  },
118
118
  guards: {
119
- hasPrefill: ({ context }) => context.config.prefill,
119
+ hasPrefill: ({ context }) => context.config.prefill === true,
120
120
  hasOtpVerification: ({ context }) => context.config.otpVerification,
121
121
  isValidEmail: ({ context }) => context.isValid,
122
122
  hasAttemptsRemaining: ({ context }) => context.attemptsRemaining > 1,
@@ -275,237 +275,4 @@ const emailMachine = setup({
275
275
  });
276
276
 
277
277
  //#endregion
278
- //#region src/modules/email/emailActor.ts
279
- function createEmailActor(options) {
280
- return createActor(emailMachine, { input: { config: options.config } }).start();
281
- }
282
-
283
- //#endregion
284
- //#region src/modules/email/emailManager.ts
285
- /**
286
- * @module @incodetech/core/email
287
- *
288
- * Email verification module for the Incode Web SDK.
289
- * Supports both headless (programmatic) and UI-driven usage patterns.
290
- *
291
- * ## Headless Usage
292
- *
293
- * The email manager can be used entirely without UI for backend integrations,
294
- * custom UI implementations, or automated workflows.
295
- *
296
- * @example Basic headless email verification with OTP
297
- * ```typescript
298
- * import { createEmailManager } from '@incodetech/core/email';
299
- * import { setup } from '@incodetech/core';
300
- *
301
- * // 1. Configure the SDK (required before using any module)
302
- * setup({ apiURL: 'https://api.example.com', token: 'your-token' });
303
- *
304
- * // 2. Create the email manager
305
- * const emailManager = createEmailManager({
306
- * config: {
307
- * otpVerification: true,
308
- * otpExpirationInMinutes: 5,
309
- * prefill: false,
310
- * },
311
- * });
312
- *
313
- * // 3. Subscribe to state changes (optional but recommended)
314
- * emailManager.subscribe((state) => {
315
- * console.log('Email state:', state.status);
316
- * if (state.status === 'finished') {
317
- * console.log('Email verified successfully!');
318
- * }
319
- * if (state.status === 'error') {
320
- * console.error('Error:', state.error);
321
- * }
322
- * });
323
- *
324
- * // 4. Start the flow
325
- * emailManager.load();
326
- *
327
- * // 5. When state is 'inputting', set the email address
328
- * emailManager.setEmail('user@example.com', true);
329
- *
330
- * // 6. Submit the email address
331
- * emailManager.submit();
332
- *
333
- * // 7. When state is 'awaitingOtp', submit the OTP code
334
- * emailManager.submitOtp('ABC123');
335
- *
336
- * // 8. Clean up when done
337
- * emailManager.stop();
338
- * ```
339
- *
340
- * @example Polling-based headless usage
341
- * ```typescript
342
- * const emailManager = createEmailManager({ config });
343
- *
344
- * emailManager.load();
345
- *
346
- * // Poll for state changes
347
- * const interval = setInterval(() => {
348
- * const state = emailManager.getState();
349
- *
350
- * switch (state.status) {
351
- * case 'inputting':
352
- * emailManager.setEmail('user@example.com', true);
353
- * emailManager.submit();
354
- * break;
355
- * case 'awaitingOtp':
356
- * // Get OTP from user or external source
357
- * emailManager.submitOtp(otpCode);
358
- * break;
359
- * case 'finished':
360
- * clearInterval(interval);
361
- * emailManager.stop();
362
- * break;
363
- * case 'error':
364
- * clearInterval(interval);
365
- * console.error(state.error);
366
- * emailManager.stop();
367
- * break;
368
- * }
369
- * }, 100);
370
- * ```
371
- */
372
- function mapState(snapshot) {
373
- const typedSnapshot = snapshot;
374
- const { context } = typedSnapshot;
375
- if (typedSnapshot.matches("idle")) return { status: "idle" };
376
- if (typedSnapshot.matches("loadingPrefill")) return { status: "loadingPrefill" };
377
- if (typedSnapshot.matches("inputting")) return {
378
- status: "inputting",
379
- prefilledEmail: context.prefilledEmail,
380
- emailError: context.emailError,
381
- otpVerification: context.config.otpVerification
382
- };
383
- if (typedSnapshot.matches("submitting")) return { status: "submitting" };
384
- if (typedSnapshot.matches("resendingOtp")) return { status: "resendingOtp" };
385
- if (typedSnapshot.matches("sendingInitialOtp")) return { status: "sendingInitialOtp" };
386
- if (typedSnapshot.matches("awaitingOtp")) return {
387
- status: "awaitingOtp",
388
- resendTimer: context.resendTimer,
389
- canResend: !context.resendTimerActive,
390
- attemptsRemaining: context.attemptsRemaining
391
- };
392
- if (typedSnapshot.matches("verifyingOtp")) return {
393
- status: "verifyingOtp",
394
- resendTimer: context.resendTimer,
395
- canResend: !context.resendTimerActive
396
- };
397
- if (typedSnapshot.matches("otpError")) return {
398
- status: "otpError",
399
- otpError: context.otpError ?? "Invalid OTP code",
400
- attemptsRemaining: context.attemptsRemaining,
401
- resendTimer: context.resendTimer,
402
- canResend: !context.resendTimerActive
403
- };
404
- if (typedSnapshot.matches("finished")) return { status: "finished" };
405
- if (typedSnapshot.matches("error")) return {
406
- status: "error",
407
- error: context.error ?? "An error occurred"
408
- };
409
- return { status: "idle" };
410
- }
411
- function createApi({ actor, trackElementClicked }) {
412
- return {
413
- load() {
414
- actor.send({ type: "LOAD" });
415
- },
416
- setEmail(email, isValid) {
417
- actor.send({
418
- type: "EMAIL_CHANGED",
419
- email,
420
- isValid
421
- });
422
- },
423
- submit() {
424
- trackElementClicked?.("submit");
425
- actor.send({ type: "SUBMIT" });
426
- },
427
- setOtpCode(code) {
428
- actor.send({
429
- type: "OTP_CHANGED",
430
- code
431
- });
432
- },
433
- submitOtp(code) {
434
- trackElementClicked?.("submitOtp");
435
- actor.send({
436
- type: "OTP_CHANGED",
437
- code
438
- });
439
- actor.send({ type: "VERIFY_OTP" });
440
- },
441
- resendOtp() {
442
- trackElementClicked?.("resendOtp");
443
- actor.send({ type: "RESEND_OTP" });
444
- },
445
- back() {
446
- trackElementClicked?.("back");
447
- actor.send({ type: "BACK" });
448
- },
449
- reset() {
450
- actor.send({ type: "RESET" });
451
- }
452
- };
453
- }
454
- /**
455
- * Creates an email verification manager for headless or UI-driven usage.
456
- *
457
- * The manager provides a state machine-based API for email address verification
458
- * with optional OTP (one-time password) verification.
459
- *
460
- * @param options - Configuration options
461
- * @param options.config - Email verification configuration
462
- * @param options.config.otpVerification - Whether to require OTP verification
463
- * @param options.config.otpExpirationInMinutes - How long the OTP is valid
464
- * @param options.config.prefill - Whether to fetch a pre-filled email address
465
- * @param options.config.maxOtpAttempts - Maximum OTP verification attempts (default: 3)
466
- *
467
- * @returns Email manager with state, API methods, and subscription
468
- *
469
- * @example Headless usage
470
- * ```typescript
471
- * const manager = createEmailManager({
472
- * config: { otpVerification: true, otpExpirationInMinutes: 5, prefill: false },
473
- * });
474
- *
475
- * manager.subscribe((state) => console.log(state.status));
476
- * manager.load();
477
- * manager.setEmail('user@example.com', true);
478
- * manager.submit();
479
- * // ... wait for 'awaitingOtp' state ...
480
- * manager.submitOtp('ABC123');
481
- * manager.stop();
482
- * ```
483
- *
484
- * @example With React/Preact UI hook
485
- * ```tsx
486
- * const [state, manager] = useManager(() => createEmailManager({ config }));
487
- *
488
- * if (state.status === 'inputting') {
489
- * return <input onChange={(e) => manager.setEmail(e.target.value, true)} />;
490
- * }
491
- * ```
492
- */
493
- function createEmailManager(options) {
494
- return createManager({
495
- actor: createEmailActor(options),
496
- mapState,
497
- createApi,
498
- instrumentation: createManagerInstrumentation(eventModuleNames.email)
499
- });
500
- }
501
- function createEmailManagerFromActor(actor) {
502
- return createManager({
503
- actor,
504
- mapState,
505
- createApi,
506
- instrumentation: createManagerInstrumentation(eventModuleNames.email)
507
- });
508
- }
509
-
510
- //#endregion
511
- export { createEmailManagerFromActor as n, emailMachine as r, createEmailManager as t };
278
+ export { emailMachine as t };
@@ -1,4 +1,4 @@
1
- import { i as isApiConfigured, r as getToken, t as api } from "./api-DzpnV6O7.esm.js";
1
+ import { i as isApiConfigured, r as getToken, t as api } from "./api-aa9Mx20l.esm.js";
2
2
 
3
3
  //#region ../infra/src/capabilities/IBrowserEnvironmentCapability.ts
4
4
  function getTimestamp() {
@@ -74,6 +74,10 @@ const endpoints = {
74
74
  addSignatureV2: "/omni/add/signature/v2",
75
75
  addInitials: "/omni/add/initials",
76
76
  processAntifraud: "/omni/process/antifraud",
77
+ workflowCurrentNode: "/omni/workflow/current/node",
78
+ workflowProcessNode: "/omni/workflow/process/node",
79
+ workflowInfo: "/omni/workflow/info",
80
+ customModuleExecution: "/omni/custom-module/execution",
77
81
  processCrossDocumentDataMatch: "/omni/cross-doc-data-check/process"
78
82
  };
79
83
 
@@ -1,4 +1,4 @@
1
- import "./api-DzpnV6O7.esm.js";
2
- import { a as videoSelfieEvents, c as elementClicked, d as screenClosed, f as screenEvent, g as subscribeEvent, h as flushEventQueue, i as tutorialScreenNamesMapper, l as moduleClosed, m as addEvent, n as eventModuleNames, p as screenOpened, r as eventScreenNames, s as captureAttemptFinished, t as cameraScreenNamesMapper, u as moduleOpened } from "./events-DlHrOIRc.esm.js";
1
+ import "./api-aa9Mx20l.esm.js";
2
+ import { a as videoSelfieEvents, c as elementClicked, d as screenClosed, f as screenEvent, g as subscribeEvent, h as flushEventQueue, i as tutorialScreenNamesMapper, l as moduleClosed, m as addEvent, n as eventModuleNames, p as screenOpened, r as eventScreenNames, s as captureAttemptFinished, t as cameraScreenNamesMapper, u as moduleOpened } from "./events-W91zLpx4.esm.js";
3
3
 
4
4
  export { addEvent, cameraScreenNamesMapper, captureAttemptFinished, elementClicked, eventModuleNames, eventScreenNames, flushEventQueue, moduleClosed, moduleOpened, screenClosed, screenEvent, screenOpened, subscribeEvent, tutorialScreenNamesMapper, videoSelfieEvents };
@@ -1,18 +1,18 @@
1
- import "./warmup-CIj_wEV_.js";
2
- import "./Manager-BN2g_I8W.js";
3
- import { n as createActor } from "./Actor-Ba71-_30.js";
4
- import { r as fromPromise } from "./StateMachine-BoJsfMvg.js";
5
- import { c as FaceCaptureEvent, f as SendFaceImageResponse, l as FaceCaptureInput, n as FaceCaptureManagerState, p as BaseWasmProvider, s as FaceCaptureContext, t as FaceCaptureManager, u as faceCaptureMachine } from "./faceCaptureManagerFactory-Da_-ohdg.js";
6
- import "./camera-1eeGnAaL.js";
7
- import "./types-2OPf1pyv.js";
8
- import "./types-CVJVQ7fp.js";
9
- import { a as IWasmUtilCapability, o as VirtualCameraCheckOutput, s as WasmUtilConfig, u as IStorageCapability } from "./deepsightService-ByD6uIs7.js";
10
- import "./types-D_QfFKxT.js";
11
- import { a as ProcessFaceResponse, i as createSelfieManagerFromActor, n as SelfieState, t as SelfieManager } from "./selfieManager-DCRP7X75.js";
12
- import { i as createAuthenticationManagerFromActor, n as AuthenticationState, t as AuthenticationManager } from "./authenticationManager-C2mk36yK.js";
13
- import { i as createEmailManagerFromActor, n as EmailState, t as EmailManager } from "./emailManager-CU_hzrsl.js";
14
- import { C as CaptureIdResponse, i as createIdCaptureManagerFromActor, n as IdCaptureState, t as IdCaptureManager } from "./idCaptureManager-CV08v1e3.js";
15
- import { i as createPhoneManagerFromActor, n as PhoneState, t as PhoneManager } from "./phoneManager-ulJuGvJ8.js";
1
+ import "./warmup-Ckb1hN85.js";
2
+ import "./Manager-DcPMRgTm.js";
3
+ import { n as createActor } from "./Actor-DbWH1K6E.js";
4
+ import { r as fromPromise } from "./StateMachine-BBuIgsHT.js";
5
+ import { c as FaceCaptureEvent, f as SendFaceImageResponse, l as FaceCaptureInput, n as FaceCaptureManagerState, p as BaseWasmProvider, s as FaceCaptureContext, t as FaceCaptureManager, u as faceCaptureMachine } from "./faceCaptureManagerFactory-P2yy30KU.js";
6
+ import "./camera-DATT31my.js";
7
+ import "./types-CYJ0Ish6.js";
8
+ import "./types-DU8HmI5U.js";
9
+ import { a as IWasmUtilCapability, o as VirtualCameraCheckOutput, s as WasmUtilConfig, u as IStorageCapability } from "./deepsightService-S-tU77m-.js";
10
+ import "./types-CIjb0FKu.js";
11
+ import { a as ProcessFaceResponse, i as createSelfieManagerFromActor, n as SelfieState, t as SelfieManager } from "./selfieManager-DNwfxieF.js";
12
+ import { i as createAuthenticationManagerFromActor, n as AuthenticationState, t as AuthenticationManager } from "./authenticationManager-DOTo1EYF.js";
13
+ import { i as createEmailManagerFromActor, n as EmailState, t as EmailManager } from "./emailManager-D6CHM2QO.js";
14
+ import { C as CaptureIdResponse, i as createIdCaptureManagerFromActor, n as IdCaptureState, t as IdCaptureManager } from "./idCaptureManager-CbZvdr9y.js";
15
+ import { i as createPhoneManagerFromActor, n as PhoneState, t as PhoneManager } from "./phoneManager-Zwr-qCnC.js";
16
16
 
17
17
  //#region src/modules/authentication/authenticationUploadService.d.ts
18
18
  type AuthenticationUploadResponse = {
@@ -1,29 +1,36 @@
1
- import "./BaseWasmProvider-D-s_6M5H.esm.js";
2
- import { t as WasmUtilProvider } from "./WasmUtilProvider-BpZSvZbg.esm.js";
3
- import "./api-DzpnV6O7.esm.js";
4
- import "./events-DlHrOIRc.esm.js";
5
- import { a as IpifyProvider, o as FingerprintProvider, s as getDeviceFingerprintInfo, t as getDisableIpify } from "./session-CUh77zj3.esm.js";
6
- import "./BrowserEnvironmentProvider-DaHeLJQw.esm.js";
7
- import "./browserSimulation-B4ubb2OL.esm.js";
8
- import { a as createActor, i as fromPromise } from "./xstate.esm-Bv55-lJ4.esm.js";
9
- import { t as faceCaptureMachine } from "./faceCaptureSetup-CaVWkjvE.esm.js";
10
- import { y as BrowserStorageProvider } from "./recordingService-483wQ6kR.esm.js";
11
- import "./deepsightService-BjgXl5hs.esm.js";
12
- import "./camera-DmkFpf5N.esm.js";
13
- import "./getBrowser-Dtyt9J_h.esm.js";
14
- import "./stats-DHDoqSBV.esm.js";
15
- import "./MotionSensorProvider-CodM3e0E.esm.js";
16
- import "./permissionServices-Cskq32Yd.esm.js";
17
- import "./platform-Dv7a2fv-.esm.js";
18
- import "./ITimerCapability-oixwa6nj.esm.js";
19
- import "./backCameraStream-tabTmwDS.esm.js";
20
- import "./getDeviceClass-DEzz4cmY.esm.js";
21
- import { n as createAuthenticationManagerFromActor } from "./authenticationManager-C7dL_avf.esm.js";
22
- import "./BrowserTimerProvider-BhD2MlHg.esm.js";
23
- import { n as createEmailManagerFromActor } from "./emailManager-_9R4vm6g.esm.js";
24
- import { n as createSelfieManagerFromActor } from "./selfieManager-DeOcNel4.esm.js";
25
- import { n as createIdCaptureManagerFromActor } from "./idCaptureManager-dyZzKv8L.esm.js";
26
- import { n as createPhoneManagerFromActor } from "./phoneManager-DerdUfd4.esm.js";
1
+ import "./BaseWasmProvider-DoYDYH1z.esm.js";
2
+ import { t as WasmUtilProvider } from "./WasmUtilProvider-mWSXzp7b.esm.js";
3
+ import "./api-aa9Mx20l.esm.js";
4
+ import "./events-W91zLpx4.esm.js";
5
+ import { a as IpifyProvider, o as FingerprintProvider, s as getDeviceFingerprintInfo, t as getDisableIpify } from "./session-B_rKSRql.esm.js";
6
+ import "./BrowserEnvironmentProvider-BtKLxTx4.esm.js";
7
+ import "./browserSimulation-DFqGKQAD.esm.js";
8
+ import { a as createActor, i as fromPromise } from "./xstate.esm-B7FPE6br.esm.js";
9
+ import "./faceCaptureManagerFactory-Bspg2Tyf.esm.js";
10
+ import { t as BrowserStorageProvider } from "./BrowserStorageProvider-CXaS5Ooj.esm.js";
11
+ import "./recordingService-CCfxUY7-.esm.js";
12
+ import "./deepsightService-rPGLH8Xp.esm.js";
13
+ import "./camera-DpPQS_-5.esm.js";
14
+ import "./getBrowser-DCcD7H-M.esm.js";
15
+ import "./stats-gFD2351t.esm.js";
16
+ import "./MotionSensorProvider-D90R4qwV.esm.js";
17
+ import "./permissionServices-Cisv73eQ.esm.js";
18
+ import "./platform-DctkySJU.esm.js";
19
+ import "./ITimerCapability-BZO_FsCo.esm.js";
20
+ import "./backCameraStream-D9g2wyil.esm.js";
21
+ import "./getDeviceClass-DBF-ExLR.esm.js";
22
+ import { t as faceCaptureMachine } from "./faceCaptureSetup-CQevz86q.esm.js";
23
+ import "./authenticationStateMachine-DCJ0ArAt.esm.js";
24
+ import { n as createAuthenticationManagerFromActor } from "./authenticationManager-BBQHippG.esm.js";
25
+ import "./BrowserTimerProvider-v7bpbrAk.esm.js";
26
+ import "./emailStateMachine-BoIkeCw5.esm.js";
27
+ import { n as createEmailManagerFromActor } from "./emailManager-DByjyeY8.esm.js";
28
+ import "./selfieStateMachine-3b19ON1z.esm.js";
29
+ import { n as createSelfieManagerFromActor } from "./selfieManager-CorEST5h.esm.js";
30
+ import "./idCaptureStateMachine-gf-Q9piu.esm.js";
31
+ import { n as createIdCaptureManagerFromActor } from "./idCaptureManager-CJfatzuY.esm.js";
32
+ import "./phoneStateMachine-Cc_w4tC0.esm.js";
33
+ import { n as createPhoneManagerFromActor } from "./phoneManager-DhC4obPF.esm.js";
27
34
 
28
35
  //#region src/internal/fingerprint/fingerprintApi.ts
29
36
  async function getFingerprint(disableIpify) {