@frontegg/rest-api 3.0.35 → 3.0.36

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 } 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 } from './interfaces';
5
5
  /*****************************************
6
6
  * Authentication
7
7
  *****************************************/
@@ -149,12 +149,12 @@ export declare function disableMfa(body: IDisableMfa): Promise<void>;
149
149
  * pre enroll Multi-Factor Auth Code to use in 3rd party apps like Google Authenticator.
150
150
  * the server returns qrCode as png image in base64 format
151
151
  */
152
- export declare function preEnrollAuthenticatorAppForLogin(body: IPreEnrollMFA): Promise<IPreEnrollMFAAuthenticatorAppResponse>;
152
+ export declare function preEnrollMFAAuthenticatorAppForLogin(body: IPreEnrollMFA): Promise<IPreEnrollMFAAuthenticatorAppResponse>;
153
153
  /**
154
154
  * after pre enroll with authenticator app, enroll authenticator app function should be called
155
155
  * with the generated code in the Authenticator App
156
156
  */
157
- export declare function enrollAuthenticatorAppForLogin(body: IEnrollMFAAuthenticatorApp): Promise<ILoginResponse>;
157
+ export declare function enrollMFAAuthenticatorAppForLogin(body: IEnrollMFAAuthenticatorApp): Promise<ILoginResponse>;
158
158
  /**
159
159
  * after login succeeded with mfaRequired token response, this function should be called
160
160
  * with the selected authenticator app id, mfaToken and the generated code from your authenticator app.
@@ -165,12 +165,12 @@ export declare function verifyMFAAuthenticatorAppForLogin(deviceId: string, body
165
165
  * the server returns otcToken that should be sent to the enroll function with the code that was sent to
166
166
  * the request phone number
167
167
  */
168
- export declare function preEnrollSMSForLogin(body: IPreEnrollMFASMS): Promise<void>;
168
+ export declare function preEnrollMFASMSForLogin(body: IPreEnrollMFASMS): Promise<void>;
169
169
  /**
170
170
  * after pre enroll with SMS, enroll SMS function should be called
171
171
  * with the otcToken and the code that has been sent to the phone number that was requested
172
172
  */
173
- export declare function enrollSMSForLogin(body: IEnrollMFASMS): Promise<ILoginResponse>;
173
+ export declare function enrollMFASMSForLogin(body: IEnrollMFASMS): Promise<ILoginResponse>;
174
174
  /**
175
175
  * after login succeeded with mfaRequired token response, if the user asked to use SMS as MFA
176
176
  * this function should be called with the selected device id and mfaToken
@@ -182,26 +182,26 @@ export declare function preVerifyMFASMSForLogin(deviceId: string, body: IPreVeri
182
182
  */
183
183
  export declare function verifyMFASMSForLogin(deviceId: string, body: IVerifyMFASMS): Promise<ILoginResponse>;
184
184
  /**
185
- * pre enroll Multi-Factor to use with WebAuthN
185
+ * pre enroll Multi-Factor to use with WebAuthn
186
186
  * the server returns attestation object
187
187
  * the request phone number
188
188
  */
189
- export declare function preEnrollWebAuthNForLogin(body: IPreEnrollMFA): Promise<IPreEnrollMFAWebAuthNResponse>;
189
+ export declare function preEnrollMFAWebAuthnForLogin(body: IPreEnrollMFA): Promise<IPreEnrollMFAWebAuthnResponse>;
190
190
  /**
191
- * after pre enroll with WebAuthN, enroll WebAuthN function should be called
191
+ * after pre enroll with WebAuthn, enroll WebAuthn function should be called
192
192
  * with the webauthnToken and the attestation object response
193
193
  */
194
- export declare function enrollWebAuthnForLogin(body: IEnrollMFAWebAuthN): Promise<ILoginResponse>;
194
+ export declare function enrollMFAWebAuthnForLogin(body: IEnrollMFAWebAuthn): Promise<ILoginResponse>;
195
195
  /**
196
- * after login succeeded with mfaRequired token response, if the user asked to use WebAuthN as MFA
196
+ * after login succeeded with mfaRequired token response, if the user asked to use WebAuthn as MFA
197
197
  * this function should be called with the selected device id and mfaToken.
198
198
  */
