UNPKG

n8n

Version:

n8n Workflow Automation Tool

42 lines (41 loc) 1.25 kB
import type { ExecutionError, ExecutionStatus, IExecuteResponsePromiseData, IRun, WorkflowExecuteMode as WorkflowExecutionMode } from 'n8n-workflow'; import type Bull from 'bull'; import type PCancelable from 'p-cancelable'; export type JobQueue = Bull.Queue<JobData>; export type Job = Bull.Job<JobData>; export type JobId = Job['id']; export type JobData = { executionId: string; loadStaticData: boolean; }; export type JobResult = { success: boolean; error?: ExecutionError; }; export type JobStatus = Bull.JobStatus; export type JobOptions = Bull.JobOptions; export type JobMessage = RepondToWebhookMessage | AbortJobMessage; export type RepondToWebhookMessage = { kind: 'respond-to-webhook'; executionId: string; response: IExecuteResponsePromiseData; }; export type AbortJobMessage = { kind: 'abort-job'; }; export type RunningJob = { executionId: string; workflowId: string; workflowName: string; mode: WorkflowExecutionMode; startedAt: Date; retryOf: string; status: ExecutionStatus; run: PCancelable<IRun>; }; export type RunningJobSummary = Omit<RunningJob, 'run'>; export type QueueRecoveryContext = { timeout?: NodeJS.Timeout; batchSize: number; waitMs: number; };