@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
package/dist/utils.cjs CHANGED
@@ -21,6 +21,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var utils_exports = {};
22
22
  __export(utils_exports, {
23
23
  convertDeviceListStateToFilters: () => convertDeviceListStateToFilters,
24
+ ensureVersionString: () => ensureVersionString,
25
+ extractErrorMessage: () => extractErrorMessage,
24
26
  filtersFilter: () => filtersFilter,
25
27
  generateDeploymentGroupDetails: () => generateDeploymentGroupDetails,
26
28
  getComparisonCompatibleVersion: () => getComparisonCompatibleVersion,
@@ -34,6 +36,7 @@ __export(utils_exports, {
34
36
  mapTermsToFilters: () => mapTermsToFilters,
35
37
  mapUserRolesToUiPermissions: () => mapUserRolesToUiPermissions,
36
38
  mergePermissions: () => mergePermissions,
39
+ parseSubscriptionPreview: () => parseSubscriptionPreview,
37
40
  progress: () => progress,
38
41
  statCollector: () => statCollector,
39
42
  stringToBoolean: () => stringToBoolean
@@ -41,226 +44,8 @@ __export(utils_exports, {
41
44
  module.exports = __toCommonJS(utils_exports);
42
45
  var import_helpers = require("@northern.tech/utils/helpers");
43
46
 
44
- // src/commonConstants.tsx
45
- var import_js = require("@mdi/js");
46
- var import_jsx_runtime = require("react/jsx-runtime");
47
- var DEVICE_LIST_DEFAULTS = {
48
- page: 1,
49
- perPage: 20
50
- };
51
- var timeUnits = {
52
- days: "days",
53
- minutes: "minutes",
54
- hours: "hours"
55
- };
56
- var DEVICE_LIST_MAXIMUM_LENGTH = 50;
57
- var DEVICE_FILTERING_OPTIONS = {
58
- $eq: { key: "$eq", title: "equals", shortform: "=" },
59
- $ne: { key: "$ne", title: "not equal", shortform: "!=" },
60
- $gt: {
61
- key: "$gt",
62
- title: ">",
63
- shortform: ">",
64
- 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.'
65
- },
66
- $gte: {
67
- title: ">=",
68
- shortform: ">=",
69
- 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.'
70
- },
71
- $lt: {
72
- key: "$lt",
73
- title: "<",
74
- shortform: "<",
75
- 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.'
76
- },
77
- $lte: {
78
- title: "<=",
79
- shortform: "<=",
80
- 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.'
81
- },
82
- $ltne: {
83
- key: "$ltne",
84
- title: "$ltne",
85
- shortform: "ltne",
86
- 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.'
87
- },
88
- $in: {
89
- key: "$in",
90
- title: "in",
91
- shortform: "in",
92
- 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.'
93
- },
94
- $nin: {
95
- key: "$nin",
96
- title: "not in",
97
- shortform: "not in",
98
- 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.`
99
- },
100
- $exists: {
101
- key: "$exists",
102
- title: "exists",
103
- shortform: "exists",
104
- value: true,
105
- help: `The "exists" operator matches if the selected field's value has a value. No value needs to be provided for this operator.`
106
- },
107
- $nexists: {
108
- key: "$nexists",
109
- title: `doesn't exist`,
110
- shortform: `doesn't exist`,
111
- value: true,
112
- 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.`
113
- },
114
- $regex: {
115
- key: "$regex",
116
- title: `matches regular expression`,
117
- shortform: `matches`,
118
- 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.`
119
- }
120
- };
121
- var DEVICE_ISSUE_OPTIONS = {
122
- issues: {
123
- isCategory: true,
124
- key: "issues",
125
- title: "Devices with issues",
126
- filterRule: {}
127
- },
128
- offline: {
129
- issueCategory: "issues",
130
- key: "offline",
131
- needsFullFiltering: true,
132
- needsMonitor: false,
133
- needsReporting: false,
134
- filterRule: {
135
- scope: "system",
136
- key: "check_in_time",
137
- operator: DEVICE_FILTERING_OPTIONS.$ltne.key,
138
- value: ({ offlineThreshold }) => offlineThreshold
139
- },
140
- title: "Offline devices"
141
- },
142
- failedLastUpdate: {
143
- issueCategory: "issues",
144
- key: "failedLastUpdate",
145
- needsFullFiltering: false,
146
- needsMonitor: false,
147
- needsReporting: true,
148
- filterRule: { scope: "monitor", key: "failed_last_update", operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: true },
149
- title: "Deployment failed"
150
- },
151
- monitoring: {
152
- issueCategory: "issues",
153
- key: "monitoring",
154
- needsFullFiltering: false,
155
- needsMonitor: true,
156
- needsReporting: false,
157
- filterRule: { scope: "monitor", key: "alerts", operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: true },
158
- title: "Monitoring alert"
159
- },
160
- authRequests: {
161
- key: "authRequests",
162
- needsFullFiltering: false,
163
- needsMonitor: false,
164
- needsReporting: true,
165
- filterRule: { scope: "monitor", key: "auth_requests", operator: DEVICE_FILTERING_OPTIONS.$gt.key, value: 1 },
166
- title: "Devices with new authentication requests"
167
- },
168
- gatewayDevices: {
169
- key: "gatewayDevices",
170
- needsFullFiltering: false,
171
- needsMonitor: false,
172
- needsReporting: true,
173
- filterRule: { scope: "inventory", key: "mender_is_gateway", operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: "true" },
174
- title: "Gateway devices"
175
- }
176
- };
177
- var oneSecond = 1e3;
178
- var TIMEOUTS = {
179
- debounceDefault: 700,
180
- debounceShort: 300,
181
- halfASecond: 0.5 * oneSecond,
182
- oneSecond,
183
- twoSeconds: 2 * oneSecond,
184
- threeSeconds: 3 * oneSecond,
185
- fiveSeconds: 5 * oneSecond,
186
- refreshDefault: 10 * oneSecond,
187
- refreshLong: 60 * oneSecond
188
- };
189
- var SORTING_OPTIONS = {
190
- asc: "asc",
191
- desc: "desc"
192
- };
193
- var DEVICE_ONLINE_CUTOFF = { interval: 1, intervalName: timeUnits.days };
194
- var ATTRIBUTE_SCOPES = {
195
- inventory: "inventory",
196
- identity: "identity",
197
- monitor: "monitor",
198
- system: "system",
199
- tags: "tags"
200
- };
201
- var defaultIdAttribute = Object.freeze({ attribute: "id", scope: ATTRIBUTE_SCOPES.identity });
202
- var credentialTypes = {
203
- aws: "aws",
204
- http: "http",
205
- sas: "sas",
206
- x509: "x509"
207
- };
208
- var EXTERNAL_PROVIDER = {
209
- "iot-core": {
210
- credentialsType: credentialTypes.aws,
211
- icon: import_js.mdiAws,
212
- title: "AWS IoT Core",
213
- twinTitle: "Device Shadow",
214
- provider: "iot-core",
215
- enabled: true,
216
- deviceTwin: true,
217
- configHint: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: "For help finding your AWS IoT Core connection string, check the AWS IoT documentation." })
218
- },
219
- "iot-hub": {
220
- credentialsType: credentialTypes.sas,
221
- icon: import_js.mdiMicrosoftAzure,
222
- title: "Azure IoT Hub",
223
- twinTitle: "Device Twin",
224
- provider: "iot-hub",
225
- enabled: true,
226
- deviceTwin: true,
227
- configHint: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
228
- "For help finding your Azure IoT Hub connection string, look under 'Shared access policies' in the Microsoft Azure UI as described",
229
- " ",
230
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
231
- "a",
232
- {
233
- href: "https://devblogs.microsoft.com/iotdev/understand-different-connection-strings-in-azure-iot-hub/#iothubconn",
234
- target: "_blank",
235
- rel: "noopener noreferrer",
236
- children: "here"
237
- }
238
- ),
239
- "."
240
- ] })
241
- },
242
- webhook: {
243
- credentialsType: credentialTypes.http,
244
- deviceTwin: false,
245
- // disable the webhook provider here, since it is treated different than other integrations, with a custom configuration & management view, etc.
246
- enabled: false,
247
- provider: "webhook"
248
- }
249
- };
250
- var emptyUiPermissions = Object.freeze({
251
- auditlog: [],
252
- deployments: [],
253
- groups: Object.freeze({}),
254
- releases: Object.freeze({}),
255
- tenantManagement: [],
256
- userManagement: []
257
- });
258
- var emptyRole = Object.freeze({
259
- name: void 0,
260
- description: "",
261
- permissions: [],
262
- uiPermissions: Object.freeze({ ...emptyUiPermissions })
263
- });
47
+ // src/constants.ts
48
+ var import_constants4 = require("@northern.tech/utils/constants");
264
49
 
