@northern.tech/store 0.3.2 → 0.3.4

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 (251) hide show
  1. package/dist/BillingProfile-ChP2_Sqw.d.cts +45 -0
  2. package/dist/BillingProfile-ChP2_Sqw.d.ts +45 -0
  3. package/dist/actions.cjs +22 -23
  4. package/dist/actions.cjs.map +1 -1
  5. package/dist/actions.js +12 -12
  6. package/dist/api/general-api.cjs.map +1 -1
  7. package/dist/api/general-api.js +5 -5
  8. package/dist/api/types/Tenant.ts +17 -12
  9. package/dist/api/users-api.cjs.map +1 -1
  10. package/dist/api/users-api.js +6 -6
  11. package/dist/appSlice/constants.cjs +18 -10
  12. package/dist/appSlice/constants.cjs.map +1 -1
  13. package/dist/appSlice/constants.d.cts +41 -84
  14. package/dist/appSlice/constants.d.ts +41 -84
  15. package/dist/appSlice/constants.js +1 -1
  16. package/dist/appSlice/index.cjs +1 -3
  17. package/dist/appSlice/index.cjs.map +1 -1
  18. package/dist/appSlice/index.js +4 -4
  19. package/dist/appSlice/thunks.cjs +153 -120
  20. package/dist/appSlice/thunks.cjs.map +1 -1
  21. package/dist/appSlice/thunks.js +28 -27
  22. package/dist/auth.cjs.map +1 -1
  23. package/dist/auth.js +4 -4
  24. package/dist/{chunk-NI4SZOCF.js → chunk-4RWZR3BN.js} +23 -25
  25. package/dist/{chunk-NI4SZOCF.js.map → chunk-4RWZR3BN.js.map} +1 -1
  26. package/dist/{chunk-YGBFDXXA.js → chunk-7YZCUAXZ.js} +2 -2
  27. package/dist/{chunk-7PVGDMNM.js → chunk-AFICTIVU.js} +3 -5
  28. package/dist/{chunk-7PVGDMNM.js.map → chunk-AFICTIVU.js.map} +1 -1
  29. package/dist/{chunk-YT73QWCN.js → chunk-AUBJUUP3.js} +3 -3
  30. package/dist/{chunk-UEP36GCI.js → chunk-AVX7VVOK.js} +3 -3
  31. package/dist/{chunk-4B3IMP4I.js → chunk-BSN2TOQC.js} +1 -1
  32. package/dist/{chunk-4B3IMP4I.js.map → chunk-BSN2TOQC.js.map} +1 -1
  33. package/dist/{chunk-VOCOFE4I.js → chunk-DCEKU6UV.js} +2 -2
  34. package/dist/{chunk-E5LEU5PF.js → chunk-DGQKXSRI.js} +3 -3
  35. package/dist/{chunk-74OJIKXF.js → chunk-EQLHIPPR.js} +182 -142
  36. package/dist/chunk-EQLHIPPR.js.map +1 -0
  37. package/dist/{chunk-MDC7Y3EX.js → chunk-EYCORLYU.js} +44 -40
  38. package/dist/chunk-EYCORLYU.js.map +1 -0
  39. package/dist/{chunk-KAQJH2YL.js → chunk-FQDSV3NK.js} +13 -5
  40. package/dist/chunk-FQDSV3NK.js.map +1 -0
  41. package/dist/{chunk-XTRPX7JZ.js → chunk-FRSA2YB5.js} +3 -3
  42. package/dist/chunk-FRSA2YB5.js.map +1 -0
  43. package/dist/{chunk-ANB5BM5J.js → chunk-FVCYB5OP.js} +37 -32
  44. package/dist/chunk-FVCYB5OP.js.map +1 -0
  45. package/dist/{chunk-AMGWP7A4.js → chunk-GAI4VYRZ.js} +2 -2
  46. package/dist/{chunk-YETZPQFR.js → chunk-GWJIY56H.js} +19 -20
  47. package/dist/chunk-GWJIY56H.js.map +1 -0
  48. package/dist/{chunk-Q6M5TTDQ.js → chunk-JO33IORF.js} +2 -2
  49. package/dist/chunk-JO33IORF.js.map +1 -0
  50. package/dist/chunk-K4MMUDYT.js +391 -0
  51. package/dist/chunk-K4MMUDYT.js.map +1 -0
  52. package/dist/{chunk-XXHONFSQ.js → chunk-L3SY3J5M.js} +4 -4
  53. package/dist/{chunk-XXHONFSQ.js.map → chunk-L3SY3J5M.js.map} +1 -1
  54. package/dist/{chunk-JAROCU6M.js → chunk-NCSKCF2S.js} +3 -3
  55. package/dist/{chunk-CYV6632F.js → chunk-NOQR3TE7.js} +2 -2
  56. package/dist/{chunk-A6CT6GTI.js → chunk-OEP2D6QL.js} +18 -12
  57. package/dist/chunk-OEP2D6QL.js.map +1 -0
  58. package/dist/{chunk-2RJIDREZ.js → chunk-PAIB5V27.js} +32 -23
  59. package/dist/chunk-PAIB5V27.js.map +1 -0
  60. package/dist/{chunk-FGKMJS3B.js → chunk-RX32WLVJ.js} +2 -4
  61. package/dist/chunk-RX32WLVJ.js.map +1 -0
  62. package/dist/{chunk-YTQUNAZP.js → chunk-X3GZILYD.js} +3 -3
  63. package/dist/{chunk-25AKG5HH.js → chunk-Y575RZHR.js} +19 -11
  64. package/dist/chunk-Y575RZHR.js.map +1 -0
  65. package/dist/{chunk-RX55KAKX.js → chunk-ZWOAFHAR.js} +2 -2
  66. package/dist/{chunk-NNADGHSL.js → chunk-ZZMFXRQK.js} +14 -14
  67. package/dist/commonConstants.cjs.map +1 -1
  68. package/dist/commonConstants.d.cts +1 -1
  69. package/dist/commonConstants.d.ts +1 -1
  70. package/dist/commonConstants.js +1 -1
  71. package/dist/commonSelectors.cjs +47 -29
  72. package/dist/commonSelectors.cjs.map +1 -1
  73. package/dist/commonSelectors.d.cts +55 -46
  74. package/dist/commonSelectors.d.ts +55 -46
  75. package/dist/commonSelectors.js +11 -11
  76. package/dist/constants.cjs +35 -19
  77. package/dist/constants.cjs.map +1 -1
  78. package/dist/constants.d.cts +3 -3
  79. package/dist/constants.d.ts +3 -3
  80. package/dist/constants.js +7 -3
  81. package/dist/deploymentdevicehook.cjs +159 -125
  82. package/dist/deploymentdevicehook.cjs.map +1 -1
  83. package/dist/deploymentdevicehook.d.cts +1 -1
  84. package/dist/deploymentdevicehook.d.ts +1 -1
  85. package/dist/deploymentdevicehook.js +34 -31
  86. package/dist/deploymentdevicehook.js.map +1 -1
  87. package/dist/deploymentsSlice/constants.cjs +8 -8
  88. package/dist/deploymentsSlice/constants.cjs.map +1 -1
  89. package/dist/deploymentsSlice/constants.js +3 -3
  90. package/dist/deploymentsSlice/index.cjs +8 -8
  91. package/dist/deploymentsSlice/index.cjs.map +1 -1
  92. package/dist/deploymentsSlice/index.js +4 -4
  93. package/dist/deploymentsSlice/selectors.cjs +8 -8
  94. package/dist/deploymentsSlice/selectors.cjs.map +1 -1
  95. package/dist/deploymentsSlice/selectors.js +4 -4
  96. package/dist/deploymentsSlice/thunks.cjs +153 -120
  97. package/dist/deploymentsSlice/thunks.cjs.map +1 -1
  98. package/dist/deploymentsSlice/thunks.js +28 -27
  99. package/dist/devicesSlice/constants.cjs +11 -8
  100. package/dist/devicesSlice/constants.cjs.map +1 -1
  101. package/dist/devicesSlice/constants.d.cts +2 -1
  102. package/dist/devicesSlice/constants.d.ts +2 -1
  103. package/dist/devicesSlice/constants.js +5 -3
  104. package/dist/devicesSlice/index.cjs +8 -8
  105. package/dist/devicesSlice/index.cjs.map +1 -1
  106. package/dist/devicesSlice/index.js +4 -4
  107. package/dist/devicesSlice/selectors.cjs +9 -9
  108. package/dist/devicesSlice/selectors.cjs.map +1 -1
  109. package/dist/devicesSlice/selectors.js +4 -4
  110. package/dist/devicesSlice/thunks.cjs +155 -120
  111. package/dist/devicesSlice/thunks.cjs.map +1 -1
  112. package/dist/devicesSlice/thunks.d.cts +12 -2
  113. package/dist/devicesSlice/thunks.d.ts +12 -2
  114. package/dist/devicesSlice/thunks.js +30 -27
  115. package/dist/flag-eu-5477R2P4.svg +130 -0
  116. package/dist/flag-us-HNQAF66I.svg +63 -0
  117. package/dist/liststatehook.cjs +971 -0
  118. package/dist/liststatehook.cjs.map +1 -0
  119. package/dist/liststatehook.d.cts +246 -0
  120. package/dist/liststatehook.d.ts +246 -0
  121. package/dist/liststatehook.js +88 -0
  122. package/dist/liststatehook.js.map +1 -0
  123. package/dist/locationutils.cjs +942 -0
  124. package/dist/locationutils.cjs.map +1 -0
  125. package/dist/locationutils.d.cts +113 -0
  126. package/dist/locationutils.d.ts +113 -0
  127. package/dist/locationutils.js +46 -0
  128. package/dist/locationutils.js.map +1 -0
  129. package/dist/monitorSlice/constants.cjs +8 -8
  130. package/dist/monitorSlice/constants.cjs.map +1 -1
  131. package/dist/monitorSlice/constants.js +3 -3
  132. package/dist/monitorSlice/index.cjs +8 -8
  133. package/dist/monitorSlice/index.cjs.map +1 -1
  134. package/dist/monitorSlice/index.js +4 -4
  135. package/dist/monitorSlice/thunks.cjs +74 -62
  136. package/dist/monitorSlice/thunks.cjs.map +1 -1
  137. package/dist/monitorSlice/thunks.js +24 -24
  138. package/dist/onboardingSlice/index.cjs +1 -3
  139. package/dist/onboardingSlice/index.cjs.map +1 -1
  140. package/dist/onboardingSlice/index.js +1 -1
  141. package/dist/onboardingSlice/thunks.cjs +157 -124
  142. package/dist/onboardingSlice/thunks.cjs.map +1 -1
  143. package/dist/onboardingSlice/thunks.d.cts +2 -34
  144. package/dist/onboardingSlice/thunks.d.ts +2 -34
  145. package/dist/onboardingSlice/thunks.js +28 -29
  146. package/dist/organizationSlice/constants.cjs +22 -17
  147. package/dist/organizationSlice/constants.cjs.map +1 -1
  148. package/dist/organizationSlice/constants.d.cts +33 -1
  149. package/dist/organizationSlice/constants.d.ts +33 -1
  150. package/dist/organizationSlice/constants.js +5 -3
  151. package/dist/organizationSlice/index.cjs +18 -15
  152. package/dist/organizationSlice/index.cjs.map +1 -1
  153. package/dist/organizationSlice/index.d.cts +27 -1012
  154. package/dist/organizationSlice/index.d.ts +27 -1012
  155. package/dist/organizationSlice/index.js +4 -4
  156. package/dist/organizationSlice/selectors.cjs.map +1 -1
  157. package/dist/organizationSlice/selectors.d.cts +10 -1
  158. package/dist/organizationSlice/selectors.d.ts +10 -1
  159. package/dist/organizationSlice/selectors.js +4 -4
  160. package/dist/organizationSlice/thunks.cjs +1619 -1559
  161. package/dist/organizationSlice/thunks.cjs.map +1 -1
  162. package/dist/organizationSlice/thunks.d.cts +62 -37
  163. package/dist/organizationSlice/thunks.d.ts +62 -37
  164. package/dist/organizationSlice/thunks.js +28 -27
  165. package/dist/organizationSlice/types.cjs +19 -0
  166. package/dist/organizationSlice/types.cjs.map +1 -0
  167. package/dist/organizationSlice/types.d.cts +5 -0
  168. package/dist/organizationSlice/types.d.ts +5 -0
  169. package/dist/organizationSlice/types.js +1 -0
  170. package/dist/organizationSlice/types.js.map +1 -0
  171. package/dist/releasesSlice/index.cjs.map +1 -1
  172. package/dist/releasesSlice/index.js +4 -4
  173. package/dist/releasesSlice/selectors.cjs +17 -8
  174. package/dist/releasesSlice/selectors.cjs.map +1 -1
  175. package/dist/releasesSlice/selectors.js +5 -5
  176. package/dist/releasesSlice/thunks.cjs +123 -94
  177. package/dist/releasesSlice/thunks.cjs.map +1 -1
  178. package/dist/releasesSlice/thunks.d.cts +1 -4
  179. package/dist/releasesSlice/thunks.d.ts +1 -4
  180. package/dist/releasesSlice/thunks.js +25 -24
  181. package/dist/selectors.cjs +53 -29
  182. package/dist/selectors.cjs.map +1 -1
  183. package/dist/selectors.d.cts +10 -1
  184. package/dist/selectors.d.ts +10 -1
  185. package/dist/selectors.js +49 -43
  186. package/dist/sockethook.cjs +529 -0
  187. package/dist/sockethook.cjs.map +1 -0
  188. package/dist/sockethook.d.cts +10 -0
  189. package/dist/sockethook.d.ts +10 -0
  190. package/dist/sockethook.js +141 -0
  191. package/dist/sockethook.js.map +1 -0
  192. package/dist/store.cjs +38 -29
  193. package/dist/store.cjs.map +1 -1
  194. package/dist/store.d.cts +13 -231
  195. package/dist/store.d.ts +13 -231
  196. package/dist/store.js +18 -16
  197. package/dist/storehooks.cjs +273 -198
  198. package/dist/storehooks.cjs.map +1 -1
  199. package/dist/storehooks.js +38 -37
  200. package/dist/storehooks.js.map +1 -1
  201. package/dist/thunks.cjs +259 -184
  202. package/dist/thunks.cjs.map +1 -1
  203. package/dist/thunks.d.cts +6 -2
  204. package/dist/thunks.d.ts +6 -2
  205. package/dist/thunks.js +30 -29
  206. package/dist/types-DBj17FZO.d.cts +135 -0
  207. package/dist/types-DnfZa6xd.d.ts +135 -0
  208. package/dist/usersSlice/constants.cjs +10 -10
  209. package/dist/usersSlice/constants.cjs.map +1 -1
  210. package/dist/usersSlice/constants.d.cts +6 -6
  211. package/dist/usersSlice/constants.d.ts +6 -6
  212. package/dist/usersSlice/constants.js +3 -3
  213. package/dist/usersSlice/index.cjs +10 -10
  214. package/dist/usersSlice/index.cjs.map +1 -1
  215. package/dist/usersSlice/index.js +4 -4
  216. package/dist/usersSlice/selectors.cjs +35 -13
  217. package/dist/usersSlice/selectors.cjs.map +1 -1
  218. package/dist/usersSlice/selectors.d.cts +44 -1
  219. package/dist/usersSlice/selectors.d.ts +44 -1
  220. package/dist/usersSlice/selectors.js +13 -7
  221. package/dist/usersSlice/thunks.cjs +151 -120
  222. package/dist/usersSlice/thunks.cjs.map +1 -1
  223. package/dist/usersSlice/thunks.d.cts +10 -9
  224. package/dist/usersSlice/thunks.d.ts +10 -9
  225. package/dist/usersSlice/thunks.js +28 -27
  226. package/dist/utils.cjs +23 -24
  227. package/dist/utils.cjs.map +1 -1
  228. package/dist/utils.js +4 -4
  229. package/package.json +7 -6
  230. package/dist/chunk-25AKG5HH.js.map +0 -1
  231. package/dist/chunk-2RJIDREZ.js.map +0 -1
  232. package/dist/chunk-74OJIKXF.js.map +0 -1
  233. package/dist/chunk-A6CT6GTI.js.map +0 -1
  234. package/dist/chunk-ANB5BM5J.js.map +0 -1
  235. package/dist/chunk-FGKMJS3B.js.map +0 -1
  236. package/dist/chunk-KAQJH2YL.js.map +0 -1
  237. package/dist/chunk-MDC7Y3EX.js.map +0 -1
  238. package/dist/chunk-Q6M5TTDQ.js.map +0 -1
  239. package/dist/chunk-XTRPX7JZ.js.map +0 -1
  240. package/dist/chunk-YETZPQFR.js.map +0 -1
  241. /package/dist/{chunk-YGBFDXXA.js.map → chunk-7YZCUAXZ.js.map} +0 -0
  242. /package/dist/{chunk-YT73QWCN.js.map → chunk-AUBJUUP3.js.map} +0 -0
  243. /package/dist/{chunk-UEP36GCI.js.map → chunk-AVX7VVOK.js.map} +0 -0
  244. /package/dist/{chunk-VOCOFE4I.js.map → chunk-DCEKU6UV.js.map} +0 -0
  245. /package/dist/{chunk-E5LEU5PF.js.map → chunk-DGQKXSRI.js.map} +0 -0
  246. /package/dist/{chunk-AMGWP7A4.js.map → chunk-GAI4VYRZ.js.map} +0 -0
  247. /package/dist/{chunk-JAROCU6M.js.map → chunk-NCSKCF2S.js.map} +0 -0
  248. /package/dist/{chunk-CYV6632F.js.map → chunk-NOQR3TE7.js.map} +0 -0
  249. /package/dist/{chunk-YTQUNAZP.js.map → chunk-X3GZILYD.js.map} +0 -0
  250. /package/dist/{chunk-RX55KAKX.js.map → chunk-ZWOAFHAR.js.map} +0 -0
  251. /package/dist/{chunk-NNADGHSL.js.map → chunk-ZZMFXRQK.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  apiUrl
3
- } from "./chunk-25AKG5HH.js";
3
+ } from "./chunk-Y575RZHR.js";
4
4
  import {
5
5
  ALL_DEVICES,
6
6
  ALL_RELEASES,
@@ -9,7 +9,7 @@ import {
9
9
  EXTERNAL_PROVIDER,
10
10
  SORTING_OPTIONS,
11
11
  emptyUiPermissions
12
- } from "./chunk-4B3IMP4I.js";
12
+ } from "./chunk-BSN2TOQC.js";
13
13
 
