2020-12-02 02:24:25 -08:00
|
|
|
import {
|
|
|
|
ICredentialType,
|
2021-06-12 09:39:55 -07:00
|
|
|
INodeProperties,
|
2020-12-02 02:24:25 -08:00
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
|
|
export class TheHiveApi implements ICredentialType {
|
|
|
|
name = 'theHiveApi';
|
|
|
|
displayName = 'The Hive API';
|
2020-12-11 23:29:38 -08:00
|
|
|
documentationUrl = 'theHive';
|
2021-06-12 09:39:55 -07:00
|
|
|
properties: INodeProperties[] = [
|
2020-12-02 02:24:25 -08:00
|
|
|
{
|
|
|
|
displayName: 'API Key',
|
|
|
|
name: 'ApiKey',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-12-02 02:24:25 -08:00
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'URL',
|
|
|
|
name: 'url',
|
|
|
|
default: '',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-12-02 02:24:25 -08:00
|
|
|
description: 'The URL of TheHive instance',
|
|
|
|
placeholder: 'https://localhost:9000',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'API Version',
|
|
|
|
name: 'apiVersion',
|
|
|
|
default: '',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'options',
|
2020-12-02 02:24:25 -08:00
|
|
|
description: 'The version of api to be used',
|
2020-12-02 02:54:10 -08:00
|
|
|
options: [
|
2020-12-02 02:24:25 -08:00
|
|
|
{
|
2020-12-02 02:54:10 -08:00
|
|
|
name: 'Version 1',
|
|
|
|
value: 'v1',
|
|
|
|
description: 'API version supported by TheHive 4',
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
{
|
2020-12-02 02:54:10 -08:00
|
|
|
name: 'Version 0',
|
|
|
|
value: '',
|
|
|
|
description: 'API version supported by TheHive 3',
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2021-03-18 05:06:51 -07:00
|
|
|
{
|
|
|
|
displayName: 'Ignore SSL Issues',
|
|
|
|
name: 'allowUnauthorizedCerts',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'boolean',
|
2022-06-20 07:54:01 -07:00
|
|
|
description: 'Whether to connect even if SSL certificate validation is not possible',
|
2021-03-18 05:06:51 -07:00
|
|
|
default: false,
|
|
|
|
},
|
2020-12-02 02:24:25 -08:00
|
|
|
];
|
|
|
|
}
|