265
50
  // src/appSlice/constants.ts
266
51
  var import_icons_material = require("@mui/icons-material");
@@ -268,11 +53,6 @@ var startingDeviceCount = {
268
53
  os: "for first 50 devices",
269
54
  professional: "for first 250 devices"
270
55
  };
271
- var apiRoot = "/api/management";
272
- var apiUrl = {
273
- v1: `${apiRoot}/v1`,
274
- v2: `${apiRoot}/v2`
275
- };
276
56
  var chartTypes = {
277
57
  bar: { key: "bar", Icon: import_icons_material.BarChart },
278
58
  pie: { key: "pie", Icon: import_icons_material.PieChartOutline }
@@ -284,28 +64,30 @@ var PLANS = {
284
64
  os: {
285
65
  id: "os",
286
66
  name: "Basic",
67
+ minimalDeviceCount: 50,
287
68
  offer: true,
288
- price: "$32 / month",
69
+ price: "$34 / month",
289
70
  deviceCount: startingDeviceCount.os,
290
- offerprice: "$23 / month for first 50 devices",
291
- price2: "for first 6 months;\n$29/month thereafter",
71
+ 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.",
292
72
  features: ["Access to core features of Mender", "Basic support"]
293
73
  },
294
74
  professional: {
295
75
  id: "professional",
296
76
  name: "Professional",
77
+ minimalDeviceCount: 250,
297
78
  offer: true,
298
- price: "$269 / month",
79
+ price: "$291 / month",
299
80
  deviceCount: startingDeviceCount.professional,
300
- offerprice: "$200 / month for first 50 devices",
301
- price2: "for first 6 months;\n$249/month thereafter",
81
+ description: "Everything in Basic, plus enhanced update management and automation features.",
302
82
  features: ["Advanced OTA features", "Higher priority support"]
303
83
  },
304
84
  enterprise: {
305
85
  id: "enterprise",
306
86
  name: "Enterprise",
87
+ minimalDeviceCount: 1e3,
307
88
  price: "Custom pricing",
308
89
  deviceCount: "Unlimited devices",
90
+ 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.",
309
91
  features: ["All Mender features", "Advanced security features", "SLA-backed support"]
310
92
  }
311
93
  };
@@ -325,21 +107,6 @@ var ADDONS = {
325
107
  },
326
108
  eligible: ["os", "professional", "enterprise"]
327
109
  },
