@northern.tech/store 0.28.0 → 0.30.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 (180) hide show
  1. package/dist/actions.cjs +0 -1
  2. package/dist/actions.cjs.map +1 -1
  3. package/dist/actions.js +10 -10
  4. package/dist/api/general-api.cjs.map +1 -1
  5. package/dist/api/general-api.js +4 -4
  6. package/dist/api/users-api.cjs.map +1 -1
  7. package/dist/api/users-api.js +5 -5
  8. package/dist/appSlice/index.cjs +0 -1
  9. package/dist/appSlice/index.cjs.map +1 -1
  10. package/dist/appSlice/index.js +3 -3
  11. package/dist/appSlice/mocks.cjs +0 -1
  12. package/dist/appSlice/mocks.cjs.map +1 -1
  13. package/dist/appSlice/mocks.js +3 -3
  14. package/dist/appSlice/thunks.cjs +29 -33
  15. package/dist/appSlice/thunks.cjs.map +1 -1
  16. package/dist/appSlice/thunks.js +26 -26
  17. package/dist/auth.cjs.map +1 -1
  18. package/dist/auth.js +3 -3
  19. package/dist/{chunk-2QIGK5IU.js → chunk-4UNLEL5A.js} +2 -2
  20. package/dist/{chunk-KR5IU7TA.js → chunk-6V5IIIF7.js} +3 -3
  21. package/dist/{chunk-KR5IU7TA.js.map → chunk-6V5IIIF7.js.map} +1 -1
  22. package/dist/{chunk-GDB5IZMC.js → chunk-ARMI6SZS.js} +15 -17
  23. package/dist/chunk-ARMI6SZS.js.map +1 -0
  24. package/dist/{chunk-GEJDA2ZF.js → chunk-AZF4YY3P.js} +12 -14
  25. package/dist/chunk-AZF4YY3P.js.map +1 -0
  26. package/dist/{chunk-GX3X2E57.js → chunk-B5AI2YPV.js} +2 -3
  27. package/dist/chunk-B5AI2YPV.js.map +1 -0
  28. package/dist/{chunk-WXRYJOL3.js → chunk-ECVQVQEL.js} +2 -2
  29. package/dist/{chunk-2S5F4CQS.js → chunk-FCY7BUGK.js} +62 -62
  30. package/dist/chunk-FCY7BUGK.js.map +1 -0
  31. package/dist/{chunk-525LX7VL.js → chunk-FG37HJLC.js} +2 -2
  32. package/dist/{chunk-SDHCQ62K.js → chunk-FQAUVV6C.js} +2 -2
  33. package/dist/{chunk-G2OECV4D.js → chunk-HKN3RN2Z.js} +13 -13
  34. package/dist/{chunk-XHLNGIAP.js → chunk-HPKXWNEF.js} +2 -2
  35. package/dist/{chunk-QX67O5A2.js → chunk-JXBTIFMS.js} +3 -3
  36. package/dist/{chunk-VK6FVQ5K.js → chunk-JYPSCCT4.js} +3 -3
  37. package/dist/{chunk-CMXRPUOF.js → chunk-L53CPHJU.js} +1 -3
  38. package/dist/chunk-L53CPHJU.js.map +1 -0
  39. package/dist/{chunk-CQT3GJNR.js → chunk-MNJXEB7S.js} +16 -28
  40. package/dist/chunk-MNJXEB7S.js.map +1 -0
  41. package/dist/{chunk-ILSHXLJ3.js → chunk-NXLXPRYW.js} +17 -17
  42. package/dist/{chunk-FAKWYYOB.js → chunk-O6VCSLNE.js} +2 -2
  43. package/dist/{chunk-LSAJE3IU.js → chunk-PQADM3M3.js} +2 -2
  44. package/dist/{chunk-VLII64V6.js → chunk-SJ75YKOA.js} +2 -2
  45. package/dist/{chunk-66LI4BJO.js → chunk-TUPBZ6MQ.js} +2 -2
  46. package/dist/{chunk-SDWPOLHM.js → chunk-XF3TZSZS.js} +3 -3
  47. package/dist/{chunk-HVZ5BOM6.js → chunk-YB3US6OT.js} +2 -2
  48. package/dist/{chunk-UBFFGYQ4.js → chunk-YDDE5TIH.js} +2 -2
  49. package/dist/{chunk-4YLOOOZH.js → chunk-Z2O6LYVP.js} +2 -2
  50. package/dist/commonConstants.cjs.map +1 -1
  51. package/dist/commonConstants.js +2 -2
  52. package/dist/commonSelectors.cjs +3 -15
  53. package/dist/commonSelectors.cjs.map +1 -1
  54. package/dist/commonSelectors.d.cts +6 -66
  55. package/dist/commonSelectors.d.ts +6 -66
  56. package/dist/commonSelectors.js +10 -14
  57. package/dist/constants.cjs +0 -2
  58. package/dist/constants.cjs.map +1 -1
  59. package/dist/constants.d.cts +1 -1
  60. package/dist/constants.d.ts +1 -1
  61. package/dist/constants.js +5 -7
  62. package/dist/deploymentsSlice/constants.cjs.map +1 -1
  63. package/dist/deploymentsSlice/constants.js +2 -2
  64. package/dist/deploymentsSlice/index.cjs.map +1 -1
  65. package/dist/deploymentsSlice/index.js +3 -3
  66. package/dist/deploymentsSlice/mocks.cjs.map +1 -1
  67. package/dist/deploymentsSlice/mocks.js +3 -3
  68. package/dist/deploymentsSlice/selectors.cjs.map +1 -1
  69. package/dist/deploymentsSlice/selectors.js +3 -3
  70. package/dist/deploymentsSlice/thunks.cjs +29 -33
  71. package/dist/deploymentsSlice/thunks.cjs.map +1 -1
  72. package/dist/deploymentsSlice/thunks.js +26 -26
  73. package/dist/devicesSlice/constants.cjs.map +1 -1
  74. package/dist/devicesSlice/constants.js +2 -2
  75. package/dist/devicesSlice/index.cjs.map +1 -1
  76. package/dist/devicesSlice/index.js +3 -3
  77. package/dist/devicesSlice/mocks.cjs.map +1 -1
  78. package/dist/devicesSlice/mocks.js +3 -3
  79. package/dist/devicesSlice/selectors.cjs.map +1 -1
  80. package/dist/devicesSlice/selectors.js +3 -3
  81. package/dist/devicesSlice/thunks.cjs +29 -33
  82. package/dist/devicesSlice/thunks.cjs.map +1 -1
  83. package/dist/devicesSlice/thunks.js +26 -26
  84. package/dist/liststatehook.cjs +1 -1
  85. package/dist/liststatehook.cjs.map +1 -1
  86. package/dist/liststatehook.js +3 -3
  87. package/dist/locationutils.cjs +1 -1
  88. package/dist/locationutils.cjs.map +1 -1
  89. package/dist/locationutils.js +3 -3
  90. package/dist/monitorSlice/index.cjs.map +1 -1
  91. package/dist/monitorSlice/index.js +3 -3
  92. package/dist/monitorSlice/mocks.cjs +0 -1
  93. package/dist/monitorSlice/mocks.cjs.map +1 -1
  94. package/dist/monitorSlice/mocks.d.cts +0 -4
  95. package/dist/monitorSlice/mocks.d.ts +0 -4
  96. package/dist/monitorSlice/mocks.js +3 -4
  97. package/dist/monitorSlice/mocks.js.map +1 -1
  98. package/dist/monitorSlice/thunks.cjs +29 -628
  99. package/dist/monitorSlice/thunks.cjs.map +1 -1
  100. package/dist/monitorSlice/thunks.js +22 -22
  101. package/dist/onboardingSlice/thunks.cjs +29 -33
  102. package/dist/onboardingSlice/thunks.cjs.map +1 -1
  103. package/dist/onboardingSlice/thunks.js +26 -26
  104. package/dist/organizationSlice/constants.cjs.map +1 -1
  105. package/dist/organizationSlice/constants.js +2 -2
  106. package/dist/organizationSlice/index.cjs.map +1 -1
  107. package/dist/organizationSlice/index.js +3 -3
  108. package/dist/organizationSlice/mocks.cjs.map +1 -1
  109. package/dist/organizationSlice/mocks.js +3 -3
  110. package/dist/organizationSlice/selectors.cjs.map +1 -1
  111. package/dist/organizationSlice/selectors.js +3 -3
  112. package/dist/organizationSlice/thunks.cjs +34 -41
  113. package/dist/organizationSlice/thunks.cjs.map +1 -1
  114. package/dist/organizationSlice/thunks.js +26 -26
  115. package/dist/releasesSlice/index.cjs.map +1 -1
  116. package/dist/releasesSlice/index.js +3 -3
  117. package/dist/releasesSlice/mocks.cjs.map +1 -1
  118. package/dist/releasesSlice/mocks.js +3 -3
  119. package/dist/releasesSlice/selectors.cjs.map +1 -1
  120. package/dist/releasesSlice/selectors.js +4 -4
  121. package/dist/releasesSlice/thunks.cjs +99 -795
  122. package/dist/releasesSlice/thunks.cjs.map +1 -1
  123. package/dist/releasesSlice/thunks.js +17 -26
  124. package/dist/selectors.cjs +3 -15
  125. package/dist/selectors.cjs.map +1 -1
  126. package/dist/selectors.d.cts +1 -1
  127. package/dist/selectors.d.ts +1 -1
  128. package/dist/selectors.js +15 -19
  129. package/dist/sockethook.cjs.map +1 -1
  130. package/dist/sockethook.js +2 -2
  131. package/dist/store.cjs +0 -1
  132. package/dist/store.cjs.map +1 -1
  133. package/dist/store.js +12 -12
  134. package/dist/storehooks.cjs +36 -44
  135. package/dist/storehooks.cjs.map +1 -1
  136. package/dist/storehooks.js +27 -28
  137. package/dist/storehooks.js.map +1 -1
  138. package/dist/thunks.cjs +36 -43
  139. package/dist/thunks.cjs.map +1 -1
  140. package/dist/thunks.js +26 -26
  141. package/dist/useDeploymentDevice.cjs +29 -33
  142. package/dist/useDeploymentDevice.cjs.map +1 -1
  143. package/dist/useDeploymentDevice.js +26 -26
  144. package/dist/usersSlice/constants.cjs.map +1 -1
  145. package/dist/usersSlice/constants.js +2 -2
  146. package/dist/usersSlice/index.cjs.map +1 -1
  147. package/dist/usersSlice/index.js +3 -3
  148. package/dist/usersSlice/mocks.cjs.map +1 -1
  149. package/dist/usersSlice/mocks.js +3 -3
  150. package/dist/usersSlice/selectors.cjs.map +1 -1
  151. package/dist/usersSlice/selectors.js +4 -4
  152. package/dist/usersSlice/thunks.cjs +29 -33
  153. package/dist/usersSlice/thunks.cjs.map +1 -1
  154. package/dist/usersSlice/thunks.js +26 -26
  155. package/dist/utils.cjs.map +1 -1
  156. package/dist/utils.js +3 -3
  157. package/package.json +1 -2
  158. package/dist/chunk-2S5F4CQS.js.map +0 -1
  159. package/dist/chunk-CMXRPUOF.js.map +0 -1
  160. package/dist/chunk-CQT3GJNR.js.map +0 -1
  161. package/dist/chunk-GDB5IZMC.js.map +0 -1
  162. package/dist/chunk-GEJDA2ZF.js.map +0 -1
  163. package/dist/chunk-GX3X2E57.js.map +0 -1
  164. /package/dist/{chunk-2QIGK5IU.js.map → chunk-4UNLEL5A.js.map} +0 -0
  165. /package/dist/{chunk-WXRYJOL3.js.map → chunk-ECVQVQEL.js.map} +0 -0
  166. /package/dist/{chunk-525LX7VL.js.map → chunk-FG37HJLC.js.map} +0 -0
  167. /package/dist/{chunk-SDHCQ62K.js.map → chunk-FQAUVV6C.js.map} +0 -0
  168. /package/dist/{chunk-G2OECV4D.js.map → chunk-HKN3RN2Z.js.map} +0 -0
  169. /package/dist/{chunk-XHLNGIAP.js.map → chunk-HPKXWNEF.js.map} +0 -0
  170. /package/dist/{chunk-QX67O5A2.js.map → chunk-JXBTIFMS.js.map} +0 -0
  171. /package/dist/{chunk-VK6FVQ5K.js.map → chunk-JYPSCCT4.js.map} +0 -0
  172. /package/dist/{chunk-ILSHXLJ3.js.map → chunk-NXLXPRYW.js.map} +0 -0
  173. /package/dist/{chunk-FAKWYYOB.js.map → chunk-O6VCSLNE.js.map} +0 -0
  174. /package/dist/{chunk-LSAJE3IU.js.map → chunk-PQADM3M3.js.map} +0 -0
  175. /package/dist/{chunk-VLII64V6.js.map → chunk-SJ75YKOA.js.map} +0 -0
  176. /package/dist/{chunk-66LI4BJO.js.map → chunk-TUPBZ6MQ.js.map} +0 -0
  177. /package/dist/{chunk-SDWPOLHM.js.map → chunk-XF3TZSZS.js.map} +0 -0
  178. /package/dist/{chunk-HVZ5BOM6.js.map → chunk-YB3US6OT.js.map} +0 -0
  179. /package/dist/{chunk-UBFFGYQ4.js.map → chunk-YDDE5TIH.js.map} +0 -0
  180. /package/dist/{chunk-4YLOOOZH.js.map → chunk-Z2O6LYVP.js.map} +0 -0
@@ -76,7 +76,6 @@ module.exports = __toCommonJS(thunks_exports);
76
76
  var import_helpers11 = require("@northern.tech/utils/helpers");
77
77
  var import_dayjs3 = __toESM(require("dayjs"), 1);
78
78
  var import_utc = __toESM(require("dayjs/plugin/utc.js"), 1);
79
- var import_jwt_decode = require("jwt-decode");
80
79
  var import_md52 = __toESM(require("md5"), 1);
81
80
  var import_universal_cookie5 = __toESM(require("universal-cookie"), 1);
82
81
 
@@ -904,7 +903,6 @@ var initialState2 = {
904
903
  hasManifestsEnabled: false,
905
904
  hasMonitor: false,
906
905
  hasMCUEnabled: false,
907
- hasReporting: false,
908
906
  isHosted: true,
909
907
  isEnterprise: false
910
908
  },
@@ -1800,6 +1798,7 @@ var getFeatures = (state) => state.app.features;
1800
1798
  var getFullVersionInformation = (state) => state.app.versionInformation;
1801
1799
  var getSearchState = (state) => state.app.searchState;
1802
1800
  var getUploads = (state) => state.app.uploadsById;
1801
+ var getHostedAnnouncement = (state) => state.app.hostedAnnouncement;
1803
1802
  var getIsUploading = (0, import_toolkit9.createSelector)([getUploads], (uploadsById) => !!Object.keys(uploadsById).length);
