@northern.tech/store 0.30.0 → 0.30.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions.cjs +21 -1130
- package/dist/actions.cjs.map +1 -1
- package/dist/actions.d.cts +212 -221
- package/dist/actions.d.ts +212 -220
- package/dist/actions.js +21 -18
- package/dist/actions.js.map +1 -1
- package/dist/api/general-api.cjs +61 -459
- package/dist/api/general-api.cjs.map +1 -1
- package/dist/api/general-api.d.cts +15 -17
- package/dist/api/general-api.d.ts +15 -17
- package/dist/api/general-api.js +56 -15
- package/dist/api/general-api.js.map +1 -1
- package/dist/api/users-api.cjs +32 -469
- package/dist/api/users-api.cjs.map +1 -1
- package/dist/api/users-api.d.cts +19 -14
- package/dist/api/users-api.d.ts +19 -13
- package/dist/api/users-api.js +30 -12
- package/dist/api/users-api.js.map +1 -1
- package/dist/appSlice/constants.cjs +190 -144
- package/dist/appSlice/constants.cjs.map +1 -1
- package/dist/appSlice/constants.d.cts +2 -159
- package/dist/appSlice/constants.d.ts +2 -159
- package/dist/appSlice/constants.js +181 -29
- package/dist/appSlice/constants.js.map +1 -1
- package/dist/appSlice/index.cjs +147 -178
- package/dist/appSlice/index.cjs.map +1 -1
- package/dist/appSlice/index.d.cts +2 -148
- package/dist/appSlice/index.d.ts +2 -148
- package/dist/appSlice/index.js +142 -18
- package/dist/appSlice/index.js.map +1 -1
- package/dist/appSlice/mocks.cjs +17 -191
- package/dist/appSlice/mocks.cjs.map +1 -1
- package/dist/appSlice/mocks.d.cts +33 -36
- package/dist/appSlice/mocks.d.ts +33 -36
- package/dist/appSlice/mocks.js +17 -25
- package/dist/appSlice/mocks.js.map +1 -1
- package/dist/appSlice/selectors.cjs +49 -91
- package/dist/appSlice/selectors.cjs.map +1 -1
- package/dist/appSlice/selectors.d.cts +216 -230
- package/dist/appSlice/selectors.d.ts +216 -230
- package/dist/appSlice/selectors.js +29 -44
- package/dist/appSlice/selectors.js.map +1 -1
- package/dist/appSlice/thunks.cjs +6 -4636
- package/dist/appSlice/thunks.d.cts +59 -62
- package/dist/appSlice/thunks.d.ts +59 -62
- package/dist/appSlice/thunks.js +2 -45
- package/dist/auth.cjs +68 -433
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +14 -14
- package/dist/auth.d.ts +14 -14
- package/dist/auth.js +65 -18
- package/dist/auth.js.map +1 -1
- package/dist/chunk-CKQMccvm.cjs +28 -0
- package/dist/commonConstants.cjs +14 -393
- package/dist/commonConstants.d.cts +2 -83
- package/dist/commonConstants.d.ts +2 -83
- package/dist/commonConstants.js +2 -33
- package/dist/commonSelectors.cjs +284 -1269
- package/dist/commonSelectors.cjs.map +1 -1
- package/dist/commonSelectors.d.cts +1623 -1416
- package/dist/commonSelectors.d.ts +1623 -1416
- package/dist/commonSelectors.js +277 -51
- package/dist/commonSelectors.js.map +1 -1
- package/dist/constants-5cdwz1iH.d.ts +160 -0
- package/dist/constants-BWEsNG5c.d.ts +28 -0
- package/dist/constants-BciiayPt.d.ts +17 -0
- package/dist/constants-C5AU0mCY.d.ts +157 -0
- package/dist/constants-CIx3fnBv.d.cts +17 -0
- package/dist/constants-CNhpIMME.d.cts +93 -0
- package/dist/constants-Cpgyuy_r.d.ts +57 -0
- package/dist/constants-D41U_jbR.d.cts +160 -0
- package/dist/constants-DK7fI3Rh.d.cts +28 -0
- package/dist/constants-DPLHhjVN.d.cts +157 -0
- package/dist/constants-DrwXHsJ1.d.ts +120 -0
- package/dist/constants-G3wymKIl.d.cts +57 -0
- package/dist/constants-MPLfugsi.d.cts +120 -0
- package/dist/constants-y2XVLQWf.d.ts +93 -0
- package/dist/constants.cjs +784 -972
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.d.cts +8 -14
- package/dist/constants.d.ts +8 -14
- package/dist/constants.js +674 -232
- package/dist/constants.js.map +1 -1
- package/dist/deploymentsSlice/constants.cjs +15 -214
- package/dist/deploymentsSlice/constants.d.cts +2 -163
- package/dist/deploymentsSlice/constants.d.ts +2 -163
- package/dist/deploymentsSlice/constants.js +2 -35
- package/dist/deploymentsSlice/index.cjs +168 -302
- package/dist/deploymentsSlice/index.cjs.map +1 -1
- package/dist/deploymentsSlice/index.d.cts +2 -157
- package/dist/deploymentsSlice/index.d.ts +2 -157
- package/dist/deploymentsSlice/index.js +161 -18
- package/dist/deploymentsSlice/index.js.map +1 -1
- package/dist/deploymentsSlice/mocks.cjs +178 -433
- package/dist/deploymentsSlice/mocks.cjs.map +1 -1
- package/dist/deploymentsSlice/mocks.d.cts +176 -178
- package/dist/deploymentsSlice/mocks.d.ts +176 -178
- package/dist/deploymentsSlice/mocks.js +178 -144
- package/dist/deploymentsSlice/mocks.js.map +1 -1
- package/dist/deploymentsSlice/selectors.cjs +44 -223
- package/dist/deploymentsSlice/selectors.cjs.map +1 -1
- package/dist/deploymentsSlice/selectors.d.cts +73 -87
- package/dist/deploymentsSlice/selectors.d.ts +73 -87
- package/dist/deploymentsSlice/selectors.js +37 -25
- package/dist/deploymentsSlice/selectors.js.map +1 -1
- package/dist/deploymentsSlice/thunks.cjs +16 -4654
- package/dist/deploymentsSlice/thunks.d.cts +223 -236
- package/dist/deploymentsSlice/thunks.d.ts +223 -236
- package/dist/deploymentsSlice/thunks.js +2 -65
- package/dist/devicesSlice/constants.cjs +9 -68
- package/dist/devicesSlice/constants.d.cts +2 -37
- package/dist/devicesSlice/constants.d.ts +2 -37
- package/dist/devicesSlice/constants.js +2 -23
- package/dist/devicesSlice/index.cjs +215 -225
- package/dist/devicesSlice/index.cjs.map +1 -1
- package/dist/devicesSlice/index.d.cts +2 -202
- package/dist/devicesSlice/index.d.ts +2 -202
- package/dist/devicesSlice/index.js +209 -18
- package/dist/devicesSlice/index.js.map +1 -1
- package/dist/devicesSlice/mocks.cjs +146 -339
- package/dist/devicesSlice/mocks.cjs.map +1 -1
- package/dist/devicesSlice/mocks.d.cts +150 -148
- package/dist/devicesSlice/mocks.d.ts +150 -148
- package/dist/devicesSlice/mocks.js +145 -132
- package/dist/devicesSlice/mocks.js.map +1 -1
- package/dist/devicesSlice/selectors.cjs +145 -539
- package/dist/devicesSlice/selectors.cjs.map +1 -1
- package/dist/devicesSlice/selectors.d.cts +685 -699
- package/dist/devicesSlice/selectors.d.ts +685 -699
- package/dist/devicesSlice/selectors.js +123 -59
- package/dist/devicesSlice/selectors.js.map +1 -1
- package/dist/devicesSlice/thunks.cjs +48 -4718
- package/dist/devicesSlice/thunks.d.cts +800 -752
- package/dist/devicesSlice/thunks.d.ts +800 -752
- package/dist/devicesSlice/thunks.js +2 -129
- package/dist/index-4eaLEXy_.d.cts +152 -0
- package/dist/index-BEVkIiNa.d.cts +95 -0
- package/dist/index-BP0uAq36.d.cts +159 -0
- package/dist/index-Bwx9jEiL.d.cts +71 -0
- package/dist/index-CJkrL0oA.d.ts +64 -0
- package/dist/index-CO-py5d4.d.ts +95 -0
- package/dist/index-CTt-eIY8.d.cts +154 -0
- package/dist/index-CkwVnIqd.d.ts +159 -0
- package/dist/index-Cvkvcz4r.d.ts +115 -0
- package/dist/index-DJSlDPRX.d.ts +71 -0
- package/dist/index-DqyY6oZ3.d.ts +205 -0
- package/dist/index-DtePEQPT.d.ts +152 -0
- package/dist/index-Dv3Hfxk_.d.ts +154 -0
- package/dist/index-FyYBBeN-.d.cts +115 -0
- package/dist/index-Lz5JsJ6O.d.cts +205 -0
- package/dist/index-UPc3wvVd.d.cts +64 -0
- package/dist/liststatehook.cjs +83 -948
- package/dist/liststatehook.cjs.map +1 -1
- package/dist/liststatehook.d.cts +29 -239
- package/dist/liststatehook.d.ts +29 -239
- package/dist/liststatehook.js +77 -85
- package/dist/liststatehook.js.map +1 -1
- package/dist/locationutils.cjs +459 -916
- package/dist/locationutils.cjs.map +1 -1
- package/dist/locationutils.d.cts +244 -110
- package/dist/locationutils.d.ts +244 -110
- package/dist/locationutils.js +440 -44
- package/dist/locationutils.js.map +1 -1
- package/dist/monitorSlice/constants.cjs +0 -19
- package/dist/monitorSlice/constants.d.cts +2 -5
- package/dist/monitorSlice/constants.d.ts +2 -5
- package/dist/monitorSlice/constants.js +1 -2
- package/dist/monitorSlice/index.cjs +65 -82
- package/dist/monitorSlice/index.cjs.map +1 -1
- package/dist/monitorSlice/index.d.cts +2 -94
- package/dist/monitorSlice/index.d.ts +2 -94
- package/dist/monitorSlice/index.js +59 -18
- package/dist/monitorSlice/index.js.map +1 -1
- package/dist/monitorSlice/mocks.cjs +50 -126
- package/dist/monitorSlice/mocks.cjs.map +1 -1
- package/dist/monitorSlice/mocks.d.cts +49 -45
- package/dist/monitorSlice/mocks.d.ts +49 -45
- package/dist/monitorSlice/mocks.js +49 -62
- package/dist/monitorSlice/mocks.js.map +1 -1
- package/dist/monitorSlice/selectors.cjs +5 -29
- package/dist/monitorSlice/selectors.cjs.map +1 -1
- package/dist/monitorSlice/selectors.d.cts +10 -1
- package/dist/monitorSlice/selectors.d.ts +10 -1
- package/dist/monitorSlice/selectors.js +5 -6
- package/dist/monitorSlice/selectors.js.map +1 -1
- package/dist/monitorSlice/thunks.cjs +83 -1914
- package/dist/monitorSlice/thunks.cjs.map +1 -1
- package/dist/monitorSlice/thunks.d.cts +112 -120
- package/dist/monitorSlice/thunks.d.ts +112 -120
- package/dist/monitorSlice/thunks.js +78 -42
- package/dist/monitorSlice/thunks.js.map +1 -1
- package/dist/onboardingSlice/constants.cjs +44 -69
- package/dist/onboardingSlice/constants.cjs.map +1 -1
- package/dist/onboardingSlice/constants.d.cts +2 -26
- package/dist/onboardingSlice/constants.d.ts +2 -26
- package/dist/onboardingSlice/constants.js +43 -7
- package/dist/onboardingSlice/constants.js.map +1 -1
- package/dist/onboardingSlice/index.cjs +53 -73
- package/dist/onboardingSlice/index.cjs.map +1 -1
- package/dist/onboardingSlice/index.d.cts +2 -62
- package/dist/onboardingSlice/index.d.ts +2 -62
- package/dist/onboardingSlice/index.js +47 -13
- package/dist/onboardingSlice/index.js.map +1 -1
- package/dist/onboardingSlice/mocks.cjs +12 -81
- package/dist/onboardingSlice/mocks.cjs.map +1 -1
- package/dist/onboardingSlice/mocks.d.cts +14 -15
- package/dist/onboardingSlice/mocks.d.ts +14 -15
- package/dist/onboardingSlice/mocks.js +12 -15
- package/dist/onboardingSlice/mocks.js.map +1 -1
- package/dist/onboardingSlice/selectors.cjs +5 -29
- package/dist/onboardingSlice/selectors.cjs.map +1 -1
- package/dist/onboardingSlice/selectors.d.cts +6 -1
- package/dist/onboardingSlice/selectors.d.ts +6 -1
- package/dist/onboardingSlice/selectors.js +5 -6
- package/dist/onboardingSlice/selectors.js.map +1 -1
- package/dist/onboardingSlice/thunks.cjs +8 -4746
- package/dist/onboardingSlice/thunks.d.cts +124 -143
- package/dist/onboardingSlice/thunks.d.ts +124 -143
- package/dist/onboardingSlice/thunks.js +2 -49
- package/dist/organizationSlice/constants.cjs +11 -95
- package/dist/organizationSlice/constants.d.cts +2 -91
- package/dist/organizationSlice/constants.d.ts +2 -91
- package/dist/organizationSlice/constants.js +2 -27
- package/dist/organizationSlice/index.cjs +113 -152
- package/dist/organizationSlice/index.cjs.map +1 -1
- package/dist/organizationSlice/index.d.cts +2 -74
- package/dist/organizationSlice/index.d.ts +2 -74
- package/dist/organizationSlice/index.js +106 -18
- package/dist/organizationSlice/index.js.map +1 -1
- package/dist/organizationSlice/mocks.cjs +215 -406
- package/dist/organizationSlice/mocks.cjs.map +1 -1
- package/dist/organizationSlice/mocks.d.cts +209 -212
- package/dist/organizationSlice/mocks.d.ts +209 -212
- package/dist/organizationSlice/mocks.js +214 -184
- package/dist/organizationSlice/mocks.js.map +1 -1
- package/dist/organizationSlice/selectors.cjs +97 -474
- package/dist/organizationSlice/selectors.cjs.map +1 -1
- package/dist/organizationSlice/selectors.d.cts +381 -389
- package/dist/organizationSlice/selectors.d.ts +381 -389
- package/dist/organizationSlice/selectors.js +78 -50
- package/dist/organizationSlice/selectors.js.map +1 -1
- package/dist/organizationSlice/thunks.cjs +43 -5150
- package/dist/organizationSlice/thunks.d.cts +638 -649
- package/dist/organizationSlice/thunks.d.ts +638 -649
- package/dist/organizationSlice/thunks.js +2 -119
- package/dist/organizationSlice/types.cjs +0 -19
- package/dist/organizationSlice/types.d.cts +2 -88
- package/dist/organizationSlice/types.d.ts +2 -88
- package/dist/organizationSlice/types.js +1 -1
- package/dist/releasesSlice/constants.cjs +17 -41
- package/dist/releasesSlice/constants.cjs.map +1 -1
- package/dist/releasesSlice/constants.d.cts +2 -15
- package/dist/releasesSlice/constants.d.ts +2 -15
- package/dist/releasesSlice/constants.js +13 -14
- package/dist/releasesSlice/constants.js.map +1 -1
- package/dist/releasesSlice/index.cjs +106 -179
- package/dist/releasesSlice/index.cjs.map +1 -1
- package/dist/releasesSlice/index.d.cts +2 -113
- package/dist/releasesSlice/index.d.ts +2 -113
- package/dist/releasesSlice/index.js +100 -18
- package/dist/releasesSlice/index.js.map +1 -1
- package/dist/releasesSlice/mocks.cjs +44 -220
- package/dist/releasesSlice/mocks.cjs.map +1 -1
- package/dist/releasesSlice/mocks.d.cts +63 -61
- package/dist/releasesSlice/mocks.d.ts +63 -61
- package/dist/releasesSlice/mocks.js +43 -59
- package/dist/releasesSlice/mocks.js.map +1 -1
- package/dist/releasesSlice/selectors.cjs +44 -439
- package/dist/releasesSlice/selectors.cjs.map +1 -1
- package/dist/releasesSlice/selectors.d.cts +268 -280
- package/dist/releasesSlice/selectors.d.ts +268 -280
- package/dist/releasesSlice/selectors.js +31 -36
- package/dist/releasesSlice/selectors.js.map +1 -1
- package/dist/releasesSlice/thunks.cjs +422 -2175
- package/dist/releasesSlice/thunks.cjs.map +1 -1
- package/dist/releasesSlice/thunks.d.cts +305 -307
- package/dist/releasesSlice/thunks.d.ts +305 -307
- package/dist/releasesSlice/thunks.js +413 -65
- package/dist/releasesSlice/thunks.js.map +1 -1
- package/dist/selectors.cjs +136 -1530
- package/dist/selectors.d.cts +10 -36
- package/dist/selectors.d.ts +10 -36
- package/dist/selectors.js +10 -280
- package/dist/sockethook.cjs +140 -515
- package/dist/sockethook.cjs.map +1 -1
- package/dist/sockethook.d.cts +25 -9
- package/dist/sockethook.d.ts +25 -9
- package/dist/sockethook.js +134 -135
- package/dist/sockethook.js.map +1 -1
- package/dist/store-BQxOSRC1.d.ts +234 -0
- package/dist/store-BiIA0r0A.d.cts +234 -0
- package/dist/store.cjs +117 -1290
- package/dist/store.cjs.map +1 -1
- package/dist/store.d.cts +3 -206
- package/dist/store.d.ts +3 -206
- package/dist/store.js +110 -32
- package/dist/store.js.map +1 -1
- package/dist/storehooks.cjs +240 -5783
- package/dist/storehooks.cjs.map +1 -1
- package/dist/storehooks.d.cts +76 -4
- package/dist/storehooks.d.ts +76 -4
- package/dist/storehooks.js +229 -265
- package/dist/storehooks.js.map +1 -1
- package/dist/thunks.cjs +2656 -5918
- package/dist/thunks.cjs.map +1 -1
- package/dist/thunks.d.cts +9 -36
- package/dist/thunks.d.ts +9 -36
- package/dist/thunks.js +2481 -385
- package/dist/thunks.js.map +1 -1
- package/dist/types-B2NRQLFw.d.ts +88 -0
- package/dist/types-ClEfo0dK.d.cts +88 -0
- package/dist/useDeploymentDevice.cjs +26 -4650
- package/dist/useDeploymentDevice.cjs.map +1 -1
- package/dist/useDeploymentDevice.d.cts +4 -2
- package/dist/useDeploymentDevice.d.ts +4 -2
- package/dist/useDeploymentDevice.js +21 -60
- package/dist/useDeploymentDevice.js.map +1 -1
- package/dist/usersSlice/constants.cjs +8 -55
- package/dist/usersSlice/constants.d.cts +2 -52
- package/dist/usersSlice/constants.d.ts +2 -52
- package/dist/usersSlice/constants.js +2 -21
- package/dist/usersSlice/index.cjs +132 -172
- package/dist/usersSlice/index.cjs.map +1 -1
- package/dist/usersSlice/index.d.cts +2 -152
- package/dist/usersSlice/index.d.ts +2 -152
- package/dist/usersSlice/index.js +125 -18
- package/dist/usersSlice/index.js.map +1 -1
- package/dist/usersSlice/mocks.cjs +55 -196
- package/dist/usersSlice/mocks.cjs.map +1 -1
- package/dist/usersSlice/mocks.d.cts +68 -72
- package/dist/usersSlice/mocks.d.ts +68 -72
- package/dist/usersSlice/mocks.js +54 -46
- package/dist/usersSlice/mocks.js.map +1 -1
- package/dist/usersSlice/selectors.cjs +65 -567
- package/dist/usersSlice/selectors.cjs.map +1 -1
- package/dist/usersSlice/selectors.d.cts +364 -376
- package/dist/usersSlice/selectors.d.ts +364 -376
- package/dist/usersSlice/selectors.js +44 -50
- package/dist/usersSlice/selectors.js.map +1 -1
- package/dist/usersSlice/thunks.cjs +39 -4698
- package/dist/usersSlice/thunks.d.cts +820 -856
- package/dist/usersSlice/thunks.d.ts +820 -856
- package/dist/usersSlice/thunks.js +2 -111
- package/dist/utils-CO_CpGFP.d.ts +105 -0
- package/dist/utils-CpPfqW0Q.d.cts +105 -0
- package/dist/utils.cjs +231 -850
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +2 -80
- package/dist/utils.d.ts +2 -80
- package/dist/utils.js +211 -50
- package/dist/utils.js.map +1 -1
- package/package.json +11 -13
- package/dist/appSlice/thunks.cjs.map +0 -1
- package/dist/appSlice/thunks.js.map +0 -1
- package/dist/chunk-2DYA3X77.js +0 -15
- package/dist/chunk-2DYA3X77.js.map +0 -1
- package/dist/chunk-4BHM6WVX.js +0 -50
- package/dist/chunk-4BHM6WVX.js.map +0 -1
- package/dist/chunk-4UNLEL5A.js +0 -143
- package/dist/chunk-4UNLEL5A.js.map +0 -1
- package/dist/chunk-6V5IIIF7.js +0 -396
- package/dist/chunk-6V5IIIF7.js.map +0 -1
- package/dist/chunk-ARMI6SZS.js +0 -446
- package/dist/chunk-ARMI6SZS.js.map +0 -1
- package/dist/chunk-AZF4YY3P.js +0 -108
- package/dist/chunk-AZF4YY3P.js.map +0 -1
- package/dist/chunk-B5AI2YPV.js +0 -156
- package/dist/chunk-B5AI2YPV.js.map +0 -1
- package/dist/chunk-CQXDAXQF.js +0 -51
- package/dist/chunk-CQXDAXQF.js.map +0 -1
- package/dist/chunk-DBBE6D36.js +0 -115
- package/dist/chunk-DBBE6D36.js.map +0 -1
- package/dist/chunk-ECVQVQEL.js +0 -68
- package/dist/chunk-ECVQVQEL.js.map +0 -1
- package/dist/chunk-FAJ3I2UQ.js +0 -47
- package/dist/chunk-FAJ3I2UQ.js.map +0 -1
- package/dist/chunk-FCY7BUGK.js +0 -2876
- package/dist/chunk-FCY7BUGK.js.map +0 -1
- package/dist/chunk-FG37HJLC.js +0 -157
- package/dist/chunk-FG37HJLC.js.map +0 -1
- package/dist/chunk-FQAUVV6C.js +0 -246
- package/dist/chunk-FQAUVV6C.js.map +0 -1
- package/dist/chunk-HKN3RN2Z.js +0 -41
- package/dist/chunk-HKN3RN2Z.js.map +0 -1
- package/dist/chunk-HPKXWNEF.js +0 -100
- package/dist/chunk-HPKXWNEF.js.map +0 -1
- package/dist/chunk-JIS4PA3R.js +0 -7
- package/dist/chunk-JIS4PA3R.js.map +0 -1
- package/dist/chunk-JXBTIFMS.js +0 -82
- package/dist/chunk-JXBTIFMS.js.map +0 -1
- package/dist/chunk-JYPSCCT4.js +0 -58
- package/dist/chunk-JYPSCCT4.js.map +0 -1
- package/dist/chunk-L53CPHJU.js +0 -721
- package/dist/chunk-L53CPHJU.js.map +0 -1
- package/dist/chunk-MNJXEB7S.js +0 -304
- package/dist/chunk-MNJXEB7S.js.map +0 -1
- package/dist/chunk-NMAXZ3ZY.js +0 -1
- package/dist/chunk-NMAXZ3ZY.js.map +0 -1
- package/dist/chunk-NXLXPRYW.js +0 -142
- package/dist/chunk-NXLXPRYW.js.map +0 -1
- package/dist/chunk-O6VCSLNE.js +0 -59
- package/dist/chunk-O6VCSLNE.js.map +0 -1
- package/dist/chunk-PQADM3M3.js +0 -115
- package/dist/chunk-PQADM3M3.js.map +0 -1
- package/dist/chunk-SJ75YKOA.js +0 -44
- package/dist/chunk-SJ75YKOA.js.map +0 -1
- package/dist/chunk-TUPBZ6MQ.js +0 -162
- package/dist/chunk-TUPBZ6MQ.js.map +0 -1
- package/dist/chunk-XF3TZSZS.js +0 -25
- package/dist/chunk-XF3TZSZS.js.map +0 -1
- package/dist/chunk-YB3US6OT.js +0 -61
- package/dist/chunk-YB3US6OT.js.map +0 -1
- package/dist/chunk-YDDE5TIH.js +0 -204
- package/dist/chunk-YDDE5TIH.js.map +0 -1
- package/dist/chunk-YO22XLHI.js +0 -7
- package/dist/chunk-YO22XLHI.js.map +0 -1
- package/dist/chunk-Z2O6LYVP.js +0 -144
- package/dist/chunk-Z2O6LYVP.js.map +0 -1
- package/dist/chunk-ZKAH3APE.js +0 -1
- package/dist/chunk-ZKAH3APE.js.map +0 -1
- package/dist/commonConstants.cjs.map +0 -1
- package/dist/commonConstants.js.map +0 -1
- package/dist/deploymentsSlice/constants.cjs.map +0 -1
- package/dist/deploymentsSlice/constants.js.map +0 -1
- package/dist/deploymentsSlice/thunks.cjs.map +0 -1
- package/dist/deploymentsSlice/thunks.js.map +0 -1
- package/dist/devicesSlice/constants.cjs.map +0 -1
- package/dist/devicesSlice/constants.js.map +0 -1
- package/dist/devicesSlice/thunks.cjs.map +0 -1
- package/dist/devicesSlice/thunks.js.map +0 -1
- package/dist/monitorSlice/constants.cjs.map +0 -1
- package/dist/monitorSlice/constants.js.map +0 -1
- package/dist/onboardingSlice/thunks.cjs.map +0 -1
- package/dist/onboardingSlice/thunks.js.map +0 -1
- package/dist/organizationSlice/constants.cjs.map +0 -1
- package/dist/organizationSlice/constants.js.map +0 -1
- package/dist/organizationSlice/thunks.cjs.map +0 -1
- package/dist/organizationSlice/thunks.js.map +0 -1
- package/dist/organizationSlice/types.cjs.map +0 -1
- package/dist/organizationSlice/types.js.map +0 -1
- package/dist/selectors.cjs.map +0 -1
- package/dist/selectors.js.map +0 -1
- package/dist/usersSlice/constants.cjs.map +0 -1
- package/dist/usersSlice/constants.js.map +0 -1
- package/dist/usersSlice/thunks.cjs.map +0 -1
- package/dist/usersSlice/thunks.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/devicesSlice/index.ts","../../src/constants.ts"],"sourcesContent":["// Copyright 2023 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport type {\n Device as BackendDeviceAuth,\n ConnectionState,\n DeviceConfiguration,\n DeviceState,\n DeviceTierLimits,\n MonitorConfiguration,\n SortCriteria,\n Status\n} from '@northern.tech/types/MenderTypes';\n// @ts-nocheck\nimport { deepCompare, duplicateFilter } from '@northern.tech/utils/helpers';\nimport type { PayloadAction } from '@reduxjs/toolkit';\nimport { createSlice } from '@reduxjs/toolkit';\n\nimport type { ALL_DEVICE_STATES, DeviceIssueOptionKey, FilterOperator, SortOptions } from '../constants';\nimport { DEVICE_LIST_DEFAULTS, DEVICE_STATES, SORTING_OPTIONS } from '../constants';\nimport type { DeviceDeployment } from '../deploymentsSlice';\nimport type { DeviceAuthState } from './constants';\n\nexport const sliceName = 'devices';\nexport type DeviceSelectedAttribute = { attribute: string; scope: string };\nexport type DeviceListState = {\n detailsTab: string;\n deviceIds: string[];\n isLoading: boolean;\n open?: boolean;\n page: number;\n perPage: number;\n refreshTrigger: boolean;\n selectedAttributes: DeviceSelectedAttribute[];\n selectedId?: string;\n selectedIssues: DeviceIssueOptionKey[];\n selection: number[];\n setOnly?: boolean;\n sort: SortOptions & Partial<SortCriteria>;\n state?: DeviceAuthState | typeof ALL_DEVICE_STATES;\n total: number;\n};\ntype DeviceReport = {\n items: { count: number; key: string }[];\n otherCount: number;\n total: number;\n};\nexport type DeviceGroup = { deviceIds?: string[]; filters?: DeviceFilter[]; id?: string; total?: number };\nexport type InventoryAttributes = {\n [key: string]: string | string[];\n artifact_name: string;\n device_type: string[];\n};\n\n// based on the api docs the Record values might be even: \"Supported types: number, string, array of numbers, array of strings\" - but I guess \"string\" or \"string | sting[]\" should be good enough\ntype UiDeviceAttributes = {\n attributes: InventoryAttributes;\n identity?: Record<string, string>;\n monitor?: Record<string, string>;\n system: Record<string, string>;\n tags?: Record<string, string>;\n};\n\nexport type Device = BackendDeviceAuth &\n UiDeviceAttributes & {\n check_in_time_exact?: string;\n check_in_time_rounded?: string;\n config?: DeviceConfiguration;\n connect_status?: ConnectionState['status'];\n connect_updated_ts?: string;\n deploymentsCount?: number;\n deviceDeployments?: DeviceDeployment;\n etag?: string;\n gatewayIds?: string[];\n group?: string;\n id: string;\n isNew?: boolean;\n isOffline?: boolean;\n monitors?: MonitorConfiguration[];\n status: Status;\n twinsByIntegration?: Record<string, DeviceState & { twinError?: string }>;\n };\nexport type DeviceFilter = {\n key: string;\n operator: FilterOperator;\n scope: string;\n value: string | string[];\n};\ntype FilteringAttributes = {\n identityAttributes: string[];\n inventoryAttributes: string[];\n systemAttributes: string[];\n tagAttributes: string[];\n};\ntype FilteringAttributesConfig = {\n attributes: Record<string, string[]>;\n count: number;\n limit: number;\n};\n\nexport type DeviceGroups = {\n byId: Record<string, DeviceGroup>;\n selectedGroup?: string;\n};\nexport type DeviceSliceType = {\n byId: Record<string, Device>;\n byStatus: Record<DeviceAuthState, { counts: DeviceTierLimits & { total: number }; deviceIds: string[] }>;\n deviceList: DeviceListState;\n filteringAttributes: FilteringAttributes;\n filteringAttributesConfig: FilteringAttributesConfig;\n filteringAttributesLimit: number;\n filters: DeviceFilter[];\n groups: DeviceGroups;\n limits: DeviceTierLimits;\n reports: DeviceReport[];\n total: number;\n};\nexport const initialState: DeviceSliceType = {\n byId: {\n // [deviceId]: {\n // ...,\n // twinsByIntegration: { [external.provider.id]: twinData }\n // }\n },\n byStatus: {\n [DEVICE_STATES.accepted]: { deviceIds: [], counts: { standard: 0, micro: 0, system: 0, total: 0 } },\n [DEVICE_STATES.pending]: { deviceIds: [], counts: { standard: 0, micro: 0, system: 0, total: 0 } },\n [DEVICE_STATES.preauth]: { deviceIds: [], counts: { standard: 0, micro: 0, system: 0, total: 0 } },\n [DEVICE_STATES.rejected]: { deviceIds: [], counts: { standard: 0, micro: 0, system: 0, total: 0 } }\n },\n deviceList: {\n deviceIds: [],\n ...DEVICE_LIST_DEFAULTS,\n selectedAttributes: [],\n selectedIssues: [],\n selection: [],\n sort: {\n direction: SORTING_OPTIONS.desc\n // key: null,\n // scope: null\n },\n state: DEVICE_STATES.accepted,\n total: 0,\n refreshTrigger: false,\n isLoading: false,\n detailsTab: '',\n open: false\n },\n filters: [\n // { key: 'device_type', value: 'raspberry', operator: '$eq', scope: 'inventory' }\n ],\n filteringAttributes: { identityAttributes: [], inventoryAttributes: [], systemAttributes: [], tagAttributes: [] },\n filteringAttributesLimit: 10,\n filteringAttributesConfig: {\n attributes: {\n // inventory: ['some_attribute']\n },\n count: 0,\n limit: 100\n },\n reports: [\n // { items: [{ key: \"someKey\", count: 42 }], otherCount: 123, total: <otherCount + itemsCount> }\n ],\n total: 0,\n limits: {\n standard: 0,\n micro: 0,\n system: 0\n },\n groups: {\n byId: {\n // groupName: { deviceIds: [], total: 0, filters: [] },\n // dynamo: { deviceIds: [], total: 3, filters: [{ a: 1 }] }\n },\n selectedGroup: undefined\n }\n};\n\nexport const devicesSlice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n receivedGroups: (state, action: PayloadAction<Record<string, DeviceGroup>>) => {\n state.groups.byId = action.payload;\n },\n addToGroup: (state, action: PayloadAction<{ deviceIds: string[]; group: string }>) => {\n const { group, deviceIds } = action.payload;\n const maybeExistingGroup = {\n filters: [],\n deviceIds: [],\n ...state.groups.byId[group]\n };\n state.groups.byId[group] = {\n ...maybeExistingGroup,\n deviceIds: [...maybeExistingGroup.deviceIds, ...deviceIds].filter(duplicateFilter),\n total: (maybeExistingGroup.total || 0) + 1\n };\n },\n removeFromGroup: (state, action: PayloadAction<{ deviceIds: string[]; group: string }>) => {\n const { group, deviceIds: removedIds } = action.payload;\n const { deviceIds = [], total = 0, ...maybeExistingGroup } = state.groups.byId[group] || {};\n const changedGroup = {\n ...maybeExistingGroup,\n deviceIds: deviceIds.filter(id => !removedIds.includes(id)),\n total: Math.max(total - removedIds.length, 0)\n };\n if (changedGroup.total || changedGroup.deviceIds.length) {\n state.groups.byId[group] = changedGroup;\n return;\n } else if (state.groups.selectedGroup === group) {\n state.groups.selectedGroup = undefined;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [group]: removal, ...remainingById } = state.groups.byId;\n state.groups.byId = remainingById;\n },\n addGroup: (state, action: PayloadAction<{ group: DeviceGroup; groupName: string }>) => {\n const { groupName, group } = action.payload;\n state.groups.byId[groupName] = {\n ...state.groups.byId[groupName],\n ...group\n };\n },\n selectGroup: (state, { payload: group }: PayloadAction<string | undefined>) => {\n state.deviceList.deviceIds =\n group && state.groups.byId[group] && state.groups.byId[group].deviceIds && state.groups.byId[group].deviceIds.length > 0\n ? state.groups.byId[group].deviceIds\n : [];\n state.groups.selectedGroup = group;\n },\n removeGroup: (state, action: PayloadAction<string>) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [action.payload]: removal, ...remainingById } = state.groups.byId;\n state.groups.byId = remainingById;\n state.groups.selectedGroup = state.groups.selectedGroup === action.payload ? undefined : state.groups.selectedGroup;\n },\n setDeviceListState: (state, action: PayloadAction<Partial<DeviceListState>>) => {\n state.deviceList = {\n ...state.deviceList,\n ...action.payload,\n sort: {\n ...state.deviceList.sort,\n ...action.payload.sort\n }\n };\n },\n setFilterAttributes: (state, action: PayloadAction<FilteringAttributes>) => {\n state.filteringAttributes = action.payload;\n },\n setFilterablesConfig: (state, action: PayloadAction<FilteringAttributesConfig>) => {\n state.filteringAttributesConfig = action.payload;\n },\n receivedDevices: (state, action: PayloadAction<Record<string, Device>>) => {\n state.byId = {\n ...state.byId,\n ...action.payload\n };\n },\n setDeviceFilters: (state, action: PayloadAction<DeviceFilter[]>) => {\n if (deepCompare(action.payload, state.filters)) {\n return;\n }\n state.filters = action.payload.filter(filter => filter.key && filter.operator && filter.scope && typeof filter.value !== 'undefined');\n },\n setDeviceReports: (state, action: PayloadAction<DeviceReport[]>) => {\n state.reports = action.payload;\n },\n setDevicesByStatus: (state, action: PayloadAction<{ deviceIds: string[]; status: DeviceAuthState; total: number }>) => {\n const { status, total, deviceIds } = action.payload;\n if (total) {\n state.byStatus[status].deviceIds = deviceIds;\n state.byStatus[status].counts.total = total;\n }\n },\n setDevicesCountByStatus: (state, action: PayloadAction<{ countsPerTier: DeviceTierLimits; status: DeviceAuthState }>) => {\n const { countsPerTier, status } = action.payload;\n state.byStatus[status].counts = { ...countsPerTier, total: Object.values(countsPerTier).reduce((accu, tieredCount) => (accu += tieredCount), 0) };\n },\n setDeviceLimits: (state, action: PayloadAction<DeviceTierLimits>) => {\n state.limits = action.payload;\n },\n receivedDevice: (state, action: PayloadAction<{ id: string } & Partial<Device>>) => {\n state.byId[action.payload.id] = {\n ...state.byId[action.payload.id],\n ...action.payload\n };\n },\n maybeUpdateDevicesByStatus: (state, action: PayloadAction<{ authId?: string; deviceId: string }>) => {\n const { deviceId, authId } = action.payload;\n const device = state.byId[deviceId];\n const hasMultipleAuthSets = authId && device.auth_sets ? device.auth_sets.filter(authset => authset.id !== authId).length > 0 : false;\n if (!hasMultipleAuthSets && (Object.values(DEVICE_STATES) as string[]).includes(device.status)) {\n const deviceIds = state.byStatus[device.status].deviceIds.filter(id => id !== deviceId);\n const deviceTier = (device.attributes.tier as string) || 'standard';\n state.byStatus[device.status] = {\n deviceIds,\n counts: {\n ...state.byStatus[device.status].counts,\n [deviceTier]: Math.max(0, state.byStatus[device.status].counts[deviceTier] - 1),\n total: Math.max(0, state.byStatus[device.status].counts.total - 1)\n }\n };\n }\n }\n }\n});\n\nexport const actions = devicesSlice.actions;\nexport default devicesSlice.reducer;\n","// Copyright 2024 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//@ts-nocheck\nimport {\n ALL_DEVICES,\n ALL_DEVICE_STATES,\n ALL_RELEASES,\n APPLICATION_JSON_CONTENT_TYPE,\n APPLICATION_JWT_CONTENT_TYPE,\n ATTRIBUTE_SCOPES,\n DEVICE_FILTERING_OPTIONS,\n DEVICE_ISSUE_OPTIONS,\n DEVICE_LIST_DEFAULTS,\n DEVICE_STATES,\n PermissionTypes,\n SORTING_OPTIONS,\n alertChannels,\n apiRoot,\n apiUrl,\n auditLogsApiUrl,\n defaultPermissionSets,\n deploymentsApiUrl,\n deploymentsApiUrlV2,\n deviceAuthV2,\n deviceConfig,\n deviceConnect,\n emptyRole,\n emptyUiPermissions,\n headerNames,\n inventoryApiUrl,\n inventoryApiUrlV2,\n iotManagerBaseURL,\n limitDefault,\n maxSessionAge,\n monitorApiUrlv1,\n rolesById,\n rolesByName,\n scopedPermissionAreas,\n serviceProviderRolesById,\n ssoIdpApiUrlv1,\n tenantadmApiUrlv1,\n tenantadmApiUrlv2,\n twoFAStates,\n uiPermissionsByArea,\n uiPermissionsById,\n useradmApiUrl,\n useradmApiUrlv1,\n useradmApiUrlv2\n} from '@northern.tech/utils/constants';\nimport type {\n AnyPermission,\n AuditLogPermission,\n DeploymentPermission,\n DeviceIssueOptionKey,\n GroupsPermission,\n PermissionObject,\n PermissionSet,\n PermissionSetId,\n ReleasesPermission,\n Role,\n ScopedPermissionsByAreaKey,\n SortOptions,\n UiPermissionsByAreaKey,\n UiPermissionsByIdKey,\n UiPermissionsDefinition,\n UserManagementPermission\n} from '@northern.tech/utils/constants';\n\nexport {\n alertChannels,\n ALL_DEVICE_STATES,\n ALL_DEVICES,\n ALL_RELEASES,\n APPLICATION_JSON_CONTENT_TYPE,\n APPLICATION_JWT_CONTENT_TYPE,\n ATTRIBUTE_SCOPES,\n apiRoot,\n apiUrl,\n auditLogsApiUrl,\n defaultPermissionSets,\n deploymentsApiUrl,\n deploymentsApiUrlV2,\n DEVICE_FILTERING_OPTIONS,\n DEVICE_ISSUE_OPTIONS,\n DEVICE_LIST_DEFAULTS,\n DEVICE_STATES,\n deviceAuthV2,\n deviceConfig,\n deviceConnect,\n emptyRole,\n emptyUiPermissions,\n headerNames,\n inventoryApiUrl,\n inventoryApiUrlV2,\n iotManagerBaseURL,\n monitorApiUrlv1,\n limitDefault,\n maxSessionAge,\n PermissionTypes,\n rolesById,\n rolesByName,\n scopedPermissionAreas,\n serviceProviderRolesById,\n SORTING_OPTIONS,\n ssoIdpApiUrlv1,\n tenantadmApiUrlv1,\n tenantadmApiUrlv2,\n twoFAStates,\n uiPermissionsByArea,\n uiPermissionsById,\n useradmApiUrl,\n useradmApiUrlv1,\n useradmApiUrlv2\n};\n\nexport type {\n AnyPermission,\n AuditLogPermission,\n DeploymentPermission,\n DeviceIssueOptionKey,\n GroupsPermission,\n PermissionObject,\n PermissionSet,\n PermissionSetId,\n ReleasesPermission,\n Role,\n ScopedPermissionsByAreaKey,\n SortOptions,\n UiPermissionsByAreaKey,\n UiPermissionsByIdKey,\n UiPermissionsDefinition,\n UserManagementPermission\n};\n\nexport * from './appSlice/constants';\nexport * from './commonConstants';\nexport * from './deploymentsSlice/constants';\nexport * from './devicesSlice/constants';\nexport * from './monitorSlice/constants';\nexport * from './onboardingSlice/constants';\nexport * from './organizationSlice/constants';\nexport * from './releasesSlice/constants';\nexport * from './usersSlice/constants';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBA,qBAA6C;AAE7C,qBAA4B;;;ACZ5B,uBA6CO;;;AD1BA,IAAM,YAAY;AA8FlB,IAAM,eAAgC;AAAA,EAC3C,MAAM;AAAA;AAAA;A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AAO,UAAU,OAAO,aAAW,QAAQ,OAAO,MAAM,EAAE,SAAS,IAAI;AAChI,UAAI,CAAC,uBAAwB,OAAO,OAAO,8BAAa,EAAe,SAAS,OAAO,MAAM,GAAG;AAC9F,cAAM,YAAY,MAAM,SAAS,OAAO,MAAM,EAAE,UAAU,OAAO,QAAM,OAAO,QAAQ;AACtF,cAAM,aAAc,OAAO,WAAW,QAAmB;AACzD,cAAM,SAAS,OAAO,MAAM,IAAI;AAAA,UAC9B;AAAA,UACA,QAAQ;AAAA,YACN,GAAG,MAAM,SAAS,OAAO,MAAM,EAAE;AAAA,YACjC,CAAC,UAAU,GAAG,KAAK,IAAI,GAAG,MAAM,SAAS,OAAO,MAAM,EAAE,OAAO,UAAU,IAAI,CAAC;AAAA,YAC9E,OAAO,KAAK,IAAI,GAAG,MAAM,SAAS,OAAO,MAAM,EAAE,OAAO,QAAQ,CAAC;AAAA,UACnE;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF,CAAC;AAEM,IAAM,UAAU,aAAa;AACpC,IAAO,uBAAQ,aAAa;","names":[]}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["DEVICE_STATES","DEVICE_LIST_DEFAULTS","SORTING_OPTIONS","duplicateFilter"],"sources":["../../src/devicesSlice/index.ts"],"sourcesContent":["// Copyright 2023 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport type {\n Device as BackendDeviceAuth,\n ConnectionState,\n DeviceConfiguration,\n DeviceState,\n DeviceTierLimits,\n MonitorConfiguration,\n Scope,\n SortCriteria,\n Status\n} from '@northern.tech/types/MenderTypes';\n// @ts-nocheck\nimport { deepCompare, duplicateFilter } from '@northern.tech/utils/helpers';\nimport type { PayloadAction } from '@reduxjs/toolkit';\nimport { createSlice } from '@reduxjs/toolkit';\n\nimport type { ALL_DEVICE_STATES, DeviceIssueOptionKey, FilterOperator, SortOptions } from '../constants';\nimport { DEVICE_LIST_DEFAULTS, DEVICE_STATES, SORTING_OPTIONS } from '../constants';\nimport type { DeviceDeployment } from '../deploymentsSlice';\nimport type { DeviceAuthState } from './constants';\n\nexport const sliceName = 'devices';\nexport type DeviceSelectedAttribute = { attribute: string; scope: string };\nexport type DeviceListState = {\n detailsTab: string;\n deviceIds: string[];\n isLoading: boolean;\n open?: boolean;\n page: number;\n perPage: number;\n refreshTrigger: boolean;\n selectedAttributes: DeviceSelectedAttribute[];\n selectedId?: string;\n selectedIssues: DeviceIssueOptionKey[];\n selection: number[];\n setOnly?: boolean;\n sort: SortOptions & Partial<SortCriteria>;\n state?: DeviceAuthState | typeof ALL_DEVICE_STATES;\n total: number;\n};\ntype DeviceReport = {\n items: { count: number; key: string }[];\n otherCount: number;\n total: number;\n};\nexport type DeviceGroup = { deviceIds?: string[]; filters?: DeviceFilter[]; id?: string; total?: number };\nexport type InventoryAttributes = {\n [key: string]: string | string[];\n artifact_name: string;\n device_type: string[];\n};\n\n// based on the api docs the Record values might be even: \"Supported types: number, string, array of numbers, array of strings\" - but I guess \"string\" or \"string | sting[]\" should be good enough\ntype UiDeviceAttributes = {\n attributes: InventoryAttributes;\n identity?: Record<string, string>;\n monitor?: Record<string, string>;\n system: Record<string, string>;\n tags?: Record<string, string>;\n};\n\nexport type Device = BackendDeviceAuth &\n UiDeviceAttributes & {\n check_in_time_exact?: string;\n check_in_time_rounded?: string;\n config?: DeviceConfiguration;\n connect_status?: ConnectionState['status'];\n connect_updated_ts?: string;\n deploymentsCount?: number;\n deviceDeployments?: DeviceDeployment;\n etag?: string;\n gatewayIds?: string[];\n group?: string;\n id: string;\n isNew?: boolean;\n isOffline?: boolean;\n monitors?: MonitorConfiguration[];\n status: Status;\n twinsByIntegration?: Record<string, DeviceState & { twinError?: string }>;\n };\nexport type DeviceFilter = {\n key: string;\n operator: FilterOperator;\n scope: Scope;\n value: string | string[];\n};\ntype FilteringAttributes = {\n identityAttributes: string[];\n inventoryAttributes: string[];\n systemAttributes: string[];\n tagAttributes: string[];\n};\ntype FilteringAttributesConfig = {\n attributes: Record<string, string[]>;\n count: number;\n limit: number;\n};\n\nexport type DeviceGroups = {\n byId: Record<string, DeviceGroup>;\n selectedGroup?: string;\n};\nexport type DeviceSliceType = {\n byId: Record<string, Device>;\n byStatus: Record<DeviceAuthState, { counts: DeviceTierLimits & { total: number }; deviceIds: string[] }>;\n deviceList: DeviceListState;\n filteringAttributes: FilteringAttributes;\n filteringAttributesConfig: FilteringAttributesConfig;\n filteringAttributesLimit: number;\n filters: DeviceFilter[];\n groups: DeviceGroups;\n limits: DeviceTierLimits;\n reports: DeviceReport[];\n total: number;\n};\nexport const initialState: DeviceSliceType = {\n byId: {\n // [deviceId]: {\n // ...,\n // twinsByIntegration: { [external.provider.id]: twinData }\n // }\n },\n byStatus: {\n [DEVICE_STATES.accepted]: { deviceIds: [], counts: { standard: 0, micro: 0, system: 0, total: 0 } },\n [DEVICE_STATES.pending]: { deviceIds: [], counts: { standard: 0, micro: 0, system: 0, total: 0 } },\n [DEVICE_STATES.preauth]: { deviceIds: [], counts: { standard: 0, micro: 0, system: 0, total: 0 } },\n [DEVICE_STATES.rejected]: { deviceIds: [], counts: { standard: 0, micro: 0, system: 0, total: 0 } }\n },\n deviceList: {\n deviceIds: [],\n ...DEVICE_LIST_DEFAULTS,\n selectedAttributes: [],\n selectedIssues: [],\n selection: [],\n sort: {\n direction: SORTING_OPTIONS.desc\n // key: null,\n // scope: null\n },\n state: DEVICE_STATES.accepted,\n total: 0,\n refreshTrigger: false,\n isLoading: false,\n detailsTab: '',\n open: false\n },\n filters: [\n // { key: 'device_type', value: 'raspberry', operator: '$eq', scope: 'inventory' }\n ],\n filteringAttributes: { identityAttributes: [], inventoryAttributes: [], systemAttributes: [], tagAttributes: [] },\n filteringAttributesLimit: 10,\n filteringAttributesConfig: {\n attributes: {\n // inventory: ['some_attribute']\n },\n count: 0,\n limit: 100\n },\n reports: [\n // { items: [{ key: \"someKey\", count: 42 }], otherCount: 123, total: <otherCount + itemsCount> }\n ],\n total: 0,\n limits: {\n standard: 0,\n micro: 0,\n system: 0\n },\n groups: {\n byId: {\n // groupName: { deviceIds: [], total: 0, filters: [] },\n // dynamo: { deviceIds: [], total: 3, filters: [{ a: 1 }] }\n },\n selectedGroup: undefined\n }\n};\n\nexport const devicesSlice = createSlice({\n name: sliceName,\n initialState,\n reducers: {\n receivedGroups: (state, action: PayloadAction<Record<string, DeviceGroup>>) => {\n state.groups.byId = action.payload;\n },\n addToGroup: (state, action: PayloadAction<{ deviceIds: string[]; group: string }>) => {\n const { group, deviceIds } = action.payload;\n const maybeExistingGroup = {\n filters: [],\n deviceIds: [],\n ...state.groups.byId[group]\n };\n state.groups.byId[group] = {\n ...maybeExistingGroup,\n deviceIds: [...maybeExistingGroup.deviceIds, ...deviceIds].filter(duplicateFilter),\n total: (maybeExistingGroup.total || 0) + 1\n };\n },\n removeFromGroup: (state, action: PayloadAction<{ deviceIds: string[]; group: string }>) => {\n const { group, deviceIds: removedIds } = action.payload;\n const { deviceIds = [], total = 0, ...maybeExistingGroup } = state.groups.byId[group] || {};\n const changedGroup = {\n ...maybeExistingGroup,\n deviceIds: deviceIds.filter(id => !removedIds.includes(id)),\n total: Math.max(total - removedIds.length, 0)\n };\n if (changedGroup.total || changedGroup.deviceIds.length) {\n state.groups.byId[group] = changedGroup;\n return;\n } else if (state.groups.selectedGroup === group) {\n state.groups.selectedGroup = undefined;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [group]: removal, ...remainingById } = state.groups.byId;\n state.groups.byId = remainingById;\n },\n addGroup: (state, action: PayloadAction<{ group: DeviceGroup; groupName: string }>) => {\n const { groupName, group } = action.payload;\n state.groups.byId[groupName] = {\n ...state.groups.byId[groupName],\n ...group\n };\n },\n selectGroup: (state, { payload: group }: PayloadAction<string | undefined>) => {\n state.deviceList.deviceIds =\n group && state.groups.byId[group] && state.groups.byId[group].deviceIds && state.groups.byId[group].deviceIds.length > 0\n ? state.groups.byId[group].deviceIds\n : [];\n state.groups.selectedGroup = group;\n },\n removeGroup: (state, action: PayloadAction<string>) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [action.payload]: removal, ...remainingById } = state.groups.byId;\n state.groups.byId = remainingById;\n state.groups.selectedGroup = state.groups.selectedGroup === action.payload ? undefined : state.groups.selectedGroup;\n },\n setDeviceListState: (state, action: PayloadAction<Partial<DeviceListState>>) => {\n state.deviceList = {\n ...state.deviceList,\n ...action.payload,\n sort: {\n ...state.deviceList.sort,\n ...action.payload.sort\n }\n };\n },\n setFilterAttributes: (state, action: PayloadAction<FilteringAttributes>) => {\n state.filteringAttributes = action.payload;\n },\n setFilterablesConfig: (state, action: PayloadAction<FilteringAttributesConfig>) => {\n state.filteringAttributesConfig = action.payload;\n },\n receivedDevices: (state, action: PayloadAction<Record<string, Device>>) => {\n state.byId = {\n ...state.byId,\n ...action.payload\n };\n },\n setDeviceFilters: (state, action: PayloadAction<DeviceFilter[]>) => {\n if (deepCompare(action.payload, state.filters)) {\n return;\n }\n state.filters = action.payload.filter(filter => filter.key && filter.operator && filter.scope && typeof filter.value !== 'undefined');\n },\n setDeviceReports: (state, action: PayloadAction<DeviceReport[]>) => {\n state.reports = action.payload;\n },\n setDevicesByStatus: (state, action: PayloadAction<{ deviceIds: string[]; status: DeviceAuthState; total: number }>) => {\n const { status, total, deviceIds } = action.payload;\n if (total) {\n state.byStatus[status].deviceIds = deviceIds;\n state.byStatus[status].counts.total = total;\n }\n },\n setDevicesCountByStatus: (state, action: PayloadAction<{ countsPerTier: DeviceTierLimits; status: DeviceAuthState }>) => {\n const { countsPerTier, status } = action.payload;\n state.byStatus[status].counts = { ...countsPerTier, total: Object.values(countsPerTier).reduce((accu, tieredCount) => (accu += tieredCount), 0) };\n },\n setDeviceLimits: (state, action: PayloadAction<DeviceTierLimits>) => {\n state.limits = action.payload;\n },\n receivedDevice: (state, action: PayloadAction<{ id: string } & Partial<Device>>) => {\n state.byId[action.payload.id] = {\n ...state.byId[action.payload.id],\n ...action.payload\n };\n },\n maybeUpdateDevicesByStatus: (state, action: PayloadAction<{ authId?: string; deviceId: string }>) => {\n const { deviceId, authId } = action.payload;\n const device = state.byId[deviceId];\n const hasMultipleAuthSets = authId && device.auth_sets ? device.auth_sets.filter(authset => authset.id !== authId).length > 0 : false;\n if (!hasMultipleAuthSets && (Object.values(DEVICE_STATES) as string[]).includes(device.status)) {\n const deviceIds = state.byStatus[device.status].deviceIds.filter(id => id !== deviceId);\n const deviceTier = (device.attributes.tier as string) || 'standard';\n state.byStatus[device.status] = {\n deviceIds,\n counts: {\n ...state.byStatus[device.status].counts,\n [deviceTier]: Math.max(0, state.byStatus[device.status].counts[deviceTier] - 1),\n total: Math.max(0, state.byStatus[device.status].counts.total - 1)\n }\n };\n }\n }\n }\n});\n\nexport const actions = devicesSlice.actions;\nexport default devicesSlice.reducer;\n"],"mappings":";;;;;;;;;AAkCA,MAAa,YAAY;AA8FzB,MAAa,eAAgC;CAC3C,MAAM,EAKL;CACD,UAAU;GACPA,+BAAAA,cAAc,WAAW;GAAE,WAAW,EAAE;GAAE,QAAQ;IAAE,UAAU;IAAG,OAAO;IAAG,QAAQ;IAAG,OAAO;IAAG;GAAE;GAClGA,+BAAAA,cAAc,UAAU;GAAE,WAAW,EAAE;GAAE,QAAQ;IAAE,UAAU;IAAG,OAAO;IAAG,QAAQ;IAAG,OAAO;IAAG;GAAE;GACjGA,+BAAAA,cAAc,UAAU;GAAE,WAAW,EAAE;GAAE,QAAQ;IAAE,UAAU;IAAG,OAAO;IAAG,QAAQ;IAAG,OAAO;IAAG;GAAE;GACjGA,+BAAAA,cAAc,WAAW;GAAE,WAAW,EAAE;GAAE,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AACzD,UAAM,SAAS,OAAO,UAAU;KAC9B;KACA,QAAQ;MACN,GAAG,MAAM,SAAS,OAAO,QAAQ;OAChC,aAAa,KAAK,IAAI,GAAG,MAAM,SAAS,OAAO,QAAQ,OAAO,cAAc,EAAE;MAC/E,OAAO,KAAK,IAAI,GAAG,MAAM,SAAS,OAAO,QAAQ,OAAO,QAAQ,EAAE;MACnE;KACF;;;EAGN;CACF,CAAC;AAEF,MAAa,UAAU,aAAa;AACpC,IAAA,uBAAe,aAAa"}
|
|
@@ -1,202 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { PayloadAction } from '@reduxjs/toolkit';
|
|
4
|
-
import * as immer from 'immer';
|
|
5
|
-
import { SortCriteria, Device as Device$1, DeviceConfiguration, ConnectionState, MonitorConfiguration, Status, DeviceState, DeviceTierLimits } from '@northern.tech/types/MenderTypes';
|
|
6
|
-
import { DeviceIssueOptionKey, SortOptions, ALL_DEVICE_STATES } from '@northern.tech/utils/constants';
|
|
7
|
-
import { FilterOperator } from '../commonConstants.cjs';
|
|
8
|
-
import { DeviceAuthState } from './constants.cjs';
|
|
9
|
-
import { DeviceDeployment } from '../deploymentsSlice/index.cjs';
|
|
10
|
-
import 'react/jsx-runtime';
|
|
11
|
-
|
|
12
|
-
declare const sliceName = "devices";
|
|
13
|
-
type DeviceSelectedAttribute = {
|
|
14
|
-
attribute: string;
|
|
15
|
-
scope: string;
|
|
16
|
-
};
|
|
17
|
-
type DeviceListState = {
|
|
18
|
-
detailsTab: string;
|
|
19
|
-
deviceIds: string[];
|
|
20
|
-
isLoading: boolean;
|
|
21
|
-
open?: boolean;
|
|
22
|
-
page: number;
|
|
23
|
-
perPage: number;
|
|
24
|
-
refreshTrigger: boolean;
|
|
25
|
-
selectedAttributes: DeviceSelectedAttribute[];
|
|
26
|
-
selectedId?: string;
|
|
27
|
-
selectedIssues: DeviceIssueOptionKey[];
|
|
28
|
-
selection: number[];
|
|
29
|
-
setOnly?: boolean;
|
|
30
|
-
sort: SortOptions & Partial<SortCriteria>;
|
|
31
|
-
state?: DeviceAuthState | typeof ALL_DEVICE_STATES;
|
|
32
|
-
total: number;
|
|
33
|
-
};
|
|
34
|
-
type DeviceReport = {
|
|
35
|
-
items: {
|
|
36
|
-
count: number;
|
|
37
|
-
key: string;
|
|
38
|
-
}[];
|
|
39
|
-
otherCount: number;
|
|
40
|
-
total: number;
|
|
41
|
-
};
|
|
42
|
-
type DeviceGroup = {
|
|
43
|
-
deviceIds?: string[];
|
|
44
|
-
filters?: DeviceFilter[];
|
|
45
|
-
id?: string;
|
|
46
|
-
total?: number;
|
|
47
|
-
};
|
|
48
|
-
type InventoryAttributes = {
|
|
49
|
-
[key: string]: string | string[];
|
|
50
|
-
artifact_name: string;
|
|
51
|
-
device_type: string[];
|
|
52
|
-
};
|
|
53
|
-
type UiDeviceAttributes = {
|
|
54
|
-
attributes: InventoryAttributes;
|
|
55
|
-
identity?: Record<string, string>;
|
|
56
|
-
monitor?: Record<string, string>;
|
|
57
|
-
system: Record<string, string>;
|
|
58
|
-
tags?: Record<string, string>;
|
|
59
|
-
};
|
|
60
|
-
type Device = Device$1 & UiDeviceAttributes & {
|
|
61
|
-
check_in_time_exact?: string;
|
|
62
|
-
check_in_time_rounded?: string;
|
|
63
|
-
config?: DeviceConfiguration;
|
|
64
|
-
connect_status?: ConnectionState['status'];
|
|
65
|
-
connect_updated_ts?: string;
|
|
66
|
-
deploymentsCount?: number;
|
|
67
|
-
deviceDeployments?: DeviceDeployment;
|
|
68
|
-
etag?: string;
|
|
69
|
-
gatewayIds?: string[];
|
|
70
|
-
group?: string;
|
|
71
|
-
id: string;
|
|
72
|
-
isNew?: boolean;
|
|
73
|
-
isOffline?: boolean;
|
|
74
|
-
monitors?: MonitorConfiguration[];
|
|
75
|
-
status: Status;
|
|
76
|
-
twinsByIntegration?: Record<string, DeviceState & {
|
|
77
|
-
twinError?: string;
|
|
78
|
-
}>;
|
|
79
|
-
};
|
|
80
|
-
type DeviceFilter = {
|
|
81
|
-
key: string;
|
|
82
|
-
operator: FilterOperator;
|
|
83
|
-
scope: string;
|
|
84
|
-
value: string | string[];
|
|
85
|
-
};
|
|
86
|
-
type FilteringAttributes = {
|
|
87
|
-
identityAttributes: string[];
|
|
88
|
-
inventoryAttributes: string[];
|
|
89
|
-
systemAttributes: string[];
|
|
90
|
-
tagAttributes: string[];
|
|
91
|
-
};
|
|
92
|
-
type FilteringAttributesConfig = {
|
|
93
|
-
attributes: Record<string, string[]>;
|
|
94
|
-
count: number;
|
|
95
|
-
limit: number;
|
|
96
|
-
};
|
|
97
|
-
type DeviceGroups = {
|
|
98
|
-
byId: Record<string, DeviceGroup>;
|
|
99
|
-
selectedGroup?: string;
|
|
100
|
-
};
|
|
101
|
-
type DeviceSliceType = {
|
|
102
|
-
byId: Record<string, Device>;
|
|
103
|
-
byStatus: Record<DeviceAuthState, {
|
|
104
|
-
counts: DeviceTierLimits & {
|
|
105
|
-
total: number;
|
|
106
|
-
};
|
|
107
|
-
deviceIds: string[];
|
|
108
|
-
}>;
|
|
109
|
-
deviceList: DeviceListState;
|
|
110
|
-
filteringAttributes: FilteringAttributes;
|
|
111
|
-
filteringAttributesConfig: FilteringAttributesConfig;
|
|
112
|
-
filteringAttributesLimit: number;
|
|
113
|
-
filters: DeviceFilter[];
|
|
114
|
-
groups: DeviceGroups;
|
|
115
|
-
limits: DeviceTierLimits;
|
|
116
|
-
reports: DeviceReport[];
|
|
117
|
-
total: number;
|
|
118
|
-
};
|
|
119
|
-
declare const initialState: DeviceSliceType;
|
|
120
|
-
declare const devicesSlice: _reduxjs_toolkit.Slice<DeviceSliceType, {
|
|
121
|
-
receivedGroups: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<Record<string, DeviceGroup>>) => void;
|
|
122
|
-
addToGroup: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
123
|
-
deviceIds: string[];
|
|
124
|
-
group: string;
|
|
125
|
-
}>) => void;
|
|
126
|
-
removeFromGroup: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
127
|
-
deviceIds: string[];
|
|
128
|
-
group: string;
|
|
129
|
-
}>) => void;
|
|
130
|
-
addGroup: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
131
|
-
group: DeviceGroup;
|
|
132
|
-
groupName: string;
|
|
133
|
-
}>) => void;
|
|
134
|
-
selectGroup: (state: immer.WritableDraft<DeviceSliceType>, { payload: group }: PayloadAction<string | undefined>) => void;
|
|
135
|
-
removeGroup: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<string>) => void;
|
|
136
|
-
setDeviceListState: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<Partial<DeviceListState>>) => void;
|
|
137
|
-
setFilterAttributes: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<FilteringAttributes>) => void;
|
|
138
|
-
setFilterablesConfig: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<FilteringAttributesConfig>) => void;
|
|
139
|
-
receivedDevices: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<Record<string, Device>>) => void;
|
|
140
|
-
setDeviceFilters: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<DeviceFilter[]>) => void;
|
|
141
|
-
setDeviceReports: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<DeviceReport[]>) => void;
|
|
142
|
-
setDevicesByStatus: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
143
|
-
deviceIds: string[];
|
|
144
|
-
status: DeviceAuthState;
|
|
145
|
-
total: number;
|
|
146
|
-
}>) => void;
|
|
147
|
-
setDevicesCountByStatus: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
148
|
-
countsPerTier: DeviceTierLimits;
|
|
149
|
-
status: DeviceAuthState;
|
|
150
|
-
}>) => void;
|
|
151
|
-
setDeviceLimits: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<DeviceTierLimits>) => void;
|
|
152
|
-
receivedDevice: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
153
|
-
id: string;
|
|
154
|
-
} & Partial<Device>>) => void;
|
|
155
|
-
maybeUpdateDevicesByStatus: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
156
|
-
authId?: string;
|
|
157
|
-
deviceId: string;
|
|
158
|
-
}>) => void;
|
|
159
|
-
}, "devices", "devices", _reduxjs_toolkit.SliceSelectors<DeviceSliceType>>;
|
|
160
|
-
declare const actions: _reduxjs_toolkit.CaseReducerActions<{
|
|
161
|
-
receivedGroups: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<Record<string, DeviceGroup>>) => void;
|
|
162
|
-
addToGroup: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
163
|
-
deviceIds: string[];
|
|
164
|
-
group: string;
|
|
165
|
-
}>) => void;
|
|
166
|
-
removeFromGroup: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
167
|
-
deviceIds: string[];
|
|
168
|
-
group: string;
|
|
169
|
-
}>) => void;
|
|
170
|
-
addGroup: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
171
|
-
group: DeviceGroup;
|
|
172
|
-
groupName: string;
|
|
173
|
-
}>) => void;
|
|
174
|
-
selectGroup: (state: immer.WritableDraft<DeviceSliceType>, { payload: group }: PayloadAction<string | undefined>) => void;
|
|
175
|
-
removeGroup: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<string>) => void;
|
|
176
|
-
setDeviceListState: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<Partial<DeviceListState>>) => void;
|
|
177
|
-
setFilterAttributes: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<FilteringAttributes>) => void;
|
|
178
|
-
setFilterablesConfig: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<FilteringAttributesConfig>) => void;
|
|
179
|
-
receivedDevices: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<Record<string, Device>>) => void;
|
|
180
|
-
setDeviceFilters: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<DeviceFilter[]>) => void;
|
|
181
|
-
setDeviceReports: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<DeviceReport[]>) => void;
|
|
182
|
-
setDevicesByStatus: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
183
|
-
deviceIds: string[];
|
|
184
|
-
status: DeviceAuthState;
|
|
185
|
-
total: number;
|
|
186
|
-
}>) => void;
|
|
187
|
-
setDevicesCountByStatus: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
188
|
-
countsPerTier: DeviceTierLimits;
|
|
189
|
-
status: DeviceAuthState;
|
|
190
|
-
}>) => void;
|
|
191
|
-
setDeviceLimits: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<DeviceTierLimits>) => void;
|
|
192
|
-
receivedDevice: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
193
|
-
id: string;
|
|
194
|
-
} & Partial<Device>>) => void;
|
|
195
|
-
maybeUpdateDevicesByStatus: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
196
|
-
authId?: string;
|
|
197
|
-
deviceId: string;
|
|
198
|
-
}>) => void;
|
|
199
|
-
}, "devices">;
|
|
200
|
-
declare const _default: redux.Reducer<DeviceSliceType>;
|
|
201
|
-
|
|
202
|
-
export { type Device, type DeviceFilter, type DeviceGroup, type DeviceGroups, type DeviceListState, type DeviceSelectedAttribute, type DeviceSliceType, type InventoryAttributes, actions, _default as default, devicesSlice, initialState, sliceName };
|
|
1
|
+
import { a as DeviceListState, c as InventoryAttributes, d as devicesSlice, f as initialState, i as DeviceGroups, l as _default, n as DeviceFilter, o as DeviceSelectedAttribute, p as sliceName, r as DeviceGroup, s as DeviceSliceType, t as Device, u as actions } from "../index-Lz5JsJ6O.cjs";
|
|
2
|
+
export { Device, DeviceFilter, DeviceGroup, DeviceGroups, DeviceListState, DeviceSelectedAttribute, DeviceSliceType, InventoryAttributes, actions, _default as default, devicesSlice, initialState, sliceName };
|
|
@@ -1,202 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { PayloadAction } from '@reduxjs/toolkit';
|
|
4
|
-
import * as immer from 'immer';
|
|
5
|
-
import { SortCriteria, Device as Device$1, DeviceConfiguration, ConnectionState, MonitorConfiguration, Status, DeviceState, DeviceTierLimits } from '@northern.tech/types/MenderTypes';
|
|
6
|
-
import { DeviceIssueOptionKey, SortOptions, ALL_DEVICE_STATES } from '@northern.tech/utils/constants';
|
|
7
|
-
import { FilterOperator } from '../commonConstants.js';
|
|
8
|
-
import { DeviceAuthState } from './constants.js';
|
|
9
|
-
import { DeviceDeployment } from '../deploymentsSlice/index.js';
|
|
10
|
-
import 'react/jsx-runtime';
|
|
11
|
-
|
|
12
|
-
declare const sliceName = "devices";
|
|
13
|
-
type DeviceSelectedAttribute = {
|
|
14
|
-
attribute: string;
|
|
15
|
-
scope: string;
|
|
16
|
-
};
|
|
17
|
-
type DeviceListState = {
|
|
18
|
-
detailsTab: string;
|
|
19
|
-
deviceIds: string[];
|
|
20
|
-
isLoading: boolean;
|
|
21
|
-
open?: boolean;
|
|
22
|
-
page: number;
|
|
23
|
-
perPage: number;
|
|
24
|
-
refreshTrigger: boolean;
|
|
25
|
-
selectedAttributes: DeviceSelectedAttribute[];
|
|
26
|
-
selectedId?: string;
|
|
27
|
-
selectedIssues: DeviceIssueOptionKey[];
|
|
28
|
-
selection: number[];
|
|
29
|
-
setOnly?: boolean;
|
|
30
|
-
sort: SortOptions & Partial<SortCriteria>;
|
|
31
|
-
state?: DeviceAuthState | typeof ALL_DEVICE_STATES;
|
|
32
|
-
total: number;
|
|
33
|
-
};
|
|
34
|
-
type DeviceReport = {
|
|
35
|
-
items: {
|
|
36
|
-
count: number;
|
|
37
|
-
key: string;
|
|
38
|
-
}[];
|
|
39
|
-
otherCount: number;
|
|
40
|
-
total: number;
|
|
41
|
-
};
|
|
42
|
-
type DeviceGroup = {
|
|
43
|
-
deviceIds?: string[];
|
|
44
|
-
filters?: DeviceFilter[];
|
|
45
|
-
id?: string;
|
|
46
|
-
total?: number;
|
|
47
|
-
};
|
|
48
|
-
type InventoryAttributes = {
|
|
49
|
-
[key: string]: string | string[];
|
|
50
|
-
artifact_name: string;
|
|
51
|
-
device_type: string[];
|
|
52
|
-
};
|
|
53
|
-
type UiDeviceAttributes = {
|
|
54
|
-
attributes: InventoryAttributes;
|
|
55
|
-
identity?: Record<string, string>;
|
|
56
|
-
monitor?: Record<string, string>;
|
|
57
|
-
system: Record<string, string>;
|
|
58
|
-
tags?: Record<string, string>;
|
|
59
|
-
};
|
|
60
|
-
type Device = Device$1 & UiDeviceAttributes & {
|
|
61
|
-
check_in_time_exact?: string;
|
|
62
|
-
check_in_time_rounded?: string;
|
|
63
|
-
config?: DeviceConfiguration;
|
|
64
|
-
connect_status?: ConnectionState['status'];
|
|
65
|
-
connect_updated_ts?: string;
|
|
66
|
-
deploymentsCount?: number;
|
|
67
|
-
deviceDeployments?: DeviceDeployment;
|
|
68
|
-
etag?: string;
|
|
69
|
-
gatewayIds?: string[];
|
|
70
|
-
group?: string;
|
|
71
|
-
id: string;
|
|
72
|
-
isNew?: boolean;
|
|
73
|
-
isOffline?: boolean;
|
|
74
|
-
monitors?: MonitorConfiguration[];
|
|
75
|
-
status: Status;
|
|
76
|
-
twinsByIntegration?: Record<string, DeviceState & {
|
|
77
|
-
twinError?: string;
|
|
78
|
-
}>;
|
|
79
|
-
};
|
|
80
|
-
type DeviceFilter = {
|
|
81
|
-
key: string;
|
|
82
|
-
operator: FilterOperator;
|
|
83
|
-
scope: string;
|
|
84
|
-
value: string | string[];
|
|
85
|
-
};
|
|
86
|
-
type FilteringAttributes = {
|
|
87
|
-
identityAttributes: string[];
|
|
88
|
-
inventoryAttributes: string[];
|
|
89
|
-
systemAttributes: string[];
|
|
90
|
-
tagAttributes: string[];
|
|
91
|
-
};
|
|
92
|
-
type FilteringAttributesConfig = {
|
|
93
|
-
attributes: Record<string, string[]>;
|
|
94
|
-
count: number;
|
|
95
|
-
limit: number;
|
|
96
|
-
};
|
|
97
|
-
type DeviceGroups = {
|
|
98
|
-
byId: Record<string, DeviceGroup>;
|
|
99
|
-
selectedGroup?: string;
|
|
100
|
-
};
|
|
101
|
-
type DeviceSliceType = {
|
|
102
|
-
byId: Record<string, Device>;
|
|
103
|
-
byStatus: Record<DeviceAuthState, {
|
|
104
|
-
counts: DeviceTierLimits & {
|
|
105
|
-
total: number;
|
|
106
|
-
};
|
|
107
|
-
deviceIds: string[];
|
|
108
|
-
}>;
|
|
109
|
-
deviceList: DeviceListState;
|
|
110
|
-
filteringAttributes: FilteringAttributes;
|
|
111
|
-
filteringAttributesConfig: FilteringAttributesConfig;
|
|
112
|
-
filteringAttributesLimit: number;
|
|
113
|
-
filters: DeviceFilter[];
|
|
114
|
-
groups: DeviceGroups;
|
|
115
|
-
limits: DeviceTierLimits;
|
|
116
|
-
reports: DeviceReport[];
|
|
117
|
-
total: number;
|
|
118
|
-
};
|
|
119
|
-
declare const initialState: DeviceSliceType;
|
|
120
|
-
declare const devicesSlice: _reduxjs_toolkit.Slice<DeviceSliceType, {
|
|
121
|
-
receivedGroups: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<Record<string, DeviceGroup>>) => void;
|
|
122
|
-
addToGroup: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
123
|
-
deviceIds: string[];
|
|
124
|
-
group: string;
|
|
125
|
-
}>) => void;
|
|
126
|
-
removeFromGroup: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
127
|
-
deviceIds: string[];
|
|
128
|
-
group: string;
|
|
129
|
-
}>) => void;
|
|
130
|
-
addGroup: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
131
|
-
group: DeviceGroup;
|
|
132
|
-
groupName: string;
|
|
133
|
-
}>) => void;
|
|
134
|
-
selectGroup: (state: immer.WritableDraft<DeviceSliceType>, { payload: group }: PayloadAction<string | undefined>) => void;
|
|
135
|
-
removeGroup: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<string>) => void;
|
|
136
|
-
setDeviceListState: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<Partial<DeviceListState>>) => void;
|
|
137
|
-
setFilterAttributes: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<FilteringAttributes>) => void;
|
|
138
|
-
setFilterablesConfig: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<FilteringAttributesConfig>) => void;
|
|
139
|
-
receivedDevices: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<Record<string, Device>>) => void;
|
|
140
|
-
setDeviceFilters: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<DeviceFilter[]>) => void;
|
|
141
|
-
setDeviceReports: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<DeviceReport[]>) => void;
|
|
142
|
-
setDevicesByStatus: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
143
|
-
deviceIds: string[];
|
|
144
|
-
status: DeviceAuthState;
|
|
145
|
-
total: number;
|
|
146
|
-
}>) => void;
|
|
147
|
-
setDevicesCountByStatus: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
148
|
-
countsPerTier: DeviceTierLimits;
|
|
149
|
-
status: DeviceAuthState;
|
|
150
|
-
}>) => void;
|
|
151
|
-
setDeviceLimits: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<DeviceTierLimits>) => void;
|
|
152
|
-
receivedDevice: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
153
|
-
id: string;
|
|
154
|
-
} & Partial<Device>>) => void;
|
|
155
|
-
maybeUpdateDevicesByStatus: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
156
|
-
authId?: string;
|
|
157
|
-
deviceId: string;
|
|
158
|
-
}>) => void;
|
|
159
|
-
}, "devices", "devices", _reduxjs_toolkit.SliceSelectors<DeviceSliceType>>;
|
|
160
|
-
declare const actions: _reduxjs_toolkit.CaseReducerActions<{
|
|
161
|
-
receivedGroups: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<Record<string, DeviceGroup>>) => void;
|
|
162
|
-
addToGroup: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
163
|
-
deviceIds: string[];
|
|
164
|
-
group: string;
|
|
165
|
-
}>) => void;
|
|
166
|
-
removeFromGroup: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
167
|
-
deviceIds: string[];
|
|
168
|
-
group: string;
|
|
169
|
-
}>) => void;
|
|
170
|
-
addGroup: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
171
|
-
group: DeviceGroup;
|
|
172
|
-
groupName: string;
|
|
173
|
-
}>) => void;
|
|
174
|
-
selectGroup: (state: immer.WritableDraft<DeviceSliceType>, { payload: group }: PayloadAction<string | undefined>) => void;
|
|
175
|
-
removeGroup: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<string>) => void;
|
|
176
|
-
setDeviceListState: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<Partial<DeviceListState>>) => void;
|
|
177
|
-
setFilterAttributes: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<FilteringAttributes>) => void;
|
|
178
|
-
setFilterablesConfig: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<FilteringAttributesConfig>) => void;
|
|
179
|
-
receivedDevices: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<Record<string, Device>>) => void;
|
|
180
|
-
setDeviceFilters: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<DeviceFilter[]>) => void;
|
|
181
|
-
setDeviceReports: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<DeviceReport[]>) => void;
|
|
182
|
-
setDevicesByStatus: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
183
|
-
deviceIds: string[];
|
|
184
|
-
status: DeviceAuthState;
|
|
185
|
-
total: number;
|
|
186
|
-
}>) => void;
|
|
187
|
-
setDevicesCountByStatus: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
188
|
-
countsPerTier: DeviceTierLimits;
|
|
189
|
-
status: DeviceAuthState;
|
|
190
|
-
}>) => void;
|
|
191
|
-
setDeviceLimits: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<DeviceTierLimits>) => void;
|
|
192
|
-
receivedDevice: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
193
|
-
id: string;
|
|
194
|
-
} & Partial<Device>>) => void;
|
|
195
|
-
maybeUpdateDevicesByStatus: (state: immer.WritableDraft<DeviceSliceType>, action: PayloadAction<{
|
|
196
|
-
authId?: string;
|
|
197
|
-
deviceId: string;
|
|
198
|
-
}>) => void;
|
|
199
|
-
}, "devices">;
|
|
200
|
-
declare const _default: redux.Reducer<DeviceSliceType>;
|
|
201
|
-
|
|
202
|
-
export { type Device, type DeviceFilter, type DeviceGroup, type DeviceGroups, type DeviceListState, type DeviceSelectedAttribute, type DeviceSliceType, type InventoryAttributes, actions, _default as default, devicesSlice, initialState, sliceName };
|
|
1
|
+
import { a as DeviceListState, c as InventoryAttributes, d as devicesSlice, f as initialState, i as DeviceGroups, l as _default, n as DeviceFilter, o as DeviceSelectedAttribute, p as sliceName, r as DeviceGroup, s as DeviceSliceType, t as Device, u as actions } from "../index-DqyY6oZ3.js";
|
|
2
|
+
export { Device, DeviceFilter, DeviceGroup, DeviceGroups, DeviceListState, DeviceSelectedAttribute, DeviceSliceType, InventoryAttributes, actions, _default as default, devicesSlice, initialState, sliceName };
|