14
14
  // src/devicesSlice/constants.ts
15
15
  var emptyFilter = { key: null, value: "", operator: DEVICE_FILTERING_OPTIONS.$eq.key, scope: "inventory" };
@@ -46,6 +46,7 @@ var DEVICE_CONNECT_STATES = {
46
46
  unknown: "unknown"
47
47
  };
48
48
  var geoAttributes = ["geo-lat", "geo-lon"].map((attribute) => ({ attribute, scope: "inventory" }));
49
+ var REPORT_CHART_SIZE_LIMIT = 6;
49
50
 
50
51
  // src/monitorSlice/constants.ts
51
52
  var alertChannels = { email: "email" };
@@ -86,13 +87,16 @@ var SSO_TYPES = {
86
87
  configDetails: [{ key: "startURL", label: "Start Url", getValue: getOidcStartUrl }]
87
88
  }
88
89
  };
89
- var AUDIT_LOGS_TYPES = [
90
- { title: "Artifact", queryParameter: "object_type", value: "artifact" },
91
- { title: "Deployment", queryParameter: "object_deployment_name", value: "deployment" },
92
- { title: "Device", queryParameter: "object_id", value: "device" },
93
- { title: "User", queryParameter: "object_id", value: "user" }
94
- ];
95
- var SP_AUDIT_LOGS_TYPES = [AUDIT_LOGS_TYPES[3], { title: "Tenant", queryParameter: "object_id", value: "tenant" }];
90
+ var auditlogTypes = {
91
+ artifact: { title: "Artifact", queryParameter: "object_type", value: "artifact" },
92
+ deployment: { title: "Deployment", queryParameter: "object_deployment_name", value: "deployment" },
93
+ device: { title: "Device", queryParameter: "object_id", value: "device" },
94
+ user_access_token: { title: "Personal Access Token", queryParameter: "user_access_token", value: "user_access_token" },
95
+ user: { title: "User", queryParameter: "object_id", value: "user" },
96
+ tenant: { title: "Tenant", queryParameter: "object_id", value: "tenant" }
97
+ };
98
+ var AUDIT_LOGS_TYPES = [auditlogTypes.artifact, auditlogTypes.deployment, auditlogTypes.device, auditlogTypes.user_access_token, auditlogTypes.user];
99
+ var SP_AUDIT_LOGS_TYPES = [auditlogTypes.user, auditlogTypes.tenant];
96
100
  var emptyWebhook = {
97
101
  description: "",
98
102
  enabled: true,
@@ -221,7 +225,7 @@ var uiPermissionsByArea = {
221
225
  explanation: "Granting access to the audit log will allow tracing changes to devices, releases and user accounts, as well as providing information about deployments.",
222
226
  key: "auditlog",
223
227
  uiPermissions: [uiPermissionsById.read],
224
- title: "System audit log"
228
+ title: "System Audit Log"
225
229
  },
226
230
  deployments: {
227
231
  endpoints: [
@@ -374,7 +378,7 @@ var serviceProviderRolesById = {
374
378
  },
375
379
  readOnly: {
376
380
  name: "Read access",
377
- value: staticRolesByName.admin,
381
+ value: staticRolesByName.readOnly,
378
382
  description: "This role can see all linked organizations but cannot make any changes",
379
383
  permissions: [],
380
384
  uiPermissions: {
@@ -685,6 +689,7 @@ export {
685
689
  DEVICE_STATES,
686
690
  DEVICE_CONNECT_STATES,
687
691
  geoAttributes,
692
+ REPORT_CHART_SIZE_LIMIT,
688
693
  alertChannels,
689
694
  monitorApiUrlv1,
690
695
  auditLogsApiUrl,
@@ -696,6 +701,7 @@ export {
696
701
  getSamlStartUrl,
697
702
  getOidcStartUrl,
698
703
  SSO_TYPES,
704
+ auditlogTypes,
699
705
  AUDIT_LOGS_TYPES,
700
706
  SP_AUDIT_LOGS_TYPES,
701
707
  emptyWebhook,
@@ -718,4 +724,4 @@ export {
718
724
  settingsKeys,
719
725
  READ_STATES
720
726
  };
721
- //# sourceMappingURL=chunk-A6CT6GTI.js.map
727
+ //# sourceMappingURL=chunk-OEP2D6QL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/devicesSlice/constants.ts","../src/monitorSlice/constants.ts","../src/organizationSlice/constants.ts","../src/usersSlice/constants.ts","../src/deploymentsSlice/constants.ts"],"sourcesContent":["// Copyright 2019 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { DEVICE_FILTERING_OPTIONS, apiUrl } from '@northern.tech/store/constants';\n\nexport const emptyFilter = { key: null, value: '', operator: DEVICE_FILTERING_OPTIONS.$eq.key, scope: 'inventory' };\n\nexport const deviceAuthV2 = `${apiUrl.v2}/devauth`;\nexport const deviceConnect = `${apiUrl.v1}/deviceconnect`;\nexport const inventoryApiUrl = `${apiUrl.v1}/inventory`;\nexport const inventoryApiUrlV2 = `${apiUrl.v2}/inventory`;\nexport const deviceConfig = `${apiUrl.v1}/deviceconfig/configurations/device`;\nexport const reportingApiUrl = `${apiUrl.v1}/reporting`;\nexport const iotManagerBaseURL = `${apiUrl.v1}/iot-manager`;\n\n// see https://github.com/mendersoftware/go-lib-micro/tree/master/ws\n// for the description of proto_header and the consts\n// *Note*: this needs to be aligned with mender-connect and deviceconnect.\nexport const DEVICE_MESSAGE_PROTOCOLS = {\n Shell: 1\n};\nexport const DEVICE_MESSAGE_TYPES = {\n Delay: 'delay',\n New: 'new',\n Ping: 'ping',\n Pong: 'pong',\n Resize: 'resize',\n Shell: 'shell',\n Stop: 'stop'\n};\n\n// we can't include the dismiss state with the rest since this would include dismissed devices in several queries\nexport const DEVICE_DISMISSAL_STATE = 'dismiss';\nexport const ALL_DEVICE_STATES = 'any';\nexport const DEVICE_STATES = {\n accepted: 'accepted',\n pending: 'pending',\n preauth: 'preauthorized',\n rejected: 'rejected'\n};\nexport const DEVICE_CONNECT_STATES = {\n connected: 'connected',\n disconnected: 'disconnected',\n unknown: 'unknown'\n};\n\nexport const geoAttributes = ['geo-lat', 'geo-lon'].map(attribute => ({ attribute, scope: 'inventory' }));\n\nexport const REPORT_CHART_SIZE_LIMIT = 6;\n","// Copyright 2021 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\nimport { apiUrl } from '@northern.tech/store/constants';\n\n// limitations under the License.\nexport const alertChannels = { email: 'email' };\nexport const monitorApiUrlv1 = `${apiUrl.v1}/devicemonitor`;\n","// Copyright 2020 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// @ts-nocheck\nimport { EXTERNAL_PROVIDER, apiUrl, useradmApiUrl } from '@northern.tech/store/constants';\n\nimport { Integration } from '../api/types/Integration';\n\nexport const auditLogsApiUrl = `${apiUrl.v1}/auditlogs`;\nexport const tenantadmApiUrlv1 = `${apiUrl.v1}/tenantadm`;\nexport const tenantadmApiUrlv2 = `${apiUrl.v2}/tenantadm`;\nexport const ssoIdpApiUrlv1 = `${apiUrl.v1}/useradm/sso/idp/metadata`;\n\nexport const XML_METADATA_FORMAT = 'xml';\nexport const JSON_METADATA_FORMAT = 'json';\n\nexport const getSamlStartUrl = id => `${window.location.origin}${useradmApiUrl}/auth/sso/${id}/login`;\nexport const getOidcStartUrl = id => `${window.location.origin}${useradmApiUrl}/oidc/${id}/start`;\n\nexport const SSO_TYPES = {\n saml: {\n id: 'saml',\n type: 'saml',\n title: 'SAML',\n metadataFormat: XML_METADATA_FORMAT,\n editorLanguage: XML_METADATA_FORMAT,\n contentType: 'application/samlmetadata+xml',\n getStartUrl: getSamlStartUrl,\n configDetails: [\n { key: 'entityID', label: 'Entity ID', getValue: id => `${window.location.origin}${useradmApiUrl}/sso/sp/metadata/${id}` },\n { key: 'acs', label: 'ACS URL', getValue: id => `${window.location.origin}${useradmApiUrl}/auth/sso/${id}/acs` },\n { key: 'startURL', label: 'Start URL', getValue: getSamlStartUrl }\n ]\n },\n oidc: {\n id: 'oidc',\n type: 'oidc',\n title: 'OpenID Connect',\n metadataFormat: JSON_METADATA_FORMAT,\n editorLanguage: JSON_METADATA_FORMAT,\n contentType: 'application/json',\n getStartUrl: getOidcStartUrl,\n configDetails: [{ key: 'startURL', label: 'Start Url', getValue: getOidcStartUrl }]\n }\n};\n\nexport const auditlogTypes = {\n artifact: { title: 'Artifact', queryParameter: 'object_type', value: 'artifact' },\n deployment: { title: 'Deployment', queryParameter: 'object_deployment_name', value: 'deployment' },\n device: { title: 'Device', queryParameter: 'object_id', value: 'device' },\n user_access_token: { title: 'Personal Access Token', queryParameter: 'user_access_token', value: 'user_access_token' },\n user: { title: 'User', queryParameter: 'object_id', value: 'user' },\n tenant: { title: 'Tenant', queryParameter: 'object_id', value: 'tenant' }\n};\n\nexport const AUDIT_LOGS_TYPES = [auditlogTypes.artifact, auditlogTypes.deployment, auditlogTypes.device, auditlogTypes.user_access_token, auditlogTypes.user];\nexport const SP_AUDIT_LOGS_TYPES = [auditlogTypes.user, auditlogTypes.tenant];\n\nexport interface Webhook extends Integration {\n provider: Integration.provider.WEBHOOK;\n scopes?: string[];\n}\n\nexport const emptyWebhook: Webhook = {\n description: '',\n enabled: true,\n credentials: {\n type: EXTERNAL_PROVIDER.webhook.credentialsType,\n [EXTERNAL_PROVIDER.webhook.credentialsType]: {\n secret: '',\n url: ''\n }\n }\n};\nexport const TENANT_LIST_DEFAULT = {\n page: 1,\n perPage: 20\n};\n","'use strict';\n\n// Copyright 2015 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { ALL_DEVICES, ALL_RELEASES, apiUrl, emptyUiPermissions } from '@northern.tech/store/constants';\n\nexport const useradmApiUrlv1 = `${apiUrl.v1}/useradm`;\nexport const useradmApiUrlv2 = `${apiUrl.v2}/useradm`;\nexport { useradmApiUrlv1 as useradmApiUrl };\n\nexport type UiPermission = {\n explanations: object;\n permissionLevel: number;\n permissionSets: Record<string, string>;\n title: string;\n value: string;\n verbs: string[];\n};\n\ntype ExcessiveAccessConfig = {\n selector: string;\n warning: string;\n};\n\ntype EndpointDefinition = {\n path: RegExp;\n types: string[];\n uiPermissions: UiPermission[];\n};\n\nexport type PermissionsArea = {\n endpoints: EndpointDefinition[];\n excessiveAccessConfig?: ExcessiveAccessConfig;\n explanation: string;\n filter?: (object) => string[];\n key: string;\n placeholder?: string;\n scope?: string;\n title: string;\n uiPermissions: UiPermission[];\n};\n\nconst staticRolesByName = {\n admin: 'RBAC_ROLE_PERMIT_ALL',\n readOnly: 'RBAC_ROLE_OBSERVER',\n ci: 'RBAC_ROLE_CI',\n deploymentsManager: 'RBAC_ROLE_DEPLOYMENTS_MANAGER',\n terminalAccess: 'RBAC_ROLE_REMOTE_TERMINAL'\n};\n\nexport const PermissionTypes = {\n Any: 'any',\n Get: 'GET',\n Post: 'POST',\n Put: 'PUT',\n Delete: 'DELETE',\n Patch: 'PATCH',\n DeviceGroup: 'DEVICE_GROUP',\n DeviceId: 'DEVICE_ID'\n};\n\nconst permissionSetIds = {\n Basic: 'Basic',\n ConfigureDevices: 'ConfigureDevices',\n ConnectToDevices: 'ConnectToDevices',\n DeployToDevices: 'DeployToDevices',\n ManageDevices: 'ManageDevices',\n ManageReleases: 'ManageReleases',\n ManageTenants: 'ManageTenants',\n ManageUsers: 'ManageUsers',\n ReadAuditLogs: 'ReadAuditLogs',\n ReadDevices: 'ReadDevices',\n ReadReleases: 'ReadReleases',\n ReadTenants: 'ReadTenants',\n ReadUsers: 'ReadUsers',\n SuperUser: 'SuperUser',\n UploadArtifacts: 'UploadArtifacts'\n};\n\nexport const uiPermissionsById = {\n configure: {\n explanations: { groups: `'Configure' allows the user to use mender-configure features and apply configurations.` },\n permissionLevel: 2,\n permissionSets: { groups: permissionSetIds.ConfigureDevices },\n title: 'Configure',\n value: 'configure',\n verbs: [PermissionTypes.Get, PermissionTypes.Put, PermissionTypes.Post]\n },\n connect: {\n explanations: { groups: `'Connect' allows the user to use mender-connect features and Troubleshoot add-ons.` },\n permissionLevel: 2,\n permissionSets: { groups: permissionSetIds.ConnectToDevices },\n title: 'Connect',\n value: 'connect',\n verbs: [PermissionTypes.Get, PermissionTypes.Put]\n },\n deploy: {\n explanations: { groups: `'Deploy' allows the user to deploy software or configuration updates to devices.` },\n permissionLevel: 2,\n permissionSets: { deployments: permissionSetIds.DeployToDevices, groups: permissionSetIds.DeployToDevices },\n title: 'Deploy',\n value: 'deploy',\n verbs: [PermissionTypes.Post]\n },\n manage: {\n explanations: {\n 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.`,\n releases: `'Manage' allows the user to upload new artifacts, edit release descriptions and remove artifacts.`\n },\n permissionLevel: 2,\n permissionSets: {\n groups: permissionSetIds.ManageDevices,\n releases: permissionSetIds.ManageReleases,\n tenantManagement: permissionSetIds.ManageTenants,\n userManagement: permissionSetIds.ManageUsers\n },\n title: 'Manage',\n value: 'manage',\n verbs: [PermissionTypes.Post, PermissionTypes.Put, PermissionTypes.Patch]\n },\n read: {\n explanations: { groups: `'Read' allows the user to view devices.` },\n permissionLevel: 1,\n permissionSets: {\n auditlog: permissionSetIds.ReadAuditLogs,\n groups: permissionSetIds.ReadDevices,\n releases: permissionSetIds.ReadReleases,\n tenantManagement: permissionSetIds.ReadTenants,\n userManagement: permissionSetIds.ReadUsers\n },\n title: 'Read',\n value: 'read',\n verbs: [PermissionTypes.Get, PermissionTypes.Post]\n },\n upload: {\n explanations: { groups: `'Upload' allows the user to upload new Artifacts.` },\n unscopedOnly: { releases: true },\n permissionLevel: 1,\n permissionSets: { releases: permissionSetIds.UploadArtifacts },\n title: 'Upload',\n value: 'upload',\n verbs: [PermissionTypes.Post, PermissionTypes.Put, PermissionTypes.Patch]\n }\n};\n\n/**\n * _uiPermissions_ represent the possible permissions/ rights that can be given for the area\n * _endpoints_ represent the possible endpoints this definition might be affecting in the UI and what\n * functionality might be affected\n *\n */\nexport const scopedPermissionAreas = {\n groups: { key: 'groups', excessiveAccessSelector: ALL_DEVICES, scopeType: 'DeviceGroups' },\n releases: { key: 'releases', excessiveAccessSelector: ALL_RELEASES, scopeType: 'Releases' }\n};\n\nexport const uiPermissionsByArea = {\n auditlog: {\n endpoints: [{ path: /\\/(auditlog)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.read] }],\n explanation:\n 'Granting access to the audit log will allow tracing changes to devices, releases and user accounts, as well as providing information about deployments.',\n key: 'auditlog',\n uiPermissions: [uiPermissionsById.read],\n title: 'System Audit Log'\n },\n deployments: {\n endpoints: [\n { path: /\\/(deployments\\/deployments)/i, types: [PermissionTypes.Post, PermissionTypes.Put], uiPermissions: [uiPermissionsById.deploy] },\n { path: /\\/(deployments\\/deployments)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.read] },\n { path: /\\/(deployments\\/config)/i, types: [PermissionTypes.Get, PermissionTypes.Put], uiPermissions: [uiPermissionsById.manage] }\n ],\n explanation: 'Providing deploy permissions will allow deployments to be created using the releases and devices a user has access to.',\n key: 'deployments',\n uiPermissions: [uiPermissionsById.read, uiPermissionsById.deploy],\n title: 'Deployments'\n },\n groups: {\n endpoints: [\n {\n path: /\\/(devauth|inventory|deviceconfig|devicemonitor|deviceconnect\\/devices)/i,\n types: [PermissionTypes.Get],\n uiPermissions: [uiPermissionsById.read]\n },\n { path: /\\/(devauth|inventory)/i, types: [PermissionTypes.Put, PermissionTypes.Post], uiPermissions: [uiPermissionsById.manage] },\n { path: /\\/(deviceconfig)/i, types: [PermissionTypes.Get, PermissionTypes.Put, PermissionTypes.Post], uiPermissions: [uiPermissionsById.configure] },\n { path: /\\/(deviceconnect\\/devices)/i, types: [PermissionTypes.Get, PermissionTypes.Post], uiPermissions: [uiPermissionsById.connect] }\n ],\n explanation: 'Device group management permissions control the degree to which devices in a group can be accessed and moved to other groups.',\n key: 'groups',\n scope: scopedPermissionAreas.groups.scopeType,\n uiPermissions: [uiPermissionsById.read, uiPermissionsById.manage, uiPermissionsById.deploy, uiPermissionsById.configure, uiPermissionsById.connect],\n title: 'Group Management'\n },\n releases: {\n endpoints: [\n { path: /\\/(deployments\\/artifacts|deployments\\/deployments\\/releases)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.read] },\n {\n path: /\\/(deployments\\/artifacts|deployments\\/deployments\\/releases)/i,\n types: [PermissionTypes.Post, PermissionTypes.Put],\n uiPermissions: [uiPermissionsById.read, uiPermissionsById.upload]\n },\n {\n path: /\\/(deployments\\/artifacts|deployments\\/deployments\\/releases)/i,\n types: [PermissionTypes.Delete],\n uiPermissions: [uiPermissionsById.read, uiPermissionsById.manage]\n }\n ],\n explanation: 'Release permissions can be granted to allow artifact & release modifications, as well as the creation of new releases.',\n key: 'releases',\n scope: 'ReleaseTags',\n uiPermissions: [uiPermissionsById.read, uiPermissionsById.manage, uiPermissionsById.upload],\n title: 'Release Management'\n },\n tenantManagement: {\n endpoints: [\n { path: /\\/(tenantadm\\/tenants)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.read] },\n { path: /\\/(tenantadm\\/tenants)/i, types: [PermissionTypes.Post, PermissionTypes.Put], uiPermissions: [uiPermissionsById.manage] },\n { path: /\\/(users\\/exists)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.manage] }\n ],\n explanation: 'Tenant management permissions allow listing, creating and modifying child tenants',\n key: 'tenantManagement',\n uiPermissions: [uiPermissionsById.read, uiPermissionsById.manage],\n title: 'Tenant Management'\n },\n userManagement: {\n endpoints: [\n { path: /\\/(useradm)/i, types: [PermissionTypes.Get], uiPermissions: [uiPermissionsById.read] },\n { path: /\\/(useradm)/i, types: [PermissionTypes.Post], uiPermissions: [uiPermissionsById.manage] }\n ],\n explanation:\n 'User management permissions should be granted carefully, as these allow privilege increases for any users managed by a user with user management permissions',\n key: 'userManagement',\n uiPermissions: [uiPermissionsById.read, uiPermissionsById.manage],\n title: 'User Management'\n }\n};\n\nconst permissionMapper = permission => permission.value;\nexport const itemUiPermissionsReducer = (accu, { item, uiPermissions }) => (item ? { ...accu, [item]: uiPermissions } : accu);\n\nconst checkSinglePermission = (permission, requiredPermission) =>\n requiredPermission === permission || uiPermissionsById[permission].permissionLevel > uiPermissionsById[requiredPermission].permissionLevel;\n\nexport const checkPermissionsObject = (permissions, requiredPermission, scopedAccess, superAccess) =>\n permissions[superAccess]?.some(permission => checkSinglePermission(permission, requiredPermission)) ||\n permissions[scopedAccess]?.some(permission => checkSinglePermission(permission, requiredPermission));\n\nexport const rolesById = Object.freeze({\n [staticRolesByName.admin]: {\n name: 'Admin',\n value: staticRolesByName.admin,\n description: 'Full access',\n permissions: [], // permissions refers to the values returned from the backend\n uiPermissions: {\n ...emptyUiPermissions,\n auditlog: uiPermissionsByArea.auditlog.uiPermissions.map(permissionMapper),\n deployments: uiPermissionsByArea.deployments.uiPermissions.map(permissionMapper),\n groups: { [ALL_DEVICES]: uiPermissionsByArea.groups.uiPermissions.map(permissionMapper) },\n releases: { [ALL_RELEASES]: uiPermissionsByArea.releases.uiPermissions.map(permissionMapper) },\n userManagement: uiPermissionsByArea.userManagement.uiPermissions.map(permissionMapper)\n }\n },\n [staticRolesByName.readOnly]: {\n name: 'Read Access',\n value: staticRolesByName.readOnly,\n description: '',\n permissions: [],\n uiPermissions: {\n ...emptyUiPermissions,\n deployments: [uiPermissionsById.read.value],\n groups: { [ALL_DEVICES]: [uiPermissionsById.read.value] },\n releases: { [ALL_RELEASES]: [uiPermissionsById.read.value] },\n userManagement: [uiPermissionsById.read.value]\n }\n },\n [staticRolesByName.ci]: {\n name: 'Releases Manager',\n value: staticRolesByName.ci,\n description: '',\n permissions: [],\n uiPermissions: {\n ...emptyUiPermissions,\n releases: { [ALL_RELEASES]: uiPermissionsByArea.releases.uiPermissions.map(permissionMapper) }\n }\n },\n [staticRolesByName.deploymentsManager]: {\n name: 'Deployments Manager',\n value: staticRolesByName.deploymentsManager,\n description: '',\n permissions: [],\n uiPermissions: {\n ...emptyUiPermissions,\n deployments: uiPermissionsByArea.deployments.uiPermissions.map(permissionMapper),\n groups: { [ALL_DEVICES]: [uiPermissionsById.deploy.value, uiPermissionsById.read.value] },\n releases: { [ALL_RELEASES]: [uiPermissionsById.read.value] }\n }\n },\n [staticRolesByName.terminalAccess]: {\n name: 'Troubleshooting',\n value: staticRolesByName.terminalAccess,\n description: 'Access to the troubleshooting features: Remote Terminal, File Transfer, Port Forwarding',\n permissions: [],\n uiPermissions: {\n ...emptyUiPermissions,\n groups: { [ALL_DEVICES]: [uiPermissionsById.connect.value] }\n }\n }\n});\n\nexport const serviceProviderRolesById = {\n admin: {\n name: 'Admin',\n value: staticRolesByName.admin,\n description: 'Full access',\n permissions: [],\n uiPermissions: {\n ...emptyUiPermissions,\n auditlog: uiPermissionsByArea.auditlog.uiPermissions.map(permissionMapper),\n userManagement: uiPermissionsByArea.userManagement.uiPermissions.map(permissionMapper),\n tenantManagement: uiPermissionsByArea.tenantManagement.uiPermissions.map(permissionMapper)\n }\n },\n readOnly: {\n name: 'Read access',\n value: staticRolesByName.readOnly,\n description: 'This role can see all linked organizations but cannot make any changes',\n permissions: [],\n uiPermissions: {\n ...emptyUiPermissions,\n auditlog: [uiPermissionsById.read.value],\n userManagement: [uiPermissionsById.read.value],\n tenantManagement: [uiPermissionsById.read.value]\n }\n }\n};\n\nexport const defaultPermissionSets = {\n [permissionSetIds.Basic]: {\n name: permissionSetIds.Basic,\n result: {\n // this is needed to prevent the detailed permissions of the basic permission set from being interpreted as allowing read & management access to user endpoints\n userManagement: [uiPermissionsById.read.value]\n }\n },\n [permissionSetIds.SuperUser]: {\n name: permissionSetIds.SuperUser,\n result: {\n ...rolesById[staticRolesByName.admin].uiPermissions\n }\n },\n [permissionSetIds.ManageUsers]: {\n name: permissionSetIds.ManageUsers,\n result: {\n userManagement: [uiPermissionsById.manage.value]\n }\n },\n [permissionSetIds.ReadAuditLogs]: {\n name: permissionSetIds.ReadAuditLogs,\n result: {\n auditlog: [uiPermissionsById.read.value]\n }\n },\n [permissionSetIds.ReadReleases]: {\n name: permissionSetIds.ReadReleases,\n result: {\n releases: { [ALL_RELEASES]: [uiPermissionsById.read.value] }\n }\n },\n [permissionSetIds.ReadTenants]: {\n name: permissionSetIds.ReadTenants,\n result: {\n tenantManagement: [uiPermissionsById.read.value]\n }\n },\n [permissionSetIds.ManageTenants]: {\n name: permissionSetIds.ManageTenants,\n result: {\n tenantManagement: [uiPermissionsById.manage.value]\n }\n },\n [permissionSetIds.ReadUsers]: {\n name: permissionSetIds.ReadUsers,\n result: {\n userManagement: [uiPermissionsById.read.value]\n }\n },\n [permissionSetIds.UploadArtifacts]: {\n name: permissionSetIds.UploadArtifacts,\n result: {\n releases: { [ALL_RELEASES]: [uiPermissionsById.upload.value] }\n }\n },\n [permissionSetIds.ManageReleases]: {\n name: permissionSetIds.ManageReleases,\n result: {\n releases: { [ALL_RELEASES]: [uiPermissionsById.manage.value] }\n }\n },\n [permissionSetIds.ConfigureDevices]: {\n name: permissionSetIds.ConfigureDevices,\n result: {\n deployments: [uiPermissionsById.read.value, uiPermissionsById.deploy.value],\n groups: { [ALL_DEVICES]: [uiPermissionsById.read.value, uiPermissionsById.configure.value] }\n }\n },\n [permissionSetIds.ConnectToDevices]: {\n name: permissionSetIds.ConnectToDevices,\n result: {\n groups: { [ALL_DEVICES]: [uiPermissionsById.read.value, uiPermissionsById.connect.value] }\n }\n },\n [permissionSetIds.DeployToDevices]: {\n name: permissionSetIds.DeployToDevices,\n result: {\n deployments: [uiPermissionsById.deploy.value, uiPermissionsById.manage.value, uiPermissionsById.read.value],\n groups: { [ALL_DEVICES]: [uiPermissionsById.read.value, uiPermissionsById.deploy.value] }\n }\n },\n [permissionSetIds.ManageDevices]: {\n name: permissionSetIds.ManageDevices,\n result: {\n groups: { [ALL_DEVICES]: [uiPermissionsById.read.value, uiPermissionsById.manage.value] }\n }\n },\n [permissionSetIds.ReadDevices]: {\n name: permissionSetIds.ReadDevices,\n result: {\n groups: { [ALL_DEVICES]: [uiPermissionsById.read.value] }\n }\n }\n};\n\nexport const USER_LOGOUT = 'USER_LOGOUT';\n\nexport const OWN_USER_ID = 'me';\n\nexport const rolesByName = {\n ...staticRolesByName,\n deploymentCreation: { action: 'CREATE_DEPLOYMENT', object: { type: 'DEVICE_GROUP', value: undefined } },\n groupAccess: { action: 'VIEW_DEVICE', object: { type: 'DEVICE_GROUP', value: undefined } },\n userManagement: { action: 'http', object: { type: 'any', value: `${useradmApiUrlv1}/.*` } }\n};\nexport const twoFAStates = {\n enabled: 'enabled',\n disabled: 'disabled',\n unverified: 'unverified'\n};\nexport const settingsKeys = { initialized: 'settings-initialized' };\n\nexport const READ_STATES = {\n read: 'read',\n seen: 'seen',\n unread: 'unread'\n};\n","// Copyright 2019 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { DEVICE_LIST_DEFAULTS, SORTING_OPTIONS, apiUrl } from '@northern.tech/store/constants';\n\nconst alreadyInstalled = 'already-installed';\n\nexport const deploymentsApiUrl = `${apiUrl.v1}/deployments`;\nexport const deploymentsApiUrlV2 = `${apiUrl.v2}/deployments`;\n\nexport const deploymentSubstates = {\n aborted: 'aborted',\n alreadyInstalled,\n decommissioned: 'decommissioned',\n downloading: 'downloading',\n failure: 'failure',\n installing: 'installing',\n noartifact: 'noartifact',\n pause_before_committing: 'pause_before_committing',\n pause_before_installing: 'pause_before_installing',\n pause_before_rebooting: 'pause_before_rebooting',\n pending: 'pending',\n rebooting: 'rebooting',\n success: 'success'\n};\n\nexport const deploymentStatesToSubstates = {\n failures: [deploymentSubstates.failure, deploymentSubstates.aborted, deploymentSubstates.decommissioned],\n inprogress: [deploymentSubstates.downloading, deploymentSubstates.installing, deploymentSubstates.rebooting],\n paused: [deploymentSubstates.pause_before_installing, deploymentSubstates.pause_before_rebooting, deploymentSubstates.pause_before_committing],\n pending: [deploymentSubstates.pending],\n successes: [deploymentSubstates.success, deploymentSubstates.alreadyInstalled, deploymentSubstates.noartifact]\n};\n\nexport const deploymentStatesToSubstatesWithSkipped = {\n ...deploymentStatesToSubstates,\n failures: [deploymentSubstates.failure],\n skipped: [deploymentSubstates.aborted, deploymentSubstates.noartifact, deploymentSubstates.alreadyInstalled, deploymentSubstates.decommissioned],\n successes: [deploymentSubstates.success]\n};\nexport const installationSubstatesMap = {\n download: {\n title: 'download',\n done: 'downloaded',\n successIndicators: [deploymentSubstates.installing, deploymentSubstates.rebooting, ...deploymentStatesToSubstates.paused, deploymentSubstates.success],\n failureIndicators: deploymentStatesToSubstates.failures,\n pauseConfigurationIndicator: 'ArtifactInstall_Enter'\n },\n install: {\n title: 'install',\n done: 'installed',\n successIndicators: [\n deploymentSubstates.rebooting,\n deploymentSubstates.pause_before_rebooting,\n deploymentSubstates.pause_before_committing,\n deploymentSubstates.success\n ],\n failureIndicators: deploymentStatesToSubstates.failures,\n pauseConfigurationIndicator: 'ArtifactReboot_Enter'\n },\n reboot: {\n title: 'reboot',\n done: 'rebooted',\n successIndicators: [deploymentSubstates.pause_before_committing, deploymentSubstates.success],\n failureIndicators: deploymentStatesToSubstates.failures,\n pauseConfigurationIndicator: 'ArtifactCommit_Enter'\n },\n commit: {\n title: 'commit',\n done: 'committed',\n successIndicators: deploymentStatesToSubstates.successes,\n failureIndicators: deploymentStatesToSubstates.failures,\n pauseConfigurationIndicator: undefined\n }\n};\n\nexport const DEPLOYMENT_STATES = {\n finished: 'finished',\n inprogress: 'inprogress',\n pending: 'pending',\n scheduled: 'scheduled'\n};\n\nexport const listDefaultsByState = {\n [DEPLOYMENT_STATES.inprogress]: { page: 1, perPage: 10 },\n [DEPLOYMENT_STATES.pending]: { page: 1, perPage: 10 },\n [DEPLOYMENT_STATES.scheduled]: { ...DEVICE_LIST_DEFAULTS },\n [DEPLOYMENT_STATES.finished]: { ...DEVICE_LIST_DEFAULTS },\n sort: { direction: SORTING_OPTIONS.desc }\n};\n\nexport const DEFAULT_PENDING_INPROGRESS_COUNT = 10;\nexport const DEPLOYMENT_ROUTES = {\n active: {\n key: 'active',\n route: '/deployments/active',\n states: [DEPLOYMENT_STATES.pending, DEPLOYMENT_STATES.inprogress],\n title: 'Active'\n },\n finished: {\n key: 'finished',\n route: '/deployments/finished',\n states: [DEPLOYMENT_STATES.finished],\n title: 'Finished'\n },\n scheduled: {\n key: 'scheduled',\n route: '/deployments/scheduled',\n states: [DEPLOYMENT_STATES.scheduled],\n title: 'Scheduled'\n }\n};\nexport const DEPLOYMENT_TYPES = {\n software: 'software',\n configuration: 'configuration'\n};\nexport const defaultStats = {\n [deploymentSubstates.aborted]: 0,\n [deploymentSubstates.alreadyInstalled]: 0,\n [deploymentSubstates.decommissioned]: 0,\n [deploymentSubstates.downloading]: 0,\n [deploymentSubstates.failure]: 0,\n [deploymentSubstates.installing]: 0,\n [deploymentSubstates.noartifact]: 0,\n [deploymentSubstates.pause_before_committing]: 0,\n [deploymentSubstates.pause_before_installing]: 0,\n [deploymentSubstates.pause_before_rebooting]: 0,\n [deploymentSubstates.pending]: 0,\n [deploymentSubstates.rebooting]: 0,\n [deploymentSubstates.success]: 0\n};\nexport const deploymentDisplayStates = {\n finished: 'Finished',\n scheduled: 'Scheduled',\n skipped: 'Skipped',\n paused: 'Paused',\n pending: 'Pending',\n inprogress: 'In Progress',\n success: 'Success',\n successes: 'Success',\n failure: 'Fail',\n failures: 'Fail'\n};\n\nexport const deploymentPrototype = {\n devices: {},\n name: undefined,\n statistics: { status: {} }\n};\n\nexport const pauseMap = {\n [deploymentSubstates.pause_before_installing]: {\n title: installationSubstatesMap.download.done,\n followUp: installationSubstatesMap.download.pauseConfigurationIndicator\n },\n [deploymentSubstates.pause_before_rebooting]: {\n title: installationSubstatesMap.install.done,\n followUp: installationSubstatesMap.install.pauseConfigurationIndicator\n },\n [deploymentSubstates.pause_before_committing]: {\n title: installationSubstatesMap.reboot.done,\n followUp: installationSubstatesMap.reboot.pauseConfigurationIndicator\n }\n};\nexport const limitDefault = { min: 5, max: 100, default: 10 };\n"],"mappings":";;;;;;;;;;;;;;AAeO,IAAM,cAAc,EAAE,KAAK,MAAM,OAAO,IAAI,UAAU,yBAAyB,IAAI,KAAK,OAA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OAAO,GAAG;AAAA,EAC/B,CAAC,oBAAoB,UAAU,GAAG;AAAA,EAClC,CAAC,oBAAoB,UAAU,GAAG;AAAA,EAClC,CAAC,oBAAoB,uBAAuB,GAAG;AAAA,EAC/C,CAAC,oBAAoB,uBAAuB,GAAG;AAAA,EAC/C,CAAC,oBAAoB,sBAAsB,GAAG;AAAA,EAC9C,CAAC,oBAAoB,OAAO,GAAG;AAAA,EAC/B,CAAC,oBAAoB,SAAS,GAAG;AAAA,EACjC,CAAC,oBAAoB,OAAO,GAAG;AACjC;AACO,IAAM,0BAA0B;AAAA,EACrC,UAAU;AAAA,EACV,WAAW;AAAA,EACX,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,WAAW;AAAA,EACX,SAAS;AAAA,EACT,UAAU;AACZ;AAEO,IAAM,sBAAsB;AAAA,EACjC,SAAS,CAAC;AAAA,EACV,MAAM;AAAA,EACN,YAAY,EAAE,QAAQ,CAAC,EAAE;AAC3B;AAEO,IAAM,WAAW;AAAA,EACtB,CAAC,oBAAoB,uBAAuB,GAAG;AAAA,IAC7C,OAAO,yBAAyB,SAAS;AAAA,IACzC,UAAU,yBAAyB,SAAS;AAAA,EAC9C;AAAA,EACA,CAAC,oBAAoB,sBAAsB,GAAG;AAAA,IAC5C,OAAO,yBAAyB,QAAQ;AAAA,IACxC,UAAU,yBAAyB,QAAQ;AAAA,EAC7C;AAAA,EACA,CAAC,oBAAoB,uBAAuB,GAAG;AAAA,IAC7C,OAAO,yBAAyB,OAAO;AAAA,IACvC,UAAU,yBAAyB,OAAO;AAAA,EAC5C;AACF;AACO,IAAM,eAAe,EAAE,KAAK,GAAG,KAAK,KAAK,SAAS,GAAG;","names":[]}
@@ -1,47 +1,46 @@
1
1
  import {
2
2
  actions_default
3
- } from "./chunk-NNADGHSL.js";
4
- import {
5
- usersSlice_default
6
- } from "./chunk-YGBFDXXA.js";
7
- import {
8
- releasesSlice_default
9
- } from "./chunk-CYV6632F.js";
3
+ } from "./chunk-ZZMFXRQK.js";
10
4
  import {
11
5
  deploymentsSlice_default
12
- } from "./chunk-E5LEU5PF.js";
6
+ } from "./chunk-DGQKXSRI.js";
13
7
  import {
14
- onboardingSlice_default
15
- } from "./chunk-FGKMJS3B.js";
8
+ usersSlice_default
9
+ } from "./chunk-7YZCUAXZ.js";
16
10
  import {
17
11
  actions,
18
12
  organizationSlice_default
19
- } from "./chunk-XTRPX7JZ.js";
13
+ } from "./chunk-FRSA2YB5.js";
20
14
  import {
21
- devicesSlice_default
22
- } from "./chunk-YTQUNAZP.js";
15
+ releasesSlice_default
16
+ } from "./chunk-NOQR3TE7.js";
23
17
  import {
24
18
  monitorSlice_default
25
- } from "./chunk-UEP36GCI.js";
19
+ } from "./chunk-AVX7VVOK.js";
20
+ import {
21
+ onboardingSlice_default
22
+ } from "./chunk-RX32WLVJ.js";
23
+ import {
24
+ devicesSlice_default
25
+ } from "./chunk-X3GZILYD.js";
26
26
  import {
27
27
  appSlice_default
28
- } from "./chunk-7PVGDMNM.js";
28
+ } from "./chunk-AFICTIVU.js";
29
29
  import {
30
30
  getToken
31
- } from "./chunk-AMGWP7A4.js";
31
+ } from "./chunk-GAI4VYRZ.js";
32
32
  import {
33
33
  USER_LOGOUT,
34
34
  settingsKeys
35
- } from "./chunk-A6CT6GTI.js";
35
+ } from "./chunk-OEP2D6QL.js";
36
36
 
37
37
  // src/store.ts
38
+ import { useDispatch } from "react-redux";
38
39
  import { extractErrorMessage, preformatWithRequestID } from "@northern.tech/utils/helpers";
39
40
  import { combineReducers, configureStore } from "@reduxjs/toolkit";
40
41
  var { setSnackbar, uploadProgress } = actions_default;
41
42
  var keys = ["sessionDeploymentChecker", settingsKeys.initialized];
42
- var resetEnvironment = () => {
43
- keys.map((key) => window.sessionStorage.removeItem(key));
44
- };
43
+ var resetEnvironment = () => keys.forEach((key) => window.sessionStorage.removeItem(key));
45
44
  resetEnvironment();
46
45
  var commonErrorFallback = "Please check your connection.";
47
46
  var commonErrorHandler = (err, errorContext, dispatch, fallback, mightBeAuthRelated = false) => {
@@ -67,6 +66,14 @@ var sessionReducer = (state, action) => {
67
66
  }
68
67
  return rootReducer(state, action);
69
68
  };
69
+ var rejectionLoggerMiddleware = () => (next) => (action) => {
70
+ if (action.type.endsWith("/rejected")) {
71
+ const { error } = action;
72
+ console.error("Rejection in action:", action);
73
+ console.error(error.stack);
74
+ }
75
+ return next(action);
76
+ };
70
77
  var getConfiguredStore = (options = {}) => {
71
78
  const { preloadedState = {}, ...config } = options;
72
79
  return configureStore({
@@ -82,18 +89,20 @@ var getConfiguredStore = (options = {}) => {
82
89
  ignoredActionPaths: ["uploads", "snackbar", /payload\..*$/],
83
90
  ignoredPaths: ["app.uploadsById", "app.snackbar", "organization.externalDeviceIntegrations"]
84
91
  }
85
- })
92
+ }).concat(rejectionLoggerMiddleware)
86
93
  });
87
94
  };
88
95
  var store = getConfiguredStore({
89
96
  preloadedState: {}
90
97
  });
98
+ var useAppDispatch = useDispatch;
91
99
 
92
100
  export {
93
101
  commonErrorFallback,
94
102
  commonErrorHandler,
95
103
  sessionReducer,
96
104
  getConfiguredStore,
97
- store
105
+ store,
106
+ useAppDispatch
98
107
  };
99
- //# sourceMappingURL=chunk-2RJIDREZ.js.map
108
+ //# sourceMappingURL=chunk-PAIB5V27.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/store.ts"],"sourcesContent":["// Copyright 2019 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// @ts-nocheck\nimport { useDispatch } from 'react-redux';\n\nimport { extractErrorMessage, preformatWithRequestID } from '@northern.tech/utils/helpers';\nimport { combineReducers, configureStore } from '@reduxjs/toolkit';\n\nimport actions from './actions';\nimport appSlice from './appSlice';\nimport { getToken } from './auth';\nimport { USER_LOGOUT, settingsKeys } from './constants';\nimport deploymentSlice from './deploymentsSlice';\nimport deviceSlice from './devicesSlice';\nimport monitorSlice from './monitorSlice';\nimport onboardingSlice from './onboardingSlice';\nimport organizationSlice, { actions as organizationActions } from './organizationSlice';\nimport releaseSlice from './releasesSlice';\nimport userSlice from './usersSlice';\n\nconst { setSnackbar, uploadProgress } = actions;\n\n// exclude 'pendings-redirect' since this is expected to persist refreshes - the rest should be better to be redone\nconst keys = ['sessionDeploymentChecker', settingsKeys.initialized];\nconst resetEnvironment = () => keys.forEach(key => window.sessionStorage.removeItem(key));\n\nresetEnvironment();\n\nexport const commonErrorFallback = 'Please check your connection.';\nexport const commonErrorHandler = (err, errorContext, dispatch, fallback, mightBeAuthRelated = false) => {\n const errMsg = extractErrorMessage(err, fallback);\n if (mightBeAuthRelated || getToken()) {\n dispatch(setSnackbar({ message: preformatWithRequestID(err.response, `${errorContext} ${errMsg}`), action: 'Copy to clipboard' }));\n }\n return Promise.reject(err);\n};\n\nconst rootReducer = combineReducers({\n app: appSlice,\n devices: deviceSlice,\n deployments: deploymentSlice,\n monitor: monitorSlice,\n onboarding: onboardingSlice,\n organization: organizationSlice,\n releases: releaseSlice,\n users: userSlice\n});\n\nexport const sessionReducer = (state, action) => {\n if (action.type === USER_LOGOUT) {\n state = undefined;\n }\n return rootReducer(state, action);\n};\n\nconst rejectionLoggerMiddleware = () => next => action => {\n if (action.type.endsWith('/rejected')) {\n const { error } = action;\n console.error('Rejection in action:', action);\n console.error(error.stack);\n }\n return next(action);\n};\n\nexport const getConfiguredStore = (options = {}) => {\n const { preloadedState = {}, ...config } = options;\n return configureStore({\n ...config,\n preloadedState,\n reducer: sessionReducer,\n middleware: getDefaultMiddleware =>\n getDefaultMiddleware({\n immutableCheck: {\n ignoredPaths: ['app.uploadsById']\n },\n serializableCheck: {\n ignoredActions: [organizationActions.receiveExternalDeviceIntegrations.name, setSnackbar.name, uploadProgress.name],\n ignoredActionPaths: ['uploads', 'snackbar', /payload\\..*$/],\n ignoredPaths: ['app.uploadsById', 'app.snackbar', 'organization.externalDeviceIntegrations']\n }\n }).concat(rejectionLoggerMiddleware)\n });\n};\nexport const store = getConfiguredStore({\n preloadedState: {}\n});\nexport type AppDispatch = typeof store.dispatch;\nexport const useAppDispatch: () => AppDispatch = useDispatch;\nexport type RootState = ReturnType<typeof store.getState>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,SAAS,mBAAmB;AAE5B,SAAS,qBAAqB,8BAA8B;AAC5D,SAAS,iBAAiB,sBAAsB;AAchD,IAAM,EAAE,aAAa,eAAe,IAAI;AAGxC,IAAM,OAAO,CAAC,4BAA4B,aAAa,WAAW;AAClE,IAAM,mBAAmB,MAAM,KAAK,QAAQ,SAAO,OAAO,eAAe,WAAW,GAAG,CAAC;AAExF,iBAAiB;AAEV,IAAM,sBAAsB;AAC5B,IAAM,qBAAqB,CAAC,KAAK,cAAc,UAAU,UAAU,qBAAqB,UAAU;AACvG,QAAM,SAAS,oBAAoB,KAAK,QAAQ;AAChD,MAAI,sBAAsB,SAAS,GAAG;AACpC,aAAS,YAAY,EAAE,SAAS,uBAAuB,IAAI,UAAU,GAAG,YAAY,IAAI,MAAM,EAAE,GAAG,QAAQ,oBAAoB,CAAC,CAAC;AAAA,EACnI;AACA,SAAO,QAAQ,OAAO,GAAG;AAC3B;AAEA,IAAM,cAAc,gBAAgB;AAAA,EAClC,KAAK;AAAA,EACL,SAAS;AAAA,EACT,aAAa;AAAA,EACb,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,UAAU;AAAA,EACV,OAAO;AACT,CAAC;AAEM,IAAM,iBAAiB,CAAC,OAAO,WAAW;AAC/C,MAAI,OAAO,SAAS,aAAa;AAC/B,YAAQ;AAAA,EACV;AACA,SAAO,YAAY,OAAO,MAAM;AAClC;AAEA,IAAM,4BAA4B,MAAM,UAAQ,YAAU;AACxD,MAAI,OAAO,KAAK,SAAS,WAAW,GAAG;AACrC,UAAM,EAAE,MAAM,IAAI;AAClB,YAAQ,MAAM,wBAAwB,MAAM;AAC5C,YAAQ,MAAM,MAAM,KAAK;AAAA,EAC3B;AACA,SAAO,KAAK,MAAM;AACpB;AAEO,IAAM,qBAAqB,CAAC,UAAU,CAAC,MAAM;AAClD,QAAM,EAAE,iBAAiB,CAAC,GAAG,GAAG,OAAO,IAAI;AAC3C,SAAO,eAAe;AAAA,IACpB,GAAG;AAAA,IACH;AAAA,IACA,SAAS;AAAA,IACT,YAAY,0BACV,qBAAqB;AAAA,MACnB,gBAAgB;AAAA,QACd,cAAc,CAAC,iBAAiB;AAAA,MAClC;AAAA,MACA,mBAAmB;AAAA,QACjB,gBAAgB,CAAC,QAAoB,kCAAkC,MAAM,YAAY,MAAM,eAAe,IAAI;AAAA,QAClH,oBAAoB,CAAC,WAAW,YAAY,cAAc;AAAA,QAC1D,cAAc,CAAC,mBAAmB,gBAAgB,yCAAyC;AAAA,MAC7F;AAAA,IACF,CAAC,EAAE,OAAO,yBAAyB;AAAA,EACvC,CAAC;AACH;AACO,IAAM,QAAQ,mBAAmB;AAAA,EACtC,gBAAgB,CAAC;AACnB,CAAC;AAEM,IAAM,iBAAoC;","names":[]}
@@ -14,9 +14,7 @@ var onboardingSlice = createSlice({
14
14
  name: sliceName,
15
15
  initialState,
16
16
  reducers: {
17
- setOnboardingState: (state, action) => {
18
- return { ...state, ...action.payload };
19
- },
17
+ setOnboardingState: (state, action) => ({ ...state, ...action.payload }),
20
18
  setDemoArtifactPort: (state, action) => {
21
19
  state.demoArtifactPort = action.payload;
22
20
  },
@@ -50,4 +48,4 @@ export {
50
48
  actions,
51
49
  onboardingSlice_default
52
50
  };
53
- //# sourceMappingURL=chunk-FGKMJS3B.js.map
51
+ //# sourceMappingURL=chunk-RX32WLVJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/onboardingSlice/index.ts"],"sourcesContent":["// Copyright 2023 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { createSlice } from '@reduxjs/toolkit';\n\nexport const sliceName = 'onboarding';\n\nexport const initialState = {\n approach: null,\n complete: false,\n deviceType: null,\n demoArtifactPort: 85,\n progress: null,\n showTips: null,\n showTipsDialog: false\n};\n\nexport const onboardingSlice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n setOnboardingState: (state, action) => ({ ...state, ...action.payload }),\n setDemoArtifactPort: (state, action) => {\n state.demoArtifactPort = action.payload;\n },\n setShowOnboardingHelp: (state, action) => {\n state.showTips = action.payload;\n },\n setShowDismissOnboardingTipsDialog: (state, action) => {\n state.showTipsDialog = action.payload;\n },\n setOnboardingComplete: (state, action) => {\n state.complete = action.payload;\n },\n setOnboardingProgress: (state, action) => {\n state.progress = action.payload;\n },\n setOnboardingDeviceType: (state, action) => {\n state.deviceType = action.payload;\n },\n setOnboardingApproach: (state, action) => {\n state.approach = action.payload;\n }\n }\n});\n\nexport const actions = onboardingSlice.actions;\nexport default onboardingSlice.reducer;\n"],"mappings":";AAaA,SAAS,mBAAmB;AAErB,IAAM,YAAY;AAElB,IAAM,eAAe;AAAA,EAC1B,UAAU;AAAA,EACV,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,UAAU;AAAA,EACV,UAAU;AAAA,EACV,gBAAgB;AAClB;AAEO,IAAM,kBAAkB,YAAY;AAAA,EACzC,MAAM;AAAA,EACN;AAAA,EACA,UAAU;AAAA,IACR,oBAAoB,CAAC,OAAO,YAAY,EAAE,GAAG,OAAO,GAAG,OAAO,QAAQ;AAAA,IACtE,qBAAqB,CAAC,OAAO,WAAW;AACtC,YAAM,mBAAmB,OAAO;AAAA,IAClC;AAAA,IACA,uBAAuB,CAAC,OAAO,WAAW;AACxC,YAAM,WAAW,OAAO;AAAA,IAC1B;AAAA,IACA,oCAAoC,CAAC,OAAO,WAAW;AACrD,YAAM,iBAAiB,OAAO;AAAA,IAChC;AAAA,IACA,uBAAuB,CAAC,OAAO,WAAW;AACxC,YAAM,WAAW,OAAO;AAAA,IAC1B;AAAA,IACA,uBAAuB,CAAC,OAAO,WAAW;AACxC,YAAM,WAAW,OAAO;AAAA,IAC1B;AAAA,IACA,yBAAyB,CAAC,OAAO,WAAW;AAC1C,YAAM,aAAa,OAAO;AAAA,IAC5B;AAAA,IACA,uBAAuB,CAAC,OAAO,WAAW;AACxC,YAAM,WAAW,OAAO;AAAA,IAC1B;AAAA,EACF;AACF,CAAC;AAEM,IAAM,UAAU,gBAAgB;AACvC,IAAO,0BAAQ,gBAAgB;","names":[]}
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  DEVICE_STATES
3
- } from "./chunk-A6CT6GTI.js";
3
+ } from "./chunk-OEP2D6QL.js";
4
4
  import {
5
5
  DEVICE_LIST_DEFAULTS,
6
6
  SORTING_OPTIONS
7
- } from "./chunk-4B3IMP4I.js";
7
+ } from "./chunk-BSN2TOQC.js";
8
8
 
