@northern.tech/store 0.3.2 → 0.3.3

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.
Files changed (197) hide show
  1. package/dist/actions.cjs +20 -17
  2. package/dist/actions.cjs.map +1 -1
  3. package/dist/actions.js +8 -8
  4. package/dist/api/general-api.js +2 -2
  5. package/dist/api/types/Tenant.ts +17 -12
  6. package/dist/api/users-api.js +2 -2
  7. package/dist/appSlice/constants.cjs +18 -10
  8. package/dist/appSlice/constants.cjs.map +1 -1
  9. package/dist/appSlice/constants.d.cts +41 -84
  10. package/dist/appSlice/constants.d.ts +41 -84
  11. package/dist/appSlice/constants.js +1 -1
  12. package/dist/appSlice/index.js +2 -2
  13. package/dist/appSlice/thunks.cjs +137 -94
  14. package/dist/appSlice/thunks.cjs.map +1 -1
  15. package/dist/appSlice/thunks.js +19 -19
  16. package/dist/auth.js +2 -2
  17. package/dist/{chunk-Q6M5TTDQ.js → chunk-2CYOM4BK.js} +1 -1
  18. package/dist/chunk-2CYOM4BK.js.map +1 -0
  19. package/dist/{chunk-74OJIKXF.js → chunk-2JHFUQ6B.js} +133 -96
  20. package/dist/chunk-2JHFUQ6B.js.map +1 -0
  21. package/dist/{chunk-YETZPQFR.js → chunk-4XJMRVFI.js} +12 -11
  22. package/dist/chunk-4XJMRVFI.js.map +1 -0
  23. package/dist/{chunk-RX55KAKX.js → chunk-7JKWI5FK.js} +2 -2
  24. package/dist/{chunk-A6CT6GTI.js → chunk-C5NEDBJI.js} +17 -11
  25. package/dist/chunk-C5NEDBJI.js.map +1 -0
  26. package/dist/{chunk-NNADGHSL.js → chunk-DAPAXWA5.js} +8 -8
  27. package/dist/{chunk-ANB5BM5J.js → chunk-DCK2DBOA.js} +27 -20
  28. package/dist/chunk-DCK2DBOA.js.map +1 -0
  29. package/dist/{chunk-E5LEU5PF.js → chunk-HPBE6KYY.js} +2 -2
  30. package/dist/{chunk-2RJIDREZ.js → chunk-LEMVXAYP.js} +25 -16
  31. package/dist/chunk-LEMVXAYP.js.map +1 -0
  32. package/dist/{chunk-NI4SZOCF.js → chunk-LGNOTPUG.js} +9 -9
  33. package/dist/{chunk-MDC7Y3EX.js → chunk-LTKOV26W.js} +22 -20
  34. package/dist/chunk-LTKOV26W.js.map +1 -0
  35. package/dist/{chunk-YTQUNAZP.js → chunk-QRGTG4YB.js} +2 -2
  36. package/dist/{chunk-XTRPX7JZ.js → chunk-TI2RL5P2.js} +2 -2
  37. package/dist/chunk-TI2RL5P2.js.map +1 -0
  38. package/dist/{chunk-YGBFDXXA.js → chunk-TUACATJA.js} +2 -2
  39. package/dist/{chunk-25AKG5HH.js → chunk-UWMYZNUB.js} +19 -11
  40. package/dist/chunk-UWMYZNUB.js.map +1 -0
  41. package/dist/{chunk-UEP36GCI.js → chunk-VMNMD6KF.js} +2 -2
  42. package/dist/{chunk-KAQJH2YL.js → chunk-WXL7PVI5.js} +12 -4
  43. package/dist/chunk-WXL7PVI5.js.map +1 -0
  44. package/dist/{chunk-VOCOFE4I.js → chunk-X7IEZBM4.js} +2 -2
  45. package/dist/{chunk-XXHONFSQ.js → chunk-YDS36ALB.js} +3 -3
  46. package/dist/{chunk-XXHONFSQ.js.map → chunk-YDS36ALB.js.map} +1 -1
  47. package/dist/commonSelectors.cjs +40 -18
  48. package/dist/commonSelectors.cjs.map +1 -1
  49. package/dist/commonSelectors.d.cts +54 -46
  50. package/dist/commonSelectors.d.ts +54 -46
  51. package/dist/commonSelectors.js +9 -9
  52. package/dist/constants.cjs +35 -19
  53. package/dist/constants.cjs.map +1 -1
  54. package/dist/constants.d.cts +3 -3
  55. package/dist/constants.d.ts +3 -3
  56. package/dist/constants.js +6 -2
  57. package/dist/deploymentdevicehook.cjs +143 -99
  58. package/dist/deploymentdevicehook.cjs.map +1 -1
  59. package/dist/deploymentdevicehook.d.cts +1 -1
  60. package/dist/deploymentdevicehook.d.ts +1 -1
  61. package/dist/deploymentdevicehook.js +24 -22
  62. package/dist/deploymentdevicehook.js.map +1 -1
  63. package/dist/deploymentsSlice/constants.cjs +8 -8
  64. package/dist/deploymentsSlice/constants.cjs.map +1 -1
  65. package/dist/deploymentsSlice/constants.js +2 -2
  66. package/dist/deploymentsSlice/index.cjs +8 -8
  67. package/dist/deploymentsSlice/index.cjs.map +1 -1
  68. package/dist/deploymentsSlice/index.js +3 -3
  69. package/dist/deploymentsSlice/selectors.cjs +8 -8
  70. package/dist/deploymentsSlice/selectors.cjs.map +1 -1
  71. package/dist/deploymentsSlice/selectors.js +3 -3
  72. package/dist/deploymentsSlice/thunks.cjs +137 -94
  73. package/dist/deploymentsSlice/thunks.cjs.map +1 -1
  74. package/dist/deploymentsSlice/thunks.js +19 -19
  75. package/dist/devicesSlice/constants.cjs +11 -8
  76. package/dist/devicesSlice/constants.cjs.map +1 -1
  77. package/dist/devicesSlice/constants.d.cts +2 -1
  78. package/dist/devicesSlice/constants.d.ts +2 -1
  79. package/dist/devicesSlice/constants.js +4 -2
  80. package/dist/devicesSlice/index.cjs +8 -8
  81. package/dist/devicesSlice/index.cjs.map +1 -1
  82. package/dist/devicesSlice/index.js +3 -3
  83. package/dist/devicesSlice/selectors.cjs +9 -9
  84. package/dist/devicesSlice/selectors.cjs.map +1 -1
  85. package/dist/devicesSlice/selectors.js +3 -3
  86. package/dist/devicesSlice/thunks.cjs +139 -94
  87. package/dist/devicesSlice/thunks.cjs.map +1 -1
  88. package/dist/devicesSlice/thunks.d.cts +12 -2
  89. package/dist/devicesSlice/thunks.d.ts +12 -2
  90. package/dist/devicesSlice/thunks.js +21 -19
  91. package/dist/flag-eu-5477R2P4.svg +130 -0
  92. package/dist/flag-us-HNQAF66I.svg +63 -0
  93. package/dist/monitorSlice/constants.cjs +8 -8
  94. package/dist/monitorSlice/constants.cjs.map +1 -1
  95. package/dist/monitorSlice/constants.js +2 -2
  96. package/dist/monitorSlice/index.cjs +8 -8
  97. package/dist/monitorSlice/index.cjs.map +1 -1
  98. package/dist/monitorSlice/index.js +3 -3
  99. package/dist/monitorSlice/thunks.cjs +59 -37
  100. package/dist/monitorSlice/thunks.cjs.map +1 -1
  101. package/dist/monitorSlice/thunks.js +17 -17
  102. package/dist/onboardingSlice/thunks.cjs +146 -100
  103. package/dist/onboardingSlice/thunks.cjs.map +1 -1
  104. package/dist/onboardingSlice/thunks.d.cts +1 -32
  105. package/dist/onboardingSlice/thunks.d.ts +1 -32
  106. package/dist/onboardingSlice/thunks.js +19 -19
  107. package/dist/organizationSlice/constants.cjs +22 -17
  108. package/dist/organizationSlice/constants.cjs.map +1 -1
  109. package/dist/organizationSlice/constants.d.cts +33 -1
  110. package/dist/organizationSlice/constants.d.ts +33 -1
  111. package/dist/organizationSlice/constants.js +4 -2
  112. package/dist/organizationSlice/index.cjs +18 -15
  113. package/dist/organizationSlice/index.cjs.map +1 -1
  114. package/dist/organizationSlice/index.d.cts +26 -1012
  115. package/dist/organizationSlice/index.d.ts +26 -1012
  116. package/dist/organizationSlice/index.js +3 -3
  117. package/dist/organizationSlice/selectors.cjs.map +1 -1
  118. package/dist/organizationSlice/selectors.d.cts +9 -1
  119. package/dist/organizationSlice/selectors.d.ts +9 -1
  120. package/dist/organizationSlice/selectors.js +3 -3
  121. package/dist/organizationSlice/thunks.cjs +1605 -1539
  122. package/dist/organizationSlice/thunks.cjs.map +1 -1
  123. package/dist/organizationSlice/thunks.d.cts +61 -36
  124. package/dist/organizationSlice/thunks.d.ts +61 -36
  125. package/dist/organizationSlice/thunks.js +19 -19
  126. package/dist/organizationSlice/types.cjs +19 -0
  127. package/dist/organizationSlice/types.cjs.map +1 -0
  128. package/dist/organizationSlice/types.d.cts +114 -0
  129. package/dist/organizationSlice/types.d.ts +114 -0
  130. package/dist/organizationSlice/types.js +1 -0
  131. package/dist/organizationSlice/types.js.map +1 -0
  132. package/dist/releasesSlice/index.js +2 -2
  133. package/dist/releasesSlice/selectors.cjs +11 -0
  134. package/dist/releasesSlice/selectors.cjs.map +1 -1
  135. package/dist/releasesSlice/selectors.js +4 -4
  136. package/dist/releasesSlice/thunks.cjs +73 -49
  137. package/dist/releasesSlice/thunks.cjs.map +1 -1
  138. package/dist/releasesSlice/thunks.d.cts +1 -4
  139. package/dist/releasesSlice/thunks.d.ts +1 -4
  140. package/dist/releasesSlice/thunks.js +17 -17
  141. package/dist/selectors.cjs +46 -18
  142. package/dist/selectors.cjs.map +1 -1
  143. package/dist/selectors.d.cts +9 -1
  144. package/dist/selectors.d.ts +9 -1
  145. package/dist/selectors.js +36 -30
  146. package/dist/store.cjs +36 -23
  147. package/dist/store.cjs.map +1 -1
  148. package/dist/store.d.cts +12 -231
  149. package/dist/store.d.ts +12 -231
  150. package/dist/store.js +13 -11
  151. package/dist/storehooks.cjs +216 -137
  152. package/dist/storehooks.cjs.map +1 -1
  153. package/dist/storehooks.js +36 -24
  154. package/dist/storehooks.js.map +1 -1
  155. package/dist/thunks.cjs +193 -122
  156. package/dist/thunks.cjs.map +1 -1
  157. package/dist/thunks.d.cts +5 -1
  158. package/dist/thunks.d.ts +5 -1
  159. package/dist/thunks.js +21 -19
  160. package/dist/usersSlice/constants.cjs +10 -10
  161. package/dist/usersSlice/constants.cjs.map +1 -1
  162. package/dist/usersSlice/constants.js +2 -2
  163. package/dist/usersSlice/index.cjs +10 -10
  164. package/dist/usersSlice/index.cjs.map +1 -1
  165. package/dist/usersSlice/index.js +3 -3
  166. package/dist/usersSlice/selectors.cjs +35 -13
  167. package/dist/usersSlice/selectors.cjs.map +1 -1
  168. package/dist/usersSlice/selectors.d.cts +44 -1
  169. package/dist/usersSlice/selectors.d.ts +44 -1
  170. package/dist/usersSlice/selectors.js +12 -6
  171. package/dist/usersSlice/thunks.cjs +135 -94
  172. package/dist/usersSlice/thunks.cjs.map +1 -1
  173. package/dist/usersSlice/thunks.d.cts +10 -9
  174. package/dist/usersSlice/thunks.d.ts +10 -9
  175. package/dist/usersSlice/thunks.js +19 -19
  176. package/dist/utils.cjs +17 -16
  177. package/dist/utils.cjs.map +1 -1
  178. package/dist/utils.js +3 -3
  179. package/package.json +7 -7
  180. package/dist/chunk-25AKG5HH.js.map +0 -1
  181. package/dist/chunk-2RJIDREZ.js.map +0 -1
  182. package/dist/chunk-74OJIKXF.js.map +0 -1
  183. package/dist/chunk-A6CT6GTI.js.map +0 -1
  184. package/dist/chunk-ANB5BM5J.js.map +0 -1
  185. package/dist/chunk-KAQJH2YL.js.map +0 -1
  186. package/dist/chunk-MDC7Y3EX.js.map +0 -1
  187. package/dist/chunk-Q6M5TTDQ.js.map +0 -1
  188. package/dist/chunk-XTRPX7JZ.js.map +0 -1
  189. package/dist/chunk-YETZPQFR.js.map +0 -1
  190. /package/dist/{chunk-RX55KAKX.js.map → chunk-7JKWI5FK.js.map} +0 -0
  191. /package/dist/{chunk-NNADGHSL.js.map → chunk-DAPAXWA5.js.map} +0 -0
  192. /package/dist/{chunk-E5LEU5PF.js.map → chunk-HPBE6KYY.js.map} +0 -0
  193. /package/dist/{chunk-NI4SZOCF.js.map → chunk-LGNOTPUG.js.map} +0 -0
  194. /package/dist/{chunk-YTQUNAZP.js.map → chunk-QRGTG4YB.js.map} +0 -0
  195. /package/dist/{chunk-YGBFDXXA.js.map → chunk-TUACATJA.js.map} +0 -0
  196. /package/dist/{chunk-UEP36GCI.js.map → chunk-VMNMD6KF.js.map} +0 -0
  197. /package/dist/{chunk-VOCOFE4I.js.map → chunk-X7IEZBM4.js.map} +0 -0
