@frontegg/rest-api 7.90.0 → 7.91.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 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
  };
@@ -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
@@ -138,6 +138,9 @@ export declare const urls: {
138
138
  usernames: {
139
139
  v1: string;
140
140
  };
141
+ approvalFlows: {
142
+ v1: string;
143
+ };
141
144
  };
142
145
  team: {
143
146
  sso: {
package/constants.js CHANGED
@@ -137,6 +137,9 @@ export const urls = {
137
137
  },
138
138
  usernames: {
139
139
  v1: '/identity/resources/usernames/v1'
140
+ },
141
+ approvalFlows: {
142
+ v1: '/identity/resources/approval-flows/v1'
140
143
  }
141
144
  },
142
145
  team: {
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.90.0
1
+ /** @license Frontegg v7.91.0
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.
@@ -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
@@ -143,6 +143,9 @@ const urls = {
143
143
  },
144
144
  usernames: {
145
145
  v1: '/identity/resources/usernames/v1'
146
+ },
147
+ approvalFlows: {
148
+ v1: '/identity/resources/approval-flows/v1'
146
149
  }
147
150
  },
148
151
  team: {
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.90.0
1
+ /** @license Frontegg v7.91.0
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": "7.90.0",
3
+ "version": "7.91.0",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "author": "Frontegg LTD",