@frontegg/rest-api 3.1.42 → 3.1.43

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
@@ -2,7 +2,7 @@ export * from "./secutiry-poilicy";
2
2
  export * from "./enums";
3
3
  export { setTabTenantInSessionStorage, getTabTenantFromSessionStorage, getCurrentUserTenantsFunction } from './utils';
4
4
  import { ISamlRolesGroup } from "../teams/interfaces";
5
- import { IAcceptInvitation, IActivateAccount, 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 } from './interfaces';
5
+ import { IAcceptInvitation, IActivateAccount, 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 } from './interfaces';
6
6
  import { IGetUserAuthorizationResponse, IUserProfile } from "../users/interfaces";
7
7
  /*****************************************
8
8
  * Authentication
@@ -761,3 +761,7 @@ export declare function getMeV2(): Promise<IUserProfile>;
761
761
  * Me request will be executed, and me authorization and entitlements will be executed according to FF and configuration.
762
762
  */
763
763
  export declare function getMeAndEntitlements(): Promise<IUserProfile>;
764
+ /**
765
+ * generate step-up session
766
+ */
767
+ export declare function generateStepupSession(body: GenerateStepUpRequest): Promise<GenerateStepUpResponse>;
package/auth/index.js CHANGED
@@ -747,4 +747,7 @@ export async function getMeAndEntitlements() {
747
747
  return _extends({}, me, authorization != null ? authorization : {}, {
748
748
  entitlements
749
749
  });
750
+ }
751
+ export async function generateStepupSession(body) {
752
+ return Post(`${urls.identity.auth.v1}/user/step-up`, body);
750
753
  }
@@ -485,6 +485,14 @@ export interface IWebAuthnPostLogin {
485
485
  invitationToken?: string;
486
486
  response: WebAuthnLoginResponse;
487
487
  }
488
+ export interface GenerateStepUpRequest {
489
+ maxAge?: number;
490
+ }
491
+ export interface GenerateStepUpResponse {
492
+ mfaToken: string;
493
+ mfaEnrolled: boolean;
494
+ mfaDevices: UserMFADevicesResponse;
495
+ }
488
496
  export interface ICreateNewDeviceSessionResponse {
489
497
  rp: {
490
498
  name: string;
@@ -624,6 +632,9 @@ export interface UserMFAWebAuthnDevice {
624
632
  deviceType: WebAuthnDeviceType;
625
633
  name: string;
626
634
  }
635
+ export interface UserMFAEmail {
636
+ email: string;
637
+ }
627
638
  export interface UserMFAPhoneDevice {
628
639
  id: string;
629
640
  phoneNumber: string;
@@ -635,6 +646,7 @@ export interface UserMFADevicesResponse {
635
646
  webauthn: UserMFAWebAuthnDevice[];
636
647
  phones: UserMFAPhoneDevice[];
637
648
  authenticators: UserMFAAuthenticatorApp[];
649
+ emails: UserMFAEmail[];
638
650
  }
639
651
  export interface IPreDisableMFASMSResponse {
640
652
  otcToken: string;
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.1.42
1
+ /** @license Frontegg v3.1.43
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.
@@ -154,6 +154,7 @@ var _exportNames = {
154
154
  getUserAuthorization: true,
155
155
  getMeV2: true,
156
156
  getMeAndEntitlements: true,
157
+ generateStepupSession: true,
157
158
  setTabTenantInSessionStorage: true,
158
159
  getTabTenantFromSessionStorage: true,
159
160
  getCurrentUserTenantsFunction: true
@@ -207,6 +208,7 @@ exports.generateLoginResponseFromOAuthResponse = generateLoginResponseFromOAuthR
207
208
  exports.generateLoginResponseFromOAuthResponseV2 = generateLoginResponseFromOAuthResponseV2;
208
209
  exports.generateLoginResponseV2 = generateLoginResponseV2;
209
210
  exports.generateLoginResponseV3 = generateLoginResponseV3;
211
+ exports.generateStepupSession = generateStepupSession;
210
212
  exports.getActivateAccountStrategy = getActivateAccountStrategy;
211
213
  exports.getCurrentUserSession = getCurrentUserSession;
212
214
  exports.getCurrentUserSessions = getCurrentUserSessions;
@@ -1264,4 +1266,8 @@ async function getMeAndEntitlements() {
1264
1266
  return (0, _extends2.default)({}, me, authorization != null ? authorization : {}, {
1265
1267
  entitlements
1266
1268
  });
1269
+ }
1270
+
1271
+ async function generateStepupSession(body) {
1272
+ return (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/step-up`, body);
1267
1273
  }
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.1.42
1
+ /** @license Frontegg v3.1.43
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.1.42",
3
+ "version": "3.1.43",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {