@frontegg/rest-api 3.1.27 → 3.1.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 +6 -6
- package/auth/index.js +10 -10
- package/auth/interfaces.d.ts +3 -0
- package/constants.js +1 -1
- package/directory/index.d.ts +2 -2
- package/index.js +1 -1
- package/node/auth/index.js +10 -10
- package/node/constants.js +1 -1
- package/node/index.js +1 -1
- package/package.json +1 -1
- package/user-phone-numbers/interfaces.d.ts +0 -4
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, 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 } 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, 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, IRefreshToken } from './interfaces';
|
|
5
5
|
import { IGetUserAuthorizationResponse, IUserProfile } from "../users/interfaces";
|
|
6
6
|
/*****************************************
|
|
7
7
|
* Authentication
|
|
@@ -112,17 +112,17 @@ export declare function acceptInvitation(body: IAcceptInvitation): Promise<void>
|
|
|
112
112
|
* refresh token called as authenticated use, access and refresh tokens resolved by the cookies.
|
|
113
113
|
* the server will return ILoginResponse with new access Token and refresh token and store it in the browser cookies.
|
|
114
114
|
*/
|
|
115
|
-
export declare function refreshToken(): Promise<ILoginResponse>;
|
|
115
|
+
export declare function refreshToken(body?: IRefreshToken): Promise<ILoginResponse>;
|
|
116
116
|
/**
|
|
117
117
|
* refresh token called as authenticated use, access and refresh tokens resolved by the cookies.
|
|
118
118
|
* the server will return ILoginResponseV2 with new access Token and refresh token and store it in the browser cookies, as well as the tenants.
|
|
119
119
|
*/
|
|
120
|
-
export declare function refreshTokenV2(): Promise<ILoginResponseV2>;
|
|
120
|
+
export declare function refreshTokenV2(body?: IRefreshToken): Promise<ILoginResponseV2>;
|
|
121
121
|
/**
|
|
122
122
|
* refresh token called as authenticated use, access and refresh tokens resolved by the cookies.
|
|
123
123
|
* the server will return ILoginResponseV3 with new access Token and refresh token and store it in the browser cookies, as well as the tenants and the active tenant.
|
|
124
124
|
*/
|
|
125
|
-
export declare function refreshTokenV3(): Promise<ILoginResponseV3>;
|
|
125
|
+
export declare function refreshTokenV3(body?: IRefreshToken): Promise<ILoginResponseV3>;
|
|
126
126
|
/**
|
|
127
127
|
* logout from server, invalidate access and refresh token, remove it from cookies.
|
|
128
128
|
*/
|
|
@@ -680,9 +680,9 @@ export declare function preLoginV2(body: IPreLogin): Promise<IPreLoginWithIdpTyp
|
|
|
680
680
|
*/
|
|
681
681
|
export declare function oidcPostLoginV2(body: IOidcPostLoginV2): Promise<ILoginResponse>;
|
|
682
682
|
export declare function exchangeOAuthTokensV2(body: IExchangeOAuthTokens): Promise<ILoginResponseV3>;
|
|
683
|
-
export declare function silentOAuthRefreshTokenV2(): Promise<ILoginResponseV3>;
|
|
683
|
+
export declare function silentOAuthRefreshTokenV2(body?: IRefreshToken): Promise<ILoginResponseV3>;
|
|
684
684
|
export declare function exchangeOAuthTokens(body: IExchangeOAuthTokens): Promise<ILoginResponse>;
|
|
685
|
-
export declare function silentOAuthRefreshToken(): Promise<ILoginResponse>;
|
|
685
|
+
export declare function silentOAuthRefreshToken(body?: IRefreshToken): Promise<ILoginResponse>;
|
|
686
686
|
/**
|
|
687
687
|
* reset phone should be called in case user want to reset his phone number
|
|
688
688
|
* when using sms authentication strategy. a 6-digits code will be send to the user email.
|
package/auth/index.js
CHANGED
|
@@ -180,16 +180,16 @@ export async function resendInvitationEmail(body) {
|
|
|
180
180
|
export async function acceptInvitation(body) {
|
|
181
181
|
return Post(`${urls.identity.users.v1}/invitation/accept`, body);
|
|
182
182
|
}
|
|
183
|
-
export async function refreshToken() {
|
|
184
|
-
const data = await Post(`${urls.identity.auth.v1}/user/token/refresh
|
|
183
|
+
export async function refreshToken(body = {}) {
|
|
184
|
+
const data = await Post(`${urls.identity.auth.v1}/user/token/refresh`, body);
|
|
185
185
|
return generateLoginResponse(data);
|
|
186
186
|
}
|
|
187
|
-
export async function refreshTokenV2() {
|
|
188
|
-
const data = await Post(`${urls.identity.auth.v1}/user/token/refresh
|
|
187
|
+
export async function refreshTokenV2(body = {}) {
|
|
188
|
+
const data = await Post(`${urls.identity.auth.v1}/user/token/refresh`, body);
|
|
189
189
|
return generateLoginResponseV2(data);
|
|
190
190
|
}
|
|
191
|
-
export async function refreshTokenV3() {
|
|
192
|
-
const data = await Post(`${urls.identity.auth.v1}/user/token/refresh
|
|
191
|
+
export async function refreshTokenV3(body = {}) {
|
|
192
|
+
const data = await Post(`${urls.identity.auth.v1}/user/token/refresh`, body);
|
|
193
193
|
return generateLoginResponseV3(data);
|
|
194
194
|
}
|
|
195
195
|
export async function logout() {
|
|
@@ -636,16 +636,16 @@ export async function exchangeOAuthTokensV2(body) {
|
|
|
636
636
|
const data = await Post(`${urls.oauth.v1}/token`, body);
|
|
637
637
|
return generateLoginResponseFromOAuthResponseV2(data);
|
|
638
638
|
}
|
|
639
|
-
export async function silentOAuthRefreshTokenV2() {
|
|
640
|
-
const data = await Post(`${urls.oauth.v1}/authorize/silent
|
|
639
|
+
export async function silentOAuthRefreshTokenV2(body = {}) {
|
|
640
|
+
const data = await Post(`${urls.oauth.v1}/authorize/silent`, body);
|
|
641
641
|
return generateLoginResponseFromOAuthResponseV2(data);
|
|
642
642
|
}
|
|
643
643
|
export async function exchangeOAuthTokens(body) {
|
|
644
644
|
const data = await Post(`${urls.oauth.v1}/token`, body);
|
|
645
645
|
return generateLoginResponseFromOAuthResponse(data);
|
|
646
646
|
}
|
|
647
|
-
export async function silentOAuthRefreshToken() {
|
|
648
|
-
const data = await Post(`${urls.oauth.v1}/authorize/silent
|
|
647
|
+
export async function silentOAuthRefreshToken(body = {}) {
|
|
648
|
+
const data = await Post(`${urls.oauth.v1}/authorize/silent`, body);
|
|
649
649
|
return generateLoginResponseFromOAuthResponse(data);
|
|
650
650
|
}
|
|
651
651
|
export async function resetPhoneNumber(body) {
|
package/auth/interfaces.d.ts
CHANGED
|
@@ -30,6 +30,9 @@ export declare type ILogin = {
|
|
|
30
30
|
recaptchaToken?: string;
|
|
31
31
|
invitationToken?: string;
|
|
32
32
|
};
|
|
33
|
+
export declare type IRefreshToken = {
|
|
34
|
+
tenantId?: string;
|
|
35
|
+
};
|
|
33
36
|
export declare type ILoginResponse = IUserProfile & {
|
|
34
37
|
mfaRequired: boolean;
|
|
35
38
|
accessToken: string;
|
package/constants.js
CHANGED
package/directory/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Scim2ConnectionConfigResponse, Scim2CountResponse, Scim2CreateConnectionConfigRequest, Scim2PatchConnectionConfigRequest } from './interfaces';
|
|
1
|
+
import { Scim2ConnectionConfigResponse, Scim2CountResponse, Scim2CreateConnectionConfigRequest, Scim2CreateConnectionConfigResponse, Scim2PatchConnectionConfigRequest } from './interfaces';
|
|
2
2
|
/**
|
|
3
3
|
* returns all scim2 configurations
|
|
4
4
|
*
|
|
@@ -14,7 +14,7 @@ export declare function updateConfiguration(id: string, body: Scim2PatchConnecti
|
|
|
14
14
|
* create scim2 configuration
|
|
15
15
|
* ``authorized user``
|
|
16
16
|
*/
|
|
17
|
-
export declare function createConfiguration(body: Scim2CreateConnectionConfigRequest): Promise<
|
|
17
|
+
export declare function createConfiguration(body: Scim2CreateConnectionConfigRequest): Promise<Scim2CreateConnectionConfigResponse>;
|
|
18
18
|
/**
|
|
19
19
|
* delete scim2 configuration
|
|
20
20
|
* ``authorized user``
|
package/index.js
CHANGED
package/node/auth/index.js
CHANGED
|
@@ -551,18 +551,18 @@ async function acceptInvitation(body) {
|
|
|
551
551
|
return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/invitation/accept`, body);
|
|
552
552
|
}
|
|
553
553
|
|
|
554
|
-
async function refreshToken() {
|
|
555
|
-
const data = await (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/token/refresh
|
|
554
|
+
async function refreshToken(body = {}) {
|
|
555
|
+
const data = await (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/token/refresh`, body);
|
|
556
556
|
return generateLoginResponse(data);
|
|
557
557
|
}
|
|
558
558
|
|
|
559
|
-
async function refreshTokenV2() {
|
|
560
|
-
const data = await (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/token/refresh
|
|
559
|
+
async function refreshTokenV2(body = {}) {
|
|
560
|
+
const data = await (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/token/refresh`, body);
|
|
561
561
|
return generateLoginResponseV2(data);
|
|
562
562
|
}
|
|
563
563
|
|
|
564
|
-
async function refreshTokenV3() {
|
|
565
|
-
const data = await (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/token/refresh
|
|
564
|
+
async function refreshTokenV3(body = {}) {
|
|
565
|
+
const data = await (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/token/refresh`, body);
|
|
566
566
|
return generateLoginResponseV3(data);
|
|
567
567
|
}
|
|
568
568
|
|
|
@@ -1112,8 +1112,8 @@ async function exchangeOAuthTokensV2(body) {
|
|
|
1112
1112
|
return generateLoginResponseFromOAuthResponseV2(data);
|
|
1113
1113
|
}
|
|
1114
1114
|
|
|
1115
|
-
async function silentOAuthRefreshTokenV2() {
|
|
1116
|
-
const data = await (0, _fetch.Post)(`${_constants.urls.oauth.v1}/authorize/silent
|
|
1115
|
+
async function silentOAuthRefreshTokenV2(body = {}) {
|
|
1116
|
+
const data = await (0, _fetch.Post)(`${_constants.urls.oauth.v1}/authorize/silent`, body);
|
|
1117
1117
|
return generateLoginResponseFromOAuthResponseV2(data);
|
|
1118
1118
|
}
|
|
1119
1119
|
|
|
@@ -1122,8 +1122,8 @@ async function exchangeOAuthTokens(body) {
|
|
|
1122
1122
|
return generateLoginResponseFromOAuthResponse(data);
|
|
1123
1123
|
}
|
|
1124
1124
|
|
|
1125
|
-
async function silentOAuthRefreshToken() {
|
|
1126
|
-
const data = await (0, _fetch.Post)(`${_constants.urls.oauth.v1}/authorize/silent
|
|
1125
|
+
async function silentOAuthRefreshToken(body = {}) {
|
|
1126
|
+
const data = await (0, _fetch.Post)(`${_constants.urls.oauth.v1}/authorize/silent`, body);
|
|
1127
1127
|
return generateLoginResponseFromOAuthResponse(data);
|
|
1128
1128
|
}
|
|
1129
1129
|
|
package/node/constants.js
CHANGED
package/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { PaginationOrderEnum } from "../interfaces";
|
|
2
|
-
import { SortByEnum } from "../users/interfaces";
|
|
3
1
|
export interface IGetPhoneNumbersQueryParams {
|
|
4
2
|
_limit?: number;
|
|
5
3
|
_offset?: number;
|
|
6
|
-
_sortBy?: SortByEnum;
|
|
7
|
-
_order?: PaginationOrderEnum;
|
|
8
4
|
}
|
|
9
5
|
export declare type IPhoneNumber = {
|
|
10
6
|
id: string;
|