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>;
|
2020-08-04 00:01:13 -07:00
|
|
|
|
|
|
|
export class Ftp implements ICredentialType {
|
|
|
|
name = 'ftp';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2020-08-04 00:01:13 -07:00
|
|
|
displayName = 'FTP';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2020-08-17 05:42:09 -07:00
|
|
|
documentationUrl = 'ftp';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2024-08-29 07:31:17 -07:00
|
|
|
properties = ftpCredentialSchema.toNodeProperties();
|
2020-08-04 00:01:13 -07:00
|
|
|
}
|