@northern.tech/store 0.23.0 → 0.24.1
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.js +10 -10
- package/dist/api/general-api.cjs.map +1 -1
- package/dist/api/general-api.js +4 -4
- package/dist/api/users-api.cjs.map +1 -1
- package/dist/api/users-api.js +5 -5
- package/dist/appSlice/index.js +3 -3
- package/dist/appSlice/mocks.js +3 -3
- package/dist/appSlice/thunks.cjs +37 -0
- package/dist/appSlice/thunks.cjs.map +1 -1
- package/dist/appSlice/thunks.js +26 -26
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.js +3 -3
- package/dist/{chunk-ZGRY42BZ.js → chunk-2AGBXDGF.js} +2 -2
- package/dist/{chunk-XJLZK4QY.js → chunk-3IXBQAMO.js} +3 -3
- package/dist/{chunk-YR65C62H.js → chunk-4NG7EGAG.js} +2 -2
- package/dist/{chunk-IRQRV552.js → chunk-6NLGT2LD.js} +3 -3
- package/dist/{chunk-WWED74SG.js → chunk-AERWBWRM.js} +3 -1
- package/dist/{chunk-WWED74SG.js.map → chunk-AERWBWRM.js.map} +1 -1
- package/dist/{chunk-WR6RQKF5.js → chunk-CXRORJR5.js} +2 -2
- package/dist/{chunk-SVSHXLCN.js → chunk-DOT4GDYO.js} +14 -14
- package/dist/{chunk-PL6RIFD5.js → chunk-E2X525PA.js} +2 -2
- package/dist/{chunk-AROYP5V5.js → chunk-E7PTHNNO.js} +18 -18
- package/dist/{chunk-FQ6CCYUU.js → chunk-EZRW3IQG.js} +17 -17
- package/dist/{chunk-OLKM53RL.js → chunk-F2ADELYA.js} +2 -2
- package/dist/{chunk-VODRLEDP.js → chunk-GLIQTGWN.js} +2 -2
- package/dist/{chunk-4ZYLGBJU.js → chunk-IDKMS5RA.js} +3 -3
- package/dist/{chunk-TIL2S3JA.js → chunk-IJ6KKUA2.js} +2 -2
- package/dist/{chunk-DYUOBPAI.js → chunk-JKLFEHCF.js} +2 -2
- package/dist/{chunk-TRKA7XYU.js → chunk-NRHTBY6E.js} +2 -2
- package/dist/{chunk-PVCHKW35.js → chunk-NYDBCHD7.js} +2 -2
- package/dist/{chunk-DDY7IFSE.js → chunk-PKPTJ6XM.js} +10 -10
- package/dist/{chunk-7WIISD2N.js → chunk-S7XYEGLR.js} +10 -3
- package/dist/{chunk-7WIISD2N.js.map → chunk-S7XYEGLR.js.map} +1 -1
- package/dist/{chunk-73JXR6WS.js → chunk-T2BICNAM.js} +9 -9
- package/dist/{chunk-UVTLZV34.js → chunk-WKXBJVZ7.js} +2 -2
- package/dist/{chunk-ML5CUAQD.js → chunk-X4TGUR22.js} +2 -2
- package/dist/{chunk-ZZQJWNQT.js → chunk-X6AM6P6X.js} +43 -4
- package/dist/chunk-X6AM6P6X.js.map +1 -0
- package/dist/{chunk-Y54UJUE4.js → chunk-XAAJ4NVG.js} +42 -39
- package/dist/chunk-XAAJ4NVG.js.map +1 -0
- package/dist/commonConstants.cjs +3 -0
- package/dist/commonConstants.cjs.map +1 -1
- package/dist/commonConstants.d.cts +2 -1
- package/dist/commonConstants.d.ts +2 -1
- package/dist/commonConstants.js +4 -2
- package/dist/commonSelectors.cjs +37 -0
- package/dist/commonSelectors.cjs.map +1 -1
- package/dist/commonSelectors.js +10 -10
- package/dist/constants.cjs +3 -0
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +4 -2
- package/dist/deploymentsSlice/constants.js +2 -2
- package/dist/deploymentsSlice/index.js +3 -3
- package/dist/deploymentsSlice/mocks.js +3 -3
- package/dist/deploymentsSlice/selectors.js +3 -3
- package/dist/deploymentsSlice/thunks.cjs +37 -0
- package/dist/deploymentsSlice/thunks.cjs.map +1 -1
- package/dist/deploymentsSlice/thunks.js +26 -26
- package/dist/devicesSlice/constants.js +2 -2
- package/dist/devicesSlice/index.js +3 -3
- package/dist/devicesSlice/mocks.js +3 -3
- package/dist/devicesSlice/selectors.cjs.map +1 -1
- package/dist/devicesSlice/selectors.js +3 -3
- package/dist/devicesSlice/thunks.cjs +37 -0
- package/dist/devicesSlice/thunks.cjs.map +1 -1
- package/dist/devicesSlice/thunks.js +26 -26
- package/dist/liststatehook.cjs.map +1 -1
- package/dist/liststatehook.js +3 -3
- package/dist/locationutils.cjs.map +1 -1
- package/dist/locationutils.js +3 -3
- package/dist/monitorSlice/index.js +3 -3
- package/dist/monitorSlice/mocks.js +3 -3
- package/dist/monitorSlice/thunks.cjs +37 -0
- package/dist/monitorSlice/thunks.cjs.map +1 -1
- package/dist/monitorSlice/thunks.js +22 -22
- package/dist/onboardingSlice/thunks.cjs +37 -0
- package/dist/onboardingSlice/thunks.cjs.map +1 -1
- package/dist/onboardingSlice/thunks.js +26 -26
- package/dist/organizationSlice/constants.js +2 -2
- package/dist/organizationSlice/index.js +3 -3
- package/dist/organizationSlice/mocks.js +3 -3
- package/dist/organizationSlice/selectors.cjs +42 -0
- package/dist/organizationSlice/selectors.cjs.map +1 -1
- package/dist/organizationSlice/selectors.d.cts +287 -3
- package/dist/organizationSlice/selectors.d.ts +287 -3
- package/dist/organizationSlice/selectors.js +9 -3
- package/dist/organizationSlice/thunks.cjs +53 -10
- package/dist/organizationSlice/thunks.cjs.map +1 -1
- package/dist/organizationSlice/thunks.d.cts +8 -8
- package/dist/organizationSlice/thunks.d.ts +8 -8
- package/dist/organizationSlice/thunks.js +28 -28
- package/dist/releasesSlice/index.js +3 -3
- package/dist/releasesSlice/mocks.js +3 -3
- package/dist/releasesSlice/selectors.cjs.map +1 -1
- package/dist/releasesSlice/selectors.js +4 -4
- package/dist/releasesSlice/thunks.cjs +37 -0
- package/dist/releasesSlice/thunks.cjs.map +1 -1
- package/dist/releasesSlice/thunks.js +23 -23
- package/dist/selectors.cjs +42 -0
- package/dist/selectors.cjs.map +1 -1
- package/dist/selectors.d.cts +1 -1
- package/dist/selectors.d.ts +1 -1
- package/dist/selectors.js +57 -51
- package/dist/sockethook.cjs.map +1 -1
- package/dist/sockethook.js +2 -2
- package/dist/store.js +12 -12
- package/dist/storehooks.cjs +51 -8
- package/dist/storehooks.cjs.map +1 -1
- package/dist/storehooks.js +28 -28
- package/dist/thunks.cjs +53 -10
- package/dist/thunks.cjs.map +1 -1
- package/dist/thunks.d.cts +1 -1
- package/dist/thunks.d.ts +1 -1
- package/dist/thunks.js +34 -34
- package/dist/useDeploymentDevice.cjs +37 -0
- package/dist/useDeploymentDevice.cjs.map +1 -1
- package/dist/useDeploymentDevice.js +26 -26
- package/dist/usersSlice/constants.js +2 -2
- package/dist/usersSlice/index.js +3 -3
- package/dist/usersSlice/mocks.js +3 -3
- package/dist/usersSlice/selectors.cjs.map +1 -1
- package/dist/usersSlice/selectors.js +4 -4
- package/dist/usersSlice/thunks.cjs +37 -0
- package/dist/usersSlice/thunks.cjs.map +1 -1
- package/dist/usersSlice/thunks.js +26 -26
- package/dist/utils.cjs +8 -0
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +2 -1
- package/dist/utils.d.ts +2 -1
- package/dist/utils.js +5 -3
- package/package.json +1 -1
- package/dist/chunk-Y54UJUE4.js.map +0 -1
- package/dist/chunk-ZZQJWNQT.js.map +0 -1
- /package/dist/{chunk-ZGRY42BZ.js.map → chunk-2AGBXDGF.js.map} +0 -0
- /package/dist/{chunk-XJLZK4QY.js.map → chunk-3IXBQAMO.js.map} +0 -0
- /package/dist/{chunk-YR65C62H.js.map → chunk-4NG7EGAG.js.map} +0 -0
- /package/dist/{chunk-IRQRV552.js.map → chunk-6NLGT2LD.js.map} +0 -0
- /package/dist/{chunk-WR6RQKF5.js.map → chunk-CXRORJR5.js.map} +0 -0
- /package/dist/{chunk-SVSHXLCN.js.map → chunk-DOT4GDYO.js.map} +0 -0
- /package/dist/{chunk-PL6RIFD5.js.map → chunk-E2X525PA.js.map} +0 -0
- /package/dist/{chunk-AROYP5V5.js.map → chunk-E7PTHNNO.js.map} +0 -0
- /package/dist/{chunk-FQ6CCYUU.js.map → chunk-EZRW3IQG.js.map} +0 -0
- /package/dist/{chunk-OLKM53RL.js.map → chunk-F2ADELYA.js.map} +0 -0
- /package/dist/{chunk-VODRLEDP.js.map → chunk-GLIQTGWN.js.map} +0 -0
- /package/dist/{chunk-4ZYLGBJU.js.map → chunk-IDKMS5RA.js.map} +0 -0
- /package/dist/{chunk-TIL2S3JA.js.map → chunk-IJ6KKUA2.js.map} +0 -0
- /package/dist/{chunk-DYUOBPAI.js.map → chunk-JKLFEHCF.js.map} +0 -0
- /package/dist/{chunk-TRKA7XYU.js.map → chunk-NRHTBY6E.js.map} +0 -0
- /package/dist/{chunk-PVCHKW35.js.map → chunk-NYDBCHD7.js.map} +0 -0
- /package/dist/{chunk-DDY7IFSE.js.map → chunk-PKPTJ6XM.js.map} +0 -0
- /package/dist/{chunk-73JXR6WS.js.map → chunk-T2BICNAM.js.map} +0 -0
- /package/dist/{chunk-UVTLZV34.js.map → chunk-WKXBJVZ7.js.map} +0 -0
- /package/dist/{chunk-ML5CUAQD.js.map → chunk-X4TGUR22.js.map} +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as _northern_tech_utils_constants from '@northern.tech/utils/constants';
|
|
1
2
|
import * as reselect from 'reselect';
|
|
2
3
|
import { UserSliceType } from '../usersSlice/index.js';
|
|
3
4
|
import { ReleaseSliceType } from '../releasesSlice/index.js';
|
|
@@ -8,13 +9,12 @@ import { DeploymentsSliceType } from '../deploymentsSlice/index.js';
|
|
|
8
9
|
import { DeviceSliceType } from '../devicesSlice/index.js';
|
|
9
10
|
import { AppSliceType } from '../appSlice/index.js';
|
|
10
11
|
import * as _northern_tech_types_types_gen from '@northern.tech/types/types.gen';
|
|
11
|
-
import { AuditLogSelectionState, Card, Organization, ProductConfig, SSOConfig, TenantList } from './types.js';
|
|
12
|
+
import { AuditLogSelectionState, Card, Organization, ProductConfig, SSOConfig, Tenant, TenantList } from './types.js';
|
|
12
13
|
import { RootState } from '../store.js';
|
|
13
14
|
import 'redux';
|
|
14
15
|
import '@reduxjs/toolkit';
|
|
15
16
|
import 'immer';
|
|
16
17
|
import '@northern.tech/types/MenderTypes';
|
|
17
|
-
import '@northern.tech/utils/constants';
|
|
18
18
|
import '../commonConstants.js';
|
|
19
19
|
import 'react/jsx-runtime';
|
|
20
20
|
import '../usersSlice/constants.js';
|
|
@@ -201,5 +201,289 @@ declare const getAuditLogEntry: ((state: {
|
|
|
201
201
|
memoize: typeof reselect.weakMapMemoize;
|
|
202
202
|
argsMemoize: typeof reselect.weakMapMemoize;
|
|
203
203
|
};
|
|
204
|
+
declare const getDisabledTiers: ((state: {
|
|
205
|
+
app: AppSliceType;
|
|
206
|
+
devices: DeviceSliceType;
|
|
207
|
+
deployments: DeploymentsSliceType;
|
|
208
|
+
monitor: MonitorSliceType;
|
|
209
|
+
onboarding: OnboardingSliceType;
|
|
210
|
+
organization: OrganizationSliceType;
|
|
211
|
+
releases: ReleaseSliceType;
|
|
212
|
+
users: UserSliceType;
|
|
213
|
+
}) => string[]) & {
|
|
214
|
+
clearCache: () => void;
|
|
215
|
+
resultsCount: () => number;
|
|
216
|
+
resetResultsCount: () => void;
|
|
217
|
+
} & {
|
|
218
|
+
resultFunc: (resultFuncArgs_0: {
|
|
219
|
+
disabled: string[];
|
|
220
|
+
limits: Record<string, object>;
|
|
221
|
+
}) => string[];
|
|
222
|
+
memoizedResultFunc: ((resultFuncArgs_0: {
|
|
223
|
+
disabled: string[];
|
|
224
|
+
limits: Record<string, object>;
|
|
225
|
+
}) => string[]) & {
|
|
226
|
+
clearCache: () => void;
|
|
227
|
+
resultsCount: () => number;
|
|
228
|
+
resetResultsCount: () => void;
|
|
229
|
+
};
|
|
230
|
+
lastResult: () => string[];
|
|
231
|
+
dependencies: [((state: {
|
|
232
|
+
app: AppSliceType;
|
|
233
|
+
devices: DeviceSliceType;
|
|
234
|
+
deployments: DeploymentsSliceType;
|
|
235
|
+
monitor: MonitorSliceType;
|
|
236
|
+
onboarding: OnboardingSliceType;
|
|
237
|
+
organization: OrganizationSliceType;
|
|
238
|
+
releases: ReleaseSliceType;
|
|
239
|
+
users: UserSliceType;
|
|
240
|
+
}) => {
|
|
241
|
+
disabled: string[];
|
|
242
|
+
limits: Record<string, object>;
|
|
243
|
+
}) & {
|
|
244
|
+
clearCache: () => void;
|
|
245
|
+
resultsCount: () => number;
|
|
246
|
+
resetResultsCount: () => void;
|
|
247
|
+
} & {
|
|
248
|
+
resultFunc: (resultFuncArgs_0: Partial<Organization>) => {
|
|
249
|
+
disabled: string[];
|
|
250
|
+
limits: Record<string, object>;
|
|
251
|
+
};
|
|
252
|
+
memoizedResultFunc: ((resultFuncArgs_0: Partial<Organization>) => {
|
|
253
|
+
disabled: string[];
|
|
254
|
+
limits: Record<string, object>;
|
|
255
|
+
}) & {
|
|
256
|
+
clearCache: () => void;
|
|
257
|
+
resultsCount: () => number;
|
|
258
|
+
resetResultsCount: () => void;
|
|
259
|
+
};
|
|
260
|
+
lastResult: () => {
|
|
261
|
+
disabled: string[];
|
|
262
|
+
limits: Record<string, object>;
|
|
263
|
+
};
|
|
264
|
+
dependencies: [(state: RootState) => Partial<Organization>];
|
|
265
|
+
recomputations: () => number;
|
|
266
|
+
resetRecomputations: () => void;
|
|
267
|
+
dependencyRecomputations: () => number;
|
|
268
|
+
resetDependencyRecomputations: () => void;
|
|
269
|
+
} & {
|
|
270
|
+
memoize: typeof reselect.weakMapMemoize;
|
|
271
|
+
argsMemoize: typeof reselect.weakMapMemoize;
|
|
272
|
+
}];
|
|
273
|
+
recomputations: () => number;
|
|
274
|
+
resetRecomputations: () => void;
|
|
275
|
+
dependencyRecomputations: () => number;
|
|
276
|
+
resetDependencyRecomputations: () => void;
|
|
277
|
+
} & {
|
|
278
|
+
memoize: typeof reselect.weakMapMemoize;
|
|
279
|
+
argsMemoize: typeof reselect.weakMapMemoize;
|
|
280
|
+
};
|
|
281
|
+
declare const getSpLimits: ((state: {
|
|
282
|
+
app: AppSliceType;
|
|
283
|
+
devices: DeviceSliceType;
|
|
284
|
+
deployments: DeploymentsSliceType;
|
|
285
|
+
monitor: MonitorSliceType;
|
|
286
|
+
onboarding: OnboardingSliceType;
|
|
287
|
+
organization: OrganizationSliceType;
|
|
288
|
+
releases: ReleaseSliceType;
|
|
289
|
+
users: UserSliceType;
|
|
290
|
+
}) => Record<string, object>) & {
|
|
291
|
+
clearCache: () => void;
|
|
292
|
+
resultsCount: () => number;
|
|
293
|
+
resetResultsCount: () => void;
|
|
294
|
+
} & {
|
|
295
|
+
resultFunc: (resultFuncArgs_0: {
|
|
296
|
+
disabled: string[];
|
|
297
|
+
limits: Record<string, object>;
|
|
298
|
+
}) => Record<string, object>;
|
|
299
|
+
memoizedResultFunc: ((resultFuncArgs_0: {
|
|
300
|
+
disabled: string[];
|
|
301
|
+
limits: Record<string, object>;
|
|
302
|
+
}) => Record<string, object>) & {
|
|
303
|
+
clearCache: () => void;
|
|
304
|
+
resultsCount: () => number;
|
|
305
|
+
resetResultsCount: () => void;
|
|
306
|
+
};
|
|
307
|
+
lastResult: () => Record<string, object>;
|
|
308
|
+
dependencies: [((state: {
|
|
309
|
+
app: AppSliceType;
|
|
310
|
+
devices: DeviceSliceType;
|
|
311
|
+
deployments: DeploymentsSliceType;
|
|
312
|
+
monitor: MonitorSliceType;
|
|
313
|
+
onboarding: OnboardingSliceType;
|
|
314
|
+
organization: OrganizationSliceType;
|
|
315
|
+
releases: ReleaseSliceType;
|
|
316
|
+
users: UserSliceType;
|
|
317
|
+
}) => {
|
|
318
|
+
disabled: string[];
|
|
319
|
+
limits: Record<string, object>;
|
|
320
|
+
}) & {
|
|
321
|
+
clearCache: () => void;
|
|
322
|
+
resultsCount: () => number;
|
|
323
|
+
resetResultsCount: () => void;
|
|
324
|
+
} & {
|
|
325
|
+
resultFunc: (resultFuncArgs_0: Partial<Organization>) => {
|
|
326
|
+
disabled: string[];
|
|
327
|
+
limits: Record<string, object>;
|
|
328
|
+
};
|
|
329
|
+
memoizedResultFunc: ((resultFuncArgs_0: Partial<Organization>) => {
|
|
330
|
+
disabled: string[];
|
|
331
|
+
limits: Record<string, object>;
|
|
332
|
+
}) & {
|
|
333
|
+
clearCache: () => void;
|
|
334
|
+
resultsCount: () => number;
|
|
335
|
+
resetResultsCount: () => void;
|
|
336
|
+
};
|
|
337
|
+
lastResult: () => {
|
|
338
|
+
disabled: string[];
|
|
339
|
+
limits: Record<string, object>;
|
|
340
|
+
};
|
|
341
|
+
dependencies: [(state: RootState) => Partial<Organization>];
|
|
342
|
+
recomputations: () => number;
|
|
343
|
+
resetRecomputations: () => void;
|
|
344
|
+
dependencyRecomputations: () => number;
|
|
345
|
+
resetDependencyRecomputations: () => void;
|
|
346
|
+
} & {
|
|
347
|
+
memoize: typeof reselect.weakMapMemoize;
|
|
348
|
+
argsMemoize: typeof reselect.weakMapMemoize;
|
|
349
|
+
}];
|
|
350
|
+
recomputations: () => number;
|
|
351
|
+
resetRecomputations: () => void;
|
|
352
|
+
dependencyRecomputations: () => number;
|
|
353
|
+
resetDependencyRecomputations: () => void;
|
|
354
|
+
} & {
|
|
355
|
+
memoize: typeof reselect.weakMapMemoize;
|
|
356
|
+
argsMemoize: typeof reselect.weakMapMemoize;
|
|
357
|
+
};
|
|
358
|
+
declare const getTenantListWithLimits: ((state: {
|
|
359
|
+
app: AppSliceType;
|
|
360
|
+
devices: DeviceSliceType;
|
|
361
|
+
deployments: DeploymentsSliceType;
|
|
362
|
+
monitor: MonitorSliceType;
|
|
363
|
+
onboarding: OnboardingSliceType;
|
|
364
|
+
organization: OrganizationSliceType;
|
|
365
|
+
releases: ReleaseSliceType;
|
|
366
|
+
users: UserSliceType;
|
|
367
|
+
}) => {
|
|
368
|
+
tenants: {
|
|
369
|
+
device_limits: Record<string, object>;
|
|
370
|
+
id: string;
|
|
371
|
+
name: string;
|
|
372
|
+
tenant_token: string;
|
|
373
|
+
status?: "active" | "suspended";
|
|
374
|
+
plan?: "os" | "enterprise" | "professional";
|
|
375
|
+
trial?: boolean;
|
|
376
|
+
trial_expiration?: string;
|
|
377
|
+
addons?: Array<_northern_tech_types_types_gen.Addon>;
|
|
378
|
+
service_provider?: boolean;
|
|
379
|
+
parent_tenant_id?: string;
|
|
380
|
+
additional_info?: _northern_tech_types_types_gen.TenantAdditionalInfo;
|
|
381
|
+
api_limits?: _northern_tech_types_types_gen.TenantApiLimits;
|
|
382
|
+
created_at?: string;
|
|
383
|
+
updated_at?: string;
|
|
384
|
+
device_count?: number;
|
|
385
|
+
device_limit?: number;
|
|
386
|
+
}[];
|
|
387
|
+
page: number;
|
|
388
|
+
perPage: number;
|
|
389
|
+
selectedTenant: Tenant | null;
|
|
390
|
+
sort: _northern_tech_utils_constants.SortOptions;
|
|
391
|
+
total: number;
|
|
392
|
+
}) & {
|
|
393
|
+
clearCache: () => void;
|
|
394
|
+
resultsCount: () => number;
|
|
395
|
+
resetResultsCount: () => void;
|
|
396
|
+
} & {
|
|
397
|
+
resultFunc: (resultFuncArgs_0: TenantList) => {
|
|
398
|
+
tenants: {
|
|
399
|
+
device_limits: Record<string, object>;
|
|
400
|
+
id: string;
|
|
401
|
+
name: string;
|
|
402
|
+
tenant_token: string;
|
|
403
|
+
status?: "active" | "suspended";
|
|
404
|
+
plan?: "os" | "enterprise" | "professional";
|
|
405
|
+
trial?: boolean;
|
|
406
|
+
trial_expiration?: string;
|
|
407
|
+
addons?: Array<_northern_tech_types_types_gen.Addon>;
|
|
408
|
+
service_provider?: boolean;
|
|
409
|
+
parent_tenant_id?: string;
|
|
410
|
+
additional_info?: _northern_tech_types_types_gen.TenantAdditionalInfo;
|
|
411
|
+
api_limits?: _northern_tech_types_types_gen.TenantApiLimits;
|
|
412
|
+
created_at?: string;
|
|
413
|
+
updated_at?: string;
|
|
414
|
+
device_count?: number;
|
|
415
|
+
device_limit?: number;
|
|
416
|
+
}[];
|
|
417
|
+
page: number;
|
|
418
|
+
perPage: number;
|
|
419
|
+
selectedTenant: Tenant | null;
|
|
420
|
+
sort: _northern_tech_utils_constants.SortOptions;
|
|
421
|
+
total: number;
|
|
422
|
+
};
|
|
423
|
+
memoizedResultFunc: ((resultFuncArgs_0: TenantList) => {
|
|
424
|
+
tenants: {
|
|
425
|
+
device_limits: Record<string, object>;
|
|
426
|
+
id: string;
|
|
427
|
+
name: string;
|
|
428
|
+
tenant_token: string;
|
|
429
|
+
status?: "active" | "suspended";
|
|
430
|
+
plan?: "os" | "enterprise" | "professional";
|
|
431
|
+
trial?: boolean;
|
|
432
|
+
trial_expiration?: string;
|
|
433
|
+
addons?: Array<_northern_tech_types_types_gen.Addon>;
|
|
434
|
+
service_provider?: boolean;
|
|
435
|
+
parent_tenant_id?: string;
|
|
436
|
+
additional_info?: _northern_tech_types_types_gen.TenantAdditionalInfo;
|
|
437
|
+
api_limits?: _northern_tech_types_types_gen.TenantApiLimits;
|
|
438
|
+
created_at?: string;
|
|
439
|
+
updated_at?: string;
|
|
440
|
+
device_count?: number;
|
|
441
|
+
device_limit?: number;
|
|
442
|
+
}[];
|
|
443
|
+
page: number;
|
|
444
|
+
perPage: number;
|
|
445
|
+
selectedTenant: Tenant | null;
|
|
446
|
+
sort: _northern_tech_utils_constants.SortOptions;
|
|
447
|
+
total: number;
|
|
448
|
+
}) & {
|
|
449
|
+
clearCache: () => void;
|
|
450
|
+
resultsCount: () => number;
|
|
451
|
+
resetResultsCount: () => void;
|
|
452
|
+
};
|
|
453
|
+
lastResult: () => {
|
|
454
|
+
tenants: {
|
|
455
|
+
device_limits: Record<string, object>;
|
|
456
|
+
id: string;
|
|
457
|
+
name: string;
|
|
458
|
+
tenant_token: string;
|
|
459
|
+
status?: "active" | "suspended";
|
|
460
|
+
plan?: "os" | "enterprise" | "professional";
|
|
461
|
+
trial?: boolean;
|
|
462
|
+
trial_expiration?: string;
|
|
463
|
+
addons?: Array<_northern_tech_types_types_gen.Addon>;
|
|
464
|
+
service_provider?: boolean;
|
|
465
|
+
parent_tenant_id?: string;
|
|
466
|
+
additional_info?: _northern_tech_types_types_gen.TenantAdditionalInfo;
|
|
467
|
+
api_limits?: _northern_tech_types_types_gen.TenantApiLimits;
|
|
468
|
+
created_at?: string;
|
|
469
|
+
updated_at?: string;
|
|
470
|
+
device_count?: number;
|
|
471
|
+
device_limit?: number;
|
|
472
|
+
}[];
|
|
473
|
+
page: number;
|
|
474
|
+
perPage: number;
|
|
475
|
+
selectedTenant: Tenant | null;
|
|
476
|
+
sort: _northern_tech_utils_constants.SortOptions;
|
|
477
|
+
total: number;
|
|
478
|
+
};
|
|
479
|
+
dependencies: [(state: RootState) => TenantList];
|
|
480
|
+
recomputations: () => number;
|
|
481
|
+
resetRecomputations: () => void;
|
|
482
|
+
dependencyRecomputations: () => number;
|
|
483
|
+
resetDependencyRecomputations: () => void;
|
|
484
|
+
} & {
|
|
485
|
+
memoize: typeof reselect.weakMapMemoize;
|
|
486
|
+
argsMemoize: typeof reselect.weakMapMemoize;
|
|
487
|
+
};
|
|
204
488
|
|
|
205
|
-
export { getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogState, getBillingProfile, getCard, getDeviceTwinIntegrations, getExternalIntegrations, getIsServiceProvider, getOrganization, getProducts, getSsoConfig, getSubscription, getTenantsList, getWebhookEventInfo, getWebhookEventTotal, getWebhookEvents, getWebhooks };
|
|
489
|
+
export { getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogState, getBillingProfile, getCard, getDeviceTwinIntegrations, getDisabledTiers, getExternalIntegrations, getIsServiceProvider, getOrganization, getProducts, getSpLimits, getSsoConfig, getSubscription, getTenantListWithLimits, getTenantsList, getWebhookEventInfo, getWebhookEventTotal, getWebhookEvents, getWebhooks };
|
|
@@ -6,22 +6,25 @@ import {
|
|
|
6
6
|
getBillingProfile,
|
|
7
7
|
getCard,
|
|
8
8
|
getDeviceTwinIntegrations,
|
|
9
|
+
getDisabledTiers,
|
|
9
10
|
getExternalIntegrations,
|
|
10
11
|
getIsServiceProvider,
|
|
11
12
|
getOrganization,
|
|
12
13
|
getProducts,
|
|
14
|
+
getSpLimits,
|
|
13
15
|
getSsoConfig,
|
|
14
16
|
getSubscription,
|
|
17
|
+
getTenantListWithLimits,
|
|
15
18
|
getTenantsList,
|
|
16
19
|
getWebhookEventInfo,
|
|
17
20
|
getWebhookEventTotal,
|
|
18
21
|
getWebhookEvents,
|
|
19
22
|
getWebhooks
|
|
20
|
-
} from "../chunk-
|
|
21
|
-
import "../chunk-
|
|
23
|
+
} from "../chunk-X6AM6P6X.js";
|
|
24
|
+
import "../chunk-AERWBWRM.js";
|
|
22
25
|
import "../chunk-2DYA3X77.js";
|
|
23
|
-
import "../chunk-FAJ3I2UQ.js";
|
|
24
26
|
import "../chunk-ZKAH3APE.js";
|
|
27
|
+
import "../chunk-FAJ3I2UQ.js";
|
|
25
28
|
import "../chunk-DBBE6D36.js";
|
|
26
29
|
export {
|
|
27
30
|
getAuditLog,
|
|
@@ -31,12 +34,15 @@ export {
|
|
|
31
34
|
getBillingProfile,
|
|
32
35
|
getCard,
|
|
33
36
|
getDeviceTwinIntegrations,
|
|
37
|
+
getDisabledTiers,
|
|
34
38
|
getExternalIntegrations,
|
|
35
39
|
getIsServiceProvider,
|
|
36
40
|
getOrganization,
|
|
37
41
|
getProducts,
|
|
42
|
+
getSpLimits,
|
|
38
43
|
getSsoConfig,
|
|
39
44
|
getSubscription,
|
|
45
|
+
getTenantListWithLimits,
|
|
40
46
|
getTenantsList,
|
|
41
47
|
getWebhookEventInfo,
|
|
42
48
|
getWebhookEventTotal,
|
|
@@ -44,7 +44,7 @@ __export(thunks_exports, {
|
|
|
44
44
|
deleteSsoConfig: () => deleteSsoConfig,
|
|
45
45
|
downloadLicenseReport: () => downloadLicenseReport,
|
|
46
46
|
editBillingProfile: () => editBillingProfile,
|
|
47
|
-
|
|
47
|
+
editTenant: () => editTenant,
|
|
48
48
|
getAuditLogs: () => getAuditLogs,
|
|
49
49
|
getAuditLogsCsvLink: () => getAuditLogsCsvLink,
|
|
50
50
|
getBillingPreview: () => getBillingPreview,
|
|
@@ -205,6 +205,7 @@ var TIMEOUTS = {
|
|
|
205
205
|
};
|
|
206
206
|
var DEVICE_ONLINE_CUTOFF = { interval: 1, intervalName: timeUnits.days };
|
|
207
207
|
var defaultIdAttribute = Object.freeze({ attribute: "id", scope: import_constants5.ATTRIBUTE_SCOPES.identity });
|
|
208
|
+
var productOrder = ["micro", "standard", "system"];
|
|
208
209
|
var credentialTypes = {
|
|
209
210
|
aws: "aws",
|
|
210
211
|
http: "http",
|
|
@@ -2016,6 +2017,41 @@ var getAuditLogEntry = (0, import_toolkit12.createSelector)([getAuditLog, getAud
|
|
|
2016
2017
|
const [eventAction, eventTime] = atob(selectedId).split("|");
|
|
2017
2018
|
return events.find((item) => item.action === eventAction && item.time === eventTime);
|
|
2018
2019
|
});
|
|
2020
|
+
var toTierName = (key) => key.replace(/max_|_?devices/g, "") || "standard";
|
|
2021
|
+
var processDeviceLimits = (deviceLimits, skipFilter = false) => {
|
|
2022
|
+
const result = { limits: {}, disabled: [] };
|
|
2023
|
+
if (!deviceLimits) return result;
|
|
2024
|
+
const tiersByName = Object.fromEntries(Object.entries(deviceLimits).map(([key, limit]) => [toTierName(key), { key, limit }]));
|
|
2025
|
+
return productOrder.reduce((accu, tierName) => {
|
|
2026
|
+
const entry = tiersByName[tierName];
|
|
2027
|
+
if (!entry) return accu;
|
|
2028
|
+
const { key, limit } = entry;
|
|
2029
|
+
if (limit.value === 0) {
|
|
2030
|
+
accu.disabled.push(tierName);
|
|
2031
|
+
if (!skipFilter) return accu;
|
|
2032
|
+
}
|
|
2033
|
+
accu.limits[tierName] = {
|
|
2034
|
+
id: tierName,
|
|
2035
|
+
backendId: key,
|
|
2036
|
+
limit: limit.value,
|
|
2037
|
+
current: limit.current_value,
|
|
2038
|
+
name: tierName,
|
|
2039
|
+
quotaLeft: Math.max(limit.value - limit.current_value, 0),
|
|
2040
|
+
limitReached: limit.value !== -1 && limit.value <= limit.current_value
|
|
2041
|
+
};
|
|
2042
|
+
return accu;
|
|
2043
|
+
}, result);
|
|
2044
|
+
};
|
|
2045
|
+
var getDeviceLimitsInfo = (0, import_toolkit12.createSelector)([getOrganization], ({ device_limits }) => processDeviceLimits(device_limits));
|
|
2046
|
+
var getDisabledTiers = (0, import_toolkit12.createSelector)([getDeviceLimitsInfo], ({ disabled }) => disabled);
|
|
2047
|
+
var getSpLimits = (0, import_toolkit12.createSelector)([getDeviceLimitsInfo], ({ limits }) => limits);
|
|
2048
|
+
var getTenantListWithLimits = (0, import_toolkit12.createSelector)([getTenantsList], (tenantList) => ({
|
|
2049
|
+
...tenantList,
|
|
2050
|
+
tenants: tenantList.tenants.map((tenant) => ({
|
|
2051
|
+
...tenant,
|
|
2052
|
+
device_limits: processDeviceLimits(tenant.device_limits, true).limits
|
|
2053
|
+
}))
|
|
2054
|
+
}));
|
|
2019
2055
|
|
|
2020
2056
|
// src/releasesSlice/selectors.ts
|
|
2021
2057
|
var import_toolkit13 = require("@reduxjs/toolkit");
|
|
@@ -2152,6 +2188,12 @@ var parseSubscriptionPreview = (lines) => lines.reduce((acc, { addon, amount, pr
|
|
|
2152
2188
|
}
|
|
2153
2189
|
return acc;
|
|
2154
2190
|
}, {});
|
|
2191
|
+
var convertToBackendSPLimits = (limits, spLimits) => Object.fromEntries(
|
|
2192
|
+
Object.entries(limits).filter(([key]) => !!spLimits[key]).map(([key, limit]) => {
|
|
2193
|
+
const { backendId } = spLimits[key];
|
|
2194
|
+
return [backendId, { Name: backendId, value: Number(limit) || 0 }];
|
|
2195
|
+
})
|
|
2196
|
+
);
|
|
2155
2197
|
|
|
2156
2198
|
// src/releasesSlice/selectors.ts
|
|
2157
2199
|
var getSelectedReleaseId = (state) => state.releases.selectedRelease;
|
|
@@ -4850,7 +4892,7 @@ var addTenant = createAppAsyncThunk(
|
|
|
4850
4892
|
);
|
|
4851
4893
|
var tenantListRetrieval = async (config) => {
|
|
4852
4894
|
const { page, perPage } = config;
|
|
4853
|
-
const params = new URLSearchParams({ page, per_page: perPage }).toString();
|
|
4895
|
+
const params = new URLSearchParams({ page, per_page: perPage, tiers: "true" }).toString();
|
|
4854
4896
|
const tenantList = await general_api_default.get(`${import_constants5.tenantadmApiUrlv2}/tenants?${params}`);
|
|
4855
4897
|
const totalCount = tenantList.headers[import_constants5.headerNames.total] || TENANT_LIST_DEFAULT.perPage;
|
|
4856
4898
|
return [tenantList.data, Number(totalCount)];
|
|
@@ -4875,16 +4917,17 @@ var setTenantsListState = createAppAsyncThunk(
|
|
|
4875
4917
|
return dispatch(actions.setTenantListState({ ...nextState }));
|
|
4876
4918
|
}
|
|
4877
4919
|
);
|
|
4878
|
-
var
|
|
4879
|
-
|
|
4880
|
-
|
|
4920
|
+
var editTenant = createAppAsyncThunk(`${sliceName}/editDeviceLimit`, ({ deviceLimits, id, name }, { dispatch, getState }) => {
|
|
4921
|
+
const spLimits = getSpLimits(getState());
|
|
4922
|
+
const device_limits = convertToBackendSPLimits(deviceLimits, spLimits);
|
|
4923
|
+
return general_api_default.put(`${import_constants5.tenantadmApiUrlv2}/tenants/${id}/child`, { device_limits, name }).catch((err) => commonErrorHandler(err, `Device Limit cannot be changed`, dispatch)).then(
|
|
4881
4924
|
() => Promise.all([
|
|
4882
|
-
dispatch(setSnackbar5("
|
|
4925
|
+
dispatch(setSnackbar5("Tenant was changed successfully")),
|
|
4883
4926
|
dispatch(getUserOrganization()),
|
|
4884
4927
|
new Promise((resolve) => setTimeout(() => resolve(dispatch(getTenants())), TIMEOUTS.oneSecond))
|
|
4885
4928
|
])
|
|
4886
|
-
)
|
|
4887
|
-
);
|
|
4929
|
+
);
|
|
4930
|
+
});
|
|
4888
4931
|
var editBillingProfile = createAppAsyncThunk(
|
|
4889
4932
|
`${sliceName}/editBillingProfileEmail`,
|
|
4890
4933
|
({ billingProfile }, { dispatch }) => general_api_default.patch(`${import_constants5.tenantadmApiUrlv2}/billing/profile`, billingProfile).catch((err) => commonErrorHandler(err, `Failed to change billing profile`, dispatch)).then(() => Promise.all([dispatch(setSnackbar5("Billing Profile was changed successfully")), dispatch(getUserBilling())]))
|
|
@@ -4905,7 +4948,7 @@ var removeTenant = createAppAsyncThunk(
|
|
|
4905
4948
|
);
|
|
4906
4949
|
var getUserOrganization = createAppAsyncThunk(
|
|
4907
4950
|
`${sliceName}/getUserOrganization`,
|
|
4908
|
-
(_, { dispatch, getState }) => general_api_default.get(`${import_constants5.tenantadmApiUrlv1}/user/tenant`).then((res) => {
|
|
4951
|
+
(_, { dispatch, getState }) => general_api_default.get(`${import_constants5.tenantadmApiUrlv1}/user/tenant?tiers=true`).then((res) => {
|
|
4909
4952
|
const tasks = [dispatch(actions.setOrganization(res.data))];
|
|
4910
4953
|
const { addons, plan, trial } = res.data;
|
|
4911
4954
|
const { token } = getCurrentSession(getState());
|
|
@@ -5065,7 +5108,7 @@ var getSsoConfigs = createAppAsyncThunk(
|
|
|
5065
5108
|
deleteSsoConfig,
|
|
5066
5109
|
downloadLicenseReport,
|
|
5067
5110
|
editBillingProfile,
|
|
5068
|
-
|
|
5111
|
+
editTenant,
|
|
5069
5112
|
getAuditLogs,
|
|
5070
5113
|
getAuditLogsCsvLink,
|
|
5071
5114
|
getBillingPreview,
|