@northern.tech/store 0.19.2 → 0.20.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 +3 -0
- package/dist/actions.cjs.map +1 -1
- package/dist/actions.d.cts +2 -1
- package/dist/actions.d.ts +2 -1
- package/dist/actions.js +5 -5
- package/dist/api/general-api.js +1 -1
- package/dist/api/users-api.js +1 -1
- package/dist/appSlice/constants.cjs +3 -45
- package/dist/appSlice/constants.cjs.map +1 -1
- package/dist/appSlice/constants.d.cts +0 -15
- package/dist/appSlice/constants.d.ts +0 -15
- package/dist/appSlice/constants.js +1 -1
- package/dist/appSlice/index.js +1 -1
- package/dist/appSlice/mocks.js +1 -1
- package/dist/appSlice/thunks.cjs +14 -56
- package/dist/appSlice/thunks.cjs.map +1 -1
- package/dist/appSlice/thunks.js +16 -16
- package/dist/auth.js +1 -1
- package/dist/{chunk-RJRZXDVT.js → chunk-3JBVI4UH.js} +7 -7
- package/dist/{chunk-43ZBO3JW.js → chunk-4ZYLGBJU.js} +2 -2
- package/dist/{chunk-B3C6H2PR.js → chunk-7WIISD2N.js} +17 -14
- package/dist/{chunk-B3C6H2PR.js.map → chunk-7WIISD2N.js.map} +1 -1
- package/dist/{chunk-KJ2SUFAU.js → chunk-AY7E7VA6.js} +81 -16
- package/dist/chunk-AY7E7VA6.js.map +1 -0
- package/dist/{chunk-AJ6DIDO4.js → chunk-DBBE6D36.js} +4 -46
- package/dist/chunk-DBBE6D36.js.map +1 -0
- package/dist/{chunk-AV7SRATY.js → chunk-E657OJL4.js} +6 -6
- package/dist/{chunk-XOASGJZU.js → chunk-FXKMYYK5.js} +13 -13
- package/dist/{chunk-ZAZTNDSY.js → chunk-P3N2J3QT.js} +9 -9
- package/dist/{chunk-42GZ6FGV.js → chunk-PL6RIFD5.js} +2 -2
- package/dist/{chunk-VCEFZTWS.js → chunk-TIL2S3JA.js} +4 -1
- package/dist/chunk-TIL2S3JA.js.map +1 -0
- package/dist/{chunk-45BHMNX6.js → chunk-V6BWOIRC.js} +6 -6
- package/dist/{chunk-O7DR57RN.js → chunk-ZGRY42BZ.js} +9 -12
- package/dist/{chunk-O7DR57RN.js.map → chunk-ZGRY42BZ.js.map} +1 -1
- package/dist/{chunk-3NOV7X4M.js → chunk-ZZQJWNQT.js} +3 -1
- package/dist/chunk-ZZQJWNQT.js.map +1 -0
- package/dist/commonConstants.js +1 -1
- package/dist/commonSelectors.cjs +11 -56
- package/dist/commonSelectors.cjs.map +1 -1
- package/dist/commonSelectors.js +8 -8
- package/dist/constants.cjs +3 -45
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/deploymentsSlice/constants.js +1 -1
- package/dist/deploymentsSlice/index.js +1 -1
- package/dist/deploymentsSlice/mocks.js +1 -1
- package/dist/deploymentsSlice/selectors.js +1 -1
- package/dist/deploymentsSlice/thunks.cjs +14 -56
- package/dist/deploymentsSlice/thunks.cjs.map +1 -1
- package/dist/deploymentsSlice/thunks.js +16 -16
- 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 +8 -11
- package/dist/devicesSlice/selectors.cjs.map +1 -1
- package/dist/devicesSlice/selectors.js +2 -2
- package/dist/devicesSlice/thunks.cjs +14 -56
- package/dist/devicesSlice/thunks.cjs.map +1 -1
- package/dist/devicesSlice/thunks.js +16 -16
- package/dist/liststatehook.js +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 +14 -56
- package/dist/monitorSlice/thunks.cjs.map +1 -1
- package/dist/monitorSlice/thunks.js +14 -14
- package/dist/onboardingSlice/thunks.cjs +14 -56
- package/dist/onboardingSlice/thunks.cjs.map +1 -1
- package/dist/onboardingSlice/thunks.js +16 -16
- package/dist/organizationSlice/constants.js +1 -1
- package/dist/organizationSlice/index.cjs +3 -0
- package/dist/organizationSlice/index.cjs.map +1 -1
- package/dist/organizationSlice/index.d.cts +4 -1
- package/dist/organizationSlice/index.d.ts +4 -1
- package/dist/organizationSlice/index.js +2 -2
- package/dist/organizationSlice/mocks.cjs +175 -0
- package/dist/organizationSlice/mocks.cjs.map +1 -1
- package/dist/organizationSlice/mocks.d.cts +121 -2
- package/dist/organizationSlice/mocks.d.ts +121 -2
- package/dist/organizationSlice/mocks.js +87 -2
- package/dist/organizationSlice/mocks.js.map +1 -1
- package/dist/organizationSlice/selectors.cjs +3 -0
- package/dist/organizationSlice/selectors.cjs.map +1 -1
- package/dist/organizationSlice/selectors.d.cts +3 -2
- package/dist/organizationSlice/selectors.d.ts +3 -2
- package/dist/organizationSlice/selectors.js +4 -2
- package/dist/organizationSlice/thunks.cjs +97 -71
- package/dist/organizationSlice/thunks.cjs.map +1 -1
- package/dist/organizationSlice/thunks.d.cts +17 -3
- package/dist/organizationSlice/thunks.d.ts +17 -3
- package/dist/organizationSlice/thunks.js +22 -18
- package/dist/organizationSlice/types.cjs.map +1 -1
- package/dist/organizationSlice/types.d.cts +30 -7
- package/dist/organizationSlice/types.d.ts +30 -7
- package/dist/releasesSlice/index.js +1 -1
- package/dist/releasesSlice/mocks.js +1 -1
- package/dist/releasesSlice/selectors.cjs.map +1 -1
- package/dist/releasesSlice/selectors.js +3 -3
- package/dist/releasesSlice/thunks.cjs +14 -56
- package/dist/releasesSlice/thunks.cjs.map +1 -1
- package/dist/releasesSlice/thunks.js +14 -14
- package/dist/selectors.cjs +14 -56
- 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 +28 -26
- package/dist/sockethook.js +1 -1
- package/dist/store.cjs +3 -0
- package/dist/store.cjs.map +1 -1
- package/dist/store.js +6 -6
- package/dist/storehooks.cjs +93 -70
- package/dist/storehooks.cjs.map +1 -1
- package/dist/storehooks.js +20 -18
- package/dist/storehooks.js.map +1 -1
- package/dist/thunks.cjs +95 -69
- package/dist/thunks.cjs.map +1 -1
- package/dist/thunks.d.cts +1 -1
- package/dist/thunks.d.ts +1 -1
- package/dist/thunks.js +20 -16
- package/dist/useDeploymentDevice.cjs +14 -56
- package/dist/useDeploymentDevice.cjs.map +1 -1
- package/dist/useDeploymentDevice.js +16 -16
- package/dist/usersSlice/constants.js +1 -1
- package/dist/usersSlice/index.js +1 -1
- package/dist/usersSlice/mocks.js +1 -1
- package/dist/usersSlice/selectors.cjs +3 -45
- package/dist/usersSlice/selectors.cjs.map +1 -1
- package/dist/usersSlice/selectors.js +3 -3
- package/dist/usersSlice/thunks.cjs +14 -56
- package/dist/usersSlice/thunks.cjs.map +1 -1
- package/dist/usersSlice/thunks.js +16 -16
- package/dist/utils.cjs +18 -57
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +1 -3
- package/dist/utils.d.ts +1 -3
- package/dist/utils.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-3NOV7X4M.js.map +0 -1
- package/dist/chunk-AJ6DIDO4.js.map +0 -1
- package/dist/chunk-KJ2SUFAU.js.map +0 -1
- package/dist/chunk-VCEFZTWS.js.map +0 -1
- /package/dist/{chunk-RJRZXDVT.js.map → chunk-3JBVI4UH.js.map} +0 -0
- /package/dist/{chunk-43ZBO3JW.js.map → chunk-4ZYLGBJU.js.map} +0 -0
- /package/dist/{chunk-AV7SRATY.js.map → chunk-E657OJL4.js.map} +0 -0
- /package/dist/{chunk-XOASGJZU.js.map → chunk-FXKMYYK5.js.map} +0 -0
- /package/dist/{chunk-ZAZTNDSY.js.map → chunk-P3N2J3QT.js.map} +0 -0
- /package/dist/{chunk-42GZ6FGV.js.map → chunk-PL6RIFD5.js.map} +0 -0
- /package/dist/{chunk-45BHMNX6.js.map → chunk-V6BWOIRC.js.map} +0 -0
package/dist/storehooks.cjs
CHANGED
|
@@ -50,10 +50,6 @@ var import_constants5 = require("@northern.tech/utils/constants");
|
|
|
50
50
|
// src/appSlice/constants.ts
|
|
51
51
|
var import_icons_material = require("@mui/icons-material");
|
|
52
52
|
var import_utils = require("@northern.tech/utils");
|
|
53
|
-
var startingDeviceCount = {
|
|
54
|
-
os: "for first 50 devices",
|
|
55
|
-
professional: "for first 250 devices"
|
|
56
|
-
};
|
|
57
53
|
var chartTypes = {
|
|
58
54
|
bar: { key: "bar", Icon: import_icons_material.BarChart },
|
|
59
55
|
pie: { key: "pie", Icon: import_icons_material.PieChartOutline }
|
|
@@ -70,31 +66,17 @@ var PLANS = {
|
|
|
70
66
|
os: {
|
|
71
67
|
id: "os",
|
|
72
68
|
name: "Basic",
|
|
73
|
-
|
|
74
|
-
offer: true,
|
|
75
|
-
price: "$34 / month",
|
|
76
|
-
deviceCount: startingDeviceCount.os,
|
|
77
|
-
description: "The core features of Mender. To continue using Enterprise Trial features\u2014like Delta updates, scheduled deployments, phased rollouts, device filtering, dynamic groups, RBAC, audit logs, and more\u2014please upgrade to a higher plan.",
|
|
78
|
-
features: ["Access to core features of Mender", "Basic support"]
|
|
69
|
+
description: "The core features of Mender. To continue using Enterprise Trial features\u2014like Delta updates, scheduled deployments, phased rollouts, device filtering, dynamic groups, RBAC, audit logs, and more\u2014please upgrade to a higher plan."
|
|
79
70
|
},
|
|
80
71
|
professional: {
|
|
81
72
|
id: "professional",
|
|
82
73
|
name: "Professional",
|
|
83
|
-
|
|
84
|
-
offer: true,
|
|
85
|
-
price: "$291 / month",
|
|
86
|
-
deviceCount: startingDeviceCount.professional,
|
|
87
|
-
description: "Everything in Basic, plus enhanced update management and automation features.",
|
|
88
|
-
features: ["Advanced OTA features", "Higher priority support"]
|
|
74
|
+
description: "Everything in Basic, plus enhanced update management and automation features."
|
|
89
75
|
},
|
|
90
76
|
enterprise: {
|
|
91
77
|
id: "enterprise",
|
|
92
78
|
name: "Enterprise",
|
|
93
|
-
|
|
94
|
-
price: "Custom pricing",
|
|
95
|
-
deviceCount: "Unlimited devices",
|
|
96
|
-
description: "Every advanced feature of Mender, tailored for complex and large-scale deployments. Not available as a monthly subscription \u2014 ask us for a quote.",
|
|
97
|
-
features: ["All Mender features", "Advanced security features", "SLA-backed support"]
|
|
79
|
+
description: "Every advanced feature of Mender, tailored for complex and large-scale deployments. Not available as a monthly subscription \u2014 ask us for a quote."
|
|
98
80
|
}
|
|
99
81
|
};
|
|
100
82
|
var ADDONS = {
|
|
@@ -103,14 +85,6 @@ var ADDONS = {
|
|
|
103
85
|
title: "Configure",
|
|
104
86
|
description: "Seamlessly configure applications and devices remotely \u2013 configure each device to its environment.",
|
|
105
87
|
needs: ["hasDeviceConfig"],
|
|
106
|
-
os: {
|
|
107
|
-
price: "$11/month",
|
|
108
|
-
deviceCount: startingDeviceCount.os
|
|
109
|
-
},
|
|
110
|
-
professional: {
|
|
111
|
-
price: "$65/month",
|
|
112
|
-
deviceCount: startingDeviceCount.professional
|
|
113
|
-
},
|
|
114
88
|
eligible: ["os", "professional", "enterprise"]
|
|
115
89
|
},
|
|
116
90
|
monitor: {
|
|
@@ -118,14 +92,6 @@ var ADDONS = {
|
|
|
118
92
|
title: "Monitor",
|
|
119
93
|
description: "Detect and analyze health issues of devices, services and applications. Set up alerts so you can act quickly.",
|
|
120
94
|
needs: ["hasMonitor"],
|
|
121
|
-
os: {
|
|
122
|
-
price: "-",
|
|
123
|
-
deviceCount: "-"
|
|
124
|
-
},
|
|
125
|
-
professional: {
|
|
126
|
-
price: "$86/month",
|
|
127
|
-
deviceCount: startingDeviceCount.professional
|
|
128
|
-
},
|
|
129
95
|
eligible: ["professional", "enterprise"]
|
|
130
96
|
},
|
|
131
97
|
troubleshoot: {
|
|
@@ -133,14 +99,6 @@ var ADDONS = {
|
|
|
133
99
|
title: "Troubleshoot",
|
|
134
100
|
description: "Secure, remote access to your devices \u2013 quickly diagnose and fix issues in real time.",
|
|
135
101
|
needs: ["hasDeviceConnect"],
|
|
136
|
-
os: {
|
|
137
|
-
price: "$27/month",
|
|
138
|
-
deviceCount: startingDeviceCount.os
|
|
139
|
-
},
|
|
140
|
-
professional: {
|
|
141
|
-
price: "$72/month",
|
|
142
|
-
deviceCount: startingDeviceCount.professional
|
|
143
|
-
},
|
|
144
102
|
eligible: ["os", "professional", "enterprise"]
|
|
145
103
|
}
|
|
146
104
|
};
|
|
@@ -1394,6 +1352,9 @@ var organizationSlice = (0, import_toolkit6.createSlice)({
|
|
|
1394
1352
|
setSubscription: (state, action) => {
|
|
1395
1353
|
state.organization.subscription = { ...state.organization.subscription, ...action.payload };
|
|
1396
1354
|
},
|
|
1355
|
+
setProducts: (state, action) => {
|
|
1356
|
+
state.products = action.payload;
|
|
1357
|
+
},
|
|
1397
1358
|
setBillingProfile: (state, action) => {
|
|
1398
1359
|
state.organization.billing_profile = action.payload;
|
|
1399
1360
|
},
|
|
@@ -1912,17 +1873,14 @@ var getAttributesList = (0, import_toolkit11.createSelector)(
|
|
|
1912
1873
|
[getFilteringAttributes, getFilteringAttributesFromConfig],
|
|
1913
1874
|
({ identityAttributes = [], inventoryAttributes = [] }, { identity = [], inventory = [] }) => [...identityAttributes, ...inventoryAttributes, ...identity, ...inventory].filter(import_helpers3.duplicateFilter)
|
|
1914
1875
|
);
|
|
1915
|
-
var getDeviceLimitStats = (0, import_toolkit11.createSelector)(
|
|
1916
|
-
|
|
1917
|
-
(limits,
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
}));
|
|
1924
|
-
}
|
|
1925
|
-
);
|
|
1876
|
+
var getDeviceLimitStats = (0, import_toolkit11.createSelector)([getDeviceLimits, getAcceptedDevices], (limits, accepted) => {
|
|
1877
|
+
const { counts } = accepted;
|
|
1878
|
+
return Object.entries(limits).filter(([, limit]) => limit !== 0).map(([type, limit]) => ({
|
|
1879
|
+
type,
|
|
1880
|
+
limit,
|
|
1881
|
+
total: counts[type] || 0
|
|
1882
|
+
}));
|
|
1883
|
+
});
|
|
1926
1884
|
var getDeviceTypes = (0, import_toolkit11.createSelector)(
|
|
1927
1885
|
[getAcceptedDevices, getDevicesById],
|
|
1928
1886
|
({ deviceIds = [] }, devicesById) => Object.keys(
|
|
@@ -2115,18 +2073,21 @@ var mapDeviceAttributes = (attributes = []) => attributes.reduce(
|
|
|
2115
2073
|
{ inventory: { device_type: [], artifact_name: "" }, identity: {}, monitor: {}, system: {}, tags: {} }
|
|
2116
2074
|
);
|
|
2117
2075
|
var isDarkMode = (mode) => mode === DARK_MODE;
|
|
2118
|
-
var parseSubscriptionPreview = (lines) => lines.reduce(
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
);
|
|
2076
|
+
var parseSubscriptionPreview = (lines) => lines.reduce((acc, { addon, amount, product }) => {
|
|
2077
|
+
const tier = product.replace("mender_", "");
|
|
2078
|
+
if (!acc[tier]) {
|
|
2079
|
+
acc[tier] = {
|
|
2080
|
+
amount: 0,
|
|
2081
|
+
addons: {}
|
|
2082
|
+
};
|
|
2083
|
+
}
|
|
2084
|
+
if (!addon) {
|
|
2085
|
+
acc[tier].amount += amount;
|
|
2086
|
+
} else {
|
|
2087
|
+
acc[tier].addons[addon] = (acc[tier].addons[addon] ?? 0) + amount;
|
|
2088
|
+
}
|
|
2089
|
+
return acc;
|
|
2090
|
+
}, {});
|
|
2130
2091
|
|
|
2131
2092
|
// src/releasesSlice/selectors.ts
|
|
2132
2093
|
var getSelectedReleaseId = (state) => state.releases.selectedRelease;
|
|
@@ -4114,6 +4075,63 @@ var cancelRequest = createAppAsyncThunk(`${sliceName6}/cancelRequest`, (reason,
|
|
|
4114
4075
|
() => Promise.resolve(dispatch(setSnackbar4({ message: "Deactivation request was sent successfully", autoHideDuration: TIMEOUTS.fiveSeconds })))
|
|
4115
4076
|
);
|
|
4116
4077
|
});
|
|
4078
|
+
var getTierId = (tierName) => tierName.replace("mender_", "");
|
|
4079
|
+
var getProductPlans = (products) => products.reduce(
|
|
4080
|
+
(plansById, product) => {
|
|
4081
|
+
const { name, prices } = product;
|
|
4082
|
+
const tierId = getTierId(name);
|
|
4083
|
+
prices.forEach((price) => {
|
|
4084
|
+
const existing = plansById[price.plan] ?? { ...PLANS[price.plan], tierLimitsConstrains: {} };
|
|
4085
|
+
const tierConstraints = price.constraints ? { [tierId]: { min: price.constraints.min, max: price.constraints.max, div: price.constraints.div } } : {};
|
|
4086
|
+
plansById[price.plan] = {
|
|
4087
|
+
...existing,
|
|
4088
|
+
tierLimitsConstrains: {
|
|
4089
|
+
...existing.tierLimitsConstrains,
|
|
4090
|
+
...tierConstraints
|
|
4091
|
+
}
|
|
4092
|
+
};
|
|
4093
|
+
});
|
|
4094
|
+
return plansById;
|
|
4095
|
+
},
|
|
4096
|
+
{ enterprise: { ...PLANS.enterprise } }
|
|
4097
|
+
);
|
|
4098
|
+
var getProductAddons = (products) => products.reduce((accu, product) => {
|
|
4099
|
+
const { addons = [] } = product;
|
|
4100
|
+
addons.forEach((addon) => {
|
|
4101
|
+
const { name: addonName = "", prices: addonPrices = [] } = addon;
|
|
4102
|
+
const existingEligible = accu[addonName]?.eligible ?? [];
|
|
4103
|
+
const newEligible = addonPrices.map((p) => p.plan);
|
|
4104
|
+
accu[addonName] = {
|
|
4105
|
+
...ADDONS[addonName],
|
|
4106
|
+
eligible: [.../* @__PURE__ */ new Set([...existingEligible, ...newEligible, PLANS.enterprise.id])]
|
|
4107
|
+
};
|
|
4108
|
+
});
|
|
4109
|
+
return accu;
|
|
4110
|
+
}, {});
|
|
4111
|
+
var transformProductResponse = (products) => {
|
|
4112
|
+
const tiers = [];
|
|
4113
|
+
const sortedProducts = products.sort((a, b) => a.name.localeCompare(b.name));
|
|
4114
|
+
sortedProducts.forEach((tier) => {
|
|
4115
|
+
const addonsSupported = Object.fromEntries((tier.addons || []).map((addon) => [addon.name, addon.prices?.map((p) => p.plan)]));
|
|
4116
|
+
const allPlans = tier.prices.map((price) => price.plan);
|
|
4117
|
+
const addonsTransposed = allPlans.reduce((acc, plan) => {
|
|
4118
|
+
acc[plan] = Object.entries(addonsSupported).filter(([, addonSupportedPlans]) => addonSupportedPlans.includes(plan)).map(([addon]) => addon);
|
|
4119
|
+
return acc;
|
|
4120
|
+
}, {});
|
|
4121
|
+
const tierId = getTierId(tier.name);
|
|
4122
|
+
tiers.push({
|
|
4123
|
+
id: tierId,
|
|
4124
|
+
title: tierId,
|
|
4125
|
+
stripeProductName: tier.name,
|
|
4126
|
+
limitConstrains: Object.fromEntries(tier.prices.map((p) => [p.plan, p.constraints])),
|
|
4127
|
+
addons: addonsSupported,
|
|
4128
|
+
addonsByPlan: addonsTransposed
|
|
4129
|
+
});
|
|
4130
|
+
});
|
|
4131
|
+
const plans = getProductPlans(products);
|
|
4132
|
+
const addons = getProductAddons(products);
|
|
4133
|
+
return { plans, tiers, addons };
|
|
4134
|
+
};
|
|
4117
4135
|
var getTargetLocation = (key) => {
|
|
4118
4136
|
if (devLocations.includes(window.location.hostname)) {
|
|
4119
4137
|
return "";
|
|
@@ -4328,7 +4346,7 @@ var getUserSubscription = createAppAsyncThunk(`${sliceName6}/getUserSubscription
|
|
|
4328
4346
|
});
|
|
4329
4347
|
var getBillingPreview = createAppAsyncThunk(
|
|
4330
4348
|
`${sliceName6}/getBillingPreview`,
|
|
4331
|
-
(order, { dispatch }) => general_api_default.post(`${import_constants5.tenantadmApiUrlv2}/billing/subscription/invoices/preview`, order).catch((err) => commonErrorHandler(err, "There was an error getting your billing information:", dispatch, commonErrorFallback)).then(({ data }) => order.preview_mode === "recurring" ? {
|
|
4349
|
+
(order, { dispatch }) => general_api_default.post(`${import_constants5.tenantadmApiUrlv2}/billing/subscription/invoices/preview`, order).catch((err) => commonErrorHandler(err, "There was an error getting your billing information:", dispatch, commonErrorFallback)).then(({ data }) => order.preview_mode === "recurring" ? { items: parseSubscriptionPreview(data.lines), total: data.total } : data)
|
|
4332
4350
|
);
|
|
4333
4351
|
var getCurrentSubscription = createAppAsyncThunk(
|
|
4334
4352
|
`${sliceName6}/getCurrentSubscription`,
|
|
@@ -4339,6 +4357,10 @@ var getCurrentSubscription = createAppAsyncThunk(
|
|
|
4339
4357
|
return commonErrorHandler(err, "There was an error retrieving your current subscription", dispatch, commonErrorFallback);
|
|
4340
4358
|
})
|
|
4341
4359
|
);
|
|
4360
|
+
var getProducts = createAppAsyncThunk(
|
|
4361
|
+
`${sliceName6}/getEnabledTiers`,
|
|
4362
|
+
(_, { dispatch }) => general_api_default.get(`${import_constants5.tenantadmApiUrlv2}/billing/products`).catch((err) => commonErrorHandler(err, "There was an error getting Mender products:", dispatch, commonErrorFallback)).then((res) => dispatch(actions6.setProducts(transformProductResponse(res.data))))
|
|
4363
|
+
);
|
|
4342
4364
|
var requestPlanUpgrade = createAppAsyncThunk(
|
|
4343
4365
|
`${sliceName6}/requestPlanUpgrade`,
|
|
4344
4366
|
(order, { dispatch }) => general_api_default.post(`${import_constants5.tenantadmApiUrlv2}/billing/subscription`, order).catch((err) => commonErrorHandler(err, "There was an error sending your request", dispatch, commonErrorFallback)).then(() => Promise.all([setTimeout(() => dispatch(getDeviceLimits2()), TIMEOUTS.threeSeconds), dispatch(getUserOrganization())]))
|
|
@@ -5622,7 +5644,8 @@ var useAppInit = (userId) => {
|
|
|
5622
5644
|
dispatch(getGroups2()),
|
|
5623
5645
|
dispatch(getIntegrations()),
|
|
5624
5646
|
dispatch(getReleases()),
|
|
5625
|
-
dispatch(getAllDeviceCounts()).unwrap()
|
|
5647
|
+
dispatch(getAllDeviceCounts()).unwrap(),
|
|
5648
|
+
dispatch(getProducts())
|
|
5626
5649
|
];
|
|
5627
5650
|
if (hasMultitenancy) {
|
|
5628
5651
|
tasks.push(dispatch(getDeviceLimits2()));
|