2023-01-27 03:22:44 -08:00
|
|
|
import type { ICredentialType, INodeProperties } from 'n8n-workflow';
|
2021-01-31 09:57:03 -08:00
|
|
|
|
|
|
|
export class TimescaleDb implements ICredentialType {
|
|
|
|
name = 'timescaleDb';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2021-01-31 09:57:03 -08:00
|
|
|
displayName = 'TimescaleDB';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2021-01-31 09:57:03 -08:00
|
|
|
documentationUrl = 'timescaleDb';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2021-06-12 09:39:55 -07:00
|
|
|
properties: INodeProperties[] = [
|
2021-01-31 09:57:03 -08:00
|
|
|
{
|
|
|
|
displayName: 'Host',
|
|
|
|
name: 'host',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2021-01-31 09:57:03 -08:00
|
|
|
default: 'localhost',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Database',
|
|
|
|
name: 'database',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2021-01-31 09:57:03 -08:00
|
|
|
default: 'postgres',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'User',
|
|
|
|
name: 'user',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2021-01-31 09:57:03 -08:00
|
|
|
default: 'postgres',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Password',
|
|
|
|
name: 'password',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2021-01-31 09:57:03 -08:00
|
|
|
typeOptions: {
|
|
|
|
password: true,
|
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Ignore SSL Issues',
|
|
|
|
name: 'allowUnauthorizedCerts',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'boolean',
|
2021-01-31 09:57:03 -08:00
|
|
|
default: false,
|
2022-04-13 23:32:27 -07:00
|
|
|
description: 'Whether to connect even if SSL certificate validation is not possible',
|
2021-01-31 09:57:03 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'SSL',
|
|
|
|
name: 'ssl',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'options',
|
2021-01-31 09:57:03 -08:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-07-24 08:36:17 -07:00
|
|
|
allowUnauthorizedCerts: [false],
|
2021-01-31 09:57:03 -08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
2022-04-13 23:32:27 -07:00
|
|
|
name: 'Allow',
|
|
|
|
value: 'allow',
|
2021-01-31 09:57:03 -08:00
|
|
|
},
|
|
|
|
{
|
2022-04-13 23:32:27 -07:00
|
|
|
name: 'Disable',
|
|
|
|
value: 'disable',
|
2021-01-31 09:57:03 -08:00
|
|
|
},
|
|
|
|
{
|
2022-04-13 23:32:27 -07:00
|
|
|
name: 'Require',
|
2021-01-31 09:57:03 -08:00
|
|
|
value: 'require',
|
|
|
|
},
|
|
|
|
{
|
2022-04-13 23:32:27 -07:00
|
|
|
name: 'Verify (Not Implemented)',
|
2021-01-31 09:57:03 -08:00
|
|
|
value: 'verify',
|
|
|
|
},
|
|
|
|
{
|
2022-04-13 23:32:27 -07:00
|
|
|
name: 'Verify-Full (Not Implemented)',
|
2021-01-31 09:57:03 -08:00
|
|
|
value: 'verify-full',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'disable',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Port',
|
|
|
|
name: 'port',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'number',
|
2021-01-31 09:57:03 -08:00
|
|
|
default: 5432,
|
|
|
|
},
|
|
|
|
];
|
|
|
|
}
|