@frontegg/rest-api 3.0.115 → 3.0.117

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/constants.js CHANGED
@@ -228,7 +228,7 @@ export const urls = {
228
228
  temp: '/directory/resources/scim/temp'
229
229
  },
230
230
  entitlements: {
231
- v1: '/entitlements/check/v1'
231
+ v1: '/entitlements/api/v1/user-entitlements'
232
232
  }
233
233
  };
234
234
  export const GENERIC_ERROR_MESSAGE = `We're facing some difficulties, Please try again`;
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.0.115
1
+ /** @license Frontegg v3.0.117
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/node/constants.js CHANGED
@@ -234,7 +234,7 @@ const urls = {
234
234
  temp: '/directory/resources/scim/temp'
235
235
  },
236
236
  entitlements: {
237
- v1: '/entitlements/check/v1'
237
+ v1: '/entitlements/api/v1/user-entitlements'
238
238
  }
239
239
  };
240
240
  exports.urls = urls;
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.0.115
1
+ /** @license Frontegg v3.0.117
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
@@ -12,6 +14,8 @@ exports.getTenantsUsersCount = getTenantsUsersCount;
12
14
  exports.searchSubTenants = searchSubTenants;
13
15
  exports.switchTenant = switchTenant;
14
16
 
17
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
18
+
15
19
  var _fetch = require("../fetch");
16
20
 
17
21
  var _constants = require("../constants");
@@ -55,7 +59,9 @@ async function searchSubTenants(params, options) {
55
59
  }
56
60
 
57
61
  async function getHierarchyMetadata(params, options) {
58
- return (0, _fetch.Get)(_constants.urls.tenants.hierarchy.metadata.v2, params, {
62
+ return (0, _fetch.Get)(_constants.urls.tenants.hierarchy.metadata.v2, (0, _extends2.default)({}, params, {
63
+ _tenantIds: params._tenantIds.join(',')
64
+ }), {
59
65
  headers: (0, _fetch.extractHeadersFromOptions)(options)
60
66
  });
61
67
  }
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
@@ -7,6 +9,8 @@ exports.GetUserJwt = GetUserJwt;
7
9
  exports.getUsersRoles = getUsersRoles;
8
10
  exports.getUsersV3 = getUsersV3;
9
11
 
12
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
+
10
14
  var _fetch = require("../fetch");
11
15
 
12
16
  var _constants = require("../constants");
@@ -22,7 +26,9 @@ async function getUsersV3(queryParams, options) {
22
26
  }
23
27
 
24
28
  async function getUsersRoles(queryParams, options) {
25
- return (0, _fetch.Get)(_constants.urls.identity.users.roles.v3, queryParams, {
29
+ return (0, _fetch.Get)(_constants.urls.identity.users.roles.v3, (0, _extends2.default)({}, queryParams, {
30
+ ids: queryParams.ids.join(',')
31
+ }), {
26
32
  headers: (0, _fetch.extractHeadersFromOptions)(options)
27
33
  });
28
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontegg/rest-api",
3
- "version": "3.0.115",
3
+ "version": "3.0.117",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {
package/tenants/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
1
2
  import { extractHeadersFromOptions, Get, Post, Put } from "../fetch";
2
3
  import { urls } from "../constants";
3
4
  export async function switchTenant(body) {
@@ -32,7 +33,9 @@ export async function searchSubTenants(params, options) {
32
33
  });
33
34
  }
34
35
  export async function getHierarchyMetadata(params, options) {
35
- return Get(urls.tenants.hierarchy.metadata.v2, params, {
36
+ return Get(urls.tenants.hierarchy.metadata.v2, _extends({}, params, {
37
+ _tenantIds: params._tenantIds.join(',')
38
+ }), {
36
39
  headers: extractHeadersFromOptions(options)
37
40
  });
38
41
  }
package/users/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
1
2
  import { extractHeadersFromOptions, Get, Post } from "../fetch";
2
3
  import { urls } from "../constants";
3
4
  export async function GetUserJwt(body) {
@@ -9,7 +10,9 @@ export async function getUsersV3(queryParams, options) {
9
10
  });
10
11
  }
11
12
  export async function getUsersRoles(queryParams, options) {
12
- return Get(urls.identity.users.roles.v3, queryParams, {
13
+ return Get(urls.identity.users.roles.v3, _extends({}, queryParams, {
14
+ ids: queryParams.ids.join(',')
15
+ }), {
13
16
  headers: extractHeadersFromOptions(options)
14
17
  });
15
18
  }
@@ -27,7 +27,13 @@ export interface ISearchUserQueryParamsV3 {
27
27
  _order?: PaginationOrderEnum;
28
28
  _includeSubTenants?: boolean;
29
29
  }
30
- export interface IUsersV3Data {
30
+ export interface IBaseUserData {
31
+ id: string;
32
+ email: string;
33
+ name?: string;
34
+ profilePictureUrl?: string;
35
+ }
36
+ export interface IUsersV3Data extends IBaseUserData {
31
37
  sub?: string;
32
38
  verified?: boolean;
33
39
  mfaEnrolled?: boolean;