@northern.tech/store 0.43.0 → 0.44.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.
Files changed (77) hide show
  1. package/dist/actions.d.cts +1 -1
  2. package/dist/actions.d.ts +1 -1
  3. package/dist/appSlice/index.cjs +1 -0
  4. package/dist/appSlice/index.cjs.map +1 -1
  5. package/dist/appSlice/index.js +1 -0
  6. package/dist/appSlice/index.js.map +1 -1
  7. package/dist/appSlice/selectors.d.cts +2 -2
  8. package/dist/appSlice/selectors.d.ts +2 -2
  9. package/dist/appSlice/thunks.d.cts +1 -1
  10. package/dist/appSlice/thunks.d.ts +1 -1
  11. package/dist/auth.d.cts +1 -1
  12. package/dist/auth.d.ts +1 -1
  13. package/dist/commonSelectors.d.cts +2 -2
  14. package/dist/commonSelectors.d.ts +2 -2
  15. package/dist/deploymentsSlice/selectors.d.cts +2 -2
  16. package/dist/deploymentsSlice/selectors.d.ts +2 -2
  17. package/dist/deploymentsSlice/thunks.d.cts +1 -1
  18. package/dist/deploymentsSlice/thunks.d.ts +1 -1
  19. package/dist/devicesSlice/selectors.d.cts +2 -2
  20. package/dist/devicesSlice/selectors.d.ts +2 -2
  21. package/dist/devicesSlice/thunks.cjs +1 -0
  22. package/dist/devicesSlice/thunks.d.cts +16 -3
  23. package/dist/devicesSlice/thunks.d.ts +16 -3
  24. package/dist/devicesSlice/thunks.js +2 -2
  25. package/dist/{index-CpfhQHfg.d.ts → index-C0yQmQih.d.ts} +4 -2
  26. package/dist/{index-BgF6rhXn.d.cts → index-DjSjrp5b.d.cts} +4 -2
  27. package/dist/monitorSlice/selectors.d.cts +1 -1
  28. package/dist/monitorSlice/selectors.d.ts +1 -1
  29. package/dist/monitorSlice/thunks.d.cts +1 -1
  30. package/dist/monitorSlice/thunks.d.ts +1 -1
  31. package/dist/onboardingSlice/selectors.d.cts +1 -1
  32. package/dist/onboardingSlice/selectors.d.ts +1 -1
  33. package/dist/onboardingSlice/thunks.d.cts +2 -2
  34. package/dist/onboardingSlice/thunks.d.ts +2 -2
  35. package/dist/organizationSlice/selectors.d.cts +2 -2
  36. package/dist/organizationSlice/selectors.d.ts +2 -2
  37. package/dist/organizationSlice/thunks.cjs +1 -0
  38. package/dist/organizationSlice/thunks.d.cts +16 -3
  39. package/dist/organizationSlice/thunks.d.ts +16 -3
  40. package/dist/organizationSlice/thunks.js +2 -2
  41. package/dist/releasesSlice/selectors.d.cts +2 -2
  42. package/dist/releasesSlice/selectors.d.ts +2 -2
  43. package/dist/releasesSlice/thunks.cjs +5 -8
  44. package/dist/releasesSlice/thunks.cjs.map +1 -1
  45. package/dist/releasesSlice/thunks.d.cts +1 -1
  46. package/dist/releasesSlice/thunks.d.ts +1 -1
  47. package/dist/releasesSlice/thunks.js +5 -8
  48. package/dist/releasesSlice/thunks.js.map +1 -1
  49. package/dist/{store-B2_hrsgP.d.ts → store-BKVs6gSc.d.ts} +2 -2
  50. package/dist/{store-DquBGT7j.d.cts → store-ByJVpIz9.d.cts} +2 -2
  51. package/dist/store.d.cts +1 -1
  52. package/dist/store.d.ts +1 -1
  53. package/dist/storehooks.cjs +1 -0
  54. package/dist/storehooks.cjs.map +1 -1
  55. package/dist/storehooks.d.cts +2 -2
  56. package/dist/storehooks.d.ts +2 -2
  57. package/dist/storehooks.js +1 -0
  58. package/dist/storehooks.js.map +1 -1
  59. package/dist/thunks.cjs +17 -1
  60. package/dist/thunks.cjs.map +1 -1
  61. package/dist/thunks.d.cts +3 -3
  62. package/dist/thunks.d.ts +3 -3
  63. package/dist/thunks.js +17 -3
  64. package/dist/thunks.js.map +1 -1
  65. package/dist/usersSlice/index.cjs.map +1 -1
  66. package/dist/usersSlice/index.d.cts +1 -1
  67. package/dist/usersSlice/index.d.ts +1 -1
  68. package/dist/usersSlice/index.js.map +1 -1
  69. package/dist/usersSlice/mocks.d.cts +1 -1
  70. package/dist/usersSlice/mocks.d.ts +1 -1
  71. package/dist/usersSlice/selectors.d.cts +2 -2
  72. package/dist/usersSlice/selectors.d.ts +2 -2
  73. package/dist/usersSlice/thunks.d.cts +2 -2
  74. package/dist/usersSlice/thunks.d.ts +2 -2
  75. package/dist/utils.d.cts +1 -1
  76. package/dist/utils.d.ts +1 -1
  77. 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.tenantadmApiUrlv1}/user/tenant?tiers=true`).then((res) => {
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();
@@ -2539,6 +2553,7 @@ exports.getSoftwareList = require_releasesSlice_thunks.getSoftwareList;
2539
2553
  exports.getSsoConfigById = getSsoConfigById;
2540
2554
  exports.getSsoConfigs = getSsoConfigs;
2541
2555
  exports.getTargetLocation = getTargetLocation;
2556
+ exports.getTenantToken = getTenantToken;
2542
2557
  exports.getTenants = getTenants;
2543
2558
  exports.getTestDeviceCount = getTestDeviceCount;
2544
2559
  exports.getTokens = getTokens;
@@ -2578,6 +2593,7 @@ exports.saveDeltaDeploymentsConfig = saveDeltaDeploymentsConfig;
2578
2593
  exports.saveGlobalSettings = saveGlobalSettings;
2579
2594
  exports.saveUserSettings = saveUserSettings;
2580
2595
  exports.searchDevices = searchDevices;
2596
+ exports.searchIdentities = searchIdentities;
2581
2597
  exports.selectGroup = selectGroup;
2582
2598
  exports.selectManifest = require_releasesSlice_thunks.selectManifest;
2583
2599
  exports.selectRelease = require_releasesSlice_thunks.selectRelease;