@frontegg/rest-api 7.68.0 → 7.69.0-alpha.1

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
@@ -3,7 +3,7 @@ export * from './enums';
3
3
  export { FRONTEGG_SEPARATE_TABS_BY_TENANT } from './constants';
4
4
  export { setTabTenantInSessionStorage, getTabTenantFromSessionStorage, getCurrentUserTenantsFunction, removeTabTenantFromSessionStorage, } from './utils';
5
5
  import { ISamlRolesGroup } from '../teams/interfaces';
6
- import { IAcceptInvitation, IAcceptInvitationWithOTC, IActivateAccount, IActivateAccountWithOTC, IAllowedToRememberMfaDevice, ICreateSamlGroup, IDeleteApiToken, IDisableMfa, IEnrollMfaResponse, IForgotPassword, IGetActivateAccountStrategy, IGetActivateAccountStrategyResponse, IGetUserById, IGetUserPasswordConfig, ILogin, ILoginResponse, ILoginViaSocialLogin, ILoginViaSocialLoginResponse, ILoginWithMfa, IOidcPostLogin, IOidcConfiguration, IPostLogin, IPreLogin, IRecoverMFAToken, IResendActivationEmail, IResetPassword, ISamlConfiguration, ISamlVendorConfigResponse, ISignUpResponse, ISignUpUser, ISocialLoginProviderConfiguration, ITenantApiTokensData, IUpdateSamlConfiguration, IUpdateSamlGroup, IUpdateSamlRoles, IUpdateSamlVendorMetadata, IUpdateTenantApiTokensData, IUpdateUserApiTokensData, IUserApiTokensData, IUserIdResponse, IVendorConfig, IVerifyMfa, IVerifyMfaResponse, TestConfig, ISSOPublicConfiguration, IPreLoginWithIdpTypeResponse, IPasswordlessPreLogin, IPasswordlessPostLogin, ICreateSSODomain, IVerifyInviteToken, ISSODomain, ISSOConfigurationDefaultRoles, ISSOConfiguration, IUpdateSSOConfiguration, IOidcPostLoginV2, IExchangeOAuthTokens, IOAuthTokenResponse, ISocialLoginProviderConfigurationV2, ILoginResponseV2, IResetPhoneNumber, IVerifyResetPhoneNumber, IChangePhoneNumber, IVerifyResetPhoneNumberResponse, IResetPhoneNumberResponse, IWebAuthnPreLogin, IWebAuthnPostLogin, IVerifyNewWebAuthnDevice, IWebAuthnPreLoginResponse, ICreateNewDeviceSessionResponse, IAuthStrategiesConfig, ISessionResponse, IChangePhoneNumberWithVerification, IChangePhoneNumberWithVerificationResponse, IVerifyChangePhoneNumber, ISessionConfigurations, IResendInvitationEmail, IPreEnrollMFA, IEnrollMFAAuthenticatorApp, IPreEnrollMFASMS, IEnrollMFASMS, IEnrollMFAWebAuthn, IPreEnrollMFAAuthenticatorAppResponse, IPreEnrollMFAWebAuthnResponse, IVerifyMFAAuthenticatorApp, IPreVerifyMFA, IPreVerifyMFASMSResponse, IVerifyMFASMS, IPreVerifyMFAWebAuthnResponse, IVerifyMFAWebAuthn, IPreEnrollMFASMSResponse, IPreDisableMFASMSResponse, IDisableMFASMS, IDisableMFAWebAuthn, IPreDisableMFAWebAuthnResponse, UserMFADevicesResponse, WithoutMFAToken, IMFAStrategiesResponse, IOAuthLogout, IGetUserAccessTokens, IGetTenantAccessTokens, IDeleteAccessToken, ICreateTenantAccessTokenData, ICreateUserAccessTokenData, IWebAuthnDevices, ICustomSocialLoginProviderConfigurationV1, ILoginResponseV3, IPreVerifyMFAEmailCodeResponse, IVerifyMFAEmailCode, ICreateOrUpdateSSOConfigurationByMetadataUrl, GenerateStepUpRequest, GenerateStepUpResponse, TSignupStrategyResponse } from './interfaces';
6
+ import { IAcceptInvitation, IAcceptInvitationWithOTC, IActivateAccount, IActivateAccountWithOTC, IAllowedToRememberMfaDevice, ICreateSamlGroup, IDeleteApiToken, IDisableMfa, IEnrollMfaResponse, IForgotPassword, IGetActivateAccountStrategy, IGetActivateAccountStrategyResponse, IGetUserById, IGetUserPasswordConfig, ILogin, ILoginResponse, ILoginViaSocialLogin, ILoginViaSocialLoginResponse, ILoginWithMfa, IOidcPostLogin, IOidcConfiguration, IPostLogin, IPreLogin, IRecoverMFAToken, IResendActivationEmail, IResetPassword, ISamlConfiguration, ISamlVendorConfigResponse, ISignUpResponse, ISignUpUser, ISocialLoginProviderConfiguration, ITenantApiTokensData, IUpdateSamlConfiguration, IUpdateSamlGroup, IUpdateSamlRoles, IUpdateSamlVendorMetadata, IUpdateTenantApiTokensData, IUpdateUserApiTokensData, IUserApiTokensData, IUserIdResponse, IVendorConfig, IVerifyMfa, IVerifyMfaResponse, TestConfig, ISSOPublicConfiguration, IPreLoginWithIdpTypeResponse, IPasswordlessPreLogin, IPasswordlessPostLogin, ICreateSSODomain, IVerifyInviteToken, ISSODomain, ISSOConfigurationDefaultRoles, ISSOConfiguration, IUpdateSSOConfiguration, IOidcPostLoginV2, IExchangeOAuthTokens, IOAuthTokenResponse, ISocialLoginProviderConfigurationV2, ILoginResponseV2, IResetPhoneNumber, IVerifyResetPhoneNumber, IChangePhoneNumber, IVerifyResetPhoneNumberResponse, IResetPhoneNumberResponse, IWebAuthnPreLogin, IWebAuthnPostLogin, IVerifyNewWebAuthnDevice, IWebAuthnPreLoginResponse, ICreateNewDeviceSessionResponse, IAuthStrategiesConfig, ISessionResponse, IChangePhoneNumberWithVerification, IChangePhoneNumberWithVerificationResponse, IVerifyChangePhoneNumber, ISessionConfigurations, IResendInvitationEmail, IPreEnrollMFA, IEnrollMFAAuthenticatorApp, IPreEnrollMFASMS, IEnrollMFASMS, IEnrollMFAWebAuthn, IPreEnrollMFAAuthenticatorAppResponse, IPreEnrollMFAWebAuthnResponse, IVerifyMFAAuthenticatorApp, IPreVerifyMFA, IPreVerifyMFASMSResponse, IVerifyMFASMS, IPreVerifyMFAWebAuthnResponse, IVerifyMFAWebAuthn, IPreEnrollMFASMSResponse, IPreDisableMFASMSResponse, IDisableMFASMS, IDisableMFAWebAuthn, IPreDisableMFAWebAuthnResponse, UserMFADevicesResponse, WithoutMFAToken, IMFAStrategiesResponse, IOAuthLogout, IGetUserAccessTokens, IGetTenantAccessTokens, IDeleteAccessToken, ICreateTenantAccessTokenData, ICreateUserAccessTokenData, IWebAuthnDevices, ICustomSocialLoginProviderConfigurationV1, ILoginResponseV3, IPreVerifyMFAEmailCodeResponse, IVerifyMFAEmailCode, ICreateOrUpdateSSOConfigurationByMetadataUrl, GenerateStepUpRequest, GenerateStepUpResponse, TSignupStrategyResponse, IPasswordRecoveryStrategy } from './interfaces';
7
7
  import { IGetUserAuthorizationResponse, IUserProfile } from '../users/interfaces';
