import { EventEmitter } from 'events';
import { ProcessEngine } from './process-engine.js';
import { ProcessStore } from './process-store.js';
import { ProcessDefinition, ProcessTrigger } from './types.js';
import { CronAdapter } from './cron-adapter.js';
interface TriggerExecution {
    triggerId: string;
    processId: string;
    executionId: string;
    executedAt: string;
    status: 'success' | 'failed';
}
export declare class TriggerManager extends EventEmitter {
    private engine;
    private store;
    private scheduledTriggers;
    private activeTriggers;
    private triggerHistory;
    private isRunning;
    private checkInterval?;
    private cronAdapter;
    constructor(engine: ProcessEngine, store: ProcessStore, cronAdapter?: CronAdapter);
    initialize(): Promise<void>;
    start(): Promise<void>;
    stop(): Promise<void>;
    private loadTriggers;
    private registerTriggerInternal;
    private registerScheduleTrigger;
    private registerEventTrigger;
    private registerWebhookTrigger;
    private registerConditionTrigger;
    private checkTriggers;
    private checkConditionTrigger;
    private parseCronExpression;
    registerTrigger(process: ProcessDefinition, trigger: ProcessTrigger): Promise<void>;
    unregisterTrigger(processId: string, triggerId: string): Promise<void>;
    getActiveTriggers(processId?: string): Array<ProcessTrigger & {
        processId: string;
    }>;
    executeTrigger(processId: string, triggerId: string, context?: Record<string, any>): Promise<any>;
    getTriggerHistory(processId: string, triggerId: string): TriggerExecution[];
    updateTrigger(processId: string, triggerId: string, updates: Partial<ProcessTrigger>): Promise<void>;
    handleEvent(eventType: string, eventData: any): Promise<void>;
    stopAll(): void;
    triggerProcess(processId: string, variables?: Record<string, any>): Promise<void>;
    enableTrigger(processId: string, triggerId: string): Promise<void>;
    disableTrigger(processId: string, triggerId: string): Promise<void>;
}
export {};
//# sourceMappingURL=trigger-manager.d.ts.map