2020-12-02 02:24:25 -08:00
|
|
|
import {
|
|
|
|
INodeProperties,
|
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
|
|
import {
|
|
|
|
TLP,
|
|
|
|
} from '../interfaces/AlertInterface';
|
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const caseOperations: INodeProperties[] = [
|
2020-12-02 02:24:25 -08:00
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
default: 'getAll',
|
|
|
|
type: 'options',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'case',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
typeOptions: {
|
|
|
|
loadOptionsDependsOn: [
|
|
|
|
'resource',
|
|
|
|
],
|
|
|
|
loadOptionsMethod: 'loadCaseOptions',
|
|
|
|
},
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|
2020-12-02 02:24:25 -08:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const caseFields: INodeProperties[] = [
|
2020-12-02 02:24:25 -08:00
|
|
|
{
|
|
|
|
displayName: 'Return All',
|
|
|
|
name: 'returnAll',
|
|
|
|
type: 'boolean',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
operation: [
|
|
|
|
'getAll',
|
|
|
|
],
|
|
|
|
resource: [
|
|
|
|
'case',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
default: false,
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Whether to return all results or only up to a given limit',
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Limit',
|
|
|
|
name: 'limit',
|
|
|
|
type: 'number',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
operation: [
|
|
|
|
'getAll',
|
|
|
|
],
|
|
|
|
resource: [
|
|
|
|
'case',
|
|
|
|
],
|
|
|
|
returnAll: [
|
|
|
|
false,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
typeOptions: {
|
|
|
|
minValue: 1,
|
|
|
|
maxValue: 500,
|
|
|
|
},
|
|
|
|
default: 100,
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Max number of results to return',
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
// Required fields
|
|
|
|
{
|
|
|
|
displayName: 'Case ID',
|
|
|
|
name: 'id',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'case',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'update',
|
|
|
|
'executeResponder',
|
|
|
|
'get',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
description: 'ID of the case',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Title',
|
|
|
|
name: 'title',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'case',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'create',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
description: 'Title of the case',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Description',
|
|
|
|
name: 'description',
|
|
|
|
type: 'string',
|
|
|
|
required: true,
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'case',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'create',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
description: 'Description of the case',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Severity',
|
|
|
|
name: 'severity',
|
|
|
|
type: 'options',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Low',
|
|
|
|
value: 1,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Medium',
|
|
|
|
value: 2,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'High',
|
|
|
|
value: 3,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
required: true,
|
|
|
|
default: 2,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'case',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'create',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2022-04-22 09:29:51 -07:00
|
|
|
description: 'Severity of the alert. Default=Medium.',
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Start Date',
|
|
|
|
name: 'startDate',
|
|
|
|
type: 'dateTime',
|
|
|
|
required: true,
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'case',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'create',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
description: 'Date and time of the begin of the case default=now',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Owner',
|
|
|
|
name: 'owner',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'case',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'create',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Flag',
|
|
|
|
name: 'flag',
|
|
|
|
type: 'boolean',
|
|
|
|
required: true,
|
|
|
|
default: false,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'case',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'create',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
description: 'Flag of the case default=false',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'TLP',
|
|
|
|
name: 'tlp',
|
|
|
|
type: 'options',
|
|
|
|
required: true,
|
|
|
|
default: 2,
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'White',
|
|
|
|
value: TLP.white,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Green',
|
|
|
|
value: TLP.green,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Amber',
|
|
|
|
value: TLP.amber,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Red',
|
|
|
|
value: TLP.red,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'case',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'create',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2022-04-22 09:29:51 -07:00
|
|
|
description: 'Traffict Light Protocol (TLP). Default=Amber.',
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Tags',
|
|
|
|
name: 'tags',
|
|
|
|
type: 'string',
|
|
|
|
required: true,
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'case',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'create',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// required for responder execution
|
|
|
|
{
|
|
|
|
displayName: 'Responder ID',
|
|
|
|
name: 'responder',
|
|
|
|
type: 'options',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
typeOptions: {
|
|
|
|
loadOptionsDependsOn: [
|
|
|
|
'id',
|
|
|
|
],
|
|
|
|
loadOptionsMethod: 'loadResponders',
|
|
|
|
},
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'case',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'executeResponder',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
hide: {
|
|
|
|
id: [
|
|
|
|
'',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2021-07-14 10:18:46 -07:00
|
|
|
{
|
|
|
|
displayName: 'JSON Parameters',
|
|
|
|
name: 'jsonParameters',
|
|
|
|
type: 'boolean',
|
|
|
|
default: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'case',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'create',
|
|
|
|
'update',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2020-12-02 02:24:25 -08:00
|
|
|
// Optional fields (Create operation)
|
|
|
|
{
|
|
|
|
displayName: 'Options',
|
|
|
|
type: 'collection',
|
|
|
|
name: 'options',
|
|
|
|
placeholder: 'Add options',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'case',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'create',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2022-04-22 09:29:51 -07:00
|
|
|
default: {},
|
2020-12-02 02:24:25 -08:00
|
|
|
options: [
|
2021-07-14 10:18:46 -07:00
|
|
|
{
|
|
|
|
displayName: 'Custom Fields',
|
|
|
|
name: 'customFieldsUi',
|
|
|
|
type: 'fixedCollection',
|
|
|
|
default: {},
|
|
|
|
typeOptions: {
|
|
|
|
multipleValues: true,
|
|
|
|
},
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
'/jsonParameters': [
|
|
|
|
false,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
placeholder: 'Add Custom Field',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'customFields',
|
|
|
|
displayName: 'Custom Field',
|
|
|
|
values: [
|
|
|
|
{
|
|
|
|
displayName: 'Field',
|
|
|
|
name: 'field',
|
|
|
|
type: 'options',
|
|
|
|
typeOptions: {
|
|
|
|
loadOptionsMethod: 'loadCustomFields',
|
|
|
|
},
|
|
|
|
default: 'Custom Field',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Value',
|
|
|
|
name: 'value',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
description: 'Custom Field value. Use an expression if the type is not a string.',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Custom Fields (JSON)',
|
|
|
|
name: 'customFieldsJson',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
'/jsonParameters': [
|
|
|
|
true,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
description: 'Custom fields in JSON format. Overrides Custom Fields UI if set.',
|
|
|
|
},
|
2020-12-02 02:24:25 -08:00
|
|
|
{
|
|
|
|
displayName: 'End Date',
|
|
|
|
name: 'endDate',
|
|
|
|
default: '',
|
|
|
|
type: 'dateTime',
|
|
|
|
description: 'Resolution date',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Summary',
|
|
|
|
name: 'summary',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
description: 'Summary of the case, to be provided when closing a case',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Metrics (JSON)',
|
|
|
|
name: 'metrics',
|
|
|
|
default: '[]',
|
|
|
|
type: 'json',
|
2021-07-14 10:18:46 -07:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
'/jsonParameters': [
|
|
|
|
true,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2020-12-02 02:24:25 -08:00
|
|
|
description: 'List of metrics',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
// Optional fields (Update operations)
|
|
|
|
{
|
|
|
|
displayName: 'Update Fields',
|
|
|
|
type: 'collection',
|
|
|
|
name: 'updateFields',
|
|
|
|
placeholder: 'Add Field',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'case',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'update',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2022-04-22 09:29:51 -07:00
|
|
|
default: {},
|
2020-12-02 02:24:25 -08:00
|
|
|
options: [
|
2021-07-14 10:18:46 -07:00
|
|
|
{
|
|
|
|
displayName: 'Custom Fields',
|
|
|
|
name: 'customFieldsUi',
|
|
|
|
type: 'fixedCollection',
|
|
|
|
default: {},
|
|
|
|
typeOptions: {
|
|
|
|
multipleValues: true,
|
|
|
|
},
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
'/jsonParameters': [
|
|
|
|
false,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
placeholder: 'Add Custom Field',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'customFields',
|
|
|
|
displayName: 'Custom Field',
|
|
|
|
values: [
|
|
|
|
{
|
|
|
|
displayName: 'Field',
|
|
|
|
name: 'field',
|
|
|
|
type: 'options',
|
|
|
|
typeOptions: {
|
|
|
|
loadOptionsMethod: 'loadCustomFields',
|
|
|
|
},
|
|
|
|
default: 'Custom Field',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Value',
|
|
|
|
name: 'value',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
description: 'Custom Field value. Use an expression if the type is not a string.',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Custom Fields (JSON)',
|
|
|
|
name: 'customFieldsJson',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
'/jsonParameters': [
|
|
|
|
true,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
description: 'Custom fields in JSON format. Overrides Custom Fields UI if set.',
|
|
|
|
},
|
2020-12-02 02:24:25 -08:00
|
|
|
{
|
|
|
|
displayName: 'Description',
|
|
|
|
name: 'description',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
description: 'Description of the case',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'End Date',
|
|
|
|
name: 'endDate',
|
|
|
|
type: 'dateTime',
|
|
|
|
default: '',
|
|
|
|
description: 'Resolution date',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Flag',
|
|
|
|
name: 'flag',
|
|
|
|
type: 'boolean',
|
|
|
|
default: false,
|
|
|
|
description: 'Flag of the case default=false',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Impact Status',
|
|
|
|
name: 'impactStatus',
|
|
|
|
type: 'options',
|
|
|
|
default: '',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'No Impact',
|
2020-12-02 02:54:10 -08:00
|
|
|
value: 'NoImpact',
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'With Impact',
|
2020-12-02 02:54:10 -08:00
|
|
|
value: 'WithImpact',
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Not Applicable',
|
2020-12-02 02:54:10 -08:00
|
|
|
value: 'NotApplicable',
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
description: 'Impact status of the case',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Metrics (JSON)',
|
|
|
|
name: 'metrics',
|
|
|
|
type: 'json',
|
|
|
|
default: '[]',
|
2021-07-14 10:18:46 -07:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
'/jsonParameters': [
|
|
|
|
true,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2020-12-02 02:24:25 -08:00
|
|
|
description: 'List of metrics',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Owner',
|
|
|
|
name: 'owner',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Resolution Status',
|
|
|
|
name: 'resolutionStatus',
|
|
|
|
type: 'options',
|
|
|
|
default: '',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
value: 'Indeterminate',
|
2020-12-02 02:54:10 -08:00
|
|
|
name: 'Indeterminate',
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
{
|
2021-03-18 05:10:19 -07:00
|
|
|
value: 'FalsePositive',
|
|
|
|
name: 'False Positive',
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
{
|
2021-03-18 05:10:19 -07:00
|
|
|
value: 'TruePositive',
|
|
|
|
name: 'True Positive',
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
value: 'Other',
|
2020-12-02 02:54:10 -08:00
|
|
|
name: 'Other',
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
value: 'Duplicated',
|
2020-12-02 02:54:10 -08:00
|
|
|
name: 'Duplicated',
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
description: 'Resolution status of the case',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Severity',
|
|
|
|
name: 'severity',
|
|
|
|
type: 'options',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Low',
|
2020-12-02 02:54:10 -08:00
|
|
|
value: 1,
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Medium',
|
2020-12-02 02:54:10 -08:00
|
|
|
value: 2,
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'High',
|
2020-12-02 02:54:10 -08:00
|
|
|
value: 3,
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 2,
|
2022-04-22 09:29:51 -07:00
|
|
|
description: 'Severity of the alert. Default=Medium.',
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Start Date',
|
|
|
|
name: 'startDate',
|
|
|
|
type: 'dateTime',
|
|
|
|
default: '',
|
|
|
|
description: 'Date and time of the begin of the case default=now',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Status',
|
|
|
|
name: 'status',
|
|
|
|
type: 'options',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Open',
|
|
|
|
value: 'Open',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Resolved',
|
|
|
|
value: 'Resolved',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Deleted',
|
|
|
|
value: 'Deleted',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'Open',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Summary',
|
|
|
|
name: 'summary',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
2020-12-02 02:54:10 -08:00
|
|
|
description: 'Summary of the case, to be provided when closing a case',
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Tags',
|
|
|
|
name: 'tags',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Title',
|
|
|
|
name: 'title',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
description: 'Title of the case',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'TLP',
|
|
|
|
name: 'tlp',
|
|
|
|
type: 'options',
|
|
|
|
default: 2,
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'White',
|
|
|
|
value: TLP.white,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Green',
|
|
|
|
value: TLP.green,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Amber',
|
|
|
|
value: TLP.amber,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Red',
|
|
|
|
value: TLP.red,
|
|
|
|
},
|
|
|
|
],
|
2022-04-22 09:29:51 -07:00
|
|
|
description: 'Traffict Light Protocol (TLP). Default=Amber.',
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
// query options
|
|
|
|
{
|
|
|
|
displayName: 'Options',
|
|
|
|
name: 'options',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
operation: [
|
|
|
|
'getAll',
|
|
|
|
],
|
|
|
|
resource: [
|
|
|
|
'case',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
type: 'collection',
|
|
|
|
placeholder: 'Add Option',
|
|
|
|
default: {},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
displayName: 'Sort',
|
|
|
|
name: 'sort',
|
|
|
|
type: 'string',
|
|
|
|
placeholder: '±Attribut, exp +status',
|
|
|
|
description: 'Specify the sorting attribut, + for asc, - for desc',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
// Query filters
|
|
|
|
{
|
|
|
|
displayName: 'Filters',
|
|
|
|
name: 'filters',
|
|
|
|
type: 'collection',
|
|
|
|
default: {},
|
|
|
|
placeholder: 'Add a Filter',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
2020-12-02 02:54:10 -08:00
|
|
|
'case',
|
2020-12-02 02:24:25 -08:00
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'getAll',
|
|
|
|
'count',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
2021-07-14 10:18:46 -07:00
|
|
|
{
|
|
|
|
displayName: 'Custom Fields',
|
|
|
|
name: 'customFieldsUi',
|
|
|
|
type: 'fixedCollection',
|
|
|
|
default: {},
|
|
|
|
typeOptions: {
|
|
|
|
multipleValues: true,
|
|
|
|
},
|
|
|
|
placeholder: 'Add Custom Field',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'customFields',
|
|
|
|
displayName: 'Custom Field',
|
|
|
|
values: [
|
|
|
|
{
|
|
|
|
displayName: 'Field',
|
|
|
|
name: 'field',
|
|
|
|
type: 'options',
|
|
|
|
typeOptions: {
|
|
|
|
loadOptionsMethod: 'loadCustomFields',
|
|
|
|
},
|
|
|
|
default: 'Custom Field',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Value',
|
|
|
|
name: 'value',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
description: 'Custom Field value. Use an expression if the type is not a string.',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2020-12-02 02:24:25 -08:00
|
|
|
{
|
|
|
|
displayName: 'Description',
|
|
|
|
name: 'description',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
description: 'Description of the case',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'End Date',
|
|
|
|
name: 'endDate',
|
|
|
|
type: 'dateTime',
|
|
|
|
default: '',
|
|
|
|
description: 'Resolution date',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Flag',
|
|
|
|
name: 'flag',
|
|
|
|
type: 'boolean',
|
|
|
|
default: false,
|
|
|
|
description: 'Flag of the case default=false',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Impact Status',
|
|
|
|
name: 'impactStatus',
|
|
|
|
type: 'options',
|
|
|
|
default: '',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'No Impact',
|
|
|
|
value: 'NoImpact',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'With Impact',
|
|
|
|
value: 'WithImpact',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Not Applicable',
|
|
|
|
value: 'NotApplicable',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Owner',
|
|
|
|
name: 'owner',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Resolution Status',
|
|
|
|
name: 'resolutionStatus',
|
|
|
|
type: 'options',
|
|
|
|
default: '',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
value: 'Indeterminate',
|
|
|
|
name: 'Indeterminate',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
value: 'False Positive',
|
|
|
|
name: 'FalsePositive',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
value: 'True Positive',
|
|
|
|
name: 'TruePositive',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
value: 'Other',
|
|
|
|
name: 'Other',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
value: 'Duplicated',
|
|
|
|
name: 'Duplicated',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Severity',
|
|
|
|
name: 'severity',
|
|
|
|
type: 'options',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Low',
|
2020-12-02 02:54:10 -08:00
|
|
|
value: 1,
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Medium',
|
2020-12-02 02:54:10 -08:00
|
|
|
value: 2,
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'High',
|
2020-12-02 02:54:10 -08:00
|
|
|
value: 3,
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 2,
|
2022-04-22 09:29:51 -07:00
|
|
|
description: 'Severity of the alert. Default=Medium.',
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Start Date',
|
|
|
|
name: 'startDate',
|
|
|
|
type: 'dateTime',
|
|
|
|
default: '',
|
|
|
|
description: 'Date and time of the begin of the case default=now',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Status',
|
|
|
|
name: 'status',
|
|
|
|
type: 'options',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Open',
|
|
|
|
value: 'Open',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Resolved',
|
|
|
|
value: 'Resolved',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Deleted',
|
|
|
|
value: 'Deleted',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'Open',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Summary',
|
|
|
|
name: 'summary',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
description: 'Summary of the case, to be provided when closing a case',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Tags',
|
|
|
|
name: 'tags',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Title',
|
|
|
|
name: 'title',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
description: 'Title of the case',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'TLP',
|
|
|
|
name: 'tlp',
|
|
|
|
type: 'options',
|
|
|
|
default: 2,
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'White',
|
|
|
|
value: TLP.white,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Green',
|
|
|
|
value: TLP.green,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Amber',
|
|
|
|
value: TLP.amber,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Red',
|
|
|
|
value: TLP.red,
|
|
|
|
},
|
|
|
|
],
|
2022-04-22 09:29:51 -07:00
|
|
|
description: 'Traffict Light Protocol (TLP). Default=Amber.',
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|