@northern.tech/store 0.3.3 → 0.4.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.
Files changed (602) hide show
  1. package/dist/actions.cjs +80 -833
  2. package/dist/actions.cjs.map +1 -1
  3. package/dist/actions.d.cts +229 -85
  4. package/dist/actions.d.ts +229 -85
  5. package/dist/actions.js +14 -14
  6. package/dist/api/general-api.cjs +274 -148
  7. package/dist/api/general-api.cjs.map +1 -1
  8. package/dist/api/general-api.d.cts +1 -1
  9. package/dist/api/general-api.d.ts +1 -1
  10. package/dist/api/general-api.js +7 -7
  11. package/dist/api/users-api.cjs +274 -148
  12. package/dist/api/users-api.cjs.map +1 -1
  13. package/dist/api/users-api.d.cts +7 -5
  14. package/dist/api/users-api.d.ts +7 -5
  15. package/dist/api/users-api.js +8 -8
  16. package/dist/appSlice/constants.cjs +23 -43
  17. package/dist/appSlice/constants.cjs.map +1 -1
  18. package/dist/appSlice/constants.d.cts +109 -119
  19. package/dist/appSlice/constants.d.ts +109 -119
  20. package/dist/appSlice/constants.js +1 -11
  21. package/dist/appSlice/index.cjs +25 -242
  22. package/dist/appSlice/index.cjs.map +1 -1
  23. package/dist/appSlice/index.d.cts +119 -1531
  24. package/dist/appSlice/index.d.ts +119 -1531
  25. package/dist/appSlice/index.js +6 -6
  26. package/dist/appSlice/mocks.cjs +186 -0
  27. package/dist/appSlice/mocks.cjs.map +1 -0
  28. package/dist/appSlice/mocks.d.cts +39 -0
  29. package/dist/appSlice/mocks.d.ts +39 -0
  30. package/dist/appSlice/mocks.js +27 -0
  31. package/dist/appSlice/mocks.js.map +1 -0
  32. package/dist/appSlice/selectors.cjs +31 -5
  33. package/dist/appSlice/selectors.cjs.map +1 -1
  34. package/dist/appSlice/selectors.d.cts +709 -23
  35. package/dist/appSlice/selectors.d.ts +709 -23
  36. package/dist/appSlice/selectors.js +21 -1
  37. package/dist/appSlice/thunks.cjs +1563 -1790
  38. package/dist/appSlice/thunks.cjs.map +1 -1
  39. package/dist/appSlice/thunks.d.cts +34 -14
  40. package/dist/appSlice/thunks.d.ts +34 -14
  41. package/dist/appSlice/thunks.js +30 -29
  42. package/dist/auth.cjs +276 -153
  43. package/dist/auth.cjs.map +1 -1
  44. package/dist/auth.d.cts +13 -10
  45. package/dist/auth.d.ts +13 -10
  46. package/dist/auth.js +6 -8
  47. package/dist/{chunk-CK6YE6AN.js → chunk-2DYA3X77.js} +3 -1
  48. package/dist/{chunk-CK6YE6AN.js.map → chunk-2DYA3X77.js.map} +1 -1
  49. package/dist/{chunk-2CYOM4BK.js → chunk-4TUJPE6G.js} +19 -4
  50. package/dist/chunk-4TUJPE6G.js.map +1 -0
  51. package/dist/{chunk-7PVGDMNM.js → chunk-6KGTHJKC.js} +23 -27
  52. package/dist/chunk-6KGTHJKC.js.map +1 -0
  53. package/dist/chunk-7C4SQBEE.js +715 -0
  54. package/dist/chunk-7C4SQBEE.js.map +1 -0
  55. package/dist/{chunk-QRGTG4YB.js → chunk-ABJLRDCO.js} +10 -11
  56. package/dist/chunk-ABJLRDCO.js.map +1 -0
  57. package/dist/{chunk-LEMVXAYP.js → chunk-CW5T6OGF.js} +56 -22
  58. package/dist/chunk-CW5T6OGF.js.map +1 -0
  59. package/dist/{chunk-MRCFLG45.js → chunk-FAJ3I2UQ.js} +2 -1
  60. package/dist/chunk-FAJ3I2UQ.js.map +1 -0
  61. package/dist/{chunk-DCK2DBOA.js → chunk-IQG5I7AM.js} +29 -39
  62. package/dist/chunk-IQG5I7AM.js.map +1 -0
  63. package/dist/chunk-JUGE7L3K.js +110 -0
  64. package/dist/chunk-JUGE7L3K.js.map +1 -0
  65. package/dist/{chunk-7JKWI5FK.js → chunk-JXQUFKID.js} +2 -2
  66. package/dist/chunk-JXQUFKID.js.map +1 -0
  67. package/dist/chunk-KC7SKI3U.js +389 -0
  68. package/dist/chunk-KC7SKI3U.js.map +1 -0
  69. package/dist/{chunk-YDS36ALB.js → chunk-KJNNEDRV.js} +11 -7
  70. package/dist/chunk-KJNNEDRV.js.map +1 -0
  71. package/dist/chunk-MBKAZVE3.js +44 -0
  72. package/dist/chunk-MBKAZVE3.js.map +1 -0
  73. package/dist/{chunk-TI2RL5P2.js → chunk-MZNANSS2.js} +12 -7
  74. package/dist/chunk-MZNANSS2.js.map +1 -0
  75. package/dist/{chunk-LTKOV26W.js → chunk-N2KLYPS5.js} +138 -95
  76. package/dist/chunk-N2KLYPS5.js.map +1 -0
  77. package/dist/{chunk-UWMYZNUB.js → chunk-OHF3YUXX.js} +25 -40
  78. package/dist/chunk-OHF3YUXX.js.map +1 -0
  79. package/dist/{chunk-CYV6632F.js → chunk-OOICURFL.js} +2 -2
  80. package/dist/chunk-OOICURFL.js.map +1 -0
  81. package/dist/{chunk-VMNMD6KF.js → chunk-PGFVHKP5.js} +5 -7
  82. package/dist/chunk-PGFVHKP5.js.map +1 -0
  83. package/dist/{chunk-JAROCU6M.js → chunk-QHK7GGV4.js} +3 -3
  84. package/dist/chunk-QHK7GGV4.js.map +1 -0
  85. package/dist/{chunk-YT73QWCN.js → chunk-RS37Y2PQ.js} +3 -3
  86. package/dist/chunk-RS37Y2PQ.js.map +1 -0
  87. package/dist/{chunk-TUACATJA.js → chunk-UGSLGUS6.js} +8 -6
  88. package/dist/chunk-UGSLGUS6.js.map +1 -0
  89. package/dist/{chunk-DAPAXWA5.js → chunk-URNS6A5T.js} +14 -14
  90. package/dist/{chunk-FGKMJS3B.js → chunk-VANBSJS5.js} +2 -4
  91. package/dist/chunk-VANBSJS5.js.map +1 -0
  92. package/dist/{chunk-HPBE6KYY.js → chunk-VUFRP6P3.js} +5 -6
  93. package/dist/chunk-VUFRP6P3.js.map +1 -0
  94. package/dist/{chunk-X7IEZBM4.js → chunk-X4GUACQO.js} +8 -5
  95. package/dist/chunk-X4GUACQO.js.map +1 -0
  96. package/dist/{chunk-4XJMRVFI.js → chunk-XWYJACQC.js} +45 -22
  97. package/dist/chunk-XWYJACQC.js.map +1 -0
  98. package/dist/{chunk-AMGWP7A4.js → chunk-ZJW3QIPM.js} +8 -9
  99. package/dist/chunk-ZJW3QIPM.js.map +1 -0
  100. package/dist/chunk-ZKAH3APE.js +1 -0
  101. package/dist/chunk-ZKAH3APE.js.map +1 -0
  102. package/dist/{chunk-2JHFUQ6B.js → chunk-ZN5TB2NJ.js} +963 -883
  103. package/dist/chunk-ZN5TB2NJ.js.map +1 -0
  104. package/dist/{chunk-WXL7PVI5.js → chunk-ZRSYBSSY.js} +18 -12
  105. package/dist/chunk-ZRSYBSSY.js.map +1 -0
  106. package/dist/commonConstants.cjs +279 -173
  107. package/dist/commonConstants.cjs.map +1 -1
  108. package/dist/commonConstants.d.cts +46 -212
  109. package/dist/commonConstants.d.ts +46 -212
  110. package/dist/commonConstants.js +11 -19
  111. package/dist/commonSelectors.cjs +513 -778
  112. package/dist/commonSelectors.cjs.map +1 -1
  113. package/dist/commonSelectors.d.cts +4307 -279
  114. package/dist/commonSelectors.d.ts +4307 -279
  115. package/dist/commonSelectors.js +13 -13
  116. package/dist/constants.cjs +355 -655
  117. package/dist/constants.cjs.map +1 -1
  118. package/dist/constants.d.cts +11 -9
  119. package/dist/constants.d.ts +11 -9
  120. package/dist/constants.js +37 -29
  121. package/dist/deploymentsSlice/constants.cjs +5 -360
  122. package/dist/deploymentsSlice/constants.cjs.map +1 -1
  123. package/dist/deploymentsSlice/constants.d.cts +59 -39
  124. package/dist/deploymentsSlice/constants.d.ts +59 -39
  125. package/dist/deploymentsSlice/constants.js +5 -11
  126. package/dist/deploymentsSlice/index.cjs +17 -365
  127. package/dist/deploymentsSlice/index.cjs.map +1 -1
  128. package/dist/deploymentsSlice/index.d.cts +142 -2359
  129. package/dist/deploymentsSlice/index.d.ts +142 -2359
  130. package/dist/deploymentsSlice/index.js +6 -6
  131. package/dist/deploymentsSlice/mocks.cjs +429 -0
  132. package/dist/deploymentsSlice/mocks.cjs.map +1 -0
  133. package/dist/deploymentsSlice/mocks.d.cts +189 -0
  134. package/dist/deploymentsSlice/mocks.d.ts +189 -0
  135. package/dist/deploymentsSlice/mocks.js +146 -0
  136. package/dist/deploymentsSlice/mocks.js.map +1 -0
  137. package/dist/deploymentsSlice/selectors.cjs +5 -353
  138. package/dist/deploymentsSlice/selectors.cjs.map +1 -1
  139. package/dist/deploymentsSlice/selectors.d.cts +167 -11
  140. package/dist/deploymentsSlice/selectors.d.ts +167 -11
  141. package/dist/deploymentsSlice/selectors.js +6 -6
  142. package/dist/deploymentsSlice/thunks.cjs +1551 -1778
  143. package/dist/deploymentsSlice/thunks.cjs.map +1 -1
  144. package/dist/deploymentsSlice/thunks.d.cts +134 -76
  145. package/dist/deploymentsSlice/thunks.d.ts +134 -76
  146. package/dist/deploymentsSlice/thunks.js +30 -29
  147. package/dist/devicesSlice/constants.cjs +5 -375
  148. package/dist/devicesSlice/constants.cjs.map +1 -1
  149. package/dist/devicesSlice/constants.d.cts +8 -16
  150. package/dist/devicesSlice/constants.d.ts +8 -16
  151. package/dist/devicesSlice/constants.js +7 -25
  152. package/dist/devicesSlice/index.cjs +17 -381
  153. package/dist/devicesSlice/index.cjs.map +1 -1
  154. package/dist/devicesSlice/index.d.cts +196 -2208
  155. package/dist/devicesSlice/index.d.ts +196 -2208
  156. package/dist/devicesSlice/index.js +6 -6
  157. package/dist/devicesSlice/mocks.cjs +336 -0
  158. package/dist/devicesSlice/mocks.cjs.map +1 -0
  159. package/dist/devicesSlice/mocks.d.cts +154 -0
  160. package/dist/devicesSlice/mocks.d.ts +154 -0
  161. package/dist/devicesSlice/mocks.js +136 -0
  162. package/dist/devicesSlice/mocks.js.map +1 -0
  163. package/dist/devicesSlice/selectors.cjs +280 -293
  164. package/dist/devicesSlice/selectors.cjs.map +1 -1
  165. package/dist/devicesSlice/selectors.d.cts +1791 -82
  166. package/dist/devicesSlice/selectors.d.ts +1791 -82
  167. package/dist/devicesSlice/selectors.js +8 -6
  168. package/dist/devicesSlice/thunks.cjs +1699 -1936
  169. package/dist/devicesSlice/thunks.cjs.map +1 -1
  170. package/dist/devicesSlice/thunks.d.cts +374 -291
  171. package/dist/devicesSlice/thunks.d.ts +374 -291
  172. package/dist/devicesSlice/thunks.js +36 -45
  173. package/dist/liststatehook.cjs +935 -0
  174. package/dist/liststatehook.cjs.map +1 -0
  175. package/dist/liststatehook.d.cts +234 -0
  176. package/dist/liststatehook.d.ts +234 -0
  177. package/dist/liststatehook.js +88 -0
  178. package/dist/liststatehook.js.map +1 -0
  179. package/dist/locationutils.cjs +906 -0
  180. package/dist/locationutils.cjs.map +1 -0
  181. package/dist/locationutils.d.cts +114 -0
  182. package/dist/locationutils.d.ts +114 -0
  183. package/dist/locationutils.js +46 -0
  184. package/dist/locationutils.js.map +1 -0
  185. package/dist/monitorSlice/constants.cjs +0 -146
  186. package/dist/monitorSlice/constants.cjs.map +1 -1
  187. package/dist/monitorSlice/constants.d.cts +4 -5
  188. package/dist/monitorSlice/constants.d.ts +4 -5
  189. package/dist/monitorSlice/constants.js +1 -12
  190. package/dist/monitorSlice/index.cjs +5 -353
  191. package/dist/monitorSlice/index.cjs.map +1 -1
  192. package/dist/monitorSlice/index.d.cts +63 -260
  193. package/dist/monitorSlice/index.d.ts +63 -260
  194. package/dist/monitorSlice/index.js +6 -6
  195. package/dist/monitorSlice/mocks.cjs +130 -0
  196. package/dist/monitorSlice/mocks.cjs.map +1 -0
  197. package/dist/monitorSlice/mocks.d.cts +57 -0
  198. package/dist/monitorSlice/mocks.d.ts +57 -0
  199. package/dist/monitorSlice/mocks.js +65 -0
  200. package/dist/monitorSlice/mocks.js.map +1 -0
  201. package/dist/monitorSlice/thunks.cjs +633 -880
  202. package/dist/monitorSlice/thunks.cjs.map +1 -1
  203. package/dist/monitorSlice/thunks.d.cts +90 -21
  204. package/dist/monitorSlice/thunks.d.ts +90 -21
  205. package/dist/monitorSlice/thunks.js +26 -26
  206. package/dist/onboardingSlice/constants.cjs +1 -0
  207. package/dist/onboardingSlice/constants.cjs.map +1 -1
  208. package/dist/onboardingSlice/constants.d.cts +23 -20
  209. package/dist/onboardingSlice/constants.d.ts +23 -20
  210. package/dist/onboardingSlice/constants.js +1 -1
  211. package/dist/onboardingSlice/index.cjs +1 -3
  212. package/dist/onboardingSlice/index.cjs.map +1 -1
  213. package/dist/onboardingSlice/index.d.cts +50 -225
  214. package/dist/onboardingSlice/index.d.ts +50 -225
  215. package/dist/onboardingSlice/index.js +1 -1
  216. package/dist/onboardingSlice/mocks.cjs +83 -0
  217. package/dist/onboardingSlice/mocks.cjs.map +1 -0
  218. package/dist/onboardingSlice/mocks.d.cts +19 -0
  219. package/dist/onboardingSlice/mocks.d.ts +19 -0
  220. package/dist/onboardingSlice/mocks.js +17 -0
  221. package/dist/onboardingSlice/mocks.js.map +1 -0
  222. package/dist/onboardingSlice/thunks.cjs +1787 -2020
  223. package/dist/onboardingSlice/thunks.cjs.map +1 -1
  224. package/dist/onboardingSlice/thunks.d.cts +63 -36
  225. package/dist/onboardingSlice/thunks.d.ts +63 -36
  226. package/dist/onboardingSlice/thunks.js +30 -31
  227. package/dist/organizationSlice/constants.cjs +8 -748
  228. package/dist/organizationSlice/constants.cjs.map +1 -1
  229. package/dist/organizationSlice/constants.d.cts +36 -116
  230. package/dist/organizationSlice/constants.d.ts +36 -116
  231. package/dist/organizationSlice/constants.js +7 -17
  232. package/dist/organizationSlice/index.cjs +14 -368
  233. package/dist/organizationSlice/index.cjs.map +1 -1
  234. package/dist/organizationSlice/index.d.cts +45 -73
  235. package/dist/organizationSlice/index.d.ts +45 -73
  236. package/dist/organizationSlice/index.js +6 -6
  237. package/dist/organizationSlice/mocks.cjs +234 -0
  238. package/dist/organizationSlice/mocks.cjs.map +1 -0
  239. package/dist/organizationSlice/mocks.d.cts +107 -0
  240. package/dist/organizationSlice/mocks.d.ts +107 -0
  241. package/dist/organizationSlice/mocks.js +101 -0
  242. package/dist/organizationSlice/mocks.js.map +1 -0
  243. package/dist/organizationSlice/selectors.cjs +301 -146
  244. package/dist/organizationSlice/selectors.cjs.map +1 -1
  245. package/dist/organizationSlice/selectors.d.cts +888 -51
  246. package/dist/organizationSlice/selectors.d.ts +888 -51
  247. package/dist/organizationSlice/selectors.js +14 -6
  248. package/dist/organizationSlice/thunks.cjs +2616 -2759
  249. package/dist/organizationSlice/thunks.cjs.map +1 -1
  250. package/dist/organizationSlice/thunks.d.cts +322 -131
  251. package/dist/organizationSlice/thunks.d.ts +322 -131
  252. package/dist/organizationSlice/thunks.js +44 -29
  253. package/dist/organizationSlice/types.cjs.map +1 -1
  254. package/dist/organizationSlice/types.d.cts +62 -79
  255. package/dist/organizationSlice/types.d.ts +62 -79
  256. package/dist/releasesSlice/constants.cjs +3 -0
  257. package/dist/releasesSlice/constants.cjs.map +1 -1
  258. package/dist/releasesSlice/constants.d.cts +2 -1
  259. package/dist/releasesSlice/constants.d.ts +2 -1
  260. package/dist/releasesSlice/constants.js +3 -1
  261. package/dist/releasesSlice/index.cjs +5 -222
  262. package/dist/releasesSlice/index.cjs.map +1 -1
  263. package/dist/releasesSlice/index.d.cts +52 -473
  264. package/dist/releasesSlice/index.d.ts +52 -473
  265. package/dist/releasesSlice/index.js +6 -6
  266. package/dist/releasesSlice/mocks.cjs +177 -0
  267. package/dist/releasesSlice/mocks.cjs.map +1 -0
  268. package/dist/releasesSlice/mocks.d.cts +49 -0
  269. package/dist/releasesSlice/mocks.d.ts +49 -0
  270. package/dist/releasesSlice/mocks.js +61 -0
  271. package/dist/releasesSlice/mocks.js.map +1 -0
  272. package/dist/releasesSlice/selectors.cjs +293 -165
  273. package/dist/releasesSlice/selectors.cjs.map +1 -1
  274. package/dist/releasesSlice/selectors.d.cts +886 -24
  275. package/dist/releasesSlice/selectors.d.ts +886 -24
  276. package/dist/releasesSlice/selectors.js +9 -7
  277. package/dist/releasesSlice/thunks.cjs +827 -1017
  278. package/dist/releasesSlice/thunks.cjs.map +1 -1
  279. package/dist/releasesSlice/thunks.d.cts +150 -130
  280. package/dist/releasesSlice/thunks.d.ts +150 -130
  281. package/dist/releasesSlice/thunks.js +33 -26
  282. package/dist/selectors.cjs +565 -780
  283. package/dist/selectors.cjs.map +1 -1
  284. package/dist/selectors.d.cts +37 -8
  285. package/dist/selectors.d.ts +37 -8
  286. package/dist/selectors.js +54 -18
  287. package/dist/sockethook.cjs +519 -0
  288. package/dist/sockethook.cjs.map +1 -0
  289. package/dist/sockethook.d.cts +10 -0
  290. package/dist/sockethook.d.ts +10 -0
  291. package/dist/sockethook.js +139 -0
  292. package/dist/sockethook.js.map +1 -0
  293. package/dist/store.cjs +121 -840
  294. package/dist/store.cjs.map +1 -1
  295. package/dist/store.d.cts +697 -1961
  296. package/dist/store.d.ts +697 -1961
  297. package/dist/store.js +18 -16
  298. package/dist/storehooks.cjs +1854 -1968
  299. package/dist/storehooks.cjs.map +1 -1
  300. package/dist/storehooks.js +46 -63
  301. package/dist/storehooks.js.map +1 -1
  302. package/dist/thunks.cjs +2138 -2231
  303. package/dist/thunks.cjs.map +1 -1
  304. package/dist/thunks.d.cts +25 -7
  305. package/dist/thunks.d.ts +25 -7
  306. package/dist/thunks.js +54 -45
  307. package/dist/{deploymentdevicehook.cjs → useDeploymentDevice.cjs} +1797 -2026
  308. package/dist/useDeploymentDevice.cjs.map +1 -0
  309. package/dist/useDeploymentDevice.js +63 -0
  310. package/dist/useDeploymentDevice.js.map +1 -0
  311. package/dist/usersSlice/constants.cjs +5 -747
  312. package/dist/usersSlice/constants.cjs.map +1 -1
  313. package/dist/usersSlice/constants.d.cts +16 -774
  314. package/dist/usersSlice/constants.d.ts +16 -774
  315. package/dist/usersSlice/constants.js +7 -30
  316. package/dist/usersSlice/index.cjs +10 -721
  317. package/dist/usersSlice/index.cjs.map +1 -1
  318. package/dist/usersSlice/index.d.cts +136 -7900
  319. package/dist/usersSlice/index.d.ts +136 -7900
  320. package/dist/usersSlice/index.js +6 -6
  321. package/dist/usersSlice/mocks.cjs +200 -0
  322. package/dist/usersSlice/mocks.cjs.map +1 -0
  323. package/dist/usersSlice/mocks.d.cts +83 -0
  324. package/dist/usersSlice/mocks.d.ts +83 -0
  325. package/dist/usersSlice/mocks.js +47 -0
  326. package/dist/usersSlice/mocks.js.map +1 -0
  327. package/dist/usersSlice/selectors.cjs +319 -566
  328. package/dist/usersSlice/selectors.cjs.map +1 -1
  329. package/dist/usersSlice/selectors.d.cts +1651 -59
  330. package/dist/usersSlice/selectors.d.ts +1651 -59
  331. package/dist/usersSlice/selectors.js +13 -9
  332. package/dist/usersSlice/thunks.cjs +1666 -1893
  333. package/dist/usersSlice/thunks.cjs.map +1 -1
  334. package/dist/usersSlice/thunks.d.cts +362 -312
  335. package/dist/usersSlice/thunks.d.ts +362 -312
  336. package/dist/usersSlice/thunks.js +30 -29
  337. package/dist/utils.cjs +428 -292
  338. package/dist/utils.cjs.map +1 -1
  339. package/dist/utils.d.cts +44 -22
  340. package/dist/utils.d.ts +44 -22
  341. package/dist/utils.js +12 -6
  342. package/package.json +18 -8
  343. package/dist/api/types/AWSCredentials.ts +0 -16
  344. package/dist/api/types/Actor.ts +0 -35
  345. package/dist/api/types/Addon.ts +0 -17
  346. package/dist/api/types/AddonTenantadm.ts +0 -17
  347. package/dist/api/types/Address.ts +0 -6
  348. package/dist/api/types/AddressUpdate.ts +0 -12
  349. package/dist/api/types/Alert.ts +0 -34
  350. package/dist/api/types/AlertDetails.ts +0 -23
  351. package/dist/api/types/AlertSubject.ts +0 -23
  352. package/dist/api/types/ApiBurst.ts +0 -21
  353. package/dist/api/types/ApiBurstTenantadm.ts +0 -21
  354. package/dist/api/types/ApiLimits.ts +0 -16
  355. package/dist/api/types/ApiLimitsTenantadm.ts +0 -16
  356. package/dist/api/types/ApiQuota.ts +0 -17
  357. package/dist/api/types/ApiQuotaTenantadm.ts +0 -17
  358. package/dist/api/types/Artifact.ts +0 -48
  359. package/dist/api/types/ArtifactDeployments.ts +0 -48
  360. package/dist/api/types/ArtifactInfo.ts +0 -11
  361. package/dist/api/types/ArtifactInfoDeployments.ts +0 -11
  362. package/dist/api/types/ArtifactLink.ts +0 -11
  363. package/dist/api/types/ArtifactTypeInfo.ts +0 -13
  364. package/dist/api/types/ArtifactTypeInfoDeployments.ts +0 -13
  365. package/dist/api/types/ArtifactUpdate.ts +0 -10
  366. package/dist/api/types/ArtifactUploadLink.ts +0 -15
  367. package/dist/api/types/Attribute.ts +0 -36
  368. package/dist/api/types/AttributeInventory.ts +0 -32
  369. package/dist/api/types/AuditLog.ts +0 -26
  370. package/dist/api/types/AuthSet.ts +0 -37
  371. package/dist/api/types/AuthSetDeviceauth.ts +0 -37
  372. package/dist/api/types/AuthSetIot_manager.ts +0 -33
  373. package/dist/api/types/AutoAuthRequest.ts +0 -23
  374. package/dist/api/types/AzureSharedAccessSecret.ts +0 -11
  375. package/dist/api/types/BillingInfo.ts +0 -13
  376. package/dist/api/types/BillingProfile.ts +0 -37
  377. package/dist/api/types/BillingProfileUpdate.ts +0 -37
  378. package/dist/api/types/BinaryDeltaConfiguration.ts +0 -15
  379. package/dist/api/types/BinaryDeltaConfigurationDeployments.ts +0 -15
  380. package/dist/api/types/BinaryDeltaLimits.ts +0 -21
  381. package/dist/api/types/BinaryDeltaLimitsDeployments.ts +0 -15
  382. package/dist/api/types/BoundingBox.ts +0 -9
  383. package/dist/api/types/CancelRequest.ts +0 -10
  384. package/dist/api/types/CardData.ts +0 -49
  385. package/dist/api/types/CardSetupData.ts +0 -17
  386. package/dist/api/types/CheckoutData.ts +0 -13
  387. package/dist/api/types/Configuration.ts +0 -11
  388. package/dist/api/types/Count.ts +0 -13
  389. package/dist/api/types/Credentials.ts +0 -23
  390. package/dist/api/types/DBusSubsystem.ts +0 -27
  391. package/dist/api/types/DeltaConfiguration.ts +0 -14
  392. package/dist/api/types/DeltaConfigurationDeployments.ts +0 -14
  393. package/dist/api/types/Deployment.ts +0 -45
  394. package/dist/api/types/DeploymentAggregation.ts +0 -16
  395. package/dist/api/types/DeploymentAggregationItem.ts +0 -16
  396. package/dist/api/types/DeploymentAggregationTerm.ts +0 -22
  397. package/dist/api/types/DeploymentAggregationTerms.ts +0 -16
  398. package/dist/api/types/DeploymentAttributeProjection.ts +0 -10
  399. package/dist/api/types/DeploymentAuditlogs.ts +0 -11
  400. package/dist/api/types/DeploymentDeployments.ts +0 -98
  401. package/dist/api/types/DeploymentFilterTerm.ts +0 -35
  402. package/dist/api/types/DeploymentIdentifier.ts +0 -10
  403. package/dist/api/types/DeploymentPhase.ts +0 -23
  404. package/dist/api/types/DeploymentPhaseDeployments.ts +0 -23
  405. package/dist/api/types/DeploymentReporting.ts +0 -46
  406. package/dist/api/types/DeploymentSearchTerms.ts +0 -37
  407. package/dist/api/types/DeploymentSortTerm.ts +0 -23
  408. package/dist/api/types/DeploymentStatistics.ts +0 -15
  409. package/dist/api/types/DeploymentStatisticsDeployments.ts +0 -15
  410. package/dist/api/types/DeploymentStatusStatistics.ts +0 -54
  411. package/dist/api/types/DeploymentStatusStatisticsDeployments.ts +0 -54
  412. package/dist/api/types/Device.ts +0 -20
  413. package/dist/api/types/DeviceAggregation.ts +0 -16
  414. package/dist/api/types/DeviceAggregationItem.ts +0 -16
  415. package/dist/api/types/DeviceAggregationTerm.ts +0 -26
  416. package/dist/api/types/DeviceAggregationTerms.ts +0 -20
  417. package/dist/api/types/DeviceAttribute.ts +0 -22
  418. package/dist/api/types/DeviceAttributeProjection.ts +0 -14
  419. package/dist/api/types/DeviceAuditlogs.ts +0 -17
  420. package/dist/api/types/DeviceAuthEvent.ts +0 -23
  421. package/dist/api/types/DeviceConfiguration.ts +0 -16
  422. package/dist/api/types/DeviceDeployment.ts +0 -11
  423. package/dist/api/types/DeviceDeployments.ts +0 -29
  424. package/dist/api/types/DeviceDeviceauth.ts +0 -42
  425. package/dist/api/types/DeviceFilterAttribute.ts +0 -21
  426. package/dist/api/types/DeviceFilterTerm.ts +0 -39
  427. package/dist/api/types/DeviceInventory.ts +0 -19
  428. package/dist/api/types/DeviceInventoryInventory.ts +0 -19
  429. package/dist/api/types/DeviceReporting.ts +0 -22
  430. package/dist/api/types/DeviceSearchTerms.ts +0 -37
  431. package/dist/api/types/DeviceSortTerm.ts +0 -27
  432. package/dist/api/types/DeviceState.ts +0 -32
  433. package/dist/api/types/DeviceStateDeviceconnect.ts +0 -33
  434. package/dist/api/types/DeviceStateIot_manager.ts +0 -14
  435. package/dist/api/types/DeviceStatus.ts +0 -19
  436. package/dist/api/types/DeviceWithImage.ts +0 -80
  437. package/dist/api/types/DirectUploadMetadata.ts +0 -18
  438. package/dist/api/types/EmailVerificationCompletion.ts +0 -13
  439. package/dist/api/types/EmailVerificationRequest.ts +0 -13
  440. package/dist/api/types/Error.ts +0 -17
  441. package/dist/api/types/ErrorAuditlogs.ts +0 -13
  442. package/dist/api/types/ErrorDeployments.ts +0 -17
  443. package/dist/api/types/ErrorDeviceauth.ts +0 -13
  444. package/dist/api/types/ErrorDeviceconfig.ts +0 -17
  445. package/dist/api/types/ErrorDeviceconnect.ts +0 -17
  446. package/dist/api/types/ErrorDevicemonitor.ts +0 -17
  447. package/dist/api/types/ErrorExt.ts +0 -18
  448. package/dist/api/types/ErrorInventory.ts +0 -17
  449. package/dist/api/types/ErrorIot_manager.ts +0 -17
  450. package/dist/api/types/ErrorNotFound.ts +0 -17
  451. package/dist/api/types/ErrorReporting.ts +0 -18
  452. package/dist/api/types/ErrorTenantadm.ts +0 -13
  453. package/dist/api/types/ErrorUseradm.ts +0 -17
  454. package/dist/api/types/Event.ts +0 -48
  455. package/dist/api/types/ExternalIdentity.ts +0 -17
  456. package/dist/api/types/Features.ts +0 -17
  457. package/dist/api/types/FileUpload.ts +0 -23
  458. package/dist/api/types/Filter.ts +0 -19
  459. package/dist/api/types/FilterAttribute.ts +0 -21
  460. package/dist/api/types/FilterDefinition.ts +0 -18
  461. package/dist/api/types/FilterDeployments.ts +0 -19
  462. package/dist/api/types/FilterInventory.ts +0 -19
  463. package/dist/api/types/FilterPredicate.ts +0 -48
  464. package/dist/api/types/FilterPredicateDeployments.ts +0 -48
  465. package/dist/api/types/FilterPredicateInventory.ts +0 -78
  466. package/dist/api/types/GeoBoundingBox.ts +0 -8
  467. package/dist/api/types/GeoBoundingBoxFilter.ts +0 -5
  468. package/dist/api/types/GeoDistance.ts +0 -15
  469. package/dist/api/types/GeoDistanceFilter.ts +0 -8
  470. package/dist/api/types/GeoPoint.ts +0 -14
  471. package/dist/api/types/Group.ts +0 -10
  472. package/dist/api/types/HTTP.ts +0 -19
  473. package/dist/api/types/IdentityData.ts +0 -25
  474. package/dist/api/types/InputParameter.ts +0 -8
  475. package/dist/api/types/Integration.ts +0 -30
  476. package/dist/api/types/JobStatus.ts +0 -13
  477. package/dist/api/types/Limit.ts +0 -21
  478. package/dist/api/types/LimitDeployments.ts +0 -21
  479. package/dist/api/types/LimitDeviceauth.ts +0 -10
  480. package/dist/api/types/LimitUseradm.ts +0 -11
  481. package/dist/api/types/Limits.ts +0 -11
  482. package/dist/api/types/LineDescriptor.ts +0 -11
  483. package/dist/api/types/LogSubsystem.ts +0 -23
  484. package/dist/api/types/LoginOptions.ts +0 -18
  485. package/dist/api/types/ManagementAPIConfiguration.ts +0 -5
  486. package/dist/api/types/MenderTypes.ts +0 -213
  487. package/dist/api/types/MonitorConfiguration.ts +0 -22
  488. package/dist/api/types/NewConfigurationDeployment.ts +0 -15
  489. package/dist/api/types/NewConfigurationDeploymentResponse.ts +0 -10
  490. package/dist/api/types/NewDeployment.ts +0 -42
  491. package/dist/api/types/NewDeploymentForGroup.ts +0 -33
  492. package/dist/api/types/NewDeploymentPhase.ts +0 -37
  493. package/dist/api/types/NewDeploymentPhaseDeployments.ts +0 -20
  494. package/dist/api/types/NewDeploymentV2.ts +0 -34
  495. package/dist/api/types/NewTenant.ts +0 -49
  496. package/dist/api/types/Object.ts +0 -38
  497. package/dist/api/types/OwnUserUpdate.ts +0 -21
  498. package/dist/api/types/PasswordResetCompletion.ts +0 -17
  499. package/dist/api/types/PasswordResetRequest.ts +0 -13
  500. package/dist/api/types/Permission.ts +0 -21
  501. package/dist/api/types/PermissionObject.ts +0 -14
  502. package/dist/api/types/PermissionSet.ts +0 -22
  503. package/dist/api/types/PermissionSetWithScope.ts +0 -15
  504. package/dist/api/types/PersonalAccessToken.ts +0 -29
  505. package/dist/api/types/PersonalAccessTokenRequest.ts +0 -18
  506. package/dist/api/types/Plan.ts +0 -19
  507. package/dist/api/types/PlanBindingDetails.ts +0 -13
  508. package/dist/api/types/PlanChangeRequest.ts +0 -14
  509. package/dist/api/types/PlanLimits.ts +0 -12
  510. package/dist/api/types/PreAuthSet.ts +0 -16
  511. package/dist/api/types/Release.ts +0 -32
  512. package/dist/api/types/ReleaseDeployments.ts +0 -32
  513. package/dist/api/types/ReleaseUpdate.ts +0 -13
  514. package/dist/api/types/Releases.ts +0 -9
  515. package/dist/api/types/ReleasesDeleteError.ts +0 -21
  516. package/dist/api/types/ReleasesDeployments.ts +0 -9
  517. package/dist/api/types/Role.ts +0 -19
  518. package/dist/api/types/RolePermission.ts +0 -25
  519. package/dist/api/types/RolePermissionObject.ts +0 -17
  520. package/dist/api/types/RoleUseradm.ts +0 -19
  521. package/dist/api/types/SAMLMetadata.ts +0 -21
  522. package/dist/api/types/Scope.ts +0 -19
  523. package/dist/api/types/SelectAttribute.ts +0 -17
  524. package/dist/api/types/ServiceSubsystem.ts +0 -19
  525. package/dist/api/types/Settings.ts +0 -23
  526. package/dist/api/types/SortCriteria.ts +0 -30
  527. package/dist/api/types/SsoObject.ts +0 -21
  528. package/dist/api/types/Status.ts +0 -18
  529. package/dist/api/types/StatusDeviceauth.ts +0 -18
  530. package/dist/api/types/StatusTenantadm.ts +0 -17
  531. package/dist/api/types/StorageLimit.ts +0 -17
  532. package/dist/api/types/SubscriptionData.ts +0 -8
  533. package/dist/api/types/SupportRequest.ts +0 -17
  534. package/dist/api/types/Tag.ts +0 -27
  535. package/dist/api/types/Tags.ts +0 -10
  536. package/dist/api/types/TaskResult.ts +0 -13
  537. package/dist/api/types/TaskResultCLI.ts +0 -10
  538. package/dist/api/types/TaskResultHTTPRequest.ts +0 -8
  539. package/dist/api/types/TaskResultHTTPResponse.ts +0 -10
  540. package/dist/api/types/Tenant.ts +0 -26
  541. package/dist/api/types/TenantApiLimits.ts +0 -12
  542. package/dist/api/types/TenantApiLimitsTenantadm.ts +0 -12
  543. package/dist/api/types/TenantIdName.ts +0 -14
  544. package/dist/api/types/TenantIdsData.ts +0 -10
  545. package/dist/api/types/TenantInfo.ts +0 -14
  546. package/dist/api/types/TenantShortInfo.ts +0 -21
  547. package/dist/api/types/TenantTenantadm.ts +0 -54
  548. package/dist/api/types/TenantsIdName.ts +0 -6
  549. package/dist/api/types/Update.ts +0 -17
  550. package/dist/api/types/UpdateChildTenant.ts +0 -17
  551. package/dist/api/types/UpdateDeployments.ts +0 -18
  552. package/dist/api/types/UpdateFile.ts +0 -13
  553. package/dist/api/types/UpdateFileDeployments.ts +0 -13
  554. package/dist/api/types/UpdateTypes.ts +0 -8
  555. package/dist/api/types/UpgradeCompleteRequest.ts +0 -25
  556. package/dist/api/types/User.ts +0 -13
  557. package/dist/api/types/UserAuditlogs.ts +0 -13
  558. package/dist/api/types/UserNew.ts +0 -26
  559. package/dist/api/types/UserUpdate.ts +0 -25
  560. package/dist/api/types/UserUseradm.ts +0 -45
  561. package/dist/api/types/UserWithTenantInfo.ts +0 -12
  562. package/dist/api/types/XDeltaArgs.ts +0 -9
  563. package/dist/api/types/XDeltaArgsDeployments.ts +0 -9
  564. package/dist/api/types/XDeltaArgsLimits.ts +0 -10
  565. package/dist/api/types/XDeltaArgsLimitsDeployments.ts +0 -10
  566. package/dist/chunk-2CYOM4BK.js.map +0 -1
  567. package/dist/chunk-2JHFUQ6B.js.map +0 -1
  568. package/dist/chunk-4B3IMP4I.js +0 -245
  569. package/dist/chunk-4B3IMP4I.js.map +0 -1
  570. package/dist/chunk-4XJMRVFI.js.map +0 -1
  571. package/dist/chunk-7JKWI5FK.js.map +0 -1
  572. package/dist/chunk-7PVGDMNM.js.map +0 -1
  573. package/dist/chunk-AMGWP7A4.js.map +0 -1
  574. package/dist/chunk-C5NEDBJI.js +0 -727
  575. package/dist/chunk-C5NEDBJI.js.map +0 -1
  576. package/dist/chunk-CYV6632F.js.map +0 -1
  577. package/dist/chunk-DCK2DBOA.js.map +0 -1
  578. package/dist/chunk-FGKMJS3B.js.map +0 -1
  579. package/dist/chunk-HPBE6KYY.js.map +0 -1
  580. package/dist/chunk-JAROCU6M.js.map +0 -1
  581. package/dist/chunk-LEMVXAYP.js.map +0 -1
  582. package/dist/chunk-LGNOTPUG.js +0 -106
  583. package/dist/chunk-LGNOTPUG.js.map +0 -1
  584. package/dist/chunk-LIJIIRON.js +0 -28
  585. package/dist/chunk-LIJIIRON.js.map +0 -1
  586. package/dist/chunk-LTKOV26W.js.map +0 -1
  587. package/dist/chunk-MRCFLG45.js.map +0 -1
  588. package/dist/chunk-QRGTG4YB.js.map +0 -1
  589. package/dist/chunk-TI2RL5P2.js.map +0 -1
  590. package/dist/chunk-TUACATJA.js.map +0 -1
  591. package/dist/chunk-UWMYZNUB.js.map +0 -1
  592. package/dist/chunk-VMNMD6KF.js.map +0 -1
  593. package/dist/chunk-WXL7PVI5.js.map +0 -1
  594. package/dist/chunk-X7IEZBM4.js.map +0 -1
  595. package/dist/chunk-YDS36ALB.js.map +0 -1
  596. package/dist/chunk-YT73QWCN.js.map +0 -1
  597. package/dist/deploymentdevicehook.cjs.map +0 -1
  598. package/dist/deploymentdevicehook.js +0 -62
  599. package/dist/deploymentdevicehook.js.map +0 -1
  600. /package/dist/{chunk-DAPAXWA5.js.map → chunk-URNS6A5T.js.map} +0 -0
  601. /package/dist/{deploymentdevicehook.d.cts → useDeploymentDevice.d.cts} +0 -0
  602. /package/dist/{deploymentdevicehook.d.ts → useDeploymentDevice.d.ts} +0 -0
@@ -38,22 +38,18 @@ __export(thunks_exports, {
38
38
  });
39
39
  module.exports = __toCommonJS(thunks_exports);
40
40
 
41
+ // src/monitorSlice/index.ts
42
+ var import_toolkit = require("@reduxjs/toolkit");
43
+
44
+ // src/constants.ts
45
+ var import_constants3 = require("@northern.tech/utils/constants");
46
+
41
47
  // src/appSlice/constants.ts
42
48
  var import_icons_material = require("@mui/icons-material");
43
49
  var startingDeviceCount = {
44
50
  os: "for first 50 devices",
45
51
  professional: "for first 250 devices"
46
52
  };
47
- var apiRoot = "/api/management";
48
- var apiUrl = {
49
- v1: `${apiRoot}/v1`,
50
- v2: `${apiRoot}/v2`
51
- };
52
- var headerNames = {
53
- link: "link",
54
- location: "location",
55
- total: "x-total-count"
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 }
@@ -65,28 +61,30 @@ var PLANS = {
65
61
  os: {
66
62
  id: "os",
67
63
  name: "Basic",
64
+ minimalDeviceCount: 50,
68
65
  offer: true,
69
- price: "$32 / month",
66
+ price: "$34 / month",
70
67
  deviceCount: startingDeviceCount.os,
71
- offerprice: "$23 / month for first 50 devices",
72
- price2: "for first 6 months;\n$29/month thereafter",
68
+ 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.",
73
69
  features: ["Access to core features of Mender", "Basic support"]
74
70
  },
75
71
  professional: {
76
72
  id: "professional",
77
73
  name: "Professional",
74
+ minimalDeviceCount: 250,
78
75
  offer: true,
79
- price: "$269 / month",
76
+ price: "$291 / month",
80
77
  deviceCount: startingDeviceCount.professional,
81
- offerprice: "$200 / month for first 50 devices",
82
- price2: "for first 6 months;\n$249/month thereafter",
78
+ description: "Everything in Basic, plus enhanced update management and automation features.",
83
79
  features: ["Advanced OTA features", "Higher priority support"]
84
80
  },
85
81
  enterprise: {
86
82
  id: "enterprise",
87
83
  name: "Enterprise",
84
+ minimalDeviceCount: 1e3,
88
85
  price: "Custom pricing",
89
86
  deviceCount: "Unlimited devices",
87
+ 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.",
90
88
  features: ["All Mender features", "Advanced security features", "SLA-backed support"]
91
89
  }
92
90
  };
