import { ProgressApplicantResult, FlowStep, StepInfo, ApplicantProgressStatus, WorkflowResultType } from '../types'; /** * Workflow state events */ export interface WorkflowStateEvents { progressUpdated: ProgressApplicantResult; stepChanged: FlowStep | null; statusChanged: ApplicantProgressStatus; error: Error; completed: WorkflowResultType; } /** * Workflow state manager * Manages the current state of a workflow execution */ export declare class WorkflowState { private events; private _applicantId; private _progress; private _error; constructor(); /** * Get current applicant ID */ get applicantId(): number | null; /** * Get current progress */ get progress(): ProgressApplicantResult | null; /** * Get current step */ get currentStep(): FlowStep | null; /** * Get all workflow steps */ get steps(): StepInfo[]; /** * Get current status */ get status(): ApplicantProgressStatus; /** * Get workflow result */ get workflowResult(): WorkflowResultType | null; /** * Get current error */ get error(): Error | null; /** * Check if workflow is complete */ get isComplete(): boolean; /** * Check if workflow is on hold */ get isOnHold(): boolean; /** * Check if workflow is in progress */ get isInProgress(): boolean; /** * Set applicant ID */ setApplicantId(applicantId: number): void; /** * Update progress */ updateProgress(progress: ProgressApplicantResult): void; /** * Set error */ setError(error: Error): void; /** * Clear error */ clearError(): void; /** * Reset state */ reset(): void; /** * Subscribe to progress updates */ onProgressUpdated(callback: (progress: ProgressApplicantResult) => void): () => void; /** * Subscribe to step changes */ onStepChanged(callback: (step: FlowStep | null) => void): () => void; /** * Subscribe to status changes */ onStatusChanged(callback: (status: ApplicantProgressStatus) => void): () => void; /** * Subscribe to errors */ onError(callback: (error: Error) => void): () => void; /** * Subscribe to completion */ onCompleted(callback: (result: WorkflowResultType) => void): () => void; /** * Clear all event listeners */ clearListeners(): void; } //# sourceMappingURL=workflow-state.d.ts.map