9
9
  // src/devicesSlice/index.ts
10
10
  import { deepCompare, duplicateFilter } from "@northern.tech/utils/helpers";
@@ -194,4 +194,4 @@ export {
194
194
  actions,
195
195
  devicesSlice_default
196
196
  };
197
- //# sourceMappingURL=chunk-YTQUNAZP.js.map
197
+ //# sourceMappingURL=chunk-X3GZILYD.js.map
@@ -1,5 +1,13 @@
1
1
  // src/appSlice/constants.ts
2
2
  import { BarChart as BarChartIcon, PieChartOutline as PieChartIcon } from "@mui/icons-material";
3
+
4
+ // ../../assets/img/flag-eu.svg
5
+ var flag_eu_default = "./flag-eu-5477R2P4.svg";
6
+
7
+ // ../../assets/img/flag-us.svg
8
+ var flag_us_default = "./flag-us-HNQAF66I.svg";
9
+
10
+ // src/appSlice/constants.ts
3
11
  var startingDeviceCount = {
4
12
  os: "for first 50 devices",
5
13
  professional: "for first 250 devices"
@@ -23,36 +31,36 @@ var defaultReportType = "distribution";
23
31
  var defaultReports = [{ ...emptyChartSelection, group: null, attribute: "artifact_name", type: defaultReportType }];
24
32
  var BEGINNING_OF_TIME = "2016-01-01T00:00:00.000Z";
25
33
  var locations = {
26
- eu: { key: "eu", title: "EU", location: "eu.hosted.mender.io" },
27
- us: { key: "us", title: "US", location: "hosted.mender.io" }
34
+ eu: { key: "eu", title: "EU", location: "eu.hosted.mender.io", icon: flag_eu_default },
35
+ us: { key: "us", title: "US", location: "hosted.mender.io", icon: flag_us_default }
28
36
  };
29
37
  var PLANS = {
30
38
  os: {
31
39
  id: "os",
32
40
  name: "Basic",
33
41
  offer: true,
34
- price: "$32/month",
42
+ price: "$32 / month",
35
43
  deviceCount: startingDeviceCount.os,
36
- offerprice: "$23/month for first 50 devices",
44
+ offerprice: "$23 / month for first 50 devices",
37
45
  price2: "for first 6 months;\n$29/month thereafter",
38
- features: ["Basic OTA features"]
46
+ features: ["Access to core features of Mender", "Basic support"]
39
47
  },
40
48
  professional: {
41
49
  id: "professional",
42
50
  name: "Professional",
43
51
  offer: true,
44
- price: "$269/month",
52
+ price: "$269 / month",
45
53
  deviceCount: startingDeviceCount.professional,
46
- offerprice: "$200/month for first 50 devices",
54
+ offerprice: "$200 / month for first 50 devices",
47
55
  price2: "for first 6 months;\n$249/month thereafter",
48
- features: ["+ Advanced OTA features", "+ Standard support"]
56
+ features: ["Advanced OTA features", "Higher priority support"]
49
57
  },
50
58
  enterprise: {
51
59
  id: "enterprise",
52
60
  name: "Enterprise",
53
61
  price: "Custom pricing",
54
- deviceCount: "unlimited devices",
55
- features: ["+ Enterprise-grade OTA features", "+ Premium support"]
62
+ deviceCount: "Unlimited devices",
63
+ features: ["All Mender features", "Advanced security features", "SLA-backed support"]
56
64
  }
57
65
  };
58
66
  var ADDONS = {
@@ -163,4 +171,4 @@ export {
163
171
  APPLICATION_JSON_CONTENT_TYPE,
164
172
  APPLICATION_JWT_CONTENT_TYPE
165
173
  };
166
- //# sourceMappingURL=chunk-25AKG5HH.js.map
174
+ //# sourceMappingURL=chunk-Y575RZHR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/appSlice/constants.ts"],"sourcesContent":["// Copyright 2019 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//@ts-nocheck\nimport { BarChart as BarChartIcon, PieChartOutline as PieChartIcon } from '@mui/icons-material';\n\nimport FlagEU from '../../../../assets/img/flag-eu.svg';\nimport FlagUS from '../../../../assets/img/flag-us.svg';\n\nconst startingDeviceCount = {\n os: 'for first 50 devices',\n professional: 'for first 250 devices'\n};\n\nexport const apiRoot = '/api/management';\nexport const apiUrl = {\n v1: `${apiRoot}/v1`,\n v2: `${apiRoot}/v2`\n};\n\nexport const headerNames = {\n link: 'link',\n location: 'location',\n total: 'x-total-count'\n};\n\nexport const chartTypes = {\n bar: { key: 'bar', Icon: BarChartIcon },\n pie: { key: 'pie', Icon: PieChartIcon }\n};\nexport const emptyChartSelection = { software: '', group: '', chartType: chartTypes.bar.key, attribute: 'artifact_name' };\nexport const defaultReportType = 'distribution';\nexport const defaultReports = [{ ...emptyChartSelection, group: null, attribute: 'artifact_name', type: defaultReportType }];\n\nexport const BEGINNING_OF_TIME = '2016-01-01T00:00:00.000Z';\n\nexport const locations = {\n eu: { key: 'eu', title: 'EU', location: 'eu.hosted.mender.io', icon: FlagEU },\n us: { key: 'us', title: 'US', location: 'hosted.mender.io', icon: FlagUS }\n};\nexport type AvailablePlans = 'os' | 'professional' | 'enterprise';\n\nexport type Plan = {\n deviceCount: string;\n features: string[];\n id: AvailablePlans;\n name: string;\n offer?: boolean;\n offerprice?: string;\n price: string;\n price2?: string;\n};\n\nexport type AvailableAddon = 'configure' | 'troubleshoot' | 'monitor';\n\nexport const PLANS: { [key in AvailablePlans]: Plan } = {\n os: {\n id: 'os',\n name: 'Basic',\n offer: true,\n price: '$32 / month',\n deviceCount: startingDeviceCount.os,\n offerprice: '$23 / month for first 50 devices',\n price2: 'for first 6 months;\\n$29/month thereafter',\n features: ['Access to core features of Mender', 'Basic support']\n },\n professional: {\n id: 'professional',\n name: 'Professional',\n offer: true,\n price: '$269 / month',\n deviceCount: startingDeviceCount.professional,\n offerprice: '$200 / month for first 50 devices',\n price2: 'for first 6 months;\\n$249/month thereafter',\n features: ['Advanced OTA features', 'Higher priority support']\n },\n enterprise: {\n id: 'enterprise',\n name: 'Enterprise',\n price: 'Custom pricing',\n deviceCount: 'Unlimited devices',\n features: ['All Mender features', 'Advanced security features', 'SLA-backed support']\n }\n};\nexport type Addon = {\n description: string;\n eligible: AvailablePlans[];\n id: string;\n needs: string[];\n title: string;\n} & {\n [key in Exclude<AvailablePlans, 'enterprise'>]: {\n deviceCount: string;\n price: string;\n };\n};\n\nexport type AddonId = keyof typeof ADDONS;\n\n// the needs names need to be aligned with the name of the features in the appReducer, as they will be checked in the addonselection\nexport const ADDONS: { [key in AvailableAddon]: Addon } = {\n configure: {\n id: 'configure',\n title: 'Configure',\n description: 'Expand your plan with device configuration features',\n needs: ['hasDeviceConfig'],\n os: {\n price: '$11/month',\n deviceCount: startingDeviceCount.os\n },\n professional: {\n price: '$65/month',\n deviceCount: startingDeviceCount.professional\n },\n eligible: ['os', 'professional', 'enterprise']\n },\n troubleshoot: {\n id: 'troubleshoot',\n title: 'Troubleshoot',\n description: 'Expand your plan with device troubleshooting features',\n needs: ['hasDeviceConnect'],\n os: {\n price: '$27/month',\n deviceCount: startingDeviceCount.os\n },\n professional: {\n price: '$72/month',\n deviceCount: startingDeviceCount.professional\n },\n eligible: ['os', 'professional', 'enterprise']\n },\n monitor: {\n id: 'monitor',\n title: 'Monitor',\n description: 'Expand your plan with device monitoring features',\n needs: ['hasMonitor'],\n os: {\n price: '-',\n deviceCount: '-'\n },\n professional: {\n price: '$86/month',\n deviceCount: startingDeviceCount.professional\n },\n eligible: ['professional', 'enterprise']\n }\n};\n\nexport const BENEFITS = {\n auditlog: { id: 'auditlog', benefit: 'trace change across your devices and access troubleshooting session replay', requiredPlan: PLANS.professional.id },\n dashboard: { id: 'dashboard', benefit: 'actionable insights into the devices you are updating with Mender', requiredPlan: PLANS.enterprise.id },\n deltaGeneration: {\n id: 'deltaGeneration',\n benefit: 'automatic delta artifacts generation to minimize data transfer and improve the update delivery',\n requiredPlan: PLANS.enterprise.id\n },\n deviceConfiguration: { id: 'deviceConfiguration', benefit: 'device configuration features', requiredAddon: ADDONS.configure.id },\n deviceMonitor: { id: 'deviceMonitor', benefit: 'device monitoring features', requiredAddon: ADDONS.monitor.id, requiredPlan: PLANS.professional.id },\n deviceTroubleshoot: { id: 'deviceTroubleshoot', benefit: 'device troubleshooting features', requiredAddon: ADDONS.troubleshoot.id },\n dynamicGroups: { id: 'dynamicGroups', benefit: 'create dynamic groups to ease device management', requiredPlan: PLANS.enterprise.id },\n fullFiltering: { id: 'fullFiltering', benefit: 'filtering by multiple attributes to improve the device overview', requiredPlan: PLANS.professional.id },\n gateway: { id: 'gateway', benefit: 'see devices connected to your gateway device for easy access', requiredPlans: PLANS.professional.id },\n pausedDeployments: {\n id: 'pausedDeployments',\n benefit: 'granular control about update rollout to allow synchronization across your fleet',\n requiredPlan: PLANS.enterprise.id\n },\n phasedDeployments: { id: 'phasedDeployments', benefit: 'choose to roll out deployments in multiple phases', requiredPlan: PLANS.enterprise.id },\n rbac: { id: 'rbac', benefit: 'granular role based access control', requiredPlan: PLANS.enterprise.id },\n retryDeployments: { id: 'retryDeployments', benefit: 'optional retries for failed rollout attempts', requiredPlan: PLANS.professional.id },\n scheduledDeployments: {\n id: 'scheduledDeployments',\n benefit: 'scheduled deployments to steer the distribution of your updates.',\n requiredPlan: PLANS.professional.id\n },\n webhookEvents: {\n id: 'webhookEvents',\n benefit: 'receive inventory events and select which type(s) of events the webhook will receive',\n requiredPlan: PLANS.professional.id\n },\n\n default: { id: 'default', benefit: 'gain access to this feature', requiredPlan: PLANS.enterprise.id }\n};\n\nexport const yes = () => true;\nexport const canAccess = yes;\n\nexport const DARK_MODE = 'dark';\nexport const LIGHT_MODE = 'light';\n\nexport const APPLICATION_JSON_CONTENT_TYPE = 'application/json';\nexport const APPLICATION_JWT_CONTENT_TYPE = 'application/jwt';\n"],"mappings":";AAcA,SAAS,YAAY,cAAc,mBAAmB,oBAAoB;A;;;;;;;;AAK1E,IAAM,sBAAsB;AAAA,EAC1B,IAAI;AAAA,EACJ,cAAc;AAChB;AAEO,IAAM,UAAU;AAChB,IAAM,SAAS;AAAA,EACpB,IAAI,GAAG,OAAO;AAAA,EACd,IAAI,GAAG,OAAO;AAChB;AAEO,IAAM,cAAc;AAAA,EACzB,MAAM;AAAA,EACN,UAAU;AAAA,EACV,OAAO;AACT;AAEO,IAAM,aAAa;AAAA,EACxB,KAAK,EAAE,KAAK,OAAO,MAAM,aAAa;AAAA,EACtC,KAAK,EAAE,KAAK,OAAO,MAAM,aAAa;AACxC;AACO,IAAM,sBAAsB,EAAE,UAAU,IAAI,OAAO,IAAI,WAAW,WAAW,IAAI,KAAK,WAAW,gBAAgB;AACjH,IAAM,oBAAoB;AAC1B,IAAM,iBAAiB,CAAC,EAAE,GAAG,qBAAqB,OAAO,MAAM,WAAW,iBAAiB,MAAM,kBAAkB,CAAC;AAEpH,IAAM,oBAAoB;AAE1B,IAAM,YAAY;AAA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,cAAc,MAAM,WAAW;AAAA,EACjC;AAAA,EACA,mBAAmB,EAAE,IAAI,qBAAqB,SAAS,qDAAqD,cAAc,MAAM,WAAW,GAAG;AAAA,EAC9I,MAAM,EAAE,IAAI,QAAQ,SAAS,sCAAsC,cAAc,MAAM,WAAW,GAAG;AAAA,EACrG,kBAAkB,EAAE,IAAI,oBAAoB,SAAS,gDAAgD,cAAc,MAAM,aAAa,GAAG;AAAA,EACzI,sBAAsB;AAAA,IACpB,IAAI;AAAA,IACJ,SAAS;AAAA,IACT,cAAc,MAAM,aAAa;AAAA,EACnC;AAAA,EACA,eAAe;AAAA,IACb,IAAI;AAAA,IACJ,SAAS;AAAA,IACT,cAAc,MAAM,aAAa;AAAA,EACnC;AAAA,EAEA,SAAS,EAAE,IAAI,WAAW,SAAS,+BAA+B,cAAc,MAAM,WAAW,GAAG;AACtG;AAEO,IAAM,MAAM,MAAM;AAClB,IAAM,YAAY;AAElB,IAAM,YAAY;AAClB,IAAM,aAAa;AAEnB,IAAM,gCAAgC;AACtC,IAAM,+BAA+B;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEPLOYMENT_STATES
3
- } from "./chunk-A6CT6GTI.js";
3
+ } from "./chunk-OEP2D6QL.js";
4
4
 