@@ -106,21 +104,6 @@ var ADDONS = {
106
104
  },
107
105
  eligible: ["os", "professional", "enterprise"]
108
106
  },
109
- troubleshoot: {
110
- id: "troubleshoot",
111
- title: "Troubleshoot",
112
- description: "Expand your plan with device troubleshooting features",
113
- needs: ["hasDeviceConnect"],
114
- os: {
115
- price: "$27/month",
116
- deviceCount: startingDeviceCount.os
117
- },
118
- professional: {
119
- price: "$72/month",
120
- deviceCount: startingDeviceCount.professional
121
- },
122
- eligible: ["os", "professional", "enterprise"]
123
- },
124
107
  monitor: {
125
108
  id: "monitor",
126
109
  title: "Monitor",
@@ -135,6 +118,21 @@ var ADDONS = {
135
118
  deviceCount: startingDeviceCount.professional
136
119
  },
137
120
  eligible: ["professional", "enterprise"]
121
+ },
122
+ troubleshoot: {
123
+ id: "troubleshoot",
124
+ title: "Troubleshoot",
125
+ description: "Expand your plan with device troubleshooting features",
126
+ needs: ["hasDeviceConnect"],
127
+ os: {
128
+ price: "$27/month",
129
+ deviceCount: startingDeviceCount.os
130
+ },
131
+ professional: {
132
+ price: "$72/month",
133
+ deviceCount: startingDeviceCount.professional
134
+ },
135
+ eligible: ["os", "professional", "enterprise"]
138
136
  }
139
137
  };
