@shieldiot/pulse-lib 1.0.5 → 1.0.7
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/dist/index.d.ts +4 -2
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/common/SeverityIntervalTuple.d.ts +1 -1
- package/dist/lib/common/TimeSeriesOfFloat.d.ts +1 -1
- package/dist/lib/common/TokenData.d.ts +1 -1
- package/dist/lib/entities/Account.d.ts +1 -1
- package/dist/lib/entities/Account.js.map +1 -1
- package/dist/lib/entities/AccountDTO.d.ts +3 -3
- package/dist/lib/entities/AccountDTO.js.map +1 -1
- package/dist/lib/entities/AccountSettings.d.ts +1 -1
- package/dist/lib/entities/Alert.d.ts +4 -4
- package/dist/lib/entities/Alert.js.map +1 -1
- package/dist/lib/entities/AlertWithDevice.d.ts +4 -4
- package/dist/lib/entities/AlertWithDevice.js.map +1 -1
- package/dist/lib/entities/ApiKey.d.ts +1 -1
- package/dist/lib/entities/ApiKey.js.map +1 -1
- package/dist/lib/entities/DeviceWithEvents.d.ts +2 -2
- package/dist/lib/entities/DeviceWithEvents.js.map +1 -1
- package/dist/lib/entities/Event.d.ts +3 -3
- package/dist/lib/entities/Event.js.map +1 -1
- package/dist/lib/entities/EventWithDevice.d.ts +7 -7
- package/dist/lib/entities/EventWithDevice.js.map +1 -1
- package/dist/lib/entities/Feature.d.ts +1 -1
- package/dist/lib/entities/Feature.js.map +1 -1
- package/dist/lib/entities/Insight.d.ts +1 -1
- package/dist/lib/entities/Insight.js.map +1 -1
- package/dist/lib/entities/Integration.d.ts +2 -2
- package/dist/lib/entities/Integration.js.map +1 -1
- package/dist/lib/entities/Rule.d.ts +1 -1
- package/dist/lib/entities/Rule.js.map +1 -1
- package/dist/lib/entities/RuleTemplate.d.ts +1 -1
- package/dist/lib/entities/RuleTemplate.js.map +1 -1
- package/dist/lib/entities/StreamAnalyticsConfig.d.ts +2 -2
- package/dist/lib/entities/StreamAnalyticsConfig.js.map +1 -1
- package/dist/lib/entities/StreamConfig.d.ts +2 -2
- package/dist/lib/services/sysAccountsService.d.ts +2 -2
- package/dist/lib/services/sysFeaturesService.d.ts +1 -1
- package/dist/lib/services/sysRulesService.d.ts +1 -1
- package/dist/lib/services/sysUsersService.d.ts +2 -2
- package/dist/lib/services/usrAlertsService.d.ts +9 -9
- package/dist/lib/services/usrDevicesService.d.ts +7 -7
- package/dist/lib/services/usrEventsService.d.ts +8 -8
- package/dist/lib/services/usrRulesService.d.ts +1 -1
- package/dist/lib/services/usrUserService.d.ts +1 -1
- package/package.json +1 -1
- package/src/index.ts +4 -3
- package/dist/public-api.d.ts +0 -3
- package/dist/public-api.js +0 -7
- package/dist/public-api.js.map +0 -1
- package/src/config.d.ts +0 -6
- package/src/config.d.ts.map +0 -1
- package/src/config.js +0 -6
- package/src/config.js.map +0 -1
- package/src/index.d.ts +0 -3
- package/src/index.d.ts.map +0 -1
- package/src/index.js +0 -3
- package/src/index.js.map +0 -1
- package/src/lib/common/AccountRole.ts +0 -25
- package/src/lib/common/ConsumptionData.ts +0 -24
- package/src/lib/common/ConsumptionTimeDataPoint.ts +0 -21
- package/src/lib/common/DeviceConfig.ts +0 -22
- package/src/lib/common/DeviceScoreConfig.ts +0 -24
- package/src/lib/common/DevicesAtRiskConfig.ts +0 -16
- package/src/lib/common/EventSeverityConfig.ts +0 -17
- package/src/lib/common/FloatKeyValue.ts +0 -20
- package/src/lib/common/GeoData.ts +0 -38
- package/src/lib/common/GraphSeries.ts +0 -21
- package/src/lib/common/Indicator.ts +0 -32
- package/src/lib/common/IntKeySeriesDataValue.ts +0 -21
- package/src/lib/common/IntKeyValue.ts +0 -20
- package/src/lib/common/Interval.ts +0 -20
- package/src/lib/common/Link.ts +0 -41
- package/src/lib/common/Location.ts +0 -20
- package/src/lib/common/LoginParams.ts +0 -24
- package/src/lib/common/MaliciousIPCard.ts +0 -45
- package/src/lib/common/MaliciousIPData.ts +0 -28
- package/src/lib/common/NetworkMap.ts +0 -22
- package/src/lib/common/Node.ts +0 -54
- package/src/lib/common/SeriesData.ts +0 -22
- package/src/lib/common/SessionTransform.ts +0 -29
- package/src/lib/common/SeverityIntervalTuple.ts +0 -22
- package/src/lib/common/ShieldexConfig.ts +0 -36
- package/src/lib/common/StringIntValue.ts +0 -20
- package/src/lib/common/StringKeyIntValue.ts +0 -20
- package/src/lib/common/StringKeyValue.ts +0 -20
- package/src/lib/common/Thresholds.ts +0 -16
- package/src/lib/common/TimeDataPoint.ts +0 -20
- package/src/lib/common/TimeDataPoint2D.ts +0 -21
- package/src/lib/common/TimeDataPointFloat.ts +0 -20
- package/src/lib/common/TimeFrame.ts +0 -20
- package/src/lib/common/TimeSeries.ts +0 -26
- package/src/lib/common/TimeSeriesOf2D.ts +0 -26
- package/src/lib/common/TimeSeriesOfDataConsumption.ts +0 -26
- package/src/lib/common/TimeSeriesOfFloat.ts +0 -26
- package/src/lib/common/TokenData.ts +0 -39
- package/src/lib/common/Tuple.ts +0 -20
- package/src/lib/common/UsageTransform.ts +0 -37
- package/src/lib/common/ZScore.ts +0 -20
- package/src/lib/common/index.ts +0 -41
- package/src/lib/entities/Account.ts +0 -45
- package/src/lib/entities/AccountDTO.ts +0 -49
- package/src/lib/entities/AccountSettings.ts +0 -31
- package/src/lib/entities/Action.ts +0 -30
- package/src/lib/entities/Alert.ts +0 -91
- package/src/lib/entities/AlertWithDevice.ts +0 -92
- package/src/lib/entities/ApiKey.ts +0 -33
- package/src/lib/entities/AuditLog.ts +0 -39
- package/src/lib/entities/BaseEntity.ts +0 -24
- package/src/lib/entities/BulkDevices.ts +0 -17
- package/src/lib/entities/Checkpoint.ts +0 -71
- package/src/lib/entities/ComplianceReportSettings.ts +0 -28
- package/src/lib/entities/Condition.ts +0 -28
- package/src/lib/entities/ConfigParam.ts +0 -15
- package/src/lib/entities/DNSRecord.ts +0 -40
- package/src/lib/entities/DataIngestion.ts +0 -63
- package/src/lib/entities/DataPointOfDeviceReport.ts +0 -21
- package/src/lib/entities/Device.ts +0 -82
- package/src/lib/entities/DeviceReport.ts +0 -29
- package/src/lib/entities/DeviceWithEvents.ts +0 -86
- package/src/lib/entities/Distribution.ts +0 -25
- package/src/lib/entities/Event.ts +0 -98
- package/src/lib/entities/EventOccurrence.ts +0 -34
- package/src/lib/entities/EventWithDevice.ts +0 -97
- package/src/lib/entities/Feature.ts +0 -18
- package/src/lib/entities/FeaturesGroup.ts +0 -18
- package/src/lib/entities/Group.ts +0 -24
- package/src/lib/entities/Image.ts +0 -18
- package/src/lib/entities/Insight.ts +0 -49
- package/src/lib/entities/InsightQuery.ts +0 -29
- package/src/lib/entities/InsightSpec.ts +0 -28
- package/src/lib/entities/IntDistribution.ts +0 -25
- package/src/lib/entities/Integration.ts +0 -81
- package/src/lib/entities/Member.ts +0 -22
- package/src/lib/entities/Radius.ts +0 -45
- package/src/lib/entities/Report.ts +0 -37
- package/src/lib/entities/Rule.ts +0 -65
- package/src/lib/entities/RuleTemplate.ts +0 -38
- package/src/lib/entities/SIM.ts +0 -32
- package/src/lib/entities/ServiceStatus.ts +0 -26
- package/src/lib/entities/SessionRecord.ts +0 -71
- package/src/lib/entities/Shieldex.ts +0 -23
- package/src/lib/entities/Stream.ts +0 -31
- package/src/lib/entities/StreamAnalyticsConfig.ts +0 -30
- package/src/lib/entities/StreamConfig.ts +0 -52
- package/src/lib/entities/TeaserPopUpSettings.ts +0 -24
- package/src/lib/entities/TimeSeriesOfDeviceReport.ts +0 -26
- package/src/lib/entities/UsageRecord.ts +0 -101
- package/src/lib/entities/User.ts +0 -45
- package/src/lib/entities/UserMembership.ts +0 -38
- package/src/lib/entities/UserMemberships.ts +0 -38
- package/src/lib/entities/index.ts +0 -51
- package/src/lib/enums/AccountStatusCode.ts +0 -35
- package/src/lib/enums/AccountTypeCode.ts +0 -40
- package/src/lib/enums/DataSourceCode.ts +0 -35
- package/src/lib/enums/DeviceActionCode.ts +0 -40
- package/src/lib/enums/DeviceCreationCode.ts +0 -40
- package/src/lib/enums/DeviceIdentityCode.ts +0 -55
- package/src/lib/enums/DeviceStatusCode.ts +0 -40
- package/src/lib/enums/DeviceTypeCode.ts +0 -90
- package/src/lib/enums/DirectionContextCode.ts +0 -40
- package/src/lib/enums/EventCategoryCode.ts +0 -30
- package/src/lib/enums/EventStatusCode.ts +0 -40
- package/src/lib/enums/EventTypeCode.ts +0 -115
- package/src/lib/enums/FeatureCode.ts +0 -70
- package/src/lib/enums/HomePageViewCode.ts +0 -35
- package/src/lib/enums/HttpMethodCode.ts +0 -45
- package/src/lib/enums/InsightStatusCode.ts +0 -35
- package/src/lib/enums/InsightTypeCode.ts +0 -30
- package/src/lib/enums/IntegrationTriggerCode.ts +0 -30
- package/src/lib/enums/IntegrationTypeCode.ts +0 -40
- package/src/lib/enums/MemberRoleCode.ts +0 -40
- package/src/lib/enums/NetworkMapTypeCode.ts +0 -35
- package/src/lib/enums/OperatorCode.ts +0 -75
- package/src/lib/enums/PermissionCode.ts +0 -45
- package/src/lib/enums/ReportTypeCode.ts +0 -35
- package/src/lib/enums/RuleTypeCode.ts +0 -35
- package/src/lib/enums/SeverityTypeCode.ts +0 -40
- package/src/lib/enums/TrafficDirectionCode.ts +0 -35
- package/src/lib/enums/UserStatusCode.ts +0 -40
- package/src/lib/enums/UserTypeCode.ts +0 -40
- package/src/lib/enums/index.ts +0 -29
- package/src/lib/index.ts +0 -4
- package/src/lib/pulse-client.ts +0 -190
- package/src/lib/services/index.ts +0 -26
- package/src/lib/services/services.export.ts +0 -54
- package/src/lib/services/supportStreamAnalyticsConfig.ts +0 -63
- package/src/lib/services/sysAccountsService.ts +0 -90
- package/src/lib/services/sysAuditLogService.ts +0 -72
- package/src/lib/services/sysCheckpointsService.ts +0 -62
- package/src/lib/services/sysConfigService.ts +0 -63
- package/src/lib/services/sysFeaturesService.ts +0 -77
- package/src/lib/services/sysGroupsService.ts +0 -85
- package/src/lib/services/sysInsightsService.ts +0 -122
- package/src/lib/services/sysKeysService.ts +0 -71
- package/src/lib/services/sysMembersService.ts +0 -66
- package/src/lib/services/sysRuleTemplatesService.ts +0 -63
- package/src/lib/services/sysRulesService.ts +0 -79
- package/src/lib/services/sysStatisticsService.ts +0 -50
- package/src/lib/services/sysStreamsService.ts +0 -64
- package/src/lib/services/sysUsersService.ts +0 -89
- package/src/lib/services/usrAlertsService.ts +0 -382
- package/src/lib/services/usrDevicesService.ts +0 -303
- package/src/lib/services/usrEventsService.ts +0 -355
- package/src/lib/services/usrInsightsService.ts +0 -29
- package/src/lib/services/usrIntegrationsService.ts +0 -79
- package/src/lib/services/usrMembersService.ts +0 -77
- package/src/lib/services/usrNetworkService.ts +0 -59
- package/src/lib/services/usrReportsService.ts +0 -114
- package/src/lib/services/usrRulesService.ts +0 -78
- package/src/lib/services/usrUserService.ts +0 -114
- package/src/public-api.d.ts +0 -4
- package/src/public-api.d.ts.map +0 -1
- package/src/public-api.js +0 -7
- package/src/public-api.js.map +0 -1
- package/src/public-api.ts +0 -9
- package/src/utils/ActionResponse.d.ts +0 -6
- package/src/utils/ActionResponse.d.ts.map +0 -1
- package/src/utils/ActionResponse.js +0 -9
- package/src/utils/ActionResponse.js.map +0 -1
- package/src/utils/BaseRestResponse.d.ts +0 -5
- package/src/utils/BaseRestResponse.d.ts.map +0 -1
- package/src/utils/BaseRestResponse.js +0 -8
- package/src/utils/BaseRestResponse.js.map +0 -1
- package/src/utils/EntitiesResponse.d.ts +0 -9
- package/src/utils/EntitiesResponse.d.ts.map +0 -1
- package/src/utils/EntitiesResponse.js +0 -15
- package/src/utils/EntitiesResponse.js.map +0 -1
- package/src/utils/EntityResponse.d.ts +0 -9
- package/src/utils/EntityResponse.d.ts.map +0 -1
- package/src/utils/EntityResponse.js +0 -15
- package/src/utils/EntityResponse.js.map +0 -1
- package/src/utils/index.d.ts +0 -6
- package/src/utils/index.d.ts.map +0 -1
- package/src/utils/index.js +0 -6
- package/src/utils/index.js.map +0 -1
- package/src/utils/rest-axios-setup.d.ts +0 -4
- package/src/utils/rest-axios-setup.d.ts.map +0 -1
- package/src/utils/rest-axios-setup.js +0 -8
- package/src/utils/rest-axios-setup.js.map +0 -1
- package/src/utils/rest-util.d.ts +0 -16
- package/src/utils/rest-util.d.ts.map +0 -1
- package/src/utils/rest-util.js +0 -101
- package/src/utils/rest-util.js.map +0 -1
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// Severity type (level) code
|
|
3
|
-
export enum SeverityTypeCode {
|
|
4
|
-
|
|
5
|
-
// Undefined [0]
|
|
6
|
-
UNDEFINED = 0,
|
|
7
|
-
|
|
8
|
-
// Low severity [1]
|
|
9
|
-
LOW = 1,
|
|
10
|
-
|
|
11
|
-
// Medium severity [2]
|
|
12
|
-
MEDIUM = 2,
|
|
13
|
-
|
|
14
|
-
// High severity [3]
|
|
15
|
-
HIGH = 3,
|
|
16
|
-
|
|
17
|
-
// Critical severity [4]
|
|
18
|
-
CRITICAL = 4,
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// Return list of SeverityTypeCode values and their display names
|
|
23
|
-
export function GetSeverityTypeCodes() : Map<SeverityTypeCode, string> {
|
|
24
|
-
|
|
25
|
-
let result = new Map<SeverityTypeCode, string>();
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
result.set(SeverityTypeCode.UNDEFINED, 'Undefined');
|
|
29
|
-
|
|
30
|
-
result.set(SeverityTypeCode.LOW, 'Low');
|
|
31
|
-
|
|
32
|
-
result.set(SeverityTypeCode.MEDIUM, 'Medium');
|
|
33
|
-
|
|
34
|
-
result.set(SeverityTypeCode.HIGH, 'High');
|
|
35
|
-
|
|
36
|
-
result.set(SeverityTypeCode.CRITICAL, 'Critical');
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return result;
|
|
40
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// Account type code
|
|
3
|
-
export enum TrafficDirectionCode {
|
|
4
|
-
|
|
5
|
-
// Undefined [0]
|
|
6
|
-
UNDEFINED = 0,
|
|
7
|
-
|
|
8
|
-
// Denotes inbound network traffic [1]
|
|
9
|
-
INBOUND = 1,
|
|
10
|
-
|
|
11
|
-
// Denotes outbound network traffic [2]
|
|
12
|
-
OUTBOUND = 2,
|
|
13
|
-
|
|
14
|
-
// Denotes bidirectional network traffic [3]
|
|
15
|
-
INOUT = 3,
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// Return list of TrafficDirectionCode values and their display names
|
|
20
|
-
export function GetTrafficDirectionCodes() : Map<TrafficDirectionCode, string> {
|
|
21
|
-
|
|
22
|
-
let result = new Map<TrafficDirectionCode, string>();
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
result.set(TrafficDirectionCode.UNDEFINED, 'Undefined');
|
|
26
|
-
|
|
27
|
-
result.set(TrafficDirectionCode.INBOUND, 'Inbound');
|
|
28
|
-
|
|
29
|
-
result.set(TrafficDirectionCode.OUTBOUND, 'Outbound');
|
|
30
|
-
|
|
31
|
-
result.set(TrafficDirectionCode.INOUT, 'Inout');
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return result;
|
|
35
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// User status code
|
|
3
|
-
export enum UserStatusCode {
|
|
4
|
-
|
|
5
|
-
// Undefined [0]
|
|
6
|
-
UNDEFINED = 0,
|
|
7
|
-
|
|
8
|
-
// User is registered and pending verification [1]
|
|
9
|
-
PENDING = 1,
|
|
10
|
-
|
|
11
|
-
// Active user in the system [2]
|
|
12
|
-
ACTIVE = 2,
|
|
13
|
-
|
|
14
|
-
// Blocked user (only account system can unblock the user) [4]
|
|
15
|
-
BLOCKED = 3,
|
|
16
|
-
|
|
17
|
-
// Suspended user (about to be deleted) [8]
|
|
18
|
-
SUSPENDED = 4,
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// Return list of UserStatusCode values and their display names
|
|
23
|
-
export function GetUserStatusCodes() : Map<UserStatusCode, string> {
|
|
24
|
-
|
|
25
|
-
let result = new Map<UserStatusCode, string>();
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
result.set(UserStatusCode.UNDEFINED, 'Undefined');
|
|
29
|
-
|
|
30
|
-
result.set(UserStatusCode.PENDING, 'Pending');
|
|
31
|
-
|
|
32
|
-
result.set(UserStatusCode.ACTIVE, 'Active');
|
|
33
|
-
|
|
34
|
-
result.set(UserStatusCode.BLOCKED, 'Blocked');
|
|
35
|
-
|
|
36
|
-
result.set(UserStatusCode.SUSPENDED, 'Suspended');
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return result;
|
|
40
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// User type code
|
|
3
|
-
export enum UserTypeCode {
|
|
4
|
-
|
|
5
|
-
// Undefined [0]
|
|
6
|
-
UNDEFINED = 0,
|
|
7
|
-
|
|
8
|
-
// System administrator has access to all accounts and permissions to perform all actions [1]
|
|
9
|
-
SYSADMIN = 1,
|
|
10
|
-
|
|
11
|
-
// Support user has view permissions only for all accounts that enabled option Enable Support [2]
|
|
12
|
-
SUPPORT = 2,
|
|
13
|
-
|
|
14
|
-
// Account user - has access to specific accounts with role based access control [3]
|
|
15
|
-
USER = 3,
|
|
16
|
-
|
|
17
|
-
// Account service - to be used by other systems to perform actions using the API (can't login as a user to the portal)' [4]`
|
|
18
|
-
SERVICE = 4,
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// Return list of UserTypeCode values and their display names
|
|
23
|
-
export function GetUserTypeCodes() : Map<UserTypeCode, string> {
|
|
24
|
-
|
|
25
|
-
let result = new Map<UserTypeCode, string>();
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
result.set(UserTypeCode.UNDEFINED, 'Undefined');
|
|
29
|
-
|
|
30
|
-
result.set(UserTypeCode.SYSADMIN, 'Sysadmin');
|
|
31
|
-
|
|
32
|
-
result.set(UserTypeCode.SUPPORT, 'Support');
|
|
33
|
-
|
|
34
|
-
result.set(UserTypeCode.USER, 'User');
|
|
35
|
-
|
|
36
|
-
result.set(UserTypeCode.SERVICE, 'Service');
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return result;
|
|
40
|
-
}
|
package/src/lib/enums/index.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export * from './AccountStatusCode';
|
|
2
|
-
export * from './AccountTypeCode';
|
|
3
|
-
export * from './DataSourceCode';
|
|
4
|
-
export * from './DeviceActionCode';
|
|
5
|
-
export * from './DeviceCreationCode';
|
|
6
|
-
export * from './DeviceIdentityCode';
|
|
7
|
-
export * from './DeviceStatusCode';
|
|
8
|
-
export * from './DeviceTypeCode';
|
|
9
|
-
export * from './DirectionContextCode';
|
|
10
|
-
export * from './EventCategoryCode';
|
|
11
|
-
export * from './EventStatusCode';
|
|
12
|
-
export * from './EventTypeCode';
|
|
13
|
-
export * from './FeatureCode';
|
|
14
|
-
export * from './HomePageViewCode';
|
|
15
|
-
export * from './HttpMethodCode';
|
|
16
|
-
export * from './InsightStatusCode';
|
|
17
|
-
export * from './InsightTypeCode';
|
|
18
|
-
export * from './IntegrationTriggerCode';
|
|
19
|
-
export * from './IntegrationTypeCode';
|
|
20
|
-
export * from './MemberRoleCode';
|
|
21
|
-
export * from './NetworkMapTypeCode';
|
|
22
|
-
export * from './OperatorCode';
|
|
23
|
-
export * from './PermissionCode';
|
|
24
|
-
export * from './ReportTypeCode';
|
|
25
|
-
export * from './RuleTypeCode';
|
|
26
|
-
export * from './SeverityTypeCode';
|
|
27
|
-
export * from './TrafficDirectionCode';
|
|
28
|
-
export * from './UserStatusCode';
|
|
29
|
-
export * from './UserTypeCode';
|
package/src/lib/index.ts
DELETED
package/src/lib/pulse-client.ts
DELETED
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import axios, { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
2
|
-
import { PulseConfig } from "../config";
|
|
3
|
-
import { RestUtil } from "../utils";
|
|
4
|
-
|
|
5
|
-
import { SupportStreamAnalyticsConfig } from "./services";
|
|
6
|
-
import { SysAccountsService } from "./services";
|
|
7
|
-
import { SysAuditLogService } from "./services";
|
|
8
|
-
import { SysCheckpointsService } from "./services";
|
|
9
|
-
import { SysConfigService } from "./services";
|
|
10
|
-
import { SysFeaturesService } from "./services";
|
|
11
|
-
import { SysGroupsService } from "./services";
|
|
12
|
-
import { SysInsightsService } from "./services";
|
|
13
|
-
import { SysKeysService } from "./services";
|
|
14
|
-
import { SysMembersService } from "./services";
|
|
15
|
-
import { SysRuleTemplatesService } from "./services";
|
|
16
|
-
import { SysRulesService } from "./services";
|
|
17
|
-
import { SysStatisticsService } from "./services";
|
|
18
|
-
import { SysStreamsService } from "./services";
|
|
19
|
-
import { SysUsersService } from "./services";
|
|
20
|
-
import { UsrInsightsService } from "./services";
|
|
21
|
-
import { UsrIntegrationsService } from "./services";
|
|
22
|
-
import { UsrMembersService } from "./services";
|
|
23
|
-
import { UsrUserService } from "./services";
|
|
24
|
-
import { UsrAlertsService } from "./services";
|
|
25
|
-
import { UsrDevicesService } from "./services";
|
|
26
|
-
import { UsrEventsService } from "./services";
|
|
27
|
-
import { UsrNetworkService } from "./services";
|
|
28
|
-
import { UsrReportsService } from "./services";
|
|
29
|
-
import { UsrRulesService } from "./services";
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
// PulseClient is the main entry point of the client library.
|
|
33
|
-
// Create a single global instance of PulseClient in your application and use
|
|
34
|
-
// Factory methods to get service endpoints
|
|
35
|
-
export class PulseClient {
|
|
36
|
-
|
|
37
|
-
config: PulseConfig;
|
|
38
|
-
restSvc: RestUtil;
|
|
39
|
-
axiosInst: AxiosInstance;
|
|
40
|
-
|
|
41
|
-
// Constructor
|
|
42
|
-
constructor(apiUrl: string, apiKey: string, accessToken: string) {
|
|
43
|
-
this.config = new PulseConfig();
|
|
44
|
-
this.config.api = apiUrl;
|
|
45
|
-
this.config.apiKey = apiKey;
|
|
46
|
-
|
|
47
|
-
// Set axios config
|
|
48
|
-
let axiosRequestConfiguration: AxiosRequestConfig = {
|
|
49
|
-
baseURL: apiUrl,
|
|
50
|
-
responseType: 'json',
|
|
51
|
-
headers: {
|
|
52
|
-
'Content-Type': 'application/json',
|
|
53
|
-
'X-API-KEY': apiKey,
|
|
54
|
-
'X-ACCESS-TOKEN': accessToken,
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
// Set axios instance
|
|
58
|
-
this.axiosInst = axios.create(axiosRequestConfiguration);
|
|
59
|
-
this.restSvc = new RestUtil(this.axiosInst);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
// Factory method for SupportStreamAnalyticsConfig
|
|
65
|
-
public SupportStreamAnalyticsConfig(): SupportStreamAnalyticsConfig {
|
|
66
|
-
return new SupportStreamAnalyticsConfig(this.config, this.restSvc);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// Factory method for SysAccountsService
|
|
70
|
-
public SysAccountsService(): SysAccountsService {
|
|
71
|
-
return new SysAccountsService(this.config, this.restSvc);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// Factory method for SysAuditLogService
|
|
75
|
-
public SysAuditLogService(): SysAuditLogService {
|
|
76
|
-
return new SysAuditLogService(this.config, this.restSvc);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// Factory method for SysCheckpointsService
|
|
80
|
-
public SysCheckpointsService(): SysCheckpointsService {
|
|
81
|
-
return new SysCheckpointsService(this.config, this.restSvc);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
// Factory method for SysConfigService
|
|
85
|
-
public SysConfigService(): SysConfigService {
|
|
86
|
-
return new SysConfigService(this.config, this.restSvc);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// Factory method for SysFeaturesService
|
|
90
|
-
public SysFeaturesService(): SysFeaturesService {
|
|
91
|
-
return new SysFeaturesService(this.config, this.restSvc);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// Factory method for SysGroupsService
|
|
95
|
-
public SysGroupsService(): SysGroupsService {
|
|
96
|
-
return new SysGroupsService(this.config, this.restSvc);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// Factory method for SysInsightsService
|
|
100
|
-
public SysInsightsService(): SysInsightsService {
|
|
101
|
-
return new SysInsightsService(this.config, this.restSvc);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
// Factory method for SysKeysService
|
|
105
|
-
public SysKeysService(): SysKeysService {
|
|
106
|
-
return new SysKeysService(this.config, this.restSvc);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// Factory method for SysMembersService
|
|
110
|
-
public SysMembersService(): SysMembersService {
|
|
111
|
-
return new SysMembersService(this.config, this.restSvc);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
// Factory method for SysRuleTemplatesService
|
|
115
|
-
public SysRuleTemplatesService(): SysRuleTemplatesService {
|
|
116
|
-
return new SysRuleTemplatesService(this.config, this.restSvc);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
// Factory method for SysRulesService
|
|
120
|
-
public SysRulesService(): SysRulesService {
|
|
121
|
-
return new SysRulesService(this.config, this.restSvc);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
// Factory method for SysStatisticsService
|
|
125
|
-
public SysStatisticsService(): SysStatisticsService {
|
|
126
|
-
return new SysStatisticsService(this.config, this.restSvc);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// Factory method for SysStreamsService
|
|
130
|
-
public SysStreamsService(): SysStreamsService {
|
|
131
|
-
return new SysStreamsService(this.config, this.restSvc);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// Factory method for SysUsersService
|
|
135
|
-
public SysUsersService(): SysUsersService {
|
|
136
|
-
return new SysUsersService(this.config, this.restSvc);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
// Factory method for UsrInsightsService
|
|
140
|
-
public UsrInsightsService(): UsrInsightsService {
|
|
141
|
-
return new UsrInsightsService(this.config, this.restSvc);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
// Factory method for UsrIntegrationsService
|
|
145
|
-
public UsrIntegrationsService(): UsrIntegrationsService {
|
|
146
|
-
return new UsrIntegrationsService(this.config, this.restSvc);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
// Factory method for UsrMembersService
|
|
150
|
-
public UsrMembersService(): UsrMembersService {
|
|
151
|
-
return new UsrMembersService(this.config, this.restSvc);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
// Factory method for UsrUserService
|
|
155
|
-
public UsrUserService(): UsrUserService {
|
|
156
|
-
return new UsrUserService(this.config, this.restSvc);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// Factory method for UsrAlertsService
|
|
160
|
-
public UsrAlertsService(): UsrAlertsService {
|
|
161
|
-
return new UsrAlertsService(this.config, this.restSvc);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
// Factory method for UsrDevicesService
|
|
165
|
-
public UsrDevicesService(): UsrDevicesService {
|
|
166
|
-
return new UsrDevicesService(this.config, this.restSvc);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
// Factory method for UsrEventsService
|
|
170
|
-
public UsrEventsService(): UsrEventsService {
|
|
171
|
-
return new UsrEventsService(this.config, this.restSvc);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
// Factory method for UsrNetworkService
|
|
175
|
-
public UsrNetworkService(): UsrNetworkService {
|
|
176
|
-
return new UsrNetworkService(this.config, this.restSvc);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
// Factory method for UsrReportsService
|
|
180
|
-
public UsrReportsService(): UsrReportsService {
|
|
181
|
-
return new UsrReportsService(this.config, this.restSvc);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
// Factory method for UsrRulesService
|
|
185
|
-
public UsrRulesService(): UsrRulesService {
|
|
186
|
-
return new UsrRulesService(this.config, this.restSvc);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export * from './services.export';
|
|
2
|
-
export * from './supportStreamAnalyticsConfig';
|
|
3
|
-
export * from './sysAccountsService';
|
|
4
|
-
export * from './sysAuditLogService';
|
|
5
|
-
export * from './sysCheckpointsService';
|
|
6
|
-
export * from './sysConfigService';
|
|
7
|
-
export * from './sysFeaturesService';
|
|
8
|
-
export * from './sysGroupsService';
|
|
9
|
-
export * from './sysInsightsService';
|
|
10
|
-
export * from './sysKeysService';
|
|
11
|
-
export * from './sysMembersService';
|
|
12
|
-
export * from './sysRuleTemplatesService';
|
|
13
|
-
export * from './sysRulesService';
|
|
14
|
-
export * from './sysStatisticsService';
|
|
15
|
-
export * from './sysStreamsService';
|
|
16
|
-
export * from './sysUsersService';
|
|
17
|
-
export * from './usrAlertsService';
|
|
18
|
-
export * from './usrDevicesService';
|
|
19
|
-
export * from './usrEventsService';
|
|
20
|
-
export * from './usrInsightsService';
|
|
21
|
-
export * from './usrIntegrationsService';
|
|
22
|
-
export * from './usrMembersService';
|
|
23
|
-
export * from './usrNetworkService';
|
|
24
|
-
export * from './usrReportsService';
|
|
25
|
-
export * from './usrRulesService';
|
|
26
|
-
export * from './usrUserService';
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { SupportStreamAnalyticsConfig } from './supportStreamAnalyticsConfig';
|
|
2
|
-
import { SysAccountsService } from './sysAccountsService';
|
|
3
|
-
import { SysAuditLogService } from './sysAuditLogService';
|
|
4
|
-
import { SysCheckpointsService } from './sysCheckpointsService';
|
|
5
|
-
import { SysConfigService } from './sysConfigService';
|
|
6
|
-
import { SysFeaturesService } from './sysFeaturesService';
|
|
7
|
-
import { SysGroupsService } from './sysGroupsService';
|
|
8
|
-
import { SysInsightsService } from './sysInsightsService';
|
|
9
|
-
import { SysKeysService } from './sysKeysService';
|
|
10
|
-
import { SysMembersService } from './sysMembersService';
|
|
11
|
-
import { SysRuleTemplatesService } from './sysRuleTemplatesService';
|
|
12
|
-
import { SysRulesService } from './sysRulesService';
|
|
13
|
-
import { SysStatisticsService } from './sysStatisticsService';
|
|
14
|
-
import { SysStreamsService } from './sysStreamsService';
|
|
15
|
-
import { SysUsersService } from './sysUsersService';
|
|
16
|
-
import { UsrInsightsService } from './usrInsightsService';
|
|
17
|
-
import { UsrIntegrationsService } from './usrIntegrationsService';
|
|
18
|
-
import { UsrMembersService } from './usrMembersService';
|
|
19
|
-
import { UsrUserService } from './usrUserService';
|
|
20
|
-
import { UsrAlertsService } from './usrAlertsService';
|
|
21
|
-
import { UsrDevicesService } from './usrDevicesService';
|
|
22
|
-
import { UsrEventsService } from './usrEventsService';
|
|
23
|
-
import { UsrNetworkService } from './usrNetworkService';
|
|
24
|
-
import { UsrReportsService } from './usrReportsService';
|
|
25
|
-
import { UsrRulesService } from './usrRulesService';
|
|
26
|
-
|
|
27
|
-
export const Services = [
|
|
28
|
-
SupportStreamAnalyticsConfig,
|
|
29
|
-
SysAccountsService,
|
|
30
|
-
SysAuditLogService,
|
|
31
|
-
SysCheckpointsService,
|
|
32
|
-
SysConfigService,
|
|
33
|
-
SysFeaturesService,
|
|
34
|
-
SysGroupsService,
|
|
35
|
-
SysInsightsService,
|
|
36
|
-
SysKeysService,
|
|
37
|
-
SysMembersService,
|
|
38
|
-
SysRuleTemplatesService,
|
|
39
|
-
SysRulesService,
|
|
40
|
-
SysStatisticsService,
|
|
41
|
-
SysStreamsService,
|
|
42
|
-
SysUsersService,
|
|
43
|
-
UsrInsightsService,
|
|
44
|
-
UsrIntegrationsService,
|
|
45
|
-
UsrMembersService,
|
|
46
|
-
UsrUserService,
|
|
47
|
-
UsrAlertsService,
|
|
48
|
-
UsrDevicesService,
|
|
49
|
-
UsrEventsService,
|
|
50
|
-
UsrNetworkService,
|
|
51
|
-
UsrReportsService,
|
|
52
|
-
UsrRulesService,
|
|
53
|
-
|
|
54
|
-
]
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { RestUtil, EntityResponse, EntitiesResponse, ActionResponse } from '../../utils';
|
|
2
|
-
import { PulseConfig } from '../../config';
|
|
3
|
-
|
|
4
|
-
import { StreamAnalyticsConfig } from '../entities';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
// List of AI support related actions for system support only
|
|
9
|
-
// @RequestHeader X-API-KEY The key to identify the application (console)
|
|
10
|
-
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
11
|
-
export class SupportStreamAnalyticsConfig {
|
|
12
|
-
|
|
13
|
-
// URL to web api
|
|
14
|
-
private baseUrl = '/support/stream-analytics-config';
|
|
15
|
-
|
|
16
|
-
// Class constructor
|
|
17
|
-
constructor(private config: PulseConfig, private rest: RestUtil) {
|
|
18
|
-
this.baseUrl = this.config.api + this.baseUrl;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Create new stream analytics configuration
|
|
24
|
-
*/
|
|
25
|
-
create(body?: StreamAnalyticsConfig) {
|
|
26
|
-
return this.rest.put<EntityResponse<StreamAnalyticsConfig>>(`${this.baseUrl}`, typeof body === 'object' ? JSON.stringify(body) : body);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Update existing stream analytics configuration
|
|
31
|
-
*/
|
|
32
|
-
update(body?: StreamAnalyticsConfig) {
|
|
33
|
-
return this.rest.patch<EntityResponse<StreamAnalyticsConfig>>(`${this.baseUrl}`, typeof body === 'object' ? JSON.stringify(body) : body);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Delete stream analytics configuration from the system
|
|
38
|
-
*/
|
|
39
|
-
delete(id?: string) {
|
|
40
|
-
return this.rest.delete<ActionResponse>(`${this.baseUrl}/${id}`);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Get single stream analytics configuration by stream id
|
|
45
|
-
*/
|
|
46
|
-
get(id?: string) {
|
|
47
|
-
return this.rest.get<EntityResponse<StreamAnalyticsConfig>>(`${this.baseUrl}/${id}`);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Find list of stream analytics configurations by query
|
|
52
|
-
*/
|
|
53
|
-
find(search?: string, sort?: string, page?: number, size?: number) {
|
|
54
|
-
const params = [];
|
|
55
|
-
if (search != null) { params.push(`search=${search}`); }
|
|
56
|
-
if (sort != null) { params.push(`sort=${sort}`); }
|
|
57
|
-
if (page != null) { params.push(`page=${page}`); }
|
|
58
|
-
if (size != null) { params.push(`size=${size}`); }
|
|
59
|
-
|
|
60
|
-
return this.rest.get<EntitiesResponse<StreamAnalyticsConfig>>(`${this.baseUrl}`, ...params);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { RestUtil, EntityResponse, EntitiesResponse, ActionResponse } from '../../utils';
|
|
2
|
-
import { PulseConfig } from '../../config';
|
|
3
|
-
|
|
4
|
-
import { AccountStatusCode } from '../enums';
|
|
5
|
-
import { Image } from '../entities';
|
|
6
|
-
import { Account } from '../entities';
|
|
7
|
-
import { AccountSettings } from '../entities';
|
|
8
|
-
import { AccountTypeCode } from '../enums';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// List of account related actions for system administrator only
|
|
13
|
-
// @RequestHeader X-API-KEY The key to identify the application (console)
|
|
14
|
-
// @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
|
|
15
|
-
export class SysAccountsService {
|
|
16
|
-
|
|
17
|
-
// URL to web api
|
|
18
|
-
private baseUrl = '/sys/accounts';
|
|
19
|
-
|
|
20
|
-
// Class constructor
|
|
21
|
-
constructor(private config: PulseConfig, private rest: RestUtil) {
|
|
22
|
-
this.baseUrl = this.config.api + this.baseUrl;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Create new account
|
|
28
|
-
*/
|
|
29
|
-
create(body?: Account) {
|
|
30
|
-
return this.rest.put<EntityResponse<Account>>(`${this.baseUrl}`, typeof body === 'object' ? JSON.stringify(body) : body);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Update existing account in the system
|
|
35
|
-
*/
|
|
36
|
-
update(body?: Account) {
|
|
37
|
-
return this.rest.patch<EntityResponse<Account>>(`${this.baseUrl}`, typeof body === 'object' ? JSON.stringify(body) : body);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Update existing account settings in the system
|
|
42
|
-
*/
|
|
43
|
-
updateSettings(body?: AccountSettings) {
|
|
44
|
-
return this.rest.patch<ActionResponse>(`${this.baseUrl}/{id}`, typeof body === 'object' ? JSON.stringify(body) : body);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Delete account from the system and all its related content
|
|
49
|
-
*/
|
|
50
|
-
delete(id?: string) {
|
|
51
|
-
return this.rest.delete<ActionResponse>(`${this.baseUrl}/${id}`);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Get single account by id
|
|
56
|
-
*/
|
|
57
|
-
get(id?: string) {
|
|
58
|
-
return this.rest.get<EntityResponse<Account>>(`${this.baseUrl}/${id}`);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Find list of accounts by query
|
|
63
|
-
*/
|
|
64
|
-
find(search?: string, type?: AccountTypeCode[], status?: AccountStatusCode[], sort?: string, page?: number, size?: number) {
|
|
65
|
-
const params = [];
|
|
66
|
-
if (search != null) { params.push(`search=${search}`); }
|
|
67
|
-
if (type != null) { params.push(`type=${type}`); }
|
|
68
|
-
if (status != null) { params.push(`status=${status}`); }
|
|
69
|
-
if (sort != null) { params.push(`sort=${sort}`); }
|
|
70
|
-
if (page != null) { params.push(`page=${page}`); }
|
|
71
|
-
if (size != null) { params.push(`size=${size}`); }
|
|
72
|
-
|
|
73
|
-
return this.rest.get<EntitiesResponse<Account>>(`${this.baseUrl}`, ...params);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Save account's logo image
|
|
78
|
-
*/
|
|
79
|
-
saveLogo() {
|
|
80
|
-
return this.rest.patch<ActionResponse>(`${this.baseUrl}/logo`, '');
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Get account's logo image
|
|
85
|
-
*/
|
|
86
|
-
getLogo(id?: string) {
|
|
87
|
-
return this.rest.get<EntityResponse<Image>>(`${this.baseUrl}/logo`);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
}
|