@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
package/dist/storehooks.cjs
CHANGED
|
@@ -754,9 +754,9 @@ var initialState = {
|
|
|
754
754
|
hasDeviceConfig: false,
|
|
755
755
|
hasDeviceConnect: false,
|
|
756
756
|
hasFeedbackEnabled: false,
|
|
757
|
+
hasManifestsEnabled: false,
|
|
757
758
|
hasMonitor: false,
|
|
758
759
|
hasMCUEnabled: false,
|
|
759
|
-
hasOldTheme: false,
|
|
760
760
|
hasReporting: false,
|
|
761
761
|
isHosted: true,
|
|
762
762
|
isEnterprise: false
|
|
@@ -791,7 +791,6 @@ var initialState = {
|
|
|
791
791
|
offlineThreshold: getYesterday(),
|
|
792
792
|
versionInformation: {
|
|
793
793
|
Integration: "",
|
|
794
|
-
"Mender-Client": "",
|
|
795
794
|
"Mender-Artifact": "",
|
|
796
795
|
"Meta-Mender": ""
|
|
797
796
|
},
|
|
@@ -2553,7 +2552,6 @@ var getLatestRelease = (thing) => {
|
|
|
2553
2552
|
};
|
|
2554
2553
|
var repoKeyMap = {
|
|
2555
2554
|
integration: "Integration",
|
|
2556
|
-
mender: "Mender-Client",
|
|
2557
2555
|
"mender-artifact": "Mender-Artifact"
|
|
2558
2556
|
};
|
|
2559
2557
|
var deductSaasState = (latestRelease, guiTags) => {
|
|
@@ -2657,10 +2655,10 @@ var getDeploymentsByStatus2 = createAppAsyncThunk(
|
|
|
2657
2655
|
const { status, page = defaultPage, perPage = defaultPerPage, startDate, endDate, group, type, shouldSelect = true, sort = import_constants5.SORTING_OPTIONS.desc } = options;
|
|
2658
2656
|
const created_after = startDate ? `&created_after=${startDate}` : "";
|
|
2659
2657
|
const created_before = endDate ? `&created_before=${endDate}` : "";
|
|
2660
|
-
const search = group ? `&
|
|
2658
|
+
const search = group ? `&name=${group}` : "";
|
|
2661
2659
|
const typeFilter = type ? `&type=${type}` : "";
|
|
2662
2660
|
return general_api_default.get(
|
|
2663
|
-
`${import_constants5.
|
|
2661
|
+
`${import_constants5.deploymentsApiUrlV2}/deployments?status=${status}&per_page=${perPage}&page=${page}${created_after}${created_before}${search}${typeFilter}&sort=${sort}`
|
|
2664
2662
|
).then((res) => {
|
|
2665
2663
|
const { deployments, deploymentIds } = transformDeployments(res.data, getState().deployments.byId);
|
|
2666
2664
|
const total = Number(res.headers[import_constants5.headerNames.total]);
|
|
@@ -3124,6 +3122,15 @@ var removeStaticGroup = createAppAsyncThunk(
|
|
|
3124
3122
|
])
|
|
3125
3123
|
)
|
|
3126
3124
|
);
|
|
3125
|
+
var getDynamicGroup = createAppAsyncThunk(
|
|
3126
|
+
`${sliceName3}/getDynamicGroupById`,
|
|
3127
|
+
(id, { dispatch }) => general_api_default.get(`${import_constants5.inventoryApiUrlV2}/filters/${id}`).catch((err) => {
|
|
3128
|
+
if (err.response && err.response.status === 404) {
|
|
3129
|
+
throw new Error("Request failed with status code 404");
|
|
3130
|
+
}
|
|
3131
|
+
return commonErrorHandler(err, `Error retrieving the group: `, dispatch, commonErrorFallback);
|
|
3132
|
+
})
|
|
3133
|
+
);
|
|
3127
3134
|
var getDynamicGroups = createAppAsyncThunk(
|
|
3128
3135
|
`${sliceName3}/getDynamicGroups`,
|
|
3129
3136
|
(_, { dispatch, getState }) => general_api_default.get(`${import_constants5.inventoryApiUrlV2}/filters?per_page=${MAX_PAGE_SIZE}`).then(({ data: filters }) => {
|
|
@@ -4076,25 +4083,28 @@ var cancelRequest = createAppAsyncThunk(`${sliceName6}/cancelRequest`, (reason,
|
|
|
4076
4083
|
);
|
|
4077
4084
|
});
|
|
4078
4085
|
var getTierId = (tierName) => tierName.replace("mender_", "");
|
|
4079
|
-
var getProductPlans = (products) =>
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4086
|
+
var getProductPlans = (products) => {
|
|
4087
|
+
const backendPlansById = products.reduce(
|
|
4088
|
+
(plansById, product) => {
|
|
4089
|
+
const { name, prices } = product;
|
|
4090
|
+
const tierId = getTierId(name);
|
|
4091
|
+
prices.forEach((price) => {
|
|
4092
|
+
const existing = plansById[price.plan] ?? { ...PLANS[price.plan], tierLimitsConstrains: {} };
|
|
4093
|
+
const tierConstraints = price.constraints ? { [tierId]: { min: price.constraints.min, max: price.constraints.max, div: price.constraints.div } } : {};
|
|
4094
|
+
plansById[price.plan] = {
|
|
4095
|
+
...existing,
|
|
4096
|
+
tierLimitsConstrains: {
|
|
4097
|
+
...existing.tierLimitsConstrains,
|
|
4098
|
+
...tierConstraints
|
|
4099
|
+
}
|
|
4100
|
+
};
|
|
4101
|
+
});
|
|
4102
|
+
return plansById;
|
|
4103
|
+
},
|
|
4104
|
+
{}
|
|
4105
|
+
);
|
|
4106
|
+
return { ...backendPlansById, enterprise: { ...PLANS.enterprise } };
|
|
4107
|
+
};
|
|
4098
4108
|
var getProductAddons = (products) => products.reduce((accu, product) => {
|
|
4099
4109
|
const { addons = [] } = product;
|
|
4100
4110
|
addons.forEach((addon) => {
|
|
@@ -4978,7 +4988,7 @@ var verifyEmailStart = createAppAsyncThunk(
|
|
|
4978
4988
|
);
|
|
4979
4989
|
var verifyEmailComplete = createAppAsyncThunk(
|
|
4980
4990
|
`${sliceName8}/verifyEmailComplete`,
|
|
4981
|
-
(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))))
|
|
4991
|
+
(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))))
|
|
4982
4992
|
);
|
|
4983
4993
|
var verify2FA = createAppAsyncThunk(
|
|
4984
4994
|
`${sliceName8}/verify2FA`,
|
|
@@ -5154,6 +5164,9 @@ var isEmptyPermissionSet = (permissionSet) => !Object.values(permissionSet).redu
|
|
|
5154
5164
|
var parseRolePermissions = ({ permission_sets_with_scope = [], permissions = [] }, permissionSets) => {
|
|
5155
5165
|
const preliminaryResult = permission_sets_with_scope.reduce(
|
|
5156
5166
|
(accu, permissionSet) => {
|
|
5167
|
+
if (!permissionSet.name) {
|
|
5168
|
+
return accu;
|
|
5169
|
+
}
|
|
5157
5170
|
const processor = permissionSets[permissionSet.name];
|
|
5158
5171
|
if (!processor) {
|
|
5159
5172
|
return accu;
|
|
@@ -5162,7 +5175,7 @@ var parseRolePermissions = ({ permission_sets_with_scope = [], permissions = []
|
|
|
5162
5175
|
if (scope) {
|
|
5163
5176
|
const result = mapPermissionSet(
|
|
5164
5177
|
permissionSet.name,
|
|
5165
|
-
permissionSet.scope
|
|
5178
|
+
permissionSet.scope?.value ?? [],
|
|
5166
5179
|
scope,
|
|
5167
5180
|
accu.uiPermissions[scope]
|
|
5168
5181
|
);
|
|
@@ -5540,8 +5553,8 @@ var featureFlags = [
|
|
|
5540
5553
|
"hasDeviceConfig",
|
|
5541
5554
|
"hasDeviceConnect",
|
|
5542
5555
|
"hasFeedbackEnabled",
|
|
5543
|
-
"hasOldTheme",
|
|
5544
5556
|
"hasReporting",
|
|
5557
|
+
"hasManifestsEnabled",
|
|
5545
5558
|
"hasMonitor",
|
|
5546
5559
|
"hasMCUEnabled",
|
|
5547
5560
|
"isEnterprise"
|
|
@@ -5555,15 +5568,7 @@ var parseEnvironmentInfo = () => (dispatch, getState) => {
|
|
|
5555
5568
|
let environmentFeatures = {};
|
|
5556
5569
|
let versionInfo = {};
|
|
5557
5570
|
if (mender_environment) {
|
|
5558
|
-
const {
|
|
5559
|
-
features = {},
|
|
5560
|
-
demoArtifactPort: port,
|
|
5561
|
-
disableOnboarding,
|
|
5562
|
-
integrationVersion,
|
|
5563
|
-
menderVersion,
|
|
5564
|
-
menderArtifactVersion,
|
|
5565
|
-
metaMenderVersion
|
|
5566
|
-
} = mender_environment;
|
|
5571
|
+
const { features = {}, demoArtifactPort: port, disableOnboarding, integrationVersion, menderArtifactVersion, metaMenderVersion } = mender_environment;
|
|
5567
5572
|
demoArtifactPort = port || demoArtifactPort;
|
|
5568
5573
|
environmentData = environmentDatas.reduce((accu, flag) => ({ ...accu, [flag]: mender_environment[flag] || state.app[flag] }), {});
|
|
5569
5574
|
environmentFeatures = {
|
|
@@ -5575,7 +5580,6 @@ var parseEnvironmentInfo = () => (dispatch, getState) => {
|
|
|
5575
5580
|
docs: isNaN(integrationVersion.charAt(0)) ? "" : integrationVersion.split(".").slice(0, 2).join("."),
|
|
5576
5581
|
remainder: {
|
|
5577
5582
|
Integration: getComparisonCompatibleVersion(integrationVersion),
|
|
5578
|
-
"Mender-Client": getComparisonCompatibleVersion(menderVersion),
|
|
5579
5583
|
"Mender-Artifact": menderArtifactVersion,
|
|
5580
5584
|
"Meta-Mender": metaMenderVersion
|
|
5581
5585
|
}
|