@frontegg/rest-api 3.0.27 → 3.0.29
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 +8 -1
- package/auth/index.js +3 -0
- package/auth/interfaces.d.ts +4 -0
- package/index.js +1 -1
- package/node/auth/index.js +6 -0
- package/node/index.js +1 -1
- package/package.json +1 -1
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 } 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 } from './interfaces';
|
|
5
5
|
/*****************************************
|
|
6
6
|
* Authentication
|
|
7
7
|
*****************************************/
|
|
@@ -66,6 +66,13 @@ export declare function getActivateAccountStrategy(params: IGetActivateAccountSt
|
|
|
66
66
|
* @throws exception if resend failed
|
|
67
67
|
*/
|
|
68
68
|
export declare function resendActivationEmail(body: IResendActivationEmail): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* resend invitation email should be called after a failed user invitation.
|
|
71
|
+
* ``resend invitation email`` should contain the user email.
|
|
72
|
+
*
|
|
73
|
+
* @throws exception if resend failed
|
|
74
|
+
*/
|
|
75
|
+
export declare function resendInvitationEmail(body: IResendInvitationEmail): Promise<void>;
|
|
69
76
|
/**
|
|
70
77
|
* activating account should be called after registering new user of deactivate account
|
|
71
78
|
* ``activateAccount`` should contains userId and the token that has been sent to the user after activation requested.
|
package/auth/index.js
CHANGED
|
@@ -96,6 +96,9 @@ export async function getActivateAccountStrategy(params) {
|
|
|
96
96
|
export async function resendActivationEmail(body) {
|
|
97
97
|
return Post(`${urls.identity.users.v1}/activate/reset`, body);
|
|
98
98
|
}
|
|
99
|
+
export async function resendInvitationEmail(body) {
|
|
100
|
+
return Post(`${urls.identity.users.v1}/invitation/reset`, body);
|
|
101
|
+
}
|
|
99
102
|
export async function acceptInvitation(body) {
|
|
100
103
|
return Post(`${urls.identity.users.v1}/invitation/accept`, body);
|
|
101
104
|
}
|
package/auth/interfaces.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ export declare type IActivateAccount = {
|
|
|
57
57
|
token: string;
|
|
58
58
|
password?: string;
|
|
59
59
|
recaptchaToken?: string;
|
|
60
|
+
lastTermsCheck?: string;
|
|
60
61
|
};
|
|
61
62
|
export declare type IAcceptInvitation = {
|
|
62
63
|
userId: string;
|
|
@@ -65,6 +66,9 @@ export declare type IAcceptInvitation = {
|
|
|
65
66
|
export declare type IResendActivationEmail = {
|
|
66
67
|
email: string;
|
|
67
68
|
};
|
|
69
|
+
export declare type IResendInvitationEmail = {
|
|
70
|
+
email: string;
|
|
71
|
+
};
|
|
68
72
|
export declare type IForgotPassword = {
|
|
69
73
|
email: string;
|
|
70
74
|
};
|
package/index.js
CHANGED
package/node/auth/index.js
CHANGED
|
@@ -18,6 +18,7 @@ var _exportNames = {
|
|
|
18
18
|
activateAccount: true,
|
|
19
19
|
getActivateAccountStrategy: true,
|
|
20
20
|
resendActivationEmail: true,
|
|
21
|
+
resendInvitationEmail: true,
|
|
21
22
|
acceptInvitation: true,
|
|
22
23
|
refreshToken: true,
|
|
23
24
|
refreshTokenV2: true,
|
|
@@ -158,6 +159,7 @@ exports.recoverMfaToken = recoverMfaToken;
|
|
|
158
159
|
exports.refreshToken = refreshToken;
|
|
159
160
|
exports.refreshTokenV2 = refreshTokenV2;
|
|
160
161
|
exports.resendActivationEmail = resendActivationEmail;
|
|
162
|
+
exports.resendInvitationEmail = resendInvitationEmail;
|
|
161
163
|
exports.resetPassword = resetPassword;
|
|
162
164
|
exports.resetPhoneNumber = resetPhoneNumber;
|
|
163
165
|
exports.revokeSessionsForUser = revokeSessionsForUser;
|
|
@@ -331,6 +333,10 @@ async function resendActivationEmail(body) {
|
|
|
331
333
|
return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/activate/reset`, body);
|
|
332
334
|
}
|
|
333
335
|
|
|
336
|
+
async function resendInvitationEmail(body) {
|
|
337
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/invitation/reset`, body);
|
|
338
|
+
}
|
|
339
|
+
|
|
334
340
|
async function acceptInvitation(body) {
|
|
335
341
|
return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/invitation/accept`, body);
|
|
336
342
|
}
|
package/node/index.js
CHANGED