8
8
  import { BaseApiClient } from '../BaseApiClient';
9
9
  import { SecurityPolicyApi } from './secutiry-poilicy';
@@ -843,6 +843,10 @@ export declare class AuthenticationApi extends BaseApiClient {
843
843
  testCurrentIp: () => Promise<import("./interfaces").IPValidResponse>;
844
844
  /** @deprecated use api.auth.securityPolicy.testCurrentIpInAllowList() or api.securityPolicy.testCurrentIpInAllowList() instead */
845
845
  testCurrentIpInAllowList: () => Promise<import("./interfaces").IPValidResponse>;
846
+ /**
847
+ * Get the available password recovery strategies for the vendor.
848
+ */
849
+ getPasswordRecoveryStrategies: () => Promise<IPasswordRecoveryStrategy[]>;
846
850
  }
847
851
  declare const _default: AuthenticationApi;
848
852
  export default _default;
package/auth/index.js CHANGED
@@ -802,6 +802,9 @@ export class AuthenticationApi extends BaseApiClient {
802
802
  this.deleteIPRestriction = this.securityPolicy.deleteIPRestriction.bind(this.securityPolicy);
803
803
  this.testCurrentIp = this.securityPolicy.testCurrentIp.bind(this.securityPolicy);
804
804
  this.testCurrentIpInAllowList = this.securityPolicy.testCurrentIpInAllowList.bind(this.securityPolicy);
805
+ this.getPasswordRecoveryStrategies = async () => {
806
+ return this.get(`${urls.identity.configurations.v1}/password-recovery/strategies`);
807
+ };
805
808
  }
806
809
  /**
807
810
  * @returns true if entitlements load should be done
@@ -101,6 +101,9 @@ export type IResendInvitationEmail = {
101
101
  export type IForgotPassword = {
102
102
  email: string;
103
103
  };
104
+ export type IDeterminatePasswordRecoveryStrategy = {
105
+ identifier: string;
106
+ };
104
107
  export type IResetPassword = {
105
108
  token: string;
106
109
  userId: string;
@@ -714,3 +717,11 @@ export type TSignupStrategy = {
714
717
  isRequired: boolean;
715
718
  };
716
719
  export type TSignupStrategyResponse = Array<TSignupStrategy>;
720
+ export declare enum PasswordRecoveryStrategyEnum {
721
+ EMAIL = "email",
722
+ SMS = "sms"
723
+ }
724
+ export interface IPasswordRecoveryStrategy {
725
+ strategy: PasswordRecoveryStrategyEnum;
726
+ isActive: boolean;
727
+ }
@@ -22,4 +22,9 @@ export let MFAStrategyEnum;
22
22
  MFAStrategyEnum["SMS"] = "SMS";
23
23
  MFAStrategyEnum["EmailCode"] = "EmailCode";
24
24
  })(MFAStrategyEnum || (MFAStrategyEnum = {}));
25
- export const LOAD_AUTHORIZATION_FF = 'admin_portal_should_load_authorization';
25
+ export const LOAD_AUTHORIZATION_FF = 'admin_portal_should_load_authorization';
26
+ export let PasswordRecoveryStrategyEnum;
27
+ (function (PasswordRecoveryStrategyEnum) {
28
+ PasswordRecoveryStrategyEnum["EMAIL"] = "email";
29
+ PasswordRecoveryStrategyEnum["SMS"] = "sms";
30
+ })(PasswordRecoveryStrategyEnum || (PasswordRecoveryStrategyEnum = {}));
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.68.0
1
+ /** @license Frontegg v7.69.0-alpha.1
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.
@@ -868,6 +868,9 @@ class AuthenticationApi extends _BaseApiClient.BaseApiClient {
868
868
  this.deleteIPRestriction = this.securityPolicy.deleteIPRestriction.bind(this.securityPolicy);
869
869
  this.testCurrentIp = this.securityPolicy.testCurrentIp.bind(this.securityPolicy);
870
870
  this.testCurrentIpInAllowList = this.securityPolicy.testCurrentIpInAllowList.bind(this.securityPolicy);
871
+ this.getPasswordRecoveryStrategies = async () => {
872
+ return this.get(`${_constants2.urls.identity.configurations.v1}/password-recovery/strategies`);
873
+ };
871
874
  }
872
875
  /**
873
876
  * @returns true if entitlements load should be done
@@ -7,9 +7,10 @@ var _exportNames = {
7
7
  SecondaryAuthStrategy: true,
8
8
  WebAuthnDeviceType: true,
9
9
  MFAStrategyEnum: true,
10
- LOAD_AUTHORIZATION_FF: true
10
+ LOAD_AUTHORIZATION_FF: true,
11
+ PasswordRecoveryStrategyEnum: true
11
12
  };
12
- exports.WebAuthnDeviceType = exports.SecondaryAuthStrategy = exports.MFAStrategyEnum = exports.LOAD_AUTHORIZATION_FF = void 0;
13
+ exports.WebAuthnDeviceType = exports.SecondaryAuthStrategy = exports.PasswordRecoveryStrategyEnum = exports.MFAStrategyEnum = exports.LOAD_AUTHORIZATION_FF = void 0;
13
14
  var _interfaces = require("./secutiry-poilicy/interfaces");
14
15
  Object.keys(_interfaces).forEach(function (key) {
15
16
  if (key === "default" || key === "__esModule") return;
@@ -49,4 +50,10 @@ exports.MFAStrategyEnum = MFAStrategyEnum;
49
50
  MFAStrategyEnum["EmailCode"] = "EmailCode";
50
51
  })(MFAStrategyEnum || (exports.MFAStrategyEnum = MFAStrategyEnum = {}));
51
52
  const LOAD_AUTHORIZATION_FF = 'admin_portal_should_load_authorization';
52
- exports.LOAD_AUTHORIZATION_FF = LOAD_AUTHORIZATION_FF;
53
+ exports.LOAD_AUTHORIZATION_FF = LOAD_AUTHORIZATION_FF;
54
+ let PasswordRecoveryStrategyEnum;
55
+ exports.PasswordRecoveryStrategyEnum = PasswordRecoveryStrategyEnum;
56
+ (function (PasswordRecoveryStrategyEnum) {
57
+ PasswordRecoveryStrategyEnum["EMAIL"] = "email";
58
+ PasswordRecoveryStrategyEnum["SMS"] = "sms";
59
+ })(PasswordRecoveryStrategyEnum || (exports.PasswordRecoveryStrategyEnum = PasswordRecoveryStrategyEnum = {}));
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.68.0
1
+ /** @license Frontegg v7.69.0-alpha.1
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": "7.68.0",
3
+ "version": "7.69.0-alpha.1",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "author": "Frontegg LTD",