@northern.tech/store 0.19.0 → 0.19.2
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.js +1 -1
- package/dist/api/general-api.cjs +13 -9
- package/dist/api/general-api.cjs.map +1 -1
- package/dist/api/general-api.js +3 -3
- package/dist/api/users-api.cjs +13 -9
- package/dist/api/users-api.cjs.map +1 -1
- package/dist/api/users-api.js +4 -4
- package/dist/appSlice/constants.cjs +8 -4
- package/dist/appSlice/constants.cjs.map +1 -1
- package/dist/appSlice/constants.d.cts +1 -1
- package/dist/appSlice/constants.d.ts +1 -1
- 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 +37 -21
- package/dist/appSlice/thunks.cjs.map +1 -1
- package/dist/appSlice/thunks.js +12 -12
- package/dist/auth.cjs +7 -9
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.js +2 -2
- package/dist/{chunk-GEQ2QQEE.js → chunk-42GZ6FGV.js} +2 -2
- package/dist/{chunk-QL6FN2JC.js → chunk-43ZBO3JW.js} +2 -2
- package/dist/{chunk-GAHFKM3N.js → chunk-45BHMNX6.js} +5 -5
- package/dist/{chunk-EL672W25.js → chunk-AJ6DIDO4.js} +9 -5
- package/dist/chunk-AJ6DIDO4.js.map +1 -0
- package/dist/{chunk-XC7DABLM.js → chunk-AV7SRATY.js} +6 -6
- package/dist/{chunk-U5TPV5X5.js → chunk-B3C6H2PR.js} +2 -2
- package/dist/{chunk-5M6EUVNO.js → chunk-IRQRV552.js} +8 -2
- package/dist/chunk-IRQRV552.js.map +1 -0
- package/dist/{chunk-QFYSFHAF.js → chunk-KJ2SUFAU.js} +19 -10
- package/dist/chunk-KJ2SUFAU.js.map +1 -0
- package/dist/{chunk-FDSMCFV5.js → chunk-UVTLZV34.js} +8 -10
- package/dist/chunk-UVTLZV34.js.map +1 -0
- package/dist/{chunk-Y3DJIMEN.js → chunk-XJLZK4QY.js} +3 -3
- package/dist/{chunk-TJBX7YHM.js → chunk-XOASGJZU.js} +5 -5
- package/dist/{chunk-RVAERI6U.js → chunk-ZAZTNDSY.js} +2 -2
- package/dist/commonConstants.js +1 -1
- package/dist/commonSelectors.cjs +8 -4
- package/dist/commonSelectors.cjs.map +1 -1
- package/dist/commonSelectors.js +5 -5
- package/dist/constants.cjs +8 -4
- 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 +37 -21
- package/dist/deploymentsSlice/thunks.cjs.map +1 -1
- package/dist/deploymentsSlice/thunks.js +12 -12
- 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.js +1 -1
- package/dist/devicesSlice/thunks.cjs +39 -21
- package/dist/devicesSlice/thunks.cjs.map +1 -1
- package/dist/devicesSlice/thunks.d.cts +41 -3
- package/dist/devicesSlice/thunks.d.ts +41 -3
- package/dist/devicesSlice/thunks.js +14 -12
- 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 +21 -13
- package/dist/monitorSlice/thunks.cjs.map +1 -1
- package/dist/monitorSlice/thunks.js +9 -9
- package/dist/onboardingSlice/thunks.cjs +40 -24
- package/dist/onboardingSlice/thunks.cjs.map +1 -1
- package/dist/onboardingSlice/thunks.js +12 -12
- package/dist/organizationSlice/constants.js +1 -1
- package/dist/organizationSlice/index.js +1 -1
- package/dist/organizationSlice/mocks.js +1 -1
- package/dist/organizationSlice/selectors.js +1 -1
- package/dist/organizationSlice/thunks.cjs +43 -27
- package/dist/organizationSlice/thunks.cjs.map +1 -1
- package/dist/organizationSlice/thunks.js +12 -12
- package/dist/releasesSlice/index.js +1 -1
- package/dist/releasesSlice/mocks.js +1 -1
- package/dist/releasesSlice/selectors.js +3 -3
- package/dist/releasesSlice/thunks.cjs +21 -13
- package/dist/releasesSlice/thunks.cjs.map +1 -1
- package/dist/releasesSlice/thunks.js +9 -9
- package/dist/selectors.cjs +8 -4
- package/dist/selectors.cjs.map +1 -1
- package/dist/selectors.js +5 -5
- package/dist/sockethook.js +1 -1
- package/dist/store.cjs +7 -9
- package/dist/store.cjs.map +1 -1
- package/dist/store.js +3 -3
- package/dist/storehooks.cjs +50 -34
- package/dist/storehooks.cjs.map +1 -1
- package/dist/storehooks.js +12 -12
- package/dist/thunks.cjs +48 -30
- 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 +14 -12
- package/dist/useDeploymentDevice.cjs +37 -21
- package/dist/useDeploymentDevice.cjs.map +1 -1
- package/dist/useDeploymentDevice.js +12 -12
- 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 +8 -4
- package/dist/usersSlice/selectors.cjs.map +1 -1
- package/dist/usersSlice/selectors.js +3 -3
- package/dist/usersSlice/thunks.cjs +37 -21
- package/dist/usersSlice/thunks.cjs.map +1 -1
- package/dist/usersSlice/thunks.js +12 -12
- package/dist/utils.cjs +8 -4
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.js +2 -2
- package/package.json +3 -3
- package/dist/chunk-5M6EUVNO.js.map +0 -1
- package/dist/chunk-EL672W25.js.map +0 -1
- package/dist/chunk-FDSMCFV5.js.map +0 -1
- package/dist/chunk-QFYSFHAF.js.map +0 -1
- /package/dist/{chunk-GEQ2QQEE.js.map → chunk-42GZ6FGV.js.map} +0 -0
- /package/dist/{chunk-QL6FN2JC.js.map → chunk-43ZBO3JW.js.map} +0 -0
- /package/dist/{chunk-GAHFKM3N.js.map → chunk-45BHMNX6.js.map} +0 -0
- /package/dist/{chunk-XC7DABLM.js.map → chunk-AV7SRATY.js.map} +0 -0
- /package/dist/{chunk-U5TPV5X5.js.map → chunk-B3C6H2PR.js.map} +0 -0
- /package/dist/{chunk-Y3DJIMEN.js.map → chunk-XJLZK4QY.js.map} +0 -0
- /package/dist/{chunk-TJBX7YHM.js.map → chunk-XOASGJZU.js.map} +0 -0
- /package/dist/{chunk-RVAERI6U.js.map → chunk-ZAZTNDSY.js.map} +0 -0
package/dist/thunks.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { getLatestReleaseInfo, setFirstLoginAfterSignup, setOfflineThreshold, setSearchState } from './appSlice/thunks.cjs';
|
|
2
2
|
export { GetDeploymentsByStatusPayload, abortDeployment, createDeployment, deriveDeploymentGroup, generateDeploymentLogAnalysis, getDeploymentDevices, getDeploymentsByStatus, getDeploymentsConfig, getDeviceDeployments, getDeviceLog, getSingleDeployment, resetDeviceDeployments, saveDeltaDeploymentsConfig, setDeploymentsState, updateDeploymentControlMap } from './deploymentsSlice/thunks.cjs';
|
|
3
|
-
export { addDevicesToGroup, addDynamicGroup, addStaticGroup, applyDeviceConfig, decommissionDevice, deleteAuthset, deviceFileUpload, getAllDeviceCounts, getAllDevicesByStatus, getAllDynamicGroupDevices, getAllGroupDevices, getDeviceAttributes, getDeviceAuth, getDeviceById, getDeviceConfig, getDeviceConnect, getDeviceFileDownloadLink, getDeviceInfo, getDeviceLimits, getDeviceTwin, getDevicesByStatus, getDevicesWithAuth, getDynamicGroups, getGatewayDevices, getGroupDevices, getGroups, getReportDataWithoutBackendSupport, getSessionDetails, getSystemDevices, preauthDevice, removeDevicesFromGroup, removeDynamicGroup, removeStaticGroup, searchDevices, selectGroup, setDeviceConfig, setDeviceListState, setDeviceTags, setDeviceTwin, triggerDeviceUpdate, updateDeviceAuth, updateDevicesAuth, updateDynamicGroup, updateReportData } from './devicesSlice/thunks.cjs';
|
|
3
|
+
export { addDevicesToGroup, addDynamicGroup, addStaticGroup, applyDeviceConfig, decommissionDevice, deleteAuthset, deviceFileUpload, getAllDeviceCounts, getAllDevicesByStatus, getAllDynamicGroupDevices, getAllGroupDevices, getDeviceAttributes, getDeviceAuth, getDeviceById, getDeviceConfig, getDeviceConnect, getDeviceFileDownloadLink, getDeviceInfo, getDeviceLimits, getDeviceTwin, getDevicesByStatus, getDevicesWithAuth, getDynamicGroups, getGatewayDevices, getGroupDevices, getGroups, getReportDataWithoutBackendSupport, getSessionDetails, getSystemDevices, preauthDevice, removeDevicesFromGroup, removeDynamicGroup, removeReportsByGroupName, removeStaticGroup, searchDevices, selectGroup, setDeviceConfig, setDeviceListState, setDeviceTags, setDeviceTwin, triggerDeviceUpdate, updateDeviceAuth, updateDevicesAuth, updateDynamicGroup, updateReportData } from './devicesSlice/thunks.cjs';
|
|
4
4
|
export { changeNotificationSetting, getDeviceAlerts, getDeviceMonitorConfig, getIssueCountsByType, getLatestDeviceAlerts } from './monitorSlice/thunks.cjs';
|
|
5
5
|
export { advanceOnboarding, getOnboardingState, setOnboardingApproach, setOnboardingCanceled, setOnboardingComplete, setOnboardingDeviceType } from './onboardingSlice/thunks.cjs';
|
|
6
6
|
export { addTenant, cancelRequest, cancelUpgrade, changeIntegration, changeSsoConfig, completeUpgrade, confirmCardUpdate, createBillingProfile, createIntegration, createOrganizationTrial, deleteIntegration, deleteSsoConfig, downloadLicenseReport, editBillingProfile, editTenantDeviceLimit, getAuditLogs, getAuditLogsCsvLink, getBillingPreview, getCurrentCard, getCurrentSubscription, getIntegrations, getSsoConfigById, getSsoConfigs, getTargetLocation, getTenants, getUserBilling, getUserOrganization, getUserSubscription, getWebhookEvents, removeTenant, requestPlanChange, requestPlanUpgrade, sendSupportMessage, setAuditlogsState, setTenantsListState, startCardUpdate, startUpgrade, storeSsoConfig, tenantDataDivergedMessage } from './organizationSlice/thunks.cjs';
|
package/dist/thunks.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { getLatestReleaseInfo, setFirstLoginAfterSignup, setOfflineThreshold, setSearchState } from './appSlice/thunks.js';
|
|
2
2
|
export { GetDeploymentsByStatusPayload, abortDeployment, createDeployment, deriveDeploymentGroup, generateDeploymentLogAnalysis, getDeploymentDevices, getDeploymentsByStatus, getDeploymentsConfig, getDeviceDeployments, getDeviceLog, getSingleDeployment, resetDeviceDeployments, saveDeltaDeploymentsConfig, setDeploymentsState, updateDeploymentControlMap } from './deploymentsSlice/thunks.js';
|
|
3
|
-
export { addDevicesToGroup, addDynamicGroup, addStaticGroup, applyDeviceConfig, decommissionDevice, deleteAuthset, deviceFileUpload, getAllDeviceCounts, getAllDevicesByStatus, getAllDynamicGroupDevices, getAllGroupDevices, getDeviceAttributes, getDeviceAuth, getDeviceById, getDeviceConfig, getDeviceConnect, getDeviceFileDownloadLink, getDeviceInfo, getDeviceLimits, getDeviceTwin, getDevicesByStatus, getDevicesWithAuth, getDynamicGroups, getGatewayDevices, getGroupDevices, getGroups, getReportDataWithoutBackendSupport, getSessionDetails, getSystemDevices, preauthDevice, removeDevicesFromGroup, removeDynamicGroup, removeStaticGroup, searchDevices, selectGroup, setDeviceConfig, setDeviceListState, setDeviceTags, setDeviceTwin, triggerDeviceUpdate, updateDeviceAuth, updateDevicesAuth, updateDynamicGroup, updateReportData } from './devicesSlice/thunks.js';
|
|
3
|
+
export { addDevicesToGroup, addDynamicGroup, addStaticGroup, applyDeviceConfig, decommissionDevice, deleteAuthset, deviceFileUpload, getAllDeviceCounts, getAllDevicesByStatus, getAllDynamicGroupDevices, getAllGroupDevices, getDeviceAttributes, getDeviceAuth, getDeviceById, getDeviceConfig, getDeviceConnect, getDeviceFileDownloadLink, getDeviceInfo, getDeviceLimits, getDeviceTwin, getDevicesByStatus, getDevicesWithAuth, getDynamicGroups, getGatewayDevices, getGroupDevices, getGroups, getReportDataWithoutBackendSupport, getSessionDetails, getSystemDevices, preauthDevice, removeDevicesFromGroup, removeDynamicGroup, removeReportsByGroupName, removeStaticGroup, searchDevices, selectGroup, setDeviceConfig, setDeviceListState, setDeviceTags, setDeviceTwin, triggerDeviceUpdate, updateDeviceAuth, updateDevicesAuth, updateDynamicGroup, updateReportData } from './devicesSlice/thunks.js';
|
|
4
4
|
export { changeNotificationSetting, getDeviceAlerts, getDeviceMonitorConfig, getIssueCountsByType, getLatestDeviceAlerts } from './monitorSlice/thunks.js';
|
|
5
5
|
export { advanceOnboarding, getOnboardingState, setOnboardingApproach, setOnboardingCanceled, setOnboardingComplete, setOnboardingDeviceType } from './onboardingSlice/thunks.js';
|
|
6
6
|
export { addTenant, cancelRequest, cancelUpgrade, changeIntegration, changeSsoConfig, completeUpgrade, confirmCardUpdate, createBillingProfile, createIntegration, createOrganizationTrial, deleteIntegration, deleteSsoConfig, downloadLicenseReport, editBillingProfile, editTenantDeviceLimit, getAuditLogs, getAuditLogsCsvLink, getBillingPreview, getCurrentCard, getCurrentSubscription, getIntegrations, getSsoConfigById, getSsoConfigs, getTargetLocation, getTenants, getUserBilling, getUserOrganization, getUserSubscription, getWebhookEvents, removeTenant, requestPlanChange, requestPlanUpgrade, sendSupportMessage, setAuditlogsState, setTenantsListState, startCardUpdate, startUpgrade, storeSsoConfig, tenantDataDivergedMessage } from './organizationSlice/thunks.js';
|
package/dist/thunks.js
CHANGED
|
@@ -96,6 +96,7 @@ import {
|
|
|
96
96
|
preauthDevice,
|
|
97
97
|
removeDevicesFromGroup,
|
|
98
98
|
removeDynamicGroup,
|
|
99
|
+
removeReportsByGroupName,
|
|
99
100
|
removeRole,
|
|
100
101
|
removeStaticGroup,
|
|
101
102
|
removeTenant,
|
|
@@ -143,7 +144,7 @@ import {
|
|
|
143
144
|
verify2FA,
|
|
144
145
|
verifyEmailComplete,
|
|
145
146
|
verifyEmailStart
|
|
146
|
-
} from "./chunk-
|
|
147
|
+
} from "./chunk-KJ2SUFAU.js";
|
|
147
148
|
import {
|
|
148
149
|
cancelFileUpload,
|
|
149
150
|
createArtifact,
|
|
@@ -166,17 +167,17 @@ import {
|
|
|
166
167
|
setSingleReleaseTags,
|
|
167
168
|
updateReleaseInfo,
|
|
168
169
|
uploadArtifact
|
|
169
|
-
} from "./chunk-
|
|
170
|
+
} from "./chunk-AV7SRATY.js";
|
|
170
171
|
import {
|
|
171
172
|
changeNotificationSetting,
|
|
172
173
|
getDeviceAlerts,
|
|
173
174
|
getDeviceMonitorConfig,
|
|
174
175
|
getIssueCountsByType,
|
|
175
176
|
getLatestDeviceAlerts
|
|
176
|
-
} from "./chunk-
|
|
177
|
-
import "./chunk-
|
|
178
|
-
import "./chunk-
|
|
179
|
-
import "./chunk-
|
|
177
|
+
} from "./chunk-45BHMNX6.js";
|
|
178
|
+
import "./chunk-ZAZTNDSY.js";
|
|
179
|
+
import "./chunk-XJLZK4QY.js";
|
|
180
|
+
import "./chunk-IRQRV552.js";
|
|
180
181
|
import "./chunk-RJRZXDVT.js";
|
|
181
182
|
import "./chunk-TRKA7XYU.js";
|
|
182
183
|
import "./chunk-YR65C62H.js";
|
|
@@ -186,24 +187,24 @@ import "./chunk-CQXDAXQF.js";
|
|
|
186
187
|
import "./chunk-VODRLEDP.js";
|
|
187
188
|
import "./chunk-6WJI4MOP.js";
|
|
188
189
|
import "./chunk-OLKM53RL.js";
|
|
189
|
-
import "./chunk-
|
|
190
|
+
import "./chunk-UVTLZV34.js";
|
|
190
191
|
import "./chunk-53W2NRSL.js";
|
|
191
192
|
import "./chunk-NMAXZ3ZY.js";
|
|
192
|
-
import "./chunk-
|
|
193
|
-
import "./chunk-
|
|
194
|
-
import "./chunk-
|
|
193
|
+
import "./chunk-XOASGJZU.js";
|
|
194
|
+
import "./chunk-42GZ6FGV.js";
|
|
195
|
+
import "./chunk-43ZBO3JW.js";
|
|
195
196
|
import "./chunk-3NOV7X4M.js";
|
|
196
197
|
import "./chunk-YO22XLHI.js";
|
|
197
198
|
import "./chunk-JIS4PA3R.js";
|
|
198
199
|
import "./chunk-WR6RQKF5.js";
|
|
199
200
|
import "./chunk-O7DR57RN.js";
|
|
200
201
|
import "./chunk-4BHM6WVX.js";
|
|
201
|
-
import "./chunk-
|
|
202
|
+
import "./chunk-B3C6H2PR.js";
|
|
202
203
|
import "./chunk-WWED74SG.js";
|
|
203
204
|
import "./chunk-2DYA3X77.js";
|
|
204
205
|
import "./chunk-FAJ3I2UQ.js";
|
|
205
206
|
import "./chunk-ZKAH3APE.js";
|
|
206
|
-
import "./chunk-
|
|
207
|
+
import "./chunk-AJ6DIDO4.js";
|
|
207
208
|
export {
|
|
208
209
|
abortDeployment,
|
|
209
210
|
addDevicesToGroup,
|
|
@@ -321,6 +322,7 @@ export {
|
|
|
321
322
|
removeDynamicGroup,
|
|
322
323
|
removeRelease,
|
|
323
324
|
removeReleases,
|
|
325
|
+
removeReportsByGroupName,
|
|
324
326
|
removeRole,
|
|
325
327
|
removeStaticGroup,
|
|
326
328
|
removeTenant,
|
|
@@ -106,7 +106,7 @@ var ADDONS = {
|
|
|
106
106
|
configure: {
|
|
107
107
|
id: "configure",
|
|
108
108
|
title: "Configure",
|
|
109
|
-
description: "
|
|
109
|
+
description: "Seamlessly configure applications and devices remotely \u2013 configure each device to its environment.",
|
|
110
110
|
needs: ["hasDeviceConfig"],
|
|
111
111
|
os: {
|
|
112
112
|
price: "$11/month",
|
|
@@ -121,7 +121,7 @@ var ADDONS = {
|
|
|
121
121
|
monitor: {
|
|
122
122
|
id: "monitor",
|
|
123
123
|
title: "Monitor",
|
|
124
|
-
description: "
|
|
124
|
+
description: "Detect and analyze health issues of devices, services and applications. Set up alerts so you can act quickly.",
|
|
125
125
|
needs: ["hasMonitor"],
|
|
126
126
|
os: {
|
|
127
127
|
price: "-",
|
|
@@ -136,7 +136,7 @@ var ADDONS = {
|
|
|
136
136
|
troubleshoot: {
|
|
137
137
|
id: "troubleshoot",
|
|
138
138
|
title: "Troubleshoot",
|
|
139
|
-
description: "
|
|
139
|
+
description: "Secure, remote access to your devices \u2013 quickly diagnose and fix issues in real time.",
|
|
140
140
|
needs: ["hasDeviceConnect"],
|
|
141
141
|
os: {
|
|
142
142
|
price: "$27/month",
|
|
@@ -150,7 +150,11 @@ var ADDONS = {
|
|
|
150
150
|
}
|
|
151
151
|
};
|
|
152
152
|
var BENEFITS = {
|
|
153
|
-
auditlog: {
|
|
153
|
+
auditlog: {
|
|
154
|
+
id: "auditlog",
|
|
155
|
+
benefit: "gain access to logs for important events such as changes to devices, deployments and user management, as well as remote terminal session replays",
|
|
156
|
+
requiredPlan: PLANS.enterprise.id
|
|
157
|
+
},
|
|
154
158
|
dashboard: { id: "dashboard", benefit: "actionable insights into the devices you are updating with Mender", requiredPlan: PLANS.enterprise.id },
|
|
155
159
|
deltaGeneration: {
|
|
156
160
|
id: "deltaGeneration",
|
|
@@ -2348,19 +2352,17 @@ var getSessionInfo = () => {
|
|
|
2348
2352
|
sessionInfo = JSON.parse(window.localStorage.getItem("JWT") ?? "");
|
|
2349
2353
|
} catch {
|
|
2350
2354
|
}
|
|
2355
|
+
const jwtTokenFromCookie = cookies.get("JWT", { doNotParse: true }) ?? "";
|
|
2356
|
+
if (jwtTokenFromCookie) {
|
|
2357
|
+
setSessionInfo({ token: jwtTokenFromCookie });
|
|
2358
|
+
cookies.remove("JWT");
|
|
2359
|
+
cookies.remove("JWT", { path: "/" });
|
|
2360
|
+
return { token: jwtTokenFromCookie, expiresAt: void 0 };
|
|
2361
|
+
}
|
|
2351
2362
|
if (sessionInfo.expiresAt && new Date(sessionInfo.expiresAt) < /* @__PURE__ */ new Date()) {
|
|
2352
2363
|
cleanUp();
|
|
2353
2364
|
return { ...emptySession };
|
|
2354
2365
|
}
|
|
2355
|
-
if (!sessionInfo.token) {
|
|
2356
|
-
const jwtTokenFromCookie = cookies.get("JWT", { doNotParse: true }) ?? "";
|
|
2357
|
-
if (jwtTokenFromCookie) {
|
|
2358
|
-
setSessionInfo({ token: jwtTokenFromCookie });
|
|
2359
|
-
sessionInfo.token = jwtTokenFromCookie;
|
|
2360
|
-
cookies.remove("JWT");
|
|
2361
|
-
cookies.remove("JWT", { path: "/" });
|
|
2362
|
-
}
|
|
2363
|
-
}
|
|
2364
2366
|
sessionInfo.token = sessionInfo.token || "";
|
|
2365
2367
|
tokenCache = sessionInfo.token;
|
|
2366
2368
|
return sessionInfo;
|
|
@@ -2471,12 +2473,18 @@ var createAppAsyncThunk = import_toolkit16.createAsyncThunk.withTypes();
|
|
|
2471
2473
|
|
|
2472
2474
|
// src/appSlice/thunks.ts
|
|
2473
2475
|
var import_helpers7 = require("@northern.tech/utils/helpers");
|
|
2474
|
-
var
|
|
2476
|
+
var import_universal_cookie3 = __toESM(require("universal-cookie"), 1);
|
|
2475
2477
|
|
|
2476
2478
|
// src/api/general-api.ts
|
|
2477
2479
|
var import_axios = __toESM(require("axios"), 1);
|
|
2480
|
+
var import_universal_cookie2 = __toESM(require("universal-cookie"), 1);
|
|
2481
|
+
var cookies2 = new import_universal_cookie2.default();
|
|
2478
2482
|
var unauthorizedRedirect = (error) => {
|
|
2479
2483
|
if (!(0, import_axios.isCancel)(error) && error.response?.status === 401 && getToken() && !window.location.pathname.endsWith("/subscription")) {
|
|
2484
|
+
if (cookies2.get("JWT", { doNotParse: true })) {
|
|
2485
|
+
window.location.reload();
|
|
2486
|
+
return Promise.reject(error);
|
|
2487
|
+
}
|
|
2480
2488
|
cleanUp();
|
|
2481
2489
|
window.location.replace("/ui/");
|
|
2482
2490
|
}
|
|
@@ -2512,9 +2520,9 @@ var Api = {
|
|
|
2512
2520
|
var general_api_default = Api;
|
|
2513
2521
|
|
|
2514
2522
|
// src/appSlice/thunks.ts
|
|
2515
|
-
var
|
|
2523
|
+
var cookies3 = new import_universal_cookie3.default();
|
|
2516
2524
|
var setFirstLoginAfterSignup = createAppAsyncThunk(`${sliceName}/setFirstLoginAfterSignup`, (firstLoginAfterSignup, { dispatch }) => {
|
|
2517
|
-
|
|
2525
|
+
cookies3.set("firstLoginAfterSignup", !!firstLoginAfterSignup, { maxAge: 60, path: "/", domain: ".mender.io", sameSite: false });
|
|
2518
2526
|
dispatch(actions.setFirstLoginAfterSignup(!!firstLoginAfterSignup));
|
|
2519
2527
|
});
|
|
2520
2528
|
var dateFunctionMap = {
|
|
@@ -3097,11 +3105,18 @@ var addStaticGroup = createAppAsyncThunk(
|
|
|
3097
3105
|
)
|
|
3098
3106
|
).catch((err) => commonErrorHandler(err, `Group could not be updated:`, dispatch))
|
|
3099
3107
|
);
|
|
3108
|
+
var removeReportsByGroupName = createAppAsyncThunk(`${sliceName3}/removeReportsByGroupName`, (groupName, { dispatch, getState }) => {
|
|
3109
|
+
if (!groupName) return Promise.resolve();
|
|
3110
|
+
const reports = getDeviceReportsForUser(getState());
|
|
3111
|
+
const filteredReports = reports.filter((report) => report.group !== groupName);
|
|
3112
|
+
dispatch(saveUserSettings({ reports: filteredReports }));
|
|
3113
|
+
});
|
|
3100
3114
|
var removeStaticGroup = createAppAsyncThunk(
|
|
3101
3115
|
`${sliceName3}/removeStaticGroup`,
|
|
3102
3116
|
(groupName, { dispatch }) => general_api_default.delete(`${import_constants4.inventoryApiUrl}/groups/${groupName}`).then(
|
|
3103
3117
|
() => Promise.all([
|
|
3104
3118
|
dispatch(actions3.removeGroup(groupName)),
|
|
3119
|
+
dispatch(removeReportsByGroupName(groupName)),
|
|
3105
3120
|
dispatch(getGroups2()),
|
|
3106
3121
|
dispatch(setSnackbar3({ message: "Group was removed successfully", autoHideDuration: TIMEOUTS.fiveSeconds }))
|
|
3107
3122
|
])
|
|
@@ -3167,6 +3182,7 @@ var removeDynamicGroup = createAppAsyncThunk(`${sliceName3}/removeDynamicGroup`,
|
|
|
3167
3182
|
return general_api_default.delete(`${import_constants4.inventoryApiUrlV2}/filters/${filterId}`).then(
|
|
3168
3183
|
() => Promise.all([
|
|
3169
3184
|
dispatch(actions3.removeGroup(groupName)),
|
|
3185
|
+
dispatch(removeReportsByGroupName(groupName)),
|
|
3170
3186
|
dispatch(setSnackbar3({ message: "Group was removed successfully", autoHideDuration: TIMEOUTS.fiveSeconds }))
|
|
3171
3187
|
])
|
|
3172
3188
|
);
|
|
@@ -3937,7 +3953,7 @@ var import_helpers10 = require("@northern.tech/utils/helpers");
|
|
|
3937
3953
|
var import_retrytimer = require("@northern.tech/utils/retrytimer");
|
|
3938
3954
|
var import_dayjs2 = __toESM(require("dayjs"), 1);
|
|
3939
3955
|
var import_md5 = __toESM(require("md5"), 1);
|
|
3940
|
-
var
|
|
3956
|
+
var import_universal_cookie4 = __toESM(require("universal-cookie"), 1);
|
|
3941
3957
|
|
|
3942
3958
|
// src/api/users-api.ts
|
|
3943
3959
|
var import_axios3 = __toESM(require("axios"), 1);
|
|
@@ -3954,7 +3970,7 @@ var Api2 = {
|
|
|
3954
3970
|
var users_api_default = Api2;
|
|
3955
3971
|
|
|
3956
3972
|
// src/usersSlice/thunks.ts
|
|
3957
|
-
var
|
|
3973
|
+
var cookies4 = new import_universal_cookie4.default();
|
|
3958
3974
|
var { setAnnouncement, setSnackbar: setSnackbar4 } = actions_default;
|
|
3959
3975
|
var handleLoginError = (err, { token2fa: has2FA, password }, rejectWithValue) => () => {
|
|
3960
3976
|
const errorText = (0, import_helpers10.extractErrorMessage)(err);
|
|
@@ -3989,7 +4005,7 @@ var loginUser = createAppAsyncThunk(
|
|
|
3989
4005
|
now.setSeconds(now.getSeconds() + import_constants4.maxSessionAge);
|
|
3990
4006
|
const expiresAt = stayLoggedIn ? void 0 : now.toISOString();
|
|
3991
4007
|
setSessionInfo({ token, expiresAt });
|
|
3992
|
-
|
|
4008
|
+
cookies4.remove("JWT", { path: "/" });
|
|
3993
4009
|
return dispatch(getUser(OWN_USER_ID)).unwrap().catch((e) => {
|
|
3994
4010
|
cleanUp();
|
|
3995
4011
|
return Promise.reject(dispatch(setSnackbar4((0, import_helpers10.extractErrorMessage)(e))));
|
|
@@ -4544,9 +4560,9 @@ var setHideAnnouncement = createAppAsyncThunk(
|
|
|
4544
4560
|
({ shouldHide, userId }, { dispatch, getState }) => {
|
|
4545
4561
|
const currentUserId = userId || getCurrentUser(getState()).id;
|
|
4546
4562
|
const hash = getState().app.hostedAnnouncement ? (0, import_md5.default)(getState().app.hostedAnnouncement) : "";
|
|
4547
|
-
const announceCookie =
|
|
4563
|
+
const announceCookie = cookies4.get(`${currentUserId}${hash}`);
|
|
4548
4564
|
if (shouldHide || hash.length && typeof announceCookie !== "undefined") {
|
|
4549
|
-
|
|
4565
|
+
cookies4.set(`${currentUserId}${hash}`, true, { maxAge: 604800 });
|
|
4550
4566
|
dispatch(setAnnouncement(""));
|
|
4551
4567
|
}
|
|
4552
4568
|
}
|