UNPKG

n8n-mcp

Version:

Integration between n8n workflow automation and Model Context Protocol (MCP)

92 lines 4.96 kB
import { Workflow, WorkflowListParams, WorkflowListResponse, Execution, ExecutionListParams, ExecutionListResponse, TestRunSummary, TestRunListParams, TestCaseListParams, TestRunListResponse, TestCaseListResponse, Credential, CredentialListParams, CredentialListResponse, Tag, TagListParams, TagListResponse, HealthCheckResponse, N8nVersionInfo, Variable, WebhookRequest, SourceControlStatus, SourceControlPullResult, SourceControlPushResult, DataTable, DataTableColumn, DataTableListParams, DataTableRow, DataTableRowListParams, DataTableInsertRowsParams, DataTableUpdateRowsParams, DataTableUpsertRowParams, DataTableDeleteRowsParams } from '../types/n8n-api'; export interface N8nApiClientConfig { baseUrl: string; apiKey: string; timeout?: number; maxRetries?: number; cfClientId?: string; cfClientSecret?: string; } export declare class N8nApiClient { private client; private maxRetries; private baseUrl; private versionInfo; private versionPromise; private pinnedAgentsPromise; private cfClientId?; private cfClientSecret?; constructor(config: N8nApiClientConfig); private getPinnedAgents; getVersion(): Promise<N8nVersionInfo | null>; private cfAccessHeaders; private cfAccessHeadersOrUndefined; private isSameOrigin; private fetchVersionOnce; getCachedVersionInfo(): N8nVersionInfo | null; healthCheck(): Promise<HealthCheckResponse>; createWorkflow(workflow: Partial<Workflow>): Promise<Workflow>; getWorkflow(id: string): Promise<Workflow>; updateWorkflow(id: string, workflow: Partial<Workflow>): Promise<Workflow>; deleteWorkflow(id: string): Promise<Workflow>; transferWorkflow(id: string, destinationProjectId: string): Promise<void>; activateWorkflow(id: string): Promise<Workflow>; deactivateWorkflow(id: string): Promise<Workflow>; listWorkflows(params?: WorkflowListParams): Promise<WorkflowListResponse>; generateAudit(options?: { categories?: string[]; daysAbandonedWorkflow?: number; }): Promise<any>; listAllWorkflows(): Promise<Workflow[]>; getExecution(id: string, includeData?: boolean): Promise<Execution>; listExecutions(params?: ExecutionListParams): Promise<ExecutionListResponse>; deleteExecution(id: string): Promise<void>; listTestRuns(workflowId: string, params?: TestRunListParams): Promise<TestRunListResponse>; getTestRun(workflowId: string, runId: string): Promise<TestRunSummary>; listTestCases(workflowId: string, runId: string, params?: TestCaseListParams): Promise<TestCaseListResponse>; triggerWebhook(request: WebhookRequest): Promise<any>; listCredentials(params?: CredentialListParams): Promise<CredentialListResponse>; listAllCredentials(): Promise<Credential[]>; getCredential(id: string): Promise<Credential>; createCredential(credential: Partial<Credential>): Promise<Credential>; updateCredential(id: string, credential: Partial<Credential>): Promise<Credential>; deleteCredential(id: string): Promise<void>; getCredentialSchema(typeName: string): Promise<any>; listTags(params?: TagListParams): Promise<TagListResponse>; createTag(tag: Partial<Tag>): Promise<Tag>; updateTag(id: string, tag: Partial<Tag>): Promise<Tag>; deleteTag(id: string): Promise<void>; updateWorkflowTags(workflowId: string, tagIds: string[]): Promise<Tag[]>; getSourceControlStatus(): Promise<SourceControlStatus>; pullSourceControl(force?: boolean): Promise<SourceControlPullResult>; pushSourceControl(message: string, fileNames?: string[]): Promise<SourceControlPushResult>; getVariables(): Promise<Variable[]>; createVariable(variable: Partial<Variable>): Promise<Variable>; updateVariable(id: string, variable: Partial<Variable>): Promise<Variable>; deleteVariable(id: string): Promise<void>; createDataTable(params: { name: string; columns?: DataTableColumn[]; projectId?: string; }): Promise<DataTable>; listDataTables(params?: DataTableListParams): Promise<{ data: DataTable[]; nextCursor?: string | null; }>; getDataTable(id: string): Promise<DataTable>; updateDataTable(id: string, params: { name: string; }): Promise<DataTable>; deleteDataTable(id: string): Promise<void>; getDataTableRows(id: string, params?: DataTableRowListParams): Promise<{ data: DataTableRow[]; nextCursor?: string | null; }>; insertDataTableRows(id: string, params: DataTableInsertRowsParams): Promise<any>; updateDataTableRows(id: string, params: DataTableUpdateRowsParams): Promise<any>; upsertDataTableRow(id: string, params: DataTableUpsertRowParams): Promise<any>; deleteDataTableRows(id: string, params: DataTableDeleteRowsParams): Promise<any>; private serializeDataTableParams; private validateListResponse; } //# sourceMappingURL=n8n-api-client.d.ts.map