import { A as StateMachine, C as StateValue, D as PromiseActorLogic, a as ActorRefFromLogic, b as RequiredActorOptions, c as AnyEventObject, g as IsNotNever, h as InputFrom, k as MachineSnapshot, l as AnyStateMachine, m as GetConcreteByKey, o as AnyActorLogic, p as EventObject, r as ActorRef, s as AnyActorRef, u as ConditionalRequired, v as MetaObject, w as Values, x as RequiredLogicInput, y as NonReducibleUnknown } from "./spawn-D9jgw9pW.js"; import { t as CallbackActorLogic } from "./callback-645_omgz.js"; import "./StateMachine-EDpYWy0i.js"; import { t as Manager } from "./Manager-CQQ99QOI.js"; import { a as TotalScore, i as GetTotalScoreStatusFn, n as FinishStatus, r as GetFinishStatusFn } from "./flowCompletionService-BlAHsKyv.js"; import { o as FlowEventSubscribable } from "./index-CLMF0QLQ.js"; import { a as WorkflowModuleRegistry, i as RunChildModuleInput, r as RunChildModuleEvent, t as ModuleConfigMappers } from "./types-BfgmV7s72.js"; //#region src/modules/workflow/types.d.ts /** Possible node types returned by the workflow server. */ type WorkflowNodeType = 'MODULE' | 'FINISH' | 'ASYNC_RESOLUTION'; /** A workflow node returned by the server, representing a single step in the workflow. */ type WorkflowNode = { /** Unique node identifier */ id: string; /** The type of node: MODULE (run a module), FINISH (workflow done), or ASYNC_RESOLUTION (server processing async) */ nodeType: WorkflowNodeType; /** The module key (e.g., 'PHONE', 'SELFIE', 'CUSTOM_MODULE') */ moduleKey: string; /** Server-provided configuration for this module step */ moduleConfiguration: Record; /** Node status from the server */ status: string; /** The workflow ID this node belongs to */ workflowId: string; }; /** Workflow configuration returned by GET /omni/workflow/info. */ type WorkflowConfig = { /** Workflow identifier */ id: string; /** Workflow name */ name: string; /** Whether desktop users should be redirected to mobile */ redirectDesktopToMobile: boolean; /** Whether to hide the SMS option in redirect screen */ disableSmsOption?: boolean; /** Whether to show "Continue on Desktop" option */ addContinueToDesktop?: boolean; /** Whether QR phishing resistance is enabled */ qrPhishingResistance?: boolean; /** Whether to disable the unsupported browser screen */ disableUnsupportedBrowserScreen?: boolean; /** Whether OAuth2 is secured */ oauth2Secured?: boolean; /** Whether digital signature (deepsight) is enabled */ ds?: boolean; /** Whether to merge recordings across document sides (ID capture) */ mergeSessionRecordings?: boolean; /** Whether age estimation is enabled (ID capture, Selfie) */ ageAssurance?: boolean; /** Skip the launch (home) screen and go straight to the first workflow node. */ disableLaunchScreen?: boolean; /** Whether to show the status-specific finish screen at workflow completion. */ showFinishScreenBySessionStatus?: boolean; }; /** * Consumer-provided callback for handling custom workflow modules. * Called when the workflow reaches a CUSTOM_MODULE node. * The consumer must call either `onSuccess` or `onError` to advance the workflow. */ type CustomModuleCallback = (data: { /** Call when the custom module succeeds. Advances the workflow. */ onSuccess: (message?: string) => void; /** Call when the custom module fails. Still advances the workflow (matching SDK 1 behavior). */ onError: (message?: string) => void; /** The session's interview ID */ interviewId: string; /** The node ID of the custom module */ nodeId: string; /** The callback name configured in the workflow dashboard */ name: string; }) => void; //#endregion //#region src/modules/workflow/workflowManager.d.ts type WorkflowHomeScreen = { visible: boolean; isContinueLoading: boolean; }; type WorkflowIdleState = { status: 'idle'; homeScreen: WorkflowHomeScreen; }; type WorkflowLoadingState = { status: 'loading'; homeScreen: WorkflowHomeScreen; }; type WorkflowCompletingState = { status: 'completing'; homeScreen: WorkflowHomeScreen; }; type WorkflowReadyState = { status: 'ready'; workflowConfig: WorkflowConfig; currentNode: WorkflowNode; config: Record; moduleState: unknown; homeScreen: WorkflowHomeScreen; }; type WorkflowFinishedState = { status: 'finished'; workflowConfig: WorkflowConfig; finishStatus: FinishStatus; scoreStatus: TotalScore; }; type WorkflowAsyncResolutionState = { status: 'asyncResolution'; workflowConfig: WorkflowConfig; currentNode: WorkflowNode; }; type WorkflowClosedState = { status: 'closed'; }; type WorkflowErrorState = { status: 'error'; error: string; errorCode?: number; moduleErrorCode?: string; }; type WorkflowState = WorkflowIdleState | WorkflowLoadingState | WorkflowCompletingState | WorkflowReadyState | WorkflowFinishedState | WorkflowAsyncResolutionState | WorkflowClosedState | WorkflowErrorState; type CreateWorkflowManagerOptions = { /** Optional consumer callback for custom workflow modules. */ customModuleCallback?: CustomModuleCallback; /** Interview ID from the session. Required for custom module processing. */ interviewId?: string; /** Whether the device is a desktop. Determines desktop-to-mobile redirect injection. Defaults to true. */ isDesktop?: boolean; }; /** * Creates a workflow manager for server-driven onboarding flows. * * Only one orchestrator (Flow or Workflow) should be active per session. * Each session token maps to a single orchestrator run. To start a new * workflow, create a new session and call `setup()` with the new token * before creating a new manager. */ declare function createWorkflowManager(options?: CreateWorkflowManagerOptions): Manager & { /** Start loading the workflow configuration and first node from the backend. */ load(): void; /** * Signal that the current module has completed successfully. * Call this from your UI component's `onFinish` callback. */ completeModule(output?: unknown): void; /** * Skip all remaining nodes and complete the workflow now, notifying the * backend (getFinishStatus) on the way to the completion step. */ completeFlow(): void; /** * Finish the workflow because the onboarding was already completed externally — * e.g. the REDIRECT_TO_MOBILE handoff finished end-to-end on mobile. Lands * on the completion screen WITHOUT calling getFinishStatus: mobile already * notified the backend, and the desktop's current node is not FINISH (such a * call is rejected 400). Use this (not `completeFlow`) from * REDIRECT_TO_MOBILE's `onFinish`. */ finishWorkflow(): void; /** * Signal that the current module encountered a terminal error, optionally * with its machine-readable `moduleErrorCode`. The workflow machine decides * what to do: an advanceable terminal error (e.g. `NONEXISTENT_CUSTOMER`, * `HINT_NOT_PROVIDED`) advances via `processNode`; any other error * transitions to the terminal error state. Callers always forward the code * and let core classify — no per-module branching in the UI. */ errorModule(error: string, moduleErrorCode?: string): void; /** * Advance from the launch (home) screen into the first workflow node. * No-op when the workflow is not currently waiting on the home screen * (e.g. when the backend set `disableLaunchScreen` or the first node is * the injected `REDIRECT_TO_MOBILE`). */ continueFromHome(): void; /** * Get the current module's configuration, including the `ds` flag from * the workflow config. The same module-specific config mapping applied * to `state.config` is applied here, so consumers receive a * manager-ready shape (e.g. `EkycConfig` for `EXTERNAL_VERIFICATION`). */ getModuleConfig>(): T | undefined; } & FlowEventSubscribable; type WorkflowManager = ReturnType; //#endregion //#region src/modules/workflow/workflowActors.d.ts type LoadWorkflowInput = { isDesktop: boolean; }; type LoadingResult = { workflowConfig: WorkflowConfig; currentNode: WorkflowNode; firstNode: WorkflowNode | undefined; isInjectedNode: boolean; }; type ProcessNextNodeInput = { isInjectedNode: boolean; firstNode: WorkflowNode | undefined; currentNodeModuleKey: string | undefined; workflowConfigId: string | undefined; workflowRedirectDesktopToMobile: boolean; workflowDisableSmsOption: boolean; workflowAddContinueToDesktop: boolean; workflowQrPhishingResistance: boolean; isDesktop: boolean; }; type ProcessingResult = { nextNode: WorkflowNode; isInjectedNode: boolean; }; type HandleCustomModuleInput = { currentNode: WorkflowNode; interviewId: string; customModuleCallback: CustomModuleCallback | undefined; }; type ResolveModuleInput = { moduleKey: string; registeredModules: WorkflowModuleRegistry; }; //#endregion //#region src/modules/workflow/workflowStateMachine.d.ts type WorkflowContext = { workflowConfig: WorkflowConfig | undefined; currentNode: WorkflowNode | undefined; firstNode: WorkflowNode | undefined; resolvedMachine: AnyStateMachine | undefined; error: string | undefined; errorCode: number | undefined; /** * Machine-readable code of the module terminal error the workflow chose to * advance past (an advanceable terminal error like NONEXISTENT_CUSTOMER). * Retained for analytics only — it is not sent to the backend `processNode`. */ moduleErrorCode: string | undefined; /** * The primary ID capture's `skipFaceMatch` output — US Smart Capture where the * barcode/back was captured but no front, so there is no ID portrait to match. * Persisted from the `ID_CAPTURE` node's terminal output and injected into the * later `FACE_MATCH` node's config so it self-skips (no process/face, no * get/score, no match UI). Mirrors the Flow orchestrator's behavior. */ skipFaceMatch: boolean; registeredModules: WorkflowModuleRegistry; configMappers: ModuleConfigMappers; finishStatus: FinishStatus | undefined; totalScoreStatus: TotalScore | undefined; customModuleCallback: CustomModuleCallback | undefined; interviewId: string; isDesktop: boolean; isInjectedNode: boolean; isHomeContinueLoading: boolean; hasShownHome: boolean; getFinishStatus: GetFinishStatusFn; getTotalScoreStatus: GetTotalScoreStatusFn; }; type WorkflowInput = { modules: WorkflowModuleRegistry; /** * Per-module config mappers. Each entry converts the raw workflow-node * `moduleConfiguration` into the shape the module's manager expects. * Modules without an entry receive the raw config as-is. */ configMappers?: ModuleConfigMappers; customModuleCallback?: CustomModuleCallback; getFinishStatus?: GetFinishStatusFn; getTotalScoreStatus?: GetTotalScoreStatusFn; /** Interview ID from the session. Required for custom module processing. */ interviewId?: string; /** Whether the device is a desktop. Determines desktop-to-mobile redirect injection. Defaults to true. */ isDesktop?: boolean; }; declare const workflowMachine: StateMachine> | ActorRefFromLogic> | ActorRefFromLogic> | ActorRefFromLogic> | ActorRefFromLogic> | ActorRefFromLogic> | ActorRefFromLogic> | undefined; }, Values<{ runChildModule: { src: "runChildModule"; logic: CallbackActorLogic; id: string | undefined; }; loadWorkflow: { src: "loadWorkflow"; logic: PromiseActorLogic; id: string | undefined; }; processNextNode: { src: "processNextNode"; logic: PromiseActorLogic; id: string | undefined; }; handleCustomModule: { src: "handleCustomModule"; logic: PromiseActorLogic; id: string | undefined; }; resolveModule: { src: "resolveModule"; logic: PromiseActorLogic; id: string | undefined; }; notifyBackend: { src: "notifyBackend"; logic: PromiseActorLogic; id: string | undefined; }; resolveScore: { src: "resolveScore"; logic: PromiseActorLogic; id: string | undefined; }; }>, Values<{ setError: { type: "setError"; params: NonReducibleUnknown; }; setLoadingResult: { type: "setLoadingResult"; params: NonReducibleUnknown; }; persistSkipFaceMatch: { type: "persistSkipFaceMatch"; params: NonReducibleUnknown; }; setNextNode: { type: "setNextNode"; params: NonReducibleUnknown; }; setCustomModuleResult: { type: "setCustomModuleResult"; params: NonReducibleUnknown; }; setResolvedMachine: { type: "setResolvedMachine"; params: NonReducibleUnknown; }; setFinishStatus: { type: "setFinishStatus"; params: NonReducibleUnknown; }; setTotalScoreStatus: { type: "setTotalScoreStatus"; params: NonReducibleUnknown; }; setFinishStatusFailed: { type: "setFinishStatusFailed"; params: NonReducibleUnknown; }; setModuleError: { type: "setModuleError"; params: NonReducibleUnknown; }; setModuleErrorCode: { type: "setModuleErrorCode"; params: NonReducibleUnknown; }; trackAdvanceableModuleError: { type: "trackAdvanceableModuleError"; params: unknown; }; trackTerminalModuleError: { type: "trackTerminalModuleError"; params: unknown; }; trackNodeTransition: { type: "trackNodeTransition"; params: unknown; }; setHomeContinueLoading: { type: "setHomeContinueLoading"; params: NonReducibleUnknown; }; clearHomeContinueLoading: { type: "clearHomeContinueLoading"; params: NonReducibleUnknown; }; markHomeShown: { type: "markHomeShown"; params: NonReducibleUnknown; }; }>, Values<{ isModuleNode: { type: "isModuleNode"; params: unknown; }; isFinishNode: { type: "isFinishNode"; params: unknown; }; isAsyncResolutionNode: { type: "isAsyncResolutionNode"; params: unknown; }; isCustomModule: { type: "isCustomModule"; params: unknown; }; isOnboardingFinishedSignal: { type: "isOnboardingFinishedSignal"; params: unknown; }; isAdvanceableModuleError: { type: "isAdvanceableModuleError"; params: unknown; }; shouldResolveScore: { type: "shouldResolveScore"; params: unknown; }; isOnboardingFinishedWithStatusScreen: { type: "isOnboardingFinishedWithStatusScreen"; params: unknown; }; shouldEnterHome: { type: "shouldEnterHome"; params: unknown; }; shouldEnterHomeAfterRedirect: { type: "shouldEnterHomeAfterRedirect"; params: unknown; }; }>, never, "error" | "idle" | "closed" | "finished" | "home" | "loading" | "resolvingModule" | "completing" | "asyncResolution" | "handlingCustomModule" | "runningModule" | "resolvingScore" | "processingNode", string, WorkflowInput, NonReducibleUnknown, EventObject, MetaObject, { readonly id: "workflow"; readonly initial: "idle"; readonly context: ({ input }: { spawn: { (logic: TSrc, ...[options]: ({ src: "runChildModule"; logic: CallbackActorLogic; id: string | undefined; } extends (infer T) ? T extends { src: "runChildModule"; logic: CallbackActorLogic; id: string | undefined; } ? T extends { src: TSrc; } ? ConditionalRequired<[options?: ({ id?: T["id"] | undefined; systemId?: string; input?: InputFrom | undefined; syncSnapshot?: boolean; } & { [K in RequiredActorOptions]: unknown; }) | undefined], IsNotNever>> : never : never : never) | ({ src: "loadWorkflow"; logic: PromiseActorLogic; id: string | undefined; } extends (infer T_1) ? T_1 extends { src: "loadWorkflow"; logic: PromiseActorLogic; id: string | undefined; } ? T_1 extends { src: TSrc; } ? ConditionalRequired<[options?: ({ id?: T_1["id"] | undefined; systemId?: string; input?: InputFrom | undefined; syncSnapshot?: boolean; } & { [K_1 in RequiredActorOptions]: unknown; }) | undefined], IsNotNever>> : never : never : never) | ({ src: "processNextNode"; logic: PromiseActorLogic; id: string | undefined; } extends (infer T_2) ? T_2 extends { src: "processNextNode"; logic: PromiseActorLogic; id: string | undefined; } ? T_2 extends { src: TSrc; } ? ConditionalRequired<[options?: ({ id?: T_2["id"] | undefined; systemId?: string; input?: InputFrom | undefined; syncSnapshot?: boolean; } & { [K_2 in RequiredActorOptions]: unknown; }) | undefined], IsNotNever>> : never : never : never) | ({ src: "handleCustomModule"; logic: PromiseActorLogic; id: string | undefined; } extends (infer T_3) ? T_3 extends { src: "handleCustomModule"; logic: PromiseActorLogic; id: string | undefined; } ? T_3 extends { src: TSrc; } ? ConditionalRequired<[options?: ({ id?: T_3["id"] | undefined; systemId?: string; input?: InputFrom | undefined; syncSnapshot?: boolean; } & { [K_3 in RequiredActorOptions]: unknown; }) | undefined], IsNotNever>> : never : never : never) | ({ src: "resolveModule"; logic: PromiseActorLogic; id: string | undefined; } extends (infer T_4) ? T_4 extends { src: "resolveModule"; logic: PromiseActorLogic; id: string | undefined; } ? T_4 extends { src: TSrc; } ? ConditionalRequired<[options?: ({ id?: T_4["id"] | undefined; systemId?: string; input?: InputFrom | undefined; syncSnapshot?: boolean; } & { [K_4 in RequiredActorOptions]: unknown; }) | undefined], IsNotNever>> : never : never : never) | ({ src: "notifyBackend"; logic: PromiseActorLogic; id: string | undefined; } extends (infer T_5) ? T_5 extends { src: "notifyBackend"; logic: PromiseActorLogic; id: string | undefined; } ? T_5 extends { src: TSrc; } ? ConditionalRequired<[options?: ({ id?: T_5["id"] | undefined; systemId?: string; input?: InputFrom | undefined; syncSnapshot?: boolean; } & { [K_5 in RequiredActorOptions]: unknown; }) | undefined], IsNotNever>> : never : never : never) | ({ src: "resolveScore"; logic: PromiseActorLogic; id: string | undefined; } extends (infer T_6) ? T_6 extends { src: "resolveScore"; logic: PromiseActorLogic; id: string | undefined; } ? T_6 extends { src: TSrc; } ? ConditionalRequired<[options?: ({ id?: T_6["id"] | undefined; systemId?: string; input?: InputFrom | undefined; syncSnapshot?: boolean; } & { [K_6 in RequiredActorOptions]: unknown; }) | undefined], IsNotNever>> : never : never : never)): ActorRefFromLogic; id: string | undefined; }; loadWorkflow: { src: "loadWorkflow"; logic: PromiseActorLogic; id: string | undefined; }; processNextNode: { src: "processNextNode"; logic: PromiseActorLogic; id: string | undefined; }; handleCustomModule: { src: "handleCustomModule"; logic: PromiseActorLogic; id: string | undefined; }; resolveModule: { src: "resolveModule"; logic: PromiseActorLogic; id: string | undefined; }; notifyBackend: { src: "notifyBackend"; logic: PromiseActorLogic; id: string | undefined; }; resolveScore: { src: "resolveScore"; logic: PromiseActorLogic; id: string | undefined; }; }>, "src", TSrc>["logic"]>; (src: TLogic, ...[options]: ConditionalRequired<[options?: ({ id?: never; systemId?: string; input?: InputFrom | undefined; syncSnapshot?: boolean; } & { [K in RequiredLogicInput]: unknown; }) | undefined], IsNotNever>>): ActorRefFromLogic; }; input: WorkflowInput; self: ActorRef, StateValue, string, unknown, any, any>, { type: "LOAD"; } | { type: "MODULE_COMPLETE"; output?: unknown; } | { type: "MODULE_ERROR"; error: unknown; moduleErrorCode?: string; } | { type: "COMPLETE_FLOW"; } | { type: "FINISH_WORKFLOW"; } | { type: "HOME_CONTINUE"; }, AnyEventObject>; }) => { workflowConfig: undefined; currentNode: undefined; firstNode: undefined; resolvedMachine: undefined; error: undefined; errorCode: undefined; moduleErrorCode: undefined; skipFaceMatch: false; registeredModules: WorkflowModuleRegistry; configMappers: ModuleConfigMappers; finishStatus: undefined; totalScoreStatus: undefined; customModuleCallback: CustomModuleCallback | undefined; interviewId: string; isDesktop: boolean; isInjectedNode: false; isHomeContinueLoading: false; hasShownHome: false; getFinishStatus: GetFinishStatusFn; getTotalScoreStatus: GetTotalScoreStatusFn; }; readonly states: { readonly idle: { readonly on: { readonly LOAD: "loading"; }; }; readonly loading: { readonly invoke: { readonly id: "loadWorkflow"; readonly src: "loadWorkflow"; readonly input: ({ context }: { context: WorkflowContext; event: { type: "LOAD"; } | { type: "MODULE_COMPLETE"; output?: unknown; } | { type: "MODULE_ERROR"; error: unknown; moduleErrorCode?: string; } | { type: "COMPLETE_FLOW"; } | { type: "FINISH_WORKFLOW"; } | { type: "HOME_CONTINUE"; }; self: ActorRef, StateValue, string, unknown, any, any>, { type: "LOAD"; } | { type: "MODULE_COMPLETE"; output?: unknown; } | { type: "MODULE_ERROR"; error: unknown; moduleErrorCode?: string; } | { type: "COMPLETE_FLOW"; } | { type: "FINISH_WORKFLOW"; } | { type: "HOME_CONTINUE"; }, AnyEventObject>; }) => { isDesktop: boolean; }; readonly onDone: readonly [{ readonly target: "home"; readonly guard: "shouldEnterHome"; readonly actions: "setLoadingResult"; }, { readonly target: "resolvingModule"; readonly guard: "isModuleNode"; readonly actions: "setLoadingResult"; }, { readonly target: "completing"; readonly guard: "isFinishNode"; readonly actions: "setLoadingResult"; }, { readonly target: "asyncResolution"; readonly guard: "isAsyncResolutionNode"; readonly actions: "setLoadingResult"; }]; readonly onError: { readonly target: "error"; readonly actions: "setError"; }; }; }; readonly home: { readonly entry: "markHomeShown"; readonly on: { readonly HOME_CONTINUE: { readonly target: "resolvingModule"; readonly actions: "setHomeContinueLoading"; }; }; }; readonly resolvingModule: { readonly always: readonly [{ readonly target: "handlingCustomModule"; readonly guard: "isCustomModule"; }]; readonly invoke: { readonly id: "resolveModule"; readonly src: "resolveModule"; readonly input: ({ context }: { context: WorkflowContext; event: { type: "LOAD"; } | { type: "MODULE_COMPLETE"; output?: unknown; } | { type: "MODULE_ERROR"; error: unknown; moduleErrorCode?: string; } | { type: "COMPLETE_FLOW"; } | { type: "FINISH_WORKFLOW"; } | { type: "HOME_CONTINUE"; }; self: ActorRef, StateValue, string, unknown, any, any>, { type: "LOAD"; } | { type: "MODULE_COMPLETE"; output?: unknown; } | { type: "MODULE_ERROR"; error: unknown; moduleErrorCode?: string; } | { type: "COMPLETE_FLOW"; } | { type: "FINISH_WORKFLOW"; } | { type: "HOME_CONTINUE"; }, AnyEventObject>; }) => { moduleKey: string; registeredModules: WorkflowModuleRegistry; }; readonly onDone: { readonly target: "runningModule"; readonly actions: "setResolvedMachine"; }; readonly onError: { readonly target: "error"; readonly actions: "setError"; }; }; }; readonly runningModule: { readonly entry: "clearHomeContinueLoading"; readonly invoke: { readonly id: "currentModule"; readonly src: "runChildModule"; readonly input: ({ context }: { context: WorkflowContext; }) => { machine: AnyStateMachine | undefined; config: Record; }; }; readonly on: { readonly MODULE_COMPLETE: readonly [{ readonly target: "resolvingScore"; readonly guard: "isOnboardingFinishedWithStatusScreen"; }, { readonly target: "finished"; readonly guard: "isOnboardingFinishedSignal"; }, { readonly target: "processingNode"; readonly actions: readonly ["persistSkipFaceMatch"]; }]; readonly MODULE_ERROR: readonly [{ readonly guard: "isAdvanceableModuleError"; readonly target: "processingNode"; readonly actions: readonly ["setModuleErrorCode", "trackAdvanceableModuleError"]; }, { readonly target: "error"; readonly actions: readonly ["setModuleError", "trackTerminalModuleError"]; }]; readonly COMPLETE_FLOW: "completing"; readonly FINISH_WORKFLOW: readonly [{ readonly target: "resolvingScore"; readonly guard: "shouldResolveScore"; }, { readonly target: "finished"; }]; }; }; readonly handlingCustomModule: { readonly invoke: { readonly id: "customModule"; readonly src: "handleCustomModule"; readonly input: ({ context }: { context: WorkflowContext; event: { type: "LOAD"; } | { type: "MODULE_COMPLETE"; output?: unknown; } | { type: "MODULE_ERROR"; error: unknown; moduleErrorCode?: string; } | { type: "COMPLETE_FLOW"; } | { type: "FINISH_WORKFLOW"; } | { type: "HOME_CONTINUE"; }; self: ActorRef, StateValue, string, unknown, any, any>, { type: "LOAD"; } | { type: "MODULE_COMPLETE"; output?: unknown; } | { type: "MODULE_ERROR"; error: unknown; moduleErrorCode?: string; } | { type: "COMPLETE_FLOW"; } | { type: "FINISH_WORKFLOW"; } | { type: "HOME_CONTINUE"; }, AnyEventObject>; }) => { currentNode: WorkflowNode; interviewId: string; customModuleCallback: CustomModuleCallback | undefined; }; readonly onDone: readonly [{ readonly target: "resolvingModule"; readonly guard: "isModuleNode"; readonly actions: "setCustomModuleResult"; }, { readonly target: "completing"; readonly guard: "isFinishNode"; readonly actions: "setCustomModuleResult"; }, { readonly target: "asyncResolution"; readonly guard: "isAsyncResolutionNode"; readonly actions: "setCustomModuleResult"; }]; readonly onError: { readonly target: "error"; readonly actions: "setError"; }; }; }; readonly processingNode: { readonly invoke: { readonly id: "processNext"; readonly src: "processNextNode"; readonly input: ({ context }: { context: WorkflowContext; event: { type: "LOAD"; } | { type: "MODULE_COMPLETE"; output?: unknown; } | { type: "MODULE_ERROR"; error: unknown; moduleErrorCode?: string; } | { type: "COMPLETE_FLOW"; } | { type: "FINISH_WORKFLOW"; } | { type: "HOME_CONTINUE"; }; self: ActorRef, StateValue, string, unknown, any, any>, { type: "LOAD"; } | { type: "MODULE_COMPLETE"; output?: unknown; } | { type: "MODULE_ERROR"; error: unknown; moduleErrorCode?: string; } | { type: "COMPLETE_FLOW"; } | { type: "FINISH_WORKFLOW"; } | { type: "HOME_CONTINUE"; }, AnyEventObject>; }) => { isInjectedNode: boolean; firstNode: WorkflowNode | undefined; currentNodeModuleKey: string | undefined; workflowConfigId: string | undefined; workflowRedirectDesktopToMobile: boolean; workflowDisableSmsOption: boolean; workflowAddContinueToDesktop: boolean; workflowQrPhishingResistance: boolean; isDesktop: boolean; }; readonly onDone: readonly [{ readonly target: "home"; readonly guard: "shouldEnterHomeAfterRedirect"; readonly actions: readonly ["setNextNode", "trackNodeTransition"]; }, { readonly target: "resolvingModule"; readonly guard: "isModuleNode"; readonly actions: readonly ["setNextNode", "trackNodeTransition"]; readonly reenter: true; }, { readonly target: "completing"; readonly guard: "isFinishNode"; readonly actions: readonly ["setNextNode", "trackNodeTransition"]; }, { readonly target: "asyncResolution"; readonly guard: "isAsyncResolutionNode"; readonly actions: readonly ["setNextNode", "trackNodeTransition"]; }]; readonly onError: { readonly target: "error"; readonly actions: "setError"; }; }; }; readonly completing: { readonly invoke: { readonly id: "notifyBackend"; readonly src: "notifyBackend"; readonly input: ({ context }: { context: WorkflowContext; event: { type: "LOAD"; } | { type: "MODULE_COMPLETE"; output?: unknown; } | { type: "MODULE_ERROR"; error: unknown; moduleErrorCode?: string; } | { type: "COMPLETE_FLOW"; } | { type: "FINISH_WORKFLOW"; } | { type: "HOME_CONTINUE"; }; self: ActorRef, StateValue, string, unknown, any, any>, { type: "LOAD"; } | { type: "MODULE_COMPLETE"; output?: unknown; } | { type: "MODULE_ERROR"; error: unknown; moduleErrorCode?: string; } | { type: "COMPLETE_FLOW"; } | { type: "FINISH_WORKFLOW"; } | { type: "HOME_CONTINUE"; }, AnyEventObject>; }) => { getFinishStatus: GetFinishStatusFn; workflowId: string | undefined; }; readonly onDone: { readonly target: "finished"; readonly actions: "setFinishStatus"; }; readonly onError: { readonly target: "error"; readonly actions: readonly ["setError", "setFinishStatusFailed"]; }; }; }; readonly resolvingScore: { readonly invoke: { readonly id: "resolveScore"; readonly src: "resolveScore"; readonly input: ({ context }: { context: WorkflowContext; event: { type: "LOAD"; } | { type: "MODULE_COMPLETE"; output?: unknown; } | { type: "MODULE_ERROR"; error: unknown; moduleErrorCode?: string; } | { type: "COMPLETE_FLOW"; } | { type: "FINISH_WORKFLOW"; } | { type: "HOME_CONTINUE"; }; self: ActorRef, StateValue, string, unknown, any, any>, { type: "LOAD"; } | { type: "MODULE_COMPLETE"; output?: unknown; } | { type: "MODULE_ERROR"; error: unknown; moduleErrorCode?: string; } | { type: "COMPLETE_FLOW"; } | { type: "FINISH_WORKFLOW"; } | { type: "HOME_CONTINUE"; }, AnyEventObject>; }) => { getTotalScoreStatus: GetTotalScoreStatusFn; }; readonly onDone: { readonly target: "finished"; readonly actions: "setTotalScoreStatus"; }; readonly onError: { readonly target: "finished"; }; }; }; readonly finished: { readonly type: "final"; }; readonly asyncResolution: { readonly type: "final"; }; readonly closed: { readonly type: "final"; }; readonly error: { readonly type: "final"; }; }; }>; //#endregion export { type CreateWorkflowManagerOptions, type CustomModuleCallback, type WorkflowCompletingState, type WorkflowConfig, type WorkflowFinishedState, type WorkflowManager, type WorkflowNode, type WorkflowReadyState, type WorkflowState, createWorkflowManager, workflowMachine };