import { Document, ObjectId } from 'mongoose'; import { TaskExecution } from './execution.interface'; import { TaskDefinition } from './task-definition.interface'; export declare const WorkflowStatus: { readonly PENDING: "pending"; readonly IN_PROGRESS: "inProgress"; readonly FINISHED: "finished"; readonly FAILED: "failed"; }; export type WorkflowStatus = (typeof WorkflowStatus)[keyof typeof WorkflowStatus]; export interface WorkflowRunData { _id: ObjectId; namespace: string; workflowName: string; scheduledAt: Date; status: WorkflowStatus; currentTask: T; nextTask: T | null; state: Record; executions: TaskExecution[]; errorCount: number; lastHeartbeat?: Date; retryAfter?: Date; startedAt?: Date; completedAt?: Date; workflowSnapshot: { tasks: TaskDefinition[]; firstTask: string; maxRetries: number; }; createdAt: Date; updatedAt: Date; } export interface WorkflowExecution extends WorkflowRunData, Document { } //# sourceMappingURL=workflow-execution.interface.d.ts.map