@northern.tech/store 0.46.0 → 0.46.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 (148) hide show
  1. package/dist/actions.d.cts +6 -6
  2. package/dist/actions.d.ts +6 -6
  3. package/dist/api/general-api.js +1 -1
  4. package/dist/appSlice/index.d.cts +1 -1
  5. package/dist/appSlice/index.d.ts +1 -1
  6. package/dist/appSlice/index.js +1 -1
  7. package/dist/appSlice/mocks.d.cts +1 -1
  8. package/dist/appSlice/mocks.d.ts +1 -1
  9. package/dist/appSlice/selectors.cjs +1 -2
  10. package/dist/appSlice/selectors.cjs.map +1 -1
  11. package/dist/appSlice/selectors.d.cts +7 -7
  12. package/dist/appSlice/selectors.d.ts +7 -7
  13. package/dist/appSlice/selectors.js +1 -2
  14. package/dist/appSlice/selectors.js.map +1 -1
  15. package/dist/appSlice/thunks.d.cts +2 -2
  16. package/dist/appSlice/thunks.d.ts +2 -2
  17. package/dist/auth.cjs +1 -0
  18. package/dist/auth.cjs.map +1 -1
  19. package/dist/auth.d.cts +1 -1
  20. package/dist/auth.d.ts +1 -1
  21. package/dist/auth.js +2 -1
  22. package/dist/auth.js.map +1 -1
  23. package/dist/commonConstants.d.cts +1 -1
  24. package/dist/commonConstants.d.ts +1 -1
  25. package/dist/commonConstants.js +1 -1
  26. package/dist/commonSelectors.d.cts +9 -9
  27. package/dist/commonSelectors.d.ts +9 -9
  28. package/dist/commonSelectors.js +1 -1
  29. package/dist/{constants-B_H4squx.d.ts → constants-BJuY-ODE.d.ts} +3 -3
  30. package/dist/{constants-Rl3FJzFf.d.cts → constants-C2O55iZu.d.cts} +3 -3
  31. package/dist/{constants-eWaA3HCq.js → constants-D5hACLhF.js} +3 -3
  32. package/dist/{constants-eWaA3HCq.js.map → constants-D5hACLhF.js.map} +1 -1
  33. package/dist/constants.cjs +1 -1
  34. package/dist/constants.d.cts +2 -2
  35. package/dist/constants.d.ts +2 -2
  36. package/dist/constants.js +2 -2
  37. package/dist/deploymentsSlice/constants.js +1 -1
  38. package/dist/deploymentsSlice/index.js +1 -1
  39. package/dist/deploymentsSlice/selectors.d.cts +7 -7
  40. package/dist/deploymentsSlice/selectors.d.ts +7 -7
  41. package/dist/deploymentsSlice/selectors.js +1 -1
  42. package/dist/deploymentsSlice/thunks.d.cts +4 -4
  43. package/dist/deploymentsSlice/thunks.d.ts +4 -4
  44. package/dist/devicesSlice/constants.d.cts +1 -1
  45. package/dist/devicesSlice/constants.d.ts +1 -1
  46. package/dist/devicesSlice/constants.js +1 -1
  47. package/dist/devicesSlice/index.d.cts +1 -1
  48. package/dist/devicesSlice/index.d.ts +1 -1
  49. package/dist/devicesSlice/index.js +1 -1
  50. package/dist/devicesSlice/mocks.js +1 -1
  51. package/dist/devicesSlice/selectors.d.cts +7 -7
  52. package/dist/devicesSlice/selectors.d.ts +7 -7
  53. package/dist/devicesSlice/selectors.js +1 -1
  54. package/dist/devicesSlice/thunks.d.cts +4 -4
  55. package/dist/devicesSlice/thunks.d.ts +4 -4
  56. package/dist/{index-DgiMpzq3.d.ts → index--SKVGToc.d.ts} +2 -2
  57. package/dist/{index-DeOpb2oK.d.cts → index-BKU1G9-x.d.cts} +2 -2
  58. package/dist/{index-CGT1O9T5.d.ts → index-BMsafOyJ.d.ts} +2 -2
  59. package/dist/{index-ChKTa1aL.d.ts → index-BVNS-Aut.d.ts} +2 -2
  60. package/dist/{index-Ctj2r57a.d.cts → index-BfmRpbiJ.d.cts} +2 -2
  61. package/dist/{index-BAGyeC-q.d.ts → index-CRqnH_go.d.ts} +2 -2
  62. package/dist/{index-Cf6_W5Y7.d.cts → index-CqhXqGLt.d.cts} +2 -2
  63. package/dist/{index-BpamudGf.d.ts → index-D9GJhX1I.d.ts} +2 -2
  64. package/dist/{index-C_LGDJN2.d.cts → index-HjOSTTGF.d.cts} +2 -2
  65. package/dist/{index-DnKVKM0G.d.cts → index-KxRmyFLr.d.cts} +2 -2
  66. package/dist/{index-ExguKUh-.d.cts → index-fGVC5s1C.d.cts} +2 -2
  67. package/dist/{index-Bs0c1-WY.d.ts → index-xxqlerg5.d.ts} +2 -2
  68. package/dist/locationutils.d.cts +2 -2
  69. package/dist/locationutils.d.ts +2 -2
  70. package/dist/locationutils.js +1 -1
  71. package/dist/monitorSlice/constants.d.cts +1 -1
  72. package/dist/monitorSlice/constants.d.ts +1 -1
  73. package/dist/monitorSlice/index.d.cts +1 -1
  74. package/dist/monitorSlice/index.d.ts +1 -1
  75. package/dist/monitorSlice/index.js +1 -1
  76. package/dist/monitorSlice/mocks.d.cts +1 -1
  77. package/dist/monitorSlice/mocks.d.ts +1 -1
  78. package/dist/monitorSlice/mocks.js +1 -1
  79. package/dist/monitorSlice/selectors.d.cts +1 -1
  80. package/dist/monitorSlice/selectors.d.ts +1 -1
  81. package/dist/monitorSlice/thunks.d.cts +4 -4
  82. package/dist/monitorSlice/thunks.d.ts +4 -4
  83. package/dist/monitorSlice/thunks.js +1 -1
  84. package/dist/onboardingSlice/selectors.d.cts +1 -1
  85. package/dist/onboardingSlice/selectors.d.ts +1 -1
  86. package/dist/onboardingSlice/thunks.d.cts +3 -3
  87. package/dist/onboardingSlice/thunks.d.ts +3 -3
  88. package/dist/organizationSlice/constants.js +1 -1
  89. package/dist/organizationSlice/index.d.cts +1 -1
  90. package/dist/organizationSlice/index.d.ts +1 -1
  91. package/dist/organizationSlice/index.js +1 -1
  92. package/dist/organizationSlice/mocks.d.cts +2 -2
  93. package/dist/organizationSlice/mocks.d.ts +2 -2
  94. package/dist/organizationSlice/mocks.js +1 -1
  95. package/dist/organizationSlice/selectors.cjs +6 -6
  96. package/dist/organizationSlice/selectors.cjs.map +1 -1
  97. package/dist/organizationSlice/selectors.d.cts +14 -14
  98. package/dist/organizationSlice/selectors.d.ts +14 -14
  99. package/dist/organizationSlice/selectors.js +7 -7
  100. package/dist/organizationSlice/selectors.js.map +1 -1
  101. package/dist/organizationSlice/thunks.d.cts +6 -4
  102. package/dist/organizationSlice/thunks.d.ts +6 -4
  103. package/dist/organizationSlice/types.d.cts +1 -1
  104. package/dist/organizationSlice/types.d.ts +1 -1
  105. package/dist/releasesSlice/index.d.cts +1 -1
  106. package/dist/releasesSlice/index.d.ts +1 -1
  107. package/dist/releasesSlice/index.js +1 -1
  108. package/dist/releasesSlice/mocks.js +1 -1
  109. package/dist/releasesSlice/selectors.d.cts +7 -7
  110. package/dist/releasesSlice/selectors.d.ts +7 -7
  111. package/dist/releasesSlice/thunks.d.cts +4 -4
  112. package/dist/releasesSlice/thunks.d.ts +4 -4
  113. package/dist/releasesSlice/thunks.js +1 -1
  114. package/dist/selectors.cjs +1 -1
  115. package/dist/selectors.d.cts +2 -2
  116. package/dist/selectors.d.ts +2 -2
  117. package/dist/selectors.js +2 -2
  118. package/dist/sockethook.js +1 -1
  119. package/dist/{store-CmvNnqoc.d.ts → store-DLp6ajT8.d.ts} +9 -9
  120. package/dist/{store-C-W8nPdd.d.cts → store-Dw8Uo_Df.d.cts} +9 -9
  121. package/dist/store.d.cts +1 -1
  122. package/dist/store.d.ts +1 -1
  123. package/dist/store.js +1 -1
  124. package/dist/storehooks.d.cts +2 -2
  125. package/dist/storehooks.d.ts +2 -2
  126. package/dist/storehooks.js +1 -1
  127. package/dist/thunks.cjs +7 -4
  128. package/dist/thunks.cjs.map +1 -1
  129. package/dist/thunks.js +8 -5
  130. package/dist/thunks.js.map +1 -1
  131. package/dist/{types-B80ckxiy.d.cts → types-B67YW1jV.d.cts} +2 -2
  132. package/dist/{types-B3qGQoMx.d.ts → types-DY0J79yF.d.ts} +2 -2
  133. package/dist/usersSlice/constants.js +1 -1
  134. package/dist/usersSlice/index.d.cts +1 -1
  135. package/dist/usersSlice/index.d.ts +1 -1
  136. package/dist/usersSlice/index.js +1 -1
  137. package/dist/usersSlice/mocks.d.cts +1 -1
  138. package/dist/usersSlice/mocks.d.ts +1 -1
  139. package/dist/usersSlice/mocks.js +1 -1
  140. package/dist/usersSlice/selectors.d.cts +7 -7
  141. package/dist/usersSlice/selectors.d.ts +7 -7
  142. package/dist/usersSlice/selectors.js +1 -1
  143. package/dist/usersSlice/thunks.d.cts +4 -4
  144. package/dist/usersSlice/thunks.d.ts +4 -4
  145. package/dist/utils.d.cts +1 -1
  146. package/dist/utils.d.ts +1 -1
  147. package/dist/utils.js +1 -1
  148. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import { Ct as FilterOperator, T as SortOptions, ht as DeviceAuthState, m as DeviceIssueOptionKey, n as ALL_DEVICE_STATES } from "./constants-B_H4squx.js";
