@northern.tech/store 0.12.0 → 0.14.0
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 +21 -16
- package/dist/actions.cjs.map +1 -1
- package/dist/actions.d.cts +7 -22
- package/dist/actions.d.ts +7 -22
- package/dist/actions.js +8 -8
- package/dist/appSlice/index.cjs +1 -0
- package/dist/appSlice/index.cjs.map +1 -1
- package/dist/appSlice/index.d.cts +1 -1
- package/dist/appSlice/index.d.ts +1 -1
- package/dist/appSlice/index.js +1 -1
- package/dist/appSlice/mocks.cjs +1 -0
- package/dist/appSlice/mocks.cjs.map +1 -1
- package/dist/appSlice/mocks.js +1 -1
- package/dist/appSlice/selectors.d.cts +34 -528
- package/dist/appSlice/selectors.d.ts +34 -528
- package/dist/appSlice/thunks.cjs +46 -41
- package/dist/appSlice/thunks.cjs.map +1 -1
- package/dist/appSlice/thunks.d.cts +5 -3
- package/dist/appSlice/thunks.d.ts +5 -3
- package/dist/appSlice/thunks.js +15 -15
- package/dist/{chunk-C5NXNZ7F.js → chunk-2SAH2AN2.js} +23 -30
- package/dist/chunk-2SAH2AN2.js.map +1 -0
- package/dist/{chunk-QOFVCPRW.js → chunk-5PUF4LA5.js} +1 -1
- package/dist/chunk-5PUF4LA5.js.map +1 -0
- package/dist/{chunk-ZRMB4U7Z.js → chunk-5XUPXMYV.js} +4 -4
- package/dist/{chunk-ZNAJKEP2.js → chunk-CQXDAXQF.js} +1 -1
- package/dist/chunk-CQXDAXQF.js.map +1 -0
- package/dist/{chunk-OFGCC3GM.js → chunk-IUGHRJV2.js} +2 -1
- package/dist/chunk-IUGHRJV2.js.map +1 -0
- package/dist/{chunk-WCBHYLUK.js → chunk-KJ4BPXMB.js} +1 -1
- package/dist/chunk-KJ4BPXMB.js.map +1 -0
- package/dist/{chunk-OGUVURJ5.js → chunk-KVZEKHVC.js} +12 -12
- package/dist/{chunk-5ZCZTTYX.js → chunk-LX4YRTYY.js} +5 -5
- package/dist/{chunk-C2LGE3P6.js → chunk-OLKM53RL.js} +1 -1
- package/dist/chunk-OLKM53RL.js.map +1 -0
- package/dist/{chunk-4HSH7RH3.js → chunk-PIFXECFW.js} +10 -10
- package/dist/{chunk-HLX5L3IM.js → chunk-PVCHKW35.js} +1 -1
- package/dist/chunk-PVCHKW35.js.map +1 -0
- package/dist/{chunk-REZWSU22.js → chunk-VODRLEDP.js} +21 -17
- package/dist/chunk-VODRLEDP.js.map +1 -0
- package/dist/{chunk-MH5WPYQI.js → chunk-X7NEALMI.js} +16 -9
- package/dist/chunk-X7NEALMI.js.map +1 -0
- package/dist/{chunk-TKIOEF3B.js → chunk-ZWLCUOQN.js} +6 -6
- package/dist/commonSelectors.cjs +15 -8
- package/dist/commonSelectors.cjs.map +1 -1
- package/dist/commonSelectors.d.cts +178 -3523
- package/dist/commonSelectors.d.ts +178 -3523
- package/dist/commonSelectors.js +3 -3
- 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 +1 -1
- package/dist/deploymentsSlice/mocks.cjs.map +1 -1
- package/dist/deploymentsSlice/mocks.js +1 -1
- package/dist/deploymentsSlice/selectors.d.cts +16 -138
- package/dist/deploymentsSlice/selectors.d.ts +16 -138
- package/dist/deploymentsSlice/thunks.cjs +46 -41
- package/dist/deploymentsSlice/thunks.cjs.map +1 -1
- package/dist/deploymentsSlice/thunks.d.cts +4 -2
- package/dist/deploymentsSlice/thunks.d.ts +4 -2
- package/dist/deploymentsSlice/thunks.js +15 -15
- package/dist/devicesSlice/index.cjs +20 -16
- package/dist/devicesSlice/index.cjs.map +1 -1
- package/dist/devicesSlice/index.d.cts +11 -20
- package/dist/devicesSlice/index.d.ts +11 -20
- package/dist/devicesSlice/index.js +1 -1
- package/dist/devicesSlice/mocks.cjs +24 -22
- package/dist/devicesSlice/mocks.cjs.map +1 -1
- package/dist/devicesSlice/mocks.d.cts +20 -12
- package/dist/devicesSlice/mocks.d.ts +20 -12
- package/dist/devicesSlice/mocks.js +5 -7
- package/dist/devicesSlice/mocks.js.map +1 -1
- package/dist/devicesSlice/selectors.cjs +15 -8
- package/dist/devicesSlice/selectors.cjs.map +1 -1
- package/dist/devicesSlice/selectors.d.cts +207 -1730
- package/dist/devicesSlice/selectors.d.ts +207 -1730
- package/dist/devicesSlice/selectors.js +1 -1
- package/dist/devicesSlice/thunks.cjs +46 -43
- package/dist/devicesSlice/thunks.cjs.map +1 -1
- package/dist/devicesSlice/thunks.d.cts +12 -46
- package/dist/devicesSlice/thunks.d.ts +12 -46
- package/dist/devicesSlice/thunks.js +15 -17
- 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 +1 -1
- package/dist/monitorSlice/mocks.cjs.map +1 -1
- package/dist/monitorSlice/mocks.js +1 -1
- package/dist/monitorSlice/thunks.cjs +36 -24
- package/dist/monitorSlice/thunks.cjs.map +1 -1
- package/dist/monitorSlice/thunks.d.cts +3 -2
- package/dist/monitorSlice/thunks.d.ts +3 -2
- package/dist/monitorSlice/thunks.js +13 -13
- 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 +1 -1
- package/dist/onboardingSlice/mocks.cjs.map +1 -1
- package/dist/onboardingSlice/mocks.js +1 -1
- package/dist/onboardingSlice/thunks.cjs +46 -41
- package/dist/onboardingSlice/thunks.cjs.map +1 -1
- package/dist/onboardingSlice/thunks.d.cts +7 -15
- package/dist/onboardingSlice/thunks.d.ts +7 -15
- package/dist/onboardingSlice/thunks.js +15 -15
- package/dist/organizationSlice/index.cjs.map +1 -1
- package/dist/organizationSlice/index.d.cts +41 -31
- package/dist/organizationSlice/index.d.ts +41 -31
- package/dist/organizationSlice/index.js +1 -1
- package/dist/organizationSlice/mocks.cjs.map +1 -1
- package/dist/organizationSlice/mocks.js +1 -1
- package/dist/organizationSlice/selectors.d.cts +42 -659
- package/dist/organizationSlice/selectors.d.ts +42 -659
- package/dist/organizationSlice/thunks.cjs +46 -41
- package/dist/organizationSlice/thunks.cjs.map +1 -1
- package/dist/organizationSlice/thunks.d.cts +4 -1
- package/dist/organizationSlice/thunks.d.ts +4 -1
- package/dist/organizationSlice/thunks.js +15 -15
- package/dist/organizationSlice/types.cjs.map +1 -1
- package/dist/organizationSlice/types.d.cts +2 -12
- package/dist/organizationSlice/types.d.ts +2 -12
- package/dist/releasesSlice/mocks.d.cts +7 -1
- package/dist/releasesSlice/mocks.d.ts +7 -1
- package/dist/releasesSlice/selectors.d.cts +155 -930
- package/dist/releasesSlice/selectors.d.ts +155 -930
- package/dist/releasesSlice/thunks.cjs +36 -24
- package/dist/releasesSlice/thunks.cjs.map +1 -1
- package/dist/releasesSlice/thunks.d.cts +4 -2
- package/dist/releasesSlice/thunks.d.ts +4 -2
- package/dist/releasesSlice/thunks.js +13 -13
- package/dist/selectors.cjs +15 -8
- package/dist/selectors.cjs.map +1 -1
- package/dist/selectors.d.cts +6 -3
- package/dist/selectors.d.ts +6 -3
- package/dist/selectors.js +17 -17
- package/dist/store.cjs +21 -16
- package/dist/store.cjs.map +1 -1
- package/dist/store.d.cts +40 -658
- package/dist/store.d.ts +40 -658
- package/dist/store.js +9 -9
- package/dist/storehooks.cjs +47 -41
- package/dist/storehooks.cjs.map +1 -1
- package/dist/storehooks.js +16 -15
- package/dist/storehooks.js.map +1 -1
- package/dist/thunks.cjs +46 -43
- package/dist/thunks.cjs.map +1 -1
- package/dist/thunks.d.cts +7 -5
- package/dist/thunks.d.ts +7 -5
- package/dist/thunks.js +15 -17
- package/dist/useDeploymentDevice.cjs +46 -41
- package/dist/useDeploymentDevice.cjs.map +1 -1
- package/dist/useDeploymentDevice.js +15 -15
- package/dist/usersSlice/index.cjs.map +1 -1
- package/dist/usersSlice/index.d.cts +46 -46
- package/dist/usersSlice/index.d.ts +46 -46
- package/dist/usersSlice/index.js +1 -1
- package/dist/usersSlice/mocks.cjs.map +1 -1
- package/dist/usersSlice/mocks.js +1 -1
- package/dist/usersSlice/selectors.d.cts +75 -1436
- package/dist/usersSlice/selectors.d.ts +75 -1436
- package/dist/usersSlice/thunks.cjs +46 -41
- package/dist/usersSlice/thunks.cjs.map +1 -1
- package/dist/usersSlice/thunks.d.cts +3 -1
- package/dist/usersSlice/thunks.d.ts +3 -1
- package/dist/usersSlice/thunks.js +15 -15
- package/package.json +7 -7
- package/dist/chunk-C2LGE3P6.js.map +0 -1
- package/dist/chunk-C5NXNZ7F.js.map +0 -1
- package/dist/chunk-HLX5L3IM.js.map +0 -1
- package/dist/chunk-MH5WPYQI.js.map +0 -1
- package/dist/chunk-OFGCC3GM.js.map +0 -1
- package/dist/chunk-QOFVCPRW.js.map +0 -1
- package/dist/chunk-REZWSU22.js.map +0 -1
- package/dist/chunk-WCBHYLUK.js.map +0 -1
- package/dist/chunk-ZNAJKEP2.js.map +0 -1
- /package/dist/{chunk-ZRMB4U7Z.js.map → chunk-5XUPXMYV.js.map} +0 -0
- /package/dist/{chunk-OGUVURJ5.js.map → chunk-KVZEKHVC.js.map} +0 -0
- /package/dist/{chunk-5ZCZTTYX.js.map → chunk-LX4YRTYY.js.map} +0 -0
- /package/dist/{chunk-4HSH7RH3.js.map → chunk-PIFXECFW.js.map} +0 -0
- /package/dist/{chunk-TKIOEF3B.js.map → chunk-ZWLCUOQN.js.map} +0 -0
|
@@ -1,43 +1,35 @@
|
|
|
1
1
|
import { AppDispatch, RootState } from '../store.cjs';
|
|
2
2
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
3
3
|
import { UserSettings } from '../usersSlice/index.cjs';
|
|
4
|
-
import { OnboardingApproach } from './index.cjs';
|
|
4
|
+
import { OnboardingSliceType, OnboardingApproach } from './index.cjs';
|
|
5
5
|
import { OnboardingStep } from './constants.cjs';
|
|
6
6
|
import 'redux-thunk';
|
|
7
7
|
import 'redux';
|
|
8
|
-
import '@northern.tech/utils/constants';
|
|
9
|
-
import '../usersSlice/constants.cjs';
|
|
10
8
|
import '../releasesSlice/index.cjs';
|
|
11
9
|
import 'immer';
|
|
12
10
|
import '@northern.tech/types/MenderTypes';
|
|
11
|
+
import '@northern.tech/utils/constants';
|
|
12
|
+
import '../organizationSlice/index.cjs';
|
|
13
13
|
import '../organizationSlice/types.cjs';
|
|
14
14
|
import '../appSlice/constants.cjs';
|
|
15
15
|
import '@mui/material/OverridableComponent';
|
|
16
16
|
import '@mui/material';
|
|
17
17
|
import '../organizationSlice/constants.cjs';
|
|
18
|
-
import '
|
|
18
|
+
import '../monitorSlice/index.cjs';
|
|
19
|
+
import '../monitorSlice/constants.cjs';
|
|
19
20
|
import '../deploymentsSlice/index.cjs';
|
|
20
21
|
import '../devicesSlice/index.cjs';
|
|
21
22
|
import '../commonConstants.cjs';
|
|
22
23
|
import 'react/jsx-runtime';
|
|
23
24
|
import '../devicesSlice/constants.cjs';
|
|
24
25
|
import '../appSlice/index.cjs';
|
|
26
|
+
import '../usersSlice/constants.cjs';
|
|
25
27
|
|
|
26
28
|
declare const getOnboardingState: _reduxjs_toolkit.AsyncThunk<[{
|
|
27
29
|
payload: boolean;
|
|
28
30
|
type: "onboarding/setOnboardingComplete";
|
|
29
31
|
}, {
|
|
30
|
-
payload: Partial<
|
|
31
|
-
address?: string;
|
|
32
|
-
approach: OnboardingApproach | null;
|
|
33
|
-
complete: boolean;
|
|
34
|
-
demoArtifactPort: number;
|
|
35
|
-
deviceConnection?: string;
|
|
36
|
-
deviceType: string[] | string | null;
|
|
37
|
-
progress: string | null;
|
|
38
|
-
showTips: boolean | null;
|
|
39
|
-
showTipsDialog: boolean;
|
|
40
|
-
}>;
|
|
32
|
+
payload: Partial<OnboardingSliceType>;
|
|
41
33
|
type: "onboarding/setOnboardingState";
|
|
42
34
|
}, _reduxjs_toolkit.PayloadAction<unknown, string, {
|
|
43
35
|
arg: Partial<UserSettings> | undefined;
|
|
@@ -1,43 +1,35 @@
|
|
|
1
1
|
import { AppDispatch, RootState } from '../store.js';
|
|
2
2
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
3
3
|
import { UserSettings } from '../usersSlice/index.js';
|
|
4
|
-
import { OnboardingApproach } from './index.js';
|
|
4
|
+
import { OnboardingSliceType, OnboardingApproach } from './index.js';
|
|
5
5
|
import { OnboardingStep } from './constants.js';
|
|
6
6
|
import 'redux-thunk';
|
|
7
7
|
import 'redux';
|
|
8
|
-
import '@northern.tech/utils/constants';
|
|
9
|
-
import '../usersSlice/constants.js';
|
|
10
8
|
import '../releasesSlice/index.js';
|
|
11
9
|
import 'immer';
|
|
12
10
|
import '@northern.tech/types/MenderTypes';
|
|
11
|
+
import '@northern.tech/utils/constants';
|
|
12
|
+
import '../organizationSlice/index.js';
|
|
13
13
|
import '../organizationSlice/types.js';
|
|
14
14
|
import '../appSlice/constants.js';
|
|
15
15
|
import '@mui/material/OverridableComponent';
|
|
16
16
|
import '@mui/material';
|
|
17
17
|
import '../organizationSlice/constants.js';
|
|
18
|
-
import '
|
|
18
|
+
import '../monitorSlice/index.js';
|
|
19
|
+
import '../monitorSlice/constants.js';
|
|
19
20
|
import '../deploymentsSlice/index.js';
|
|
20
21
|
import '../devicesSlice/index.js';
|
|
21
22
|
import '../commonConstants.js';
|
|
22
23
|
import 'react/jsx-runtime';
|
|
23
24
|
import '../devicesSlice/constants.js';
|
|
24
25
|
import '../appSlice/index.js';
|
|
26
|
+
import '../usersSlice/constants.js';
|
|
25
27
|
|
|
26
28
|
declare const getOnboardingState: _reduxjs_toolkit.AsyncThunk<[{
|
|
27
29
|
payload: boolean;
|
|
28
30
|
type: "onboarding/setOnboardingComplete";
|
|
29
31
|
}, {
|
|
30
|
-
payload: Partial<
|
|
31
|
-
address?: string;
|
|
32
|
-
approach: OnboardingApproach | null;
|
|
33
|
-
complete: boolean;
|
|
34
|
-
demoArtifactPort: number;
|
|
35
|
-
deviceConnection?: string;
|
|
36
|
-
deviceType: string[] | string | null;
|
|
37
|
-
progress: string | null;
|
|
38
|
-
showTips: boolean | null;
|
|
39
|
-
showTipsDialog: boolean;
|
|
40
|
-
}>;
|
|
32
|
+
payload: Partial<OnboardingSliceType>;
|
|
41
33
|
type: "onboarding/setOnboardingState";
|
|
42
34
|
}, _reduxjs_toolkit.PayloadAction<unknown, string, {
|
|
43
35
|
arg: Partial<UserSettings> | undefined;
|
|
@@ -5,32 +5,32 @@ import {
|
|
|
5
5
|
setOnboardingCanceled,
|
|
6
6
|
setOnboardingComplete,
|
|
7
7
|
setOnboardingDeviceType
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-2SAH2AN2.js";
|
|
9
|
+
import "../chunk-5XUPXMYV.js";
|
|
10
|
+
import "../chunk-ZWLCUOQN.js";
|
|
11
|
+
import "../chunk-KVZEKHVC.js";
|
|
12
12
|
import "../chunk-Y3DJIMEN.js";
|
|
13
13
|
import "../chunk-5M6EUVNO.js";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-PIFXECFW.js";
|
|
15
|
+
import "../chunk-KJ4BPXMB.js";
|
|
15
16
|
import "../chunk-TRKA7XYU.js";
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-C2LGE3P6.js";
|
|
17
|
+
import "../chunk-5PUF4LA5.js";
|
|
18
|
+
import "../chunk-PVCHKW35.js";
|
|
19
|
+
import "../chunk-CQXDAXQF.js";
|
|
20
|
+
import "../chunk-VODRLEDP.js";
|
|
21
|
+
import "../chunk-IUGHRJV2.js";
|
|
22
|
+
import "../chunk-OLKM53RL.js";
|
|
23
23
|
import "../chunk-FDSMCFV5.js";
|
|
24
24
|
import "../chunk-53W2NRSL.js";
|
|
25
25
|
import "../chunk-NMAXZ3ZY.js";
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-GGBE6KJV.js";
|
|
26
|
+
import "../chunk-LX4YRTYY.js";
|
|
28
27
|
import "../chunk-7QKCBSFU.js";
|
|
28
|
+
import "../chunk-GGBE6KJV.js";
|
|
29
29
|
import "../chunk-3NOV7X4M.js";
|
|
30
30
|
import "../chunk-YO22XLHI.js";
|
|
31
31
|
import "../chunk-JIS4PA3R.js";
|
|
32
32
|
import "../chunk-WR6RQKF5.js";
|
|
33
|
-
import "../chunk-
|
|
33
|
+
import "../chunk-X7NEALMI.js";
|
|
34
34
|
import "../chunk-BYUPW7RA.js";
|
|
35
35
|
import "../chunk-GX2TWNLC.js";
|
|
36
36
|
import "../chunk-WWED74SG.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/organizationSlice/index.ts","../../src/constants.ts","../../src/organizationSlice/constants.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 { AuditLog, BillingProfile, Integration, Event as WebhookEvent } from '@northern.tech/types/MenderTypes';\nimport type { PayloadAction } from '@reduxjs/toolkit';\nimport { createSlice } from '@reduxjs/toolkit';\n\nimport { DEVICE_LIST_DEFAULTS, SORTING_OPTIONS, TENANT_LIST_DEFAULT } from '../constants';\nimport type { AuditLogSelectionState, Card, Organization, OrganizationState, SSOConfig, TenantList } from '../organizationSlice/types';\n\nexport const sliceName = 'organization';\n\nexport const initialState: OrganizationState = {\n card: {\n last4: '',\n expiration: { month: 1, year: 2020 },\n brand: ''\n },\n intentId: null,\n tenantList: {\n ...TENANT_LIST_DEFAULT,\n total: 0,\n tenants: [],\n selectedTenant: null,\n sort: {\n direction: SORTING_OPTIONS.desc,\n key: 'name'\n }\n },\n organization: {\n // id, name, status, tenant_token, plan\n },\n auditlog: {\n events: [],\n selectionState: {\n ...DEVICE_LIST_DEFAULTS,\n detail: undefined,\n endDate: undefined,\n selectedIssue: undefined,\n sort: { direction: SORTING_OPTIONS.desc },\n startDate: undefined,\n total: 0,\n type: undefined,\n user: undefined,\n isLoading: false\n }\n },\n externalDeviceIntegrations: [\n // { <connection_string|x509|...>, id, provider }\n ],\n ssoConfigs: [],\n webhooks: {\n // [id]: { events: [] }\n // for now:\n events: [],\n eventsTotal: 0\n }\n};\n\nexport const organizationSlice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n receiveAuditLogs: (state, action: PayloadAction<{ events: AuditLog[]; total: number }>) => {\n const { events, total } = action.payload;\n state.auditlog.events = events;\n state.auditlog.selectionState.total = total;\n },\n setAuditLogState: (state, action: PayloadAction<Partial<AuditLogSelectionState>>) => {\n state.auditlog.selectionState = {\n ...state.auditlog.selectionState,\n ...action.payload\n };\n },\n receiveCurrentCard: (state, action: PayloadAction<Card>) => {\n state.card = action.payload;\n },\n receiveSetupIntent: (state, action: PayloadAction<string | null>) => {\n state.intentId = action.payload;\n },\n setOrganization: (state, action: PayloadAction<Partial<Organization>>) => {\n state.organization = { ...state.organization, ...action.payload };\n },\n setSubscription: (state, action) => {\n state.organization.subscription = { ...state.organization.subscription, ...action.payload };\n },\n setBillingProfile: (state, action: PayloadAction<BillingProfile>) => {\n state.organization.billing_profile = action.payload;\n },\n setTenantListState: (state, action: PayloadAction<TenantList>) => {\n state.tenantList = action.payload;\n },\n receiveExternalDeviceIntegrations: (state, action: PayloadAction<Integration[]>) => {\n state.externalDeviceIntegrations = action.payload;\n },\n receiveSsoConfigs: (state, action: PayloadAction<SSOConfig[]>) => {\n state.ssoConfigs = action.payload;\n },\n receiveWebhookEvents: (state, action: PayloadAction<{ total: number; value: WebhookEvent[] }>) => {\n const { value, total } = action.payload;\n state.webhooks.events = value;\n state.webhooks.eventsTotal = total;\n }\n }\n});\n\nexport const actions = organizationSlice.actions;\nexport default organizationSlice.reducer;\n","// Copyright 2024 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//@ts-nocheck\nimport {\n ALL_DEVICES,\n ALL_DEVICE_STATES,\n ALL_RELEASES,\n APPLICATION_JSON_CONTENT_TYPE,\n APPLICATION_JWT_CONTENT_TYPE,\n ATTRIBUTE_SCOPES,\n DEVICE_FILTERING_OPTIONS,\n DEVICE_ISSUE_OPTIONS,\n DEVICE_LIST_DEFAULTS,\n DEVICE_STATES,\n PermissionTypes,\n SORTING_OPTIONS,\n alertChannels,\n apiRoot,\n apiUrl,\n auditLogsApiUrl,\n defaultPermissionSets,\n deploymentsApiUrl,\n deploymentsApiUrlV2,\n deviceAuthV2,\n deviceConfig,\n deviceConnect,\n emptyRole,\n emptyUiPermissions,\n headerNames,\n inventoryApiUrl,\n inventoryApiUrlV2,\n iotManagerBaseURL,\n limitDefault,\n maxSessionAge,\n monitorApiUrlv1,\n reportingApiUrl,\n rolesById,\n rolesByName,\n scopedPermissionAreas,\n serviceProviderRolesById,\n ssoIdpApiUrlv1,\n tenantadmApiUrlv1,\n tenantadmApiUrlv2,\n twoFAStates,\n uiPermissionsByArea,\n uiPermissionsById,\n useradmApiUrl,\n useradmApiUrlv1,\n useradmApiUrlv2\n} from '@northern.tech/utils/constants';\nimport type {\n AnyPermission,\n AuditLogPermission,\n DeploymentPermission,\n DeviceIssueOptionKey,\n GroupsPermission,\n PermissionObject,\n PermissionSet,\n PermissionSetId,\n ReleasesPermission,\n Role,\n ScopedPermissionsByAreaKey,\n SortOptions,\n UiPermissionsByAreaKey,\n UiPermissionsByIdKey,\n UiPermissionsDefinition,\n UserManagementPermission\n} from '@northern.tech/utils/constants';\n\nexport {\n alertChannels,\n ALL_DEVICE_STATES,\n ALL_DEVICES,\n ALL_RELEASES,\n APPLICATION_JSON_CONTENT_TYPE,\n APPLICATION_JWT_CONTENT_TYPE,\n ATTRIBUTE_SCOPES,\n apiRoot,\n apiUrl,\n auditLogsApiUrl,\n defaultPermissionSets,\n deploymentsApiUrl,\n deploymentsApiUrlV2,\n DEVICE_FILTERING_OPTIONS,\n DEVICE_ISSUE_OPTIONS,\n DEVICE_LIST_DEFAULTS,\n DEVICE_STATES,\n deviceAuthV2,\n deviceConfig,\n deviceConnect,\n emptyRole,\n emptyUiPermissions,\n headerNames,\n inventoryApiUrl,\n inventoryApiUrlV2,\n iotManagerBaseURL,\n monitorApiUrlv1,\n limitDefault,\n maxSessionAge,\n PermissionTypes,\n reportingApiUrl,\n rolesById,\n rolesByName,\n scopedPermissionAreas,\n serviceProviderRolesById,\n SORTING_OPTIONS,\n ssoIdpApiUrlv1,\n tenantadmApiUrlv1,\n tenantadmApiUrlv2,\n twoFAStates,\n uiPermissionsByArea,\n uiPermissionsById,\n useradmApiUrl,\n useradmApiUrlv1,\n useradmApiUrlv2\n};\n\nexport type {\n AnyPermission,\n AuditLogPermission,\n DeploymentPermission,\n DeviceIssueOptionKey,\n GroupsPermission,\n PermissionObject,\n PermissionSet,\n PermissionSetId,\n ReleasesPermission,\n Role,\n ScopedPermissionsByAreaKey,\n SortOptions,\n UiPermissionsByAreaKey,\n UiPermissionsByIdKey,\n UiPermissionsDefinition,\n UserManagementPermission\n};\n\nexport * from './appSlice/constants';\nexport * from './commonConstants';\nexport * from './deploymentsSlice/constants';\nexport * from './devicesSlice/constants';\nexport * from './monitorSlice/constants';\nexport * from './onboardingSlice/constants';\nexport * from './organizationSlice/constants';\nexport * from './releasesSlice/constants';\nexport * from './usersSlice/constants';\n","// Copyright 2020 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { useradmApiUrl } from '../constants';\n\nexport const XML_METADATA_FORMAT = 'xml';\nexport const JSON_METADATA_FORMAT = 'json';\n\nexport const getSamlStartUrl = id => `${window.location.origin}${useradmApiUrl}/auth/sso/${id}/login`;\nexport const getOidcStartUrl = id => `${window.location.origin}${useradmApiUrl}/oidc/${id}/start`;\n\nexport const SSO_TYPES = {\n saml: {\n id: 'saml',\n type: 'saml',\n title: 'SAML',\n metadataFormat: XML_METADATA_FORMAT,\n editorLanguage: XML_METADATA_FORMAT,\n contentType: 'application/samlmetadata+xml',\n getStartUrl: getSamlStartUrl,\n configDetails: [\n { key: 'entityID', label: 'Entity ID', getValue: id => `${window.location.origin}${useradmApiUrl}/sso/sp/metadata/${id}` },\n { key: 'acs', label: 'ACS URL', getValue: id => `${window.location.origin}${useradmApiUrl}/auth/sso/${id}/acs` },\n { key: 'startURL', label: 'Start URL', getValue: getSamlStartUrl }\n ]\n },\n oidc: {\n id: 'oidc',\n type: 'oidc',\n title: 'OpenID Connect',\n metadataFormat: JSON_METADATA_FORMAT,\n editorLanguage: JSON_METADATA_FORMAT,\n contentType: 'application/json',\n getStartUrl: getOidcStartUrl,\n configDetails: [{ key: 'startURL', label: 'Start Url', getValue: getOidcStartUrl }]\n }\n} as const;\n\nexport type ContentType = (typeof SSO_TYPES)[keyof typeof SSO_TYPES]['contentType'];\n\nexport const auditlogTypes = {\n artifact: { title: 'Artifact', queryParameter: 'object_type', value: 'artifact' },\n deployment: { title: 'Deployment', queryParameter: 'object_deployment_name', value: 'deployment' },\n device: { title: 'Device', queryParameter: 'object_id', value: 'device' },\n user_access_token: { title: 'Personal Access Token', queryParameter: 'user_access_token', value: 'user_access_token' },\n user: { title: 'User', queryParameter: 'object_id', value: 'user' },\n tenant: { title: 'Tenant', queryParameter: 'object_id', value: 'tenant' }\n};\n\nexport const AUDIT_LOGS_TYPES = [auditlogTypes.artifact, auditlogTypes.deployment, auditlogTypes.device, auditlogTypes.user_access_token, auditlogTypes.user];\nexport const SP_AUDIT_LOGS_TYPES = [auditlogTypes.user, auditlogTypes.tenant];\n\nexport const TENANT_LIST_DEFAULT = {\n page: 1,\n perPage: 20\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeA,qBAA4B;;;ACD5B,uBA8CO;;;ACVA,IAAM,gBAAgB;AAAA,EAC3B,UAAU,EAAE,OAAO,YAAY,gBAAgB,eAAe,OAAO,WAAW;AAAA,EAChF,YAAY,EAAE,OAAO,cAAc,gBAAgB,0BAA0B,OAAO,aAAa;AAAA,EACjG,QAAQ,EAAE,OAAO,UAAU,gBAAgB,aAAa,OAAO,SAAS;AAAA,EACxE,mBAAmB,EAAE,OAAO,yBAAyB,gBAAgB,qBAAqB,OAAO,oBAAoB;AAAA,EACrH,MAAM,EAAE,OAAO,QAAQ,gBAAgB,aAAa,OAAO,OAAO;AAAA,EAClE,QAAQ,EAAE,OAAO,UAAU,gBAAgB,aAAa,OAAO,SAAS;AAC1E;AAEO,IAAM,mBAAmB,CAAC,cAAc,UAAU,cAAc,YAAY,cAAc,QAAQ,cAAc,mBAAmB,cAAc,IAAI;AACrJ,IAAM,sBAAsB,CAAC,cAAc,MAAM,cAAc,MAAM;AAErE,IAAM,sBAAsB;AAAA,EACjC,MAAM;AAAA,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AAC1D,YAAM,OAAO,OAAO;AAAA,IACtB;AAAA,IACA,oBAAoB,CAAC,OAAO,WAAyC;AACnE,YAAM,WAAW,OAAO;AAAA,IAC1B;AAAA,IACA,iBAAiB,CAAC,OAAO,WAAiD;AACxE,YAAM,eAAe,EAAE,GAAG,MAAM,cAAc,GAAG,OAAO,QAAQ;AAAA,IAClE;AAAA,IACA,iBAAiB,CAAC,OAAO,WAAW;AAClC,YAAM,aAAa,eAAe,EAAE,GAAG,MAAM,aAAa,cAAc,GAAG,OAAO,QAAQ;AAAA,IAC5F;AAAA,IACA,mBAAmB,CAAC,OAAO,WAA0C;AACnE,YAAM,aAAa,kBAAkB,OAAO;AAAA,IAC9C;AAAA,IACA,oBAAoB,CAAC,OAAO,WAAsC;AAChE,YAAM,aAAa,OAAO;AAAA,IAC5B;AAAA,IACA,mCAAmC,CAAC,OAAO,WAAyC;AAClF,YAAM,6BAA6B,OAAO;AAAA,IAC5C;AAAA,IACA,mBAAmB,CAAC,OAAO,WAAuC;AAChE,YAAM,aAAa,OAAO;AAAA,IAC5B;AAAA,IACA,sBAAsB,CAAC,OAAO,WAAoE;AAChG,YAAM,EAAE,OAAO,MAAM,IAAI,OAAO;AAChC,YAAM,SAAS,SAAS;AACxB,YAAM,SAAS,cAAc;AAAA,IAC/B;AAAA,EACF;AACF,CAAC;AAEM,IAAM,UAAU,kBAAkB;AACzC,IAAO,4BAAQ,kBAAkB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/organizationSlice/index.ts","../../src/constants.ts","../../src/organizationSlice/constants.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 { AuditLog as AuditLogEvent, BillingProfile, Integration, Event as WebhookEvent } from '@northern.tech/types/MenderTypes';\nimport type { PayloadAction } from '@reduxjs/toolkit';\nimport { createSlice } from '@reduxjs/toolkit';\n\nimport { DEVICE_LIST_DEFAULTS, SORTING_OPTIONS, TENANT_LIST_DEFAULT } from '../constants';\nimport type { AuditLog, AuditLogSelectionState, Card, Organization, SSOConfig, TenantList, Webhook } from './types';\n\nexport const sliceName = 'organization';\n\nexport type OrganizationSliceType = {\n auditlog: AuditLog;\n card: Card;\n externalDeviceIntegrations: Integration[];\n intentId: string | null;\n organization: Partial<Organization>;\n ssoConfigs: SSOConfig[];\n tenantList: TenantList;\n webhooks: Webhook;\n}\n\nexport const initialState: OrganizationSliceType = {\n card: {\n last4: '',\n expiration: { month: 1, year: 2020 },\n brand: ''\n },\n intentId: null,\n tenantList: {\n ...TENANT_LIST_DEFAULT,\n total: 0,\n tenants: [],\n selectedTenant: null,\n sort: {\n direction: SORTING_OPTIONS.desc,\n key: 'name'\n }\n },\n organization: {\n // id, name, status, tenant_token, plan\n },\n auditlog: {\n events: [],\n selectionState: {\n ...DEVICE_LIST_DEFAULTS,\n detail: undefined,\n endDate: undefined,\n selectedIssue: undefined,\n sort: { direction: SORTING_OPTIONS.desc },\n startDate: undefined,\n total: 0,\n type: undefined,\n user: undefined,\n isLoading: false\n }\n },\n externalDeviceIntegrations: [\n // { <connection_string|x509|...>, id, provider }\n ],\n ssoConfigs: [],\n webhooks: {\n // [id]: { events: [] }\n // for now:\n events: [],\n eventsTotal: 0\n }\n};\n\nexport const organizationSlice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n receiveAuditLogs: (state, action: PayloadAction<{ events: AuditLogEvent[]; total: number }>) => {\n const { events, total } = action.payload;\n state.auditlog.events = events;\n state.auditlog.selectionState.total = total;\n },\n setAuditLogState: (state, action: PayloadAction<Partial<AuditLogSelectionState>>) => {\n state.auditlog.selectionState = {\n ...state.auditlog.selectionState,\n ...action.payload\n };\n },\n receiveCurrentCard: (state, action: PayloadAction<Card>) => {\n state.card = action.payload;\n },\n receiveSetupIntent: (state, action: PayloadAction<string | null>) => {\n state.intentId = action.payload;\n },\n setOrganization: (state, action: PayloadAction<Partial<Organization>>) => {\n state.organization = { ...state.organization, ...action.payload };\n },\n setSubscription: (state, action) => {\n state.organization.subscription = { ...state.organization.subscription, ...action.payload };\n },\n setBillingProfile: (state, action: PayloadAction<BillingProfile>) => {\n state.organization.billing_profile = action.payload;\n },\n setTenantListState: (state, action: PayloadAction<TenantList>) => {\n state.tenantList = action.payload;\n },\n receiveExternalDeviceIntegrations: (state, action: PayloadAction<Integration[]>) => {\n state.externalDeviceIntegrations = action.payload;\n },\n receiveSsoConfigs: (state, action: PayloadAction<SSOConfig[]>) => {\n state.ssoConfigs = action.payload;\n },\n receiveWebhookEvents: (state, action: PayloadAction<{ total: number; value: WebhookEvent[] }>) => {\n const { value, total } = action.payload;\n state.webhooks.events = value;\n state.webhooks.eventsTotal = total;\n }\n }\n});\n\nexport const actions = organizationSlice.actions;\nexport default organizationSlice.reducer;\n","// Copyright 2024 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//@ts-nocheck\nimport {\n ALL_DEVICES,\n ALL_DEVICE_STATES,\n ALL_RELEASES,\n APPLICATION_JSON_CONTENT_TYPE,\n APPLICATION_JWT_CONTENT_TYPE,\n ATTRIBUTE_SCOPES,\n DEVICE_FILTERING_OPTIONS,\n DEVICE_ISSUE_OPTIONS,\n DEVICE_LIST_DEFAULTS,\n DEVICE_STATES,\n PermissionTypes,\n SORTING_OPTIONS,\n alertChannels,\n apiRoot,\n apiUrl,\n auditLogsApiUrl,\n defaultPermissionSets,\n deploymentsApiUrl,\n deploymentsApiUrlV2,\n deviceAuthV2,\n deviceConfig,\n deviceConnect,\n emptyRole,\n emptyUiPermissions,\n headerNames,\n inventoryApiUrl,\n inventoryApiUrlV2,\n iotManagerBaseURL,\n limitDefault,\n maxSessionAge,\n monitorApiUrlv1,\n reportingApiUrl,\n rolesById,\n rolesByName,\n scopedPermissionAreas,\n serviceProviderRolesById,\n ssoIdpApiUrlv1,\n tenantadmApiUrlv1,\n tenantadmApiUrlv2,\n twoFAStates,\n uiPermissionsByArea,\n uiPermissionsById,\n useradmApiUrl,\n useradmApiUrlv1,\n useradmApiUrlv2\n} from '@northern.tech/utils/constants';\nimport type {\n AnyPermission,\n AuditLogPermission,\n DeploymentPermission,\n DeviceIssueOptionKey,\n GroupsPermission,\n PermissionObject,\n PermissionSet,\n PermissionSetId,\n ReleasesPermission,\n Role,\n ScopedPermissionsByAreaKey,\n SortOptions,\n UiPermissionsByAreaKey,\n UiPermissionsByIdKey,\n UiPermissionsDefinition,\n UserManagementPermission\n} from '@northern.tech/utils/constants';\n\nexport {\n alertChannels,\n ALL_DEVICE_STATES,\n ALL_DEVICES,\n ALL_RELEASES,\n APPLICATION_JSON_CONTENT_TYPE,\n APPLICATION_JWT_CONTENT_TYPE,\n ATTRIBUTE_SCOPES,\n apiRoot,\n apiUrl,\n auditLogsApiUrl,\n defaultPermissionSets,\n deploymentsApiUrl,\n deploymentsApiUrlV2,\n DEVICE_FILTERING_OPTIONS,\n DEVICE_ISSUE_OPTIONS,\n DEVICE_LIST_DEFAULTS,\n DEVICE_STATES,\n deviceAuthV2,\n deviceConfig,\n deviceConnect,\n emptyRole,\n emptyUiPermissions,\n headerNames,\n inventoryApiUrl,\n inventoryApiUrlV2,\n iotManagerBaseURL,\n monitorApiUrlv1,\n limitDefault,\n maxSessionAge,\n PermissionTypes,\n reportingApiUrl,\n rolesById,\n rolesByName,\n scopedPermissionAreas,\n serviceProviderRolesById,\n SORTING_OPTIONS,\n ssoIdpApiUrlv1,\n tenantadmApiUrlv1,\n tenantadmApiUrlv2,\n twoFAStates,\n uiPermissionsByArea,\n uiPermissionsById,\n useradmApiUrl,\n useradmApiUrlv1,\n useradmApiUrlv2\n};\n\nexport type {\n AnyPermission,\n AuditLogPermission,\n DeploymentPermission,\n DeviceIssueOptionKey,\n GroupsPermission,\n PermissionObject,\n PermissionSet,\n PermissionSetId,\n ReleasesPermission,\n Role,\n ScopedPermissionsByAreaKey,\n SortOptions,\n UiPermissionsByAreaKey,\n UiPermissionsByIdKey,\n UiPermissionsDefinition,\n UserManagementPermission\n};\n\nexport * from './appSlice/constants';\nexport * from './commonConstants';\nexport * from './deploymentsSlice/constants';\nexport * from './devicesSlice/constants';\nexport * from './monitorSlice/constants';\nexport * from './onboardingSlice/constants';\nexport * from './organizationSlice/constants';\nexport * from './releasesSlice/constants';\nexport * from './usersSlice/constants';\n","// Copyright 2020 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { useradmApiUrl } from '../constants';\n\nexport const XML_METADATA_FORMAT = 'xml';\nexport const JSON_METADATA_FORMAT = 'json';\n\nexport const getSamlStartUrl = id => `${window.location.origin}${useradmApiUrl}/auth/sso/${id}/login`;\nexport const getOidcStartUrl = id => `${window.location.origin}${useradmApiUrl}/oidc/${id}/start`;\n\nexport const SSO_TYPES = {\n saml: {\n id: 'saml',\n type: 'saml',\n title: 'SAML',\n metadataFormat: XML_METADATA_FORMAT,\n editorLanguage: XML_METADATA_FORMAT,\n contentType: 'application/samlmetadata+xml',\n getStartUrl: getSamlStartUrl,\n configDetails: [\n { key: 'entityID', label: 'Entity ID', getValue: id => `${window.location.origin}${useradmApiUrl}/sso/sp/metadata/${id}` },\n { key: 'acs', label: 'ACS URL', getValue: id => `${window.location.origin}${useradmApiUrl}/auth/sso/${id}/acs` },\n { key: 'startURL', label: 'Start URL', getValue: getSamlStartUrl }\n ]\n },\n oidc: {\n id: 'oidc',\n type: 'oidc',\n title: 'OpenID Connect',\n metadataFormat: JSON_METADATA_FORMAT,\n editorLanguage: JSON_METADATA_FORMAT,\n contentType: 'application/json',\n getStartUrl: getOidcStartUrl,\n configDetails: [{ key: 'startURL', label: 'Start Url', getValue: getOidcStartUrl }]\n }\n} as const;\n\nexport type ContentType = (typeof SSO_TYPES)[keyof typeof SSO_TYPES]['contentType'];\n\nexport const auditlogTypes = {\n artifact: { title: 'Artifact', queryParameter: 'object_type', value: 'artifact' },\n deployment: { title: 'Deployment', queryParameter: 'object_deployment_name', value: 'deployment' },\n device: { title: 'Device', queryParameter: 'object_id', value: 'device' },\n user_access_token: { title: 'Personal Access Token', queryParameter: 'user_access_token', value: 'user_access_token' },\n user: { title: 'User', queryParameter: 'object_id', value: 'user' },\n tenant: { title: 'Tenant', queryParameter: 'object_id', value: 'tenant' }\n};\n\nexport const AUDIT_LOGS_TYPES = [auditlogTypes.artifact, auditlogTypes.deployment, auditlogTypes.device, auditlogTypes.user_access_token, auditlogTypes.user];\nexport const SP_AUDIT_LOGS_TYPES = [auditlogTypes.user, auditlogTypes.tenant];\n\nexport const TENANT_LIST_DEFAULT = {\n page: 1,\n perPage: 20\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeA,qBAA4B;;;ACD5B,uBA8CO;;;ACVA,IAAM,gBAAgB;AAAA,EAC3B,UAAU,EAAE,OAAO,YAAY,gBAAgB,eAAe,OAAO,WAAW;AAAA,EAChF,YAAY,EAAE,OAAO,cAAc,gBAAgB,0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SAAS,SAAS;AACxB,YAAM,SAAS,cAAc;AAAA,IAC/B;AAAA,EACF;AACF,CAAC;AAEM,IAAM,UAAU,kBAAkB;AACzC,IAAO,4BAAQ,kBAAkB;","names":[]}
|
|
@@ -2,8 +2,8 @@ import * as redux from 'redux';
|
|
|
2
2
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
3
3
|
import { PayloadAction } from '@reduxjs/toolkit';
|
|
4
4
|
import * as immer from 'immer';
|
|
5
|
-
import { AuditLog, BillingProfile,
|
|
6
|
-
import {
|
|
5
|
+
import { Integration, AuditLog as AuditLog$1, BillingProfile, Event } from '@northern.tech/types/MenderTypes';
|
|
6
|
+
import { AuditLog, Card, Organization, SSOConfig, TenantList, Webhook, AuditLogSelectionState } from './types.cjs';
|
|
7
7
|
import '@northern.tech/utils/constants';
|
|
8
8
|
import '../appSlice/constants.cjs';
|
|
9
9
|
import '@mui/material/OverridableComponent';
|
|
@@ -11,51 +11,61 @@ import '@mui/material';
|
|
|
11
11
|
import './constants.cjs';
|
|
12
12
|
|
|
13
13
|
declare const sliceName = "organization";
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
type OrganizationSliceType = {
|
|
15
|
+
auditlog: AuditLog;
|
|
16
|
+
card: Card;
|
|
17
|
+
externalDeviceIntegrations: Integration[];
|
|
18
|
+
intentId: string | null;
|
|
19
|
+
organization: Partial<Organization>;
|
|
20
|
+
ssoConfigs: SSOConfig[];
|
|
21
|
+
tenantList: TenantList;
|
|
22
|
+
webhooks: Webhook;
|
|
23
|
+
};
|
|
24
|
+
declare const initialState: OrganizationSliceType;
|
|
25
|
+
declare const organizationSlice: _reduxjs_toolkit.Slice<OrganizationSliceType, {
|
|
26
|
+
receiveAuditLogs: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<{
|
|
27
|
+
events: AuditLog$1[];
|
|
18
28
|
total: number;
|
|
19
29
|
}>) => void;
|
|
20
|
-
setAuditLogState: (state: immer.WritableDraft<
|
|
21
|
-
receiveCurrentCard: (state: immer.WritableDraft<
|
|
22
|
-
receiveSetupIntent: (state: immer.WritableDraft<
|
|
23
|
-
setOrganization: (state: immer.WritableDraft<
|
|
24
|
-
setSubscription: (state: immer.WritableDraft<
|
|
30
|
+
setAuditLogState: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<Partial<AuditLogSelectionState>>) => void;
|
|
31
|
+
receiveCurrentCard: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<Card>) => void;
|
|
32
|
+
receiveSetupIntent: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<string | null>) => void;
|
|
33
|
+
setOrganization: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<Partial<Organization>>) => void;
|
|
34
|
+
setSubscription: (state: immer.WritableDraft<OrganizationSliceType>, action: {
|
|
25
35
|
payload: any;
|
|
26
36
|
type: string;
|
|
27
37
|
}) => void;
|
|
28
|
-
setBillingProfile: (state: immer.WritableDraft<
|
|
29
|
-
setTenantListState: (state: immer.WritableDraft<
|
|
30
|
-
receiveExternalDeviceIntegrations: (state: immer.WritableDraft<
|
|
31
|
-
receiveSsoConfigs: (state: immer.WritableDraft<
|
|
32
|
-
receiveWebhookEvents: (state: immer.WritableDraft<
|
|
38
|
+
setBillingProfile: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<BillingProfile>) => void;
|
|
39
|
+
setTenantListState: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<TenantList>) => void;
|
|
40
|
+
receiveExternalDeviceIntegrations: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<Integration[]>) => void;
|
|
41
|
+
receiveSsoConfigs: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<SSOConfig[]>) => void;
|
|
42
|
+
receiveWebhookEvents: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<{
|
|
33
43
|
total: number;
|
|
34
44
|
value: Event[];
|
|
35
45
|
}>) => void;
|
|
36
|
-
}, "organization", "organization", _reduxjs_toolkit.SliceSelectors<
|
|
46
|
+
}, "organization", "organization", _reduxjs_toolkit.SliceSelectors<OrganizationSliceType>>;
|
|
37
47
|
declare const actions: _reduxjs_toolkit.CaseReducerActions<{
|
|
38
|
-
receiveAuditLogs: (state: immer.WritableDraft<
|
|
39
|
-
events: AuditLog[];
|
|
48
|
+
receiveAuditLogs: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<{
|
|
49
|
+
events: AuditLog$1[];
|
|
40
50
|
total: number;
|
|
41
51
|
}>) => void;
|
|
42
|
-
setAuditLogState: (state: immer.WritableDraft<
|
|
43
|
-
receiveCurrentCard: (state: immer.WritableDraft<
|
|
44
|
-
receiveSetupIntent: (state: immer.WritableDraft<
|
|
45
|
-
setOrganization: (state: immer.WritableDraft<
|
|
46
|
-
setSubscription: (state: immer.WritableDraft<
|
|
52
|
+
setAuditLogState: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<Partial<AuditLogSelectionState>>) => void;
|
|
53
|
+
receiveCurrentCard: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<Card>) => void;
|
|
54
|
+
receiveSetupIntent: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<string | null>) => void;
|
|
55
|
+
setOrganization: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<Partial<Organization>>) => void;
|
|
56
|
+
setSubscription: (state: immer.WritableDraft<OrganizationSliceType>, action: {
|
|
47
57
|
payload: any;
|
|
48
58
|
type: string;
|
|
49
59
|
}) => void;
|
|
50
|
-
setBillingProfile: (state: immer.WritableDraft<
|
|
51
|
-
setTenantListState: (state: immer.WritableDraft<
|
|
52
|
-
receiveExternalDeviceIntegrations: (state: immer.WritableDraft<
|
|
53
|
-
receiveSsoConfigs: (state: immer.WritableDraft<
|
|
54
|
-
receiveWebhookEvents: (state: immer.WritableDraft<
|
|
60
|
+
setBillingProfile: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<BillingProfile>) => void;
|
|
61
|
+
setTenantListState: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<TenantList>) => void;
|
|
62
|
+
receiveExternalDeviceIntegrations: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<Integration[]>) => void;
|
|
63
|
+
receiveSsoConfigs: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<SSOConfig[]>) => void;
|
|
64
|
+
receiveWebhookEvents: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<{
|
|
55
65
|
total: number;
|
|
56
66
|
value: Event[];
|
|
57
67
|
}>) => void;
|
|
58
68
|
}, "organization">;
|
|
59
|
-
declare const _default: redux.Reducer<
|
|
69
|
+
declare const _default: redux.Reducer<OrganizationSliceType>;
|
|
60
70
|
|
|
61
|
-
export { actions, _default as default, initialState, organizationSlice, sliceName };
|
|
71
|
+
export { type OrganizationSliceType, actions, _default as default, initialState, organizationSlice, sliceName };
|
|
@@ -2,8 +2,8 @@ import * as redux from 'redux';
|
|
|
2
2
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
3
3
|
import { PayloadAction } from '@reduxjs/toolkit';
|
|
4
4
|
import * as immer from 'immer';
|
|
5
|
-
import { AuditLog, BillingProfile,
|
|
6
|
-
import {
|
|
5
|
+
import { Integration, AuditLog as AuditLog$1, BillingProfile, Event } from '@northern.tech/types/MenderTypes';
|
|
6
|
+
import { AuditLog, Card, Organization, SSOConfig, TenantList, Webhook, AuditLogSelectionState } from './types.js';
|
|
7
7
|
import '@northern.tech/utils/constants';
|
|
8
8
|
import '../appSlice/constants.js';
|
|
9
9
|
import '@mui/material/OverridableComponent';
|
|
@@ -11,51 +11,61 @@ import '@mui/material';
|
|
|
11
11
|
import './constants.js';
|
|
12
12
|
|
|
13
13
|
declare const sliceName = "organization";
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
type OrganizationSliceType = {
|
|
15
|
+
auditlog: AuditLog;
|
|
16
|
+
card: Card;
|
|
17
|
+
externalDeviceIntegrations: Integration[];
|
|
18
|
+
intentId: string | null;
|
|
19
|
+
organization: Partial<Organization>;
|
|
20
|
+
ssoConfigs: SSOConfig[];
|
|
21
|
+
tenantList: TenantList;
|
|
22
|
+
webhooks: Webhook;
|
|
23
|
+
};
|
|
24
|
+
declare const initialState: OrganizationSliceType;
|
|
25
|
+
declare const organizationSlice: _reduxjs_toolkit.Slice<OrganizationSliceType, {
|
|
26
|
+
receiveAuditLogs: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<{
|
|
27
|
+
events: AuditLog$1[];
|
|
18
28
|
total: number;
|
|
19
29
|
}>) => void;
|
|
20
|
-
setAuditLogState: (state: immer.WritableDraft<
|
|
21
|
-
receiveCurrentCard: (state: immer.WritableDraft<
|
|
22
|
-
receiveSetupIntent: (state: immer.WritableDraft<
|
|
23
|
-
setOrganization: (state: immer.WritableDraft<
|
|
24
|
-
setSubscription: (state: immer.WritableDraft<
|
|
30
|
+
setAuditLogState: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<Partial<AuditLogSelectionState>>) => void;
|
|
31
|
+
receiveCurrentCard: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<Card>) => void;
|
|
32
|
+
receiveSetupIntent: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<string | null>) => void;
|
|
33
|
+
setOrganization: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<Partial<Organization>>) => void;
|
|
34
|
+
setSubscription: (state: immer.WritableDraft<OrganizationSliceType>, action: {
|
|
25
35
|
payload: any;
|
|
26
36
|
type: string;
|
|
27
37
|
}) => void;
|
|
28
|
-
setBillingProfile: (state: immer.WritableDraft<
|
|
29
|
-
setTenantListState: (state: immer.WritableDraft<
|
|
30
|
-
receiveExternalDeviceIntegrations: (state: immer.WritableDraft<
|
|
31
|
-
receiveSsoConfigs: (state: immer.WritableDraft<
|
|
32
|
-
receiveWebhookEvents: (state: immer.WritableDraft<
|
|
38
|
+
setBillingProfile: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<BillingProfile>) => void;
|
|
39
|
+
setTenantListState: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<TenantList>) => void;
|
|
40
|
+
receiveExternalDeviceIntegrations: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<Integration[]>) => void;
|
|
41
|
+
receiveSsoConfigs: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<SSOConfig[]>) => void;
|
|
42
|
+
receiveWebhookEvents: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<{
|
|
33
43
|
total: number;
|
|
34
44
|
value: Event[];
|
|
35
45
|
}>) => void;
|
|
36
|
-
}, "organization", "organization", _reduxjs_toolkit.SliceSelectors<
|
|
46
|
+
}, "organization", "organization", _reduxjs_toolkit.SliceSelectors<OrganizationSliceType>>;
|
|
37
47
|
declare const actions: _reduxjs_toolkit.CaseReducerActions<{
|
|
38
|
-
receiveAuditLogs: (state: immer.WritableDraft<
|
|
39
|
-
events: AuditLog[];
|
|
48
|
+
receiveAuditLogs: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<{
|
|
49
|
+
events: AuditLog$1[];
|
|
40
50
|
total: number;
|
|
41
51
|
}>) => void;
|
|
42
|
-
setAuditLogState: (state: immer.WritableDraft<
|
|
43
|
-
receiveCurrentCard: (state: immer.WritableDraft<
|
|
44
|
-
receiveSetupIntent: (state: immer.WritableDraft<
|
|
45
|
-
setOrganization: (state: immer.WritableDraft<
|
|
46
|
-
setSubscription: (state: immer.WritableDraft<
|
|
52
|
+
setAuditLogState: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<Partial<AuditLogSelectionState>>) => void;
|
|
53
|
+
receiveCurrentCard: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<Card>) => void;
|
|
54
|
+
receiveSetupIntent: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<string | null>) => void;
|
|
55
|
+
setOrganization: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<Partial<Organization>>) => void;
|
|
56
|
+
setSubscription: (state: immer.WritableDraft<OrganizationSliceType>, action: {
|
|
47
57
|
payload: any;
|
|
48
58
|
type: string;
|
|
49
59
|
}) => void;
|
|
50
|
-
setBillingProfile: (state: immer.WritableDraft<
|
|
51
|
-
setTenantListState: (state: immer.WritableDraft<
|
|
52
|
-
receiveExternalDeviceIntegrations: (state: immer.WritableDraft<
|
|
53
|
-
receiveSsoConfigs: (state: immer.WritableDraft<
|
|
54
|
-
receiveWebhookEvents: (state: immer.WritableDraft<
|
|
60
|
+
setBillingProfile: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<BillingProfile>) => void;
|
|
61
|
+
setTenantListState: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<TenantList>) => void;
|
|
62
|
+
receiveExternalDeviceIntegrations: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<Integration[]>) => void;
|
|
63
|
+
receiveSsoConfigs: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<SSOConfig[]>) => void;
|
|
64
|
+
receiveWebhookEvents: (state: immer.WritableDraft<OrganizationSliceType>, action: PayloadAction<{
|
|
55
65
|
total: number;
|
|
56
66
|
value: Event[];
|
|
57
67
|
}>) => void;
|
|
58
68
|
}, "organization">;
|
|
59
|
-
declare const _default: redux.Reducer<
|
|
69
|
+
declare const _default: redux.Reducer<OrganizationSliceType>;
|
|
60
70
|
|
|
61
|
-
export { actions, _default as default, initialState, organizationSlice, sliceName };
|
|
71
|
+
export { type OrganizationSliceType, actions, _default as default, initialState, organizationSlice, sliceName };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/organizationSlice/mocks.ts","../../src/constants.ts","../../src/organizationSlice/constants.ts","../../src/organizationSlice/index.ts"],"sourcesContent":["// Copyright 2025 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { DEVICE_LIST_DEFAULTS } from '../constants';\nimport { initialState } from './index';\n\nexport const mockState = {\n ...initialState,\n card: {\n brand: 'testCorp',\n last4: '7890',\n expiration: { month: 1, year: 2024 }\n },\n auditlog: {\n events: [\n {\n actor: {\n id: 'string',\n type: 'user',\n email: 'string@example.com'\n },\n time: '2019-01-01T12:10:22.667Z',\n action: 'create',\n object: {\n id: 'string',\n type: 'user',\n user: {\n email: 'user@acme.com'\n }\n },\n change: 'change1'\n },\n {\n actor: {\n id: 'string',\n type: 'user',\n email: 'string',\n identity_data: 'string'\n },\n time: '2019-01-01T12:16:22.667Z',\n action: 'create',\n object: {\n id: 'string',\n type: 'deployment',\n deployment: {\n name: 'production',\n artifact_name: 'Application 0.0.1'\n }\n },\n change: 'change2'\n },\n {\n actor: {\n id: 'string',\n type: 'user',\n email: 'string@example.com'\n },\n time: '2019-01-01T12:10:22.669Z',\n action: 'open_terminal',\n meta: {\n session_id: ['abd313a8-ee88-48ab-9c99-fbcd80048e6e']\n },\n object: {\n id: 'a1',\n type: 'device'\n },\n change: 'change3'\n }\n ],\n selectionState: {\n ...DEVICE_LIST_DEFAULTS,\n detail: undefined,\n endDate: undefined,\n selectedIssue: undefined,\n startDate: undefined,\n type: undefined,\n user: undefined,\n isLoading: false,\n sort: {},\n total: 3\n }\n },\n intentId: 'testIntent',\n organization: {\n addons: [],\n id: '1',\n name: 'test',\n plan: 'os',\n trial: false\n }\n};\n","// Copyright 2024 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//@ts-nocheck\nimport {\n ALL_DEVICES,\n ALL_DEVICE_STATES,\n ALL_RELEASES,\n APPLICATION_JSON_CONTENT_TYPE,\n APPLICATION_JWT_CONTENT_TYPE,\n ATTRIBUTE_SCOPES,\n DEVICE_FILTERING_OPTIONS,\n DEVICE_ISSUE_OPTIONS,\n DEVICE_LIST_DEFAULTS,\n DEVICE_STATES,\n PermissionTypes,\n SORTING_OPTIONS,\n alertChannels,\n apiRoot,\n apiUrl,\n auditLogsApiUrl,\n defaultPermissionSets,\n deploymentsApiUrl,\n deploymentsApiUrlV2,\n deviceAuthV2,\n deviceConfig,\n deviceConnect,\n emptyRole,\n emptyUiPermissions,\n headerNames,\n inventoryApiUrl,\n inventoryApiUrlV2,\n iotManagerBaseURL,\n limitDefault,\n maxSessionAge,\n monitorApiUrlv1,\n reportingApiUrl,\n rolesById,\n rolesByName,\n scopedPermissionAreas,\n serviceProviderRolesById,\n ssoIdpApiUrlv1,\n tenantadmApiUrlv1,\n tenantadmApiUrlv2,\n twoFAStates,\n uiPermissionsByArea,\n uiPermissionsById,\n useradmApiUrl,\n useradmApiUrlv1,\n useradmApiUrlv2\n} from '@northern.tech/utils/constants';\nimport type {\n AnyPermission,\n AuditLogPermission,\n DeploymentPermission,\n DeviceIssueOptionKey,\n GroupsPermission,\n PermissionObject,\n PermissionSet,\n PermissionSetId,\n ReleasesPermission,\n Role,\n ScopedPermissionsByAreaKey,\n SortOptions,\n UiPermissionsByAreaKey,\n UiPermissionsByIdKey,\n UiPermissionsDefinition,\n UserManagementPermission\n} from '@northern.tech/utils/constants';\n\nexport {\n alertChannels,\n ALL_DEVICE_STATES,\n ALL_DEVICES,\n ALL_RELEASES,\n APPLICATION_JSON_CONTENT_TYPE,\n APPLICATION_JWT_CONTENT_TYPE,\n ATTRIBUTE_SCOPES,\n apiRoot,\n apiUrl,\n auditLogsApiUrl,\n defaultPermissionSets,\n deploymentsApiUrl,\n deploymentsApiUrlV2,\n DEVICE_FILTERING_OPTIONS,\n DEVICE_ISSUE_OPTIONS,\n DEVICE_LIST_DEFAULTS,\n DEVICE_STATES,\n deviceAuthV2,\n deviceConfig,\n deviceConnect,\n emptyRole,\n emptyUiPermissions,\n headerNames,\n inventoryApiUrl,\n inventoryApiUrlV2,\n iotManagerBaseURL,\n monitorApiUrlv1,\n limitDefault,\n maxSessionAge,\n PermissionTypes,\n reportingApiUrl,\n rolesById,\n rolesByName,\n scopedPermissionAreas,\n serviceProviderRolesById,\n SORTING_OPTIONS,\n ssoIdpApiUrlv1,\n tenantadmApiUrlv1,\n tenantadmApiUrlv2,\n twoFAStates,\n uiPermissionsByArea,\n uiPermissionsById,\n useradmApiUrl,\n useradmApiUrlv1,\n useradmApiUrlv2\n};\n\nexport type {\n AnyPermission,\n AuditLogPermission,\n DeploymentPermission,\n DeviceIssueOptionKey,\n GroupsPermission,\n PermissionObject,\n PermissionSet,\n PermissionSetId,\n ReleasesPermission,\n Role,\n ScopedPermissionsByAreaKey,\n SortOptions,\n UiPermissionsByAreaKey,\n UiPermissionsByIdKey,\n UiPermissionsDefinition,\n UserManagementPermission\n};\n\nexport * from './appSlice/constants';\nexport * from './commonConstants';\nexport * from './deploymentsSlice/constants';\nexport * from './devicesSlice/constants';\nexport * from './monitorSlice/constants';\nexport * from './onboardingSlice/constants';\nexport * from './organizationSlice/constants';\nexport * from './releasesSlice/constants';\nexport * from './usersSlice/constants';\n","// Copyright 2020 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { useradmApiUrl } from '../constants';\n\nexport const XML_METADATA_FORMAT = 'xml';\nexport const JSON_METADATA_FORMAT = 'json';\n\nexport const getSamlStartUrl = id => `${window.location.origin}${useradmApiUrl}/auth/sso/${id}/login`;\nexport const getOidcStartUrl = id => `${window.location.origin}${useradmApiUrl}/oidc/${id}/start`;\n\nexport const SSO_TYPES = {\n saml: {\n id: 'saml',\n type: 'saml',\n title: 'SAML',\n metadataFormat: XML_METADATA_FORMAT,\n editorLanguage: XML_METADATA_FORMAT,\n contentType: 'application/samlmetadata+xml',\n getStartUrl: getSamlStartUrl,\n configDetails: [\n { key: 'entityID', label: 'Entity ID', getValue: id => `${window.location.origin}${useradmApiUrl}/sso/sp/metadata/${id}` },\n { key: 'acs', label: 'ACS URL', getValue: id => `${window.location.origin}${useradmApiUrl}/auth/sso/${id}/acs` },\n { key: 'startURL', label: 'Start URL', getValue: getSamlStartUrl }\n ]\n },\n oidc: {\n id: 'oidc',\n type: 'oidc',\n title: 'OpenID Connect',\n metadataFormat: JSON_METADATA_FORMAT,\n editorLanguage: JSON_METADATA_FORMAT,\n contentType: 'application/json',\n getStartUrl: getOidcStartUrl,\n configDetails: [{ key: 'startURL', label: 'Start Url', getValue: getOidcStartUrl }]\n }\n} as const;\n\nexport type ContentType = (typeof SSO_TYPES)[keyof typeof SSO_TYPES]['contentType'];\n\nexport const auditlogTypes = {\n artifact: { title: 'Artifact', queryParameter: 'object_type', value: 'artifact' },\n deployment: { title: 'Deployment', queryParameter: 'object_deployment_name', value: 'deployment' },\n device: { title: 'Device', queryParameter: 'object_id', value: 'device' },\n user_access_token: { title: 'Personal Access Token', queryParameter: 'user_access_token', value: 'user_access_token' },\n user: { title: 'User', queryParameter: 'object_id', value: 'user' },\n tenant: { title: 'Tenant', queryParameter: 'object_id', value: 'tenant' }\n};\n\nexport const AUDIT_LOGS_TYPES = [auditlogTypes.artifact, auditlogTypes.deployment, auditlogTypes.device, auditlogTypes.user_access_token, auditlogTypes.user];\nexport const SP_AUDIT_LOGS_TYPES = [auditlogTypes.user, auditlogTypes.tenant];\n\nexport const TENANT_LIST_DEFAULT = {\n page: 1,\n perPage: 20\n};\n","// 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 { AuditLog, BillingProfile, Integration, Event as WebhookEvent } from '@northern.tech/types/MenderTypes';\nimport type { PayloadAction } from '@reduxjs/toolkit';\nimport { createSlice } from '@reduxjs/toolkit';\n\nimport { DEVICE_LIST_DEFAULTS, SORTING_OPTIONS, TENANT_LIST_DEFAULT } from '../constants';\nimport type { AuditLogSelectionState, Card, Organization, OrganizationState, SSOConfig, TenantList } from '../organizationSlice/types';\n\nexport const sliceName = 'organization';\n\nexport const initialState: OrganizationState = {\n card: {\n last4: '',\n expiration: { month: 1, year: 2020 },\n brand: ''\n },\n intentId: null,\n tenantList: {\n ...TENANT_LIST_DEFAULT,\n total: 0,\n tenants: [],\n selectedTenant: null,\n sort: {\n direction: SORTING_OPTIONS.desc,\n key: 'name'\n }\n },\n organization: {\n // id, name, status, tenant_token, plan\n },\n auditlog: {\n events: [],\n selectionState: {\n ...DEVICE_LIST_DEFAULTS,\n detail: undefined,\n endDate: undefined,\n selectedIssue: undefined,\n sort: { direction: SORTING_OPTIONS.desc },\n startDate: undefined,\n total: 0,\n type: undefined,\n user: undefined,\n isLoading: false\n }\n },\n externalDeviceIntegrations: [\n // { <connection_string|x509|...>, id, provider }\n ],\n ssoConfigs: [],\n webhooks: {\n // [id]: { events: [] }\n // for now:\n events: [],\n eventsTotal: 0\n }\n};\n\nexport const organizationSlice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n receiveAuditLogs: (state, action: PayloadAction<{ events: AuditLog[]; total: number }>) => {\n const { events, total } = action.payload;\n state.auditlog.events = events;\n state.auditlog.selectionState.total = total;\n },\n setAuditLogState: (state, action: PayloadAction<Partial<AuditLogSelectionState>>) => {\n state.auditlog.selectionState = {\n ...state.auditlog.selectionState,\n ...action.payload\n };\n },\n receiveCurrentCard: (state, action: PayloadAction<Card>) => {\n state.card = action.payload;\n },\n receiveSetupIntent: (state, action: PayloadAction<string | null>) => {\n state.intentId = action.payload;\n },\n setOrganization: (state, action: PayloadAction<Partial<Organization>>) => {\n state.organization = { ...state.organization, ...action.payload };\n },\n setSubscription: (state, action) => {\n state.organization.subscription = { ...state.organization.subscription, ...action.payload };\n },\n setBillingProfile: (state, action: PayloadAction<BillingProfile>) => {\n state.organization.billing_profile = action.payload;\n },\n setTenantListState: (state, action: PayloadAction<TenantList>) => {\n state.tenantList = action.payload;\n },\n receiveExternalDeviceIntegrations: (state, action: PayloadAction<Integration[]>) => {\n state.externalDeviceIntegrations = action.payload;\n },\n receiveSsoConfigs: (state, action: PayloadAction<SSOConfig[]>) => {\n state.ssoConfigs = action.payload;\n },\n receiveWebhookEvents: (state, action: PayloadAction<{ total: number; value: WebhookEvent[] }>) => {\n const { value, total } = action.payload;\n state.webhooks.events = value;\n state.webhooks.eventsTotal = total;\n }\n }\n});\n\nexport const actions = organizationSlice.actions;\nexport default organizationSlice.reducer;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACcA,uBA8CO;;;ACVA,IAAM,gBAAgB;AAAA,EAC3B,UAAU,EAAE,OAAO,YAAY,gBAAgB,eAAe,OAAO,WAAW;AAAA,EAChF,YAAY,EAAE,OAAO,cAAc,gBAAgB,0BAA0B,OAAO,aAAa;AAAA,EACjG,QAAQ,EAAE,OAAO,UAAU,gBAAgB,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AM;AAAA,MACN,MAAM;AAAA,MACN,WAAW;AAAA,MACX,MAAM,CAAC;AAAA,MACP,OAAO;AAAA,IACT;AAAA,EACF;AAAA,EACA,UAAU;AAAA,EACV,cAAc;AAAA,IACZ,QAAQ,CAAC;AAAA,IACT,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/organizationSlice/mocks.ts","../../src/constants.ts","../../src/organizationSlice/constants.ts","../../src/organizationSlice/index.ts"],"sourcesContent":["// Copyright 2025 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { DEVICE_LIST_DEFAULTS } from '../constants';\nimport { initialState } from './index';\n\nexport const mockState = {\n ...initialState,\n card: {\n brand: 'testCorp',\n last4: '7890',\n expiration: { month: 1, year: 2024 }\n },\n auditlog: {\n events: [\n {\n actor: {\n id: 'string',\n type: 'user',\n email: 'string@example.com'\n },\n time: '2019-01-01T12:10:22.667Z',\n action: 'create',\n object: {\n id: 'string',\n type: 'user',\n user: {\n email: 'user@acme.com'\n }\n },\n change: 'change1'\n },\n {\n actor: {\n id: 'string',\n type: 'user',\n email: 'string',\n identity_data: 'string'\n },\n time: '2019-01-01T12:16:22.667Z',\n action: 'create',\n object: {\n id: 'string',\n type: 'deployment',\n deployment: {\n name: 'production',\n artifact_name: 'Application 0.0.1'\n }\n },\n change: 'change2'\n },\n {\n actor: {\n id: 'string',\n type: 'user',\n email: 'string@example.com'\n },\n time: '2019-01-01T12:10:22.669Z',\n action: 'open_terminal',\n meta: {\n session_id: ['abd313a8-ee88-48ab-9c99-fbcd80048e6e']\n },\n object: {\n id: 'a1',\n type: 'device'\n },\n change: 'change3'\n }\n ],\n selectionState: {\n ...DEVICE_LIST_DEFAULTS,\n detail: undefined,\n endDate: undefined,\n selectedIssue: undefined,\n startDate: undefined,\n type: undefined,\n user: undefined,\n isLoading: false,\n sort: {},\n total: 3\n }\n },\n intentId: 'testIntent',\n organization: {\n addons: [],\n id: '1',\n name: 'test',\n plan: 'os',\n trial: false\n }\n};\n","// Copyright 2024 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//@ts-nocheck\nimport {\n ALL_DEVICES,\n ALL_DEVICE_STATES,\n ALL_RELEASES,\n APPLICATION_JSON_CONTENT_TYPE,\n APPLICATION_JWT_CONTENT_TYPE,\n ATTRIBUTE_SCOPES,\n DEVICE_FILTERING_OPTIONS,\n DEVICE_ISSUE_OPTIONS,\n DEVICE_LIST_DEFAULTS,\n DEVICE_STATES,\n PermissionTypes,\n SORTING_OPTIONS,\n alertChannels,\n apiRoot,\n apiUrl,\n auditLogsApiUrl,\n defaultPermissionSets,\n deploymentsApiUrl,\n deploymentsApiUrlV2,\n deviceAuthV2,\n deviceConfig,\n deviceConnect,\n emptyRole,\n emptyUiPermissions,\n headerNames,\n inventoryApiUrl,\n inventoryApiUrlV2,\n iotManagerBaseURL,\n limitDefault,\n maxSessionAge,\n monitorApiUrlv1,\n reportingApiUrl,\n rolesById,\n rolesByName,\n scopedPermissionAreas,\n serviceProviderRolesById,\n ssoIdpApiUrlv1,\n tenantadmApiUrlv1,\n tenantadmApiUrlv2,\n twoFAStates,\n uiPermissionsByArea,\n uiPermissionsById,\n useradmApiUrl,\n useradmApiUrlv1,\n useradmApiUrlv2\n} from '@northern.tech/utils/constants';\nimport type {\n AnyPermission,\n AuditLogPermission,\n DeploymentPermission,\n DeviceIssueOptionKey,\n GroupsPermission,\n PermissionObject,\n PermissionSet,\n PermissionSetId,\n ReleasesPermission,\n Role,\n ScopedPermissionsByAreaKey,\n SortOptions,\n UiPermissionsByAreaKey,\n UiPermissionsByIdKey,\n UiPermissionsDefinition,\n UserManagementPermission\n} from '@northern.tech/utils/constants';\n\nexport {\n alertChannels,\n ALL_DEVICE_STATES,\n ALL_DEVICES,\n ALL_RELEASES,\n APPLICATION_JSON_CONTENT_TYPE,\n APPLICATION_JWT_CONTENT_TYPE,\n ATTRIBUTE_SCOPES,\n apiRoot,\n apiUrl,\n auditLogsApiUrl,\n defaultPermissionSets,\n deploymentsApiUrl,\n deploymentsApiUrlV2,\n DEVICE_FILTERING_OPTIONS,\n DEVICE_ISSUE_OPTIONS,\n DEVICE_LIST_DEFAULTS,\n DEVICE_STATES,\n deviceAuthV2,\n deviceConfig,\n deviceConnect,\n emptyRole,\n emptyUiPermissions,\n headerNames,\n inventoryApiUrl,\n inventoryApiUrlV2,\n iotManagerBaseURL,\n monitorApiUrlv1,\n limitDefault,\n maxSessionAge,\n PermissionTypes,\n reportingApiUrl,\n rolesById,\n rolesByName,\n scopedPermissionAreas,\n serviceProviderRolesById,\n SORTING_OPTIONS,\n ssoIdpApiUrlv1,\n tenantadmApiUrlv1,\n tenantadmApiUrlv2,\n twoFAStates,\n uiPermissionsByArea,\n uiPermissionsById,\n useradmApiUrl,\n useradmApiUrlv1,\n useradmApiUrlv2\n};\n\nexport type {\n AnyPermission,\n AuditLogPermission,\n DeploymentPermission,\n DeviceIssueOptionKey,\n GroupsPermission,\n PermissionObject,\n PermissionSet,\n PermissionSetId,\n ReleasesPermission,\n Role,\n ScopedPermissionsByAreaKey,\n SortOptions,\n UiPermissionsByAreaKey,\n UiPermissionsByIdKey,\n UiPermissionsDefinition,\n UserManagementPermission\n};\n\nexport * from './appSlice/constants';\nexport * from './commonConstants';\nexport * from './deploymentsSlice/constants';\nexport * from './devicesSlice/constants';\nexport * from './monitorSlice/constants';\nexport * from './onboardingSlice/constants';\nexport * from './organizationSlice/constants';\nexport * from './releasesSlice/constants';\nexport * from './usersSlice/constants';\n","// Copyright 2020 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { useradmApiUrl } from '../constants';\n\nexport const XML_METADATA_FORMAT = 'xml';\nexport const JSON_METADATA_FORMAT = 'json';\n\nexport const getSamlStartUrl = id => `${window.location.origin}${useradmApiUrl}/auth/sso/${id}/login`;\nexport const getOidcStartUrl = id => `${window.location.origin}${useradmApiUrl}/oidc/${id}/start`;\n\nexport const SSO_TYPES = {\n saml: {\n id: 'saml',\n type: 'saml',\n title: 'SAML',\n metadataFormat: XML_METADATA_FORMAT,\n editorLanguage: XML_METADATA_FORMAT,\n contentType: 'application/samlmetadata+xml',\n getStartUrl: getSamlStartUrl,\n configDetails: [\n { key: 'entityID', label: 'Entity ID', getValue: id => `${window.location.origin}${useradmApiUrl}/sso/sp/metadata/${id}` },\n { key: 'acs', label: 'ACS URL', getValue: id => `${window.location.origin}${useradmApiUrl}/auth/sso/${id}/acs` },\n { key: 'startURL', label: 'Start URL', getValue: getSamlStartUrl }\n ]\n },\n oidc: {\n id: 'oidc',\n type: 'oidc',\n title: 'OpenID Connect',\n metadataFormat: JSON_METADATA_FORMAT,\n editorLanguage: JSON_METADATA_FORMAT,\n contentType: 'application/json',\n getStartUrl: getOidcStartUrl,\n configDetails: [{ key: 'startURL', label: 'Start Url', getValue: getOidcStartUrl }]\n }\n} as const;\n\nexport type ContentType = (typeof SSO_TYPES)[keyof typeof SSO_TYPES]['contentType'];\n\nexport const auditlogTypes = {\n artifact: { title: 'Artifact', queryParameter: 'object_type', value: 'artifact' },\n deployment: { title: 'Deployment', queryParameter: 'object_deployment_name', value: 'deployment' },\n device: { title: 'Device', queryParameter: 'object_id', value: 'device' },\n user_access_token: { title: 'Personal Access Token', queryParameter: 'user_access_token', value: 'user_access_token' },\n user: { title: 'User', queryParameter: 'object_id', value: 'user' },\n tenant: { title: 'Tenant', queryParameter: 'object_id', value: 'tenant' }\n};\n\nexport const AUDIT_LOGS_TYPES = [auditlogTypes.artifact, auditlogTypes.deployment, auditlogTypes.device, auditlogTypes.user_access_token, auditlogTypes.user];\nexport const SP_AUDIT_LOGS_TYPES = [auditlogTypes.user, auditlogTypes.tenant];\n\nexport const TENANT_LIST_DEFAULT = {\n page: 1,\n perPage: 20\n};\n","// 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 { AuditLog as AuditLogEvent, BillingProfile, Integration, Event as WebhookEvent } from '@northern.tech/types/MenderTypes';\nimport type { PayloadAction } from '@reduxjs/toolkit';\nimport { createSlice } from '@reduxjs/toolkit';\n\nimport { DEVICE_LIST_DEFAULTS, SORTING_OPTIONS, TENANT_LIST_DEFAULT } from '../constants';\nimport type { AuditLog, AuditLogSelectionState, Card, Organization, SSOConfig, TenantList, Webhook } from './types';\n\nexport const sliceName = 'organization';\n\nexport type OrganizationSliceType = {\n auditlog: AuditLog;\n card: Card;\n externalDeviceIntegrations: Integration[];\n intentId: string | null;\n organization: Partial<Organization>;\n ssoConfigs: SSOConfig[];\n tenantList: TenantList;\n webhooks: Webhook;\n}\n\nexport const initialState: OrganizationSliceType = {\n card: {\n last4: '',\n expiration: { month: 1, year: 2020 },\n brand: ''\n },\n intentId: null,\n tenantList: {\n ...TENANT_LIST_DEFAULT,\n total: 0,\n tenants: [],\n selectedTenant: null,\n sort: {\n direction: SORTING_OPTIONS.desc,\n key: 'name'\n }\n },\n organization: {\n // id, name, status, tenant_token, plan\n },\n auditlog: {\n events: [],\n selectionState: {\n ...DEVICE_LIST_DEFAULTS,\n detail: undefined,\n endDate: undefined,\n selectedIssue: undefined,\n sort: { direction: SORTING_OPTIONS.desc },\n startDate: undefined,\n total: 0,\n type: undefined,\n user: undefined,\n isLoading: false\n }\n },\n externalDeviceIntegrations: [\n // { <connection_string|x509|...>, id, provider }\n ],\n ssoConfigs: [],\n webhooks: {\n // [id]: { events: [] }\n // for now:\n events: [],\n eventsTotal: 0\n }\n};\n\nexport const organizationSlice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n receiveAuditLogs: (state, action: PayloadAction<{ events: AuditLogEvent[]; total: number }>) => {\n const { events, total } = action.payload;\n state.auditlog.events = events;\n state.auditlog.selectionState.total = total;\n },\n setAuditLogState: (state, action: PayloadAction<Partial<AuditLogSelectionState>>) => {\n state.auditlog.selectionState = {\n ...state.auditlog.selectionState,\n ...action.payload\n };\n },\n receiveCurrentCard: (state, action: PayloadAction<Card>) => {\n state.card = action.payload;\n },\n receiveSetupIntent: (state, action: PayloadAction<string | null>) => {\n state.intentId = action.payload;\n },\n setOrganization: (state, action: PayloadAction<Partial<Organization>>) => {\n state.organization = { ...state.organization, ...action.payload };\n },\n setSubscription: (state, action) => {\n state.organization.subscription = { ...state.organization.subscription, ...action.payload };\n },\n setBillingProfile: (state, action: PayloadAction<BillingProfile>) => {\n state.organization.billing_profile = action.payload;\n },\n setTenantListState: (state, action: PayloadAction<TenantList>) => {\n state.tenantList = action.payload;\n },\n receiveExternalDeviceIntegrations: (state, action: PayloadAction<Integration[]>) => {\n state.externalDeviceIntegrations = action.payload;\n },\n receiveSsoConfigs: (state, action: PayloadAction<SSOConfig[]>) => {\n state.ssoConfigs = action.payload;\n },\n receiveWebhookEvents: (state, action: PayloadAction<{ total: number; value: WebhookEvent[] }>) => {\n const { value, total } = action.payload;\n state.webhooks.events = value;\n state.webhooks.eventsTotal = total;\n }\n }\n});\n\nexport const actions = organizationSlice.actions;\nexport default organizationSlice.reducer;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACcA,uBA8CO;;;ACVA,IAAM,gBAAgB;AAAA,EAC3B,UAAU,EAAE,OAAO,YAAY,gBAAgB,eAAe,OAAO,WAAW;AAAA,EAChF,YAAY,EAAE,OAAO,cAAc,gBAAgB,0BAA0B,OAAO,aAAa;AAAA,EACjG,QAAQ,EAAE,OAAO,UAAU,gBAAgB,aAAa,OAAO,SAAS;AAAA,EACxE,mBAAmB,EAAE,OAAO,yBAAyB,gBAAgB,qBAAqB,OAAO,oBAAoB;AAAA,EACrH,MAAM,EAAE,OAAO,QAAQ,gBAAgB,aAAa,OAAO,OAAO;AAAA,EAClE,QAAQ,EAAE,OAAO,UAAU,gBAAgB,aAAa,OAAO,SAAS;AAC1E;AAEO,IAAM,mBAAmB,CAAC,cAAc,UAAU,cAAc,YAAY,cAAc,QAAQ,cAAc,mBAAmB,cAAc,IAAI;AACrJ,IAAM,sBAAsB,CAAC,cAAc,MAAM,cAAc,MAAM;AAErE,IAAM,sBAAsB;AAAA,EACjC,MAAM;AAAA,EACN,SAAS;AACX;;;AClDA,qBAA4B;AAKrB,IAAM,YAAY;AAalB,IAAM,eAAsC;AAAA,EACjD,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,YAAY,EAAE,OAAO,GAAG,MAAM,KAAK;AAAA,IACnC,OAAO;AAAA,EACT;AAAA,EACA,UAAU;AAAA,EACV,YAAY;AAAA,IACV,GAAG;AAAA,IACH,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