@northern.tech/store 0.12.0 → 0.13.0

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 (176) hide show
  1. package/dist/actions.cjs +20 -16
  2. package/dist/actions.cjs.map +1 -1
  3. package/dist/actions.d.cts +7 -22
  4. package/dist/actions.d.ts +7 -22
  5. package/dist/actions.js +8 -8
  6. package/dist/appSlice/index.cjs.map +1 -1
  7. package/dist/appSlice/index.d.cts +1 -1
  8. package/dist/appSlice/index.d.ts +1 -1
  9. package/dist/appSlice/index.js +1 -1
  10. package/dist/appSlice/mocks.cjs.map +1 -1
  11. package/dist/appSlice/mocks.js +1 -1
  12. package/dist/appSlice/selectors.d.cts +34 -528
  13. package/dist/appSlice/selectors.d.ts +34 -528
  14. package/dist/appSlice/thunks.cjs +45 -41
  15. package/dist/appSlice/thunks.cjs.map +1 -1
  16. package/dist/appSlice/thunks.d.cts +5 -3
  17. package/dist/appSlice/thunks.d.ts +5 -3
  18. package/dist/appSlice/thunks.js +14 -14
  19. package/dist/{chunk-QOFVCPRW.js → chunk-5PUF4LA5.js} +1 -1
  20. package/dist/chunk-5PUF4LA5.js.map +1 -0
  21. package/dist/{chunk-TKIOEF3B.js → chunk-6KAV62BW.js} +6 -6
  22. package/dist/{chunk-OFGCC3GM.js → chunk-7MTM3BDT.js} +1 -1
  23. package/dist/chunk-7MTM3BDT.js.map +1 -0
  24. package/dist/{chunk-4HSH7RH3.js → chunk-AR4FTKSL.js} +8 -8
  25. package/dist/{chunk-ZRMB4U7Z.js → chunk-BZAXFAGT.js} +4 -4
  26. package/dist/{chunk-ZNAJKEP2.js → chunk-CQXDAXQF.js} +1 -1
  27. package/dist/chunk-CQXDAXQF.js.map +1 -0
  28. package/dist/{chunk-5ZCZTTYX.js → chunk-EOZ665GA.js} +2 -2
  29. package/dist/{chunk-C5NXNZ7F.js → chunk-ETZVJXPD.js} +23 -30
  30. package/dist/chunk-ETZVJXPD.js.map +1 -0
  31. package/dist/{chunk-WCBHYLUK.js → chunk-KJ4BPXMB.js} +1 -1
  32. package/dist/chunk-KJ4BPXMB.js.map +1 -0
  33. package/dist/{chunk-C2LGE3P6.js → chunk-OLKM53RL.js} +1 -1
  34. package/dist/chunk-OLKM53RL.js.map +1 -0
  35. package/dist/{chunk-HLX5L3IM.js → chunk-PVCHKW35.js} +1 -1
  36. package/dist/chunk-PVCHKW35.js.map +1 -0
  37. package/dist/{chunk-REZWSU22.js → chunk-VODRLEDP.js} +21 -17
  38. package/dist/chunk-VODRLEDP.js.map +1 -0
  39. package/dist/{chunk-MH5WPYQI.js → chunk-X7NEALMI.js} +16 -9
  40. package/dist/chunk-X7NEALMI.js.map +1 -0
  41. package/dist/{chunk-OGUVURJ5.js → chunk-YFAIYNQG.js} +9 -9
  42. package/dist/commonSelectors.cjs +15 -8
  43. package/dist/commonSelectors.cjs.map +1 -1
  44. package/dist/commonSelectors.d.cts +178 -3523
  45. package/dist/commonSelectors.d.ts +178 -3523
  46. package/dist/commonSelectors.js +2 -2
  47. package/dist/deploymentsSlice/index.cjs.map +1 -1
  48. package/dist/deploymentsSlice/index.d.cts +1 -1
  49. package/dist/deploymentsSlice/index.d.ts +1 -1
  50. package/dist/deploymentsSlice/index.js +1 -1
  51. package/dist/deploymentsSlice/mocks.cjs.map +1 -1
  52. package/dist/deploymentsSlice/mocks.js +1 -1
  53. package/dist/deploymentsSlice/selectors.d.cts +16 -138
  54. package/dist/deploymentsSlice/selectors.d.ts +16 -138
  55. package/dist/deploymentsSlice/thunks.cjs +45 -41
  56. package/dist/deploymentsSlice/thunks.cjs.map +1 -1
  57. package/dist/deploymentsSlice/thunks.d.cts +4 -2
  58. package/dist/deploymentsSlice/thunks.d.ts +4 -2
  59. package/dist/deploymentsSlice/thunks.js +14 -14
  60. package/dist/devicesSlice/index.cjs +20 -16
  61. package/dist/devicesSlice/index.cjs.map +1 -1
  62. package/dist/devicesSlice/index.d.cts +11 -20
  63. package/dist/devicesSlice/index.d.ts +11 -20
  64. package/dist/devicesSlice/index.js +1 -1
  65. package/dist/devicesSlice/mocks.cjs +24 -22
  66. package/dist/devicesSlice/mocks.cjs.map +1 -1
  67. package/dist/devicesSlice/mocks.d.cts +20 -12
  68. package/dist/devicesSlice/mocks.d.ts +20 -12
  69. package/dist/devicesSlice/mocks.js +5 -7
  70. package/dist/devicesSlice/mocks.js.map +1 -1
  71. package/dist/devicesSlice/selectors.cjs +15 -8
  72. package/dist/devicesSlice/selectors.cjs.map +1 -1
  73. package/dist/devicesSlice/selectors.d.cts +207 -1730
  74. package/dist/devicesSlice/selectors.d.ts +207 -1730
  75. package/dist/devicesSlice/selectors.js +1 -1
  76. package/dist/devicesSlice/thunks.cjs +45 -43
  77. package/dist/devicesSlice/thunks.cjs.map +1 -1
  78. package/dist/devicesSlice/thunks.d.cts +12 -46
  79. package/dist/devicesSlice/thunks.d.ts +12 -46
  80. package/dist/devicesSlice/thunks.js +14 -16
  81. package/dist/monitorSlice/index.cjs.map +1 -1
  82. package/dist/monitorSlice/index.d.cts +1 -1
  83. package/dist/monitorSlice/index.d.ts +1 -1
  84. package/dist/monitorSlice/index.js +1 -1
  85. package/dist/monitorSlice/mocks.cjs.map +1 -1
  86. package/dist/monitorSlice/mocks.js +1 -1
  87. package/dist/monitorSlice/thunks.cjs +35 -24
  88. package/dist/monitorSlice/thunks.cjs.map +1 -1
  89. package/dist/monitorSlice/thunks.d.cts +3 -2
  90. package/dist/monitorSlice/thunks.d.ts +3 -2
  91. package/dist/monitorSlice/thunks.js +12 -12
  92. package/dist/onboardingSlice/index.cjs.map +1 -1
  93. package/dist/onboardingSlice/index.d.cts +1 -1
  94. package/dist/onboardingSlice/index.d.ts +1 -1
  95. package/dist/onboardingSlice/index.js +1 -1
  96. package/dist/onboardingSlice/mocks.cjs.map +1 -1
  97. package/dist/onboardingSlice/mocks.js +1 -1
  98. package/dist/onboardingSlice/thunks.cjs +45 -41
  99. package/dist/onboardingSlice/thunks.cjs.map +1 -1
  100. package/dist/onboardingSlice/thunks.d.cts +7 -15
  101. package/dist/onboardingSlice/thunks.d.ts +7 -15
  102. package/dist/onboardingSlice/thunks.js +14 -14
  103. package/dist/organizationSlice/index.cjs.map +1 -1
  104. package/dist/organizationSlice/index.d.cts +41 -31
  105. package/dist/organizationSlice/index.d.ts +41 -31
  106. package/dist/organizationSlice/index.js +1 -1
  107. package/dist/organizationSlice/mocks.cjs.map +1 -1
  108. package/dist/organizationSlice/mocks.js +1 -1
  109. package/dist/organizationSlice/selectors.d.cts +42 -659
  110. package/dist/organizationSlice/selectors.d.ts +42 -659
  111. package/dist/organizationSlice/thunks.cjs +45 -41
  112. package/dist/organizationSlice/thunks.cjs.map +1 -1
  113. package/dist/organizationSlice/thunks.d.cts +4 -1
  114. package/dist/organizationSlice/thunks.d.ts +4 -1
  115. package/dist/organizationSlice/thunks.js +14 -14
  116. package/dist/organizationSlice/types.cjs.map +1 -1
  117. package/dist/organizationSlice/types.d.cts +2 -12
  118. package/dist/organizationSlice/types.d.ts +2 -12
  119. package/dist/releasesSlice/mocks.d.cts +7 -1
  120. package/dist/releasesSlice/mocks.d.ts +7 -1
  121. package/dist/releasesSlice/selectors.d.cts +155 -930
  122. package/dist/releasesSlice/selectors.d.ts +155 -930
  123. package/dist/releasesSlice/thunks.cjs +35 -24
  124. package/dist/releasesSlice/thunks.cjs.map +1 -1
  125. package/dist/releasesSlice/thunks.d.cts +4 -2
  126. package/dist/releasesSlice/thunks.d.ts +4 -2
  127. package/dist/releasesSlice/thunks.js +12 -12
  128. package/dist/selectors.cjs +15 -8
  129. package/dist/selectors.cjs.map +1 -1
  130. package/dist/selectors.d.cts +6 -3
  131. package/dist/selectors.d.ts +6 -3
  132. package/dist/selectors.js +2 -2
  133. package/dist/store.cjs +20 -16
  134. package/dist/store.cjs.map +1 -1
  135. package/dist/store.d.cts +40 -658
  136. package/dist/store.d.ts +40 -658
  137. package/dist/store.js +9 -9
  138. package/dist/storehooks.cjs +45 -41
  139. package/dist/storehooks.cjs.map +1 -1
  140. package/dist/storehooks.js +14 -14
  141. package/dist/thunks.cjs +45 -43
  142. package/dist/thunks.cjs.map +1 -1
  143. package/dist/thunks.d.cts +7 -5
  144. package/dist/thunks.d.ts +7 -5
  145. package/dist/thunks.js +14 -16
  146. package/dist/useDeploymentDevice.cjs +45 -41
  147. package/dist/useDeploymentDevice.cjs.map +1 -1
  148. package/dist/useDeploymentDevice.js +14 -14
  149. package/dist/usersSlice/index.cjs.map +1 -1
  150. package/dist/usersSlice/index.d.cts +46 -46
  151. package/dist/usersSlice/index.d.ts +46 -46
  152. package/dist/usersSlice/index.js +1 -1
  153. package/dist/usersSlice/mocks.cjs.map +1 -1
  154. package/dist/usersSlice/mocks.js +1 -1
  155. package/dist/usersSlice/selectors.d.cts +75 -1436
  156. package/dist/usersSlice/selectors.d.ts +75 -1436
  157. package/dist/usersSlice/thunks.cjs +45 -41
  158. package/dist/usersSlice/thunks.cjs.map +1 -1
  159. package/dist/usersSlice/thunks.d.cts +3 -1
  160. package/dist/usersSlice/thunks.d.ts +3 -1
  161. package/dist/usersSlice/thunks.js +14 -14
  162. package/package.json +1 -1
  163. package/dist/chunk-C2LGE3P6.js.map +0 -1
  164. package/dist/chunk-C5NXNZ7F.js.map +0 -1
  165. package/dist/chunk-HLX5L3IM.js.map +0 -1
  166. package/dist/chunk-MH5WPYQI.js.map +0 -1
  167. package/dist/chunk-OFGCC3GM.js.map +0 -1
  168. package/dist/chunk-QOFVCPRW.js.map +0 -1
  169. package/dist/chunk-REZWSU22.js.map +0 -1
  170. package/dist/chunk-WCBHYLUK.js.map +0 -1
  171. package/dist/chunk-ZNAJKEP2.js.map +0 -1
  172. /package/dist/{chunk-TKIOEF3B.js.map → chunk-6KAV62BW.js.map} +0 -0
  173. /package/dist/{chunk-4HSH7RH3.js.map → chunk-AR4FTKSL.js.map} +0 -0
  174. /package/dist/{chunk-ZRMB4U7Z.js.map → chunk-BZAXFAGT.js.map} +0 -0
  175. /package/dist/{chunk-5ZCZTTYX.js.map → chunk-EOZ665GA.js.map} +0 -0
  176. /package/dist/{chunk-OGUVURJ5.js.map → chunk-YFAIYNQG.js.map} +0 -0
@@ -1,26 +1,28 @@
1
- import * as _northern_tech_types_types_gen from '@northern.tech/types/types.gen';
2
1
  import { SnackbarContent, SearchState } from '../appSlice/index.cjs';
3
2
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
4
- import { SortCriteria, Status, PreAuthSet, DeviceConfiguration, ManagementApiConfiguration, NewConfigurationDeployment, Integration } from '@northern.tech/types/MenderTypes';
5
- import { DeviceListState, Device, DeviceGroup, DeviceFilter, DeviceStatus, DeviceSelectedAttribute } from './index.cjs';
3
+ import { DeviceTierLimits, SortCriteria, Status, PreAuthSet, DeviceConfiguration, ManagementApiConfiguration, NewConfigurationDeployment, Integration } from '@northern.tech/types/MenderTypes';
4
+ import { DeviceListState, Device, DeviceGroup, DeviceFilter, DeviceSelectedAttribute } from './index.cjs';
6
5
  import { DeviceIssueOptionKey } from '@northern.tech/utils/constants';
6
+ import { DeviceAuthState } from './constants.cjs';
7
7
  import { AppDispatch, RootState } from '../store.cjs';
8
8
  import 'redux';
9
9
  import 'immer';
10
10
  import '@mui/material';
11
11
  import '../commonConstants.cjs';
12
12
  import 'react/jsx-runtime';
13
- import './constants.cjs';
14
13
  import '../deploymentsSlice/index.cjs';
15
14
  import 'redux-thunk';
16
- import '../usersSlice/constants.cjs';
17
15
  import '../usersSlice/index.cjs';
16
+ import '../usersSlice/constants.cjs';
18
17
  import '../releasesSlice/index.cjs';
18
+ import '../organizationSlice/index.cjs';
19
19
  import '../organizationSlice/types.cjs';
20
20
  import '../appSlice/constants.cjs';
21
21
  import '@mui/material/OverridableComponent';
22
22
  import '../organizationSlice/constants.cjs';
23
23
  import '../onboardingSlice/index.cjs';
24
+ import '../monitorSlice/index.cjs';
25
+ import '../monitorSlice/constants.cjs';
24
26
 
