@northern.tech/store 0.36.1 → 0.36.3
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.
- package/dist/actions.cjs.map +1 -1
- package/dist/actions.d.cts +123 -134
- package/dist/actions.d.ts +123 -134
- package/dist/actions.js.map +1 -1
- package/dist/api/general-api.cjs +3 -3
- package/dist/api/general-api.cjs.map +1 -1
- package/dist/api/general-api.d.cts +9 -10
- package/dist/api/general-api.d.ts +9 -10
- package/dist/api/general-api.js.map +1 -1
- package/dist/api/users-api.cjs +2 -2
- package/dist/api/users-api.cjs.map +1 -1
- package/dist/api/users-api.d.cts +1 -2
- package/dist/api/users-api.d.ts +1 -2
- package/dist/api/users-api.js.map +1 -1
- package/dist/appSlice/constants.cjs +0 -1
- package/dist/appSlice/constants.cjs.map +1 -1
- package/dist/appSlice/constants.d.cts +1 -1
- package/dist/appSlice/constants.d.ts +1 -1
- package/dist/appSlice/constants.js.map +1 -1
- package/dist/appSlice/index.cjs +2 -4
- package/dist/appSlice/index.cjs.map +1 -1
- package/dist/appSlice/index.d.cts +2 -2
- package/dist/appSlice/index.d.ts +2 -2
- package/dist/appSlice/index.js +2 -3
- package/dist/appSlice/index.js.map +1 -1
- package/dist/appSlice/mocks.cjs.map +1 -1
- package/dist/appSlice/mocks.d.cts +1 -1
- package/dist/appSlice/mocks.d.ts +1 -1
- package/dist/appSlice/mocks.js.map +1 -1
- package/dist/appSlice/selectors.cjs +2 -6
- package/dist/appSlice/selectors.cjs.map +1 -1
- package/dist/appSlice/selectors.d.cts +35 -128
- package/dist/appSlice/selectors.d.ts +35 -128
- package/dist/appSlice/selectors.js +2 -5
- package/dist/appSlice/selectors.js.map +1 -1
- package/dist/appSlice/thunks.cjs +0 -1
- package/dist/appSlice/thunks.d.cts +6 -31
- package/dist/appSlice/thunks.d.ts +6 -31
- package/dist/appSlice/thunks.js +2 -2
- package/dist/auth.cjs +2 -2
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +1 -1
- package/dist/auth.d.ts +1 -1
- package/dist/auth.js.map +1 -1
- package/dist/commonConstants.d.cts +1 -1
- package/dist/commonConstants.d.ts +1 -1
- package/dist/commonSelectors.cjs +2 -2
- package/dist/commonSelectors.cjs.map +1 -1
- package/dist/commonSelectors.d.cts +164 -166
- package/dist/commonSelectors.d.ts +164 -166
- package/dist/commonSelectors.js.map +1 -1
- package/dist/{constants-CIx3fnBv.d.cts → constants-6kYRTdox.d.cts} +1 -1
- package/dist/{constants-BciiayPt.d.ts → constants-6kYRTdox.d.ts} +1 -1
- package/dist/{constants-BIIEMVoG.d.ts → constants-B_7FCJQX.d.cts} +3 -6
- package/dist/{constants-BFTS6mge.d.cts → constants-B_7FCJQX.d.ts} +3 -6
- package/dist/{constants-D41U_jbR.d.cts → constants-BwKiHHaB.d.cts} +1 -1
- package/dist/{constants-5cdwz1iH.d.ts → constants-BwKiHHaB.d.ts} +1 -1
- package/dist/{constants-DK7fI3Rh.d.cts → constants-Db_RBdlV.d.cts} +1 -1
- package/dist/{constants-BWEsNG5c.d.ts → constants-Db_RBdlV.d.ts} +1 -1
- package/dist/{constants-CNhpIMME.d.cts → constants-OZiiFKiA.d.cts} +1 -1
- package/dist/{constants-y2XVLQWf.d.ts → constants-OZiiFKiA.d.ts} +1 -1
- package/dist/{constants-CjO3_FOH.d.ts → constants-OcdoVk6f.d.ts} +3 -4
- package/dist/{constants-G3wymKIl.d.cts → constants-Sn4gnNA3.d.cts} +1 -1
- package/dist/{constants-Cpgyuy_r.d.ts → constants-Sn4gnNA3.d.ts} +1 -1
- package/dist/{constants-BrGIx40B.d.cts → constants-_p6w8uEp.d.cts} +3 -4
- package/dist/constants.cjs +0 -1
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.d.cts +8 -8
- package/dist/constants.d.ts +8 -8
- package/dist/constants.js.map +1 -1
- package/dist/deploymentsSlice/constants.d.cts +1 -1
- package/dist/deploymentsSlice/constants.d.ts +1 -1
- package/dist/deploymentsSlice/index.cjs +0 -1
- package/dist/deploymentsSlice/index.cjs.map +1 -1
- package/dist/deploymentsSlice/index.d.cts +1 -1
- package/dist/deploymentsSlice/index.d.ts +1 -1
- package/dist/deploymentsSlice/index.js.map +1 -1
- package/dist/deploymentsSlice/mocks.cjs.map +1 -1
- package/dist/deploymentsSlice/mocks.d.cts +1 -1
- package/dist/deploymentsSlice/mocks.d.ts +1 -1
- package/dist/deploymentsSlice/mocks.js.map +1 -1
- package/dist/deploymentsSlice/selectors.cjs +0 -1
- package/dist/deploymentsSlice/selectors.cjs.map +1 -1
- package/dist/deploymentsSlice/selectors.d.cts +15 -16
- package/dist/deploymentsSlice/selectors.d.ts +15 -16
- package/dist/deploymentsSlice/selectors.js.map +1 -1
- package/dist/deploymentsSlice/thunks.d.cts +21 -22
- package/dist/deploymentsSlice/thunks.d.ts +21 -22
- package/dist/devicesSlice/constants.d.cts +1 -1
- package/dist/devicesSlice/constants.d.ts +1 -1
- package/dist/devicesSlice/index.cjs +0 -1
- package/dist/devicesSlice/index.cjs.map +1 -1
- package/dist/devicesSlice/index.d.cts +1 -1
- package/dist/devicesSlice/index.d.ts +1 -1
- package/dist/devicesSlice/index.js.map +1 -1
- package/dist/devicesSlice/mocks.cjs +0 -1
- package/dist/devicesSlice/mocks.cjs.map +1 -1
- package/dist/devicesSlice/mocks.js.map +1 -1
- package/dist/devicesSlice/selectors.cjs +0 -1
- package/dist/devicesSlice/selectors.cjs.map +1 -1
- package/dist/devicesSlice/selectors.d.cts +79 -81
- package/dist/devicesSlice/selectors.d.ts +79 -81
- package/dist/devicesSlice/selectors.js.map +1 -1
- package/dist/devicesSlice/thunks.d.cts +67 -69
- package/dist/devicesSlice/thunks.d.ts +67 -69
- package/dist/{index-DUvrw_Ed.d.ts → index-5Q-iI4EB.d.cts} +17 -20
- package/dist/index-BBsUj1a8.d.ts +68 -0
- package/dist/index-BLvjQfGj.d.ts +119 -0
- package/dist/{index-BP0uAq36.d.cts → index-Bb4yvvgG.d.ts} +25 -28
- package/dist/index-Bj3OArhr.d.cts +68 -0
- package/dist/{index-CT5hgXm9.d.cts → index-ByfjrTdH.d.ts} +16 -19
- package/dist/index-C8QadAm7.d.cts +119 -0
- package/dist/{index-BI9O8JWe.d.ts → index-CPdMUfRr.d.ts} +41 -44
- package/dist/index-CSk4ENmk.d.cts +149 -0
- package/dist/index-Cf81vLTi.d.ts +149 -0
- package/dist/index-DBUt8xVc.d.cts +61 -0
- package/dist/index-DBUt8xVc.d.ts +61 -0
- package/dist/index-DLDY7bNT.d.ts +165 -0
- package/dist/{index-B64X5ozM.d.cts → index-DbfM03Gj.d.cts} +42 -45
- package/dist/{index-CkwVnIqd.d.ts → index-EPmsL6Lb.d.cts} +26 -29
- package/dist/index-Zs9RnVoR.d.cts +165 -0
- package/dist/liststatehook.cjs +5 -6
- package/dist/liststatehook.cjs.map +1 -1
- package/dist/liststatehook.d.cts +1 -1
- package/dist/liststatehook.d.ts +1 -1
- package/dist/liststatehook.js +1 -1
- package/dist/liststatehook.js.map +1 -1
- package/dist/locationutils.cjs +0 -1
- package/dist/locationutils.cjs.map +1 -1
- package/dist/locationutils.d.cts +3 -3
- package/dist/locationutils.d.ts +3 -3
- package/dist/locationutils.js.map +1 -1
- package/dist/monitorSlice/constants.d.cts +1 -1
- package/dist/monitorSlice/constants.d.ts +1 -1
- package/dist/monitorSlice/index.cjs +0 -1
- package/dist/monitorSlice/index.cjs.map +1 -1
- package/dist/monitorSlice/index.d.cts +1 -1
- package/dist/monitorSlice/index.d.ts +1 -1
- package/dist/monitorSlice/index.js.map +1 -1
- package/dist/monitorSlice/mocks.cjs +0 -1
- package/dist/monitorSlice/mocks.cjs.map +1 -1
- package/dist/monitorSlice/mocks.d.cts +1 -1
- package/dist/monitorSlice/mocks.d.ts +1 -1
- package/dist/monitorSlice/mocks.js.map +1 -1
- package/dist/monitorSlice/selectors.d.cts +1 -1
- package/dist/monitorSlice/selectors.d.ts +1 -1
- package/dist/monitorSlice/thunks.cjs +1 -3
- package/dist/monitorSlice/thunks.cjs.map +1 -1
- package/dist/monitorSlice/thunks.d.cts +11 -13
- package/dist/monitorSlice/thunks.d.ts +11 -13
- package/dist/monitorSlice/thunks.js +1 -2
- package/dist/monitorSlice/thunks.js.map +1 -1
- package/dist/onboardingSlice/constants.cjs.map +1 -1
- package/dist/onboardingSlice/constants.d.cts +1 -1
- package/dist/onboardingSlice/constants.d.ts +1 -1
- package/dist/onboardingSlice/constants.js.map +1 -1
- package/dist/onboardingSlice/index.cjs +0 -1
- package/dist/onboardingSlice/index.cjs.map +1 -1
- package/dist/onboardingSlice/index.d.cts +1 -1
- package/dist/onboardingSlice/index.d.ts +1 -1
- package/dist/onboardingSlice/index.js.map +1 -1
- package/dist/onboardingSlice/mocks.cjs.map +1 -1
- package/dist/onboardingSlice/mocks.d.cts +1 -1
- package/dist/onboardingSlice/mocks.d.ts +1 -1
- package/dist/onboardingSlice/mocks.js.map +1 -1
- package/dist/onboardingSlice/selectors.d.cts +2 -2
- package/dist/onboardingSlice/selectors.d.ts +2 -2
- package/dist/onboardingSlice/thunks.d.cts +22 -23
- package/dist/onboardingSlice/thunks.d.ts +22 -23
- package/dist/organizationSlice/constants.d.cts +1 -1
- package/dist/organizationSlice/constants.d.ts +1 -1
- package/dist/organizationSlice/index.cjs +0 -1
- package/dist/organizationSlice/index.cjs.map +1 -1
- package/dist/organizationSlice/index.d.cts +1 -1
- package/dist/organizationSlice/index.d.ts +1 -1
- package/dist/organizationSlice/index.js.map +1 -1
- package/dist/organizationSlice/mocks.cjs +0 -1
- package/dist/organizationSlice/mocks.cjs.map +1 -1
- package/dist/organizationSlice/mocks.d.cts +3 -4
- package/dist/organizationSlice/mocks.d.ts +3 -4
- package/dist/organizationSlice/mocks.js.map +1 -1
- package/dist/organizationSlice/selectors.cjs +0 -1
- package/dist/organizationSlice/selectors.cjs.map +1 -1
- package/dist/organizationSlice/selectors.d.cts +78 -81
- package/dist/organizationSlice/selectors.d.ts +78 -81
- package/dist/organizationSlice/selectors.js.map +1 -1
- package/dist/organizationSlice/thunks.d.cts +65 -105
- package/dist/organizationSlice/thunks.d.ts +65 -105
- package/dist/organizationSlice/types.d.cts +1 -1
- package/dist/organizationSlice/types.d.ts +1 -1
- package/dist/releasesSlice/constants.cjs.map +1 -1
- package/dist/releasesSlice/constants.d.cts +1 -1
- package/dist/releasesSlice/constants.d.ts +1 -1
- package/dist/releasesSlice/constants.js.map +1 -1
- package/dist/releasesSlice/index.cjs +0 -1
- package/dist/releasesSlice/index.cjs.map +1 -1
- package/dist/releasesSlice/index.d.cts +1 -1
- package/dist/releasesSlice/index.d.ts +1 -1
- package/dist/releasesSlice/index.js.map +1 -1
- package/dist/releasesSlice/mocks.cjs +0 -1
- package/dist/releasesSlice/mocks.cjs.map +1 -1
- package/dist/releasesSlice/mocks.d.cts +3 -6
- package/dist/releasesSlice/mocks.d.ts +3 -6
- package/dist/releasesSlice/mocks.js.map +1 -1
- package/dist/releasesSlice/selectors.cjs +0 -1
- package/dist/releasesSlice/selectors.cjs.map +1 -1
- package/dist/releasesSlice/selectors.d.cts +107 -110
- package/dist/releasesSlice/selectors.d.ts +107 -110
- package/dist/releasesSlice/selectors.js.map +1 -1
- package/dist/releasesSlice/thunks.cjs +39 -16
- package/dist/releasesSlice/thunks.cjs.map +1 -1
- package/dist/releasesSlice/thunks.d.cts +52 -61
- package/dist/releasesSlice/thunks.d.ts +52 -61
- package/dist/releasesSlice/thunks.js +38 -15
- package/dist/releasesSlice/thunks.js.map +1 -1
- package/dist/sockethook.cjs +3 -3
- package/dist/sockethook.cjs.map +1 -1
- package/dist/sockethook.js.map +1 -1
- package/dist/{store-BhRxVhtL.d.cts → store-DBUTT4FF.d.cts} +139 -36
- package/dist/{store-BZo47jc-.d.ts → store-gkY5P9Uz.d.ts} +139 -36
- package/dist/store.cjs +0 -1
- package/dist/store.cjs.map +1 -1
- package/dist/store.d.cts +2 -3
- package/dist/store.d.ts +2 -3
- package/dist/store.js.map +1 -1
- package/dist/storehooks.cjs +9 -17
- package/dist/storehooks.cjs.map +1 -1
- package/dist/storehooks.d.cts +6 -43
- package/dist/storehooks.d.ts +6 -43
- package/dist/storehooks.js +7 -15
- package/dist/storehooks.js.map +1 -1
- package/dist/thunks.cjs +51 -67
- package/dist/thunks.cjs.map +1 -1
- package/dist/thunks.d.cts +2 -2
- package/dist/thunks.d.ts +2 -2
- package/dist/thunks.js +45 -60
- package/dist/thunks.js.map +1 -1
- package/dist/{types-COdPU2QQ.d.cts → types-B33vKVhi.d.cts} +4 -4
- package/dist/{types-BPyM8Inu.d.ts → types-BjtmX60L.d.ts} +4 -4
- package/dist/useDeploymentDevice.cjs +2 -2
- package/dist/useDeploymentDevice.cjs.map +1 -1
- package/dist/useDeploymentDevice.js.map +1 -1
- package/dist/usersSlice/constants.d.cts +1 -1
- package/dist/usersSlice/constants.d.ts +1 -1
- package/dist/usersSlice/index.cjs +0 -1
- package/dist/usersSlice/index.cjs.map +1 -1
- package/dist/usersSlice/index.d.cts +1 -1
- package/dist/usersSlice/index.d.ts +1 -1
- package/dist/usersSlice/index.js.map +1 -1
- package/dist/usersSlice/mocks.cjs +0 -1
- package/dist/usersSlice/mocks.cjs.map +1 -1
- package/dist/usersSlice/mocks.d.cts +4 -6
- package/dist/usersSlice/mocks.d.ts +4 -6
- package/dist/usersSlice/mocks.js.map +1 -1
- package/dist/usersSlice/selectors.cjs +0 -1
- package/dist/usersSlice/selectors.cjs.map +1 -1
- package/dist/usersSlice/selectors.d.cts +44 -47
- package/dist/usersSlice/selectors.d.ts +44 -47
- package/dist/usersSlice/selectors.js.map +1 -1
- package/dist/usersSlice/thunks.d.cts +92 -95
- package/dist/usersSlice/thunks.d.ts +92 -95
- package/dist/utils.cjs +2 -3
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +2 -2
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +3 -3
- package/dist/utils.js.map +1 -1
- package/package.json +8 -8
- package/dist/index-B3IF6ur9.d.cts +0 -168
- package/dist/index-BFlHWzjv.d.cts +0 -152
- package/dist/index-BbaS7MzW.d.cts +0 -71
- package/dist/index-Bp1WpATs.d.ts +0 -154
- package/dist/index-C6wNUfiV.d.ts +0 -71
- package/dist/index-CJkrL0oA.d.ts +0 -64
- package/dist/index-DaD3yorF.d.ts +0 -168
- package/dist/index-DwACbyUg.d.cts +0 -154
- package/dist/index-UPc3wvVd.d.cts +0 -64
- package/dist/index-ez3oxfRo.d.ts +0 -152
- package/dist/utils-CHBWS_tH.d.ts +0 -105
- package/dist/utils-Do9z5TL1.d.cts +0 -105
- /package/dist/{chunk-CKQMccvm.cjs → rolldown-runtime-D6vf50IK.cjs} +0 -0
|
@@ -1,26 +1,23 @@
|
|
|
1
|
-
import { o as UserSliceType } from "../index-
|
|
2
|
-
import { i as ReleaseSliceType } from "../index-
|
|
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-
|
|
4
|
-
import { n as OnboardingSliceType } from "../index-
|
|
5
|
-
import { o as DeploymentsSliceType } from "../index-
|
|
6
|
-
import { s as DeviceSliceType } from "../index-
|
|
7
|
-
import { t as AppSliceType } from "../index-
|
|
8
|
-
import { t as MonitorSliceType } from "../index-
|
|
9
|
-
import { t as OrganizationSliceType } from "../index-
|
|
10
|
-
import { r as RootState } from "../store-
|
|
11
|
-
import * as _$_northern_tech_utils_constants0 from "@northern.tech/utils/constants";
|
|
12
|
-
import * as _$_northern_tech_types_types_gen0 from "@northern.tech/types/types.gen";
|
|
13
|
-
import * as _$reselect from "reselect";
|
|
1
|
+
import { o as UserSliceType } from "../index-Cf81vLTi.js";
|
|
2
|
+
import { i as ReleaseSliceType } from "../index-DLDY7bNT.js";
|
|
3
|
+
import { d as TenantList, i as Organization, l as SSOConfig, n as AuditLogSelectionState, o as ProductConfig, r as Card, u as Tenant } from "../types-BjtmX60L.js";
|
|
4
|
+
import { n as OnboardingSliceType } from "../index-DBUt8xVc.js";
|
|
5
|
+
import { o as DeploymentsSliceType } from "../index-Bb4yvvgG.js";
|
|
6
|
+
import { s as DeviceSliceType } from "../index-CPdMUfRr.js";
|
|
7
|
+
import { t as AppSliceType } from "../index-BLvjQfGj.js";
|
|
8
|
+
import { t as MonitorSliceType } from "../index-ByfjrTdH.js";
|
|
9
|
+
import { t as OrganizationSliceType } from "../index-BBsUj1a8.js";
|
|
10
|
+
import { r as RootState } from "../store-gkY5P9Uz.js";
|
|
14
11
|
|
|
15
12
|
//#region src/organizationSlice/selectors.d.ts
|
|
16
13
|
declare const getOrganization: (state: RootState) => Partial<Organization>;
|
|
17
14
|
declare const getProducts: (state: RootState) => ProductConfig | undefined;
|
|
18
|
-
declare const getExternalIntegrations: (state: RootState) =>
|
|
15
|
+
declare const getExternalIntegrations: (state: RootState) => import("@northern.tech/types/types.gen").Integration[];
|
|
19
16
|
declare const getAuditlogState: (state: RootState) => AuditLogSelectionState;
|
|
20
|
-
declare const getAuditLog: (state: RootState) =>
|
|
17
|
+
declare const getAuditLog: (state: RootState) => import("@northern.tech/types/types.gen").AuditLog[];
|
|
21
18
|
declare const getAuditLogSelectionState: (state: RootState) => AuditLogSelectionState;
|
|
22
|
-
declare const getBillingProfile: (state: RootState) =>
|
|
23
|
-
declare const getSubscription: (state: RootState) =>
|
|
19
|
+
declare const getBillingProfile: (state: RootState) => import("@northern.tech/types/types.gen").BillingProfile | undefined;
|
|
20
|
+
declare const getSubscription: (state: RootState) => import("@northern.tech/types/types.gen").SubscriptionData | undefined;
|
|
24
21
|
declare const getCard: (state: RootState) => Card;
|
|
25
22
|
declare const getSsoConfig: ({
|
|
26
23
|
organization: {
|
|
@@ -28,7 +25,7 @@ declare const getSsoConfig: ({
|
|
|
28
25
|
}
|
|
29
26
|
}: RootState) => SSOConfig;
|
|
30
27
|
declare const getTenantsList: (state: RootState) => TenantList;
|
|
31
|
-
declare const getWebhookEvents: (state: RootState) =>
|
|
28
|
+
declare const getWebhookEvents: (state: RootState) => import("@northern.tech/types/types.gen").Event[];
|
|
32
29
|
declare const getWebhookEventTotal: (state: RootState) => number;
|
|
33
30
|
declare const getDeviceTwinIntegrations: ((state: {
|
|
34
31
|
app: AppSliceType;
|
|
@@ -39,26 +36,26 @@ declare const getDeviceTwinIntegrations: ((state: {
|
|
|
39
36
|
organization: OrganizationSliceType;
|
|
40
37
|
releases: ReleaseSliceType;
|
|
41
38
|
users: UserSliceType;
|
|
42
|
-
}) =>
|
|
39
|
+
}) => import("@northern.tech/types/types.gen").Integration[]) & {
|
|
43
40
|
clearCache: () => void;
|
|
44
41
|
resultsCount: () => number;
|
|
45
42
|
resetResultsCount: () => void;
|
|
46
43
|
} & {
|
|
47
|
-
resultFunc: (resultFuncArgs_0:
|
|
48
|
-
memoizedResultFunc: ((resultFuncArgs_0:
|
|
44
|
+
resultFunc: (resultFuncArgs_0: import("@northern.tech/types/types.gen").Integration[]) => import("@northern.tech/types/types.gen").Integration[];
|
|
45
|
+
memoizedResultFunc: ((resultFuncArgs_0: import("@northern.tech/types/types.gen").Integration[]) => import("@northern.tech/types/types.gen").Integration[]) & {
|
|
49
46
|
clearCache: () => void;
|
|
50
47
|
resultsCount: () => number;
|
|
51
48
|
resetResultsCount: () => void;
|
|
52
49
|
};
|
|
53
|
-
lastResult: () =>
|
|
54
|
-
dependencies: [(state: RootState) =>
|
|
50
|
+
lastResult: () => import("@northern.tech/types/types.gen").Integration[];
|
|
51
|
+
dependencies: [(state: RootState) => import("@northern.tech/types/types.gen").Integration[]];
|
|
55
52
|
recomputations: () => number;
|
|
56
53
|
resetRecomputations: () => void;
|
|
57
54
|
dependencyRecomputations: () => number;
|
|
58
55
|
resetDependencyRecomputations: () => void;
|
|
59
56
|
} & {
|
|
60
|
-
memoize: typeof
|
|
61
|
-
argsMemoize: typeof
|
|
57
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
58
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
62
59
|
};
|
|
63
60
|
declare const getIsServiceProvider: (state: RootState) => boolean | undefined;
|
|
64
61
|
declare const getWebhooks: ((state: {
|
|
@@ -70,26 +67,26 @@ declare const getWebhooks: ((state: {
|
|
|
70
67
|
organization: OrganizationSliceType;
|
|
71
68
|
releases: ReleaseSliceType;
|
|
72
69
|
users: UserSliceType;
|
|
73
|
-
}) =>
|
|
70
|
+
}) => import("@northern.tech/types/types.gen").Integration[]) & {
|
|
74
71
|
clearCache: () => void;
|
|
75
72
|
resultsCount: () => number;
|
|
76
73
|
resetResultsCount: () => void;
|
|
77
74
|
} & {
|
|
78
|
-
resultFunc: (resultFuncArgs_0:
|
|
79
|
-
memoizedResultFunc: ((resultFuncArgs_0:
|
|
75
|
+
resultFunc: (resultFuncArgs_0: import("@northern.tech/types/types.gen").Integration[]) => import("@northern.tech/types/types.gen").Integration[];
|
|
76
|
+
memoizedResultFunc: ((resultFuncArgs_0: import("@northern.tech/types/types.gen").Integration[]) => import("@northern.tech/types/types.gen").Integration[]) & {
|
|
80
77
|
clearCache: () => void;
|
|
81
78
|
resultsCount: () => number;
|
|
82
79
|
resetResultsCount: () => void;
|
|
83
80
|
};
|
|
84
|
-
lastResult: () =>
|
|
85
|
-
dependencies: [(state: RootState) =>
|
|
81
|
+
lastResult: () => import("@northern.tech/types/types.gen").Integration[];
|
|
82
|
+
dependencies: [(state: RootState) => import("@northern.tech/types/types.gen").Integration[]];
|
|
86
83
|
recomputations: () => number;
|
|
87
84
|
resetRecomputations: () => void;
|
|
88
85
|
dependencyRecomputations: () => number;
|
|
89
86
|
resetDependencyRecomputations: () => void;
|
|
90
87
|
} & {
|
|
91
|
-
memoize: typeof
|
|
92
|
-
argsMemoize: typeof
|
|
88
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
89
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
93
90
|
};
|
|
94
91
|
declare const getWebhookEventInfo: ((state: {
|
|
95
92
|
app: AppSliceType;
|
|
@@ -101,19 +98,19 @@ declare const getWebhookEventInfo: ((state: {
|
|
|
101
98
|
releases: ReleaseSliceType;
|
|
102
99
|
users: UserSliceType;
|
|
103
100
|
}) => {
|
|
104
|
-
events:
|
|
101
|
+
events: import("@northern.tech/types/types.gen").Event[];
|
|
105
102
|
eventTotal: number;
|
|
106
103
|
}) & {
|
|
107
104
|
clearCache: () => void;
|
|
108
105
|
resultsCount: () => number;
|
|
109
106
|
resetResultsCount: () => void;
|
|
110
107
|
} & {
|
|
111
|
-
resultFunc: (resultFuncArgs_0:
|
|
112
|
-
events:
|
|
108
|
+
resultFunc: (resultFuncArgs_0: import("@northern.tech/types/types.gen").Integration[], resultFuncArgs_1: import("@northern.tech/types/types.gen").Event[], resultFuncArgs_2: number) => {
|
|
109
|
+
events: import("@northern.tech/types/types.gen").Event[];
|
|
113
110
|
eventTotal: number;
|
|
114
111
|
};
|
|
115
|
-
memoizedResultFunc: ((resultFuncArgs_0:
|
|
116
|
-
events:
|
|
112
|
+
memoizedResultFunc: ((resultFuncArgs_0: import("@northern.tech/types/types.gen").Integration[], resultFuncArgs_1: import("@northern.tech/types/types.gen").Event[], resultFuncArgs_2: number) => {
|
|
113
|
+
events: import("@northern.tech/types/types.gen").Event[];
|
|
117
114
|
eventTotal: number;
|
|
118
115
|
}) & {
|
|
119
116
|
clearCache: () => void;
|
|
@@ -121,7 +118,7 @@ declare const getWebhookEventInfo: ((state: {
|
|
|
121
118
|
resetResultsCount: () => void;
|
|
122
119
|
};
|
|
123
120
|
lastResult: () => {
|
|
124
|
-
events:
|
|
121
|
+
events: import("@northern.tech/types/types.gen").Event[];
|
|
125
122
|
eventTotal: number;
|
|
126
123
|
};
|
|
127
124
|
dependencies: [((state: {
|
|
@@ -133,34 +130,34 @@ declare const getWebhookEventInfo: ((state: {
|
|
|
133
130
|
organization: OrganizationSliceType;
|
|
134
131
|
releases: ReleaseSliceType;
|
|
135
132
|
users: UserSliceType;
|
|
136
|
-
}) =>
|
|
133
|
+
}) => import("@northern.tech/types/types.gen").Integration[]) & {
|
|
137
134
|
clearCache: () => void;
|
|
138
135
|
resultsCount: () => number;
|
|
139
136
|
resetResultsCount: () => void;
|
|
140
137
|
} & {
|
|
141
|
-
resultFunc: (resultFuncArgs_0:
|
|
142
|
-
memoizedResultFunc: ((resultFuncArgs_0:
|
|
138
|
+
resultFunc: (resultFuncArgs_0: import("@northern.tech/types/types.gen").Integration[]) => import("@northern.tech/types/types.gen").Integration[];
|
|
139
|
+
memoizedResultFunc: ((resultFuncArgs_0: import("@northern.tech/types/types.gen").Integration[]) => import("@northern.tech/types/types.gen").Integration[]) & {
|
|
143
140
|
clearCache: () => void;
|
|
144
141
|
resultsCount: () => number;
|
|
145
142
|
resetResultsCount: () => void;
|
|
146
143
|
};
|
|
147
|
-
lastResult: () =>
|
|
148
|
-
dependencies: [(state: RootState) =>
|
|
144
|
+
lastResult: () => import("@northern.tech/types/types.gen").Integration[];
|
|
145
|
+
dependencies: [(state: RootState) => import("@northern.tech/types/types.gen").Integration[]];
|
|
149
146
|
recomputations: () => number;
|
|
150
147
|
resetRecomputations: () => void;
|
|
151
148
|
dependencyRecomputations: () => number;
|
|
152
149
|
resetDependencyRecomputations: () => void;
|
|
153
150
|
} & {
|
|
154
|
-
memoize: typeof
|
|
155
|
-
argsMemoize: typeof
|
|
156
|
-
}, (state: RootState) =>
|
|
151
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
152
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
153
|
+
}, (state: RootState) => import("@northern.tech/types/types.gen").Event[], (state: RootState) => number];
|
|
157
154
|
recomputations: () => number;
|
|
158
155
|
resetRecomputations: () => void;
|
|
159
156
|
dependencyRecomputations: () => number;
|
|
160
157
|
resetDependencyRecomputations: () => void;
|
|
161
158
|
} & {
|
|
162
|
-
memoize: typeof
|
|
163
|
-
argsMemoize: typeof
|
|
159
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
160
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
164
161
|
};
|
|
165
162
|
declare const getAuditLogEntry: ((state: {
|
|
166
163
|
app: AppSliceType;
|
|
@@ -171,26 +168,26 @@ declare const getAuditLogEntry: ((state: {
|
|
|
171
168
|
organization: OrganizationSliceType;
|
|
172
169
|
releases: ReleaseSliceType;
|
|
173
170
|
users: UserSliceType;
|
|
174
|
-
}) =>
|
|
171
|
+
}) => import("@northern.tech/types/types.gen").AuditLog | undefined) & {
|
|
175
172
|
clearCache: () => void;
|
|
176
173
|
resultsCount: () => number;
|
|
177
174
|
resetResultsCount: () => void;
|
|
178
175
|
} & {
|
|
179
|
-
resultFunc: (resultFuncArgs_0:
|
|
180
|
-
memoizedResultFunc: ((resultFuncArgs_0:
|
|
176
|
+
resultFunc: (resultFuncArgs_0: import("@northern.tech/types/types.gen").AuditLog[], resultFuncArgs_1: AuditLogSelectionState) => import("@northern.tech/types/types.gen").AuditLog | undefined;
|
|
177
|
+
memoizedResultFunc: ((resultFuncArgs_0: import("@northern.tech/types/types.gen").AuditLog[], resultFuncArgs_1: AuditLogSelectionState) => import("@northern.tech/types/types.gen").AuditLog | undefined) & {
|
|
181
178
|
clearCache: () => void;
|
|
182
179
|
resultsCount: () => number;
|
|
183
180
|
resetResultsCount: () => void;
|
|
184
181
|
};
|
|
185
|
-
lastResult: () =>
|
|
186
|
-
dependencies: [(state: RootState) =>
|
|
182
|
+
lastResult: () => import("@northern.tech/types/types.gen").AuditLog | undefined;
|
|
183
|
+
dependencies: [(state: RootState) => import("@northern.tech/types/types.gen").AuditLog[], (state: RootState) => AuditLogSelectionState];
|
|
187
184
|
recomputations: () => number;
|
|
188
185
|
resetRecomputations: () => void;
|
|
189
186
|
dependencyRecomputations: () => number;
|
|
190
187
|
resetDependencyRecomputations: () => void;
|
|
191
188
|
} & {
|
|
192
|
-
memoize: typeof
|
|
193
|
-
argsMemoize: typeof
|
|
189
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
190
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
194
191
|
};
|
|
195
192
|
declare const getDisabledTiers: ((state: {
|
|
196
193
|
app: AppSliceType;
|
|
@@ -258,16 +255,16 @@ declare const getDisabledTiers: ((state: {
|
|
|
258
255
|
dependencyRecomputations: () => number;
|
|
259
256
|
resetDependencyRecomputations: () => void;
|
|
260
257
|
} & {
|
|
261
|
-
memoize: typeof
|
|
262
|
-
argsMemoize: typeof
|
|
258
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
259
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
263
260
|
}];
|
|
264
261
|
recomputations: () => number;
|
|
265
262
|
resetRecomputations: () => void;
|
|
266
263
|
dependencyRecomputations: () => number;
|
|
267
264
|
resetDependencyRecomputations: () => void;
|
|
268
265
|
} & {
|
|
269
|
-
memoize: typeof
|
|
270
|
-
argsMemoize: typeof
|
|
266
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
267
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
271
268
|
};
|
|
272
269
|
declare const getSpLimits: ((state: {
|
|
273
270
|
app: AppSliceType;
|
|
@@ -335,16 +332,16 @@ declare const getSpLimits: ((state: {
|
|
|
335
332
|
dependencyRecomputations: () => number;
|
|
336
333
|
resetDependencyRecomputations: () => void;
|
|
337
334
|
} & {
|
|
338
|
-
memoize: typeof
|
|
339
|
-
argsMemoize: typeof
|
|
335
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
336
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
340
337
|
}];
|
|
341
338
|
recomputations: () => number;
|
|
342
339
|
resetRecomputations: () => void;
|
|
343
340
|
dependencyRecomputations: () => number;
|
|
344
341
|
resetDependencyRecomputations: () => void;
|
|
345
342
|
} & {
|
|
346
|
-
memoize: typeof
|
|
347
|
-
argsMemoize: typeof
|
|
343
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
344
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
348
345
|
};
|
|
349
346
|
declare const getTenantListWithLimits: ((state: {
|
|
350
347
|
app: AppSliceType;
|
|
@@ -365,11 +362,11 @@ declare const getTenantListWithLimits: ((state: {
|
|
|
365
362
|
plan?: "os" | "enterprise" | "professional";
|
|
366
363
|
trial?: boolean;
|
|
367
364
|
trial_expiration?: string;
|
|
368
|
-
addons?: Array<
|
|
365
|
+
addons?: Array<import("@northern.tech/types/types.gen").Addon>;
|
|
369
366
|
service_provider?: boolean;
|
|
370
367
|
parent_tenant_id?: string;
|
|
371
|
-
additional_info?:
|
|
372
|
-
api_limits?:
|
|
368
|
+
additional_info?: import("@northern.tech/types/types.gen").TenantAdditionalInfo;
|
|
369
|
+
api_limits?: import("@northern.tech/types/types.gen").TenantApiLimits;
|
|
373
370
|
created_at?: string;
|
|
374
371
|
updated_at?: string;
|
|
375
372
|
device_count?: number;
|
|
@@ -378,7 +375,7 @@ declare const getTenantListWithLimits: ((state: {
|
|
|
378
375
|
page: number;
|
|
379
376
|
perPage: number;
|
|
380
377
|
selectedTenant: Tenant | null;
|
|
381
|
-
sort:
|
|
378
|
+
sort: import("@northern.tech/utils/constants").SortOptions;
|
|
382
379
|
total: number;
|
|
383
380
|
}) & {
|
|
384
381
|
clearCache: () => void;
|
|
@@ -395,11 +392,11 @@ declare const getTenantListWithLimits: ((state: {
|
|
|
395
392
|
plan?: "os" | "enterprise" | "professional";
|
|
396
393
|
trial?: boolean;
|
|
397
394
|
trial_expiration?: string;
|
|
398
|
-
addons?: Array<
|
|
395
|
+
addons?: Array<import("@northern.tech/types/types.gen").Addon>;
|
|
399
396
|
service_provider?: boolean;
|
|
400
397
|
parent_tenant_id?: string;
|
|
401
|
-
additional_info?:
|
|
402
|
-
api_limits?:
|
|
398
|
+
additional_info?: import("@northern.tech/types/types.gen").TenantAdditionalInfo;
|
|
399
|
+
api_limits?: import("@northern.tech/types/types.gen").TenantApiLimits;
|
|
403
400
|
created_at?: string;
|
|
404
401
|
updated_at?: string;
|
|
405
402
|
device_count?: number;
|
|
@@ -408,7 +405,7 @@ declare const getTenantListWithLimits: ((state: {
|
|
|
408
405
|
page: number;
|
|
409
406
|
perPage: number;
|
|
410
407
|
selectedTenant: Tenant | null;
|
|
411
|
-
sort:
|
|
408
|
+
sort: import("@northern.tech/utils/constants").SortOptions;
|
|
412
409
|
total: number;
|
|
413
410
|
};
|
|
414
411
|
memoizedResultFunc: ((resultFuncArgs_0: TenantList) => {
|
|
@@ -421,11 +418,11 @@ declare const getTenantListWithLimits: ((state: {
|
|
|
421
418
|
plan?: "os" | "enterprise" | "professional";
|
|
422
419
|
trial?: boolean;
|
|
423
420
|
trial_expiration?: string;
|
|
424
|
-
addons?: Array<
|
|
421
|
+
addons?: Array<import("@northern.tech/types/types.gen").Addon>;
|
|
425
422
|
service_provider?: boolean;
|
|
426
423
|
parent_tenant_id?: string;
|
|
427
|
-
additional_info?:
|
|
428
|
-
api_limits?:
|
|
424
|
+
additional_info?: import("@northern.tech/types/types.gen").TenantAdditionalInfo;
|
|
425
|
+
api_limits?: import("@northern.tech/types/types.gen").TenantApiLimits;
|
|
429
426
|
created_at?: string;
|
|
430
427
|
updated_at?: string;
|
|
431
428
|
device_count?: number;
|
|
@@ -434,7 +431,7 @@ declare const getTenantListWithLimits: ((state: {
|
|
|
434
431
|
page: number;
|
|
435
432
|
perPage: number;
|
|
436
433
|
selectedTenant: Tenant | null;
|
|
437
|
-
sort:
|
|
434
|
+
sort: import("@northern.tech/utils/constants").SortOptions;
|
|
438
435
|
total: number;
|
|
439
436
|
}) & {
|
|
440
437
|
clearCache: () => void;
|
|
@@ -451,11 +448,11 @@ declare const getTenantListWithLimits: ((state: {
|
|
|
451
448
|
plan?: "os" | "enterprise" | "professional";
|
|
452
449
|
trial?: boolean;
|
|
453
450
|
trial_expiration?: string;
|
|
454
|
-
addons?: Array<
|
|
451
|
+
addons?: Array<import("@northern.tech/types/types.gen").Addon>;
|
|
455
452
|
service_provider?: boolean;
|
|
456
453
|
parent_tenant_id?: string;
|
|
457
|
-
additional_info?:
|
|
458
|
-
api_limits?:
|
|
454
|
+
additional_info?: import("@northern.tech/types/types.gen").TenantAdditionalInfo;
|
|
455
|
+
api_limits?: import("@northern.tech/types/types.gen").TenantApiLimits;
|
|
459
456
|
created_at?: string;
|
|
460
457
|
updated_at?: string;
|
|
461
458
|
device_count?: number;
|
|
@@ -464,7 +461,7 @@ declare const getTenantListWithLimits: ((state: {
|
|
|
464
461
|
page: number;
|
|
465
462
|
perPage: number;
|
|
466
463
|
selectedTenant: Tenant | null;
|
|
467
|
-
sort:
|
|
464
|
+
sort: import("@northern.tech/utils/constants").SortOptions;
|
|
468
465
|
total: number;
|
|
469
466
|
};
|
|
470
467
|
dependencies: [(state: RootState) => TenantList];
|
|
@@ -473,8 +470,8 @@ declare const getTenantListWithLimits: ((state: {
|
|
|
473
470
|
dependencyRecomputations: () => number;
|
|
474
471
|
resetDependencyRecomputations: () => void;
|
|
475
472
|
} & {
|
|
476
|
-
memoize: typeof
|
|
477
|
-
argsMemoize: typeof
|
|
473
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
474
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
478
475
|
};
|
|
479
476
|
//#endregion
|
|
480
477
|
export { getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogState, getBillingProfile, getCard, getDeviceTwinIntegrations, getDisabledTiers, getExternalIntegrations, getIsServiceProvider, getOrganization, getProducts, getSpLimits, getSsoConfig, getSubscription, getTenantListWithLimits, getTenantsList, getWebhookEventInfo, getWebhookEventTotal, getWebhookEvents, getWebhooks };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.js","names":[],"sources":["../../src/organizationSlice/selectors.ts"],"sourcesContent":["// Copyright 2023 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport type { Tenant } from '@northern.tech/types/MenderTypes';\nimport { createSelector } from '@reduxjs/toolkit';\n\nimport { EXTERNAL_PROVIDER, productOrder } from '../constants';\nimport type { RootState } from '../store';\n\nexport const getOrganization = (state: RootState) => state.organization.organization;\nexport const getProducts = (state: RootState) => state.organization.products;\nexport const getExternalIntegrations = (state: RootState) => state.organization.externalDeviceIntegrations;\nexport const getAuditlogState = (state: RootState) => state.organization.auditlog.selectionState;\nexport const getAuditLog = (state: RootState) => state.organization.auditlog.events;\nexport const getAuditLogSelectionState = (state: RootState) => state.organization.auditlog.selectionState;\nexport const getBillingProfile = (state: RootState) => state.organization.organization.billing_profile;\nexport const getSubscription = (state: RootState) => state.organization.organization.subscription;\nexport const getCard = (state: RootState) => state.organization.card;\nexport const getSsoConfig = ({ organization: { ssoConfigs = [] } }: RootState) => ssoConfigs[0];\nexport const getTenantsList = (state: RootState) => state.organization.tenantList;\nexport const getWebhookEvents = (state: RootState) => state.organization.webhooks.events;\nexport const getWebhookEventTotal = (state: RootState) => state.organization.webhooks.eventsTotal;\n\nexport const getDeviceTwinIntegrations = createSelector([getExternalIntegrations], integrations =>\n integrations.filter(integration => integration.id && EXTERNAL_PROVIDER[integration.provider]?.deviceTwin)\n);\nexport const getIsServiceProvider = (state: RootState) => state.organization.organization.service_provider;\n\nexport const getWebhooks = createSelector([getExternalIntegrations], integrations =>\n integrations.filter(integration => integration.id && integration.provider === EXTERNAL_PROVIDER.webhook.provider)\n);\nexport const getWebhookEventInfo = createSelector([getWebhooks, getWebhookEvents, getWebhookEventTotal], (webhooks, events, eventTotal) =>\n webhooks.length ? { events, eventTotal } : { events: [], eventTotal: 0 }\n);\n\nexport const getAuditLogEntry = createSelector([getAuditLog, getAuditLogSelectionState], (events, { selectedId }) => {\n if (!selectedId) {\n return;\n }\n const [eventAction, eventTime] = atob(selectedId).split('|');\n return events.find(item => item.action === eventAction && item.time === eventTime);\n});\n\nconst toTierName = (key: string) => key.replace(/max_|_?devices/g, '') || 'standard';\nconst processDeviceLimits = (deviceLimits: Tenant['device_limits'], skipFilter = false) => {\n const result: { disabled: string[]; limits: Record<string, object> } = { limits: {}, disabled: [] };\n if (!deviceLimits) return result;\n const tiersByName = Object.fromEntries(Object.entries(deviceLimits).map(([key, limit]) => [toTierName(key), { key, limit }]));\n return productOrder.reduce((accu, tierName) => {\n const entry = tiersByName[tierName];\n if (!entry) return accu;\n const { key, limit } = entry;\n if (limit.value === 0) {\n accu.disabled.push(tierName);\n if (!skipFilter) return accu;\n }\n accu.limits[tierName] = {\n id: tierName,\n backendId: key,\n limit: limit.value,\n current: limit.current_value,\n name: tierName,\n quotaLeft: Math.max(limit.value - limit.current_value, 0),\n limitReached: limit.value !== -1 && limit.value <= limit.current_value\n };\n return accu;\n }, result);\n};\nconst getDeviceLimitsInfo = createSelector([getOrganization], ({ device_limits }) => processDeviceLimits(device_limits));\nexport const getDisabledTiers = createSelector([getDeviceLimitsInfo], ({ disabled }) => disabled);\nexport const getSpLimits = createSelector([getDeviceLimitsInfo], ({ limits }) => limits);\nexport const getTenantListWithLimits = createSelector([getTenantsList], tenantList => ({\n ...tenantList,\n tenants: tenantList.tenants.map(tenant => ({\n ...tenant,\n device_limits: 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,
|
|
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":"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"}
|