@shieldiot/pulse-lib 1.0.11 → 1.0.12
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.
- package/README.md +9 -3
- package/dist/cjs/index.js +0 -1
- package/dist/cjs/lib/index.js +0 -1
- package/dist/cjs/lib/pulse-client.js +25 -29
- package/dist/cjs/lib/services/supportStreamAnalyticsConfig.js +3 -3
- package/dist/cjs/lib/services/sysAccountsService.js +3 -3
- package/dist/cjs/lib/services/sysAuditLogService.js +3 -3
- package/dist/cjs/lib/services/sysCheckpointsService.js +3 -3
- package/dist/cjs/lib/services/sysConfigService.js +3 -3
- package/dist/cjs/lib/services/sysFeaturesService.js +3 -3
- package/dist/cjs/lib/services/sysGroupsService.js +3 -3
- package/dist/cjs/lib/services/sysInsightsService.js +3 -3
- package/dist/cjs/lib/services/sysKeysService.js +3 -3
- package/dist/cjs/lib/services/sysMembersService.js +3 -3
- package/dist/cjs/lib/services/sysRuleTemplatesService.js +3 -3
- package/dist/cjs/lib/services/sysRulesService.js +3 -3
- package/dist/cjs/lib/services/sysStatisticsService.js +3 -3
- package/dist/cjs/lib/services/sysStreamsService.js +3 -3
- package/dist/cjs/lib/services/sysUsersService.js +3 -3
- package/dist/cjs/lib/services/usrAlertsService.js +3 -3
- package/dist/cjs/lib/services/usrDevicesService.js +3 -3
- package/dist/cjs/lib/services/usrEventsService.js +3 -3
- package/dist/cjs/lib/services/usrInsightsService.js +3 -3
- package/dist/cjs/lib/services/usrIntegrationsService.js +3 -3
- package/dist/cjs/lib/services/usrMembersService.js +3 -3
- package/dist/cjs/lib/services/usrNetworkService.js +3 -3
- package/dist/cjs/lib/services/usrReportsService.js +3 -3
- package/dist/cjs/lib/services/usrRulesService.js +3 -3
- package/dist/cjs/lib/services/usrUserService.js +3 -3
- package/dist/esm/index.js +0 -1
- package/dist/esm/lib/index.js +0 -1
- package/dist/esm/lib/pulse-client.js +31 -35
- package/dist/esm/lib/services/supportStreamAnalyticsConfig.js +3 -3
- package/dist/esm/lib/services/sysAccountsService.js +3 -3
- package/dist/esm/lib/services/sysAuditLogService.js +3 -3
- package/dist/esm/lib/services/sysCheckpointsService.js +3 -3
- package/dist/esm/lib/services/sysConfigService.js +3 -3
- package/dist/esm/lib/services/sysFeaturesService.js +3 -3
- package/dist/esm/lib/services/sysGroupsService.js +3 -3
- package/dist/esm/lib/services/sysInsightsService.js +3 -3
- package/dist/esm/lib/services/sysKeysService.js +3 -3
- package/dist/esm/lib/services/sysMembersService.js +3 -3
- package/dist/esm/lib/services/sysRuleTemplatesService.js +3 -3
- package/dist/esm/lib/services/sysRulesService.js +3 -3
- package/dist/esm/lib/services/sysStatisticsService.js +3 -3
- package/dist/esm/lib/services/sysStreamsService.js +3 -3
- package/dist/esm/lib/services/sysUsersService.js +3 -3
- package/dist/esm/lib/services/usrAlertsService.js +3 -3
- package/dist/esm/lib/services/usrDevicesService.js +3 -3
- package/dist/esm/lib/services/usrEventsService.js +3 -3
- package/dist/esm/lib/services/usrInsightsService.js +3 -3
- package/dist/esm/lib/services/usrIntegrationsService.js +3 -3
- package/dist/esm/lib/services/usrMembersService.js +3 -3
- package/dist/esm/lib/services/usrNetworkService.js +3 -3
- package/dist/esm/lib/services/usrReportsService.js +3 -3
- package/dist/esm/lib/services/usrRulesService.js +3 -3
- package/dist/esm/lib/services/usrUserService.js +3 -3
- package/dist/types/index.d.ts +0 -1
- package/dist/types/lib/common/TokenData.d.ts +1 -1
- package/dist/types/lib/entities/Account.d.ts +2 -2
- package/dist/types/lib/entities/Action.d.ts +1 -1
- package/dist/types/lib/entities/Alert.d.ts +5 -5
- package/dist/types/lib/entities/AlertWithDevice.d.ts +7 -7
- package/dist/types/lib/entities/Device.d.ts +2 -2
- package/dist/types/lib/entities/DeviceWithEvents.d.ts +3 -3
- package/dist/types/lib/entities/Event.d.ts +4 -4
- package/dist/types/lib/entities/EventWithDevice.d.ts +6 -6
- package/dist/types/lib/entities/Insight.d.ts +2 -2
- package/dist/types/lib/entities/Integration.d.ts +3 -3
- package/dist/types/lib/entities/Radius.d.ts +1 -1
- package/dist/types/lib/entities/Rule.d.ts +3 -3
- package/dist/types/lib/entities/RuleTemplate.d.ts +1 -1
- package/dist/types/lib/entities/User.d.ts +2 -2
- package/dist/types/lib/entities/UserMembership.d.ts +1 -1
- package/dist/types/lib/entities/UserMemberships.d.ts +1 -1
- package/dist/types/lib/index.d.ts +0 -1
- package/dist/types/lib/pulse-client.d.ts +13 -14
- package/dist/types/lib/services/supportStreamAnalyticsConfig.d.ts +2 -3
- package/dist/types/lib/services/sysAccountsService.d.ts +2 -3
- package/dist/types/lib/services/sysAuditLogService.d.ts +2 -3
- package/dist/types/lib/services/sysCheckpointsService.d.ts +2 -3
- package/dist/types/lib/services/sysConfigService.d.ts +2 -3
- package/dist/types/lib/services/sysFeaturesService.d.ts +3 -4
- package/dist/types/lib/services/sysGroupsService.d.ts +2 -3
- package/dist/types/lib/services/sysInsightsService.d.ts +2 -3
- package/dist/types/lib/services/sysKeysService.d.ts +2 -3
- package/dist/types/lib/services/sysMembersService.d.ts +2 -3
- package/dist/types/lib/services/sysRuleTemplatesService.d.ts +2 -3
- package/dist/types/lib/services/sysRulesService.d.ts +2 -3
- package/dist/types/lib/services/sysStatisticsService.d.ts +2 -3
- package/dist/types/lib/services/sysStreamsService.d.ts +2 -3
- package/dist/types/lib/services/sysUsersService.d.ts +2 -3
- package/dist/types/lib/services/usrAlertsService.d.ts +11 -12
- package/dist/types/lib/services/usrDevicesService.d.ts +9 -10
- package/dist/types/lib/services/usrEventsService.d.ts +10 -11
- package/dist/types/lib/services/usrInsightsService.d.ts +2 -3
- package/dist/types/lib/services/usrIntegrationsService.d.ts +2 -3
- package/dist/types/lib/services/usrMembersService.d.ts +2 -3
- package/dist/types/lib/services/usrNetworkService.d.ts +2 -3
- package/dist/types/lib/services/usrReportsService.d.ts +2 -3
- package/dist/types/lib/services/usrRulesService.d.ts +4 -5
- package/dist/types/lib/services/usrUserService.d.ts +4 -5
- package/dist/umd/index.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/config.js +0 -11
- package/dist/esm/config.js +0 -7
- package/dist/types/config.d.ts +0 -5
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
|
-
import { PulseConfig } from "../config";
|
|
3
2
|
import { RestUtil } from "../utils";
|
|
3
|
+
import { UsrAlertsService } from "./services";
|
|
4
|
+
import { UsrDevicesService } from "./services";
|
|
5
|
+
import { UsrEventsService } from "./services";
|
|
6
|
+
import { UsrNetworkService } from "./services";
|
|
7
|
+
import { UsrReportsService } from "./services";
|
|
8
|
+
import { UsrRulesService } from "./services";
|
|
4
9
|
import { SupportStreamAnalyticsConfig } from "./services";
|
|
5
10
|
import { SysAccountsService } from "./services";
|
|
6
11
|
import { SysAuditLogService } from "./services";
|
|
@@ -20,21 +25,12 @@ import { UsrInsightsService } from "./services";
|
|
|
20
25
|
import { UsrIntegrationsService } from "./services";
|
|
21
26
|
import { UsrMembersService } from "./services";
|
|
22
27
|
import { UsrUserService } from "./services";
|
|
23
|
-
import { UsrAlertsService } from "./services";
|
|
24
|
-
import { UsrDevicesService } from "./services";
|
|
25
|
-
import { UsrEventsService } from "./services";
|
|
26
|
-
import { UsrNetworkService } from "./services";
|
|
27
|
-
import { UsrReportsService } from "./services";
|
|
28
|
-
import { UsrRulesService } from "./services";
|
|
29
28
|
// PulseClient is the main entry point of the client library.
|
|
30
29
|
// Create a single global instance of PulseClient in your application and use
|
|
31
30
|
// Factory methods to get service endpoints
|
|
32
31
|
export class PulseClient {
|
|
33
32
|
// Constructor
|
|
34
33
|
constructor(apiUrl, apiKey, accessToken) {
|
|
35
|
-
this.config = new PulseConfig();
|
|
36
|
-
this.config.api = apiUrl;
|
|
37
|
-
this.config.apiKey = apiKey;
|
|
38
34
|
// Set axios config
|
|
39
35
|
let axiosRequestConfiguration = {
|
|
40
36
|
baseURL: apiUrl,
|
|
@@ -49,30 +45,30 @@ export class PulseClient {
|
|
|
49
45
|
this.axiosInst = axios.create(axiosRequestConfiguration);
|
|
50
46
|
this.restSvc = new RestUtil(this.axiosInst);
|
|
51
47
|
// initialize services
|
|
52
|
-
this.
|
|
53
|
-
this.
|
|
54
|
-
this.
|
|
55
|
-
this.
|
|
56
|
-
this.
|
|
57
|
-
this.
|
|
58
|
-
this.
|
|
59
|
-
this.
|
|
60
|
-
this.
|
|
61
|
-
this.
|
|
62
|
-
this.
|
|
63
|
-
this.
|
|
64
|
-
this.
|
|
65
|
-
this.
|
|
66
|
-
this.
|
|
67
|
-
this.
|
|
68
|
-
this.
|
|
69
|
-
this.
|
|
70
|
-
this.
|
|
71
|
-
this.
|
|
72
|
-
this.
|
|
73
|
-
this.
|
|
74
|
-
this.
|
|
75
|
-
this.
|
|
76
|
-
this.
|
|
48
|
+
this.UsrAlertsService = new UsrAlertsService(apiUrl, this.restSvc);
|
|
49
|
+
this.UsrDevicesService = new UsrDevicesService(apiUrl, this.restSvc);
|
|
50
|
+
this.UsrEventsService = new UsrEventsService(apiUrl, this.restSvc);
|
|
51
|
+
this.UsrNetworkService = new UsrNetworkService(apiUrl, this.restSvc);
|
|
52
|
+
this.UsrReportsService = new UsrReportsService(apiUrl, this.restSvc);
|
|
53
|
+
this.UsrRulesService = new UsrRulesService(apiUrl, this.restSvc);
|
|
54
|
+
this.SupportStreamAnalyticsConfig = new SupportStreamAnalyticsConfig(apiUrl, this.restSvc);
|
|
55
|
+
this.SysAccountsService = new SysAccountsService(apiUrl, this.restSvc);
|
|
56
|
+
this.SysAuditLogService = new SysAuditLogService(apiUrl, this.restSvc);
|
|
57
|
+
this.SysCheckpointsService = new SysCheckpointsService(apiUrl, this.restSvc);
|
|
58
|
+
this.SysConfigService = new SysConfigService(apiUrl, this.restSvc);
|
|
59
|
+
this.SysFeaturesService = new SysFeaturesService(apiUrl, this.restSvc);
|
|
60
|
+
this.SysGroupsService = new SysGroupsService(apiUrl, this.restSvc);
|
|
61
|
+
this.SysInsightsService = new SysInsightsService(apiUrl, this.restSvc);
|
|
62
|
+
this.SysKeysService = new SysKeysService(apiUrl, this.restSvc);
|
|
63
|
+
this.SysMembersService = new SysMembersService(apiUrl, this.restSvc);
|
|
64
|
+
this.SysRuleTemplatesService = new SysRuleTemplatesService(apiUrl, this.restSvc);
|
|
65
|
+
this.SysRulesService = new SysRulesService(apiUrl, this.restSvc);
|
|
66
|
+
this.SysStatisticsService = new SysStatisticsService(apiUrl, this.restSvc);
|
|
67
|
+
this.SysStreamsService = new SysStreamsService(apiUrl, this.restSvc);
|
|
68
|
+
this.SysUsersService = new SysUsersService(apiUrl, this.restSvc);
|
|
69
|
+
this.UsrInsightsService = new UsrInsightsService(apiUrl, this.restSvc);
|
|
70
|
+
this.UsrIntegrationsService = new UsrIntegrationsService(apiUrl, this.restSvc);
|
|
71
|
+
this.UsrMembersService = new UsrMembersService(apiUrl, this.restSvc);
|
|
72
|
+
this.UsrUserService = new UsrUserService(apiUrl, this.restSvc);
|
|
77
73
|
}
|
|
78
74
|
}
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
4
4
|
export class SupportStreamAnalyticsConfig {
|
|
5
5
|
// Class constructor
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(apiUrl, rest) {
|
|
7
|
+
this.apiUrl = apiUrl;
|
|
8
8
|
this.rest = rest;
|
|
9
9
|
// URL to web api
|
|
10
10
|
this.baseUrl = '/support/stream-analytics-config';
|
|
11
|
-
this.baseUrl =
|
|
11
|
+
this.baseUrl = apiUrl + this.baseUrl;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Create new stream analytics configuration
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
4
4
|
export class SysAccountsService {
|
|
5
5
|
// Class constructor
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(apiUrl, rest) {
|
|
7
|
+
this.apiUrl = apiUrl;
|
|
8
8
|
this.rest = rest;
|
|
9
9
|
// URL to web api
|
|
10
10
|
this.baseUrl = '/sys/accounts';
|
|
11
|
-
this.baseUrl =
|
|
11
|
+
this.baseUrl = apiUrl + this.baseUrl;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Create new account
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
4
4
|
export class SysAuditLogService {
|
|
5
5
|
// Class constructor
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(apiUrl, rest) {
|
|
7
|
+
this.apiUrl = apiUrl;
|
|
8
8
|
this.rest = rest;
|
|
9
9
|
// URL to web api
|
|
10
10
|
this.baseUrl = '/sys/audit-log';
|
|
11
|
-
this.baseUrl =
|
|
11
|
+
this.baseUrl = apiUrl + this.baseUrl;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Get single log entry by id
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
4
4
|
export class SysCheckpointsService {
|
|
5
5
|
// Class constructor
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(apiUrl, rest) {
|
|
7
|
+
this.apiUrl = apiUrl;
|
|
8
8
|
this.rest = rest;
|
|
9
9
|
// URL to web api
|
|
10
10
|
this.baseUrl = '/sys/checkpoints';
|
|
11
|
-
this.baseUrl =
|
|
11
|
+
this.baseUrl = apiUrl + this.baseUrl;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Get a single checkpoint entry by id
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
4
4
|
export class SysConfigService {
|
|
5
5
|
// Class constructor
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(apiUrl, rest) {
|
|
7
|
+
this.apiUrl = apiUrl;
|
|
8
8
|
this.rest = rest;
|
|
9
9
|
// URL to web api
|
|
10
10
|
this.baseUrl = '/sys/config';
|
|
11
|
-
this.baseUrl =
|
|
11
|
+
this.baseUrl = apiUrl + this.baseUrl;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Create new configuration parameter
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
4
4
|
export class SysFeaturesService {
|
|
5
5
|
// Class constructor
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(apiUrl, rest) {
|
|
7
|
+
this.apiUrl = apiUrl;
|
|
8
8
|
this.rest = rest;
|
|
9
9
|
// URL to web api
|
|
10
10
|
this.baseUrl = '/sys/features';
|
|
11
|
-
this.baseUrl =
|
|
11
|
+
this.baseUrl = apiUrl + this.baseUrl;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Find list of feature
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
4
4
|
export class SysGroupsService {
|
|
5
5
|
// Class constructor
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(apiUrl, rest) {
|
|
7
|
+
this.apiUrl = apiUrl;
|
|
8
8
|
this.rest = rest;
|
|
9
9
|
// URL to web api
|
|
10
10
|
this.baseUrl = '/sys/groups';
|
|
11
|
-
this.baseUrl =
|
|
11
|
+
this.baseUrl = apiUrl + this.baseUrl;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Create new groups
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
4
4
|
export class SysInsightsService {
|
|
5
5
|
// Class constructor
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(apiUrl, rest) {
|
|
7
|
+
this.apiUrl = apiUrl;
|
|
8
8
|
this.rest = rest;
|
|
9
9
|
// URL to web api
|
|
10
10
|
this.baseUrl = '/sys/insights';
|
|
11
|
-
this.baseUrl =
|
|
11
|
+
this.baseUrl = apiUrl + this.baseUrl;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Create new insight query
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
4
4
|
export class SysKeysService {
|
|
5
5
|
// Class constructor
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(apiUrl, rest) {
|
|
7
|
+
this.apiUrl = apiUrl;
|
|
8
8
|
this.rest = rest;
|
|
9
9
|
// URL to web api
|
|
10
10
|
this.baseUrl = '/sys/keys';
|
|
11
|
-
this.baseUrl =
|
|
11
|
+
this.baseUrl = apiUrl + this.baseUrl;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Create new API key
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
4
4
|
export class SysMembersService {
|
|
5
5
|
// Class constructor
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(apiUrl, rest) {
|
|
7
|
+
this.apiUrl = apiUrl;
|
|
8
8
|
this.rest = rest;
|
|
9
9
|
// URL to web api
|
|
10
10
|
this.baseUrl = '/sys/members';
|
|
11
|
-
this.baseUrl =
|
|
11
|
+
this.baseUrl = apiUrl + this.baseUrl;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Create new member
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
4
4
|
export class SysRuleTemplatesService {
|
|
5
5
|
// Class constructor
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(apiUrl, rest) {
|
|
7
|
+
this.apiUrl = apiUrl;
|
|
8
8
|
this.rest = rest;
|
|
9
9
|
// URL to web api
|
|
10
10
|
this.baseUrl = '/sys/rule-templates';
|
|
11
|
-
this.baseUrl =
|
|
11
|
+
this.baseUrl = apiUrl + this.baseUrl;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Create new rule template
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
4
4
|
export class SysRulesService {
|
|
5
5
|
// Class constructor
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(apiUrl, rest) {
|
|
7
|
+
this.apiUrl = apiUrl;
|
|
8
8
|
this.rest = rest;
|
|
9
9
|
// URL to web api
|
|
10
10
|
this.baseUrl = '/sys/rules';
|
|
11
|
-
this.baseUrl =
|
|
11
|
+
this.baseUrl = apiUrl + this.baseUrl;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Create new rule
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
4
4
|
export class SysStatisticsService {
|
|
5
5
|
// Class constructor
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(apiUrl, rest) {
|
|
7
|
+
this.apiUrl = apiUrl;
|
|
8
8
|
this.rest = rest;
|
|
9
9
|
// URL to web api
|
|
10
10
|
this.baseUrl = '/sys/statistics';
|
|
11
|
-
this.baseUrl =
|
|
11
|
+
this.baseUrl = apiUrl + this.baseUrl;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Get accounts distribution by field
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
4
4
|
export class SysStreamsService {
|
|
5
5
|
// Class constructor
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(apiUrl, rest) {
|
|
7
|
+
this.apiUrl = apiUrl;
|
|
8
8
|
this.rest = rest;
|
|
9
9
|
// URL to web api
|
|
10
10
|
this.baseUrl = '/sys/streams';
|
|
11
|
-
this.baseUrl =
|
|
11
|
+
this.baseUrl = apiUrl + this.baseUrl;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Create new stream
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
4
4
|
export class SysUsersService {
|
|
5
5
|
// Class constructor
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(apiUrl, rest) {
|
|
7
|
+
this.apiUrl = apiUrl;
|
|
8
8
|
this.rest = rest;
|
|
9
9
|
// URL to web api
|
|
10
10
|
this.baseUrl = '/sys/users';
|
|
11
|
-
this.baseUrl =
|
|
11
|
+
this.baseUrl = apiUrl + this.baseUrl;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Create new user
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
4
4
|
export class UsrAlertsService {
|
|
5
5
|
// Class constructor
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(apiUrl, rest) {
|
|
7
|
+
this.apiUrl = apiUrl;
|
|
8
8
|
this.rest = rest;
|
|
9
9
|
// URL to web api
|
|
10
10
|
this.baseUrl = '/alerts';
|
|
11
|
-
this.baseUrl =
|
|
11
|
+
this.baseUrl = apiUrl + this.baseUrl;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Get single alert by id
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
4
4
|
export class UsrDevicesService {
|
|
5
5
|
// Class constructor
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(apiUrl, rest) {
|
|
7
|
+
this.apiUrl = apiUrl;
|
|
8
8
|
this.rest = rest;
|
|
9
9
|
// URL to web api
|
|
10
10
|
this.baseUrl = '/devices';
|
|
11
|
-
this.baseUrl =
|
|
11
|
+
this.baseUrl = apiUrl + this.baseUrl;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Create new device
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
4
4
|
export class UsrEventsService {
|
|
5
5
|
// Class constructor
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(apiUrl, rest) {
|
|
7
|
+
this.apiUrl = apiUrl;
|
|
8
8
|
this.rest = rest;
|
|
9
9
|
// URL to web api
|
|
10
10
|
this.baseUrl = '/events';
|
|
11
|
-
this.baseUrl =
|
|
11
|
+
this.baseUrl = apiUrl + this.baseUrl;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Get single event by id
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
4
4
|
export class UsrInsightsService {
|
|
5
5
|
// Class constructor
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(apiUrl, rest) {
|
|
7
|
+
this.apiUrl = apiUrl;
|
|
8
8
|
this.rest = rest;
|
|
9
9
|
// URL to web api
|
|
10
10
|
this.baseUrl = '/insights';
|
|
11
|
-
this.baseUrl =
|
|
11
|
+
this.baseUrl = apiUrl + this.baseUrl;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Find list of insights by day
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
4
4
|
export class UsrIntegrationsService {
|
|
5
5
|
// Class constructor
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(apiUrl, rest) {
|
|
7
|
+
this.apiUrl = apiUrl;
|
|
8
8
|
this.rest = rest;
|
|
9
9
|
// URL to web api
|
|
10
10
|
this.baseUrl = '/integrations';
|
|
11
|
-
this.baseUrl =
|
|
11
|
+
this.baseUrl = apiUrl + this.baseUrl;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Create new integration
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
4
4
|
export class UsrMembersService {
|
|
5
5
|
// Class constructor
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(apiUrl, rest) {
|
|
7
|
+
this.apiUrl = apiUrl;
|
|
8
8
|
this.rest = rest;
|
|
9
9
|
// URL to web api
|
|
10
10
|
this.baseUrl = '/members';
|
|
11
|
-
this.baseUrl =
|
|
11
|
+
this.baseUrl = apiUrl + this.baseUrl;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Create new member
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
4
4
|
export class UsrNetworkService {
|
|
5
5
|
// Class constructor
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(apiUrl, rest) {
|
|
7
|
+
this.apiUrl = apiUrl;
|
|
8
8
|
this.rest = rest;
|
|
9
9
|
// URL to web api
|
|
10
10
|
this.baseUrl = '/network';
|
|
11
|
-
this.baseUrl =
|
|
11
|
+
this.baseUrl = apiUrl + this.baseUrl;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Find list of usage records by query
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
4
4
|
export class UsrReportsService {
|
|
5
5
|
// Class constructor
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(apiUrl, rest) {
|
|
7
|
+
this.apiUrl = apiUrl;
|
|
8
8
|
this.rest = rest;
|
|
9
9
|
// URL to web api
|
|
10
10
|
this.baseUrl = '/reports';
|
|
11
|
-
this.baseUrl =
|
|
11
|
+
this.baseUrl = apiUrl + this.baseUrl;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Create new report
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
4
4
|
export class UsrRulesService {
|
|
5
5
|
// Class constructor
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(apiUrl, rest) {
|
|
7
|
+
this.apiUrl = apiUrl;
|
|
8
8
|
this.rest = rest;
|
|
9
9
|
// URL to web api
|
|
10
10
|
this.baseUrl = '/rules';
|
|
11
|
-
this.baseUrl =
|
|
11
|
+
this.baseUrl = apiUrl + this.baseUrl;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Create new rule
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
4
4
|
export class UsrUserService {
|
|
5
5
|
// Class constructor
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
6
|
+
constructor(apiUrl, rest) {
|
|
7
|
+
this.apiUrl = apiUrl;
|
|
8
8
|
this.rest = rest;
|
|
9
9
|
// URL to web api
|
|
10
10
|
this.baseUrl = '/user';
|
|
11
|
-
this.baseUrl =
|
|
11
|
+
this.baseUrl = apiUrl + this.baseUrl;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Authorize user, verify user exists in the system (user was already authenticated by OAuth provider)
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AccountTypeCode } from '../enums';
|
|
2
|
-
import { AccountStatusCode } from '../enums';
|
|
3
1
|
import { StringKeyValue } from '../common';
|
|
4
2
|
import { AccountSettings } from '../entities';
|
|
5
3
|
import { BaseEntity } from '../base';
|
|
4
|
+
import { AccountTypeCode } from '../enums';
|
|
5
|
+
import { AccountStatusCode } from '../enums';
|
|
6
6
|
export declare class Account extends BaseEntity {
|
|
7
7
|
name: string;
|
|
8
8
|
externalId: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { SeverityTypeCode } from '../enums';
|
|
2
1
|
import { EventStatusCode } from '../enums';
|
|
3
|
-
import {
|
|
4
|
-
import { TrafficDirectionCode } from '../enums';
|
|
2
|
+
import { EventCategoryCode } from '../enums';
|
|
5
3
|
import { BaseEntity } from '../base';
|
|
6
|
-
import {
|
|
4
|
+
import { SeverityTypeCode } from '../enums';
|
|
5
|
+
import { RuleTypeCode } from '../enums';
|
|
7
6
|
import { GeoData } from '../common';
|
|
8
7
|
import { StringKeyValue } from '../common';
|
|
9
|
-
import {
|
|
8
|
+
import { TrafficDirectionCode } from '../enums';
|
|
9
|
+
import { EventTypeCode } from '../enums';
|
|
10
10
|
export declare class Alert extends BaseEntity {
|
|
11
11
|
accountId: string;
|
|
12
12
|
streamId: string;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TrafficDirectionCode } from '../enums';
|
|
3
|
-
import { Device } from '../entities';
|
|
1
|
+
import { GeoData } from '../common';
|
|
4
2
|
import { StringKeyValue } from '../common';
|
|
5
|
-
import { EventCategoryCode } from '../enums';
|
|
6
|
-
import { BaseEntity } from '../base';
|
|
7
|
-
import { SeverityTypeCode } from '../enums';
|
|
8
3
|
import { EventStatusCode } from '../enums';
|
|
4
|
+
import { SeverityTypeCode } from '../enums';
|
|
9
5
|
import { RuleTypeCode } from '../enums';
|
|
10
|
-
import {
|
|
6
|
+
import { EventCategoryCode } from '../enums';
|
|
7
|
+
import { TrafficDirectionCode } from '../enums';
|
|
8
|
+
import { Device } from '../entities';
|
|
9
|
+
import { BaseEntity } from '../base';
|
|
10
|
+
import { EventTypeCode } from '../enums';
|
|
11
11
|
export declare class AlertWithDevice extends BaseEntity {
|
|
12
12
|
accountId: string;
|
|
13
13
|
streamId: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { SIM } from '../entities';
|
|
2
|
-
import { BaseEntity } from '../base';
|
|
3
1
|
import { DeviceTypeCode } from '../enums';
|
|
4
2
|
import { DeviceStatusCode } from '../enums';
|
|
5
3
|
import { StringKeyValue } from '../common';
|
|
6
4
|
import { DeviceActionCode } from '../enums';
|
|
5
|
+
import { SIM } from '../entities';
|
|
6
|
+
import { BaseEntity } from '../base';
|
|
7
7
|
export declare class Device extends BaseEntity {
|
|
8
8
|
accountId: string;
|
|
9
9
|
streamId: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { StringKeyValue } from '../common';
|
|
2
|
+
import { DeviceActionCode } from '../enums';
|
|
3
|
+
import { SIM } from '../entities';
|
|
1
4
|
import { Event } from '../entities';
|
|
2
5
|
import { BaseEntity } from '../base';
|
|
3
6
|
import { DeviceTypeCode } from '../enums';
|
|
4
7
|
import { DeviceStatusCode } from '../enums';
|
|
5
|
-
import { StringKeyValue } from '../common';
|
|
6
|
-
import { DeviceActionCode } from '../enums';
|
|
7
|
-
import { SIM } from '../entities';
|
|
8
8
|
export declare class DeviceWithEvents extends BaseEntity {
|
|
9
9
|
accountId: string;
|
|
10
10
|
streamId: string;
|