328
- troubleshoot: {
329
- id: "troubleshoot",
330
- title: "Troubleshoot",
331
- description: "Expand your plan with device troubleshooting features",
332
- needs: ["hasDeviceConnect"],
333
- os: {
334
- price: "$27/month",
335
- deviceCount: startingDeviceCount.os
336
- },
337
- professional: {
338
- price: "$72/month",
339
- deviceCount: startingDeviceCount.professional
340
- },
341
- eligible: ["os", "professional", "enterprise"]
342
- },
343
110
  monitor: {
344
111
  id: "monitor",
345
112
  title: "Monitor",
@@ -354,6 +121,21 @@ var ADDONS = {
354
121
  deviceCount: startingDeviceCount.professional
355
122
  },
356
123
  eligible: ["professional", "enterprise"]
124
+ },
125
+ troubleshoot: {
126
+ id: "troubleshoot",
127
+ title: "Troubleshoot",
128
+ description: "Expand your plan with device troubleshooting features",
129
+ needs: ["hasDeviceConnect"],
130
+ os: {
131
+ price: "$27/month",
132
+ deviceCount: startingDeviceCount.os
133
+ },
134
+ professional: {
135
+ price: "$72/month",
136
+ deviceCount: startingDeviceCount.professional
137
+ },
138
+ eligible: ["os", "professional", "enterprise"]
357
139
  }
358
140
  };
