@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,72 +0,0 @@
1
- import { RestUtil, EntityResponse, EntitiesResponse, ActionResponse } from '../../utils';
2
- import { PulseConfig } from '../../config';
3
-
4
- import { AuditLog } from '../entities';
5
- import { TimeSeriesOfFloat } from '../common';
6
-
7
-
8
-
9
- // List of audit log queries for system administrator only
10
- // @RequestHeader X-API-KEY The key to identify the application (console)
11
- // @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
12
- export class SysAuditLogService {
13
-
14
- // URL to web api
15
- private baseUrl = '/sys/audit-log';
16
-
17
- // Class constructor
18
- constructor(private config: PulseConfig, private rest: RestUtil) {
19
- this.baseUrl = this.config.api + this.baseUrl;
20
- }
21
-
22
-
23
- /**
24
- * Get single log entry by id
25
- */
26
- get(id?: string) {
27
- return this.rest.get<EntityResponse<AuditLog>>(`${this.baseUrl}/${id}`);
28
- }
29
-
30
- /**
31
- * Find list of log entries by query
32
- */
33
- find(from?: number, to?: number, accountId?: string, userId?: string, action?: string, itemType?: string, itemId?: string, itemName?: string, search?: string, sort?: string, page?: number, size?: number) {
34
- const params = [];
35
- if (from != null) { params.push(`from=${from}`); }
36
- if (to != null) { params.push(`to=${to}`); }
37
- if (accountId != null) { params.push(`accountId=${accountId}`); }
38
- if (userId != null) { params.push(`userId=${userId}`); }
39
- if (action != null) { params.push(`action=${action}`); }
40
- if (itemType != null) { params.push(`itemType=${itemType}`); }
41
- if (itemId != null) { params.push(`itemId=${itemId}`); }
42
- if (itemName != null) { params.push(`itemName=${itemName}`); }
43
- if (search != null) { params.push(`search=${search}`); }
44
- if (sort != null) { params.push(`sort=${sort}`); }
45
- if (page != null) { params.push(`page=${page}`); }
46
- if (size != null) { params.push(`size=${size}`); }
47
-
48
- return this.rest.get<EntitiesResponse<AuditLog>>(`${this.baseUrl}`, ...params);
49
- }
50
-
51
- /**
52
- * Get histogram of audit log entries over time
53
- */
54
- getTimeline(from?: number, to?: number, accountId?: string, userId?: string, action?: string, itemType?: string, itemId?: string, itemName?: string, search?: string, sort?: string, page?: number, size?: number) {
55
- const params = [];
56
- if (from != null) { params.push(`from=${from}`); }
57
- if (to != null) { params.push(`to=${to}`); }
58
- if (accountId != null) { params.push(`accountId=${accountId}`); }
59
- if (userId != null) { params.push(`userId=${userId}`); }
60
- if (action != null) { params.push(`action=${action}`); }
61
- if (itemType != null) { params.push(`itemType=${itemType}`); }
62
- if (itemId != null) { params.push(`itemId=${itemId}`); }
63
- if (itemName != null) { params.push(`itemName=${itemName}`); }
64
- if (search != null) { params.push(`search=${search}`); }
65
- if (sort != null) { params.push(`sort=${sort}`); }
66
- if (page != null) { params.push(`page=${page}`); }
67
- if (size != null) { params.push(`size=${size}`); }
68
-
69
- return this.rest.get<EntityResponse<TimeSeriesOfFloat>>(`${this.baseUrl}/timeline`, ...params);
70
- }
71
-
72
- }
@@ -1,62 +0,0 @@
1
- import { RestUtil, EntityResponse, EntitiesResponse, ActionResponse } from '../../utils';
2
- import { PulseConfig } from '../../config';
3
-
4
- import { Checkpoint } from '../entities';
5
- import { TimeSeriesOfFloat } from '../common';
6
-
7
-
8
-
9
- // List of checkpoints queries for system administrator only
10
- // @RequestHeader X-API-KEY The key to identify the application (console)
11
- // @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
12
- export class SysCheckpointsService {
13
-
14
- // URL to web api
15
- private baseUrl = '/sys/checkpoints';
16
-
17
- // Class constructor
18
- constructor(private config: PulseConfig, private rest: RestUtil) {
19
- this.baseUrl = this.config.api + this.baseUrl;
20
- }
21
-
22
-
23
- /**
24
- * Get a single checkpoint entry by id
25
- */
26
- get(id?: string) {
27
- return this.rest.get<EntityResponse<Checkpoint>>(`${this.baseUrl}/${id}`);
28
- }
29
-
30
- /**
31
- * Find a list of checkpoint entries by query
32
- */
33
- find(from?: number, to?: number, accountId?: string, streamId?: string, search?: string, sort?: string, page?: number, size?: number) {
34
- const params = [];
35
- if (from != null) { params.push(`from=${from}`); }
36
- if (to != null) { params.push(`to=${to}`); }
37
- if (accountId != null) { params.push(`accountId=${accountId}`); }
38
- if (streamId != null) { params.push(`streamId=${streamId}`); }
39
- if (search != null) { params.push(`search=${search}`); }
40
- if (sort != null) { params.push(`sort=${sort}`); }
41
- if (page != null) { params.push(`page=${page}`); }
42
- if (size != null) { params.push(`size=${size}`); }
43
-
44
- return this.rest.get<EntitiesResponse<Checkpoint>>(`${this.baseUrl}`, ...params);
45
- }
46
-
47
- /**
48
- * Get histogram of checkpoints over time
49
- */
50
- checkpointsTimeline(from?: number, to?: number, accountId?: string, streamId?: string, field?: string, timeField?: string) {
51
- const params = [];
52
- if (from != null) { params.push(`from=${from}`); }
53
- if (to != null) { params.push(`to=${to}`); }
54
- if (accountId != null) { params.push(`accountId=${accountId}`); }
55
- if (streamId != null) { params.push(`streamId=${streamId}`); }
56
- if (field != null) { params.push(`field=${field}`); }
57
- if (timeField != null) { params.push(`timeField=${timeField}`); }
58
-
59
- return this.rest.get<EntityResponse<TimeSeriesOfFloat>>(`${this.baseUrl}/timeline`, ...params);
60
- }
61
-
62
- }
@@ -1,63 +0,0 @@
1
- import { RestUtil, EntityResponse, EntitiesResponse, ActionResponse } from '../../utils';
2
- import { PulseConfig } from '../../config';
3
-
4
- import { ConfigParam } from '../entities';
5
-
6
-
7
-
8
- // List of system configuration parameters related actions for system administrator 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 SysConfigService {
12
-
13
- // URL to web api
14
- private baseUrl = '/sys/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 configuration parameter
24
- */
25
- create(body?: ConfigParam) {
26
- return this.rest.put<EntityResponse<ConfigParam>>(`${this.baseUrl}`, typeof body === 'object' ? JSON.stringify(body) : body);
27
- }
28
-
29
- /**
30
- * Update existing configuration parameter in the system
31
- */
32
- update(body?: ConfigParam) {
33
- return this.rest.patch<EntityResponse<ConfigParam>>(`${this.baseUrl}`, typeof body === 'object' ? JSON.stringify(body) : body);
34
- }
35
-
36
- /**
37
- * Delete a configuration parameter from the system
38
- */
39
- delete(id?: string) {
40
- return this.rest.delete<ActionResponse>(`${this.baseUrl}/${id}`);
41
- }
42
-
43
- /**
44
- * Get single configuration parameter by id
45
- */
46
- get(id?: string) {
47
- return this.rest.get<EntityResponse<ConfigParam>>(`${this.baseUrl}/${id}`);
48
- }
49
-
50
- /**
51
- * Find list of configuration parameters 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<ConfigParam>>(`${this.baseUrl}`, ...params);
61
- }
62
-
63
- }
@@ -1,77 +0,0 @@
1
- import { RestUtil, EntityResponse, EntitiesResponse, ActionResponse } from '../../utils';
2
- import { PulseConfig } from '../../config';
3
-
4
- import { Feature } from '../entities';
5
- import { FeaturesGroup } from '../entities';
6
-
7
-
8
-
9
- // List of features actions for system administrator only
10
- // @RequestHeader X-API-KEY The key to identify the application (console)
11
- // @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
12
- export class SysFeaturesService {
13
-
14
- // URL to web api
15
- private baseUrl = '/sys/features';
16
-
17
- // Class constructor
18
- constructor(private config: PulseConfig, private rest: RestUtil) {
19
- this.baseUrl = this.config.api + this.baseUrl;
20
- }
21
-
22
-
23
- /**
24
- * Find list of feature
25
- */
26
- findFeatures(search?: string, sort?: string, page?: number, size?: number) {
27
- const params = [];
28
- if (search != null) { params.push(`search=${search}`); }
29
- if (sort != null) { params.push(`sort=${sort}`); }
30
- if (page != null) { params.push(`page=${page}`); }
31
- if (size != null) { params.push(`size=${size}`); }
32
-
33
- return this.rest.get<EntitiesResponse<Feature>>(`${this.baseUrl}`, ...params);
34
- }
35
-
36
- /**
37
- * Create new features group
38
- */
39
- createFeaturesGroup(body?: FeaturesGroup) {
40
- return this.rest.put<EntityResponse<FeaturesGroup>>(`${this.baseUrl}/groups`, typeof body === 'object' ? JSON.stringify(body) : body);
41
- }
42
-
43
- /**
44
- * Update existing features group
45
- */
46
- updateFeaturesGroup(body?: FeaturesGroup) {
47
- return this.rest.patch<EntityResponse<FeaturesGroup>>(`${this.baseUrl}/groups`, typeof body === 'object' ? JSON.stringify(body) : body);
48
- }
49
-
50
- /**
51
- * Delete features group from the system
52
- */
53
- deleteFeaturesGroup(id?: string) {
54
- return this.rest.delete<ActionResponse>(`${this.baseUrl}/groups/${id}`);
55
- }
56
-
57
- /**
58
- * Get single features group by id
59
- */
60
- getFeaturesGroup(id?: string) {
61
- return this.rest.get<EntityResponse<FeaturesGroup>>(`${this.baseUrl}/groups/${id}`);
62
- }
63
-
64
- /**
65
- * Find list of features groups
66
- */
67
- findFeaturesGroups(search?: string, sort?: string, page?: number, size?: number) {
68
- const params = [];
69
- if (search != null) { params.push(`search=${search}`); }
70
- if (sort != null) { params.push(`sort=${sort}`); }
71
- if (page != null) { params.push(`page=${page}`); }
72
- if (size != null) { params.push(`size=${size}`); }
73
-
74
- return this.rest.get<EntitiesResponse<FeaturesGroup>>(`${this.baseUrl}/groups`, ...params);
75
- }
76
-
77
- }
@@ -1,85 +0,0 @@
1
- import { RestUtil, EntityResponse, EntitiesResponse, ActionResponse } from '../../utils';
2
- import { PulseConfig } from '../../config';
3
-
4
- import { Group } from '../entities';
5
- import { User } from '../entities';
6
-
7
-
8
-
9
- // List of groups related actions for system administrator only
10
- // @RequestHeader X-API-KEY The key to identify the application (console)
11
- // @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
12
- export class SysGroupsService {
13
-
14
- // URL to web api
15
- private baseUrl = '/sys/groups';
16
-
17
- // Class constructor
18
- constructor(private config: PulseConfig, private rest: RestUtil) {
19
- this.baseUrl = this.config.api + this.baseUrl;
20
- }
21
-
22
-
23
- /**
24
- * Create new groups
25
- */
26
- create(body?: Group) {
27
- return this.rest.put<EntityResponse<Group>>(`${this.baseUrl}`, typeof body === 'object' ? JSON.stringify(body) : body);
28
- }
29
-
30
- /**
31
- * Update existing group in the system
32
- */
33
- update(body?: Group) {
34
- return this.rest.patch<EntityResponse<Group>>(`${this.baseUrl}`, typeof body === 'object' ? JSON.stringify(body) : body);
35
- }
36
-
37
- /**
38
- * Delete a group from the system
39
- */
40
- delete(id?: string) {
41
- return this.rest.delete<ActionResponse>(`${this.baseUrl}/${id}`);
42
- }
43
-
44
- /**
45
- * Get single group by id
46
- */
47
- get(id?: string) {
48
- return this.rest.get<EntityResponse<Group>>(`${this.baseUrl}/${id}`);
49
- }
50
-
51
- /**
52
- * Find list of groups by query
53
- */
54
- find(search?: string, sort?: string, page?: number, size?: number) {
55
- const params = [];
56
- if (search != null) { params.push(`search=${search}`); }
57
- if (sort != null) { params.push(`sort=${sort}`); }
58
- if (page != null) { params.push(`page=${page}`); }
59
- if (size != null) { params.push(`size=${size}`); }
60
-
61
- return this.rest.get<EntitiesResponse<Group>>(`${this.baseUrl}`, ...params);
62
- }
63
-
64
- /**
65
- * Get list of all users in the group
66
- */
67
- getUsers(id?: string) {
68
- return this.rest.get<EntityResponse<User>>(`${this.baseUrl}/${id}/users`);
69
- }
70
-
71
- /**
72
- * Add user to the group
73
- */
74
- setDefaultAccount(id?: string, userId?: string) {
75
- return this.rest.put<ActionResponse>(`${this.baseUrl}/${id}/users/${userId}`, '');
76
- }
77
-
78
- /**
79
- * Remove user from the group
80
- */
81
- getAccessToken(id?: string, userId?: string) {
82
- return this.rest.delete<ActionResponse>(`${this.baseUrl}/${id}/users/${userId}`);
83
- }
84
-
85
- }
@@ -1,122 +0,0 @@
1
- import { RestUtil, EntityResponse, EntitiesResponse, ActionResponse } from '../../utils';
2
- import { PulseConfig } from '../../config';
3
-
4
- import { InsightQuery } from '../entities';
5
- import { InsightSpec } from '../entities';
6
-
7
-
8
-
9
- // List of insight queries related actions for system administrator only
10
- // @RequestHeader X-API-KEY The key to identify the application (console)
11
- // @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
12
- export class SysInsightsService {
13
-
14
- // URL to web api
15
- private baseUrl = '/sys/insights';
16
-
17
- // Class constructor
18
- constructor(private config: PulseConfig, private rest: RestUtil) {
19
- this.baseUrl = this.config.api + this.baseUrl;
20
- }
21
-
22
-
23
- /**
24
- * Create new insight query
25
- */
26
- createQuery(body?: InsightQuery) {
27
- return this.rest.put<EntityResponse<InsightQuery>>(`${this.baseUrl}/query`, typeof body === 'object' ? JSON.stringify(body) : body);
28
- }
29
-
30
- /**
31
- * Update existing insight query
32
- */
33
- updateQuery(body?: InsightQuery) {
34
- return this.rest.patch<EntityResponse<InsightQuery>>(`${this.baseUrl}/query`, typeof body === 'object' ? JSON.stringify(body) : body);
35
- }
36
-
37
- /**
38
- * Delete insight query from the system
39
- */
40
- deleteQuery(id?: string) {
41
- return this.rest.delete<ActionResponse>(`${this.baseUrl}/query/${id}`);
42
- }
43
-
44
- /**
45
- * Get single insight query by id
46
- */
47
- getQuery(id?: string) {
48
- return this.rest.get<EntityResponse<InsightQuery>>(`${this.baseUrl}/query/${id}`);
49
- }
50
-
51
- /**
52
- * Find list of insight queries
53
- */
54
- findQueries(search?: string, sort?: string, page?: number, size?: number) {
55
- const params = [];
56
- if (search != null) { params.push(`search=${search}`); }
57
- if (sort != null) { params.push(`sort=${sort}`); }
58
- if (page != null) { params.push(`page=${page}`); }
59
- if (size != null) { params.push(`size=${size}`); }
60
-
61
- return this.rest.get<EntitiesResponse<InsightQuery>>(`${this.baseUrl}/query`, ...params);
62
- }
63
-
64
- /**
65
- * Create new insight spec
66
- */
67
- createSpec(body?: InsightSpec) {
68
- return this.rest.put<EntityResponse<InsightSpec>>(`${this.baseUrl}/spec`, typeof body === 'object' ? JSON.stringify(body) : body);
69
- }
70
-
71
- /**
72
- * Update existing insight spec
73
- */
74
- updateSpec(body?: InsightSpec) {
75
- return this.rest.patch<EntityResponse<InsightSpec>>(`${this.baseUrl}/spec`, typeof body === 'object' ? JSON.stringify(body) : body);
76
- }
77
-
78
- /**
79
- * Delete insight spec from the system
80
- */
81
- deleteSpec(id?: string) {
82
- return this.rest.delete<ActionResponse>(`${this.baseUrl}/spec/${id}`);
83
- }
84
-
85
- /**
86
- * Get single insight spec by id
87
- */
88
- getSpec(id?: string) {
89
- return this.rest.get<EntityResponse<InsightSpec>>(`${this.baseUrl}/spec/${id}`);
90
- }
91
-
92
- /**
93
- * Find list of insight specs
94
- */
95
- findSpecs(accountId?: string, streamId?: string, search?: string, sort?: string, page?: number, size?: number) {
96
- const params = [];
97
- if (accountId != null) { params.push(`accountId=${accountId}`); }
98
- if (streamId != null) { params.push(`streamId=${streamId}`); }
99
- if (search != null) { params.push(`search=${search}`); }
100
- if (sort != null) { params.push(`sort=${sort}`); }
101
- if (page != null) { params.push(`page=${page}`); }
102
- if (size != null) { params.push(`size=${size}`); }
103
-
104
- return this.rest.get<EntitiesResponse<InsightSpec>>(`${this.baseUrl}/spec`, ...params);
105
- }
106
-
107
- /**
108
- * Find list of insight specs
109
- */
110
- findSpecsQueries(accountId?: string, streamId?: string, search?: string, sort?: string, page?: number, size?: number) {
111
- const params = [];
112
- if (accountId != null) { params.push(`accountId=${accountId}`); }
113
- if (streamId != null) { params.push(`streamId=${streamId}`); }
114
- if (search != null) { params.push(`search=${search}`); }
115
- if (sort != null) { params.push(`sort=${sort}`); }
116
- if (page != null) { params.push(`page=${page}`); }
117
- if (size != null) { params.push(`size=${size}`); }
118
-
119
- return this.rest.get<EntitiesResponse<InsightQuery>>(`${this.baseUrl}/spec-queries`, ...params);
120
- }
121
-
122
- }
@@ -1,71 +0,0 @@
1
- import { RestUtil, EntityResponse, EntitiesResponse, ActionResponse } from '../../utils';
2
- import { PulseConfig } from '../../config';
3
-
4
- import { ApiKey } from '../entities';
5
- import { StringIntValue } from '../common';
6
-
7
-
8
-
9
- // List of API keys related actions for system administrator only
10
- // @RequestHeader X-API-KEY The key to identify the application (console)
11
- // @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
12
- export class SysKeysService {
13
-
14
- // URL to web api
15
- private baseUrl = '/sys/keys';
16
-
17
- // Class constructor
18
- constructor(private config: PulseConfig, private rest: RestUtil) {
19
- this.baseUrl = this.config.api + this.baseUrl;
20
- }
21
-
22
-
23
- /**
24
- * Create new API key
25
- */
26
- create(body?: ApiKey) {
27
- return this.rest.put<EntityResponse<ApiKey>>(`${this.baseUrl}`, typeof body === 'object' ? JSON.stringify(body) : body);
28
- }
29
-
30
- /**
31
- * Update existing API key in the system
32
- */
33
- update(body?: ApiKey) {
34
- return this.rest.patch<EntityResponse<ApiKey>>(`${this.baseUrl}`, typeof body === 'object' ? JSON.stringify(body) : body);
35
- }
36
-
37
- /**
38
- * Delete API key from the system
39
- */
40
- delete(id?: string) {
41
- return this.rest.delete<ActionResponse>(`${this.baseUrl}/${id}`);
42
- }
43
-
44
- /**
45
- * Get single API key by id
46
- */
47
- get(id?: string) {
48
- return this.rest.get<EntityResponse<ApiKey>>(`${this.baseUrl}/${id}`);
49
- }
50
-
51
- /**
52
- * Find list of API keys by free test search
53
- */
54
- find(search?: string, sort?: string, page?: number, size?: number) {
55
- const params = [];
56
- if (search != null) { params.push(`search=${search}`); }
57
- if (sort != null) { params.push(`sort=${sort}`); }
58
- if (page != null) { params.push(`page=${page}`); }
59
- if (size != null) { params.push(`size=${size}`); }
60
-
61
- return this.rest.get<EntitiesResponse<ApiKey>>(`${this.baseUrl}`, ...params);
62
- }
63
-
64
- /**
65
- * Get list of services for the ACL
66
- */
67
- listServices() {
68
- return this.rest.get<EntitiesResponse<StringIntValue>>(`${this.baseUrl}/services`);
69
- }
70
-
71
- }
@@ -1,66 +0,0 @@
1
- import { RestUtil, EntityResponse, EntitiesResponse, ActionResponse } from '../../utils';
2
- import { PulseConfig } from '../../config';
3
-
4
- import { Member } from '../entities';
5
- import { MemberRoleCode } from '../enums';
6
-
7
-
8
-
9
- // List of members related actions for system administrator only
10
- // @RequestHeader X-API-KEY The key to identify the application (console)
11
- // @RequestHeader X-ACCESS-TOKEN The token to identify the logged-in user
12
- export class SysMembersService {
13
-
14
- // URL to web api
15
- private baseUrl = '/sys/members';
16
-
17
- // Class constructor
18
- constructor(private config: PulseConfig, private rest: RestUtil) {
19
- this.baseUrl = this.config.api + this.baseUrl;
20
- }
21
-
22
-
23
- /**
24
- * Create new member
25
- */
26
- create(body?: Member) {
27
- return this.rest.put<EntityResponse<Member>>(`${this.baseUrl}`, typeof body === 'object' ? JSON.stringify(body) : body);
28
- }
29
-
30
- /**
31
- * Update existing member in the system
32
- */
33
- update(body?: Member) {
34
- return this.rest.patch<EntityResponse<Member>>(`${this.baseUrl}`, typeof body === 'object' ? JSON.stringify(body) : body);
35
- }
36
-
37
- /**
38
- * Delete member from the system
39
- */
40
- delete(id?: string) {
41
- return this.rest.delete<ActionResponse>(`${this.baseUrl}/${id}`);
42
- }
43
-
44
- /**
45
- * Get single member by id
46
- */
47
- get(id?: string) {
48
- return this.rest.get<EntityResponse<Member>>(`${this.baseUrl}/${id}`);
49
- }
50
-
51
- /**
52
- * Find list of members by query
53
- */
54
- find(accountId?: string, userId?: string, role?: MemberRoleCode[], sort?: string, page?: number, size?: number) {
55
- const params = [];
56
- if (accountId != null) { params.push(`accountId=${accountId}`); }
57
- if (userId != null) { params.push(`userId=${userId}`); }
58
- if (role != null) { params.push(`role=${role}`); }
59
- if (sort != null) { params.push(`sort=${sort}`); }
60
- if (page != null) { params.push(`page=${page}`); }
61
- if (size != null) { params.push(`size=${size}`); }
62
-
63
- return this.rest.get<EntitiesResponse<Member>>(`${this.baseUrl}`, ...params);
64
- }
65
-
66
- }
@@ -1,63 +0,0 @@
1
- import { RestUtil, EntityResponse, EntitiesResponse, ActionResponse } from '../../utils';
2
- import { PulseConfig } from '../../config';
3
-
4
- import { RuleTemplate } from '../entities';
5
-
6
-
7
-
8
- // List of rule templates related actions for system administrator 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 SysRuleTemplatesService {
12
-
13
- // URL to web api
14
- private baseUrl = '/sys/rule-templates';
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 rule template
24
- */
25
- create(body?: RuleTemplate) {
26
- return this.rest.put<EntityResponse<RuleTemplate>>(`${this.baseUrl}`, typeof body === 'object' ? JSON.stringify(body) : body);
27
- }
28
-
29
- /**
30
- * Update existing rule template
31
- */
32
- update(body?: RuleTemplate) {
33
- return this.rest.patch<EntityResponse<RuleTemplate>>(`${this.baseUrl}`, typeof body === 'object' ? JSON.stringify(body) : body);
34
- }
35
-
36
- /**
37
- * Delete a rule template from the system
38
- */
39
- delete(id?: string) {
40
- return this.rest.delete<ActionResponse>(`${this.baseUrl}/${id}`);
41
- }
42
-
43
- /**
44
- * Get single rule template by id
45
- */
46
- get(id?: string) {
47
- return this.rest.get<EntityResponse<RuleTemplate>>(`${this.baseUrl}/${id}`);
48
- }
49
-
50
- /**
51
- * Find list of rule templates 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<RuleTemplate>>(`${this.baseUrl}`, ...params);
61
- }
62
-
63
- }