1
+ import { Ct as FilterOperator, T as SortOptions, ht as DeviceAuthState, m as DeviceIssueOptionKey, n as ALL_DEVICE_STATES } from "./constants-BJuY-ODE.js";
2
2
  import { s as DeviceDeployment } from "./index-B8td4-rY.js";
3
3
  import { PayloadAction } from "@reduxjs/toolkit";
4
4
  import { AttributeResponse, ConnectionState, Device, DeviceConfiguration, DeviceState, DeviceTierLimits, MonitorConfiguration, Scope, SortCriteria, Status } from "@northern.tech/types/MenderTypes";
@@ -200,4 +200,4 @@ declare const actions: import("@reduxjs/toolkit").CaseReducerActions<{
200
200
  declare const _default: import("redux").Reducer<DeviceSliceType>;
201
201
  //#endregion
202
202
  export { DeviceGroups as a, DeviceSliceType as c, _default as d, actions as f, sliceName as h, DeviceGroup as i, DeviceTierLimits$1 as l, initialState as m, DeviceComponents as n, DeviceListState as o, devicesSlice as p, DeviceFilter as r, DeviceSelectedAttribute as s, Device$1 as t, InventoryAttributes as u };
203
- //# sourceMappingURL=index-BpamudGf.d.ts.map
203
+ //# sourceMappingURL=index-D9GJhX1I.d.ts.map
@@ -1,4 +1,4 @@
1
- import { d as TenantList, f as Webhook, i as Organization, l as SSOConfig, n as AuditLogSelectionState, o as ProductConfig, r as Card, t as AuditLog$1 } from "./types-B80ckxiy.cjs";
1
+ import { d as TenantList, f as Webhook, i as Organization, l as SSOConfig, n as AuditLogSelectionState, o as ProductConfig, r as Card, t as AuditLog$1 } from "./types-B67YW1jV.cjs";
2
2
  import { AuditLog, BillingProfile, Event, Integration } from "@northern.tech/types/MenderTypes";
3
3
  import { PayloadAction } from "@reduxjs/toolkit";
4
4
  //#region src/organizationSlice/index.d.ts
@@ -64,4 +64,4 @@ declare const actions: import("@reduxjs/toolkit").CaseReducerActions<{
64
64
  declare const _default: import("redux").Reducer<OrganizationSliceType>;
65
65
  //#endregion
66
66
  export { organizationSlice as a, initialState as i, _default as n, sliceName as o, actions as r, OrganizationSliceType as t };
67
- //# sourceMappingURL=index-C_LGDJN2.d.cts.map
67
+ //# sourceMappingURL=index-HjOSTTGF.d.cts.map
@@ -1,4 +1,4 @@
1
- import { Ct as FilterOperator, T as SortOptions, ht as DeviceAuthState, m as DeviceIssueOptionKey, n as ALL_DEVICE_STATES } from "./constants-Rl3FJzFf.cjs";
1
+ import { Ct as FilterOperator, T as SortOptions, ht as DeviceAuthState, m as DeviceIssueOptionKey, n as ALL_DEVICE_STATES } from "./constants-C2O55iZu.cjs";
2
2
  import { s as DeviceDeployment } from "./index-mvxjivTJ.cjs";
3
3
  import { AttributeResponse, ConnectionState, Device, DeviceConfiguration, DeviceState, DeviceTierLimits, MonitorConfiguration, Scope, SortCriteria, Status } from "@northern.tech/types/MenderTypes";
4
4
  import { PayloadAction } from "@reduxjs/toolkit";
@@ -200,4 +200,4 @@ declare const actions: import("@reduxjs/toolkit").CaseReducerActions<{
200
200
  declare const _default: import("redux").Reducer<DeviceSliceType>;
201
201
  //#endregion
202
202
  export { DeviceGroups as a, DeviceSliceType as c, _default as d, actions as f, sliceName as h, DeviceGroup as i, DeviceTierLimits$1 as l, initialState as m, DeviceComponents as n, DeviceListState as o, devicesSlice as p, DeviceFilter as r, DeviceSelectedAttribute as s, Device$1 as t, InventoryAttributes as u };
203
- //# sourceMappingURL=index-DnKVKM0G.d.cts.map
203
+ //# sourceMappingURL=index-KxRmyFLr.d.cts.map
@@ -1,4 +1,4 @@
1
- import { T as SortOptions } from "./constants-Rl3FJzFf.cjs";
1
+ import { T as SortOptions } from "./constants-C2O55iZu.cjs";
2
2
  import { ArtifactV1, ArtifactV2, DeltaJobDetailsItem, DeltaJobsListItem, Manifest, ReleaseV1, ReleaseV2, Software, Tags, Update } from "@northern.tech/types/MenderTypes";
3
3
  import { PayloadAction } from "@reduxjs/toolkit";
4
4
  //#region src/releasesSlice/index.d.ts
@@ -167,4 +167,4 @@ declare const actions: import("@reduxjs/toolkit").CaseReducerActions<{
167
167
  declare const _default: import("redux").Reducer<ReleaseSliceType>;
168
168
  //#endregion
169
169
  export { ReleaseSliceType as a, SoftwareList as c, initialState as d, releaseSlice as f, Release as i, _default as l, Manifest$1 as n, ReleasesList as o, sliceName as p, ManifestsList as r, SoftwareKind as s, Artifact as t, actions as u };
170
- //# sourceMappingURL=index-ExguKUh-.d.cts.map
170
+ //# sourceMappingURL=index-fGVC5s1C.d.cts.map
@@ -1,4 +1,4 @@
1
- import { T as SortOptions } from "./constants-B_H4squx.js";
1
+ import { T as SortOptions } from "./constants-BJuY-ODE.js";
2
2
  import { PayloadAction } from "@reduxjs/toolkit";
3
3
  import { SnackbarProps } from "@mui/material";
4
4
  //#region src/appSlice/index.d.ts
@@ -111,4 +111,4 @@ declare const actions: import("@reduxjs/toolkit").CaseReducerActions<{
111
111
  declare const _default: import("redux").Reducer<AppSliceType>;
112
112
  //#endregion
113
113
  export { Upload as a, appSlice as c, SnackbarContent as i, initialState as l, SearchState as n, _default as o, SentryConfig as r, actions as s, AppSliceType as t, sliceName as u };
114
- //# sourceMappingURL=index-Bs0c1-WY.d.ts.map
114
+ //# sourceMappingURL=index-xxqlerg5.d.ts.map
@@ -1,6 +1,6 @@
1
- import { T as SortOptions, g as PaginationOptions } from "./constants-Rl3FJzFf.cjs";
1
+ import { T as SortOptions, g as PaginationOptions } from "./constants-C2O55iZu.cjs";
2
2
  import { t as AUDIT_LOGS_TYPES } from "./constants-OZiiFKiA.cjs";
3
- import { r as DeviceFilter } from "./index-DnKVKM0G.cjs";
3
+ import { r as DeviceFilter } from "./index-KxRmyFLr.cjs";
4
4
  //#region src/locationutils.d.ts
5
5
  type PageState = Partial<PaginationOptions> & {
6
6
  [key: string]: unknown;
@@ -1,6 +1,6 @@
1
- import { T as SortOptions, g as PaginationOptions } from "./constants-B_H4squx.js";
1
+ import { T as SortOptions, g as PaginationOptions } from "./constants-BJuY-ODE.js";
2
2
  import { t as AUDIT_LOGS_TYPES } from "./constants-OZiiFKiA.js";
3
- import { r as DeviceFilter } from "./index-BpamudGf.js";
3
+ import { r as DeviceFilter } from "./index-D9GJhX1I.js";
4
4
  //#region src/locationutils.d.ts
5
5
  type PageState = Partial<PaginationOptions> & {
6
6
  [key: string]: unknown;
@@ -1,4 +1,4 @@
1
- import { $ as AUDIT_LOGS_TYPES, Ft as UNGROUPED_GROUP, _t as DEPLOYMENT_STATES, gt as DEPLOYMENT_ROUTES, l as DEVICE_LIST_DEFAULTS, o as ATTRIBUTE_SCOPES, pt as emptyFilter, s as DEVICE_FILTERING_OPTIONS, t as ALL_DEVICES, vt as DEPLOYMENT_TYPES } from "./constants-eWaA3HCq.js";
1
+ import { $ as AUDIT_LOGS_TYPES, Ft as UNGROUPED_GROUP, _t as DEPLOYMENT_STATES, gt as DEPLOYMENT_ROUTES, l as DEVICE_LIST_DEFAULTS, o as ATTRIBUTE_SCOPES, pt as emptyFilter, s as DEVICE_FILTERING_OPTIONS, t as ALL_DEVICES, vt as DEPLOYMENT_TYPES } from "./constants-D5hACLhF.js";
2
2
  import { deepCompare, getISOStringBoundaries } from "@northern.tech/utils/helpers";
3
3
  //#region src/locationutils.ts
4
4
  const SEPARATOR = ":";
@@ -1,2 +1,2 @@
1
- import { ut as AlertChannelKey } from "../constants-Rl3FJzFf.cjs";
1
+ import { ut as AlertChannelKey } from "../constants-C2O55iZu.cjs";
2
2
  export { AlertChannelKey };
@@ -1,2 +1,2 @@
1
- import { ut as AlertChannelKey } from "../constants-B_H4squx.js";
1
+ import { ut as AlertChannelKey } from "../constants-BJuY-ODE.js";
2
2
  export { AlertChannelKey };
@@ -1,2 +1,2 @@
1
- import { a as monitorSlice, i as initialState, n as _default, o as sliceName, r as actions, t as MonitorSliceType } from "../index-Ctj2r57a.cjs";
1
+ import { a as monitorSlice, i as initialState, n as _default, o as sliceName, r as actions, t as MonitorSliceType } from "../index-BfmRpbiJ.cjs";
2
2
  export { MonitorSliceType, actions, _default as default, initialState, monitorSlice, sliceName };
@@ -1,2 +1,2 @@
1
- import { a as monitorSlice, i as initialState, n as _default, o as sliceName, r as actions, t as MonitorSliceType } from "../index-BAGyeC-q.js";
1
+ import { a as monitorSlice, i as initialState, n as _default, o as sliceName, r as actions, t as MonitorSliceType } from "../index-CRqnH_go.js";
2
2
  export { MonitorSliceType, actions, _default as default, initialState, monitorSlice, sliceName };
@@ -1,4 +1,4 @@
1
- import { c as DEVICE_ISSUE_OPTIONS, l as DEVICE_LIST_DEFAULTS, p as alertChannels } from "../constants-eWaA3HCq.js";
1
+ import { c as DEVICE_ISSUE_OPTIONS, l as DEVICE_LIST_DEFAULTS, p as alertChannels } from "../constants-D5hACLhF.js";
2
2
  import { createSlice } from "@reduxjs/toolkit";
3
3
  //#region src/monitorSlice/index.ts
4
4
  const sliceName = "monitor";
@@ -1,4 +1,4 @@
1
- import { u as DEVICE_ISSUE_OPTIONS } from "../constants-Rl3FJzFf.cjs";
1
+ import { u as DEVICE_ISSUE_OPTIONS } from "../constants-C2O55iZu.cjs";
2
2
  //#region src/monitorSlice/mocks.d.ts
3
3
  declare const mockState: {
4
4
  alerts: {
@@ -1,4 +1,4 @@
1
- import { u as DEVICE_ISSUE_OPTIONS } from "../constants-B_H4squx.js";
1
+ import { u as DEVICE_ISSUE_OPTIONS } from "../constants-BJuY-ODE.js";
2
2
  //#region src/monitorSlice/mocks.d.ts
3
3
  declare const mockState: {
4
4
  alerts: {
@@ -1,4 +1,4 @@
1
- import { c as DEVICE_ISSUE_OPTIONS, l as DEVICE_LIST_DEFAULTS } from "../constants-eWaA3HCq.js";
1
+ import { c as DEVICE_ISSUE_OPTIONS, l as DEVICE_LIST_DEFAULTS } from "../constants-D5hACLhF.js";
2
2
  import { initialState } from "./index.js";
3
3
  //#region src/monitorSlice/mocks.ts
4
4
  const mockState = {
@@ -1,4 +1,4 @@
1
- import { r as RootState } from "../store-C-W8nPdd.cjs";
1
+ import { r as RootState } from "../store-Dw8Uo_Df.cjs";
2
2
  //#region src/monitorSlice/selectors.d.ts
3
3
  declare const getIssueCountsByType: (state: RootState) => {
4
4
  [x: string]: {
@@ -1,4 +1,4 @@
1
- import { r as RootState } from "../store-CmvNnqoc.js";
1
+ import { r as RootState } from "../store-DLp6ajT8.js";
2
2
  //#region src/monitorSlice/selectors.d.ts
3
3
  declare const getIssueCountsByType: (state: RootState) => {
4
4
  [x: string]: {
@@ -1,7 +1,7 @@
1
- import { m as DeviceIssueOptionKey, ut as AlertChannelKey } from "../constants-Rl3FJzFf.cjs";
2
- import { r as DeviceFilter, t as Device } from "../index-DnKVKM0G.cjs";
3
- import { i as SnackbarContent } from "../index-DeOpb2oK.cjs";
4
- import { r as RootState, t as AppDispatch } from "../store-C-W8nPdd.cjs";
1
+ import { m as DeviceIssueOptionKey, ut as AlertChannelKey } from "../constants-C2O55iZu.cjs";
2
+ import { r as DeviceFilter, t as Device } from "../index-KxRmyFLr.cjs";
3
+ import { i as SnackbarContent } from "../index-BKU1G9-x.cjs";
4
+ import { r as RootState, t as AppDispatch } from "../store-Dw8Uo_Df.cjs";
5
5
  //#region src/monitorSlice/thunks.d.ts
6
6
  interface GetDeviceAlertsPayload {
7
7
  config?: {
@@ -1,7 +1,7 @@
1
- import { m as DeviceIssueOptionKey, ut as AlertChannelKey } from "../constants-B_H4squx.js";
2
- import { r as DeviceFilter, t as Device } from "../index-BpamudGf.js";
3
- import { i as SnackbarContent } from "../index-Bs0c1-WY.js";
4
- import { r as RootState, t as AppDispatch } from "../store-CmvNnqoc.js";
1
+ import { m as DeviceIssueOptionKey, ut as AlertChannelKey } from "../constants-BJuY-ODE.js";
2
+ import { r as DeviceFilter, t as Device } from "../index-D9GJhX1I.js";
3
+ import { i as SnackbarContent } from "../index-xxqlerg5.js";
4
+ import { r as RootState, t as AppDispatch } from "../store-DLp6ajT8.js";
5
5
  //#region src/monitorSlice/thunks.d.ts
6
6
  interface GetDeviceAlertsPayload {
7
7
  config?: {
@@ -1,4 +1,4 @@
1
- import { E as headerNames, N as monitorApiUrlv1, O as inventoryApiUrlV2, Pt as TIMEOUTS, l as DEVICE_LIST_DEFAULTS, p as alertChannels } from "../constants-eWaA3HCq.js";
1
+ import { E as headerNames, N as monitorApiUrlv1, O as inventoryApiUrlV2, Pt as TIMEOUTS, l as DEVICE_LIST_DEFAULTS, p as alertChannels } from "../constants-D5hACLhF.js";
2
2
  import { actions, sliceName } from "./index.js";
3
3
  import actions_default from "../actions.js";
4
4
  import { getDeviceFilters } from "../devicesSlice/selectors.js";
@@ -1,5 +1,5 @@
1
1
  import { n as OnboardingSliceType } from "../index-CoObjWL4.cjs";
2
- import { r as RootState } from "../store-C-W8nPdd.cjs";
2
+ import { r as RootState } from "../store-Dw8Uo_Df.cjs";
3
3
  //#region src/onboardingSlice/selectors.d.ts
4
4
  declare const getOnboarding: (state: RootState) => OnboardingSliceType;
5
5
  //#endregion
@@ -1,5 +1,5 @@
1
1
  import { n as OnboardingSliceType } from "../index-CoObjWL4.js";
2
- import { r as RootState } from "../store-CmvNnqoc.js";
2
+ import { r as RootState } from "../store-DLp6ajT8.js";
3
3
  //#region src/onboardingSlice/selectors.d.ts
4
4
  declare const getOnboarding: (state: RootState) => OnboardingSliceType;
5
5
  //#endregion
@@ -1,8 +1,8 @@
1
- import "../constants-Rl3FJzFf.cjs";
1
+ import "../constants-C2O55iZu.cjs";
2
2
  import { t as OnboardingStep } from "../constants-Db_RBdlV.cjs";
3
- import { a as UserSettings } from "../index-Cf6_W5Y7.cjs";
3
+ import { a as UserSettings } from "../index-CqhXqGLt.cjs";
4
4
  import { n as OnboardingSliceType, t as OnboardingApproach } from "../index-CoObjWL4.cjs";
5
- import { r as RootState, t as AppDispatch } from "../store-C-W8nPdd.cjs";
5
+ import { r as RootState, t as AppDispatch } from "../store-Dw8Uo_Df.cjs";
6
6
  //#region src/onboardingSlice/thunks.d.ts
7
7
  declare const getOnboardingState: import("@reduxjs/toolkit").AsyncThunk<[{
8
8
  payload: boolean;
@@ -1,8 +1,8 @@
1
- import "../constants-B_H4squx.js";
1
+ import "../constants-BJuY-ODE.js";
2
2
  import { t as OnboardingStep } from "../constants-Db_RBdlV.js";
3
- import { a as UserSettings } from "../index-DgiMpzq3.js";
3
+ import { a as UserSettings } from "../index--SKVGToc.js";
4
4
  import { n as OnboardingSliceType, t as OnboardingApproach } from "../index-CoObjWL4.js";
5
- import { r as RootState, t as AppDispatch } from "../store-CmvNnqoc.js";
5
+ import { r as RootState, t as AppDispatch } from "../store-DLp6ajT8.js";
6
6
  //#region src/onboardingSlice/thunks.d.ts
7
7
  declare const getOnboardingState: import("@reduxjs/toolkit").AsyncThunk<[{
8
8
  payload: boolean;
@@ -1,2 +1,2 @@
1
- import { $ as AUDIT_LOGS_TYPES, at as auditlogTypes, et as JSON_METADATA_FORMAT, it as XML_METADATA_FORMAT, nt as SSO_TYPES, ot as getOidcStartUrl, rt as TENANT_LIST_DEFAULT, st as getSamlStartUrl, tt as SP_AUDIT_LOGS_TYPES } from "../constants-eWaA3HCq.js";
1
+ import { $ as AUDIT_LOGS_TYPES, at as auditlogTypes, et as JSON_METADATA_FORMAT, it as XML_METADATA_FORMAT, nt as SSO_TYPES, ot as getOidcStartUrl, rt as TENANT_LIST_DEFAULT, st as getSamlStartUrl, tt as SP_AUDIT_LOGS_TYPES } from "../constants-D5hACLhF.js";
2
2
  export { AUDIT_LOGS_TYPES, JSON_METADATA_FORMAT, SP_AUDIT_LOGS_TYPES, SSO_TYPES, TENANT_LIST_DEFAULT, XML_METADATA_FORMAT, auditlogTypes, getOidcStartUrl, getSamlStartUrl };
@@ -1,2 +1,2 @@
1
- import { a as organizationSlice, i as initialState, n as _default, o as sliceName, r as actions, t as OrganizationSliceType } from "../index-C_LGDJN2.cjs";
1
+ import { a as organizationSlice, i as initialState, n as _default, o as sliceName, r as actions, t as OrganizationSliceType } from "../index-HjOSTTGF.cjs";
2
2
  export { OrganizationSliceType, actions, _default as default, initialState, organizationSlice, sliceName };
@@ -1,2 +1,2 @@
1
- import { a as organizationSlice, i as initialState, n as _default, o as sliceName, r as actions, t as OrganizationSliceType } from "../index-ChKTa1aL.js";
1
+ import { a as organizationSlice, i as initialState, n as _default, o as sliceName, r as actions, t as OrganizationSliceType } from "../index-BVNS-Aut.js";
2
2
  export { OrganizationSliceType, actions, _default as default, initialState, organizationSlice, sliceName };
@@ -1,4 +1,4 @@
1
- import { f as SORTING_OPTIONS, l as DEVICE_LIST_DEFAULTS, rt as TENANT_LIST_DEFAULT } from "../constants-eWaA3HCq.js";
1
+ import { f as SORTING_OPTIONS, l as DEVICE_LIST_DEFAULTS, rt as TENANT_LIST_DEFAULT } from "../constants-D5hACLhF.js";
2
2
  import { createSlice } from "@reduxjs/toolkit";
3
3
  //#region src/organizationSlice/index.ts
4
4
  const sliceName = "organization";
@@ -1,6 +1,6 @@
1
1
  import { a as AvailablePlans } from "../constants-nKSWZ8oD.cjs";
2
- import "../constants-Rl3FJzFf.cjs";
3
- import { d as TenantList, f as Webhook, l as SSOConfig } from "../types-B80ckxiy.cjs";
2
+ import "../constants-C2O55iZu.cjs";
3
+ import { d as TenantList, f as Webhook, l as SSOConfig } from "../types-B67YW1jV.cjs";
4
4
  //#region src/organizationSlice/mocks.d.ts
5
5
  declare const basicPlanId: AvailablePlans;
6
6
  declare const professionalPlanId: AvailablePlans;
@@ -1,6 +1,6 @@
1
1
  import { a as AvailablePlans } from "../constants-nKSWZ8oD.js";
2
- import "../constants-B_H4squx.js";
3
- import { d as TenantList, f as Webhook, l as SSOConfig } from "../types-B3qGQoMx.js";
2
+ import "../constants-BJuY-ODE.js";
3
+ import { d as TenantList, f as Webhook, l as SSOConfig } from "../types-DY0J79yF.js";
4
4
  //#region src/organizationSlice/mocks.d.ts
5
5
  declare const basicPlanId: AvailablePlans;
6
6
  declare const professionalPlanId: AvailablePlans;
@@ -1,5 +1,5 @@
1
1
  import { PLANS } from "../appSlice/constants.js";
2
- import { l as DEVICE_LIST_DEFAULTS } from "../constants-eWaA3HCq.js";
2
+ import { l as DEVICE_LIST_DEFAULTS } from "../constants-D5hACLhF.js";
3
3
  import { initialState } from "./index.js";
4
4
  //#region src/organizationSlice/mocks.ts
5
5
  const basicPlanId = PLANS.os.id;
@@ -14,20 +14,20 @@ const getCard = (state) => state.organization.card;
14
14
  const getSsoConfig = ({ organization: { ssoConfigs = [] } }) => ssoConfigs[0];
15
15
  const getTenantsList = (state) => state.organization.tenantList;
16
16
  const getWebhookEvents = (state) => state.organization.webhooks.events;
17
- const getWebhookEventTotal = (state) => state.organization.webhooks.eventsTotal;
17
+ const getWebhookEventsTotal = (state) => state.organization.webhooks.eventsTotal;
18
18
  const getDeviceTwinIntegrations = (0, _reduxjs_toolkit.createSelector)([getExternalIntegrations], (integrations) => integrations.filter((integration) => integration.id && require_constants.EXTERNAL_PROVIDER[integration.provider]?.deviceTwin));
19
19
  const getIsServiceProvider = (state) => state.organization.organization.service_provider;
20
20
  const getWebhooks = (0, _reduxjs_toolkit.createSelector)([getExternalIntegrations], (integrations) => integrations.filter((integration) => integration.id && integration.provider === require_constants.EXTERNAL_PROVIDER.webhook.provider));
21
21
  const getWebhookEventInfo = (0, _reduxjs_toolkit.createSelector)([
22
22
  getWebhooks,
23
23
  getWebhookEvents,
24
- getWebhookEventTotal
25
- ], (webhooks, events, eventTotal) => webhooks.length ? {
24
+ getWebhookEventsTotal
25
+ ], (webhooks, events, eventsTotal) => webhooks.length ? {
26
26
  events,
27
- eventTotal
27
+ eventsTotal
28
28
  } : {
29
29
  events: [],
30
- eventTotal: 0
30
+ eventsTotal: 0
31
31
  });
32
32
  const getAuditLogEntry = (0, _reduxjs_toolkit.createSelector)([getAuditLog, getAuditLogSelectionState], (events, { selectedId }) => {
33
33
  if (!selectedId) return;
@@ -94,8 +94,8 @@ exports.getSubscription = getSubscription;
94
94
  exports.getTenantListWithLimits = getTenantListWithLimits;
95
95
  exports.getTenantsList = getTenantsList;
96
96
  exports.getWebhookEventInfo = getWebhookEventInfo;
97
- exports.getWebhookEventTotal = getWebhookEventTotal;
98
97
  exports.getWebhookEvents = getWebhookEvents;
98
+ exports.getWebhookEventsTotal = getWebhookEventsTotal;
99
99
  exports.getWebhooks = getWebhooks;
100
100
 
101
101
  //# sourceMappingURL=selectors.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"selectors.cjs","names":["createSelector","EXTERNAL_PROVIDER","productOrder"],"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,MAAa,2BAA2B,UAAqB,MAAM,aAAa;AAChF,MAAa,oBAAoB,UAAqB,MAAM,aAAa,SAAS;AAClF,MAAa,eAAe,UAAqB,MAAM,aAAa,SAAS;AAC7E,MAAa,6BAA6B,UAAqB,MAAM,aAAa,SAAS;AAC3F,MAAa,qBAAqB,UAAqB,MAAM,aAAa,aAAa;AACvF,MAAa,mBAAmB,UAAqB,MAAM,aAAa,aAAa;AACrF,MAAa,WAAW,UAAqB,MAAM,aAAa;AAChE,MAAa,gBAAgB,EAAE,cAAc,EAAE,aAAa,CAAC,UAAqB,WAAW;AAC7F,MAAa,kBAAkB,UAAqB,MAAM,aAAa;AACvE,MAAa,oBAAoB,UAAqB,MAAM,aAAa,SAAS;AAClF,MAAa,wBAAwB,UAAqB,MAAM,aAAa,SAAS;AAEtF,MAAa,6BAAA,GAA4BA,iBAAAA,eAAAA,CAAe,CAAC,uBAAuB,IAAG,iBACjF,aAAa,QAAO,gBAAe,YAAY,MAAMC,kBAAAA,kBAAkB,YAAY,SAAS,EAAE,UAAU,CAC1G;AACA,MAAa,wBAAwB,UAAqB,MAAM,aAAa,aAAa;AAE1F,MAAa,eAAA,GAAcD,iBAAAA,eAAAA,CAAe,CAAC,uBAAuB,IAAG,iBACnE,aAAa,QAAO,gBAAe,YAAY,MAAM,YAAY,aAAaC,kBAAAA,kBAAkB,QAAQ,Q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3D;EACA,OAAO;CACT,GAAG,MAAM;AACX;AACA,MAAM,uBAAA,GAAsBF,iBAAAA,eAAAA,CAAe,CAAC,eAAe,IAAI,EAAE,oBAAoB,oBAAoB,aAAa,CAAC;AACvH,MAAa,oBAAA,GAAmBA,iBAAAA,eAAAA,CAAe,CAAC,mBAAmB,IAAI,EAAE,eAAe,QAAQ;AAChG,MAAa,eAAA,GAAcA,iBAAAA,eAAAA,CAAe,CAAC,mBAAmB,IAAI,EAAE,aAAa,MAAM;AACvF,MAAa,2BAAA,GAA0BA,iBAAAA,eAAAA,CAAe,CAAC,cAAc,IAAG,gBAAe;CACrF,GAAG;CACH,SAAS,WAAW,QAAQ,KAAI,YAAW;EACzC,GAAG;EACH,eAAe,oBAAoB,OAAO,eAAe,IAAI,CAAC,CAAC;CACjE,EAAE;AACJ,EAAE"}
1
+ {"version":3,"file":"selectors.cjs","names":["createSelector","EXTERNAL_PROVIDER","productOrder"],"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 getWebhookEventsTotal = (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, getWebhookEventsTotal], (webhooks, events, eventsTotal) =>\n webhooks.length ? { events, eventsTotal } : { events: [], eventsTotal: 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,MAAa,2BAA2B,UAAqB,MAAM,aAAa;AAChF,MAAa,oBAAoB,UAAqB,MAAM,aAAa,SAAS;AAClF,MAAa,eAAe,UAAqB,MAAM,aAAa,SAAS;AAC7E,MAAa,6BAA6B,UAAqB,MAAM,aAAa,SAAS;AAC3F,MAAa,qBAAqB,UAAqB,MAAM,aAAa,aAAa;AACvF,MAAa,mBAAmB,UAAqB,MAAM,aAAa,aAAa;AACrF,MAAa,WAAW,UAAqB,MAAM,aAAa;AAChE,MAAa,gBAAgB,EAAE,cAAc,EAAE,aAAa,CAAC,UAAqB,WAAW;AAC7F,MAAa,kBAAkB,UAAqB,MAAM,aAAa;AACvE,MAAa,oBAAoB,UAAqB,MAAM,aAAa,SAAS;AAClF,MAAa,yBAAyB,UAAqB,MAAM,aAAa,SAAS;AAEvF,MAAa,6BAAA,GAA4BA,iBAAAA,eAAAA,CAAe,CAAC,uBAAuB,IAAG,iBACjF,aAAa,QAAO,gBAAe,YAAY,MAAMC,kBAAAA,kBAAkB,YAAY,SAAS,EAAE,UAAU,CAC1G;AACA,MAAa,wBAAwB,UAAq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IAAI;GACJ,WAAW;GACX,OAAO,MAAM;GACb,SAAS,MAAM;GACf,MAAM;GACN,WAAW,KAAK,IAAI,MAAM,QAAQ,MAAM,eAAe,CAAC;GACxD,cAAc,MAAM,UAAU,MAAM,MAAM,SAAS,MAAM;EAC3D;EACA,OAAO;CACT,GAAG,MAAM;AACX;AACA,MAAM,uBAAA,GAAsBF,iBAAAA,eAAAA,CAAe,CAAC,eAAe,IAAI,EAAE,oBAAoB,oBAAoB,aAAa,CAAC;AACvH,MAAa,oBAAA,GAAmBA,iBAAAA,eAAAA,CAAe,CAAC,mBAAmB,IAAI,EAAE,eAAe,QAAQ;AAChG,MAAa,eAAA,GAAcA,iBAAAA,eAAAA,CAAe,CAAC,mBAAmB,IAAI,EAAE,aAAa,MAAM;AACvF,MAAa,2BAAA,GAA0BA,iBAAAA,eAAAA,CAAe,CAAC,cAAc,IAAG,gBAAe;CACrF,GAAG;CACH,SAAS,WAAW,QAAQ,KAAI,YAAW;EACzC,GAAG;EACH,eAAe,oBAAoB,OAAO,eAAe,IAAI,CAAC,CAAC;CACjE,EAAE;AACJ,EAAE"}
@@ -1,13 +1,13 @@
1
- import { o as UserSliceType } from "../index-Cf6_W5Y7.cjs";
2
- import { a as ReleaseSliceType } from "../index-ExguKUh-.cjs";
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-B80ckxiy.cjs";
1
+ import { o as UserSliceType } from "../index-CqhXqGLt.cjs";
2
+ import { a as ReleaseSliceType } from "../index-fGVC5s1C.cjs";
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-B67YW1jV.cjs";
4
4
  import { n as OnboardingSliceType } from "../index-CoObjWL4.cjs";
5
5
  import { o as DeploymentsSliceType } from "../index-mvxjivTJ.cjs";
6
- import { c as DeviceSliceType } from "../index-DnKVKM0G.cjs";
7
- import { t as AppSliceType } from "../index-DeOpb2oK.cjs";
8
- import { t as MonitorSliceType } from "../index-Ctj2r57a.cjs";
9
- import { t as OrganizationSliceType } from "../index-C_LGDJN2.cjs";
10
- import { r as RootState } from "../store-C-W8nPdd.cjs";
6
+ import { c as DeviceSliceType } from "../index-KxRmyFLr.cjs";
7
+ import { t as AppSliceType } from "../index-BKU1G9-x.cjs";
8
+ import { t as MonitorSliceType } from "../index-BfmRpbiJ.cjs";
9
+ import { t as OrganizationSliceType } from "../index-HjOSTTGF.cjs";
10
+ import { r as RootState } from "../store-Dw8Uo_Df.cjs";
11
11
  //#region src/organizationSlice/selectors.d.ts
12
12
  declare const getOrganization: (state: RootState) => Partial<Organization>;
13
13
  declare const getProducts: (state: RootState) => ProductConfig | undefined;
@@ -21,7 +21,7 @@ declare const getCard: (state: RootState) => Card;
21
21
  declare const getSsoConfig: ({ organization: { ssoConfigs } }: RootState) => SSOConfig;
22
22
  declare const getTenantsList: (state: RootState) => TenantList;
23
23
  declare const getWebhookEvents: (state: RootState) => import("@northern.tech/types/types.gen").Event[];
24
- declare const getWebhookEventTotal: (state: RootState) => number;
24
+ declare const getWebhookEventsTotal: (state: RootState) => number;
25
25
  declare const getDeviceTwinIntegrations: ((state: {
26
26
  app: AppSliceType;
27
27
  devices: DeviceSliceType;
@@ -94,7 +94,7 @@ declare const getWebhookEventInfo: ((state: {
94
94
  users: UserSliceType;
95
95
  }) => {
96
96
  events: import("@northern.tech/types/types.gen").Event[];
97
- eventTotal: number;
97
+ eventsTotal: number;
98
98
  }) & {
99
99
  clearCache: () => void;
100
100
  resultsCount: () => number;
@@ -102,11 +102,11 @@ declare const getWebhookEventInfo: ((state: {
102
102
  } & {
103
103
  resultFunc: (resultFuncArgs_0: import("@northern.tech/types/types.gen").Integration[], resultFuncArgs_1: import("@northern.tech/types/types.gen").Event[], resultFuncArgs_2: number) => {
104
104
  events: import("@northern.tech/types/types.gen").Event[];
105
- eventTotal: number;
105
+ eventsTotal: number;
106
106
  };
107
107
  memoizedResultFunc: ((resultFuncArgs_0: import("@northern.tech/types/types.gen").Integration[], resultFuncArgs_1: import("@northern.tech/types/types.gen").Event[], resultFuncArgs_2: number) => {
108
108
  events: import("@northern.tech/types/types.gen").Event[];
109
- eventTotal: number;
109
+ eventsTotal: number;
110
110
  }) & {
111
111
  clearCache: () => void;
112
112
  resultsCount: () => number;
@@ -114,7 +114,7 @@ declare const getWebhookEventInfo: ((state: {
114
114
  };
115
115
  lastResult: () => {
116
116
  events: import("@northern.tech/types/types.gen").Event[];
117
- eventTotal: number;
117
+ eventsTotal: number;
118
118
  };
119
119
  dependencies: [((state: {
120
120
  app: AppSliceType;
@@ -469,5 +469,5 @@ declare const getTenantListWithLimits: ((state: {
469
469
  argsMemoize: typeof import("reselect").weakMapMemoize;
470
470
  };
471
471
  //#endregion
472
- export { getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogState, getBillingProfile, getCard, getDeviceTwinIntegrations, getDisabledTiers, getExternalIntegrations, getIsServiceProvider, getOrganization, getProducts, getSpLimits, getSsoConfig, getSubscription, getTenantListWithLimits, getTenantsList, getWebhookEventInfo, getWebhookEventTotal, getWebhookEvents, getWebhooks };
472
+ export { getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogState, getBillingProfile, getCard, getDeviceTwinIntegrations, getDisabledTiers, getExternalIntegrations, getIsServiceProvider, getOrganization, getProducts, getSpLimits, getSsoConfig, getSubscription, getTenantListWithLimits, getTenantsList, getWebhookEventInfo, getWebhookEvents, getWebhookEventsTotal, getWebhooks };
473
473
  //# sourceMappingURL=selectors.d.cts.map
@@ -1,13 +1,13 @@
1
- import { o as UserSliceType } from "../index-DgiMpzq3.js";
2
- import { a as ReleaseSliceType } from "../index-CGT1O9T5.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-B3qGQoMx.js";
1
+ import { o as UserSliceType } from "../index--SKVGToc.js";
2
+ import { a as ReleaseSliceType } from "../index-BMsafOyJ.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-DY0J79yF.js";
4
4
  import { n as OnboardingSliceType } from "../index-CoObjWL4.js";
5
5
  import { o as DeploymentsSliceType } from "../index-B8td4-rY.js";
6
- import { c as DeviceSliceType } from "../index-BpamudGf.js";
7
- import { t as AppSliceType } from "../index-Bs0c1-WY.js";
8
- import { t as MonitorSliceType } from "../index-BAGyeC-q.js";
9
- import { t as OrganizationSliceType } from "../index-ChKTa1aL.js";
10
- import { r as RootState } from "../store-CmvNnqoc.js";
6
+ import { c as DeviceSliceType } from "../index-D9GJhX1I.js";
7
+ import { t as AppSliceType } from "../index-xxqlerg5.js";
8
+ import { t as MonitorSliceType } from "../index-CRqnH_go.js";
9
+ import { t as OrganizationSliceType } from "../index-BVNS-Aut.js";
10
+ import { r as RootState } from "../store-DLp6ajT8.js";
11
11
  //#region src/organizationSlice/selectors.d.ts
12
12
  declare const getOrganization: (state: RootState) => Partial<Organization>;
13
13
  declare const getProducts: (state: RootState) => ProductConfig | undefined;
@@ -21,7 +21,7 @@ declare const getCard: (state: RootState) => Card;
21
21
  declare const getSsoConfig: ({ organization: { ssoConfigs } }: RootState) => SSOConfig;
22
22
  declare const getTenantsList: (state: RootState) => TenantList;
23
23
  declare const getWebhookEvents: (state: RootState) => import("@northern.tech/types/types.gen").Event[];
24
- declare const getWebhookEventTotal: (state: RootState) => number;
24
+ declare const getWebhookEventsTotal: (state: RootState) => number;
25
25
  declare const getDeviceTwinIntegrations: ((state: {
26
26
  app: AppSliceType;
27
27
  devices: DeviceSliceType;
@@ -94,7 +94,7 @@ declare const getWebhookEventInfo: ((state: {
94
94
  users: UserSliceType;
95
95
  }) => {
96
96
  events: import("@northern.tech/types/types.gen").Event[];
97
- eventTotal: number;
97
+ eventsTotal: number;
98
98
  }) & {
99
99
  clearCache: () => void;
100
100
  resultsCount: () => number;
@@ -102,11 +102,11 @@ declare const getWebhookEventInfo: ((state: {
102
102
  } & {
103
103
  resultFunc: (resultFuncArgs_0: import("@northern.tech/types/types.gen").Integration[], resultFuncArgs_1: import("@northern.tech/types/types.gen").Event[], resultFuncArgs_2: number) => {
104
104
  events: import("@northern.tech/types/types.gen").Event[];
105
- eventTotal: number;
105
+ eventsTotal: number;
106
106
  };
107
107
  memoizedResultFunc: ((resultFuncArgs_0: import("@northern.tech/types/types.gen").Integration[], resultFuncArgs_1: import("@northern.tech/types/types.gen").Event[], resultFuncArgs_2: number) => {
108
108
  events: import("@northern.tech/types/types.gen").Event[];
109
- eventTotal: number;
109
+ eventsTotal: number;
110
110
  }) & {
111
111
  clearCache: () => void;
112
112
  resultsCount: () => number;
@@ -114,7 +114,7 @@ declare const getWebhookEventInfo: ((state: {
114
114
  };
115
115
  lastResult: () => {
116
116
  events: import("@northern.tech/types/types.gen").Event[];
117
- eventTotal: number;
117
+ eventsTotal: number;
118
118
  };
119
119
  dependencies: [((state: {
120
120
  app: AppSliceType;
@@ -469,5 +469,5 @@ declare const getTenantListWithLimits: ((state: {
469
469
  argsMemoize: typeof import("reselect").weakMapMemoize;
470
470
  };
471
471
  //#endregion
472
- export { getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogState, getBillingProfile, getCard, getDeviceTwinIntegrations, getDisabledTiers, getExternalIntegrations, getIsServiceProvider, getOrganization, getProducts, getSpLimits, getSsoConfig, getSubscription, getTenantListWithLimits, getTenantsList, getWebhookEventInfo, getWebhookEventTotal, getWebhookEvents, getWebhooks };
472
+ export { getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogState, getBillingProfile, getCard, getDeviceTwinIntegrations, getDisabledTiers, getExternalIntegrations, getIsServiceProvider, getOrganization, getProducts, getSpLimits, getSsoConfig, getSubscription, getTenantListWithLimits, getTenantsList, getWebhookEventInfo, getWebhookEvents, getWebhookEventsTotal, getWebhooks };
473
473
  //# sourceMappingURL=selectors.d.ts.map
@@ -1,4 +1,4 @@
1
- import { Bt as productOrder, jt as EXTERNAL_PROVIDER } from "../constants-eWaA3HCq.js";
1
+ import { Bt as productOrder, jt as EXTERNAL_PROVIDER } from "../constants-D5hACLhF.js";
2
2
  import { createSelector } from "@reduxjs/toolkit";
3
3
  //#region src/organizationSlice/selectors.ts
4
4
  const getOrganization = (state) => state.organization.organization;
@@ -13,20 +13,20 @@ const getCard = (state) => state.organization.card;
13
13
  const getSsoConfig = ({ organization: { ssoConfigs = [] } }) => ssoConfigs[0];
14
14
  const getTenantsList = (state) => state.organization.tenantList;
15
15
  const getWebhookEvents = (state) => state.organization.webhooks.events;
16
- const getWebhookEventTotal = (state) => state.organization.webhooks.eventsTotal;
16
+ const getWebhookEventsTotal = (state) => state.organization.webhooks.eventsTotal;
17
17
  const getDeviceTwinIntegrations = createSelector([getExternalIntegrations], (integrations) => integrations.filter((integration) => integration.id && EXTERNAL_PROVIDER[integration.provider]?.deviceTwin));
18
18
  const getIsServiceProvider = (state) => state.organization.organization.service_provider;
19
19
  const getWebhooks = createSelector([getExternalIntegrations], (integrations) => integrations.filter((integration) => integration.id && integration.provider === EXTERNAL_PROVIDER.webhook.provider));
20
20
  const getWebhookEventInfo = createSelector([
21
21
  getWebhooks,
22
22
  getWebhookEvents,
23
- getWebhookEventTotal
24
- ], (webhooks, events, eventTotal) => webhooks.length ? {
23
+ getWebhookEventsTotal
24
+ ], (webhooks, events, eventsTotal) => webhooks.length ? {
25
25
  events,
26
- eventTotal
26
+ eventsTotal
27
27
  } : {
28
28
  events: [],
29
- eventTotal: 0
29
+ eventsTotal: 0
30
30
  });
31
31
  const getAuditLogEntry = createSelector([getAuditLog, getAuditLogSelectionState], (events, { selectedId }) => {
32
32
  if (!selectedId) return;
@@ -75,6 +75,6 @@ const getTenantListWithLimits = createSelector([getTenantsList], (tenantList) =>
75
75
  }))
76
76
  }));
77
77
  //#endregion
78
- export { getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogState, getBillingProfile, getCard, getDeviceTwinIntegrations, getDisabledTiers, getExternalIntegrations, getIsServiceProvider, getOrganization, getProducts, getSpLimits, getSsoConfig, getSubscription, getTenantListWithLimits, getTenantsList, getWebhookEventInfo, getWebhookEventTotal, getWebhookEvents, getWebhooks };
78
+ export { getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogState, getBillingProfile, getCard, getDeviceTwinIntegrations, getDisabledTiers, getExternalIntegrations, getIsServiceProvider, getOrganization, getProducts, getSpLimits, getSsoConfig, getSubscription, getTenantListWithLimits, getTenantsList, getWebhookEventInfo, getWebhookEvents, getWebhookEventsTotal, getWebhooks };
79
79
 
80
80
  //# sourceMappingURL=selectors.js.map
@@ -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: processDeviceLimits(tenant.device_limits, true).limits\n }))\n}));\n"],"mappings":";;;AAmBA,MAAa,mBAAmB,UAAqB,MAAM,aAAa;AACxE,MAAa,eAAe,UAAqB,MAAM,aAAa;AACpE,MAAa,2BAA2B,UAAqB,MAAM,aAAa;AAChF,MAAa,oBAAoB,UAAqB,MAAM,aAAa,SAAS;AAClF,MAAa,eAAe,UAAqB,MAAM,aAAa,SAAS;AAC7E,MAAa,6BAA6B,UAAqB,MAAM,aAAa,SAAS;AAC3F,MAAa,qBAAqB,UAAqB,MAAM,aAAa,aAAa;AACvF,MAAa,mBAAmB,UAAqB,MAAM,aAAa,aAAa;AACrF,MAAa,WAAW,UAAqB,MAAM,aAAa;AAChE,MAAa,gBAAgB,EAAE,cAAc,EAAE,aAAa,CAAC,UAAqB,WAAW;AAC7F,MAAa,kBAAkB,UAAqB,MAAM,aAAa;AACvE,MAAa,oBAAoB,UAAqB,MAAM,aAAa,SAAS;AAClF,MAAa,wBAAwB,UAAqB,MAAM,aAAa,SAAS;AAEtF,MAAa,4BAA4B,eAAe,CAAC,uBAAuB,IAAG,iBACjF,aAAa,QAAO,gBAAe,YAAY,MAAM,kBAAkB,YAAY,SAAS,EAAE,UAAU,CAC1G;AACA,MAAa,wBAAwB,UAAqB,MAAM,aAAa,aAAa;AAE1F,MAAa,cAAc,eAAe,CAAC,uBAAuB,IAAG,iBACnE,aAAa,QAAO,gBAAe,YAAY,MAAM,YAAY,aAAa,kBAAkB,QAAQ,QAAQ,CAClH;AACA,MAAa,sBAAsB,eAAe;CAAC;CAAa;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Aa,CAAC;AACvH,MAAa,mBAAmB,eAAe,CAAC,mBAAmB,IAAI,EAAE,eAAe,QAAQ;AAChG,MAAa,cAAc,eAAe,CAAC,mBAAmB,IAAI,EAAE,aAAa,MAAM;AACvF,MAAa,0BAA0B,eAAe,CAAC,cAAc,IAAG,gBAAe;CACrF,GAAG;CACH,SAAS,WAAW,QAAQ,KAAI,YAAW;EACzC,GAAG;EACH,eAAe,oBAAoB,OAAO,eAAe,IAAI,CAAC,CAAC;CACjE,EAAE;AACJ,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 getWebhookEventsTotal = (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, getWebhookEventsTotal], (webhooks, events, eventsTotal) =>\n webhooks.length ? { events, eventsTotal } : { events: [], eventsTotal: 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,MAAa,2BAA2B,UAAqB,MAAM,aAAa;AAChF,MAAa,oBAAoB,UAAqB,MAAM,aAAa,SAAS;AAClF,MAAa,eAAe,UAAqB,MAAM,aAAa,SAAS;AAC7E,MAAa,6BAA6B,UAAqB,MAAM,aAAa,SAAS;AAC3F,MAAa,qBAAqB,UAAqB,MAAM,aAAa,aAAa;AACvF,MAAa,mBAAmB,UAAqB,MAAM,aAAa,aAAa;AACrF,MAAa,WAAW,UAAqB,MAAM,aAAa;AAChE,MAAa,gBAAgB,EAAE,cAAc,EAAE,aAAa,CAAC,UAAqB,WAAW;AAC7F,MAAa,kBAAkB,UAAqB,MAAM,aAAa;AACvE,MAAa,oBAAoB,UAAqB,MAAM,aAAa,SAAS;AAClF,MAAa,yBAAyB,UAAqB,MAAM,aAAa,SAAS;AAEvF,MAAa,4BAA4B,eAAe,CAAC,uBAAuB,IAAG,iBACjF,aAAa,QAAO,gBAAe,YAAY,MAAM,kBAAkB,YAAY,SAAS,EAAE,UAAU,CAC1G;AACA,MAAa,wBAAwB,UAAqB,MAAM,aAAa,aAAa;AAE1F,MAAa,cAAc,eAAe,CAAC,uBAAuB,IAAG,iBACnE,aAAa,QAAO,gBAAe,YAAY,MAAM,YAAY,aAAa,kBAAkB,QAAQ,QAAQ,CAClH;AACA,MAAa,sBAAsB,eAAe;CAAC;CAAa;CAAkB;AAAqB,IAAI,UAAU,QAAQ,gBAC3H,SAAS,SAAS;CAAE;CAAQ;AAAY,IAAI;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