@northern.tech/store 0.8.0 → 0.10.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 (141) hide show
  1. package/dist/actions.cjs +7 -3
  2. package/dist/actions.cjs.map +1 -1
  3. package/dist/actions.d.cts +1 -1
  4. package/dist/actions.d.ts +1 -1
  5. package/dist/actions.js +5 -5
  6. package/dist/api/general-api.js +1 -1
  7. package/dist/api/users-api.js +1 -1
  8. package/dist/appSlice/constants.cjs +2 -1
  9. package/dist/appSlice/constants.cjs.map +1 -1
  10. package/dist/appSlice/constants.js +1 -1
  11. package/dist/appSlice/index.js +1 -1
  12. package/dist/appSlice/mocks.js +1 -1
  13. package/dist/appSlice/thunks.cjs +18 -8
  14. package/dist/appSlice/thunks.cjs.map +1 -1
  15. package/dist/appSlice/thunks.js +16 -16
  16. package/dist/auth.js +1 -1
  17. package/dist/{chunk-DJXS3LMY.js → chunk-2KT4PX3H.js} +10 -10
  18. package/dist/{chunk-RJKAD2TK.js → chunk-2S4DM4MI.js} +17 -17
  19. package/dist/{chunk-Z5TDXPYZ.js → chunk-7QKCBSFU.js} +2 -2
  20. package/dist/{chunk-IY3OCILF.js → chunk-DIBKFSC7.js} +25 -25
  21. package/dist/chunk-DIBKFSC7.js.map +1 -0
  22. package/dist/{chunk-H5YHKATI.js → chunk-GGBE6KJV.js} +2 -2
  23. package/dist/{chunk-2TYNHR66.js → chunk-GX2TWNLC.js} +2 -2
  24. package/dist/{chunk-IURSNZM7.js → chunk-J5KNRQFA.js} +6 -6
  25. package/dist/{chunk-N3XU7WJM.js → chunk-OWWCFJZ5.js} +3 -2
  26. package/dist/chunk-OWWCFJZ5.js.map +1 -0
  27. package/dist/{chunk-KQ6AGXRK.js → chunk-REZWSU22.js} +8 -4
  28. package/dist/chunk-REZWSU22.js.map +1 -0
  29. package/dist/{chunk-UVYRVFZX.js → chunk-SE22RKCE.js} +11 -5
  30. package/dist/chunk-SE22RKCE.js.map +1 -0
  31. package/dist/{chunk-FCHMFLKB.js → chunk-YYA5MPLL.js} +8 -8
  32. package/dist/{chunk-EF4FYV4X.js → chunk-ZK2CPOZO.js} +6 -6
  33. package/dist/commonConstants.js +1 -1
  34. package/dist/commonSelectors.cjs +9 -3
  35. package/dist/commonSelectors.cjs.map +1 -1
  36. package/dist/commonSelectors.js +8 -8
  37. package/dist/constants.cjs +2 -1
  38. package/dist/constants.cjs.map +1 -1
  39. package/dist/constants.js +1 -1
  40. package/dist/deploymentsSlice/constants.js +1 -1
  41. package/dist/deploymentsSlice/index.js +1 -1
  42. package/dist/deploymentsSlice/mocks.js +1 -1
  43. package/dist/deploymentsSlice/selectors.js +1 -1
  44. package/dist/deploymentsSlice/thunks.cjs +18 -8
  45. package/dist/deploymentsSlice/thunks.cjs.map +1 -1
  46. package/dist/deploymentsSlice/thunks.js +16 -16
  47. package/dist/devicesSlice/constants.js +1 -1
  48. package/dist/devicesSlice/index.cjs +7 -3
  49. package/dist/devicesSlice/index.cjs.map +1 -1
  50. package/dist/devicesSlice/index.d.cts +4 -4
  51. package/dist/devicesSlice/index.d.ts +4 -4
  52. package/dist/devicesSlice/index.js +2 -2
  53. package/dist/devicesSlice/mocks.cjs +8 -4
  54. package/dist/devicesSlice/mocks.cjs.map +1 -1
  55. package/dist/devicesSlice/mocks.d.cts +5 -1
  56. package/dist/devicesSlice/mocks.d.ts +5 -1
  57. package/dist/devicesSlice/mocks.js +3 -3
  58. package/dist/devicesSlice/mocks.js.map +1 -1
  59. package/dist/devicesSlice/selectors.cjs +12 -5
  60. package/dist/devicesSlice/selectors.cjs.map +1 -1
  61. package/dist/devicesSlice/selectors.d.cts +310 -3
  62. package/dist/devicesSlice/selectors.d.ts +310 -3
  63. package/dist/devicesSlice/selectors.js +6 -4
  64. package/dist/devicesSlice/thunks.cjs +20 -10
  65. package/dist/devicesSlice/thunks.cjs.map +1 -1
  66. package/dist/devicesSlice/thunks.d.cts +5 -5
  67. package/dist/devicesSlice/thunks.d.ts +5 -5
  68. package/dist/devicesSlice/thunks.js +18 -18
  69. package/dist/liststatehook.js +1 -1
  70. package/dist/locationutils.js +1 -1
  71. package/dist/monitorSlice/index.js +1 -1
  72. package/dist/monitorSlice/mocks.js +1 -1
  73. package/dist/monitorSlice/thunks.cjs +16 -6
  74. package/dist/monitorSlice/thunks.cjs.map +1 -1
  75. package/dist/monitorSlice/thunks.js +14 -14
  76. package/dist/onboardingSlice/thunks.cjs +18 -8
  77. package/dist/onboardingSlice/thunks.cjs.map +1 -1
  78. package/dist/onboardingSlice/thunks.js +16 -16
  79. package/dist/organizationSlice/constants.js +1 -1
  80. package/dist/organizationSlice/index.js +1 -1
  81. package/dist/organizationSlice/mocks.js +1 -1
  82. package/dist/organizationSlice/selectors.js +1 -1
  83. package/dist/organizationSlice/thunks.cjs +20 -10
  84. package/dist/organizationSlice/thunks.cjs.map +1 -1
  85. package/dist/organizationSlice/thunks.d.cts +3 -3
  86. package/dist/organizationSlice/thunks.d.ts +3 -3
  87. package/dist/organizationSlice/thunks.js +16 -16
  88. package/dist/releasesSlice/index.js +1 -1
  89. package/dist/releasesSlice/mocks.js +1 -1
  90. package/dist/releasesSlice/selectors.js +3 -3
  91. package/dist/releasesSlice/thunks.cjs +16 -6
  92. package/dist/releasesSlice/thunks.cjs.map +1 -1
  93. package/dist/releasesSlice/thunks.js +14 -14
  94. package/dist/selectors.cjs +13 -5
  95. package/dist/selectors.cjs.map +1 -1
  96. package/dist/selectors.d.cts +1 -1
  97. package/dist/selectors.d.ts +1 -1
  98. package/dist/selectors.js +26 -24
  99. package/dist/sockethook.cjs.map +1 -1
  100. package/dist/sockethook.js +1 -1
  101. package/dist/sockethook.js.map +1 -1
  102. package/dist/store.cjs +7 -3
  103. package/dist/store.cjs.map +1 -1
  104. package/dist/store.js +6 -6
  105. package/dist/storehooks.cjs +29 -16
  106. package/dist/storehooks.cjs.map +1 -1
  107. package/dist/storehooks.js +27 -24
  108. package/dist/storehooks.js.map +1 -1
  109. package/dist/thunks.cjs +22 -12
  110. package/dist/thunks.cjs.map +1 -1
  111. package/dist/thunks.d.cts +1 -1
  112. package/dist/thunks.d.ts +1 -1
  113. package/dist/thunks.js +18 -18
  114. package/dist/useDeploymentDevice.cjs +18 -8
  115. package/dist/useDeploymentDevice.cjs.map +1 -1
  116. package/dist/useDeploymentDevice.js +17 -17
  117. package/dist/usersSlice/constants.js +1 -1
  118. package/dist/usersSlice/index.js +1 -1
  119. package/dist/usersSlice/mocks.js +1 -1
  120. package/dist/usersSlice/selectors.cjs +1 -0
  121. package/dist/usersSlice/selectors.cjs.map +1 -1
  122. package/dist/usersSlice/selectors.js +3 -3
  123. package/dist/usersSlice/thunks.cjs +18 -8
  124. package/dist/usersSlice/thunks.cjs.map +1 -1
  125. package/dist/usersSlice/thunks.js +16 -16
  126. package/dist/utils.cjs +1 -0
  127. package/dist/utils.cjs.map +1 -1
  128. package/dist/utils.js +2 -2
  129. package/package.json +7 -7
  130. package/dist/chunk-IY3OCILF.js.map +0 -1
  131. package/dist/chunk-KQ6AGXRK.js.map +0 -1
  132. package/dist/chunk-N3XU7WJM.js.map +0 -1
  133. package/dist/chunk-UVYRVFZX.js.map +0 -1
  134. /package/dist/{chunk-DJXS3LMY.js.map → chunk-2KT4PX3H.js.map} +0 -0
  135. /package/dist/{chunk-RJKAD2TK.js.map → chunk-2S4DM4MI.js.map} +0 -0
  136. /package/dist/{chunk-Z5TDXPYZ.js.map → chunk-7QKCBSFU.js.map} +0 -0
  137. /package/dist/{chunk-H5YHKATI.js.map → chunk-GGBE6KJV.js.map} +0 -0
  138. /package/dist/{chunk-2TYNHR66.js.map → chunk-GX2TWNLC.js.map} +0 -0
  139. /package/dist/{chunk-IURSNZM7.js.map → chunk-J5KNRQFA.js.map} +0 -0
  140. /package/dist/{chunk-FCHMFLKB.js.map → chunk-YYA5MPLL.js.map} +0 -0
  141. /package/dist/{chunk-EF4FYV4X.js.map → chunk-ZK2CPOZO.js.map} +0 -0
