@shieldiot/pulse-lib 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. package/dist/index.d.ts +4 -2
  2. package/dist/index.js +4 -2
  3. package/dist/index.js.map +1 -1
  4. package/dist/lib/common/TimeSeries.d.ts +1 -1
  5. package/dist/lib/common/TimeSeriesOf2D.d.ts +1 -1
  6. package/dist/lib/entities/Account.d.ts +2 -2
  7. package/dist/lib/entities/Account.js.map +1 -1
  8. package/dist/lib/entities/AccountDTO.d.ts +2 -2
  9. package/dist/lib/entities/AccountDTO.js.map +1 -1
  10. package/dist/lib/entities/AccountSettings.d.ts +1 -1
  11. package/dist/lib/entities/Alert.d.ts +4 -4
  12. package/dist/lib/entities/Alert.js.map +1 -1
  13. package/dist/lib/entities/AlertWithDevice.d.ts +4 -4
  14. package/dist/lib/entities/AlertWithDevice.js.map +1 -1
  15. package/dist/lib/entities/Device.d.ts +3 -3
  16. package/dist/lib/entities/Device.js.map +1 -1
  17. package/dist/lib/entities/DeviceWithEvents.d.ts +1 -1
  18. package/dist/lib/entities/DeviceWithEvents.js.map +1 -1
  19. package/dist/lib/entities/Event.d.ts +6 -6
  20. package/dist/lib/entities/Event.js.map +1 -1
  21. package/dist/lib/entities/EventWithDevice.d.ts +5 -5
  22. package/dist/lib/entities/EventWithDevice.js.map +1 -1
  23. package/dist/lib/entities/Feature.d.ts +1 -1
  24. package/dist/lib/entities/Feature.js.map +1 -1
  25. package/dist/lib/entities/Integration.d.ts +3 -3
  26. package/dist/lib/entities/Integration.js.map +1 -1
  27. package/dist/lib/entities/Report.d.ts +1 -1
  28. package/dist/lib/entities/Report.js.map +1 -1
  29. package/dist/lib/entities/Rule.d.ts +3 -3
  30. package/dist/lib/entities/Rule.js.map +1 -1
  31. package/dist/lib/entities/RuleTemplate.d.ts +2 -2
  32. package/dist/lib/entities/RuleTemplate.js.map +1 -1
  33. package/dist/lib/entities/StreamAnalyticsConfig.d.ts +2 -2
  34. package/dist/lib/entities/StreamAnalyticsConfig.js.map +1 -1
  35. package/dist/lib/entities/StreamConfig.d.ts +4 -4
  36. package/dist/lib/entities/User.d.ts +2 -2
  37. package/dist/lib/entities/User.js.map +1 -1
  38. package/dist/lib/entities/UserMembership.d.ts +2 -2
  39. package/dist/lib/entities/UserMembership.js.map +1 -1
  40. package/dist/lib/pulse-client.d.ts +12 -12
  41. package/dist/lib/pulse-client.js +30 -30
  42. package/dist/lib/pulse-client.js.map +1 -1
  43. package/dist/lib/services/sysAccountsService.d.ts +1 -1
  44. package/dist/lib/services/sysFeaturesService.d.ts +1 -1
  45. package/dist/lib/services/usrAlertsService.d.ts +9 -9
  46. package/dist/lib/services/usrDevicesService.d.ts +5 -5
  47. package/dist/lib/services/usrEventsService.d.ts +7 -7
  48. package/package.json +1 -1
  49. package/src/index.ts +4 -3
  50. package/dist/public-api.d.ts +0 -3
  51. package/dist/public-api.js +0 -7
  52. package/dist/public-api.js.map +0 -1
  53. package/src/config.d.ts +0 -6
  54. package/src/config.d.ts.map +0 -1
  55. package/src/config.js +0 -6
  56. package/src/config.js.map +0 -1
  57. package/src/index.d.ts +0 -3
  58. package/src/index.d.ts.map +0 -1
  59. package/src/index.js +0 -3
  60. package/src/index.js.map +0 -1
  61. package/src/lib/common/AccountRole.ts +0 -25
  62. package/src/lib/common/ConsumptionData.ts +0 -24
  63. package/src/lib/common/ConsumptionTimeDataPoint.ts +0 -21
  64. package/src/lib/common/DeviceConfig.ts +0 -22
  65. package/src/lib/common/DeviceScoreConfig.ts +0 -24
  66. package/src/lib/common/DevicesAtRiskConfig.ts +0 -16
  67. package/src/lib/common/EventSeverityConfig.ts +0 -17
  68. package/src/lib/common/FloatKeyValue.ts +0 -20
  69. package/src/lib/common/GeoData.ts +0 -38
  70. package/src/lib/common/GraphSeries.ts +0 -21
  71. package/src/lib/common/Indicator.ts +0 -32
  72. package/src/lib/common/IntKeySeriesDataValue.ts +0 -21
  73. package/src/lib/common/IntKeyValue.ts +0 -20
  74. package/src/lib/common/Interval.ts +0 -20
  75. package/src/lib/common/Link.ts +0 -41
  76. package/src/lib/common/Location.ts +0 -20
  77. package/src/lib/common/LoginParams.ts +0 -24
  78. package/src/lib/common/MaliciousIPCard.ts +0 -45
  79. package/src/lib/common/MaliciousIPData.ts +0 -28
  80. package/src/lib/common/NetworkMap.ts +0 -22
  81. package/src/lib/common/Node.ts +0 -54
  82. package/src/lib/common/SeriesData.ts +0 -22
  83. package/src/lib/common/SessionTransform.ts +0 -29
  84. package/src/lib/common/SeverityIntervalTuple.ts +0 -22
  85. package/src/lib/common/ShieldexConfig.ts +0 -36
  86. package/src/lib/common/StringIntValue.ts +0 -20
  87. package/src/lib/common/StringKeyIntValue.ts +0 -20
  88. package/src/lib/common/StringKeyValue.ts +0 -20
  89. package/src/lib/common/Thresholds.ts +0 -16
  90. package/src/lib/common/TimeDataPoint.ts +0 -20
  91. package/src/lib/common/TimeDataPoint2D.ts +0 -21
  92. package/src/lib/common/TimeDataPointFloat.ts +0 -20
  93. package/src/lib/common/TimeFrame.ts +0 -20
  94. package/src/lib/common/TimeSeries.ts +0 -26
  95. package/src/lib/common/TimeSeriesOf2D.ts +0 -26
  96. package/src/lib/common/TimeSeriesOfDataConsumption.ts +0 -26
  97. package/src/lib/common/TimeSeriesOfFloat.ts +0 -26
  98. package/src/lib/common/TokenData.ts +0 -39
  99. package/src/lib/common/Tuple.ts +0 -20
  100. package/src/lib/common/UsageTransform.ts +0 -37
  101. package/src/lib/common/ZScore.ts +0 -20
  102. package/src/lib/common/index.ts +0 -41
  103. package/src/lib/entities/Account.ts +0 -45
  104. package/src/lib/entities/AccountDTO.ts +0 -49
  105. package/src/lib/entities/AccountSettings.ts +0 -31
  106. package/src/lib/entities/Action.ts +0 -30
  107. package/src/lib/entities/Alert.ts +0 -91
  108. package/src/lib/entities/AlertWithDevice.ts +0 -92
  109. package/src/lib/entities/ApiKey.ts +0 -33
  110. package/src/lib/entities/AuditLog.ts +0 -39
  111. package/src/lib/entities/BaseEntity.ts +0 -24
  112. package/src/lib/entities/BulkDevices.ts +0 -17
  113. package/src/lib/entities/Checkpoint.ts +0 -71
  114. package/src/lib/entities/ComplianceReportSettings.ts +0 -28
  115. package/src/lib/entities/Condition.ts +0 -28
  116. package/src/lib/entities/ConfigParam.ts +0 -15
  117. package/src/lib/entities/DNSRecord.ts +0 -40
  118. package/src/lib/entities/DataIngestion.ts +0 -63
  119. package/src/lib/entities/DataPointOfDeviceReport.ts +0 -21
  120. package/src/lib/entities/Device.ts +0 -82
  121. package/src/lib/entities/DeviceReport.ts +0 -29
  122. package/src/lib/entities/DeviceWithEvents.ts +0 -86
  123. package/src/lib/entities/Distribution.ts +0 -25
  124. package/src/lib/entities/Event.ts +0 -98
  125. package/src/lib/entities/EventOccurrence.ts +0 -34
  126. package/src/lib/entities/EventWithDevice.ts +0 -97
  127. package/src/lib/entities/Feature.ts +0 -18
  128. package/src/lib/entities/FeaturesGroup.ts +0 -18
  129. package/src/lib/entities/Group.ts +0 -24
  130. package/src/lib/entities/Image.ts +0 -18
  131. package/src/lib/entities/Insight.ts +0 -49
  132. package/src/lib/entities/InsightQuery.ts +0 -29
  133. package/src/lib/entities/InsightSpec.ts +0 -28
  134. package/src/lib/entities/IntDistribution.ts +0 -25
  135. package/src/lib/entities/Integration.ts +0 -81
  136. package/src/lib/entities/Member.ts +0 -22
  137. package/src/lib/entities/Radius.ts +0 -45
  138. package/src/lib/entities/Report.ts +0 -37
  139. package/src/lib/entities/Rule.ts +0 -65
  140. package/src/lib/entities/RuleTemplate.ts +0 -38
  141. package/src/lib/entities/SIM.ts +0 -32
  142. package/src/lib/entities/ServiceStatus.ts +0 -26
  143. package/src/lib/entities/SessionRecord.ts +0 -71
  144. package/src/lib/entities/Shieldex.ts +0 -23
  145. package/src/lib/entities/Stream.ts +0 -31
  146. package/src/lib/entities/StreamAnalyticsConfig.ts +0 -30
  147. package/src/lib/entities/StreamConfig.ts +0 -52
  148. package/src/lib/entities/TeaserPopUpSettings.ts +0 -24
  149. package/src/lib/entities/TimeSeriesOfDeviceReport.ts +0 -26
  150. package/src/lib/entities/UsageRecord.ts +0 -101
  151. package/src/lib/entities/User.ts +0 -45
  152. package/src/lib/entities/UserMembership.ts +0 -38
  153. package/src/lib/entities/UserMemberships.ts +0 -38
  154. package/src/lib/entities/index.ts +0 -51
  155. package/src/lib/enums/AccountStatusCode.ts +0 -35
  156. package/src/lib/enums/AccountTypeCode.ts +0 -40
  157. package/src/lib/enums/DataSourceCode.ts +0 -35
  158. package/src/lib/enums/DeviceActionCode.ts +0 -40
  159. package/src/lib/enums/DeviceCreationCode.ts +0 -40
  160. package/src/lib/enums/DeviceIdentityCode.ts +0 -55
  161. package/src/lib/enums/DeviceStatusCode.ts +0 -40
  162. package/src/lib/enums/DeviceTypeCode.ts +0 -90
  163. package/src/lib/enums/DirectionContextCode.ts +0 -40
  164. package/src/lib/enums/EventCategoryCode.ts +0 -30
  165. package/src/lib/enums/EventStatusCode.ts +0 -40
  166. package/src/lib/enums/EventTypeCode.ts +0 -115
  167. package/src/lib/enums/FeatureCode.ts +0 -70
  168. package/src/lib/enums/HomePageViewCode.ts +0 -35
  169. package/src/lib/enums/HttpMethodCode.ts +0 -45
  170. package/src/lib/enums/InsightStatusCode.ts +0 -35
  171. package/src/lib/enums/InsightTypeCode.ts +0 -30
  172. package/src/lib/enums/IntegrationTriggerCode.ts +0 -30
  173. package/src/lib/enums/IntegrationTypeCode.ts +0 -40
  174. package/src/lib/enums/MemberRoleCode.ts +0 -40
  175. package/src/lib/enums/NetworkMapTypeCode.ts +0 -35
  176. package/src/lib/enums/OperatorCode.ts +0 -75
  177. package/src/lib/enums/PermissionCode.ts +0 -45
  178. package/src/lib/enums/ReportTypeCode.ts +0 -35
  179. package/src/lib/enums/RuleTypeCode.ts +0 -35
  180. package/src/lib/enums/SeverityTypeCode.ts +0 -40
  181. package/src/lib/enums/TrafficDirectionCode.ts +0 -35
  182. package/src/lib/enums/UserStatusCode.ts +0 -40
  183. package/src/lib/enums/UserTypeCode.ts +0 -40
  184. package/src/lib/enums/index.ts +0 -29
  185. package/src/lib/index.ts +0 -4
  186. package/src/lib/pulse-client.ts +0 -190
  187. package/src/lib/services/index.ts +0 -26
  188. package/src/lib/services/services.export.ts +0 -54
  189. package/src/lib/services/supportStreamAnalyticsConfig.ts +0 -63
  190. package/src/lib/services/sysAccountsService.ts +0 -90
  191. package/src/lib/services/sysAuditLogService.ts +0 -72
  192. package/src/lib/services/sysCheckpointsService.ts +0 -62
  193. package/src/lib/services/sysConfigService.ts +0 -63
  194. package/src/lib/services/sysFeaturesService.ts +0 -77
  195. package/src/lib/services/sysGroupsService.ts +0 -85
  196. package/src/lib/services/sysInsightsService.ts +0 -122
  197. package/src/lib/services/sysKeysService.ts +0 -71
  198. package/src/lib/services/sysMembersService.ts +0 -66
  199. package/src/lib/services/sysRuleTemplatesService.ts +0 -63
  200. package/src/lib/services/sysRulesService.ts +0 -79
  201. package/src/lib/services/sysStatisticsService.ts +0 -50
  202. package/src/lib/services/sysStreamsService.ts +0 -64
  203. package/src/lib/services/sysUsersService.ts +0 -89
  204. package/src/lib/services/usrAlertsService.ts +0 -382
  205. package/src/lib/services/usrDevicesService.ts +0 -303
  206. package/src/lib/services/usrEventsService.ts +0 -355
  207. package/src/lib/services/usrInsightsService.ts +0 -29
  208. package/src/lib/services/usrIntegrationsService.ts +0 -79
  209. package/src/lib/services/usrMembersService.ts +0 -77
  210. package/src/lib/services/usrNetworkService.ts +0 -59
  211. package/src/lib/services/usrReportsService.ts +0 -114
  212. package/src/lib/services/usrRulesService.ts +0 -78
  213. package/src/lib/services/usrUserService.ts +0 -114
  214. package/src/public-api.d.ts +0 -4
  215. package/src/public-api.d.ts.map +0 -1
  216. package/src/public-api.js +0 -7
  217. package/src/public-api.js.map +0 -1
  218. package/src/public-api.ts +0 -9
  219. package/src/utils/ActionResponse.d.ts +0 -6
  220. package/src/utils/ActionResponse.d.ts.map +0 -1
  221. package/src/utils/ActionResponse.js +0 -9
  222. package/src/utils/ActionResponse.js.map +0 -1
  223. package/src/utils/BaseRestResponse.d.ts +0 -5
  224. package/src/utils/BaseRestResponse.d.ts.map +0 -1
  225. package/src/utils/BaseRestResponse.js +0 -8
  226. package/src/utils/BaseRestResponse.js.map +0 -1
  227. package/src/utils/EntitiesResponse.d.ts +0 -9
  228. package/src/utils/EntitiesResponse.d.ts.map +0 -1
  229. package/src/utils/EntitiesResponse.js +0 -15
  230. package/src/utils/EntitiesResponse.js.map +0 -1
  231. package/src/utils/EntityResponse.d.ts +0 -9
  232. package/src/utils/EntityResponse.d.ts.map +0 -1
  233. package/src/utils/EntityResponse.js +0 -15
  234. package/src/utils/EntityResponse.js.map +0 -1
  235. package/src/utils/index.d.ts +0 -6
  236. package/src/utils/index.d.ts.map +0 -1
  237. package/src/utils/index.js +0 -6
  238. package/src/utils/index.js.map +0 -1
  239. package/src/utils/rest-axios-setup.d.ts +0 -4
  240. package/src/utils/rest-axios-setup.d.ts.map +0 -1
  241. package/src/utils/rest-axios-setup.js +0 -8
  242. package/src/utils/rest-axios-setup.js.map +0 -1
  243. package/src/utils/rest-util.d.ts +0 -16
  244. package/src/utils/rest-util.d.ts.map +0 -1
  245. package/src/utils/rest-util.js +0 -101
  246. package/src/utils/rest-util.js.map +0 -1