359
141
  var BENEFITS = {
@@ -392,10 +174,344 @@ var BENEFITS = {
392
174
  };
393
175
  var DARK_MODE = "dark";
394
176
 
177
+ // src/commonConstants.tsx
178
+ var import_js = require("@mdi/js");
179
+ var import_MenderTypes = require("@northern.tech/types/MenderTypes");
180
+ var import_jsx_runtime = require("react/jsx-runtime");
181
+ var timeUnits = {
182
+ days: "days",
183
+ minutes: "minutes",
184
+ hours: "hours"
185
+ };
186
+ var DEVICE_LIST_MAXIMUM_LENGTH = 50;
187
+ var oneSecond = 1e3;
188
+ var TIMEOUTS = {
189
+ debounceDefault: 700,
190
+ debounceShort: 300,
191
+ halfASecond: 0.5 * oneSecond,
192
+ oneSecond,
193
+ twoSeconds: 2 * oneSecond,
194
+ threeSeconds: 3 * oneSecond,
195
+ fiveSeconds: 5 * oneSecond,
196
+ refreshDefault: 10 * oneSecond,
197
+ refreshLong: 60 * oneSecond
198
+ };
199
+ var DEVICE_ONLINE_CUTOFF = { interval: 1, intervalName: timeUnits.days };
200
+ var defaultIdAttribute = Object.freeze({ attribute: "id", scope: import_constants4.ATTRIBUTE_SCOPES.identity });
201
+ var credentialTypes = {
202
+ aws: import_MenderTypes.Credentials.type.AWS,
203
+ http: import_MenderTypes.Credentials.type.HTTP,
204
+ sas: import_MenderTypes.Credentials.type.SAS,
205
+ x509: "x509"
206
+ };
207
+ var EXTERNAL_PROVIDER = {
208
+ "iot-core": {
209
+ credentialsType: credentialTypes.aws,
210
+ icon: import_js.mdiAws,
211
+ title: "AWS IoT Core",
212
+ twinTitle: "Device Shadow",
213
+ provider: "iot-core",
214
+ enabled: true,
215
+ deviceTwin: true,
216
+ configHint: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: "For help finding your AWS IoT Core connection string, check the AWS IoT documentation." })
217
+ },
218
+ "iot-hub": {
219
+ credentialsType: credentialTypes.sas,
220
+ icon: import_js.mdiMicrosoftAzure,
221
+ title: "Azure IoT Hub",
222
+ twinTitle: "Device Twin",
223
+ provider: "iot-hub",
224
+ enabled: true,
225
+ deviceTwin: true,
226
+ configHint: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
227
+ "For help finding your Azure IoT Hub connection string, look under 'Shared access policies' in the Microsoft Azure UI as described",
228
+ " ",
229
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
230
+ "a",
231
+ {
232
+ href: "https://devblogs.microsoft.com/iotdev/understand-different-connection-strings-in-azure-iot-hub/#iothubconn",
233
+ target: "_blank",
234
+ rel: "noopener noreferrer",
235
+ children: "here"
236
+ }
237
+ ),
238
+ "."
239
+ ] })
240
+ },
241
+ webhook: {
242
+ credentialsType: credentialTypes.http,
243
+ deviceTwin: false,
244
+ twinTitle: "",
245
+ // disable the webhook provider here, since it is treated different than other integrations, with a custom configuration & management view, etc.
246
+ enabled: false,
247
+ provider: "webhook"
248
+ }
249
+ };
250
+ var emptyWebhook = {
251
+ description: "",
252
+ provider: import_MenderTypes.Integration.provider.WEBHOOK,
253
+ credentials: {
254
+ type: EXTERNAL_PROVIDER.webhook.credentialsType,
255
+ [EXTERNAL_PROVIDER.webhook.credentialsType]: {
256
+ secret: "",
257
+ url: ""
258
+ }
259
+ }
260
+ };
261
+ var regionNames = new Intl.DisplayNames(["en"], { type: "region" });
262
+ var countries = [
263
+ "AD",
264
+ "AE",
265
+ "AF",
266
+ "AG",
267
+ "AI",
268
+ "AL",
269
+ "AM",
270
+ "AO",
271
+ "AQ",
272
+ "AR",
273
+ "AS",
274
+ "AT",
275
+ "AU",
276
+ "AW",
277
+ "AX",
278
+ "AZ",
279
+ "BA",
280
+ "BB",
281
+ "BD",
282
+ "BE",
283
+ "BF",
284
+ "BG",
285
+ "BH",
286
+ "BI",
287
+ "BJ",
288
+ "BL",
289
+ "BM",
290
+ "BN",
291
+ "BO",
292
+ "BR",
293
+ "BS",
294
+ "BT",
295
+ "BV",
296
+ "BW",
297
+ "BY",
298
+ "BZ",
299
+ "CA",
300
+ "CC",
301
+ "CD",
302
+ "CF",
303
+ "CG",
304
+ "CH",
305
+ "CI",
306
+ "CK",
307
+ "CL",
308
+ "CM",
309
+ "CN",
310
+ "CO",
311
+ "CR",
312
+ "CU",
313
+ "CV",
314
+ "CW",
315
+ "CX",
316
+ "CY",
317
+ "CZ",
318
+ "DE",
319
+ "DJ",
320
+ "DK",
321
+ "DM",
322
+ "DO",
323
+ "DZ",
324
+ "EC",
325
+ "EE",
326
+ "EG",
327
+ "EH",
328
+ "ER",
329
+ "ES",
330
+ "ET",
331
+ "FI",
332
+ "FJ",
333
+ "FK",
334
+ "FM",
335
+ "FO",
336
+ "FR",
337
+ "GA",
338
+ "GB",
339
+ "GD",
340
+ "GE",
341
+ "GF",
342
+ "GG",
343
+ "GH",
344
+ "GI",
345
+ "GL",
346
+ "GM",
347
+ "GN",
348
+ "GP",
349
+ "GQ",
350
+ "GR",
351
+ "GS",
352
+ "GT",
353
+ "GU",
354
+ "GW",
355
+ "GY",
356
+ "HK",
357
+ "HM",
358
+ "HN",
359
+ "HR",
360
+ "HT",
361
+ "HU",
362
+ "ID",
363
+ "IE",
364
+ "IL",
365
+ "IM",
366
+ "IN",
367
+ "IO",
368
+ "IQ",
369
+ "IR",
370
+ "IS",
371
+ "IT",
372
+ "JE",
373
+ "JM",
374
+ "JO",
375
+ "JP",
376
+ "KE",
377
+ "KG",
378
+ "KH",
379
+ "KI",
380
+ "KM",
381
+ "KN",
382
+ "KP",
383
+ "KR",
384
+ "KW",
385
+ "KY",
386
+ "KZ",
387
+ "LA",
388
+ "LB",
389
+ "LC",
390
+ "LI",
391
+ "LK",
392
+ "LR",
393
+ "LS",
394
+ "LT",
395
+ "LU",
396
+ "LV",
397
+ "LY",
398
+ "MA",
399
+ "MC",
400
+ "MD",
401
+ "ME",
402
+ "MF",
403
+ "MG",
404
+ "MH",
405
+ "MK",
406
+ "ML",
407
+ "MM",
408
+ "MN",
409
+ "MO",
410
+ "MP",
411
+ "MQ",
412
+ "MR",
413
+ "MS",
414
+ "MT",
415
+ "MU",
416
+ "MV",
417
+ "MW",
418
+ "MX",
419
+ "MY",
420
+ "MZ",
421
+ "NA",
422
+ "NC",
423
+ "NE",
424
+ "NF",
425
+ "NG",
426
+ "NI",
427
+ "NL",
428
+ "NO",
429
+ "NP",
430
+ "NR",
431
+ "NU",
432
+ "NZ",
433
+ "OM",
434
+ "PA",
435
+ "PE",
436
+ "PF",
437
+ "PG",
438
+ "PH",
439
+ "PK",
440
+ "PL",
441
+ "PM",
442
+ "PN",
443
+ "PR",
444
+ "PS",
445
+ "PT",
446
+ "PW",
447
+ "PY",
448
+ "QA",
449
+ "RE",
450
+ "RO",
451
+ "RS",
452
+ "RU",
453
+ "RW",
454
+ "SA",
455
+ "SB",
456
+ "SC",
457
+ "SD",
458
+ "SE",
459
+ "SG",
460
+ "SH",
461
+ "SI",
462
+ "SJ",
463
+ "SK",
464
+ "SL",
465
+ "SM",
466
+ "SN",
467
+ "SO",
468
+ "SR",
469
+ "SS",
470
+ "ST",
471
+ "SV",
472
+ "SX",
473
+ "SY",
474
+ "SZ",
475
+ "TC",
476
+ "TD",
477
+ "TF",
478
+ "TG",
479
+ "TH",
480
+ "TJ",
481
+ "TK",
482
+ "TL",
483
+ "TM",
484
+ "TN",
485
+ "TO",
486
+ "TR",
487
+ "TT",
488
+ "TV",
489
+ "TW",
490
+ "TZ",
491
+ "UA",
492
+ "UG",
493
+ "US",
494
+ "UY",
495
+ "UZ",
496
+ "VA",
497
+ "VC",
498
+ "VE",
499
+ "VG",
500
+ "VI",
501
+ "VN",
502
+ "VU",
503
+ "WF",
504
+ "WS",
505
+ "XK",
506
+ "YE",
507
+ "YT",
508
+ "ZA",
509
+ "ZM",
510
+ "ZW"
511
+ ].map((code) => ({ code, label: regionNames.of(code) })).sort((a, b) => a.label.localeCompare(b.label));
512
+
395
513
  // src/deploymentsSlice/constants.ts
