@northern.tech/store 0.21.0 → 0.23.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 (104) hide show
  1. package/dist/actions.cjs +1 -2
  2. package/dist/actions.cjs.map +1 -1
  3. package/dist/actions.js +3 -3
  4. package/dist/appSlice/index.cjs +1 -2
  5. package/dist/appSlice/index.cjs.map +1 -1
  6. package/dist/appSlice/index.js +1 -1
  7. package/dist/appSlice/mocks.cjs +1 -2
  8. package/dist/appSlice/mocks.cjs.map +1 -1
  9. package/dist/appSlice/mocks.js +1 -1
  10. package/dist/appSlice/selectors.d.cts +1 -1
  11. package/dist/appSlice/selectors.d.ts +1 -1
  12. package/dist/appSlice/thunks.cjs +17 -7
  13. package/dist/appSlice/thunks.cjs.map +1 -1
  14. package/dist/appSlice/thunks.js +10 -10
  15. package/dist/{chunk-6PYYMAFS.js → chunk-73JXR6WS.js} +4 -4
  16. package/dist/{chunk-ZVE23XXF.js → chunk-AROYP5V5.js} +6 -6
  17. package/dist/{chunk-7VFPMJCH.js → chunk-DDY7IFSE.js} +5 -5
  18. package/dist/{chunk-6WJI4MOP.js → chunk-DYUOBPAI.js} +2 -3
  19. package/dist/chunk-DYUOBPAI.js.map +1 -0
  20. package/dist/{chunk-7KSKENLP.js → chunk-FQ6CCYUU.js} +7 -7
  21. package/dist/{chunk-53W2NRSL.js → chunk-ML5CUAQD.js} +7 -3
  22. package/dist/chunk-ML5CUAQD.js.map +1 -0
  23. package/dist/{chunk-GHATCG2U.js → chunk-SVSHXLCN.js} +6 -6
  24. package/dist/{chunk-4UV7ZJXY.js → chunk-Y54UJUE4.js} +55 -40
  25. package/dist/chunk-Y54UJUE4.js.map +1 -0
  26. package/dist/commonSelectors.d.cts +18 -14
  27. package/dist/commonSelectors.d.ts +18 -14
  28. package/dist/commonSelectors.js +2 -2
  29. package/dist/deploymentsSlice/thunks.cjs +17 -7
  30. package/dist/deploymentsSlice/thunks.cjs.map +1 -1
  31. package/dist/deploymentsSlice/thunks.d.cts +4 -4
  32. package/dist/deploymentsSlice/thunks.d.ts +4 -4
  33. package/dist/deploymentsSlice/thunks.js +10 -10
  34. package/dist/devicesSlice/selectors.d.cts +1 -1
  35. package/dist/devicesSlice/selectors.d.ts +1 -1
  36. package/dist/devicesSlice/thunks.cjs +19 -7
  37. package/dist/devicesSlice/thunks.cjs.map +1 -1
  38. package/dist/devicesSlice/thunks.d.cts +14 -3
  39. package/dist/devicesSlice/thunks.d.ts +14 -3
  40. package/dist/devicesSlice/thunks.js +12 -10
  41. package/dist/liststatehook.cjs +6 -2
  42. package/dist/liststatehook.cjs.map +1 -1
  43. package/dist/liststatehook.d.cts +8 -2
  44. package/dist/liststatehook.d.ts +8 -2
  45. package/dist/liststatehook.js +1 -1
  46. package/dist/locationutils.cjs +6 -2
  47. package/dist/locationutils.cjs.map +1 -1
  48. package/dist/locationutils.d.cts +4 -1
  49. package/dist/locationutils.d.ts +4 -1
  50. package/dist/locationutils.js +1 -1
  51. package/dist/monitorSlice/thunks.cjs +1 -2
  52. package/dist/monitorSlice/thunks.cjs.map +1 -1
  53. package/dist/monitorSlice/thunks.d.cts +1 -1
  54. package/dist/monitorSlice/thunks.d.ts +1 -1
  55. package/dist/monitorSlice/thunks.js +7 -7
  56. package/dist/onboardingSlice/thunks.cjs +17 -7
  57. package/dist/onboardingSlice/thunks.cjs.map +1 -1
  58. package/dist/onboardingSlice/thunks.js +10 -10
  59. package/dist/organizationSlice/selectors.d.cts +1 -1
  60. package/dist/organizationSlice/selectors.d.ts +1 -1
  61. package/dist/organizationSlice/thunks.cjs +39 -26
  62. package/dist/organizationSlice/thunks.cjs.map +1 -1
  63. package/dist/organizationSlice/thunks.d.cts +4 -4
  64. package/dist/organizationSlice/thunks.d.ts +4 -4
  65. package/dist/organizationSlice/thunks.js +10 -10
  66. package/dist/releasesSlice/selectors.d.cts +1 -1
  67. package/dist/releasesSlice/selectors.d.ts +1 -1
  68. package/dist/releasesSlice/thunks.cjs +1 -2
  69. package/dist/releasesSlice/thunks.cjs.map +1 -1
  70. package/dist/releasesSlice/thunks.d.cts +2 -2
  71. package/dist/releasesSlice/thunks.d.ts +2 -2
  72. package/dist/releasesSlice/thunks.js +8 -8
  73. package/dist/selectors.js +11 -11
  74. package/dist/store.cjs +1 -2
  75. package/dist/store.cjs.map +1 -1
  76. package/dist/store.js +4 -4
  77. package/dist/storehooks.cjs +41 -37
  78. package/dist/storehooks.cjs.map +1 -1
  79. package/dist/storehooks.js +12 -21
  80. package/dist/storehooks.js.map +1 -1
  81. package/dist/thunks.cjs +41 -26
  82. package/dist/thunks.cjs.map +1 -1
  83. package/dist/thunks.d.cts +2 -2
  84. package/dist/thunks.d.ts +2 -2
  85. package/dist/thunks.js +12 -10
  86. package/dist/useDeploymentDevice.cjs +17 -7
  87. package/dist/useDeploymentDevice.cjs.map +1 -1
  88. package/dist/useDeploymentDevice.js +10 -10
  89. package/dist/usersSlice/selectors.d.cts +5 -5
  90. package/dist/usersSlice/selectors.d.ts +5 -5
  91. package/dist/usersSlice/thunks.cjs +17 -7
  92. package/dist/usersSlice/thunks.cjs.map +1 -1
  93. package/dist/usersSlice/thunks.d.cts +5 -2
  94. package/dist/usersSlice/thunks.d.ts +5 -2
  95. package/dist/usersSlice/thunks.js +10 -10
  96. package/package.json +7 -6
  97. package/dist/chunk-4UV7ZJXY.js.map +0 -1
  98. package/dist/chunk-53W2NRSL.js.map +0 -1
  99. package/dist/chunk-6WJI4MOP.js.map +0 -1
  100. /package/dist/{chunk-6PYYMAFS.js.map → chunk-73JXR6WS.js.map} +0 -0
  101. /package/dist/{chunk-ZVE23XXF.js.map → chunk-AROYP5V5.js.map} +0 -0
  102. /package/dist/{chunk-7VFPMJCH.js.map → chunk-DDY7IFSE.js.map} +0 -0
  103. /package/dist/{chunk-7KSKENLP.js.map → chunk-FQ6CCYUU.js.map} +0 -0
  104. /package/dist/{chunk-GHATCG2U.js.map → chunk-SVSHXLCN.js.map} +0 -0
@@ -2,8 +2,8 @@ import { SnackbarContent } from '../appSlice/index.cjs';
2
2
  import { Device } from '../devicesSlice/index.cjs';
3
3
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
4
4
  import { AppDispatch, RootState } from '../store.cjs';
5
- import { NewDeployment, NewDeploymentForGroup, NewDeploymentV2, DeploymentV1 } from '@northern.tech/types/MenderTypes';
6
- import { Deployment, SelectionListState, DeploymentByStatusKey, SelectionState, DeploymentConfig } from './index.cjs';
5
+ import { NewDeploymentTypeManagement, NewDeploymentForGroup, NewDeploymentV2TypeManagement, DeploymentV1 } from '@northern.tech/types/MenderTypes';
6
+ import { SelectionListState, DeploymentByStatusKey, Deployment, DeploymentConfig, SelectionState } from './index.cjs';
7
7
  import { SortOptions } from '@northern.tech/utils/constants';
8
8
  import 'redux';
9
9
  import 'immer';
@@ -43,9 +43,9 @@ declare const getDeploymentsByStatus: _reduxjs_toolkit.AsyncThunk<any[], GetDepl
43
43
  }>;
44
44
  declare const createDeployment: _reduxjs_toolkit.AsyncThunk<any, {
45
45
  hasNewRetryDefault: boolean;
46
- newDeployment: NewDeployment | (NewDeploymentForGroup & {
46
+ newDeployment: NewDeploymentTypeManagement | (NewDeploymentForGroup & {
47
47
  group: string;
48
- }) | NewDeploymentV2;
48
+ }) | NewDeploymentV2TypeManagement;
49
49
  }, {
50
50
  dispatch: AppDispatch;
51
51
  state: RootState;
@@ -2,8 +2,8 @@ import { SnackbarContent } from '../appSlice/index.js';
2
2
  import { Device } from '../devicesSlice/index.js';
3
3
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
4
4
  import { AppDispatch, RootState } from '../store.js';
5
- import { NewDeployment, NewDeploymentForGroup, NewDeploymentV2, DeploymentV1 } from '@northern.tech/types/MenderTypes';
6
- import { Deployment, SelectionListState, DeploymentByStatusKey, SelectionState, DeploymentConfig } from './index.js';
5
+ import { NewDeploymentTypeManagement, NewDeploymentForGroup, NewDeploymentV2TypeManagement, DeploymentV1 } from '@northern.tech/types/MenderTypes';
6
+ import { SelectionListState, DeploymentByStatusKey, Deployment, DeploymentConfig, SelectionState } from './index.js';
7
7
  import { SortOptions } from '@northern.tech/utils/constants';
8
8
  import 'redux';
9
9
  import 'immer';
@@ -43,9 +43,9 @@ declare const getDeploymentsByStatus: _reduxjs_toolkit.AsyncThunk<any[], GetDepl
43
43
  }>;
44
44
  declare const createDeployment: _reduxjs_toolkit.AsyncThunk<any, {
45
45
  hasNewRetryDefault: boolean;
46
- newDeployment: NewDeployment | (NewDeploymentForGroup & {
46
+ newDeployment: NewDeploymentTypeManagement | (NewDeploymentForGroup & {
47
47
  group: string;
48
- }) | NewDeploymentV2;
48
+ }) | NewDeploymentV2TypeManagement;
49
49
  }, {
50
50
  dispatch: AppDispatch;
51
51
  state: RootState;
@@ -13,32 +13,32 @@ import {
13
13
  saveDeltaDeploymentsConfig,
14
14
  setDeploymentsState,
15
15
  updateDeploymentControlMap
16
- } from "../chunk-4UV7ZJXY.js";
17
- import "../chunk-7VFPMJCH.js";
18
- import "../chunk-6PYYMAFS.js";
19
- import "../chunk-7KSKENLP.js";
16
+ } from "../chunk-Y54UJUE4.js";
17
+ import "../chunk-DDY7IFSE.js";
18
+ import "../chunk-73JXR6WS.js";
19
+ import "../chunk-FQ6CCYUU.js";
20
20
  import "../chunk-XJLZK4QY.js";
21
21
  import "../chunk-IRQRV552.js";
22
- import "../chunk-GHATCG2U.js";
22
+ import "../chunk-SVSHXLCN.js";
23
23
  import "../chunk-TRKA7XYU.js";
24
24
  import "../chunk-YR65C62H.js";
25
25
  import "../chunk-TIL2S3JA.js";
26
26
  import "../chunk-PVCHKW35.js";
27
27
  import "../chunk-CQXDAXQF.js";
28
- import "../chunk-VODRLEDP.js";
29
- import "../chunk-6WJI4MOP.js";
30
28
  import "../chunk-OLKM53RL.js";
29
+ import "../chunk-DYUOBPAI.js";
30
+ import "../chunk-VODRLEDP.js";
31
31
  import "../chunk-UVTLZV34.js";
32
- import "../chunk-53W2NRSL.js";
32
+ import "../chunk-ML5CUAQD.js";
33
33
  import "../chunk-NMAXZ3ZY.js";
34
- import "../chunk-ZVE23XXF.js";
34
+ import "../chunk-AROYP5V5.js";
35
35
  import "../chunk-PL6RIFD5.js";
36
36
  import "../chunk-4ZYLGBJU.js";
37
37
  import "../chunk-ZZQJWNQT.js";
38
38
  import "../chunk-YO22XLHI.js";
39
39
  import "../chunk-JIS4PA3R.js";
40
- import "../chunk-WR6RQKF5.js";
41
40
  import "../chunk-ZGRY42BZ.js";
41
+ import "../chunk-WR6RQKF5.js";
42
42
  import "../chunk-4BHM6WVX.js";
43
43
  import "../chunk-7WIISD2N.js";
44
44
  import "../chunk-WWED74SG.js";
@@ -6,7 +6,7 @@ import { OnboardingSliceType } from '../onboardingSlice/index.cjs';
6
6
  import { MonitorSliceType } from '../monitorSlice/index.cjs';
7
7
  import { DeploymentsSliceType } from '../deploymentsSlice/index.cjs';
8
8
  import { AppSliceType } from '../appSlice/index.cjs';
9
- import { Device, DeviceGroup, DeviceListState, DeviceFilter, DeviceSliceType } from './index.cjs';
9
+ import { DeviceSliceType, Device, DeviceFilter, DeviceListState, DeviceGroup } from './index.cjs';
10
10
  import * as _northern_tech_types_types_gen from '@northern.tech/types/types.gen';
11
11
  import { RootState } from '../store.cjs';
12
12
  import 'redux';
@@ -6,7 +6,7 @@ import { OnboardingSliceType } from '../onboardingSlice/index.js';
6
6
  import { MonitorSliceType } from '../monitorSlice/index.js';
7
7
  import { DeploymentsSliceType } from '../deploymentsSlice/index.js';
8
8
  import { AppSliceType } from '../appSlice/index.js';
9
- import { Device, DeviceGroup, DeviceListState, DeviceFilter, DeviceSliceType } from './index.js';
9
+ import { DeviceSliceType, Device, DeviceFilter, DeviceListState, DeviceGroup } from './index.js';
10
10
  import * as _northern_tech_types_types_gen from '@northern.tech/types/types.gen';
11
11
  import { RootState } from '../store.js';
12
12
  import 'redux';
