@northern.tech/store 0.46.4 → 0.47.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.d.cts +6 -6
- package/dist/actions.d.ts +6 -6
- package/dist/api/general-api.cjs +2 -2
- package/dist/api/general-api.cjs.map +1 -1
- package/dist/api/general-api.js +1 -1
- package/dist/api/general-api.js.map +1 -1
- package/dist/appSlice/constants.cjs +3 -4
- 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 +1 -2
- package/dist/appSlice/constants.js.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.d.cts +1 -1
- package/dist/appSlice/mocks.d.ts +1 -1
- package/dist/appSlice/selectors.cjs.map +1 -1
- package/dist/appSlice/selectors.d.cts +2 -130
- package/dist/appSlice/selectors.d.ts +2 -130
- package/dist/appSlice/selectors.js.map +1 -1
- package/dist/appSlice/thunks.d.cts +2 -2
- package/dist/appSlice/thunks.d.ts +2 -2
- package/dist/auth.cjs +3 -3
- 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 +2 -1
- package/dist/auth.js.map +1 -1
- package/dist/commonConstants.cjs +4 -3
- package/dist/commonConstants.d.cts +2 -2
- package/dist/commonConstants.d.ts +2 -2
- package/dist/commonConstants.js +1 -1
- package/dist/commonSelectors.cjs +1 -1
- package/dist/commonSelectors.d.cts +76 -369
- package/dist/commonSelectors.d.ts +76 -369
- package/dist/commonSelectors.js +1 -1
- package/dist/constants-CCkKh9KM.d.ts +109 -0
- package/dist/constants-CUwYPOYK.d.cts +109 -0
- package/dist/{constants-D5hACLhF.js → constants-DjiC_FnZ.js} +3 -269
- package/dist/constants-DjiC_FnZ.js.map +1 -0
- package/dist/{constants-MVizYy89.cjs → constants-DsOnY5o5.cjs} +1 -279
- package/dist/constants-DsOnY5o5.cjs.map +1 -0
- package/dist/{constants-nKSWZ8oD.d.ts → constants-tC3RR_Oo.d.cts} +2 -3
- package/dist/{constants-nKSWZ8oD.d.cts → constants-tC3RR_Oo.d.ts} +2 -3
- package/dist/constants.cjs +5 -5
- package/dist/constants.d.cts +3 -3
- package/dist/constants.d.ts +3 -3
- package/dist/constants.js +1 -1
- package/dist/deploymentsSlice/constants.cjs +1 -1
- package/dist/deploymentsSlice/constants.js +1 -1
- package/dist/deploymentsSlice/index.cjs +1 -1
- package/dist/deploymentsSlice/index.js +1 -1
- package/dist/deploymentsSlice/selectors.cjs +1 -1
- package/dist/deploymentsSlice/selectors.cjs.map +1 -1
- package/dist/deploymentsSlice/selectors.d.cts +2 -97
- package/dist/deploymentsSlice/selectors.d.ts +2 -97
- package/dist/deploymentsSlice/selectors.js +1 -1
- package/dist/deploymentsSlice/selectors.js.map +1 -1
- package/dist/deploymentsSlice/thunks.d.cts +4 -4
- package/dist/deploymentsSlice/thunks.d.ts +4 -4
- package/dist/devicesSlice/constants.cjs +1 -1
- package/dist/devicesSlice/constants.d.cts +1 -1
- package/dist/devicesSlice/constants.d.ts +1 -1
- package/dist/devicesSlice/constants.js +1 -1
- package/dist/devicesSlice/index.d.cts +1 -1
- package/dist/devicesSlice/index.d.ts +1 -1
- package/dist/devicesSlice/index.js +1 -1
- package/dist/devicesSlice/mocks.js +1 -1
- package/dist/devicesSlice/selectors.cjs +2 -2
- package/dist/devicesSlice/selectors.cjs.map +1 -1
- package/dist/devicesSlice/selectors.d.cts +2 -887
- package/dist/devicesSlice/selectors.d.ts +2 -887
- package/dist/devicesSlice/selectors.js +2 -2
- package/dist/devicesSlice/selectors.js.map +1 -1
- package/dist/devicesSlice/thunks.d.cts +4 -4
- package/dist/devicesSlice/thunks.d.ts +4 -4
- package/dist/{index-KxRmyFLr.d.cts → index-7jVuB4tG.d.cts} +2 -2
- package/dist/{index-fGVC5s1C.d.cts → index-BWtIaimn.d.cts} +2 -2
- package/dist/{index-BfmRpbiJ.d.cts → index-BcrZxKLw.d.cts} +2 -2
- package/dist/{index--SKVGToc.d.ts → index-C1vNDCYR.d.ts} +2 -2
- package/dist/{index-CRqnH_go.d.ts → index-C2za83Qs.d.ts} +2 -2
- package/dist/{index-xxqlerg5.d.ts → index-CThE5Gfh.d.ts} +2 -2
- package/dist/{index-BKU1G9-x.d.cts → index-CaNZaXie.d.cts} +2 -2
- package/dist/{index-BVNS-Aut.d.ts → index-CvMpbsOo.d.ts} +2 -2
- package/dist/{index-HjOSTTGF.d.cts → index-CzQRHJ6f.d.cts} +2 -2
- package/dist/{index-CqhXqGLt.d.cts → index-DNYeo7wc.d.cts} +2 -2
- package/dist/{index-D9GJhX1I.d.ts → index-DOPRnlaC.d.ts} +2 -2
- package/dist/{index-BMsafOyJ.d.ts → index-o_m7WKiR.d.ts} +2 -2
- package/dist/locationutils.cjs +1 -1
- package/dist/locationutils.d.cts +2 -2
- package/dist/locationutils.d.ts +2 -2
- package/dist/locationutils.js +1 -1
- package/dist/mockState.cjs +24 -0
- package/dist/mockState.cjs.map +1 -0
- package/dist/mockState.d.cts +7 -0
- package/dist/mockState.d.ts +7 -0
- package/dist/mockState.js +23 -0
- package/dist/mockState.js.map +1 -0
- package/dist/monitorSlice/constants.d.cts +1 -1
- package/dist/monitorSlice/constants.d.ts +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.d.cts +1 -1
- package/dist/monitorSlice/mocks.d.ts +1 -1
- package/dist/monitorSlice/mocks.js +1 -1
- package/dist/monitorSlice/selectors.cjs.map +1 -1
- package/dist/monitorSlice/selectors.d.cts +2 -10
- package/dist/monitorSlice/selectors.d.ts +2 -10
- package/dist/monitorSlice/selectors.js.map +1 -1
- package/dist/monitorSlice/thunks.cjs +2 -3
- package/dist/monitorSlice/thunks.cjs.map +1 -1
- package/dist/monitorSlice/thunks.d.cts +4 -4
- package/dist/monitorSlice/thunks.d.ts +4 -4
- package/dist/monitorSlice/thunks.js +3 -2
- package/dist/monitorSlice/thunks.js.map +1 -1
- package/dist/onboardingSlice/selectors.cjs.map +1 -1
- package/dist/onboardingSlice/selectors.d.cts +2 -6
- package/dist/onboardingSlice/selectors.d.ts +2 -6
- package/dist/onboardingSlice/selectors.js.map +1 -1
- package/dist/onboardingSlice/thunks.d.cts +3 -3
- package/dist/onboardingSlice/thunks.d.ts +3 -3
- package/dist/organizationSlice/constants.cjs +1 -1
- package/dist/organizationSlice/constants.js +1 -1
- package/dist/organizationSlice/index.cjs +1 -1
- package/dist/organizationSlice/index.d.cts +1 -1
- package/dist/organizationSlice/index.d.ts +1 -1
- package/dist/organizationSlice/index.js +1 -1
- package/dist/organizationSlice/mocks.d.cts +3 -3
- package/dist/organizationSlice/mocks.d.ts +3 -3
- package/dist/organizationSlice/mocks.js +1 -1
- package/dist/organizationSlice/selectors.cjs +1 -1
- package/dist/organizationSlice/selectors.cjs.map +1 -1
- package/dist/organizationSlice/selectors.d.cts +2 -472
- package/dist/organizationSlice/selectors.d.ts +2 -472
- package/dist/organizationSlice/selectors.js +1 -1
- package/dist/organizationSlice/selectors.js.map +1 -1
- package/dist/organizationSlice/thunks.d.cts +25 -21
- package/dist/organizationSlice/thunks.d.ts +25 -21
- package/dist/organizationSlice/types.d.cts +1 -1
- package/dist/organizationSlice/types.d.ts +1 -1
- package/dist/releasesSlice/index.d.cts +1 -1
- package/dist/releasesSlice/index.d.ts +1 -1
- package/dist/releasesSlice/index.js +1 -1
- package/dist/releasesSlice/mocks.js +1 -1
- package/dist/releasesSlice/selectors.cjs.map +1 -1
- package/dist/releasesSlice/selectors.d.cts +2 -795
- package/dist/releasesSlice/selectors.d.ts +2 -795
- package/dist/releasesSlice/selectors.js.map +1 -1
- package/dist/releasesSlice/thunks.cjs +17 -17
- package/dist/releasesSlice/thunks.cjs.map +1 -1
- package/dist/releasesSlice/thunks.d.cts +5 -5
- package/dist/releasesSlice/thunks.d.ts +5 -5
- package/dist/releasesSlice/thunks.js +2 -1
- package/dist/releasesSlice/thunks.js.map +1 -1
- package/dist/selectors-1394DVvN.d.ts +712 -0
- package/dist/selectors-Ba9LUr_0.d.ts +593 -0
- package/dist/selectors-CAo0fzIZ.d.ts +99 -0
- package/dist/selectors-CH-yXu-7.d.cts +84 -0
- package/dist/selectors-CQYkG1VI.d.cts +9 -0
- package/dist/selectors-D9t4It2i.d.ts +84 -0
- package/dist/selectors-DDsFLtxz.d.cts +712 -0
- package/dist/selectors-DFSv4A_m.d.ts +378 -0
- package/dist/selectors-DQKg681M.d.ts +363 -0
- package/dist/selectors-DeqP_VLU.d.cts +593 -0
- package/dist/selectors-LhR8TyWU.d.cts +378 -0
- package/dist/selectors-XzNyGFJI.d.cts +99 -0
- package/dist/selectors-aLOjKkxN.d.cts +14 -0
- package/dist/selectors-elCimAHX.d.ts +9 -0
- package/dist/selectors-jusUdUdc.d.cts +363 -0
- package/dist/selectors-vk0GUGHf.d.ts +14 -0
- package/dist/selectors.d.cts +9 -9
- package/dist/selectors.d.ts +9 -9
- package/dist/sockethook.cjs +4 -4
- package/dist/sockethook.cjs.map +1 -1
- package/dist/sockethook.js +2 -1
- package/dist/sockethook.js.map +1 -1
- package/dist/{store-Dw8Uo_Df.d.cts → store-CCvk8X-k.d.cts} +14 -33
- package/dist/{store-DLp6ajT8.d.ts → store-v5V-bbB_.d.ts} +15 -34
- package/dist/store.cjs +2 -4
- package/dist/store.cjs.map +1 -1
- package/dist/store.d.cts +2 -2
- package/dist/store.d.ts +2 -2
- package/dist/store.js +2 -4
- package/dist/store.js.map +1 -1
- package/dist/thunks.cjs +30 -38
- package/dist/thunks.cjs.map +1 -1
- package/dist/thunks.js +10 -17
- package/dist/thunks.js.map +1 -1
- package/dist/{types-DY0J79yF.d.ts → types-B2gphGj8.d.ts} +3 -3
- package/dist/{types-B67YW1jV.d.cts → types-CLASWtVP.d.cts} +3 -3
- package/dist/usersSlice/constants.cjs +1 -1
- package/dist/usersSlice/constants.js +1 -1
- package/dist/usersSlice/index.cjs +1 -1
- package/dist/usersSlice/index.d.cts +1 -1
- package/dist/usersSlice/index.d.ts +1 -1
- package/dist/usersSlice/index.js +1 -1
- package/dist/usersSlice/mocks.d.cts +1 -1
- package/dist/usersSlice/mocks.d.ts +1 -1
- package/dist/usersSlice/mocks.js +1 -1
- package/dist/usersSlice/selectors.cjs +3 -3
- package/dist/usersSlice/selectors.cjs.map +1 -1
- package/dist/usersSlice/selectors.d.cts +2 -466
- package/dist/usersSlice/selectors.d.ts +2 -466
- package/dist/usersSlice/selectors.js +2 -2
- package/dist/usersSlice/selectors.js.map +1 -1
- package/dist/usersSlice/thunks.d.cts +88 -88
- package/dist/usersSlice/thunks.d.ts +88 -88
- package/dist/utils.cjs +5 -10
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +4 -8
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/constants-BJuY-ODE.d.ts +0 -124
- package/dist/constants-C2O55iZu.d.cts +0 -124
- package/dist/constants-D5hACLhF.js.map +0 -1
- package/dist/constants-MVizYy89.cjs.map +0 -1
- package/dist/storehooks.cjs +0 -249
- package/dist/storehooks.cjs.map +0 -1
- package/dist/storehooks.d.cts +0 -49
- package/dist/storehooks.d.ts +0 -49
- package/dist/storehooks.js +0 -241
- package/dist/storehooks.js.map +0 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { E as headerNames, N as monitorApiUrlv1, O as inventoryApiUrlV2,
|
|
1
|
+
import { E as headerNames, N as monitorApiUrlv1, O as inventoryApiUrlV2, l as DEVICE_LIST_DEFAULTS, p as alertChannels, u as DEVICE_STATES } from "../constants-DjiC_FnZ.js";
|
|
2
2
|
import { actions, sliceName } from "./index.js";
|
|
3
3
|
import actions_default from "../actions.js";
|
|
4
4
|
import { getDeviceFilters } from "../devicesSlice/selectors.js";
|
|
5
5
|
import { convertDeviceListStateToFilters } from "../utils.js";
|
|
6
6
|
import { commonErrorFallback, commonErrorHandler, createAppAsyncThunk } from "../store.js";
|
|
7
7
|
import Api from "../api/general-api.js";
|
|
8
|
+
import { TIMEOUTS } from "@northern.tech/utils/constants";
|
|
8
9
|
//#region src/monitorSlice/thunks.ts
|
|
9
10
|
const { page: defaultPage, perPage: defaultPerPage } = DEVICE_LIST_DEFAULTS;
|
|
10
11
|
const ellipsis = "...";
|
|
@@ -32,7 +33,7 @@ const getLatestDeviceAlerts = createAppAsyncThunk(`${sliceName}/getLatestDeviceA
|
|
|
32
33
|
});
|
|
33
34
|
const getIssueCountsByType = createAppAsyncThunk(`${sliceName}/getIssueCountsByType`, async ({ type, options = {} }, { dispatch, getState }) => {
|
|
34
35
|
const state = getState();
|
|
35
|
-
const { filters = getDeviceFilters(state), group, status, ...remainder } = options;
|
|
36
|
+
const { filters = getDeviceFilters(state), group, status = DEVICE_STATES.accepted, ...remainder } = options;
|
|
36
37
|
const { applicableFilters: nonMonitorFilters, filterTerms } = convertDeviceListStateToFilters({
|
|
37
38
|
...remainder,
|
|
38
39
|
filters,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thunks.js","names":["storeActions"],"sources":["../../src/monitorSlice/thunks.ts"],"sourcesContent":["// Copyright 2021 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 { DeviceFilter } from '@/src/devicesSlice';\nimport type { Alert, DeviceInventoryResponse, MonitorConfiguration } from '@northern.tech/types/MenderTypes';\n\nimport { actions, sliceName } from '.';\nimport storeActions from '../actions';\nimport Api from '../api/general-api';\nimport type { AlertChannelKey, DeviceIssueOptionKey } from '../constants';\nimport { DEVICE_LIST_DEFAULTS,
|
|
1
|
+
{"version":3,"file":"thunks.js","names":["storeActions"],"sources":["../../src/monitorSlice/thunks.ts"],"sourcesContent":["// Copyright 2021 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 { DeviceFilter } from '@/src/devicesSlice';\nimport type { Alert, DeviceInventoryResponse, MonitorConfiguration } from '@northern.tech/types/MenderTypes';\nimport { TIMEOUTS } from '@northern.tech/utils/constants';\n\nimport { actions, sliceName } from '.';\nimport storeActions from '../actions';\nimport Api from '../api/general-api';\nimport type { AlertChannelKey, DeviceIssueOptionKey } from '../constants';\nimport { DEVICE_LIST_DEFAULTS, DEVICE_STATES, alertChannels, headerNames, inventoryApiUrlV2, monitorApiUrlv1 } from '../constants';\nimport { getDeviceFilters } from '../selectors';\nimport { commonErrorFallback, commonErrorHandler, createAppAsyncThunk } from '../store';\nimport { convertDeviceListStateToFilters } from '../utils';\n\nconst { page: defaultPage, perPage: defaultPerPage } = DEVICE_LIST_DEFAULTS;\n\nconst cutoffLength = 75;\nconst ellipsis = '...';\nconst longTextTrimmer = (text: string): string =>\n text.length >= cutoffLength + ellipsis.length ? `${text.substring(0, cutoffLength + ellipsis.length)}${ellipsis}` : text;\n\nconst sanitizeDeviceAlerts = (alerts: Alert[]) => alerts.map(alert => ({ ...alert, fullName: alert.name, name: longTextTrimmer(alert.name || '') }));\n\ninterface GetDeviceAlertsPayload {\n config?: { issuedAfter?: string; issuedBefore?: string; page?: number; perPage?: number; sortAscending?: boolean };\n id: string;\n}\nexport const getDeviceAlerts = createAppAsyncThunk(`${sliceName}/getDeviceAlerts`, ({ id, config = {} }: GetDeviceAlertsPayload, { dispatch }) => {\n const { page = defaultPage, perPage = defaultPerPage, issuedBefore, issuedAfter, sortAscending = false } = config;\n const issued_after = issuedAfter ? `&issued_after=${issuedAfter}` : '';\n const issued_before = issuedBefore ? `&issued_before=${issuedBefore}` : '';\n return Api.get<Alert[]>(\n `${monitorApiUrlv1}/devices/${id}/alerts?page=${page}&per_page=${perPage}${issued_after}${issued_before}&sort_ascending=${sortAscending}`\n )\n .catch(err => commonErrorHandler(err, `Retrieving device alerts for device ${id} failed:`, dispatch))\n .then(res =>\n Promise.all([\n dispatch(actions.receiveDeviceAlerts({ deviceId: id, alerts: sanitizeDeviceAlerts(res.data) })),\n dispatch(actions.setAlertListState({ total: Number(res.headers[headerNames.total]) }))\n ])\n );\n});\n\ninterface GetLatestDeviceAlertsPayload {\n config?: { page?: number; perPage?: number };\n id: string;\n}\nexport const getLatestDeviceAlerts = createAppAsyncThunk(\n `${sliceName}/getLatestDeviceAlerts`,\n ({ id, config = {} }: GetLatestDeviceAlertsPayload, { dispatch }) => {\n const { page = defaultPage, perPage = 10 } = config;\n return Api.get<Alert[]>(`${monitorApiUrlv1}/devices/${id}/alerts/latest?page=${page}&per_page=${perPage}`)\n .catch(err => commonErrorHandler(err, `Retrieving device alerts for device ${id} failed:`, dispatch))\n .then(res => Promise.resolve(dispatch(actions.receiveLatestDeviceAlerts({ deviceId: id, alerts: sanitizeDeviceAlerts(res.data) }))));\n }\n);\n\ninterface GetIssueCountsByTypePayload {\n options?: Partial<{ filters: DeviceFilter[]; group: string; status: string; type: string }>;\n type: DeviceIssueOptionKey;\n}\nexport const getIssueCountsByType = createAppAsyncThunk(\n `${sliceName}/getIssueCountsByType`,\n async ({ type, options = {} }: GetIssueCountsByTypePayload, { dispatch, getState }) => {\n const state = getState();\n const { filters = getDeviceFilters(state), group, status = DEVICE_STATES.accepted, ...remainder } = options;\n const { applicableFilters: nonMonitorFilters, filterTerms } = convertDeviceListStateToFilters({\n ...remainder,\n filters,\n group,\n offlineThreshold: state.app.offlineThreshold,\n selectedIssues: [type],\n status\n });\n const res = await Api.post<DeviceInventoryResponse[]>(`${inventoryApiUrlV2}/filters/search`, {\n page: 1,\n per_page: 1,\n filters: filterTerms,\n attributes: [{ scope: 'identity', attribute: 'status' }]\n }).catch(err => commonErrorHandler(err, `Retrieving issue counts failed:`, dispatch, commonErrorFallback));\n const total = nonMonitorFilters.length ? state.monitor.issueCounts.byType[type].total : Number(res.headers[headerNames.total]);\n const filtered = nonMonitorFilters.length ? Number(res.headers[headerNames.total]) : total;\n if (total === state.monitor.issueCounts.byType[type].total && filtered === state.monitor.issueCounts.byType[type].filtered) {\n return;\n }\n return dispatch(actions.receiveDeviceIssueCounts({ counts: { filtered, total }, issueType: type }));\n }\n);\n\nexport const getDeviceMonitorConfig = createAppAsyncThunk(`${sliceName}/getDeviceMonitorConfig`, (id: string, { dispatch }) =>\n Api.get<MonitorConfiguration[]>(`${monitorApiUrlv1}/devices/${id}/config`)\n .catch(err => commonErrorHandler(err, `Retrieving device monitor config for device ${id} failed:`, dispatch))\n .then(({ data }) => Promise.all([dispatch(storeActions.receivedDevice({ id, monitors: data }), Promise.resolve(data))]))\n);\n\ninterface ChangeNotificationSettingPayload {\n channel?: AlertChannelKey;\n enabled: boolean;\n}\nexport const changeNotificationSetting = createAppAsyncThunk(\n `${sliceName}/changeNotificationSetting`,\n ({ enabled, channel = alertChannels.email as AlertChannelKey }: ChangeNotificationSettingPayload, { dispatch }) =>\n Api.put(`${monitorApiUrlv1}/settings/global/channel/alerts/${channel}/status`, { enabled })\n .catch(err => commonErrorHandler(err, `${enabled ? 'En' : 'Dis'}abling ${channel} alerts failed:`, dispatch))\n .then(() =>\n Promise.all([\n dispatch(actions.changeAlertChannel({ channel, enabled })),\n dispatch(\n storeActions.setSnackbar({ message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CACF;AAEA,MAAa,yBAAyB,oBAAoB,GAAG,UAAU,2BAA2B,IAAY,EAAE,eAC9G,IAAI,IAA4B,GAAG,gBAAgB,WAAW,GAAG,QAAQ,CAAC,CACvE,OAAM,QAAO,mBAAmB,KAAK,+CAA+C,GAAG,WAAW,QAAQ,CAAC,CAAC,CAC5G,MAAM,EAAE,WAAW,QAAQ,IAAI,CAAC,SAASA,gBAAa,eAAe;CAAE;CAAI,UAAU;AAAK,CAAC,GAAG,QAAQ,QAAQ,IAAI,CAAC,CAAC,CAAC,CAAC,CAC3H;AAMA,MAAa,4BAA4B,oBACvC,GAAG,UAAU,8BACZ,EAAE,SAAS,UAAU,cAAc,SAA8D,EAAE,eAClG,IAAI,IAAI,GAAG,gBAAgB,kCAAkC,QAAQ,UAAU,EAAE,QAAQ,CAAC,CAAC,CACxF,OAAM,QAAO,mBAAmB,KAAK,GAAG,UAAU,OAAO,MAAM,UAAU,QAAQ,kBAAkB,QAAQ,CAAC,CAAC,CAC7G,WACC,QAAQ,IAAI,CACV,SAAS,QAAQ,mBAAmB;CAAE;CAAS;AAAQ,CAAC,CAAC,GACzD,SACEA,gBAAa,YAAY;CAAE,SAAS,gBAAgB,UAAU,OAAO,MAAM,QAAQ,QAAQ;CAAU,kBAAkB,SAAS;AAAY,CAAC,CAC/I,CACF,CAAC,CACH,CACN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.cjs","names":[],"sources":["../../src/onboardingSlice/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 {
|
|
1
|
+
{"version":3,"file":"selectors.cjs","names":[],"sources":["../../src/onboardingSlice/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 { OnboardingSliceType } from '.';\n\nexport type OnboardingState = { onboarding: OnboardingSliceType };\n\nexport const getOnboarding = (state: OnboardingState) => state.onboarding;\n"],"mappings":";;AAiBA,MAAa,iBAAiB,UAA2B,MAAM"}
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
|
|
3
|
-
//#region src/onboardingSlice/selectors.d.ts
|
|
4
|
-
export declare const getOnboarding: (state: RootState) => OnboardingSliceType;
|
|
5
|
-
//#endregion
|
|
6
|
-
//# sourceMappingURL=selectors.d.cts.map
|
|
1
|
+
import { n as getOnboarding, t as OnboardingState } from "../selectors-CQYkG1VI.cjs";
|
|
2
|
+
export { OnboardingState, getOnboarding };
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
|
|
3
|
-
//#region src/onboardingSlice/selectors.d.ts
|
|
4
|
-
export declare const getOnboarding: (state: RootState) => OnboardingSliceType;
|
|
5
|
-
//#endregion
|
|
6
|
-
//# sourceMappingURL=selectors.d.ts.map
|
|
1
|
+
import { n as getOnboarding, t as OnboardingState } from "../selectors-elCimAHX.js";
|
|
2
|
+
export { OnboardingState, getOnboarding };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.js","names":[],"sources":["../../src/onboardingSlice/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 {
|
|
1
|
+
{"version":3,"file":"selectors.js","names":[],"sources":["../../src/onboardingSlice/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 { OnboardingSliceType } from '.';\n\nexport type OnboardingState = { onboarding: OnboardingSliceType };\n\nexport const getOnboarding = (state: OnboardingState) => state.onboarding;\n"],"mappings":";AAiBA,MAAa,iBAAiB,UAA2B,MAAM"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../constants-
|
|
1
|
+
import "../constants-CUwYPOYK.cjs";
|
|
2
2
|
import { t as OnboardingStep } from "../constants-Db_RBdlV.cjs";
|
|
3
|
-
import { a as UserSettings } from "../index-
|
|
3
|
+
import { a as UserSettings } from "../index-DNYeo7wc.cjs";
|
|
4
4
|
import { n as OnboardingSliceType, t as OnboardingApproach } from "../index-CoObjWL4.cjs";
|
|
5
|
-
import {
|
|
5
|
+
import { i as RootState, t as AppDispatch } from "../store-CCvk8X-k.cjs";
|
|
6
6
|
//#region src/onboardingSlice/thunks.d.ts
|
|
7
7
|
export declare const getOnboardingState: import("@reduxjs/toolkit").AsyncThunk<[{
|
|
8
8
|
payload: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../constants-
|
|
1
|
+
import "../constants-CCkKh9KM.js";
|
|
2
2
|
import { t as OnboardingStep } from "../constants-Db_RBdlV.js";
|
|
3
|
-
import { a as UserSettings } from "../index
|
|
3
|
+
import { a as UserSettings } from "../index-C1vNDCYR.js";
|
|
4
4
|
import { n as OnboardingSliceType, t as OnboardingApproach } from "../index-CoObjWL4.js";
|
|
5
|
-
import {
|
|
5
|
+
import { i as RootState, t as AppDispatch } from "../store-v5V-bbB_.js";
|
|
6
6
|
//#region src/onboardingSlice/thunks.d.ts
|
|
7
7
|
export declare const getOnboardingState: import("@reduxjs/toolkit").AsyncThunk<[{
|
|
8
8
|
payload: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_constants = require("../constants-
|
|
2
|
+
const require_constants = require("../constants-DsOnY5o5.cjs");
|
|
3
3
|
exports.AUDIT_LOGS_TYPES = require_constants.AUDIT_LOGS_TYPES;
|
|
4
4
|
exports.JSON_METADATA_FORMAT = require_constants.JSON_METADATA_FORMAT;
|
|
5
5
|
exports.SP_AUDIT_LOGS_TYPES = require_constants.SP_AUDIT_LOGS_TYPES;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as AUDIT_LOGS_TYPES, at as auditlogTypes, et as JSON_METADATA_FORMAT, it as XML_METADATA_FORMAT, nt as SSO_TYPES, ot as getOidcStartUrl, rt as TENANT_LIST_DEFAULT, st as getSamlStartUrl, tt as SP_AUDIT_LOGS_TYPES } from "../constants-
|
|
1
|
+
import { $ as AUDIT_LOGS_TYPES, at as auditlogTypes, et as JSON_METADATA_FORMAT, it as XML_METADATA_FORMAT, nt as SSO_TYPES, ot as getOidcStartUrl, rt as TENANT_LIST_DEFAULT, st as getSamlStartUrl, tt as SP_AUDIT_LOGS_TYPES } from "../constants-DjiC_FnZ.js";
|
|
2
2
|
export { AUDIT_LOGS_TYPES, JSON_METADATA_FORMAT, SP_AUDIT_LOGS_TYPES, SSO_TYPES, TENANT_LIST_DEFAULT, XML_METADATA_FORMAT, auditlogTypes, getOidcStartUrl, getSamlStartUrl };
|
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_constants = require("../constants-
|
|
5
|
+
const require_constants = require("../constants-DsOnY5o5.cjs");
|
|
6
6
|
let _reduxjs_toolkit = require("@reduxjs/toolkit");
|
|
7
7
|
let _northern_tech_utils_constants = require("@northern.tech/utils/constants");
|
|
8
8
|
//#region src/organizationSlice/index.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as organizationSlice, i as initialState, n as _default, o as sliceName, r as actions, t as OrganizationSliceType } from "../index-
|
|
1
|
+
import { a as organizationSlice, i as initialState, n as _default, o as sliceName, r as actions, t as OrganizationSliceType } from "../index-CzQRHJ6f.cjs";
|
|
2
2
|
export { OrganizationSliceType, actions, _default as default, initialState, organizationSlice, sliceName };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as organizationSlice, i as initialState, n as _default, o as sliceName, r as actions, t as OrganizationSliceType } from "../index-
|
|
1
|
+
import { a as organizationSlice, i as initialState, n as _default, o as sliceName, r as actions, t as OrganizationSliceType } from "../index-CvMpbsOo.js";
|
|
2
2
|
export { OrganizationSliceType, actions, _default as default, initialState, organizationSlice, sliceName };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as SORTING_OPTIONS, l as DEVICE_LIST_DEFAULTS, rt as TENANT_LIST_DEFAULT } from "../constants-
|
|
1
|
+
import { f as SORTING_OPTIONS, l as DEVICE_LIST_DEFAULTS, rt as TENANT_LIST_DEFAULT } from "../constants-DjiC_FnZ.js";
|
|
2
2
|
import { createSlice } from "@reduxjs/toolkit";
|
|
3
3
|
//#region src/organizationSlice/index.ts
|
|
4
4
|
const sliceName = "organization";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as AvailablePlans } from "../constants-
|
|
2
|
-
import "../constants-
|
|
3
|
-
import { d as TenantList, f as Webhook, l as SSOConfig } from "../types-
|
|
1
|
+
import { a as AvailablePlans } from "../constants-tC3RR_Oo.cjs";
|
|
2
|
+
import "../constants-CUwYPOYK.cjs";
|
|
3
|
+
import { d as TenantList, f as Webhook, l as SSOConfig } from "../types-CLASWtVP.cjs";
|
|
4
4
|
//#region src/organizationSlice/mocks.d.ts
|
|
5
5
|
declare const basicPlanId: AvailablePlans;
|
|
6
6
|
declare const professionalPlanId: AvailablePlans;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as AvailablePlans } from "../constants-
|
|
2
|
-
import "../constants-
|
|
3
|
-
import { d as TenantList, f as Webhook, l as SSOConfig } from "../types-
|
|
1
|
+
import { a as AvailablePlans } from "../constants-tC3RR_Oo.js";
|
|
2
|
+
import "../constants-CCkKh9KM.js";
|
|
3
|
+
import { d as TenantList, f as Webhook, l as SSOConfig } from "../types-B2gphGj8.js";
|
|
4
4
|
//#region src/organizationSlice/mocks.d.ts
|
|
5
5
|
declare const basicPlanId: AvailablePlans;
|
|
6
6
|
declare const professionalPlanId: AvailablePlans;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PLANS } from "../appSlice/constants.js";
|
|
2
|
-
import { l as DEVICE_LIST_DEFAULTS } from "../constants-
|
|
2
|
+
import { l as DEVICE_LIST_DEFAULTS } from "../constants-DjiC_FnZ.js";
|
|
3
3
|
import { initialState } from "./index.js";
|
|
4
4
|
//#region src/organizationSlice/mocks.ts
|
|
5
5
|
const basicPlanId = PLANS.os.id;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_constants = require("../constants-
|
|
2
|
+
const require_constants = require("../constants-DsOnY5o5.cjs");
|
|
3
3
|
let _reduxjs_toolkit = require("@reduxjs/toolkit");
|
|
4
4
|
//#region src/organizationSlice/selectors.ts
|
|
5
5
|
const getOrganization = (state) => state.organization.organization;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.cjs","names":["createSelector","EXTERNAL_PROVIDER","productOrder"],"sources":["../../src/organizationSlice/selectors.ts"],"sourcesContent":["// Copyright 2023 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport type { Tenant } from '@northern.tech/types/MenderTypes';\nimport { createSelector } from '@reduxjs/toolkit';\n\nimport { EXTERNAL_PROVIDER, productOrder } from '../constants';\
|
|
1
|
+
{"version":3,"file":"selectors.cjs","names":["createSelector","EXTERNAL_PROVIDER","productOrder"],"sources":["../../src/organizationSlice/selectors.ts"],"sourcesContent":["// Copyright 2023 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport type { Tenant } from '@northern.tech/types/MenderTypes';\nimport { createSelector } from '@reduxjs/toolkit';\n\nimport type { OrganizationSliceType } from '.';\nimport { EXTERNAL_PROVIDER, productOrder } from '../constants';\n\nexport type OrganizationState = { organization: OrganizationSliceType };\n\nexport const getOrganization = (state: OrganizationState) => state.organization.organization;\nexport const getProducts = (state: OrganizationState) => state.organization.products;\nexport const getExternalIntegrations = (state: OrganizationState) => state.organization.externalDeviceIntegrations;\nexport const getAuditlogState = (state: OrganizationState) => state.organization.auditlog.selectionState;\nexport const getAuditLog = (state: OrganizationState) => state.organization.auditlog.events;\nexport const getAuditLogSelectionState = (state: OrganizationState) => state.organization.auditlog.selectionState;\nexport const getBillingProfile = (state: OrganizationState) => state.organization.organization.billing_profile;\nexport const getSubscription = (state: OrganizationState) => state.organization.organization.subscription;\nexport const getCard = (state: OrganizationState) => state.organization.card;\nexport const getSsoConfig = ({ organization: { ssoConfigs = [] } }: OrganizationState) => ssoConfigs[0];\nexport const getTenantsList = (state: OrganizationState) => state.organization.tenantList;\nexport const getWebhookEvents = (state: OrganizationState) => state.organization.webhooks.events;\nexport const getWebhookEventsTotal = (state: OrganizationState) => 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: OrganizationState) => state.organization.organization.service_provider;\n\nexport const getWebhooks = createSelector([getExternalIntegrations], integrations =>\n integrations.filter(integration => integration.id && integration.provider === EXTERNAL_PROVIDER.webhook.provider)\n);\nexport const getWebhookEventInfo = createSelector([getWebhooks, getWebhookEvents, getWebhookEventsTotal], (webhooks, events, eventsTotal) =>\n webhooks.length ? { events, eventsTotal } : { events: [], eventsTotal: 0 }\n);\n\nexport const getAuditLogEntry = createSelector([getAuditLog, getAuditLogSelectionState], (events, { selectedId }) => {\n if (!selectedId) {\n return;\n }\n const [eventAction, eventTime] = atob(selectedId).split('|');\n return events.find(item => item.action === eventAction && item.time === eventTime);\n});\n\nconst toTierName = (key: string) => key.replace(/max_|_?devices/g, '') || 'standard';\nconst processDeviceLimits = (deviceLimits: Tenant['device_limits'], skipFilter = false) => {\n const result: { disabled: string[]; limits: Record<string, object> } = { limits: {}, disabled: [] };\n if (!deviceLimits) return result;\n const tiersByName = Object.fromEntries(Object.entries(deviceLimits).map(([key, limit]) => [toTierName(key), { key, limit }]));\n return productOrder.reduce((accu, tierName) => {\n const entry = tiersByName[tierName];\n if (!entry) return accu;\n const { key, limit } = entry;\n if (limit.value === 0) {\n accu.disabled.push(tierName);\n if (!skipFilter) return accu;\n }\n accu.limits[tierName] = {\n id: tierName,\n backendId: key,\n limit: limit.value,\n current: limit.current_value,\n name: tierName,\n quotaLeft: Math.max(limit.value - limit.current_value, 0),\n limitReached: limit.value !== -1 && limit.value <= limit.current_value\n };\n return accu;\n }, result);\n};\nconst getDeviceLimitsInfo = createSelector([getOrganization], ({ device_limits }) => processDeviceLimits(device_limits));\nexport const getDisabledTiers = createSelector([getDeviceLimitsInfo], ({ disabled }) => disabled);\nexport const getSpLimits = createSelector([getDeviceLimitsInfo], ({ limits }) => limits);\nexport const getTenantListWithLimits = createSelector([getTenantsList], tenantList => ({\n ...tenantList,\n tenants: tenantList.tenants.map(tenant => ({\n ...tenant,\n device_limits: processDeviceLimits(tenant.device_limits, true).limits\n }))\n}));\n"],"mappings":";;;;AAqBA,MAAa,mBAAmB,UAA6B,MAAM,aAAa;AAChF,MAAa,eAAe,UAA6B,MAAM,aAAa;AAC5E,MAAa,2BAA2B,UAA6B,MAAM,aAAa;AACxF,MAAa,oBAAoB,UAA6B,MAAM,aAAa,SAAS;AAC1F,MAAa,eAAe,UAA6B,MAAM,aAAa,SAAS;AACrF,MAAa,6BAA6B,UAA6B,MAAM,aAAa,SAAS;AACnG,MAAa,qBAAqB,UAA6B,MAAM,aAAa,aAAa;AAC/F,MAAa,mBAAmB,UAA6B,MAAM,aAAa,aAAa;AAC7F,MAAa,WAAW,UAA6B,MAAM,aAAa;AACxE,MAAa,gBAAgB,EAAE,cAAc,EAAE,aAAa,CAAC,UAA6B,WAAW;AACrG,MAAa,kBAAkB,UAA6B,MAAM,aAAa;AAC/E,MAAa,oBAAoB,UAA6B,MAAM,aAAa,SAAS;AAC1F,MAAa,yBAAyB,UAA6B,MAAM,aAAa,SAAS;AAE/F,MAAa,6BAAA,GAA4BA,i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