mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(TheHive Node): Overhaul (#6457)
This commit is contained in:
@@ -36,14 +36,15 @@ export class TheHiveApi implements ICredentialType {
|
||||
description: 'The version of api to be used',
|
||||
options: [
|
||||
{
|
||||
name: 'Version 1',
|
||||
name: 'TheHive 4+ (api v1)',
|
||||
value: 'v1',
|
||||
description: 'API version supported by TheHive 4',
|
||||
description:
|
||||
'API version with TheHive 4 support, also works with TheHive 5 but not all features are supported',
|
||||
},
|
||||
{
|
||||
name: 'Version 0',
|
||||
name: 'TheHive 3 (api v0)',
|
||||
value: '',
|
||||
description: 'API version supported by TheHive 3',
|
||||
description: 'API version with TheHive 3 support',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
import type {
|
||||
IAuthenticateGeneric,
|
||||
ICredentialTestRequest,
|
||||
ICredentialType,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export class TheHiveProjectApi implements ICredentialType {
|
||||
name = 'theHiveProjectApi';
|
||||
|
||||
displayName = 'The Hive 5 API';
|
||||
|
||||
documentationUrl = 'theHive';
|
||||
|
||||
properties: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'API Key',
|
||||
name: 'ApiKey',
|
||||
type: 'string',
|
||||
default: '',
|
||||
typeOptions: {
|
||||
password: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'URL',
|
||||
name: 'url',
|
||||
default: '',
|
||||
type: 'string',
|
||||
description: 'The URL of TheHive instance',
|
||||
placeholder: 'https://localhost:9000',
|
||||
},
|
||||
{
|
||||
displayName: 'Ignore SSL Issues',
|
||||
name: 'allowUnauthorizedCerts',
|
||||
type: 'boolean',
|
||||
description: 'Whether to connect even if SSL certificate validation is not possible',
|
||||
default: false,
|
||||
},
|
||||
];
|
||||
|
||||
authenticate: IAuthenticateGeneric = {
|
||||
type: 'generic',
|
||||
properties: {
|
||||
headers: {
|
||||
Authorization: '=Bearer {{$credentials?.ApiKey}}',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
test: ICredentialTestRequest = {
|
||||
request: {
|
||||
baseURL: '={{$credentials?.url}}',
|
||||
url: '/api/case',
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user