@@ -52,6 +52,7 @@ __export(thunks_exports, {
52
52
  getDeviceTwin: () => getDeviceTwin,
53
53
  getDevicesByStatus: () => getDevicesByStatus2,
54
54
  getDevicesWithAuth: () => getDevicesWithAuth,
55
+ getDynamicGroup: () => getDynamicGroup,
55
56
  getDynamicGroups: () => getDynamicGroups,
56
57
  getGatewayDevices: () => getGatewayDevices,
57
58
  getGroupDevices: () => getGroupDevices,
@@ -980,9 +981,9 @@ var initialState2 = {
980
981
  hasDeviceConfig: false,
981
982
  hasDeviceConnect: false,
982
983
  hasFeedbackEnabled: false,
984
+ hasManifestsEnabled: false,
983
985
  hasMonitor: false,
984
986
  hasMCUEnabled: false,
985
- hasOldTheme: false,
986
987
  hasReporting: false,
987
988
  isHosted: true,
988
989
  isEnterprise: false
@@ -1017,7 +1018,6 @@ var initialState2 = {
1017
1018
  offlineThreshold: getYesterday(),
1018
1019
  versionInformation: {
1019
1020
  Integration: "",
1020
- "Mender-Client": "",
1021
1021
  "Mender-Artifact": "",
1022
1022
  "Meta-Mender": ""
1023
1023
  },
@@ -2552,7 +2552,6 @@ var getLatestRelease = (thing) => {
2552
2552
  };
2553
2553
  var repoKeyMap = {
2554
2554
  integration: "Integration",
2555
- mender: "Mender-Client",
2556
2555
  "mender-artifact": "Mender-Artifact"
2557
2556
  };
2558
2557
  var deductSaasState = (latestRelease, guiTags) => {
@@ -2656,10 +2655,10 @@ var getDeploymentsByStatus2 = createAppAsyncThunk(
2656
2655
  const { status, page = defaultPage, perPage = defaultPerPage, startDate, endDate, group, type, shouldSelect = true, sort = import_constants5.SORTING_OPTIONS.desc } = options;
2657
2656
  const created_after = startDate ? `&created_after=${startDate}` : "";
2658
2657
  const created_before = endDate ? `&created_before=${endDate}` : "";
2659
- const search = group ? `&search=${group}` : "";
2658
+ const search = group ? `&name=${group}` : "";
2660
2659
  const typeFilter = type ? `&type=${type}` : "";
2661
2660
  return general_api_default.get(
2662
- `${import_constants5.deploymentsApiUrl}/deployments?status=${status}&per_page=${perPage}&page=${page}${created_after}${created_before}${search}${typeFilter}&sort=${sort}`
2661
+ `${import_constants5.deploymentsApiUrlV2}/deployments?status=${status}&per_page=${perPage}&page=${page}${created_after}${created_before}${search}${typeFilter}&sort=${sort}`
2663
2662
  ).then((res) => {
2664
2663
  const { deployments, deploymentIds } = transformDeployments(res.data, getState().deployments.byId);
2665
2664
  const total = Number(res.headers[import_constants5.headerNames.total]);
@@ -3179,7 +3178,7 @@ var verifyEmailStart = createAppAsyncThunk(
3179
3178
  );
3180
3179
  var verifyEmailComplete = createAppAsyncThunk(
3181
3180
  `${sliceName8}/verifyEmailComplete`,
3182
- (secret_hash, { dispatch }) => general_api_default.post(`${import_constants5.useradmApiUrl}/auth/verify-email/complete`, { secret_hash }).catch((err) => commonErrorHandler(err, "An error occured completing the email verification process:", dispatch)).finally(() => Promise.resolve(dispatch(getUser(OWN_USER_ID))))
3181
+ (secret_hash, { dispatch }) => general_api_default.post(`${import_constants5.useradmApiUrl}/auth/verify-email/complete`, { secret_hash }).then(() => dispatch(actions8.receivedActivationCode(""))).catch((err) => commonErrorHandler(err, "An error occured completing the email verification process:", dispatch)).finally(() => Promise.resolve(dispatch(getUser(OWN_USER_ID))))
3183
3182
  );
3184
3183
  var verify2FA = createAppAsyncThunk(
3185
3184
  `${sliceName8}/verify2FA`,
@@ -3355,6 +3354,9 @@ var isEmptyPermissionSet = (permissionSet) => !Object.values(permissionSet).redu
3355
3354
  var parseRolePermissions = ({ permission_sets_with_scope = [], permissions = [] }, permissionSets) => {
3356
3355
  const preliminaryResult = permission_sets_with_scope.reduce(
3357
3356
  (accu, permissionSet) => {
3357
+ if (!permissionSet.name) {
3358
+ return accu;
3359
+ }
3358
3360
  const processor = permissionSets[permissionSet.name];
3359
3361
  if (!processor) {
3360
3362
  return accu;
@@ -3363,7 +3365,7 @@ var parseRolePermissions = ({ permission_sets_with_scope = [], permissions = []
3363
3365
  if (scope) {
3364
3366
  const result = mapPermissionSet(
3365
3367
  permissionSet.name,
3366
- permissionSet.scope.value,
3368
+ permissionSet.scope?.value ?? [],
3367
3369
  scope,
3368
3370
  accu.uiPermissions[scope]
3369
3371
  );
@@ -3854,6 +3856,15 @@ var removeStaticGroup = createAppAsyncThunk(
3854
3856
  ])
3855
3857
  )
3856
3858
  );
3859
+ var getDynamicGroup = createAppAsyncThunk(
3860
+ `${sliceName}/getDynamicGroupById`,
3861
+ (id, { dispatch }) => general_api_default.get(`${import_constants5.inventoryApiUrlV2}/filters/${id}`).catch((err) => {
3862
+ if (err.response && err.response.status === 404) {
3863
+ throw new Error("Request failed with status code 404");
3864
+ }
3865
+ return commonErrorHandler(err, `Error retrieving the group: `, dispatch, commonErrorFallback);
3866
+ })
3867
+ );
3857
3868
  var getDynamicGroups = createAppAsyncThunk(
3858
3869
  `${sliceName}/getDynamicGroups`,
3859
3870
  (_, { dispatch, getState }) => general_api_default.get(`${import_constants5.inventoryApiUrlV2}/filters?per_page=${MAX_PAGE_SIZE}`).then(({ data: filters }) => {
@@ -4633,6 +4644,7 @@ var getGatewayDevices = createAppAsyncThunk(`${sliceName}/getGatewayDevices`, (d
4633
4644
  getDeviceTwin,
4634
4645
  getDevicesByStatus,
4635
4646
  getDevicesWithAuth,
4647
+ getDynamicGroup,
4636
4648
  getDynamicGroups,
4637
4649
  getGatewayDevices,
4638
4650
  getGroupDevices,