n8n
Version:
n8n Workflow Automation Tool
52 lines (51 loc) • 1.39 kB
TypeScript
import type { ExecutionStatus, WorkflowExecuteMode, INode } from 'n8n-workflow';
import type { TracingContext } from './tracing-context';
export type CustomAttributes = Record<string, string>;
type ProjectContext = {
id: string;
customAttributes?: CustomAttributes;
};
type WorkflowContext = {
id: string;
name: string;
versionId?: string;
nodeCount: number;
customAttributes?: CustomAttributes;
};
export type StartWorkflowParams = {
executionId: string;
tracingContext?: TracingContext;
linkTo?: TracingContext;
workflow: WorkflowContext;
project?: ProjectContext;
};
export type EndWorkflowParams = {
executionId: string;
status: ExecutionStatus;
mode: WorkflowExecuteMode;
error?: unknown;
isRetry: boolean;
retryOf?: string;
};
type NodeTracingParams = Pick<INode, 'id' | 'name' | 'type' | 'typeVersion'>;
export type StartNodeParams = {
executionId: string;
node: NodeTracingParams;
};
type EndNodeError = {
message: string;
constructor: {
name: string;
};
stack?: string;
};
export declare function isEndNodeError(error: unknown): error is EndNodeError;
export type EndNodeParams = {
executionId: string;
node: NodeTracingParams;
inputItemCount: number;
outputItemCount: number;
error?: EndNodeError;
customAttributes?: Record<string, string>;
};
export {};