5
5
  // src/deploymentsSlice/selectors.ts
6
6
  import { createSelector } from "@reduxjs/toolkit";
@@ -51,4 +51,4 @@ export {
51
51
  DEPLOYMENT_CUTOFF,
52
52
  getRecentDeployments
53
53
  };
54
- //# sourceMappingURL=chunk-RX55KAKX.js.map
54
+ //# sourceMappingURL=chunk-ZWOAFHAR.js.map
@@ -1,27 +1,27 @@
1
+ import {
2
+ actions as actions2
3
+ } from "./chunk-DGQKXSRI.js";
1
4
  import {
2
5
  actions as actions8
3
- } from "./chunk-YGBFDXXA.js";
6
+ } from "./chunk-7YZCUAXZ.js";
7
+ import {
8
+ actions as actions6
9
+ } from "./chunk-FRSA2YB5.js";
4
10
  import {
5
11
  actions as actions7
6
- } from "./chunk-CYV6632F.js";
12
+ } from "./chunk-NOQR3TE7.js";
7
13
  import {
8
- actions as actions2
9
- } from "./chunk-E5LEU5PF.js";
14
+ actions as actions4
15
+ } from "./chunk-AVX7VVOK.js";
10
16
  import {
11
17
  actions as actions5
12
- } from "./chunk-FGKMJS3B.js";
13
- import {
14
- actions as actions6
15
- } from "./chunk-XTRPX7JZ.js";
18
+ } from "./chunk-RX32WLVJ.js";
16
19
  import {
17
20
  actions as actions3
18
- } from "./chunk-YTQUNAZP.js";
19
- import {
20
- actions as actions4
21
- } from "./chunk-UEP36GCI.js";
21
+ } from "./chunk-X3GZILYD.js";
22
22
  import {
23
23
  actions
24
- } from "./chunk-7PVGDMNM.js";
24
+ } from "./chunk-AFICTIVU.js";
25
25
 