@@ -1,49 +0,0 @@
1
- import { AccountStatusCode } from '../enums';
2
- import { FeatureCode } from '../enums';
3
- import { StringKeyValue } from '../common';
4
- import { AccountSettings } from '../entities';
5
- import { BaseEntity } from '../entities';
6
- import { AccountTypeCode } from '../enums';
7
-
8
-
9
-
10
- // AccountDTO includes additional data for display
11
- export class AccountDTO extends BaseEntity {
12
-
13
- // Account name
14
- public name: string;
15
-
16
- // The account identity in the external system (e.g. Billing, CRM etc) @json:externalId"`
17
- public externalId: string;
18
-
19
- // Account description
20
- public description: string;
21
-
22
- // Account Type: UNDEFINED | DEMO | TRIAL | PARTNER | CUSTOMER
23
- public type: AccountTypeCode;
24
-
25
- // Account status: UNDEFINED | ACTIVE | SUSPENDED
26
- public status: AccountStatusCode;
27
-
28
- // List of associated account groups (for feature toggle)
29
- public groups: string[];
30
-
31
- // List of all features from all the groups
32
- public features: FeatureCode[];
33
-
34
- // When the account will be expired [Epoch milliseconds Timestamp] (0 means no expiration time)
35
- public expiredOn: number;
36
-
37
- // Additional user defined tags
38
- public tags: string[];
39
-
40
- // List of custom attributes (key-value pairs)
41
- public labels: StringKeyValue[];
42
-
43
- // Account specific attributes
44
- public settings: AccountSettings;
45
-
46
-
47
- }
48
-
49
-
@@ -1,31 +0,0 @@
1
- import { HomePageViewCode } from '../enums';
2
- import { ComplianceReportSettings } from '../entities';
3
- import { TeaserPopUpSettings } from '../entities';
4
-
5
-
6
-
7
- // AccountSettings is a set of account attributes
8
- export class AccountSettings {
9
-
10
- // Account logo URL (starts with http) or embedded image (base64)
11
- public logo: string;
12
-
13
- // Default home page view
14
- public defaultHomePageView: HomePageViewCode;
15
-
16
- // ComplianceReportSettings specific attributes
17
- public complianceReportSettings: ComplianceReportSettings;
18
-
19
- // Teaser pop up settings attributes
20
- public teaserPopUpSettings: TeaserPopUpSettings;
21
-
22
- constructor(logo?: string, defaultHomePageView?: HomePageViewCode, complianceReportSettings?: ComplianceReportSettings, teaserPopUpSettings?: TeaserPopUpSettings) {
23
- if (logo !== undefined) { this.logo = logo; }
24
- if (defaultHomePageView !== undefined) { this.defaultHomePageView = defaultHomePageView; }
25
- if (complianceReportSettings !== undefined) { this.complianceReportSettings = complianceReportSettings; }
26
- if (teaserPopUpSettings !== undefined) { this.teaserPopUpSettings = teaserPopUpSettings; }
27
- }
28
-
29
- }
30
-
31
-
@@ -1,30 +0,0 @@
1
- import { DeviceActionCode } from '../enums';
2
- import { BaseEntity } from '../entities';
3
-
4
-
5
-
6
- // Action entity is a user action applied on an event or device
7
- export class Action extends BaseEntity {
8
-
9
- // Account Id
10
- public accountId: string;
11
-
12
- // Stream Id
13
- public streamId: string;
14
-
15
- // Event Id (in case action was applied on an event)
16
- public eventId: string;
17
-
18
- // Device Id (in case action was applied on a device)
19
- public deviceId: string;
20
-
21
- // Action type: UNDEFINED | REDIRECT | SUSPEND | BLOCK_IP ...
22
- public action: DeviceActionCode;
23
-
24
- // User id who applied the action
25
- public userId: string;
26
-
27
-
28
- }
29
-
30
-
@@ -1,91 +0,0 @@
1
- import { SeverityTypeCode } from '../enums';
2
- import { EventStatusCode } from '../enums';
3
- import { StringKeyValue } from '../common';
4
- import { BaseEntity } from '../entities';
5
- import { TrafficDirectionCode } from '../enums';
6
- import { EventTypeCode } from '../enums';
7
- import { RuleTypeCode } from '../enums';
8
- import { GeoData } from '../common';
9
- import { EventCategoryCode } from '../enums';
10
-
11
-
12
-
13
- // Cyber event entity
14
- // The Event entity is created by multiple services (e.g. ip reputation, static rules, anomaly detection) by analyzing network statistics (usage and session data) and related to specific IP address.
15
- // Since it is not always clear what is the actual device with the IP address (RADIUS or DIAMETER logs can be provided later), we should be able to create event without device Id and assign the device Id later on.
16
- // For this purpose, when the device Id is not provided, the event will be created with the `unknown` value in the deviceId field and the eventId must follow the following pattern: streamId:timestamp:ip_address
17
- export class Alert extends BaseEntity {
18
-
19
- // Account Id
20
- public accountId: string;
21
-
22
- // Stream Id
23
- public streamId: string;
24
-
25
- // Device Id
26
- public deviceId: string;
27
-
28
- // Start window time [Epoch milliseconds Timestamp]
29
- public startTime: number;
30
-
31
- // End window time [Epoch milliseconds Timestamp]
32
- public endTime: number;
33
-
34
- // Event type: UNDEFINED | DDOS | PORT_SCANNING | DEVICE_TAKEOVER ...
35
- public type: EventTypeCode;
36
-
37
- // Event severity level: UNDEFINED | LOW | MEDIUM | HIGH | CRITICAL
38
- public severity: SeverityTypeCode;
39
-
40
- // Event current security score
41
- public score: number;
42
-
43
- // Probability score by IP reputation engine
44
- public probability: number;
45
-
46
- // Event workflow status: UNDEFINED | NEW | OPEN ...
47
- public status: EventStatusCode;
48
-
49
- // Rule type: UNDEFINED | SUSPICIOUS_IP | STATIC | ANOMALY
50
- public ruleType: RuleTypeCode;
51
-
52
- // Static Rule id (in case of SUSPICIOUS_IP, it should be the IP value)
53
- public ruleId: string;
54
-
55
- // The allocated IP for the device at the time of the event occurrence
56
- public sourceIp: string;
57
-
58
- // Target IP address for some of the events (e.g. suspicious IP)
59
- public targetIp: string;
60
-
61
- // GeoIP information based on MaxMind database
62
- public targetLocation: GeoData;
63
-
64
- // Event description
65
- public description: string;
66
-
67
- // Additional Event tags
68
- public tags: string[];
69
-
70
- // List of custom attributes (key-value pairs)
71
- public labels: StringKeyValue[];
72
-
73
- // Event category
74
- public category: EventCategoryCode;
75
-
76
- // Recommended action description to apply on the device
77
- public recommendedAction: string;
78
-
79
- // Denotes network traffic direction: UNDEFINED | INBOUND | OUTBOUND
80
- public trafficDirection: TrafficDirectionCode;
81
-
82
- // Contains confidence score of malicious IP detection. Value range: 0-100
83
- public confidenceScore: number;
84
-
85
- // Event occurrences count
86
- public occurrencesCount: boolean;
87
-
88
-
89
- }
90
-
91
-
@@ -1,92 +0,0 @@
1
- import { EventTypeCode } from '../enums';
2
- import { SeverityTypeCode } from '../enums';
3
- import { RuleTypeCode } from '../enums';
4
- import { EventStatusCode } from '../enums';
5
- import { GeoData } from '../common';
6
- import { StringKeyValue } from '../common';
7
- import { EventCategoryCode } from '../enums';
8
- import { TrafficDirectionCode } from '../enums';
9
- import { Device } from '../entities';
10
- import { BaseEntity } from '../entities';
11
-
12
-
13
-
14
- // AlertWithDevice entity is an event with the device information (for display only)
15
- export class AlertWithDevice extends BaseEntity {
16
-
17
- // Account Id
18
- public accountId: string;
19
-
20
- // Stream Id
21
- public streamId: string;
22
-
23
- // Device Id
24
- public deviceId: string;
25
-
26
- // Start window time [Epoch milliseconds Timestamp]
27
- public startTime: number;
28
-
29
- // End window time [Epoch milliseconds Timestamp]
30
- public endTime: number;
31
-
32
- // Event type: UNDEFINED | DDOS | PORT_SCANNING | DEVICE_TAKEOVER ...
33
- public type: EventTypeCode;
34
-
35
- // Event severity level: UNDEFINED | LOW | MEDIUM | HIGH | CRITICAL
36
- public severity: SeverityTypeCode;
37
-
38
- // Event current security score
39
- public score: number;
40
-
41
- // Probability score by IP reputation engine
42
- public probability: number;
43
-
44
- // Event workflow status: UNDEFINED | NEW | OPEN ...
45
- public status: EventStatusCode;
46
-
47
- // Rule type: UNDEFINED | SUSPICIOUS_IP | STATIC | ANOMALY
48
- public ruleType: RuleTypeCode;
49
-
50
- // Static Rule id (in case of SUSPICIOUS_IP, it should be the IP value)
51
- public ruleId: string;
52
-
53
- // The allocated IP for the device at the time of the event occurrence
54
- public sourceIp: string;
55
-
56
- // Target IP address for some of the events (e.g. suspicious IP)
57
- public targetIp: string;
58
-
59
- // GeoIP information based on MaxMind database
60
- public targetLocation: GeoData;
61
-
62
- // Event description
63
- public description: string;
64
-
65
- // Additional Event tags
66
- public tags: string[];
67
-
68
- // List of custom attributes (key-value pairs)
69
- public labels: StringKeyValue[];
70
-
71
- // Event category
72
- public category: EventCategoryCode;
73
-
74
- // Recommended action description to apply on the device
75
- public recommendedAction: string;
76
-
77
- // Denotes network traffic direction: UNDEFINED | INBOUND | OUTBOUND
78
- public trafficDirection: TrafficDirectionCode;
79
-
80
- // Contains confidence score of malicious IP detection. Value range: 0-100
81
- public confidenceScore: number;
82
-
83
- // Event occurrences count
84
- public occurrencesCount: boolean;
85
-
86
- // Device attached to the event
87
- public device: Device;
88
-
89
-
90
- }
91
-
92
-
@@ -1,33 +0,0 @@
1
- import { StringKeyIntValue } from '../common';
2
- import { BaseEntity } from '../entities';
3
-
4
-
5
-
6
- // ApiKey entity is a structure representing the source data fields encapsulated in the API key
7
- export class ApiKey extends BaseEntity {
8
-
9
- // API Key name
10
- public name: string;
11
-
12
- // Default session token expiration TTL (in minutes), 0 means no TTL
13
- public ttl: number;
14
-
15
- // Access Control List - list of accessible resources with permissions flags (1:Read, 2:Create, 4:Update, 8:Delete, 16:Action)
16
- public acl: StringKeyIntValue[];
17
-
18
- // Key version (for key rotation)
19
- public version: number;
20
-
21
- // Flag to indicate if this a system key or user defined key
22
- public systemKey: boolean;
23
-
24
- // Flag to indicate if the key is enabled
25
- public enabled: boolean;
26
-
27
- // The API Key (this value is auto generated and not stored in the DB)
28
- public key: string;
29
-
30
-
31
- }
32
-
33
-
@@ -1,39 +0,0 @@
1
- import { UserTypeCode } from '../enums';
2
- import { BaseEntity } from '../entities';
3
-
4
-
5
-
6
- // Audit Log - each entry represents a single action done by user
7
- export class AuditLog extends BaseEntity {
8
-
9
- // Account Id (empty if it is non-account entity)
10
- public accountId: string;
11
-
12
- // User Id
13
- public userId: string;
14
-
15
- // User type
16
- public userType: UserTypeCode;
17
-
18
- // Action that was performed
19
- public action: string;
20
-
21
- // Changed item type
22
- public itemType: string;
23
-
24
- // Changed item Id
25
- public itemId: string;
26
-
27
- // Item Name
28
- public itemName: string;
29
-
30
- // Item value before change [Json]
31
- public beforeChange: string;
32
-
33
- // Item delta after change [Json]
34
- public afterChange: string;
35
-
36
-
37
- }
38
-
39
-
@@ -1,24 +0,0 @@
1
-
2
-
3
-
4
- // Base entity includes common fields for all entities (persistence objects) in the system
5
- export class BaseEntity {
6
-
7
- // Entity Id
8
- public id: string;
9
-
10
- // When the entity was created [Epoch milliseconds Timestamp]
11
- public createdOn: number;
12
-
13
- // When the entity was updated [Epoch milliseconds Timestamp]
14
- public updatedOn: number;
15
-
16
- constructor(id?: string, createdOn?: number, updatedOn?: number) {
17
- if (id !== undefined) { this.id = id; }
18
- if (createdOn !== undefined) { this.createdOn = createdOn; }
19
- if (updatedOn !== undefined) { this.updatedOn = updatedOn; }
20
- }
21
-
22
- }
23
-
24
-
@@ -1,17 +0,0 @@
1
- import { Device } from '../entities';
2
-
3
-
4
-
5
- // BulkDevices list of devices for bulk operations
6
- export class BulkDevices {
7
-
8
- // List of devices
9
- public values: Device[];
10
-
11
- constructor(values?: Device[]) {
12
- if (values !== undefined) { this.values = values; }
13
- }
14
-
15
- }
16
-
17
-
@@ -1,71 +0,0 @@
1
- import { BaseEntity } from '../entities';
2
-
3
-
4
-
5
- // Checkpoint represents parsing status in time that preserves parsing cycle statistics and last checkpoint (timestamp) to avoid parsing the same files over and over again
6
- export class Checkpoint extends BaseEntity {
7
-
8
- // Account Id
9
- public accountId: string;
10
-
11
- // Stream Id
12
- public streamId: string;
13
-
14
- // Timestamp marking checkpoint time [Epoch milliseconds Timestamp]
15
- public checkpoint: number;
16
-
17
- // First packet timestamp [Epoch milliseconds Timestamp]
18
- public firstPacketTime: number;
19
-
20
- // Last packet timestamp [Epoch milliseconds Timestamp]
21
- public lastPacketTime: number;
22
-
23
- // Checkpoint label (usually file name)
24
- public label: string;
25
-
26
- // General purpose description
27
- public description: string;
28
-
29
- // Total elapsed time (between updated and created time)
30
- public elapsed: number;
31
-
32
- // Total files parsed in this cycle
33
- public totalFiles: number;
34
-
35
- // Total packets parsed in this cycle
36
- public totalPackets: number;
37
-
38
- // Total usage records created
39
- public totalUsage: number;
40
-
41
- // Total session records created
42
- public totalSession: number;
43
-
44
- // Total RADIUS records created
45
- public totalRadius: number;
46
-
47
- // Total number of overlapped packets (their timestamp is earlier than the latest checkpoint)
48
- public overlappedPackets: number;
49
-
50
- // Total number of packets that failed parsing
51
- public failedPackets: number;
52
-
53
- // Total number of packets nor related to the tracked devices
54
- public irrelevantPackets: number;
55
-
56
- // Total number of packets that could not be mapped to device identity
57
- public unmappedPackets: number;
58
-
59
- // Total number of successfully processed packets
60
- public processedPackets: number;
61
-
62
- // Checkpoint state: 0 - created, 1 - in progress, 2 - completed
63
- public state: number;
64
-
65
- // Identity of the worker processed the file
66
- public processedBy: string;
67
-
68
-
69
- }
70
-
71
-
@@ -1,28 +0,0 @@
1
-
2
-
3
-
4
- // ComplianceReportSettings is a set of account's compliance report settings.
5
- export class ComplianceReportSettings {
6
-
7
- // Compliance report title
8
- public title: string;
9
-
10
- // Compliance report subtitle
11
- public subTitle: string;
12
-
13
- // Compliance report header
14
- public header: string;
15
-
16
- // Compliance report footer
17
- public footer: string;
18
-
19
- constructor(title?: string, subTitle?: string, header?: string, footer?: string) {
20
- if (title !== undefined) { this.title = title; }
21
- if (subTitle !== undefined) { this.subTitle = subTitle; }
22
- if (header !== undefined) { this.header = header; }
23
- if (footer !== undefined) { this.footer = footer; }
24
- }
25
-
26
- }
27
-
28
-
@@ -1,28 +0,0 @@
1
- import { OperatorCode } from '../enums';
2
-
3
-
4
-
5
- export class Condition {
6
-
7
- // Field name
8
- public field: string;
9
-
10
- // Operator symbol: Eq(=), Neq(!), Gt(>), Gte(>=), Lt(<), Lte(<=), In(*), Not In(-), Between(#)
11
- public operator: OperatorCode;
12
-
13
- // Operand double values (more than one values applicable for operators: In(*), Not In(-), Range(#)
14
- public values: number[];
15
-
16
- // Operand string values (more than one values applicable for operators: In(*), Not In(-)
17
- public strings: string[];
18
-
19
- constructor(field?: string, operator?: OperatorCode, values?: number[], strings?: string[]) {
20
- if (field !== undefined) { this.field = field; }
21
- if (operator !== undefined) { this.operator = operator; }
22
- if (values !== undefined) { this.values = values; }
23
- if (strings !== undefined) { this.strings = strings; }
24
- }
25
-
26
- }
27
-
28
-
@@ -1,15 +0,0 @@
1
- import { BaseEntity } from '../entities';
2
-
3
-
4
-
5
- // ConfigParam stores a key-value pair as a system configuration parameter
6
- // The id is the key of the parameter
7
- export class ConfigParam extends BaseEntity {
8
-
9
- // configuration value
10
- public value: string;
11
-
12
-
13
- }
14
-
15
-
@@ -1,40 +0,0 @@
1
- import { BaseEntity } from '../entities';
2
-
3
-
4
-
5
- // DNSRecord represents network statistics of DNS requests
6
- // The createdOn field represents the first communication time of the device within this time window
7
- // The updatedOn field represents the last communication time of the device within this time window
8
- export class DNSRecord extends BaseEntity {
9
-
10
- // Indication to the source location of the record
11
- public source: string;
12
-
13
- // Device Id
14
- public deviceId: string;
15
-
16
- // Device IP
17
- public deviceIp: string;
18
-
19
- // Account Id
20
- public accountId: string;
21
-
22
- // Stream Id
23
- public streamId: string;
24
-
25
- // Start window time [Epoch milliseconds Timestamp]
26
- public startTime: number;
27
-
28
- // End window time [Epoch milliseconds Timestamp]
29
- public endTime: number;
30
-
31
- // Fully Qualified Domain Name
32
- public fqdn: string;
33
-
34
- // List of A records
35
- public records: string[];
36
-
37
-
38
- }
39
-
40
-
@@ -1,63 +0,0 @@
1
- import { DeviceTypeCode } from '../enums';
2
- import { DeviceCreationCode } from '../enums';
3
- import { DeviceIdentityCode } from '../enums';
4
-
5
-
6
-
7
- // DataIngestion is the ingestion pipeline configuration
8
- export class DataIngestion {
9
-
10
- // Input files locations
11
- public inputURI: string;
12
-
13
- // File format: pcap / pcapng (default)
14
- public format: string;
15
-
16
- // Where to archive processed files
17
- public archiveURI: string;
18
-
19
- // Input files extensions (filter by extensions) - ignore if empty
20
- public inputFilesExt: string[];
21
-
22
- // List of IoT devices subnets - ignore if empty
23
- public subNets: string[];
24
-
25
- // List of subnets or IPs to exclude
26
- public exclude: string[];
27
-
28
- // Usage time window for aggregation (in seconds)
29
- public usageTimeWindowSec: number;
30
-
31
- // Session time window for aggregation (in seconds)
32
- public sessionTimeWindowSec: number;
33
-
34
- // Cron schedule template in 6 segment format (see: https://en.wikipedia.org/wiki/Cron) - leave empty for immediate processing
35
- public schedule: string;
36
-
37
- // Default device type: UNDEFINED | OTHER | CONTROLLER | METER | SENSOR ...
38
- public defaultDeviceType: DeviceTypeCode;
39
-
40
- // Device creation policy based on the PCP parsing (NONE | IP | SID | EID)
41
- public deviceCreationPolicy: DeviceCreationCode;
42
-
43
- // How to identify devices during the PCAP parsing (NONE | IP | SID | EID)
44
- public deviceIdentityPolicy: DeviceIdentityCode;
45
-
46
- constructor(inputURI?: string, format?: string, archiveURI?: string, inputFilesExt?: string[], subNets?: string[], exclude?: string[], usageTimeWindowSec?: number, sessionTimeWindowSec?: number, schedule?: string, defaultDeviceType?: DeviceTypeCode, deviceCreationPolicy?: DeviceCreationCode, deviceIdentityPolicy?: DeviceIdentityCode) {
47
- if (inputURI !== undefined) { this.inputURI = inputURI; }
48
- if (format !== undefined) { this.format = format; }
49
- if (archiveURI !== undefined) { this.archiveURI = archiveURI; }
50
- if (inputFilesExt !== undefined) { this.inputFilesExt = inputFilesExt; }
51
- if (subNets !== undefined) { this.subNets = subNets; }
52
- if (exclude !== undefined) { this.exclude = exclude; }
53
- if (usageTimeWindowSec !== undefined) { this.usageTimeWindowSec = usageTimeWindowSec; }
54
- if (sessionTimeWindowSec !== undefined) { this.sessionTimeWindowSec = sessionTimeWindowSec; }
55
- if (schedule !== undefined) { this.schedule = schedule; }
56
- if (defaultDeviceType !== undefined) { this.defaultDeviceType = defaultDeviceType; }
57
- if (deviceCreationPolicy !== undefined) { this.deviceCreationPolicy = deviceCreationPolicy; }
58
- if (deviceIdentityPolicy !== undefined) { this.deviceIdentityPolicy = deviceIdentityPolicy; }
59
- }
60
-
61
- }
62
-
63
-
@@ -1,21 +0,0 @@
1
- import { DeviceReport } from '../entities';
2
-
3
-
4
-
5
- // TimeSeriesOfDeviceReport model represents a time series of DeviceReport
6
- export class DataPointOfDeviceReport {
7
-
8
- // Sata point timestamp [Epoch milliseconds Timestamp]
9
- public timestamp: number;
10
-
11
- // Device report value
12
- public value: DeviceReport;
13
-
14
- constructor(timestamp?: number, value?: DeviceReport) {
15
- if (timestamp !== undefined) { this.timestamp = timestamp; }
16
- if (value !== undefined) { this.value = value; }
17
- }
18
-
19
- }
20
-
21
-