package/dist/constants.js CHANGED
@@ -14,6 +14,7 @@ import {
14
14
  OWN_USER_ID,
15
15
  PermissionTypes,
16
16
  READ_STATES,
17
+ REPORT_CHART_SIZE_LIMIT,
17
18
  SP_AUDIT_LOGS_TYPES,
18
19
  SSO_TYPES,
19
20
  TENANT_LIST_DEFAULT,
@@ -21,6 +22,7 @@ import {
21
22
  XML_METADATA_FORMAT,
22
23
  alertChannels,
23
24
  auditLogsApiUrl,
25
+ auditlogTypes,
24
26
  checkPermissionsObject,
25
27
  defaultPermissionSets,
26
28
  defaultStats,
@@ -62,7 +64,7 @@ import {
62
64
  uiPermissionsById,
63
65
  useradmApiUrlv1,
64
66
  useradmApiUrlv2
65
- } from "./chunk-A6CT6GTI.js";
67
+ } from "./chunk-C5NEDBJI.js";
66
68
  import {
67
69
  ARTIFACT_GENERATION_TYPE,
68
70
  currentArtifact,
@@ -92,7 +94,7 @@ import {
92
94
  headerNames,
93
95
  locations,
94
96
  yes
95
- } from "./chunk-25AKG5HH.js";
97
+ } from "./chunk-UWMYZNUB.js";
96
98
  import {
97
99
  ALL_DEVICES,
98
100
  ALL_RELEASES,
@@ -147,6 +149,7 @@ export {
147
149
  PLANS,
148
150
  PermissionTypes,
149
151
  READ_STATES,
152
+ REPORT_CHART_SIZE_LIMIT,
150
153
  SORTING_OPTIONS,
151
154
  SP_AUDIT_LOGS_TYPES,
152
155
  SSO_TYPES,
@@ -159,6 +162,7 @@ export {
159
162
  apiRoot,
160
163
  apiUrl,
161
164
  auditLogsApiUrl,
165
+ auditlogTypes,
162
166
  canAccess,
163
167
  chartTypes,
164
168
  checkPermissionsObject,
@@ -27,14 +27,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
 
30
- // src/deploymentdevicehook.js
30
+ // src/deploymentdevicehook.ts
31
31
  var deploymentdevicehook_exports = {};
32
32
  __export(deploymentdevicehook_exports, {
33
33
  useDeploymentDevice: () => useDeploymentDevice
34
34
  });
35
35
  module.exports = __toCommonJS(deploymentdevicehook_exports);
36
36
  var import_react = require("react");
37
- var import_react_redux = require("react-redux");
37
+ var import_react_redux2 = require("react-redux");
38
38
 
39
39
  // src/appSlice/selectors.ts
40
40
  var import_helpers = require("@northern.tech/utils/helpers");
@@ -86,28 +86,28 @@ var PLANS = {
86
86
  id: "os",
87
87
  name: "Basic",
88
88
  offer: true,
89
- price: "$32/month",
89
+ price: "$32 / month",
90
90
  deviceCount: startingDeviceCount.os,
91
- offerprice: "$23/month for first 50 devices",
91
+ offerprice: "$23 / month for first 50 devices",
92
92
  price2: "for first 6 months;\n$29/month thereafter",
93
- features: ["Basic OTA features"]
93
+ features: ["Access to core features of Mender", "Basic support"]
94
94
  },
95
95
  professional: {
96
96
  id: "professional",
97
97
  name: "Professional",
98
98
  offer: true,
99
- price: "$269/month",
99
+ price: "$269 / month",
100
100
  deviceCount: startingDeviceCount.professional,
101
- offerprice: "$200/month for first 50 devices",
101
+ offerprice: "$200 / month for first 50 devices",
102
102
  price2: "for first 6 months;\n$249/month thereafter",
103
- features: ["+ Advanced OTA features", "+ Standard support"]
103
+ features: ["Advanced OTA features", "Higher priority support"]
104
104
  },
105
105
  enterprise: {
106
106
  id: "enterprise",
107
107
  name: "Enterprise",
108
108
  price: "Custom pricing",
109
- deviceCount: "unlimited devices",
110
- features: ["+ Enterprise-grade OTA features", "+ Premium support"]
109
+ deviceCount: "Unlimited devices",
110
+ features: ["All Mender features", "Advanced security features", "SLA-backed support"]
111
111
  }
112
112
  };
113
113
  var ADDONS = {
@@ -440,6 +440,7 @@ var DEVICE_STATES = {
440
440
  rejected: "rejected"
441
441
  };
442
442
  var geoAttributes = ["geo-lat", "geo-lon"].map((attribute) => ({ attribute, scope: "inventory" }));
443
+ var REPORT_CHART_SIZE_LIMIT = 6;
443
444
 
444
445
  // src/monitorSlice/constants.ts
445
446
  var alertChannels = { email: "email" };
@@ -521,13 +522,16 @@ var SSO_TYPES = {
521
522
  configDetails: [{ key: "startURL", label: "Start Url", getValue: getOidcStartUrl }]
522
523
  }
523
524
  };
524
- var AUDIT_LOGS_TYPES = [
525
- { title: "Artifact", queryParameter: "object_type", value: "artifact" },
526
- { title: "Deployment", queryParameter: "object_deployment_name", value: "deployment" },
527
- { title: "Device", queryParameter: "object_id", value: "device" },
528
- { title: "User", queryParameter: "object_id", value: "user" }
529
- ];
530
- var SP_AUDIT_LOGS_TYPES = [AUDIT_LOGS_TYPES[3], { title: "Tenant", queryParameter: "object_id", value: "tenant" }];
525
+ var auditlogTypes = {
526
+ artifact: { title: "Artifact", queryParameter: "object_type", value: "artifact" },
527
+ deployment: { title: "Deployment", queryParameter: "object_deployment_name", value: "deployment" },
528
+ device: { title: "Device", queryParameter: "object_id", value: "device" },
529
+ user_access_token: { title: "Personal Access Token", queryParameter: "user_access_token", value: "user_access_token" },
530
+ user: { title: "User", queryParameter: "object_id", value: "user" },
531
+ tenant: { title: "Tenant", queryParameter: "object_id", value: "tenant" }
532
+ };
533
+ var AUDIT_LOGS_TYPES = [auditlogTypes.artifact, auditlogTypes.deployment, auditlogTypes.device, auditlogTypes.user_access_token, auditlogTypes.user];
534
+ var SP_AUDIT_LOGS_TYPES = [auditlogTypes.user, auditlogTypes.tenant];
531
535
  var emptyWebhook = {
532
536
  description: "",
533
537
  enabled: true,
@@ -660,7 +664,7 @@ var uiPermissionsByArea = {
660
664
  explanation: "Granting access to the audit log will allow tracing changes to devices, releases and user accounts, as well as providing information about deployments.",
661
665
  key: "auditlog",
662
666
  uiPermissions: [uiPermissionsById.read],
663
- title: "System audit log"
667
+ title: "System Audit Log"
664
668
  },
665
669
  deployments: {
666
670
  endpoints: [
@@ -811,7 +815,7 @@ var serviceProviderRolesById = {
811
815
  },
812
816
  readOnly: {
813
817
  name: "Read access",
814
- value: staticRolesByName.admin,
818
+ value: staticRolesByName.readOnly,
815
819
  description: "This role can see all linked organizations but cannot make any changes",
816
820
  permissions: [],
817
821
  uiPermissions: {
@@ -1183,7 +1187,7 @@ var getGroups = (0, import_toolkit3.createSelector)([getGroupsById], (groupsById
1183
1187
  (accu, [groupname, group]) => {
1184
1188
  const name = groupname === UNGROUPED_GROUP.id ? UNGROUPED_GROUP.name : groupname;
1185
1189
  const groupItem = { ...group, groupId: name, name: groupname };
1186
- if (group.filters.length > 0) {
1190
+ if (group.filters?.length > 0) {
1187
1191
  if (groupname !== UNGROUPED_GROUP.id) {
1188
1192
  accu.dynamic.push(groupItem);
1189
1193
  } else {
@@ -1256,14 +1260,15 @@ var getAuditLogEntry = (0, import_toolkit4.createSelector)([getAuditLog, getAudi
1256
1260
  // src/utils.ts
1257
1261
  var import_helpers3 = require("@northern.tech/utils/helpers");
1258
1262
  var filterProcessors = {
1259
- $gt: (val) => Number(val) || val,
1260
- $gte: (val) => Number(val) || val,
1261
- $lt: (val) => Number(val) || val,
1262
- $lte: (val) => Number(val) || val,
1263
- $in: (val) => ("" + val).split(",").map((i) => i.trim()),
1264
- $nin: (val) => ("" + val).split(",").map((i) => i.trim()),
1265
- $exists: import_helpers3.yes,
1266
- $nexists: () => false
1263
+ [DEVICE_FILTERING_OPTIONS.$gt.key]: (val) => Number(val) || val,
1264
+ [DEVICE_FILTERING_OPTIONS.$gte.key]: (val) => Number(val) || val,
1265
+ [DEVICE_FILTERING_OPTIONS.$lt.key]: (val) => Number(val) || val,
1266
+ [DEVICE_FILTERING_OPTIONS.$lte.key]: (val) => Number(val) || val,
1267
+ [DEVICE_FILTERING_OPTIONS.$ltne.key]: (val) => Number(val) || val,
1268
+ [DEVICE_FILTERING_OPTIONS.$in.key]: (val) => ("" + val).split(",").map((i) => i.trim()),
1269
+ [DEVICE_FILTERING_OPTIONS.$nin.key]: (val) => ("" + val).split(",").map((i) => i.trim()),
1270
+ [DEVICE_FILTERING_OPTIONS.$exists.key]: import_helpers3.yes,
1271
+ [DEVICE_FILTERING_OPTIONS.$nexists.key]: () => false
1267
1272
  };
1268
1273
  var filterAliases = {
1269
1274
  $nexists: { alias: DEVICE_FILTERING_OPTIONS.$exists.key, value: false }
@@ -1387,8 +1392,13 @@ var getTooltipsById = (state) => state.users.tooltips.byId;
1387
1392
  var getGlobalSettings = (state) => state.users.globalSettings;
1388
1393
  var getCurrentUserId = (state) => state.users.currentUser;
1389
1394
  var getUsersById = (state) => state.users.byId;
1395
+ var getUsersList = (0, import_toolkit6.createSelector)([getUsersById], (usersById) => Object.values(usersById));
1390
1396
  var getCurrentUser = (0, import_toolkit6.createSelector)([getUsersById, getCurrentUserId], (usersById, userId) => usersById[userId] ?? {});
1391
1397
  var getUserSettings = (state) => state.users.userSettings;
1398
+ var getSelectedDeviceAttribute = (0, import_toolkit6.createSelector)(
1399
+ [getUserSettings],
1400
+ ({ columnSelection }) => columnSelection.map((attribute) => ({ attribute: attribute.key, scope: attribute.scope }))
1401
+ );
1392
1402
  var getIsDarkMode = (0, import_toolkit6.createSelector)([getUserSettings], ({ mode }) => isDarkMode(mode));
1393
1403
  var getShowHelptips = (0, import_toolkit6.createSelector)(
1394
1404
  [getTooltipsById],
@@ -1413,7 +1423,7 @@ var getOfflineThresholdSettings = (0, import_toolkit6.createSelector)([getGlobal
1413
1423
  interval: offlineThreshold?.interval || DEVICE_ONLINE_CUTOFF.interval,
1414
1424
  intervalUnit: offlineThreshold?.intervalUnit || DEVICE_ONLINE_CUTOFF.intervalName
1415
1425
  }));
1416
- var getRolesList = (0, import_toolkit6.createSelector)([getRolesById], (rolesById2) => Object.entries(rolesById2).map(([id, role]) => ({ id, ...role })));
1426
+ var getRolesList = (0, import_toolkit6.createSelector)([getRolesById], (rolesById2) => Object.entries(rolesById2).map(([value, role]) => ({ value, ...role })));
1417
1427
 
1418
1428
  // src/commonSelectors.ts
1419
1429
  var getIsEnterprise = (0, import_toolkit7.createSelector)(
@@ -1474,12 +1484,18 @@ var getUserCapabilities = (0, import_toolkit7.createSelector)([getUserRoles, get
1474
1484
  });
1475
1485
  var getTenantCapabilities = (0, import_toolkit7.createSelector)(
1476
1486
  [getFeatures, getOrganization, getIsEnterprise],
1477
- ({ hasAuditlogs: isAuditlogEnabled, hasDeviceConfig: isDeviceConfigEnabled, hasDeviceConnect: isDeviceConnectEnabled, hasMonitor: isMonitorEnabled }, { addons = [], plan = PLANS.os.id }, isEnterprise) => {
1487
+ ({
1488
+ hasAuditlogs: isAuditlogEnabled,
1489
+ hasDeviceConfig: isDeviceConfigEnabled,
1490
+ hasDeviceConnect: isDeviceConnectEnabled,
1491
+ hasMonitor: isMonitorEnabled,
1492
+ isHosted
1493
+ }, { addons = [], plan = PLANS.os.id }, isEnterprise) => {
1478
1494
  const canDelta = isEnterprise || plan === PLANS.professional.id;
1479
1495
  const hasAuditlogs = isAuditlogEnabled && isEnterprise;
1480
- const hasDeviceConfig = isDeviceConfigEnabled && addons.some((addon) => addon.name === "configure" && Boolean(addon.enabled));
1481
- const hasDeviceConnect = isDeviceConnectEnabled && (!isEnterprise || addons.some((addon) => addon.name === "troubleshoot" && Boolean(addon.enabled)));
1482
- const hasMonitor = isMonitorEnabled && addons.some((addon) => addon.name === "monitor" && Boolean(addon.enabled));
1496
+ const hasDeviceConfig = addons.some((addon) => addon.name === ADDONS.configure.id && addon.enabled) || isDeviceConfigEnabled && !isHosted;
1497
+ const hasDeviceConnect = addons.some((addon) => addon.name === ADDONS.troubleshoot.id && addon.enabled) || isDeviceConnectEnabled && !isHosted;
1498
+ const hasMonitor = isMonitorEnabled && addons.some((addon) => addon.name === ADDONS.monitor.id && addon.enabled);
1483
1499
  return {
1484
1500
  canDelta,
1485
1501
  canRetry: canDelta,
@@ -1609,7 +1625,7 @@ var getAuditlogDevice = (0, import_toolkit7.createSelector)([getAuditLogEntry, g
1609
1625
  var getRelevantRoles = (0, import_toolkit7.createSelector)([getOrganization, getRolesList], ({ service_provider }, roles) => {
1610
1626
  if (service_provider) {
1611
1627
  return roles.reduce((accu, role) => {
1612
- if (rolesById[role.id]) {
1628
+ if (rolesById[role.value]) {
1613
1629
  return accu;
1614
1630
  }
1615
1631
  accu.push(role);
@@ -1617,7 +1633,7 @@ var getRelevantRoles = (0, import_toolkit7.createSelector)([getOrganization, get
1617
1633
  }, Object.values(serviceProviderRolesById));
1618
1634
  }
1619
1635
  return Object.keys(rolesById).reverse().reduce((accu, key) => {
1620
- const index = accu.findIndex(({ id }) => id === key);
1636
+ const index = accu.findIndex(({ value }) => value === key);
1621
1637
  accu = [accu[index], ...accu.filter((item, itemIndex) => index !== itemIndex)];
1622
1638
  return accu;
1623
1639
  }, roles);
@@ -2685,13 +2701,12 @@ var actions_default = {
2685
2701
  };
2686
2702
 
2687
2703
  // src/store.ts
2704
+ var import_react_redux = require("react-redux");
2688
2705
  var import_helpers7 = require("@northern.tech/utils/helpers");
2689
2706
  var import_toolkit17 = require("@reduxjs/toolkit");
2690
2707
  var { setSnackbar, uploadProgress } = actions_default;
2691
2708
  var keys = ["sessionDeploymentChecker", settingsKeys.initialized];
2692
- var resetEnvironment = () => {
2693
- keys.map((key) => window.sessionStorage.removeItem(key));
2694
- };
2709
+ var resetEnvironment = () => keys.forEach((key) => window.sessionStorage.removeItem(key));
2695
2710
  resetEnvironment();
2696
2711
  var commonErrorFallback = "Please check your connection.";
2697
2712
  var commonErrorHandler = (err, errorContext, dispatch, fallback, mightBeAuthRelated = false) => {
@@ -2717,6 +2732,14 @@ var sessionReducer = (state, action) => {
2717
2732
  }
2718
2733
  return rootReducer(state, action);
2719
2734
  };
2735
+ var rejectionLoggerMiddleware = () => (next) => (action) => {
2736
+ if (action.type.endsWith("/rejected")) {
2737
+ const { error } = action;
2738
+ console.error("Rejection in action:", action);
2739
+ console.error(error.stack);
2740
+ }
2741
+ return next(action);
2742
+ };
2720
2743
  var getConfiguredStore = (options = {}) => {
2721
2744
  const { preloadedState = {}, ...config } = options;
2722
2745
  return (0, import_toolkit17.configureStore)({
@@ -2732,15 +2755,17 @@ var getConfiguredStore = (options = {}) => {
2732
2755
  ignoredActionPaths: ["uploads", "snackbar", /payload\..*$/],
2733
2756
  ignoredPaths: ["app.uploadsById", "app.snackbar", "organization.externalDeviceIntegrations"]
2734
2757
  }
2735
- })
2758
+ }).concat(rejectionLoggerMiddleware)
2736
2759
  });
2737
2760
  };
2738
2761
  var store = getConfiguredStore({
2739
2762
  preloadedState: {}
2740
2763
  });
2764
+ var useAppDispatch = import_react_redux.useDispatch;
2741
2765
 
2742
2766
  // src/deploymentsSlice/thunks.ts
2743
2767
  var import_helpers8 = require("@northern.tech/utils/helpers");
2768
+ var import_tracking = __toESM(require("@northern.tech/utils/tracking"), 1);
2744
2769
  var import_toolkit18 = require("@reduxjs/toolkit");
2745
2770
  var import_validator = require("validator");
2746
2771
  var { receivedDevice, setSnackbar: setSnackbar2 } = actions_default;
@@ -2797,6 +2822,26 @@ var getDeploymentsByStatus2 = (0, import_toolkit18.createAsyncThunk)(`${sliceNam
2797
2822
  return Promise.all(tasks);
2798
2823
  });
2799
2824
  });
2825
+ var isWithinFirstMonth = (expirationDate) => {
2826
+ if (!expirationDate) {
2827
+ return false;
2828
+ }
2829
+ const endOfFirstMonth = new Date(expirationDate);
2830
+ endOfFirstMonth.setMonth(endOfFirstMonth.getMonth() - 11);
2831
+ return endOfFirstMonth > /* @__PURE__ */ new Date();
2832
+ };
2833
+ var trackDeploymentCreation = (totalDeploymentCount, hasDeployments, trial_expiration) => {
2834
+ import_tracking.default.event({ category: "deployments", action: "create" });
2835
+ if (!totalDeploymentCount) {
2836
+ if (!hasDeployments) {
2837
+ import_tracking.default.event({ category: "deployments", action: "create_initial_deployment" });
2838
+ if (isWithinFirstMonth(trial_expiration)) {
2839
+ import_tracking.default.event({ category: "deployments", action: "create_initial_deployment_first_month" });
2840
+ }
2841
+ }
2842
+ import_tracking.default.event({ category: "deployments", action: "create_initial_deployment_user" });
2843
+ }
2844
+ };
2800
2845
  var MAX_PREVIOUS_PHASES_COUNT = 5;
2801
2846
  var createDeployment = (0, import_toolkit18.createAsyncThunk)(`${sliceName2}/createDeployment`, ({ newDeployment, hasNewRetryDefault = false }, { dispatch, getState }) => {
2802
2847
  let request;
@@ -2807,6 +2852,9 @@ var createDeployment = (0, import_toolkit18.createAsyncThunk)(`${sliceName2}/cre
2807
2852
  } else {
2808
2853
  request = general_api_default.post(`${deploymentsApiUrl}/deployments`, newDeployment);
2809
2854
  }
2855
+ const totalDeploymentCount = Object.values(getDeploymentsByStatus(getState())).reduce((accu, item) => accu + item.total, 0);
2856
+ const { hasDeployments } = getGlobalSettings(getState());
2857
+ const { trial_expiration } = getOrganization(getState());
2810
2858
  return request.catch((err) => commonErrorHandler(err, "Error creating deployment.", dispatch)).then((data) => {
2811
2859
  const lastslashindex = data.headers.location.lastIndexOf("/");
2812
2860
  const deploymentId = data.headers.location.substring(lastslashindex + 1);
@@ -2821,6 +2869,7 @@ var createDeployment = (0, import_toolkit18.createAsyncThunk)(`${sliceName2}/cre
2821
2869
  dispatch(getSingleDeployment(deploymentId)),
2822
2870
  dispatch(setSnackbar2("Deployment created successfully", TIMEOUTS.fiveSeconds))
2823
2871
  ];
2872
+ trackDeploymentCreation(totalDeploymentCount, hasDeployments, trial_expiration);
2824
2873
  const { canManageUsers } = getUserCapabilities(getState());
2825
2874
  if (canManageUsers) {
2826
2875
  const { phases, retries } = newDeployment;
@@ -3495,7 +3544,7 @@ var getDevicesByStatus2 = (0, import_toolkit19.createAsyncThunk)(`${sliceName3}/
3495
3544
  page = defaultPage2,
3496
3545
  perPage = defaultPerPage2,
3497
3546
  sortOptions = [],
3498
- selectedAttributes = []
3547
+ selectedAttributes = getSelectedDeviceAttribute(getState())
3499
3548
  } = options;
3500
3549
  const state = getState();
3501
3550
  const { applicableFilters, filterTerms } = convertDeviceListStateToFilters({
@@ -3608,7 +3657,6 @@ var getReportingLimits = (0, import_toolkit19.createAsyncThunk)(
3608
3657
  })
3609
3658
  );
3610
3659
  var ensureVersionString = (software, fallback) => software.length && software !== "artifact_name" ? software.endsWith(".version") ? software : `${software}.version` : fallback;
3611
- var REPORT_CHART_SIZE_LIMIT = 6;
3612
3660
  var getSingleReportData = (reportConfig, groups) => {
3613
3661
  const { attribute, group, software = "" } = reportConfig;
3614
3662
  const filters = [{ key: "status", scope: "identity", operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: "accepted" }];
@@ -3688,6 +3736,13 @@ var getDeviceConnect = (0, import_toolkit19.createAsyncThunk)(
3688
3736
  ({ data }) => Promise.all([dispatch(actions3.receivedDevice({ connect_status: data.status, connect_updated_ts: data.updated_ts, id })), Promise.resolve(data)])
3689
3737
  )
3690
3738
  );
3739
+ var updateTypeMap = { deploymentUpdate: "check-update", inventoryUpdate: "send-inventory" };
3740
+ var triggerDeviceUpdate = (0, import_toolkit19.createAsyncThunk)(
3741
+ `${sliceName3}/triggerDeviceUpdate`,
3742
+ ({ id, type }, { dispatch }) => general_api_default.post(`${deviceConnect}/devices/${id}/${updateTypeMap[type] ?? updateTypeMap.deploymentUpdate}`).then(
3743
+ () => new Promise((resolve) => setTimeout(() => resolve(dispatch(getDeviceById2(id))), TIMEOUTS.threeSeconds))
3744
+ )
3745
+ );
3691
3746
  var getSessionDetails = (0, import_toolkit19.createAsyncThunk)(`${sliceName3}/getSessionDetails`, ({ sessionId, deviceId, userId, startDate, endDate }) => {
3692
3747
  const { start: startUnix, end: endUnix } = (0, import_helpers9.dateRangeToUnix)(startDate, endDate);
3693
3748
  const createdAfter = startDate ? `&created_after=${startUnix}` : "";
@@ -3790,12 +3845,12 @@ var deleteAuthset = (0, import_toolkit19.createAsyncThunk)(
3790
3845
  );
3791
3846
  var preauthDevice = (0, import_toolkit19.createAsyncThunk)(
3792
3847
  `${sliceName3}/preauthDevice`,
3793
- (authset, { dispatch }) => general_api_default.post(`${deviceAuthV2}/devices`, authset).catch((err) => {
3848
+ (authset, { dispatch, rejectWithValue }) => general_api_default.post(`${deviceAuthV2}/devices`, authset).then(() => Promise.resolve(dispatch(setSnackbar3("Device was successfully added to the preauthorization list", TIMEOUTS.fiveSeconds)))).catch((err) => {
3794
3849
  if (err.response.status === 409) {
3795
- return Promise.reject("A device with a matching identity data set already exists");
3850
+ return rejectWithValue("A device with a matching identity data set already exists");
3796
3851
  }
3797
3852
  return commonErrorHandler(err, "The device could not be added:", dispatch);
3798
- }).then(() => Promise.resolve(dispatch(setSnackbar3("Device was successfully added to the preauthorization list", TIMEOUTS.fiveSeconds))))
3853
+ })
3799
3854
  );
3800
3855
  var decommissionDevice = (0, import_toolkit19.createAsyncThunk)(
3801
3856
  `${sliceName3}/decommissionDevice`,
@@ -4022,6 +4077,9 @@ var changeNotificationSetting = (0, import_toolkit20.createAsyncThunk)(
4022
4077
  }
4023
4078
  );
4024
4079
 
4080
+ // src/usersSlice/thunks.ts
4081
+ var import_helptips = require("@northern.tech/common-ui/helptips");
4082
+
4025
4083
  // src/api/users-api.ts
4026
4084
  var import_axios3 = __toESM(require("axios"), 1);
4027
4085
  var Api2 = {
@@ -4055,7 +4113,7 @@ var handleLoginError = (err, { token2fa: has2FA, password }, rejectWithValue) =>
4055
4113
  }
4056
4114
  const twoFAError = is2FABackend ? " and verification code" : "";
4057
4115
  const errorMessage = `There was a problem logging in. Please check your email${twoFAError ? "," : " and"} password${twoFAError}. If you still have problems, contact an administrator.`;
4058
- return Promise.reject(dispatch(setSnackbar4((0, import_helpers10.preformatWithRequestID)(err.response, errorMessage), null, "Copy to clipboard")));
4116
+ return Promise.reject(dispatch(setSnackbar4({ message: (0, import_helpers10.preformatWithRequestID)(err.response, errorMessage), action: "Copy to clipboard" })));
4059
4117
  };
4060
4118
  var loginUser = (0, import_toolkit21.createAsyncThunk)(
4061
4119
  `${sliceName8}/loginUser`,
@@ -4079,19 +4137,16 @@ var loginUser = (0, import_toolkit21.createAsyncThunk)(
4079
4137
  const expiresAt = stayLoggedIn ? void 0 : now.toISOString();
4080
4138
  setSessionInfo({ token, expiresAt });
4081
4139
  cookies3.remove("JWT", { path: "/" });
4082
- return (
4083
- // @ts-ignore
4084
- Promise.resolve(dispatch(getUser(OWN_USER_ID))).unwrap().catch((e) => {
4085
- cleanUp();
4086
- return Promise.reject(dispatch(setSnackbar4((0, import_helpers10.extractErrorMessage)(e))));
4087
- }).then(() => {
4088
- window.sessionStorage.removeItem("pendings-redirect");
4089
- if (window.location.pathname !== "/ui/") {
4090
- window.location.replace("/ui/");
4091
- }
4092
- return Promise.resolve(dispatch(actions8.successfullyLoggedIn({ expiresAt, token })));
4093
- })
4094
- );
4140
+ return dispatch(getUser(OWN_USER_ID)).unwrap().catch((e) => {
4141
+ cleanUp();
4142
+ return Promise.reject(dispatch(setSnackbar4((0, import_helpers10.extractErrorMessage)(e))));
4143
+ }).then(() => {
4144
+ window.sessionStorage.removeItem("pendings-redirect");
4145
+ if (window.location.pathname !== "/ui/") {
4146
+ window.location.replace("/ui/");
4147
+ }
4148
+ return Promise.resolve(dispatch(actions8.successfullyLoggedIn({ expiresAt, token })));
4149
+ });
4095
4150
  })
4096
4151
  );
4097
4152
  var logoutUser = (0, import_toolkit21.createAsyncThunk)(`${sliceName8}/logoutUser`, (_, { dispatch, getState }) => {
@@ -4109,6 +4164,7 @@ var switchUserOrganization = (0, import_toolkit21.createAsyncThunk)(`${sliceName
4109
4164
  return Promise.reject();
4110
4165
  }
4111
4166
  return general_api_default.get(`${useradmApiUrlv1}/users/tenants/${tenantId}/token`).then(({ data: token }) => {
4167
+ window.sessionStorage.setItem("tenantChanged", "true");
4112
4168
  setSessionInfo({ ...getSessionInfo(), token });
4113
4169
  window.location.reload();
4114
4170
  });
@@ -4149,11 +4205,18 @@ var verify2FA = (0, import_toolkit21.createAsyncThunk)(
4149
4205
  );
4150
4206
  var getUserList = (0, import_toolkit21.createAsyncThunk)(
4151
4207
  `${sliceName8}/getUserList`,
4152
- (_, { dispatch }) => general_api_default.get(`${useradmApiUrlv1}/users`).then((res) => {
4153
- const users = res.data.reduce((accu, item) => {
4154
- accu[item.id] = item;
4155
- return accu;
4156
- }, {});
4208
+ (_, { dispatch, getState }) => general_api_default.get(`${useradmApiUrlv1}/users`).then((res) => {
4209
+ const currentUsersById = getUsersById(getState());
4210
+ const users = res.data.reduce(
4211
+ (accu, item) => {
4212
+ accu[item.id] = {
4213
+ ...accu[item.id],
4214
+ ...item
4215
+ };
4216
+ return accu;
4217
+ },
4218
+ { ...currentUsersById }
4219
+ );
4157
4220
  return dispatch(actions8.receivedUserList(users));
4158
4221
  }).catch((err) => commonErrorHandler(err, `Users couldn't be loaded.`, dispatch, commonErrorFallback))
4159
4222
  );
@@ -4162,9 +4225,7 @@ var getUser = (0, import_toolkit21.createAsyncThunk)(
4162
4225
  (id, { dispatch, rejectWithValue }) => general_api_default.get(`${useradmApiUrlv1}/users/${id}`).then(
4163
4226
  ({ data: user }) => Promise.all([
4164
4227
  dispatch(actions8.receivedUser(user)),
4165
- // @ts-ignore
4166
4228
  dispatch(setHideAnnouncement({ shouldHide: false, userId: user.id })),
4167
- // @ts-ignore
4168
4229
  dispatch(updateUserColumnSettings({ currentUserId: user.id })),
4169
4230
  user
4170
4231
  ])
@@ -4211,10 +4272,7 @@ var createUser = (0, import_toolkit21.createAsyncThunk)(
4211
4272
  );
4212
4273
  var removeUser = (0, import_toolkit21.createAsyncThunk)(
4213
4274
  `${sliceName8}/removeUser`,
4214
- (userId, { dispatch }) => (
4215
- // @ts-ignore
4216
- general_api_default.delete(`${useradmApiUrlv1}/users/${userId}`).then(() => Promise.all([dispatch(actions8.removedUser(userId)), dispatch(getUserList()), dispatch(setSnackbar4(userActions.remove.successMessage))])).catch((err) => userActionErrorHandler(err, "remove", dispatch))
4217
- )
4275
+ (userId, { dispatch }) => general_api_default.delete(`${useradmApiUrlv1}/users/${userId}`).then(() => Promise.all([dispatch(actions8.removedUser(userId)), dispatch(getUserList()), dispatch(setSnackbar4(userActions.remove.successMessage))])).catch((err) => userActionErrorHandler(err, "remove", dispatch))
4218
4276
  );
4219
4277
  var editUser = (0, import_toolkit21.createAsyncThunk)(
4220
4278
  `${sliceName8}/editUser`,
@@ -4235,7 +4293,7 @@ var enableUser2fa = (0, import_toolkit21.createAsyncThunk)(
4235
4293
  );
4236
4294
  var disableUser2fa = (0, import_toolkit21.createAsyncThunk)(
4237
4295
  `${sliceName8}/disableUser2fa`,
4238
- (userId = OWN_USER_ID, { dispatch }) => general_api_default.post(`${useradmApiUrlv1}/users/${userId}/2fa/disable`).catch((err) => commonErrorHandler(err, `There was an error disabling Two Factor authentication for the user.`, dispatch)).then(() => Promise.resolve(dispatch(getUser(userId))))
4296
+ (userId = OWN_USER_ID, { dispatch }) => general_api_default.post(`${useradmApiUrlv1}/users/${userId}/2fa/disable`).catch((err) => commonErrorHandler(err, `There was an error disabling Two Factor authentication for the user.`, dispatch)).then(() => Promise.all([dispatch(getUser(userId)), dispatch(actions8.receivedQrCode(null))]))
4239
4297
  );
4240
4298
  var mapHttpPermission = (permission) => Object.entries(uiPermissionsByArea).reduce(
4241
4299
  (accu, [area, definition]) => {
@@ -4388,7 +4446,6 @@ var getPermissionSets = (0, import_toolkit21.createAsyncThunk)(
4388
4446
  accu[permissionSet.name] = permissionSetObject;
4389
4447
  return accu;
4390
4448
  },
4391
- // @ts-ignore
4392
4449
  { ...getState().users.permissionSetsById }
4393
4450
  );
4394
4451
  return Promise.all([dispatch(actions8.receivedPermissionSets(permissionSets)), permissionSets]);
@@ -4481,7 +4538,6 @@ var transformRoleDataToRole = (roleData, roleState = {}) => {
4481
4538
  role: {
4482
4539
  ...emptyRole,
4483
4540
  name,
4484
- // @ts-ignore
4485
4541
  description: description ? description : roleState.description,
4486
4542
  uiPermissions: {
4487
4543
  ...emptyUiPermissions,
@@ -4524,10 +4580,7 @@ var editRole = (0, import_toolkit21.createAsyncThunk)(`${sliceName8}/editRole`,
4524
4580
  });
4525
4581
  var removeRole = (0, import_toolkit21.createAsyncThunk)(
4526
4582
  `${sliceName8}/removeRole`,
4527
- (roleId, { dispatch }) => (
4528
- // @ts-ignore
4529
- general_api_default.delete(`${useradmApiUrlv2}/roles/${roleId}`).then(() => Promise.all([dispatch(actions8.removedRole(roleId)), dispatch(getRoles()), dispatch(setSnackbar4(roleActions.remove.successMessage))])).catch((err) => roleActionErrorHandler(err, "remove", dispatch))
4530
- )
4583
+ (roleId, { dispatch }) => general_api_default.delete(`${useradmApiUrlv2}/roles/${roleId}`).then(() => Promise.all([dispatch(actions8.removedRole(roleId)), dispatch(getRoles()), dispatch(setSnackbar4(roleActions.remove.successMessage))])).catch((err) => roleActionErrorHandler(err, "remove", dispatch))
4531
4584
  );
4532
4585
  var getGlobalSettings2 = (0, import_toolkit21.createAsyncThunk)(
4533
4586
  `${sliceName8}/getGlobalSettings`,
@@ -4538,7 +4591,6 @@ var getGlobalSettings2 = (0, import_toolkit21.createAsyncThunk)(
4538
4591
  );
4539
4592
  var saveGlobalSettings = (0, import_toolkit21.createAsyncThunk)(
4540
4593
  `${sliceName8}/saveGlobalSettings`,
4541
- // @ts-ignore
4542
4594
  ({ beOptimistic = false, notify = false, ...settings }, { dispatch, getState }) => {
4543
4595
  if (!window.sessionStorage.getItem(settingsKeys.initialized) && !beOptimistic) {
4544
4596
  return;
@@ -4584,11 +4636,9 @@ var saveUserSettings = (0, import_toolkit21.createAsyncThunk)(`${sliceName8}/sav
4584
4636
  const tooltipState = getTooltipsState(getState());
4585
4637
  const updatedSettings = {
4586
4638
  ...userSettings,
4587
- // @ts-ignore
4588
4639
  ...settings,
4589
4640
  onboarding: {
4590
4641
  ...onboardingState,
4591
- // @ts-ignore
4592
4642
  ...settings.onboarding
4593
4643
  },
4594
4644
  tooltips: tooltipState
@@ -4632,10 +4682,7 @@ var generateToken = (0, import_toolkit21.createAsyncThunk)(
4632
4682
  );
4633
4683
  var revokeToken = (0, import_toolkit21.createAsyncThunk)(
4634
4684
  `${sliceName8}/revokeToken`,
4635
- (token, { dispatch }) => (
4636
- // @ts-ignore
4637
- general_api_default.delete(`${useradmApiUrlv1}/settings/tokens/${token.id}`).then(() => Promise.resolve(dispatch(getTokens())))
4638
- )
4685
+ (token, { dispatch }) => general_api_default.delete(`${useradmApiUrlv1}/settings/tokens/${token.id}`).then(() => Promise.resolve(dispatch(getTokens())))
4639
4686
  );
4640
4687
  var setTooltipReadState = (0, import_toolkit21.createAsyncThunk)(`${sliceName8}/setTooltipReadState`, ({ persist, ...remainder }, { dispatch }) => {
4641
4688
  let tasks = [dispatch(actions8.setTooltipState(remainder))];
@@ -4644,31 +4691,28 @@ var setTooltipReadState = (0, import_toolkit21.createAsyncThunk)(`${sliceName8}/
4644
4691
  }
4645
4692
  return Promise.all(tasks);
4646
4693
  });
4647
- var setAllTooltipsReadState = (0, import_toolkit21.createAsyncThunk)(`${sliceName8}/toggleHelptips`, ({ readState = READ_STATES.read, tooltips }, { dispatch }) => {
4648
- const updatedTips = tooltips.reduce((accu, id) => ({ ...accu, [id]: { readState } }), {});
4694
+ var setAllTooltipsReadState = (0, import_toolkit21.createAsyncThunk)(`${sliceName8}/toggleHelptips`, (readState = READ_STATES.read, { dispatch }) => {
4695
+ const updatedTips = Object.keys(import_helptips.HELPTOOLTIPS).reduce((accu, id) => ({ ...accu, [id]: { readState } }), {});
4649
4696
  return Promise.resolve(dispatch(actions8.setTooltipsState(updatedTips))).then(() => dispatch(saveUserSettings()));
4650
4697
  });
4651
4698
  var submitFeedback = (0, import_toolkit21.createAsyncThunk)(
4652
4699
  `${sliceName8}/submitFeedback`,
4653
- // @ts-ignore
4654
- ({ satisfaction, feedback, ...meta }, { dispatch }) => {
4655
- return general_api_default.post(`${tenantadmApiUrlv2}/contact/support`, {
4656
- subject: "feedback submission",
4657
- body: JSON.stringify({ feedback, satisfaction, meta })
4658
- }).then(() => {
4659
- const today = /* @__PURE__ */ new Date();
4660
- dispatch(saveUserSettings({ feedbackCollectedAt: today.toISOString().split("T")[0] }));
4661
- setTimeout(() => dispatch(actions8.setShowFeedbackDialog(false)), TIMEOUTS.threeSeconds);
4662
- });
4663
- }
4700
+ ({ satisfaction, feedback, ...meta }, { dispatch }) => general_api_default.post(`${tenantadmApiUrlv2}/contact/support`, {
4701
+ subject: "feedback submission",
4702
+ body: JSON.stringify({ feedback, satisfaction, meta })
4703
+ }).then(() => {
4704
+ const today = /* @__PURE__ */ new Date();
4705
+ dispatch(saveUserSettings({ feedbackCollectedAt: today.toISOString().split("T")[0] }));
4706
+ setTimeout(() => dispatch(actions8.setShowFeedbackDialog(false)), TIMEOUTS.threeSeconds);
4707
+ })
4664
4708
  );
4665
4709
 
4666
- // src/deploymentdevicehook.js
4710
+ // src/deploymentdevicehook.ts
4667
4711
  var import_validator2 = require("validator");
4668
4712
  var useDeploymentDevice = (deploymentName) => {
4669
4713
  const isLoading = (0, import_react.useRef)(false);
4670
- const dispatch = (0, import_react_redux.useDispatch)();
4671
- const devicesById = (0, import_react_redux.useSelector)(getDevicesById);
4714
+ const dispatch = useAppDispatch();
4715
+ const devicesById = (0, import_react_redux2.useSelector)(getDevicesById);
4672
4716
  const hasDeviceInfo = !!devicesById[deploymentName];
4673
4717
  (0, import_react.useEffect)(() => {
4674
4718
  if (isLoading.current) {