@northern.tech/store 0.36.0 → 0.36.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (281) hide show
  1. package/dist/actions.cjs.map +1 -1
  2. package/dist/actions.d.cts +123 -134
  3. package/dist/actions.d.ts +123 -134
  4. package/dist/actions.js.map +1 -1
  5. package/dist/api/general-api.cjs +1 -1
  6. package/dist/api/general-api.cjs.map +1 -1
  7. package/dist/api/general-api.d.cts +9 -10
  8. package/dist/api/general-api.d.ts +9 -10
  9. package/dist/api/general-api.js.map +1 -1
  10. package/dist/api/users-api.cjs +1 -1
  11. package/dist/api/users-api.cjs.map +1 -1
  12. package/dist/api/users-api.d.cts +1 -2
  13. package/dist/api/users-api.d.ts +1 -2
  14. package/dist/api/users-api.js.map +1 -1
  15. package/dist/appSlice/constants.cjs +0 -1
  16. package/dist/appSlice/constants.cjs.map +1 -1
  17. package/dist/appSlice/constants.d.cts +1 -1
  18. package/dist/appSlice/constants.d.ts +1 -1
  19. package/dist/appSlice/constants.js.map +1 -1
  20. package/dist/appSlice/index.cjs +2 -4
  21. package/dist/appSlice/index.cjs.map +1 -1
  22. package/dist/appSlice/index.d.cts +2 -2
  23. package/dist/appSlice/index.d.ts +2 -2
  24. package/dist/appSlice/index.js +2 -3
  25. package/dist/appSlice/index.js.map +1 -1
  26. package/dist/appSlice/mocks.cjs.map +1 -1
  27. package/dist/appSlice/mocks.d.cts +1 -1
  28. package/dist/appSlice/mocks.d.ts +1 -1
  29. package/dist/appSlice/mocks.js.map +1 -1
  30. package/dist/appSlice/selectors.cjs +2 -6
  31. package/dist/appSlice/selectors.cjs.map +1 -1
  32. package/dist/appSlice/selectors.d.cts +35 -128
  33. package/dist/appSlice/selectors.d.ts +35 -128
  34. package/dist/appSlice/selectors.js +2 -5
  35. package/dist/appSlice/selectors.js.map +1 -1
  36. package/dist/appSlice/thunks.cjs +0 -1
  37. package/dist/appSlice/thunks.d.cts +6 -31
  38. package/dist/appSlice/thunks.d.ts +6 -31
  39. package/dist/appSlice/thunks.js +2 -2
  40. package/dist/auth.cjs +1 -1
  41. package/dist/auth.cjs.map +1 -1
  42. package/dist/auth.d.cts +1 -1
  43. package/dist/auth.d.ts +1 -1
  44. package/dist/auth.js.map +1 -1
  45. package/dist/commonConstants.d.cts +1 -1
  46. package/dist/commonConstants.d.ts +1 -1
  47. package/dist/commonSelectors.cjs +1 -1
  48. package/dist/commonSelectors.cjs.map +1 -1
  49. package/dist/commonSelectors.d.cts +164 -166
  50. package/dist/commonSelectors.d.ts +164 -166
  51. package/dist/commonSelectors.js.map +1 -1
  52. package/dist/{constants-CIx3fnBv.d.cts → constants-6kYRTdox.d.cts} +1 -1
  53. package/dist/{constants-BciiayPt.d.ts → constants-6kYRTdox.d.ts} +1 -1
  54. package/dist/{constants-BIIEMVoG.d.ts → constants-B_7FCJQX.d.cts} +3 -6
  55. package/dist/{constants-BFTS6mge.d.cts → constants-B_7FCJQX.d.ts} +3 -6
  56. package/dist/{constants-D41U_jbR.d.cts → constants-BwKiHHaB.d.cts} +1 -1
  57. package/dist/{constants-5cdwz1iH.d.ts → constants-BwKiHHaB.d.ts} +1 -1
  58. package/dist/{constants-DK7fI3Rh.d.cts → constants-Db_RBdlV.d.cts} +1 -1
  59. package/dist/{constants-BWEsNG5c.d.ts → constants-Db_RBdlV.d.ts} +1 -1
  60. package/dist/{constants-CNhpIMME.d.cts → constants-OZiiFKiA.d.cts} +1 -1
  61. package/dist/{constants-y2XVLQWf.d.ts → constants-OZiiFKiA.d.ts} +1 -1
  62. package/dist/{constants-CjO3_FOH.d.ts → constants-OcdoVk6f.d.ts} +3 -4
  63. package/dist/{constants-G3wymKIl.d.cts → constants-Sn4gnNA3.d.cts} +1 -1
  64. package/dist/{constants-Cpgyuy_r.d.ts → constants-Sn4gnNA3.d.ts} +1 -1
  65. package/dist/{constants-BrGIx40B.d.cts → constants-_p6w8uEp.d.cts} +3 -4
  66. package/dist/constants.cjs +0 -1
  67. package/dist/constants.cjs.map +1 -1
  68. package/dist/constants.d.cts +8 -8
  69. package/dist/constants.d.ts +8 -8
  70. package/dist/constants.js.map +1 -1
  71. package/dist/deploymentsSlice/constants.d.cts +1 -1
  72. package/dist/deploymentsSlice/constants.d.ts +1 -1
  73. package/dist/deploymentsSlice/index.cjs +0 -1
  74. package/dist/deploymentsSlice/index.cjs.map +1 -1
  75. package/dist/deploymentsSlice/index.d.cts +1 -1
  76. package/dist/deploymentsSlice/index.d.ts +1 -1
  77. package/dist/deploymentsSlice/index.js.map +1 -1
  78. package/dist/deploymentsSlice/mocks.cjs.map +1 -1
  79. package/dist/deploymentsSlice/mocks.d.cts +1 -1
  80. package/dist/deploymentsSlice/mocks.d.ts +1 -1
  81. package/dist/deploymentsSlice/mocks.js.map +1 -1
  82. package/dist/deploymentsSlice/selectors.cjs +0 -1
  83. package/dist/deploymentsSlice/selectors.cjs.map +1 -1
  84. package/dist/deploymentsSlice/selectors.d.cts +15 -16
  85. package/dist/deploymentsSlice/selectors.d.ts +15 -16
  86. package/dist/deploymentsSlice/selectors.js.map +1 -1
  87. package/dist/deploymentsSlice/thunks.d.cts +21 -22
  88. package/dist/deploymentsSlice/thunks.d.ts +21 -22
  89. package/dist/devicesSlice/constants.d.cts +1 -1
  90. package/dist/devicesSlice/constants.d.ts +1 -1
  91. package/dist/devicesSlice/index.cjs +0 -1
  92. package/dist/devicesSlice/index.cjs.map +1 -1
  93. package/dist/devicesSlice/index.d.cts +1 -1
  94. package/dist/devicesSlice/index.d.ts +1 -1
  95. package/dist/devicesSlice/index.js.map +1 -1
  96. package/dist/devicesSlice/mocks.cjs +0 -1
  97. package/dist/devicesSlice/mocks.cjs.map +1 -1
  98. package/dist/devicesSlice/mocks.js.map +1 -1
  99. package/dist/devicesSlice/selectors.cjs +0 -1
  100. package/dist/devicesSlice/selectors.cjs.map +1 -1
  101. package/dist/devicesSlice/selectors.d.cts +79 -81
  102. package/dist/devicesSlice/selectors.d.ts +79 -81
  103. package/dist/devicesSlice/selectors.js.map +1 -1
  104. package/dist/devicesSlice/thunks.d.cts +67 -69
  105. package/dist/devicesSlice/thunks.d.ts +67 -69
  106. package/dist/{index-DUvrw_Ed.d.ts → index-5Q-iI4EB.d.cts} +17 -20
  107. package/dist/index-BBsUj1a8.d.ts +68 -0
  108. package/dist/index-BLvjQfGj.d.ts +119 -0
  109. package/dist/{index-BP0uAq36.d.cts → index-Bb4yvvgG.d.ts} +25 -28
  110. package/dist/index-Bj3OArhr.d.cts +68 -0
  111. package/dist/{index-CT5hgXm9.d.cts → index-ByfjrTdH.d.ts} +16 -19
  112. package/dist/index-C8QadAm7.d.cts +119 -0
  113. package/dist/{index-BI9O8JWe.d.ts → index-CPdMUfRr.d.ts} +41 -44
  114. package/dist/index-CSk4ENmk.d.cts +149 -0
  115. package/dist/index-Cf81vLTi.d.ts +149 -0
  116. package/dist/index-DBUt8xVc.d.cts +61 -0
  117. package/dist/index-DBUt8xVc.d.ts +61 -0
  118. package/dist/index-DLDY7bNT.d.ts +165 -0
  119. package/dist/{index-B64X5ozM.d.cts → index-DbfM03Gj.d.cts} +42 -45
  120. package/dist/{index-CkwVnIqd.d.ts → index-EPmsL6Lb.d.cts} +26 -29
  121. package/dist/index-Zs9RnVoR.d.cts +165 -0
  122. package/dist/liststatehook.cjs +5 -6
  123. package/dist/liststatehook.cjs.map +1 -1
  124. package/dist/liststatehook.d.cts +1 -1
  125. package/dist/liststatehook.d.ts +1 -1
  126. package/dist/liststatehook.js +1 -1
  127. package/dist/liststatehook.js.map +1 -1
  128. package/dist/locationutils.cjs +0 -1
  129. package/dist/locationutils.cjs.map +1 -1
  130. package/dist/locationutils.d.cts +3 -3
  131. package/dist/locationutils.d.ts +3 -3
  132. package/dist/locationutils.js.map +1 -1
  133. package/dist/monitorSlice/constants.d.cts +1 -1
  134. package/dist/monitorSlice/constants.d.ts +1 -1
  135. package/dist/monitorSlice/index.cjs +0 -1
  136. package/dist/monitorSlice/index.cjs.map +1 -1
  137. package/dist/monitorSlice/index.d.cts +1 -1
  138. package/dist/monitorSlice/index.d.ts +1 -1
  139. package/dist/monitorSlice/index.js.map +1 -1
  140. package/dist/monitorSlice/mocks.cjs +0 -1
  141. package/dist/monitorSlice/mocks.cjs.map +1 -1
  142. package/dist/monitorSlice/mocks.d.cts +1 -1
  143. package/dist/monitorSlice/mocks.d.ts +1 -1
  144. package/dist/monitorSlice/mocks.js.map +1 -1
  145. package/dist/monitorSlice/selectors.d.cts +1 -1
  146. package/dist/monitorSlice/selectors.d.ts +1 -1
  147. package/dist/monitorSlice/thunks.cjs +1 -3
  148. package/dist/monitorSlice/thunks.cjs.map +1 -1
  149. package/dist/monitorSlice/thunks.d.cts +11 -13
  150. package/dist/monitorSlice/thunks.d.ts +11 -13
  151. package/dist/monitorSlice/thunks.js +1 -2
  152. package/dist/monitorSlice/thunks.js.map +1 -1
  153. package/dist/onboardingSlice/constants.cjs.map +1 -1
  154. package/dist/onboardingSlice/constants.d.cts +1 -1
  155. package/dist/onboardingSlice/constants.d.ts +1 -1
  156. package/dist/onboardingSlice/constants.js.map +1 -1
  157. package/dist/onboardingSlice/index.cjs +0 -1
  158. package/dist/onboardingSlice/index.cjs.map +1 -1
  159. package/dist/onboardingSlice/index.d.cts +1 -1
  160. package/dist/onboardingSlice/index.d.ts +1 -1
  161. package/dist/onboardingSlice/index.js.map +1 -1
  162. package/dist/onboardingSlice/mocks.cjs.map +1 -1
  163. package/dist/onboardingSlice/mocks.d.cts +1 -1
  164. package/dist/onboardingSlice/mocks.d.ts +1 -1
  165. package/dist/onboardingSlice/mocks.js.map +1 -1
  166. package/dist/onboardingSlice/selectors.d.cts +2 -2
  167. package/dist/onboardingSlice/selectors.d.ts +2 -2
  168. package/dist/onboardingSlice/thunks.d.cts +22 -23
  169. package/dist/onboardingSlice/thunks.d.ts +22 -23
  170. package/dist/organizationSlice/constants.d.cts +1 -1
  171. package/dist/organizationSlice/constants.d.ts +1 -1
  172. package/dist/organizationSlice/index.cjs +0 -1
  173. package/dist/organizationSlice/index.cjs.map +1 -1
  174. package/dist/organizationSlice/index.d.cts +1 -1
  175. package/dist/organizationSlice/index.d.ts +1 -1
  176. package/dist/organizationSlice/index.js.map +1 -1
  177. package/dist/organizationSlice/mocks.cjs +0 -1
  178. package/dist/organizationSlice/mocks.cjs.map +1 -1
  179. package/dist/organizationSlice/mocks.d.cts +3 -4
  180. package/dist/organizationSlice/mocks.d.ts +3 -4
  181. package/dist/organizationSlice/mocks.js.map +1 -1
  182. package/dist/organizationSlice/selectors.cjs +0 -1
  183. package/dist/organizationSlice/selectors.cjs.map +1 -1
  184. package/dist/organizationSlice/selectors.d.cts +78 -81
  185. package/dist/organizationSlice/selectors.d.ts +78 -81
  186. package/dist/organizationSlice/selectors.js.map +1 -1
  187. package/dist/organizationSlice/thunks.d.cts +69 -72
  188. package/dist/organizationSlice/thunks.d.ts +69 -72
  189. package/dist/organizationSlice/types.d.cts +1 -1
  190. package/dist/organizationSlice/types.d.ts +1 -1
  191. package/dist/releasesSlice/constants.cjs.map +1 -1
  192. package/dist/releasesSlice/constants.d.cts +1 -1
  193. package/dist/releasesSlice/constants.d.ts +1 -1
  194. package/dist/releasesSlice/constants.js.map +1 -1
  195. package/dist/releasesSlice/index.cjs +0 -1
  196. package/dist/releasesSlice/index.cjs.map +1 -1
  197. package/dist/releasesSlice/index.d.cts +1 -1
  198. package/dist/releasesSlice/index.d.ts +1 -1
  199. package/dist/releasesSlice/index.js.map +1 -1
  200. package/dist/releasesSlice/mocks.cjs +0 -1
  201. package/dist/releasesSlice/mocks.cjs.map +1 -1
  202. package/dist/releasesSlice/mocks.d.cts +3 -6
  203. package/dist/releasesSlice/mocks.d.ts +3 -6
  204. package/dist/releasesSlice/mocks.js.map +1 -1
  205. package/dist/releasesSlice/selectors.cjs +0 -1
  206. package/dist/releasesSlice/selectors.cjs.map +1 -1
  207. package/dist/releasesSlice/selectors.d.cts +107 -110
  208. package/dist/releasesSlice/selectors.d.ts +107 -110
  209. package/dist/releasesSlice/selectors.js.map +1 -1
  210. package/dist/releasesSlice/thunks.cjs +4 -5
  211. package/dist/releasesSlice/thunks.cjs.map +1 -1
  212. package/dist/releasesSlice/thunks.d.cts +52 -55
  213. package/dist/releasesSlice/thunks.d.ts +52 -55
  214. package/dist/releasesSlice/thunks.js +3 -4
  215. package/dist/releasesSlice/thunks.js.map +1 -1
  216. package/dist/sockethook.cjs +1 -1
  217. package/dist/sockethook.cjs.map +1 -1
  218. package/dist/sockethook.js.map +1 -1
  219. package/dist/{store-BZo47jc-.d.ts → store-Co2ptTSm.d.ts} +30 -35
  220. package/dist/{store-BhRxVhtL.d.cts → store-Dd0Y2JCN.d.cts} +30 -35
  221. package/dist/store.cjs +0 -1
  222. package/dist/store.cjs.map +1 -1
  223. package/dist/store.d.cts +3 -3
  224. package/dist/store.d.ts +3 -3
  225. package/dist/store.js.map +1 -1
  226. package/dist/storehooks.cjs +6 -14
  227. package/dist/storehooks.cjs.map +1 -1
  228. package/dist/storehooks.d.cts +6 -43
  229. package/dist/storehooks.d.ts +6 -43
  230. package/dist/storehooks.js +7 -15
  231. package/dist/storehooks.js.map +1 -1
  232. package/dist/thunks.cjs +4 -44
  233. package/dist/thunks.cjs.map +1 -1
  234. package/dist/thunks.d.cts +2 -2
  235. package/dist/thunks.d.ts +2 -2
  236. package/dist/thunks.js +5 -44
  237. package/dist/thunks.js.map +1 -1
  238. package/dist/{types-COdPU2QQ.d.cts → types-B33vKVhi.d.cts} +4 -4
  239. package/dist/{types-BPyM8Inu.d.ts → types-BjtmX60L.d.ts} +4 -4
  240. package/dist/useDeploymentDevice.cjs +1 -1
  241. package/dist/useDeploymentDevice.cjs.map +1 -1
  242. package/dist/useDeploymentDevice.js.map +1 -1
  243. package/dist/usersSlice/constants.d.cts +1 -1
  244. package/dist/usersSlice/constants.d.ts +1 -1
  245. package/dist/usersSlice/index.cjs +0 -1
  246. package/dist/usersSlice/index.cjs.map +1 -1
  247. package/dist/usersSlice/index.d.cts +1 -1
  248. package/dist/usersSlice/index.d.ts +1 -1
  249. package/dist/usersSlice/index.js.map +1 -1
  250. package/dist/usersSlice/mocks.cjs +0 -1
  251. package/dist/usersSlice/mocks.cjs.map +1 -1
  252. package/dist/usersSlice/mocks.d.cts +4 -6
  253. package/dist/usersSlice/mocks.d.ts +4 -6
  254. package/dist/usersSlice/mocks.js.map +1 -1
  255. package/dist/usersSlice/selectors.cjs +0 -1
  256. package/dist/usersSlice/selectors.cjs.map +1 -1
  257. package/dist/usersSlice/selectors.d.cts +44 -47
  258. package/dist/usersSlice/selectors.d.ts +44 -47
  259. package/dist/usersSlice/selectors.js.map +1 -1
  260. package/dist/usersSlice/thunks.d.cts +92 -95
  261. package/dist/usersSlice/thunks.d.ts +92 -95
  262. package/dist/{utils-CHBWS_tH.d.ts → utils-C_9XEfi_.d.ts} +8 -9
  263. package/dist/{utils-Do9z5TL1.d.cts → utils-DbXmZmGq.d.cts} +8 -9
  264. package/dist/utils.cjs +0 -3
  265. package/dist/utils.cjs.map +1 -1
  266. package/dist/utils.d.cts +2 -2
  267. package/dist/utils.d.ts +2 -2
  268. package/dist/utils.js +1 -2
  269. package/dist/utils.js.map +1 -1
  270. package/package.json +7 -7
  271. package/dist/index-B3IF6ur9.d.cts +0 -168
  272. package/dist/index-BFlHWzjv.d.cts +0 -152
  273. package/dist/index-BbaS7MzW.d.cts +0 -71
  274. package/dist/index-Bp1WpATs.d.ts +0 -154
  275. package/dist/index-C6wNUfiV.d.ts +0 -71
  276. package/dist/index-CJkrL0oA.d.ts +0 -64
  277. package/dist/index-DaD3yorF.d.ts +0 -168
  278. package/dist/index-DwACbyUg.d.cts +0 -154
  279. package/dist/index-UPc3wvVd.d.cts +0 -64
  280. package/dist/index-ez3oxfRo.d.ts +0 -152
  281. /package/dist/{chunk-CKQMccvm.cjs → chunk-D6vf50IK.cjs} +0 -0
