@northern.tech/store 0.34.0 → 0.35.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.d.cts +9 -3
- package/dist/actions.d.ts +9 -3
- package/dist/appSlice/selectors.d.cts +2 -2
- package/dist/appSlice/selectors.d.ts +2 -2
- package/dist/appSlice/thunks.d.cts +1 -1
- package/dist/appSlice/thunks.d.ts +1 -1
- package/dist/commonSelectors.d.cts +2 -2
- package/dist/commonSelectors.d.ts +2 -2
- package/dist/deploymentsSlice/selectors.d.cts +2 -2
- package/dist/deploymentsSlice/selectors.d.ts +2 -2
- package/dist/deploymentsSlice/thunks.d.cts +1 -1
- package/dist/deploymentsSlice/thunks.d.ts +1 -1
- package/dist/devicesSlice/selectors.d.cts +2 -2
- package/dist/devicesSlice/selectors.d.ts +2 -2
- package/dist/devicesSlice/thunks.d.cts +1 -1
- package/dist/devicesSlice/thunks.d.ts +1 -1
- package/dist/{index-SwHfGav1.d.cts → index-D6J838hD.d.cts} +2 -1
- package/dist/{index-uxdvFzzE.d.ts → index-KZBwih6D.d.ts} +2 -1
- package/dist/monitorSlice/selectors.d.cts +1 -1
- package/dist/monitorSlice/selectors.d.ts +1 -1
- package/dist/monitorSlice/thunks.d.cts +12 -6
- package/dist/monitorSlice/thunks.d.ts +12 -6
- package/dist/onboardingSlice/selectors.d.cts +1 -1
- package/dist/onboardingSlice/selectors.d.ts +1 -1
- package/dist/onboardingSlice/thunks.d.cts +1 -1
- package/dist/onboardingSlice/thunks.d.ts +1 -1
- package/dist/organizationSlice/selectors.d.cts +2 -2
- package/dist/organizationSlice/selectors.d.ts +2 -2
- package/dist/organizationSlice/thunks.d.cts +20 -9
- package/dist/organizationSlice/thunks.d.ts +20 -9
- package/dist/releasesSlice/index.cjs +1 -0
- package/dist/releasesSlice/index.cjs.map +1 -1
- package/dist/releasesSlice/index.d.cts +1 -1
- package/dist/releasesSlice/index.d.ts +1 -1
- package/dist/releasesSlice/index.js +1 -0
- package/dist/releasesSlice/index.js.map +1 -1
- package/dist/releasesSlice/selectors.d.cts +2 -2
- package/dist/releasesSlice/selectors.d.ts +2 -2
- package/dist/releasesSlice/thunks.cjs +14 -10
- 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 +14 -10
- package/dist/releasesSlice/thunks.js.map +1 -1
- package/dist/{store-BjVukDvt.d.ts → store-BW01FNkb.d.ts} +2 -2
- package/dist/{store-BC3rDsIH.d.cts → store-BkLukXiT.d.cts} +2 -2
- package/dist/store.d.cts +1 -1
- package/dist/store.d.ts +1 -1
- package/dist/storehooks.d.cts +13 -13
- package/dist/storehooks.d.ts +13 -13
- package/dist/thunks.cjs +10 -7
- package/dist/thunks.cjs.map +1 -1
- package/dist/thunks.js +10 -7
- package/dist/thunks.js.map +1 -1
- package/dist/usersSlice/selectors.d.cts +2 -2
- package/dist/usersSlice/selectors.d.ts +2 -2
- package/dist/usersSlice/thunks.d.cts +28 -28
- package/dist/usersSlice/thunks.d.ts +28 -28
- package/package.json +1 -1
package/dist/thunks.js
CHANGED
|
@@ -287,11 +287,11 @@ const createDeployment = createAppAsyncThunk(`${sliceName$1}/createDeployment`,
|
|
|
287
287
|
trackDeploymentCreation(totalDeploymentCount, hasDeployments, trial_expiration);
|
|
288
288
|
const { canManageUsers } = getUserCapabilities(getState());
|
|
289
289
|
if (canManageUsers) {
|
|
290
|
-
const { phases } = newDeployment;
|
|
290
|
+
const { phases = [], uniform_phases } = newDeployment;
|
|
291
291
|
const { previousPhases = [] } = getGlobalSettings$1(getState());
|
|
292
292
|
const newSettings = { hasDeployments: true };
|
|
293
293
|
if (phases) {
|
|
294
|
-
const standardPhases = standardizePhases(phases);
|
|
294
|
+
const standardPhases = standardizePhases(uniform_phases ? [uniform_phases] : phases);
|
|
295
295
|
const prevPhases = previousPhases.map(standardizePhases);
|
|
296
296
|
if (!prevPhases.find((previousPhaseList) => previousPhaseList.every((oldPhase) => standardPhases.find((phase) => deepCompare(phase, oldPhase))))) prevPhases.push(standardPhases);
|
|
297
297
|
newSettings.previousPhases = prevPhases.slice(-1 * MAX_PREVIOUS_PHASES_COUNT);
|
|
@@ -1834,7 +1834,7 @@ const getCurrentSubscription = createAppAsyncThunk(`${sliceName$4}/getCurrentSub
|
|
|
1834
1834
|
return commonErrorHandler(err, "There was an error retrieving your current subscription", dispatch, commonErrorFallback);
|
|
1835
1835
|
}));
|
|
1836
1836
|
const getProducts = createAppAsyncThunk(`${sliceName$4}/getEnabledTiers`, (_, { dispatch }) => Api.get(`${tenantadmApiUrlv2}/billing/products`).catch((err) => commonErrorHandler(err, "There was an error getting Mender products:", dispatch, commonErrorFallback)).then((res) => dispatch(actions$4.setProducts(transformProductResponse(res.data)))));
|
|
1837
|
-
const requestPlanUpgrade = createAppAsyncThunk(`${sliceName$4}/requestPlanUpgrade`, (order, { dispatch }) => Api.post(`${tenantadmApiUrlv2}/billing/subscription`, order).catch((err) => commonErrorHandler(err, "There was an error sending your request", dispatch, commonErrorFallback)).then(() => Promise.all([setTimeout(() => dispatch(getDeviceLimits())
|
|
1837
|
+
const requestPlanUpgrade = createAppAsyncThunk(`${sliceName$4}/requestPlanUpgrade`, (order, { dispatch }) => Api.post(`${tenantadmApiUrlv2}/billing/subscription`, order).catch((err) => commonErrorHandler(err, "There was an error sending your request", dispatch, commonErrorFallback)).then(() => Promise.all([new Promise((resolve) => setTimeout(resolve, TIMEOUTS.threeSeconds)).then(() => dispatch(getDeviceLimits())), dispatch(getUserOrganization())])));
|
|
1838
1838
|
const sendSupportMessage = createAppAsyncThunk(`${sliceName$4}/sendSupportMessage`, (content, { dispatch }) => Api.post(`${tenantadmApiUrlv2}/contact/support`, content).catch((err) => commonErrorHandler(err, "There was an error sending your request", dispatch, commonErrorFallback)).then(() => Promise.resolve(dispatch(setSnackbar$1({
|
|
1839
1839
|
message: "Your request was sent successfully",
|
|
1840
1840
|
autoHideDuration: TIMEOUTS.fiveSeconds
|
|
@@ -1849,11 +1849,14 @@ const requestPlanChange = createAppAsyncThunk(`${sliceName$4}/requestPlanChange`
|
|
|
1849
1849
|
const downloadLicenseReport = createAppAsyncThunk(`${sliceName$4}/downloadLicenseReport`, (_, { dispatch }) => Api.get(`${deviceAuthV2}/license`).catch((err) => commonErrorHandler(err, "There was an error downloading the report", dispatch, commonErrorFallback)).then((res) => res.data));
|
|
1850
1850
|
const createIntegration = createAppAsyncThunk(`${sliceName$4}/createIntegration`, ({ id, ...integration }, { dispatch }) => Api.post(`${iotManagerBaseURL}/integrations`, integration).catch((err) => commonErrorHandler(err, "There was an error creating the integration", dispatch, commonErrorFallback)).then(() => Promise.all([dispatch(setSnackbar$1("The integration was set up successfully")), dispatch(getIntegrations())])));
|
|
1851
1851
|
const changeIntegration = createAppAsyncThunk(`${sliceName$4}/changeIntegration`, ({ id, credentials }, { dispatch }) => Api.put(`${iotManagerBaseURL}/integrations/${id}/credentials`, credentials).catch((err) => commonErrorHandler(err, "There was an error updating the integration", dispatch, commonErrorFallback)).then(() => Promise.all([dispatch(setSnackbar$1("The integration was updated successfully")), dispatch(getIntegrations())])));
|
|
1852
|
-
const deleteIntegration = createAppAsyncThunk(`${sliceName$4}/deleteIntegration`, ({ id, provider }, { dispatch, getState }) =>
|
|
1852
|
+
const deleteIntegration = createAppAsyncThunk(`${sliceName$4}/deleteIntegration`, async ({ id, provider }, { dispatch, getState }) => {
|
|
1853
|
+
await Api.delete(`${iotManagerBaseURL}/integrations/${id}`, {}).catch((err) => commonErrorHandler(err, "There was an error removing the integration", dispatch, commonErrorFallback));
|
|
1853
1854
|
const integrations = getState().organization.externalDeviceIntegrations.filter((item) => provider !== item.provider);
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1855
|
+
dispatch(setSnackbar$1("The integration was removed successfully"));
|
|
1856
|
+
dispatch(actions$4.receiveExternalDeviceIntegrations(integrations));
|
|
1857
|
+
await dispatch(getIntegrations()).unwrap();
|
|
1858
|
+
});
|
|
1859
|
+
const getIntegrations = createAppAsyncThunk(`${sliceName$4}/getIntegrations`, (_, { dispatch, getState }) => Api.get(`${iotManagerBaseURL}/integrations`).catch((err) => commonErrorHandler(err, "There was an error retrieving the integrations", dispatch, commonErrorFallback)).then(({ data }) => {
|
|
1857
1860
|
const existingIntegrations = getState().organization.externalDeviceIntegrations;
|
|
1858
1861
|
const integrations = data.reduce((accu, item) => {
|
|
1859
1862
|
const integration = {
|