@frontegg/rest-api 7.90.0 → 7.92.0
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 +6 -0
- package/auth/interfaces.d.ts +20 -0
- package/constants.d.ts +3 -0
- package/constants.js +3 -0
- package/index.js +1 -1
- package/node/auth/index.js +6 -0
- package/node/constants.js +3 -0
- package/node/index.js +1 -1
- package/package.json +1 -1
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, IPasswordRecoveryStrategy, IForgotPasswordV2, IResetPasswordViaSmsResponse, IVerifyPasswordViaSmsRequest, IVerifyPasswordViaSmsResponse } from './interfaces';
|
|
6
|
+
import { IAcceptInvitation, IAcceptInvitationWithOTC, IActivateAccount, IActivateAccountWithOTC, ISubmitApprovalAction, ISubmitApprovalActionResponse, IGetApprovalExecutionData, IApprovalExecutionDataResponse, 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, IForgotPasswordV2, IResetPasswordViaSmsResponse, IVerifyPasswordViaSmsRequest, IVerifyPasswordViaSmsResponse } from './interfaces';
|
|
7
7
|
import { IGetUserAuthorizationResponse, IUserProfile } from '../users/interfaces';
|
|
8
8
|
import { BaseApiClient } from '../BaseApiClient';
|
|
9
9
|
import { SecurityPolicyApi } from './secutiry-poilicy';
|
|
@@ -95,6 +95,14 @@ export declare class AuthenticationApi extends BaseApiClient {
|
|
|
95
95
|
* @throws exception if activation failed
|
|
96
96
|
*/
|
|
97
97
|
activateAccountWithOTC: (body: IActivateAccountWithOTC) => Promise<ILoginResponseV3>;
|
|
98
|
+
/**
|
|
99
|
+
* Submit approval flow action (approve or reject)
|
|
100
|
+
*/
|
|
101
|
+
submitApprovalAction: (body: ISubmitApprovalAction) => Promise<ISubmitApprovalActionResponse>;
|
|
102
|
+
/**
|
|
103
|
+
* Get approval flow execution data
|
|
104
|
+
*/
|
|
105
|
+
getApprovalExecutionData: (params: IGetApprovalExecutionData) => Promise<IApprovalExecutionDataResponse>;
|
|
98
106
|
/**
|
|
99
107
|
* get account activation configuration.
|
|
100
108
|
*/
|
package/auth/index.js
CHANGED
|
@@ -162,6 +162,12 @@ export class AuthenticationApi extends BaseApiClient {
|
|
|
162
162
|
const data = await this.post(`${urls.identity.users.v1}/activate/code`, body);
|
|
163
163
|
return this.generateLoginResponseV3(data);
|
|
164
164
|
};
|
|
165
|
+
this.submitApprovalAction = async body => {
|
|
166
|
+
return this.post(`${urls.identity.approvalFlows.v1}/approver-action`, body);
|
|
167
|
+
};
|
|
168
|
+
this.getApprovalExecutionData = async params => {
|
|
169
|
+
return this.get(`${urls.identity.approvalFlows.v1}/execution-data`, params);
|
|
170
|
+
};
|
|
165
171
|
this.getActivateAccountStrategy = async params => {
|
|
166
172
|
return this.get(`${urls.identity.users.v1}/activate/strategy`, params);
|
|
167
173
|
};
|
package/auth/interfaces.d.ts
CHANGED
|
@@ -87,6 +87,26 @@ export type IActivateAccount = {
|
|
|
87
87
|
export type IActivateAccountWithOTC = {
|
|
88
88
|
code: string;
|
|
89
89
|
} & IActivateAccount;
|
|
90
|
+
export type ISubmitApprovalAction = {
|
|
91
|
+
approvalFlowExecutionId: string;
|
|
92
|
+
approverId: string;
|
|
93
|
+
approvalFlowStepId: string;
|
|
94
|
+
approved: boolean;
|
|
95
|
+
};
|
|
96
|
+
export type ISubmitApprovalActionResponse = {
|
|
97
|
+
success: boolean;
|
|
98
|
+
};
|
|
99
|
+
export type IGetApprovalExecutionData = {
|
|
100
|
+
approvalFlowExecutionId: string;
|
|
101
|
+
approverId: string;
|
|
102
|
+
approvalFlowStepId: string;
|
|
103
|
+
};
|
|
104
|
+
export type IApprovalExecutionDataResponse = {
|
|
105
|
+
approvalFlowName: string;
|
|
106
|
+
approvalFlowDescription?: string;
|
|
107
|
+
requester: string;
|
|
108
|
+
approvalFlowRequestDate: Date;
|
|
109
|
+
};
|
|
90
110
|
export type IAcceptInvitation = {
|
|
91
111
|
userId: string;
|
|
92
112
|
token: string;
|
package/constants.d.ts
CHANGED
package/constants.js
CHANGED
package/index.js
CHANGED
package/node/auth/index.js
CHANGED
|
@@ -227,6 +227,12 @@ class AuthenticationApi extends _BaseApiClient.BaseApiClient {
|
|
|
227
227
|
const data = await this.post(`${_constants2.urls.identity.users.v1}/activate/code`, body);
|
|
228
228
|
return this.generateLoginResponseV3(data);
|
|
229
229
|
};
|
|
230
|
+
this.submitApprovalAction = async body => {
|
|
231
|
+
return this.post(`${_constants2.urls.identity.approvalFlows.v1}/approver-action`, body);
|
|
232
|
+
};
|
|
233
|
+
this.getApprovalExecutionData = async params => {
|
|
234
|
+
return this.get(`${_constants2.urls.identity.approvalFlows.v1}/execution-data`, params);
|
|
235
|
+
};
|
|
230
236
|
this.getActivateAccountStrategy = async params => {
|
|
231
237
|
return this.get(`${_constants2.urls.identity.users.v1}/activate/strategy`, params);
|
|
232
238
|
};
|
package/node/constants.js
CHANGED
package/node/index.js
CHANGED