@frontegg/rest-api 3.0.75 → 3.0.76

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
@@ -1,7 +1,7 @@
1
1
  export * from "./secutiry-poilicy";
2
2
  export * from "./enums";
3
3
  import { ISamlRolesGroup } from "../teams/interfaces";
4
- 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 } from "./interfaces";
4
+ 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 } from "./interfaces";
5
5
  /*****************************************
6
6
  * Authentication
7
7
  *****************************************/
@@ -615,6 +615,10 @@ export declare function webAuthnPostLogin(body: IWebAuthnPostLogin): Promise<ILo
615
615
  * webauthn create new device should be called once the user wants to add new device as authenticator
616
616
  */
617
617
  export declare function webAuthnCreateNewDeviceSession(): Promise<ICreateNewDeviceSessionResponse>;
618
+ /**
619
+ * get webauthn devices should be called in order to get user's webAuthn devices
620
+ */
621
+ export declare function getWebAuthnDevices(): Promise<IWebAuthnDevices>;
618
622
  /**
619
623
  * webauthn verify new device should be called after the user used his authenticator in order to register the new device
620
624
  */
package/auth/index.js CHANGED
@@ -518,6 +518,9 @@ export async function webAuthnPostLogin(body) {
518
518
  export async function webAuthnCreateNewDeviceSession() {
519
519
  return Post(urls.identity.webAuthnDevices.v1);
520
520
  }
521
+ export async function getWebAuthnDevices() {
522
+ return Get(urls.identity.webAuthnDevices.v1);
523
+ }
521
524
  export async function verifyNewDeviceSession(body) {
522
525
  return Post(`${urls.identity.webAuthnDevices.v1}/verify`, body);
523
526
  }
@@ -520,6 +520,14 @@ export declare enum WebAuthnDeviceType {
520
520
  Platform = "Platform",
521
521
  CrossPlatform = "CrossPlatform"
522
522
  }
523
+ export interface IWebAuthnDevice {
524
+ id: string;
525
+ deviceType: WebAuthnDeviceType;
526
+ createdAt: Date;
527
+ }
528
+ export interface IWebAuthnDevices {
529
+ devices: IWebAuthnDevice[];
530
+ }
523
531
  export interface IEnrollMFAWebAuthn extends IEnrollMFA {
524
532
  deviceType: WebAuthnDeviceType;
525
533
  webauthnToken: string;
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.0.75
1
+ /** @license Frontegg v3.0.76
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.
@@ -123,6 +123,7 @@ var _exportNames = {
123
123
  webAuthnPreLogin: true,
124
124
  webAuthnPostLogin: true,
125
125
  webAuthnCreateNewDeviceSession: true,
126
+ getWebAuthnDevices: true,
126
127
  verifyNewDeviceSession: true,
127
128
  getVendorPublicAuthStrategiesConfig: true,
128
129
  getMFAStrategiesConfig: true
@@ -191,6 +192,7 @@ exports.getUserApiTokensData = getUserApiTokensData;
191
192
  exports.getUserById = getUserById;
192
193
  exports.getVendorConfig = getVendorConfig;
193
194
  exports.getVendorPublicAuthStrategiesConfig = getVendorPublicAuthStrategiesConfig;
195
+ exports.getWebAuthnDevices = getWebAuthnDevices;
194
196
  exports.loadPasswordConfig = loadPasswordConfig;
195
197
  exports.login = login;
196
198
  exports.loginViaSocialLogin = loginViaSocialLogin;
@@ -920,6 +922,10 @@ async function webAuthnCreateNewDeviceSession() {
920
922
  return (0, _fetch.Post)(_constants.urls.identity.webAuthnDevices.v1);
921
923
  }
922
924
 
925
+ async function getWebAuthnDevices() {
926
+ return (0, _fetch.Get)(_constants.urls.identity.webAuthnDevices.v1);
927
+ }
928
+
923
929
  async function verifyNewDeviceSession(body) {
924
930
  return (0, _fetch.Post)(`${_constants.urls.identity.webAuthnDevices.v1}/verify`, body);
925
931
  }
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.0.75
1
+ /** @license Frontegg v3.0.76
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.75",
3
+ "version": "3.0.76",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {