@northern.tech/store 0.46.1 → 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 (145) 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.d.cts +1 -1
  18. package/dist/auth.d.ts +1 -1
  19. package/dist/auth.js +1 -1
  20. package/dist/commonConstants.d.cts +1 -1
  21. package/dist/commonConstants.d.ts +1 -1
  22. package/dist/commonConstants.js +1 -1
  23. package/dist/commonSelectors.d.cts +9 -9
  24. package/dist/commonSelectors.d.ts +9 -9
  25. package/dist/commonSelectors.js +1 -1
  26. package/dist/{constants-B_H4squx.d.ts → constants-BJuY-ODE.d.ts} +3 -3
  27. package/dist/{constants-Rl3FJzFf.d.cts → constants-C2O55iZu.d.cts} +3 -3
  28. package/dist/{constants-eWaA3HCq.js → constants-D5hACLhF.js} +3 -3
  29. package/dist/{constants-eWaA3HCq.js.map → constants-D5hACLhF.js.map} +1 -1
  30. package/dist/constants.cjs +1 -1
  31. package/dist/constants.d.cts +2 -2
  32. package/dist/constants.d.ts +2 -2
  33. package/dist/constants.js +2 -2
  34. package/dist/deploymentsSlice/constants.js +1 -1
  35. package/dist/deploymentsSlice/index.js +1 -1
  36. package/dist/deploymentsSlice/selectors.d.cts +7 -7
  37. package/dist/deploymentsSlice/selectors.d.ts +7 -7
  38. package/dist/deploymentsSlice/selectors.js +1 -1
  39. package/dist/deploymentsSlice/thunks.d.cts +4 -4
  40. package/dist/deploymentsSlice/thunks.d.ts +4 -4
  41. package/dist/devicesSlice/constants.d.cts +1 -1
  42. package/dist/devicesSlice/constants.d.ts +1 -1
  43. package/dist/devicesSlice/constants.js +1 -1
  44. package/dist/devicesSlice/index.d.cts +1 -1
  45. package/dist/devicesSlice/index.d.ts +1 -1
  46. package/dist/devicesSlice/index.js +1 -1
  47. package/dist/devicesSlice/mocks.js +1 -1
  48. package/dist/devicesSlice/selectors.d.cts +7 -7
  49. package/dist/devicesSlice/selectors.d.ts +7 -7
  50. package/dist/devicesSlice/selectors.js +1 -1
  51. package/dist/devicesSlice/thunks.d.cts +4 -4
  52. package/dist/devicesSlice/thunks.d.ts +4 -4
  53. package/dist/{index-DgiMpzq3.d.ts → index--SKVGToc.d.ts} +2 -2
  54. package/dist/{index-DeOpb2oK.d.cts → index-BKU1G9-x.d.cts} +2 -2
  55. package/dist/{index-CGT1O9T5.d.ts → index-BMsafOyJ.d.ts} +2 -2
  56. package/dist/{index-ChKTa1aL.d.ts → index-BVNS-Aut.d.ts} +2 -2
  57. package/dist/{index-Ctj2r57a.d.cts → index-BfmRpbiJ.d.cts} +2 -2
  58. package/dist/{index-BAGyeC-q.d.ts → index-CRqnH_go.d.ts} +2 -2
  59. package/dist/{index-Cf6_W5Y7.d.cts → index-CqhXqGLt.d.cts} +2 -2
  60. package/dist/{index-BpamudGf.d.ts → index-D9GJhX1I.d.ts} +2 -2
  61. package/dist/{index-C_LGDJN2.d.cts → index-HjOSTTGF.d.cts} +2 -2
  62. package/dist/{index-DnKVKM0G.d.cts → index-KxRmyFLr.d.cts} +2 -2
  63. package/dist/{index-ExguKUh-.d.cts → index-fGVC5s1C.d.cts} +2 -2
  64. package/dist/{index-Bs0c1-WY.d.ts → index-xxqlerg5.d.ts} +2 -2
  65. package/dist/locationutils.d.cts +2 -2
  66. package/dist/locationutils.d.ts +2 -2
  67. package/dist/locationutils.js +1 -1
  68. package/dist/monitorSlice/constants.d.cts +1 -1
  69. package/dist/monitorSlice/constants.d.ts +1 -1
  70. package/dist/monitorSlice/index.d.cts +1 -1
  71. package/dist/monitorSlice/index.d.ts +1 -1
  72. package/dist/monitorSlice/index.js +1 -1
  73. package/dist/monitorSlice/mocks.d.cts +1 -1
  74. package/dist/monitorSlice/mocks.d.ts +1 -1
  75. package/dist/monitorSlice/mocks.js +1 -1
  76. package/dist/monitorSlice/selectors.d.cts +1 -1
  77. package/dist/monitorSlice/selectors.d.ts +1 -1
  78. package/dist/monitorSlice/thunks.d.cts +4 -4
  79. package/dist/monitorSlice/thunks.d.ts +4 -4
  80. package/dist/monitorSlice/thunks.js +1 -1
  81. package/dist/onboardingSlice/selectors.d.cts +1 -1
  82. package/dist/onboardingSlice/selectors.d.ts +1 -1
  83. package/dist/onboardingSlice/thunks.d.cts +3 -3
  84. package/dist/onboardingSlice/thunks.d.ts +3 -3
  85. package/dist/organizationSlice/constants.js +1 -1
  86. package/dist/organizationSlice/index.d.cts +1 -1
  87. package/dist/organizationSlice/index.d.ts +1 -1
  88. package/dist/organizationSlice/index.js +1 -1
  89. package/dist/organizationSlice/mocks.d.cts +2 -2
  90. package/dist/organizationSlice/mocks.d.ts +2 -2
  91. package/dist/organizationSlice/mocks.js +1 -1
  92. package/dist/organizationSlice/selectors.cjs +6 -6
  93. package/dist/organizationSlice/selectors.cjs.map +1 -1
  94. package/dist/organizationSlice/selectors.d.cts +14 -14
  95. package/dist/organizationSlice/selectors.d.ts +14 -14
  96. package/dist/organizationSlice/selectors.js +7 -7
  97. package/dist/organizationSlice/selectors.js.map +1 -1
  98. package/dist/organizationSlice/thunks.d.cts +18 -16
  99. package/dist/organizationSlice/thunks.d.ts +18 -16
  100. package/dist/organizationSlice/types.d.cts +1 -1
  101. package/dist/organizationSlice/types.d.ts +1 -1
  102. package/dist/releasesSlice/index.d.cts +1 -1
  103. package/dist/releasesSlice/index.d.ts +1 -1
  104. package/dist/releasesSlice/index.js +1 -1
  105. package/dist/releasesSlice/mocks.js +1 -1
  106. package/dist/releasesSlice/selectors.d.cts +7 -7
  107. package/dist/releasesSlice/selectors.d.ts +7 -7
  108. package/dist/releasesSlice/thunks.d.cts +4 -4
  109. package/dist/releasesSlice/thunks.d.ts +4 -4
  110. package/dist/releasesSlice/thunks.js +1 -1
  111. package/dist/selectors.cjs +1 -1
  112. package/dist/selectors.d.cts +2 -2
  113. package/dist/selectors.d.ts +2 -2
  114. package/dist/selectors.js +2 -2
  115. package/dist/sockethook.js +1 -1
  116. package/dist/{store-CmvNnqoc.d.ts → store-DLp6ajT8.d.ts} +9 -9
  117. package/dist/{store-C-W8nPdd.d.cts → store-Dw8Uo_Df.d.cts} +9 -9
  118. package/dist/store.d.cts +1 -1
  119. package/dist/store.d.ts +1 -1
  120. package/dist/store.js +1 -1
  121. package/dist/storehooks.d.cts +2 -2
  122. package/dist/storehooks.d.ts +2 -2
  123. package/dist/storehooks.js +1 -1
  124. package/dist/thunks.cjs +7 -4
  125. package/dist/thunks.cjs.map +1 -1
  126. package/dist/thunks.js +8 -5
  127. package/dist/thunks.js.map +1 -1
  128. package/dist/{types-B80ckxiy.d.cts → types-B67YW1jV.d.cts} +2 -2
  129. package/dist/{types-B3qGQoMx.d.ts → types-DY0J79yF.d.ts} +2 -2
  130. package/dist/usersSlice/constants.js +1 -1
  131. package/dist/usersSlice/index.d.cts +1 -1
  132. package/dist/usersSlice/index.d.ts +1 -1
  133. package/dist/usersSlice/index.js +1 -1
  134. package/dist/usersSlice/mocks.d.cts +1 -1
  135. package/dist/usersSlice/mocks.d.ts +1 -1
  136. package/dist/usersSlice/mocks.js +1 -1
  137. package/dist/usersSlice/selectors.d.cts +7 -7
  138. package/dist/usersSlice/selectors.d.ts +7 -7
  139. package/dist/usersSlice/selectors.js +1 -1
  140. package/dist/usersSlice/thunks.d.cts +40 -40
  141. package/dist/usersSlice/thunks.d.ts +4 -4
  142. package/dist/utils.d.cts +1 -1
  143. package/dist/utils.d.ts +1 -1
  144. package/dist/utils.js +1 -1
  145. package/package.json +2 -2
