-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(TheHive Node): Overhaul (#6457)
- Loading branch information
1 parent
f286bd3
commit 73e782e
Showing
85 changed files
with
8,291 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
packages/nodes-base/credentials/TheHiveProjectApi.credentials.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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', | ||
}, | ||
}; | ||
} |
19 changes: 19 additions & 0 deletions
19
packages/nodes-base/nodes/TheHiveProject/TheHiveProject.node.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"node": "n8n-nodes-base.theHiveProject", | ||
"nodeVersion": "1.0", | ||
"codexVersion": "1.0", | ||
"categories": ["Development"], | ||
"alias": ["Security", "Monitoring", "Incident", "Response", "Alert"], | ||
"resources": { | ||
"credentialDocumentation": [ | ||
{ | ||
"url": "https://docs.n8n.io/credentials/theHive" | ||
} | ||
], | ||
"primaryDocumentation": [ | ||
{ | ||
"url": "https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.thehive/" | ||
} | ||
] | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
packages/nodes-base/nodes/TheHiveProject/TheHiveProject.node.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import type { IExecuteFunctions, INodeType, INodeTypeDescription } from 'n8n-workflow'; | ||
|
||
import { description } from './actions/node.description'; | ||
import { router } from './actions/router'; | ||
import { loadOptions, listSearch, resourceMapping } from './methods'; | ||
|
||
export class TheHiveProject implements INodeType { | ||
description: INodeTypeDescription = description; | ||
|
||
methods = { loadOptions, listSearch, resourceMapping }; | ||
|
||
async execute(this: IExecuteFunctions) { | ||
return router.call(this); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
packages/nodes-base/nodes/TheHiveProject/TheHiveProjectTrigger.node.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"node": "n8n-nodes-base.theHiveProjectTrigger", | ||
"nodeVersion": "1.0", | ||
"codexVersion": "1.0", | ||
"categories": ["Development"], | ||
"resources": { | ||
"primaryDocumentation": [ | ||
{ | ||
"url": "https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.thehivetrigger/" | ||
} | ||
] | ||
} | ||
} |
Oops, something went wrong.