1804
1803
  var getSearchedDevices = (0, import_toolkit9.createSelector)([getSearchState], ({ deviceIds }) => deviceIds);
1805
1804
  var getVersionInformation = (0, import_toolkit9.createSelector)(
@@ -2265,7 +2264,6 @@ var getOfflineThresholdSettings = (0, import_toolkit14.createSelector)([getGloba
2265
2264
  intervalUnit: offlineThreshold?.intervalUnit || DEVICE_ONLINE_CUTOFF.intervalName
2266
2265
  }));
2267
2266
  var getRolesList = (0, import_toolkit14.createSelector)([getRolesById], (rolesById2) => Object.entries(rolesById2).map(([value, role]) => ({ value, ...role })));
2268
- var getCurrentSession = (state) => state.users.currentSession;
2269
2267
  var getSecurityAlertDismissedTimestamp = (state) => state.users.userSettings.securityAlertDismissedTimestamp;
2270
2268
 
2271
2269
  // src/commonSelectors.ts
@@ -2273,14 +2271,6 @@ var getIsEnterprise = (0, import_toolkit15.createSelector)(
2273
2271
  [getOrganization, getFeatures],
2274
2272
  ({ plan = PLANS.os.id }, { isEnterprise, isHosted }) => isEnterprise || isHosted && plan === PLANS.enterprise.id
2275
2273
  );