@@ -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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E,kBAAAA,aAAa,QAAQ,MAAM,aAAa;EAC7C,MAAM,QAAQ,YAAY;EAC1B,IAAI,CAAC,OAAO,OAAO;EACnB,MAAM,EAAE,KAAK,UAAU;EACvB,IAAI,MAAM,UAAU,GAAG;GACrB,KAAK,SAAS,KAAK,QAAQ;GAC3B,IAAI,CAAC,YAAY,OAAO;EAC1B;EACA,KAAK,OAAO,YAAY;GACtB,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
+ {"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,a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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;AACv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,EAAE,KAAK,UAAU;EACvB,IAAI,MAAM,UAAU,GAAG;GACrB,KAAK,SAAS,KAAK,QAAQ;GAC3B,IAAI,CAAC,YAAY,OAAO;EAC1B;EACA,KAAK,OAAO,YAAY;GACtB,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,sBAAsB,eAAe,CAAC,eAAe,IAAI,EAAE,oBAAoB,oBAAoB,aAAa,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,aAA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Q;GAC3B,IAAI,CAAC,YAAY,OAAO;EAC1B;EACA,KAAK,OAAO,YAAY;GACtB,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,sBAAsB,eAAe,CAAC,eAAe,IAAI,EAAE,oBAAoB,oBAAoB,aAAa,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,9 +1,9 @@
1
1
  import { _ as locations, a as AvailablePlans } from "../constants-nKSWZ8oD.cjs";
2
- import { T as SortOptions, g as PaginationOptions } from "../constants-Rl3FJzFf.cjs";
2
+ import { T as SortOptions, g as PaginationOptions } from "../constants-C2O55iZu.cjs";
3
3
  import { n as ContentType } from "../constants-OZiiFKiA.cjs";
4
- import { d as TenantList, i as Organization, l as SSOConfig, n as AuditLogSelectionState, o as ProductConfig, r as Card } from "../types-B80ckxiy.cjs";
5
- import { i as SnackbarContent } from "../index-DeOpb2oK.cjs";
6
- import { r as RootState, t as AppDispatch } from "../store-C-W8nPdd.cjs";
4
+ import { d as TenantList, i as Organization, l as SSOConfig, n as AuditLogSelectionState, o as ProductConfig, r as Card } from "../types-B67YW1jV.cjs";
5
+ import { i as SnackbarContent } from "../index-BKU1G9-x.cjs";
6
+ import { r as RootState, t as AppDispatch } from "../store-Dw8Uo_Df.cjs";
7
7
  import { BillingProfile, Integration, NewTenantTypeManagement, PreviewRequest, Product, ProductInfo, Subscription, SupportRequest, UpdateChildTenant } from "@northern.tech/types/MenderTypes";
8
8
  //#region src/organizationSlice/thunks.d.ts
9
9
  declare const cancelRequest: import("@reduxjs/toolkit").AsyncThunk<{
@@ -123,11 +123,7 @@ declare const completeUpgrade: import("@reduxjs/toolkit").AsyncThunk<[import("@r
123
123
  arg: void;
124
124
  requestId: string;
125
125
  requestStatus: "fulfilled";
126
- }, never>, import("@reduxjs/toolkit").PayloadAction<import("redux").UnknownAction[], string, {
127
- arg: void;
128
- requestId: string;
129
- requestStatus: "fulfilled";
130
- }, never> | import("@reduxjs/toolkit").PayloadAction<unknown, string, {
126
+ }, never>, import("@reduxjs/toolkit").PayloadAction<unknown, string, {
131
127
  arg: void;
132
128
  requestId: string;
133
129
  requestStatus: "rejected";
@@ -137,7 +133,11 @@ declare const completeUpgrade: import("@reduxjs/toolkit").AsyncThunk<[import("@r
137
133
  rejectedWithValue: true;
138
134
  } | ({
139
135
  rejectedWithValue: false;
140
- } & {})), import("@reduxjs/toolkit").SerializedError>], completeUpgradePayload, {
136
+ } & {})), import("@reduxjs/toolkit").SerializedError> | import("@reduxjs/toolkit").PayloadAction<import("redux").UnknownAction[], string, {
137
+ arg: void;
138
+ requestId: string;
139
+ requestStatus: "fulfilled";
140
+ }, never>], completeUpgradePayload, {
141
141
  dispatch: AppDispatch;
142
142
  state: RootState;
143
143
  extra?: unknown;
@@ -426,11 +426,7 @@ declare const requestPlanUpgrade: import("@reduxjs/toolkit").AsyncThunk<[import(
426
426
  arg: void;
427
427
  requestId: string;
428
428
  requestStatus: "fulfilled";
429
- }, never>, import("@reduxjs/toolkit").PayloadAction<import("redux").UnknownAction[], string, {
430
- arg: void;
431
- requestId: string;
432
- requestStatus: "fulfilled";
433
- }, never> | import("@reduxjs/toolkit").PayloadAction<unknown, string, {
429
+ }, never>, import("@reduxjs/toolkit").PayloadAction<unknown, string, {
434
430
  arg: void;
435
431
  requestId: string;
436
432
  requestStatus: "rejected";
@@ -440,7 +436,11 @@ declare const requestPlanUpgrade: import("@reduxjs/toolkit").AsyncThunk<[import(
440
436
  rejectedWithValue: true;
441
437
  } | ({
442
438
  rejectedWithValue: false;
443
- } & {})), import("@reduxjs/toolkit").SerializedError>], {
439
+ } & {})), import("@reduxjs/toolkit").SerializedError> | import("@reduxjs/toolkit").PayloadAction<import("redux").UnknownAction[], string, {
440
+ arg: void;
441
+ requestId: string;
442
+ requestStatus: "fulfilled";
443
+ }, never>], {
444
444
  plan: string;
445
445
  products: Product[];
446
446
  }, {
@@ -585,7 +585,9 @@ declare const getIntegrations: import("@reduxjs/toolkit").AsyncThunk<{
585
585
  rejectedMeta?: unknown;
586
586
  }>;
587
587
  type GetWebhookEventsPayload = {
588
+ integrationId?: string;
588
589
  isFollowUp?: boolean;
590
+ knownTotal?: number;
589
591
  page?: number;
590
592
  perPage?: number;
591
593
  };
@@ -1,9 +1,9 @@
1
1
  import { _ as locations, a as AvailablePlans } from "../constants-nKSWZ8oD.js";
2
- import { T as SortOptions, g as PaginationOptions } from "../constants-B_H4squx.js";
2
+ import { T as SortOptions, g as PaginationOptions } from "../constants-BJuY-ODE.js";
3
3
  import { n as ContentType } from "../constants-OZiiFKiA.js";
4
- import { d as TenantList, i as Organization, l as SSOConfig, n as AuditLogSelectionState, o as ProductConfig, r as Card } from "../types-B3qGQoMx.js";
5
- import { i as SnackbarContent } from "../index-Bs0c1-WY.js";
6
- import { r as RootState, t as AppDispatch } from "../store-CmvNnqoc.js";
4
+ import { d as TenantList, i as Organization, l as SSOConfig, n as AuditLogSelectionState, o as ProductConfig, r as Card } from "../types-DY0J79yF.js";
5
+ import { i as SnackbarContent } from "../index-xxqlerg5.js";
6
+ import { r as RootState, t as AppDispatch } from "../store-DLp6ajT8.js";
7
7
  import { BillingProfile, Integration, NewTenantTypeManagement, PreviewRequest, Product, ProductInfo, Subscription, SupportRequest, UpdateChildTenant } from "@northern.tech/types/MenderTypes";
8
8
  //#region src/organizationSlice/thunks.d.ts
9
9
  declare const cancelRequest: import("@reduxjs/toolkit").AsyncThunk<{
@@ -123,11 +123,7 @@ declare const completeUpgrade: import("@reduxjs/toolkit").AsyncThunk<[import("@r
123
123
  arg: void;
124
124
  requestId: string;
125
125
  requestStatus: "fulfilled";
126
- }, never>, import("@reduxjs/toolkit").PayloadAction<import("redux").UnknownAction[], string, {
127
- arg: void;
128
- requestId: string;
129
- requestStatus: "fulfilled";
130
- }, never> | import("@reduxjs/toolkit").PayloadAction<unknown, string, {
126
+ }, never>, import("@reduxjs/toolkit").PayloadAction<unknown, string, {
131
127
  arg: void;
132
128
  requestId: string;
133
129
  requestStatus: "rejected";
@@ -137,7 +133,11 @@ declare const completeUpgrade: import("@reduxjs/toolkit").AsyncThunk<[import("@r
137
133
  rejectedWithValue: true;
138
134
  } | ({
139
135
  rejectedWithValue: false;
140
- } & {})), import("@reduxjs/toolkit").SerializedError>], completeUpgradePayload, {
136
+ } & {})), import("@reduxjs/toolkit").SerializedError> | import("@reduxjs/toolkit").PayloadAction<import("redux").UnknownAction[], string, {
137
+ arg: void;
138
+ requestId: string;
139
+ requestStatus: "fulfilled";
140
+ }, never>], completeUpgradePayload, {
141
141
  dispatch: AppDispatch;
142
142
  state: RootState;
143
143
  extra?: unknown;
@@ -426,11 +426,7 @@ declare const requestPlanUpgrade: import("@reduxjs/toolkit").AsyncThunk<[import(
426
426
  arg: void;
427
427
  requestId: string;
428
428
  requestStatus: "fulfilled";
429
- }, never>, import("@reduxjs/toolkit").PayloadAction<import("redux").UnknownAction[], string, {
430
- arg: void;
431
- requestId: string;
432
- requestStatus: "fulfilled";
433
- }, never> | import("@reduxjs/toolkit").PayloadAction<unknown, string, {
429
+ }, never>, import("@reduxjs/toolkit").PayloadAction<unknown, string, {
434
430
  arg: void;
435
431
  requestId: string;
436
432
  requestStatus: "rejected";
@@ -440,7 +436,11 @@ declare const requestPlanUpgrade: import("@reduxjs/toolkit").AsyncThunk<[import(
440
436
  rejectedWithValue: true;
441
437
  } | ({
442
438
  rejectedWithValue: false;
443
- } & {})), import("@reduxjs/toolkit").SerializedError>], {
439
+ } & {})), import("@reduxjs/toolkit").SerializedError> | import("@reduxjs/toolkit").PayloadAction<import("redux").UnknownAction[], string, {
440
+ arg: void;
441
+ requestId: string;
442
+ requestStatus: "fulfilled";
443
+ }, never>], {
444
444
  plan: string;
445
445
  products: Product[];
446
446
  }, {
@@ -585,7 +585,9 @@ declare const getIntegrations: import("@reduxjs/toolkit").AsyncThunk<{
585
585
  rejectedMeta?: unknown;
586
586
  }>;
587
587
  type GetWebhookEventsPayload = {
588
+ integrationId?: string;
588
589
  isFollowUp?: boolean;
590
+ knownTotal?: number;
589
591
  page?: number;
590
592
  perPage?: number;
591
593
  };
@@ -1,2 +1,2 @@
1
- import { a as PricePreview, c as ProductTier, d as TenantList, f as Webhook, i as Organization, l as SSOConfig, n as AuditLogSelectionState, o as ProductConfig, r as Card, s as ProductPlan, t as AuditLog, u as Tenant } from "../types-B80ckxiy.cjs";
1
+ import { a as PricePreview, c as ProductTier, d as TenantList, f as Webhook, i as Organization, l as SSOConfig, n as AuditLogSelectionState, o as ProductConfig, r as Card, s as ProductPlan, t as AuditLog, u as Tenant } from "../types-B67YW1jV.cjs";
2
2
  export { AuditLog, AuditLogSelectionState, Card, Organization, PricePreview, ProductConfig, ProductPlan, ProductTier, SSOConfig, Tenant, TenantList, Webhook };
@@ -1,2 +1,2 @@
1
- import { a as PricePreview, c as ProductTier, d as TenantList, f as Webhook, i as Organization, l as SSOConfig, n as AuditLogSelectionState, o as ProductConfig, r as Card, s as ProductPlan, t as AuditLog, u as Tenant } from "../types-B3qGQoMx.js";
1
+ import { a as PricePreview, c as ProductTier, d as TenantList, f as Webhook, i as Organization, l as SSOConfig, n as AuditLogSelectionState, o as ProductConfig, r as Card, s as ProductPlan, t as AuditLog, u as Tenant } from "../types-DY0J79yF.js";
2
2
  export { AuditLog, AuditLogSelectionState, Card, Organization, PricePreview, ProductConfig, ProductPlan, ProductTier, SSOConfig, Tenant, TenantList, Webhook };
@@ -1,2 +1,2 @@
1
- import { a as ReleaseSliceType, c as SoftwareList, d as initialState, f as releaseSlice, i as Release, l as _default, n as Manifest, o as ReleasesList, p as sliceName, r as ManifestsList, s as SoftwareKind, t as Artifact, u as actions } from "../index-ExguKUh-.cjs";
1
+ import { a as ReleaseSliceType, c as SoftwareList, d as initialState, f as releaseSlice, i as Release, l as _default, n as Manifest, o as ReleasesList, p as sliceName, r as ManifestsList, s as SoftwareKind, t as Artifact, u as actions } from "../index-fGVC5s1C.cjs";
2
2
  export { Artifact, Manifest, ManifestsList, Release, ReleaseSliceType, ReleasesList, SoftwareKind, SoftwareList, actions, _default as default, initialState, releaseSlice, sliceName };
@@ -1,2 +1,2 @@
1
- import { a as ReleaseSliceType, c as SoftwareList, d as initialState, f as releaseSlice, i as Release, l as _default, n as Manifest, o as ReleasesList, p as sliceName, r as ManifestsList, s as SoftwareKind, t as Artifact, u as actions } from "../index-CGT1O9T5.js";
1
+ import { a as ReleaseSliceType, c as SoftwareList, d as initialState, f as releaseSlice, i as Release, l as _default, n as Manifest, o as ReleasesList, p as sliceName, r as ManifestsList, s as SoftwareKind, t as Artifact, u as actions } from "../index-BMsafOyJ.js";
2
2
  export { Artifact, Manifest, ManifestsList, Release, ReleaseSliceType, ReleasesList, SoftwareKind, SoftwareList, actions, _default as default, initialState, releaseSlice, sliceName };
@@ -1,4 +1,4 @@
1
- import { f as SORTING_OPTIONS, l as DEVICE_LIST_DEFAULTS } from "../constants-eWaA3HCq.js";
1
+ import { f as SORTING_OPTIONS, l as DEVICE_LIST_DEFAULTS } from "../constants-D5hACLhF.js";
2
2
  import { createSlice } from "@reduxjs/toolkit";
3
3
  //#region src/releasesSlice/index.ts
4
4
  const sliceName = "releases";
@@ -1,4 +1,4 @@
1
- import { f as SORTING_OPTIONS, l as DEVICE_LIST_DEFAULTS } from "../constants-eWaA3HCq.js";
1
+ import { f as SORTING_OPTIONS, l as DEVICE_LIST_DEFAULTS } from "../constants-D5hACLhF.js";
2
2
  import { initialState } from "./index.js";
3
3
  //#region src/releasesSlice/mocks.ts
4
4
  const deviceTypes = { qemu: "qemux86-64" };