@@ -1,26 +1,23 @@
1
- import { o as UserSliceType } from "../index-ez3oxfRo.js";
2
- import { i as ReleaseSliceType } from "../index-DaD3yorF.js";
3
- import { d as TenantList, i as Organization, l as SSOConfig, n as AuditLogSelectionState, o as ProductConfig, r as Card, u as Tenant } from "../types-BPyM8Inu.js";
4
- import { n as OnboardingSliceType } from "../index-CJkrL0oA.js";
5
- import { o as DeploymentsSliceType } from "../index-CkwVnIqd.js";
6
- import { s as DeviceSliceType } from "../index-BI9O8JWe.js";
7
- import { t as AppSliceType } from "../index-Bp1WpATs.js";
8
- import { t as MonitorSliceType } from "../index-DUvrw_Ed.js";
9
- import { t as OrganizationSliceType } from "../index-C6wNUfiV.js";
10
- import { r as RootState } from "../store-BZo47jc-.js";
11
- import * as _$_northern_tech_utils_constants0 from "@northern.tech/utils/constants";
12
- import * as _$_northern_tech_types_types_gen0 from "@northern.tech/types/types.gen";
13
- import * as _$reselect from "reselect";
1
+ import { o as UserSliceType } from "../index-Cf81vLTi.js";
2
+ import { i as ReleaseSliceType } from "../index-DLDY7bNT.js";
3
+ import { d as TenantList, i as Organization, l as SSOConfig, n as AuditLogSelectionState, o as ProductConfig, r as Card, u as Tenant } from "../types-BjtmX60L.js";
4
+ import { n as OnboardingSliceType } from "../index-DBUt8xVc.js";
5
+ import { o as DeploymentsSliceType } from "../index-Bb4yvvgG.js";
6
+ import { s as DeviceSliceType } from "../index-CPdMUfRr.js";
7
+ import { t as AppSliceType } from "../index-BLvjQfGj.js";
8
+ import { t as MonitorSliceType } from "../index-ByfjrTdH.js";
9
+ import { t as OrganizationSliceType } from "../index-BBsUj1a8.js";
10
+ import { r as RootState } from "../store-Co2ptTSm.js";
14
11
 