2276
- var getAttrsEndpoint = (0, import_toolkit15.createSelector)(
2277
- [getFeatures],
2278
- ({ hasReporting }) => hasReporting ? `${import_constants5.reportingApiUrl}/devices/search/attributes` : `${import_constants5.inventoryApiUrlV2}/filters/attributes`
2279
- );
2280
- var getSearchEndpoint = (0, import_toolkit15.createSelector)(
2281
- [getFeatures],
2282
- ({ hasReporting }) => hasReporting ? `${import_constants5.reportingApiUrl}/devices/search` : `${import_constants5.inventoryApiUrlV2}/filters/search`
2283
- );
2284
2274
  var getUserRoles = (0, import_toolkit15.createSelector)([getCurrentUser, getRolesById, getIsEnterprise], (currentUser, rolesById2, isEnterprise) => {
2285
2275
  const isAdmin = currentUser.roles?.length ? currentUser.roles.some((role) => role === import_constants5.rolesByName.admin) : !isEnterprise;
2286
2276
  const uiPermissions = isAdmin ? mapUserRolesToUiPermissions([import_constants5.rolesByName.admin], rolesById2) : mapUserRolesToUiPermissions(currentUser.roles || [], rolesById2);
@@ -2414,9 +2404,9 @@ var getSelectedDeploymentData = (0, import_toolkit15.createSelector)(
2414
2404
  }
2415
2405
  );
2416
2406
  var getAvailableIssueOptionsByType = (0, import_toolkit15.createSelector)(
2417
- [getFeatures, getTenantCapabilities, getIssueCountsByType],
2418
- ({ hasReporting }, { hasFullFiltering, hasMonitor }, issueCounts) => Object.values(import_constants5.DEVICE_ISSUE_OPTIONS).reduce((accu, { isCategory, key, needsFullFiltering, needsMonitor, needsReporting, title }) => {
2419
- if (isCategory || needsReporting && !hasReporting || needsFullFiltering && !hasFullFiltering || needsMonitor && !hasMonitor) {
2407
+ [getTenantCapabilities, getIssueCountsByType],
2408
+ ({ hasFullFiltering, hasMonitor }, issueCounts) => Object.values(import_constants5.DEVICE_ISSUE_OPTIONS).reduce((accu, { isCategory, key, needsFullFiltering, needsMonitor, title }) => {
2409
+ if (isCategory || needsFullFiltering && !hasFullFiltering || needsMonitor && !hasMonitor) {
2420
2410
  return accu;
2421
2411
  }
2422
2412
  accu[key] = { count: issueCounts[key].filtered, key, title };
@@ -3055,7 +3045,7 @@ var saveDeltaDeploymentsConfig = createAppAsyncThunk(
3055
3045
  );
3056
3046
  var generateDeploymentLogAnalysis = createAppAsyncThunk(
3057
3047
  `${sliceName3}/generateDeploymentLogAnalysis`,
3058
- ({ deploymentId, deviceId }, { dispatch, rejectWithValue }) => general_api_default.get(`${import_constants5.apiRoot}/v1alpha1/deployments/deployments/${deploymentId}/devices/${deviceId}/log/explain`).then(({ data: result }) => Promise.resolve(result)).catch((err) => {
3048
+ ({ deploymentId, deviceId }, { dispatch, rejectWithValue }) => general_api_default.get(`${import_constants5.apiRoot}/v1alpha1/deployments/deployments/${deploymentId}/devices/${deviceId}/log/explain`, { timeout: 60 * TIMEOUTS.oneSecond }).then(({ data: result }) => Promise.resolve(result)).catch((err) => {
3059
3049
  if (err.response.status === 429) {
3060
3050
  return rejectWithValue(err.response);
3061
3051
  }
@@ -3367,7 +3357,7 @@ var getAllGroupDevices = createAppAsyncThunk(
3367
3357
  state: getState(),
3368
3358
  status: import_constants5.DEVICE_STATES.accepted
3369
3359
  });
3370
- const getAllDevices = (perPage = MAX_PAGE_SIZE, page = defaultPage2, devices = []) => general_api_default.post(getSearchEndpoint(getState()), {
3360
+ const getAllDevices = (perPage = MAX_PAGE_SIZE, page = defaultPage2, devices = []) => general_api_default.post(`${import_constants5.inventoryApiUrlV2}/filters/search`, {
3371
3361
  page,
3372
3362
  per_page: perPage,
3373
3363
  filters: filterTerms,
@@ -3396,18 +3386,21 @@ var getAllDynamicGroupDevices = createAppAsyncThunk(
3396
3386
  state: getState(),
3397
3387
  status: import_constants5.DEVICE_STATES.accepted
3398
3388
  });
3399
- const getAllDevices = (perPage = MAX_PAGE_SIZE, page = defaultPage2, devices = []) => general_api_default.post(getSearchEndpoint(getState()), { page, per_page: perPage, filters, attributes: [...attributes, { scope: "inventory", attribute }] }).then(
3400
- (res) => {
3401
- const state = getState();
3402
- const deviceAccu = reduceReceivedDevices(res.data, devices, state);
3403
- dispatch(actions4.receivedDevices(deviceAccu.devicesById));
3404
- const total = Number(res.headers[import_constants5.headerNames.total]);
3405
- if (total > deviceAccu.ids.length) {
3406
- return getAllDevices(perPage, page + 1, deviceAccu.ids);
3407
- }
3408
- return Promise.resolve(dispatch(actions4.addGroup({ group: { deviceIds: deviceAccu.ids, total }, groupName: group })));
3389
+ const getAllDevices = (perPage = MAX_PAGE_SIZE, page = defaultPage2, devices = []) => general_api_default.post(`${import_constants5.inventoryApiUrlV2}/filters/search`, {
3390
+ page,
3391
+ per_page: perPage,
3392
+ filters,
3393
+ attributes: [...attributes, { scope: "inventory", attribute }]
3394
+ }).then((res) => {
3395
+ const state = getState();
3396
+ const deviceAccu = reduceReceivedDevices(res.data, devices, state);
3397
+ dispatch(actions4.receivedDevices(deviceAccu.devicesById));
3398
+ const total = Number(res.headers[import_constants5.headerNames.total]);
3399
+ if (total > deviceAccu.ids.length) {
3400
+ return getAllDevices(perPage, page + 1, deviceAccu.ids);
3409
3401
  }
3410
- );
3402
+ return Promise.resolve(dispatch(actions4.addGroup({ group: { deviceIds: deviceAccu.ids, total }, groupName: group })));
3403
+ });
3411
3404
  return getAllDevices();
3412
3405
  }
3413
3406
  );
@@ -3535,7 +3528,7 @@ var getDevicesByStatus2 = createAppAsyncThunk(
3535
3528
  status
3536
3529
  });
3537
3530
  const attributes = [...defaultAttributes, getIdAttribute(getState()), ...selectedAttributes];
3538
- return general_api_default.post(getSearchEndpoint(getState()), {
3531
+ return general_api_default.post(`${import_constants5.inventoryApiUrlV2}/filters/search`, {
3539
3532
  page,
3540
3533
  per_page: perPage,
3541
3534
  filters: filterTerms,
@@ -3565,7 +3558,7 @@ var getAllDevicesByStatus = createAppAsyncThunk(
3565
3558
  `${sliceName4}/getAllDevicesByStatus`,
3566
3559
  ({ status, attribute }, { dispatch, getState }) => {
3567
3560
  const attributes = [...defaultAttributes, getIdAttribute(getState())];
3568
- const getAllDevices = (perPage = MAX_PAGE_SIZE, page = 1, devices = []) => general_api_default.post(getSearchEndpoint(getState()), {
3561
+ const getAllDevices = (perPage = MAX_PAGE_SIZE, page = 1, devices = []) => general_api_default.post(`${import_constants5.inventoryApiUrlV2}/filters/search`, {
3569
3562
  page,
3570
3563
  per_page: perPage,
3571
3564
  filters: mapFiltersToTerms([{ key: "status", value: status, operator: import_constants5.DEVICE_FILTERING_OPTIONS.$eq.key, scope: "identity" }]),
@@ -3593,7 +3586,7 @@ var searchDevices = createAppAsyncThunk(`${sliceName4}/searchDevices`, (passedOp
3593
3586
  const { columnSelection = [] } = getUserSettings(state);
3594
3587
  const selectedAttributes = columnSelection.map((column) => ({ attribute: column.key, scope: column.scope }));
3595
3588
  const attributes = (0, import_helpers9.attributeDuplicateFilter)([...defaultAttributes, getIdAttribute(state), ...selectedAttributes], "attribute");
3596
- return general_api_default.post(getSearchEndpoint(getState()), {
3589
+ return general_api_default.post(`${import_constants5.inventoryApiUrlV2}/filters/search`, {
3597
3590
  page,
3598
3591
  per_page: 10,
3599
3592
  filters: [],
@@ -3621,7 +3614,7 @@ var attributeReducer = (attributes = []) => attributes.slice(0, ATTRIBUTE_LIST_C
3621
3614
  );
3622
3615
  var getDeviceAttributes = createAppAsyncThunk(
3623
3616
  `${sliceName4}/getDeviceAttributes`,
3624
- (_, { dispatch, getState }) => general_api_default.get(getAttrsEndpoint(getState())).then(({ data }) => {
3617
+ (_, { dispatch }) => general_api_default.get(`${import_constants5.inventoryApiUrlV2}/filters/attributes`).then(({ data }) => {
3625
3618
  const { identity: identityAttributes, inventory: inventoryAttributes, system: systemAttributes, tags: tagAttributes } = attributeReducer(data || []);
3626
3619
  return dispatch(actions4.setFilterAttributes({ identityAttributes, inventoryAttributes, systemAttributes, tagAttributes }));
3627
3620
  })
@@ -3921,7 +3914,7 @@ var getSystemDevices = createAppAsyncThunk(`${sliceName4}/getSystemDevices`, (op
3921
3914
  { ...emptyFilter, key: "mender_gateway_system_id", value: mender_gateway_system_id, scope: "inventory" }
3922
3915
  ];
3923
3916
  const { attributes, filterTerms } = prepareSearchArguments({ filters, state });
3924
- return general_api_default.post(getSearchEndpoint(getState()), {
3917
+ return general_api_default.post(`${import_constants5.inventoryApiUrlV2}/filters/search`, {
3925
3918
  page,
3926
3919
  per_page: perPage,
3927
3920
  filters: filterTerms,
@@ -3948,7 +3941,7 @@ var getGatewayDevices = createAppAsyncThunk(`${sliceName4}/getGatewayDevices`, (
3948
3941
  { ...emptyFilter, key: "mender_gateway_system_id", value: mender_gateway_system_id, scope: "inventory" }
3949
3942
  ];
3950
3943
  const { attributes: attributeSelection, filterTerms } = prepareSearchArguments({ filters, state });
3951
- return general_api_default.post(getSearchEndpoint(getState()), {
3944
+ return general_api_default.post(`${import_constants5.inventoryApiUrlV2}/filters/search`, {
3952
3945
  page: 1,
3953
3946
  per_page: MAX_PAGE_SIZE,
3954
3947
  filters: filterTerms,
@@ -4000,7 +3993,7 @@ var getIssueCountsByType2 = createAppAsyncThunk(
4000
3993
  selectedIssues: [type],
4001
3994
  status
4002
3995
  });
4003
- return general_api_default.post(getSearchEndpoint(getState()), {
3996
+ return general_api_default.post(`${import_constants5.inventoryApiUrlV2}/filters/search`, {
4004
3997
  page: 1,
4005
3998
  per_page: 1,
4006
3999
  filters: filterTerms,
@@ -4645,7 +4638,8 @@ var setHideAnnouncement = createAppAsyncThunk(
4645
4638
  `${sliceName8}/setHideAnnouncement`,
4646
4639
  ({ shouldHide, userId }, { dispatch, getState }) => {
4647
4640
  const currentUserId = userId || getCurrentUser(getState()).id;
4648
- const hash = getState().app.hostedAnnouncement ? (0, import_md5.default)(getState().app.hostedAnnouncement) : "";
4641
+ const announcement = getHostedAnnouncement(getState());
4642
+ const hash = announcement ? (0, import_md5.default)(announcement) : "";
4649
4643
  const announceCookie = cookies4.get(`${currentUserId}${hash}`);
4650
4644
  if (shouldHide || hash.length && typeof announceCookie !== "undefined") {
4651
4645
  cookies4.set(`${currentUserId}${hash}`, true, { maxAge: 604800 });
@@ -4967,14 +4961,13 @@ var removeTenant = createAppAsyncThunk(
4967
4961
  var getUserOrganization = createAppAsyncThunk(
4968
4962
  `${sliceName}/getUserOrganization`,
4969
4963
  (_, { dispatch, getState }) => general_api_default.get(`${import_constants5.tenantadmApiUrlv1}/user/tenant?tiers=true`).then((res) => {
4970
- const tasks = [dispatch(actions.setOrganization(res.data))];
4971
4964
  const { addons, plan, trial } = res.data;
4972
- const { token } = getCurrentSession(getState());
4973
- const jwt = (0, import_jwt_decode.jwtDecode)(token);
4974
- const jwtData = { addons: jwt["mender.addons"], plan: jwt["mender.plan"], trial: jwt["mender.trial"] };
4975
- if (!(0, import_helpers11.deepCompare)({ addons, plan, trial }, jwtData)) {
4965
+ const { addons: currentAddons, id: currentId, plan: currentPlan, trial: currentTrial } = getOrganization(getState());
4966
+ const tasks = [dispatch(actions.setOrganization(res.data))];
4967
+ if (currentId && !(0, import_helpers11.deepCompare)({ addons, plan, trial }, { addons: currentAddons, plan: currentPlan, trial: currentTrial })) {
4976
4968
  const hash = (0, import_md52.default)(tenantDataDivergedMessage);
4977
- cookies5.remove(`${jwt.sub}${hash}`);
4969
+ const { id: currentUserId } = getCurrentUser(getState());
4970
+ cookies5.remove(`${currentUserId}${hash}`);
4978
4971
  tasks.push(dispatch(setAnnouncement2(tenantDataDivergedMessage)));
4979
4972
  }
4980
4973
  return Promise.all(tasks);