import { ProgramRegistration, WorkflowConfiguration } from 'src/common/entities';
import { Repository } from 'typeorm';
import { AppLoggerService } from 'src/common/services/logger.service';
import { WorkflowConfigurationService } from './services/workflow-configuration.service';
import { WorkflowStageService } from './services/workflow-stage.service';
import { RegistrationWorkflowStageService } from './services/registration-workflow-stage.service';
import { WorkflowValidationService } from './services/workflow-validation.service';
export declare class WorkflowService {
    private readonly programRegistrationRepository;
    private readonly logger;
    private readonly workflowConfigurationService;
    private readonly workflowStageService;
    private readonly registrationWorkflowStageService;
    private readonly workflowValidationService;
    constructor(programRegistrationRepository: Repository<ProgramRegistration>, logger: AppLoggerService, workflowConfigurationService: WorkflowConfigurationService, workflowStageService: WorkflowStageService, registrationWorkflowStageService: RegistrationWorkflowStageService, workflowValidationService: WorkflowValidationService);
    getWorkflowByProgramType(programTypeKey: string): Promise<WorkflowConfiguration>;
    getWorkflowProgress(registrationId: number): Promise<{
        registrationId: number;
        workflowId: number;
        stages: {
            stageKey: string;
            stageName: string;
            stageOrder: number;
            status: string;
            completedAt: Date | null;
        }[];
    }>;
    getCurrentStage(registrationId: number): Promise<{
        stageKey: string;
        stageName: string;
        stageOrder: number;
        status: string;
        completedAt: Date | null;
        registrationId: number;
        workflowId: number;
    }>;
    getWorkflowContextForRegistration(registrationId: number): Promise<{
        workflowId: number;
        workflowRequiredFields: Record<string, unknown>;
        currentWorkflowStage: {
            stageKey: string;
            stageName: string;
            stageOrder: number;
            status: string;
        } | null;
    }>;
    getWorkflowContextForMultipleRegistrations(registrationIds: number[]): Promise<Map<number, {
        workflowId: number;
        workflowRequiredFields: Record<string, unknown>;
        currentWorkflowStage: {
            stageKey: string;
            stageName: string;
            stageOrder: number;
            status: string;
        } | null;
    }>>;
    syncStageByKey(registrationId: number, stageKey: string, status: 'pending' | 'completed' | 'initiated', userId?: number): Promise<void>;
    reevaluateRegistrationCompletion(registrationId: number): Promise<void>;
    private updateRegistrationStatusBasedOnStage;
    private evaluateCriteria;
    private getWorkflowDetailsForRegistration;
    getWorkFlowByKey(workflowKey: string): Promise<{
        workflowId: number;
        workflowKey: string;
        workflowName: string;
        programType: string;
        workflowVersion: string;
        lifecycleStatus: import("../common/enum/workflow-lifecycle-status.enum").WorkflowLifecycleStatusEnum;
        description: string | null;
        lastUpdated: string;
        registrationRules: Record<string, unknown> | null;
        initialStage: Record<string, unknown> | null;
        stages: {
            stageId: string;
            stageKey: string;
            stageName: string;
            stageOrder: number;
            stageCategory: string;
            description: string | null;
            prerequisiteRulesConfig: Record<string, unknown> | null;
            executionRulesConfig: Record<string, unknown> | null;
            actionButtons: Record<string, unknown>[] | null;
            completionActionsConfig: Record<string, unknown> | null;
        }[];
        independentActions: Record<string, any>;
    }>;
    getWorkFlowById(id: number): Promise<{
        workflowId: number;
        workflowKey: string;
        workflowName: string;
        programType: string;
        workflowVersion: string;
        lifecycleStatus: import("../common/enum/workflow-lifecycle-status.enum").WorkflowLifecycleStatusEnum;
        description: string | null;
        lastUpdated: string;
        registrationRules: Record<string, unknown> | null;
        initialStage: Record<string, unknown> | null;
        stages: {
            stageId: string;
            stageKey: string;
            stageName: string;
            stageOrder: number;
            stageCategory: string;
            description: string | null;
            prerequisiteRulesConfig: Record<string, unknown> | null;
            executionRulesConfig: Record<string, unknown> | null;
            actionButtons: Record<string, unknown>[] | null;
            completionActionsConfig: Record<string, unknown> | null;
        }[];
        independentActions: Record<string, any>;
    }>;
    private transformWorkflowEntity;
    transformWorkflowToDto(workflow: any): {
        workflowId: any;
        workflowName: any;
        workflowKey: any;
        programType: any;
        workflowVersion: any;
        lifecycleStatus: any;
        description: any;
        lastUpdated: any;
        registrationRules: any;
        initialStage: any;
        stages: any;
        independentActions: any;
    } | null;
}
