UNPKG

n8n

Version:

n8n Workflow Automation Tool

24 lines (23 loc) 985 B
import type { EntityManager } from '@n8n/db'; import type { IWorkflowBase } from 'n8n-workflow'; export type ExecutionRef = { workflowId: string; executionId: string; }; export declare function createExecutionRef(workflowId: string, executionId: string): ExecutionRef; export type WorkflowSnapshot = Pick<IWorkflowBase, 'id' | 'name' | 'nodes' | 'connections' | 'settings'>; export type ExecutionDataPayload = { data: string; workflowData: WorkflowSnapshot; workflowVersionId: string | null; }; export type ExecutionDataBundle = ExecutionDataPayload & { version: 1; }; export interface ExecutionDataStore { init?(): Promise<void>; write(ref: ExecutionRef, payload: ExecutionDataPayload, tx?: EntityManager): Promise<void>; read(ref: ExecutionRef, tx?: EntityManager): Promise<ExecutionDataBundle | null>; readMany(refs: ExecutionRef[]): Promise<Map<string, ExecutionDataBundle>>; delete(ref: ExecutionRef | ExecutionRef[]): Promise<void>; }