@frontegg/rest-api 3.1.16 → 3.1.18

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/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.1.16
1
+ /** @license Frontegg v3.1.18
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/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.1.16
1
+ /** @license Frontegg v3.1.18
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.
@@ -24,7 +24,6 @@ exports.RecommendationCode = RecommendationCode;
24
24
  RecommendationCode["CHANGE_IP_TO_ALLOWLIST"] = "CHANGE_IP_TO_ALLOWLIST";
25
25
  RecommendationCode["ENABLE_DOMAIN_RESTRICTIONS"] = "ENABLE_DOMAIN_RESTRICTIONS";
26
26
  RecommendationCode["CHANGE_DOMAIN_TO_ALLOWLIST"] = "CHANGE_DOMAIN_TO_ALLOWLIST";
27
- RecommendationCode["REMOVE_STALE_USERS"] = "REMOVE_STALE_USERS";
28
27
  RecommendationCode["CONFIGURE_SSO"] = "CONFIGURE_SSO";
29
28
  })(RecommendationCode || (exports.RecommendationCode = RecommendationCode = {}));
30
29
 
@@ -42,8 +41,6 @@ exports.InsightCode = InsightCode;
42
41
  InsightCode["NO_SESSION_SETTINGS"] = "NO_SESSION_SETTINGS";
43
42
  InsightCode["PARTIAL_SESSION_SETTINGS"] = "PARTIAL_SESSION_SETTINGS";
44
43
  InsightCode["FULL_SESSION_SETTINGS"] = "FULL_SESSION_SETTINGS";
45
- InsightCode["STALE_USERS_EXIST"] = "STALE_USERS_EXIST";
46
- InsightCode["NO_STALE_USERS_EXIST"] = "NO_STALE_USERS_EXIST";
47
44
  InsightCode["NO_IP_RESTRICTIONS"] = "NO_IP_RESTRICTIONS";
48
45
  InsightCode["IP_ALLOWLIST"] = "IP_ALLOWLIST";
49
46
  InsightCode["IP_DENYLIST"] = "IP_DENYLIST";
@@ -61,7 +58,6 @@ exports.RecommendationActionKey = RecommendationActionKey;
61
58
  RecommendationActionKey["ADJUST_FORCE_RELOGIN"] = "ADJUST_FORCE_RELOGIN";
62
59
  RecommendationActionKey["ADJUST_MAX_CONCURRENT_SESSIONS"] = "ADJUST_MAX_CONCURRENT_SESSIONS";
63
60
  RecommendationActionKey["ADJUST_IDLE_TIMEOUT"] = "ADJUST_IDLE_TIMEOUT";
64
- RecommendationActionKey["REMOVE_STALE_USERS"] = "REMOVE_STALE_USERS";
65
61
  })(RecommendationActionKey || (exports.RecommendationActionKey = RecommendationActionKey = {}));
66
62
 
67
63
  let RecommendationSeverity;
@@ -16,10 +16,14 @@ exports.updateUserProfileV2 = updateUserProfileV2;
16
16
 
17
17
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
18
18
 
19
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
20
+
19
21
  var _fetch = require("../fetch");
20
22
 
21
23
  var _constants = require("../constants");
22
24
 
25
+ const _excluded = ["_presetParams"];
26
+
23
27
  async function GetUserJwt(body) {
24
28
  return (0, _fetch.Post)(`${_constants.urls.identity.users.v3}/me/token`, body);
25
29
  }
@@ -31,7 +35,14 @@ async function getUsersV2(queryParams, options) {
31
35
  }
32
36
 
33
37
  async function getUsersV3(queryParams, options) {
34
- return (0, _fetch.Get)(_constants.urls.identity.users.v3, queryParams, {
38
+ const {
39
+ _presetParams
40
+ } = queryParams,
41
+ params = (0, _objectWithoutPropertiesLoose2.default)(queryParams, _excluded);
42
+ const finalQueryParams = (0, _extends2.default)({}, params, {
43
+ _presetParams: _presetParams ? JSON.stringify(_presetParams) : undefined
44
+ });
45
+ return (0, _fetch.Get)(_constants.urls.identity.users.v3, finalQueryParams, {
35
46
  headers: (0, _fetch.extractHeadersFromOptions)(options)
36
47
  });
37
48
  }
@@ -24,6 +24,7 @@ exports.GetUsersFilterPreset = GetUsersFilterPreset;
24
24
  (function (GetUsersFilterPreset) {
25
25
  GetUsersFilterPreset["MFA_UNENROLLED"] = "mfa-unenrolled";
26
26
  GetUsersFilterPreset["BREACHED_PASSWORDS"] = "breached-passwords";
27
+ GetUsersFilterPreset["INACTIVE"] = "inactive";
27
28
  })(GetUsersFilterPreset || (exports.GetUsersFilterPreset = GetUsersFilterPreset = {}));
28
29
 
29
30
  const providersArray = ['local', 'saml', 'google', 'github', 'facebook', 'microsoft', 'scim2', 'slack'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontegg/rest-api",
3
- "version": "3.1.16",
3
+ "version": "3.1.18",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {
@@ -52,7 +52,6 @@ export declare enum RecommendationCode {
52
52
  CHANGE_IP_TO_ALLOWLIST = "CHANGE_IP_TO_ALLOWLIST",
53
53
  ENABLE_DOMAIN_RESTRICTIONS = "ENABLE_DOMAIN_RESTRICTIONS",
54
54
  CHANGE_DOMAIN_TO_ALLOWLIST = "CHANGE_DOMAIN_TO_ALLOWLIST",
55
- REMOVE_STALE_USERS = "REMOVE_STALE_USERS",
56
55
  CONFIGURE_SSO = "CONFIGURE_SSO"
57
56
  }
58
57
  export declare enum InsightCode {
@@ -66,8 +65,6 @@ export declare enum InsightCode {
66
65
  NO_SESSION_SETTINGS = "NO_SESSION_SETTINGS",
67
66
  PARTIAL_SESSION_SETTINGS = "PARTIAL_SESSION_SETTINGS",
68
67
  FULL_SESSION_SETTINGS = "FULL_SESSION_SETTINGS",
69
- STALE_USERS_EXIST = "STALE_USERS_EXIST",
70
- NO_STALE_USERS_EXIST = "NO_STALE_USERS_EXIST",
71
68
  NO_IP_RESTRICTIONS = "NO_IP_RESTRICTIONS",
72
69
  IP_ALLOWLIST = "IP_ALLOWLIST",
73
70
  IP_DENYLIST = "IP_DENYLIST",
@@ -83,8 +80,7 @@ export declare enum RecommendationActionKey {
83
80
  SEND_RESET_BREACHED_PASSWORD_EMAIL = "SEND_RESET_BREACHED_PASSWORD_EMAIL",
84
81
  ADJUST_FORCE_RELOGIN = "ADJUST_FORCE_RELOGIN",
85
82
  ADJUST_MAX_CONCURRENT_SESSIONS = "ADJUST_MAX_CONCURRENT_SESSIONS",
86
- ADJUST_IDLE_TIMEOUT = "ADJUST_IDLE_TIMEOUT",
87
- REMOVE_STALE_USERS = "REMOVE_STALE_USERS"
83
+ ADJUST_IDLE_TIMEOUT = "ADJUST_IDLE_TIMEOUT"
88
84
  }
89
85
  export declare enum RecommendationSeverity {
90
86
  SEVERE = "SEVERE",
@@ -17,7 +17,6 @@ export let RecommendationCode;
17
17
  RecommendationCode["CHANGE_IP_TO_ALLOWLIST"] = "CHANGE_IP_TO_ALLOWLIST";
18
18
  RecommendationCode["ENABLE_DOMAIN_RESTRICTIONS"] = "ENABLE_DOMAIN_RESTRICTIONS";
19
19
  RecommendationCode["CHANGE_DOMAIN_TO_ALLOWLIST"] = "CHANGE_DOMAIN_TO_ALLOWLIST";
20
- RecommendationCode["REMOVE_STALE_USERS"] = "REMOVE_STALE_USERS";
21
20
  RecommendationCode["CONFIGURE_SSO"] = "CONFIGURE_SSO";
22
21
  })(RecommendationCode || (RecommendationCode = {}));
23
22
 
@@ -34,8 +33,6 @@ export let InsightCode;
34
33
  InsightCode["NO_SESSION_SETTINGS"] = "NO_SESSION_SETTINGS";
35
34
  InsightCode["PARTIAL_SESSION_SETTINGS"] = "PARTIAL_SESSION_SETTINGS";
36
35
  InsightCode["FULL_SESSION_SETTINGS"] = "FULL_SESSION_SETTINGS";
37
- InsightCode["STALE_USERS_EXIST"] = "STALE_USERS_EXIST";
38
- InsightCode["NO_STALE_USERS_EXIST"] = "NO_STALE_USERS_EXIST";
39
36
  InsightCode["NO_IP_RESTRICTIONS"] = "NO_IP_RESTRICTIONS";
40
37
  InsightCode["IP_ALLOWLIST"] = "IP_ALLOWLIST";
41
38
  InsightCode["IP_DENYLIST"] = "IP_DENYLIST";
@@ -52,7 +49,6 @@ export let RecommendationActionKey;
52
49
  RecommendationActionKey["ADJUST_FORCE_RELOGIN"] = "ADJUST_FORCE_RELOGIN";
53
50
  RecommendationActionKey["ADJUST_MAX_CONCURRENT_SESSIONS"] = "ADJUST_MAX_CONCURRENT_SESSIONS";
54
51
  RecommendationActionKey["ADJUST_IDLE_TIMEOUT"] = "ADJUST_IDLE_TIMEOUT";
55
- RecommendationActionKey["REMOVE_STALE_USERS"] = "REMOVE_STALE_USERS";
56
52
  })(RecommendationActionKey || (RecommendationActionKey = {}));
57
53
 
58
54
  export let RecommendationSeverity;
package/users/index.js CHANGED
@@ -1,4 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
+ const _excluded = ["_presetParams"];
2
4
  import { extractHeadersFromOptions, Get, Post, Put } from '../fetch';
3
5
  import { urls } from '../constants';
4
6
  export async function GetUserJwt(body) {
@@ -10,7 +12,16 @@ export async function getUsersV2(queryParams, options) {
10
12
  });
11
13
  }
12
14
  export async function getUsersV3(queryParams, options) {
13
- return Get(urls.identity.users.v3, queryParams, {
15
+ const {
16
+ _presetParams
17
+ } = queryParams,
18
+ params = _objectWithoutPropertiesLoose(queryParams, _excluded);
19
+
20
+ const finalQueryParams = _extends({}, params, {
21
+ _presetParams: _presetParams ? JSON.stringify(_presetParams) : undefined
22
+ });
23
+
24
+ return Get(urls.identity.users.v3, finalQueryParams, {
14
25
  headers: extractHeadersFromOptions(options)
15
26
  });
16
27
  }
@@ -39,6 +39,7 @@ export interface ISearchUserQueryParamsV3 extends IGetUserQueryParams {
39
39
  _tenantId?: string;
40
40
  _includeSubTenants?: boolean;
41
41
  _preset?: GetUsersFilterPreset;
42
+ _presetParams?: GetUsersFilterPresetParams;
42
43
  }
43
44
  export interface IUserTenantData {
44
45
  tenantId: string;
@@ -94,7 +95,11 @@ export interface IGetUserAuthorizationResponse {
94
95
  export declare type IUsersV3Data = IBaseGetUserResponse;
95
96
  export declare enum GetUsersFilterPreset {
96
97
  MFA_UNENROLLED = "mfa-unenrolled",
97
- BREACHED_PASSWORDS = "breached-passwords"
98
+ BREACHED_PASSWORDS = "breached-passwords",
99
+ INACTIVE = "inactive"
100
+ }
101
+ export interface GetUsersFilterPresetParams {
102
+ _maxInactiveSeconds?: number;
98
103
  }
99
104
  export interface GetUsersRolesParams {
100
105
  ids: string[];
@@ -16,6 +16,7 @@ export let GetUsersFilterPreset;
16
16
  (function (GetUsersFilterPreset) {
17
17
  GetUsersFilterPreset["MFA_UNENROLLED"] = "mfa-unenrolled";
18
18
  GetUsersFilterPreset["BREACHED_PASSWORDS"] = "breached-passwords";
19
+ GetUsersFilterPreset["INACTIVE"] = "inactive";
19
20
  })(GetUsersFilterPreset || (GetUsersFilterPreset = {}));
20
21
 
21
22
  export const providersArray = ['local', 'saml', 'google', 'github', 'facebook', 'microsoft', 'scim2', 'slack'];