25
27
  declare const getGroups: _reduxjs_toolkit.AsyncThunk<any, void, {
26
28
  dispatch: AppDispatch;
@@ -301,43 +303,7 @@ declare const getDeviceInfo: _reduxjs_toolkit.AsyncThunk<any[], string, {
301
303
  fulfilledMeta?: unknown;
302
304
  rejectedMeta?: unknown;
303
305
  }>;
304
- declare const getDeviceCount: _reduxjs_toolkit.AsyncThunk<{
305
- payload: {
306
- count: number;
307
- status: DeviceStatus;
308
- };
309
- type: "devices/setDevicesCountByStatus";
310
- }, string, {
311
- dispatch: AppDispatch;
312
- state: RootState;
313
- extra?: unknown;
314
- rejectValue?: unknown;
315
- serializedErrorType?: unknown;
316
- pendingMeta?: unknown;
317
- fulfilledMeta?: unknown;
318
- rejectedMeta?: unknown;
319
- }>;
320
- declare const getAllDeviceCounts: _reduxjs_toolkit.AsyncThunk<(_reduxjs_toolkit.PayloadAction<unknown, string, {
321
- arg: string;
322
- requestId: string;
323
- requestStatus: "rejected";
324
- aborted: boolean;
325
- condition: boolean;
326
- } & ({
327
- rejectedWithValue: true;
328
- } | ({
329
- rejectedWithValue: false;
330
- } & {})), _reduxjs_toolkit.SerializedError> | _reduxjs_toolkit.PayloadAction<{
331
- payload: {
332
- count: number;
333
- status: DeviceStatus;
334
- };
335
- type: "devices/setDevicesCountByStatus";
336
- }, string, {
337
- arg: string;
338
- requestId: string;
339
- requestStatus: "fulfilled";
340
- }, never>)[], void, {
306
+ declare const getAllDeviceCounts: _reduxjs_toolkit.AsyncThunk<void, void, {
341
307
  dispatch: AppDispatch;
342
308
  state: RootState;
343
309
  extra?: unknown;
@@ -348,7 +314,7 @@ declare const getAllDeviceCounts: _reduxjs_toolkit.AsyncThunk<(_reduxjs_toolkit.
348
314
  rejectedMeta?: unknown;
349
315
  }>;
350
316
  declare const getDeviceLimits: _reduxjs_toolkit.AsyncThunk<{
351
- payload: _northern_tech_types_types_gen.DeviceTierLimits;
317
+ payload: DeviceTierLimits;
352
318
  type: "devices/setDeviceLimits";
353
319
  }, void, {
354
320
  dispatch: AppDispatch;
@@ -384,7 +350,7 @@ type GetDevicesByStatusPayload = {
384
350
  selectedAttributes: DeviceSelectedAttribute[];
385
351
  selectedIssues: DeviceIssueOptionKey[];
386
352
  sortOptions: SortCriteria[];
387
- status: DeviceStatus;
353
+ status: DeviceAuthState;
388
354
  };
389
355
  declare const getDevicesByStatus: _reduxjs_toolkit.AsyncThunk<any[], Partial<GetDevicesByStatusPayload>, {
390
356
  dispatch: AppDispatch;
@@ -398,7 +364,7 @@ declare const getDevicesByStatus: _reduxjs_toolkit.AsyncThunk<any[], Partial<Get
398
364
  }>;
399
365
  declare const getAllDevicesByStatus: _reduxjs_toolkit.AsyncThunk<any, {
400
366
  attribute: string;
401
- status: DeviceStatus;
367
+ status: DeviceAuthState;
402
368
  }, {
403
369
  dispatch: AppDispatch;
404
370
  state: RootState;
@@ -832,4 +798,4 @@ declare const getGatewayDevices: _reduxjs_toolkit.AsyncThunk<any[], string, {
832
798
  rejectedMeta?: unknown;
833
799
  }>;
834
800
 
835
- export { addDevicesToGroup, addDynamicGroup, addStaticGroup, applyDeviceConfig, decommissionDevice, deleteAuthset, deviceFileUpload, getAllDeviceCounts, getAllDevicesByStatus, getAllDynamicGroupDevices, getAllGroupDevices, getDeviceAttributes, getDeviceAuth, getDeviceById, getDeviceConfig, getDeviceConnect, getDeviceCount, getDeviceFileDownloadLink, getDeviceInfo, getDeviceLimits, getDeviceTwin, getDevicesByStatus, getDevicesWithAuth, getDynamicGroups, getGatewayDevices, getGroupDevices, getGroups, getReportDataWithoutBackendSupport, getSessionDetails, getSystemDevices, preauthDevice, removeDevicesFromGroup, removeDynamicGroup, removeStaticGroup, searchDevices, selectGroup, setDeviceConfig, setDeviceListState, setDeviceTags, setDeviceTwin, triggerDeviceUpdate, updateDeviceAuth, updateDevicesAuth, updateDynamicGroup, updateReportData };
801
+ export { addDevicesToGroup, addDynamicGroup, addStaticGroup, applyDeviceConfig, decommissionDevice, deleteAuthset, deviceFileUpload, getAllDeviceCounts, getAllDevicesByStatus, getAllDynamicGroupDevices, getAllGroupDevices, getDeviceAttributes, getDeviceAuth, getDeviceById, getDeviceConfig, getDeviceConnect, getDeviceFileDownloadLink, getDeviceInfo, getDeviceLimits, getDeviceTwin, getDevicesByStatus, getDevicesWithAuth, getDynamicGroups, getGatewayDevices, getGroupDevices, getGroups, getReportDataWithoutBackendSupport, getSessionDetails, getSystemDevices, preauthDevice, removeDevicesFromGroup, removeDynamicGroup, removeStaticGroup, searchDevices, selectGroup, setDeviceConfig, setDeviceListState, setDeviceTags, setDeviceTwin, triggerDeviceUpdate, updateDeviceAuth, updateDevicesAuth, updateDynamicGroup, updateReportData };
@@ -1,26 +1,28 @@
1
- import * as _northern_tech_types_types_gen from '@northern.tech/types/types.gen';
2
1
  import { SnackbarContent, SearchState } from '../appSlice/index.js';
3
2
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
4
- import { SortCriteria, Status, PreAuthSet, DeviceConfiguration, ManagementApiConfiguration, NewConfigurationDeployment, Integration } from '@northern.tech/types/MenderTypes';
5
- import { DeviceListState, Device, DeviceGroup, DeviceFilter, DeviceStatus, DeviceSelectedAttribute } from './index.js';
3
+ import { DeviceTierLimits, SortCriteria, Status, PreAuthSet, DeviceConfiguration, ManagementApiConfiguration, NewConfigurationDeployment, Integration } from '@northern.tech/types/MenderTypes';
4
+ import { DeviceListState, Device, DeviceGroup, DeviceFilter, DeviceSelectedAttribute } from './index.js';
6
5
  import { DeviceIssueOptionKey } from '@northern.tech/utils/constants';
6
+ import { DeviceAuthState } from './constants.js';
7
7
  import { AppDispatch, RootState } from '../store.js';
8
8
  import 'redux';
9
9
  import 'immer';
10
10
  import '@mui/material';
11
11
  import '../commonConstants.js';
12
12
  import 'react/jsx-runtime';
13
- import './constants.js';
14
13
  import '../deploymentsSlice/index.js';
15
14
  import 'redux-thunk';
16
- import '../usersSlice/constants.js';
17
15
  import '../usersSlice/index.js';
16
+ import '../usersSlice/constants.js';
18
17
  import '../releasesSlice/index.js';
18
+ import '../organizationSlice/index.js';
19
19
  import '../organizationSlice/types.js';
20
20
  import '../appSlice/constants.js';
21
21
  import '@mui/material/OverridableComponent';
22
22
  import '../organizationSlice/constants.js';
23
23
  import '../onboardingSlice/index.js';
24
+ import '../monitorSlice/index.js';
25
+ import '../monitorSlice/constants.js';
24
26
 
25
27
  declare const getGroups: _reduxjs_toolkit.AsyncThunk<any, void, {
26
28
  dispatch: AppDispatch;
@@ -301,43 +303,7 @@ declare const getDeviceInfo: _reduxjs_toolkit.AsyncThunk<any[], string, {
301
303
  fulfilledMeta?: unknown;
302
304
  rejectedMeta?: unknown;
303
305
  }>;
304
- declare const getDeviceCount: _reduxjs_toolkit.AsyncThunk<{
305
- payload: {
306
- count: number;
307
- status: DeviceStatus;
308
- };
309
- type: "devices/setDevicesCountByStatus";
310
- }, string, {
311
- dispatch: AppDispatch;
312
- state: RootState;
313
- extra?: unknown;
314
- rejectValue?: unknown;
315
- serializedErrorType?: unknown;
316
- pendingMeta?: unknown;
317
- fulfilledMeta?: unknown;
318
- rejectedMeta?: unknown;
319
- }>;
320
- declare const getAllDeviceCounts: _reduxjs_toolkit.AsyncThunk<(_reduxjs_toolkit.PayloadAction<unknown, string, {
321
- arg: string;
322
- requestId: string;
323
- requestStatus: "rejected";
324
- aborted: boolean;
325
- condition: boolean;
326
- } & ({
327
- rejectedWithValue: true;
328
- } | ({
329
- rejectedWithValue: false;
330
- } & {})), _reduxjs_toolkit.SerializedError> | _reduxjs_toolkit.PayloadAction<{
331
- payload: {
332
- count: number;
333
- status: DeviceStatus;
334
- };
335
- type: "devices/setDevicesCountByStatus";
336
- }, string, {
337
- arg: string;
338
- requestId: string;
339
- requestStatus: "fulfilled";
340
- }, never>)[], void, {
306
+ declare const getAllDeviceCounts: _reduxjs_toolkit.AsyncThunk<void, void, {
341
307
  dispatch: AppDispatch;
342
308
  state: RootState;
343
309
  extra?: unknown;
@@ -348,7 +314,7 @@ declare const getAllDeviceCounts: _reduxjs_toolkit.AsyncThunk<(_reduxjs_toolkit.
348
314
  rejectedMeta?: unknown;
349
315
  }>;
350
316
  declare const getDeviceLimits: _reduxjs_toolkit.AsyncThunk<{
351
- payload: _northern_tech_types_types_gen.DeviceTierLimits;
317
+ payload: DeviceTierLimits;
352
318
  type: "devices/setDeviceLimits";
353
319
  }, void, {
354
320
  dispatch: AppDispatch;
@@ -384,7 +350,7 @@ type GetDevicesByStatusPayload = {
384
350
  selectedAttributes: DeviceSelectedAttribute[];
385
351
  selectedIssues: DeviceIssueOptionKey[];
386
352
  sortOptions: SortCriteria[];
387
- status: DeviceStatus;
353
+ status: DeviceAuthState;
388
354
  };
389
355
  declare const getDevicesByStatus: _reduxjs_toolkit.AsyncThunk<any[], Partial<GetDevicesByStatusPayload>, {
390
356
  dispatch: AppDispatch;
@@ -398,7 +364,7 @@ declare const getDevicesByStatus: _reduxjs_toolkit.AsyncThunk<any[], Partial<Get
398
364
  }>;
399
365
  declare const getAllDevicesByStatus: _reduxjs_toolkit.AsyncThunk<any, {
400
366
  attribute: string;
401
- status: DeviceStatus;
367
+ status: DeviceAuthState;
402
368
  }, {
403
369
  dispatch: AppDispatch;
404
370
  state: RootState;
@@ -832,4 +798,4 @@ declare const getGatewayDevices: _reduxjs_toolkit.AsyncThunk<any[], string, {
832
798
  rejectedMeta?: unknown;
833
799
  }>;
834
800
 
835
- export { addDevicesToGroup, addDynamicGroup, addStaticGroup, applyDeviceConfig, decommissionDevice, deleteAuthset, deviceFileUpload, getAllDeviceCounts, getAllDevicesByStatus, getAllDynamicGroupDevices, getAllGroupDevices, getDeviceAttributes, getDeviceAuth, getDeviceById, getDeviceConfig, getDeviceConnect, getDeviceCount, getDeviceFileDownloadLink, getDeviceInfo, getDeviceLimits, getDeviceTwin, getDevicesByStatus, getDevicesWithAuth, getDynamicGroups, getGatewayDevices, getGroupDevices, getGroups, getReportDataWithoutBackendSupport, getSessionDetails, getSystemDevices, preauthDevice, removeDevicesFromGroup, removeDynamicGroup, removeStaticGroup, searchDevices, selectGroup, setDeviceConfig, setDeviceListState, setDeviceTags, setDeviceTwin, triggerDeviceUpdate, updateDeviceAuth, updateDevicesAuth, updateDynamicGroup, updateReportData };
801
+ export { addDevicesToGroup, addDynamicGroup, addStaticGroup, applyDeviceConfig, decommissionDevice, deleteAuthset, deviceFileUpload, getAllDeviceCounts, getAllDevicesByStatus, getAllDynamicGroupDevices, getAllGroupDevices, getDeviceAttributes, getDeviceAuth, getDeviceById, getDeviceConfig, getDeviceConnect, getDeviceFileDownloadLink, getDeviceInfo, getDeviceLimits, getDeviceTwin, getDevicesByStatus, getDevicesWithAuth, getDynamicGroups, getGatewayDevices, getGroupDevices, getGroups, getReportDataWithoutBackendSupport, getSessionDetails, getSystemDevices, preauthDevice, removeDevicesFromGroup, removeDynamicGroup, removeStaticGroup, searchDevices, selectGroup, setDeviceConfig, setDeviceListState, setDeviceTags, setDeviceTwin, triggerDeviceUpdate, updateDeviceAuth, updateDevicesAuth, updateDynamicGroup, updateReportData };
@@ -15,7 +15,6 @@ import {
15
15
  getDeviceById,
16
16
  getDeviceConfig,
17
17
  getDeviceConnect,
18
- getDeviceCount,
19
18
  getDeviceFileDownloadLink,
20
19
  getDeviceInfo,
21
20
  getDeviceLimits,
@@ -44,32 +43,32 @@ import {
44
43
  updateDevicesAuth,
45
44
  updateDynamicGroup,
46
45
  updateReportData
47
- } from "../chunk-C5NXNZ7F.js";
48
- import "../chunk-ZRMB4U7Z.js";
49
- import "../chunk-TKIOEF3B.js";
50
- import "../chunk-OGUVURJ5.js";
46
+ } from "../chunk-ETZVJXPD.js";
47
+ import "../chunk-BZAXFAGT.js";
48
+ import "../chunk-6KAV62BW.js";
49
+ import "../chunk-YFAIYNQG.js";
51
50
  import "../chunk-Y3DJIMEN.js";
52
51
  import "../chunk-5M6EUVNO.js";
53
- import "../chunk-4HSH7RH3.js";
52
+ import "../chunk-AR4FTKSL.js";
54
53
  import "../chunk-TRKA7XYU.js";
55
- import "../chunk-WCBHYLUK.js";
56
- import "../chunk-QOFVCPRW.js";
57
- import "../chunk-HLX5L3IM.js";
58
- import "../chunk-ZNAJKEP2.js";
59
- import "../chunk-REZWSU22.js";
60
- import "../chunk-OFGCC3GM.js";
61
- import "../chunk-C2LGE3P6.js";
54
+ import "../chunk-KJ4BPXMB.js";
55
+ import "../chunk-5PUF4LA5.js";
56
+ import "../chunk-PVCHKW35.js";
57
+ import "../chunk-CQXDAXQF.js";
58
+ import "../chunk-VODRLEDP.js";
59
+ import "../chunk-7MTM3BDT.js";
60
+ import "../chunk-OLKM53RL.js";
62
61
  import "../chunk-FDSMCFV5.js";
63
62
  import "../chunk-53W2NRSL.js";
64
63
  import "../chunk-NMAXZ3ZY.js";
65
- import "../chunk-5ZCZTTYX.js";
64
+ import "../chunk-EOZ665GA.js";
66
65
  import "../chunk-GGBE6KJV.js";
67
66
  import "../chunk-7QKCBSFU.js";
68
67
  import "../chunk-3NOV7X4M.js";
69
68
  import "../chunk-YO22XLHI.js";
70
69
  import "../chunk-JIS4PA3R.js";
71
70
  import "../chunk-WR6RQKF5.js";
72
- import "../chunk-MH5WPYQI.js";
71
+ import "../chunk-X7NEALMI.js";
73
72
  import "../chunk-BYUPW7RA.js";
74
73
  import "../chunk-GX2TWNLC.js";
75
74
  import "../chunk-WWED74SG.js";
@@ -94,7 +93,6 @@ export {
94
93
  getDeviceById,
95
94
  getDeviceConfig,
96
95
  getDeviceConnect,
97
- getDeviceCount,
98
96
  getDeviceFileDownloadLink,
99
97
  getDeviceInfo,
100
98
  getDeviceLimits,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/monitorSlice/index.ts","../../src/constants.ts"],"sourcesContent":["// Copyright 2023 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport type { Alert } from '@northern.tech/types/MenderTypes';\nimport { createSlice } from '@reduxjs/toolkit';\nimport type { PayloadAction } from '@reduxjs/toolkit';\n\nimport type { DeviceIssueOptionKey } from '../constants';\nimport { DEVICE_ISSUE_OPTIONS, DEVICE_LIST_DEFAULTS, alertChannels } from '../constants';\nimport type { AlertChannelKey } from './constants';\n\nexport const sliceName = 'monitor';\ntype IssueCounts = Record<DeviceIssueOptionKey, { filtered: number; total: number }>;\ntype ChannelSettings = Record<AlertChannelKey, { enabled: boolean }>;\ntype SanitizedAlert = Alert & { fullName?: string };\n\ntype MonitorSliceType = {\n alerts: {\n alertList: {\n page: number;\n perPage: number;\n total: number;\n };\n byDeviceId: { alerts?: Record<string, SanitizedAlert>; latest?: Record<string, SanitizedAlert> };\n };\n issueCounts: { byType: IssueCounts };\n settings: {\n global: {\n channels: ChannelSettings;\n };\n };\n};\nexport const initialState: MonitorSliceType = {\n alerts: {\n alertList: { ...DEVICE_LIST_DEFAULTS, total: 0 },\n byDeviceId: {}\n },\n issueCounts: {\n byType: Object.keys(DEVICE_ISSUE_OPTIONS).reduce<IssueCounts>((accu, key) => ({ ...accu, [key]: { filtered: 0, total: 0 } }), {} as IssueCounts)\n },\n settings: {\n global: {\n channels: {\n ...Object.keys(alertChannels).reduce((accu, item) => ({ ...accu, [item]: { enabled: true } }), {} as ChannelSettings)\n }\n }\n }\n};\n\nexport const monitorSlice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n changeAlertChannel: (state, action: PayloadAction<{ channel: AlertChannelKey; enabled: boolean }>) => {\n const { channel, enabled } = action.payload;\n state.settings.global.channels[channel] = { enabled };\n },\n receiveDeviceAlerts: (state, action: PayloadAction<{ alerts: SanitizedAlert[]; deviceId: string }>) => {\n const { deviceId, alerts } = action.payload;\n state.alerts.byDeviceId[deviceId] = { alerts };\n },\n receiveLatestDeviceAlerts: (state, action: PayloadAction<{ alerts: SanitizedAlert[]; deviceId: string }>) => {\n const { deviceId, alerts } = action.payload;\n state.alerts.byDeviceId[deviceId] = { ...state.alerts.byDeviceId[deviceId], latest: alerts };\n },\n receiveDeviceIssueCounts: (state, action: PayloadAction<{ counts: { filtered: number; total: number }; issueType: DeviceIssueOptionKey }>) => {\n const { issueType, counts } = action.payload;\n state.issueCounts.byType[issueType] = counts;\n },\n setAlertListState: (state, action) => {\n state.alerts.alertList = { ...state.alerts.alertList, ...action.payload };\n }\n }\n});\n\nexport const actions = monitorSlice.actions;\nexport default monitorSlice.reducer;\n","// Copyright 2024 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//@ts-nocheck\nimport {\n ALL_DEVICES,\n ALL_DEVICE_STATES,\n ALL_RELEASES,\n APPLICATION_JSON_CONTENT_TYPE,\n APPLICATION_JWT_CONTENT_TYPE,\n ATTRIBUTE_SCOPES,\n DEVICE_FILTERING_OPTIONS,\n DEVICE_ISSUE_OPTIONS,\n DEVICE_LIST_DEFAULTS,\n DEVICE_STATES,\n PermissionTypes,\n SORTING_OPTIONS,\n alertChannels,\n apiRoot,\n apiUrl,\n auditLogsApiUrl,\n defaultPermissionSets,\n deploymentsApiUrl,\n deploymentsApiUrlV2,\n deviceAuthV2,\n deviceConfig,\n deviceConnect,\n emptyRole,\n emptyUiPermissions,\n headerNames,\n inventoryApiUrl,\n inventoryApiUrlV2,\n iotManagerBaseURL,\n limitDefault,\n maxSessionAge,\n monitorApiUrlv1,\n reportingApiUrl,\n rolesById,\n rolesByName,\n scopedPermissionAreas,\n serviceProviderRolesById,\n ssoIdpApiUrlv1,\n tenantadmApiUrlv1,\n tenantadmApiUrlv2,\n twoFAStates,\n uiPermissionsByArea,\n uiPermissionsById,\n useradmApiUrl,\n useradmApiUrlv1,\n useradmApiUrlv2\n} from '@northern.tech/utils/constants';\nimport type {\n AnyPermission,\n AuditLogPermission,\n DeploymentPermission,\n DeviceIssueOptionKey,\n GroupsPermission,\n PermissionObject,\n PermissionSet,\n PermissionSetId,\n ReleasesPermission,\n Role,\n ScopedPermissionsByAreaKey,\n SortOptions,\n UiPermissionsByAreaKey,\n UiPermissionsByIdKey,\n UiPermissionsDefinition,\n UserManagementPermission\n} from '@northern.tech/utils/constants';\n\nexport {\n alertChannels,\n ALL_DEVICE_STATES,\n ALL_DEVICES,\n ALL_RELEASES,\n APPLICATION_JSON_CONTENT_TYPE,\n APPLICATION_JWT_CONTENT_TYPE,\n ATTRIBUTE_SCOPES,\n apiRoot,\n apiUrl,\n auditLogsApiUrl,\n defaultPermissionSets,\n deploymentsApiUrl,\n deploymentsApiUrlV2,\n DEVICE_FILTERING_OPTIONS,\n DEVICE_ISSUE_OPTIONS,\n DEVICE_LIST_DEFAULTS,\n DEVICE_STATES,\n deviceAuthV2,\n deviceConfig,\n deviceConnect,\n emptyRole,\n emptyUiPermissions,\n headerNames,\n inventoryApiUrl,\n inventoryApiUrlV2,\n iotManagerBaseURL,\n monitorApiUrlv1,\n limitDefault,\n maxSessionAge,\n PermissionTypes,\n reportingApiUrl,\n rolesById,\n rolesByName,\n scopedPermissionAreas,\n serviceProviderRolesById,\n SORTING_OPTIONS,\n ssoIdpApiUrlv1,\n tenantadmApiUrlv1,\n tenantadmApiUrlv2,\n twoFAStates,\n uiPermissionsByArea,\n uiPermissionsById,\n useradmApiUrl,\n useradmApiUrlv1,\n useradmApiUrlv2\n};\n\nexport type {\n AnyPermission,\n AuditLogPermission,\n DeploymentPermission,\n DeviceIssueOptionKey,\n GroupsPermission,\n PermissionObject,\n PermissionSet,\n PermissionSetId,\n ReleasesPermission,\n Role,\n ScopedPermissionsByAreaKey,\n SortOptions,\n UiPermissionsByAreaKey,\n UiPermissionsByIdKey,\n UiPermissionsDefinition,\n UserManagementPermission\n};\n\nexport * from './appSlice/constants';\nexport * from './commonConstants';\nexport * from './deploymentsSlice/constants';\nexport * from './devicesSlice/constants';\nexport * from './monitorSlice/constants';\nexport * from './onboardingSlice/constants';\nexport * from './organizationSlice/constants';\nexport * from './releasesSlice/constants';\nexport * from './usersSlice/constants';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcA,qBAA4B;;;ACA5B,uBA8CO;;;ADvCA,IAAM,YAAY;AAqBlB,IAAM,eAAiC;AAAA,EAC5C,QAAQ;AAAA,IACN,WAAW,EAAE,GAAG,uCAAsB,OAAO,EAAE;AAAA,IAC/C,YAAY,CAAC;AAAA,EACf;AAAA,EACA,aAAa;AAAA,IACX,QAAQ,OAAO,KAAK,qCAAoB,EAAE,OAAoB,CAAC,MAAM,SAAS,EAAE,GAAG,MAAM,CAAC,GAAG,GAAG,EAAE,UAAU,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,CAAgB;AAAA,EACjJ;AAAA,EACA,UAAU;AAAA,IACR,QAAQ;AAAA,MACN,UAAU;AAAA,QACR,GAAG,OAAO,KAAK,8BAAa,EAAE,OAAO,CAAC,MAAM,UAAU,EAAE,GAAG,MAAM,CAAC,IAAI,GAAG,EAAE,SAAS,KAAK,EAAE,IAAI,CAAC,CAAoB;AAAA,MACtH;AAAA,IACF;AAAA,EACF;AACF;AAEO,IAAM,mBAAe,4BAAY;AAAA,EACtC,MAAM;AAAA,EACN;AAAA,EACA,UAAU;AAAA,IACR,oBAAoB,CAAC,OAAO,WAA0E;AACpG,YAAM,EAAE,SAAS,QAAQ,IAAI,OAAO;AACpC,YAAM,SAAS,OAAO,SAAS,OAAO,IAAI,EAAE,QAAQ;AAAA,IACtD;AAAA,IACA,qBAAqB,CAAC,OAAO,WAA0E;AACrG,YAAM,EAAE,UAAU,OAAO,IAAI,OAAO;AACpC,YAAM,OAAO,WAAW,QAAQ,IAAI,EAAE,OAAO;AAAA,IAC/C;AAAA,IACA,2BAA2B,CAAC,OAAO,WAA0E;AAC3G,YAAM,EAAE,UAAU,OAAO,IAAI,OAAO;AACpC,YAAM,OAAO,WAAW,QAAQ,IAAI,EAAE,GAAG,MAAM,OAAO,WAAW,QAAQ,GAAG,QAAQ,OAAO;AAAA,IAC7F;AAAA,IACA,0BAA0B,CAAC,OAAO,WAA4G;AAC5I,YAAM,EAAE,WAAW,OAAO,IAAI,OAAO;AACrC,YAAM,YAAY,OAAO,SAAS,IAAI;AAAA,IACxC;AAAA,IACA,mBAAmB,CAAC,OAAO,WAAW;AACpC,YAAM,OAAO,YAAY,EAAE,GAAG,MAAM,OAAO,WAAW,GAAG,OAAO,QAAQ;AAAA,IAC1E;AAAA,EACF;AACF,CAAC;AAEM,IAAM,UAAU,aAAa;AACpC,IAAO,uBAAQ,aAAa;","names":[]}
1
+ {"version":3,"sources":["../../src/monitorSlice/index.ts","../../src/constants.ts"],"sourcesContent":["// Copyright 2023 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport type { Alert } from '@northern.tech/types/MenderTypes';\nimport { createSlice } from '@reduxjs/toolkit';\nimport type { PayloadAction } from '@reduxjs/toolkit';\n\nimport type { DeviceIssueOptionKey } from '../constants';\nimport { DEVICE_ISSUE_OPTIONS, DEVICE_LIST_DEFAULTS, alertChannels } from '../constants';\nimport type { AlertChannelKey } from './constants';\n\nexport const sliceName = 'monitor';\ntype IssueCounts = Record<DeviceIssueOptionKey, { filtered: number; total: number }>;\ntype ChannelSettings = Record<AlertChannelKey, { enabled: boolean }>;\ntype SanitizedAlert = Alert & { fullName?: string };\n\nexport type MonitorSliceType = {\n alerts: {\n alertList: {\n page: number;\n perPage: number;\n total: number;\n };\n byDeviceId: { alerts?: Record<string, SanitizedAlert>; latest?: Record<string, SanitizedAlert> };\n };\n issueCounts: { byType: IssueCounts };\n settings: {\n global: {\n channels: ChannelSettings;\n };\n };\n};\nexport const initialState: MonitorSliceType = {\n alerts: {\n alertList: { ...DEVICE_LIST_DEFAULTS, total: 0 },\n byDeviceId: {}\n },\n issueCounts: {\n byType: Object.keys(DEVICE_ISSUE_OPTIONS).reduce<IssueCounts>((accu, key) => ({ ...accu, [key]: { filtered: 0, total: 0 } }), {} as IssueCounts)\n },\n settings: {\n global: {\n channels: {\n ...Object.keys(alertChannels).reduce((accu, item) => ({ ...accu, [item]: { enabled: true } }), {} as ChannelSettings)\n }\n }\n }\n};\n\nexport const monitorSlice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n changeAlertChannel: (state, action: PayloadAction<{ channel: AlertChannelKey; enabled: boolean }>) => {\n const { channel, enabled } = action.payload;\n state.settings.global.channels[channel] = { enabled };\n },\n receiveDeviceAlerts: (state, action: PayloadAction<{ alerts: SanitizedAlert[]; deviceId: string }>) => {\n const { deviceId, alerts } = action.payload;\n state.alerts.byDeviceId[deviceId] = { alerts };\n },\n receiveLatestDeviceAlerts: (state, action: PayloadAction<{ alerts: SanitizedAlert[]; deviceId: string }>) => {\n const { deviceId, alerts } = action.payload;\n state.alerts.byDeviceId[deviceId] = { ...state.alerts.byDeviceId[deviceId], latest: alerts };\n },\n receiveDeviceIssueCounts: (state, action: PayloadAction<{ counts: { filtered: number; total: number }; issueType: DeviceIssueOptionKey }>) => {\n const { issueType, counts } = action.payload;\n state.issueCounts.byType[issueType] = counts;\n },\n setAlertListState: (state, action) => {\n state.alerts.alertList = { ...state.alerts.alertList, ...action.payload };\n }\n }\n});\n\nexport const actions = monitorSlice.actions;\nexport default monitorSlice.reducer;\n","// Copyright 2024 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//@ts-nocheck\nimport {\n ALL_DEVICES,\n ALL_DEVICE_STATES,\n ALL_RELEASES,\n APPLICATION_JSON_CONTENT_TYPE,\n APPLICATION_JWT_CONTENT_TYPE,\n ATTRIBUTE_SCOPES,\n DEVICE_FILTERING_OPTIONS,\n DEVICE_ISSUE_OPTIONS,\n DEVICE_LIST_DEFAULTS,\n DEVICE_STATES,\n PermissionTypes,\n SORTING_OPTIONS,\n alertChannels,\n apiRoot,\n apiUrl,\n auditLogsApiUrl,\n defaultPermissionSets,\n deploymentsApiUrl,\n deploymentsApiUrlV2,\n deviceAuthV2,\n deviceConfig,\n deviceConnect,\n emptyRole,\n emptyUiPermissions,\n headerNames,\n inventoryApiUrl,\n inventoryApiUrlV2,\n iotManagerBaseURL,\n limitDefault,\n maxSessionAge,\n monitorApiUrlv1,\n reportingApiUrl,\n rolesById,\n rolesByName,\n scopedPermissionAreas,\n serviceProviderRolesById,\n ssoIdpApiUrlv1,\n tenantadmApiUrlv1,\n tenantadmApiUrlv2,\n twoFAStates,\n uiPermissionsByArea,\n uiPermissionsById,\n useradmApiUrl,\n useradmApiUrlv1,\n useradmApiUrlv2\n} from '@northern.tech/utils/constants';\nimport type {\n AnyPermission,\n AuditLogPermission,\n DeploymentPermission,\n DeviceIssueOptionKey,\n GroupsPermission,\n PermissionObject,\n PermissionSet,\n PermissionSetId,\n ReleasesPermission,\n Role,\n ScopedPermissionsByAreaKey,\n SortOptions,\n UiPermissionsByAreaKey,\n UiPermissionsByIdKey,\n UiPermissionsDefinition,\n UserManagementPermission\n} from '@northern.tech/utils/constants';\n\nexport {\n alertChannels,\n ALL_DEVICE_STATES,\n ALL_DEVICES,\n ALL_RELEASES,\n APPLICATION_JSON_CONTENT_TYPE,\n APPLICATION_JWT_CONTENT_TYPE,\n ATTRIBUTE_SCOPES,\n apiRoot,\n apiUrl,\n auditLogsApiUrl,\n defaultPermissionSets,\n deploymentsApiUrl,\n deploymentsApiUrlV2,\n DEVICE_FILTERING_OPTIONS,\n DEVICE_ISSUE_OPTIONS,\n DEVICE_LIST_DEFAULTS,\n DEVICE_STATES,\n deviceAuthV2,\n deviceConfig,\n deviceConnect,\n emptyRole,\n emptyUiPermissions,\n headerNames,\n inventoryApiUrl,\n inventoryApiUrlV2,\n iotManagerBaseURL,\n monitorApiUrlv1,\n limitDefault,\n maxSessionAge,\n PermissionTypes,\n reportingApiUrl,\n rolesById,\n rolesByName,\n scopedPermissionAreas,\n serviceProviderRolesById,\n SORTING_OPTIONS,\n ssoIdpApiUrlv1,\n tenantadmApiUrlv1,\n tenantadmApiUrlv2,\n twoFAStates,\n uiPermissionsByArea,\n uiPermissionsById,\n useradmApiUrl,\n useradmApiUrlv1,\n useradmApiUrlv2\n};\n\nexport type {\n AnyPermission,\n AuditLogPermission,\n DeploymentPermission,\n DeviceIssueOptionKey,\n GroupsPermission,\n PermissionObject,\n PermissionSet,\n PermissionSetId,\n ReleasesPermission,\n Role,\n ScopedPermissionsByAreaKey,\n SortOptions,\n UiPermissionsByAreaKey,\n UiPermissionsByIdKey,\n UiPermissionsDefinition,\n UserManagementPermission\n};\n\nexport * from './appSlice/constants';\nexport * from './commonConstants';\nexport * from './deploymentsSlice/constants';\nexport * from './devicesSlice/constants';\nexport * from './monitorSlice/constants';\nexport * from './onboardingSlice/constants';\nexport * from './organizationSlice/constants';\nexport * from './releasesSlice/constants';\nexport * from './usersSlice/constants';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcA,qBAA4B;;;ACA5B,uBA8CO;;;ADvCA,IAAM,YAAY;AAqBlB,IAAM,eAAiC;AAAA,EAC5C,QAAQ;AAAA,IACN,WAAW,EAAE,GAAG,uCAAsB,OAAO,EAAE;AAAA,IAC/C,YAAY,CAAC;AAAA,EACf;AAAA,EACA,aAAa;AAAA,IACX,QAAQ,OAAO,KAAK,qCAAoB,EAAE,OAAoB,CAAC,MAAM,SAAS,EAAE,GAAG,MAAM,CAAC,GAAG,GAAG,EAAE,UAAU,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,CAAgB;AAAA,EACjJ;AAAA,EACA,UAAU;AAAA,IACR,QAAQ;AAAA,MACN,UAAU;AAAA,QACR,GAAG,OAAO,KAAK,8BAAa,EAAE,OAAO,CAAC,MAAM,UAAU,EAAE,GAAG,MAAM,CAAC,IAAI,GAAG,EAAE,SAAS,KAAK,EAAE,IAAI,CAAC,CAAoB;AAAA,MACtH;AAAA,IACF;AAAA,EACF;AACF;AAEO,IAAM,mBAAe,4BAAY;AAAA,EACtC,MAAM;AAAA,EACN;AAAA,EACA,UAAU;AAAA,IACR,oBAAoB,CAAC,OAAO,WAA0E;AACpG,YAAM,EAAE,SAAS,QAAQ,IAAI,OAAO;AACpC,YAAM,SAAS,OAAO,SAAS,OAAO,IAAI,EAAE,QAAQ;AAAA,IACtD;AAAA,IACA,qBAAqB,CAAC,OAAO,WAA0E;AACrG,YAAM,EAAE,UAAU,OAAO,IAAI,OAAO;AACpC,YAAM,OAAO,WAAW,QAAQ,IAAI,EAAE,OAAO;AAAA,IAC/C;AAAA,IACA,2BAA2B,CAAC,OAAO,WAA0E;AAC3G,YAAM,EAAE,UAAU,OAAO,IAAI,OAAO;AACpC,YAAM,OAAO,WAAW,QAAQ,IAAI,EAAE,GAAG,MAAM,OAAO,WAAW,QAAQ,GAAG,QAAQ,OAAO;AAAA,IAC7F;AAAA,IACA,0BAA0B,CAAC,OAAO,WAA4G;AAC5I,YAAM,EAAE,WAAW,OAAO,IAAI,OAAO;AACrC,YAAM,YAAY,OAAO,SAAS,IAAI;AAAA,IACxC;AAAA,IACA,mBAAmB,CAAC,OAAO,WAAW;AACpC,YAAM,OAAO,YAAY,EAAE,GAAG,MAAM,OAAO,WAAW,GAAG,OAAO,QAAQ;AAAA,IAC1E;AAAA,EACF;AACF,CAAC;AAEM,IAAM,UAAU,aAAa;AACpC,IAAO,uBAAQ,aAAa;","names":[]}
@@ -91,4 +91,4 @@ declare const actions: _reduxjs_toolkit.CaseReducerActions<{
91
91
  }, "monitor">;
92
92
  declare const _default: redux.Reducer<MonitorSliceType>;
93
93
 
94
- export { actions, _default as default, initialState, monitorSlice, sliceName };
94
+ export { type MonitorSliceType, actions, _default as default, initialState, monitorSlice, sliceName };
@@ -91,4 +91,4 @@ declare const actions: _reduxjs_toolkit.CaseReducerActions<{
91
91
  }, "monitor">;
92
92
  declare const _default: redux.Reducer<MonitorSliceType>;
93
93
 
94
- export { actions, _default as default, initialState, monitorSlice, sliceName };
94
+ export { type MonitorSliceType, actions, _default as default, initialState, monitorSlice, sliceName };
@@ -4,7 +4,7 @@ import {
4
4
  monitorSlice,
5
5
  monitorSlice_default,
6
6
  sliceName
7
- } from "../chunk-HLX5L3IM.js";
7
+ } from "../chunk-PVCHKW35.js";
8
8
  import "../chunk-WWED74SG.js";
9
9
  import "../chunk-2DYA3X77.js";
10
10
  import "../chunk-FAJ3I2UQ.js";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/monitorSlice/mocks.ts","../../src/constants.ts","../../src/monitorSlice/index.ts"],"sourcesContent":["// Copyright 2025 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport type { DeviceIssueOption } from '@northern.tech/utils/constants';\n\nimport { DEVICE_ISSUE_OPTIONS, DEVICE_LIST_DEFAULTS } from '../constants';\nimport { initialState } from './index';\n\nexport const mockState = {\n ...initialState,\n alerts: {\n alertList: { ...DEVICE_LIST_DEFAULTS, total: 0 },\n byDeviceId: {\n a1: {\n alerts: [\n {\n description: 'something',\n id: '31346239-3839-6262-2d63-3365622d3437',\n name: 'SSH Daemon is not running',\n device_id: 'a1',\n level: 'CRITICAL',\n subject: {\n name: 'sshd',\n type: 'systemd',\n status: 'not-running',\n details: { description: 'Jul 22 10:40:56 raspberrypi sshd[32031]: pam_unix(sshd:session): session closed for user root' }\n },\n timestamp: '2021-07-23T12:22:36Z'\n }\n ],\n latest: []\n }\n }\n },\n issueCounts: {\n byType: Object.values<DeviceIssueOption>(DEVICE_ISSUE_OPTIONS).reduce(\n (accu, { isCategory, key }) => {\n if (isCategory) {\n return accu;\n }\n accu[key] = accu[key] ?? { filtered: 0, total: 0 };\n return accu;\n },\n {\n [DEVICE_ISSUE_OPTIONS.authRequests.key]: { filtered: 0, total: 0 },\n [DEVICE_ISSUE_OPTIONS.monitoring.key]: { filtered: 3, total: 0 },\n [DEVICE_ISSUE_OPTIONS.offline.key]: { filtered: 0, total: 0 }\n }\n )\n },\n settings: {\n global: {\n channels: { email: { enabled: true } }\n }\n }\n};\n","// Copyright 2024 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//@ts-nocheck\nimport {\n ALL_DEVICES,\n ALL_DEVICE_STATES,\n ALL_RELEASES,\n APPLICATION_JSON_CONTENT_TYPE,\n APPLICATION_JWT_CONTENT_TYPE,\n ATTRIBUTE_SCOPES,\n DEVICE_FILTERING_OPTIONS,\n DEVICE_ISSUE_OPTIONS,\n DEVICE_LIST_DEFAULTS,\n DEVICE_STATES,\n PermissionTypes,\n SORTING_OPTIONS,\n alertChannels,\n apiRoot,\n apiUrl,\n auditLogsApiUrl,\n defaultPermissionSets,\n deploymentsApiUrl,\n deploymentsApiUrlV2,\n deviceAuthV2,\n deviceConfig,\n deviceConnect,\n emptyRole,\n emptyUiPermissions,\n headerNames,\n inventoryApiUrl,\n inventoryApiUrlV2,\n iotManagerBaseURL,\n limitDefault,\n maxSessionAge,\n monitorApiUrlv1,\n reportingApiUrl,\n rolesById,\n rolesByName,\n scopedPermissionAreas,\n serviceProviderRolesById,\n ssoIdpApiUrlv1,\n tenantadmApiUrlv1,\n tenantadmApiUrlv2,\n twoFAStates,\n uiPermissionsByArea,\n uiPermissionsById,\n useradmApiUrl,\n useradmApiUrlv1,\n useradmApiUrlv2\n} from '@northern.tech/utils/constants';\nimport type {\n AnyPermission,\n AuditLogPermission,\n DeploymentPermission,\n DeviceIssueOptionKey,\n GroupsPermission,\n PermissionObject,\n PermissionSet,\n PermissionSetId,\n ReleasesPermission,\n Role,\n ScopedPermissionsByAreaKey,\n SortOptions,\n UiPermissionsByAreaKey,\n UiPermissionsByIdKey,\n UiPermissionsDefinition,\n UserManagementPermission\n} from '@northern.tech/utils/constants';\n\nexport {\n alertChannels,\n ALL_DEVICE_STATES,\n ALL_DEVICES,\n ALL_RELEASES,\n APPLICATION_JSON_CONTENT_TYPE,\n APPLICATION_JWT_CONTENT_TYPE,\n ATTRIBUTE_SCOPES,\n apiRoot,\n apiUrl,\n auditLogsApiUrl,\n defaultPermissionSets,\n deploymentsApiUrl,\n deploymentsApiUrlV2,\n DEVICE_FILTERING_OPTIONS,\n DEVICE_ISSUE_OPTIONS,\n DEVICE_LIST_DEFAULTS,\n DEVICE_STATES,\n deviceAuthV2,\n deviceConfig,\n deviceConnect,\n emptyRole,\n emptyUiPermissions,\n headerNames,\n inventoryApiUrl,\n inventoryApiUrlV2,\n iotManagerBaseURL,\n monitorApiUrlv1,\n limitDefault,\n maxSessionAge,\n PermissionTypes,\n reportingApiUrl,\n rolesById,\n rolesByName,\n scopedPermissionAreas,\n serviceProviderRolesById,\n SORTING_OPTIONS,\n ssoIdpApiUrlv1,\n tenantadmApiUrlv1,\n tenantadmApiUrlv2,\n twoFAStates,\n uiPermissionsByArea,\n uiPermissionsById,\n useradmApiUrl,\n useradmApiUrlv1,\n useradmApiUrlv2\n};\n\nexport type {\n AnyPermission,\n AuditLogPermission,\n DeploymentPermission,\n DeviceIssueOptionKey,\n GroupsPermission,\n PermissionObject,\n PermissionSet,\n PermissionSetId,\n ReleasesPermission,\n Role,\n ScopedPermissionsByAreaKey,\n SortOptions,\n UiPermissionsByAreaKey,\n UiPermissionsByIdKey,\n UiPermissionsDefinition,\n UserManagementPermission\n};\n\nexport * from './appSlice/constants';\nexport * from './commonConstants';\nexport * from './deploymentsSlice/constants';\nexport * from './devicesSlice/constants';\nexport * from './monitorSlice/constants';\nexport * from './onboardingSlice/constants';\nexport * from './organizationSlice/constants';\nexport * from './releasesSlice/constants';\nexport * from './usersSlice/constants';\n","// Copyright 2023 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport type { Alert } from '@northern.tech/types/MenderTypes';\nimport { createSlice } from '@reduxjs/toolkit';\nimport type { PayloadAction } from '@reduxjs/toolkit';\n\nimport type { DeviceIssueOptionKey } from '../constants';\nimport { DEVICE_ISSUE_OPTIONS, DEVICE_LIST_DEFAULTS, alertChannels } from '../constants';\nimport type { AlertChannelKey } from './constants';\n\nexport const sliceName = 'monitor';\ntype IssueCounts = Record<DeviceIssueOptionKey, { filtered: number; total: number }>;\ntype ChannelSettings = Record<AlertChannelKey, { enabled: boolean }>;\ntype SanitizedAlert = Alert & { fullName?: string };\n\ntype MonitorSliceType = {\n alerts: {\n alertList: {\n page: number;\n perPage: number;\n total: number;\n };\n byDeviceId: { alerts?: Record<string, SanitizedAlert>; latest?: Record<string, SanitizedAlert> };\n };\n issueCounts: { byType: IssueCounts };\n settings: {\n global: {\n channels: ChannelSettings;\n };\n };\n};\nexport const initialState: MonitorSliceType = {\n alerts: {\n alertList: { ...DEVICE_LIST_DEFAULTS, total: 0 },\n byDeviceId: {}\n },\n issueCounts: {\n byType: Object.keys(DEVICE_ISSUE_OPTIONS).reduce<IssueCounts>((accu, key) => ({ ...accu, [key]: { filtered: 0, total: 0 } }), {} as IssueCounts)\n },\n settings: {\n global: {\n channels: {\n ...Object.keys(alertChannels).reduce((accu, item) => ({ ...accu, [item]: { enabled: true } }), {} as ChannelSettings)\n }\n }\n }\n};\n\nexport const monitorSlice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n changeAlertChannel: (state, action: PayloadAction<{ channel: AlertChannelKey; enabled: boolean }>) => {\n const { channel, enabled } = action.payload;\n state.settings.global.channels[channel] = { enabled };\n },\n receiveDeviceAlerts: (state, action: PayloadAction<{ alerts: SanitizedAlert[]; deviceId: string }>) => {\n const { deviceId, alerts } = action.payload;\n state.alerts.byDeviceId[deviceId] = { alerts };\n },\n receiveLatestDeviceAlerts: (state, action: PayloadAction<{ alerts: SanitizedAlert[]; deviceId: string }>) => {\n const { deviceId, alerts } = action.payload;\n state.alerts.byDeviceId[deviceId] = { ...state.alerts.byDeviceId[deviceId], latest: alerts };\n },\n receiveDeviceIssueCounts: (state, action: PayloadAction<{ counts: { filtered: number; total: number }; issueType: DeviceIssueOptionKey }>) => {\n const { issueType, counts } = action.payload;\n state.issueCounts.byType[issueType] = counts;\n },\n setAlertListState: (state, action) => {\n state.alerts.alertList = { ...state.alerts.alertList, ...action.payload };\n }\n }\n});\n\nexport const actions = monitorSlice.actions;\nexport default monitorSlice.reducer;\n"],"mappings":"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","names":[]}
1
+ {"version":3,"sources":["../../src/monitorSlice/mocks.ts","../../src/constants.ts","../../src/monitorSlice/index.ts"],"sourcesContent":["// Copyright 2025 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport type { DeviceIssueOption } from '@northern.tech/utils/constants';\n\nimport { DEVICE_ISSUE_OPTIONS, DEVICE_LIST_DEFAULTS } from '../constants';\nimport { initialState } from './index';\n\nexport const mockState = {\n ...initialState,\n alerts: {\n alertList: { ...DEVICE_LIST_DEFAULTS, total: 0 },\n byDeviceId: {\n a1: {\n alerts: [\n {\n description: 'something',\n id: '31346239-3839-6262-2d63-3365622d3437',\n name: 'SSH Daemon is not running',\n device_id: 'a1',\n level: 'CRITICAL',\n subject: {\n name: 'sshd',\n type: 'systemd',\n status: 'not-running',\n details: { description: 'Jul 22 10:40:56 raspberrypi sshd[32031]: pam_unix(sshd:session): session closed for user root' }\n },\n timestamp: '2021-07-23T12:22:36Z'\n }\n ],\n latest: []\n }\n }\n },\n issueCounts: {\n byType: Object.values<DeviceIssueOption>(DEVICE_ISSUE_OPTIONS).reduce(\n (accu, { isCategory, key }) => {\n if (isCategory) {\n return accu;\n }\n accu[key] = accu[key] ?? { filtered: 0, total: 0 };\n return accu;\n },\n {\n [DEVICE_ISSUE_OPTIONS.authRequests.key]: { filtered: 0, total: 0 },\n [DEVICE_ISSUE_OPTIONS.monitoring.key]: { filtered: 3, total: 0 },\n [DEVICE_ISSUE_OPTIONS.offline.key]: { filtered: 0, total: 0 }\n }\n )\n },\n settings: {\n global: {\n channels: { email: { enabled: true } }\n }\n }\n};\n","// Copyright 2024 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//@ts-nocheck\nimport {\n ALL_DEVICES,\n ALL_DEVICE_STATES,\n ALL_RELEASES,\n APPLICATION_JSON_CONTENT_TYPE,\n APPLICATION_JWT_CONTENT_TYPE,\n ATTRIBUTE_SCOPES,\n DEVICE_FILTERING_OPTIONS,\n DEVICE_ISSUE_OPTIONS,\n DEVICE_LIST_DEFAULTS,\n DEVICE_STATES,\n PermissionTypes,\n SORTING_OPTIONS,\n alertChannels,\n apiRoot,\n apiUrl,\n auditLogsApiUrl,\n defaultPermissionSets,\n deploymentsApiUrl,\n deploymentsApiUrlV2,\n deviceAuthV2,\n deviceConfig,\n deviceConnect,\n emptyRole,\n emptyUiPermissions,\n headerNames,\n inventoryApiUrl,\n inventoryApiUrlV2,\n iotManagerBaseURL,\n limitDefault,\n maxSessionAge,\n monitorApiUrlv1,\n reportingApiUrl,\n rolesById,\n rolesByName,\n scopedPermissionAreas,\n serviceProviderRolesById,\n ssoIdpApiUrlv1,\n tenantadmApiUrlv1,\n tenantadmApiUrlv2,\n twoFAStates,\n uiPermissionsByArea,\n uiPermissionsById,\n useradmApiUrl,\n useradmApiUrlv1,\n useradmApiUrlv2\n} from '@northern.tech/utils/constants';\nimport type {\n AnyPermission,\n AuditLogPermission,\n DeploymentPermission,\n DeviceIssueOptionKey,\n GroupsPermission,\n PermissionObject,\n PermissionSet,\n PermissionSetId,\n ReleasesPermission,\n Role,\n ScopedPermissionsByAreaKey,\n SortOptions,\n UiPermissionsByAreaKey,\n UiPermissionsByIdKey,\n UiPermissionsDefinition,\n UserManagementPermission\n} from '@northern.tech/utils/constants';\n\nexport {\n alertChannels,\n ALL_DEVICE_STATES,\n ALL_DEVICES,\n ALL_RELEASES,\n APPLICATION_JSON_CONTENT_TYPE,\n APPLICATION_JWT_CONTENT_TYPE,\n ATTRIBUTE_SCOPES,\n apiRoot,\n apiUrl,\n auditLogsApiUrl,\n defaultPermissionSets,\n deploymentsApiUrl,\n deploymentsApiUrlV2,\n DEVICE_FILTERING_OPTIONS,\n DEVICE_ISSUE_OPTIONS,\n DEVICE_LIST_DEFAULTS,\n DEVICE_STATES,\n deviceAuthV2,\n deviceConfig,\n deviceConnect,\n emptyRole,\n emptyUiPermissions,\n headerNames,\n inventoryApiUrl,\n inventoryApiUrlV2,\n iotManagerBaseURL,\n monitorApiUrlv1,\n limitDefault,\n maxSessionAge,\n PermissionTypes,\n reportingApiUrl,\n rolesById,\n rolesByName,\n scopedPermissionAreas,\n serviceProviderRolesById,\n SORTING_OPTIONS,\n ssoIdpApiUrlv1,\n tenantadmApiUrlv1,\n tenantadmApiUrlv2,\n twoFAStates,\n uiPermissionsByArea,\n uiPermissionsById,\n useradmApiUrl,\n useradmApiUrlv1,\n useradmApiUrlv2\n};\n\nexport type {\n AnyPermission,\n AuditLogPermission,\n DeploymentPermission,\n DeviceIssueOptionKey,\n GroupsPermission,\n PermissionObject,\n PermissionSet,\n PermissionSetId,\n ReleasesPermission,\n Role,\n ScopedPermissionsByAreaKey,\n SortOptions,\n UiPermissionsByAreaKey,\n UiPermissionsByIdKey,\n UiPermissionsDefinition,\n UserManagementPermission\n};\n\nexport * from './appSlice/constants';\nexport * from './commonConstants';\nexport * from './deploymentsSlice/constants';\nexport * from './devicesSlice/constants';\nexport * from './monitorSlice/constants';\nexport * from './onboardingSlice/constants';\nexport * from './organizationSlice/constants';\nexport * from './releasesSlice/constants';\nexport * from './usersSlice/constants';\n","// Copyright 2023 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport type { Alert } from '@northern.tech/types/MenderTypes';\nimport { createSlice } from '@reduxjs/toolkit';\nimport type { PayloadAction } from '@reduxjs/toolkit';\n\nimport type { DeviceIssueOptionKey } from '../constants';\nimport { DEVICE_ISSUE_OPTIONS, DEVICE_LIST_DEFAULTS, alertChannels } from '../constants';\nimport type { AlertChannelKey } from './constants';\n\nexport const sliceName = 'monitor';\ntype IssueCounts = Record<DeviceIssueOptionKey, { filtered: number; total: number }>;\ntype ChannelSettings = Record<AlertChannelKey, { enabled: boolean }>;\ntype SanitizedAlert = Alert & { fullName?: string };\n\nexport type MonitorSliceType = {\n alerts: {\n alertList: {\n page: number;\n perPage: number;\n total: number;\n };\n byDeviceId: { alerts?: Record<string, SanitizedAlert>; latest?: Record<string, SanitizedAlert> };\n };\n issueCounts: { byType: IssueCounts };\n settings: {\n global: {\n channels: ChannelSettings;\n };\n };\n};\nexport const initialState: MonitorSliceType = {\n alerts: {\n alertList: { ...DEVICE_LIST_DEFAULTS, total: 0 },\n byDeviceId: {}\n },\n issueCounts: {\n byType: Object.keys(DEVICE_ISSUE_OPTIONS).reduce<IssueCounts>((accu, key) => ({ ...accu, [key]: { filtered: 0, total: 0 } }), {} as IssueCounts)\n },\n settings: {\n global: {\n channels: {\n ...Object.keys(alertChannels).reduce((accu, item) => ({ ...accu, [item]: { enabled: true } }), {} as ChannelSettings)\n }\n }\n }\n};\n\nexport const monitorSlice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n changeAlertChannel: (state, action: PayloadAction<{ channel: AlertChannelKey; enabled: boolean }>) => {\n const { channel, enabled } = action.payload;\n state.settings.global.channels[channel] = { enabled };\n },\n receiveDeviceAlerts: (state, action: PayloadAction<{ alerts: SanitizedAlert[]; deviceId: string }>) => {\n const { deviceId, alerts } = action.payload;\n state.alerts.byDeviceId[deviceId] = { alerts };\n },\n receiveLatestDeviceAlerts: (state, action: PayloadAction<{ alerts: SanitizedAlert[]; deviceId: string }>) => {\n const { deviceId, alerts } = action.payload;\n state.alerts.byDeviceId[deviceId] = { ...state.alerts.byDeviceId[deviceId], latest: alerts };\n },\n receiveDeviceIssueCounts: (state, action: PayloadAction<{ counts: { filtered: number; total: number }; issueType: DeviceIssueOptionKey }>) => {\n const { issueType, counts } = action.payload;\n state.issueCounts.byType[issueType] = counts;\n },\n setAlertListState: (state, action) => {\n state.alerts.alertList = { ...state.alerts.alertList, ...action.payload };\n }\n }\n});\n\nexport const actions = monitorSlice.actions;\nexport default monitorSlice.reducer;\n"],"mappings":"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","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  initialState
3
- } from "../chunk-HLX5L3IM.js";
3
+ } from "../chunk-PVCHKW35.js";
4
4
  import {
5
5
  DEVICE_ISSUE_OPTIONS,
6
6
  DEVICE_LIST_DEFAULTS
@@ -1033,12 +1033,10 @@ var initialState4 = {
1033
1033
  // }
1034
1034
  },
1035
1035
  byStatus: {
1036
- [import_constants3.DEVICE_STATES.accepted]: { deviceIds: [], total: 0 },
1037
- active: { deviceIds: [], total: 0 },
1038
- inactive: { deviceIds: [], total: 0 },
1039
- [import_constants3.DEVICE_STATES.pending]: { deviceIds: [], total: 0 },
1040
- [import_constants3.DEVICE_STATES.preauth]: { deviceIds: [], total: 0 },
1041
- [import_constants3.DEVICE_STATES.rejected]: { deviceIds: [], total: 0 }
1036
+ [import_constants3.DEVICE_STATES.accepted]: { deviceIds: [], counts: { standard: 0, micro: 0, system: 0, total: 0 } },
1037
+ [import_constants3.DEVICE_STATES.pending]: { deviceIds: [], counts: { standard: 0, micro: 0, system: 0, total: 0 } },
1038
+ [import_constants3.DEVICE_STATES.preauth]: { deviceIds: [], counts: { standard: 0, micro: 0, system: 0, total: 0 } },
1039
+ [import_constants3.DEVICE_STATES.rejected]: { deviceIds: [], counts: { standard: 0, micro: 0, system: 0, total: 0 } }
1042
1040
  },
1043
1041
  deviceList: {
1044
1042
  deviceIds: [],
@@ -1168,21 +1166,19 @@ var devicesSlice = (0, import_toolkit4.createSlice)({
1168
1166
  }
1169
1167
  state.filters = action.payload.filter((filter) => filter.key && filter.operator && filter.scope && typeof filter.value !== "undefined");
1170
1168
  },
1171
- setInactiveDevices: (state, action) => {
1172
- const { activeDeviceTotal, inactiveDeviceTotal } = action.payload;
1173
- state.byStatus.active.total = activeDeviceTotal;
1174
- state.byStatus.inactive.total = inactiveDeviceTotal;
1175
- },
1176
1169
  setDeviceReports: (state, action) => {
1177
1170
  state.reports = action.payload;
1178
1171
  },
1179
1172
  setDevicesByStatus: (state, action) => {
1180
- const { forceUpdate, status, total, deviceIds } = action.payload;
1181
- state.byStatus[status] = total || forceUpdate ? { deviceIds, total } : state.byStatus[status];
1173
+ const { status, total, deviceIds } = action.payload;
1174
+ if (total) {
1175
+ state.byStatus[status].deviceIds = deviceIds;
1176
+ state.byStatus[status].counts.total = total;
1177
+ }
1182
1178
  },
1183
1179
  setDevicesCountByStatus: (state, action) => {
1184
- const { count, status } = action.payload;
1185
- state.byStatus[status].total = count;
1180
+ const { countsPerTier, status } = action.payload;
1181
+ state.byStatus[status].counts = { ...countsPerTier, total: Object.values(countsPerTier).reduce((accu, tieredCount) => accu += tieredCount, 0) };
1186
1182
  },
1187
1183
  setDeviceLimits: (state, action) => {
1188
1184
  state.limits = action.payload;
@@ -1199,7 +1195,15 @@ var devicesSlice = (0, import_toolkit4.createSlice)({
1199
1195
  const hasMultipleAuthSets = authId && device.auth_sets ? device.auth_sets.filter((authset) => authset.id !== authId).length > 0 : false;
1200
1196
  if (!hasMultipleAuthSets && Object.values(import_constants3.DEVICE_STATES).includes(device.status)) {
1201
1197
  const deviceIds = state.byStatus[device.status].deviceIds.filter((id) => id !== deviceId);
1202
- state.byStatus[device.status] = { deviceIds, total: Math.max(0, state.byStatus[device.status].total - 1) };
1198
+ const deviceTier = device.attributes.tier || "standard";
1199
+ state.byStatus[device.status] = {
1200
+ deviceIds,
1201
+ counts: {
1202
+ ...state.byStatus[device.status].counts,
1203
+ [deviceTier]: Math.max(0, state.byStatus[device.status].counts[deviceTier] - 1),
1204
+ total: Math.max(0, state.byStatus[device.status].counts.total - 1)
1205
+ }
1206
+ };
1203
1207
  }
1204
1208
  }
1205
1209
  }
@@ -1817,15 +1821,22 @@ var getDeviceIdentityAttributes = (0, import_toolkit11.createSelector)(
1817
1821
  );
1818
1822
  var getDeviceCountsByStatus = (0, import_toolkit11.createSelector)(
1819
1823
  [getDevicesByStatus],
1820
- (byStatus) => Object.values(import_constants3.DEVICE_STATES).reduce((accu, state) => {
1821
- accu[state] = byStatus[state].total || 0;
1822
- return accu;
1823
- }, {})
1824
+ (byStatus) => Object.values(import_constants3.DEVICE_STATES).reduce(
1825
+ (accu, deviceState) => {
1826
+ const { counts } = byStatus[deviceState];
1827
+ const { total, ...tieredCounts } = counts;
1828
+ const count = Object.values(tieredCounts).reduce((accu2, countPerTier) => accu2 + countPerTier, 0);
1829
+ accu[deviceState] = count;
1830
+ accu.total = accu.total + count;
1831
+ return accu;
1832
+ },
1833
+ { total: 0 }
1834
+ )
1824
1835
  );
1825
1836
  var getDeviceById = (0, import_toolkit11.createSelector)([getDevicesById, (_, deviceId) => deviceId], (devicesById, deviceId = "") => devicesById[deviceId] ?? {});
1826
1837
  var getSelectedGroupInfo = (0, import_toolkit11.createSelector)(
1827
- [getAcceptedDevices, getGroupsById, getSelectedGroup],
1828
- ({ total: acceptedDeviceTotal }, groupsById, selectedGroup) => {
1838
+ [getDeviceCountsByStatus, getGroupsById, getSelectedGroup],
1839
+ ({ accepted: acceptedDeviceTotal }, groupsById, selectedGroup) => {
1829
1840
  let groupCount = acceptedDeviceTotal;
1830
1841
  let groupFilters = [];
1831
1842
  if (selectedGroup && groupsById[selectedGroup]) {
@@ -1841,8 +1852,8 @@ var getCombinedLimit = (0, import_toolkit11.createSelector)(
1841
1852
  // limit might be -1 for unlimited devices
1842
1853
  );
1843
1854
  var getLimitMaxed = (0, import_toolkit11.createSelector)(
1844
- [getAcceptedDevices, getCombinedLimit],
1845
- ({ total: acceptedDevices = 0 }, combinedLimit) => !!combinedLimit && combinedLimit <= acceptedDevices
1855
+ [getDeviceCountsByStatus, getCombinedLimit],
1856
+ ({ accepted: acceptedDevices }, combinedLimit) => !!combinedLimit && combinedLimit <= acceptedDevices
1846
1857
  );
1847
1858
  var getGroupsByIdWithoutUngrouped = (0, import_toolkit11.createSelector)([getGroupsById], ({ [UNGROUPED_GROUP.id]: ungrouped, ...groups }) => groups);
1848
1859
  var getGroupData = (0, import_toolkit11.createSelector)([getGroupsByIdWithoutUngrouped], (groups) => {