@@ -240,7 +240,7 @@ declare const getSortedFilteringAttributes: ((state: {
240
240
  memoize: typeof reselect.weakMapMemoize;
241
241
  argsMemoize: typeof reselect.weakMapMemoize;
242
242
  };
243
- declare const getDeviceLimit: (state: RootState) => number;
243
+ declare const getDeviceLimits: (state: RootState) => _northern_tech_types_types_gen.DeviceTierLimits;
244
244
  declare const getDeviceIdentityAttributes: ((state: {
245
245
  app: {
246
246
  cancelSource: any;
@@ -789,6 +789,160 @@ declare const getSelectedGroupInfo: ((state: {
789
789
  memoize: typeof reselect.weakMapMemoize;
790
790
  argsMemoize: typeof reselect.weakMapMemoize;
791
791
  };
792
+ declare const getCombinedLimit: ((state: {
793
+ app: {
794
+ cancelSource: any;
795
+ commit: string;
796
+ demoArtifactLink: string;
797
+ docsVersion: string;
798
+ features: Record<string, boolean>;
799
+ feedbackProbability: number;
800
+ firstLoginAfterSignup: boolean;
801
+ hostAddress: string | null;
802
+ hostedAnnouncement: string;
803
+ newThreshold: string;
804
+ offlineThreshold: string;
805
+ recaptchaSiteKey: string;
806
+ searchState: SearchState;
807
+ sentry: SentryConfig;
808
+ snackbar: SnackbarContent;
809
+ stripeAPIKey: string;
810
+ trackerCode: string;
811
+ uploadsById: Record<string, Upload>;
812
+ versionInformation: {
813
+ [key: string]: string | {
814
+ releaseDate: string;
815
+ repos: Record<string, string>;
816
+ } | undefined;
817
+ backend?: string;
818
+ GUI?: string;
819
+ latestRelease?: {
820
+ releaseDate: string;
821
+ repos: Record<string, string>;
822
+ };
823
+ };
824
+ yesterday?: string;
825
+ };
826
+ devices: DeviceSliceType;
827
+ deployments: {
828
+ byId: Record<string, Deployment>;
829
+ byStatus: DeploymentByStatus;
830
+ config: DeploymentConfig;
831
+ deploymentDeviceLimit: number;
832
+ selectedDeviceIds: string[];
833
+ selectionState: SelectionState;
834
+ };
835
+ monitor: {
836
+ alerts: {
837
+ alertList: {
838
+ page: number;
839
+ perPage: number;
840
+ total: number;
841
+ };
842
+ byDeviceId: {
843
+ alerts?: Record<string, _northern_tech_types_types_gen.Alert & {
844
+ fullName?: string;
845
+ }>;
846
+ latest?: Record<string, _northern_tech_types_types_gen.Alert & {
847
+ fullName?: string;
848
+ }>;
849
+ };
850
+ };
851
+ issueCounts: {
852
+ byType: {
853
+ issues: {
854
+ filtered: number;
855
+ total: number;
856
+ };
857
+ offline: {
858
+ filtered: number;
859
+ total: number;
860
+ };
861
+ failedLastUpdate: {
862
+ filtered: number;
863
+ total: number;
864
+ };
865
+ monitoring: {
866
+ filtered: number;
867
+ total: number;
868
+ };
869
+ authRequests: {
870
+ filtered: number;
871
+ total: number;
872
+ };
873
+ gatewayDevices: {
874
+ filtered: number;
875
+ total: number;
876
+ };
877
+ };
878
+ };
879
+ settings: {
880
+ global: {
881
+ channels: {
882
+ email: {
883
+ enabled: boolean;
884
+ };
885
+ };
886
+ };
887
+ };
888
+ };
889
+ onboarding: {
890
+ address?: string;
891
+ approach: OnboardingApproach | null;
892
+ complete: boolean;
893
+ demoArtifactPort: number;
894
+ deviceConnection?: string;
895
+ deviceType: string[] | string | null;
896
+ progress: string | null;
897
+ showTips: boolean | null;
898
+ showTipsDialog: boolean;
899
+ };
900
+ organization: OrganizationState;
901
+ releases: ReleaseSliceType;
902
+ users: {
903
+ activationCode?: string;
904
+ byId: Record<string, User>;
905
+ currentSession?: UserSession | object;
906
+ currentUser: string | null;
907
+ customColumns: CustomColumn[];
908
+ globalSettings: GlobalSettings;
909
+ permissionSetsById: Record<string, _northern_tech_utils_constants.PermissionSet>;
910
+ qrCode: string | null;
911
+ rolesById: Record<string, _northern_tech_utils_constants.Role>;
912
+ rolesInitialized: boolean;
913
+ settingsInitialized: boolean;
914
+ showConnectDeviceDialog: boolean;
915
+ showFeedbackDialog: boolean;
916
+ showStartupNotification: boolean;
917
+ tooltips: {
918
+ byId: Record<string, {
919
+ readState: ReadState;
920
+ }>;
921
+ };
922
+ userSettings: UserSettings;
923
+ userSettingsInitialized: boolean;
924
+ };
925
+ }) => number) & {
926
+ clearCache: () => void;
927
+ resultsCount: () => number;
928
+ resetResultsCount: () => void;
929
+ } & {
930
+ resultFunc: (resultFuncArgs_0: _northern_tech_types_types_gen.DeviceTierLimits) => number;
931
+ memoizedResultFunc: ((resultFuncArgs_0: _northern_tech_types_types_gen.DeviceTierLimits) => number) & {
932
+ clearCache: () => void;
933
+ resultsCount: () => number;
934
+ resetResultsCount: () => void;
935
+ };
936
+ lastResult: () => number;
937
+ dependencies: [(state: RootState) => _northern_tech_types_types_gen.DeviceTierLimits];
938
+ recomputations: () => number;
939
+ resetRecomputations: () => void;
940
+ dependencyRecomputations: () => number;
941
+ resetDependencyRecomputations: () => void;
942
+ } & {
943
+ memoize: typeof reselect.weakMapMemoize;
944
+ argsMemoize: typeof reselect.weakMapMemoize;
945
+ };
792
946
  declare const getLimitMaxed: ((state: {
793
947
  app: {
794
948
  cancelSource: any;
@@ -943,7 +1097,160 @@ declare const getLimitMaxed: ((state: {
943
1097
  dependencies: [(state: RootState) => {
944
1098
  deviceIds: string[];
945
1099
  total: number;
946
- }, (state: RootState) => number];
1100
+ }, ((state: {
1101
+ app: {
1102
+ cancelSource: any;
1103
+ commit: string;
1104
+ demoArtifactLink: string;
1105
+ docsVersion: string;
1106
+ features: Record<string, boolean>;
1107
+ feedbackProbability: number;
1108
+ firstLoginAfterSignup: boolean;
1109
+ hostAddress: string | null;
1110
+ hostedAnnouncement: string;
1111
+ newThreshold: string;
1112
+ offlineThreshold: string;
1113
+ recaptchaSiteKey: string;
1114
+ searchState: SearchState;
1115
+ sentry: SentryConfig;
1116
+ snackbar: SnackbarContent;
1117
+ stripeAPIKey: string;
1118
+ trackerCode: string;
1119
+ uploadsById: Record<string, Upload>;
1120
+ versionInformation: {
1121
+ [key: string]: string | {
1122
+ releaseDate: string;
1123
+ repos: Record<string, string>;
1124
+ } | undefined;
1125
+ backend?: string;
1126
+ GUI?: string;
1127
+ latestRelease?: {
1128
+ releaseDate: string;
1129
+ repos: Record<string, string>;
1130
+ };
1131
+ };
1132
+ yesterday?: string;
1133
+ };
1134
+ devices: DeviceSliceType;
1135
+ deployments: {
1136
+ byId: Record<string, Deployment>;
1137
+ byStatus: DeploymentByStatus;
1138
+ config: DeploymentConfig;
1139
+ deploymentDeviceLimit: number;
1140
+ selectedDeviceIds: string[];
1141
+ selectionState: SelectionState;
1142
+ };
1143
+ monitor: {
1144
+ alerts: {
1145
+ alertList: {
1146
+ page: number;
1147
+ perPage: number;
1148
+ total: number;
1149
+ };
1150
+ byDeviceId: {
1151
+ alerts?: Record<string, _northern_tech_types_types_gen.Alert & {
1152
+ fullName?: string;
1153
+ }>;
1154
+ latest?: Record<string, _northern_tech_types_types_gen.Alert & {
1155
+ fullName?: string;
1156
+ }>;
1157
+ };
1158
+ };
1159
+ issueCounts: {
1160
+ byType: {
1161
+ issues: {
1162
+ filtered: number;
1163
+ total: number;
1164
+ };
1165
+ offline: {
1166
+ filtered: number;
1167
+ total: number;
1168
+ };
1169
+ failedLastUpdate: {
1170
+ filtered: number;
1171
+ total: number;
1172
+ };
1173
+ monitoring: {
1174
+ filtered: number;
1175
+ total: number;
1176
+ };
1177
+ authRequests: {
1178
+ filtered: number;
1179
+ total: number;
1180
+ };
1181
+ gatewayDevices: {
1182
+ filtered: number;
1183
+ total: number;
1184
+ };
1185
+ };
1186
+ };
1187
+ settings: {
1188
+ global: {
1189
+ channels: {
1190
+ email: {
1191
+ enabled: boolean;
1192
+ };
1193
+ };
1194
+ };
1195
+ };
1196
+ };
1197
+ onboarding: {
1198
+ address?: string;
1199
+ approach: OnboardingApproach | null;
1200
+ complete: boolean;
1201
+ demoArtifactPort: number;
1202
+ deviceConnection?: string;
1203
+ deviceType: string[] | string | null;
1204
+ progress: string | null;
1205
+ showTips: boolean | null;
1206
+ showTipsDialog: boolean;
1207
+ };
1208
+ organization: OrganizationState;
1209
+ releases: ReleaseSliceType;
1210
+ users: {
1211
+ activationCode?: string;
1212
+ byId: Record<string, User>;
1213
+ currentSession?: UserSession | object;
1214
+ currentUser: string | null;
1215
+ customColumns: CustomColumn[];
1216
+ globalSettings: GlobalSettings;
1217
+ permissionSetsById: Record<string, _northern_tech_utils_constants.PermissionSet>;
1218
+ qrCode: string | null;
1219
+ rolesById: Record<string, _northern_tech_utils_constants.Role>;
1220
+ rolesInitialized: boolean;
1221
+ settingsInitialized: boolean;
1222
+ showConnectDeviceDialog: boolean;
1223
+ showFeedbackDialog: boolean;
1224
+ showStartupNotification: boolean;
1225
+ tooltips: {
1226
+ byId: Record<string, {
1227
+ readState: ReadState;
1228
+ }>;
1229
+ };
1230
+ userSettings: UserSettings;
1231
+ userSettingsInitialized: boolean;
1232
+ };
1233
+ }) => number) & {
1234
+ clearCache: () => void;
1235
+ resultsCount: () => number;
1236
+ resetResultsCount: () => void;
1237
+ } & {
1238
+ resultFunc: (resultFuncArgs_0: _northern_tech_types_types_gen.DeviceTierLimits) => number;
1239
+ memoizedResultFunc: ((resultFuncArgs_0: _northern_tech_types_types_gen.DeviceTierLimits) => number) & {
1240
+ clearCache: () => void;
1241
+ resultsCount: () => number;
1242
+ resetResultsCount: () => void;
1243
+ };
1244
+ lastResult: () => number;
1245
+ dependencies: [(state: RootState) => _northern_tech_types_types_gen.DeviceTierLimits];
1246
+ recomputations: () => number;
1247
+ resetRecomputations: () => void;
1248
+ dependencyRecomputations: () => number;
1249
+ resetDependencyRecomputations: () => void;
1250
+ } & {
1251
+ memoize: typeof reselect.weakMapMemoize;
1252
+ argsMemoize: typeof reselect.weakMapMemoize;
1253
+ }];
947
1254
  recomputations: () => number;
948
1255
  resetRecomputations: () => void;
949
1256
  dependencyRecomputations: () => number;
@@ -1967,4 +2274,4 @@ declare const getDeviceTypes: ((state: {
1967
2274
  argsMemoize: typeof reselect.weakMapMemoize;
1968
2275
  };
1969
2276
 
1970
- export { getAcceptedDevices, getAttributesList, getDeviceById, getDeviceCountsByStatus, getDeviceFilters, getDeviceIdentityAttributes, getDeviceLimit, getDeviceListState, getDeviceReports, getDeviceTypes, getDevicesById, getDevicesByStatus, getFilteringAttributes, getGroupData, getGroups, getGroupsById, getGroupsByIdWithoutUngrouped, getLimitMaxed, getListedDevices, getSelectedGroup, getSelectedGroupInfo, getSortedFilteringAttributes };
2277
+ export { getAcceptedDevices, getAttributesList, getCombinedLimit, getDeviceById, getDeviceCountsByStatus, getDeviceFilters, getDeviceIdentityAttributes, getDeviceLimits, getDeviceListState, getDeviceReports, getDeviceTypes, getDevicesById, getDevicesByStatus, getFilteringAttributes, getGroupData, getGroups, getGroupsById, getGroupsByIdWithoutUngrouped, getLimitMaxed, getListedDevices, getSelectedGroup, getSelectedGroupInfo, getSortedFilteringAttributes };
@@ -1,11 +1,12 @@
1
1
  import {
2
2
  getAcceptedDevices,
3
3
  getAttributesList,
4
+ getCombinedLimit,
4
5
  getDeviceById,
5
6
  getDeviceCountsByStatus,
6
7
  getDeviceFilters,
7
8
  getDeviceIdentityAttributes,
8
- getDeviceLimit,
9
+ getDeviceLimits,
9
10
  getDeviceListState,
10
11
  getDeviceReports,
11
12
  getDeviceTypes,
@@ -21,20 +22,21 @@ import {
21
22
  getSelectedGroup,
22
23
  getSelectedGroupInfo,
23
24
  getSortedFilteringAttributes
24
- } from "../chunk-UVYRVFZX.js";
25
+ } from "../chunk-SE22RKCE.js";
25
26
  import "../chunk-WWED74SG.js";
26
27
  import "../chunk-2DYA3X77.js";
27
28
  import "../chunk-FAJ3I2UQ.js";
28
29
  import "../chunk-ZKAH3APE.js";
29
- import "../chunk-N3XU7WJM.js";
30
+ import "../chunk-OWWCFJZ5.js";
30
31
  export {
31
32
  getAcceptedDevices,
32
33
  getAttributesList,
34
+ getCombinedLimit,
33
35
  getDeviceById,
34
36
  getDeviceCountsByStatus,
35
37
  getDeviceFilters,
36
38
  getDeviceIdentityAttributes,
37
- getDeviceLimit,
39
+ getDeviceLimits,
38
40
  getDeviceListState,
39
41
  getDeviceReports,
40
42
  getDeviceTypes,
@@ -49,7 +49,7 @@ __export(thunks_exports, {
49
49
  getDeviceCount: () => getDeviceCount,
50
50
  getDeviceFileDownloadLink: () => getDeviceFileDownloadLink,
51
51
  getDeviceInfo: () => getDeviceInfo,
52
- getDeviceLimit: () => getDeviceLimit2,
52
+ getDeviceLimits: () => getDeviceLimits2,
53
53
  getDeviceTwin: () => getDeviceTwin,
54
54
  getDevicesByStatus: () => getDevicesByStatus2,
55
55
  getDevicesWithAuth: () => getDevicesWithAuth,
@@ -92,6 +92,7 @@ var import_constants5 = require("@northern.tech/utils/constants");
92
92
 
93
93
  // src/appSlice/constants.ts
94
94
  var import_icons_material = require("@mui/icons-material");
95
+ var import_utils = require("@northern.tech/utils");
95
96
  var startingDeviceCount = {
96
97
  os: "for first 50 devices",
97
98
  professional: "for first 250 devices"
@@ -850,7 +851,11 @@ var initialState = {
850
851
  // { items: [{ key: "someKey", count: 42 }], otherCount: 123, total: <otherCount + itemsCount> }
851
852
  ],
852
853
  total: 0,
853
- limit: 0,
854
+ limits: {
855
+ standard: 0,
856
+ micro: 0,
857
+ system: 0
858
+ },
854
859
  groups: {
855
860
  byId: {
856
861
  // groupName: { deviceIds: [], total: 0, filters: [] },
@@ -956,8 +961,8 @@ var devicesSlice = (0, import_toolkit.createSlice)({
956
961
  const { count, status } = action.payload;
957
962
  state.byStatus[status].total = count;
958
963
  },
959
- setDeviceLimit: (state, action) => {
960
- state.limit = action.payload;
964
+ setDeviceLimits: (state, action) => {
965
+ state.limits = action.payload;
961
966
  },
962
967
  receivedDevice: (state, action) => {
963
968
  state.byId[action.payload.id] = {
@@ -1883,7 +1888,7 @@ var getSortedFilteringAttributes = (0, import_toolkit11.createSelector)([getFilt
1883
1888
  ...filteringAttributes,
1884
1889
  identityAttributes: [...filteringAttributes.identityAttributes, "id"]
1885
1890
  }));
1886
- var getDeviceLimit = (state) => state.devices.limit;
1891
+ var getDeviceLimits = (state) => state.devices.limits;
1887
1892
  var getFilteringAttributesLimit = (state) => state.devices.filteringAttributesLimit;
1888
1893
  var getDeviceIdentityAttributes = (0, import_toolkit11.createSelector)(
1889
1894
  [getFilteringAttributes, getFilteringAttributesLimit],
@@ -1921,9 +1926,14 @@ var getSelectedGroupInfo = (0, import_toolkit11.createSelector)(
1921
1926
  return { groupCount, selectedGroup, groupFilters };
1922
1927
  }
1923
1928
  );
1929
+ var getCombinedLimit = (0, import_toolkit11.createSelector)(
1930
+ [getDeviceLimits],
1931
+ (deviceLimits) => Object.values(deviceLimits).reduce((accu, limit) => accu + Math.max(limit ?? 0, 0), 0)
1932
+ // limit might be -1 for unlimited devices
1933
+ );
1924
1934
  var getLimitMaxed = (0, import_toolkit11.createSelector)(
1925
- [getAcceptedDevices, getDeviceLimit],
1926
- ({ total: acceptedDevices = 0 }, deviceLimit) => Boolean(deviceLimit && deviceLimit <= acceptedDevices)
1935
+ [getAcceptedDevices, getCombinedLimit],
1936
+ ({ total: acceptedDevices = 0 }, combinedLimit) => combinedLimit <= acceptedDevices
1927
1937
  );
1928
1938
  var getGroupsByIdWithoutUngrouped = (0, import_toolkit11.createSelector)([getGroupsById], ({ [UNGROUPED_GROUP.id]: ungrouped, ...groups }) => groups);
1929
1939
  var getGroupData = (0, import_toolkit11.createSelector)([getGroupsByIdWithoutUngrouped], (groups) => {
@@ -4097,9 +4107,9 @@ var getAllDeviceCounts = createAppAsyncThunk(
4097
4107
  `${sliceName}/getAllDeviceCounts`,
4098
4108
  (_, { dispatch }) => Promise.all([import_constants5.DEVICE_STATES.accepted, import_constants5.DEVICE_STATES.pending].map((status) => dispatch(getDeviceCount(status))))
4099
4109
  );
4100
- var getDeviceLimit2 = createAppAsyncThunk(
4110
+ var getDeviceLimits2 = createAppAsyncThunk(
4101
4111
  `${sliceName}/getDeviceLimit`,
4102
- (_, { dispatch }) => general_api_default.get(`${import_constants5.deviceAuthV2}/limits/max_devices`).then((res) => dispatch(actions.setDeviceLimit(res.data.limit)))
4112
+ (_, { dispatch }) => general_api_default.get(`${import_constants5.deviceAuthV2}/limits/devices`).then((res) => dispatch(actions.setDeviceLimits(res.data)))
4103
4113
  );
4104
4114
  var setDeviceListState = createAppAsyncThunk(
4105
4115
  `${sliceName}/setDeviceListState`,
@@ -4602,7 +4612,7 @@ var getGatewayDevices = createAppAsyncThunk(`${sliceName}/getGatewayDevices`, (d
4602
4612
  getDeviceCount,
4603
4613
  getDeviceFileDownloadLink,
4604
4614
  getDeviceInfo,
4605
- getDeviceLimit,
4615
+ getDeviceLimits,
4606
4616
  getDeviceTwin,
4607
4617
  getDevicesByStatus,
4608
4618
  getDevicesWithAuth,