2023-01-27 03:22:44 -08:00
|
|
|
import type { INodeProperties } from 'n8n-workflow';
|
2021-09-22 08:48:50 -07:00
|
|
|
|
|
|
|
export const connectorOperations: INodeProperties[] = [
|
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
noDataExpression: true,
|
|
|
|
type: 'options',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['connector'],
|
2021-09-22 08:48:50 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Create',
|
|
|
|
value: 'create',
|
|
|
|
description: 'Create a connector',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Create a connector',
|
2021-09-22 08:48:50 -07:00
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'create',
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
export const connectorFields: INodeProperties[] = [
|
|
|
|
// ----------------------------------------
|
|
|
|
// connector: create
|
|
|
|
// ----------------------------------------
|
|
|
|
{
|
|
|
|
displayName: 'Connector Name',
|
|
|
|
name: 'name',
|
2022-08-01 13:47:55 -07:00
|
|
|
description:
|
|
|
|
'Connectors allow you to send Elastic Security cases into other systems (only ServiceNow, Jira, or IBM Resilient)',
|
2021-09-22 08:48:50 -07:00
|
|
|
type: 'string',
|
|
|
|
required: true,
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['connector'],
|
|
|
|
operation: ['create'],
|
2021-09-22 08:48:50 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Connector Type',
|
|
|
|
name: 'connectorType',
|
|
|
|
type: 'options',
|
|
|
|
required: true,
|
|
|
|
default: '.jira',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'IBM Resilient',
|
|
|
|
value: '.resilient',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Jira',
|
|
|
|
value: '.jira',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'ServiceNow ITSM',
|
|
|
|
value: '.servicenow',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['connector'],
|
|
|
|
operation: ['create'],
|
2021-09-22 08:48:50 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'API URL',
|
|
|
|
name: 'apiUrl',
|
|
|
|
type: 'string',
|
|
|
|
description: 'URL of the third-party instance',
|
|
|
|
required: true,
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['connector'],
|
|
|
|
operation: ['create'],
|
2021-09-22 08:48:50 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Email',
|
|
|
|
name: 'email',
|
|
|
|
description: 'Jira-registered email',
|
|
|
|
type: 'string',
|
2022-06-20 07:54:01 -07:00
|
|
|
placeholder: 'name@email.com',
|
2021-09-22 08:48:50 -07:00
|
|
|
required: true,
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['connector'],
|
|
|
|
operation: ['create'],
|
|
|
|
connectorType: ['.jira'],
|
2021-09-22 08:48:50 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'API Token',
|
|
|
|
name: 'apiToken',
|
|
|
|
description: 'Jira API token',
|
|
|
|
type: 'string',
|
2023-08-01 04:08:25 -07:00
|
|
|
typeOptions: { password: true },
|
2021-09-22 08:48:50 -07:00
|
|
|
required: true,
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['connector'],
|
|
|
|
operation: ['create'],
|
|
|
|
connectorType: ['.jira'],
|
2021-09-22 08:48:50 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Project Key',
|
|
|
|
name: 'projectKey',
|
|
|
|
description: 'Jira Project Key',
|
|
|
|
type: 'string',
|
|
|
|
required: true,
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['connector'],
|
|
|
|
operation: ['create'],
|
|
|
|
connectorType: ['.jira'],
|
2021-09-22 08:48:50 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Username',
|
|
|
|
name: 'username',
|
|
|
|
description: 'ServiceNow ITSM username',
|
|
|
|
type: 'string',
|
|
|
|
required: true,
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['connector'],
|
|
|
|
operation: ['create'],
|
|
|
|
connectorType: ['.servicenow'],
|
2021-09-22 08:48:50 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Password',
|
|
|
|
name: 'password',
|
|
|
|
description: 'ServiceNow ITSM password',
|
|
|
|
type: 'string',
|
2022-09-12 00:36:50 -07:00
|
|
|
typeOptions: { password: true },
|
2021-09-22 08:48:50 -07:00
|
|
|
required: true,
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['connector'],
|
|
|
|
operation: ['create'],
|
|
|
|
connectorType: ['.servicenow'],
|
2021-09-22 08:48:50 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'API Key ID',
|
|
|
|
name: 'apiKeyId',
|
|
|
|
description: 'IBM Resilient API key ID',
|
|
|
|
type: 'string',
|
2023-08-01 04:08:25 -07:00
|
|
|
typeOptions: { password: true },
|
2021-09-22 08:48:50 -07:00
|
|
|
required: true,
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['connector'],
|
|
|
|
operation: ['create'],
|
|
|
|
connectorType: ['.resilient'],
|
2021-09-22 08:48:50 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'API Key Secret',
|
|
|
|
name: 'apiKeySecret',
|
|
|
|
description: 'IBM Resilient API key secret',
|
|
|
|
type: 'string',
|
2023-08-01 04:08:25 -07:00
|
|
|
typeOptions: { password: true },
|
2021-09-22 08:48:50 -07:00
|
|
|
required: true,
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['connector'],
|
|
|
|
operation: ['create'],
|
|
|
|
connectorType: ['.resilient'],
|
2021-09-22 08:48:50 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Organization ID',
|
|
|
|
name: 'orgId',
|
|
|
|
description: 'IBM Resilient organization ID',
|
|
|
|
type: 'string',
|
|
|
|
required: true,
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['connector'],
|
|
|
|
operation: ['create'],
|
|
|
|
connectorType: ['.resilient'],
|
2021-09-22 08:48:50 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|