@northern.tech/store 0.43.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions.d.cts +1 -1
- package/dist/actions.d.ts +1 -1
- package/dist/appSlice/index.cjs +1 -0
- package/dist/appSlice/index.cjs.map +1 -1
- package/dist/appSlice/index.js +1 -0
- package/dist/appSlice/index.js.map +1 -1
- package/dist/appSlice/selectors.d.cts +2 -2
- package/dist/appSlice/selectors.d.ts +2 -2
- package/dist/appSlice/thunks.d.cts +1 -1
- package/dist/appSlice/thunks.d.ts +1 -1
- package/dist/auth.d.cts +1 -1
- package/dist/auth.d.ts +1 -1
- package/dist/commonSelectors.d.cts +2 -2
- package/dist/commonSelectors.d.ts +2 -2
- package/dist/deploymentsSlice/selectors.d.cts +2 -2
- package/dist/deploymentsSlice/selectors.d.ts +2 -2
- package/dist/deploymentsSlice/thunks.d.cts +1 -1
- package/dist/deploymentsSlice/thunks.d.ts +1 -1
- package/dist/devicesSlice/selectors.d.cts +2 -2
- package/dist/devicesSlice/selectors.d.ts +2 -2
- package/dist/devicesSlice/thunks.cjs +1 -0
- package/dist/devicesSlice/thunks.d.cts +16 -3
- package/dist/devicesSlice/thunks.d.ts +16 -3
- package/dist/devicesSlice/thunks.js +2 -2
- package/dist/{index-CpfhQHfg.d.ts → index-C0yQmQih.d.ts} +4 -2
- package/dist/{index-BgF6rhXn.d.cts → index-DjSjrp5b.d.cts} +4 -2
- package/dist/monitorSlice/selectors.d.cts +1 -1
- package/dist/monitorSlice/selectors.d.ts +1 -1
- package/dist/monitorSlice/thunks.d.cts +1 -1
- package/dist/monitorSlice/thunks.d.ts +1 -1
- package/dist/onboardingSlice/selectors.d.cts +1 -1
- package/dist/onboardingSlice/selectors.d.ts +1 -1
- package/dist/onboardingSlice/thunks.d.cts +2 -2
- package/dist/onboardingSlice/thunks.d.ts +2 -2
- package/dist/organizationSlice/selectors.d.cts +2 -2
- package/dist/organizationSlice/selectors.d.ts +2 -2
- package/dist/organizationSlice/thunks.cjs +1 -0
- package/dist/organizationSlice/thunks.d.cts +16 -3
- package/dist/organizationSlice/thunks.d.ts +16 -3
- package/dist/organizationSlice/thunks.js +2 -2
- package/dist/releasesSlice/selectors.d.cts +2 -2
- package/dist/releasesSlice/selectors.d.ts +2 -2
- package/dist/releasesSlice/thunks.cjs +5 -8
- package/dist/releasesSlice/thunks.cjs.map +1 -1
- package/dist/releasesSlice/thunks.d.cts +1 -1
- package/dist/releasesSlice/thunks.d.ts +1 -1
- package/dist/releasesSlice/thunks.js +5 -8
- package/dist/releasesSlice/thunks.js.map +1 -1
- package/dist/{store-B2_hrsgP.d.ts → store-BKVs6gSc.d.ts} +2 -2
- package/dist/{store-DquBGT7j.d.cts → store-ByJVpIz9.d.cts} +2 -2
- package/dist/store.d.cts +1 -1
- package/dist/store.d.ts +1 -1
- package/dist/storehooks.cjs +1 -0
- package/dist/storehooks.cjs.map +1 -1
- package/dist/storehooks.d.cts +2 -2
- package/dist/storehooks.d.ts +2 -2
- package/dist/storehooks.js +1 -0
- package/dist/storehooks.js.map +1 -1
- package/dist/thunks.cjs +19 -1
- package/dist/thunks.cjs.map +1 -1
- package/dist/thunks.d.cts +4 -4
- package/dist/thunks.d.ts +4 -4
- package/dist/thunks.js +18 -3
- package/dist/thunks.js.map +1 -1
- package/dist/usersSlice/index.cjs.map +1 -1
- package/dist/usersSlice/index.d.cts +1 -1
- package/dist/usersSlice/index.d.ts +1 -1
- package/dist/usersSlice/index.js.map +1 -1
- package/dist/usersSlice/mocks.d.cts +1 -1
- package/dist/usersSlice/mocks.d.ts +1 -1
- package/dist/usersSlice/selectors.d.cts +2 -2
- package/dist/usersSlice/selectors.d.ts +2 -2
- package/dist/usersSlice/thunks.cjs +1 -0
- package/dist/usersSlice/thunks.d.cts +37 -3
- package/dist/usersSlice/thunks.d.ts +37 -3
- package/dist/usersSlice/thunks.js +2 -2
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +1 -1
package/dist/thunks.cjs
CHANGED
|
@@ -1023,6 +1023,19 @@ const searchDevices = require_store.createAppAsyncThunk(`${require_devicesSlice_
|
|
|
1023
1023
|
searchTotal: Number(response.headers[_northern_tech_utils_constants.headerNames.total])
|
|
1024
1024
|
};
|
|
1025
1025
|
});
|
|
1026
|
+
const searchIdentities = require_store.createAppAsyncThunk(`${require_devicesSlice_index.sliceName}/searchIdentities`, async (options, { dispatch }) => {
|
|
1027
|
+
const { attributes: additionalAttributes = [], page = defaultPage$1, per_page = defaultPerPage$1, ...remainder } = options;
|
|
1028
|
+
const response = await require_api_general_api.default.post(`${_northern_tech_utils_constants.inventoryApiUrlV2alpha1}/identities/search`, {
|
|
1029
|
+
...remainder,
|
|
1030
|
+
attributes: (0, _northern_tech_utils_helpers.attributeDuplicateFilter)([...defaultAttributes, ...additionalAttributes], "attribute"),
|
|
1031
|
+
page,
|
|
1032
|
+
per_page
|
|
1033
|
+
}).catch((err) => require_store.commonErrorHandler(err, `devices couldn't be searched.`, dispatch, require_store.commonErrorFallback));
|
|
1034
|
+
return {
|
|
1035
|
+
devices: response.data,
|
|
1036
|
+
total: Number(response.headers[_northern_tech_utils_constants.headerNames.total])
|
|
1037
|
+
};
|
|
1038
|
+
});
|
|
1026
1039
|
const ATTRIBUTE_LIST_CUTOFF = 100;
|
|
1027
1040
|
const attributeReducer = (attributes = []) => attributes.slice(0, ATTRIBUTE_LIST_CUTOFF).reduce((accu, { name, scope }) => {
|
|
1028
1041
|
if (!accu[scope]) accu[scope] = [];
|
|
@@ -1721,7 +1734,7 @@ const removeTenant = require_store.createAppAsyncThunk(`${require_organizationSl
|
|
|
1721
1734
|
dispatch
|
|
1722
1735
|
});
|
|
1723
1736
|
}));
|
|
1724
|
-
const getUserOrganization = require_store.createAppAsyncThunk(`${require_organizationSlice_index.sliceName}/getUserOrganization`, (_, { dispatch, getState }) => require_api_general_api.default.get(`${_northern_tech_utils_constants.
|
|
1737
|
+
const getUserOrganization = require_store.createAppAsyncThunk(`${require_organizationSlice_index.sliceName}/getUserOrganization`, (_, { dispatch, getState }) => require_api_general_api.default.get(`${_northern_tech_utils_constants.tenantadmApiUrlv2}/tenants/me?tiers=true`).then((res) => {
|
|
1725
1738
|
const { addons, plan, trial } = res.data;
|
|
1726
1739
|
const { addons: currentAddons, id: currentId, plan: currentPlan, trial: currentTrial } = require_organizationSlice_selectors.getOrganization(getState());
|
|
1727
1740
|
const tasks = [dispatch(require_organizationSlice_index.actions.setOrganization(res.data))];
|
|
@@ -1741,6 +1754,7 @@ const getUserOrganization = require_store.createAppAsyncThunk(`${require_organiz
|
|
|
1741
1754
|
}
|
|
1742
1755
|
return Promise.all(tasks);
|
|
1743
1756
|
}));
|
|
1757
|
+
const getTenantToken = require_store.createAppAsyncThunk(`${require_organizationSlice_index.sliceName}/getTenantToken`, (_, { dispatch }) => require_api_general_api.default.get(`${_northern_tech_utils_constants.tenantadmApiUrlv2}/tenants/me/token`).catch((err) => require_store.commonErrorHandler(err, "There was an error retrieving your organization token", dispatch, require_store.commonErrorFallback)).then(({ data: { tenant_token } }) => dispatch(require_organizationSlice_index.actions.setOrganization({ tenant_token }))));
|
|
1744
1758
|
const getUserBilling = require_store.createAppAsyncThunk(`${require_organizationSlice_index.sliceName}/getUserBilling`, (_, { dispatch }) => require_api_general_api.default.get(`${_northern_tech_utils_constants.tenantadmApiUrlv2}/billing/profile`).catch((err) => require_store.commonErrorHandler(err, "There was an error getting your billing profile:", dispatch, require_store.commonErrorFallback)).then((res) => dispatch(require_organizationSlice_index.actions.setBillingProfile(res.data))));
|
|
1745
1759
|
const getUserSubscription = require_store.createAppAsyncThunk(`${require_organizationSlice_index.sliceName}/getUserSubscription`, async (_, { dispatch }) => {
|
|
1746
1760
|
const currentSubscription = await dispatch(getCurrentSubscription()).unwrap();
|
|
@@ -2013,6 +2027,7 @@ const createUser = require_store.createAppAsyncThunk(`${require_usersSlice_index
|
|
|
2013
2027
|
...userData,
|
|
2014
2028
|
send_reset_password: shouldResetPassword
|
|
2015
2029
|
}).then(() => Promise.all([dispatch(getUserList()), dispatch(setSnackbar(userActions.create.successMessage))])).catch((err) => userActionErrorHandler(err, "create", dispatch)));
|
|
2030
|
+
const createUserV2 = require_store.createAppAsyncThunk(`${require_usersSlice_index.sliceName}/createUserV2`, (userData, { dispatch }) => require_api_general_api.default.post(`${_northern_tech_utils_constants.useradmApiUrlv2}/users`, require_utils.stripUndefined(userData)).then(() => Promise.all([dispatch(getUserList()), dispatch(setSnackbar(`The user was added successfully. An email has been sent to ${userData.email}.`))])).catch((err) => userActionErrorHandler(err, "create", dispatch)));
|
|
2016
2031
|
const removeUser = require_store.createAppAsyncThunk(`${require_usersSlice_index.sliceName}/removeUser`, (userId, { dispatch }) => require_api_general_api.default.delete(`${_northern_tech_utils_constants.useradmApiUrl}/users/${userId}`).then(() => Promise.all([
|
|
2017
2032
|
dispatch(require_usersSlice_index.actions.removedUser(userId)),
|
|
2018
2033
|
dispatch(getUserList()),
|
|
@@ -2461,6 +2476,7 @@ exports.createIntegration = createIntegration;
|
|
|
2461
2476
|
exports.createOrganizationTrial = createOrganizationTrial;
|
|
2462
2477
|
exports.createRole = createRole;
|
|
2463
2478
|
exports.createUser = createUser;
|
|
2479
|
+
exports.createUserV2 = createUserV2;
|
|
2464
2480
|
exports.decommissionDevice = decommissionDevice;
|
|
2465
2481
|
exports.deleteAuthset = deleteAuthset;
|
|
2466
2482
|
exports.deleteIntegration = deleteIntegration;
|
|
@@ -2539,6 +2555,7 @@ exports.getSoftwareList = require_releasesSlice_thunks.getSoftwareList;
|
|
|
2539
2555
|
exports.getSsoConfigById = getSsoConfigById;
|
|
2540
2556
|
exports.getSsoConfigs = getSsoConfigs;
|
|
2541
2557
|
exports.getTargetLocation = getTargetLocation;
|
|
2558
|
+
exports.getTenantToken = getTenantToken;
|
|
2542
2559
|
exports.getTenants = getTenants;
|
|
2543
2560
|
exports.getTestDeviceCount = getTestDeviceCount;
|
|
2544
2561
|
exports.getTokens = getTokens;
|
|
@@ -2578,6 +2595,7 @@ exports.saveDeltaDeploymentsConfig = saveDeltaDeploymentsConfig;
|
|
|
2578
2595
|
exports.saveGlobalSettings = saveGlobalSettings;
|
|
2579
2596
|
exports.saveUserSettings = saveUserSettings;
|
|
2580
2597
|
exports.searchDevices = searchDevices;
|
|
2598
|
+
exports.searchIdentities = searchIdentities;
|
|
2581
2599
|
exports.selectGroup = selectGroup;
|
|
2582
2600
|
exports.selectManifest = require_releasesSlice_thunks.selectManifest;
|
|
2583
2601
|
exports.selectRelease = require_releasesSlice_thunks.selectRelease;
|