n8n
Version:
n8n Workflow Automation Tool
22 lines (21 loc) • 820 B
TypeScript
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): Promise<void>;
read(ref: ExecutionRef): Promise<ExecutionDataBundle | null>;
delete(ref: ExecutionRef | ExecutionRef[]): Promise<void>;
}