396
514
  var alreadyInstalled = "already-installed";
397
- var deploymentsApiUrl = `${apiUrl.v1}/deployments`;
398
- var deploymentsApiUrlV2 = `${apiUrl.v2}/deployments`;
399
515
  var deploymentSubstates = {
400
516
  aborted: "aborted",
401
517
  alreadyInstalled,
@@ -468,9 +584,9 @@ var DEPLOYMENT_STATES = {
468
584
  var listDefaultsByState = {
469
585
  [DEPLOYMENT_STATES.inprogress]: { page: 1, perPage: 10 },
470
586
  [DEPLOYMENT_STATES.pending]: { page: 1, perPage: 10 },
471
- [DEPLOYMENT_STATES.scheduled]: { ...DEVICE_LIST_DEFAULTS },
472
- [DEPLOYMENT_STATES.finished]: { ...DEVICE_LIST_DEFAULTS },
473
- sort: { direction: SORTING_OPTIONS.desc }
587
+ [DEPLOYMENT_STATES.scheduled]: { ...import_constants4.DEVICE_LIST_DEFAULTS },
588
+ [DEPLOYMENT_STATES.finished]: { ...import_constants4.DEVICE_LIST_DEFAULTS },
589
+ sort: { direction: import_constants4.SORTING_OPTIONS.desc }
474
590
  };
475
591
  var DEPLOYMENT_ROUTES = {
476
592
  active: {
@@ -535,30 +651,28 @@ var pauseMap = {
535
651
  };
536
652
 
537
653
  // 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`;
654
+ var emptyFilter = { key: null, value: "", operator: import_constants4.DEVICE_FILTERING_OPTIONS.$eq.key, scope: "inventory" };
546
655
  var geoAttributes = ["geo-lat", "geo-lon"].map((attribute) => ({ attribute, scope: "inventory" }));
547
656
 
657
+ // src/releasesSlice/constants.ts
658
+ var softwareIndicator = ".version";
659
+ var rootfsImageVersion = "rootfs-image.version";
660
+ var softwareTitleMap = { [rootfsImageVersion]: { title: "Root filesystem", priority: 0, key: rootfsImageVersion } };
661
+
548
662
  // src/utils.ts
549
663
  var filterProcessors = {
550
- [DEVICE_FILTERING_OPTIONS.$gt.key]: (val) => Number(val) || val,
551
- [DEVICE_FILTERING_OPTIONS.$gte.key]: (val) => Number(val) || val,
552
- [DEVICE_FILTERING_OPTIONS.$lt.key]: (val) => Number(val) || val,
553
- [DEVICE_FILTERING_OPTIONS.$lte.key]: (val) => Number(val) || val,
554
- [DEVICE_FILTERING_OPTIONS.$ltne.key]: (val) => Number(val) || val,
555
- [DEVICE_FILTERING_OPTIONS.$in.key]: (val) => ("" + val).split(",").map((i) => i.trim()),
556
- [DEVICE_FILTERING_OPTIONS.$nin.key]: (val) => ("" + val).split(",").map((i) => i.trim()),
557
- [DEVICE_FILTERING_OPTIONS.$exists.key]: import_helpers.yes,
558
- [DEVICE_FILTERING_OPTIONS.$nexists.key]: () => false
664
+ [import_constants4.DEVICE_FILTERING_OPTIONS.$gt.key]: (val) => Number(val) || val,
665
+ [import_constants4.DEVICE_FILTERING_OPTIONS.$gte.key]: (val) => Number(val) || val,
666
+ [import_constants4.DEVICE_FILTERING_OPTIONS.$lt.key]: (val) => Number(val) || val,
667
+ [import_constants4.DEVICE_FILTERING_OPTIONS.$lte.key]: (val) => Number(val) || val,
668
+ [import_constants4.DEVICE_FILTERING_OPTIONS.$ltne.key]: (val) => Number(val) || val,
669
+ [import_constants4.DEVICE_FILTERING_OPTIONS.$in.key]: (val) => ("" + val).split(",").map((i) => i.trim()),
670
+ [import_constants4.DEVICE_FILTERING_OPTIONS.$nin.key]: (val) => ("" + val).split(",").map((i) => i.trim()),
671
+ [import_constants4.DEVICE_FILTERING_OPTIONS.$exists.key]: import_helpers.yes,
672
+ [import_constants4.DEVICE_FILTERING_OPTIONS.$nexists.key]: () => false
559
673
  };
560
674
  var filterAliases = {
561
- $nexists: { alias: DEVICE_FILTERING_OPTIONS.$exists.key, value: false }
675
+ $nexists: { alias: import_constants4.DEVICE_FILTERING_OPTIONS.$exists.key, value: false }
562
676
  };
563
677
  var mapFiltersToTerms = (filters) => filters.map((filter) => ({
564
678
  scope: filter.scope,
@@ -574,40 +688,45 @@ var mapTermsToFilters = (terms) => terms.map((term) => {
574
688
  return { scope: term.scope, key: term.attribute, operator, value: term.value };
575
689
  });
576
690
  var convertIssueOptionsToFilters = (issuesSelection, filtersState = {}) => issuesSelection.map((item) => {
577
- if (typeof DEVICE_ISSUE_OPTIONS[item].filterRule.value === "function") {
578
- return { ...DEVICE_ISSUE_OPTIONS[item].filterRule, value: DEVICE_ISSUE_OPTIONS[item].filterRule.value(filtersState) };
691
+ if (typeof import_constants4.DEVICE_ISSUE_OPTIONS[item].filterRule.value === "function") {
692
+ return { ...import_constants4.DEVICE_ISSUE_OPTIONS[item].filterRule, value: import_constants4.DEVICE_ISSUE_OPTIONS[item].filterRule.value(filtersState) };
579
693
  }
580
- return DEVICE_ISSUE_OPTIONS[item].filterRule;
694
+ return import_constants4.DEVICE_ISSUE_OPTIONS[item].filterRule;
581
695
  });
582
- var convertDeviceListStateToFilters = ({ filters = [], group, groups = { byId: {} }, offlineThreshold, selectedIssues = [], status }) => {
696
+ var convertDeviceListStateToFilters = ({
697
+ filters = [],
698
+ group,
699
+ groups = { byId: {} },
700
+ offlineThreshold,
701
+ selectedIssues = [],
702
+ status
703
+ }) => {
583
704
  let applicableFilters = [...filters];
584
705
  if (typeof group === "string" && !(groups.byId[group]?.filters || applicableFilters).length) {
585
- applicableFilters.push({ key: "group", value: group, operator: DEVICE_FILTERING_OPTIONS.$eq.key, scope: "system" });
706
+ applicableFilters.push({ key: "group", value: group, operator: import_constants4.DEVICE_FILTERING_OPTIONS.$eq.key, scope: "system" });
586
707
  }
587
708
  const nonMonitorFilters = applicableFilters.filter(
588
- (filter) => !Object.values(DEVICE_ISSUE_OPTIONS).some(
709
+ (filter) => !Object.values(import_constants4.DEVICE_ISSUE_OPTIONS).some(
589
710
  ({ filterRule }) => filter.scope !== "inventory" && filterRule.scope === filter.scope && filterRule.key === filter.key
590
711
  )
591
712
  );
592
713
  const deviceIssueFilters = convertIssueOptionsToFilters(selectedIssues, { offlineThreshold });
593
714
  applicableFilters = [...nonMonitorFilters, ...deviceIssueFilters];
594
- const effectiveFilters = status ? [...applicableFilters, { key: "status", value: status, operator: DEVICE_FILTERING_OPTIONS.$eq.key, scope: "identity" }] : applicableFilters;
715
+ const effectiveFilters = status ? [...applicableFilters, { key: "status", value: status, operator: import_constants4.DEVICE_FILTERING_OPTIONS.$eq.key, scope: "identity" }] : applicableFilters;
595
716
  return { applicableFilters: nonMonitorFilters, filterTerms: mapFiltersToTerms(effectiveFilters) };
596
717
  };
597
- var filterCompare = (filter, item) => Object.keys(emptyFilter).every((key) => item[key].toString() === filter[key].toString());
718
+ var filterCompare = (filter, item) => Object.keys(emptyFilter).every((key) => item[key]?.toString() === filter[key]?.toString());
598
719
  var filtersFilter = (item, index, array) => {
599
720
  const firstIndex = array.findIndex((filter) => filterCompare(filter, item));
600
721
  return firstIndex === index;
601
722
  };
602
- var listItemMapper = (byId, ids, { defaultObject = {}, cutOffSize = DEVICE_LIST_MAXIMUM_LENGTH }) => {
603
- return ids.slice(0, cutOffSize).reduce((accu, id) => {
604
- if (id && byId[id]) {
605
- accu.push({ ...defaultObject, ...byId[id] });
606
- }
607
- return accu;
608
- }, []);
609
- };
610
- var mergePermissions = (existingPermissions = { ...emptyUiPermissions }, addedPermissions) => Object.entries(existingPermissions).reduce(
723
+ var listItemMapper = (byId, ids, { cutOffSize = DEVICE_LIST_MAXIMUM_LENGTH, defaultObject = {} }) => ids.slice(0, cutOffSize).reduce((accu, id) => {
724
+ if (id && byId[id]) {
725
+ accu.push({ ...defaultObject, ...byId[id] });
726
+ }
727
+ return accu;
728
+ }, []);
729
+ var mergePermissions = (existingPermissions = { ...import_constants4.emptyUiPermissions }, addedPermissions) => Object.entries(existingPermissions).reduce(
611
730
  (accu, [key, value]) => {
612
731
  let values;
613
732
  if (!accu[key]) {
@@ -631,12 +750,14 @@ var mapUserRolesToUiPermissions = (userRoles, roles) => userRoles.reduce(
631
750
  }
632
751
  return mergePermissions(accu, roles[roleId].uiPermissions);
633
752
  },
634
- { ...emptyUiPermissions }
753
+ { ...import_constants4.emptyUiPermissions }
635
754
  );
636
755
  var progress = ({ loaded, total }) => {
637
756
  let uploadProgress = loaded / total * 100;
638
757
  return uploadProgress = uploadProgress < 50 ? Math.ceil(uploadProgress) : Math.round(uploadProgress);
639
758
  };
759
+ var extractErrorMessage = (err, fallback = "") => err.response?.data?.error?.message || err.response?.data?.error || err.error || err.message || fallback;
760
+ var ensureVersionString = (software, fallback) => software.length && software !== "artifact_name" ? software.endsWith(softwareIndicator) ? software : `${software}${softwareIndicator}` : fallback;
640
761
  var getComparisonCompatibleVersion = (version) => isNaN(version.charAt(0)) && version !== "next" ? "master" : version;
641
762
  var stringToBoolean = (content) => {
642
763
  if (!content) {
@@ -699,17 +820,17 @@ var getDeploymentState = (deployment) => {
699
820
  }
700
821
  return status;
701
822
  };
702
- var generateDeploymentGroupDetails = (filter, groupName) => filter && filter.terms?.length ? `${groupName} (${filter.terms.map((filter2) => `${filter2.attribute || filter2.key} ${DEVICE_FILTERING_OPTIONS[filter2.type || filter2.operator].shortform} ${filter2.value}`).join(", ")})` : groupName;
823
+ var generateDeploymentGroupDetails = (filter, groupName) => filter && filter.terms?.length ? `${groupName} (${filter.terms.map((filter2) => `${filter2.attribute || filter2.key} ${import_constants4.DEVICE_FILTERING_OPTIONS[filter2.type || filter2.operator].shortform} ${filter2.value}`).join(", ")})` : groupName;
703
824
  var mapDeviceAttributes = (attributes = []) => attributes.reduce(
704
825
  (accu, attribute) => {
705
- if (!(attribute.value && attribute.name) && attribute.scope === ATTRIBUTE_SCOPES.inventory) {
826
+ if (!(attribute.value && attribute.name) && attribute.scope === import_constants4.ATTRIBUTE_SCOPES.inventory) {
706
827
  return accu;
707
828
  }
708
- accu[attribute.scope || ATTRIBUTE_SCOPES.inventory] = {
709
- ...accu[attribute.scope || ATTRIBUTE_SCOPES.inventory],
829
+ accu[attribute.scope || import_constants4.ATTRIBUTE_SCOPES.inventory] = {
830
+ ...accu[attribute.scope || import_constants4.ATTRIBUTE_SCOPES.inventory],
710
831
  [attribute.name]: attribute.value
711
832
  };
712
- if (attribute.name === "device_type" && attribute.scope === ATTRIBUTE_SCOPES.inventory) {
833
+ if (attribute.name === "device_type" && attribute.scope === import_constants4.ATTRIBUTE_SCOPES.inventory) {
713
834
  accu.inventory.device_type = [].concat(attribute.value);
714
835
  }
715
836
  return accu;
@@ -717,9 +838,23 @@ var mapDeviceAttributes = (attributes = []) => attributes.reduce(
717
838
  { inventory: { device_type: [], artifact_name: "" }, identity: {}, monitor: {}, system: {}, tags: {} }
718
839
  );
719
840
  var isDarkMode = (mode) => mode === DARK_MODE;
841
+ var parseSubscriptionPreview = (lines) => lines.reduce(
842
+ (acc, { addon, amount }) => {
843
+ const key = addon || "plan";
844
+ if (key === "plan") {
845
+ acc.plan += amount;
846
+ } else {
847
+ acc.addons[key] = (acc.addons[key] ?? 0) + amount;
848
+ }
849
+ return acc;
850
+ },
851
+ { plan: 0, addons: {} }
852
+ );
720
853
  // Annotate the CommonJS export names for ESM import in node:
721
854
  0 && (module.exports = {
722
855
  convertDeviceListStateToFilters,
856
+ ensureVersionString,
857
+ extractErrorMessage,
723
858
  filtersFilter,
724
859
  generateDeploymentGroupDetails,
725
860
  getComparisonCompatibleVersion,
@@ -733,6 +868,7 @@ var isDarkMode = (mode) => mode === DARK_MODE;
733
868
  mapTermsToFilters,
734
869
  mapUserRolesToUiPermissions,
735
870
  mergePermissions,
871
+ parseSubscriptionPreview,
736
872
  progress,
737
873
  statCollector,
738
874
  stringToBoolean