n8n
Version:
n8n Workflow Automation Tool
32 lines (31 loc) • 1.84 kB
TypeScript
import type { User } from '@n8n/db';
import { type IPinData } from 'n8n-workflow';
import z from 'zod';
import type { ToolDefinition } from '../mcp.types';
import type { ActiveExecutions } from '../../../active-executions';
import type { NodeTypes } from '../../../node-types';
import type { McpService } from '../../../modules/mcp/mcp.service';
import type { Telemetry } from '../../../telemetry';
import type { WorkflowRunner } from '../../../workflow-runner';
import type { WorkflowFinderService } from '../../../workflows/workflow-finder.service';
declare const inputSchema: z.ZodObject<{
workflowId: z.ZodString;
pinData: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
triggerNodeName: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
workflowId: string;
pinData: Record<string, Record<string, unknown>[]>;
triggerNodeName?: string | undefined;
}, {
workflowId: string;
pinData: Record<string, Record<string, unknown>[]>;
triggerNodeName?: string | undefined;
}>;
type TestWorkflowOutput = {
executionId: string | null;
status: 'success' | 'error' | 'running' | 'waiting' | 'canceled' | 'crashed' | 'new' | 'unknown';
error?: string;
};
export declare const createTestWorkflowTool: (user: User, workflowFinderService: WorkflowFinderService, activeExecutions: ActiveExecutions, workflowRunner: WorkflowRunner, nodeTypes: NodeTypes, telemetry: Telemetry, mcpService: McpService) => ToolDefinition<typeof inputSchema.shape>;
export declare function testWorkflow(user: User, workflowFinderService: WorkflowFinderService, activeExecutions: ActiveExecutions, workflowRunner: WorkflowRunner, nodeTypes: NodeTypes, mcpService: McpService, workflowId: string, pinData: IPinData, triggerNodeName?: string): Promise<TestWorkflowOutput>;
export {};