@northern.tech/store 0.1.2 → 0.2.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.mts +95 -0
- package/dist/actions.d.ts +95 -0
- package/dist/actions.js +1808 -0
- package/dist/actions.js.map +1 -0
- package/dist/actions.mjs +21 -0
- package/dist/actions.mjs.map +1 -0
- package/dist/api/general-api.d.mts +21 -0
- package/dist/api/general-api.d.ts +21 -0
- package/dist/api/general-api.js +1066 -0
- package/dist/api/general-api.js.map +1 -0
- package/dist/api/general-api.mjs +18 -0
- package/dist/api/general-api.mjs.map +1 -0
- package/dist/api/types/Address.ts +6 -0
- package/dist/api/types/AddressUpdate.ts +12 -0
- package/dist/api/types/AuthSet.ts +37 -0
- package/{api/types/AuthSet.ts → dist/api/types/AuthSetIot_manager.ts} +2 -2
- package/dist/api/types/BillingProfile.ts +37 -0
- package/dist/api/types/BillingProfileUpdate.ts +37 -0
- package/{api → dist/api}/types/BinaryDeltaLimits.ts +6 -0
- package/{api → dist/api}/types/BoundingBox.ts +1 -3
- package/dist/api/types/Deployment.ts +45 -0
- package/{api → dist/api}/types/DeploymentAggregation.ts +1 -3
- package/{api → dist/api}/types/DeploymentAggregationItem.ts +1 -3
- package/{api → dist/api}/types/DeploymentAggregationTerm.ts +1 -2
- package/{api → dist/api}/types/DeploymentAggregationTerms.ts +1 -3
- package/{api → dist/api}/types/DeploymentAttributeProjection.ts +1 -2
- package/{api → dist/api}/types/DeploymentDeployments.ts +4 -5
- package/{api → dist/api}/types/DeploymentFilterTerm.ts +1 -3
- package/dist/api/types/DeploymentPhaseDeployments.ts +23 -0
- package/{api → dist/api}/types/DeploymentSearchTerms.ts +1 -3
- package/{api → dist/api}/types/DeploymentSortTerm.ts +1 -3
- package/dist/api/types/DeploymentStatisticsDeployments.ts +15 -0
- package/dist/api/types/DeploymentStatusStatisticsDeployments.ts +54 -0
- package/dist/api/types/Device.ts +20 -0
- package/{api → dist/api}/types/DeviceAggregation.ts +1 -3
- package/{api → dist/api}/types/DeviceAggregationItem.ts +1 -3
- package/{api → dist/api}/types/DeviceAggregationTerm.ts +1 -2
- package/{api → dist/api}/types/DeviceAggregationTerms.ts +1 -3
- package/{api → dist/api}/types/DeviceAttribute.ts +1 -2
- package/{api → dist/api}/types/DeviceAttributeProjection.ts +1 -2
- package/{api/types/Device.ts → dist/api/types/DeviceDeployments.ts} +1 -1
- package/{api → dist/api}/types/DeviceFilterAttribute.ts +1 -2
- package/{api → dist/api}/types/DeviceFilterTerm.ts +1 -3
- package/{api → dist/api}/types/DeviceSearchTerms.ts +1 -3
- package/{api → dist/api}/types/DeviceSortTerm.ts +1 -3
- package/{api → dist/api}/types/Error.ts +1 -1
- package/{api/types/FilterInventory.ts → dist/api/types/Filter.ts} +3 -4
- package/{api/types/Filter.ts → dist/api/types/FilterInventory.ts} +1 -1
- package/dist/api/types/FilterPredicate.ts +48 -0
- package/{api/types/FilterPredicate.ts → dist/api/types/FilterPredicateInventory.ts} +3 -3
- package/{api → dist/api}/types/GeoBoundingBox.ts +1 -3
- package/{api → dist/api}/types/GeoBoundingBoxFilter.ts +1 -2
- package/{api → dist/api}/types/GeoDistance.ts +1 -3
- package/{api → dist/api}/types/GeoDistanceFilter.ts +1 -3
- package/{api → dist/api}/types/GeoPoint.ts +1 -2
- package/{api → dist/api}/types/Integration.ts +6 -0
- package/{api → dist/api}/types/MenderTypes.ts +41 -11
- package/{api → dist/api}/types/NewDeploymentV2.ts +3 -0
- package/{api → dist/api}/types/NewTenant.ts +16 -8
- package/{api → dist/api}/types/Object.ts +3 -0
- package/{api → dist/api}/types/PreAuthSet.ts +1 -1
- package/{api → dist/api}/types/Settings.ts +3 -3
- package/{api → dist/api}/types/Status.ts +5 -4
- package/{api → dist/api}/types/StatusTenantadm.ts +1 -3
- package/dist/api/types/Tenant.ts +21 -0
- package/{api → dist/api}/types/TenantTenantadm.ts +16 -0
- package/dist/api/types/UpdateChildTenant.ts +17 -0
- package/{api → dist/api}/types/UpdateDeployments.ts +1 -1
- package/{api → dist/api}/types/UpgradeCompleteRequest.ts +2 -0
- package/{api → dist/api}/types/UserWithTenantInfo.ts +7 -3
- package/dist/api/users-api.d.mts +16 -0
- package/dist/api/users-api.d.ts +16 -0
- package/dist/api/users-api.js +1090 -0
- package/dist/api/users-api.js.map +1 -0
- package/dist/api/users-api.mjs +15 -0
- package/dist/api/users-api.mjs.map +1 -0
- package/dist/appSlice/constants.d.mts +210 -0
- package/dist/appSlice/constants.d.ts +210 -0
- package/dist/appSlice/constants.js +221 -0
- package/dist/appSlice/constants.js.map +1 -0
- package/dist/appSlice/constants.mjs +42 -0
- package/dist/appSlice/constants.mjs.map +1 -0
- package/dist/appSlice/index.d.mts +1557 -0
- package/dist/appSlice/index.d.ts +1557 -0
- package/dist/appSlice/index.js +1131 -0
- package/dist/appSlice/index.js.map +1 -0
- package/dist/appSlice/index.mjs +21 -0
- package/dist/appSlice/index.mjs.map +1 -0
- package/dist/appSlice/selectors.d.mts +91 -0
- package/dist/appSlice/selectors.d.ts +91 -0
- package/dist/appSlice/selectors.js +90 -0
- package/dist/appSlice/selectors.js.map +1 -0
- package/dist/appSlice/selectors.mjs +20 -0
- package/dist/appSlice/selectors.mjs.map +1 -0
- package/dist/appSlice/thunks.d.mts +46 -0
- package/dist/appSlice/thunks.d.ts +46 -0
- package/dist/appSlice/thunks.js +5733 -0
- package/dist/appSlice/thunks.js.map +1 -0
- package/dist/appSlice/thunks.mjs +45 -0
- package/dist/appSlice/thunks.mjs.map +1 -0
- package/dist/auth.d.mts +17 -0
- package/dist/auth.d.ts +17 -0
- package/dist/auth.js +1049 -0
- package/dist/auth.js.map +1 -0
- package/dist/auth.mjs +23 -0
- package/dist/auth.mjs.map +1 -0
- package/dist/chunk-2HCZYULZ.mjs +56 -0
- package/dist/chunk-2HCZYULZ.mjs.map +1 -0
- package/dist/chunk-2P4VECEE.mjs +57 -0
- package/dist/chunk-2P4VECEE.mjs.map +1 -0
- package/dist/chunk-4C6IY46N.mjs +75 -0
- package/dist/chunk-4C6IY46N.mjs.map +1 -0
- package/dist/chunk-4U4X4KAC.mjs +70 -0
- package/dist/chunk-4U4X4KAC.mjs.map +1 -0
- package/dist/chunk-BOSBROA3.mjs +168 -0
- package/dist/chunk-BOSBROA3.mjs.map +1 -0
- package/dist/chunk-BWFTQHNM.mjs +55 -0
- package/dist/chunk-BWFTQHNM.mjs.map +1 -0
- package/dist/chunk-C2YZYTJ6.mjs +37 -0
- package/dist/chunk-C2YZYTJ6.mjs.map +1 -0
- package/{usersSlice/index.ts → dist/chunk-EFHEROXZ.mjs} +39 -58
- package/dist/chunk-EFHEROXZ.mjs.map +1 -0
- package/dist/chunk-EM2HUGUY.mjs +135 -0
- package/dist/chunk-EM2HUGUY.mjs.map +1 -0
- package/dist/chunk-ENLZPHTQ.mjs +35 -0
- package/dist/chunk-ENLZPHTQ.mjs.map +1 -0
- package/dist/chunk-G4FGNSV3.mjs +13 -0
- package/dist/chunk-G4FGNSV3.mjs.map +1 -0
- package/dist/chunk-H2PQQMRY.mjs +7 -0
- package/dist/chunk-H2PQQMRY.mjs.map +1 -0
- package/dist/chunk-IU4OXOPA.mjs +46 -0
- package/dist/chunk-IU4OXOPA.mjs.map +1 -0
- package/dist/chunk-L4HIW3KB.mjs +36 -0
- package/dist/chunk-L4HIW3KB.mjs.map +1 -0
- package/{onboardingSlice/index.ts → dist/chunk-M4U5R7A4.mjs} +19 -22
- package/dist/chunk-M4U5R7A4.mjs.map +1 -0
- package/dist/chunk-MJW4632R.mjs +110 -0
- package/dist/chunk-MJW4632R.mjs.map +1 -0
- package/dist/chunk-MQIKQKSW.mjs +717 -0
- package/dist/chunk-MQIKQKSW.mjs.map +1 -0
- package/{releasesSlice/index.ts → dist/chunk-NCI6JV5R.mjs} +33 -32
- package/dist/chunk-NCI6JV5R.mjs.map +1 -0
- package/dist/chunk-OGAMVFPS.mjs +244 -0
- package/dist/chunk-OGAMVFPS.mjs.map +1 -0
- package/{appSlice/index.ts → dist/chunk-OWHFMKTA.mjs} +58 -68
- package/dist/chunk-OWHFMKTA.mjs.map +1 -0
- package/dist/chunk-QBKCUIWO.mjs +7 -0
- package/dist/chunk-QBKCUIWO.mjs.map +1 -0
- package/dist/chunk-QG4PT5WK.mjs +145 -0
- package/dist/chunk-QG4PT5WK.mjs.map +1 -0
- package/dist/chunk-RWYS5MKN.mjs +106 -0
- package/dist/chunk-RWYS5MKN.mjs.map +1 -0
- package/dist/chunk-U6YTBIDT.mjs +239 -0
- package/dist/chunk-U6YTBIDT.mjs.map +1 -0
- package/dist/chunk-UPMSYTWW.mjs +2977 -0
- package/dist/chunk-UPMSYTWW.mjs.map +1 -0
- package/dist/chunk-V32GTKOS.mjs +1 -0
- package/dist/chunk-V32GTKOS.mjs.map +1 -0
- package/dist/chunk-WS3YYLTJ.mjs +106 -0
- package/dist/chunk-WS3YYLTJ.mjs.map +1 -0
- package/{devicesSlice/index.ts → dist/chunk-X65NMDPS.mjs} +57 -77
- package/dist/chunk-X65NMDPS.mjs.map +1 -0
- package/dist/chunk-XJNI62IP.mjs +39 -0
- package/dist/chunk-XJNI62IP.mjs.map +1 -0
- package/dist/chunk-XWBD7VOK.mjs +93 -0
- package/dist/chunk-XWBD7VOK.mjs.map +1 -0
- package/dist/chunk-Y47SYXII.mjs +304 -0
- package/dist/chunk-Y47SYXII.mjs.map +1 -0
- package/dist/chunk-ZLRZO4EY.mjs +414 -0
- package/dist/chunk-ZLRZO4EY.mjs.map +1 -0
- package/dist/chunk-ZZ6VIQ3U.mjs +65 -0
- package/dist/chunk-ZZ6VIQ3U.mjs.map +1 -0
- package/dist/commonConstants.d.mts +247 -0
- package/dist/commonConstants.d.ts +247 -0
- package/dist/commonConstants.js +304 -0
- package/dist/commonConstants.js.map +1 -0
- package/dist/commonConstants.mjs +40 -0
- package/dist/commonConstants.mjs.map +1 -0
- package/dist/commonSelectors.d.mts +937 -0
- package/dist/commonSelectors.d.ts +937 -0
- package/dist/commonSelectors.js +1564 -0
- package/dist/commonSelectors.js.map +1 -0
- package/dist/commonSelectors.mjs +56 -0
- package/dist/commonSelectors.mjs.map +1 -0
- package/dist/constants.d.mts +12 -0
- package/dist/constants.d.ts +12 -0
- package/dist/constants.js +1308 -0
- package/dist/constants.js.map +1 -0
- package/dist/constants.mjs +223 -0
- package/dist/constants.mjs.map +1 -0
- package/dist/deploymentsSlice/constants.d.mts +142 -0
- package/dist/deploymentsSlice/constants.d.ts +142 -0
- package/dist/deploymentsSlice/constants.js +1033 -0
- package/dist/deploymentsSlice/constants.js.map +1 -0
- package/dist/deploymentsSlice/constants.mjs +42 -0
- package/dist/deploymentsSlice/constants.mjs.map +1 -0
- package/dist/deploymentsSlice/index.d.mts +2373 -0
- package/dist/deploymentsSlice/index.d.ts +2373 -0
- package/dist/deploymentsSlice/index.js +1117 -0
- package/dist/deploymentsSlice/index.js.map +1 -0
- package/dist/deploymentsSlice/index.mjs +21 -0
- package/dist/deploymentsSlice/index.mjs.map +1 -0
- package/dist/deploymentsSlice/selectors.d.mts +59 -0
- package/dist/deploymentsSlice/selectors.d.ts +59 -0
- package/dist/deploymentsSlice/selectors.js +1033 -0
- package/dist/deploymentsSlice/selectors.js.map +1 -0
- package/dist/deploymentsSlice/selectors.mjs +25 -0
- package/dist/deploymentsSlice/selectors.mjs.map +1 -0
- package/dist/deploymentsSlice/thunks.d.mts +202 -0
- package/dist/deploymentsSlice/thunks.d.ts +202 -0
- package/dist/deploymentsSlice/thunks.js +5749 -0
- package/dist/deploymentsSlice/thunks.js.map +1 -0
- package/dist/deploymentsSlice/thunks.mjs +63 -0
- package/dist/deploymentsSlice/thunks.mjs.map +1 -0
- package/dist/devicesSlice/constants.d.mts +44 -0
- package/dist/devicesSlice/constants.d.ts +44 -0
- package/dist/devicesSlice/constants.js +1033 -0
- package/dist/devicesSlice/constants.js.map +1 -0
- package/dist/devicesSlice/constants.mjs +40 -0
- package/dist/devicesSlice/constants.mjs.map +1 -0
- package/dist/devicesSlice/index.d.mts +2223 -0
- package/dist/devicesSlice/index.d.ts +2223 -0
- package/dist/devicesSlice/index.js +1173 -0
- package/dist/devicesSlice/index.js.map +1 -0
- package/dist/devicesSlice/index.mjs +21 -0
- package/dist/devicesSlice/index.mjs.map +1 -0
- package/dist/devicesSlice/selectors.d.mts +261 -0
- package/dist/devicesSlice/selectors.d.ts +261 -0
- package/dist/devicesSlice/selectors.js +1148 -0
- package/dist/devicesSlice/selectors.js.map +1 -0
- package/dist/devicesSlice/selectors.mjs +53 -0
- package/dist/devicesSlice/selectors.mjs.map +1 -0
- package/dist/devicesSlice/thunks.d.mts +742 -0
- package/dist/devicesSlice/thunks.d.ts +742 -0
- package/dist/devicesSlice/thunks.js +5821 -0
- package/dist/devicesSlice/thunks.js.map +1 -0
- package/dist/devicesSlice/thunks.mjs +135 -0
- package/dist/devicesSlice/thunks.mjs.map +1 -0
- package/dist/monitorSlice/constants.d.mts +6 -0
- package/dist/monitorSlice/constants.d.ts +6 -0
- package/dist/monitorSlice/constants.js +983 -0
- package/dist/monitorSlice/constants.js.map +1 -0
- package/dist/monitorSlice/constants.mjs +14 -0
- package/dist/monitorSlice/constants.mjs.map +1 -0
- package/dist/monitorSlice/index.d.mts +291 -0
- package/dist/monitorSlice/index.d.ts +291 -0
- package/dist/monitorSlice/index.js +1035 -0
- package/dist/monitorSlice/index.js.map +1 -0
- package/dist/monitorSlice/index.mjs +21 -0
- package/dist/monitorSlice/index.mjs.map +1 -0
- package/dist/monitorSlice/selectors.d.mts +3 -0
- package/dist/monitorSlice/selectors.d.ts +3 -0
- package/dist/monitorSlice/selectors.js +31 -0
- package/dist/monitorSlice/selectors.js.map +1 -0
- package/dist/monitorSlice/selectors.mjs +8 -0
- package/dist/monitorSlice/selectors.mjs.map +1 -0
- package/dist/monitorSlice/thunks.d.mts +71 -0
- package/dist/monitorSlice/thunks.d.ts +71 -0
- package/dist/monitorSlice/thunks.js +2609 -0
- package/dist/monitorSlice/thunks.js.map +1 -0
- package/dist/monitorSlice/thunks.mjs +44 -0
- package/dist/monitorSlice/thunks.mjs.map +1 -0
- package/dist/onboardingSlice/constants.d.mts +23 -0
- package/dist/onboardingSlice/constants.d.ts +23 -0
- package/dist/onboardingSlice/constants.js +71 -0
- package/dist/onboardingSlice/constants.js.map +1 -0
- package/dist/onboardingSlice/constants.mjs +10 -0
- package/dist/onboardingSlice/constants.mjs.map +1 -0
- package/dist/onboardingSlice/index.d.mts +237 -0
- package/dist/onboardingSlice/index.d.ts +237 -0
- package/dist/onboardingSlice/index.js +94 -0
- package/dist/onboardingSlice/index.js.map +1 -0
- package/dist/onboardingSlice/index.mjs +16 -0
- package/dist/onboardingSlice/index.mjs.map +1 -0
- package/dist/onboardingSlice/selectors.d.mts +3 -0
- package/dist/onboardingSlice/selectors.d.ts +3 -0
- package/dist/onboardingSlice/selectors.js +31 -0
- package/dist/onboardingSlice/selectors.js.map +1 -0
- package/dist/onboardingSlice/selectors.mjs +8 -0
- package/dist/onboardingSlice/selectors.mjs.map +1 -0
- package/dist/onboardingSlice/thunks.d.mts +172 -0
- package/dist/onboardingSlice/thunks.d.ts +172 -0
- package/dist/onboardingSlice/thunks.js +5739 -0
- package/dist/onboardingSlice/thunks.js.map +1 -0
- package/dist/onboardingSlice/thunks.mjs +51 -0
- package/dist/onboardingSlice/thunks.mjs.map +1 -0
- package/dist/organizationSlice/constants.d.mts +139 -0
- package/dist/organizationSlice/constants.d.ts +139 -0
- package/dist/organizationSlice/constants.js +1038 -0
- package/dist/organizationSlice/constants.js.map +1 -0
- package/dist/organizationSlice/constants.mjs +36 -0
- package/dist/organizationSlice/constants.mjs.map +1 -0
- package/dist/organizationSlice/index.d.mts +1075 -0
- package/dist/organizationSlice/index.d.ts +1075 -0
- package/dist/organizationSlice/index.js +1077 -0
- package/dist/organizationSlice/index.js.map +1 -0
- package/dist/organizationSlice/index.mjs +21 -0
- package/dist/organizationSlice/index.mjs.map +1 -0
- package/dist/organizationSlice/selectors.d.mts +134 -0
- package/dist/organizationSlice/selectors.d.ts +134 -0
- package/dist/organizationSlice/selectors.js +1041 -0
- package/dist/organizationSlice/selectors.js.map +1 -0
- package/dist/organizationSlice/selectors.mjs +39 -0
- package/dist/organizationSlice/selectors.mjs.map +1 -0
- package/dist/organizationSlice/thunks.d.mts +502 -0
- package/dist/organizationSlice/thunks.d.ts +502 -0
- package/dist/organizationSlice/thunks.js +5787 -0
- package/dist/organizationSlice/thunks.js.map +1 -0
- package/dist/organizationSlice/thunks.mjs +101 -0
- package/dist/organizationSlice/thunks.mjs.map +1 -0
- package/dist/releasesSlice/constants.d.mts +14 -0
- package/dist/releasesSlice/constants.d.ts +14 -0
- package/dist/releasesSlice/constants.js +40 -0
- package/dist/releasesSlice/constants.js.map +1 -0
- package/dist/releasesSlice/constants.mjs +14 -0
- package/dist/releasesSlice/constants.mjs.map +1 -0
- package/dist/releasesSlice/index.d.mts +483 -0
- package/dist/releasesSlice/index.d.ts +483 -0
- package/dist/releasesSlice/index.js +1098 -0
- package/dist/releasesSlice/index.js.map +1 -0
- package/dist/releasesSlice/index.mjs +21 -0
- package/dist/releasesSlice/index.mjs.map +1 -0
- package/dist/releasesSlice/selectors.d.mts +92 -0
- package/dist/releasesSlice/selectors.d.ts +92 -0
- package/dist/releasesSlice/selectors.js +1031 -0
- package/dist/releasesSlice/selectors.js.map +1 -0
- package/dist/releasesSlice/selectors.mjs +28 -0
- package/dist/releasesSlice/selectors.mjs.map +1 -0
- package/dist/releasesSlice/thunks.d.mts +276 -0
- package/dist/releasesSlice/thunks.d.ts +276 -0
- package/dist/releasesSlice/thunks.js +2921 -0
- package/dist/releasesSlice/thunks.js.map +1 -0
- package/dist/releasesSlice/thunks.mjs +66 -0
- package/dist/releasesSlice/thunks.mjs.map +1 -0
- package/dist/selectors.d.mts +10 -0
- package/dist/selectors.d.ts +10 -0
- package/dist/selectors.js +1718 -0
- package/dist/selectors.js.map +1 -0
- package/dist/selectors.mjs +209 -0
- package/dist/selectors.mjs.map +1 -0
- package/dist/store.d.mts +2406 -0
- package/dist/store.d.ts +2406 -0
- package/dist/store.js +1939 -0
- package/dist/store.js.map +1 -0
- package/dist/store.mjs +32 -0
- package/dist/store.mjs.map +1 -0
- package/dist/storehooks.d.mts +6 -0
- package/dist/storehooks.d.ts +6 -0
- package/dist/storehooks.js +5940 -0
- package/dist/storehooks.js.map +1 -0
- package/dist/storehooks.mjs +285 -0
- package/dist/storehooks.mjs.map +1 -0
- package/dist/thunks.d.mts +12 -0
- package/dist/thunks.d.ts +12 -0
- package/dist/thunks.js +6051 -0
- package/dist/thunks.js.map +1 -0
- package/dist/thunks.mjs +363 -0
- package/dist/thunks.mjs.map +1 -0
- package/dist/usersSlice/constants.d.mts +810 -0
- package/dist/usersSlice/constants.d.ts +810 -0
- package/dist/usersSlice/constants.js +1033 -0
- package/dist/usersSlice/constants.js.map +1 -0
- package/dist/usersSlice/constants.mjs +45 -0
- package/dist/usersSlice/constants.mjs.map +1 -0
- package/dist/usersSlice/index.d.mts +7917 -0
- package/dist/usersSlice/index.d.ts +7917 -0
- package/dist/usersSlice/index.js +1118 -0
- package/dist/usersSlice/index.js.map +1 -0
- package/dist/usersSlice/index.mjs +21 -0
- package/dist/usersSlice/index.mjs.map +1 -0
- package/dist/usersSlice/selectors.d.mts +209 -0
- package/dist/usersSlice/selectors.d.ts +209 -0
- package/dist/usersSlice/selectors.js +1061 -0
- package/dist/usersSlice/selectors.js.map +1 -0
- package/dist/usersSlice/selectors.mjs +38 -0
- package/dist/usersSlice/selectors.mjs.map +1 -0
- package/dist/usersSlice/thunks.d.mts +881 -0
- package/dist/usersSlice/thunks.d.ts +881 -0
- package/dist/usersSlice/thunks.js +5795 -0
- package/dist/usersSlice/thunks.js.map +1 -0
- package/dist/usersSlice/thunks.mjs +109 -0
- package/dist/usersSlice/thunks.mjs.map +1 -0
- package/dist/utils.d.mts +61 -0
- package/dist/utils.d.ts +61 -0
- package/dist/utils.js +1224 -0
- package/dist/utils.js.map +1 -0
- package/dist/utils.mjs +49 -0
- package/dist/utils.mjs.map +1 -0
- package/package.json +14 -2
- package/.eslintrc.cjs +0 -9
- package/.prettierignore +0 -1
- package/CHANGELOG.md +0 -2
- package/actions.ts +0 -32
- package/api/general-api.test.ts +0 -51
- package/api/general-api.ts +0 -60
- package/api/types/Deployment.ts +0 -95
- package/api/types/DeviceDeployments.ts +0 -31
- package/api/types/FilterPredicateInventory.ts +0 -76
- package/api/types/Tenant.ts +0 -38
- package/api/users-api.ts +0 -34
- package/appSlice/constants.ts +0 -166
- package/appSlice/reducer.test.ts +0 -97
- package/appSlice/selectors.ts +0 -33
- package/appSlice/thunks.test.ts +0 -118
- package/appSlice/thunks.ts +0 -148
- package/auth.test.ts +0 -36
- package/auth.ts +0 -82
- package/commonConstants.tsx +0 -252
- package/commonSelectors.ts +0 -255
- package/constants.ts +0 -22
- package/deploymentsSlice/constants.ts +0 -175
- package/deploymentsSlice/index.ts +0 -145
- package/deploymentsSlice/reducer.test.ts +0 -108
- package/deploymentsSlice/selectors.ts +0 -58
- package/deploymentsSlice/thunks.test.ts +0 -425
- package/deploymentsSlice/thunks.ts +0 -382
- package/devicesSlice/constants.ts +0 -56
- package/devicesSlice/reducer.test.ts +0 -194
- package/devicesSlice/selectors.ts +0 -127
- package/devicesSlice/thunks.test.tsx +0 -1245
- package/devicesSlice/thunks.tsx +0 -1098
- package/monitorSlice/constants.ts +0 -17
- package/monitorSlice/index.ts +0 -65
- package/monitorSlice/reducer.test.ts +0 -79
- package/monitorSlice/selectors.ts +0 -15
- package/monitorSlice/thunks.test.ts +0 -112
- package/monitorSlice/thunks.ts +0 -101
- package/onboardingSlice/constants.ts +0 -53
- package/onboardingSlice/reducer.test.ts +0 -45
- package/onboardingSlice/selectors.ts +0 -15
- package/onboardingSlice/thunks.test.ts +0 -235
- package/onboardingSlice/thunks.ts +0 -142
- package/organizationSlice/constants.ts +0 -82
- package/organizationSlice/index.ts +0 -111
- package/organizationSlice/reducer.test.ts +0 -78
- package/organizationSlice/selectors.ts +0 -45
- package/organizationSlice/thunks.test.ts +0 -619
- package/organizationSlice/thunks.ts +0 -383
- package/releasesSlice/constants.ts +0 -18
- package/releasesSlice/reducer.test.ts +0 -78
- package/releasesSlice/selectors.ts +0 -33
- package/releasesSlice/thunks.test.ts +0 -389
- package/releasesSlice/thunks.ts +0 -379
- package/selectors.ts +0 -22
- package/store.ts +0 -89
- package/storehooks.test.tsx +0 -386
- package/storehooks.ts +0 -250
- package/thunks.ts +0 -21
- package/tsconfig.json +0 -11
- package/tsup.config.ts +0 -11
- package/usersSlice/constants.ts +0 -374
- package/usersSlice/reducer.test.ts +0 -141
- package/usersSlice/selectors.ts +0 -60
- package/usersSlice/thunks.test.ts +0 -660
- package/usersSlice/thunks.ts +0 -782
- package/utils.test.ts +0 -187
- package/utils.ts +0 -249
- /package/{api → dist/api}/types/AWSCredentials.ts +0 -0
- /package/{api → dist/api}/types/Actor.ts +0 -0
- /package/{api → dist/api}/types/Addon.ts +0 -0
- /package/{api → dist/api}/types/AddonTenantadm.ts +0 -0
- /package/{api → dist/api}/types/Alert.ts +0 -0
- /package/{api → dist/api}/types/AlertDetails.ts +0 -0
- /package/{api → dist/api}/types/AlertSubject.ts +0 -0
- /package/{api → dist/api}/types/ApiBurst.ts +0 -0
- /package/{api → dist/api}/types/ApiBurstTenantadm.ts +0 -0
- /package/{api → dist/api}/types/ApiLimits.ts +0 -0
- /package/{api → dist/api}/types/ApiLimitsTenantadm.ts +0 -0
- /package/{api → dist/api}/types/ApiQuota.ts +0 -0
- /package/{api → dist/api}/types/ApiQuotaTenantadm.ts +0 -0
- /package/{api → dist/api}/types/Artifact.ts +0 -0
- /package/{api → dist/api}/types/ArtifactDeployments.ts +0 -0
- /package/{api → dist/api}/types/ArtifactInfo.ts +0 -0
- /package/{api → dist/api}/types/ArtifactInfoDeployments.ts +0 -0
- /package/{api → dist/api}/types/ArtifactLink.ts +0 -0
- /package/{api → dist/api}/types/ArtifactTypeInfo.ts +0 -0
- /package/{api → dist/api}/types/ArtifactTypeInfoDeployments.ts +0 -0
- /package/{api → dist/api}/types/ArtifactUpdate.ts +0 -0
- /package/{api → dist/api}/types/ArtifactUploadLink.ts +0 -0
- /package/{api → dist/api}/types/Attribute.ts +0 -0
- /package/{api → dist/api}/types/AttributeInventory.ts +0 -0
- /package/{api → dist/api}/types/AuditLog.ts +0 -0
- /package/{api → dist/api}/types/AuthSetDeviceauth.ts +0 -0
- /package/{api → dist/api}/types/AutoAuthRequest.ts +0 -0
- /package/{api → dist/api}/types/AzureSharedAccessSecret.ts +0 -0
- /package/{api → dist/api}/types/BillingInfo.ts +0 -0
- /package/{api → dist/api}/types/BinaryDeltaConfiguration.ts +0 -0
- /package/{api → dist/api}/types/BinaryDeltaConfigurationDeployments.ts +0 -0
- /package/{api → dist/api}/types/BinaryDeltaLimitsDeployments.ts +0 -0
- /package/{api → dist/api}/types/CancelRequest.ts +0 -0
- /package/{api → dist/api}/types/CardData.ts +0 -0
- /package/{api → dist/api}/types/CardSetupData.ts +0 -0
- /package/{api → dist/api}/types/CheckoutData.ts +0 -0
- /package/{api → dist/api}/types/Configuration.ts +0 -0
- /package/{api → dist/api}/types/Count.ts +0 -0
- /package/{api → dist/api}/types/Credentials.ts +0 -0
- /package/{api → dist/api}/types/DBusSubsystem.ts +0 -0
- /package/{api → dist/api}/types/DeltaConfiguration.ts +0 -0
- /package/{api → dist/api}/types/DeltaConfigurationDeployments.ts +0 -0
- /package/{api → dist/api}/types/DeploymentAuditlogs.ts +0 -0
- /package/{api → dist/api}/types/DeploymentIdentifier.ts +0 -0
- /package/{api → dist/api}/types/DeploymentPhase.ts +0 -0
- /package/{api → dist/api}/types/DeploymentReporting.ts +0 -0
- /package/{api → dist/api}/types/DeploymentStatistics.ts +0 -0
- /package/{api → dist/api}/types/DeploymentStatusStatistics.ts +0 -0
- /package/{api → dist/api}/types/DeviceAuditlogs.ts +0 -0
- /package/{api → dist/api}/types/DeviceAuthEvent.ts +0 -0
- /package/{api → dist/api}/types/DeviceConfiguration.ts +0 -0
- /package/{api → dist/api}/types/DeviceDeployment.ts +0 -0
- /package/{api → dist/api}/types/DeviceDeviceauth.ts +0 -0
- /package/{api → dist/api}/types/DeviceInventory.ts +0 -0
- /package/{api → dist/api}/types/DeviceInventoryInventory.ts +0 -0
- /package/{api → dist/api}/types/DeviceReporting.ts +0 -0
- /package/{api → dist/api}/types/DeviceState.ts +0 -0
- /package/{api → dist/api}/types/DeviceStateDeviceconnect.ts +0 -0
- /package/{api → dist/api}/types/DeviceStateIot_manager.ts +0 -0
- /package/{api → dist/api}/types/DeviceStatus.ts +0 -0
- /package/{api → dist/api}/types/DeviceWithImage.ts +0 -0
- /package/{api → dist/api}/types/DirectUploadMetadata.ts +0 -0
- /package/{api → dist/api}/types/EmailVerificationCompletion.ts +0 -0
- /package/{api → dist/api}/types/EmailVerificationRequest.ts +0 -0
- /package/{api → dist/api}/types/ErrorAuditlogs.ts +0 -0
- /package/{api → dist/api}/types/ErrorDeployments.ts +0 -0
- /package/{api → dist/api}/types/ErrorDeviceauth.ts +0 -0
- /package/{api → dist/api}/types/ErrorDeviceconfig.ts +0 -0
- /package/{api → dist/api}/types/ErrorDeviceconnect.ts +0 -0
- /package/{api → dist/api}/types/ErrorDevicemonitor.ts +0 -0
- /package/{api → dist/api}/types/ErrorExt.ts +0 -0
- /package/{api → dist/api}/types/ErrorInventory.ts +0 -0
- /package/{api → dist/api}/types/ErrorIot_manager.ts +0 -0
- /package/{api → dist/api}/types/ErrorNotFound.ts +0 -0
- /package/{api → dist/api}/types/ErrorReporting.ts +0 -0
- /package/{api → dist/api}/types/ErrorTenantadm.ts +0 -0
- /package/{api → dist/api}/types/ErrorUseradm.ts +0 -0
- /package/{api → dist/api}/types/Event.ts +0 -0
- /package/{api → dist/api}/types/ExternalIdentity.ts +0 -0
- /package/{api → dist/api}/types/Features.ts +0 -0
- /package/{api → dist/api}/types/FileUpload.ts +0 -0
- /package/{api → dist/api}/types/FilterAttribute.ts +0 -0
- /package/{api → dist/api}/types/FilterDefinition.ts +0 -0
- /package/{api → dist/api}/types/FilterDeployments.ts +0 -0
- /package/{api → dist/api}/types/FilterPredicateDeployments.ts +0 -0
- /package/{api → dist/api}/types/Group.ts +0 -0
- /package/{api → dist/api}/types/HTTP.ts +0 -0
- /package/{api → dist/api}/types/IdentityData.ts +0 -0
- /package/{api → dist/api}/types/InputParameter.ts +0 -0
- /package/{api → dist/api}/types/JobStatus.ts +0 -0
- /package/{api → dist/api}/types/Limit.ts +0 -0
- /package/{api → dist/api}/types/LimitDeployments.ts +0 -0
- /package/{api → dist/api}/types/LimitDeviceauth.ts +0 -0
- /package/{api → dist/api}/types/LimitUseradm.ts +0 -0
- /package/{api → dist/api}/types/Limits.ts +0 -0
- /package/{api → dist/api}/types/LineDescriptor.ts +0 -0
- /package/{api → dist/api}/types/LogSubsystem.ts +0 -0
- /package/{api → dist/api}/types/LoginOptions.ts +0 -0
- /package/{api → dist/api}/types/ManagementAPIConfiguration.ts +0 -0
- /package/{api → dist/api}/types/MonitorConfiguration.ts +0 -0
- /package/{api → dist/api}/types/NewConfigurationDeployment.ts +0 -0
- /package/{api → dist/api}/types/NewConfigurationDeploymentResponse.ts +0 -0
- /package/{api → dist/api}/types/NewDeployment.ts +0 -0
- /package/{api → dist/api}/types/NewDeploymentForGroup.ts +0 -0
- /package/{api → dist/api}/types/NewDeploymentPhase.ts +0 -0
- /package/{api → dist/api}/types/NewDeploymentPhaseDeployments.ts +0 -0
- /package/{api → dist/api}/types/OwnUserUpdate.ts +0 -0
- /package/{api → dist/api}/types/PasswordResetCompletion.ts +0 -0
- /package/{api → dist/api}/types/PasswordResetRequest.ts +0 -0
- /package/{api → dist/api}/types/Permission.ts +0 -0
- /package/{api → dist/api}/types/PermissionObject.ts +0 -0
- /package/{api → dist/api}/types/PermissionSet.ts +0 -0
- /package/{api → dist/api}/types/PermissionSetWithScope.ts +0 -0
- /package/{api → dist/api}/types/PersonalAccessToken.ts +0 -0
- /package/{api → dist/api}/types/PersonalAccessTokenRequest.ts +0 -0
- /package/{api → dist/api}/types/Plan.ts +0 -0
- /package/{api → dist/api}/types/PlanBindingDetails.ts +0 -0
- /package/{api → dist/api}/types/PlanChangeRequest.ts +0 -0
- /package/{api → dist/api}/types/PlanLimits.ts +0 -0
- /package/{api → dist/api}/types/Release.ts +0 -0
- /package/{api → dist/api}/types/ReleaseDeployments.ts +0 -0
- /package/{api → dist/api}/types/ReleaseUpdate.ts +0 -0
- /package/{api → dist/api}/types/Releases.ts +0 -0
- /package/{api → dist/api}/types/ReleasesDeleteError.ts +0 -0
- /package/{api → dist/api}/types/ReleasesDeployments.ts +0 -0
- /package/{api → dist/api}/types/Role.ts +0 -0
- /package/{api → dist/api}/types/RolePermission.ts +0 -0
- /package/{api → dist/api}/types/RolePermissionObject.ts +0 -0
- /package/{api → dist/api}/types/RoleUseradm.ts +0 -0
- /package/{api → dist/api}/types/SAMLMetadata.ts +0 -0
- /package/{api → dist/api}/types/Scope.ts +0 -0
- /package/{api → dist/api}/types/SelectAttribute.ts +0 -0
- /package/{api → dist/api}/types/ServiceSubsystem.ts +0 -0
- /package/{api → dist/api}/types/SortCriteria.ts +0 -0
- /package/{api → dist/api}/types/SsoObject.ts +0 -0
- /package/{api → dist/api}/types/StatusDeviceauth.ts +0 -0
- /package/{api → dist/api}/types/StorageLimit.ts +0 -0
- /package/{api → dist/api}/types/SubscriptionData.ts +0 -0
- /package/{api → dist/api}/types/SupportRequest.ts +0 -0
- /package/{api → dist/api}/types/Tag.ts +0 -0
- /package/{api → dist/api}/types/Tags.ts +0 -0
- /package/{api → dist/api}/types/TaskResult.ts +0 -0
- /package/{api → dist/api}/types/TaskResultCLI.ts +0 -0
- /package/{api → dist/api}/types/TaskResultHTTPRequest.ts +0 -0
- /package/{api → dist/api}/types/TaskResultHTTPResponse.ts +0 -0
- /package/{api → dist/api}/types/TenantApiLimits.ts +0 -0
- /package/{api → dist/api}/types/TenantApiLimitsTenantadm.ts +0 -0
- /package/{api → dist/api}/types/TenantIdName.ts +0 -0
- /package/{api → dist/api}/types/TenantIdsData.ts +0 -0
- /package/{api → dist/api}/types/TenantInfo.ts +0 -0
- /package/{api → dist/api}/types/TenantShortInfo.ts +0 -0
- /package/{api → dist/api}/types/TenantsIdName.ts +0 -0
- /package/{api → dist/api}/types/Update.ts +0 -0
- /package/{api → dist/api}/types/UpdateFile.ts +0 -0
- /package/{api → dist/api}/types/UpdateFileDeployments.ts +0 -0
- /package/{api → dist/api}/types/UpdateTypes.ts +0 -0
- /package/{api → dist/api}/types/User.ts +0 -0
- /package/{api → dist/api}/types/UserAuditlogs.ts +0 -0
- /package/{api → dist/api}/types/UserNew.ts +0 -0
- /package/{api → dist/api}/types/UserUpdate.ts +0 -0
- /package/{api → dist/api}/types/UserUseradm.ts +0 -0
- /package/{api → dist/api}/types/XDeltaArgs.ts +0 -0
- /package/{api → dist/api}/types/XDeltaArgsDeployments.ts +0 -0
- /package/{api → dist/api}/types/XDeltaArgsLimits.ts +0 -0
- /package/{api → dist/api}/types/XDeltaArgsLimitsDeployments.ts +0 -0
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/* istanbul ignore file */
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Attribute filter predicate
|
|
7
|
-
*/
|
|
8
|
-
export type FilterPredicateInventory = {
|
|
9
|
-
/**
|
|
10
|
-
* Attribute name.
|
|
11
|
-
*/
|
|
12
|
-
attribute: string;
|
|
13
|
-
scope: string;
|
|
14
|
-
/**
|
|
15
|
-
* Type or operator of the filter predicate.
|
|
16
|
-
*
|
|
17
|
-
* | *Operator* | *Name* | *Argument type* |
|
|
18
|
-
* |:----------:|:-----------------------------|:----------------|
|
|
19
|
-
* | $eq | Equal (`==`) | any |
|
|
20
|
-
* | $ne | Not equal (`!=`) | any |
|
|
21
|
-
* | $gt | Greater than (`>`) | any |
|
|
22
|
-
* | $gte | Greater than or equal (`>=`) | any |
|
|
23
|
-
* | $lt | Less than (`<`) | any |
|
|
24
|
-
* | $lte | Less than or equal (`<=`) | any |
|
|
25
|
-
* | $exists | Attribute exists | bool |
|
|
26
|
-
* | $in | Is an element of | array |
|
|
27
|
-
* | $nin | Is not an element of | array |
|
|
28
|
-
* | $regex | Regex filter | string |
|
|
29
|
-
*/
|
|
30
|
-
type: FilterPredicateInventory.type;
|
|
31
|
-
/**
|
|
32
|
-
* The value of the attribute to be used in filtering.
|
|
33
|
-
* Attribute type is implicit, inferred from the JSON type.
|
|
34
|
-
*
|
|
35
|
-
* The $exists operator expects a boolean value: true means the specified
|
|
36
|
-
* attribute exists, false means the specified attribute doesn't exist.
|
|
37
|
-
*
|
|
38
|
-
* The $regex operator expects a string as a Perl compatible regular expression
|
|
39
|
-
* (PCRE), automatically anchored by ^. If the regular expression is not valid,
|
|
40
|
-
* the filter will produce no results. If you need to specify options and flags,
|
|
41
|
-
* you can provide the full regex in the format of /regex/flags, for example
|
|
42
|
-
* `/[a-z]+/i`.
|
|
43
|
-
*/
|
|
44
|
-
value: string;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export namespace FilterPredicateInventory {
|
|
48
|
-
/**
|
|
49
|
-
* Type or operator of the filter predicate.
|
|
50
|
-
*
|
|
51
|
-
* | *Operator* | *Name* | *Argument type* |
|
|
52
|
-
* |:----------:|:-----------------------------|:----------------|
|
|
53
|
-
* | $eq | Equal (`==`) | any |
|
|
54
|
-
* | $ne | Not equal (`!=`) | any |
|
|
55
|
-
* | $gt | Greater than (`>`) | any |
|
|
56
|
-
* | $gte | Greater than or equal (`>=`) | any |
|
|
57
|
-
* | $lt | Less than (`<`) | any |
|
|
58
|
-
* | $lte | Less than or equal (`<=`) | any |
|
|
59
|
-
* | $exists | Attribute exists | bool |
|
|
60
|
-
* | $in | Is an element of | array |
|
|
61
|
-
* | $nin | Is not an element of | array |
|
|
62
|
-
* | $regex | Regex filter | string |
|
|
63
|
-
*/
|
|
64
|
-
export enum type {
|
|
65
|
-
_EQ = "$eq",
|
|
66
|
-
_GT = "$gt",
|
|
67
|
-
_GTE = "$gte",
|
|
68
|
-
_IN = "$in",
|
|
69
|
-
_LT = "$lt",
|
|
70
|
-
_LTE = "$lte",
|
|
71
|
-
_NE = "$ne",
|
|
72
|
-
_NIN = "$nin",
|
|
73
|
-
_EXISTS = "$exists",
|
|
74
|
-
_REGEX = "$regex",
|
|
75
|
-
}
|
|
76
|
-
}
|
package/api/types/Tenant.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
-
/* istanbul ignore file */
|
|
3
|
-
/* tslint:disable */
|
|
4
|
-
/* eslint-disable */
|
|
5
|
-
import type { Addon } from "./Addon";
|
|
6
|
-
import type { TenantApiLimits } from "./TenantApiLimits";
|
|
7
|
-
/**
|
|
8
|
-
* Tenant descriptor.
|
|
9
|
-
*/
|
|
10
|
-
export type Tenant = {
|
|
11
|
-
/**
|
|
12
|
-
* Tenant ID.
|
|
13
|
-
*/
|
|
14
|
-
id: string;
|
|
15
|
-
/**
|
|
16
|
-
* Name of the tenant's organization.
|
|
17
|
-
*/
|
|
18
|
-
name: string;
|
|
19
|
-
/**
|
|
20
|
-
* Currently used tenant token.
|
|
21
|
-
*/
|
|
22
|
-
tenant_token: string;
|
|
23
|
-
/**
|
|
24
|
-
* Status of the tenant account.
|
|
25
|
-
*/
|
|
26
|
-
status?: Tenant.status;
|
|
27
|
-
api_limits?: TenantApiLimits;
|
|
28
|
-
addons?: Array<Addon>;
|
|
29
|
-
};
|
|
30
|
-
export namespace Tenant {
|
|
31
|
-
/**
|
|
32
|
-
* Status of the tenant account.
|
|
33
|
-
*/
|
|
34
|
-
export enum status {
|
|
35
|
-
ACTIVE = "active",
|
|
36
|
-
SUSPENDED = "suspended",
|
|
37
|
-
}
|
|
38
|
-
}
|
package/api/users-api.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// Copyright 2016 Northern.tech AS
|
|
2
|
-
//
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
//
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
//
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
14
|
-
// @ts-nocheck
|
|
15
|
-
import axios from 'axios';
|
|
16
|
-
|
|
17
|
-
import { getToken } from '../auth';
|
|
18
|
-
import { commonRequestConfig } from './general-api';
|
|
19
|
-
|
|
20
|
-
const Api = {
|
|
21
|
-
postLogin: (url, { email: username, password, ...body }) =>
|
|
22
|
-
axios
|
|
23
|
-
.post(url, body, { ...commonRequestConfig, auth: { username, password } })
|
|
24
|
-
.then(res => ({ text: res.data, code: res.status, contentType: res.headers?.['content-type'] })),
|
|
25
|
-
putVerifyTFA: (url, userData) => {
|
|
26
|
-
let body = {};
|
|
27
|
-
if (userData.hasOwnProperty('token2fa')) {
|
|
28
|
-
body = { token2fa: userData.token2fa };
|
|
29
|
-
}
|
|
30
|
-
return axios.put(url, body, { ...commonRequestConfig, headers: { ...commonRequestConfig.headers, Authorization: `Bearer ${getToken()}` } });
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export default Api;
|
package/appSlice/constants.ts
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
// Copyright 2019 Northern.tech AS
|
|
2
|
-
//
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
//
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
//
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
14
|
-
import { BarChart as BarChartIcon, PieChartOutline as PieChartIcon } from '@mui/icons-material';
|
|
15
|
-
|
|
16
|
-
const startingDeviceCount = {
|
|
17
|
-
os: 'for first 50 devices',
|
|
18
|
-
professional: 'for first 250 devices'
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const apiRoot = '/api/management';
|
|
22
|
-
export const apiUrl = {
|
|
23
|
-
v1: `${apiRoot}/v1`,
|
|
24
|
-
v2: `${apiRoot}/v2`
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export const headerNames = {
|
|
28
|
-
link: 'link',
|
|
29
|
-
location: 'location',
|
|
30
|
-
total: 'x-total-count'
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export const chartTypes = {
|
|
34
|
-
bar: { key: 'bar', Icon: BarChartIcon },
|
|
35
|
-
pie: { key: 'pie', Icon: PieChartIcon }
|
|
36
|
-
};
|
|
37
|
-
export const emptyChartSelection = { software: '', group: '', chartType: chartTypes.bar.key, attribute: 'artifact_name' };
|
|
38
|
-
export const defaultReportType = 'distribution';
|
|
39
|
-
export const defaultReports = [{ ...emptyChartSelection, group: null, attribute: 'artifact_name', type: defaultReportType }];
|
|
40
|
-
|
|
41
|
-
export const BEGINNING_OF_TIME = '2016-01-01T00:00:00.000Z';
|
|
42
|
-
|
|
43
|
-
export const locations = {};
|
|
44
|
-
|
|
45
|
-
export const PLANS = {
|
|
46
|
-
os: {
|
|
47
|
-
id: 'os',
|
|
48
|
-
name: 'Basic',
|
|
49
|
-
offer: true,
|
|
50
|
-
price: '$32/month',
|
|
51
|
-
deviceCount: startingDeviceCount.os,
|
|
52
|
-
offerprice: '$23/month for first 50 devices',
|
|
53
|
-
price2: 'for first 6 months;\n$29/month thereafter',
|
|
54
|
-
features: ['Basic OTA features']
|
|
55
|
-
},
|
|
56
|
-
professional: {
|
|
57
|
-
id: 'professional',
|
|
58
|
-
name: 'Professional',
|
|
59
|
-
offer: true,
|
|
60
|
-
price: '$269/month',
|
|
61
|
-
deviceCount: startingDeviceCount.professional,
|
|
62
|
-
offerprice: '$200/month for first 50 devices',
|
|
63
|
-
price2: 'for first 6 months;\n$249/month thereafter',
|
|
64
|
-
features: ['+ Advanced OTA features', '+ Standard support']
|
|
65
|
-
},
|
|
66
|
-
enterprise: {
|
|
67
|
-
id: 'enterprise',
|
|
68
|
-
name: 'Enterprise',
|
|
69
|
-
price: 'Custom pricing',
|
|
70
|
-
deviceCount: 'unlimited devices',
|
|
71
|
-
features: ['+ Enterprise-grade OTA features', '+ Premium support']
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
// the needs names need to be aligned with the name of the features in the appReducer, as they will be checked in the addonselection
|
|
75
|
-
export const ADDONS = {
|
|
76
|
-
configure: {
|
|
77
|
-
id: 'configure',
|
|
78
|
-
title: 'Configure',
|
|
79
|
-
description: 'Expand your plan with device configuration features',
|
|
80
|
-
needs: ['hasDeviceConfig'],
|
|
81
|
-
os: {
|
|
82
|
-
price: '$11/month',
|
|
83
|
-
deviceCount: startingDeviceCount.os
|
|
84
|
-
},
|
|
85
|
-
professional: {
|
|
86
|
-
price: '$65/month',
|
|
87
|
-
deviceCount: startingDeviceCount.professional
|
|
88
|
-
},
|
|
89
|
-
eligible: ['os', 'professional', 'enterprise']
|
|
90
|
-
},
|
|
91
|
-
troubleshoot: {
|
|
92
|
-
id: 'troubleshoot',
|
|
93
|
-
title: 'Troubleshoot',
|
|
94
|
-
description: 'Expand your plan with device troubleshooting features',
|
|
95
|
-
needs: ['hasDeviceConnect'],
|
|
96
|
-
os: {
|
|
97
|
-
price: '$27/month',
|
|
98
|
-
deviceCount: startingDeviceCount.os
|
|
99
|
-
},
|
|
100
|
-
professional: {
|
|
101
|
-
price: '$72/month',
|
|
102
|
-
deviceCount: startingDeviceCount.professional
|
|
103
|
-
},
|
|
104
|
-
eligible: ['os', 'professional', 'enterprise']
|
|
105
|
-
},
|
|
106
|
-
monitor: {
|
|
107
|
-
id: 'monitor',
|
|
108
|
-
title: 'Monitor',
|
|
109
|
-
description: 'Expand your plan with device monitoring features',
|
|
110
|
-
needs: ['hasMonitor'],
|
|
111
|
-
os: {
|
|
112
|
-
price: '-',
|
|
113
|
-
deviceCount: '-'
|
|
114
|
-
},
|
|
115
|
-
professional: {
|
|
116
|
-
price: '$86/month',
|
|
117
|
-
deviceCount: startingDeviceCount.professional
|
|
118
|
-
},
|
|
119
|
-
eligible: ['professional', 'enterprise']
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
export const BENEFITS = {
|
|
124
|
-
auditlog: { id: 'auditlog', benefit: 'trace change across your devices and access troubleshooting session replay', requiredPlan: PLANS.professional.id },
|
|
125
|
-
dashboard: { id: 'dashboard', benefit: 'actionable insights into the devices you are updating with Mender', requiredPlan: PLANS.enterprise.id },
|
|
126
|
-
deltaGeneration: {
|
|
127
|
-
id: 'deltaGeneration',
|
|
128
|
-
benefit: 'automatic delta artifacts generation to minimize data transfer and improve the update delivery',
|
|
129
|
-
requiredPlan: PLANS.enterprise.id
|
|
130
|
-
},
|
|
131
|
-
deviceConfiguration: { id: 'deviceConfiguration', benefit: 'device configuration features', requiredAddon: ADDONS.configure.id },
|
|
132
|
-
deviceMonitor: { id: 'deviceMonitor', benefit: 'device monitoring features', requiredAddon: ADDONS.monitor.id, requiredPlan: PLANS.professional.id },
|
|
133
|
-
deviceTroubleshoot: { id: 'deviceTroubleshoot', benefit: 'device troubleshooting features', requiredAddon: ADDONS.troubleshoot.id },
|
|
134
|
-
dynamicGroups: { id: 'dynamicGroups', benefit: 'create dynamic groups to ease device management', requiredPlan: PLANS.enterprise.id },
|
|
135
|
-
fullFiltering: { id: 'fullFiltering', benefit: 'filtering by multiple attributes to improve the device overview', requiredPlan: PLANS.professional.id },
|
|
136
|
-
gateway: { id: 'gateway', benefit: 'see devices connected to your gateway device for easy access', requiredPlans: PLANS.professional.id },
|
|
137
|
-
pausedDeployments: {
|
|
138
|
-
id: 'pausedDeployments',
|
|
139
|
-
benefit: 'granular control about update rollout to allow synchronization across your fleet',
|
|
140
|
-
requiredPlan: PLANS.enterprise.id
|
|
141
|
-
},
|
|
142
|
-
phasedDeployments: { id: 'phasedDeployments', benefit: 'choose to roll out deployments in multiple phases', requiredPlan: PLANS.enterprise.id },
|
|
143
|
-
rbac: { id: 'rbac', benefit: 'granular role based access control', requiredPlan: PLANS.enterprise.id },
|
|
144
|
-
retryDeployments: { id: 'retryDeployments', benefit: 'optional retries for failed rollout attempts', requiredPlan: PLANS.professional.id },
|
|
145
|
-
scheduledDeployments: {
|
|
146
|
-
id: 'scheduledDeployments',
|
|
147
|
-
benefit: 'scheduled deployments to steer the distribution of your updates.',
|
|
148
|
-
requiredPlan: PLANS.professional.id
|
|
149
|
-
},
|
|
150
|
-
webhookEvents: {
|
|
151
|
-
id: 'webhookEvents',
|
|
152
|
-
benefit: 'receive inventory events and select which type(s) of events the webhook will receive',
|
|
153
|
-
requiredPlan: PLANS.professional.id
|
|
154
|
-
},
|
|
155
|
-
|
|
156
|
-
default: { id: 'default', benefit: 'gain access to this feature', requiredPlan: PLANS.enterprise.id }
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
export const yes = () => true;
|
|
160
|
-
export const canAccess = yes;
|
|
161
|
-
|
|
162
|
-
export const DARK_MODE = 'dark';
|
|
163
|
-
export const LIGHT_MODE = 'light';
|
|
164
|
-
|
|
165
|
-
export const APPLICATION_JSON_CONTENT_TYPE = 'application/json';
|
|
166
|
-
export const APPLICATION_JWT_CONTENT_TYPE = 'application/jwt';
|
package/appSlice/reducer.test.ts
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
// Copyright 2020 Northern.tech AS
|
|
2
|
-
//
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
//
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
//
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
14
|
-
// @ts-nocheck
|
|
15
|
-
import { SORTING_OPTIONS } from '@northern.tech/store/commonConstants';
|
|
16
|
-
|
|
17
|
-
import reducer, { actions, initialState } from '.';
|
|
18
|
-
|
|
19
|
-
const snackbarMessage = 'Run the tests';
|
|
20
|
-
const initialSearchState = {
|
|
21
|
-
deviceIds: [],
|
|
22
|
-
searchTerm: '',
|
|
23
|
-
searchTotal: 0,
|
|
24
|
-
sort: { direction: SORTING_OPTIONS.desc }
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
describe('app reducer', () => {
|
|
28
|
-
it('should return the initial state', async () => {
|
|
29
|
-
expect(reducer(undefined, {})).toEqual(initialState);
|
|
30
|
-
});
|
|
31
|
-
it('should handle SET_SNACKBAR', async () => {
|
|
32
|
-
expect(reducer(undefined, { type: actions.setSnackbar, payload: { open: true, message: snackbarMessage } }).snackbar).toEqual({
|
|
33
|
-
open: true,
|
|
34
|
-
maxWidth: 900,
|
|
35
|
-
message: snackbarMessage
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
expect(reducer(initialState, { type: actions.setSnackbar, payload: { open: true, message: snackbarMessage } }).snackbar).toEqual({
|
|
39
|
-
open: true,
|
|
40
|
-
maxWidth: 900,
|
|
41
|
-
message: snackbarMessage
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
it('should handle SET_FIRST_LOGIN_AFTER_SIGNUP', async () => {
|
|
46
|
-
expect(reducer(undefined, { type: actions.setFirstLoginAfterSignup, payload: true }).firstLoginAfterSignup).toEqual(true);
|
|
47
|
-
|
|
48
|
-
expect(reducer(initialState, { type: actions.setFirstLoginAfterSignup, payload: false }).firstLoginAfterSignup).toEqual(false);
|
|
49
|
-
});
|
|
50
|
-
it('should handle SET_ANNOUNCEMENT', async () => {
|
|
51
|
-
expect(reducer(undefined, { type: actions.setAnnouncement, payload: 'something' }).hostedAnnouncement).toEqual('something');
|
|
52
|
-
expect(reducer(initialState, { type: actions.setAnnouncement, payload: undefined }).hostedAnnouncement).toEqual(undefined);
|
|
53
|
-
});
|
|
54
|
-
it('should handle SET_SEARCH_STATE', async () => {
|
|
55
|
-
expect(reducer(undefined, { type: actions.setSearchState, payload: { aWhole: 'newState' } }).searchState).toEqual({
|
|
56
|
-
...initialSearchState,
|
|
57
|
-
aWhole: 'newState'
|
|
58
|
-
});
|
|
59
|
-
expect(reducer(initialState, { type: actions.setSearchState, payload: undefined }).searchState).toEqual({ ...initialSearchState });
|
|
60
|
-
});
|
|
61
|
-
it('should handle SET_OFFLINE_THRESHOLD', async () => {
|
|
62
|
-
expect(reducer(undefined, { type: actions.setOfflineThreshold, payload: 'something' }).offlineThreshold).toEqual('something');
|
|
63
|
-
expect(reducer(initialState, { type: actions.setOfflineThreshold, payload: undefined }).offlineThreshold).toEqual(undefined);
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
const versionInformation = {
|
|
67
|
-
Deployments: '',
|
|
68
|
-
Deviceauth: '',
|
|
69
|
-
GUI: 'latest',
|
|
70
|
-
Integration: '',
|
|
71
|
-
Inventory: '',
|
|
72
|
-
'Mender-Artifact': '',
|
|
73
|
-
'Mender-Client': '',
|
|
74
|
-
'Meta-Mender': ''
|
|
75
|
-
};
|
|
76
|
-
it('should handle SET_VERSION_INFORMATION', async () => {
|
|
77
|
-
expect(reducer(undefined, { type: actions.setVersionInformation, payload: { something: 'something' } }).versionInformation).toEqual({
|
|
78
|
-
...versionInformation,
|
|
79
|
-
something: 'something'
|
|
80
|
-
});
|
|
81
|
-
expect(reducer(initialState, { type: actions.setVersionInformation, payload: undefined }).versionInformation).toEqual(versionInformation);
|
|
82
|
-
expect(reducer(undefined, { type: actions.setVersionInformation, payload: { docsVersion: 'something' } }).versionInformation.docsVersion).toEqual(
|
|
83
|
-
'something'
|
|
84
|
-
);
|
|
85
|
-
expect(reducer(initialState, { type: actions.setVersionInformation, payload: { docsVersion: undefined } }).versionInformation.docsVersion).toEqual(
|
|
86
|
-
undefined
|
|
87
|
-
);
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
it('should handle UPLOAD_PROGRESS', async () => {
|
|
91
|
-
const { uploadsById } = reducer(undefined, { type: actions.uploadProgress, payload: { id: 1, progress: 40 } });
|
|
92
|
-
expect(uploadsById['1']).toEqual({ progress: 40 });
|
|
93
|
-
|
|
94
|
-
const { uploadsById: uploading2 } = reducer(initialState, { type: actions.uploadProgress, payload: { id: 'foo', progress: 40 } });
|
|
95
|
-
expect(uploading2.foo).toEqual({ progress: 40 });
|
|
96
|
-
});
|
|
97
|
-
});
|
package/appSlice/selectors.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// Copyright 2023 Northern.tech AS
|
|
2
|
-
//
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
//
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
//
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
14
|
-
import { versionCompare } from '@northern.tech/utils/helpers';
|
|
15
|
-
import { createSelector } from '@reduxjs/toolkit';
|
|
16
|
-
|
|
17
|
-
const getAppDocsVersion = state => state.app.docsVersion;
|
|
18
|
-
export const getFeatures = state => state.app.features;
|
|
19
|
-
export const getFullVersionInformation = state => state.app.versionInformation;
|
|
20
|
-
|
|
21
|
-
export const getDocsVersion = createSelector([getAppDocsVersion, getFeatures], (appDocsVersion, { isHosted }) => {
|
|
22
|
-
// if hosted, use latest docs version
|
|
23
|
-
const docsVersion = appDocsVersion ? `${appDocsVersion}/` : 'development/';
|
|
24
|
-
return isHosted ? '' : docsVersion;
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
export const getSearchState = state => state.app.searchState;
|
|
28
|
-
|
|
29
|
-
export const getSearchedDevices = createSelector([getSearchState], ({ deviceIds }) => deviceIds);
|
|
30
|
-
export const getVersionInformation = createSelector([getFullVersionInformation, getFeatures], ({ Integration, ...remainder }, { isHosted }) =>
|
|
31
|
-
isHosted && Integration !== 'next' ? remainder : { ...remainder, Integration }
|
|
32
|
-
);
|
|
33
|
-
export const getIsPreview = createSelector([getFullVersionInformation], ({ Integration }) => versionCompare(Integration, 'next') > -1);
|
package/appSlice/thunks.test.ts
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
// Copyright 2020 Northern.tech AS
|
|
2
|
-
//
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
//
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
//
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
14
|
-
// @ts-nocheck
|
|
15
|
-
import { commonErrorHandler } from '@northern.tech/store/store';
|
|
16
|
-
import { searchDevices } from '@northern.tech/store/thunks';
|
|
17
|
-
import configureMockStore from 'redux-mock-store';
|
|
18
|
-
import { thunk } from 'redux-thunk';
|
|
19
|
-
|
|
20
|
-
import { actions } from '.';
|
|
21
|
-
import { defaultState } from '../../../../tests/mockData';
|
|
22
|
-
import { actions as deviceActions } from '../devicesSlice';
|
|
23
|
-
import { getLatestReleaseInfo, setFirstLoginAfterSignup, setOfflineThreshold, setSearchState } from './thunks';
|
|
24
|
-
|
|
25
|
-
export const latestSaasReleaseTag = 'saas-v2023.05.02';
|
|
26
|
-
|
|
27
|
-
const middlewares = [thunk];
|
|
28
|
-
const mockStore = configureMockStore(middlewares);
|
|
29
|
-
|
|
30
|
-
/* eslint-disable sonarjs/no-identical-functions */
|
|
31
|
-
describe('app actions', () => {
|
|
32
|
-
it('should handle different error message formats', async () => {
|
|
33
|
-
const store = mockStore({ ...defaultState });
|
|
34
|
-
const err = { response: { data: { error: { message: 'test' } } }, id: '123' };
|
|
35
|
-
await expect(commonErrorHandler(err, 'testContext', store.dispatch)).rejects.toEqual(err);
|
|
36
|
-
const expectedActions = [
|
|
37
|
-
{
|
|
38
|
-
type: actions.setSnackbar.type,
|
|
39
|
-
payload: { message: `testContext ${err.response.data.error.message}`, action: 'Copy to clipboard' }
|
|
40
|
-
}
|
|
41
|
-
];
|
|
42
|
-
const storeActions = store.getActions();
|
|
43
|
-
expect(storeActions.length).toEqual(expectedActions.length);
|
|
44
|
-
expectedActions.map((action, index) => expect(storeActions[index]).toMatchObject(action));
|
|
45
|
-
});
|
|
46
|
-
it('should not get the latest release info when not hosted', async () => {
|
|
47
|
-
const store = mockStore({ ...defaultState });
|
|
48
|
-
const expectedActions = [{ type: getLatestReleaseInfo.pending.type }, { type: getLatestReleaseInfo.fulfilled.type }];
|
|
49
|
-
await store.dispatch(getLatestReleaseInfo());
|
|
50
|
-
const storeActions = store.getActions();
|
|
51
|
-
expect(storeActions.length).toEqual(expectedActions.length);
|
|
52
|
-
});
|
|
53
|
-
it('should get the latest release info when hosted', async () => {
|
|
54
|
-
const store = mockStore({
|
|
55
|
-
...defaultState,
|
|
56
|
-
app: {
|
|
57
|
-
...defaultState.app,
|
|
58
|
-
features: {
|
|
59
|
-
...defaultState.app.features,
|
|
60
|
-
isHosted: true
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
const expectedActions = [
|
|
65
|
-
{ type: getLatestReleaseInfo.pending.type },
|
|
66
|
-
{
|
|
67
|
-
type: actions.setVersionInformation.type,
|
|
68
|
-
payload: { backend: latestSaasReleaseTag, GUI: latestSaasReleaseTag, Integration: '1.2.3', 'Mender-Client': '3.2.1', 'Mender-Artifact': '1.3.7' }
|
|
69
|
-
},
|
|
70
|
-
{ type: getLatestReleaseInfo.fulfilled.type }
|
|
71
|
-
];
|
|
72
|
-
await store.dispatch(getLatestReleaseInfo());
|
|
73
|
-
const storeActions = store.getActions();
|
|
74
|
-
expect(storeActions.length).toEqual(expectedActions.length);
|
|
75
|
-
expectedActions.map((action, index) => expect(storeActions[index]).toMatchObject(action));
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
it('should store first login after Signup', async () => {
|
|
79
|
-
const store = mockStore({ ...defaultState });
|
|
80
|
-
const expectedActions = [
|
|
81
|
-
{ type: setFirstLoginAfterSignup.pending.type },
|
|
82
|
-
{ type: actions.setFirstLoginAfterSignup.type, payload: true },
|
|
83
|
-
{ type: setFirstLoginAfterSignup.fulfilled.type }
|
|
84
|
-
];
|
|
85
|
-
await store.dispatch(setFirstLoginAfterSignup(true));
|
|
86
|
-
const storeActions = store.getActions();
|
|
87
|
-
expect(storeActions.length).toEqual(expectedActions.length);
|
|
88
|
-
expectedActions.map((action, index) => expect(storeActions[index]).toMatchObject(action));
|
|
89
|
-
});
|
|
90
|
-
it('should calculate yesterdays timestamp', async () => {
|
|
91
|
-
const store = mockStore({ ...defaultState });
|
|
92
|
-
const expectedActions = [
|
|
93
|
-
{ type: setOfflineThreshold.pending.type },
|
|
94
|
-
{ type: actions.setOfflineThreshold.type, payload: '2019-01-12T13:00:00.900Z' },
|
|
95
|
-
{ type: setOfflineThreshold.fulfilled.type }
|
|
96
|
-
];
|
|
97
|
-
await store.dispatch(setOfflineThreshold());
|
|
98
|
-
const storeActions = store.getActions();
|
|
99
|
-
expect(storeActions.length).toEqual(expectedActions.length);
|
|
100
|
-
expectedActions.map((action, index) => expect(storeActions[index]).toMatchObject(action));
|
|
101
|
-
});
|
|
102
|
-
it('should handle searching', async () => {
|
|
103
|
-
const store = mockStore({ ...defaultState });
|
|
104
|
-
const expectedActions = [
|
|
105
|
-
{ type: setSearchState.pending.type },
|
|
106
|
-
{ type: searchDevices.pending.type },
|
|
107
|
-
{ type: actions.setSearchState.type, payload: { ...defaultState.app.searchState, isSearching: true, searchTerm: 'next!' } },
|
|
108
|
-
{ type: deviceActions.receivedDevices.type, payload: {} },
|
|
109
|
-
{ type: searchDevices.fulfilled.type },
|
|
110
|
-
{ type: actions.setSearchState.type, payload: { deviceIds: [], isSearching: false, searchTotal: 0 } },
|
|
111
|
-
{ type: setSearchState.fulfilled.type }
|
|
112
|
-
];
|
|
113
|
-
await store.dispatch(setSearchState({ searchTerm: 'next!' }));
|
|
114
|
-
const storeActions = store.getActions();
|
|
115
|
-
expect(storeActions.length).toEqual(expectedActions.length);
|
|
116
|
-
expectedActions.map((action, index) => expect(storeActions[index]).toMatchObject(action));
|
|
117
|
-
});
|
|
118
|
-
});
|