15
12
  //#region src/organizationSlice/selectors.d.ts
16
13
  declare const getOrganization: (state: RootState) => Partial<Organization>;
17
14
  declare const getProducts: (state: RootState) => ProductConfig | undefined;
18
- declare const getExternalIntegrations: (state: RootState) => _$_northern_tech_types_types_gen0.Integration[];
15
+ declare const getExternalIntegrations: (state: RootState) => import("@northern.tech/types/types.gen").Integration[];
19
16
  declare const getAuditlogState: (state: RootState) => AuditLogSelectionState;
20
- declare const getAuditLog: (state: RootState) => _$_northern_tech_types_types_gen0.AuditLog[];
17
+ declare const getAuditLog: (state: RootState) => import("@northern.tech/types/types.gen").AuditLog[];
21
18
  declare const getAuditLogSelectionState: (state: RootState) => AuditLogSelectionState;
22
- declare const getBillingProfile: (state: RootState) => _$_northern_tech_types_types_gen0.BillingProfile | undefined;
23
- declare const getSubscription: (state: RootState) => _$_northern_tech_types_types_gen0.SubscriptionData | undefined;
19
+ declare const getBillingProfile: (state: RootState) => import("@northern.tech/types/types.gen").BillingProfile | undefined;
20
+ declare const getSubscription: (state: RootState) => import("@northern.tech/types/types.gen").SubscriptionData | undefined;
24
21
  declare const getCard: (state: RootState) => Card;
