@northern.tech/store 0.29.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.
- package/dist/actions.cjs +0 -1
- package/dist/actions.cjs.map +1 -1
- package/dist/actions.js +9 -9
- package/dist/api/general-api.cjs.map +1 -1
- package/dist/api/general-api.js +3 -3
- package/dist/api/users-api.cjs.map +1 -1
- package/dist/api/users-api.js +4 -4
- package/dist/appSlice/index.cjs +0 -1
- package/dist/appSlice/index.cjs.map +1 -1
- package/dist/appSlice/index.js +2 -2
- package/dist/appSlice/mocks.cjs +0 -1
- package/dist/appSlice/mocks.cjs.map +1 -1
- package/dist/appSlice/mocks.js +2 -2
- package/dist/appSlice/thunks.cjs +25 -31
- package/dist/appSlice/thunks.cjs.map +1 -1
- package/dist/appSlice/thunks.js +24 -24
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.js +2 -2
- package/dist/{chunk-2QIGK5IU.js → chunk-4UNLEL5A.js} +2 -2
- package/dist/{chunk-4573DUCR.js → chunk-6V5IIIF7.js} +2 -2
- package/dist/{chunk-Z4QLZNAN.js → chunk-ARMI6SZS.js} +13 -15
- package/dist/chunk-ARMI6SZS.js.map +1 -0
- package/dist/{chunk-KEQAPMP6.js → chunk-AZF4YY3P.js} +10 -12
- package/dist/chunk-AZF4YY3P.js.map +1 -0
- package/dist/{chunk-GX3X2E57.js → chunk-B5AI2YPV.js} +2 -3
- package/dist/chunk-B5AI2YPV.js.map +1 -0
- package/dist/{chunk-WXRYJOL3.js → chunk-ECVQVQEL.js} +2 -2
- package/dist/{chunk-FXPRG4WH.js → chunk-FCY7BUGK.js} +40 -39
- package/dist/chunk-FCY7BUGK.js.map +1 -0
- package/dist/{chunk-525LX7VL.js → chunk-FG37HJLC.js} +2 -2
- package/dist/{chunk-SDHCQ62K.js → chunk-FQAUVV6C.js} +2 -2
- package/dist/{chunk-5OLM3HEG.js → chunk-HKN3RN2Z.js} +8 -8
- package/dist/{chunk-XHLNGIAP.js → chunk-HPKXWNEF.js} +2 -2
- package/dist/{chunk-QX67O5A2.js → chunk-JXBTIFMS.js} +3 -3
- package/dist/{chunk-VK6FVQ5K.js → chunk-JYPSCCT4.js} +3 -3
- package/dist/{chunk-CMXRPUOF.js → chunk-L53CPHJU.js} +1 -3
- package/dist/chunk-L53CPHJU.js.map +1 -0
- package/dist/{chunk-4BUO44SS.js → chunk-MNJXEB7S.js} +11 -23
- package/dist/chunk-MNJXEB7S.js.map +1 -0
- package/dist/{chunk-UE2EPKRU.js → chunk-NXLXPRYW.js} +11 -11
- package/dist/{chunk-FAKWYYOB.js → chunk-O6VCSLNE.js} +2 -2
- package/dist/{chunk-LSAJE3IU.js → chunk-PQADM3M3.js} +2 -2
- package/dist/{chunk-VLII64V6.js → chunk-SJ75YKOA.js} +2 -2
- package/dist/{chunk-66LI4BJO.js → chunk-TUPBZ6MQ.js} +2 -2
- package/dist/{chunk-SDWPOLHM.js → chunk-XF3TZSZS.js} +3 -3
- package/dist/{chunk-HVZ5BOM6.js → chunk-YB3US6OT.js} +2 -2
- package/dist/{chunk-UBFFGYQ4.js → chunk-YDDE5TIH.js} +2 -2
- package/dist/{chunk-4YLOOOZH.js → chunk-Z2O6LYVP.js} +2 -2
- package/dist/commonConstants.cjs.map +1 -1
- package/dist/commonConstants.js +1 -1
- package/dist/commonSelectors.cjs +3 -15
- package/dist/commonSelectors.cjs.map +1 -1
- package/dist/commonSelectors.d.cts +6 -66
- package/dist/commonSelectors.d.ts +6 -66
- package/dist/commonSelectors.js +8 -12
- package/dist/constants.cjs +0 -2
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -3
- package/dist/deploymentsSlice/constants.cjs.map +1 -1
- package/dist/deploymentsSlice/constants.js +1 -1
- package/dist/deploymentsSlice/index.cjs.map +1 -1
- package/dist/deploymentsSlice/index.js +2 -2
- package/dist/deploymentsSlice/mocks.cjs.map +1 -1
- package/dist/deploymentsSlice/mocks.js +2 -2
- package/dist/deploymentsSlice/selectors.cjs.map +1 -1
- package/dist/deploymentsSlice/selectors.js +2 -2
- package/dist/deploymentsSlice/thunks.cjs +25 -31
- package/dist/deploymentsSlice/thunks.cjs.map +1 -1
- package/dist/deploymentsSlice/thunks.js +24 -24
- package/dist/devicesSlice/constants.cjs.map +1 -1
- package/dist/devicesSlice/constants.js +1 -1
- package/dist/devicesSlice/index.cjs.map +1 -1
- package/dist/devicesSlice/index.js +2 -2
- package/dist/devicesSlice/mocks.cjs.map +1 -1
- package/dist/devicesSlice/mocks.js +2 -2
- package/dist/devicesSlice/selectors.cjs.map +1 -1
- package/dist/devicesSlice/selectors.js +2 -2
- package/dist/devicesSlice/thunks.cjs +25 -31
- package/dist/devicesSlice/thunks.cjs.map +1 -1
- package/dist/devicesSlice/thunks.js +24 -24
- package/dist/liststatehook.cjs.map +1 -1
- package/dist/liststatehook.js +2 -2
- package/dist/locationutils.cjs.map +1 -1
- package/dist/locationutils.js +2 -2
- package/dist/monitorSlice/index.cjs.map +1 -1
- package/dist/monitorSlice/index.js +2 -2
- package/dist/monitorSlice/mocks.cjs +0 -1
- package/dist/monitorSlice/mocks.cjs.map +1 -1
- package/dist/monitorSlice/mocks.d.cts +0 -4
- package/dist/monitorSlice/mocks.d.ts +0 -4
- package/dist/monitorSlice/mocks.js +2 -3
- package/dist/monitorSlice/mocks.js.map +1 -1
- package/dist/monitorSlice/thunks.cjs +29 -628
- package/dist/monitorSlice/thunks.cjs.map +1 -1
- package/dist/monitorSlice/thunks.js +20 -20
- package/dist/onboardingSlice/thunks.cjs +25 -31
- package/dist/onboardingSlice/thunks.cjs.map +1 -1
- package/dist/onboardingSlice/thunks.js +24 -24
- package/dist/organizationSlice/constants.cjs.map +1 -1
- package/dist/organizationSlice/constants.js +1 -1
- package/dist/organizationSlice/index.cjs.map +1 -1
- package/dist/organizationSlice/index.js +2 -2
- package/dist/organizationSlice/mocks.cjs.map +1 -1
- package/dist/organizationSlice/mocks.js +2 -2
- package/dist/organizationSlice/selectors.cjs.map +1 -1
- package/dist/organizationSlice/selectors.js +2 -2
- package/dist/organizationSlice/thunks.cjs +25 -31
- package/dist/organizationSlice/thunks.cjs.map +1 -1
- package/dist/organizationSlice/thunks.js +24 -24
- package/dist/releasesSlice/index.cjs.map +1 -1
- package/dist/releasesSlice/index.js +2 -2
- package/dist/releasesSlice/mocks.cjs.map +1 -1
- package/dist/releasesSlice/mocks.js +2 -2
- package/dist/releasesSlice/selectors.cjs.map +1 -1
- package/dist/releasesSlice/selectors.js +3 -3
- package/dist/releasesSlice/thunks.cjs +99 -795
- package/dist/releasesSlice/thunks.cjs.map +1 -1
- package/dist/releasesSlice/thunks.js +16 -25
- package/dist/selectors.cjs +3 -15
- package/dist/selectors.cjs.map +1 -1
- package/dist/selectors.d.cts +1 -1
- package/dist/selectors.d.ts +1 -1
- package/dist/selectors.js +8 -12
- package/dist/sockethook.cjs.map +1 -1
- package/dist/sockethook.js +1 -1
- package/dist/store.cjs +0 -1
- package/dist/store.cjs.map +1 -1
- package/dist/store.js +11 -11
- package/dist/storehooks.cjs +27 -34
- package/dist/storehooks.cjs.map +1 -1
- package/dist/storehooks.js +24 -25
- package/dist/storehooks.js.map +1 -1
- package/dist/thunks.cjs +27 -33
- package/dist/thunks.cjs.map +1 -1
- package/dist/thunks.js +24 -24
- package/dist/useDeploymentDevice.cjs +25 -31
- package/dist/useDeploymentDevice.cjs.map +1 -1
- package/dist/useDeploymentDevice.js +24 -24
- package/dist/usersSlice/constants.cjs.map +1 -1
- package/dist/usersSlice/constants.js +1 -1
- package/dist/usersSlice/index.cjs.map +1 -1
- package/dist/usersSlice/index.js +2 -2
- package/dist/usersSlice/mocks.cjs.map +1 -1
- package/dist/usersSlice/mocks.js +2 -2
- package/dist/usersSlice/selectors.cjs.map +1 -1
- package/dist/usersSlice/selectors.js +3 -3
- package/dist/usersSlice/thunks.cjs +25 -31
- package/dist/usersSlice/thunks.cjs.map +1 -1
- package/dist/usersSlice/thunks.js +24 -24
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-4BUO44SS.js.map +0 -1
- package/dist/chunk-CMXRPUOF.js.map +0 -1
- package/dist/chunk-FXPRG4WH.js.map +0 -1
- package/dist/chunk-GX3X2E57.js.map +0 -1
- package/dist/chunk-KEQAPMP6.js.map +0 -1
- package/dist/chunk-Z4QLZNAN.js.map +0 -1
- /package/dist/{chunk-2QIGK5IU.js.map → chunk-4UNLEL5A.js.map} +0 -0
- /package/dist/{chunk-4573DUCR.js.map → chunk-6V5IIIF7.js.map} +0 -0
- /package/dist/{chunk-WXRYJOL3.js.map → chunk-ECVQVQEL.js.map} +0 -0
- /package/dist/{chunk-525LX7VL.js.map → chunk-FG37HJLC.js.map} +0 -0
- /package/dist/{chunk-SDHCQ62K.js.map → chunk-FQAUVV6C.js.map} +0 -0
- /package/dist/{chunk-5OLM3HEG.js.map → chunk-HKN3RN2Z.js.map} +0 -0
- /package/dist/{chunk-XHLNGIAP.js.map → chunk-HPKXWNEF.js.map} +0 -0
- /package/dist/{chunk-QX67O5A2.js.map → chunk-JXBTIFMS.js.map} +0 -0
- /package/dist/{chunk-VK6FVQ5K.js.map → chunk-JYPSCCT4.js.map} +0 -0
- /package/dist/{chunk-UE2EPKRU.js.map → chunk-NXLXPRYW.js.map} +0 -0
- /package/dist/{chunk-FAKWYYOB.js.map → chunk-O6VCSLNE.js.map} +0 -0
- /package/dist/{chunk-LSAJE3IU.js.map → chunk-PQADM3M3.js.map} +0 -0
- /package/dist/{chunk-VLII64V6.js.map → chunk-SJ75YKOA.js.map} +0 -0
- /package/dist/{chunk-66LI4BJO.js.map → chunk-TUPBZ6MQ.js.map} +0 -0
- /package/dist/{chunk-SDWPOLHM.js.map → chunk-XF3TZSZS.js.map} +0 -0
- /package/dist/{chunk-HVZ5BOM6.js.map → chunk-YB3US6OT.js.map} +0 -0
- /package/dist/{chunk-UBFFGYQ4.js.map → chunk-YDDE5TIH.js.map} +0 -0
- /package/dist/{chunk-4YLOOOZH.js.map → chunk-Z2O6LYVP.js.map} +0 -0
|
@@ -992,7 +992,6 @@ var initialState2 = {
|
|
|
992
992
|
hasManifestsEnabled: false,
|
|
993
993
|
hasMonitor: false,
|
|
994
994
|
hasMCUEnabled: false,
|
|
995
|
-
hasReporting: false,
|
|
996
995
|
isHosted: true,
|
|
997
996
|
isEnterprise: false
|
|
998
997
|
},
|
|
@@ -2250,14 +2249,6 @@ var getIsEnterprise = (0, import_toolkit15.createSelector)(
|
|
|
2250
2249
|
[getOrganization, getFeatures],
|
|
2251
2250
|
({ plan = PLANS.os.id }, { isEnterprise, isHosted }) => isEnterprise || isHosted && plan === PLANS.enterprise.id
|
|
2252
2251
|
);
|
|
2253
|
-
var getAttrsEndpoint = (0, import_toolkit15.createSelector)(
|
|
2254
|
-
[getFeatures],
|
|
2255
|
-
({ hasReporting }) => hasReporting ? `${import_constants5.reportingApiUrl}/devices/search/attributes` : `${import_constants5.inventoryApiUrlV2}/filters/attributes`
|
|
2256
|
-
);
|
|
2257
|
-
var getSearchEndpoint = (0, import_toolkit15.createSelector)(
|
|
2258
|
-
[getFeatures],
|
|
2259
|
-
({ hasReporting }) => hasReporting ? `${import_constants5.reportingApiUrl}/devices/search` : `${import_constants5.inventoryApiUrlV2}/filters/search`
|
|
2260
|
-
);
|
|
2261
2252
|
var getUserRoles = (0, import_toolkit15.createSelector)([getCurrentUser, getRolesById, getIsEnterprise], (currentUser, rolesById2, isEnterprise) => {
|
|
2262
2253
|
const isAdmin = currentUser.roles?.length ? currentUser.roles.some((role) => role === import_constants5.rolesByName.admin) : !isEnterprise;
|
|
2263
2254
|
const uiPermissions = isAdmin ? mapUserRolesToUiPermissions([import_constants5.rolesByName.admin], rolesById2) : mapUserRolesToUiPermissions(currentUser.roles || [], rolesById2);
|
|
@@ -2391,9 +2382,9 @@ var getSelectedDeploymentData = (0, import_toolkit15.createSelector)(
|
|
|
2391
2382
|
}
|
|
2392
2383
|
);
|
|
2393
2384
|
var getAvailableIssueOptionsByType = (0, import_toolkit15.createSelector)(
|
|
2394
|
-
[
|
|
2395
|
-
({
|
|
2396
|
-
if (isCategory ||
|
|
2385
|
+
[getTenantCapabilities, getIssueCountsByType],
|
|
2386
|
+
({ hasFullFiltering, hasMonitor }, issueCounts) => Object.values(import_constants5.DEVICE_ISSUE_OPTIONS).reduce((accu, { isCategory, key, needsFullFiltering, needsMonitor, title }) => {
|
|
2387
|
+
if (isCategory || needsFullFiltering && !hasFullFiltering || needsMonitor && !hasMonitor) {
|
|
2397
2388
|
return accu;
|
|
2398
2389
|
}
|
|
2399
2390
|
accu[key] = { count: issueCounts[key].filtered, key, title };
|
|
@@ -3079,7 +3070,7 @@ var getIssueCountsByType2 = createAppAsyncThunk(
|
|
|
3079
3070
|
selectedIssues: [type],
|
|
3080
3071
|
status
|
|
3081
3072
|
});
|
|
3082
|
-
return general_api_default.post(
|
|
3073
|
+
return general_api_default.post(`${import_constants5.inventoryApiUrlV2}/filters/search`, {
|
|
3083
3074
|
page: 1,
|
|
3084
3075
|
per_page: 1,
|
|
3085
3076
|
filters: filterTerms,
|
|
@@ -4079,7 +4070,7 @@ var getAllGroupDevices = createAppAsyncThunk(
|
|
|
4079
4070
|
state: getState(),
|
|
4080
4071
|
status: import_constants5.DEVICE_STATES.accepted
|
|
4081
4072
|
});
|
|
4082
|
-
const getAllDevices = (perPage = MAX_PAGE_SIZE, page = defaultPage3, devices = []) => general_api_default.post(
|
|
4073
|
+
const getAllDevices = (perPage = MAX_PAGE_SIZE, page = defaultPage3, devices = []) => general_api_default.post(`${import_constants5.inventoryApiUrlV2}/filters/search`, {
|
|
4083
4074
|
page,
|
|
4084
4075
|
per_page: perPage,
|
|
4085
4076
|
filters: filterTerms,
|
|
@@ -4108,18 +4099,21 @@ var getAllDynamicGroupDevices = createAppAsyncThunk(
|
|
|
4108
4099
|
state: getState(),
|
|
4109
4100
|
status: import_constants5.DEVICE_STATES.accepted
|
|
4110
4101
|
});
|
|
4111
|
-
const getAllDevices = (perPage = MAX_PAGE_SIZE, page = defaultPage3, devices = []) => general_api_default.post(
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4102
|
+
const getAllDevices = (perPage = MAX_PAGE_SIZE, page = defaultPage3, devices = []) => general_api_default.post(`${import_constants5.inventoryApiUrlV2}/filters/search`, {
|
|
4103
|
+
page,
|
|
4104
|
+
per_page: perPage,
|
|
4105
|
+
filters,
|
|
4106
|
+
attributes: [...attributes, { scope: "inventory", attribute }]
|
|
4107
|
+
}).then((res) => {
|
|
4108
|
+
const state = getState();
|
|
4109
|
+
const deviceAccu = reduceReceivedDevices(res.data, devices, state);
|
|
4110
|
+
dispatch(actions.receivedDevices(deviceAccu.devicesById));
|
|
4111
|
+
const total = Number(res.headers[import_constants5.headerNames.total]);
|
|
4112
|
+
if (total > deviceAccu.ids.length) {
|
|
4113
|
+
return getAllDevices(perPage, page + 1, deviceAccu.ids);
|
|
4121
4114
|
}
|
|
4122
|
-
|
|
4115
|
+
return Promise.resolve(dispatch(actions.addGroup({ group: { deviceIds: deviceAccu.ids, total }, groupName: group })));
|
|
4116
|
+
});
|
|
4123
4117
|
return getAllDevices();
|
|
4124
4118
|
}
|
|
4125
4119
|
);
|
|
@@ -4247,7 +4241,7 @@ var getDevicesByStatus2 = createAppAsyncThunk(
|
|
|
4247
4241
|
status
|
|
4248
4242
|
});
|
|
4249
4243
|
const attributes = [...defaultAttributes, getIdAttribute(getState()), ...selectedAttributes];
|
|
4250
|
-
return general_api_default.post(
|
|
4244
|
+
return general_api_default.post(`${import_constants5.inventoryApiUrlV2}/filters/search`, {
|
|
4251
4245
|
page,
|
|
4252
4246
|
per_page: perPage,
|
|
4253
4247
|
filters: filterTerms,
|
|
@@ -4277,7 +4271,7 @@ var getAllDevicesByStatus = createAppAsyncThunk(
|
|
|
4277
4271
|
`${sliceName}/getAllDevicesByStatus`,
|
|
4278
4272
|
({ status, attribute }, { dispatch, getState }) => {
|
|
4279
4273
|
const attributes = [...defaultAttributes, getIdAttribute(getState())];
|
|
4280
|
-
const getAllDevices = (perPage = MAX_PAGE_SIZE, page = 1, devices = []) => general_api_default.post(
|
|
4274
|
+
const getAllDevices = (perPage = MAX_PAGE_SIZE, page = 1, devices = []) => general_api_default.post(`${import_constants5.inventoryApiUrlV2}/filters/search`, {
|
|
4281
4275
|
page,
|
|
4282
4276
|
per_page: perPage,
|
|
4283
4277
|
filters: mapFiltersToTerms([{ key: "status", value: status, operator: import_constants5.DEVICE_FILTERING_OPTIONS.$eq.key, scope: "identity" }]),
|
|
@@ -4305,7 +4299,7 @@ var searchDevices = createAppAsyncThunk(`${sliceName}/searchDevices`, (passedOpt
|
|
|
4305
4299
|
const { columnSelection = [] } = getUserSettings(state);
|
|
4306
4300
|
const selectedAttributes = columnSelection.map((column) => ({ attribute: column.key, scope: column.scope }));
|
|
4307
4301
|
const attributes = (0, import_helpers10.attributeDuplicateFilter)([...defaultAttributes, getIdAttribute(state), ...selectedAttributes], "attribute");
|
|
4308
|
-
return general_api_default.post(
|
|
4302
|
+
return general_api_default.post(`${import_constants5.inventoryApiUrlV2}/filters/search`, {
|
|
4309
4303
|
page,
|
|
4310
4304
|
per_page: 10,
|
|
4311
4305
|
filters: [],
|
|
@@ -4333,7 +4327,7 @@ var attributeReducer = (attributes = []) => attributes.slice(0, ATTRIBUTE_LIST_C
|
|
|
4333
4327
|
);
|
|
4334
4328
|
var getDeviceAttributes = createAppAsyncThunk(
|
|
4335
4329
|
`${sliceName}/getDeviceAttributes`,
|
|
4336
|
-
(_, { dispatch
|
|
4330
|
+
(_, { dispatch }) => general_api_default.get(`${import_constants5.inventoryApiUrlV2}/filters/attributes`).then(({ data }) => {
|
|
4337
4331
|
const { identity: identityAttributes, inventory: inventoryAttributes, system: systemAttributes, tags: tagAttributes } = attributeReducer(data || []);
|
|
4338
4332
|
return dispatch(actions.setFilterAttributes({ identityAttributes, inventoryAttributes, systemAttributes, tagAttributes }));
|
|
4339
4333
|
})
|
|
@@ -4633,7 +4627,7 @@ var getSystemDevices = createAppAsyncThunk(`${sliceName}/getSystemDevices`, (opt
|
|
|
4633
4627
|
{ ...emptyFilter, key: "mender_gateway_system_id", value: mender_gateway_system_id, scope: "inventory" }
|
|
4634
4628
|
];
|
|
4635
4629
|
const { attributes, filterTerms } = prepareSearchArguments({ filters, state });
|
|
4636
|
-
return general_api_default.post(
|
|
4630
|
+
return general_api_default.post(`${import_constants5.inventoryApiUrlV2}/filters/search`, {
|
|
4637
4631
|
page,
|
|
4638
4632
|
per_page: perPage,
|
|
4639
4633
|
filters: filterTerms,
|
|
@@ -4660,7 +4654,7 @@ var getGatewayDevices = createAppAsyncThunk(`${sliceName}/getGatewayDevices`, (d
|
|
|
4660
4654
|
{ ...emptyFilter, key: "mender_gateway_system_id", value: mender_gateway_system_id, scope: "inventory" }
|
|
4661
4655
|
];
|
|
4662
4656
|
const { attributes: attributeSelection, filterTerms } = prepareSearchArguments({ filters, state });
|
|
4663
|
-
return general_api_default.post(
|
|
4657
|
+
return general_api_default.post(`${import_constants5.inventoryApiUrlV2}/filters/search`, {
|
|
4664
4658
|
page: 1,
|
|
4665
4659
|
per_page: MAX_PAGE_SIZE,
|
|
4666
4660
|
filters: filterTerms,
|