@frontegg/rest-api 3.0.26 → 3.0.28
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 +9 -1
- package/auth/index.js +7 -0
- package/auth/interfaces.d.ts +3 -0
- package/index.js +1 -1
- package/node/auth/index.js +13 -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.
|
|
@@ -411,6 +418,7 @@ export declare function preLoginV2(body: IPreLogin): Promise<IPreLoginWithIdpTyp
|
|
|
411
418
|
*/
|
|
412
419
|
export declare function oidcPostLoginV2(body: IOidcPostLoginV2): Promise<ILoginResponse>;
|
|
413
420
|
export declare function exchangeOAuthTokens(body: IExchangeOAuthTokens): Promise<ILoginResponse>;
|
|
421
|
+
export declare function silentOAuthRefreshToken(): Promise<ILoginResponse>;
|
|
414
422
|
/**
|
|
415
423
|
* reset phone should be called in case user want to reset his phone number
|
|
416
424
|
* when using sms authentication strategy. a 6-digits code will be send to the user email.
|
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
|
}
|
|
@@ -386,6 +389,10 @@ export async function exchangeOAuthTokens(body) {
|
|
|
386
389
|
const data = await Post(`${urls.oauth.v1}/token`, body);
|
|
387
390
|
return generateLoginResponseFromOAuthResponse(data);
|
|
388
391
|
}
|
|
392
|
+
export async function silentOAuthRefreshToken() {
|
|
393
|
+
const data = await Post(`${urls.oauth.v1}/authorize/silent`);
|
|
394
|
+
return generateLoginResponseFromOAuthResponse(data);
|
|
395
|
+
}
|
|
389
396
|
export async function resetPhoneNumber(body) {
|
|
390
397
|
return Post(`${urls.identity.users.v1}/phone/reset`, body);
|
|
391
398
|
}
|
package/auth/interfaces.d.ts
CHANGED
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,
|
|
@@ -83,6 +84,7 @@ var _exportNames = {
|
|
|
83
84
|
preLoginV2: true,
|
|
84
85
|
oidcPostLoginV2: true,
|
|
85
86
|
exchangeOAuthTokens: true,
|
|
87
|
+
silentOAuthRefreshToken: true,
|
|
86
88
|
resetPhoneNumber: true,
|
|
87
89
|
verifyResetPhoneNumber: true,
|
|
88
90
|
changePhoneNumberWithVerification: true,
|
|
@@ -157,11 +159,13 @@ exports.recoverMfaToken = recoverMfaToken;
|
|
|
157
159
|
exports.refreshToken = refreshToken;
|
|
158
160
|
exports.refreshTokenV2 = refreshTokenV2;
|
|
159
161
|
exports.resendActivationEmail = resendActivationEmail;
|
|
162
|
+
exports.resendInvitationEmail = resendInvitationEmail;
|
|
160
163
|
exports.resetPassword = resetPassword;
|
|
161
164
|
exports.resetPhoneNumber = resetPhoneNumber;
|
|
162
165
|
exports.revokeSessionsForUser = revokeSessionsForUser;
|
|
163
166
|
exports.setSSODefaultRoles = setSSODefaultRoles;
|
|
164
167
|
exports.signUpUser = signUpUser;
|
|
168
|
+
exports.silentOAuthRefreshToken = silentOAuthRefreshToken;
|
|
165
169
|
exports.updateSSOConfiguration = updateSSOConfiguration;
|
|
166
170
|
exports.updateSSOConfigurationByMetadata = updateSSOConfigurationByMetadata;
|
|
167
171
|
exports.updateSSOGroup = updateSSOGroup;
|
|
@@ -329,6 +333,10 @@ async function resendActivationEmail(body) {
|
|
|
329
333
|
return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/activate/reset`, body);
|
|
330
334
|
}
|
|
331
335
|
|
|
336
|
+
async function resendInvitationEmail(body) {
|
|
337
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/invitation/reset`, body);
|
|
338
|
+
}
|
|
339
|
+
|
|
332
340
|
async function acceptInvitation(body) {
|
|
333
341
|
return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/invitation/accept`, body);
|
|
334
342
|
}
|
|
@@ -682,6 +690,11 @@ async function exchangeOAuthTokens(body) {
|
|
|
682
690
|
return generateLoginResponseFromOAuthResponse(data);
|
|
683
691
|
}
|
|
684
692
|
|
|
693
|
+
async function silentOAuthRefreshToken() {
|
|
694
|
+
const data = await (0, _fetch.Post)(`${_constants.urls.oauth.v1}/authorize/silent`);
|
|
695
|
+
return generateLoginResponseFromOAuthResponse(data);
|
|
696
|
+
}
|
|
697
|
+
|
|
685
698
|
async function resetPhoneNumber(body) {
|
|
686
699
|
return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/phone/reset`, body);
|
|
687
700
|
}
|
package/node/index.js
CHANGED