199
- export declare function preVerifyMFAWebAuthNForLogin(deviceId: string, body: IPreVerifyMFA): Promise<IPreVerifyMFAWebAuthNResponse>;
199
+ export declare function preVerifyMFAWebAuthnForLogin(deviceId: string, body: IPreVerifyMFA): Promise<IPreVerifyMFAWebAuthnResponse>;
200
200
  /**
201
- * after pre verify with WebAuthN, this function should be called with webauthnTokenToken, mfaToken
201
+ * after pre verify with WebAuthn, this function should be called with webauthnTokenToken, mfaToken
202
202
  * and the assertion response.
203
203
  */
204
- export declare function verifyMFAWebAuthNForLogin(deviceId: string, body: IVerifyMFAWebAuthN): Promise<ILoginResponse>;
204
+ export declare function verifyMFAWebAuthnForLogin(deviceId: string, body: IVerifyMFAWebAuthn): Promise<ILoginResponse>;
205
205
  /**
206
206
  * SSO Configurations
207
207
  */
package/auth/index.js CHANGED
@@ -134,19 +134,19 @@ export async function verifyMfa(body) {
134
134
  export async function disableMfa(body) {
135
135
  return Post(`${urls.identity.users.v1}/mfa/disable`, body);
136
136
  }
137
- export async function preEnrollAuthenticatorAppForLogin(body) {
137
+ export async function preEnrollMFAAuthenticatorAppForLogin(body) {
138
138
  return Post(`${urls.identity.auth.v1}/user/mfa/authenticator/enroll`, body);
139
139
  }
140
- export async function enrollAuthenticatorAppForLogin(body) {
140
+ export async function enrollMFAAuthenticatorAppForLogin(body) {
141
141
  return Post(`${urls.identity.auth.v1}/user/mfa/authenticator/enroll/verify`, body);
142
142
  }
143
143
  export async function verifyMFAAuthenticatorAppForLogin(deviceId, body) {
144
144
  return Post(`${urls.identity.auth.v1}/user/mfa/authenticator/${deviceId}/verify`, body);
145
145
  }
146
- export async function preEnrollSMSForLogin(body) {
146
+ export async function preEnrollMFASMSForLogin(body) {
147
147
  return Post(`${urls.identity.auth.v1}/user/mfa/sms/enroll`, body);
148
148
  }
149
- export async function enrollSMSForLogin(body) {
149
+ export async function enrollMFASMSForLogin(body) {
150
150
  return Post(`${urls.identity.auth.v1}/user/mfa/sms/enroll/verify`, body);
151
151
  }
152
152
  export async function preVerifyMFASMSForLogin(deviceId, body) {
@@ -155,16 +155,16 @@ export async function preVerifyMFASMSForLogin(deviceId, body) {
155
155
  export async function verifyMFASMSForLogin(deviceId, body) {
156
156
  return Post(`${urls.identity.auth.v1}/user/mfa/sms/${deviceId}/verify`, body);
157
157
  }
158
- export async function preEnrollWebAuthNForLogin(body) {
158
+ export async function preEnrollMFAWebAuthnForLogin(body) {
159
159
  return Post(`${urls.identity.auth.v1}/user/mfa/webauthn/enroll`, body);
160
160
  }
161
- export async function enrollWebAuthnForLogin(body) {
161
+ export async function enrollMFAWebAuthnForLogin(body) {
162
162
  return Post(`${urls.identity.auth.v1}/user/mfa/webauthn/enroll/verify`, body);
163
163
  }
164
- export async function preVerifyMFAWebAuthNForLogin(deviceId, body) {
164
+ export async function preVerifyMFAWebAuthnForLogin(deviceId, body) {
165
165
  return Post(`${urls.identity.auth.v1}/user/mfa/webauthn/${deviceId}`, body);
166
166
  }
167
- export async function verifyMFAWebAuthNForLogin(deviceId, body) {
167
+ export async function verifyMFAWebAuthnForLogin(deviceId, body) {
168
168
  return Post(`${urls.identity.auth.v1}/user/mfa/webauthn/${deviceId}/verify`, body);
169
169
  }
170
170
  export async function getSamlConfiguration() {
@@ -41,6 +41,8 @@ export declare type ILoginResponse = IUserProfile & {
41
41
  emailVerified?: boolean;
42
42
  redirectLocation?: string;
43
43
  userEmail?: string;
44
+ mfaStrategies?: MFAStrategyEnum[];
45
+ mfaDevices?: UserMFADevicesResponse[];
44
46
  };
45
47
  export declare type ILoginResponseV2 = {
46
48
  user: ILoginResponse;
@@ -474,12 +476,13 @@ export declare enum WebAuthnDeviceType {
474
476
  USBKey = "USBKey",
475
477
  TouchID = "TouchID"
476
478
  }
477
- export interface IEnrollMFAWebAuthN extends IEnrollMFA {
479
+ export interface IEnrollMFAWebAuthn extends IEnrollMFA {
478
480
  deviceType: WebAuthnDeviceType;
479
481
  webauthnToken: string;
480
482
  options: IVerifyNewWebAuthnDevice;
481
483
  }
482
- export interface IPreEnrollMFAWebAuthNResponse {
484
+ export interface IPreEnrollMFAWebAuthnResponse {
485
+ webauthnToken: string;
483
486
  options: ICreateNewDeviceSessionResponse;
484
487
  }
485
488
  export interface IPreVerifyMFA {
@@ -500,11 +503,33 @@ export interface IVerifyMFASMS extends IVerifyMFA {
500
503
  otcToken: string;
501
504
  code: string;
502
505
  }
503
- export interface IPreVerifyMFAWebAuthNResponse {
506
+ export interface IPreVerifyMFAWebAuthnResponse {
504
507
  webauthnToken: string;
505
508
  options: IWebAuthnPreLoginResponse;
506
509
  }
507
- export interface IVerifyMFAWebAuthN extends IVerifyMFA {
510
+ export interface IVerifyMFAWebAuthn extends IVerifyMFA {
508
511
  webauthnToken: string;
509
512
  options: Omit<IWebAuthnPostLogin, "recaptchaToken" | "invitationToken">;
510
513
  }
514
+ export declare enum MFAStrategyEnum {
515
+ AuthenticatorApp = "AuthenticatorApp",
516
+ WebAuthn = "WebAuthn",
517
+ SMS = "SMS"
518
+ }
519
+ export interface UserMFAWebAuthnDevice {
520
+ id: string;
521
+ deviceType: WebAuthnDeviceType;
522
+ name: string;
523
+ }
524
+ export interface UserMFAPhoneDevice {
525
+ id: string;
526
+ phoneNumber: string;
527
+ }
528
+ export interface UserMFAAuthenticatorApp {
529
+ id: string;
530
+ }
531
+ export interface UserMFADevicesResponse {
532
+ webauthn: UserMFAWebAuthnDevice[];
533
+ phones: UserMFAPhoneDevice[];
534
+ authenticators: UserMFAAuthenticatorApp[];
535
+ }
@@ -21,4 +21,12 @@ export let WebAuthnDeviceType;
21
21
  WebAuthnDeviceType["Android"] = "Android";
22
22
  WebAuthnDeviceType["USBKey"] = "USBKey";
23
23
  WebAuthnDeviceType["TouchID"] = "TouchID";
24
- })(WebAuthnDeviceType || (WebAuthnDeviceType = {}));
24
+ })(WebAuthnDeviceType || (WebAuthnDeviceType = {}));
25
+
26
+ export let MFAStrategyEnum;
27
+
28
+ (function (MFAStrategyEnum) {
29
+ MFAStrategyEnum["AuthenticatorApp"] = "AuthenticatorApp";
30
+ MFAStrategyEnum["WebAuthn"] = "WebAuthn";
31
+ MFAStrategyEnum["SMS"] = "SMS";
32
+ })(MFAStrategyEnum || (MFAStrategyEnum = {}));
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.0.35
1
+ /** @license Frontegg v3.0.36
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.
@@ -30,17 +30,17 @@ var _exportNames = {
30
30
  enrollMfa: true,
31
31
  verifyMfa: true,
32
32
  disableMfa: true,
33
- preEnrollAuthenticatorAppForLogin: true,
34
- enrollAuthenticatorAppForLogin: true,
33
+ preEnrollMFAAuthenticatorAppForLogin: true,
34
+ enrollMFAAuthenticatorAppForLogin: true,
35
35
  verifyMFAAuthenticatorAppForLogin: true,
36
- preEnrollSMSForLogin: true,
37
- enrollSMSForLogin: true,
36
+ preEnrollMFASMSForLogin: true,
37
+ enrollMFASMSForLogin: true,
38
38
  preVerifyMFASMSForLogin: true,
39
39
  verifyMFASMSForLogin: true,
40
- preEnrollWebAuthNForLogin: true,
41
- enrollWebAuthnForLogin: true,
42
- preVerifyMFAWebAuthNForLogin: true,
43
- verifyMFAWebAuthNForLogin: true,
40
+ preEnrollMFAWebAuthnForLogin: true,
41
+ enrollMFAWebAuthnForLogin: true,
42
+ preVerifyMFAWebAuthnForLogin: true,
43
+ verifyMFAWebAuthnForLogin: true,
44
44
  getSamlConfiguration: true,
45
45
  updateSamlConfiguration: true,
46
46
  getSamlVendorConfiguration: true,
@@ -127,10 +127,10 @@ exports.deleteSessionForUser = deleteSessionForUser;
127
127
  exports.deleteTenantApiToken = deleteTenantApiToken;
128
128
  exports.deleteUserApiToken = deleteUserApiToken;
129
129
  exports.disableMfa = disableMfa;
130
- exports.enrollAuthenticatorAppForLogin = enrollAuthenticatorAppForLogin;
130
+ exports.enrollMFAAuthenticatorAppForLogin = enrollMFAAuthenticatorAppForLogin;
131
+ exports.enrollMFASMSForLogin = enrollMFASMSForLogin;
132
+ exports.enrollMFAWebAuthnForLogin = enrollMFAWebAuthnForLogin;
131
133
  exports.enrollMfa = enrollMfa;
132
- exports.enrollSMSForLogin = enrollSMSForLogin;
133
- exports.enrollWebAuthnForLogin = enrollWebAuthnForLogin;
134
134
  exports.exchangeOAuthTokens = exchangeOAuthTokens;
135
135
  exports.forgotPassword = forgotPassword;
136
136
  exports.generateLoginResponse = generateLoginResponse;
@@ -166,14 +166,14 @@ exports.oidcPostLoginV2 = oidcPostLoginV2;
166
166
  exports.passwordlessPostLogin = passwordlessPostLogin;
167
167
  exports.passwordlessPreLogin = passwordlessPreLogin;
168
168
  exports.postLogin = postLogin;
169
- exports.preEnrollAuthenticatorAppForLogin = preEnrollAuthenticatorAppForLogin;
170
- exports.preEnrollSMSForLogin = preEnrollSMSForLogin;
171
- exports.preEnrollWebAuthNForLogin = preEnrollWebAuthNForLogin;
169
+ exports.preEnrollMFAAuthenticatorAppForLogin = preEnrollMFAAuthenticatorAppForLogin;
170
+ exports.preEnrollMFASMSForLogin = preEnrollMFASMSForLogin;
171
+ exports.preEnrollMFAWebAuthnForLogin = preEnrollMFAWebAuthnForLogin;
172
172
  exports.preLogin = preLogin;
173
173
  exports.preLoginV2 = preLoginV2;
174
174
  exports.preLoginWithIdpType = preLoginWithIdpType;
175
175
  exports.preVerifyMFASMSForLogin = preVerifyMFASMSForLogin;
176
- exports.preVerifyMFAWebAuthNForLogin = preVerifyMFAWebAuthNForLogin;
176
+ exports.preVerifyMFAWebAuthnForLogin = preVerifyMFAWebAuthnForLogin;
177
177
  exports.recoverMfaToken = recoverMfaToken;
178
178
  exports.refreshToken = refreshToken;
179
179
  exports.refreshTokenV2 = refreshTokenV2;
@@ -200,7 +200,7 @@ exports.verifyChangePhoneNumber = verifyChangePhoneNumber;
200
200
  exports.verifyInviteToken = verifyInviteToken;
201
201
  exports.verifyMFAAuthenticatorAppForLogin = verifyMFAAuthenticatorAppForLogin;
202
202
  exports.verifyMFASMSForLogin = verifyMFASMSForLogin;
203
- exports.verifyMFAWebAuthNForLogin = verifyMFAWebAuthNForLogin;
203
+ exports.verifyMFAWebAuthnForLogin = verifyMFAWebAuthnForLogin;
204
204
  exports.verifyMfa = verifyMfa;
205
205
  exports.verifyNewDeviceSession = verifyNewDeviceSession;
206
206
  exports.verifyResetPhoneNumber = verifyResetPhoneNumber;
@@ -405,11 +405,11 @@ async function disableMfa(body) {
405
405
  return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/mfa/disable`, body);
406
406
  }
407
407
 
408
- async function preEnrollAuthenticatorAppForLogin(body) {
408
+ async function preEnrollMFAAuthenticatorAppForLogin(body) {
409
409
  return (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/mfa/authenticator/enroll`, body);
410
410
  }
411
411
 
412
- async function enrollAuthenticatorAppForLogin(body) {
412
+ async function enrollMFAAuthenticatorAppForLogin(body) {
413
413
  return (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/mfa/authenticator/enroll/verify`, body);
414
414
  }
415
415
 
@@ -417,11 +417,11 @@ async function verifyMFAAuthenticatorAppForLogin(deviceId, body) {
417
417
  return (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/mfa/authenticator/${deviceId}/verify`, body);
418
418
  }
419
419
 
420
- async function preEnrollSMSForLogin(body) {
420
+ async function preEnrollMFASMSForLogin(body) {
421
421
  return (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/mfa/sms/enroll`, body);
422
422
  }
423
423
 
424
- async function enrollSMSForLogin(body) {
424
+ async function enrollMFASMSForLogin(body) {
425
425
  return (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/mfa/sms/enroll/verify`, body);
426
426
  }
427
427
 
@@ -433,19 +433,19 @@ async function verifyMFASMSForLogin(deviceId, body) {
433
433
  return (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/mfa/sms/${deviceId}/verify`, body);
434
434
  }
435
435
 
436
- async function preEnrollWebAuthNForLogin(body) {
436
+ async function preEnrollMFAWebAuthnForLogin(body) {
437
437
  return (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/mfa/webauthn/enroll`, body);
438
438
  }
439
439
 
440
- async function enrollWebAuthnForLogin(body) {
440
+ async function enrollMFAWebAuthnForLogin(body) {
441
441
  return (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/mfa/webauthn/enroll/verify`, body);
442
442
  }
443
443
 
444
- async function preVerifyMFAWebAuthNForLogin(deviceId, body) {
444
+ async function preVerifyMFAWebAuthnForLogin(deviceId, body) {
445
445
  return (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/mfa/webauthn/${deviceId}`, body);
446
446
  }
447
447
 
448
- async function verifyMFAWebAuthNForLogin(deviceId, body) {
448
+ async function verifyMFAWebAuthnForLogin(deviceId, body) {
449
449
  return (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/mfa/webauthn/${deviceId}/verify`, body);
450
450
  }
451
451
 
@@ -5,9 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  var _exportNames = {
7
7
  SecondaryAuthStrategy: true,
8
- WebAuthnDeviceType: true
8
+ WebAuthnDeviceType: true,
9
+ MFAStrategyEnum: true
9
10
  };
10
- exports.WebAuthnDeviceType = exports.SecondaryAuthStrategy = void 0;
11
+ exports.WebAuthnDeviceType = exports.SecondaryAuthStrategy = exports.MFAStrategyEnum = void 0;
11
12
 
12
13
  var _interfaces = require("./secutiry-poilicy/interfaces");
13
14
 
@@ -46,4 +47,13 @@ exports.WebAuthnDeviceType = WebAuthnDeviceType;
46
47
  WebAuthnDeviceType["Android"] = "Android";
47
48
  WebAuthnDeviceType["USBKey"] = "USBKey";
48
49
  WebAuthnDeviceType["TouchID"] = "TouchID";
49
- })(WebAuthnDeviceType || (exports.WebAuthnDeviceType = WebAuthnDeviceType = {}));
50
+ })(WebAuthnDeviceType || (exports.WebAuthnDeviceType = WebAuthnDeviceType = {}));
51
+
52
+ let MFAStrategyEnum;
53
+ exports.MFAStrategyEnum = MFAStrategyEnum;
54
+
55
+ (function (MFAStrategyEnum) {
56
+ MFAStrategyEnum["AuthenticatorApp"] = "AuthenticatorApp";
57
+ MFAStrategyEnum["WebAuthn"] = "WebAuthn";
58
+ MFAStrategyEnum["SMS"] = "SMS";
59
+ })(MFAStrategyEnum || (exports.MFAStrategyEnum = MFAStrategyEnum = {}));
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.0.35
1
+ /** @license Frontegg v3.0.36
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.35",
3
+ "version": "3.0.36",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {