@northern.tech/store 0.39.0 → 0.40.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/api/general-api.cjs +1 -1
- package/dist/api/general-api.js +1 -1
- package/dist/appSlice/index.js +1 -1
- package/dist/auth.cjs +1 -1
- package/dist/auth.js +1 -1
- package/dist/commonConstants.cjs +1 -1
- package/dist/commonConstants.js +1 -1
- package/dist/commonSelectors.cjs +1 -1
- package/dist/commonSelectors.js +1 -1
- package/dist/constants-CNZ5L0A0.cjs +957 -0
- package/dist/constants-CNZ5L0A0.cjs.map +1 -0
- package/dist/constants-Cj2kp3Iy.js +676 -0
- package/dist/constants-Cj2kp3Iy.js.map +1 -0
- package/dist/{constants-BwKiHHaB.d.ts → constants-D9o0Cnk_.d.cts} +2 -1
- package/dist/{constants-BwKiHHaB.d.cts → constants-D9o0Cnk_.d.ts} +2 -1
- package/dist/constants.cjs +48 -718
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -672
- package/dist/deploymentsSlice/constants.cjs +1 -1
- package/dist/deploymentsSlice/constants.d.cts +1 -1
- package/dist/deploymentsSlice/constants.d.ts +1 -1
- package/dist/deploymentsSlice/constants.js +1 -1
- package/dist/deploymentsSlice/index.cjs +1 -1
- package/dist/deploymentsSlice/index.js +1 -1
- package/dist/deploymentsSlice/mocks.cjs +1 -1
- package/dist/deploymentsSlice/mocks.cjs.map +1 -1
- package/dist/deploymentsSlice/mocks.d.cts +1 -1
- package/dist/deploymentsSlice/mocks.d.ts +1 -1
- package/dist/deploymentsSlice/mocks.js +1 -1
- package/dist/deploymentsSlice/mocks.js.map +1 -1
- package/dist/deploymentsSlice/selectors.cjs +1 -1
- package/dist/deploymentsSlice/selectors.js +1 -1
- package/dist/devicesSlice/constants.cjs +1 -1
- package/dist/devicesSlice/constants.js +1 -1
- package/dist/devicesSlice/index.js +1 -1
- package/dist/devicesSlice/mocks.js +1 -1
- package/dist/devicesSlice/selectors.cjs +1 -1
- package/dist/devicesSlice/selectors.js +1 -1
- package/dist/liststatehook.cjs +2 -1
- package/dist/liststatehook.cjs.map +1 -1
- package/dist/liststatehook.js +2 -1
- package/dist/liststatehook.js.map +1 -1
- package/dist/locationutils.cjs +1 -1
- package/dist/locationutils.js +1 -1
- package/dist/monitorSlice/index.js +1 -1
- package/dist/monitorSlice/mocks.js +1 -1
- package/dist/monitorSlice/thunks.cjs +1 -1
- package/dist/monitorSlice/thunks.js +1 -1
- package/dist/organizationSlice/constants.cjs +1 -1
- package/dist/organizationSlice/constants.js +1 -1
- package/dist/organizationSlice/index.cjs +1 -1
- package/dist/organizationSlice/index.js +1 -1
- package/dist/organizationSlice/mocks.js +1 -1
- package/dist/organizationSlice/selectors.cjs +1 -1
- package/dist/organizationSlice/selectors.js +1 -1
- package/dist/releasesSlice/index.js +1 -1
- package/dist/releasesSlice/mocks.js +1 -1
- package/dist/releasesSlice/thunks.cjs +6 -4
- package/dist/releasesSlice/thunks.cjs.map +1 -1
- package/dist/releasesSlice/thunks.js +6 -4
- package/dist/releasesSlice/thunks.js.map +1 -1
- package/dist/sockethook.cjs +1 -1
- package/dist/sockethook.js +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.js +1 -1
- package/dist/storehooks.cjs +1 -1
- package/dist/storehooks.js +1 -1
- package/dist/thunks.cjs +46 -40
- package/dist/thunks.cjs.map +1 -1
- package/dist/thunks.js +46 -40
- package/dist/thunks.js.map +1 -1
- package/dist/usersSlice/constants.cjs +1 -1
- package/dist/usersSlice/constants.js +1 -1
- package/dist/usersSlice/index.cjs +1 -1
- package/dist/usersSlice/index.js +1 -1
- package/dist/usersSlice/mocks.js +1 -1
- package/dist/usersSlice/selectors.cjs +1 -1
- package/dist/usersSlice/selectors.js +1 -1
- package/dist/utils.cjs +11 -21
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.js +11 -21
- package/dist/utils.js.map +1 -1
- package/package.json +3 -3
- package/dist/constants.cjs.map +0 -1
- package/dist/constants.js.map +0 -1
package/dist/thunks.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ADDONS, PLANS, locations } from "./appSlice/constants.js";
|
|
2
|
+
import { B as twoFAStates, C as deviceConnect, D as inventoryApiUrl, E as headerNames, F as scopedPermissionAreas, G as useradmApiUrlv2, H as uiPermissionsById, J as USER_LOGOUT, L as ssoIdpApiUrlv1, Mt as UNGROUPED_GROUP, N as rolesById, O as inventoryApiUrlV2, R as tenantadmApiUrlv1, S as deviceConfig, T as emptyUiPermissions, U as useradmApiUrl, V as uiPermissionsByArea, X as itemUiPermissionsReducer, Z as settingsKeys, _ as defaultPermissionSets, _t as DEPLOYMENT_TYPES, a as APPLICATION_JWT_CONTENT_TYPE, b as deploymentsApiUrlV2, bt as deploymentPrototype, d as PermissionTypes, f as SORTING_OPTIONS, ft as emptyFilter, g as auditLogsApiUrl, gt as DEPLOYMENT_STATES, ht as DEPLOYMENT_ROUTES, i as APPLICATION_JSON_CONTENT_TYPE, j as maxSessionAge, jt as TIMEOUTS, k as iotManagerBaseURL, kt as EXTERNAL_PROVIDER, l as DEVICE_LIST_DEFAULTS, m as apiRoot, n as ALL_DEVICE_STATES, nt as TENANT_LIST_DEFAULT, q as READ_STATES, r as ALL_RELEASES, s as DEVICE_FILTERING_OPTIONS, tt as SSO_TYPES, u as DEVICE_STATES, v as deploymentsApiUrl, w as emptyRole, x as deviceAuthV2, z as tenantadmApiUrlv2 } from "./constants-Cj2kp3Iy.js";
|
|
2
3
|
import { onboardingSteps, orderedOnboardingSteps } from "./onboardingSlice/constants.js";
|
|
3
4
|
import { rootfsImageVersion } from "./releasesSlice/constants.js";
|
|
4
|
-
import { ALL_DEVICE_STATES, ALL_RELEASES, APPLICATION_JSON_CONTENT_TYPE, APPLICATION_JWT_CONTENT_TYPE, DEPLOYMENT_ROUTES, DEPLOYMENT_STATES, DEPLOYMENT_TYPES, DEVICE_FILTERING_OPTIONS, DEVICE_LIST_DEFAULTS, DEVICE_STATES, EXTERNAL_PROVIDER, PermissionTypes, READ_STATES, SORTING_OPTIONS, SSO_TYPES, TENANT_LIST_DEFAULT, TIMEOUTS, UNGROUPED_GROUP, USER_LOGOUT, apiRoot, auditLogsApiUrl, defaultPermissionSets, deploymentPrototype, deploymentsApiUrl, deploymentsApiUrlV2, deviceAuthV2, deviceConfig, deviceConnect, emptyFilter, emptyRole, emptyUiPermissions, headerNames, inventoryApiUrl, inventoryApiUrlV2, iotManagerBaseURL, itemUiPermissionsReducer, maxSessionAge, rolesById, scopedPermissionAreas, settingsKeys, ssoIdpApiUrlv1, tenantadmApiUrlv1, tenantadmApiUrlv2, twoFAStates, uiPermissionsByArea, uiPermissionsById, useradmApiUrl, useradmApiUrlv2 } from "./constants.js";
|
|
5
5
|
import { actions } from "./appSlice/index.js";
|
|
6
6
|
import { actions as actions$1, sliceName as sliceName$1 } from "./deploymentsSlice/index.js";
|
|
7
7
|
import { actions as actions$2, sliceName as sliceName$2 } from "./devicesSlice/index.js";
|
|
@@ -446,10 +446,11 @@ const deepClean = (source) => Object.entries(source).reduce((accu, [key, value])
|
|
|
446
446
|
return accu;
|
|
447
447
|
}, void 0);
|
|
448
448
|
const saveDeltaDeploymentsConfig = createAppAsyncThunk(`${sliceName$1}/saveDeltaDeploymentsConfig`, (config, { dispatch, getState }) => {
|
|
449
|
-
const
|
|
449
|
+
const configChange = { xdelta_args: deltaAttributeMappings.reduce((accu, { here, there }) => {
|
|
450
450
|
if (config[here] !== void 0) accu[there] = config[here];
|
|
451
451
|
return accu;
|
|
452
|
-
}, {}) }
|
|
452
|
+
}, {}) };
|
|
453
|
+
const result = deepClean(configChange);
|
|
453
454
|
if (!result) return Promise.resolve();
|
|
454
455
|
return Api.put(`${deploymentsApiUrl}/config/binary_delta`, result).catch((err) => commonErrorHandler(err, "There was a problem storing your delta artifact generation configuration.", dispatch)).then(() => {
|
|
455
456
|
const oldConfig = getState().deployments.config;
|
|
@@ -1196,7 +1197,8 @@ const updateDeviceAuth = createAppAsyncThunk(`${sliceName$2}/updateDeviceAuth`,
|
|
|
1196
1197
|
})))).finally(() => dispatch(setDeviceListState({ refreshTrigger: !getDeviceListState(getState()).refreshTrigger }))));
|
|
1197
1198
|
const updateDevicesAuth = createAppAsyncThunk(`${sliceName$2}/updateDevicesAuth`, ({ deviceIds, status }, { dispatch, getState }) => {
|
|
1198
1199
|
let devices = getDevicesById(getState());
|
|
1199
|
-
|
|
1200
|
+
const deviceIdsWithoutAuth = deviceIds.reduce((accu, id) => devices[id].auth_sets ? accu : [...accu, { id }], []);
|
|
1201
|
+
return dispatch(getDevicesWithAuth(deviceIdsWithoutAuth)).then(() => {
|
|
1200
1202
|
devices = getDevicesById(getState());
|
|
1201
1203
|
const deviceAuthUpdates = deviceIds.map((id) => {
|
|
1202
1204
|
const device = devices[id];
|
|
@@ -1218,7 +1220,8 @@ const updateDevicesAuth = createAppAsyncThunk(`${sliceName$2}/updateDevicesAuth`
|
|
|
1218
1220
|
failed: 0,
|
|
1219
1221
|
count: 0
|
|
1220
1222
|
});
|
|
1221
|
-
|
|
1223
|
+
const message = getSnackbarMessage(skipped, count, failed);
|
|
1224
|
+
return dispatch(setSnackbar$2(message));
|
|
1222
1225
|
});
|
|
1223
1226
|
});
|
|
1224
1227
|
});
|
|
@@ -1354,19 +1357,20 @@ const getSystemDevices = createAppAsyncThunk(`${sliceName$2}/getSystemDevices`,
|
|
|
1354
1357
|
if (!hasFullFiltering) return Promise.resolve();
|
|
1355
1358
|
const { attributes: deviceAttributes = {} } = getDeviceById$1(state, id);
|
|
1356
1359
|
const { mender_gateway_system_id = "" } = deviceAttributes;
|
|
1360
|
+
const filters = [{
|
|
1361
|
+
...emptyFilter,
|
|
1362
|
+
key: "mender_is_gateway",
|
|
1363
|
+
operator: DEVICE_FILTERING_OPTIONS.$ne.key,
|
|
1364
|
+
value: "true",
|
|
1365
|
+
scope: "inventory"
|
|
1366
|
+
}, {
|
|
1367
|
+
...emptyFilter,
|
|
1368
|
+
key: "mender_gateway_system_id",
|
|
1369
|
+
value: mender_gateway_system_id,
|
|
1370
|
+
scope: "inventory"
|
|
1371
|
+
}];
|
|
1357
1372
|
const { attributes, filterTerms } = prepareSearchArguments({
|
|
1358
|
-
filters
|
|
1359
|
-
...emptyFilter,
|
|
1360
|
-
key: "mender_is_gateway",
|
|
1361
|
-
operator: DEVICE_FILTERING_OPTIONS.$ne.key,
|
|
1362
|
-
value: "true",
|
|
1363
|
-
scope: "inventory"
|
|
1364
|
-
}, {
|
|
1365
|
-
...emptyFilter,
|
|
1366
|
-
key: "mender_gateway_system_id",
|
|
1367
|
-
value: mender_gateway_system_id,
|
|
1368
|
-
scope: "inventory"
|
|
1369
|
-
}],
|
|
1373
|
+
filters,
|
|
1370
1374
|
state
|
|
1371
1375
|
});
|
|
1372
1376
|
return Api.post(`${inventoryApiUrlV2}/filters/search`, {
|
|
@@ -1393,28 +1397,29 @@ const getGatewayDevices = createAppAsyncThunk(`${sliceName$2}/getGatewayDevices`
|
|
|
1393
1397
|
const state = getState();
|
|
1394
1398
|
const { attributes = {} } = getDeviceById$1(state, deviceId);
|
|
1395
1399
|
const { mender_gateway_system_id = "" } = attributes;
|
|
1400
|
+
const filters = [
|
|
1401
|
+
{
|
|
1402
|
+
...emptyFilter,
|
|
1403
|
+
key: "id",
|
|
1404
|
+
operator: DEVICE_FILTERING_OPTIONS.$ne.key,
|
|
1405
|
+
value: deviceId,
|
|
1406
|
+
scope: "identity"
|
|
1407
|
+
},
|
|
1408
|
+
{
|
|
1409
|
+
...emptyFilter,
|
|
1410
|
+
key: "mender_is_gateway",
|
|
1411
|
+
value: "true",
|
|
1412
|
+
scope: "inventory"
|
|
1413
|
+
},
|
|
1414
|
+
{
|
|
1415
|
+
...emptyFilter,
|
|
1416
|
+
key: "mender_gateway_system_id",
|
|
1417
|
+
value: mender_gateway_system_id,
|
|
1418
|
+
scope: "inventory"
|
|
1419
|
+
}
|
|
1420
|
+
];
|
|
1396
1421
|
const { attributes: attributeSelection, filterTerms } = prepareSearchArguments({
|
|
1397
|
-
filters
|
|
1398
|
-
{
|
|
1399
|
-
...emptyFilter,
|
|
1400
|
-
key: "id",
|
|
1401
|
-
operator: DEVICE_FILTERING_OPTIONS.$ne.key,
|
|
1402
|
-
value: deviceId,
|
|
1403
|
-
scope: "identity"
|
|
1404
|
-
},
|
|
1405
|
-
{
|
|
1406
|
-
...emptyFilter,
|
|
1407
|
-
key: "mender_is_gateway",
|
|
1408
|
-
value: "true",
|
|
1409
|
-
scope: "inventory"
|
|
1410
|
-
},
|
|
1411
|
-
{
|
|
1412
|
-
...emptyFilter,
|
|
1413
|
-
key: "mender_gateway_system_id",
|
|
1414
|
-
value: mender_gateway_system_id,
|
|
1415
|
-
scope: "inventory"
|
|
1416
|
-
}
|
|
1417
|
-
],
|
|
1422
|
+
filters,
|
|
1418
1423
|
state
|
|
1419
1424
|
});
|
|
1420
1425
|
return Api.post(`${inventoryApiUrlV2}/filters/search`, {
|
|
@@ -1581,7 +1586,7 @@ const getProductAddons = (products) => products.reduce((accu, product) => {
|
|
|
1581
1586
|
const newEligible = addonPrices.map((p) => p.plan);
|
|
1582
1587
|
accu[addonName] = {
|
|
1583
1588
|
...ADDONS[addonName],
|
|
1584
|
-
eligible: [
|
|
1589
|
+
eligible: [.../* @__PURE__ */ new Set([
|
|
1585
1590
|
...existingEligible,
|
|
1586
1591
|
...newEligible,
|
|
1587
1592
|
PLANS.enterprise.id
|
|
@@ -2272,7 +2277,8 @@ const deriveImpliedAreaPermissions = (area, areaPermissions, skipPermissions = [
|
|
|
2272
2277
|
*/
|
|
2273
2278
|
const transformAreaRoleDataToScopedPermissionsSets = (area, areaPermissions, excessiveAccessSelector) => {
|
|
2274
2279
|
const permissionSetObject = areaPermissions.reduce((accu, { item, uiPermissions }) => {
|
|
2275
|
-
|
|
2280
|
+
const skipPermissions = scopedPermissionAreas.releases.key === area && item !== ALL_RELEASES ? [uiPermissionsById.upload.value] : [];
|
|
2281
|
+
accu = deriveImpliedAreaPermissions(area, uiPermissions, skipPermissions).reduce((itemPermissionAccu, impliedPermission) => {
|
|
2276
2282
|
const permissionSetState = itemPermissionAccu[uiPermissionsById[impliedPermission].permissionSets[area]] ?? {
|
|
2277
2283
|
type: uiPermissionsByArea[area].scope,
|
|
2278
2284
|
value: []
|