/** * Workflow Scheduler (FEAT-004) * * Handles scheduled workflow execution with cron-based scheduling. * Executes workflows at scheduled intervals and delivers results via webhooks. */ import type { ScheduledWorkflow, CreateScheduledWorkflowRequest, UpdateScheduledWorkflowRequest, ScheduledWorkflowExecution, Workflow } from '../types/workflow.js'; import type { SmartBrowser } from './smart-browser.js'; /** * Workflow Scheduler */ export declare class WorkflowScheduler { private smartBrowser; private tenantId; private scheduledWorkflows; private executions; private timers; private workflows; constructor(smartBrowser: SmartBrowser, tenantId: string); /** * Create a new scheduled workflow */ createScheduledWorkflow(request: CreateScheduledWorkflowRequest): Promise; /** * Update a scheduled workflow */ updateScheduledWorkflow(id: string, request: UpdateScheduledWorkflowRequest): Promise; /** * Delete a scheduled workflow */ deleteScheduledWorkflow(id: string): Promise; /** * Get a scheduled workflow by ID */ getScheduledWorkflow(id: string): ScheduledWorkflow | undefined; /** * List all scheduled workflows for tenant */ listScheduledWorkflows(): ScheduledWorkflow[]; /** * Get execution history for a scheduled workflow */ getExecutionHistory(scheduledWorkflowId: string, limit?: number): ScheduledWorkflowExecution[]; /** * Register a workflow for replay */ registerWorkflow(workflow: Workflow): void; /** * Schedule the next execution */ private scheduleExecution; /** * Cancel a scheduled execution */ private cancelExecution; /** * Execute a workflow */ private executeWorkflow; /** * Deliver webhook notification */ private deliverWebhook; /** * Generate unique ID */ private generateId; /** * Delay helper for retries */ private delay; /** * Stop all scheduled executions */ shutdown(): void; } //# sourceMappingURL=workflow-scheduler.d.ts.map