@@ -21,6 +21,23 @@ export interface Connector {
21
21
password : string ;
22
22
}
23
23
24
+ export interface JiraConnectorOptions {
25
+ issueType : string ;
26
+ priority : string ;
27
+ }
28
+
29
+ export interface ServiceNowconnectorOptions {
30
+ urgency : string ;
31
+ severity : string ;
32
+ impact : string ;
33
+ }
34
+
35
+ export interface IbmResilientConnectorOptions {
36
+ title : string ;
37
+ severity : string ;
38
+ incidentTypes : string [ ] ;
39
+ }
40
+
24
41
export const caseTimeline : TimelineWithId = {
25
42
title : 'SIEM test' ,
26
43
description : 'description' ,
@@ -43,4 +60,207 @@ export const serviceNowConnector: Connector = {
43
60
password : 'password' ,
44
61
} ;
45
62
63
+ export const jiraConnectorOptions : JiraConnectorOptions = {
64
+ issueType : '10006' ,
65
+ priority : 'High' ,
66
+ } ;
67
+
68
+ export const serviceNowConnectorOpions : ServiceNowconnectorOptions = {
69
+ urgency : '2' ,
70
+ severity : '1' ,
71
+ impact : '3' ,
72
+ } ;
73
+
74
+ export const ibmResilientConnectorOptions : IbmResilientConnectorOptions = {
75
+ title : 'Resilient' ,
76
+ severity : 'Medium' ,
77
+ incidentTypes : [ 'Communication error (fax; email)' , 'Denial of Service' ] ,
78
+ } ;
79
+
46
80
export const TIMELINE_CASE_ID = '68248e00-f689-11ea-9ab2-59238b522856' ;
81
+ export const connectorIds = {
82
+ jira : '000e5f86-08b0-4882-adfd-6df981d45c1b' ,
83
+ sn : '93a69ba3-3c31-4b4c-bf86-cc79a090f437' ,
84
+ resilient : 'a6a8dd7f-7e88-48fe-9b9f-70b668da8cbc' ,
85
+ } ;
86
+
87
+ export const mockConnectorsResponse = [
88
+ {
89
+ id : connectorIds . jira ,
90
+ actionTypeId : '.jira' ,
91
+ name : 'Jira' ,
92
+ config : {
93
+ incidentConfiguration : {
94
+ mapping : [
95
+ { source : 'title' , target : 'summary' , actionType : 'overwrite' } ,
96
+ { source : 'description' , target : 'description' , actionType : 'overwrite' } ,
97
+ { source : 'comments' , target : 'comments' , actionType : 'append' } ,
98
+ ] ,
99
+ } ,
100
+ isCaseOwned : true ,
101
+ apiUrl : 'https://siem-kibana.atlassian.net' ,
102
+ projectKey : 'RJ' ,
103
+ } ,
104
+ isPreconfigured : false ,
105
+ referencedByCount : 0 ,
106
+ } ,
107
+ {
108
+ id : connectorIds . resilient ,
109
+ actionTypeId : '.resilient' ,
110
+ name : 'Resilient' ,
111
+ config : {
112
+ incidentConfiguration : {
113
+ mapping : [
114
+ { source : 'title' , target : 'name' , actionType : 'overwrite' } ,
115
+ { source : 'description' , target : 'description' , actionType : 'overwrite' } ,
116
+ { source : 'comments' , target : 'comments' , actionType : 'append' } ,
117
+ ] ,
118
+ } ,
119
+ isCaseOwned : true ,
120
+ apiUrl : 'https://ibm-resilient.siem.estc.dev' ,
121
+ orgId : '201' ,
122
+ } ,
123
+ isPreconfigured : false ,
124
+ referencedByCount : 0 ,
125
+ } ,
126
+ {
127
+ id : connectorIds . sn ,
128
+ actionTypeId : '.servicenow' ,
129
+ name : 'ServiceNow' ,
130
+ config : {
131
+ incidentConfiguration : {
132
+ mapping : [
133
+ { source : 'title' , target : 'short_description' , actionType : 'overwrite' } ,
134
+ { source : 'description' , target : 'description' , actionType : 'overwrite' } ,
135
+ { source : 'comments' , target : 'comments' , actionType : 'append' } ,
136
+ ] ,
137
+ } ,
138
+ isCaseOwned : true ,
139
+ apiUrl : 'https://dev65287.service-now.com' ,
140
+ } ,
141
+ isPreconfigured : false ,
142
+ referencedByCount : 0 ,
143
+ } ,
144
+ ] ;
145
+ export const executeResponses = {
146
+ jira : {
147
+ issueTypes : {
148
+ status : 'ok' ,
149
+ data : [
150
+ { id : '10006' , name : 'Task' } ,
151
+ { id : '10007' , name : 'Sub-task' } ,
152
+ ] ,
153
+ actionId : connectorIds . jira ,
154
+ } ,
155
+ fieldsByIssueType : {
156
+ status : 'ok' ,
157
+ data : {
158
+ summary : { allowedValues : [ ] , defaultValue : { } } ,
159
+ issuetype : {
160
+ allowedValues : [
161
+ {
162
+ self : 'https://siem-kibana.atlassian.net/rest/api/2/issuetype/10006' ,
163
+ id : '10006' ,
164
+ description : 'A small, distinct piece of work.' ,
165
+ iconUrl :
166
+ 'https://siem-kibana.atlassian.net/secure/viewavatar?size=medium&avatarId=10318&avatarType=issuetype' ,
167
+ name : 'Task' ,
168
+ subtask : false ,
169
+ avatarId : 10318 ,
170
+ } ,
171
+ ] ,
172
+ defaultValue : { } ,
173
+ } ,
174
+ attachment : { allowedValues : [ ] , defaultValue : { } } ,
175
+ duedate : { allowedValues : [ ] , defaultValue : { } } ,
176
+ description : { allowedValues : [ ] , defaultValue : { } } ,
177
+ project : {
178
+ allowedValues : [
179
+ {
180
+ self : 'https://siem-kibana.atlassian.net/rest/api/2/project/10011' ,
181
+ id : '10011' ,
182
+ key : 'RJ' ,
183
+ name : 'Refactor Jira' ,
184
+ projectTypeKey : 'business' ,
185
+ simplified : false ,
186
+ avatarUrls : {
187
+ '48x48' :
188
+ 'https://siem-kibana.atlassian.net/secure/projectavatar?pid=10011&avatarId=10423' ,
189
+ '24x24' :
190
+ 'https://siem-kibana.atlassian.net/secure/projectavatar?size=small&s=small&pid=10011&avatarId=10423' ,
191
+ '16x16' :
192
+ 'https://siem-kibana.atlassian.net/secure/projectavatar?size=xsmall&s=xsmall&pid=10011&avatarId=10423' ,
193
+ '32x32' :
194
+ 'https://siem-kibana.atlassian.net/secure/projectavatar?size=medium&s=medium&pid=10011&avatarId=10423' ,
195
+ } ,
196
+ } ,
197
+ ] ,
198
+ defaultValue : { } ,
199
+ } ,
200
+ assignee : { allowedValues : [ ] , defaultValue : { } } ,
201
+ priority : {
202
+ allowedValues : [
203
+ {
204
+ self : 'https://siem-kibana.atlassian.net/rest/api/2/priority/1' ,
205
+ iconUrl : 'https://siem-kibana.atlassian.net/images/icons/priorities/highest.svg' ,
206
+ name : 'Highest' ,
207
+ id : '1' ,
208
+ } ,
209
+ {
210
+ self : 'https://siem-kibana.atlassian.net/rest/api/2/priority/2' ,
211
+ iconUrl : 'https://siem-kibana.atlassian.net/images/icons/priorities/high.svg' ,
212
+ name : 'High' ,
213
+ id : '2' ,
214
+ } ,
215
+ {
216
+ self : 'https://siem-kibana.atlassian.net/rest/api/2/priority/3' ,
217
+ iconUrl : 'https://siem-kibana.atlassian.net/images/icons/priorities/medium.svg' ,
218
+ name : 'Medium' ,
219
+ id : '3' ,
220
+ } ,
221
+ {
222
+ self : 'https://siem-kibana.atlassian.net/rest/api/2/priority/4' ,
223
+ iconUrl : 'https://siem-kibana.atlassian.net/images/icons/priorities/low.svg' ,
224
+ name : 'Low' ,
225
+ id : '4' ,
226
+ } ,
227
+ {
228
+ self : 'https://siem-kibana.atlassian.net/rest/api/2/priority/5' ,
229
+ iconUrl : 'https://siem-kibana.atlassian.net/images/icons/priorities/lowest.svg' ,
230
+ name : 'Lowest' ,
231
+ id : '5' ,
232
+ } ,
233
+ ] ,
234
+ defaultValue : {
235
+ self : 'https://siem-kibana.atlassian.net/rest/api/2/priority/3' ,
236
+ iconUrl : 'https://siem-kibana.atlassian.net/images/icons/priorities/medium.svg' ,
237
+ name : 'Medium' ,
238
+ id : '3' ,
239
+ } ,
240
+ } ,
241
+ timetracking : { allowedValues : [ ] , defaultValue : { } } ,
242
+ labels : { allowedValues : [ ] , defaultValue : { } } ,
243
+ } ,
244
+ actionId : connectorIds . jira ,
245
+ } ,
246
+ } ,
247
+ resilient : {
248
+ incidentTypes : {
249
+ status : 'ok' ,
250
+ data : [
251
+ { id : 17 , name : 'Communication error (fax; email)' } ,
252
+ { id : 21 , name : 'Denial of Service' } ,
253
+ ] ,
254
+ actionId : connectorIds . resilient ,
255
+ } ,
256
+ severity : {
257
+ status : 'ok' ,
258
+ data : [
259
+ { id : 4 , name : 'Low' } ,
260
+ { id : 5 , name : 'Medium' } ,
261
+ { id : 6 , name : 'High' } ,
262
+ ] ,
263
+ actionId : connectorIds . resilient ,
264
+ } ,
265
+ } ,
266
+ } ;
0 commit comments