n8n
Version:
n8n Workflow Automation Tool
16 lines (15 loc) • 804 B
TypeScript
import type { User } from '@n8n/db';
import type { IWorkflowBase } from 'n8n-workflow';
import type { CredentialsService } from '../../../../credentials/credentials.service';
import type { NodeTypes } from '../../../../node-types';
import type { PartialUpdateOperation } from './workflow-operations';
export interface CredentialValidationFailure {
ok: false;
opIndex: number;
error: string;
}
export interface CredentialValidationSuccess {
ok: true;
}
export type CredentialValidationResult = CredentialValidationSuccess | CredentialValidationFailure;
export declare function validateCredentialReferences(operations: PartialUpdateOperation[], existingWorkflow: IWorkflowBase, user: User, credentialsService: CredentialsService, nodeTypes: NodeTypes): Promise<CredentialValidationResult>;