26
26
  // src/actions.ts
27
27
  var actions_default = {
@@ -38,4 +38,4 @@ var actions_default = {
38
38
  export {
39
39
  actions_default
40
40
  };
41
- //# sourceMappingURL=chunk-NNADGHSL.js.map
41
+ //# sourceMappingURL=chunk-ZZMFXRQK.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/commonConstants.tsx"],"sourcesContent":["// Copyright 2024 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// @ts-nocheck\nimport React from 'react';\n\nimport { mdiAws as AWS, mdiMicrosoftAzure as Azure } from '@mdi/js';\n\nexport const DEVICE_LIST_DEFAULTS = {\n page: 1,\n perPage: 20\n};\n\nexport const timeUnits = {\n days: 'days',\n minutes: 'minutes',\n hours: 'hours'\n};\n\nexport const ALL_DEVICES = 'All devices';\nexport const UNGROUPED_GROUP = { id: '*|=ungrouped=|*', name: 'Unassigned' };\n\nexport const DEVICE_LIST_MAXIMUM_LENGTH = 50;\n\nexport const DEVICE_FILTERING_OPTIONS = {\n $eq: { key: '$eq', title: 'equals', shortform: '=' },\n $ne: { key: '$ne', title: 'not equal', shortform: '!=' },\n $gt: {\n key: '$gt',\n title: '>',\n shortform: '>',\n 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.'\n },\n $gte: {\n title: '>=',\n shortform: '>=',\n 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.'\n },\n $lt: {\n key: '$lt',\n title: '<',\n shortform: '<',\n 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.'\n },\n $lte: {\n title: '<=',\n shortform: '<=',\n 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.'\n },\n $ltne: {\n key: '$ltne',\n title: '$ltne',\n shortform: 'ltne',\n 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.'\n },\n $in: {\n key: '$in',\n title: 'in',\n shortform: 'in',\n 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.'\n },\n $nin: {\n key: '$nin',\n title: 'not in',\n shortform: 'not in',\n 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.`\n },\n $exists: {\n key: '$exists',\n title: 'exists',\n shortform: 'exists',\n value: true,\n help: `The \"exists\" operator matches if the selected field's value has a value. No value needs to be provided for this operator.`\n },\n $nexists: {\n key: '$nexists',\n title: `doesn't exist`,\n shortform: `doesn't exist`,\n value: true,\n 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.`\n },\n $regex: {\n key: '$regex',\n title: `matches regular expression`,\n shortform: `matches`,\n 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.`\n }\n};\n\nexport const DEVICE_ISSUE_OPTIONS = {\n issues: {\n isCategory: true,\n key: 'issues',\n title: 'Devices with issues',\n filterRule: {}\n },\n offline: {\n issueCategory: 'issues',\n key: 'offline',\n needsFullFiltering: true,\n needsMonitor: false,\n needsReporting: false,\n filterRule: {\n scope: 'system',\n key: 'check_in_time',\n operator: DEVICE_FILTERING_OPTIONS.$ltne.key,\n value: ({ offlineThreshold }) => offlineThreshold\n },\n title: 'Offline devices'\n },\n failedLastUpdate: {\n issueCategory: 'issues',\n key: 'failedLastUpdate',\n needsFullFiltering: false,\n needsMonitor: false,\n needsReporting: true,\n filterRule: { scope: 'monitor', key: 'failed_last_update', operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: true },\n title: 'Deployment failed'\n },\n monitoring: {\n issueCategory: 'issues',\n key: 'monitoring',\n needsFullFiltering: false,\n needsMonitor: true,\n needsReporting: false,\n filterRule: { scope: 'monitor', key: 'alerts', operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: true },\n title: 'Monitoring alert'\n },\n authRequests: {\n key: 'authRequests',\n needsFullFiltering: false,\n needsMonitor: false,\n needsReporting: true,\n filterRule: { scope: 'monitor', key: 'auth_requests', operator: DEVICE_FILTERING_OPTIONS.$gt.key, value: 1 },\n title: 'Devices with new authentication requests'\n },\n gatewayDevices: {\n key: 'gatewayDevices',\n needsFullFiltering: false,\n needsMonitor: false,\n needsReporting: true,\n filterRule: { scope: 'inventory', key: 'mender_is_gateway', operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: 'true' },\n title: 'Gateway devices'\n }\n};\nconst oneSecond = 1000;\nexport const TIMEOUTS = {\n debounceDefault: 700,\n debounceShort: 300,\n halfASecond: 0.5 * oneSecond,\n oneSecond,\n twoSeconds: 2 * oneSecond,\n threeSeconds: 3 * oneSecond,\n fiveSeconds: 5 * oneSecond,\n refreshDefault: 10 * oneSecond,\n refreshLong: 60 * oneSecond\n};\n\nexport const SORTING_OPTIONS = {\n asc: 'asc',\n desc: 'desc'\n};\n\nexport const DEVICE_ONLINE_CUTOFF = { interval: 1, intervalName: timeUnits.days };\n\nexport const ATTRIBUTE_SCOPES = {\n inventory: 'inventory',\n identity: 'identity',\n monitor: 'monitor',\n system: 'system',\n tags: 'tags'\n};\n\nexport const defaultIdAttribute = Object.freeze({ attribute: 'id', scope: ATTRIBUTE_SCOPES.identity });\n\nconst credentialTypes = {\n aws: 'aws',\n http: 'http',\n sas: 'sas',\n x509: 'x509'\n};\nexport const EXTERNAL_PROVIDER = {\n 'iot-core': {\n credentialsType: credentialTypes.aws,\n icon: AWS,\n title: 'AWS IoT Core',\n twinTitle: 'Device Shadow',\n provider: 'iot-core',\n enabled: true,\n deviceTwin: true,\n configHint: <>For help finding your AWS IoT Core connection string, check the AWS IoT documentation.</>\n },\n 'iot-hub': {\n credentialsType: credentialTypes.sas,\n icon: Azure,\n title: 'Azure IoT Hub',\n twinTitle: 'Device Twin',\n provider: 'iot-hub',\n enabled: true,\n deviceTwin: true,\n configHint: (\n <span>\n For help finding your Azure IoT Hub connection string, look under &apos;Shared access policies&apos; in the Microsoft Azure UI as described{' '}\n {\n <a\n href=\"https://devblogs.microsoft.com/iotdev/understand-different-connection-strings-in-azure-iot-hub/#iothubconn\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n here\n </a>\n }\n .\n </span>\n )\n },\n webhook: {\n credentialsType: credentialTypes.http,\n deviceTwin: false,\n // disable the webhook provider here, since it is treated different than other integrations, with a custom configuration & management view, etc.\n enabled: false,\n provider: 'webhook'\n }\n};\nexport const MAX_PAGE_SIZE = 500;\n\nexport const ALL_RELEASES = 'All releases';\n\nexport type UiPermissionsDefinition = Readonly<{\n auditlog: string[];\n deployments?: string[]; // deployments are so far only covered indirectly through releases + device group permissions\n groups: Record<string, string[]>;\n releases: Record<string, string[]>;\n tenantManagement: string[];\n userManagement: string[];\n}>;\n\nexport type UiRoleDefinition = {\n name: string;\n description: string;\n editable?: boolean;\n isCustom?: boolean;\n permissions?: object[];\n uiPermissions: UiPermissionsDefinition;\n};\n\nexport const emptyUiPermissions: UiPermissionsDefinition = Object.freeze({\n auditlog: [],\n deployments: [],\n groups: Object.freeze({}),\n releases: Object.freeze({}),\n tenantManagement: [],\n userManagement: []\n});\n\nexport const emptyRole: UiRoleDefinition = Object.freeze({\n name: undefined,\n description: '',\n permissions: [],\n uiPermissions: Object.freeze({ ...emptyUiPermissions })\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBA,gBAA0D;AAwL1C;AAtLT,IAAM,uBAAuB;AAAA,EAClC,MAAM;AAAA,EACN,SAAS;AACX;AAEO,IAAM,YAAY;AAAA,EACvB,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO;AACT;AAEO,IAAM,cAAc;AACpB,IAAM,kBAAkB,EAAE,IAAI,mBAAmB,MAAM,aAAa;AAEpE,IAAM,6BAA6B;AAEnC,IAAM,2BAA2B;AAAA,EACtC,KAAK,EAAE,KAAK,OAAO,OAAO,UAAU,WAAW,IAAI;AAAA,EACnD,KAAK,EAAE,KAAK,OAAO,OAAO,aAAa,WAAW,KAAK;AAAA,EACvD,KAAK;AAAA,IACH,KAAK;AAAA,IACL,OAAO;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,KAAK;AAAA,IACH,KAAK;AAAA,IACL,OAAO;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,EACR;AAAA,EACA,O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Copyright 2024 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// @ts-nocheck\nimport React from 'react';\n\nimport { mdiAws as AWS, mdiMicrosoftAzure as Azure } from '@mdi/js';\n\nexport const DEVICE_LIST_DEFAULTS = {\n page: 1,\n perPage: 20\n};\n\nexport const timeUnits = {\n days: 'days',\n minutes: 'minutes',\n hours: 'hours'\n};\n\nexport const ALL_DEVICES = 'All devices';\nexport const UNGROUPED_GROUP = { id: '*|=ungrouped=|*', name: 'Unassigned' };\n\nexport const DEVICE_LIST_MAXIMUM_LENGTH = 50;\n\nexport const DEVICE_FILTERING_OPTIONS = {\n $eq: { key: '$eq', title: 'equals', shortform: '=' },\n $ne: { key: '$ne', title: 'not equal', shortform: '!=' },\n $gt: {\n key: '$gt',\n title: '>',\n shortform: '>',\n 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.'\n },\n $gte: {\n title: '>=',\n shortform: '>=',\n 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.'\n },\n $lt: {\n key: '$lt',\n title: '<',\n shortform: '<',\n 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.'\n },\n $lte: {\n title: '<=',\n shortform: '<=',\n 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.'\n },\n $ltne: {\n key: '$ltne',\n title: '$ltne',\n shortform: 'ltne',\n 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.'\n },\n $in: {\n key: '$in',\n title: 'in',\n shortform: 'in',\n 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.'\n },\n $nin: {\n key: '$nin',\n title: 'not in',\n shortform: 'not in',\n 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.`\n },\n $exists: {\n key: '$exists',\n title: 'exists',\n shortform: 'exists',\n value: true,\n help: `The \"exists\" operator matches if the selected field's value has a value. No value needs to be provided for this operator.`\n },\n $nexists: {\n key: '$nexists',\n title: `doesn't exist`,\n shortform: `doesn't exist`,\n value: true,\n 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.`\n },\n $regex: {\n key: '$regex',\n title: `matches regular expression`,\n shortform: `matches`,\n 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.`\n }\n};\n\nexport const DEVICE_ISSUE_OPTIONS = {\n issues: {\n isCategory: true,\n key: 'issues',\n title: 'Devices with issues',\n filterRule: {}\n },\n offline: {\n issueCategory: 'issues',\n key: 'offline',\n needsFullFiltering: true,\n needsMonitor: false,\n needsReporting: false,\n filterRule: {\n scope: 'system',\n key: 'check_in_time',\n operator: DEVICE_FILTERING_OPTIONS.$ltne.key,\n value: ({ offlineThreshold }) => offlineThreshold\n },\n title: 'Offline devices'\n },\n failedLastUpdate: {\n issueCategory: 'issues',\n key: 'failedLastUpdate',\n needsFullFiltering: false,\n needsMonitor: false,\n needsReporting: true,\n filterRule: { scope: 'monitor', key: 'failed_last_update', operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: true },\n title: 'Deployment failed'\n },\n monitoring: {\n issueCategory: 'issues',\n key: 'monitoring',\n needsFullFiltering: false,\n needsMonitor: true,\n needsReporting: false,\n filterRule: { scope: 'monitor', key: 'alerts', operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: true },\n title: 'Monitoring alert'\n },\n authRequests: {\n key: 'authRequests',\n needsFullFiltering: false,\n needsMonitor: false,\n needsReporting: true,\n filterRule: { scope: 'monitor', key: 'auth_requests', operator: DEVICE_FILTERING_OPTIONS.$gt.key, value: 1 },\n title: 'Devices with new authentication requests'\n },\n gatewayDevices: {\n key: 'gatewayDevices',\n needsFullFiltering: false,\n needsMonitor: false,\n needsReporting: true,\n filterRule: { scope: 'inventory', key: 'mender_is_gateway', operator: DEVICE_FILTERING_OPTIONS.$eq.key, value: 'true' },\n title: 'Gateway devices'\n }\n};\nconst oneSecond = 1000;\nexport const TIMEOUTS = {\n debounceDefault: 700,\n debounceShort: 300,\n halfASecond: 0.5 * oneSecond,\n oneSecond,\n twoSeconds: 2 * oneSecond,\n threeSeconds: 3 * oneSecond,\n fiveSeconds: 5 * oneSecond,\n refreshDefault: 10 * oneSecond,\n refreshLong: 60 * oneSecond\n};\n\nexport const SORTING_OPTIONS = {\n asc: 'asc',\n desc: 'desc'\n};\n\nexport const DEVICE_ONLINE_CUTOFF = { interval: 1, intervalName: timeUnits.days };\n\nexport const ATTRIBUTE_SCOPES = {\n inventory: 'inventory',\n identity: 'identity',\n monitor: 'monitor',\n system: 'system',\n tags: 'tags'\n};\n\nexport const defaultIdAttribute = Object.freeze({ attribute: 'id', scope: ATTRIBUTE_SCOPES.identity });\n\nconst credentialTypes = {\n aws: 'aws',\n http: 'http',\n sas: 'sas',\n x509: 'x509'\n};\nexport const EXTERNAL_PROVIDER = {\n 'iot-core': {\n credentialsType: credentialTypes.aws,\n icon: AWS,\n title: 'AWS IoT Core',\n twinTitle: 'Device Shadow',\n provider: 'iot-core',\n enabled: true,\n deviceTwin: true,\n configHint: <>For help finding your AWS IoT Core connection string, check the AWS IoT documentation.</>\n },\n 'iot-hub': {\n credentialsType: credentialTypes.sas,\n icon: Azure,\n title: 'Azure IoT Hub',\n twinTitle: 'Device Twin',\n provider: 'iot-hub',\n enabled: true,\n deviceTwin: true,\n configHint: (\n <span>\n For help finding your Azure IoT Hub connection string, look under &apos;Shared access policies&apos; in the Microsoft Azure UI as described{' '}\n {\n <a\n href=\"https://devblogs.microsoft.com/iotdev/understand-different-connection-strings-in-azure-iot-hub/#iothubconn\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n here\n </a>\n }\n .\n </span>\n )\n },\n webhook: {\n credentialsType: credentialTypes.http,\n deviceTwin: false,\n // disable the webhook provider here, since it is treated different than other integrations, with a custom configuration & management view, etc.\n enabled: false,\n provider: 'webhook'\n }\n};\nexport const MAX_PAGE_SIZE = 500;\n\nexport const ALL_RELEASES = 'All releases';\n\nexport type UiPermissionsDefinition = Readonly<{\n auditlog: string[];\n deployments?: string[]; // deployments are so far only covered indirectly through releases + device group permissions\n groups: Record<string, string[]>;\n releases: Record<string, string[]>;\n tenantManagement: string[];\n userManagement: string[];\n}>;\n\nexport type UiRoleDefinition = {\n description: string;\n editable?: boolean;\n isCustom?: boolean;\n name: string;\n permissions?: object[];\n uiPermissions: UiPermissionsDefinition;\n};\n\nexport const emptyUiPermissions: UiPermissionsDefinition = Object.freeze({\n auditlog: [],\n deployments: [],\n groups: Object.freeze({}),\n releases: Object.freeze({}),\n tenantManagement: [],\n userManagement: []\n});\n\nexport const emptyRole: UiRoleDefinition = Object.freeze({\n name: undefined,\n description: '',\n permissions: [],\n uiPermissions: Object.freeze({ ...emptyUiPermissions })\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBA,gBAA0D;AAwL1C;AAtLT,IAAM,uBAAuB;AAAA,EAClC,MAAM;AAAA,EACN,SAAS;AACX;AAEO,IAAM,YAAY;AAAA,EACvB,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO;AACT;AAEO,IAAM,cAAc;AACpB,IAAM,kBAAkB,EAAE,IAAI,mBAAmB,MA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Z,SAAS;AAAA,IACT,UAAU;AAAA,EACZ;AACF;AACO,IAAM,gBAAgB;AAEtB,IAAM,eAAe;AAoBrB,IAAM,qBAA8C,OAAO,OAAO;AAAA,EACvE,UAAU,CAAC;AAAA,EACX,aAAa,CAAC;AAAA,EACd,QAAQ,OAAO,OAAO,CAAC,CAAC;AAAA,EACxB,UAAU,OAAO,OAAO,CAAC,CAAC;AAAA,EAC1B,kBAAkB,CAAC;AAAA,EACnB,gBAAgB,CAAC;AACnB,CAAC;AAEM,IAAM,YAA8B,OAAO,OAAO;AAAA,EACvD,MAAM;AAAA,EACN,aAAa;AAAA,EACb,aAAa,CAAC;AAAA,EACd,eAAe,OAAO,OAAO,EAAE,GAAG,mBAAmB,CAAC;AACxD,CAAC;","names":["AWS","Azure"]}
@@ -234,10 +234,10 @@ type UiPermissionsDefinition = Readonly<{
234
234
  userManagement: string[];
235
235
  }>;
236
236
  type UiRoleDefinition = {
237
- name: string;
238
237
  description: string;
239
238
  editable?: boolean;
240
239
  isCustom?: boolean;
240
+ name: string;
241
241
  permissions?: object[];
242
242
  uiPermissions: UiPermissionsDefinition;
243
243
  };
@@ -234,10 +234,10 @@ type UiPermissionsDefinition = Readonly<{
234
234
  userManagement: string[];
235
235
  }>;
236
236
  type UiRoleDefinition = {
237
- name: string;
238
237
  description: string;
239
238
  editable?: boolean;
240
239
  isCustom?: boolean;
240
+ name: string;
241
241
  permissions?: object[];
242
242
  uiPermissions: UiPermissionsDefinition;
243
243
  };