mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
22 lines
732 B
TypeScript
22 lines
732 B
TypeScript
import type { ICredentialType } from 'n8n-workflow';
|
|
import { CredentialSchema, type InferCredentialSchema } from '../utils/CredentialSchema';
|
|
|
|
const ftpCredentialSchema = CredentialSchema.create({
|
|
host: CredentialSchema.string({ label: 'Host', placeholder: 'localhost' }),
|
|
port: CredentialSchema.number({ label: 'Port', default: 21 }),
|
|
username: CredentialSchema.string({ label: 'Username', optional: true }),
|
|
password: CredentialSchema.password({ optional: true }),
|
|
});
|
|
|
|
export type FtpCredentialSchema = InferCredentialSchema<typeof ftpCredentialSchema>;
|
|
|
|
export class Ftp implements ICredentialType {
|
|
name = 'ftp';
|
|
|
|
displayName = 'FTP';
|
|
|
|
documentationUrl = 'ftp';
|
|
|
|
properties = ftpCredentialSchema.toNodeProperties();
|
|
}
|