@northern.tech/store 0.48.0 → 0.49.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 +7 -6
- package/dist/actions.d.ts +7 -6
- package/dist/appSlice/constants.cjs +12 -2
- 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.d.cts +1 -1
- package/dist/appSlice/selectors.d.ts +1 -1
- package/dist/appSlice/thunks.d.cts +2 -2
- package/dist/appSlice/thunks.d.ts +2 -2
- package/dist/appSlice/thunks.js +1 -2
- package/dist/auth.cjs +1 -1
- package/dist/auth.d.cts +1 -1
- package/dist/auth.d.ts +1 -1
- package/dist/auth.js +1 -1
- package/dist/commonConstants.cjs +13 -3
- package/dist/commonConstants.d.cts +1 -1
- package/dist/commonConstants.d.ts +1 -1
- package/dist/commonConstants.js +1 -2
- package/dist/commonSelectors.cjs +1 -1
- package/dist/commonSelectors.d.cts +16 -15
- package/dist/commonSelectors.d.ts +16 -15
- package/dist/commonSelectors.js +1 -1
- package/dist/{constants-3gsHyxWr.d.ts → constants-BtVu36ou.d.ts} +3 -3
- package/dist/{constants-OZiiFKiA.d.ts → constants-Cr68z0iM.d.cts} +9 -10
- package/dist/{constants-OZiiFKiA.d.cts → constants-Cr68z0iM.d.ts} +9 -10
- package/dist/{constants-DsOnY5o5.cjs → constants-DKF0kxhY.cjs} +12 -13
- package/dist/{constants-DsOnY5o5.cjs.map → constants-DKF0kxhY.cjs.map} +1 -1
- package/dist/{constants-hMMMdt0R.d.cts → constants-DsJM7i1a.d.cts} +3 -3
- package/dist/{constants-yul-O5hD.js → constants-TPYvZDsI.js} +14 -15
- package/dist/{constants-yul-O5hD.js.map → constants-TPYvZDsI.js.map} +1 -1
- package/dist/constants.cjs +313 -52
- package/dist/constants.d.cts +3 -3
- package/dist/constants.d.ts +3 -3
- package/dist/constants.js +2 -2
- package/dist/deploymentsSlice/constants.cjs +1 -1
- package/dist/deploymentsSlice/constants.js +1 -2
- 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.js +1 -1
- package/dist/deploymentsSlice/thunks.d.cts +5 -4
- package/dist/deploymentsSlice/thunks.d.ts +5 -4
- package/dist/deploymentsSlice/thunks.js +1 -2
- 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 -2
- 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 +1 -1
- package/dist/devicesSlice/selectors.d.cts +1 -1
- package/dist/devicesSlice/selectors.d.ts +1 -1
- package/dist/devicesSlice/selectors.js +1 -1
- package/dist/devicesSlice/thunks.d.cts +5 -4
- package/dist/devicesSlice/thunks.d.ts +5 -4
- package/dist/devicesSlice/thunks.js +1 -2
- package/dist/{index-D8O1HJ8Q.d.cts → index-3mpuzSLi.d.cts} +2 -2
- package/dist/{index-C-6WkMAo.d.cts → index-BP392nKV.d.cts} +2 -2
- package/dist/{index-uhmZ9qaP.d.ts → index-Bc7Ugak_.d.ts} +2 -2
- package/dist/{index-B9jUHGsM.d.cts → index-BnWRWRyV.d.cts} +2 -2
- package/dist/{index-DXfbW2gi.d.ts → index-CVsuKFks.d.ts} +2 -2
- package/dist/{index-CD39K38q.d.ts → index-Cai4oXpN.d.ts} +2 -2
- package/dist/{index-BoZjwQHk.d.cts → index-CwjRezv2.d.cts} +2 -2
- package/dist/{index-DlTiYWBe.d.cts → index-D0DMxU8O.d.cts} +2 -2
- package/dist/{index-I82Wu-Ah.d.ts → index-DTeKxs80.d.cts} +6 -3
- package/dist/{index-Dd_guNwA.d.cts → index-TS08J8mY.d.ts} +6 -3
- package/dist/{index-KQNyWRoG.d.ts → index-oFn9qHWB.d.ts} +2 -2
- package/dist/{index-BMi8ZqpV.d.ts → index-sw1Baeui.d.ts} +2 -2
- package/dist/liststatehook.d.cts +1 -0
- package/dist/liststatehook.d.ts +1 -0
- package/dist/locationutils.cjs +1 -1
- package/dist/locationutils.d.cts +4 -3
- package/dist/locationutils.d.ts +4 -3
- package/dist/locationutils.js +1 -1
- package/dist/mockState.d.cts +2 -1
- package/dist/mockState.d.ts +2 -1
- 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.d.cts +1 -1
- package/dist/monitorSlice/selectors.d.ts +1 -1
- package/dist/monitorSlice/thunks.d.cts +5 -4
- package/dist/monitorSlice/thunks.d.ts +5 -4
- package/dist/monitorSlice/thunks.js +1 -1
- package/dist/onboardingSlice/mocks.cjs.map +1 -1
- package/dist/onboardingSlice/thunks.d.cts +3 -3
- package/dist/onboardingSlice/thunks.d.ts +3 -3
- package/dist/onboardingSlice/thunks.js +1 -2
- package/dist/organizationSlice/constants.cjs +1 -1
- package/dist/organizationSlice/constants.d.cts +1 -1
- package/dist/organizationSlice/constants.d.ts +1 -1
- package/dist/organizationSlice/constants.js +1 -2
- package/dist/organizationSlice/index.cjs +4 -1
- package/dist/organizationSlice/index.cjs.map +1 -1
- package/dist/organizationSlice/index.d.cts +1 -1
- package/dist/organizationSlice/index.d.ts +1 -1
- package/dist/organizationSlice/index.js +4 -1
- package/dist/organizationSlice/index.js.map +1 -1
- package/dist/organizationSlice/mocks.d.cts +4 -2
- package/dist/organizationSlice/mocks.d.ts +4 -2
- package/dist/organizationSlice/mocks.js +1 -1
- package/dist/organizationSlice/selectors.cjs +3 -1
- package/dist/organizationSlice/selectors.cjs.map +1 -1
- package/dist/organizationSlice/selectors.d.cts +2 -2
- package/dist/organizationSlice/selectors.d.ts +2 -2
- package/dist/organizationSlice/selectors.js +3 -2
- package/dist/organizationSlice/selectors.js.map +1 -1
- package/dist/organizationSlice/thunks.cjs +1 -0
- package/dist/organizationSlice/thunks.d.cts +19 -5
- package/dist/organizationSlice/thunks.d.ts +19 -5
- package/dist/organizationSlice/thunks.js +1 -2
- 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.d.cts +1 -1
- package/dist/releasesSlice/selectors.d.ts +1 -1
- package/dist/releasesSlice/thunks.cjs +1 -1
- package/dist/releasesSlice/thunks.d.cts +5 -4
- package/dist/releasesSlice/thunks.d.ts +5 -4
- package/dist/releasesSlice/thunks.js +1 -1
- package/dist/{selectors-CdCZGn7e.d.cts → selectors-BA53-rNP.d.cts} +2 -2
- package/dist/{selectors-eYLuQW4M.d.ts → selectors-BBt6fdWs.d.ts} +2 -2
- package/dist/{selectors-SvKXGJM5.d.ts → selectors-C1JTUBEz.d.ts} +2 -2
- package/dist/{selectors-DuHGqmMJ.d.cts → selectors-CCrzjz8P.d.cts} +2 -2
- package/dist/{selectors-CftbLtXH.d.cts → selectors-CYBOWy-Q.d.cts} +2 -2
- package/dist/{selectors-CdllyZyW.d.cts → selectors-D1x4Lqo_.d.cts} +2 -2
- package/dist/{selectors-rto0SO4z.d.cts → selectors-DSV8VB7p.d.cts} +5 -4
- package/dist/{selectors-CR0q7rXC.d.cts → selectors-DhAje0Fw.d.cts} +2 -2
- package/dist/{selectors-qClZ9EXM.d.ts → selectors-DljXYHm2.d.ts} +5 -4
- package/dist/{selectors-D2j3_Mnp.d.ts → selectors-DtvvhDLv.d.ts} +2 -2
- package/dist/{selectors-D78O3T1o.d.ts → selectors-Dv3oN6m9.d.ts} +2 -2
- package/dist/{selectors-D_UFk4Uz.d.ts → selectors-GKTELLR6.d.ts} +2 -2
- package/dist/selectors.cjs +1 -0
- package/dist/selectors.d.cts +7 -7
- package/dist/selectors.d.ts +7 -7
- package/dist/selectors.js +2 -2
- package/dist/sockethook.cjs +2 -2
- package/dist/sockethook.cjs.map +1 -1
- package/dist/sockethook.d.cts +1 -0
- package/dist/sockethook.d.ts +1 -0
- package/dist/sockethook.js +2 -2
- package/dist/sockethook.js.map +1 -1
- package/dist/{store-BQcycBPp.d.ts → store-CROmfENq.d.ts} +9 -9
- package/dist/{store-CrLzRDCx.d.cts → store-xuKpT-o4.d.cts} +9 -9
- package/dist/store.cjs +1 -1
- package/dist/store.d.cts +1 -1
- package/dist/store.d.ts +1 -1
- package/dist/store.js +1 -1
- package/dist/thunks.cjs +6 -1
- package/dist/thunks.cjs.map +1 -1
- package/dist/thunks.d.cts +2 -2
- package/dist/thunks.d.ts +2 -2
- package/dist/thunks.js +6 -2
- package/dist/thunks.js.map +1 -1
- package/dist/{types-DB1IOQX8.d.ts → types-DQtRiyGK.d.ts} +3 -3
- package/dist/{types-DtTmD7Yn.d.cts → types-DXm-HM-j.d.cts} +3 -3
- package/dist/usersSlice/constants.cjs +1 -1
- package/dist/usersSlice/constants.js +1 -2
- 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 +1 -1
- package/dist/usersSlice/selectors.d.cts +1 -1
- package/dist/usersSlice/selectors.d.ts +1 -1
- package/dist/usersSlice/selectors.js +1 -1
- package/dist/usersSlice/thunks.d.cts +5 -4
- package/dist/usersSlice/thunks.d.ts +5 -4
- package/dist/usersSlice/thunks.js +1 -2
- package/dist/utils.cjs +8 -8
- 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 +2 -7
- package/dist/utils.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as MonitorSliceType } from "./index-
|
|
1
|
+
import { t as MonitorSliceType } from "./index-BP392nKV.cjs";
|
|
2
2
|
//#region src/monitorSlice/selectors.d.ts
|
|
3
3
|
type MonitorState = {
|
|
4
4
|
monitor: MonitorSliceType;
|
|
@@ -11,4 +11,4 @@ declare const getIssueCountsByType: (state: MonitorState) => {
|
|
|
11
11
|
};
|
|
12
12
|
//#endregion
|
|
13
13
|
export { getIssueCountsByType as n, MonitorState as t };
|
|
14
|
-
//# sourceMappingURL=selectors-
|
|
14
|
+
//# sourceMappingURL=selectors-CYBOWy-Q.d.cts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as ReadState } from "./constants-D8-yUk19.cjs";
|
|
2
|
-
import { a as UserSettings, i as UserSession, n as GlobalSettings, o as UserSliceType, r as User } from "./index-
|
|
2
|
+
import { a as UserSettings, i as UserSession, n as GlobalSettings, o as UserSliceType, r as User } from "./index-D0DMxU8O.cjs";
|
|
3
3
|
//#region src/usersSlice/selectors.d.ts
|
|
4
4
|
type UsersState = {
|
|
5
5
|
users: UserSliceType;
|
|
@@ -360,4 +360,4 @@ declare const getRolesInitialized: (state: UsersState) => boolean;
|
|
|
360
360
|
declare const getSecurityAlertDismissedTimestamp: (state: UsersState) => string | null;
|
|
361
361
|
//#endregion
|
|
362
362
|
export { getTooltipsState as _, getGlobalSettingsInitialized as a, getUsersById as b, getIsDarkMode as c, getRolesById as d, getRolesInitialized as f, getTooltipsById as g, getSelectedDeviceAttribute as h, getGlobalSettings as i, getOfflineThresholdSettings as l, getSecurityAlertDismissedTimestamp as m, getCurrentSession as n, getHas2FA as o, getRolesList as p, getCurrentUser as r, getIdAttribute as s, UsersState as t, getReadAllHelptips as u, getUserSettings as v, getUsersList as x, getUserSettingsInitialized as y };
|
|
363
|
-
//# sourceMappingURL=selectors-
|
|
363
|
+
//# sourceMappingURL=selectors-D1x4Lqo_.d.cts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as TenantList, i as Organization, l as SSOConfig, n as AuditLogSelectionState, o as ProductConfig, r as Card, u as Tenant } from "./types-
|
|
2
|
-
import { t as OrganizationSliceType } from "./index-
|
|
1
|
+
import { d as TenantList, i as Organization, l as SSOConfig, n as AuditLogSelectionState, o as ProductConfig, r as Card, u as Tenant } from "./types-DXm-HM-j.cjs";
|
|
2
|
+
import { t as OrganizationSliceType } from "./index-DTeKxs80.cjs";
|
|
3
3
|
//#region src/organizationSlice/selectors.d.ts
|
|
4
4
|
type OrganizationState = {
|
|
5
5
|
organization: OrganizationSliceType;
|
|
@@ -14,6 +14,7 @@ declare const getBillingProfile: (state: OrganizationState) => import("@northern
|
|
|
14
14
|
declare const getSubscription: (state: OrganizationState) => import("@northern.tech/types/types.gen").SubscriptionData | undefined;
|
|
15
15
|
declare const getCard: (state: OrganizationState) => Card;
|
|
16
16
|
declare const getSsoConfig: ({ organization: { ssoConfigs } }: OrganizationState) => SSOConfig;
|
|
17
|
+
declare const getSsoEndpoint: (state: OrganizationState) => import("@northern.tech/types/types.gen").SsoEndpoint | undefined;
|
|
17
18
|
declare const getTenantsList: (state: OrganizationState) => TenantList;
|
|
18
19
|
declare const getWebhookEvents: (state: OrganizationState) => import("@northern.tech/types/types.gen").Event[];
|
|
19
20
|
declare const getWebhookEventsTotal: (state: OrganizationState) => number;
|
|
@@ -370,5 +371,5 @@ declare const getTenantListWithLimits: ((state: OrganizationState) => {
|
|
|
370
371
|
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
371
372
|
};
|
|
372
373
|
//#endregion
|
|
373
|
-
export { getWebhooks as S,
|
|
374
|
-
//# sourceMappingURL=selectors-
|
|
374
|
+
export { getWebhooks as C, getWebhookEventsTotal as S, getSubscription as _, getAuditlogState as a, getWebhookEventInfo as b, getDeviceTwinIntegrations as c, getIsServiceProvider as d, getOrganization as f, getSsoEndpoint as g, getSsoConfig as h, getAuditLogSelectionState as i, getDisabledTiers as l, getSpLimits as m, getAuditLog as n, getBillingProfile as o, getProducts as p, getAuditLogEntry as r, getCard as s, OrganizationState as t, getExternalIntegrations as u, getTenantListWithLimits as v, getWebhookEvents as x, getTenantsList as y };
|
|
375
|
+
//# sourceMappingURL=selectors-DSV8VB7p.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ReleaseSliceType, c as SoftwareList, i as Release, n as Manifest$1, o as ReleasesList, r as ManifestsList } from "./index-
|
|
1
|
+
import { a as ReleaseSliceType, c as SoftwareList, i as Release, n as Manifest$1, o as ReleasesList, r as ManifestsList } from "./index-BnWRWRyV.cjs";
|
|
2
2
|
import { ReleaseV2, Software } from "@northern.tech/types/MenderTypes";
|
|
3
3
|
//#region src/releasesSlice/selectors.d.ts
|
|
4
4
|
type ReleasesState = {
|
|
@@ -590,4 +590,4 @@ declare const getHasSoftware: ((state: ReleasesState) => number | boolean) & {
|
|
|
590
590
|
};
|
|
591
591
|
//#endregion
|
|
592
592
|
export { getSelectedReleases as C, getSoftwareTags as D, getSoftwareListState as E, getSoftwareTagsById as O, getSelectedRelease as S, getSoftwareList as T, getReleasesById as _, getDeltaJobsListState as a, getSelectedManifest as b, getHasSoftware as c, getManifestsById as d, getManifestsList as f, getReleaseTagsById as g, getReleaseTags as h, getDeltaJobsById as i, getUpdateTypes as k, getManifestTags as l, getReleaseListState as m, getActiveTab as n, getHasManifests as o, getManifestsListState as p, getDeltaJobById as r, getHasReleases as s, ReleasesState as t, getManifestTagsById as u, getReleasesList as v, getSoftwareById as w, getSelectedManifests as x, getSelectedJob as y };
|
|
593
|
-
//# sourceMappingURL=selectors-
|
|
593
|
+
//# sourceMappingURL=selectors-DhAje0Fw.d.cts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as TenantList, i as Organization, l as SSOConfig, n as AuditLogSelectionState, o as ProductConfig, r as Card, u as Tenant } from "./types-
|
|
2
|
-
import { t as OrganizationSliceType } from "./index-
|
|
1
|
+
import { d as TenantList, i as Organization, l as SSOConfig, n as AuditLogSelectionState, o as ProductConfig, r as Card, u as Tenant } from "./types-DQtRiyGK.js";
|
|
2
|
+
import { t as OrganizationSliceType } from "./index-TS08J8mY.js";
|
|
3
3
|
//#region src/organizationSlice/selectors.d.ts
|
|
4
4
|
type OrganizationState = {
|
|
5
5
|
organization: OrganizationSliceType;
|
|
@@ -14,6 +14,7 @@ declare const getBillingProfile: (state: OrganizationState) => import("@northern
|
|
|
14
14
|
declare const getSubscription: (state: OrganizationState) => import("@northern.tech/types/types.gen").SubscriptionData | undefined;
|
|
15
15
|
declare const getCard: (state: OrganizationState) => Card;
|
|
16
16
|
declare const getSsoConfig: ({ organization: { ssoConfigs } }: OrganizationState) => SSOConfig;
|
|
17
|
+
declare const getSsoEndpoint: (state: OrganizationState) => import("@northern.tech/types/types.gen").SsoEndpoint | undefined;
|
|
17
18
|
declare const getTenantsList: (state: OrganizationState) => TenantList;
|
|
18
19
|
declare const getWebhookEvents: (state: OrganizationState) => import("@northern.tech/types/types.gen").Event[];
|
|
19
20
|
declare const getWebhookEventsTotal: (state: OrganizationState) => number;
|
|
@@ -370,5 +371,5 @@ declare const getTenantListWithLimits: ((state: OrganizationState) => {
|
|
|
370
371
|
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
371
372
|
};
|
|
372
373
|
//#endregion
|
|
373
|
-
export { getWebhooks as S,
|
|
374
|
-
//# sourceMappingURL=selectors-
|
|
374
|
+
export { getWebhooks as C, getWebhookEventsTotal as S, getSubscription as _, getAuditlogState as a, getWebhookEventInfo as b, getDeviceTwinIntegrations as c, getIsServiceProvider as d, getOrganization as f, getSsoEndpoint as g, getSsoConfig as h, getAuditLogSelectionState as i, getDisabledTiers as l, getSpLimits as m, getAuditLog as n, getBillingProfile as o, getProducts as p, getAuditLogEntry as r, getCard as s, OrganizationState as t, getExternalIntegrations as u, getTenantListWithLimits as v, getWebhookEvents as x, getTenantsList as y };
|
|
375
|
+
//# sourceMappingURL=selectors-DljXYHm2.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as ReadState } from "./constants-D8-yUk19.js";
|
|
2
|
-
import { a as UserSettings, i as UserSession, n as GlobalSettings, o as UserSliceType, r as User } from "./index-
|
|
2
|
+
import { a as UserSettings, i as UserSession, n as GlobalSettings, o as UserSliceType, r as User } from "./index-oFn9qHWB.js";
|
|
3
3
|
//#region src/usersSlice/selectors.d.ts
|
|
4
4
|
type UsersState = {
|
|
5
5
|
users: UserSliceType;
|
|
@@ -360,4 +360,4 @@ declare const getRolesInitialized: (state: UsersState) => boolean;
|
|
|
360
360
|
declare const getSecurityAlertDismissedTimestamp: (state: UsersState) => string | null;
|
|
361
361
|
//#endregion
|
|
362
362
|
export { getTooltipsState as _, getGlobalSettingsInitialized as a, getUsersById as b, getIsDarkMode as c, getRolesById as d, getRolesInitialized as f, getTooltipsById as g, getSelectedDeviceAttribute as h, getGlobalSettings as i, getOfflineThresholdSettings as l, getSecurityAlertDismissedTimestamp as m, getCurrentSession as n, getHas2FA as o, getRolesList as p, getCurrentUser as r, getIdAttribute as s, UsersState as t, getReadAllHelptips as u, getUserSettings as v, getUsersList as x, getUserSettingsInitialized as y };
|
|
363
|
-
//# sourceMappingURL=selectors-
|
|
363
|
+
//# sourceMappingURL=selectors-DtvvhDLv.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as Upload, i as SnackbarContent, n as SearchState, r as SentryConfig, t as AppSliceType } from "./index-
|
|
1
|
+
import { a as Upload, i as SnackbarContent, n as SearchState, r as SentryConfig, t as AppSliceType } from "./index-sw1Baeui.js";
|
|
2
2
|
//#region src/appSlice/selectors.d.ts
|
|
3
3
|
type AppState = {
|
|
4
4
|
app: AppSliceType;
|
|
@@ -96,4 +96,4 @@ declare const getIsPreview: ((state: AppState) => boolean) & {
|
|
|
96
96
|
};
|
|
97
97
|
//#endregion
|
|
98
98
|
export { getStripeKey as _, getFeatures as a, getVersionInformation as b, getHostedAnnouncement as c, getIsUploading as d, getRecaptchaKey as f, getSnackbar as g, getSentryConfig as h, getDocsVersion as i, getIsFirstLogin as l, getSearchedDevices as m, getAppInitDone as n, getFeedbackProbability as o, getSearchState as p, getCommit as r, getHostAddress as s, AppState as t, getIsPreview as u, getTrackerCode as v, getUploads as y };
|
|
99
|
-
//# sourceMappingURL=selectors-
|
|
99
|
+
//# sourceMappingURL=selectors-Dv3oN6m9.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as MonitorSliceType } from "./index-
|
|
1
|
+
import { t as MonitorSliceType } from "./index-Cai4oXpN.js";
|
|
2
2
|
//#region src/monitorSlice/selectors.d.ts
|
|
3
3
|
type MonitorState = {
|
|
4
4
|
monitor: MonitorSliceType;
|
|
@@ -11,4 +11,4 @@ declare const getIssueCountsByType: (state: MonitorState) => {
|
|
|
11
11
|
};
|
|
12
12
|
//#endregion
|
|
13
13
|
export { getIssueCountsByType as n, MonitorState as t };
|
|
14
|
-
//# sourceMappingURL=selectors-
|
|
14
|
+
//# sourceMappingURL=selectors-GKTELLR6.d.ts.map
|
package/dist/selectors.cjs
CHANGED
|
@@ -127,6 +127,7 @@ exports.getSoftwareTagsById = require_releasesSlice_selectors.getSoftwareTagsByI
|
|
|
127
127
|
exports.getSortedFilteringAttributes = require_devicesSlice_selectors.getSortedFilteringAttributes;
|
|
128
128
|
exports.getSpLimits = require_organizationSlice_selectors.getSpLimits;
|
|
129
129
|
exports.getSsoConfig = require_organizationSlice_selectors.getSsoConfig;
|
|
130
|
+
exports.getSsoEndpoint = require_organizationSlice_selectors.getSsoEndpoint;
|
|
130
131
|
exports.getStripeKey = require_appSlice_selectors.getStripeKey;
|
|
131
132
|
exports.getSubscription = require_organizationSlice_selectors.getSubscription;
|
|
132
133
|
exports.getTenantCapabilities = require_commonSelectors.getTenantCapabilities;
|
package/dist/selectors.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { _ as getStripeKey, a as getFeatures, b as getVersionInformation, c as getHostedAnnouncement, d as getIsUploading, f as getRecaptchaKey, g as getSnackbar, h as getSentryConfig, i as getDocsVersion, l as getIsFirstLogin, m as getSearchedDevices, n as getAppInitDone, o as getFeedbackProbability, p as getSearchState, r as getCommit, s as getHostAddress, t as AppState, u as getIsPreview, v as getTrackerCode, y as getUploads } from "./selectors-
|
|
1
|
+
import { _ as getStripeKey, a as getFeatures, b as getVersionInformation, c as getHostedAnnouncement, d as getIsUploading, f as getRecaptchaKey, g as getSnackbar, h as getSentryConfig, i as getDocsVersion, l as getIsFirstLogin, m as getSearchedDevices, n as getAppInitDone, o as getFeedbackProbability, p as getSearchState, r as getCommit, s as getHostAddress, t as AppState, u as getIsPreview, v as getTrackerCode, y as getUploads } from "./selectors-BA53-rNP.cjs";
|
|
2
2
|
import { a as getDeploymentsByStatus, c as getRecentDeployments, i as getDeploymentsById, l as getSelectedDeploymentDeviceIds, n as DeploymentsState, o as getDeploymentsSelectionState, r as getDeploymentById, s as getMappedDeploymentSelection, t as DEPLOYMENT_CUTOFF } from "./selectors-CH-yXu-7.cjs";
|
|
3
|
-
import { C as getListedDevices, D as getTestDeviceCount, E as getSortedFilteringAttributes, O as getTestDeviceLimit, S as getLimitMaxed, T as getSelectedGroupInfo, _ as getFilteringAttributes, a as getDeviceById, b as getGroupsById, c as getDeviceIdentityAttributes, d as getDeviceListState, f as getDeviceReports, g as getEnabledTiers, h as getDevicesByStatus, i as getCombinedLimit, l as getDeviceLimitStats, m as getDevicesById, n as getAcceptedDevices, o as getDeviceCountsByStatus, p as getDeviceTypes, r as getAttributesList, s as getDeviceFilters, t as DevicesState, u as getDeviceLimits, v as getGroupData, w as getSelectedGroup, x as getGroupsByIdWithoutUngrouped, y as getGroups } from "./selectors-
|
|
4
|
-
import { n as getIssueCountsByType, t as MonitorState } from "./selectors-
|
|
3
|
+
import { C as getListedDevices, D as getTestDeviceCount, E as getSortedFilteringAttributes, O as getTestDeviceLimit, S as getLimitMaxed, T as getSelectedGroupInfo, _ as getFilteringAttributes, a as getDeviceById, b as getGroupsById, c as getDeviceIdentityAttributes, d as getDeviceListState, f as getDeviceReports, g as getEnabledTiers, h as getDevicesByStatus, i as getCombinedLimit, l as getDeviceLimitStats, m as getDevicesById, n as getAcceptedDevices, o as getDeviceCountsByStatus, p as getDeviceTypes, r as getAttributesList, s as getDeviceFilters, t as DevicesState, u as getDeviceLimits, v as getGroupData, w as getSelectedGroup, x as getGroupsByIdWithoutUngrouped, y as getGroups } from "./selectors-CCrzjz8P.cjs";
|
|
4
|
+
import { n as getIssueCountsByType, t as MonitorState } from "./selectors-CYBOWy-Q.cjs";
|
|
5
5
|
import { n as getOnboarding, t as OnboardingState } from "./selectors-CQYkG1VI.cjs";
|
|
6
|
-
import {
|
|
7
|
-
import { C as getSelectedReleases, D as getSoftwareTags, E as getSoftwareListState, O as getSoftwareTagsById, S as getSelectedRelease, T as getSoftwareList, _ as getReleasesById, a as getDeltaJobsListState, b as getSelectedManifest, c as getHasSoftware, d as getManifestsById, f as getManifestsList, g as getReleaseTagsById, h as getReleaseTags, i as getDeltaJobsById, k as getUpdateTypes, l as getManifestTags, m as getReleaseListState, n as getActiveTab, o as getHasManifests, p as getManifestsListState, r as getDeltaJobById, s as getHasReleases, t as ReleasesState, u as getManifestTagsById, v as getReleasesList, w as getSoftwareById, x as getSelectedManifests, y as getSelectedJob } from "./selectors-
|
|
8
|
-
import { _ as getTooltipsState, a as getGlobalSettingsInitialized, b as getUsersById, c as getIsDarkMode, d as getRolesById, f as getRolesInitialized, g as getTooltipsById, h as getSelectedDeviceAttribute, i as getGlobalSettings, l as getOfflineThresholdSettings, m as getSecurityAlertDismissedTimestamp, n as getCurrentSession, o as getHas2FA, p as getRolesList, r as getCurrentUser, s as getIdAttribute, t as UsersState, u as getReadAllHelptips, v as getUserSettings, x as getUsersList, y as getUserSettingsInitialized } from "./selectors-
|
|
6
|
+
import { C as getWebhooks, S as getWebhookEventsTotal, _ as getSubscription, a as getAuditlogState, b as getWebhookEventInfo, c as getDeviceTwinIntegrations, d as getIsServiceProvider, f as getOrganization, g as getSsoEndpoint, h as getSsoConfig, i as getAuditLogSelectionState, l as getDisabledTiers, m as getSpLimits, n as getAuditLog, o as getBillingProfile, p as getProducts, r as getAuditLogEntry, s as getCard, t as OrganizationState, u as getExternalIntegrations, v as getTenantListWithLimits, x as getWebhookEvents, y as getTenantsList } from "./selectors-DSV8VB7p.cjs";
|
|
7
|
+
import { C as getSelectedReleases, D as getSoftwareTags, E as getSoftwareListState, O as getSoftwareTagsById, S as getSelectedRelease, T as getSoftwareList, _ as getReleasesById, a as getDeltaJobsListState, b as getSelectedManifest, c as getHasSoftware, d as getManifestsById, f as getManifestsList, g as getReleaseTagsById, h as getReleaseTags, i as getDeltaJobsById, k as getUpdateTypes, l as getManifestTags, m as getReleaseListState, n as getActiveTab, o as getHasManifests, p as getManifestsListState, r as getDeltaJobById, s as getHasReleases, t as ReleasesState, u as getManifestTagsById, v as getReleasesList, w as getSoftwareById, x as getSelectedManifests, y as getSelectedJob } from "./selectors-DhAje0Fw.cjs";
|
|
8
|
+
import { _ as getTooltipsState, a as getGlobalSettingsInitialized, b as getUsersById, c as getIsDarkMode, d as getRolesById, f as getRolesInitialized, g as getTooltipsById, h as getSelectedDeviceAttribute, i as getGlobalSettings, l as getOfflineThresholdSettings, m as getSecurityAlertDismissedTimestamp, n as getCurrentSession, o as getHas2FA, p as getRolesList, r as getCurrentUser, s as getIdAttribute, t as UsersState, u as getReadAllHelptips, v as getUserSettings, x as getUsersList, y as getUserSettingsInitialized } from "./selectors-D1x4Lqo_.cjs";
|
|
9
9
|
import { getAuditlogDevice, getAvailableIssueOptionsByType, getDemoDeviceAddress, getDeploymentRelease, getDeviceConfigDeployment, getDeviceReportsForUser, getFilterAttributes, getGroupNames, getIsEnterprise, getMappedDevicesList, getOnboardingState, getRelevantRoles, getSelectedDeploymentData, getShowSecurityAlert, getTenantCapabilities, getUserCapabilities, getUserRoles } from "./commonSelectors.cjs";
|
|
10
|
-
export { AppState, DEPLOYMENT_CUTOFF, DeploymentsState, DevicesState, MonitorState, OnboardingState, OrganizationState, ReleasesState, UsersState, getAcceptedDevices, getActiveTab, getAppInitDone, getAttributesList, getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogDevice, getAuditlogState, getAvailableIssueOptionsByType, getBillingProfile, getCard, getCombinedLimit, getCommit, getCurrentSession, getCurrentUser, getDeltaJobById, getDeltaJobsById, getDeltaJobsListState, getDemoDeviceAddress, getDeploymentById, getDeploymentRelease, getDeploymentsById, getDeploymentsByStatus, getDeploymentsSelectionState, getDeviceById, getDeviceConfigDeployment, getDeviceCountsByStatus, getDeviceFilters, getDeviceIdentityAttributes, getDeviceLimitStats, getDeviceLimits, getDeviceListState, getDeviceReports, getDeviceReportsForUser, getDeviceTwinIntegrations, getDeviceTypes, getDevicesById, getDevicesByStatus, getDisabledTiers, getDocsVersion, getEnabledTiers, getExternalIntegrations, getFeatures, getFeedbackProbability, getFilterAttributes, getFilteringAttributes, getGlobalSettings, getGlobalSettingsInitialized, getGroupData, getGroupNames, getGroups, getGroupsById, getGroupsByIdWithoutUngrouped, getHas2FA, getHasManifests, getHasReleases, getHasSoftware, getHostAddress, getHostedAnnouncement, getIdAttribute, getIsDarkMode, getIsEnterprise, getIsFirstLogin, getIsPreview, getIsServiceProvider, getIsUploading, getIssueCountsByType, getLimitMaxed, getListedDevices, getManifestTags, getManifestTagsById, getManifestsById, getManifestsList, getManifestsListState, getMappedDeploymentSelection, getMappedDevicesList, getOfflineThresholdSettings, getOnboarding, getOnboardingState, getOrganization, getProducts, getReadAllHelptips, getRecaptchaKey, getRecentDeployments, getReleaseListState, getReleaseTags, getReleaseTagsById, getReleasesById, getReleasesList, getRelevantRoles, getRolesById, getRolesInitialized, getRolesList, getSearchState, getSearchedDevices, getSecurityAlertDismissedTimestamp, getSelectedDeploymentData, getSelectedDeploymentDeviceIds, getSelectedDeviceAttribute, getSelectedGroup, getSelectedGroupInfo, getSelectedJob, getSelectedManifest, getSelectedManifests, getSelectedRelease, getSelectedReleases, getSentryConfig, getShowSecurityAlert, getSnackbar, getSoftwareById, getSoftwareList, getSoftwareListState, getSoftwareTags, getSoftwareTagsById, getSortedFilteringAttributes, getSpLimits, getSsoConfig, getStripeKey, getSubscription, getTenantCapabilities, getTenantListWithLimits, getTenantsList, getTestDeviceCount, getTestDeviceLimit, getTooltipsById, getTooltipsState, getTrackerCode, getUpdateTypes, getUploads, getUserCapabilities, getUserRoles, getUserSettings, getUserSettingsInitialized, getUsersById, getUsersList, getVersionInformation, getWebhookEventInfo, getWebhookEvents, getWebhookEventsTotal, getWebhooks };
|
|
10
|
+
export { AppState, DEPLOYMENT_CUTOFF, DeploymentsState, DevicesState, MonitorState, OnboardingState, OrganizationState, ReleasesState, UsersState, getAcceptedDevices, getActiveTab, getAppInitDone, getAttributesList, getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogDevice, getAuditlogState, getAvailableIssueOptionsByType, getBillingProfile, getCard, getCombinedLimit, getCommit, getCurrentSession, getCurrentUser, getDeltaJobById, getDeltaJobsById, getDeltaJobsListState, getDemoDeviceAddress, getDeploymentById, getDeploymentRelease, getDeploymentsById, getDeploymentsByStatus, getDeploymentsSelectionState, getDeviceById, getDeviceConfigDeployment, getDeviceCountsByStatus, getDeviceFilters, getDeviceIdentityAttributes, getDeviceLimitStats, getDeviceLimits, getDeviceListState, getDeviceReports, getDeviceReportsForUser, getDeviceTwinIntegrations, getDeviceTypes, getDevicesById, getDevicesByStatus, getDisabledTiers, getDocsVersion, getEnabledTiers, getExternalIntegrations, getFeatures, getFeedbackProbability, getFilterAttributes, getFilteringAttributes, getGlobalSettings, getGlobalSettingsInitialized, getGroupData, getGroupNames, getGroups, getGroupsById, getGroupsByIdWithoutUngrouped, getHas2FA, getHasManifests, getHasReleases, getHasSoftware, getHostAddress, getHostedAnnouncement, getIdAttribute, getIsDarkMode, getIsEnterprise, getIsFirstLogin, getIsPreview, getIsServiceProvider, getIsUploading, getIssueCountsByType, getLimitMaxed, getListedDevices, getManifestTags, getManifestTagsById, getManifestsById, getManifestsList, getManifestsListState, getMappedDeploymentSelection, getMappedDevicesList, getOfflineThresholdSettings, getOnboarding, getOnboardingState, getOrganization, getProducts, getReadAllHelptips, getRecaptchaKey, getRecentDeployments, getReleaseListState, getReleaseTags, getReleaseTagsById, getReleasesById, getReleasesList, getRelevantRoles, getRolesById, getRolesInitialized, getRolesList, getSearchState, getSearchedDevices, getSecurityAlertDismissedTimestamp, getSelectedDeploymentData, getSelectedDeploymentDeviceIds, getSelectedDeviceAttribute, getSelectedGroup, getSelectedGroupInfo, getSelectedJob, getSelectedManifest, getSelectedManifests, getSelectedRelease, getSelectedReleases, getSentryConfig, getShowSecurityAlert, getSnackbar, getSoftwareById, getSoftwareList, getSoftwareListState, getSoftwareTags, getSoftwareTagsById, getSortedFilteringAttributes, getSpLimits, getSsoConfig, getSsoEndpoint, getStripeKey, getSubscription, getTenantCapabilities, getTenantListWithLimits, getTenantsList, getTestDeviceCount, getTestDeviceLimit, getTooltipsById, getTooltipsState, getTrackerCode, getUpdateTypes, getUploads, getUserCapabilities, getUserRoles, getUserSettings, getUserSettingsInitialized, getUsersById, getUsersList, getVersionInformation, getWebhookEventInfo, getWebhookEvents, getWebhookEventsTotal, getWebhooks };
|
package/dist/selectors.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { _ as getStripeKey, a as getFeatures, b as getVersionInformation, c as getHostedAnnouncement, d as getIsUploading, f as getRecaptchaKey, g as getSnackbar, h as getSentryConfig, i as getDocsVersion, l as getIsFirstLogin, m as getSearchedDevices, n as getAppInitDone, o as getFeedbackProbability, p as getSearchState, r as getCommit, s as getHostAddress, t as AppState, u as getIsPreview, v as getTrackerCode, y as getUploads } from "./selectors-
|
|
1
|
+
import { _ as getStripeKey, a as getFeatures, b as getVersionInformation, c as getHostedAnnouncement, d as getIsUploading, f as getRecaptchaKey, g as getSnackbar, h as getSentryConfig, i as getDocsVersion, l as getIsFirstLogin, m as getSearchedDevices, n as getAppInitDone, o as getFeedbackProbability, p as getSearchState, r as getCommit, s as getHostAddress, t as AppState, u as getIsPreview, v as getTrackerCode, y as getUploads } from "./selectors-Dv3oN6m9.js";
|
|
2
2
|
import { a as getDeploymentsByStatus, c as getRecentDeployments, i as getDeploymentsById, l as getSelectedDeploymentDeviceIds, n as DeploymentsState, o as getDeploymentsSelectionState, r as getDeploymentById, s as getMappedDeploymentSelection, t as DEPLOYMENT_CUTOFF } from "./selectors-D9t4It2i.js";
|
|
3
|
-
import { C as getListedDevices, D as getTestDeviceCount, E as getSortedFilteringAttributes, O as getTestDeviceLimit, S as getLimitMaxed, T as getSelectedGroupInfo, _ as getFilteringAttributes, a as getDeviceById, b as getGroupsById, c as getDeviceIdentityAttributes, d as getDeviceListState, f as getDeviceReports, g as getEnabledTiers, h as getDevicesByStatus, i as getCombinedLimit, l as getDeviceLimitStats, m as getDevicesById, n as getAcceptedDevices, o as getDeviceCountsByStatus, p as getDeviceTypes, r as getAttributesList, s as getDeviceFilters, t as DevicesState, u as getDeviceLimits, v as getGroupData, w as getSelectedGroup, x as getGroupsByIdWithoutUngrouped, y as getGroups } from "./selectors-
|
|
4
|
-
import { n as getIssueCountsByType, t as MonitorState } from "./selectors-
|
|
3
|
+
import { C as getListedDevices, D as getTestDeviceCount, E as getSortedFilteringAttributes, O as getTestDeviceLimit, S as getLimitMaxed, T as getSelectedGroupInfo, _ as getFilteringAttributes, a as getDeviceById, b as getGroupsById, c as getDeviceIdentityAttributes, d as getDeviceListState, f as getDeviceReports, g as getEnabledTiers, h as getDevicesByStatus, i as getCombinedLimit, l as getDeviceLimitStats, m as getDevicesById, n as getAcceptedDevices, o as getDeviceCountsByStatus, p as getDeviceTypes, r as getAttributesList, s as getDeviceFilters, t as DevicesState, u as getDeviceLimits, v as getGroupData, w as getSelectedGroup, x as getGroupsByIdWithoutUngrouped, y as getGroups } from "./selectors-C1JTUBEz.js";
|
|
4
|
+
import { n as getIssueCountsByType, t as MonitorState } from "./selectors-GKTELLR6.js";
|
|
5
5
|
import { n as getOnboarding, t as OnboardingState } from "./selectors-elCimAHX.js";
|
|
6
|
-
import {
|
|
7
|
-
import { C as getSelectedReleases, D as getSoftwareTags, E as getSoftwareListState, O as getSoftwareTagsById, S as getSelectedRelease, T as getSoftwareList, _ as getReleasesById, a as getDeltaJobsListState, b as getSelectedManifest, c as getHasSoftware, d as getManifestsById, f as getManifestsList, g as getReleaseTagsById, h as getReleaseTags, i as getDeltaJobsById, k as getUpdateTypes, l as getManifestTags, m as getReleaseListState, n as getActiveTab, o as getHasManifests, p as getManifestsListState, r as getDeltaJobById, s as getHasReleases, t as ReleasesState, u as getManifestTagsById, v as getReleasesList, w as getSoftwareById, x as getSelectedManifests, y as getSelectedJob } from "./selectors-
|
|
8
|
-
import { _ as getTooltipsState, a as getGlobalSettingsInitialized, b as getUsersById, c as getIsDarkMode, d as getRolesById, f as getRolesInitialized, g as getTooltipsById, h as getSelectedDeviceAttribute, i as getGlobalSettings, l as getOfflineThresholdSettings, m as getSecurityAlertDismissedTimestamp, n as getCurrentSession, o as getHas2FA, p as getRolesList, r as getCurrentUser, s as getIdAttribute, t as UsersState, u as getReadAllHelptips, v as getUserSettings, x as getUsersList, y as getUserSettingsInitialized } from "./selectors-
|
|
6
|
+
import { C as getWebhooks, S as getWebhookEventsTotal, _ as getSubscription, a as getAuditlogState, b as getWebhookEventInfo, c as getDeviceTwinIntegrations, d as getIsServiceProvider, f as getOrganization, g as getSsoEndpoint, h as getSsoConfig, i as getAuditLogSelectionState, l as getDisabledTiers, m as getSpLimits, n as getAuditLog, o as getBillingProfile, p as getProducts, r as getAuditLogEntry, s as getCard, t as OrganizationState, u as getExternalIntegrations, v as getTenantListWithLimits, x as getWebhookEvents, y as getTenantsList } from "./selectors-DljXYHm2.js";
|
|
7
|
+
import { C as getSelectedReleases, D as getSoftwareTags, E as getSoftwareListState, O as getSoftwareTagsById, S as getSelectedRelease, T as getSoftwareList, _ as getReleasesById, a as getDeltaJobsListState, b as getSelectedManifest, c as getHasSoftware, d as getManifestsById, f as getManifestsList, g as getReleaseTagsById, h as getReleaseTags, i as getDeltaJobsById, k as getUpdateTypes, l as getManifestTags, m as getReleaseListState, n as getActiveTab, o as getHasManifests, p as getManifestsListState, r as getDeltaJobById, s as getHasReleases, t as ReleasesState, u as getManifestTagsById, v as getReleasesList, w as getSoftwareById, x as getSelectedManifests, y as getSelectedJob } from "./selectors-BBt6fdWs.js";
|
|
8
|
+
import { _ as getTooltipsState, a as getGlobalSettingsInitialized, b as getUsersById, c as getIsDarkMode, d as getRolesById, f as getRolesInitialized, g as getTooltipsById, h as getSelectedDeviceAttribute, i as getGlobalSettings, l as getOfflineThresholdSettings, m as getSecurityAlertDismissedTimestamp, n as getCurrentSession, o as getHas2FA, p as getRolesList, r as getCurrentUser, s as getIdAttribute, t as UsersState, u as getReadAllHelptips, v as getUserSettings, x as getUsersList, y as getUserSettingsInitialized } from "./selectors-DtvvhDLv.js";
|
|
9
9
|
import { getAuditlogDevice, getAvailableIssueOptionsByType, getDemoDeviceAddress, getDeploymentRelease, getDeviceConfigDeployment, getDeviceReportsForUser, getFilterAttributes, getGroupNames, getIsEnterprise, getMappedDevicesList, getOnboardingState, getRelevantRoles, getSelectedDeploymentData, getShowSecurityAlert, getTenantCapabilities, getUserCapabilities, getUserRoles } from "./commonSelectors.js";
|
|
10
|
-
export { AppState, DEPLOYMENT_CUTOFF, DeploymentsState, DevicesState, MonitorState, OnboardingState, OrganizationState, ReleasesState, UsersState, getAcceptedDevices, getActiveTab, getAppInitDone, getAttributesList, getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogDevice, getAuditlogState, getAvailableIssueOptionsByType, getBillingProfile, getCard, getCombinedLimit, getCommit, getCurrentSession, getCurrentUser, getDeltaJobById, getDeltaJobsById, getDeltaJobsListState, getDemoDeviceAddress, getDeploymentById, getDeploymentRelease, getDeploymentsById, getDeploymentsByStatus, getDeploymentsSelectionState, getDeviceById, getDeviceConfigDeployment, getDeviceCountsByStatus, getDeviceFilters, getDeviceIdentityAttributes, getDeviceLimitStats, getDeviceLimits, getDeviceListState, getDeviceReports, getDeviceReportsForUser, getDeviceTwinIntegrations, getDeviceTypes, getDevicesById, getDevicesByStatus, getDisabledTiers, getDocsVersion, getEnabledTiers, getExternalIntegrations, getFeatures, getFeedbackProbability, getFilterAttributes, getFilteringAttributes, getGlobalSettings, getGlobalSettingsInitialized, getGroupData, getGroupNames, getGroups, getGroupsById, getGroupsByIdWithoutUngrouped, getHas2FA, getHasManifests, getHasReleases, getHasSoftware, getHostAddress, getHostedAnnouncement, getIdAttribute, getIsDarkMode, getIsEnterprise, getIsFirstLogin, getIsPreview, getIsServiceProvider, getIsUploading, getIssueCountsByType, getLimitMaxed, getListedDevices, getManifestTags, getManifestTagsById, getManifestsById, getManifestsList, getManifestsListState, getMappedDeploymentSelection, getMappedDevicesList, getOfflineThresholdSettings, getOnboarding, getOnboardingState, getOrganization, getProducts, getReadAllHelptips, getRecaptchaKey, getRecentDeployments, getReleaseListState, getReleaseTags, getReleaseTagsById, getReleasesById, getReleasesList, getRelevantRoles, getRolesById, getRolesInitialized, getRolesList, getSearchState, getSearchedDevices, getSecurityAlertDismissedTimestamp, getSelectedDeploymentData, getSelectedDeploymentDeviceIds, getSelectedDeviceAttribute, getSelectedGroup, getSelectedGroupInfo, getSelectedJob, getSelectedManifest, getSelectedManifests, getSelectedRelease, getSelectedReleases, getSentryConfig, getShowSecurityAlert, getSnackbar, getSoftwareById, getSoftwareList, getSoftwareListState, getSoftwareTags, getSoftwareTagsById, getSortedFilteringAttributes, getSpLimits, getSsoConfig, getStripeKey, getSubscription, getTenantCapabilities, getTenantListWithLimits, getTenantsList, getTestDeviceCount, getTestDeviceLimit, getTooltipsById, getTooltipsState, getTrackerCode, getUpdateTypes, getUploads, getUserCapabilities, getUserRoles, getUserSettings, getUserSettingsInitialized, getUsersById, getUsersList, getVersionInformation, getWebhookEventInfo, getWebhookEvents, getWebhookEventsTotal, getWebhooks };
|
|
10
|
+
export { AppState, DEPLOYMENT_CUTOFF, DeploymentsState, DevicesState, MonitorState, OnboardingState, OrganizationState, ReleasesState, UsersState, getAcceptedDevices, getActiveTab, getAppInitDone, getAttributesList, getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogDevice, getAuditlogState, getAvailableIssueOptionsByType, getBillingProfile, getCard, getCombinedLimit, getCommit, getCurrentSession, getCurrentUser, getDeltaJobById, getDeltaJobsById, getDeltaJobsListState, getDemoDeviceAddress, getDeploymentById, getDeploymentRelease, getDeploymentsById, getDeploymentsByStatus, getDeploymentsSelectionState, getDeviceById, getDeviceConfigDeployment, getDeviceCountsByStatus, getDeviceFilters, getDeviceIdentityAttributes, getDeviceLimitStats, getDeviceLimits, getDeviceListState, getDeviceReports, getDeviceReportsForUser, getDeviceTwinIntegrations, getDeviceTypes, getDevicesById, getDevicesByStatus, getDisabledTiers, getDocsVersion, getEnabledTiers, getExternalIntegrations, getFeatures, getFeedbackProbability, getFilterAttributes, getFilteringAttributes, getGlobalSettings, getGlobalSettingsInitialized, getGroupData, getGroupNames, getGroups, getGroupsById, getGroupsByIdWithoutUngrouped, getHas2FA, getHasManifests, getHasReleases, getHasSoftware, getHostAddress, getHostedAnnouncement, getIdAttribute, getIsDarkMode, getIsEnterprise, getIsFirstLogin, getIsPreview, getIsServiceProvider, getIsUploading, getIssueCountsByType, getLimitMaxed, getListedDevices, getManifestTags, getManifestTagsById, getManifestsById, getManifestsList, getManifestsListState, getMappedDeploymentSelection, getMappedDevicesList, getOfflineThresholdSettings, getOnboarding, getOnboardingState, getOrganization, getProducts, getReadAllHelptips, getRecaptchaKey, getRecentDeployments, getReleaseListState, getReleaseTags, getReleaseTagsById, getReleasesById, getReleasesList, getRelevantRoles, getRolesById, getRolesInitialized, getRolesList, getSearchState, getSearchedDevices, getSecurityAlertDismissedTimestamp, getSelectedDeploymentData, getSelectedDeploymentDeviceIds, getSelectedDeviceAttribute, getSelectedGroup, getSelectedGroupInfo, getSelectedJob, getSelectedManifest, getSelectedManifests, getSelectedRelease, getSelectedReleases, getSentryConfig, getShowSecurityAlert, getSnackbar, getSoftwareById, getSoftwareList, getSoftwareListState, getSoftwareTags, getSoftwareTagsById, getSortedFilteringAttributes, getSpLimits, getSsoConfig, getSsoEndpoint, getStripeKey, getSubscription, getTenantCapabilities, getTenantListWithLimits, getTenantsList, getTestDeviceCount, getTestDeviceLimit, getTooltipsById, getTooltipsState, getTrackerCode, getUpdateTypes, getUploads, getUserCapabilities, getUserRoles, getUserSettings, getUserSettingsInitialized, getUsersById, getUsersList, getVersionInformation, getWebhookEventInfo, getWebhookEvents, getWebhookEventsTotal, getWebhooks };
|
package/dist/selectors.js
CHANGED
|
@@ -3,8 +3,8 @@ import { DEPLOYMENT_CUTOFF, getDeploymentById, getDeploymentsById, getDeployment
|
|
|
3
3
|
import { getAcceptedDevices, getAttributesList, getCombinedLimit, getDeviceById, getDeviceCountsByStatus, getDeviceFilters, getDeviceIdentityAttributes, getDeviceLimitStats, getDeviceLimits, getDeviceListState, getDeviceReports, getDeviceTypes, getDevicesById, getDevicesByStatus, getEnabledTiers, getFilteringAttributes, getGroupData, getGroups, getGroupsById, getGroupsByIdWithoutUngrouped, getLimitMaxed, getListedDevices, getSelectedGroup, getSelectedGroupInfo, getSortedFilteringAttributes, getTestDeviceCount, getTestDeviceLimit } from "./devicesSlice/selectors.js";
|
|
4
4
|
import { getIssueCountsByType } from "./monitorSlice/selectors.js";
|
|
5
5
|
import { getOnboarding } from "./onboardingSlice/selectors.js";
|
|
6
|
-
import { getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogState, getBillingProfile, getCard, getDeviceTwinIntegrations, getDisabledTiers, getExternalIntegrations, getIsServiceProvider, getOrganization, getProducts, getSpLimits, getSsoConfig, getSubscription, getTenantListWithLimits, getTenantsList, getWebhookEventInfo, getWebhookEvents, getWebhookEventsTotal, getWebhooks } from "./organizationSlice/selectors.js";
|
|
6
|
+
import { getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogState, getBillingProfile, getCard, getDeviceTwinIntegrations, getDisabledTiers, getExternalIntegrations, getIsServiceProvider, getOrganization, getProducts, getSpLimits, getSsoConfig, getSsoEndpoint, getSubscription, getTenantListWithLimits, getTenantsList, getWebhookEventInfo, getWebhookEvents, getWebhookEventsTotal, getWebhooks } from "./organizationSlice/selectors.js";
|
|
7
7
|
import { getActiveTab, getDeltaJobById, getDeltaJobsById, getDeltaJobsListState, getHasManifests, getHasReleases, getHasSoftware, getManifestTags, getManifestTagsById, getManifestsById, getManifestsList, getManifestsListState, getReleaseListState, getReleaseTags, getReleaseTagsById, getReleasesById, getReleasesList, getSelectedJob, getSelectedManifest, getSelectedManifests, getSelectedRelease, getSelectedReleases, getSoftwareById, getSoftwareList, getSoftwareListState, getSoftwareTags, getSoftwareTagsById, getUpdateTypes } from "./releasesSlice/selectors.js";
|
|
8
8
|
import { getCurrentSession, getCurrentUser, getGlobalSettings, getGlobalSettingsInitialized, getHas2FA, getIdAttribute, getIsDarkMode, getOfflineThresholdSettings, getReadAllHelptips, getRolesById, getRolesInitialized, getRolesList, getSecurityAlertDismissedTimestamp, getSelectedDeviceAttribute, getTooltipsById, getTooltipsState, getUserSettings, getUserSettingsInitialized, getUsersById, getUsersList } from "./usersSlice/selectors.js";
|
|
9
9
|
import { getAuditlogDevice, getAvailableIssueOptionsByType, getDemoDeviceAddress, getDeploymentRelease, getDeviceConfigDeployment, getDeviceReportsForUser, getFilterAttributes, getGroupNames, getIsEnterprise, getMappedDevicesList, getOnboardingState, getRelevantRoles, getSelectedDeploymentData, getShowSecurityAlert, getTenantCapabilities, getUserCapabilities, getUserRoles } from "./commonSelectors.js";
|
|
10
|
-
export { DEPLOYMENT_CUTOFF, getAcceptedDevices, getActiveTab, getAppInitDone, getAttributesList, getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogDevice, getAuditlogState, getAvailableIssueOptionsByType, getBillingProfile, getCard, getCombinedLimit, getCommit, getCurrentSession, getCurrentUser, getDeltaJobById, getDeltaJobsById, getDeltaJobsListState, getDemoDeviceAddress, getDeploymentById, getDeploymentRelease, getDeploymentsById, getDeploymentsByStatus, getDeploymentsSelectionState, getDeviceById, getDeviceConfigDeployment, getDeviceCountsByStatus, getDeviceFilters, getDeviceIdentityAttributes, getDeviceLimitStats, getDeviceLimits, getDeviceListState, getDeviceReports, getDeviceReportsForUser, getDeviceTwinIntegrations, getDeviceTypes, getDevicesById, getDevicesByStatus, getDisabledTiers, getDocsVersion, getEnabledTiers, getExternalIntegrations, getFeatures, getFeedbackProbability, getFilterAttributes, getFilteringAttributes, getGlobalSettings, getGlobalSettingsInitialized, getGroupData, getGroupNames, getGroups, getGroupsById, getGroupsByIdWithoutUngrouped, getHas2FA, getHasManifests, getHasReleases, getHasSoftware, getHostAddress, getHostedAnnouncement, getIdAttribute, getIsDarkMode, getIsEnterprise, getIsFirstLogin, getIsPreview, getIsServiceProvider, getIsUploading, getIssueCountsByType, getLimitMaxed, getListedDevices, getManifestTags, getManifestTagsById, getManifestsById, getManifestsList, getManifestsListState, getMappedDeploymentSelection, getMappedDevicesList, getOfflineThresholdSettings, getOnboarding, getOnboardingState, getOrganization, getProducts, getReadAllHelptips, getRecaptchaKey, getRecentDeployments, getReleaseListState, getReleaseTags, getReleaseTagsById, getReleasesById, getReleasesList, getRelevantRoles, getRolesById, getRolesInitialized, getRolesList, getSearchState, getSearchedDevices, getSecurityAlertDismissedTimestamp, getSelectedDeploymentData, getSelectedDeploymentDeviceIds, getSelectedDeviceAttribute, getSelectedGroup, getSelectedGroupInfo, getSelectedJob, getSelectedManifest, getSelectedManifests, getSelectedRelease, getSelectedReleases, getSentryConfig, getShowSecurityAlert, getSnackbar, getSoftwareById, getSoftwareList, getSoftwareListState, getSoftwareTags, getSoftwareTagsById, getSortedFilteringAttributes, getSpLimits, getSsoConfig, getStripeKey, getSubscription, getTenantCapabilities, getTenantListWithLimits, getTenantsList, getTestDeviceCount, getTestDeviceLimit, getTooltipsById, getTooltipsState, getTrackerCode, getUpdateTypes, getUploads, getUserCapabilities, getUserRoles, getUserSettings, getUserSettingsInitialized, getUsersById, getUsersList, getVersionInformation, getWebhookEventInfo, getWebhookEvents, getWebhookEventsTotal, getWebhooks };
|
|
10
|
+
export { DEPLOYMENT_CUTOFF, getAcceptedDevices, getActiveTab, getAppInitDone, getAttributesList, getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogDevice, getAuditlogState, getAvailableIssueOptionsByType, getBillingProfile, getCard, getCombinedLimit, getCommit, getCurrentSession, getCurrentUser, getDeltaJobById, getDeltaJobsById, getDeltaJobsListState, getDemoDeviceAddress, getDeploymentById, getDeploymentRelease, getDeploymentsById, getDeploymentsByStatus, getDeploymentsSelectionState, getDeviceById, getDeviceConfigDeployment, getDeviceCountsByStatus, getDeviceFilters, getDeviceIdentityAttributes, getDeviceLimitStats, getDeviceLimits, getDeviceListState, getDeviceReports, getDeviceReportsForUser, getDeviceTwinIntegrations, getDeviceTypes, getDevicesById, getDevicesByStatus, getDisabledTiers, getDocsVersion, getEnabledTiers, getExternalIntegrations, getFeatures, getFeedbackProbability, getFilterAttributes, getFilteringAttributes, getGlobalSettings, getGlobalSettingsInitialized, getGroupData, getGroupNames, getGroups, getGroupsById, getGroupsByIdWithoutUngrouped, getHas2FA, getHasManifests, getHasReleases, getHasSoftware, getHostAddress, getHostedAnnouncement, getIdAttribute, getIsDarkMode, getIsEnterprise, getIsFirstLogin, getIsPreview, getIsServiceProvider, getIsUploading, getIssueCountsByType, getLimitMaxed, getListedDevices, getManifestTags, getManifestTagsById, getManifestsById, getManifestsList, getManifestsListState, getMappedDeploymentSelection, getMappedDevicesList, getOfflineThresholdSettings, getOnboarding, getOnboardingState, getOrganization, getProducts, getReadAllHelptips, getRecaptchaKey, getRecentDeployments, getReleaseListState, getReleaseTags, getReleaseTagsById, getReleasesById, getReleasesList, getRelevantRoles, getRolesById, getRolesInitialized, getRolesList, getSearchState, getSearchedDevices, getSecurityAlertDismissedTimestamp, getSelectedDeploymentData, getSelectedDeploymentDeviceIds, getSelectedDeviceAttribute, getSelectedGroup, getSelectedGroupInfo, getSelectedJob, getSelectedManifest, getSelectedManifests, getSelectedRelease, getSelectedReleases, getSentryConfig, getShowSecurityAlert, getSnackbar, getSoftwareById, getSoftwareList, getSoftwareListState, getSoftwareTags, getSoftwareTagsById, getSortedFilteringAttributes, getSpLimits, getSsoConfig, getSsoEndpoint, getStripeKey, getSubscription, getTenantCapabilities, getTenantListWithLimits, getTenantsList, getTestDeviceCount, getTestDeviceLimit, getTooltipsById, getTooltipsState, getTrackerCode, getUpdateTypes, getUploads, getUserCapabilities, getUserRoles, getUserSettings, getUserSettingsInitialized, getUsersById, getUsersList, getVersionInformation, getWebhookEventInfo, getWebhookEvents, getWebhookEventsTotal, getWebhooks };
|
package/dist/sockethook.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
|
|
3
|
-
const require_constants = require("./constants-
|
|
3
|
+
const require_constants = require("./constants-DKF0kxhY.cjs");
|
|
4
4
|
let _northern_tech_utils_constants = require("@northern.tech/utils/constants");
|
|
5
5
|
let _northern_tech_utils_helpers = require("@northern.tech/utils/helpers");
|
|
6
6
|
let universal_cookie = require("universal-cookie");
|
|
@@ -32,6 +32,7 @@ const useSession = ({ onClose, onHealthCheckFailed, onMessageReceived, onNotify,
|
|
|
32
32
|
socketRef.current.send(encodedData);
|
|
33
33
|
}, []);
|
|
34
34
|
const close = (0, react.useCallback)(() => {
|
|
35
|
+
clearTimeout(healthcheckTimeout.current);
|
|
35
36
|
if (!socketRef.current || socketRef.current?.readyState !== WebSocket.OPEN) return;
|
|
36
37
|
sendMessage({
|
|
37
38
|
typ: require_constants.DEVICE_MESSAGE_TYPES.Stop,
|
|
@@ -81,7 +82,6 @@ const useSession = ({ onClose, onHealthCheckFailed, onMessageReceived, onNotify,
|
|
|
81
82
|
const onSocketError = (0, react.useCallback)((error) => {
|
|
82
83
|
onNotify(`WebSocket error: ${error.message || "Unknown error"}`);
|
|
83
84
|
close();
|
|
84
|
-
clearTimeout(healthcheckTimeout.current);
|
|
85
85
|
}, [close, onNotify]);
|
|
86
86
|
const onSocketOpen = (0, react.useCallback)(() => {
|
|
87
87
|
sendMessage({
|
package/dist/sockethook.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sockethook.cjs","names":["Cookies","Packr","useState","useRef","useCallback","MessageProtocols","MessageTypes","blobToString","byteArrayToString","TIMEOUTS","apiUrl"],"sources":["../src/sockethook.ts"],"sourcesContent":["// Copyright 2022 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 { useCallback, useEffect, useRef, useState } from 'react';\n\nimport { TIMEOUTS } from '@northern.tech/utils/constants';\nimport { blobToString, byteArrayToString } from '@northern.tech/utils/helpers';\nimport { Packr } from 'msgpackr';\nimport Cookies from 'universal-cookie';\n\nimport { DEVICE_MESSAGE_PROTOCOLS as MessageProtocols, DEVICE_MESSAGE_TYPES as MessageTypes, apiUrl } from './constants';\n\nconst cookies = new Cookies();\n\n// plain maps + omitted undefined fields keep the wire format compatible with the deviceconnect backend\nconst MessagePack = new Packr({ skipValues: [undefined], useRecords: false });\n\ntype UseSessionProps = {\n onClose: (event: CloseEvent) => void;\n onHealthCheckFailed: () => void;\n onMessageReceived: (body: Uint8Array) => void;\n onNotify: (message: string) => void;\n onOpen: (isOpen: boolean) => void;\n token: string;\n};\n\ntype MessageProps = {\n body?: Uint8Array;\n props: Record<string, string | number>;\n typ: string;\n};\n\ntype SessionWebSocket = WebSocket & { sessionId?: string };\n\ntype UseSessionReturn = [\n connect: (deviceId: string) => void,\n sendMessage: (message: MessageProps) => void,\n close: () => void,\n readyState: number,\n sessionId: string | undefined\n];\n\nexport const useSession = ({ onClose, onHealthCheckFailed, onMessageReceived, onNotify, onOpen, token }: UseSessionProps): UseSessionReturn => {\n const [sessionId, setSessionId] = useState<string | undefined>();\n const healthcheckTimeout = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n const socketRef = useRef<SessionWebSocket | undefined>(undefined);\n const sendMessage = useCallback(({ typ, body, props }: MessageProps): void => {\n if (!socketRef.current) {\n return;\n }\n const proto_header = { proto: MessageProtocols.Shell, typ, sid: socketRef.current.sessionId, props };\n const encodedData = MessagePack.pack({ hdr: proto_header, body });\n socketRef.current.send(encodedData);\n }, []);\n\n const close = useCallback((): void => {\n if (!socketRef.current || socketRef.current?.readyState !== WebSocket.OPEN) {\n return;\n }\n sendMessage({ typ: MessageTypes.Stop, props: {} });\n socketRef.current.close();\n setSessionId(undefined);\n }, [sendMessage]);\n\n const healthcheckFailed = useCallback((): void => {\n onHealthCheckFailed();\n close();\n }, [close, onHealthCheckFailed]);\n\n const onSocketMessage = useCallback(\n (event: MessageEvent): Promise<void> =>\n blobToString(event.data).then((data: unknown) => {\n const {\n hdr: { props = {} as Record<string, string | number>, proto, sid, typ },\n body\n } = MessagePack.unpack(new Uint8Array(data as ArrayBuffer)) as {\n body: Uint8Array;\n hdr: { props: Record<string, string | number>; proto: number; sid: string; typ: string };\n };\n if (proto !== MessageProtocols.Shell) {\n return;\n }\n switch (typ) {\n case MessageTypes.New: {\n if (props.status == WebSocket.CLOSING) {\n onNotify(`Error: ${byteArrayToString(body as unknown as Buffer)}`);\n setSessionId(undefined);\n return close();\n } else {\n clearTimeout(healthcheckTimeout.current);\n healthcheckTimeout.current = setTimeout(healthcheckFailed, 65 * TIMEOUTS.oneSecond);\n if (socketRef.current) {\n socketRef.current.sessionId = sid;\n }\n return setSessionId(sid);\n }\n }\n case MessageTypes.Shell:\n return onMessageReceived(body);\n case MessageTypes.Stop:\n return close();\n case MessageTypes.Ping: {\n if (healthcheckTimeout.current) {\n clearTimeout(healthcheckTimeout.current);\n }\n sendMessage({ typ: MessageTypes.Pong, props: {} });\n const timeout = parseInt(props.timeout as string);\n if (timeout > 0) {\n healthcheckTimeout.current = setTimeout(healthcheckFailed, timeout * TIMEOUTS.oneSecond);\n }\n return;\n }\n default:\n break;\n }\n }),\n [close, healthcheckFailed, onMessageReceived, onNotify, sendMessage]\n );\n\n const onSocketError = useCallback(\n (error: Event): void => {\n onNotify(`WebSocket error: ${(error as ErrorEvent).message || 'Unknown error'}`);\n close();\n clearTimeout(healthcheckTimeout.current);\n },\n [close, onNotify]\n );\n\n const onSocketOpen = useCallback((): void => {\n sendMessage({ typ: MessageTypes.New, props: {} });\n onOpen(true);\n }, [onOpen, sendMessage]);\n\n const onSocketClose = useCallback(\n (e: CloseEvent): void => {\n console.log('closing');\n onClose(e);\n close();\n },\n [close, onClose]\n );\n\n const connect = useCallback(\n (deviceId: string): void => {\n const uri = `wss://${window.location.host}${apiUrl.v1}/deviceconnect/devices/${deviceId}/connect`;\n setSessionId(undefined);\n cookies.set('JWT', token, { path: '/', secure: true, sameSite: 'strict', maxAge: 5 });\n try {\n socketRef.current = new WebSocket(uri);\n } catch (error) {\n console.log(error);\n }\n },\n [token]\n );\n\n useEffect(() => {\n const currentSocket = socketRef.current;\n if (!currentSocket) {\n return;\n }\n\n currentSocket.addEventListener('close', onSocketClose);\n currentSocket.addEventListener('error', onSocketError);\n currentSocket.addEventListener('message', onSocketMessage);\n currentSocket.addEventListener('open', onSocketOpen);\n\n return () => {\n currentSocket.removeEventListener('close', onSocketClose);\n currentSocket.removeEventListener('error', onSocketError);\n currentSocket.removeEventListener('message', onSocketMessage);\n currentSocket.removeEventListener('open', onSocketOpen);\n };\n // eslint-disable-next-line react-hooks/refs\n }, [onSocketClose, onSocketError, onSocketMessage, onSocketOpen, socketRef.current?.readyState]);\n\n // eslint-disable-next-line react-hooks/refs\n return [connect, sendMessage, close, socketRef.current?.readyState ?? WebSocket.CLOSED, sessionId];\n};\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"sockethook.cjs","names":["Cookies","Packr","useState","useRef","useCallback","MessageProtocols","MessageTypes","blobToString","byteArrayToString","TIMEOUTS","apiUrl"],"sources":["../src/sockethook.ts"],"sourcesContent":["// Copyright 2022 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 { useCallback, useEffect, useRef, useState } from 'react';\n\nimport { TIMEOUTS } from '@northern.tech/utils/constants';\nimport { blobToString, byteArrayToString } from '@northern.tech/utils/helpers';\nimport { Packr } from 'msgpackr';\nimport Cookies from 'universal-cookie';\n\nimport { DEVICE_MESSAGE_PROTOCOLS as MessageProtocols, DEVICE_MESSAGE_TYPES as MessageTypes, apiUrl } from './constants';\n\nconst cookies = new Cookies();\n\n// plain maps + omitted undefined fields keep the wire format compatible with the deviceconnect backend\nconst MessagePack = new Packr({ skipValues: [undefined], useRecords: false });\n\ntype UseSessionProps = {\n onClose: (event: CloseEvent) => void;\n onHealthCheckFailed: () => void;\n onMessageReceived: (body: Uint8Array) => void;\n onNotify: (message: string) => void;\n onOpen: (isOpen: boolean) => void;\n token: string;\n};\n\ntype MessageProps = {\n body?: Uint8Array;\n props: Record<string, string | number>;\n typ: string;\n};\n\ntype SessionWebSocket = WebSocket & { sessionId?: string };\n\ntype UseSessionReturn = [\n connect: (deviceId: string) => void,\n sendMessage: (message: MessageProps) => void,\n close: () => void,\n readyState: number,\n sessionId: string | undefined\n];\n\nexport const useSession = ({ onClose, onHealthCheckFailed, onMessageReceived, onNotify, onOpen, token }: UseSessionProps): UseSessionReturn => {\n const [sessionId, setSessionId] = useState<string | undefined>();\n const healthcheckTimeout = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n const socketRef = useRef<SessionWebSocket | undefined>(undefined);\n const sendMessage = useCallback(({ typ, body, props }: MessageProps): void => {\n if (!socketRef.current) {\n return;\n }\n const proto_header = { proto: MessageProtocols.Shell, typ, sid: socketRef.current.sessionId, props };\n const encodedData = MessagePack.pack({ hdr: proto_header, body });\n socketRef.current.send(encodedData);\n }, []);\n\n const close = useCallback((): void => {\n clearTimeout(healthcheckTimeout.current);\n if (!socketRef.current || socketRef.current?.readyState !== WebSocket.OPEN) {\n return;\n }\n sendMessage({ typ: MessageTypes.Stop, props: {} });\n socketRef.current.close();\n setSessionId(undefined);\n }, [sendMessage]);\n\n const healthcheckFailed = useCallback((): void => {\n onHealthCheckFailed();\n close();\n }, [close, onHealthCheckFailed]);\n\n const onSocketMessage = useCallback(\n (event: MessageEvent): Promise<void> =>\n blobToString(event.data).then((data: unknown) => {\n const {\n hdr: { props = {} as Record<string, string | number>, proto, sid, typ },\n body\n } = MessagePack.unpack(new Uint8Array(data as ArrayBuffer)) as {\n body: Uint8Array;\n hdr: { props: Record<string, string | number>; proto: number; sid: string; typ: string };\n };\n if (proto !== MessageProtocols.Shell) {\n return;\n }\n switch (typ) {\n case MessageTypes.New: {\n if (props.status == WebSocket.CLOSING) {\n onNotify(`Error: ${byteArrayToString(body as unknown as Buffer)}`);\n setSessionId(undefined);\n return close();\n } else {\n clearTimeout(healthcheckTimeout.current);\n healthcheckTimeout.current = setTimeout(healthcheckFailed, 65 * TIMEOUTS.oneSecond);\n if (socketRef.current) {\n socketRef.current.sessionId = sid;\n }\n return setSessionId(sid);\n }\n }\n case MessageTypes.Shell:\n return onMessageReceived(body);\n case MessageTypes.Stop:\n return close();\n case MessageTypes.Ping: {\n if (healthcheckTimeout.current) {\n clearTimeout(healthcheckTimeout.current);\n }\n sendMessage({ typ: MessageTypes.Pong, props: {} });\n const timeout = parseInt(props.timeout as string);\n if (timeout > 0) {\n healthcheckTimeout.current = setTimeout(healthcheckFailed, timeout * TIMEOUTS.oneSecond);\n }\n return;\n }\n default:\n break;\n }\n }),\n [close, healthcheckFailed, onMessageReceived, onNotify, sendMessage]\n );\n\n const onSocketError = useCallback(\n (error: Event): void => {\n onNotify(`WebSocket error: ${(error as ErrorEvent).message || 'Unknown error'}`);\n close();\n },\n [close, onNotify]\n );\n\n const onSocketOpen = useCallback((): void => {\n sendMessage({ typ: MessageTypes.New, props: {} });\n onOpen(true);\n }, [onOpen, sendMessage]);\n\n const onSocketClose = useCallback(\n (e: CloseEvent): void => {\n console.log('closing');\n onClose(e);\n close();\n },\n [close, onClose]\n );\n\n const connect = useCallback(\n (deviceId: string): void => {\n const uri = `wss://${window.location.host}${apiUrl.v1}/deviceconnect/devices/${deviceId}/connect`;\n setSessionId(undefined);\n cookies.set('JWT', token, { path: '/', secure: true, sameSite: 'strict', maxAge: 5 });\n try {\n socketRef.current = new WebSocket(uri);\n } catch (error) {\n console.log(error);\n }\n },\n [token]\n );\n\n useEffect(() => {\n const currentSocket = socketRef.current;\n if (!currentSocket) {\n return;\n }\n\n currentSocket.addEventListener('close', onSocketClose);\n currentSocket.addEventListener('error', onSocketError);\n currentSocket.addEventListener('message', onSocketMessage);\n currentSocket.addEventListener('open', onSocketOpen);\n\n return () => {\n currentSocket.removeEventListener('close', onSocketClose);\n currentSocket.removeEventListener('error', onSocketError);\n currentSocket.removeEventListener('message', onSocketMessage);\n currentSocket.removeEventListener('open', onSocketOpen);\n };\n // eslint-disable-next-line react-hooks/refs\n }, [onSocketClose, onSocketError, onSocketMessage, onSocketOpen, socketRef.current?.readyState]);\n\n // eslint-disable-next-line react-hooks/refs\n return [connect, sendMessage, close, socketRef.current?.readyState ?? WebSocket.CLOSED, sessionId];\n};\n"],"mappings":"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"}
|
package/dist/sockethook.d.cts
CHANGED
|
@@ -15,4 +15,5 @@ type MessageProps = {
|
|
|
15
15
|
type UseSessionReturn = [connect: (deviceId: string) => void, sendMessage: (message: MessageProps) => void, close: () => void, readyState: number, sessionId: string | undefined];
|
|
16
16
|
export declare const useSession: ({ onClose, onHealthCheckFailed, onMessageReceived, onNotify, onOpen, token }: UseSessionProps) => UseSessionReturn;
|
|
17
17
|
//#endregion
|
|
18
|
+
export {};
|
|
18
19
|
//# sourceMappingURL=sockethook.d.cts.map
|
package/dist/sockethook.d.ts
CHANGED
|
@@ -15,4 +15,5 @@ type MessageProps = {
|
|
|
15
15
|
type UseSessionReturn = [connect: (deviceId: string) => void, sendMessage: (message: MessageProps) => void, close: () => void, readyState: number, sessionId: string | undefined];
|
|
16
16
|
export declare const useSession: ({ onClose, onHealthCheckFailed, onMessageReceived, onNotify, onOpen, token }: UseSessionProps) => UseSessionReturn;
|
|
17
17
|
//#endregion
|
|
18
|
+
export {};
|
|
18
19
|
//# sourceMappingURL=sockethook.d.ts.map
|
package/dist/sockethook.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ft as DEVICE_MESSAGE_PROTOCOLS, h as apiUrl, pt as DEVICE_MESSAGE_TYPES } from "./constants-TPYvZDsI.js";
|
|
2
2
|
import { TIMEOUTS } from "@northern.tech/utils/constants";
|
|
3
3
|
import { blobToString, byteArrayToString } from "@northern.tech/utils/helpers";
|
|
4
4
|
import Cookies from "universal-cookie";
|
|
@@ -29,6 +29,7 @@ const useSession = ({ onClose, onHealthCheckFailed, onMessageReceived, onNotify,
|
|
|
29
29
|
socketRef.current.send(encodedData);
|
|
30
30
|
}, []);
|
|
31
31
|
const close = useCallback(() => {
|
|
32
|
+
clearTimeout(healthcheckTimeout.current);
|
|
32
33
|
if (!socketRef.current || socketRef.current?.readyState !== WebSocket.OPEN) return;
|
|
33
34
|
sendMessage({
|
|
34
35
|
typ: DEVICE_MESSAGE_TYPES.Stop,
|
|
@@ -78,7 +79,6 @@ const useSession = ({ onClose, onHealthCheckFailed, onMessageReceived, onNotify,
|
|
|
78
79
|
const onSocketError = useCallback((error) => {
|
|
79
80
|
onNotify(`WebSocket error: ${error.message || "Unknown error"}`);
|
|
80
81
|
close();
|
|
81
|
-
clearTimeout(healthcheckTimeout.current);
|
|
82
82
|
}, [close, onNotify]);
|
|
83
83
|
const onSocketOpen = useCallback(() => {
|
|
84
84
|
sendMessage({
|
package/dist/sockethook.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sockethook.js","names":["MessageProtocols","MessageTypes"],"sources":["../src/sockethook.ts"],"sourcesContent":["// Copyright 2022 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 { useCallback, useEffect, useRef, useState } from 'react';\n\nimport { TIMEOUTS } from '@northern.tech/utils/constants';\nimport { blobToString, byteArrayToString } from '@northern.tech/utils/helpers';\nimport { Packr } from 'msgpackr';\nimport Cookies from 'universal-cookie';\n\nimport { DEVICE_MESSAGE_PROTOCOLS as MessageProtocols, DEVICE_MESSAGE_TYPES as MessageTypes, apiUrl } from './constants';\n\nconst cookies = new Cookies();\n\n// plain maps + omitted undefined fields keep the wire format compatible with the deviceconnect backend\nconst MessagePack = new Packr({ skipValues: [undefined], useRecords: false });\n\ntype UseSessionProps = {\n onClose: (event: CloseEvent) => void;\n onHealthCheckFailed: () => void;\n onMessageReceived: (body: Uint8Array) => void;\n onNotify: (message: string) => void;\n onOpen: (isOpen: boolean) => void;\n token: string;\n};\n\ntype MessageProps = {\n body?: Uint8Array;\n props: Record<string, string | number>;\n typ: string;\n};\n\ntype SessionWebSocket = WebSocket & { sessionId?: string };\n\ntype UseSessionReturn = [\n connect: (deviceId: string) => void,\n sendMessage: (message: MessageProps) => void,\n close: () => void,\n readyState: number,\n sessionId: string | undefined\n];\n\nexport const useSession = ({ onClose, onHealthCheckFailed, onMessageReceived, onNotify, onOpen, token }: UseSessionProps): UseSessionReturn => {\n const [sessionId, setSessionId] = useState<string | undefined>();\n const healthcheckTimeout = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n const socketRef = useRef<SessionWebSocket | undefined>(undefined);\n const sendMessage = useCallback(({ typ, body, props }: MessageProps): void => {\n if (!socketRef.current) {\n return;\n }\n const proto_header = { proto: MessageProtocols.Shell, typ, sid: socketRef.current.sessionId, props };\n const encodedData = MessagePack.pack({ hdr: proto_header, body });\n socketRef.current.send(encodedData);\n }, []);\n\n const close = useCallback((): void => {\n if (!socketRef.current || socketRef.current?.readyState !== WebSocket.OPEN) {\n return;\n }\n sendMessage({ typ: MessageTypes.Stop, props: {} });\n socketRef.current.close();\n setSessionId(undefined);\n }, [sendMessage]);\n\n const healthcheckFailed = useCallback((): void => {\n onHealthCheckFailed();\n close();\n }, [close, onHealthCheckFailed]);\n\n const onSocketMessage = useCallback(\n (event: MessageEvent): Promise<void> =>\n blobToString(event.data).then((data: unknown) => {\n const {\n hdr: { props = {} as Record<string, string | number>, proto, sid, typ },\n body\n } = MessagePack.unpack(new Uint8Array(data as ArrayBuffer)) as {\n body: Uint8Array;\n hdr: { props: Record<string, string | number>; proto: number; sid: string; typ: string };\n };\n if (proto !== MessageProtocols.Shell) {\n return;\n }\n switch (typ) {\n case MessageTypes.New: {\n if (props.status == WebSocket.CLOSING) {\n onNotify(`Error: ${byteArrayToString(body as unknown as Buffer)}`);\n setSessionId(undefined);\n return close();\n } else {\n clearTimeout(healthcheckTimeout.current);\n healthcheckTimeout.current = setTimeout(healthcheckFailed, 65 * TIMEOUTS.oneSecond);\n if (socketRef.current) {\n socketRef.current.sessionId = sid;\n }\n return setSessionId(sid);\n }\n }\n case MessageTypes.Shell:\n return onMessageReceived(body);\n case MessageTypes.Stop:\n return close();\n case MessageTypes.Ping: {\n if (healthcheckTimeout.current) {\n clearTimeout(healthcheckTimeout.current);\n }\n sendMessage({ typ: MessageTypes.Pong, props: {} });\n const timeout = parseInt(props.timeout as string);\n if (timeout > 0) {\n healthcheckTimeout.current = setTimeout(healthcheckFailed, timeout * TIMEOUTS.oneSecond);\n }\n return;\n }\n default:\n break;\n }\n }),\n [close, healthcheckFailed, onMessageReceived, onNotify, sendMessage]\n );\n\n const onSocketError = useCallback(\n (error: Event): void => {\n onNotify(`WebSocket error: ${(error as ErrorEvent).message || 'Unknown error'}`);\n close();\n
|
|
1
|
+
{"version":3,"file":"sockethook.js","names":["MessageProtocols","MessageTypes"],"sources":["../src/sockethook.ts"],"sourcesContent":["// Copyright 2022 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 { useCallback, useEffect, useRef, useState } from 'react';\n\nimport { TIMEOUTS } from '@northern.tech/utils/constants';\nimport { blobToString, byteArrayToString } from '@northern.tech/utils/helpers';\nimport { Packr } from 'msgpackr';\nimport Cookies from 'universal-cookie';\n\nimport { DEVICE_MESSAGE_PROTOCOLS as MessageProtocols, DEVICE_MESSAGE_TYPES as MessageTypes, apiUrl } from './constants';\n\nconst cookies = new Cookies();\n\n// plain maps + omitted undefined fields keep the wire format compatible with the deviceconnect backend\nconst MessagePack = new Packr({ skipValues: [undefined], useRecords: false });\n\ntype UseSessionProps = {\n onClose: (event: CloseEvent) => void;\n onHealthCheckFailed: () => void;\n onMessageReceived: (body: Uint8Array) => void;\n onNotify: (message: string) => void;\n onOpen: (isOpen: boolean) => void;\n token: string;\n};\n\ntype MessageProps = {\n body?: Uint8Array;\n props: Record<string, string | number>;\n typ: string;\n};\n\ntype SessionWebSocket = WebSocket & { sessionId?: string };\n\ntype UseSessionReturn = [\n connect: (deviceId: string) => void,\n sendMessage: (message: MessageProps) => void,\n close: () => void,\n readyState: number,\n sessionId: string | undefined\n];\n\nexport const useSession = ({ onClose, onHealthCheckFailed, onMessageReceived, onNotify, onOpen, token }: UseSessionProps): UseSessionReturn => {\n const [sessionId, setSessionId] = useState<string | undefined>();\n const healthcheckTimeout = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n const socketRef = useRef<SessionWebSocket | undefined>(undefined);\n const sendMessage = useCallback(({ typ, body, props }: MessageProps): void => {\n if (!socketRef.current) {\n return;\n }\n const proto_header = { proto: MessageProtocols.Shell, typ, sid: socketRef.current.sessionId, props };\n const encodedData = MessagePack.pack({ hdr: proto_header, body });\n socketRef.current.send(encodedData);\n }, []);\n\n const close = useCallback((): void => {\n clearTimeout(healthcheckTimeout.current);\n if (!socketRef.current || socketRef.current?.readyState !== WebSocket.OPEN) {\n return;\n }\n sendMessage({ typ: MessageTypes.Stop, props: {} });\n socketRef.current.close();\n setSessionId(undefined);\n }, [sendMessage]);\n\n const healthcheckFailed = useCallback((): void => {\n onHealthCheckFailed();\n close();\n }, [close, onHealthCheckFailed]);\n\n const onSocketMessage = useCallback(\n (event: MessageEvent): Promise<void> =>\n blobToString(event.data).then((data: unknown) => {\n const {\n hdr: { props = {} as Record<string, string | number>, proto, sid, typ },\n body\n } = MessagePack.unpack(new Uint8Array(data as ArrayBuffer)) as {\n body: Uint8Array;\n hdr: { props: Record<string, string | number>; proto: number; sid: string; typ: string };\n };\n if (proto !== MessageProtocols.Shell) {\n return;\n }\n switch (typ) {\n case MessageTypes.New: {\n if (props.status == WebSocket.CLOSING) {\n onNotify(`Error: ${byteArrayToString(body as unknown as Buffer)}`);\n setSessionId(undefined);\n return close();\n } else {\n clearTimeout(healthcheckTimeout.current);\n healthcheckTimeout.current = setTimeout(healthcheckFailed, 65 * TIMEOUTS.oneSecond);\n if (socketRef.current) {\n socketRef.current.sessionId = sid;\n }\n return setSessionId(sid);\n }\n }\n case MessageTypes.Shell:\n return onMessageReceived(body);\n case MessageTypes.Stop:\n return close();\n case MessageTypes.Ping: {\n if (healthcheckTimeout.current) {\n clearTimeout(healthcheckTimeout.current);\n }\n sendMessage({ typ: MessageTypes.Pong, props: {} });\n const timeout = parseInt(props.timeout as string);\n if (timeout > 0) {\n healthcheckTimeout.current = setTimeout(healthcheckFailed, timeout * TIMEOUTS.oneSecond);\n }\n return;\n }\n default:\n break;\n }\n }),\n [close, healthcheckFailed, onMessageReceived, onNotify, sendMessage]\n );\n\n const onSocketError = useCallback(\n (error: Event): void => {\n onNotify(`WebSocket error: ${(error as ErrorEvent).message || 'Unknown error'}`);\n close();\n },\n [close, onNotify]\n );\n\n const onSocketOpen = useCallback((): void => {\n sendMessage({ typ: MessageTypes.New, props: {} });\n onOpen(true);\n }, [onOpen, sendMessage]);\n\n const onSocketClose = useCallback(\n (e: CloseEvent): void => {\n console.log('closing');\n onClose(e);\n close();\n },\n [close, onClose]\n );\n\n const connect = useCallback(\n (deviceId: string): void => {\n const uri = `wss://${window.location.host}${apiUrl.v1}/deviceconnect/devices/${deviceId}/connect`;\n setSessionId(undefined);\n cookies.set('JWT', token, { path: '/', secure: true, sameSite: 'strict', maxAge: 5 });\n try {\n socketRef.current = new WebSocket(uri);\n } catch (error) {\n console.log(error);\n }\n },\n [token]\n );\n\n useEffect(() => {\n const currentSocket = socketRef.current;\n if (!currentSocket) {\n return;\n }\n\n currentSocket.addEventListener('close', onSocketClose);\n currentSocket.addEventListener('error', onSocketError);\n currentSocket.addEventListener('message', onSocketMessage);\n currentSocket.addEventListener('open', onSocketOpen);\n\n return () => {\n currentSocket.removeEventListener('close', onSocketClose);\n currentSocket.removeEventListener('error', onSocketError);\n currentSocket.removeEventListener('message', onSocketMessage);\n currentSocket.removeEventListener('open', onSocketOpen);\n };\n // eslint-disable-next-line react-hooks/refs\n }, [onSocketClose, onSocketError, onSocketMessage, onSocketOpen, socketRef.current?.readyState]);\n\n // eslint-disable-next-line react-hooks/refs\n return [connect, sendMessage, close, socketRef.current?.readyState ?? WebSocket.CLOSED, sessionId];\n};\n"],"mappings":"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"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as UserSliceType } from "./index-
|
|
3
|
-
import { a as ReleaseSliceType } from "./index-
|
|
4
|
-
import { a as PricePreview } from "./types-
|
|
1
|
+
import { Et as FilterOperator, H as emptyUiPermissions, S as Role, m as DeviceIssueOptionKey } from "./constants-BtVu36ou.js";
|
|
2
|
+
import { o as UserSliceType } from "./index-oFn9qHWB.js";
|
|
3
|
+
import { a as ReleaseSliceType } from "./index-CVsuKFks.js";
|
|
4
|
+
import { a as PricePreview } from "./types-DQtRiyGK.js";
|
|
5
5
|
import { n as OnboardingSliceType } from "./index-CoObjWL4.js";
|
|
6
6
|
import { o as DeploymentsSliceType, t as Deployment } from "./index-B8td4-rY.js";
|
|
7
|
-
import { c as DeviceSliceType, i as DeviceGroup, r as DeviceFilter, u as InventoryAttributes } from "./index-
|
|
8
|
-
import { t as AppSliceType } from "./index-
|
|
9
|
-
import { t as MonitorSliceType } from "./index-
|
|
10
|
-
import { t as OrganizationSliceType } from "./index-
|
|
7
|
+
import { c as DeviceSliceType, i as DeviceGroup, r as DeviceFilter, u as InventoryAttributes } from "./index-Bc7Ugak_.js";
|
|
8
|
+
import { t as AppSliceType } from "./index-sw1Baeui.js";
|
|
9
|
+
import { t as MonitorSliceType } from "./index-Cai4oXpN.js";
|
|
10
|
+
import { t as OrganizationSliceType } from "./index-TS08J8mY.js";
|
|
11
11
|
import { Reducer, UnknownAction } from "@reduxjs/toolkit";
|
|
12
12
|
import { isDarkMode as isDarkMode$1 } from "@northern.tech/utils/helpers";
|
|
13
13
|
import { TypedUseSelectorHook } from "react-redux";
|
|
@@ -302,4 +302,4 @@ declare const createAppAsyncThunk: import("@reduxjs/toolkit").CreateAsyncThunkFu
|
|
|
302
302
|
};
|
|
303
303
|
//#endregion
|
|
304
304
|
export { mapFiltersToTerms as A, getAttributeScopeLabel as C, isDarkMode$1 as D, groupDeploymentStats as E, progress as F, statCollector as I, stringToBoolean as L, mapUserRolesToUiPermissions as M, mergePermissions as N, listItemMapper as O, parseSubscriptionPreview as P, stripOrchestratorManifestPrefix as R, generateDeploymentGroupDetails as S, groupDeploymentDevicesStats as T, convertToBackendSPLimits as _, commonErrorFallback as a, extractErrorMessage$1 as b, getConfiguredStore as c, useAppDispatch as d, useAppSelector as f, convertDeviceListStateToFilters as g, FilterTerm as h, RootState as i, mapTermsToFilters as j, mapDeviceAttributes as k, resetEnvironment as l, ErrorWithResponse as m, AppStore as n, commonErrorHandler as o, DeploymentStats as p, MenderEnvironment as r, createAppAsyncThunk as s, AppDispatch as t, sessionReducer as u, dispatchDelayed as v, getDeploymentState as w, filtersFilter as x, ensureVersionString as y, stripUndefined as z };
|
|
305
|
-
//# sourceMappingURL=store-
|
|
305
|
+
//# sourceMappingURL=store-CROmfENq.d.ts.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as UserSliceType } from "./index-
|
|
3
|
-
import { a as ReleaseSliceType } from "./index-
|
|
4
|
-
import { a as PricePreview } from "./types-
|
|
1
|
+
import { Et as FilterOperator, H as emptyUiPermissions, S as Role, m as DeviceIssueOptionKey } from "./constants-DsJM7i1a.cjs";
|
|
2
|
+
import { o as UserSliceType } from "./index-D0DMxU8O.cjs";
|
|
3
|
+
import { a as ReleaseSliceType } from "./index-BnWRWRyV.cjs";
|
|
4
|
+
import { a as PricePreview } from "./types-DXm-HM-j.cjs";
|
|
5
5
|
import { n as OnboardingSliceType } from "./index-CoObjWL4.cjs";
|
|
6
6
|
import { o as DeploymentsSliceType, t as Deployment } from "./index-mvxjivTJ.cjs";
|
|
7
|
-
import { c as DeviceSliceType, i as DeviceGroup, r as DeviceFilter, u as InventoryAttributes } from "./index-
|
|
8
|
-
import { t as AppSliceType } from "./index-
|
|
9
|
-
import { t as MonitorSliceType } from "./index-
|
|
10
|
-
import { t as OrganizationSliceType } from "./index-
|
|
7
|
+
import { c as DeviceSliceType, i as DeviceGroup, r as DeviceFilter, u as InventoryAttributes } from "./index-3mpuzSLi.cjs";
|
|
8
|
+
import { t as AppSliceType } from "./index-CwjRezv2.cjs";
|
|
9
|
+
import { t as MonitorSliceType } from "./index-BP392nKV.cjs";
|
|
10
|
+
import { t as OrganizationSliceType } from "./index-DTeKxs80.cjs";
|
|
11
11
|
import { AttributeFilterPredicate, AttributeResponse, FilterV2, InvoiceLineItem, Scope } from "@northern.tech/types/MenderTypes";
|
|
12
12
|
import { Reducer, UnknownAction } from "@reduxjs/toolkit";
|
|
13
13
|
import { AxiosError } from "axios";
|
|
@@ -302,4 +302,4 @@ declare const createAppAsyncThunk: import("@reduxjs/toolkit").CreateAsyncThunkFu
|
|
|
302
302
|
};
|
|
303
303
|
//#endregion
|
|
304
304
|
export { mapFiltersToTerms as A, getAttributeScopeLabel as C, isDarkMode as D, groupDeploymentStats as E, progress as F, statCollector as I, stringToBoolean as L, mapUserRolesToUiPermissions as M, mergePermissions as N, listItemMapper as O, parseSubscriptionPreview as P, stripOrchestratorManifestPrefix as R, generateDeploymentGroupDetails as S, groupDeploymentDevicesStats as T, convertToBackendSPLimits as _, commonErrorFallback as a, extractErrorMessage as b, getConfiguredStore as c, useAppDispatch as d, useAppSelector as f, convertDeviceListStateToFilters as g, FilterTerm as h, RootState as i, mapTermsToFilters as j, mapDeviceAttributes as k, resetEnvironment as l, ErrorWithResponse as m, AppStore as n, commonErrorHandler as o, DeploymentStats as p, MenderEnvironment as r, createAppAsyncThunk as s, AppDispatch as t, sessionReducer as u, dispatchDelayed as v, getDeploymentState as w, filtersFilter as x, ensureVersionString as y, stripUndefined as z };
|
|
305
|
-
//# sourceMappingURL=store-
|
|
305
|
+
//# sourceMappingURL=store-xuKpT-o4.d.cts.map
|
package/dist/store.cjs
CHANGED
|
@@ -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-DKF0kxhY.cjs");
|
|
3
3
|
const require_appSlice_index = require("./appSlice/index.cjs");
|
|
4
4
|
const require_deploymentsSlice_index = require("./deploymentsSlice/index.cjs");
|
|
5
5
|
const require_devicesSlice_index = require("./devicesSlice/index.cjs");
|
package/dist/store.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as commonErrorFallback, c as getConfiguredStore, d as useAppDispatch, f as useAppSelector, i as RootState, l as resetEnvironment, m as ErrorWithResponse, n as AppStore, o as commonErrorHandler, r as MenderEnvironment, s as createAppAsyncThunk, t as AppDispatch, u as sessionReducer } from "./store-
|
|
1
|
+
import { a as commonErrorFallback, c as getConfiguredStore, d as useAppDispatch, f as useAppSelector, i as RootState, l as resetEnvironment, m as ErrorWithResponse, n as AppStore, o as commonErrorHandler, r as MenderEnvironment, s as createAppAsyncThunk, t as AppDispatch, u as sessionReducer } from "./store-xuKpT-o4.cjs";
|
|
2
2
|
export { AppDispatch, AppStore, type ErrorWithResponse, MenderEnvironment, RootState, commonErrorFallback, commonErrorHandler, createAppAsyncThunk, getConfiguredStore, resetEnvironment, sessionReducer, useAppDispatch, useAppSelector };
|
package/dist/store.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as commonErrorFallback, c as getConfiguredStore, d as useAppDispatch, f as useAppSelector, i as RootState, l as resetEnvironment, m as ErrorWithResponse, n as AppStore, o as commonErrorHandler, r as MenderEnvironment, s as createAppAsyncThunk, t as AppDispatch, u as sessionReducer } from "./store-
|
|
1
|
+
import { a as commonErrorFallback, c as getConfiguredStore, d as useAppDispatch, f as useAppSelector, i as RootState, l as resetEnvironment, m as ErrorWithResponse, n as AppStore, o as commonErrorHandler, r as MenderEnvironment, s as createAppAsyncThunk, t as AppDispatch, u as sessionReducer } from "./store-CROmfENq.js";
|
|
2
2
|
export { AppDispatch, AppStore, type ErrorWithResponse, MenderEnvironment, RootState, commonErrorFallback, commonErrorHandler, createAppAsyncThunk, getConfiguredStore, resetEnvironment, sessionReducer, useAppDispatch, useAppSelector };
|
package/dist/store.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { et as settingsKeys } from "./constants-TPYvZDsI.js";
|
|
2
2
|
import appSlice_default from "./appSlice/index.js";
|
|
3
3
|
import deploymentsSlice_default from "./deploymentsSlice/index.js";
|
|
4
4
|
import devicesSlice_default from "./devicesSlice/index.js";
|
package/dist/thunks.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
|
|
3
3
|
const require_appSlice_constants = require("./appSlice/constants.cjs");
|
|
4
|
-
const require_constants = require("./constants-
|
|
4
|
+
const require_constants = require("./constants-DKF0kxhY.cjs");
|
|
5
5
|
const require_onboardingSlice_constants = require("./onboardingSlice/constants.cjs");
|
|
6
6
|
const require_releasesSlice_constants = require("./releasesSlice/constants.cjs");
|
|
7
7
|
const require_appSlice_index = require("./appSlice/index.cjs");
|
|
@@ -1869,6 +1869,10 @@ const getSsoConfigById = require_store.createAppAsyncThunk(`${require_organizati
|
|
|
1869
1869
|
}) : Promise.reject("Unsupported SSO config content type.");
|
|
1870
1870
|
}));
|
|
1871
1871
|
const getSsoConfigs = require_store.createAppAsyncThunk(`${require_organizationSlice_index.sliceName}/getSsoConfigs`, (_, { dispatch }) => require_api_general_api.default.get(_northern_tech_utils_constants.ssoIdpApiUrlv1).catch((err) => dispatch(ssoConfigActionErrorHandler(err, "readMultiple"))).then(({ data }) => Promise.all(data.map((config) => dispatch(getSsoConfigById(config)).unwrap())).then((configs) => dispatch(require_organizationSlice_index.actions.receiveSsoConfigs(configs))).catch((err) => require_store.commonErrorHandler(err, err, dispatch, ""))));
|
|
1872
|
+
const getSsoEndpoints = require_store.createAppAsyncThunk(`${require_organizationSlice_index.sliceName}/getSsoEndpoints`, async (_, { dispatch }) => {
|
|
1873
|
+
const { data } = await require_api_general_api.default.get(_northern_tech_utils_constants.ssoEndpointsApiUrlv1).catch((err) => require_store.commonErrorHandler(err, "There was an error retrieving the SSO endpoints.", dispatch, require_store.commonErrorFallback));
|
|
1874
|
+
return dispatch(require_organizationSlice_index.actions.receiveSsoEndpoint(data));
|
|
1875
|
+
});
|
|
1872
1876
|
//#endregion
|
|
1873
1877
|
//#region src/usersSlice/thunks.ts
|
|
1874
1878
|
const cookies = new universal_cookie.default();
|
|
@@ -2557,6 +2561,7 @@ exports.getSoftware = require_releasesSlice_thunks.getSoftware;
|
|
|
2557
2561
|
exports.getSoftwareList = require_releasesSlice_thunks.getSoftwareList;
|
|
2558
2562
|
exports.getSsoConfigById = getSsoConfigById;
|
|
2559
2563
|
exports.getSsoConfigs = getSsoConfigs;
|
|
2564
|
+
exports.getSsoEndpoints = getSsoEndpoints;
|
|
2560
2565
|
exports.getTargetLocation = getTargetLocation;
|
|
2561
2566
|
exports.getTenantToken = getTenantToken;
|
|
2562
2567
|
exports.getTenants = getTenants;
|