140
138
  var BENEFITS = {
@@ -175,139 +173,15 @@ var DARK_MODE = "dark";
175
173
 
176
174
  // src/commonConstants.tsx
177
175
  var import_js = require("@mdi/js");
176
+ var import_MenderTypes = require("@northern.tech/types/MenderTypes");
178
177
  var import_jsx_runtime = require("react/jsx-runtime");
179
- var DEVICE_LIST_DEFAULTS = {
180
- page: 1,
181
- perPage: 20
182
- };
183
178
  var timeUnits = {
184
179
  days: "days",
185
180
  minutes: "minutes",
186
181
  hours: "hours"
187
182
  };
188
- var ALL_DEVICES = "All devices";
189
183
  var UNGROUPED_GROUP = { id: "*|=ungrouped=|*", name: "Unassigned" };
190
184
  var DEVICE_LIST_MAXIMUM_LENGTH = 50;
191
- var DEVICE_FILTERING_OPTIONS = {
192
- $eq: { key: "$eq", title: "equals", shortform: "=" },
193
- $ne: { key: "$ne", title: "not equal", shortform: "!=" },
194
- $gt: {
195
- key: "$gt",
196
- title: ">",
197
- shortform: ">",
198
- help: 'The "greater than" operator can work both on numbers and strings. In the latter case, the operator applies the lexicographical order to the value strings.'
199
- },
200
- $gte: {
201
- title: ">=",
202
- shortform: ">=",
203
- help: 'The "greater than or equal" operator can work both on numbers and strings. In the latter case, the operator applies the lexicographical order to the value strings.'
204
- },
205
- $lt: {
206
- key: "$lt",
207
- title: "<",
208
- shortform: "<",
209
- help: 'The "lesser than" operator can work both on numbers and strings. In the latter case, the operator applies the lexicographical order to the value strings.'
210
- },
211
- $lte: {
212
- title: "<=",
213
- shortform: "<=",
214
- help: 'The "lesser than or equal" operator can work both on numbers and strings. In the latter case, the operator applies the lexicographical order to the value strings.'
215
- },
216
- $ltne: {
217
- key: "$ltne",
218
- title: "$ltne",
219
- shortform: "ltne",
220
- help: 'The "lesser than or does not exist" operator can work both on numbers and strings. In the latter case, the operator applies the lexicographical order to the value strings.'
221
- },
222
- $in: {
223
- key: "$in",
224
- title: "in",
225
- shortform: "in",
226
- help: 'The "in" operator accepts a list of comma-separated values. It matches if the selected field is equal to one of the specified values.'
227
- },
228
- $nin: {
229
- key: "$nin",
230
- title: "not in",
231
- shortform: "not in",
232
- help: `The "not in" operator accepts a list of comma-separated values. It matches if the selected field's value is not equal to any of the specified options.`
233
- },
234
- $exists: {
235
- key: "$exists",
236
- title: "exists",
237
- shortform: "exists",
238
- value: true,
239
- help: `The "exists" operator matches if the selected field's value has a value. No value needs to be provided for this operator.`
240
- },
241
- $nexists: {
242
- key: "$nexists",
243
- title: `doesn't exist`,
244
- shortform: `doesn't exist`,
245
- value: true,
246
- help: `The "doesn't exist" operator matches if the selected field's value has no value. No value needs to be provided for this operator.`
247
- },
248
- $regex: {
249
- key: "$regex",
250
- title: `matches regular expression`,
251
- shortform: `matches`,
252
- help: `The "regular expression" operator matches the selected field's value with a Perl compatible regular expression (PCRE), automatically anchored by ^. If the regular expression is not valid, the filter will produce no results. If you need to specify options and flags, you can provide the full regex in the format of /regex/flags, for example.`
253
- }
254
- };
255
- var DEVICE_ISSUE_OPTIONS = {
256
- issues: {
257
- isCategory: true,
258
- key: "issues",
259
- title: "Devices with issues",
260
- filterRule: {}
261
- },
262
- offline: {
263
- issueCategory: "issues",
264
- key: "offline",
265
- needsFullFiltering: true,
266
- needsMonitor: false,
267
- needsReporting: false,
268
- filterRule: {
269
- scope: "system",
270
- key: "check_in_time",
271
- operator: DEVICE_FILTERING_OPTIONS.$ltne.key,
272
- value: ({ offlineThreshold }) => offlineThreshold
273
- },
274
- title: "Offline devices"
275
- },
276
- failedLastUpdate: {
277
- issueCategory: "issues",
278
- key: "failedLastUpdate",
279
- needsFullFiltering: false,
280
- needsMonitor: false,
281
- needsReporting: true,
282
- filterRule: { scope: "monitor", key: "failed_last_update", operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: true },
283
- title: "Deployment failed"
284
- },
285
- monitoring: {
286
- issueCategory: "issues",
287
- key: "monitoring",
288
- needsFullFiltering: false,
289
- needsMonitor: true,
290
- needsReporting: false,
291
- filterRule: { scope: "monitor", key: "alerts", operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: true },
292
- title: "Monitoring alert"
293
- },
294
- authRequests: {
295
- key: "authRequests",
296
- needsFullFiltering: false,
297
- needsMonitor: false,
298
- needsReporting: true,
299
- filterRule: { scope: "monitor", key: "auth_requests", operator: DEVICE_FILTERING_OPTIONS.$gt.key, value: 1 },
300
- title: "Devices with new authentication requests"
301
- },
302
- gatewayDevices: {
303
- key: "gatewayDevices",
304
- needsFullFiltering: false,
305
- needsMonitor: false,
306
- needsReporting: true,
307
- filterRule: { scope: "inventory", key: "mender_is_gateway", operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: "true" },
308
- title: "Gateway devices"
309
- }
310
- };
311
185
  var oneSecond = 1e3;
312
186
  var TIMEOUTS = {
313
187
  debounceDefault: 700,
@@ -320,23 +194,12 @@ var TIMEOUTS = {
320
194
  refreshDefault: 10 * oneSecond,
321
195
  refreshLong: 60 * oneSecond
322
196
  };
323
- var SORTING_OPTIONS = {
324
- asc: "asc",
325
- desc: "desc"
326
- };
327
197
  var DEVICE_ONLINE_CUTOFF = { interval: 1, intervalName: timeUnits.days };
328
- var ATTRIBUTE_SCOPES = {
329
- inventory: "inventory",
330
- identity: "identity",
331
- monitor: "monitor",
332
- system: "system",
333
- tags: "tags"
334
- };
335
- var defaultIdAttribute = Object.freeze({ attribute: "id", scope: ATTRIBUTE_SCOPES.identity });
198
+ var defaultIdAttribute = Object.freeze({ attribute: "id", scope: import_constants3.ATTRIBUTE_SCOPES.identity });
336
199
  var credentialTypes = {
337
- aws: "aws",
338
- http: "http",
339
- sas: "sas",
200
+ aws: import_MenderTypes.Credentials.type.AWS,
201
+ http: import_MenderTypes.Credentials.type.HTTP,
202
+ sas: import_MenderTypes.Credentials.type.SAS,
340
203
  x509: "x509"
341
204
  };
342
205
  var EXTERNAL_PROVIDER = {
@@ -376,31 +239,277 @@ var EXTERNAL_PROVIDER = {
376
239
  webhook: {
377
240
  credentialsType: credentialTypes.http,
378
241
  deviceTwin: false,
242
+ twinTitle: "",
379
243
  // disable the webhook provider here, since it is treated different than other integrations, with a custom configuration & management view, etc.
380
244
  enabled: false,
381
245
  provider: "webhook"
382
246
  }
383
247
  };
384
- var ALL_RELEASES = "All releases";
385
- var emptyUiPermissions = Object.freeze({
386
- auditlog: [],
387
- deployments: [],
388
- groups: Object.freeze({}),
389
- releases: Object.freeze({}),
390
- tenantManagement: [],
391
- userManagement: []
392
- });
393
- var emptyRole = Object.freeze({
394
- name: void 0,
248
+ var emptyWebhook = {
395
249
  description: "",
396
- permissions: [],
397
- uiPermissions: Object.freeze({ ...emptyUiPermissions })
398
- });
250
+ provider: import_MenderTypes.Integration.provider.WEBHOOK,
251
+ credentials: {
252
+ type: EXTERNAL_PROVIDER.webhook.credentialsType,
253
+ [EXTERNAL_PROVIDER.webhook.credentialsType]: {
254
+ secret: "",
255
+ url: ""
256
+ }
257
+ }
258
+ };
259
+ var regionNames = new Intl.DisplayNames(["en"], { type: "region" });
260
+ var countries = [
261
+ "AD",
262
+ "AE",
263
+ "AF",
264
+ "AG",
265
+ "AI",
266
+ "AL",
267
+ "AM",
268
+ "AO",
269
+ "AQ",
270
+ "AR",
271
+ "AS",
272
+ "AT",
273
+ "AU",
274
+ "AW",
275
+ "AX",
276
+ "AZ",
277
+ "BA",
278
+ "BB",
279
+ "BD",
280
+ "BE",
281
+ "BF",
282
+ "BG",
283
+ "BH",
284
+ "BI",
285
+ "BJ",
286
+ "BL",
287
+ "BM",
288
+ "BN",
289
+ "BO",
290
+ "BR",
291
+ "BS",
292
+ "BT",
293
+ "BV",
294
+ "BW",
295
+ "BY",
296
+ "BZ",
297
+ "CA",
298
+ "CC",
299
+ "CD",
300
+ "CF",
301
+ "CG",
302
+ "CH",
303
+ "CI",
304
+ "CK",
305
+ "CL",
306
+ "CM",
307
+ "CN",
308
+ "CO",
309
+ "CR",
310
+ "CU",
311
+ "CV",
312
+ "CW",
313
+ "CX",
314
+ "CY",
315
+ "CZ",
316
+ "DE",
317
+ "DJ",
318
+ "DK",
319
+ "DM",
320
+ "DO",
321
+ "DZ",
322
+ "EC",
323
+ "EE",
324
+ "EG",
325
+ "EH",
326
+ "ER",
327
+ "ES",
328
+ "ET",
329
+ "FI",
330
+ "FJ",
331
+ "FK",
332
+ "FM",
333
+ "FO",
334
+ "FR",
335
+ "GA",
336
+ "GB",
337
+ "GD",
338
+ "GE",
339
+ "GF",
340
+ "GG",
341
+ "GH",
342
+ "GI",
343
+ "GL",
344
+ "GM",
345
+ "GN",
346
+ "GP",
347
+ "GQ",
348
+ "GR",
349
+ "GS",
350
+ "GT",
351
+ "GU",
352
+ "GW",
353
+ "GY",
354
+ "HK",
355
+ "HM",
356
+ "HN",
357
+ "HR",
358
+ "HT",
359
+ "HU",
360
+ "ID",
361
+ "IE",
362
+ "IL",
363
+ "IM",
364
+ "IN",
365
+ "IO",
366
+ "IQ",
367
+ "IR",
368
+ "IS",
369
+ "IT",
370
+ "JE",
371
+ "JM",
372
+ "JO",
373
+ "JP",
374
+ "KE",
375
+ "KG",
376
+ "KH",
377
+ "KI",
378
+ "KM",
379
+ "KN",
380
+ "KP",
381
+ "KR",
382
+ "KW",
383
+ "KY",
384
+ "KZ",
385
+ "LA",
386
+ "LB",
387
+ "LC",
388
+ "LI",
389
+ "LK",
390
+ "LR",
391
+ "LS",
392
+ "LT",
393
+ "LU",
394
+ "LV",
395
+ "LY",
396
+ "MA",
397
+ "MC",
398
+ "MD",
399
+ "ME",
400
+ "MF",
401
+ "MG",
402
+ "MH",
403
+ "MK",
404
+ "ML",
405
+ "MM",
406
+ "MN",
407
+ "MO",
408
+ "MP",
409
+ "MQ",
410
+ "MR",
411
+ "MS",
412
+ "MT",
413
+ "MU",
414
+ "MV",
415
+ "MW",
416
+ "MX",
417
+ "MY",
418
+ "MZ",
419
+ "NA",
420
+ "NC",
421
+ "NE",
422
+ "NF",
423
+ "NG",
424
+ "NI",
425
+ "NL",
426
+ "NO",
427
+ "NP",
428
+ "NR",
429
+ "NU",
430
+ "NZ",
431
+ "OM",
432
+ "PA",
433
+ "PE",
434
+ "PF",
435
+ "PG",
436
+ "PH",
437
+ "PK",
438
+ "PL",
439
+ "PM",
440
+ "PN",
441
+ "PR",
442
+ "PS",
443
+ "PT",
444
+ "PW",
445
+ "PY",
446
+ "QA",
447
+ "RE",
448
+ "RO",
449
+ "RS",
450
+ "RU",
451
+ "RW",
452
+ "SA",
453
+ "SB",
454
+ "SC",
455
+ "SD",
456
+ "SE",
457
+ "SG",
458
+ "SH",
459
+ "SI",
460
+ "SJ",
461
+ "SK",
462
+ "SL",
463
+ "SM",
464
+ "SN",
465
+ "SO",
466
+ "SR",
467
+ "SS",
468
+ "ST",
469
+ "SV",
470
+ "SX",
471
+ "SY",
472
+ "SZ",
473
+ "TC",
474
+ "TD",
475
+ "TF",
476
+ "TG",
477
+ "TH",
478
+ "TJ",
479
+ "TK",
480
+ "TL",
481
+ "TM",
482
+ "TN",
483
+ "TO",
484
+ "TR",
485
+ "TT",
486
+ "TV",
487
+ "TW",
488
+ "TZ",
489
+ "UA",
490
+ "UG",
491
+ "US",
492
+ "UY",
493
+ "UZ",
494
+ "VA",
495
+ "VC",
496
+ "VE",
497
+ "VG",
498
+ "VI",
499
+ "VN",
500
+ "VU",
501
+ "WF",
502
+ "WS",
503
+ "XK",
504
+ "YE",
505
+ "YT",
506
+ "ZA",
507
+ "ZM",
508
+ "ZW"
509
+ ].map((code) => ({ code, label: regionNames.of(code) })).sort((a, b) => a.label.localeCompare(b.label));
399
510
 
400
511
  // src/deploymentsSlice/constants.ts
401
512
  var alreadyInstalled = "already-installed";
402
- var deploymentsApiUrl = `${apiUrl.v1}/deployments`;
403
- var deploymentsApiUrlV2 = `${apiUrl.v2}/deployments`;
404
513
  var deploymentSubstates = {
405
514
  aborted: "aborted",
406
515
  alreadyInstalled,
@@ -473,9 +582,9 @@ var DEPLOYMENT_STATES = {
473
582
  var listDefaultsByState = {
474
583
  [DEPLOYMENT_STATES.inprogress]: { page: 1, perPage: 10 },
475
584
  [DEPLOYMENT_STATES.pending]: { page: 1, perPage: 10 },
476
- [DEPLOYMENT_STATES.scheduled]: { ...DEVICE_LIST_DEFAULTS },
477
- [DEPLOYMENT_STATES.finished]: { ...DEVICE_LIST_DEFAULTS },
478
- sort: { direction: SORTING_OPTIONS.desc }
585
+ [DEPLOYMENT_STATES.scheduled]: { ...import_constants3.DEVICE_LIST_DEFAULTS },
586
+ [DEPLOYMENT_STATES.finished]: { ...import_constants3.DEVICE_LIST_DEFAULTS },
587
+ sort: { direction: import_constants3.SORTING_OPTIONS.desc }
479
588
  };
480
589
  var DEFAULT_PENDING_INPROGRESS_COUNT = 10;
481
590
  var DEPLOYMENT_ROUTES = {
@@ -532,28 +641,6 @@ var pauseMap = {
532
641
  followUp: installationSubstatesMap.reboot.pauseConfigurationIndicator
533
642
  }
534
643
  };
535
- var limitDefault = { min: 5, max: 100, default: 10 };
536
-
537
- // src/devicesSlice/constants.ts
538
- var emptyFilter = { key: null, value: "", operator: DEVICE_FILTERING_OPTIONS.$eq.key, scope: "inventory" };
539
- var deviceAuthV2 = `${apiUrl.v2}/devauth`;
540
- var deviceConnect = `${apiUrl.v1}/deviceconnect`;
541
- var inventoryApiUrl = `${apiUrl.v1}/inventory`;
542
- var inventoryApiUrlV2 = `${apiUrl.v2}/inventory`;
543
- var deviceConfig = `${apiUrl.v1}/deviceconfig/configurations/device`;
544
- var reportingApiUrl = `${apiUrl.v1}/reporting`;
545
- var iotManagerBaseURL = `${apiUrl.v1}/iot-manager`;
546
- var DEVICE_STATES = {
547
- accepted: "accepted",
548
- pending: "pending",
549
- preauth: "preauthorized",
550
- rejected: "rejected"
551
- };
552
- var geoAttributes = ["geo-lat", "geo-lon"].map((attribute) => ({ attribute, scope: "inventory" }));
553
-
554
- // src/monitorSlice/constants.ts
555
- var alertChannels = { email: "email" };
556
- var monitorApiUrlv1 = `${apiUrl.v1}/devicemonitor`;
557
644
 
558
645
  // src/onboardingSlice/constants.ts
559
646
  var onboardingSteps = {
@@ -571,6 +658,7 @@ var onboardingSteps = {
571
658
  SCHEDULING_GROUP_SELECTION: "scheduling-group-selection",
572
659
  SCHEDULING_RELEASE_TO_DEVICES: "scheduling-release-to-devices",
573
660
  DEPLOYMENTS_INPROGRESS: "deployments-inprogress",
661
+ DEPLOYMENTS_COMPLETED: "deployments-completed",
574
662
  DEPLOYMENTS_PAST: "deployments-past",
575
663
  DEPLOYMENTS_PAST_COMPLETED: "deployments-past-completed",
576
664
  DEPLOYMENTS_PAST_COMPLETED_FAILURE: "deployments-past-completed-failure",
@@ -597,10 +685,6 @@ var orderedOnboardingSteps = [
597
685
  ];
598
686
 
599
687
  // src/organizationSlice/constants.ts
600
- var auditLogsApiUrl = `${apiUrl.v1}/auditlogs`;
601
- var tenantadmApiUrlv1 = `${apiUrl.v1}/tenantadm`;
602
- var tenantadmApiUrlv2 = `${apiUrl.v2}/tenantadm`;
603
- var ssoIdpApiUrlv1 = `${apiUrl.v1}/useradm/sso/idp/metadata`;
604
688
  var auditlogTypes = {
605
689
  artifact: { title: "Artifact", queryParameter: "object_type", value: "artifact" },
606
690
  deployment: { title: "Deployment", queryParameter: "object_deployment_name", value: "deployment" },
@@ -611,430 +695,85 @@ var auditlogTypes = {
611
695
  };
612
696
  var AUDIT_LOGS_TYPES = [auditlogTypes.artifact, auditlogTypes.deployment, auditlogTypes.device, auditlogTypes.user_access_token, auditlogTypes.user];
613
697
  var SP_AUDIT_LOGS_TYPES = [auditlogTypes.user, auditlogTypes.tenant];
614
- var emptyWebhook = {
615
- description: "",
616
- enabled: true,
617
- credentials: {
618
- type: EXTERNAL_PROVIDER.webhook.credentialsType,
619
- [EXTERNAL_PROVIDER.webhook.credentialsType]: {
620
- secret: "",
621
- url: ""
622
- }
623
- }
624
- };
625
698
  var TENANT_LIST_DEFAULT = {
626
699
  page: 1,
627
700
  perPage: 20
628
701
  };
629
702
 
630
703
  // src/usersSlice/constants.ts
631
- var useradmApiUrlv1 = `${apiUrl.v1}/useradm`;
632
- var useradmApiUrlv2 = `${apiUrl.v2}/useradm`;
633
- var staticRolesByName = {
634
- admin: "RBAC_ROLE_PERMIT_ALL",
635
- readOnly: "RBAC_ROLE_OBSERVER",
636
- ci: "RBAC_ROLE_CI",
637
- deploymentsManager: "RBAC_ROLE_DEPLOYMENTS_MANAGER",
638
- terminalAccess: "RBAC_ROLE_REMOTE_TERMINAL"
639
- };
640
- var PermissionTypes = {
641
- Any: "any",
642
- Get: "GET",
643
- Post: "POST",
644
- Put: "PUT",
645
- Delete: "DELETE",
646
- Patch: "PATCH",
647
- DeviceGroup: "DEVICE_GROUP",
648
- DeviceId: "DEVICE_ID"
649
- };
650
- var permissionSetIds = {
651
- Basic: "Basic",
652
- ConfigureDevices: "ConfigureDevices",
653
- ConnectToDevices: "ConnectToDevices",
654
- DeployToDevices: "DeployToDevices",
655
- ManageDevices: "ManageDevices",
656
- ManageReleases: "ManageReleases",
657
- ManageTenants: "ManageTenants",
658
- ManageUsers: "ManageUsers",
659
- ReadAuditLogs: "ReadAuditLogs",
660
- ReadDevices: "ReadDevices",
661
- ReadReleases: "ReadReleases",
662
- ReadTenants: "ReadTenants",
663
- ReadUsers: "ReadUsers",
664
- SuperUser: "SuperUser",
665
- UploadArtifacts: "UploadArtifacts"
666
- };
667
- var uiPermissionsById = {
668
- configure: {
669
- explanations: { groups: `'Configure' allows the user to use mender-configure features and apply configurations.` },
670
- permissionLevel: 2,
671
- permissionSets: { groups: permissionSetIds.ConfigureDevices },
672
- title: "Configure",
673
- value: "configure",
674
- verbs: [PermissionTypes.Get, PermissionTypes.Put, PermissionTypes.Post]
675
- },
676
- connect: {
677
- explanations: { groups: `'Connect' allows the user to use mender-connect features and Troubleshoot add-ons.` },
678
- permissionLevel: 2,
679
- permissionSets: { groups: permissionSetIds.ConnectToDevices },
680
- title: "Connect",
681
- value: "connect",
682
- verbs: [PermissionTypes.Get, PermissionTypes.Put]
683
- },
684
- deploy: {
685
- explanations: { groups: `'Deploy' allows the user to deploy software or configuration updates to devices.` },
686
- permissionLevel: 2,
687
- permissionSets: { deployments: permissionSetIds.DeployToDevices, groups: permissionSetIds.DeployToDevices },
688
- title: "Deploy",
689
- value: "deploy",
690
- verbs: [PermissionTypes.Post]
691
- },
692
- manage: {
693
- explanations: {
694
- groups: `'Manage' allows the user to edit device name, notes, and manage authentication status. For 'All devices' it also allows the user to edit and create device groups.`,
695
- releases: `'Manage' allows the user to upload new artifacts, edit release descriptions and remove artifacts.`
696
- },
697
- permissionLevel: 2,
698
- permissionSets: {
699
- groups: permissionSetIds.ManageDevices,
700
- releases: permissionSetIds.ManageReleases,
701
- tenantManagement: permissionSetIds.ManageTenants,
702
- userManagement: permissionSetIds.ManageUsers
703
- },
704
- title: "Manage",
705
- value: "manage",
706
- verbs: [PermissionTypes.Post, PermissionTypes.Put, PermissionTypes.Patch]
707
- },
708
- read: {
709
- explanations: { groups: `'Read' allows the user to view devices.` },
710
- permissionLevel: 1,
711
- permissionSets: {
712
- auditlog: permissionSetIds.ReadAuditLogs,
713
- groups: permissionSetIds.ReadDevices,
714
- releases: permissionSetIds.ReadReleases,
715
- tenantManagement: permissionSetIds.ReadTenants,
716
- userManagement: permissionSetIds.ReadUsers
717
- },
718
- title: "Read",
719
- value: "read",
720
- verbs: [PermissionTypes.Get, PermissionTypes.Post]
721
- },
722
- upload: {
723
- explanations: { groups: `'Upload' allows the user to upload new Artifacts.` },
724
- unscopedOnly: { releases: true },
725
- permissionLevel: 1,
726
- permissionSets: { releases: permissionSetIds.UploadArtifacts },
727
- title: "Upload",
728
- value: "upload",
729
- verbs: [PermissionTypes.Post, PermissionTypes.Put, PermissionTypes.Patch]
730
- }
731
- };
732
- var scopedPermissionAreas = {
733
- groups: { key: "groups", excessiveAccessSelector: ALL_DEVICES, scopeType: "DeviceGroups" },
734
- releases: { key: "releases", excessiveAccessSelector: ALL_RELEASES, scopeType: "Releases" }
704
+ var USER_LOGOUT = "USER_LOGOUT";
705
+ var settingsKeys = { initialized: "settings-initialized" };
706
+ var READ_STATES = {
707
+ read: "read",
708
+ seen: "seen",
709
+ unread: "unread"
735
710
  };
736
- var uiPermissionsByArea = {
737
- auditlog: {
738
- endpoints: [{ path: /\/(auditlog)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.read] }],
739
- explanation: "Granting access to the audit log will allow tracing changes to devices, releases and user accounts, as well as providing information about deployments.",
740
- key: "auditlog",
741
- uiPermissions: [uiPermissionsById.read],
742
- title: "System Audit Log"
743
- },
744
- deployments: {
745
- endpoints: [
746
- { path: /\/(deployments\/deployments)/i, types: [PermissionTypes.Post, PermissionTypes.Put], uiPermissions: [uiPermissionsById.deploy] },
747
- { path: /\/(deployments\/deployments)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.read] },
748
- { path: /\/(deployments\/config)/i, types: [PermissionTypes.Get, PermissionTypes.Put], uiPermissions: [uiPermissionsById.manage] }
749
- ],
750
- explanation: "Providing deploy permissions will allow deployments to be created using the releases and devices a user has access to.",
751
- key: "deployments",
752
- uiPermissions: [uiPermissionsById.read, uiPermissionsById.deploy],
753
- title: "Deployments"
711
+
712
+ // src/monitorSlice/index.ts
713
+ var sliceName = "monitor";
714
+ var initialState = {
715
+ alerts: {
716
+ alertList: { ...import_constants3.DEVICE_LIST_DEFAULTS, total: 0 },
717
+ byDeviceId: {}
754
718
  },
755
- groups: {
756
- endpoints: [
757
- {
758
- path: /\/(devauth|inventory|deviceconfig|devicemonitor|deviceconnect\/devices)/i,
759
- types: [PermissionTypes.Get],
760
- uiPermissions: [uiPermissionsById.read]
761
- },
762
- { path: /\/(devauth|inventory)/i, types: [PermissionTypes.Put, PermissionTypes.Post], uiPermissions: [uiPermissionsById.manage] },
763
- { path: /\/(deviceconfig)/i, types: [PermissionTypes.Get, PermissionTypes.Put, PermissionTypes.Post], uiPermissions: [uiPermissionsById.configure] },
764
- { path: /\/(deviceconnect\/devices)/i, types: [PermissionTypes.Get, PermissionTypes.Post], uiPermissions: [uiPermissionsById.connect] }
765
- ],
766
- explanation: "Device group management permissions control the degree to which devices in a group can be accessed and moved to other groups.",
767
- key: "groups",
768
- scope: scopedPermissionAreas.groups.scopeType,
769
- uiPermissions: [uiPermissionsById.read, uiPermissionsById.manage, uiPermissionsById.deploy, uiPermissionsById.configure, uiPermissionsById.connect],
770
- title: "Group Management"
719
+ issueCounts: {
720
+ byType: Object.keys(import_constants3.DEVICE_ISSUE_OPTIONS).reduce((accu, key) => ({ ...accu, [key]: { filtered: 0, total: 0 } }), {})
771
721
  },
772
- releases: {
773
- endpoints: [
774
- { path: /\/(deployments\/artifacts|deployments\/deployments\/releases)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.read] },
775
- {
776
- path: /\/(deployments\/artifacts|deployments\/deployments\/releases)/i,
777
- types: [PermissionTypes.Post, PermissionTypes.Put],
778
- uiPermissions: [uiPermissionsById.read, uiPermissionsById.upload]
779
- },
780
- {
781
- path: /\/(deployments\/artifacts|deployments\/deployments\/releases)/i,
782
- types: [PermissionTypes.Delete],
783
- uiPermissions: [uiPermissionsById.read, uiPermissionsById.manage]
722
+ settings: {
723
+ global: {
724
+ channels: {
725
+ ...Object.keys(import_constants3.alertChannels).reduce((accu, item) => ({ ...accu, [item]: { enabled: true } }), {})
784
726
  }
785
- ],
786
- explanation: "Release permissions can be granted to allow artifact & release modifications, as well as the creation of new releases.",
787
- key: "releases",
788
- scope: "ReleaseTags",
789
- uiPermissions: [uiPermissionsById.read, uiPermissionsById.manage, uiPermissionsById.upload],
790
- title: "Release Management"
791
- },
792
- tenantManagement: {
793
- endpoints: [
794
- { path: /\/(tenantadm\/tenants)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.read] },
795
- { path: /\/(tenantadm\/tenants)/i, types: [PermissionTypes.Post, PermissionTypes.Put], uiPermissions: [uiPermissionsById.manage] },
796
- { path: /\/(users\/exists)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.manage] }
797
- ],
798
- explanation: "Tenant management permissions allow listing, creating and modifying child tenants",
799
- key: "tenantManagement",
800
- uiPermissions: [uiPermissionsById.read, uiPermissionsById.manage],
801
- title: "Tenant Management"
802
- },
803
- userManagement: {
804
- endpoints: [
805
- { path: /\/(useradm)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.read] },
806
- { path: /\/(useradm)/i, types: [PermissionTypes.Post], uiPermissions: [uiPermissionsById.manage] }
807
- ],
808
- explanation: "User management permissions should be granted carefully, as these allow privilege increases for any users managed by a user with user management permissions",
809
- key: "userManagement",
810
- uiPermissions: [uiPermissionsById.read, uiPermissionsById.manage],
811
- title: "User Management"
812
- }
813
- };
814
- var permissionMapper = (permission) => permission.value;
815
- var rolesById = Object.freeze({
816
- [staticRolesByName.admin]: {
817
- name: "Admin",
818
- value: staticRolesByName.admin,
819
- description: "Full access",
820
- permissions: [],
821
- // permissions refers to the values returned from the backend
822
- uiPermissions: {
823
- ...emptyUiPermissions,
824
- auditlog: uiPermissionsByArea.auditlog.uiPermissions.map(permissionMapper),
825
- deployments: uiPermissionsByArea.deployments.uiPermissions.map(permissionMapper),
826
- groups: { [ALL_DEVICES]: uiPermissionsByArea.groups.uiPermissions.map(permissionMapper) },
827
- releases: { [ALL_RELEASES]: uiPermissionsByArea.releases.uiPermissions.map(permissionMapper) },
828
- userManagement: uiPermissionsByArea.userManagement.uiPermissions.map(permissionMapper)
829
- }
830
- },
831
- [staticRolesByName.readOnly]: {
832
- name: "Read Access",
833
- value: staticRolesByName.readOnly,
834
- description: "",
835
- permissions: [],
836
- uiPermissions: {
837
- ...emptyUiPermissions,
838
- deployments: [uiPermissionsById.read.value],
839
- groups: { [ALL_DEVICES]: [uiPermissionsById.read.value] },
840
- releases: { [ALL_RELEASES]: [uiPermissionsById.read.value] },
841
- userManagement: [uiPermissionsById.read.value]
842
- }
843
- },
844
- [staticRolesByName.ci]: {
845
- name: "Releases Manager",
846
- value: staticRolesByName.ci,
847
- description: "",
848
- permissions: [],
849
- uiPermissions: {
850
- ...emptyUiPermissions,
851
- releases: { [ALL_RELEASES]: uiPermissionsByArea.releases.uiPermissions.map(permissionMapper) }
852
- }
853
- },
854
- [staticRolesByName.deploymentsManager]: {
855
- name: "Deployments Manager",
856
- value: staticRolesByName.deploymentsManager,
857
- description: "",
858
- permissions: [],
859
- uiPermissions: {
860
- ...emptyUiPermissions,
861
- deployments: uiPermissionsByArea.deployments.uiPermissions.map(permissionMapper),
862
- groups: { [ALL_DEVICES]: [uiPermissionsById.deploy.value, uiPermissionsById.read.value] },
863
- releases: { [ALL_RELEASES]: [uiPermissionsById.read.value] }
864
- }
865
- },
866
- [staticRolesByName.terminalAccess]: {
867
- name: "Troubleshooting",
868
- value: staticRolesByName.terminalAccess,
869
- description: "Access to the troubleshooting features: Remote Terminal, File Transfer, Port Forwarding",
870
- permissions: [],
871
- uiPermissions: {
872
- ...emptyUiPermissions,
873
- groups: { [ALL_DEVICES]: [uiPermissionsById.connect.value] }
874
- }
875
- }
876
- });
877
- var serviceProviderRolesById = {
878
- admin: {
879
- name: "Admin",
880
- value: staticRolesByName.admin,
881
- description: "Full access",
882
- permissions: [],
883
- uiPermissions: {
884
- ...emptyUiPermissions,
885
- auditlog: uiPermissionsByArea.auditlog.uiPermissions.map(permissionMapper),
886
- userManagement: uiPermissionsByArea.userManagement.uiPermissions.map(permissionMapper),
887
- tenantManagement: uiPermissionsByArea.tenantManagement.uiPermissions.map(permissionMapper)
888
- }
889
- },
890
- readOnly: {
891
- name: "Read access",
892
- value: staticRolesByName.readOnly,
893
- description: "This role can see all linked organizations but cannot make any changes",
894
- permissions: [],
895
- uiPermissions: {
896
- ...emptyUiPermissions,
897
- auditlog: [uiPermissionsById.read.value],
898
- userManagement: [uiPermissionsById.read.value],
899
- tenantManagement: [uiPermissionsById.read.value]
900
727
  }
901
728
  }
902
729
  };
903
- var defaultPermissionSets = {
904
- [permissionSetIds.Basic]: {
905
- name: permissionSetIds.Basic,
906
- result: {
907
- // this is needed to prevent the detailed permissions of the basic permission set from being interpreted as allowing read & management access to user endpoints
908
- userManagement: [uiPermissionsById.read.value]
909
- }
910
- },
911
- [permissionSetIds.SuperUser]: {
912
- name: permissionSetIds.SuperUser,
913
- result: {
914
- ...rolesById[staticRolesByName.admin].uiPermissions
915
- }
916
- },
917
- [permissionSetIds.ManageUsers]: {
918
- name: permissionSetIds.ManageUsers,
919
- result: {
920
- userManagement: [uiPermissionsById.manage.value]
921
- }
922
- },
923
- [permissionSetIds.ReadAuditLogs]: {
924
- name: permissionSetIds.ReadAuditLogs,
925
- result: {
926
- auditlog: [uiPermissionsById.read.value]
927
- }
928
- },
929
- [permissionSetIds.ReadReleases]: {
930
- name: permissionSetIds.ReadReleases,
931
- result: {
932
- releases: { [ALL_RELEASES]: [uiPermissionsById.read.value] }
933
- }
934
- },
935
- [permissionSetIds.ReadTenants]: {
936
- name: permissionSetIds.ReadTenants,
937
- result: {
938
- tenantManagement: [uiPermissionsById.read.value]
939
- }
940
- },
941
- [permissionSetIds.ManageTenants]: {
942
- name: permissionSetIds.ManageTenants,
943
- result: {
944
- tenantManagement: [uiPermissionsById.manage.value]
945
- }
946
- },
947
- [permissionSetIds.ReadUsers]: {
948
- name: permissionSetIds.ReadUsers,
949
- result: {
950
- userManagement: [uiPermissionsById.read.value]
951
- }
952
- },
953
- [permissionSetIds.UploadArtifacts]: {
954
- name: permissionSetIds.UploadArtifacts,
955
- result: {
956
- releases: { [ALL_RELEASES]: [uiPermissionsById.upload.value] }
957
- }
958
- },
959
- [permissionSetIds.ManageReleases]: {
960
- name: permissionSetIds.ManageReleases,
961
- result: {
962
- releases: { [ALL_RELEASES]: [uiPermissionsById.manage.value] }
963
- }
964
- },
965
- [permissionSetIds.ConfigureDevices]: {
966
- name: permissionSetIds.ConfigureDevices,
967
- result: {
968
- deployments: [uiPermissionsById.read.value, uiPermissionsById.deploy.value],
969
- groups: { [ALL_DEVICES]: [uiPermissionsById.read.value, uiPermissionsById.configure.value] }
970
- }
971
- },
972
- [permissionSetIds.ConnectToDevices]: {
973
- name: permissionSetIds.ConnectToDevices,
974
- result: {
975
- groups: { [ALL_DEVICES]: [uiPermissionsById.read.value, uiPermissionsById.connect.value] }
976
- }
977
- },
978
- [permissionSetIds.DeployToDevices]: {
979
- name: permissionSetIds.DeployToDevices,
980
- result: {
981
- deployments: [uiPermissionsById.deploy.value, uiPermissionsById.manage.value, uiPermissionsById.read.value],
982
- groups: { [ALL_DEVICES]: [uiPermissionsById.read.value, uiPermissionsById.deploy.value] }
983
- }
984
- },
985
- [permissionSetIds.ManageDevices]: {
986
- name: permissionSetIds.ManageDevices,
987
- result: {
988
- groups: { [ALL_DEVICES]: [uiPermissionsById.read.value, uiPermissionsById.manage.value] }
989
- }
990
- },
991
- [permissionSetIds.ReadDevices]: {
992
- name: permissionSetIds.ReadDevices,
993
- result: {
994
- groups: { [ALL_DEVICES]: [uiPermissionsById.read.value] }
730
+ var monitorSlice = (0, import_toolkit.createSlice)({
731
+ name: sliceName,
732
+ initialState,
733
+ reducers: {
734
+ changeAlertChannel: (state, action) => {
735
+ const { channel, enabled } = action.payload;
736
+ state.settings.global.channels[channel] = { enabled };
737
+ },
738
+ receiveDeviceAlerts: (state, action) => {
739
+ const { deviceId, alerts } = action.payload;
740
+ state.alerts.byDeviceId[deviceId] = { alerts };
741
+ },
742
+ receiveLatestDeviceAlerts: (state, action) => {
743
+ const { deviceId, alerts } = action.payload;
744
+ state.alerts.byDeviceId[deviceId] = { ...state.alerts.byDeviceId[deviceId], latest: alerts };
745
+ },
746
+ receiveDeviceIssueCounts: (state, action) => {
747
+ const { issueType, counts } = action.payload;
748
+ state.issueCounts.byType[issueType] = counts;
749
+ },
750
+ setAlertListState: (state, action) => {
751
+ state.alerts.alertList = { ...state.alerts.alertList, ...action.payload };
995
752
  }
996
753
  }
997
- };
998
- var USER_LOGOUT = "USER_LOGOUT";
999
- var rolesByName = {
1000
- ...staticRolesByName,
1001
- deploymentCreation: { action: "CREATE_DEPLOYMENT", object: { type: "DEVICE_GROUP", value: void 0 } },
1002
- groupAccess: { action: "VIEW_DEVICE", object: { type: "DEVICE_GROUP", value: void 0 } },
1003
- userManagement: { action: "http", object: { type: "any", value: `${useradmApiUrlv1}/.*` } }
1004
- };
1005
- var twoFAStates = {
1006
- enabled: "enabled",
1007
- disabled: "disabled",
1008
- unverified: "unverified"
1009
- };
1010
- var settingsKeys = { initialized: "settings-initialized" };
1011
- var READ_STATES = {
1012
- read: "read",
1013
- seen: "seen",
1014
- unread: "unread"
1015
- };
754
+ });
755
+ var actions = monitorSlice.actions;
756
+ var monitorSlice_default = monitorSlice.reducer;
1016
757
 
1017
758
  // src/appSlice/index.ts
1018
- var import_toolkit = require("@reduxjs/toolkit");
1019
- var sliceName = "app";
759
+ var import_toolkit2 = require("@reduxjs/toolkit");
760
+ var sliceName2 = "app";
1020
761
  var getYesterday = () => {
1021
762
  const today = /* @__PURE__ */ new Date();
1022
763
  today.setDate(today.getDate() - 1);
1023
764
  return today.toISOString();
1024
765
  };
1025
- var initialState = {
766
+ var initialState2 = {
1026
767
  cancelSource: void 0,
768
+ commit: "",
1027
769
  demoArtifactLink: "https://dgsbl4vditpls.cloudfront.net/mender-demo-artifact.mender",
1028
770
  hostAddress: null,
1029
771
  snackbar: {
1030
- open: false,
1031
- message: "",
1032
- maxWidth: 900,
1033
- autoHideDuration: void 0,
1034
772
  action: void 0,
1035
- children: void 0,
1036
- onClick: void 0,
1037
- onClose: void 0
773
+ autoHideDuration: void 0,
774
+ message: "",
775
+ open: false,
776
+ preventClickToCopy: false
1038
777
  },
1039
778
  // return boolean rather than organization details
1040
779
  features: {
@@ -1047,7 +786,7 @@ var initialState = {
1047
786
  hasMonitor: false,
1048
787
  hasReporting: false,
1049
788
  isDemoMode: false,
1050
- isHosted: false,
789
+ isHosted: true,
1051
790
  isEnterprise: false
1052
791
  },
1053
792
  feedbackProbability: 0.3,
@@ -1059,16 +798,22 @@ var initialState = {
1059
798
  deviceIds: [],
1060
799
  searchTerm: "",
1061
800
  searchTotal: 0,
801
+ isSearching: false,
1062
802
  sort: {
1063
- direction: SORTING_OPTIONS.desc
803
+ direction: import_constants3.SORTING_OPTIONS.desc
1064
804
  // key: null,
1065
805
  // scope: null
1066
806
  }
1067
807
  },
808
+ sentry: {
809
+ location: "",
810
+ replaysSessionSampleRate: 0.1,
811
+ tracesSampleRate: 1
812
+ },
1068
813
  stripeAPIKey: "",
1069
814
  trackerCode: "",
1070
815
  uploadsById: {
1071
- // id: { uploading: false, uploadProgress: 0, cancelSource: undefined }
816
+ // id: { progress: 0, cancelSource: undefined }
1072
817
  },
1073
818
  newThreshold: getYesterday(),
1074
819
  offlineThreshold: getYesterday(),
@@ -1076,17 +821,13 @@ var initialState = {
1076
821
  Integration: "",
1077
822
  "Mender-Client": "",
1078
823
  "Mender-Artifact": "",
1079
- "Meta-Mender": "",
1080
- Deployments: "",
1081
- Deviceauth: "",
1082
- Inventory: "",
1083
- GUI: "latest"
824
+ "Meta-Mender": ""
1084
825
  },
1085
826
  yesterday: void 0
1086
827
  };
1087
- var appSlice = (0, import_toolkit.createSlice)({
1088
- name: sliceName,
1089
- initialState,
828
+ var appSlice = (0, import_toolkit2.createSlice)({
829
+ name: sliceName2,
830
+ initialState: initialState2,
1090
831
  reducers: {
1091
832
  setFeatures: (state, action) => {
1092
833
  state.features = {
@@ -1095,19 +836,17 @@ var appSlice = (0, import_toolkit.createSlice)({
1095
836
  };
1096
837
  },
1097
838
  setSnackbar: (state, { payload }) => {
1098
- let { message, autoHideDuration, action, children, onClick, onClose } = payload;
1099
- if (typeof payload === "string" || payload instanceof String) {
1100
- message = payload;
839
+ if (typeof payload === "string") {
840
+ state.snackbar.message = payload;
841
+ return;
1101
842
  }
843
+ const { message, autoHideDuration, action, preventClickToCopy = false } = payload;
1102
844
  state.snackbar = {
1103
- open: message ? true : false,
1104
845
  message,
1105
- maxWidth: 900,
1106
846
  autoHideDuration,
1107
847
  action,
1108
- children,
1109
- onClick,
1110
- onClose
848
+ preventClickToCopy,
849
+ open: !!message
1111
850
  };
1112
851
  },
1113
852
  setFirstLoginAfterSignup: (state, action) => {
@@ -1146,18 +885,16 @@ var appSlice = (0, import_toolkit.createSlice)({
1146
885
  ...action.payload
1147
886
  };
1148
887
  },
1149
- setEnvironmentData: (state, action) => {
1150
- return { ...state, ...action.payload };
1151
- }
888
+ setEnvironmentData: (state, action) => ({ ...state, ...action.payload })
1152
889
  }
1153
890
  });
1154
- var actions = appSlice.actions;
891
+ var actions2 = appSlice.actions;
1155
892
  var appSlice_default = appSlice.reducer;
1156
893
 
1157
894
  // src/deploymentsSlice/index.ts
1158
- var import_toolkit2 = require("@reduxjs/toolkit");
1159
- var sliceName2 = "deployments";
1160
- var initialState2 = {
895
+ var import_toolkit3 = require("@reduxjs/toolkit");
896
+ var sliceName3 = "deployments";
897
+ var initialState3 = {
1161
898
  byId: {
1162
899
  // [id]: { statistics: { status: {}, total_size }, devices: { [deploymentId]: { id, log } }, totalDeviceCount }
1163
900
  },
@@ -1179,20 +916,20 @@ var initialState2 = {
1179
916
  sourceWindow: -1
1180
917
  },
1181
918
  binaryDeltaLimits: {
1182
- timeout: { ...limitDefault, default: 60, max: 3600, min: 60 },
1183
- sourceWindow: limitDefault,
1184
- inputWindow: limitDefault,
1185
- duplicatesWindow: limitDefault,
1186
- instructionBuffer: limitDefault
919
+ timeout: { ...import_constants3.limitDefault, default: 60, max: 3600, min: 60 },
920
+ sourceWindow: import_constants3.limitDefault,
921
+ inputWindow: import_constants3.limitDefault,
922
+ duplicatesWindow: import_constants3.limitDefault,
923
+ instructionBuffer: import_constants3.limitDefault
1187
924
  }
1188
925
  },
1189
926
  deploymentDeviceLimit: 5e3,
1190
927
  selectedDeviceIds: [],
1191
928
  selectionState: {
1192
- finished: { ...DEVICE_LIST_DEFAULTS, endDate: void 0, search: "", selection: [], startDate: void 0, total: 0, type: "" },
1193
- inprogress: { ...DEVICE_LIST_DEFAULTS, perPage: DEFAULT_PENDING_INPROGRESS_COUNT, selection: [] },
1194
- pending: { ...DEVICE_LIST_DEFAULTS, perPage: DEFAULT_PENDING_INPROGRESS_COUNT, selection: [] },
1195
- scheduled: { ...DEVICE_LIST_DEFAULTS, selection: [] },
929
+ finished: { ...import_constants3.DEVICE_LIST_DEFAULTS, endDate: void 0, search: "", selection: [], startDate: void 0, total: 0, type: "" },
930
+ inprogress: { ...import_constants3.DEVICE_LIST_DEFAULTS, perPage: DEFAULT_PENDING_INPROGRESS_COUNT, selection: [] },
931
+ pending: { ...import_constants3.DEVICE_LIST_DEFAULTS, perPage: DEFAULT_PENDING_INPROGRESS_COUNT, selection: [] },
932
+ scheduled: { ...import_constants3.DEVICE_LIST_DEFAULTS, selection: [] },
1196
933
  general: {
1197
934
  state: DEPLOYMENT_ROUTES.active.key,
1198
935
  showCreationDialog: false,
@@ -1203,9 +940,9 @@ var initialState2 = {
1203
940
  selectedId: void 0
1204
941
  }
1205
942
  };
1206
- var deploymentsSlice = (0, import_toolkit2.createSlice)({
1207
- name: sliceName2,
1208
- initialState: initialState2,
943
+ var deploymentsSlice = (0, import_toolkit3.createSlice)({
944
+ name: sliceName3,
945
+ initialState: initialState3,
1209
946
  reducers: {
1210
947
  createdDeployment: (state, action) => {
1211
948
  state.byId[action.payload.id] = {
@@ -1214,7 +951,8 @@ var deploymentsSlice = (0, import_toolkit2.createSlice)({
1214
951
  };
1215
952
  state.byStatus[DEPLOYMENT_STATES.pending].total = state.byStatus[DEPLOYMENT_STATES.pending].total + 1;
1216
953
  state.byStatus[DEPLOYMENT_STATES.pending].deploymentIds = [...state.byStatus.pending.deploymentIds, action.payload.id];
1217
- state.selectionState[DEPLOYMENT_STATES.pending].selection = [action.payload.id, ...state.selectionState[DEPLOYMENT_STATES.pending].selection], state.selectionState[DEPLOYMENT_STATES.pending].total = state.selectionState[DEPLOYMENT_STATES.pending].total + 1;
954
+ state.selectionState[DEPLOYMENT_STATES.pending].selection = [action.payload.id, ...state.selectionState[DEPLOYMENT_STATES.pending].selection];
955
+ state.selectionState[DEPLOYMENT_STATES.pending].total = (state.selectionState[DEPLOYMENT_STATES.pending].total || 0) + 1;
1218
956
  },
1219
957
  removedDeployment: (state, action) => {
1220
958
  const { [action.payload]: removedDeployment, ...remainder } = state.byId;
@@ -1276,14 +1014,14 @@ var deploymentsSlice = (0, import_toolkit2.createSlice)({
1276
1014
  }
1277
1015
  }
1278
1016
  });
1279
- var actions2 = deploymentsSlice.actions;
1017
+ var actions3 = deploymentsSlice.actions;
1280
1018
  var deploymentsSlice_default = deploymentsSlice.reducer;
1281
1019
 
1282
1020
  // src/devicesSlice/index.ts
1283
1021
  var import_helpers = require("@northern.tech/utils/helpers");
1284
- var import_toolkit3 = require("@reduxjs/toolkit");
1285
- var sliceName3 = "devices";
1286
- var initialState3 = {
1022
+ var import_toolkit4 = require("@reduxjs/toolkit");
1023
+ var sliceName4 = "devices";
1024
+ var initialState4 = {
1287
1025
  byId: {
1288
1026
  // [deviceId]: {
1289
1027
  // ...,
@@ -1291,26 +1029,30 @@ var initialState3 = {
1291
1029
  // }
1292
1030
  },
1293
1031
  byStatus: {
1294
- [DEVICE_STATES.accepted]: { deviceIds: [], total: 0 },
1032
+ [import_constants3.DEVICE_STATES.accepted]: { deviceIds: [], total: 0 },
1295
1033
  active: { deviceIds: [], total: 0 },
1296
1034
  inactive: { deviceIds: [], total: 0 },
1297
- [DEVICE_STATES.pending]: { deviceIds: [], total: 0 },
1298
- [DEVICE_STATES.preauth]: { deviceIds: [], total: 0 },
1299
- [DEVICE_STATES.rejected]: { deviceIds: [], total: 0 }
1035
+ [import_constants3.DEVICE_STATES.pending]: { deviceIds: [], total: 0 },
1036
+ [import_constants3.DEVICE_STATES.preauth]: { deviceIds: [], total: 0 },
1037
+ [import_constants3.DEVICE_STATES.rejected]: { deviceIds: [], total: 0 }
1300
1038
  },
1301
1039
  deviceList: {
1302
1040
  deviceIds: [],
1303
- ...DEVICE_LIST_DEFAULTS,
1041
+ ...import_constants3.DEVICE_LIST_DEFAULTS,
1304
1042
  selectedAttributes: [],
1305
1043
  selectedIssues: [],
1306
1044
  selection: [],
1307
1045
  sort: {
1308
- direction: SORTING_OPTIONS.desc
1046
+ direction: import_constants3.SORTING_OPTIONS.desc
1309
1047
  // key: null,
1310
1048
  // scope: null
1311
1049
  },
1312
- state: DEVICE_STATES.accepted,
1313
- total: 0
1050
+ state: import_constants3.DEVICE_STATES.accepted,
1051
+ total: 0,
1052
+ refreshTrigger: false,
1053
+ isLoading: false,
1054
+ detailsTab: "",
1055
+ open: false
1314
1056
  },
1315
1057
  filters: [
1316
1058
  // { key: 'device_type', value: 'raspberry', operator: '$eq', scope: 'inventory' }
@@ -1337,9 +1079,9 @@ var initialState3 = {
1337
1079
  selectedGroup: void 0
1338
1080
  }
1339
1081
  };
1340
- var devicesSlice = (0, import_toolkit3.createSlice)({
1341
- name: sliceName3,
1342
- initialState: initialState3,
1082
+ var devicesSlice = (0, import_toolkit4.createSlice)({
1083
+ name: sliceName4,
1084
+ initialState: initialState4,
1343
1085
  reducers: {
1344
1086
  receivedGroups: (state, action) => {
1345
1087
  state.groups.byId = action.payload;
@@ -1382,7 +1124,7 @@ var devicesSlice = (0, import_toolkit3.createSlice)({
1382
1124
  };
1383
1125
  },
1384
1126
  selectGroup: (state, { payload: group }) => {
1385
- state.deviceList.deviceIds = state.groups.byId[group] && state.groups.byId[group].deviceIds.length > 0 ? state.groups.byId[group].deviceIds : [];
1127
+ state.deviceList.deviceIds = group && state.groups.byId[group] && state.groups.byId[group].deviceIds && state.groups.byId[group].deviceIds.length > 0 ? state.groups.byId[group].deviceIds : [];
1386
1128
  state.groups.selectedGroup = group;
1387
1129
  },
1388
1130
  removeGroup: (state, action) => {
@@ -1434,9 +1176,6 @@ var devicesSlice = (0, import_toolkit3.createSlice)({
1434
1176
  const { count, status } = action.payload;
1435
1177
  state.byStatus[status].total = count;
1436
1178
  },
1437
- setTotalDevices: (state, action) => {
1438
- state.total = action.payload;
1439
- },
1440
1179
  setDeviceLimit: (state, action) => {
1441
1180
  state.limit = action.payload;
1442
1181
  },
@@ -1449,64 +1188,17 @@ var devicesSlice = (0, import_toolkit3.createSlice)({
1449
1188
  maybeUpdateDevicesByStatus: (state, action) => {
1450
1189
  const { deviceId, authId } = action.payload;
1451
1190
  const device = state.byId[deviceId];
1452
- const hasMultipleAuthSets = authId ? device.auth_sets.filter((authset) => authset.id !== authId).length > 0 : false;
1453
- if (!hasMultipleAuthSets && Object.values(DEVICE_STATES).includes(device.status)) {
1191
+ const hasMultipleAuthSets = authId && device.auth_sets ? device.auth_sets.filter((authset) => authset.id !== authId).length > 0 : false;
1192
+ if (!hasMultipleAuthSets && Object.values(import_constants3.DEVICE_STATES).includes(device.status)) {
1454
1193
  const deviceIds = state.byStatus[device.status].deviceIds.filter((id) => id !== deviceId);
1455
1194
  state.byStatus[device.status] = { deviceIds, total: Math.max(0, state.byStatus[device.status].total - 1) };
1456
1195
  }
1457
1196
  }
1458
1197
  }
1459
1198
  });
1460
- var actions3 = devicesSlice.actions;
1199
+ var actions4 = devicesSlice.actions;
1461
1200
  var devicesSlice_default = devicesSlice.reducer;
1462
1201
 
1463
- // src/monitorSlice/index.ts
1464
- var import_toolkit4 = require("@reduxjs/toolkit");
1465
- var sliceName4 = "monitor";
1466
- var initialState4 = {
1467
- alerts: {
1468
- alertList: { ...DEVICE_LIST_DEFAULTS, total: 0 },
1469
- byDeviceId: {}
1470
- },
1471
- issueCounts: {
1472
- byType: Object.values(DEVICE_ISSUE_OPTIONS).reduce((accu, { key }) => ({ ...accu, [key]: { filtered: 0, total: 0 } }), {})
1473
- },
1474
- settings: {
1475
- global: {
1476
- channels: {
1477
- ...Object.keys(alertChannels).reduce((accu, item) => ({ ...accu, [item]: { enabled: true } }), {})
1478
- }
1479
- }
1480
- }
1481
- };
1482
- var monitorSlice = (0, import_toolkit4.createSlice)({
1483
- name: sliceName4,
1484
- initialState: initialState4,
1485
- reducers: {
1486
- changeAlertChannel: (state, action) => {
1487
- const { channel, enabled } = action.payload;
1488
- state.settings.global.channels[channel] = { enabled };
1489
- },
1490
- receiveDeviceAlerts: (state, action) => {
1491
- const { deviceId, alerts } = action.payload;
1492
- state.alerts.byDeviceId[deviceId] = { alerts };
1493
- },
1494
- receiveLatestDeviceAlerts: (state, action) => {
1495
- const { deviceId, alerts } = action.payload;
1496
- state.alerts.byDeviceId[deviceId] = { ...state.alerts.byDeviceId[deviceId], latest: alerts };
1497
- },
1498
- receiveDeviceIssueCounts: (state, action) => {
1499
- const { issueType, counts } = action.payload;
1500
- state.issueCounts.byType[issueType] = counts;
1501
- },
1502
- setAlertListState: (state, action) => {
1503
- state.alerts.alertList = { ...state.alerts.alertList, ...action.payload };
1504
- }
1505
- }
1506
- });
1507
- var actions4 = monitorSlice.actions;
1508
- var monitorSlice_default = monitorSlice.reducer;
1509
-
1510
1202
  // src/onboardingSlice/index.ts
1511
1203
  var import_toolkit5 = require("@reduxjs/toolkit");
1512
1204
  var sliceName5 = "onboarding";
@@ -1523,9 +1215,7 @@ var onboardingSlice = (0, import_toolkit5.createSlice)({
1523
1215
  name: sliceName5,
1524
1216
  initialState: initialState5,
1525
1217
  reducers: {
1526
- setOnboardingState: (state, action) => {
1527
- return { ...state, ...action.payload };
1528
- },
1218
+ setOnboardingState: (state, action) => ({ ...state, ...action.payload }),
1529
1219
  setDemoArtifactPort: (state, action) => {
1530
1220
  state.demoArtifactPort = action.payload;
1531
1221
  },
@@ -1568,7 +1258,7 @@ var initialState6 = {
1568
1258
  tenants: [],
1569
1259
  selectedTenant: null,
1570
1260
  sort: {
1571
- direction: SORTING_OPTIONS.desc,
1261
+ direction: import_constants3.SORTING_OPTIONS.desc,
1572
1262
  key: "name"
1573
1263
  }
1574
1264
  },
@@ -1578,15 +1268,16 @@ var initialState6 = {
1578
1268
  auditlog: {
1579
1269
  events: [],
1580
1270
  selectionState: {
1581
- ...DEVICE_LIST_DEFAULTS,
1271
+ ...import_constants3.DEVICE_LIST_DEFAULTS,
1582
1272
  detail: void 0,
1583
1273
  endDate: void 0,
1584
1274
  selectedIssue: void 0,
1585
- sort: { direction: SORTING_OPTIONS.desc },
1275
+ sort: { direction: import_constants3.SORTING_OPTIONS.desc },
1586
1276
  startDate: void 0,
1587
1277
  total: 0,
1588
1278
  type: void 0,
1589
- user: void 0
1279
+ user: void 0,
1280
+ isLoading: false
1590
1281
  }
1591
1282
  },
1592
1283
  externalDeviceIntegrations: [
@@ -1624,6 +1315,12 @@ var organizationSlice = (0, import_toolkit6.createSlice)({
1624
1315
  setOrganization: (state, action) => {
1625
1316
  state.organization = { ...state.organization, ...action.payload };
1626
1317
  },
1318
+ setSubscription: (state, action) => {
1319
+ state.organization.subscription = { ...state.organization.subscription, ...action.payload };
1320
+ },
1321
+ setBillingProfile: (state, action) => {
1322
+ state.organization.billing_profile = action.payload;
1323
+ },
1627
1324
  setTenantListState: (state, action) => {
1628
1325
  state.tenantList = action.payload;
1629
1326
  },
@@ -1686,12 +1383,12 @@ var initialState7 = {
1686
1383
  */
1687
1384
  },
1688
1385
  releasesList: {
1689
- ...DEVICE_LIST_DEFAULTS,
1386
+ ...import_constants3.DEVICE_LIST_DEFAULTS,
1690
1387
  searchedIds: [],
1691
1388
  releaseIds: [],
1692
1389
  selection: [],
1693
1390
  sort: {
1694
- direction: SORTING_OPTIONS.desc,
1391
+ direction: import_constants3.SORTING_OPTIONS.desc,
1695
1392
  key: "modified"
1696
1393
  },
1697
1394
  isLoading: void 0,
@@ -1760,11 +1457,12 @@ var initialState8 = {
1760
1457
  retries: 0
1761
1458
  },
1762
1459
  permissionSetsById: {
1763
- ...defaultPermissionSets
1460
+ ...import_constants3.defaultPermissionSets
1764
1461
  },
1765
1462
  rolesById: {
1766
- ...rolesById
1463
+ ...import_constants3.rolesById
1767
1464
  },
1465
+ rolesInitialized: false,
1768
1466
  settingsInitialized: false,
1769
1467
  showConnectDeviceDialog: false,
1770
1468
  showFeedbackDialog: false,
@@ -1800,9 +1498,6 @@ var usersSlice = (0, import_toolkit8.createSlice)({
1800
1498
  state.byId[action.payload.id] = action.payload;
1801
1499
  state.currentUser = action.payload.id;
1802
1500
  },
1803
- createdUser: (state, action) => {
1804
- state.byId[0] = action.payload;
1805
- },
1806
1501
  removedUser: (state, action) => {
1807
1502
  const { [action.payload]: removedUser, ...byId } = state.byId;
1808
1503
  state.byId = byId;
@@ -1819,6 +1514,10 @@ var usersSlice = (0, import_toolkit8.createSlice)({
1819
1514
  },
1820
1515
  receivedRoles: (state, action) => {
1821
1516
  state.rolesById = action.payload;
1517
+ state.rolesInitialized = true;
1518
+ },
1519
+ finishedRoleInitialization: (state, action) => {
1520
+ state.rolesInitialized = action.payload;
1822
1521
  },
1823
1522
  createdRole: (state, action) => {
1824
1523
  state.rolesById[action.payload.name] = {
@@ -1849,7 +1548,7 @@ var usersSlice = (0, import_toolkit8.createSlice)({
1849
1548
  },
1850
1549
  setTooltipState: (state, action) => {
1851
1550
  const { id, readState = READ_STATES.read } = action.payload;
1852
- state.tooltips.byId[id].readState = readState;
1551
+ state.tooltips.byId[id] = { ...state.tooltips.byId[id], readState };
1853
1552
  },
1854
1553
  setTooltipsState: (state, action) => {
1855
1554
  state.tooltips.byId = {
@@ -1873,10 +1572,10 @@ var usersSlice_default = usersSlice.reducer;
1873
1572
 
1874
1573
  // src/actions.ts
1875
1574
  var actions_default = {
1876
- ...actions,
1877
1575
  ...actions2,
1878
1576
  ...actions3,
1879
1577
  ...actions4,
1578
+ ...actions,
1880
1579
  ...actions5,
1881
1580
  ...actions6,
1882
1581
  ...actions7,
@@ -1889,7 +1588,7 @@ var import_axios = __toESM(require("axios"), 1);
1889
1588
  // src/auth.ts
1890
1589
  var import_universal_cookie = __toESM(require("universal-cookie"), 1);
1891
1590
  var cookies = new import_universal_cookie.default();
1892
- var emptySession = Object.freeze({ token: "", exiresAt: void 0 });
1591
+ var emptySession = Object.freeze({ token: "", expiresAt: void 0 });
1893
1592
  var tokenCache = "";
1894
1593
  var getSessionInfo = () => {
1895
1594
  let sessionInfo = { ...emptySession };
@@ -1902,15 +1601,15 @@ var getSessionInfo = () => {
1902
1601
  return { ...emptySession };
1903
1602
  }
1904
1603
  if (!sessionInfo.token) {
1905
- let jwtTokenFromCookie = cookies.get("JWT", { doNotParse: true }) ?? "";
1604
+ const jwtTokenFromCookie = cookies.get("JWT", { doNotParse: true }) ?? "";
1906
1605
  if (jwtTokenFromCookie) {
1907
- setSessionInfo({ token: jwtTokenFromCookie, undefined: void 0 });
1606
+ setSessionInfo({ token: jwtTokenFromCookie });
1908
1607
  sessionInfo.token = jwtTokenFromCookie;
1909
1608
  cookies.remove("JWT");
1910
1609
  cookies.remove("JWT", { path: "/" });
1911
1610
  }
1912
1611
  }
1913
- sessionInfo.token = sessionInfo.token || void 0;
1612
+ sessionInfo.token = sessionInfo.token || "";
1914
1613
  tokenCache = sessionInfo.token;
1915
1614
  return sessionInfo;
1916
1615
  };
@@ -1967,20 +1666,17 @@ var general_api_default = Api;
1967
1666
  // src/appSlice/selectors.ts
1968
1667
  var import_helpers2 = require("@northern.tech/utils/helpers");
1969
1668
  var import_toolkit9 = require("@reduxjs/toolkit");
1970
- var getAppDocsVersion = (state) => state.app.docsVersion;
1971
1669
  var getFeatures = (state) => state.app.features;
1972
1670
  var getFullVersionInformation = (state) => state.app.versionInformation;
1973
- var getDocsVersion = (0, import_toolkit9.createSelector)([getAppDocsVersion, getFeatures], (appDocsVersion, { isHosted }) => {
1974
- const docsVersion = appDocsVersion ? `${appDocsVersion}/` : "development/";
1975
- return isHosted ? "" : docsVersion;
1976
- });
1977
1671
  var getSearchState = (state) => state.app.searchState;
1672
+ var getUploads = (state) => state.app.uploadsById;
1673
+ var getIsUploading = (0, import_toolkit9.createSelector)([getUploads], (uploadsById) => !!Object.keys(uploadsById).length);
1978
1674
  var getSearchedDevices = (0, import_toolkit9.createSelector)([getSearchState], ({ deviceIds }) => deviceIds);
1979
1675
  var getVersionInformation = (0, import_toolkit9.createSelector)(
1980
1676
  [getFullVersionInformation, getFeatures],
1981
- ({ Integration, ...remainder }, { isHosted }) => isHosted && Integration !== "next" ? remainder : { ...remainder, Integration }
1677
+ ({ Integration: Integration2, ...remainder }, { isHosted }) => isHosted && Integration2 !== "next" ? remainder : { ...remainder, Integration: Integration2 }
1982
1678
  );
1983
- var getIsPreview = (0, import_toolkit9.createSelector)([getFullVersionInformation], ({ Integration }) => (0, import_helpers2.versionCompare)(Integration, "next") > -1);
1679
+ var getIsPreview = (0, import_toolkit9.createSelector)([getFullVersionInformation], ({ Integration: Integration2 }) => (0, import_helpers2.versionCompare)(Integration2, "next") > -1);
1984
1680
 
1985
1681
  // src/commonSelectors.ts
1986
1682
  var import_helpers5 = require("@northern.tech/utils/helpers");
@@ -2062,7 +1758,7 @@ var getDeviceIdentityAttributes = (0, import_toolkit11.createSelector)(
2062
1758
  );
2063
1759
  var getDeviceCountsByStatus = (0, import_toolkit11.createSelector)(
2064
1760
  [getDevicesByStatus],
2065
- (byStatus) => Object.values(DEVICE_STATES).reduce((accu, state) => {
1761
+ (byStatus) => Object.values(import_constants3.DEVICE_STATES).reduce((accu, state) => {
2066
1762
  accu[state] = byStatus[state].total || 0;
2067
1763
  return accu;
2068
1764
  }, {})
@@ -2074,7 +1770,7 @@ var getSelectedGroupInfo = (0, import_toolkit11.createSelector)(
2074
1770
  let groupCount = acceptedDeviceTotal;
2075
1771
  let groupFilters = [];
2076
1772
  if (selectedGroup && groupsById[selectedGroup]) {
2077
- groupCount = groupsById[selectedGroup].total;
1773
+ groupCount = groupsById[selectedGroup].total || 0;
2078
1774
  groupFilters = groupsById[selectedGroup].filters || [];
2079
1775
  }
2080
1776
  return { groupCount, selectedGroup, groupFilters };
@@ -2085,13 +1781,18 @@ var getLimitMaxed = (0, import_toolkit11.createSelector)(
2085
1781
  ({ total: acceptedDevices = 0 }, deviceLimit) => Boolean(deviceLimit && deviceLimit <= acceptedDevices)
2086
1782
  );
2087
1783
  var getGroupsByIdWithoutUngrouped = (0, import_toolkit11.createSelector)([getGroupsById], ({ [UNGROUPED_GROUP.id]: ungrouped, ...groups }) => groups);
1784
+ var getGroupData = (0, import_toolkit11.createSelector)([getGroupsByIdWithoutUngrouped], (groups) => {
1785
+ const createdGroup = Object.keys(groups).length ? Object.keys(groups)[0] : void 0;
1786
+ const hasDynamicGroups = Object.values(groups).some((group) => !!group.id);
1787
+ return { createdGroup, hasDynamicGroups, groups };
1788
+ });
2088
1789
  var getGroups = (0, import_toolkit11.createSelector)([getGroupsById], (groupsById) => {
2089
1790
  const groupNames = Object.keys(groupsById).sort();
2090
1791
  const groupedGroups = Object.entries(groupsById).sort((a, b) => a[0].localeCompare(b[0])).reduce(
2091
1792
  (accu, [groupname, group]) => {
2092
1793
  const name = groupname === UNGROUPED_GROUP.id ? UNGROUPED_GROUP.name : groupname;
2093
1794
  const groupItem = { ...group, groupId: name, name: groupname };
2094
- if (group.filters?.length > 0) {
1795
+ if ((group.filters ?? []).length > 0) {
2095
1796
  if (groupname !== UNGROUPED_GROUP.id) {
2096
1797
  accu.dynamic.push(groupItem);
2097
1798
  } else {
@@ -2134,12 +1835,14 @@ var getOnboarding = (state) => state.onboarding;
2134
1835
 
2135
1836
  // src/organizationSlice/selectors.ts
2136
1837
  var import_toolkit12 = require("@reduxjs/toolkit");
1838
+ var import_dayjs = __toESM(require("dayjs"), 1);
1839
+ var import_relativeTime = __toESM(require("dayjs/plugin/relativeTime"), 1);
2137
1840
  var getOrganization = (state) => state.organization.organization;
2138
1841
  var getExternalIntegrations = (state) => state.organization.externalDeviceIntegrations;
2139
1842
  var getAuditLog = (state) => state.organization.auditlog.events;
2140
1843
  var getAuditLogSelectionState = (state) => state.organization.auditlog.selectionState;
2141
1844
  var getWebhookEvents = (state) => state.organization.webhooks.events;
2142
- var getWebhookEventTotal = (state) => state.organization.webhooks.eventTotal;
1845
+ var getWebhookEventTotal = (state) => state.organization.webhooks.eventsTotal;
2143
1846
  var getDeviceTwinIntegrations = (0, import_toolkit12.createSelector)(
2144
1847
  [getExternalIntegrations],
2145
1848
  (integrations) => integrations.filter((integration) => integration.id && EXTERNAL_PROVIDER[integration.provider]?.deviceTwin)
@@ -2160,22 +1863,31 @@ var getAuditLogEntry = (0, import_toolkit12.createSelector)([getAuditLog, getAud
2160
1863
  const [eventAction, eventTime] = atob(selectedId).split("|");
2161
1864
  return events.find((item) => item.action === eventAction && item.time === eventTime);
2162
1865
  });
1866
+ import_dayjs.default.extend(import_relativeTime.default);
1867
+ var newPricingIntroduction = (0, import_dayjs.default)("2025-06-03T00:00");
1868
+ var getHasCurrentPricing = (0, import_toolkit12.createSelector)(
1869
+ [getOrganization],
1870
+ ({ id }) => !!id && (0, import_dayjs.default)(parseInt(id.substring(0, 8), 16) * 1e3) >= newPricingIntroduction
1871
+ );
1872
+
1873
+ // src/releasesSlice/selectors.ts
1874
+ var import_toolkit13 = require("@reduxjs/toolkit");
2163
1875
 
2164
1876
  // src/utils.ts
2165
1877
  var import_helpers4 = require("@northern.tech/utils/helpers");
2166
1878
  var filterProcessors = {
2167
- [DEVICE_FILTERING_OPTIONS.$gt.key]: (val) => Number(val) || val,
2168
- [DEVICE_FILTERING_OPTIONS.$gte.key]: (val) => Number(val) || val,
2169
- [DEVICE_FILTERING_OPTIONS.$lt.key]: (val) => Number(val) || val,
2170
- [DEVICE_FILTERING_OPTIONS.$lte.key]: (val) => Number(val) || val,
2171
- [DEVICE_FILTERING_OPTIONS.$ltne.key]: (val) => Number(val) || val,
2172
- [DEVICE_FILTERING_OPTIONS.$in.key]: (val) => ("" + val).split(",").map((i) => i.trim()),
2173
- [DEVICE_FILTERING_OPTIONS.$nin.key]: (val) => ("" + val).split(",").map((i) => i.trim()),
2174
- [DEVICE_FILTERING_OPTIONS.$exists.key]: import_helpers4.yes,
2175
- [DEVICE_FILTERING_OPTIONS.$nexists.key]: () => false
1879
+ [import_constants3.DEVICE_FILTERING_OPTIONS.$gt.key]: (val) => Number(val) || val,
1880
+ [import_constants3.DEVICE_FILTERING_OPTIONS.$gte.key]: (val) => Number(val) || val,
1881
+ [import_constants3.DEVICE_FILTERING_OPTIONS.$lt.key]: (val) => Number(val) || val,
1882
+ [import_constants3.DEVICE_FILTERING_OPTIONS.$lte.key]: (val) => Number(val) || val,
1883
+ [import_constants3.DEVICE_FILTERING_OPTIONS.$ltne.key]: (val) => Number(val) || val,
1884
+ [import_constants3.DEVICE_FILTERING_OPTIONS.$in.key]: (val) => ("" + val).split(",").map((i) => i.trim()),
1885
+ [import_constants3.DEVICE_FILTERING_OPTIONS.$nin.key]: (val) => ("" + val).split(",").map((i) => i.trim()),
1886
+ [import_constants3.DEVICE_FILTERING_OPTIONS.$exists.key]: import_helpers4.yes,
1887
+ [import_constants3.DEVICE_FILTERING_OPTIONS.$nexists.key]: () => false
2176
1888
  };
2177
1889
  var filterAliases = {
2178
- $nexists: { alias: DEVICE_FILTERING_OPTIONS.$exists.key, value: false }
1890
+ $nexists: { alias: import_constants3.DEVICE_FILTERING_OPTIONS.$exists.key, value: false }
2179
1891
  };
2180
1892
  var mapFiltersToTerms = (filters) => filters.map((filter) => ({
2181
1893
  scope: filter.scope,
@@ -2184,35 +1896,40 @@ var mapFiltersToTerms = (filters) => filters.map((filter) => ({
2184
1896
  value: filterProcessors.hasOwnProperty(filter.operator) ? filterProcessors[filter.operator](filter.value) : filter.value
2185
1897
  }));
2186
1898
  var convertIssueOptionsToFilters = (issuesSelection, filtersState = {}) => issuesSelection.map((item) => {
2187
- if (typeof DEVICE_ISSUE_OPTIONS[item].filterRule.value === "function") {
2188
- return { ...DEVICE_ISSUE_OPTIONS[item].filterRule, value: DEVICE_ISSUE_OPTIONS[item].filterRule.value(filtersState) };
1899
+ if (typeof import_constants3.DEVICE_ISSUE_OPTIONS[item].filterRule.value === "function") {
1900
+ return { ...import_constants3.DEVICE_ISSUE_OPTIONS[item].filterRule, value: import_constants3.DEVICE_ISSUE_OPTIONS[item].filterRule.value(filtersState) };
2189
1901
  }
2190
- return DEVICE_ISSUE_OPTIONS[item].filterRule;
1902
+ return import_constants3.DEVICE_ISSUE_OPTIONS[item].filterRule;
2191
1903
  });
2192
- var convertDeviceListStateToFilters = ({ filters = [], group, groups = { byId: {} }, offlineThreshold, selectedIssues = [], status }) => {
1904
+ var convertDeviceListStateToFilters = ({
1905
+ filters = [],
1906
+ group,
1907
+ groups = { byId: {} },
1908
+ offlineThreshold,
1909
+ selectedIssues = [],
1910
+ status
1911
+ }) => {
2193
1912
  let applicableFilters = [...filters];
2194
1913
  if (typeof group === "string" && !(groups.byId[group]?.filters || applicableFilters).length) {
2195
- applicableFilters.push({ key: "group", value: group, operator: DEVICE_FILTERING_OPTIONS.$eq.key, scope: "system" });
1914
+ applicableFilters.push({ key: "group", value: group, operator: import_constants3.DEVICE_FILTERING_OPTIONS.$eq.key, scope: "system" });
2196
1915
  }
2197
1916
  const nonMonitorFilters = applicableFilters.filter(
2198
- (filter) => !Object.values(DEVICE_ISSUE_OPTIONS).some(
1917
+ (filter) => !Object.values(import_constants3.DEVICE_ISSUE_OPTIONS).some(
2199
1918
  ({ filterRule }) => filter.scope !== "inventory" && filterRule.scope === filter.scope && filterRule.key === filter.key
2200
1919
  )
2201
1920
  );
2202
1921
  const deviceIssueFilters = convertIssueOptionsToFilters(selectedIssues, { offlineThreshold });
2203
1922
  applicableFilters = [...nonMonitorFilters, ...deviceIssueFilters];
2204
- const effectiveFilters = status ? [...applicableFilters, { key: "status", value: status, operator: DEVICE_FILTERING_OPTIONS.$eq.key, scope: "identity" }] : applicableFilters;
1923
+ const effectiveFilters = status ? [...applicableFilters, { key: "status", value: status, operator: import_constants3.DEVICE_FILTERING_OPTIONS.$eq.key, scope: "identity" }] : applicableFilters;
2205
1924
  return { applicableFilters: nonMonitorFilters, filterTerms: mapFiltersToTerms(effectiveFilters) };
2206
1925
  };
2207
- var listItemMapper = (byId, ids, { defaultObject = {}, cutOffSize = DEVICE_LIST_MAXIMUM_LENGTH }) => {
2208
- return ids.slice(0, cutOffSize).reduce((accu, id) => {
2209
- if (id && byId[id]) {
2210
- accu.push({ ...defaultObject, ...byId[id] });
2211
- }
2212
- return accu;
2213
- }, []);
2214
- };
2215
- var mergePermissions = (existingPermissions = { ...emptyUiPermissions }, addedPermissions) => Object.entries(existingPermissions).reduce(
1926
+ var listItemMapper = (byId, ids, { cutOffSize = DEVICE_LIST_MAXIMUM_LENGTH, defaultObject = {} }) => ids.slice(0, cutOffSize).reduce((accu, id) => {
1927
+ if (id && byId[id]) {
1928
+ accu.push({ ...defaultObject, ...byId[id] });
1929
+ }
1930
+ return accu;
1931
+ }, []);
1932
+ var mergePermissions = (existingPermissions = { ...import_constants3.emptyUiPermissions }, addedPermissions) => Object.entries(existingPermissions).reduce(
2216
1933
  (accu, [key, value]) => {
2217
1934
  let values;
2218
1935
  if (!accu[key]) {
@@ -2236,44 +1953,49 @@ var mapUserRolesToUiPermissions = (userRoles, roles) => userRoles.reduce(
2236
1953
  }
2237
1954
  return mergePermissions(accu, roles[roleId].uiPermissions);
2238
1955
  },
2239
- { ...emptyUiPermissions }
1956
+ { ...import_constants3.emptyUiPermissions }
2240
1957
  );
2241
1958
  var isDarkMode = (mode) => mode === DARK_MODE;
2242
1959
 
2243
1960
  // src/releasesSlice/selectors.ts
2244
- var import_toolkit13 = require("@reduxjs/toolkit");
2245
1961
  var getSelectedReleaseId = (state) => state.releases.selectedRelease;
2246
1962
  var getReleasesById = (state) => state.releases.byId;
2247
1963
  var getReleaseTags = (state) => state.releases.tags;
2248
1964
  var getReleaseListState = (state) => state.releases.releasesList;
2249
1965
  var getListedReleases = (state) => state.releases.releasesList.releaseIds;
2250
- var getReleaseMappingDefaults = () => ({});
1966
+ var releaseDefaults = {};
1967
+ var getReleaseMappingDefaults = () => releaseDefaults;
2251
1968
  var getReleasesList = (0, import_toolkit13.createSelector)([getReleasesById, getListedReleases, getReleaseMappingDefaults], listItemMapper);
2252
1969
  var getReleaseTagsById = (0, import_toolkit13.createSelector)([getReleaseTags], (releaseTags) => releaseTags.reduce((accu, key) => ({ ...accu, [key]: key }), {}));
2253
1970
  var getHasReleases = (0, import_toolkit13.createSelector)(
2254
1971
  [getReleaseListState, getReleasesById],
2255
1972
  ({ searchTotal, total }, byId) => !!(Object.keys(byId).length || total || searchTotal)
2256
1973
  );
2257
- var getSelectedRelease = (0, import_toolkit13.createSelector)([getReleasesById, getSelectedReleaseId], (byId, id) => byId[id] ?? {});
1974
+ var getSelectedRelease = (0, import_toolkit13.createSelector)([getReleasesById, getSelectedReleaseId], (byId, id) => byId[id || ""] ?? {});
1975
+ var getSelectedReleases = (0, import_toolkit13.createSelector)([getReleaseListState, getReleasesList], ({ selection }, releases) => selection.map((index) => releases[index]));
2258
1976
 
2259
1977
  // src/usersSlice/selectors.ts
2260
1978
  var import_toolkit14 = require("@reduxjs/toolkit");
1979
+ var emptyObject = {};
2261
1980
  var getRolesById = (state) => state.users.rolesById;
2262
1981
  var getTooltipsById = (state) => state.users.tooltips.byId;
2263
1982
  var getGlobalSettings = (state) => state.users.globalSettings;
2264
1983
  var getCurrentUserId = (state) => state.users.currentUser;
2265
1984
  var getUsersById = (state) => state.users.byId;
2266
1985
  var getUsersList = (0, import_toolkit14.createSelector)([getUsersById], (usersById) => Object.values(usersById));
2267
- var getCurrentUser = (0, import_toolkit14.createSelector)([getUsersById, getCurrentUserId], (usersById, userId) => usersById[userId] ?? {});
1986
+ var getCurrentUser = (0, import_toolkit14.createSelector)(
1987
+ [getUsersById, getCurrentUserId],
1988
+ (usersById, userId) => userId ? usersById[userId] ?? emptyObject : emptyObject
1989
+ );
2268
1990
  var getUserSettings = (state) => state.users.userSettings;
2269
1991
  var getSelectedDeviceAttribute = (0, import_toolkit14.createSelector)(
2270
1992
  [getUserSettings],
2271
1993
  ({ columnSelection }) => columnSelection.map((attribute) => ({ attribute: attribute.key, scope: attribute.scope }))
2272
1994
  );
2273
1995
  var getIsDarkMode = (0, import_toolkit14.createSelector)([getUserSettings], ({ mode }) => isDarkMode(mode));
2274
- var getShowHelptips = (0, import_toolkit14.createSelector)(
1996
+ var getReadAllHelptips = (0, import_toolkit14.createSelector)(
2275
1997
  [getTooltipsById],
2276
- (tooltips) => Object.values(tooltips).reduce((accu, { readState }) => accu || readState === READ_STATES.unread, false)
1998
+ (tooltips) => Object.values(tooltips).every(({ readState }) => readState === READ_STATES.read)
2277
1999
  );
2278
2000
  var getTooltipsState = (0, import_toolkit14.createSelector)(
2279
2001
  [getTooltipsById, getUserSettings],
@@ -2287,7 +2009,7 @@ var getTooltipsState = (0, import_toolkit14.createSelector)(
2287
2009
  );
2288
2010
  var getHas2FA = (0, import_toolkit14.createSelector)(
2289
2011
  [getCurrentUser],
2290
- (currentUser) => currentUser.hasOwnProperty("tfa_status") && currentUser.tfa_status === twoFAStates.enabled
2012
+ (currentUser) => currentUser.hasOwnProperty("tfa_status") && currentUser.tfa_status === import_constants3.twoFAStates.enabled
2291
2013
  );
2292
2014
  var getIdAttribute = (0, import_toolkit14.createSelector)([getGlobalSettings], ({ id_attribute = { ...defaultIdAttribute } }) => id_attribute);
2293
2015
  var getOfflineThresholdSettings = (0, import_toolkit14.createSelector)([getGlobalSettings], ({ offlineThreshold }) => ({
@@ -2303,37 +2025,34 @@ var getIsEnterprise = (0, import_toolkit15.createSelector)(
2303
2025
  );
2304
2026
  var getAttrsEndpoint = (0, import_toolkit15.createSelector)(
2305
2027
  [getFeatures],
2306
- ({ hasReporting }) => hasReporting ? `${reportingApiUrl}/devices/search/attributes` : `${inventoryApiUrlV2}/filters/attributes`
2028
+ ({ hasReporting }) => hasReporting ? `${import_constants3.reportingApiUrl}/devices/search/attributes` : `${import_constants3.inventoryApiUrlV2}/filters/attributes`
2307
2029
  );
2308
2030
  var getSearchEndpoint = (0, import_toolkit15.createSelector)(
2309
2031
  [getFeatures],
2310
- ({ hasReporting }) => hasReporting ? `${reportingApiUrl}/devices/search` : `${inventoryApiUrlV2}/filters/search`
2311
- );
2312
- var getUserRoles = (0, import_toolkit15.createSelector)(
2313
- [getCurrentUser, getRolesById, getIsEnterprise, getFeatures, getOrganization],
2314
- (currentUser, rolesById2, isEnterprise, { isHosted, hasMultitenancy }, { plan = PLANS.os.id }) => {
2315
- const isAdmin = currentUser.roles?.length ? currentUser.roles.some((role) => role === rolesByName.admin) : !(hasMultitenancy || isEnterprise || isHosted && plan !== PLANS.os.id);
2316
- const uiPermissions = isAdmin ? mapUserRolesToUiPermissions([rolesByName.admin], rolesById2) : mapUserRolesToUiPermissions(currentUser.roles || [], rolesById2);
2317
- return { isAdmin, uiPermissions };
2318
- }
2032
+ ({ hasReporting }) => hasReporting ? `${import_constants3.reportingApiUrl}/devices/search` : `${import_constants3.inventoryApiUrlV2}/filters/search`
2319
2033
  );
2034
+ var getUserRoles = (0, import_toolkit15.createSelector)([getCurrentUser, getRolesById, getIsEnterprise], (currentUser, rolesById2, isEnterprise) => {
2035
+ const isAdmin = currentUser.roles?.length ? currentUser.roles.some((role) => role === import_constants3.rolesByName.admin) : !isEnterprise;
2036
+ const uiPermissions = isAdmin ? mapUserRolesToUiPermissions([import_constants3.rolesByName.admin], rolesById2) : mapUserRolesToUiPermissions(currentUser.roles || [], rolesById2);
2037
+ return { isAdmin, uiPermissions };
2038
+ });
2320
2039
  var hasPermission = (thing, permission) => Object.values(thing).some((permissions) => permissions.includes(permission));
2321
2040
  var getUserCapabilities = (0, import_toolkit15.createSelector)([getUserRoles, getIsServiceProvider], ({ uiPermissions }, isServiceProvider) => {
2322
- const canManageReleases = hasPermission(uiPermissions.releases, uiPermissionsById.manage.value);
2323
- const canReadReleases = canManageReleases || hasPermission(uiPermissions.releases, uiPermissionsById.read.value);
2324
- const canUploadReleases = canManageReleases || hasPermission(uiPermissions.releases, uiPermissionsById.upload.value);
2325
- const canAuditlog = uiPermissions.auditlog.includes(uiPermissionsById.read.value);
2326
- const canReadUsers = uiPermissions.userManagement.includes(uiPermissionsById.read.value);
2327
- const canManageUsers = uiPermissions.userManagement.includes(uiPermissionsById.manage.value);
2328
- const canReadDevices = hasPermission(uiPermissions.groups, uiPermissionsById.read.value);
2041
+ const canManageReleases = hasPermission(uiPermissions.releases, import_constants3.uiPermissionsById.manage.value);
2042
+ const canReadReleases = canManageReleases || hasPermission(uiPermissions.releases, import_constants3.uiPermissionsById.read.value);
2043
+ const canUploadReleases = canManageReleases || hasPermission(uiPermissions.releases, import_constants3.uiPermissionsById.upload.value);
2044
+ const canAuditlog = uiPermissions.auditlog.includes(import_constants3.uiPermissionsById.read.value);
2045
+ const canReadUsers = uiPermissions.userManagement.includes(import_constants3.uiPermissionsById.read.value);
2046
+ const canManageUsers = uiPermissions.userManagement.includes(import_constants3.uiPermissionsById.manage.value);
2047
+ const canReadDevices = hasPermission(uiPermissions.groups, import_constants3.uiPermissionsById.read.value);
2329
2048
  const canWriteDevices = Object.values(uiPermissions.groups).some(
2330
- (groupPermissions) => groupPermissions.includes(uiPermissionsById.read.value) && groupPermissions.length > 1
2049
+ (groupPermissions) => groupPermissions.includes(import_constants3.uiPermissionsById.read.value) && groupPermissions.length > 1
2331
2050
  );
2332
- const canTroubleshoot = hasPermission(uiPermissions.groups, uiPermissionsById.connect.value);
2333
- const canManageDevices = hasPermission(uiPermissions.groups, uiPermissionsById.manage.value);
2334
- const canConfigure = hasPermission(uiPermissions.groups, uiPermissionsById.configure.value);
2335
- const canDeploy = uiPermissions.deployments.includes(uiPermissionsById.deploy.value) || hasPermission(uiPermissions.groups, uiPermissionsById.deploy.value);
2336
- const canReadDeployments = uiPermissions.deployments.includes(uiPermissionsById.read.value);
2051
+ const canTroubleshoot = hasPermission(uiPermissions.groups, import_constants3.uiPermissionsById.connect.value);
2052
+ const canManageDevices = hasPermission(uiPermissions.groups, import_constants3.uiPermissionsById.manage.value);
2053
+ const canConfigure = hasPermission(uiPermissions.groups, import_constants3.uiPermissionsById.configure.value);
2054
+ const canDeploy = uiPermissions.deployments.includes(import_constants3.uiPermissionsById.deploy.value) || hasPermission(uiPermissions.groups, import_constants3.uiPermissionsById.deploy.value);
2055
+ const canReadDeployments = uiPermissions.deployments.includes(import_constants3.uiPermissionsById.read.value);
2337
2056
  return {
2338
2057
  canAuditlog,
2339
2058
  canConfigure,
@@ -2384,11 +2103,11 @@ var getTenantCapabilities = (0, import_toolkit15.createSelector)(
2384
2103
  var getFilterAttributes = (0, import_toolkit15.createSelector)(
2385
2104
  [getGlobalSettings, getFilteringAttributes],
2386
2105
  ({ previousFilters }, { identityAttributes, inventoryAttributes, systemAttributes, tagAttributes }) => {
2387
- const deviceNameAttribute = { key: "name", value: "Name", scope: ATTRIBUTE_SCOPES.tags, category: ATTRIBUTE_SCOPES.tags, priority: 1 };
2388
- const deviceIdAttribute = { key: "id", value: "Device ID", scope: ATTRIBUTE_SCOPES.identity, category: ATTRIBUTE_SCOPES.identity, priority: 1 };
2389
- const checkInAttribute = { key: "check_in_time", value: "Latest activity", scope: ATTRIBUTE_SCOPES.system, category: ATTRIBUTE_SCOPES.system, priority: 4 };
2106
+ const deviceNameAttribute = { key: "name", value: "Name", scope: import_constants3.ATTRIBUTE_SCOPES.tags, category: import_constants3.ATTRIBUTE_SCOPES.tags, priority: 1 };
2107
+ const deviceIdAttribute = { key: "id", value: "Device ID", scope: import_constants3.ATTRIBUTE_SCOPES.identity, category: import_constants3.ATTRIBUTE_SCOPES.identity, priority: 1 };
2108
+ const checkInAttribute = { key: "check_in_time", value: "Latest activity", scope: import_constants3.ATTRIBUTE_SCOPES.system, category: import_constants3.ATTRIBUTE_SCOPES.system, priority: 4 };
2390
2109
  const updateAttribute = { ...checkInAttribute, key: "updated_ts", value: "Last inventory update" };
2391
- const firstRequestAttribute = { key: "created_ts", value: "First request", scope: ATTRIBUTE_SCOPES.system, category: ATTRIBUTE_SCOPES.system, priority: 4 };
2110
+ const firstRequestAttribute = { key: "created_ts", value: "First request", scope: import_constants3.ATTRIBUTE_SCOPES.system, category: import_constants3.ATTRIBUTE_SCOPES.system, priority: 4 };
2392
2111
  const attributes = [
2393
2112
  ...previousFilters.map((item) => ({
2394
2113
  ...item,
@@ -2398,13 +2117,13 @@ var getFilterAttributes = (0, import_toolkit15.createSelector)(
2398
2117
  })),
2399
2118
  deviceNameAttribute,
2400
2119
  deviceIdAttribute,
2401
- ...identityAttributes.map((item) => ({ key: item, value: item, scope: ATTRIBUTE_SCOPES.identity, category: ATTRIBUTE_SCOPES.identity, priority: 1 })),
2402
- ...inventoryAttributes.map((item) => ({ key: item, value: item, scope: ATTRIBUTE_SCOPES.inventory, category: ATTRIBUTE_SCOPES.inventory, priority: 2 })),
2403
- ...tagAttributes.map((item) => ({ key: item, value: item, scope: ATTRIBUTE_SCOPES.tags, category: ATTRIBUTE_SCOPES.tags, priority: 3 })),
2120
+ ...identityAttributes.map((item) => ({ key: item, value: item, scope: import_constants3.ATTRIBUTE_SCOPES.identity, category: import_constants3.ATTRIBUTE_SCOPES.identity, priority: 1 })),
2121
+ ...inventoryAttributes.map((item) => ({ key: item, value: item, scope: import_constants3.ATTRIBUTE_SCOPES.inventory, category: import_constants3.ATTRIBUTE_SCOPES.inventory, priority: 2 })),
2122
+ ...tagAttributes.map((item) => ({ key: item, value: item, scope: import_constants3.ATTRIBUTE_SCOPES.tags, category: import_constants3.ATTRIBUTE_SCOPES.tags, priority: 3 })),
2404
2123
  checkInAttribute,
2405
2124
  updateAttribute,
2406
2125
  firstRequestAttribute,
2407
- ...systemAttributes.map((item) => ({ key: item, value: item, scope: ATTRIBUTE_SCOPES.system, category: ATTRIBUTE_SCOPES.system, priority: 4 }))
2126
+ ...systemAttributes.map((item) => ({ key: item, value: item, scope: import_constants3.ATTRIBUTE_SCOPES.system, category: import_constants3.ATTRIBUTE_SCOPES.system, priority: 4 }))
2408
2127
  ];
2409
2128
  return (0, import_helpers5.attributeDuplicateFilter)(attributes, "key");
2410
2129
  }
@@ -2446,7 +2165,7 @@ var getSelectedDeploymentData = (0, import_toolkit15.createSelector)(
2446
2165
  );
2447
2166
  var getAvailableIssueOptionsByType = (0, import_toolkit15.createSelector)(
2448
2167
  [getFeatures, getTenantCapabilities, getIssueCountsByType],
2449
- ({ hasReporting }, { hasFullFiltering, hasMonitor }, issueCounts) => Object.values(DEVICE_ISSUE_OPTIONS).reduce((accu, { isCategory, key, needsFullFiltering, needsMonitor, needsReporting, title }) => {
2168
+ ({ hasReporting }, { hasFullFiltering, hasMonitor }, issueCounts) => Object.values(import_constants3.DEVICE_ISSUE_OPTIONS).reduce((accu, { isCategory, key, needsFullFiltering, needsMonitor, needsReporting, title }) => {
2450
2169
  if (isCategory || needsReporting && !hasReporting || needsFullFiltering && !hasFullFiltering || needsMonitor && !hasMonitor) {
2451
2170
  return accu;
2452
2171
  }
@@ -2454,14 +2173,11 @@ var getAvailableIssueOptionsByType = (0, import_toolkit15.createSelector)(
2454
2173
  return accu;
2455
2174
  }, {})
2456
2175
  );
2457
- var getGroupNames = (0, import_toolkit15.createSelector)([getGroupsById, getUserRoles, (_, options = {}) => options], (groupsById, { uiPermissions }, { staticOnly }) => {
2176
+ var getGroupNames = (0, import_toolkit15.createSelector)([getGroupsById, getUserRoles], (groupsById, { uiPermissions }) => {
2458
2177
  const { [UNGROUPED_GROUP.id]: ungrouped, ...groups } = groupsById;
2459
- if (staticOnly) {
2460
- return Object.keys(uiPermissions.groups).sort();
2461
- }
2462
2178
  return Object.keys(
2463
2179
  Object.entries(groups).reduce((accu, [groupName, group]) => {
2464
- if (group.filterId || uiPermissions.groups[ALL_DEVICES]) {
2180
+ if (group.filterId || uiPermissions.groups[import_constants3.ALL_DEVICES]) {
2465
2181
  accu[groupName] = group;
2466
2182
  }
2467
2183
  return accu;
@@ -2470,9 +2186,7 @@ var getGroupNames = (0, import_toolkit15.createSelector)([getGroupsById, getUser
2470
2186
  });
2471
2187
  var getDeviceReportsForUser = (0, import_toolkit15.createSelector)(
2472
2188
  [getUserSettings, getCurrentUser, getGlobalSettings, getDevicesById],
2473
- ({ reports }, { id: currentUserId }, globalSettings, devicesById) => {
2474
- return reports || globalSettings[`${currentUserId}-reports`] || (Object.keys(devicesById).length ? defaultReports : []);
2475
- }
2189
+ ({ reports }, { id: currentUserId }, globalSettings, devicesById) => reports || globalSettings[`${currentUserId}-reports`] || (Object.keys(devicesById).length ? defaultReports : [])
2476
2190
  );
2477
2191
  var listTypeDeviceIdMap = {
2478
2192
  deviceList: getListedDevices,
@@ -2496,14 +2210,14 @@ var getAuditlogDevice = (0, import_toolkit15.createSelector)([getAuditLogEntry,
2496
2210
  var getRelevantRoles = (0, import_toolkit15.createSelector)([getOrganization, getRolesList], ({ service_provider }, roles) => {
2497
2211
  if (service_provider) {
2498
2212
  return roles.reduce((accu, role) => {
2499
- if (rolesById[role.value]) {
2213
+ if (import_constants3.rolesById[role.value]) {
2500
2214
  return accu;
2501
2215
  }
2502
2216
  accu.push(role);
2503
2217
  return accu;
2504
- }, Object.values(serviceProviderRolesById));
2218
+ }, Object.values(import_constants3.serviceProviderRolesById));
2505
2219
  }
2506
- return Object.keys(rolesById).reverse().reduce((accu, key) => {
2220
+ return Object.keys(import_constants3.rolesById).reverse().reduce((accu, key) => {
2507
2221
  const index = accu.findIndex(({ value }) => value === key);
2508
2222
  accu = [accu[index], ...accu.filter((item, itemIndex) => index !== itemIndex)];
2509
2223
  return accu;
@@ -2514,6 +2228,7 @@ var getRelevantRoles = (0, import_toolkit15.createSelector)([getOrganization, ge
2514
2228
  var import_react_redux = require("react-redux");
2515
2229
  var import_helpers6 = require("@northern.tech/utils/helpers");
2516
2230
  var import_toolkit16 = require("@reduxjs/toolkit");
2231
+ var import_react = require("@sentry/react");
2517
2232
  var { setSnackbar, uploadProgress } = actions_default;
2518
2233
  var keys = ["sessionDeploymentChecker", settingsKeys.initialized];
2519
2234
  var resetEnvironment = () => keys.forEach((key) => window.sessionStorage.removeItem(key));
@@ -2550,20 +2265,50 @@ var rejectionLoggerMiddleware = () => (next) => (action) => {
2550
2265
  }
2551
2266
  return next(action);
2552
2267
  };
2268
+ var tracingActionIgnoreList = [actions8.successfullyLoggedIn.type, "users/loginUser/pending", "users/loginUser/fulfilled", "users/loginUser/rejected"];
2269
+ var sentryReduxEnhancer = (0, import_react.createReduxEnhancer)({
2270
+ actionTransformer: (action) => {
2271
+ if (tracingActionIgnoreList.includes(action.type)) {
2272
+ return null;
2273
+ }
2274
+ return action;
2275
+ },
2276
+ // Transform the state to remove sensitive information
2277
+ stateTransformer: (state) => {
2278
+ const transformedState = {
2279
+ ...state,
2280
+ users: { ...state.users, currentSession: null },
2281
+ organization: {
2282
+ ...state.organization,
2283
+ organization: {
2284
+ ...state.organization.organization,
2285
+ tenant_token: null
2286
+ }
2287
+ }
2288
+ };
2289
+ return transformedState;
2290
+ }
2291
+ });
2553
2292
  var getConfiguredStore = (options = {}) => {
2554
2293
  const { preloadedState = {}, ...config } = options;
2555
2294
  return (0, import_toolkit16.configureStore)({
2556
2295
  ...config,
2557
2296
  preloadedState,
2297
+ enhancers: (getDefaultEnhancers) => {
2298
+ if (window.mender_environment?.sentry?.isReduxEnabled) {
2299
+ return getDefaultEnhancers().concat(sentryReduxEnhancer);
2300
+ }
2301
+ return getDefaultEnhancers();
2302
+ },
2558
2303
  reducer: sessionReducer,
2559
2304
  middleware: (getDefaultMiddleware) => getDefaultMiddleware({
2560
2305
  immutableCheck: {
2561
2306
  ignoredPaths: ["app.uploadsById"]
2562
2307
  },
2563
2308
  serializableCheck: {
2564
- ignoredActions: [actions6.receiveExternalDeviceIntegrations.name, setSnackbar.name, uploadProgress.name],
2565
- ignoredActionPaths: ["uploads", "snackbar", /payload\..*$/],
2566
- ignoredPaths: ["app.uploadsById", "app.snackbar", "organization.externalDeviceIntegrations"]
2309
+ ignoredActions: [actions6.receiveExternalDeviceIntegrations.name, uploadProgress.name],
2310
+ ignoredActionPaths: ["uploads", /payload\..*$/, "meta.arg.file", "meta.arg.integration.configHint"],
2311
+ ignoredPaths: ["app.uploadsById", "organization.externalDeviceIntegrations"]
2567
2312
  }
2568
2313
  }).concat(rejectionLoggerMiddleware)
2569
2314
  });
@@ -2571,69 +2316,77 @@ var getConfiguredStore = (options = {}) => {
2571
2316
  var store = getConfiguredStore({
2572
2317
  preloadedState: {}
2573
2318
  });
2319
+ var createAppAsyncThunk = import_toolkit16.createAsyncThunk.withTypes();
2574
2320
 
2575
2321
  // src/monitorSlice/thunks.ts
2576
- var import_toolkit17 = require("@reduxjs/toolkit");
2577
- var { page: defaultPage, perPage: defaultPerPage } = DEVICE_LIST_DEFAULTS;
2322
+ var { page: defaultPage, perPage: defaultPerPage } = import_constants3.DEVICE_LIST_DEFAULTS;
2578
2323
  var cutoffLength = 75;
2579
2324
  var ellipsis = "...";
2580
2325
  var longTextTrimmer = (text) => text.length >= cutoffLength + ellipsis.length ? `${text.substring(0, cutoffLength + ellipsis.length)}${ellipsis}` : text;
2581
- var sanitizeDeviceAlerts = (alerts) => alerts.map((alert) => ({ ...alert, fullName: alert.name, name: longTextTrimmer(alert.name) }));
2582
- var getDeviceAlerts = (0, import_toolkit17.createAsyncThunk)(`${sliceName4}/getDeviceAlerts`, ({ id, config = {} }, { dispatch }) => {
2326
+ var sanitizeDeviceAlerts = (alerts) => alerts.map((alert) => ({ ...alert, fullName: alert.name, name: longTextTrimmer(alert.name || "") }));
2327
+ var getDeviceAlerts = createAppAsyncThunk(`${sliceName}/getDeviceAlerts`, ({ id, config = {} }, { dispatch }) => {
2583
2328
  const { page = defaultPage, perPage = defaultPerPage, issuedBefore, issuedAfter, sortAscending = false } = config;
2584
2329
  const issued_after = issuedAfter ? `&issued_after=${issuedAfter}` : "";
2585
2330
  const issued_before = issuedBefore ? `&issued_before=${issuedBefore}` : "";
2586
- return general_api_default.get(`${monitorApiUrlv1}/devices/${id}/alerts?page=${page}&per_page=${perPage}${issued_after}${issued_before}&sort_ascending=${sortAscending}`).catch((err) => commonErrorHandler(err, `Retrieving device alerts for device ${id} failed:`, dispatch)).then(
2331
+ return general_api_default.get(
2332
+ `${import_constants3.monitorApiUrlv1}/devices/${id}/alerts?page=${page}&per_page=${perPage}${issued_after}${issued_before}&sort_ascending=${sortAscending}`
2333
+ ).catch((err) => commonErrorHandler(err, `Retrieving device alerts for device ${id} failed:`, dispatch)).then(
2587
2334
  (res) => Promise.all([
2588
- dispatch(actions4.receiveDeviceAlerts({ deviceId: id, alerts: sanitizeDeviceAlerts(res.data) })),
2589
- dispatch(actions4.setAlertListState({ total: Number(res.headers[headerNames.total]) }))
2335
+ dispatch(actions.receiveDeviceAlerts({ deviceId: id, alerts: sanitizeDeviceAlerts(res.data) })),
2336
+ dispatch(actions.setAlertListState({ total: Number(res.headers[import_constants3.headerNames.total]) }))
2590
2337
  ])
2591
2338
  );
2592
2339
  });
2593
- var getLatestDeviceAlerts = (0, import_toolkit17.createAsyncThunk)(`${sliceName4}/getLatestDeviceAlerts`, ({ id, config = {} }, { dispatch }) => {
2594
- const { page = defaultPage, perPage = 10 } = config;
2595
- return general_api_default.get(`${monitorApiUrlv1}/devices/${id}/alerts/latest?page=${page}&per_page=${perPage}`).catch((err) => commonErrorHandler(err, `Retrieving device alerts for device ${id} failed:`, dispatch)).then((res) => Promise.resolve(dispatch(actions4.receiveLatestDeviceAlerts({ deviceId: id, alerts: sanitizeDeviceAlerts(res.data) }))));
2596
- });
2597
- var getIssueCountsByType2 = (0, import_toolkit17.createAsyncThunk)(`${sliceName4}/getIssueCountsByType`, ({ type, options = {} }, { dispatch, getState }) => {
2598
- const state = getState();
2599
- const { filters = getDeviceFilters(state), group, status, ...remainder } = options;
2600
- const { applicableFilters: nonMonitorFilters, filterTerms } = convertDeviceListStateToFilters({
2601
- ...remainder,
2602
- filters,
2603
- group,
2604
- offlineThreshold: state.app.offlineThreshold,
2605
- selectedIssues: [type],
2606
- status
2607
- });
2608
- return general_api_default.post(getSearchEndpoint(getState()), {
2609
- page: 1,
2610
- per_page: 1,
2611
- filters: filterTerms,
2612
- attributes: [{ scope: "identity", attribute: "status" }]
2613
- }).catch((err) => commonErrorHandler(err, `Retrieving issue counts failed:`, dispatch, commonErrorFallback)).then((res) => {
2614
- const total = nonMonitorFilters.length ? state.monitor.issueCounts.byType[type].total : Number(res.headers[headerNames.total]);
2615
- const filtered = nonMonitorFilters.length ? Number(res.headers[headerNames.total]) : total;
2616
- if (total === state.monitor.issueCounts.byType[type].total && filtered === state.monitor.issueCounts.byType[type].filtered) {
2617
- return Promise.resolve();
2618
- }
2619
- return Promise.resolve(dispatch(actions4.receiveDeviceIssueCounts({ counts: { filtered, total }, issueType: type })));
2620
- });
2621
- });
2622
- var getDeviceMonitorConfig = (0, import_toolkit17.createAsyncThunk)(
2623
- `${sliceName4}/getDeviceMonitorConfig`,
2624
- (id, { dispatch }) => general_api_default.get(`${monitorApiUrlv1}/devices/${id}/config`).catch((err) => commonErrorHandler(err, `Retrieving device monitor config for device ${id} failed:`, dispatch)).then(({ data }) => Promise.all([dispatch(actions_default.receivedDevice({ id, monitors: data }), Promise.resolve(data))]))
2340
+ var getLatestDeviceAlerts = createAppAsyncThunk(
2341
+ `${sliceName}/getLatestDeviceAlerts`,
2342
+ ({ id, config = {} }, { dispatch }) => {
2343
+ const { page = defaultPage, perPage = 10 } = config;
2344
+ return general_api_default.get(`${import_constants3.monitorApiUrlv1}/devices/${id}/alerts/latest?page=${page}&per_page=${perPage}`).catch((err) => commonErrorHandler(err, `Retrieving device alerts for device ${id} failed:`, dispatch)).then((res) => Promise.resolve(dispatch(actions.receiveLatestDeviceAlerts({ deviceId: id, alerts: sanitizeDeviceAlerts(res.data) }))));
2345
+ }
2625
2346
  );
2626
- var changeNotificationSetting = (0, import_toolkit17.createAsyncThunk)(
2627
- `${sliceName4}/changeNotificationSetting`,
2628
- ({ enabled, channel = alertChannels.email }, { dispatch }) => {
2629
- return general_api_default.put(`${monitorApiUrlv1}/settings/global/channel/alerts/${channel}/status`, { enabled }).catch((err) => commonErrorHandler(err, `${enabled ? "En" : "Dis"}abling ${channel} alerts failed:`, dispatch)).then(
2630
- () => Promise.all([
2631
- dispatch(actions4.changeAlertChannel({ channel, enabled })),
2632
- dispatch(actions_default.setSnackbar(`Successfully ${enabled ? "en" : "dis"}abled ${channel} alerts`, TIMEOUTS.fiveSeconds))
2633
- ])
2634
- );
2347
+ var getIssueCountsByType2 = createAppAsyncThunk(
2348
+ `${sliceName}/getIssueCountsByType`,
2349
+ ({ type, options = {} }, { dispatch, getState }) => {
2350
+ const state = getState();
2351
+ const { filters = getDeviceFilters(state), group, status, ...remainder } = options;
2352
+ const { applicableFilters: nonMonitorFilters, filterTerms } = convertDeviceListStateToFilters({
2353
+ ...remainder,
2354
+ filters,
2355
+ group,
2356
+ offlineThreshold: state.app.offlineThreshold,
2357
+ selectedIssues: [type],
2358
+ status
2359
+ });
2360
+ return general_api_default.post(getSearchEndpoint(getState()), {
2361
+ page: 1,
2362
+ per_page: 1,
2363
+ filters: filterTerms,
2364
+ attributes: [{ scope: "identity", attribute: "status" }]
2365
+ }).catch((err) => commonErrorHandler(err, `Retrieving issue counts failed:`, dispatch, commonErrorFallback)).then((res) => {
2366
+ const total = nonMonitorFilters.length ? state.monitor.issueCounts.byType[type].total : Number(res.headers[import_constants3.headerNames.total]);
2367
+ const filtered = nonMonitorFilters.length ? Number(res.headers[import_constants3.headerNames.total]) : total;
2368
+ if (total === state.monitor.issueCounts.byType[type].total && filtered === state.monitor.issueCounts.byType[type].filtered) {
2369
+ return Promise.resolve();
2370
+ }
2371
+ return Promise.resolve(dispatch(actions.receiveDeviceIssueCounts({ counts: { filtered, total }, issueType: type })));
2372
+ });
2635
2373
  }
2636
2374
  );
2375
+ var getDeviceMonitorConfig = createAppAsyncThunk(
2376
+ `${sliceName}/getDeviceMonitorConfig`,
2377
+ (id, { dispatch }) => general_api_default.get(`${import_constants3.monitorApiUrlv1}/devices/${id}/config`).catch((err) => commonErrorHandler(err, `Retrieving device monitor config for device ${id} failed:`, dispatch)).then(({ data }) => Promise.all([dispatch(actions_default.receivedDevice({ id, monitors: data }), Promise.resolve(data))]))
2378
+ );
2379
+ var changeNotificationSetting = createAppAsyncThunk(
2380
+ `${sliceName}/changeNotificationSetting`,
2381
+ ({ enabled, channel = import_constants3.alertChannels.email }, { dispatch }) => general_api_default.put(`${import_constants3.monitorApiUrlv1}/settings/global/channel/alerts/${channel}/status`, { enabled }).catch((err) => commonErrorHandler(err, `${enabled ? "En" : "Dis"}abling ${channel} alerts failed:`, dispatch)).then(
2382
+ () => Promise.all([
2383
+ dispatch(actions.changeAlertChannel({ channel, enabled })),
2384
+ dispatch(
2385
+ actions_default.setSnackbar({ message: `Successfully ${enabled ? "en" : "dis"}abled ${channel} alerts`, autoHideDuration: TIMEOUTS.fiveSeconds })
2386
+ )
2387
+ ])
2388
+ )
2389
+ );
2637
2390
  // Annotate the CommonJS export names for ESM import in node:
2638
2391
  0 && (module.exports = {
2639
2392
  changeNotificationSetting,