25
22
  declare const getSsoConfig: ({
26
23
  organization: {
@@ -28,7 +25,7 @@ declare const getSsoConfig: ({
28
25
  }
29
26
  }: RootState) => SSOConfig;
30
27
  declare const getTenantsList: (state: RootState) => TenantList;
31
- declare const getWebhookEvents: (state: RootState) => _$_northern_tech_types_types_gen0.Event[];
28
+ declare const getWebhookEvents: (state: RootState) => import("@northern.tech/types/types.gen").Event[];
32
29
  declare const getWebhookEventTotal: (state: RootState) => number;
33
30
  declare const getDeviceTwinIntegrations: ((state: {
34
31
  app: AppSliceType;
@@ -39,26 +36,26 @@ declare const getDeviceTwinIntegrations: ((state: {
39
36
  organization: OrganizationSliceType;
40
37
  releases: ReleaseSliceType;
41
38
  users: UserSliceType;
42
- }) => _$_northern_tech_types_types_gen0.Integration[]) & {
39
+ }) => import("@northern.tech/types/types.gen").Integration[]) & {
43
40
  clearCache: () => void;
44
41
  resultsCount: () => number;
45
42
  resetResultsCount: () => void;
46
43
  } & {
47
- resultFunc: (resultFuncArgs_0: _$_northern_tech_types_types_gen0.Integration[]) => _$_northern_tech_types_types_gen0.Integration[];
48
- memoizedResultFunc: ((resultFuncArgs_0: _$_northern_tech_types_types_gen0.Integration[]) => _$_northern_tech_types_types_gen0.Integration[]) & {
44
+ resultFunc: (resultFuncArgs_0: import("@northern.tech/types/types.gen").Integration[]) => import("@northern.tech/types/types.gen").Integration[];
45
+ memoizedResultFunc: ((resultFuncArgs_0: import("@northern.tech/types/types.gen").Integration[]) => import("@northern.tech/types/types.gen").Integration[]) & {
49
46
  clearCache: () => void;
50
47
  resultsCount: () => number;
51
48
  resetResultsCount: () => void;
52
49
  };
53
- lastResult: () => _$_northern_tech_types_types_gen0.Integration[];
54
- dependencies: [(state: RootState) => _$_northern_tech_types_types_gen0.Integration[]];
50
+ lastResult: () => import("@northern.tech/types/types.gen").Integration[];
51
+ dependencies: [(state: RootState) => import("@northern.tech/types/types.gen").Integration[]];
55
52
  recomputations: () => number;
56
53
  resetRecomputations: () => void;
57
54
  dependencyRecomputations: () => number;
58
55
  resetDependencyRecomputations: () => void;
59
56
  } & {
60
- memoize: typeof _$reselect.weakMapMemoize;
61
- argsMemoize: typeof _$reselect.weakMapMemoize;
57
+ memoize: typeof import("reselect").weakMapMemoize;
58
+ argsMemoize: typeof import("reselect").weakMapMemoize;
62
59
  };
63
60
  declare const getIsServiceProvider: (state: RootState) => boolean | undefined;
64
61
  declare const getWebhooks: ((state: {
@@ -70,26 +67,26 @@ declare const getWebhooks: ((state: {
70
67
  organization: OrganizationSliceType;
71
68
  releases: ReleaseSliceType;
72
69
  users: UserSliceType;
73
- }) => _$_northern_tech_types_types_gen0.Integration[]) & {
70
+ }) => import("@northern.tech/types/types.gen").Integration[]) & {
74
71
  clearCache: () => void;
75
72
  resultsCount: () => number;
76
73
  resetResultsCount: () => void;
77
74
  } & {
78
- resultFunc: (resultFuncArgs_0: _$_northern_tech_types_types_gen0.Integration[]) => _$_northern_tech_types_types_gen0.Integration[];
79
- memoizedResultFunc: ((resultFuncArgs_0: _$_northern_tech_types_types_gen0.Integration[]) => _$_northern_tech_types_types_gen0.Integration[]) & {
75
+ resultFunc: (resultFuncArgs_0: import("@northern.tech/types/types.gen").Integration[]) => import("@northern.tech/types/types.gen").Integration[];
76
+ memoizedResultFunc: ((resultFuncArgs_0: import("@northern.tech/types/types.gen").Integration[]) => import("@northern.tech/types/types.gen").Integration[]) & {
80
77
  clearCache: () => void;
81
78
  resultsCount: () => number;
82
79
  resetResultsCount: () => void;
83
80
  };
84
- lastResult: () => _$_northern_tech_types_types_gen0.Integration[];
85
- dependencies: [(state: RootState) => _$_northern_tech_types_types_gen0.Integration[]];
81
+ lastResult: () => import("@northern.tech/types/types.gen").Integration[];
82
+ dependencies: [(state: RootState) => import("@northern.tech/types/types.gen").Integration[]];
86
83
  recomputations: () => number;
87
84
  resetRecomputations: () => void;
88
85
  dependencyRecomputations: () => number;
89
86
  resetDependencyRecomputations: () => void;
90
87
  } & {
91
- memoize: typeof _$reselect.weakMapMemoize;
92
- argsMemoize: typeof _$reselect.weakMapMemoize;
88
+ memoize: typeof import("reselect").weakMapMemoize;
89
+ argsMemoize: typeof import("reselect").weakMapMemoize;
93
90
  };
94
91
  declare const getWebhookEventInfo: ((state: {
95
92
  app: AppSliceType;
@@ -101,19 +98,19 @@ declare const getWebhookEventInfo: ((state: {
101
98
  releases: ReleaseSliceType;
102
99
  users: UserSliceType;
103
100
  }) => {
104
- events: _$_northern_tech_types_types_gen0.Event[];
101
+ events: import("@northern.tech/types/types.gen").Event[];
105
102
  eventTotal: number;
106
103
  }) & {
107
104
  clearCache: () => void;
108
105
  resultsCount: () => number;
109
106
  resetResultsCount: () => void;
110
107
  } & {
111
- resultFunc: (resultFuncArgs_0: _$_northern_tech_types_types_gen0.Integration[], resultFuncArgs_1: _$_northern_tech_types_types_gen0.Event[], resultFuncArgs_2: number) => {
112
- events: _$_northern_tech_types_types_gen0.Event[];
108
+ resultFunc: (resultFuncArgs_0: import("@northern.tech/types/types.gen").Integration[], resultFuncArgs_1: import("@northern.tech/types/types.gen").Event[], resultFuncArgs_2: number) => {
109
+ events: import("@northern.tech/types/types.gen").Event[];
113
110
  eventTotal: number;
114
111
  };
115
- memoizedResultFunc: ((resultFuncArgs_0: _$_northern_tech_types_types_gen0.Integration[], resultFuncArgs_1: _$_northern_tech_types_types_gen0.Event[], resultFuncArgs_2: number) => {
116
- events: _$_northern_tech_types_types_gen0.Event[];
112
+ memoizedResultFunc: ((resultFuncArgs_0: import("@northern.tech/types/types.gen").Integration[], resultFuncArgs_1: import("@northern.tech/types/types.gen").Event[], resultFuncArgs_2: number) => {
113
+ events: import("@northern.tech/types/types.gen").Event[];
117
114
  eventTotal: number;
118
115
  }) & {
119
116
  clearCache: () => void;
@@ -121,7 +118,7 @@ declare const getWebhookEventInfo: ((state: {
121
118
  resetResultsCount: () => void;
122
119
  };
123
120
  lastResult: () => {
124
- events: _$_northern_tech_types_types_gen0.Event[];
121
+ events: import("@northern.tech/types/types.gen").Event[];
125
122
  eventTotal: number;
126
123
  };
127
124
  dependencies: [((state: {
@@ -133,34 +130,34 @@ declare const getWebhookEventInfo: ((state: {
133
130
  organization: OrganizationSliceType;
134
131
  releases: ReleaseSliceType;
135
132
  users: UserSliceType;
136
- }) => _$_northern_tech_types_types_gen0.Integration[]) & {
133
+ }) => import("@northern.tech/types/types.gen").Integration[]) & {
137
134
  clearCache: () => void;
138
135
  resultsCount: () => number;
139
136
  resetResultsCount: () => void;
140
137
  } & {
141
- resultFunc: (resultFuncArgs_0: _$_northern_tech_types_types_gen0.Integration[]) => _$_northern_tech_types_types_gen0.Integration[];
142
- memoizedResultFunc: ((resultFuncArgs_0: _$_northern_tech_types_types_gen0.Integration[]) => _$_northern_tech_types_types_gen0.Integration[]) & {
138
+ resultFunc: (resultFuncArgs_0: import("@northern.tech/types/types.gen").Integration[]) => import("@northern.tech/types/types.gen").Integration[];
139
+ memoizedResultFunc: ((resultFuncArgs_0: import("@northern.tech/types/types.gen").Integration[]) => import("@northern.tech/types/types.gen").Integration[]) & {
143
140
  clearCache: () => void;
144
141
  resultsCount: () => number;
145
142
  resetResultsCount: () => void;
146
143
  };
147
- lastResult: () => _$_northern_tech_types_types_gen0.Integration[];
148
- dependencies: [(state: RootState) => _$_northern_tech_types_types_gen0.Integration[]];
144
+ lastResult: () => import("@northern.tech/types/types.gen").Integration[];
145
+ dependencies: [(state: RootState) => import("@northern.tech/types/types.gen").Integration[]];
149
146
  recomputations: () => number;
150
147
  resetRecomputations: () => void;
151
148
  dependencyRecomputations: () => number;
152
149
  resetDependencyRecomputations: () => void;
153
150
  } & {
154
- memoize: typeof _$reselect.weakMapMemoize;
155
- argsMemoize: typeof _$reselect.weakMapMemoize;
156
- }, (state: RootState) => _$_northern_tech_types_types_gen0.Event[], (state: RootState) => number];
151
+ memoize: typeof import("reselect").weakMapMemoize;
152
+ argsMemoize: typeof import("reselect").weakMapMemoize;
153
+ }, (state: RootState) => import("@northern.tech/types/types.gen").Event[], (state: RootState) => number];
157
154
  recomputations: () => number;
158
155
  resetRecomputations: () => void;
159
156
  dependencyRecomputations: () => number;
160
157
  resetDependencyRecomputations: () => void;
161
158
  } & {
162
- memoize: typeof _$reselect.weakMapMemoize;
163
- argsMemoize: typeof _$reselect.weakMapMemoize;
159
+ memoize: typeof import("reselect").weakMapMemoize;
160
+ argsMemoize: typeof import("reselect").weakMapMemoize;
164
161
  };
165
162
  declare const getAuditLogEntry: ((state: {
166
163
  app: AppSliceType;
@@ -171,26 +168,26 @@ declare const getAuditLogEntry: ((state: {
171
168
  organization: OrganizationSliceType;
172
169
  releases: ReleaseSliceType;
173
170
  users: UserSliceType;
174
- }) => _$_northern_tech_types_types_gen0.AuditLog | undefined) & {
171
+ }) => import("@northern.tech/types/types.gen").AuditLog | undefined) & {
175
172
  clearCache: () => void;
176
173
  resultsCount: () => number;
177
174
  resetResultsCount: () => void;
178
175
  } & {
179
- resultFunc: (resultFuncArgs_0: _$_northern_tech_types_types_gen0.AuditLog[], resultFuncArgs_1: AuditLogSelectionState) => _$_northern_tech_types_types_gen0.AuditLog | undefined;
180
- memoizedResultFunc: ((resultFuncArgs_0: _$_northern_tech_types_types_gen0.AuditLog[], resultFuncArgs_1: AuditLogSelectionState) => _$_northern_tech_types_types_gen0.AuditLog | undefined) & {
176
+ resultFunc: (resultFuncArgs_0: import("@northern.tech/types/types.gen").AuditLog[], resultFuncArgs_1: AuditLogSelectionState) => import("@northern.tech/types/types.gen").AuditLog | undefined;
177
+ memoizedResultFunc: ((resultFuncArgs_0: import("@northern.tech/types/types.gen").AuditLog[], resultFuncArgs_1: AuditLogSelectionState) => import("@northern.tech/types/types.gen").AuditLog | undefined) & {
181
178
  clearCache: () => void;
182
179
  resultsCount: () => number;
183
180
  resetResultsCount: () => void;
184
181
  };
185
- lastResult: () => _$_northern_tech_types_types_gen0.AuditLog | undefined;
186
- dependencies: [(state: RootState) => _$_northern_tech_types_types_gen0.AuditLog[], (state: RootState) => AuditLogSelectionState];
182
+ lastResult: () => import("@northern.tech/types/types.gen").AuditLog | undefined;
183
+ dependencies: [(state: RootState) => import("@northern.tech/types/types.gen").AuditLog[], (state: RootState) => AuditLogSelectionState];
187
184
  recomputations: () => number;
188
185
  resetRecomputations: () => void;
189
186
  dependencyRecomputations: () => number;
190
187
  resetDependencyRecomputations: () => void;
191
188
  } & {
192
- memoize: typeof _$reselect.weakMapMemoize;
193
- argsMemoize: typeof _$reselect.weakMapMemoize;
189
+ memoize: typeof import("reselect").weakMapMemoize;
190
+ argsMemoize: typeof import("reselect").weakMapMemoize;
194
191
  };
195
192
  declare const getDisabledTiers: ((state: {
196
193
  app: AppSliceType;
@@ -258,16 +255,16 @@ declare const getDisabledTiers: ((state: {
258
255
  dependencyRecomputations: () => number;
259
256
  resetDependencyRecomputations: () => void;
260
257
  } & {
261
- memoize: typeof _$reselect.weakMapMemoize;
262
- argsMemoize: typeof _$reselect.weakMapMemoize;
258
+ memoize: typeof import("reselect").weakMapMemoize;
259
+ argsMemoize: typeof import("reselect").weakMapMemoize;
263
260
  }];
264
261
  recomputations: () => number;
265
262
  resetRecomputations: () => void;
266
263
  dependencyRecomputations: () => number;
267
264
  resetDependencyRecomputations: () => void;
268
265
  } & {
269
- memoize: typeof _$reselect.weakMapMemoize;
270
- argsMemoize: typeof _$reselect.weakMapMemoize;
266
+ memoize: typeof import("reselect").weakMapMemoize;
267
+ argsMemoize: typeof import("reselect").weakMapMemoize;
271
268
  };
272
269
  declare const getSpLimits: ((state: {
273
270
  app: AppSliceType;
@@ -335,16 +332,16 @@ declare const getSpLimits: ((state: {
335
332
  dependencyRecomputations: () => number;
336
333
  resetDependencyRecomputations: () => void;
337
334
  } & {
338
- memoize: typeof _$reselect.weakMapMemoize;
339
- argsMemoize: typeof _$reselect.weakMapMemoize;
335
+ memoize: typeof import("reselect").weakMapMemoize;
336
+ argsMemoize: typeof import("reselect").weakMapMemoize;
340
337
  }];
341
338
  recomputations: () => number;
342
339
  resetRecomputations: () => void;
343
340
  dependencyRecomputations: () => number;
344
341
  resetDependencyRecomputations: () => void;
345
342
  } & {
346
- memoize: typeof _$reselect.weakMapMemoize;
347
- argsMemoize: typeof _$reselect.weakMapMemoize;
343
+ memoize: typeof import("reselect").weakMapMemoize;
344
+ argsMemoize: typeof import("reselect").weakMapMemoize;
348
345
  };
349
346
  declare const getTenantListWithLimits: ((state: {
350
347
  app: AppSliceType;
@@ -365,11 +362,11 @@ declare const getTenantListWithLimits: ((state: {
365
362
  plan?: "os" | "enterprise" | "professional";
366
363
  trial?: boolean;
367
364
  trial_expiration?: string;
368
- addons?: Array<_$_northern_tech_types_types_gen0.Addon>;
365
+ addons?: Array<import("@northern.tech/types/types.gen").Addon>;
369
366
  service_provider?: boolean;
370
367
  parent_tenant_id?: string;
371
- additional_info?: _$_northern_tech_types_types_gen0.TenantAdditionalInfo;
372
- api_limits?: _$_northern_tech_types_types_gen0.TenantApiLimits;
368
+ additional_info?: import("@northern.tech/types/types.gen").TenantAdditionalInfo;
369
+ api_limits?: import("@northern.tech/types/types.gen").TenantApiLimits;
373
370
  created_at?: string;
374
371
  updated_at?: string;
375
372
  device_count?: number;
@@ -378,7 +375,7 @@ declare const getTenantListWithLimits: ((state: {
378
375
  page: number;
379
376
  perPage: number;
380
377
  selectedTenant: Tenant | null;
381
- sort: _$_northern_tech_utils_constants0.SortOptions;
378
+ sort: import("@northern.tech/utils/constants").SortOptions;
382
379
  total: number;
383
380
  }) & {
384
381
  clearCache: () => void;
@@ -395,11 +392,11 @@ declare const getTenantListWithLimits: ((state: {
395
392
  plan?: "os" | "enterprise" | "professional";
396
393
  trial?: boolean;
397
394
  trial_expiration?: string;
398
- addons?: Array<_$_northern_tech_types_types_gen0.Addon>;
395
+ addons?: Array<import("@northern.tech/types/types.gen").Addon>;
399
396
  service_provider?: boolean;
400
397
  parent_tenant_id?: string;
401
- additional_info?: _$_northern_tech_types_types_gen0.TenantAdditionalInfo;
402
- api_limits?: _$_northern_tech_types_types_gen0.TenantApiLimits;
398
+ additional_info?: import("@northern.tech/types/types.gen").TenantAdditionalInfo;
399
+ api_limits?: import("@northern.tech/types/types.gen").TenantApiLimits;
403
400
  created_at?: string;
404
401
  updated_at?: string;
405
402
  device_count?: number;
@@ -408,7 +405,7 @@ declare const getTenantListWithLimits: ((state: {
408
405
  page: number;
409
406
  perPage: number;
410
407
  selectedTenant: Tenant | null;
411
- sort: _$_northern_tech_utils_constants0.SortOptions;
408
+ sort: import("@northern.tech/utils/constants").SortOptions;
412
409
  total: number;
413
410
  };
414
411
  memoizedResultFunc: ((resultFuncArgs_0: TenantList) => {
@@ -421,11 +418,11 @@ declare const getTenantListWithLimits: ((state: {
421
418
  plan?: "os" | "enterprise" | "professional";
422
419
  trial?: boolean;
423
420
  trial_expiration?: string;
424
- addons?: Array<_$_northern_tech_types_types_gen0.Addon>;
421
+ addons?: Array<import("@northern.tech/types/types.gen").Addon>;
425
422
  service_provider?: boolean;
426
423
  parent_tenant_id?: string;
427
- additional_info?: _$_northern_tech_types_types_gen0.TenantAdditionalInfo;
428
- api_limits?: _$_northern_tech_types_types_gen0.TenantApiLimits;
424
+ additional_info?: import("@northern.tech/types/types.gen").TenantAdditionalInfo;
425
+ api_limits?: import("@northern.tech/types/types.gen").TenantApiLimits;
429
426
  created_at?: string;
430
427
  updated_at?: string;
431
428
  device_count?: number;
@@ -434,7 +431,7 @@ declare const getTenantListWithLimits: ((state: {
434
431
  page: number;
435
432
  perPage: number;
436
433
  selectedTenant: Tenant | null;
437
- sort: _$_northern_tech_utils_constants0.SortOptions;
434
+ sort: import("@northern.tech/utils/constants").SortOptions;
438
435
  total: number;
439
436
  }) & {
440
437
  clearCache: () => void;
@@ -451,11 +448,11 @@ declare const getTenantListWithLimits: ((state: {
451
448
  plan?: "os" | "enterprise" | "professional";
452
449
  trial?: boolean;
453
450
  trial_expiration?: string;
454
- addons?: Array<_$_northern_tech_types_types_gen0.Addon>;
451
+ addons?: Array<import("@northern.tech/types/types.gen").Addon>;
455
452
  service_provider?: boolean;
456
453
  parent_tenant_id?: string;
457
- additional_info?: _$_northern_tech_types_types_gen0.TenantAdditionalInfo;
458
- api_limits?: _$_northern_tech_types_types_gen0.TenantApiLimits;
454
+ additional_info?: import("@northern.tech/types/types.gen").TenantAdditionalInfo;
455
+ api_limits?: import("@northern.tech/types/types.gen").TenantApiLimits;
459
456
  created_at?: string;
460
457
  updated_at?: string;
461
458
  device_count?: number;
@@ -464,7 +461,7 @@ declare const getTenantListWithLimits: ((state: {
464
461
  page: number;
465
462
  perPage: number;
466
463
  selectedTenant: Tenant | null;
467
- sort: _$_northern_tech_utils_constants0.SortOptions;
464
+ sort: import("@northern.tech/utils/constants").SortOptions;
468
465
  total: number;
469
466
  };
470
467
  dependencies: [(state: RootState) => TenantList];
@@ -473,8 +470,8 @@ declare const getTenantListWithLimits: ((state: {
473
470
  dependencyRecomputations: () => number;
474
471
  resetDependencyRecomputations: () => void;
475
472
  } & {
476
- memoize: typeof _$reselect.weakMapMemoize;
477
- argsMemoize: typeof _$reselect.weakMapMemoize;
473
+ memoize: typeof import("reselect").weakMapMemoize;
474
+ argsMemoize: typeof import("reselect").weakMapMemoize;
478
475
  };
479
476
  //#endregion
480
477
  export { getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogState, getBillingProfile, getCard, getDeviceTwinIntegrations, getDisabledTiers, getExternalIntegrations, getIsServiceProvider, getOrganization, getProducts, getSpLimits, getSsoConfig, getSubscription, getTenantListWithLimits, getTenantsList, getWebhookEventInfo, getWebhookEventTotal, getWebhookEvents, getWebhooks };
@@ -1 +1 @@
1
- {"version":3,"file":"selectors.js","names":[],"sources":["../../src/organizationSlice/selectors.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 type { Tenant } from '@northern.tech/types/MenderTypes';\nimport { createSelector } from '@reduxjs/toolkit';\n\nimport { EXTERNAL_PROVIDER, productOrder } from '../constants';\nimport type { RootState } from '../store';\n\nexport const getOrganization = (state: RootState) => state.organization.organization;\nexport const getProducts = (state: RootState) => state.organization.products;\nexport const getExternalIntegrations = (state: RootState) => state.organization.externalDeviceIntegrations;\nexport const getAuditlogState = (state: RootState) => state.organization.auditlog.selectionState;\nexport const getAuditLog = (state: RootState) => state.organization.auditlog.events;\nexport const getAuditLogSelectionState = (state: RootState) => state.organization.auditlog.selectionState;\nexport const getBillingProfile = (state: RootState) => state.organization.organization.billing_profile;\nexport const getSubscription = (state: RootState) => state.organization.organization.subscription;\nexport const getCard = (state: RootState) => state.organization.card;\nexport const getSsoConfig = ({ organization: { ssoConfigs = [] } }: RootState) => ssoConfigs[0];\nexport const getTenantsList = (state: RootState) => state.organization.tenantList;\nexport const getWebhookEvents = (state: RootState) => state.organization.webhooks.events;\nexport const getWebhookEventTotal = (state: RootState) => state.organization.webhooks.eventsTotal;\n\nexport const getDeviceTwinIntegrations = createSelector([getExternalIntegrations], integrations =>\n integrations.filter(integration => integration.id && EXTERNAL_PROVIDER[integration.provider]?.deviceTwin)\n);\nexport const getIsServiceProvider = (state: RootState) => state.organization.organization.service_provider;\n\nexport const getWebhooks = createSelector([getExternalIntegrations], integrations =>\n integrations.filter(integration => integration.id && integration.provider === EXTERNAL_PROVIDER.webhook.provider)\n);\nexport const getWebhookEventInfo = createSelector([getWebhooks, getWebhookEvents, getWebhookEventTotal], (webhooks, events, eventTotal) =>\n webhooks.length ? { events, eventTotal } : { events: [], eventTotal: 0 }\n);\n\nexport const getAuditLogEntry = createSelector([getAuditLog, getAuditLogSelectionState], (events, { selectedId }) => {\n if (!selectedId) {\n return;\n }\n const [eventAction, eventTime] = atob(selectedId).split('|');\n return events.find(item => item.action === eventAction && item.time === eventTime);\n});\n\nconst toTierName = (key: string) => key.replace(/max_|_?devices/g, '') || 'standard';\nconst processDeviceLimits = (deviceLimits: Tenant['device_limits'], skipFilter = false) => {\n const result: { disabled: string[]; limits: Record<string, object> } = { limits: {}, disabled: [] };\n if (!deviceLimits) return result;\n const tiersByName = Object.fromEntries(Object.entries(deviceLimits).map(([key, limit]) => [toTierName(key), { key, limit }]));\n return productOrder.reduce((accu, tierName) => {\n const entry = tiersByName[tierName];\n if (!entry) return accu;\n const { key, limit } = entry;\n if (limit.value === 0) {\n accu.disabled.push(tierName);\n if (!skipFilter) return accu;\n }\n accu.limits[tierName] = {\n id: tierName,\n backendId: key,\n limit: limit.value,\n current: limit.current_value,\n name: tierName,\n quotaLeft: Math.max(limit.value - limit.current_value, 0),\n limitReached: limit.value !== -1 && limit.value <= limit.current_value\n };\n return accu;\n }, result);\n};\nconst getDeviceLimitsInfo = createSelector([getOrganization], ({ device_limits }) => processDeviceLimits(device_limits));\nexport const getDisabledTiers = createSelector([getDeviceLimitsInfo], ({ disabled }) => disabled);\nexport const getSpLimits = createSelector([getDeviceLimitsInfo], ({ limits }) => limits);\nexport const getTenantListWithLimits = createSelector([getTenantsList], tenantList => ({\n ...tenantList,\n tenants: tenantList.tenants.map(tenant => ({\n ...tenant,\n device_limits: processDevice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,EAAE"}
1
+ {"version":3,"file":"selectors.js","names":[],"sources":["../../src/organizationSlice/selectors.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 type { Tenant } from '@northern.tech/types/MenderTypes';\nimport { createSelector } from '@reduxjs/toolkit';\n\nimport { EXTERNAL_PROVIDER, productOrder } from '../constants';\nimport type { RootState } from '../store';\n\nexport const getOrganization = (state: RootState) => state.organization.organization;\nexport const getProducts = (state: RootState) => state.organization.products;\nexport const getExternalIntegrations = (state: RootState) => state.organization.externalDeviceIntegrations;\nexport const getAuditlogState = (state: RootState) => state.organization.auditlog.selectionState;\nexport const getAuditLog = (state: RootState) => state.organization.auditlog.events;\nexport const getAuditLogSelectionState = (state: RootState) => state.organization.auditlog.selectionState;\nexport const getBillingProfile = (state: RootState) => state.organization.organization.billing_profile;\nexport const getSubscription = (state: RootState) => state.organization.organization.subscription;\nexport const getCard = (state: RootState) => state.organization.card;\nexport const getSsoConfig = ({ organization: { ssoConfigs = [] } }: RootState) => ssoConfigs[0];\nexport const getTenantsList = (state: RootState) => state.organization.tenantList;\nexport const getWebhookEvents = (state: RootState) => state.organization.webhooks.events;\nexport const getWebhookEventTotal = (state: RootState) => state.organization.webhooks.eventsTotal;\n\nexport const getDeviceTwinIntegrations = createSelector([getExternalIntegrations], integrations =>\n integrations.filter(integration => integration.id && EXTERNAL_PROVIDER[integration.provider]?.deviceTwin)\n);\nexport const getIsServiceProvider = (state: RootState) => state.organization.organization.service_provider;\n\nexport const getWebhooks = createSelector([getExternalIntegrations], integrations =>\n integrations.filter(integration => integration.id && integration.provider === EXTERNAL_PROVIDER.webhook.provider)\n);\nexport const getWebhookEventInfo = createSelector([getWebhooks, getWebhookEvents, getWebhookEventTotal], (webhooks, events, eventTotal) =>\n webhooks.length ? { events, eventTotal } : { events: [], eventTotal: 0 }\n);\n\nexport const getAuditLogEntry = createSelector([getAuditLog, getAuditLogSelectionState], (events, { selectedId }) => {\n if (!selectedId) {\n return;\n }\n const [eventAction, eventTime] = atob(selectedId).split('|');\n return events.find(item => item.action === eventAction && item.time === eventTime);\n});\n\nconst toTierName = (key: string) => key.replace(/max_|_?devices/g, '') || 'standard';\nconst processDeviceLimits = (deviceLimits: Tenant['device_limits'], skipFilter = false) => {\n const result: { disabled: string[]; limits: Record<string, object> } = { limits: {}, disabled: [] };\n if (!deviceLimits) return result;\n const tiersByName = Object.fromEntries(Object.entries(deviceLimits).map(([key, limit]) => [toTierName(key), { key, limit }]));\n return productOrder.reduce((accu, tierName) => {\n const entry = tiersByName[tierName];\n if (!entry) return accu;\n const { key, limit } = entry;\n if (limit.value === 0) {\n accu.disabled.push(tierName);\n if (!skipFilter) return accu;\n }\n accu.limits[tierName] = {\n id: tierName,\n backendId: key,\n limit: limit.value,\n current: limit.current_value,\n name: tierName,\n quotaLeft: Math.max(limit.value - limit.current_value, 0),\n limitReached: limit.value !== -1 && limit.value <= limit.current_value\n };\n return accu;\n }, result);\n};\nconst getDeviceLimitsInfo = createSelector([getOrganization], ({ device_limits }) => processDeviceLimits(device_limits));\nexport const getDisabledTiers = createSelector([getDeviceLimitsInfo], ({ disabled }) => disabled);\nexport const getSpLimits = createSelector([getDeviceLimitsInfo], ({ limits }) => limits);\nexport const getTenantListWithLimits = createSelector([getTenantsList], tenantList => ({\n ...tenantList,\n tenants: tenantList.tenants.map(tenant => ({\n ...tenant,\n device_limits: processDeviceLimits(tenant.device_limits, true).limits\n }))\n}));\n"],"mappings":";;;AAmBA,MAAa,mBAAmB,UAAqB,MAAM,aAAa;AACxE,MAAa,eAAe,UAAqB,MAAM,aAAa;AACpE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