@shieldiot/ngx-pulseiot-lib 2.18.1113 → 2.18.1115

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.
@@ -7219,6 +7219,64 @@ class UsrAlertsService {
7219
7219
  get(id) {
7220
7220
  return this.rest.get(`${this.baseUrl}/${id}`);
7221
7221
  }
7222
+ /**
7223
+ * Find alerts by query
7224
+ */
7225
+ find(streamId, deviceId, search, from, to, type, severity, category, status, ruleId, targetIp, ruleType, sort, page, size, withoutOccurrences, ids) {
7226
+ const params = [];
7227
+ if (streamId != null) {
7228
+ params.push(`streamId=${streamId}`);
7229
+ }
7230
+ if (deviceId != null) {
7231
+ params.push(`deviceId=${deviceId}`);
7232
+ }
7233
+ if (search != null) {
7234
+ params.push(`search=${search}`);
7235
+ }
7236
+ if (from != null) {
7237
+ params.push(`from=${from}`);
7238
+ }
7239
+ if (to != null) {
7240
+ params.push(`to=${to}`);
7241
+ }
7242
+ if (type != null) {
7243
+ params.push(`type=${type}`);
7244
+ }
7245
+ if (severity != null) {
7246
+ params.push(`severity=${severity}`);
7247
+ }
7248
+ if (category != null) {
7249
+ params.push(`category=${category}`);
7250
+ }
7251
+ if (status != null) {
7252
+ params.push(`status=${status}`);
7253
+ }
7254
+ if (ruleId != null) {
7255
+ params.push(`ruleId=${ruleId}`);
7256
+ }
7257
+ if (targetIp != null) {
7258
+ params.push(`targetIp=${targetIp}`);
7259
+ }
7260
+ if (ruleType != null) {
7261
+ params.push(`ruleType=${ruleType}`);
7262
+ }
7263
+ if (sort != null) {
7264
+ params.push(`sort=${sort}`);
7265
+ }
7266
+ if (page != null) {
7267
+ params.push(`page=${page}`);
7268
+ }
7269
+ if (size != null) {
7270
+ params.push(`size=${size}`);
7271
+ }
7272
+ if (withoutOccurrences != null) {
7273
+ params.push(`withoutOccurrences=${withoutOccurrences}`);
7274
+ }
7275
+ if (ids != null) {
7276
+ params.push(`ids=${ids}`);
7277
+ }
7278
+ return this.rest.get(`${this.baseUrl}`, ...params);
7279
+ }
7222
7280
  /**
7223
7281
  * Export alerts by query to a file
7224
7282
  */
@@ -7286,7 +7344,7 @@ class UsrAlertsService {
7286
7344
  /**
7287
7345
  * Get top 10 alerts by their severity and time
7288
7346
  */
7289
- findTop(streamId, deviceId, search, from, to, type, severity, sort, page, size) {
7347
+ findTop(streamId, deviceId, search, from, to, type, severity, category, status, ruleId, targetIp, ruleType, sort, page, size, ids) {
7290
7348
  const params = [];
7291
7349
  if (streamId != null) {
7292
7350
  params.push(`streamId=${streamId}`);
@@ -7309,6 +7367,21 @@ class UsrAlertsService {
7309
7367
  if (severity != null) {
7310
7368
  params.push(`severity=${severity}`);
7311
7369
  }
7370
+ if (category != null) {
7371
+ params.push(`category=${category}`);
7372
+ }
7373
+ if (status != null) {
7374
+ params.push(`status=${status}`);
7375
+ }
7376
+ if (ruleId != null) {
7377
+ params.push(`ruleId=${ruleId}`);
7378
+ }
7379
+ if (targetIp != null) {
7380
+ params.push(`targetIp=${targetIp}`);
7381
+ }
7382
+ if (ruleType != null) {
7383
+ params.push(`ruleType=${ruleType}`);
7384
+ }
7312
7385
  if (sort != null) {
7313
7386
  params.push(`sort=${sort}`);
7314
7387
  }
@@ -7318,12 +7391,15 @@ class UsrAlertsService {
7318
7391
  if (size != null) {
7319
7392
  params.push(`size=${size}`);
7320
7393
  }
7394
+ if (ids != null) {
7395
+ params.push(`ids=${ids}`);
7396
+ }
7321
7397
  return this.rest.get(`${this.baseUrl}/top`, ...params);
7322
7398
  }
7323
7399
  /**
7324
7400
  * Get top 10 alerts by their severity and time
7325
7401
  */
7326
- findTopMaliciousIPs(streamId, top) {
7402
+ findTopMaliciousIPs(streamId, top, from, to) {
7327
7403
  const params = [];
7328
7404
  if (streamId != null) {
7329
7405
  params.push(`streamId=${streamId}`);
@@ -7331,12 +7407,18 @@ class UsrAlertsService {
7331
7407
  if (top != null) {
7332
7408
  params.push(`top=${top}`);
7333
7409
  }
7410
+ if (from != null) {
7411
+ params.push(`from=${from}`);
7412
+ }
7413
+ if (to != null) {
7414
+ params.push(`to=${to}`);
7415
+ }
7334
7416
  return this.rest.get(`${this.baseUrl}/top-malicious-ips`, ...params);
7335
7417
  }
7336
7418
  /**
7337
7419
  * Get alerts distribution by type filtered by query
7338
7420
  */
7339
- countByType(streamId, deviceId, search, from, to, type, severity) {
7421
+ countByType(streamId, deviceId, search, from, to, type, severity, category, status, ruleId, targetIp, ruleType) {
7340
7422
  const params = [];
7341
7423
  if (streamId != null) {
7342
7424
  params.push(`streamId=${streamId}`);
@@ -7359,12 +7441,27 @@ class UsrAlertsService {
7359
7441
  if (severity != null) {
7360
7442
  params.push(`severity=${severity}`);
7361
7443
  }
7444
+ if (category != null) {
7445
+ params.push(`category=${category}`);
7446
+ }
7447
+ if (status != null) {
7448
+ params.push(`status=${status}`);
7449
+ }
7450
+ if (ruleId != null) {
7451
+ params.push(`ruleId=${ruleId}`);
7452
+ }
7453
+ if (targetIp != null) {
7454
+ params.push(`targetIp=${targetIp}`);
7455
+ }
7456
+ if (ruleType != null) {
7457
+ params.push(`ruleType=${ruleType}`);
7458
+ }
7362
7459
  return this.rest.get(`${this.baseUrl}/count/by-type`, ...params);
7363
7460
  }
7364
7461
  /**
7365
7462
  * Get alerts distribution by status filtered by query
7366
7463
  */
7367
- countByStatus(streamId, deviceId, search, from, to, type, severity) {
7464
+ countByStatus(streamId, deviceId, search, from, to, type, severity, category, status, ruleId, targetIp, ruleType) {
7368
7465
  const params = [];
7369
7466
  if (streamId != null) {
7370
7467
  params.push(`streamId=${streamId}`);
@@ -7387,12 +7484,27 @@ class UsrAlertsService {
7387
7484
  if (severity != null) {
7388
7485
  params.push(`severity=${severity}`);
7389
7486
  }
7487
+ if (category != null) {
7488
+ params.push(`category=${category}`);
7489
+ }
7490
+ if (status != null) {
7491
+ params.push(`status=${status}`);
7492
+ }
7493
+ if (ruleId != null) {
7494
+ params.push(`ruleId=${ruleId}`);
7495
+ }
7496
+ if (targetIp != null) {
7497
+ params.push(`targetIp=${targetIp}`);
7498
+ }
7499
+ if (ruleType != null) {
7500
+ params.push(`ruleType=${ruleType}`);
7501
+ }
7390
7502
  return this.rest.get(`${this.baseUrl}/count/by-status`, ...params);
7391
7503
  }
7392
7504
  /**
7393
7505
  * Get alerts distribution by severity filtered by query
7394
7506
  */
7395
- countBySeverity(streamId, deviceId, search, from, to, type, severity) {
7507
+ countBySeverity(streamId, deviceId, search, from, to, type, severity, category, status, ruleId, targetIp, ruleType) {
7396
7508
  const params = [];
7397
7509
  if (streamId != null) {
7398
7510
  params.push(`streamId=${streamId}`);
@@ -7415,12 +7527,27 @@ class UsrAlertsService {
7415
7527
  if (severity != null) {
7416
7528
  params.push(`severity=${severity}`);
7417
7529
  }
7530
+ if (category != null) {
7531
+ params.push(`category=${category}`);
7532
+ }
7533
+ if (status != null) {
7534
+ params.push(`status=${status}`);
7535
+ }
7536
+ if (ruleId != null) {
7537
+ params.push(`ruleId=${ruleId}`);
7538
+ }
7539
+ if (targetIp != null) {
7540
+ params.push(`targetIp=${targetIp}`);
7541
+ }
7542
+ if (ruleType != null) {
7543
+ params.push(`ruleType=${ruleType}`);
7544
+ }
7418
7545
  return this.rest.get(`${this.baseUrl}/count/by-severity`, ...params);
7419
7546
  }
7420
7547
  /**
7421
7548
  * Get alerts distribution by rule filtered by query
7422
7549
  */
7423
- countByRule(streamId, deviceId, search, from, to, type, severity) {
7550
+ countByRule(streamId, deviceId, search, from, to, type, severity, category, status, ruleId, targetIp, ruleType) {
7424
7551
  const params = [];
7425
7552
  if (streamId != null) {
7426
7553
  params.push(`streamId=${streamId}`);
@@ -7443,12 +7570,27 @@ class UsrAlertsService {
7443
7570
  if (severity != null) {
7444
7571
  params.push(`severity=${severity}`);
7445
7572
  }
7573
+ if (category != null) {
7574
+ params.push(`category=${category}`);
7575
+ }
7576
+ if (status != null) {
7577
+ params.push(`status=${status}`);
7578
+ }
7579
+ if (ruleId != null) {
7580
+ params.push(`ruleId=${ruleId}`);
7581
+ }
7582
+ if (targetIp != null) {
7583
+ params.push(`targetIp=${targetIp}`);
7584
+ }
7585
+ if (ruleType != null) {
7586
+ params.push(`ruleType=${ruleType}`);
7587
+ }
7446
7588
  return this.rest.get(`${this.baseUrl}/count/by-rule`, ...params);
7447
7589
  }
7448
7590
  /**
7449
7591
  * Get alerts distribution by category filtered by query
7450
7592
  */
7451
- countByCategory(streamId, deviceId, search, from, to, type, severity) {
7593
+ countByCategory(streamId, deviceId, search, from, to, type, severity, category, status, ruleId, targetIp, ruleType) {
7452
7594
  const params = [];
7453
7595
  if (streamId != null) {
7454
7596
  params.push(`streamId=${streamId}`);
@@ -7471,6 +7613,21 @@ class UsrAlertsService {
7471
7613
  if (severity != null) {
7472
7614
  params.push(`severity=${severity}`);
7473
7615
  }
7616
+ if (category != null) {
7617
+ params.push(`category=${category}`);
7618
+ }
7619
+ if (status != null) {
7620
+ params.push(`status=${status}`);
7621
+ }
7622
+ if (ruleId != null) {
7623
+ params.push(`ruleId=${ruleId}`);
7624
+ }
7625
+ if (targetIp != null) {
7626
+ params.push(`targetIp=${targetIp}`);
7627
+ }
7628
+ if (ruleType != null) {
7629
+ params.push(`ruleType=${ruleType}`);
7630
+ }
7474
7631
  return this.rest.get(`${this.baseUrl}/count/by-category`, ...params);
7475
7632
  }
7476
7633
  /**
@@ -7525,17 +7682,23 @@ class UsrAlertsService {
7525
7682
  /**
7526
7683
  * Get shieldex histogram over the provided time period
7527
7684
  */
7528
- shieldexTimeline(streamId) {
7685
+ shieldexTimeline(streamId, from, to) {
7529
7686
  const params = [];
7530
7687
  if (streamId != null) {
7531
7688
  params.push(`streamId=${streamId}`);
7532
7689
  }
7690
+ if (from != null) {
7691
+ params.push(`from=${from}`);
7692
+ }
7693
+ if (to != null) {
7694
+ params.push(`to=${to}`);
7695
+ }
7533
7696
  return this.rest.get(`${this.baseUrl}/shieldex/timeline`, ...params);
7534
7697
  }
7535
7698
  /**
7536
7699
  * Get devices at risk number for specific alerts criteria and return the number of devices at risk for specific alerts criteria
7537
7700
  */
7538
- getDevicesAtRisk(streamId, search, from, to, type, severity) {
7701
+ getDevicesAtRisk(streamId, search, from, to, type, severity, category, status, ruleId, targetIp, ruleType) {
7539
7702
  const params = [];
7540
7703
  if (streamId != null) {
7541
7704
  params.push(`streamId=${streamId}`);
@@ -7555,6 +7718,21 @@ class UsrAlertsService {
7555
7718
  if (severity != null) {
7556
7719
  params.push(`severity=${severity}`);
7557
7720
  }
7721
+ if (category != null) {
7722
+ params.push(`category=${category}`);
7723
+ }
7724
+ if (status != null) {
7725
+ params.push(`status=${status}`);
7726
+ }
7727
+ if (ruleId != null) {
7728
+ params.push(`ruleId=${ruleId}`);
7729
+ }
7730
+ if (targetIp != null) {
7731
+ params.push(`targetIp=${targetIp}`);
7732
+ }
7733
+ if (ruleType != null) {
7734
+ params.push(`ruleType=${ruleType}`);
7735
+ }
7558
7736
  return this.rest.get(`${this.baseUrl}/devices-at-risk`, ...params);
7559
7737
  }
7560
7738
  /**