2020-08-04 00:01:13 -07:00
|
|
|
import {
|
|
|
|
ICredentialType,
|
2021-06-12 09:39:55 -07:00
|
|
|
INodeProperties,
|
2020-08-04 00:01:13 -07:00
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
|
|
export class Sftp implements ICredentialType {
|
|
|
|
name = 'sftp';
|
|
|
|
displayName = 'SFTP';
|
2020-09-21 02:11:02 -07:00
|
|
|
documentationUrl = 'ftp';
|
2021-06-12 09:39:55 -07:00
|
|
|
properties: INodeProperties[] = [
|
2020-08-04 00:01:13 -07:00
|
|
|
{
|
|
|
|
displayName: 'Host',
|
|
|
|
name: 'host',
|
|
|
|
required: true,
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-08-04 00:01:13 -07:00
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Port',
|
|
|
|
name: 'port',
|
|
|
|
required: true,
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'number',
|
2020-08-04 00:01:13 -07:00
|
|
|
default: 22,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Username',
|
|
|
|
name: 'username',
|
|
|
|
required: true,
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-08-04 00:01:13 -07:00
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Password',
|
|
|
|
name: 'password',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-08-04 00:01:13 -07:00
|
|
|
typeOptions: {
|
|
|
|
password: true,
|
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
},
|
2020-11-12 10:23:55 -08:00
|
|
|
{
|
|
|
|
displayName: 'Private Key',
|
|
|
|
name: 'privateKey',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-11-12 10:23:55 -08:00
|
|
|
typeOptions: {
|
2020-11-12 10:26:03 -08:00
|
|
|
alwaysOpenEditWindow: true,
|
2020-11-12 10:23:55 -08:00
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
description: 'String that contains a private key for either key-based or hostbased user authentication (OpenSSH format).',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Passphrase',
|
|
|
|
name: 'passphrase',
|
|
|
|
typeOptions: {
|
|
|
|
password: true,
|
|
|
|
},
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-11-12 10:23:55 -08:00
|
|
|
default: '',
|
2020-11-12 10:26:03 -08:00
|
|
|
description: 'For an encrypted private key, this is the passphrase used to decrypt it.',
|
2020-11-12 10:23:55 -08:00
|
|
|
},
|
2020-08-04 00:01:13 -07:00
|
|
|
];
|
|
|
|
}
|