@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.
- package/dist/actions.cjs +1 -2
- package/dist/actions.cjs.map +1 -1
- package/dist/actions.js +3 -3
- package/dist/appSlice/index.cjs +1 -2
- package/dist/appSlice/index.cjs.map +1 -1
- package/dist/appSlice/index.js +1 -1
- package/dist/appSlice/mocks.cjs +1 -2
- package/dist/appSlice/mocks.cjs.map +1 -1
- package/dist/appSlice/mocks.js +1 -1
- package/dist/appSlice/selectors.d.cts +1 -1
- package/dist/appSlice/selectors.d.ts +1 -1
- package/dist/appSlice/thunks.cjs +17 -7
- package/dist/appSlice/thunks.cjs.map +1 -1
- package/dist/appSlice/thunks.js +10 -10
- package/dist/{chunk-6PYYMAFS.js → chunk-73JXR6WS.js} +4 -4
- package/dist/{chunk-ZVE23XXF.js → chunk-AROYP5V5.js} +6 -6
- package/dist/{chunk-7VFPMJCH.js → chunk-DDY7IFSE.js} +5 -5
- package/dist/{chunk-6WJI4MOP.js → chunk-DYUOBPAI.js} +2 -3
- package/dist/chunk-DYUOBPAI.js.map +1 -0
- package/dist/{chunk-7KSKENLP.js → chunk-FQ6CCYUU.js} +7 -7
- package/dist/{chunk-53W2NRSL.js → chunk-ML5CUAQD.js} +7 -3
- package/dist/chunk-ML5CUAQD.js.map +1 -0
- package/dist/{chunk-GHATCG2U.js → chunk-SVSHXLCN.js} +6 -6
- package/dist/{chunk-4UV7ZJXY.js → chunk-Y54UJUE4.js} +55 -40
- package/dist/chunk-Y54UJUE4.js.map +1 -0
- package/dist/commonSelectors.d.cts +18 -14
- package/dist/commonSelectors.d.ts +18 -14
- package/dist/commonSelectors.js +2 -2
- package/dist/deploymentsSlice/thunks.cjs +17 -7
- package/dist/deploymentsSlice/thunks.cjs.map +1 -1
- package/dist/deploymentsSlice/thunks.d.cts +4 -4
- package/dist/deploymentsSlice/thunks.d.ts +4 -4
- package/dist/deploymentsSlice/thunks.js +10 -10
- package/dist/devicesSlice/selectors.d.cts +1 -1
- package/dist/devicesSlice/selectors.d.ts +1 -1
- package/dist/devicesSlice/thunks.cjs +19 -7
- package/dist/devicesSlice/thunks.cjs.map +1 -1
- package/dist/devicesSlice/thunks.d.cts +14 -3
- package/dist/devicesSlice/thunks.d.ts +14 -3
- package/dist/devicesSlice/thunks.js +12 -10
- package/dist/liststatehook.cjs +6 -2
- package/dist/liststatehook.cjs.map +1 -1
- package/dist/liststatehook.d.cts +8 -2
- package/dist/liststatehook.d.ts +8 -2
- package/dist/liststatehook.js +1 -1
- package/dist/locationutils.cjs +6 -2
- package/dist/locationutils.cjs.map +1 -1
- package/dist/locationutils.d.cts +4 -1
- package/dist/locationutils.d.ts +4 -1
- package/dist/locationutils.js +1 -1
- package/dist/monitorSlice/thunks.cjs +1 -2
- package/dist/monitorSlice/thunks.cjs.map +1 -1
- package/dist/monitorSlice/thunks.d.cts +1 -1
- package/dist/monitorSlice/thunks.d.ts +1 -1
- package/dist/monitorSlice/thunks.js +7 -7
- package/dist/onboardingSlice/thunks.cjs +17 -7
- package/dist/onboardingSlice/thunks.cjs.map +1 -1
- package/dist/onboardingSlice/thunks.js +10 -10
- package/dist/organizationSlice/selectors.d.cts +1 -1
- package/dist/organizationSlice/selectors.d.ts +1 -1
- package/dist/organizationSlice/thunks.cjs +39 -26
- package/dist/organizationSlice/thunks.cjs.map +1 -1
- package/dist/organizationSlice/thunks.d.cts +4 -4
- package/dist/organizationSlice/thunks.d.ts +4 -4
- package/dist/organizationSlice/thunks.js +10 -10
- package/dist/releasesSlice/selectors.d.cts +1 -1
- package/dist/releasesSlice/selectors.d.ts +1 -1
- package/dist/releasesSlice/thunks.cjs +1 -2
- package/dist/releasesSlice/thunks.cjs.map +1 -1
- package/dist/releasesSlice/thunks.d.cts +2 -2
- package/dist/releasesSlice/thunks.d.ts +2 -2
- package/dist/releasesSlice/thunks.js +8 -8
- package/dist/selectors.js +11 -11
- package/dist/store.cjs +1 -2
- package/dist/store.cjs.map +1 -1
- package/dist/store.js +4 -4
- package/dist/storehooks.cjs +41 -37
- package/dist/storehooks.cjs.map +1 -1
- package/dist/storehooks.js +12 -21
- package/dist/storehooks.js.map +1 -1
- package/dist/thunks.cjs +41 -26
- package/dist/thunks.cjs.map +1 -1
- package/dist/thunks.d.cts +2 -2
- package/dist/thunks.d.ts +2 -2
- package/dist/thunks.js +12 -10
- package/dist/useDeploymentDevice.cjs +17 -7
- package/dist/useDeploymentDevice.cjs.map +1 -1
- package/dist/useDeploymentDevice.js +10 -10
- package/dist/usersSlice/selectors.d.cts +5 -5
- package/dist/usersSlice/selectors.d.ts +5 -5
- package/dist/usersSlice/thunks.cjs +17 -7
- package/dist/usersSlice/thunks.cjs.map +1 -1
- package/dist/usersSlice/thunks.d.cts +5 -2
- package/dist/usersSlice/thunks.d.ts +5 -2
- package/dist/usersSlice/thunks.js +10 -10
- package/package.json +7 -6
- package/dist/chunk-4UV7ZJXY.js.map +0 -1
- package/dist/chunk-53W2NRSL.js.map +0 -1
- package/dist/chunk-6WJI4MOP.js.map +0 -1
- /package/dist/{chunk-6PYYMAFS.js.map → chunk-73JXR6WS.js.map} +0 -0
- /package/dist/{chunk-ZVE23XXF.js.map → chunk-AROYP5V5.js.map} +0 -0
- /package/dist/{chunk-7VFPMJCH.js.map → chunk-DDY7IFSE.js.map} +0 -0
- /package/dist/{chunk-7KSKENLP.js.map → chunk-FQ6CCYUU.js.map} +0 -0
- /package/dist/{chunk-GHATCG2U.js.map → chunk-SVSHXLCN.js.map} +0 -0
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDeviceById
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-Y54UJUE4.js";
|
|
4
|
+
import "./chunk-DDY7IFSE.js";
|
|
5
|
+
import "./chunk-73JXR6WS.js";
|
|
6
6
|
import {
|
|
7
7
|
useAppDispatch
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FQ6CCYUU.js";
|
|
9
9
|
import "./chunk-XJLZK4QY.js";
|
|
10
10
|
import "./chunk-IRQRV552.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-SVSHXLCN.js";
|
|
12
12
|
import "./chunk-TRKA7XYU.js";
|
|
13
13
|
import "./chunk-YR65C62H.js";
|
|
14
14
|
import "./chunk-TIL2S3JA.js";
|
|
15
15
|
import "./chunk-PVCHKW35.js";
|
|
16
16
|
import "./chunk-CQXDAXQF.js";
|
|
17
|
-
import "./chunk-VODRLEDP.js";
|
|
18
|
-
import "./chunk-6WJI4MOP.js";
|
|
19
17
|
import "./chunk-OLKM53RL.js";
|
|
18
|
+
import "./chunk-DYUOBPAI.js";
|
|
19
|
+
import "./chunk-VODRLEDP.js";
|
|
20
20
|
import "./chunk-UVTLZV34.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-ML5CUAQD.js";
|
|
22
22
|
import "./chunk-NMAXZ3ZY.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-AROYP5V5.js";
|
|
24
24
|
import "./chunk-PL6RIFD5.js";
|
|
25
25
|
import "./chunk-4ZYLGBJU.js";
|
|
26
26
|
import "./chunk-ZZQJWNQT.js";
|
|
27
27
|
import "./chunk-YO22XLHI.js";
|
|
28
28
|
import "./chunk-JIS4PA3R.js";
|
|
29
|
-
import "./chunk-WR6RQKF5.js";
|
|
30
29
|
import {
|
|
31
30
|
getDevicesById
|
|
32
31
|
} from "./chunk-ZGRY42BZ.js";
|
|
32
|
+
import "./chunk-WR6RQKF5.js";
|
|
33
33
|
import "./chunk-4BHM6WVX.js";
|
|
34
34
|
import "./chunk-7WIISD2N.js";
|
|
35
35
|
import "./chunk-WWED74SG.js";
|
|
@@ -7,7 +7,7 @@ import { MonitorSliceType } from '../monitorSlice/index.cjs';
|
|
|
7
7
|
import { DeploymentsSliceType } from '../deploymentsSlice/index.cjs';
|
|
8
8
|
import { DeviceSliceType } from '../devicesSlice/index.cjs';
|
|
9
9
|
import { AppSliceType } from '../appSlice/index.cjs';
|
|
10
|
-
import {
|
|
10
|
+
import { UserSession, UserSliceType, User, GlobalSettings, UserSettings } from './index.cjs';
|
|
11
11
|
import { ReadState } from './constants.cjs';
|
|
12
12
|
import * as _northern_tech_utils_constants from '@northern.tech/utils/constants';
|
|
13
13
|
import { RootState } from '../store.cjs';
|
|
@@ -394,8 +394,8 @@ declare const getRolesList: ((state: {
|
|
|
394
394
|
}) => {
|
|
395
395
|
name: string;
|
|
396
396
|
description?: string;
|
|
397
|
+
permissions?: Array<_northern_tech_types_types_gen.RolePermission>;
|
|
397
398
|
permission_sets_with_scope?: Array<_northern_tech_types_types_gen.PermissionSetWithScope>;
|
|
398
|
-
permissions?: Array<_northern_tech_types_types_gen.RolePermission> | undefined;
|
|
399
399
|
editable?: boolean;
|
|
400
400
|
isCustom?: boolean;
|
|
401
401
|
uiPermissions: Readonly<{
|
|
@@ -415,8 +415,8 @@ declare const getRolesList: ((state: {
|
|
|
415
415
|
resultFunc: (resultFuncArgs_0: Record<string, _northern_tech_utils_constants.Role>) => {
|
|
416
416
|
name: string;
|
|
417
417
|
description?: string;
|
|
418
|
+
permissions?: Array<_northern_tech_types_types_gen.RolePermission>;
|
|
418
419
|
permission_sets_with_scope?: Array<_northern_tech_types_types_gen.PermissionSetWithScope>;
|
|
419
|
-
permissions?: Array<_northern_tech_types_types_gen.RolePermission> | undefined;
|
|
420
420
|
editable?: boolean;
|
|
421
421
|
isCustom?: boolean;
|
|
422
422
|
uiPermissions: Readonly<{
|
|
@@ -432,8 +432,8 @@ declare const getRolesList: ((state: {
|
|
|
432
432
|
memoizedResultFunc: ((resultFuncArgs_0: Record<string, _northern_tech_utils_constants.Role>) => {
|
|
433
433
|
name: string;
|
|
434
434
|
description?: string;
|
|
435
|
+
permissions?: Array<_northern_tech_types_types_gen.RolePermission>;
|
|
435
436
|
permission_sets_with_scope?: Array<_northern_tech_types_types_gen.PermissionSetWithScope>;
|
|
436
|
-
permissions?: Array<_northern_tech_types_types_gen.RolePermission> | undefined;
|
|
437
437
|
editable?: boolean;
|
|
438
438
|
isCustom?: boolean;
|
|
439
439
|
uiPermissions: Readonly<{
|
|
@@ -453,8 +453,8 @@ declare const getRolesList: ((state: {
|
|
|
453
453
|
lastResult: () => {
|
|
454
454
|
name: string;
|
|
455
455
|
description?: string;
|
|
456
|
+
permissions?: Array<_northern_tech_types_types_gen.RolePermission>;
|
|
456
457
|
permission_sets_with_scope?: Array<_northern_tech_types_types_gen.PermissionSetWithScope>;
|
|
457
|
-
permissions?: Array<_northern_tech_types_types_gen.RolePermission> | undefined;
|
|
458
458
|
editable?: boolean;
|
|
459
459
|
isCustom?: boolean;
|
|
460
460
|
uiPermissions: Readonly<{
|
|
@@ -7,7 +7,7 @@ import { MonitorSliceType } from '../monitorSlice/index.js';
|
|
|
7
7
|
import { DeploymentsSliceType } from '../deploymentsSlice/index.js';
|
|
8
8
|
import { DeviceSliceType } from '../devicesSlice/index.js';
|
|
9
9
|
import { AppSliceType } from '../appSlice/index.js';
|
|
10
|
-
import {
|
|
10
|
+
import { UserSession, UserSliceType, User, GlobalSettings, UserSettings } from './index.js';
|
|
11
11
|
import { ReadState } from './constants.js';
|
|
12
12
|
import * as _northern_tech_utils_constants from '@northern.tech/utils/constants';
|
|
13
13
|
import { RootState } from '../store.js';
|
|
@@ -394,8 +394,8 @@ declare const getRolesList: ((state: {
|
|
|
394
394
|
}) => {
|
|
395
395
|
name: string;
|
|
396
396
|
description?: string;
|
|
397
|
+
permissions?: Array<_northern_tech_types_types_gen.RolePermission>;
|
|
397
398
|
permission_sets_with_scope?: Array<_northern_tech_types_types_gen.PermissionSetWithScope>;
|
|
398
|
-
permissions?: Array<_northern_tech_types_types_gen.RolePermission> | undefined;
|
|
399
399
|
editable?: boolean;
|
|
400
400
|
isCustom?: boolean;
|
|
401
401
|
uiPermissions: Readonly<{
|
|
@@ -415,8 +415,8 @@ declare const getRolesList: ((state: {
|
|
|
415
415
|
resultFunc: (resultFuncArgs_0: Record<string, _northern_tech_utils_constants.Role>) => {
|
|
416
416
|
name: string;
|
|
417
417
|
description?: string;
|
|
418
|
+
permissions?: Array<_northern_tech_types_types_gen.RolePermission>;
|
|
418
419
|
permission_sets_with_scope?: Array<_northern_tech_types_types_gen.PermissionSetWithScope>;
|
|
419
|
-
permissions?: Array<_northern_tech_types_types_gen.RolePermission> | undefined;
|
|
420
420
|
editable?: boolean;
|
|
421
421
|
isCustom?: boolean;
|
|
422
422
|
uiPermissions: Readonly<{
|
|
@@ -432,8 +432,8 @@ declare const getRolesList: ((state: {
|
|
|
432
432
|
memoizedResultFunc: ((resultFuncArgs_0: Record<string, _northern_tech_utils_constants.Role>) => {
|
|
433
433
|
name: string;
|
|
434
434
|
description?: string;
|
|
435
|
+
permissions?: Array<_northern_tech_types_types_gen.RolePermission>;
|
|
435
436
|
permission_sets_with_scope?: Array<_northern_tech_types_types_gen.PermissionSetWithScope>;
|
|
436
|
-
permissions?: Array<_northern_tech_types_types_gen.RolePermission> | undefined;
|
|
437
437
|
editable?: boolean;
|
|
438
438
|
isCustom?: boolean;
|
|
439
439
|
uiPermissions: Readonly<{
|
|
@@ -453,8 +453,8 @@ declare const getRolesList: ((state: {
|
|
|
453
453
|
lastResult: () => {
|
|
454
454
|
name: string;
|
|
455
455
|
description?: string;
|
|
456
|
+
permissions?: Array<_northern_tech_types_types_gen.RolePermission>;
|
|
456
457
|
permission_sets_with_scope?: Array<_northern_tech_types_types_gen.PermissionSetWithScope>;
|
|
457
|
-
permissions?: Array<_northern_tech_types_types_gen.RolePermission> | undefined;
|
|
458
458
|
editable?: boolean;
|
|
459
459
|
isCustom?: boolean;
|
|
460
460
|
uiPermissions: Readonly<{
|
|
@@ -916,9 +916,9 @@ var initialState2 = {
|
|
|
916
916
|
hasDeviceConfig: false,
|
|
917
917
|
hasDeviceConnect: false,
|
|
918
918
|
hasFeedbackEnabled: false,
|
|
919
|
+
hasManifestsEnabled: false,
|
|
919
920
|
hasMonitor: false,
|
|
920
921
|
hasMCUEnabled: false,
|
|
921
|
-
hasOldTheme: false,
|
|
922
922
|
hasReporting: false,
|
|
923
923
|
isHosted: true,
|
|
924
924
|
isEnterprise: false
|
|
@@ -953,7 +953,6 @@ var initialState2 = {
|
|
|
953
953
|
offlineThreshold: getYesterday(),
|
|
954
954
|
versionInformation: {
|
|
955
955
|
Integration: "",
|
|
956
|
-
"Mender-Client": "",
|
|
957
956
|
"Mender-Artifact": "",
|
|
958
957
|
"Meta-Mender": ""
|
|
959
958
|
},
|
|
@@ -2558,7 +2557,6 @@ var getLatestRelease = (thing) => {
|
|
|
2558
2557
|
};
|
|
2559
2558
|
var repoKeyMap = {
|
|
2560
2559
|
integration: "Integration",
|
|
2561
|
-
mender: "Mender-Client",
|
|
2562
2560
|
"mender-artifact": "Mender-Artifact"
|
|
2563
2561
|
};
|
|
2564
2562
|
var deductSaasState = (latestRelease, guiTags) => {
|
|
@@ -2662,10 +2660,10 @@ var getDeploymentsByStatus2 = createAppAsyncThunk(
|
|
|
2662
2660
|
const { status, page = defaultPage, perPage = defaultPerPage, startDate, endDate, group, type, shouldSelect = true, sort = import_constants5.SORTING_OPTIONS.desc } = options;
|
|
2663
2661
|
const created_after = startDate ? `&created_after=${startDate}` : "";
|
|
2664
2662
|
const created_before = endDate ? `&created_before=${endDate}` : "";
|
|
2665
|
-
const search = group ? `&
|
|
2663
|
+
const search = group ? `&name=${group}` : "";
|
|
2666
2664
|
const typeFilter = type ? `&type=${type}` : "";
|
|
2667
2665
|
return general_api_default.get(
|
|
2668
|
-
`${import_constants5.
|
|
2666
|
+
`${import_constants5.deploymentsApiUrlV2}/deployments?status=${status}&per_page=${perPage}&page=${page}${created_after}${created_before}${search}${typeFilter}&sort=${sort}`
|
|
2669
2667
|
).then((res) => {
|
|
2670
2668
|
const { deployments, deploymentIds } = transformDeployments(res.data, getState().deployments.byId);
|
|
2671
2669
|
const total = Number(res.headers[import_constants5.headerNames.total]);
|
|
@@ -3129,6 +3127,15 @@ var removeStaticGroup = createAppAsyncThunk(
|
|
|
3129
3127
|
])
|
|
3130
3128
|
)
|
|
3131
3129
|
);
|
|
3130
|
+
var getDynamicGroup = createAppAsyncThunk(
|
|
3131
|
+
`${sliceName4}/getDynamicGroupById`,
|
|
3132
|
+
(id, { dispatch }) => general_api_default.get(`${import_constants5.inventoryApiUrlV2}/filters/${id}`).catch((err) => {
|
|
3133
|
+
if (err.response && err.response.status === 404) {
|
|
3134
|
+
throw new Error("Request failed with status code 404");
|
|
3135
|
+
}
|
|
3136
|
+
return commonErrorHandler(err, `Error retrieving the group: `, dispatch, commonErrorFallback);
|
|
3137
|
+
})
|
|
3138
|
+
);
|
|
3132
3139
|
var getDynamicGroups = createAppAsyncThunk(
|
|
3133
3140
|
`${sliceName4}/getDynamicGroups`,
|
|
3134
3141
|
(_, { dispatch, getState }) => general_api_default.get(`${import_constants5.inventoryApiUrlV2}/filters?per_page=${MAX_PAGE_SIZE}`).then(({ data: filters }) => {
|
|
@@ -4050,7 +4057,7 @@ var verifyEmailStart = createAppAsyncThunk(
|
|
|
4050
4057
|
);
|
|
4051
4058
|
var verifyEmailComplete = createAppAsyncThunk(
|
|
4052
4059
|
`${sliceName}/verifyEmailComplete`,
|
|
4053
|
-
(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))))
|
|
4060
|
+
(secret_hash, { dispatch }) => general_api_default.post(`${import_constants5.useradmApiUrl}/auth/verify-email/complete`, { secret_hash }).then(() => dispatch(actions.receivedActivationCode(""))).catch((err) => commonErrorHandler(err, "An error occured completing the email verification process:", dispatch)).finally(() => Promise.resolve(dispatch(getUser(OWN_USER_ID))))
|
|
4054
4061
|
);
|
|
4055
4062
|
var verify2FA = createAppAsyncThunk(
|
|
4056
4063
|
`${sliceName}/verify2FA`,
|
|
@@ -4226,6 +4233,9 @@ var isEmptyPermissionSet = (permissionSet) => !Object.values(permissionSet).redu
|
|
|
4226
4233
|
var parseRolePermissions = ({ permission_sets_with_scope = [], permissions = [] }, permissionSets) => {
|
|
4227
4234
|
const preliminaryResult = permission_sets_with_scope.reduce(
|
|
4228
4235
|
(accu, permissionSet) => {
|
|
4236
|
+
if (!permissionSet.name) {
|
|
4237
|
+
return accu;
|
|
4238
|
+
}
|
|
4229
4239
|
const processor = permissionSets[permissionSet.name];
|
|
4230
4240
|
if (!processor) {
|
|
4231
4241
|
return accu;
|
|
@@ -4234,7 +4244,7 @@ var parseRolePermissions = ({ permission_sets_with_scope = [], permissions = []
|
|
|
4234
4244
|
if (scope) {
|
|
4235
4245
|
const result = mapPermissionSet(
|
|
4236
4246
|
permissionSet.name,
|
|
4237
|
-
permissionSet.scope
|
|
4247
|
+
permissionSet.scope?.value ?? [],
|
|
4238
4248
|
scope,
|
|
4239
4249
|
accu.uiPermissions[scope]
|
|
4240
4250
|
);
|