@frontegg/rest-api 7.76.0-alpha.0 → 7.76.0-alpha.2
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/enums.d.ts +9 -0
- package/auth/enums.js +12 -1
- package/auth/index.d.ts +5 -1
- package/auth/index.js +3 -0
- package/auth/interfaces.d.ts +5 -1
- package/index.d.ts +3 -2
- package/index.js +5 -4
- package/node/auth/enums.js +15 -2
- package/node/auth/index.js +3 -0
- package/node/index.js +10 -2
- package/package.json +1 -1
package/auth/enums.d.ts
CHANGED
|
@@ -27,3 +27,12 @@ export declare enum SignUpStrategyEnum {
|
|
|
27
27
|
Email = "email",
|
|
28
28
|
PhoneNumber = "phoneNumber"
|
|
29
29
|
}
|
|
30
|
+
export declare enum EIdentifierType {
|
|
31
|
+
email = "email",
|
|
32
|
+
phoneNumber = "phoneNumber",
|
|
33
|
+
username = "username"
|
|
34
|
+
}
|
|
35
|
+
export declare enum PasswordRecoveryStrategyEnum {
|
|
36
|
+
Email = "email",
|
|
37
|
+
Sms = "sms"
|
|
38
|
+
}
|
package/auth/enums.js
CHANGED
|
@@ -30,4 +30,15 @@ export let SignUpStrategyEnum;
|
|
|
30
30
|
(function (SignUpStrategyEnum) {
|
|
31
31
|
SignUpStrategyEnum["Email"] = "email";
|
|
32
32
|
SignUpStrategyEnum["PhoneNumber"] = "phoneNumber";
|
|
33
|
-
})(SignUpStrategyEnum || (SignUpStrategyEnum = {}));
|
|
33
|
+
})(SignUpStrategyEnum || (SignUpStrategyEnum = {}));
|
|
34
|
+
export let EIdentifierType;
|
|
35
|
+
(function (EIdentifierType) {
|
|
36
|
+
EIdentifierType["email"] = "email";
|
|
37
|
+
EIdentifierType["phoneNumber"] = "phoneNumber";
|
|
38
|
+
EIdentifierType["username"] = "username";
|
|
39
|
+
})(EIdentifierType || (EIdentifierType = {}));
|
|
40
|
+
export let PasswordRecoveryStrategyEnum;
|
|
41
|
+
(function (PasswordRecoveryStrategyEnum) {
|
|
42
|
+
PasswordRecoveryStrategyEnum["Email"] = "email";
|
|
43
|
+
PasswordRecoveryStrategyEnum["Sms"] = "sms";
|
|
44
|
+
})(PasswordRecoveryStrategyEnum || (PasswordRecoveryStrategyEnum = {}));
|
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';
|
|
@@ -157,6 +157,10 @@ export declare class AuthenticationApi extends BaseApiClient {
|
|
|
157
157
|
* @throws exception if the user not found, password validation failed or invalid token.
|
|
158
158
|
*/
|
|
159
159
|
resetPassword: (body: IResetPassword) => Promise<void>;
|
|
160
|
+
/**
|
|
161
|
+
* Get the available password recovery strategies for the vendor.
|
|
162
|
+
*/
|
|
163
|
+
getPasswordRecoveryStrategies: () => Promise<IPasswordRecoveryStrategy[]>;
|
|
160
164
|
/**
|
|
161
165
|
* load password configuration for user.
|
|
162
166
|
*/
|
package/auth/index.js
CHANGED
|
@@ -210,6 +210,9 @@ export class AuthenticationApi extends BaseApiClient {
|
|
|
210
210
|
this.resetPassword = async body => {
|
|
211
211
|
return this.post(`${urls.identity.users.v1}/passwords/reset/verify`, body);
|
|
212
212
|
};
|
|
213
|
+
this.getPasswordRecoveryStrategies = async () => {
|
|
214
|
+
return this.get(`${urls.identity.configurations.v1}/password-recovery/strategies`);
|
|
215
|
+
};
|
|
213
216
|
this.loadPasswordConfig = async params => {
|
|
214
217
|
return this.get(`${urls.identity.users.v1}/passwords/config`, params);
|
|
215
218
|
};
|
package/auth/interfaces.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UserEntitlementsContext as UserEntitlementsResponseV2 } from '@frontegg/entitlements-javascript-commons';
|
|
2
2
|
import { ITenantsResponse, IUserProfile } from '..';
|
|
3
|
-
import { AuthStrategyEnum, MachineToMachineAuthStrategy, SignUpStrategyEnum, SocialLoginProviders } from './enums';
|
|
3
|
+
import { AuthStrategyEnum, MachineToMachineAuthStrategy, PasswordRecoveryStrategyEnum, SignUpStrategyEnum, SocialLoginProviders } from './enums';
|
|
4
4
|
import { ISamlRolesGroup } from '../teams/interfaces';
|
|
5
5
|
export * from './secutiry-poilicy/interfaces';
|
|
6
6
|
export type IPreLogin = {
|
|
@@ -723,3 +723,7 @@ export type TSignupStrategy = {
|
|
|
723
723
|
isRequired: boolean;
|
|
724
724
|
};
|
|
725
725
|
export type TSignupStrategyResponse = Array<TSignupStrategy>;
|
|
726
|
+
export interface IPasswordRecoveryStrategy {
|
|
727
|
+
strategy: PasswordRecoveryStrategyEnum;
|
|
728
|
+
isActive: boolean;
|
|
729
|
+
}
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthStrategyEnum, MachineToMachineAuthStrategy, SocialLoginProviders } from './auth';
|
|
1
|
+
import { AuthStrategyEnum, EIdentifierType, MachineToMachineAuthStrategy, SocialLoginProviders } from './auth';
|
|
2
2
|
import { ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType } from './subscriptions';
|
|
3
3
|
import { FronteggApiError } from './error';
|
|
4
4
|
import fetch, { FetchClient } from './FetchClient';
|
|
@@ -123,7 +123,7 @@ export type FronteggApiClient = {
|
|
|
123
123
|
userEmailPolicy: UserEmailPolicyApi;
|
|
124
124
|
};
|
|
125
125
|
declare const createApiClient: (appName: string) => FronteggApiClient;
|
|
126
|
-
export { fetch, FetchClient, ContextHolder, FronteggContext, api, createApiClient, FronteggApiError, AuthStrategyEnum, SocialLoginProviders, ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType, MachineToMachineAuthStrategy, };
|
|
126
|
+
export { fetch, FetchClient, ContextHolder, FronteggContext, api, createApiClient, FronteggApiError, AuthStrategyEnum, SocialLoginProviders, ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType, MachineToMachineAuthStrategy, EIdentifierType, };
|
|
127
127
|
declare const _default: {
|
|
128
128
|
fetch: FetchClient;
|
|
129
129
|
FetchClient: typeof FetchClient;
|
|
@@ -184,5 +184,6 @@ declare const _default: {
|
|
|
184
184
|
ISubscriptionStatus: typeof ISubscriptionStatus;
|
|
185
185
|
PaymentMethodType: typeof PaymentMethodType;
|
|
186
186
|
ProviderType: typeof ProviderType;
|
|
187
|
+
EIdentifierType: typeof EIdentifierType;
|
|
187
188
|
};
|
|
188
189
|
export default _default;
|
package/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/** @license Frontegg v7.76.0-alpha.
|
|
1
|
+
/** @license Frontegg v7.76.0-alpha.2
|
|
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.
|
|
5
5
|
*/
|
|
6
|
-
import { AuthStrategyEnum, MachineToMachineAuthStrategy, SocialLoginProviders } from './auth';
|
|
6
|
+
import { AuthStrategyEnum, EIdentifierType, MachineToMachineAuthStrategy, SocialLoginProviders } from './auth';
|
|
7
7
|
import { ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType } from './subscriptions';
|
|
8
8
|
import { FronteggApiError } from './error';
|
|
9
9
|
import fetch, { FetchClient } from './FetchClient';
|
|
@@ -127,7 +127,7 @@ const createApiClient = appName => ({
|
|
|
127
127
|
usernames: new UsernamesApi(appName),
|
|
128
128
|
userEmailPolicy: new UserEmailPolicyApi(appName)
|
|
129
129
|
});
|
|
130
|
-
export { fetch, FetchClient, ContextHolder, FronteggContext, api, createApiClient, FronteggApiError, AuthStrategyEnum, SocialLoginProviders, ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType, MachineToMachineAuthStrategy };
|
|
130
|
+
export { fetch, FetchClient, ContextHolder, FronteggContext, api, createApiClient, FronteggApiError, AuthStrategyEnum, SocialLoginProviders, ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType, MachineToMachineAuthStrategy, EIdentifierType };
|
|
131
131
|
export default {
|
|
132
132
|
fetch,
|
|
133
133
|
FetchClient,
|
|
@@ -142,5 +142,6 @@ export default {
|
|
|
142
142
|
ISubscriptionCancellationPolicy,
|
|
143
143
|
ISubscriptionStatus,
|
|
144
144
|
PaymentMethodType,
|
|
145
|
-
ProviderType
|
|
145
|
+
ProviderType,
|
|
146
|
+
EIdentifierType
|
|
146
147
|
};
|
package/node/auth/enums.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.SocialLoginProviders = exports.SignUpStrategyEnum = exports.MachineToMachineAuthStrategy = exports.AuthStrategyEnum = void 0;
|
|
6
|
+
exports.SocialLoginProviders = exports.SignUpStrategyEnum = exports.PasswordRecoveryStrategyEnum = exports.MachineToMachineAuthStrategy = exports.EIdentifierType = exports.AuthStrategyEnum = void 0;
|
|
7
7
|
let SocialLoginProviders;
|
|
8
8
|
exports.SocialLoginProviders = SocialLoginProviders;
|
|
9
9
|
(function (SocialLoginProviders) {
|
|
@@ -40,4 +40,17 @@ exports.SignUpStrategyEnum = SignUpStrategyEnum;
|
|
|
40
40
|
(function (SignUpStrategyEnum) {
|
|
41
41
|
SignUpStrategyEnum["Email"] = "email";
|
|
42
42
|
SignUpStrategyEnum["PhoneNumber"] = "phoneNumber";
|
|
43
|
-
})(SignUpStrategyEnum || (exports.SignUpStrategyEnum = SignUpStrategyEnum = {}));
|
|
43
|
+
})(SignUpStrategyEnum || (exports.SignUpStrategyEnum = SignUpStrategyEnum = {}));
|
|
44
|
+
let EIdentifierType;
|
|
45
|
+
exports.EIdentifierType = EIdentifierType;
|
|
46
|
+
(function (EIdentifierType) {
|
|
47
|
+
EIdentifierType["email"] = "email";
|
|
48
|
+
EIdentifierType["phoneNumber"] = "phoneNumber";
|
|
49
|
+
EIdentifierType["username"] = "username";
|
|
50
|
+
})(EIdentifierType || (exports.EIdentifierType = EIdentifierType = {}));
|
|
51
|
+
let PasswordRecoveryStrategyEnum;
|
|
52
|
+
exports.PasswordRecoveryStrategyEnum = PasswordRecoveryStrategyEnum;
|
|
53
|
+
(function (PasswordRecoveryStrategyEnum) {
|
|
54
|
+
PasswordRecoveryStrategyEnum["Email"] = "email";
|
|
55
|
+
PasswordRecoveryStrategyEnum["Sms"] = "sms";
|
|
56
|
+
})(PasswordRecoveryStrategyEnum || (exports.PasswordRecoveryStrategyEnum = PasswordRecoveryStrategyEnum = {}));
|
package/node/auth/index.js
CHANGED
|
@@ -275,6 +275,9 @@ class AuthenticationApi extends _BaseApiClient.BaseApiClient {
|
|
|
275
275
|
this.resetPassword = async body => {
|
|
276
276
|
return this.post(`${_constants2.urls.identity.users.v1}/passwords/reset/verify`, body);
|
|
277
277
|
};
|
|
278
|
+
this.getPasswordRecoveryStrategies = async () => {
|
|
279
|
+
return this.get(`${_constants2.urls.identity.configurations.v1}/password-recovery/strategies`);
|
|
280
|
+
};
|
|
278
281
|
this.loadPasswordConfig = async params => {
|
|
279
282
|
return this.get(`${_constants2.urls.identity.users.v1}/passwords/config`, params);
|
|
280
283
|
};
|
package/node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license Frontegg v7.76.0-alpha.
|
|
1
|
+
/** @license Frontegg v7.76.0-alpha.2
|
|
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.
|
|
@@ -12,6 +12,7 @@ var _exportNames = {
|
|
|
12
12
|
api: true,
|
|
13
13
|
createApiClient: true,
|
|
14
14
|
AuthStrategyEnum: true,
|
|
15
|
+
EIdentifierType: true,
|
|
15
16
|
MachineToMachineAuthStrategy: true,
|
|
16
17
|
SocialLoginProviders: true,
|
|
17
18
|
setTabTenantInSessionStorage: true,
|
|
@@ -43,6 +44,12 @@ Object.defineProperty(exports, "ContextHolder", {
|
|
|
43
44
|
return _ContextHolder.ContextHolder;
|
|
44
45
|
}
|
|
45
46
|
});
|
|
47
|
+
Object.defineProperty(exports, "EIdentifierType", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function () {
|
|
50
|
+
return _auth.EIdentifierType;
|
|
51
|
+
}
|
|
52
|
+
});
|
|
46
53
|
Object.defineProperty(exports, "FRONTEGG_SEPARATE_TABS_BY_TENANT", {
|
|
47
54
|
enumerable: true,
|
|
48
55
|
get: function () {
|
|
@@ -615,6 +622,7 @@ var _default = {
|
|
|
615
622
|
ISubscriptionCancellationPolicy: _subscriptions.ISubscriptionCancellationPolicy,
|
|
616
623
|
ISubscriptionStatus: _subscriptions.ISubscriptionStatus,
|
|
617
624
|
PaymentMethodType: _subscriptions.PaymentMethodType,
|
|
618
|
-
ProviderType: _subscriptions.ProviderType
|
|
625
|
+
ProviderType: _subscriptions.ProviderType,
|
|
626
|
+
EIdentifierType: _auth.EIdentifierType
|
|
619
627
|
};
|
|
620
628
|
exports.default = _default;
|