@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
@@ -0,0 +1,813 @@
1
+ import { t as Manager } from "./Manager-DcPMRgTm.js";
2
+ import { t as AnyStateMachine } from "./StateMachine-BBuIgsHT.js";
3
+ import { n as GetFinishStatusFn, t as FinishStatus } from "./flowCompletionService-gxt5reFV.js";
4
+ import { i as WorkflowModuleRegistry, n as RunChildModuleEvent, r as RunChildModuleInput } from "./types-CjsEZRcz.js";
5
+ import * as xstate131 from "xstate";
6
+
7
+ //#region src/modules/workflow/types.d.ts
8
+ /** Possible node types returned by the workflow server. */
9
+ type WorkflowNodeType = 'MODULE' | 'FINISH' | 'ASYNC_RESOLUTION';
10
+ /** A workflow node returned by the server, representing a single step in the workflow. */
11
+ type WorkflowNode = {
12
+ /** Unique node identifier */
13
+ id: string;
14
+ /** The type of node: MODULE (run a module), FINISH (workflow done), or ASYNC_RESOLUTION (server processing async) */
15
+ nodeType: WorkflowNodeType;
16
+ /** The module key (e.g., 'PHONE', 'SELFIE', 'CUSTOM_MODULE') */
17
+ moduleKey: string;
18
+ /** Server-provided configuration for this module step */
19
+ moduleConfiguration: Record<string, unknown>;
20
+ /** Node status from the server */
21
+ status: string;
22
+ /** The workflow ID this node belongs to */
23
+ workflowId: string;
24
+ };
25
+ /** Workflow configuration returned by GET /omni/workflow/info. */
26
+ type WorkflowConfig = {
27
+ /** Workflow identifier */
28
+ id: string;
29
+ /** Workflow name */
30
+ name: string;
31
+ /** Whether desktop users should be redirected to mobile */
32
+ redirectDesktopToMobile: boolean;
33
+ /** Whether to hide the SMS option in redirect screen */
34
+ disableSmsOption?: boolean;
35
+ /** Whether to show "Continue on Desktop" option */
36
+ addContinueToDesktop?: boolean;
37
+ /** Whether QR phishing resistance is enabled */
38
+ qrPhishingResistance?: boolean;
39
+ /** Whether to disable the unsupported browser screen */
40
+ disableUnsupportedBrowserScreen?: boolean;
41
+ /** Whether OAuth2 is secured */
42
+ oauth2Secured?: boolean;
43
+ /** Whether digital signature (deepsight) is enabled */
44
+ ds?: boolean;
45
+ /** Whether to merge recordings across document sides (ID capture) */
46
+ mergeSessionRecordings?: boolean;
47
+ /** Whether age estimation is enabled (ID capture, Selfie) */
48
+ ageAssurance?: boolean;
49
+ };
50
+ /**
51
+ * Consumer-provided callback for handling custom workflow modules.
52
+ * Called when the workflow reaches a CUSTOM_MODULE node.
53
+ * The consumer must call either `onSuccess` or `onError` to advance the workflow.
54
+ */
55
+ type CustomModuleCallback = (data: {
56
+ /** Call when the custom module succeeds. Advances the workflow. */
57
+ onSuccess: (message?: string) => void;
58
+ /** Call when the custom module fails. Still advances the workflow (matching SDK 1 behavior). */
59
+ onError: (message?: string) => void;
60
+ /** The session's interview ID */
61
+ interviewId: string;
62
+ /** The node ID of the custom module */
63
+ nodeId: string;
64
+ /** The callback name configured in the workflow dashboard */
65
+ name: string;
66
+ }) => void;
67
+ //#endregion
68
+ //#region src/modules/workflow/workflowManager.d.ts
69
+ type WorkflowIdleState = {
70
+ status: 'idle';
71
+ };
72
+ type WorkflowLoadingState = {
73
+ status: 'loading';
74
+ };
75
+ type WorkflowReadyState = {
76
+ status: 'ready';
77
+ workflowConfig: WorkflowConfig;
78
+ currentNode: WorkflowNode;
79
+ config: Record<string, unknown>;
80
+ moduleState: unknown;
81
+ };
82
+ type WorkflowFinishedState = {
83
+ status: 'finished';
84
+ workflowConfig: WorkflowConfig;
85
+ finishStatus: FinishStatus;
86
+ };
87
+ type WorkflowAsyncResolutionState = {
88
+ status: 'asyncResolution';
89
+ workflowConfig: WorkflowConfig;
90
+ currentNode: WorkflowNode;
91
+ };
92
+ type WorkflowClosedState = {
93
+ status: 'closed';
94
+ };
95
+ type WorkflowErrorState = {
96
+ status: 'error';
97
+ error: string;
98
+ errorCode?: number;
99
+ };
100
+ type WorkflowState = WorkflowIdleState | WorkflowLoadingState | WorkflowReadyState | WorkflowFinishedState | WorkflowAsyncResolutionState | WorkflowClosedState | WorkflowErrorState;
101
+ type CreateWorkflowManagerOptions = {
102
+ /** Optional consumer callback for custom workflow modules. */
103
+ customModuleCallback?: CustomModuleCallback;
104
+ /** Interview ID from the session. Required for custom module processing. */
105
+ interviewId?: string;
106
+ /** Whether the device is a desktop. Determines desktop-to-mobile redirect injection. Defaults to true. */
107
+ isDesktop?: boolean;
108
+ };
109
+ /**
110
+ * Creates a workflow manager for server-driven onboarding flows.
111
+ *
112
+ * Only one orchestrator (Flow or Workflow) should be active per session.
113
+ * Each session token maps to a single orchestrator run. To start a new
114
+ * workflow, create a new session and call `setup()` with the new token
115
+ * before creating a new manager.
116
+ */
117
+ declare function createWorkflowManager(options?: CreateWorkflowManagerOptions): Manager<WorkflowState> & {
118
+ /** Start loading the workflow configuration and first node from the backend. */
119
+ load(): void;
120
+ /**
121
+ * Signal that the current module has completed successfully.
122
+ * Call this from your UI component's `onFinish` callback.
123
+ */
124
+ completeModule(): void;
125
+ /**
126
+ * Skip all remaining modules and go straight to the completion step.
127
+ * Used when the workflow was completed externally (e.g., via redirect to mobile).
128
+ */
129
+ completeFlow(): void;
130
+ /**
131
+ * Signal that the current module encountered an error.
132
+ * Transitions the workflow to a terminal error state.
133
+ */
134
+ errorModule(error: string): void;
135
+ /** Get the current module's configuration, including the `ds` flag from the workflow config. */
136
+ getModuleConfig<T$1 = Record<string, unknown>>(): T$1 | undefined;
137
+ };
138
+ type WorkflowManager = ReturnType<typeof createWorkflowManager>;
139
+ //#endregion
140
+ //#region src/modules/workflow/workflowActors.d.ts
141
+ type LoadWorkflowInput = {
142
+ isDesktop: boolean;
143
+ };
144
+ type LoadingResult = {
145
+ workflowConfig: WorkflowConfig;
146
+ currentNode: WorkflowNode;
147
+ firstNode: WorkflowNode | undefined;
148
+ isInjectedNode: boolean;
149
+ };
150
+ type ProcessNextNodeInput = {
151
+ isInjectedNode: boolean;
152
+ firstNode: WorkflowNode | undefined;
153
+ currentNodeModuleKey: string | undefined;
154
+ workflowConfigId: string | undefined;
155
+ workflowRedirectDesktopToMobile: boolean;
156
+ workflowDisableSmsOption: boolean;
157
+ workflowAddContinueToDesktop: boolean;
158
+ workflowQrPhishingResistance: boolean;
159
+ isDesktop: boolean;
160
+ };
161
+ type ProcessingResult = {
162
+ nextNode: WorkflowNode;
163
+ isInjectedNode: boolean;
164
+ };
165
+ type HandleCustomModuleInput = {
166
+ currentNode: WorkflowNode;
167
+ interviewId: string;
168
+ customModuleCallback: CustomModuleCallback | undefined;
169
+ };
170
+ type ResolveModuleInput = {
171
+ moduleKey: string;
172
+ registeredModules: WorkflowModuleRegistry;
173
+ };
174
+ //#endregion
175
+ //#region src/modules/workflow/workflowStateMachine.d.ts
176
+ type WorkflowContext = {
177
+ workflowConfig: WorkflowConfig | undefined;
178
+ currentNode: WorkflowNode | undefined;
179
+ firstNode: WorkflowNode | undefined;
180
+ resolvedMachine: AnyStateMachine | undefined;
181
+ error: string | undefined;
182
+ errorCode: number | undefined;
183
+ registeredModules: WorkflowModuleRegistry;
184
+ finishStatus: FinishStatus | undefined;
185
+ customModuleCallback: CustomModuleCallback | undefined;
186
+ interviewId: string;
187
+ isDesktop: boolean;
188
+ isInjectedNode: boolean;
189
+ getFinishStatus: GetFinishStatusFn;
190
+ };
191
+ type WorkflowInput = {
192
+ modules: WorkflowModuleRegistry;
193
+ customModuleCallback?: CustomModuleCallback;
194
+ getFinishStatus?: GetFinishStatusFn;
195
+ /** Interview ID from the session. Required for custom module processing. */
196
+ interviewId?: string;
197
+ /** Whether the device is a desktop. Determines desktop-to-mobile redirect injection. Defaults to true. */
198
+ isDesktop?: boolean;
199
+ };
200
+ declare const workflowMachine: xstate131.StateMachine<WorkflowContext, {
201
+ type: "LOAD";
202
+ } | {
203
+ type: "MODULE_COMPLETE";
204
+ } | {
205
+ type: "MODULE_ERROR";
206
+ error: unknown;
207
+ } | {
208
+ type: "COMPLETE_FLOW";
209
+ }, {
210
+ [x: string]: xstate131.ActorRefFromLogic<xstate131.CallbackActorLogic<RunChildModuleEvent, RunChildModuleInput, xstate131.EventObject>> | xstate131.ActorRefFromLogic<xstate131.PromiseActorLogic<LoadingResult, LoadWorkflowInput, xstate131.EventObject>> | xstate131.ActorRefFromLogic<xstate131.PromiseActorLogic<ProcessingResult, ProcessNextNodeInput, xstate131.EventObject>> | xstate131.ActorRefFromLogic<xstate131.PromiseActorLogic<WorkflowNode, HandleCustomModuleInput, xstate131.EventObject>> | xstate131.ActorRefFromLogic<xstate131.PromiseActorLogic<AnyStateMachine, ResolveModuleInput, xstate131.EventObject>> | xstate131.ActorRefFromLogic<xstate131.PromiseActorLogic<FinishStatus, {
211
+ getFinishStatus: GetFinishStatusFn;
212
+ workflowId: string | undefined;
213
+ }, xstate131.EventObject>> | undefined;
214
+ }, xstate131.Values<{
215
+ runChildModule: {
216
+ src: "runChildModule";
217
+ logic: xstate131.CallbackActorLogic<RunChildModuleEvent, RunChildModuleInput, xstate131.EventObject>;
218
+ id: string | undefined;
219
+ };
220
+ loadWorkflow: {
221
+ src: "loadWorkflow";
222
+ logic: xstate131.PromiseActorLogic<LoadingResult, LoadWorkflowInput, xstate131.EventObject>;
223
+ id: string | undefined;
224
+ };
225
+ processNextNode: {
226
+ src: "processNextNode";
227
+ logic: xstate131.PromiseActorLogic<ProcessingResult, ProcessNextNodeInput, xstate131.EventObject>;
228
+ id: string | undefined;
229
+ };
230
+ handleCustomModule: {
231
+ src: "handleCustomModule";
232
+ logic: xstate131.PromiseActorLogic<WorkflowNode, HandleCustomModuleInput, xstate131.EventObject>;
233
+ id: string | undefined;
234
+ };
235
+ resolveModule: {
236
+ src: "resolveModule";
237
+ logic: xstate131.PromiseActorLogic<AnyStateMachine, ResolveModuleInput, xstate131.EventObject>;
238
+ id: string | undefined;
239
+ };
240
+ notifyBackend: {
241
+ src: "notifyBackend";
242
+ logic: xstate131.PromiseActorLogic<FinishStatus, {
243
+ getFinishStatus: GetFinishStatusFn;
244
+ workflowId: string | undefined;
245
+ }, xstate131.EventObject>;
246
+ id: string | undefined;
247
+ };
248
+ }>, xstate131.Values<{
249
+ setError: {
250
+ type: "setError";
251
+ params: xstate131.NonReducibleUnknown;
252
+ };
253
+ setLoadingResult: {
254
+ type: "setLoadingResult";
255
+ params: xstate131.NonReducibleUnknown;
256
+ };
257
+ setNextNode: {
258
+ type: "setNextNode";
259
+ params: xstate131.NonReducibleUnknown;
260
+ };
261
+ setCustomModuleResult: {
262
+ type: "setCustomModuleResult";
263
+ params: xstate131.NonReducibleUnknown;
264
+ };
265
+ setResolvedMachine: {
266
+ type: "setResolvedMachine";
267
+ params: xstate131.NonReducibleUnknown;
268
+ };
269
+ setFinishStatus: {
270
+ type: "setFinishStatus";
271
+ params: xstate131.NonReducibleUnknown;
272
+ };
273
+ setModuleError: {
274
+ type: "setModuleError";
275
+ params: xstate131.NonReducibleUnknown;
276
+ };
277
+ }>, xstate131.Values<{
278
+ isModuleNode: {
279
+ type: "isModuleNode";
280
+ params: unknown;
281
+ };
282
+ isFinishNode: {
283
+ type: "isFinishNode";
284
+ params: unknown;
285
+ };
286
+ isAsyncResolutionNode: {
287
+ type: "isAsyncResolutionNode";
288
+ params: unknown;
289
+ };
290
+ isCustomModule: {
291
+ type: "isCustomModule";
292
+ params: unknown;
293
+ };
294
+ }>, never, "error" | "idle" | "closed" | "finished" | "loading" | "resolvingModule" | "completing" | "asyncResolution" | "handlingCustomModule" | "runningModule" | "processingNode", string, WorkflowInput, xstate131.NonReducibleUnknown, xstate131.EventObject, xstate131.MetaObject, {
295
+ readonly id: "workflow";
296
+ readonly initial: "idle";
297
+ readonly context: ({
298
+ input
299
+ }: {
300
+ spawn: {
301
+ <TSrc extends "runChildModule" | "loadWorkflow" | "processNextNode" | "handleCustomModule" | "resolveModule" | "notifyBackend">(logic: TSrc, ...[options]: ({
302
+ src: "runChildModule";
303
+ logic: xstate131.CallbackActorLogic<RunChildModuleEvent, RunChildModuleInput, xstate131.EventObject>;
304
+ id: string | undefined;
305
+ } extends infer T ? T extends {
306
+ src: "runChildModule";
307
+ logic: xstate131.CallbackActorLogic<RunChildModuleEvent, RunChildModuleInput, xstate131.EventObject>;
308
+ id: string | undefined;
309
+ } ? T extends {
310
+ src: TSrc;
311
+ } ? xstate131.ConditionalRequired<[options?: ({
312
+ id?: T["id"] | undefined;
313
+ systemId?: string;
314
+ input?: xstate131.InputFrom<T["logic"]> | undefined;
315
+ syncSnapshot?: boolean;
316
+ } & { [K in xstate131.RequiredActorOptions<T>]: unknown }) | undefined], xstate131.IsNotNever<xstate131.RequiredActorOptions<T>>> : never : never : never) | ({
317
+ src: "loadWorkflow";
318
+ logic: xstate131.PromiseActorLogic<LoadingResult, LoadWorkflowInput, xstate131.EventObject>;
319
+ id: string | undefined;
320
+ } extends infer T_1 ? T_1 extends {
321
+ src: "loadWorkflow";
322
+ logic: xstate131.PromiseActorLogic<LoadingResult, LoadWorkflowInput, xstate131.EventObject>;
323
+ id: string | undefined;
324
+ } ? T_1 extends {
325
+ src: TSrc;
326
+ } ? xstate131.ConditionalRequired<[options?: ({
327
+ id?: T_1["id"] | undefined;
328
+ systemId?: string;
329
+ input?: xstate131.InputFrom<T_1["logic"]> | undefined;
330
+ syncSnapshot?: boolean;
331
+ } & { [K_1 in xstate131.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate131.IsNotNever<xstate131.RequiredActorOptions<T_1>>> : never : never : never) | ({
332
+ src: "processNextNode";
333
+ logic: xstate131.PromiseActorLogic<ProcessingResult, ProcessNextNodeInput, xstate131.EventObject>;
334
+ id: string | undefined;
335
+ } extends infer T_2 ? T_2 extends {
336
+ src: "processNextNode";
337
+ logic: xstate131.PromiseActorLogic<ProcessingResult, ProcessNextNodeInput, xstate131.EventObject>;
338
+ id: string | undefined;
339
+ } ? T_2 extends {
340
+ src: TSrc;
341
+ } ? xstate131.ConditionalRequired<[options?: ({
342
+ id?: T_2["id"] | undefined;
343
+ systemId?: string;
344
+ input?: xstate131.InputFrom<T_2["logic"]> | undefined;
345
+ syncSnapshot?: boolean;
346
+ } & { [K_2 in xstate131.RequiredActorOptions<T_2>]: unknown }) | undefined], xstate131.IsNotNever<xstate131.RequiredActorOptions<T_2>>> : never : never : never) | ({
347
+ src: "handleCustomModule";
348
+ logic: xstate131.PromiseActorLogic<WorkflowNode, HandleCustomModuleInput, xstate131.EventObject>;
349
+ id: string | undefined;
350
+ } extends infer T_3 ? T_3 extends {
351
+ src: "handleCustomModule";
352
+ logic: xstate131.PromiseActorLogic<WorkflowNode, HandleCustomModuleInput, xstate131.EventObject>;
353
+ id: string | undefined;
354
+ } ? T_3 extends {
355
+ src: TSrc;
356
+ } ? xstate131.ConditionalRequired<[options?: ({
357
+ id?: T_3["id"] | undefined;
358
+ systemId?: string;
359
+ input?: xstate131.InputFrom<T_3["logic"]> | undefined;
360
+ syncSnapshot?: boolean;
361
+ } & { [K_3 in xstate131.RequiredActorOptions<T_3>]: unknown }) | undefined], xstate131.IsNotNever<xstate131.RequiredActorOptions<T_3>>> : never : never : never) | ({
362
+ src: "resolveModule";
363
+ logic: xstate131.PromiseActorLogic<AnyStateMachine, ResolveModuleInput, xstate131.EventObject>;
364
+ id: string | undefined;
365
+ } extends infer T_4 ? T_4 extends {
366
+ src: "resolveModule";
367
+ logic: xstate131.PromiseActorLogic<AnyStateMachine, ResolveModuleInput, xstate131.EventObject>;
368
+ id: string | undefined;
369
+ } ? T_4 extends {
370
+ src: TSrc;
371
+ } ? xstate131.ConditionalRequired<[options?: ({
372
+ id?: T_4["id"] | undefined;
373
+ systemId?: string;
374
+ input?: xstate131.InputFrom<T_4["logic"]> | undefined;
375
+ syncSnapshot?: boolean;
376
+ } & { [K_4 in xstate131.RequiredActorOptions<T_4>]: unknown }) | undefined], xstate131.IsNotNever<xstate131.RequiredActorOptions<T_4>>> : never : never : never) | ({
377
+ src: "notifyBackend";
378
+ logic: xstate131.PromiseActorLogic<FinishStatus, {
379
+ getFinishStatus: GetFinishStatusFn;
380
+ workflowId: string | undefined;
381
+ }, xstate131.EventObject>;
382
+ id: string | undefined;
383
+ } extends infer T_5 ? T_5 extends {
384
+ src: "notifyBackend";
385
+ logic: xstate131.PromiseActorLogic<FinishStatus, {
386
+ getFinishStatus: GetFinishStatusFn;
387
+ workflowId: string | undefined;
388
+ }, xstate131.EventObject>;
389
+ id: string | undefined;
390
+ } ? T_5 extends {
391
+ src: TSrc;
392
+ } ? xstate131.ConditionalRequired<[options?: ({
393
+ id?: T_5["id"] | undefined;
394
+ systemId?: string;
395
+ input?: xstate131.InputFrom<T_5["logic"]> | undefined;
396
+ syncSnapshot?: boolean;
397
+ } & { [K_5 in xstate131.RequiredActorOptions<T_5>]: unknown }) | undefined], xstate131.IsNotNever<xstate131.RequiredActorOptions<T_5>>> : never : never : never)): xstate131.ActorRefFromLogic<xstate131.GetConcreteByKey<xstate131.Values<{
398
+ runChildModule: {
399
+ src: "runChildModule";
400
+ logic: xstate131.CallbackActorLogic<RunChildModuleEvent, RunChildModuleInput, xstate131.EventObject>;
401
+ id: string | undefined;
402
+ };
403
+ loadWorkflow: {
404
+ src: "loadWorkflow";
405
+ logic: xstate131.PromiseActorLogic<LoadingResult, LoadWorkflowInput, xstate131.EventObject>;
406
+ id: string | undefined;
407
+ };
408
+ processNextNode: {
409
+ src: "processNextNode";
410
+ logic: xstate131.PromiseActorLogic<ProcessingResult, ProcessNextNodeInput, xstate131.EventObject>;
411
+ id: string | undefined;
412
+ };
413
+ handleCustomModule: {
414
+ src: "handleCustomModule";
415
+ logic: xstate131.PromiseActorLogic<WorkflowNode, HandleCustomModuleInput, xstate131.EventObject>;
416
+ id: string | undefined;
417
+ };
418
+ resolveModule: {
419
+ src: "resolveModule";
420
+ logic: xstate131.PromiseActorLogic<AnyStateMachine, ResolveModuleInput, xstate131.EventObject>;
421
+ id: string | undefined;
422
+ };
423
+ notifyBackend: {
424
+ src: "notifyBackend";
425
+ logic: xstate131.PromiseActorLogic<FinishStatus, {
426
+ getFinishStatus: GetFinishStatusFn;
427
+ workflowId: string | undefined;
428
+ }, xstate131.EventObject>;
429
+ id: string | undefined;
430
+ };
431
+ }>, "src", TSrc>["logic"]>;
432
+ <TLogic extends xstate131.AnyActorLogic>(src: TLogic, ...[options]: xstate131.ConditionalRequired<[options?: ({
433
+ id?: never;
434
+ systemId?: string;
435
+ input?: xstate131.InputFrom<TLogic> | undefined;
436
+ syncSnapshot?: boolean;
437
+ } & { [K in xstate131.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate131.IsNotNever<xstate131.RequiredLogicInput<TLogic>>>): xstate131.ActorRefFromLogic<TLogic>;
438
+ };
439
+ input: WorkflowInput;
440
+ self: xstate131.ActorRef<xstate131.MachineSnapshot<WorkflowContext, {
441
+ type: "LOAD";
442
+ } | {
443
+ type: "MODULE_COMPLETE";
444
+ } | {
445
+ type: "MODULE_ERROR";
446
+ error: unknown;
447
+ } | {
448
+ type: "COMPLETE_FLOW";
449
+ }, Record<string, xstate131.AnyActorRef | undefined>, xstate131.StateValue, string, unknown, any, any>, {
450
+ type: "LOAD";
451
+ } | {
452
+ type: "MODULE_COMPLETE";
453
+ } | {
454
+ type: "MODULE_ERROR";
455
+ error: unknown;
456
+ } | {
457
+ type: "COMPLETE_FLOW";
458
+ }, xstate131.AnyEventObject>;
459
+ }) => {
460
+ workflowConfig: undefined;
461
+ currentNode: undefined;
462
+ firstNode: undefined;
463
+ resolvedMachine: undefined;
464
+ error: undefined;
465
+ errorCode: undefined;
466
+ registeredModules: WorkflowModuleRegistry;
467
+ finishStatus: undefined;
468
+ customModuleCallback: CustomModuleCallback | undefined;
469
+ interviewId: string;
470
+ isDesktop: boolean;
471
+ isInjectedNode: false;
472
+ getFinishStatus: GetFinishStatusFn;
473
+ };
474
+ readonly states: {
475
+ readonly idle: {
476
+ readonly on: {
477
+ readonly LOAD: "loading";
478
+ };
479
+ };
480
+ readonly loading: {
481
+ readonly invoke: {
482
+ readonly id: "loadWorkflow";
483
+ readonly src: "loadWorkflow";
484
+ readonly input: ({
485
+ context
486
+ }: {
487
+ context: WorkflowContext;
488
+ event: {
489
+ type: "LOAD";
490
+ } | {
491
+ type: "MODULE_COMPLETE";
492
+ } | {
493
+ type: "MODULE_ERROR";
494
+ error: unknown;
495
+ } | {
496
+ type: "COMPLETE_FLOW";
497
+ };
498
+ self: xstate131.ActorRef<xstate131.MachineSnapshot<WorkflowContext, {
499
+ type: "LOAD";
500
+ } | {
501
+ type: "MODULE_COMPLETE";
502
+ } | {
503
+ type: "MODULE_ERROR";
504
+ error: unknown;
505
+ } | {
506
+ type: "COMPLETE_FLOW";
507
+ }, Record<string, xstate131.AnyActorRef>, xstate131.StateValue, string, unknown, any, any>, {
508
+ type: "LOAD";
509
+ } | {
510
+ type: "MODULE_COMPLETE";
511
+ } | {
512
+ type: "MODULE_ERROR";
513
+ error: unknown;
514
+ } | {
515
+ type: "COMPLETE_FLOW";
516
+ }, xstate131.AnyEventObject>;
517
+ }) => {
518
+ isDesktop: boolean;
519
+ };
520
+ readonly onDone: readonly [{
521
+ readonly target: "resolvingModule";
522
+ readonly guard: "isModuleNode";
523
+ readonly actions: "setLoadingResult";
524
+ }, {
525
+ readonly target: "completing";
526
+ readonly guard: "isFinishNode";
527
+ readonly actions: "setLoadingResult";
528
+ }, {
529
+ readonly target: "asyncResolution";
530
+ readonly guard: "isAsyncResolutionNode";
531
+ readonly actions: "setLoadingResult";
532
+ }];
533
+ readonly onError: {
534
+ readonly target: "error";
535
+ readonly actions: "setError";
536
+ };
537
+ };
538
+ };
539
+ readonly resolvingModule: {
540
+ readonly always: readonly [{
541
+ readonly target: "handlingCustomModule";
542
+ readonly guard: "isCustomModule";
543
+ }];
544
+ readonly invoke: {
545
+ readonly id: "resolveModule";
546
+ readonly src: "resolveModule";
547
+ readonly input: ({
548
+ context
549
+ }: {
550
+ context: WorkflowContext;
551
+ event: {
552
+ type: "LOAD";
553
+ } | {
554
+ type: "MODULE_COMPLETE";
555
+ } | {
556
+ type: "MODULE_ERROR";
557
+ error: unknown;
558
+ } | {
559
+ type: "COMPLETE_FLOW";
560
+ };
561
+ self: xstate131.ActorRef<xstate131.MachineSnapshot<WorkflowContext, {
562
+ type: "LOAD";
563
+ } | {
564
+ type: "MODULE_COMPLETE";
565
+ } | {
566
+ type: "MODULE_ERROR";
567
+ error: unknown;
568
+ } | {
569
+ type: "COMPLETE_FLOW";
570
+ }, Record<string, xstate131.AnyActorRef>, xstate131.StateValue, string, unknown, any, any>, {
571
+ type: "LOAD";
572
+ } | {
573
+ type: "MODULE_COMPLETE";
574
+ } | {
575
+ type: "MODULE_ERROR";
576
+ error: unknown;
577
+ } | {
578
+ type: "COMPLETE_FLOW";
579
+ }, xstate131.AnyEventObject>;
580
+ }) => {
581
+ moduleKey: string;
582
+ registeredModules: WorkflowModuleRegistry;
583
+ };
584
+ readonly onDone: {
585
+ readonly target: "runningModule";
586
+ readonly actions: "setResolvedMachine";
587
+ };
588
+ readonly onError: {
589
+ readonly target: "error";
590
+ readonly actions: "setError";
591
+ };
592
+ };
593
+ };
594
+ readonly runningModule: {
595
+ readonly invoke: {
596
+ readonly id: "currentModule";
597
+ readonly src: "runChildModule";
598
+ readonly input: ({
599
+ context
600
+ }: {
601
+ context: WorkflowContext;
602
+ }) => {
603
+ machine: AnyStateMachine | undefined;
604
+ config: {
605
+ ds: boolean | undefined;
606
+ };
607
+ };
608
+ };
609
+ readonly on: {
610
+ readonly MODULE_COMPLETE: "processingNode";
611
+ readonly MODULE_ERROR: {
612
+ readonly target: "error";
613
+ readonly actions: "setModuleError";
614
+ };
615
+ readonly COMPLETE_FLOW: "completing";
616
+ };
617
+ };
618
+ readonly handlingCustomModule: {
619
+ readonly invoke: {
620
+ readonly id: "customModule";
621
+ readonly src: "handleCustomModule";
622
+ readonly input: ({
623
+ context
624
+ }: {
625
+ context: WorkflowContext;
626
+ event: {
627
+ type: "LOAD";
628
+ } | {
629
+ type: "MODULE_COMPLETE";
630
+ } | {
631
+ type: "MODULE_ERROR";
632
+ error: unknown;
633
+ } | {
634
+ type: "COMPLETE_FLOW";
635
+ };
636
+ self: xstate131.ActorRef<xstate131.MachineSnapshot<WorkflowContext, {
637
+ type: "LOAD";
638
+ } | {
639
+ type: "MODULE_COMPLETE";
640
+ } | {
641
+ type: "MODULE_ERROR";
642
+ error: unknown;
643
+ } | {
644
+ type: "COMPLETE_FLOW";
645
+ }, Record<string, xstate131.AnyActorRef>, xstate131.StateValue, string, unknown, any, any>, {
646
+ type: "LOAD";
647
+ } | {
648
+ type: "MODULE_COMPLETE";
649
+ } | {
650
+ type: "MODULE_ERROR";
651
+ error: unknown;
652
+ } | {
653
+ type: "COMPLETE_FLOW";
654
+ }, xstate131.AnyEventObject>;
655
+ }) => {
656
+ currentNode: WorkflowNode;
657
+ interviewId: string;
658
+ customModuleCallback: CustomModuleCallback | undefined;
659
+ };
660
+ readonly onDone: readonly [{
661
+ readonly target: "resolvingModule";
662
+ readonly guard: "isModuleNode";
663
+ readonly actions: "setCustomModuleResult";
664
+ }, {
665
+ readonly target: "completing";
666
+ readonly guard: "isFinishNode";
667
+ readonly actions: "setCustomModuleResult";
668
+ }, {
669
+ readonly target: "asyncResolution";
670
+ readonly guard: "isAsyncResolutionNode";
671
+ readonly actions: "setCustomModuleResult";
672
+ }];
673
+ readonly onError: {
674
+ readonly target: "error";
675
+ readonly actions: "setError";
676
+ };
677
+ };
678
+ };
679
+ readonly processingNode: {
680
+ readonly invoke: {
681
+ readonly id: "processNext";
682
+ readonly src: "processNextNode";
683
+ readonly input: ({
684
+ context
685
+ }: {
686
+ context: WorkflowContext;
687
+ event: {
688
+ type: "LOAD";
689
+ } | {
690
+ type: "MODULE_COMPLETE";
691
+ } | {
692
+ type: "MODULE_ERROR";
693
+ error: unknown;
694
+ } | {
695
+ type: "COMPLETE_FLOW";
696
+ };
697
+ self: xstate131.ActorRef<xstate131.MachineSnapshot<WorkflowContext, {
698
+ type: "LOAD";
699
+ } | {
700
+ type: "MODULE_COMPLETE";
701
+ } | {
702
+ type: "MODULE_ERROR";
703
+ error: unknown;
704
+ } | {
705
+ type: "COMPLETE_FLOW";
706
+ }, Record<string, xstate131.AnyActorRef>, xstate131.StateValue, string, unknown, any, any>, {
707
+ type: "LOAD";
708
+ } | {
709
+ type: "MODULE_COMPLETE";
710
+ } | {
711
+ type: "MODULE_ERROR";
712
+ error: unknown;
713
+ } | {
714
+ type: "COMPLETE_FLOW";
715
+ }, xstate131.AnyEventObject>;
716
+ }) => {
717
+ isInjectedNode: boolean;
718
+ firstNode: WorkflowNode | undefined;
719
+ currentNodeModuleKey: string | undefined;
720
+ workflowConfigId: string | undefined;
721
+ workflowRedirectDesktopToMobile: boolean;
722
+ workflowDisableSmsOption: boolean;
723
+ workflowAddContinueToDesktop: boolean;
724
+ workflowQrPhishingResistance: boolean;
725
+ isDesktop: boolean;
726
+ };
727
+ readonly onDone: readonly [{
728
+ readonly target: "resolvingModule";
729
+ readonly guard: "isModuleNode";
730
+ readonly actions: "setNextNode";
731
+ readonly reenter: true;
732
+ }, {
733
+ readonly target: "completing";
734
+ readonly guard: "isFinishNode";
735
+ readonly actions: "setNextNode";
736
+ }, {
737
+ readonly target: "asyncResolution";
738
+ readonly guard: "isAsyncResolutionNode";
739
+ readonly actions: "setNextNode";
740
+ }];
741
+ readonly onError: {
742
+ readonly target: "error";
743
+ readonly actions: "setError";
744
+ };
745
+ };
746
+ };
747
+ readonly completing: {
748
+ readonly invoke: {
749
+ readonly id: "notifyBackend";
750
+ readonly src: "notifyBackend";
751
+ readonly input: ({
752
+ context
753
+ }: {
754
+ context: WorkflowContext;
755
+ event: {
756
+ type: "LOAD";
757
+ } | {
758
+ type: "MODULE_COMPLETE";
759
+ } | {
760
+ type: "MODULE_ERROR";
761
+ error: unknown;
762
+ } | {
763
+ type: "COMPLETE_FLOW";
764
+ };
765
+ self: xstate131.ActorRef<xstate131.MachineSnapshot<WorkflowContext, {
766
+ type: "LOAD";
767
+ } | {
768
+ type: "MODULE_COMPLETE";
769
+ } | {
770
+ type: "MODULE_ERROR";
771
+ error: unknown;
772
+ } | {
773
+ type: "COMPLETE_FLOW";
774
+ }, Record<string, xstate131.AnyActorRef>, xstate131.StateValue, string, unknown, any, any>, {
775
+ type: "LOAD";
776
+ } | {
777
+ type: "MODULE_COMPLETE";
778
+ } | {
779
+ type: "MODULE_ERROR";
780
+ error: unknown;
781
+ } | {
782
+ type: "COMPLETE_FLOW";
783
+ }, xstate131.AnyEventObject>;
784
+ }) => {
785
+ getFinishStatus: GetFinishStatusFn;
786
+ workflowId: string | undefined;
787
+ };
788
+ readonly onDone: {
789
+ readonly target: "finished";
790
+ readonly actions: "setFinishStatus";
791
+ };
792
+ readonly onError: {
793
+ readonly target: "error";
794
+ readonly actions: "setError";
795
+ };
796
+ };
797
+ };
798
+ readonly finished: {
799
+ readonly type: "final";
800
+ };
801
+ readonly asyncResolution: {
802
+ readonly type: "final";
803
+ };
804
+ readonly closed: {
805
+ readonly type: "final";
806
+ };
807
+ readonly error: {
808
+ readonly type: "final";
809
+ };
810
+ };
811
+ }>;
812
+ //#endregion
813
+ export { type CreateWorkflowManagerOptions, type CustomModuleCallback, type WorkflowConfig, type WorkflowFinishedState, type WorkflowManager, type WorkflowNode, type WorkflowReadyState, type WorkflowState, createWorkflowManager, workflowMachine };