n8n/packages/nodes-base/credentials/Ftp.credentials.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
732 B
TypeScript
Raw Normal View History

2024-08-29 07:31:17 -07:00
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';
2024-08-29 07:31:17 -07:00
properties = ftpCredentialSchema.toNodeProperties();
}