@frontegg/rest-api 3.0.25 → 3.0.27

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/auth/index.d.ts CHANGED
@@ -411,6 +411,7 @@ export declare function preLoginV2(body: IPreLogin): Promise<IPreLoginWithIdpTyp
411
411
  */
412
412
  export declare function oidcPostLoginV2(body: IOidcPostLoginV2): Promise<ILoginResponse>;
413
413
  export declare function exchangeOAuthTokens(body: IExchangeOAuthTokens): Promise<ILoginResponse>;
414
+ export declare function silentOAuthRefreshToken(): Promise<ILoginResponse>;
414
415
  /**
415
416
  * reset phone should be called in case user want to reset his phone number
416
417
  * when using sms authentication strategy. a 6-digits code will be send to the user email.
package/auth/index.js CHANGED
@@ -386,6 +386,10 @@ export async function exchangeOAuthTokens(body) {
386
386
  const data = await Post(`${urls.oauth.v1}/token`, body);
387
387
  return generateLoginResponseFromOAuthResponse(data);
388
388
  }
389
+ export async function silentOAuthRefreshToken() {
390
+ const data = await Post(`${urls.oauth.v1}/authorize/silent`);
391
+ return generateLoginResponseFromOAuthResponse(data);
392
+ }
389
393
  export async function resetPhoneNumber(body) {
390
394
  return Post(`${urls.identity.users.v1}/phone/reset`, body);
391
395
  }
@@ -90,3 +90,7 @@ export declare function deleteIPRestriction(id: string): Promise<void>;
90
90
  * Test current user ip restriction
91
91
  */
92
92
  export declare function testCurrentIp(): Promise<IPValidResponse>;
93
+ /**
94
+ * Test current user ip restriction is in allow list
95
+ */
96
+ export declare function testCurrentIpInAllowList(): Promise<IPValidResponse>;
@@ -81,4 +81,7 @@ export async function deleteIPRestriction(id) {
81
81
  }
82
82
  export async function testCurrentIp() {
83
83
  return Post(`${urls.identity.restrictions.ip.v1}/verify`);
84
+ }
85
+ export async function testCurrentIpInAllowList() {
86
+ return Post(`${urls.identity.restrictions.ip.v1}/verify/allow`);
84
87
  }
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.0.25
1
+ /** @license Frontegg v3.0.27
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.
@@ -83,6 +83,7 @@ var _exportNames = {
83
83
  preLoginV2: true,
84
84
  oidcPostLoginV2: true,
85
85
  exchangeOAuthTokens: true,
86
+ silentOAuthRefreshToken: true,
86
87
  resetPhoneNumber: true,
87
88
  verifyResetPhoneNumber: true,
88
89
  changePhoneNumberWithVerification: true,
@@ -162,6 +163,7 @@ exports.resetPhoneNumber = resetPhoneNumber;
162
163
  exports.revokeSessionsForUser = revokeSessionsForUser;
163
164
  exports.setSSODefaultRoles = setSSODefaultRoles;
164
165
  exports.signUpUser = signUpUser;
166
+ exports.silentOAuthRefreshToken = silentOAuthRefreshToken;
165
167
  exports.updateSSOConfiguration = updateSSOConfiguration;
166
168
  exports.updateSSOConfigurationByMetadata = updateSSOConfigurationByMetadata;
167
169
  exports.updateSSOGroup = updateSSOGroup;
@@ -682,6 +684,11 @@ async function exchangeOAuthTokens(body) {
682
684
  return generateLoginResponseFromOAuthResponse(data);
683
685
  }
684
686
 
687
+ async function silentOAuthRefreshToken() {
688
+ const data = await (0, _fetch.Post)(`${_constants.urls.oauth.v1}/authorize/silent`);
689
+ return generateLoginResponseFromOAuthResponse(data);
690
+ }
691
+
685
692
  async function resetPhoneNumber(body) {
686
693
  return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/phone/reset`, body);
687
694
  }
@@ -23,6 +23,7 @@ exports.saveLockoutPolicy = saveLockoutPolicy;
23
23
  exports.saveMfaPolicy = saveMfaPolicy;
24
24
  exports.savePasswordHistoryPolicy = savePasswordHistoryPolicy;
25
25
  exports.testCurrentIp = testCurrentIp;
26
+ exports.testCurrentIpInAllowList = testCurrentIpInAllowList;
26
27
  exports.updateDomainRestrictionConfig = updateDomainRestrictionConfig;
27
28
  exports.updateIPRestrictionConfig = updateIPRestrictionConfig;
28
29
 
@@ -132,4 +133,8 @@ async function deleteIPRestriction(id) {
132
133
 
133
134
  async function testCurrentIp() {
134
135
  return (0, _fetch.Post)(`${_constants.urls.identity.restrictions.ip.v1}/verify`);
136
+ }
137
+
138
+ async function testCurrentIpInAllowList() {
139
+ return (0, _fetch.Post)(`${_constants.urls.identity.restrictions.ip.v1}/verify/allow`);
135
140
  }
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.0.25
1
+ /** @license Frontegg v3.0.27
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontegg/rest-api",
3
- "version": "3.0.25",
3
+ "version": "3.0.27",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {