/** * FTP Node - Version 1 * Transfer files via FTP or SFTP */ export interface FtpV1Params { /** * File transfer protocol * @default ftp */ protocol?: 'ftp' | 'sftp' | Expression; operation?: 'delete' | 'download' | 'list' | 'rename' | 'upload'; /** * The file path of the file to delete. Has to contain the full path. * @displayOptions.show { operation: ["delete"] } */ path?: string | Expression | PlaceholderValue; /** * Options * @displayOptions.show { operation: ["delete"] } * @default {} */ options?: { /** Whether folders can be deleted * @default false */ folder?: boolean | Expression; /** Whether to remove all files and directories in target directory * @displayOptions.show { folder: [true] } * @default false */ recursive?: boolean | Expression; /** Connection timeout in milliseconds * @default 10000 */ timeout?: number | Expression; /** Whether to enable concurrent reads for downloading files * @default false */ enableConcurrentReads?: boolean | Expression; /** Max Concurrent Reads * @displayOptions.show { enableConcurrentReads: [true] } * @default 5 */ maxConcurrentReads?: number | Expression; /** Size of each chunk in KB to download, Not all servers support this * @displayOptions.show { enableConcurrentReads: [true] } * @default 64 */ chunkSize?: number | Expression; /** Whether to recursively create destination directory when renaming an existing file or folder * @default false */ createDirectories?: boolean | Expression; }; /** * Put Output File in Field * @hint The name of the output binary field to put the file in * @displayOptions.show { operation: ["download"] } * @default data */ binaryPropertyName?: string | Expression | PlaceholderValue; /** * Old Path * @displayOptions.show { operation: ["rename"] } */ oldPath?: string | Expression | PlaceholderValue; /** * New Path * @displayOptions.show { operation: ["rename"] } */ newPath?: string | Expression | PlaceholderValue; /** * The text content of the file to upload * @displayOptions.show { operation: ["upload"] } * @default true */ binaryData?: boolean | Expression; /** * The text content of the file to upload * @displayOptions.show { operation: ["upload"], binaryData: [false] } */ fileContent?: string | Expression | PlaceholderValue; /** * Whether to return object representing all directories / objects recursively found within SFTP server * @displayOptions.show { operation: ["list"] } * @default false */ recursive?: boolean | Expression; } export interface FtpV1Credentials { ftp: CredentialReference; sftp: CredentialReference; } interface FtpV1NodeBase { type: 'n8n-nodes-base.ftp'; version: 1; credentials?: FtpV1Credentials; } export type FtpV1ParamsNode = FtpV1NodeBase & { config: NodeConfig; }; export type FtpV1Node = FtpV1ParamsNode;