@frontegg/rest-api 3.0.130 → 3.0.132
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 +13 -0
- package/auth/index.js +6 -0
- package/entitlements/interfaces.d.ts +4 -18
- package/index.js +1 -1
- package/node/auth/index.js +12 -0
- package/node/index.js +1 -1
- package/package.json +1 -1
package/auth/index.d.ts
CHANGED
|
@@ -379,10 +379,17 @@ export declare function getSSOPublicConfiguration(): Promise<ISSOPublicConfigura
|
|
|
379
379
|
*/
|
|
380
380
|
export declare function getSocialLoginProviders(): Promise<ISocialLoginProviderConfiguration[]>;
|
|
381
381
|
/**
|
|
382
|
+
* ##### Public route
|
|
382
383
|
* Get social logins providers configurations V2 supports dev credentials as well
|
|
383
384
|
* @return array of providers configurations
|
|
384
385
|
*/
|
|
385
386
|
export declare function getSocialLoginProvidersV2(): Promise<ISocialLoginProviderConfigurationV2[]>;
|
|
387
|
+
/**
|
|
388
|
+
* ##### Authenticated route
|
|
389
|
+
* Get social logins providers configurations V2 supports dev credentials as well
|
|
390
|
+
* @return array of providers configurations
|
|
391
|
+
*/
|
|
392
|
+
export declare function getSocialLoginProvidersV2ForAuthenticatedUser(): Promise<ISocialLoginProviderConfigurationV2[]>;
|
|
386
393
|
/**
|
|
387
394
|
* Get social logins custom providers configurations
|
|
388
395
|
* @return array of custom providers configurations
|
|
@@ -649,9 +656,15 @@ export declare function deleteWebAuthnDevice(deviceId: string): Promise<void>;
|
|
|
649
656
|
*/
|
|
650
657
|
export declare function verifyNewDeviceSession(body: IVerifyNewWebAuthnDevice): Promise<void>;
|
|
651
658
|
/**
|
|
659
|
+
* ##### Public route
|
|
652
660
|
* Get public vendor auth strategies public configuration
|
|
653
661
|
*/
|
|
654
662
|
export declare function getVendorPublicAuthStrategiesConfig(): Promise<IAuthStrategiesConfig>;
|
|
663
|
+
/**
|
|
664
|
+
* ##### Authenticated route
|
|
665
|
+
* Get public vendor auth strategies public configuration
|
|
666
|
+
*/
|
|
667
|
+
export declare function getPublicAuthStrategiesConfigForAuthenticatedUser(): Promise<IAuthStrategiesConfig>;
|
|
655
668
|
/**
|
|
656
669
|
* Get vendor mfa strategies configuration
|
|
657
670
|
*/
|
package/auth/index.js
CHANGED
|
@@ -301,6 +301,9 @@ export async function getSocialLoginProviders() {
|
|
|
301
301
|
export async function getSocialLoginProvidersV2() {
|
|
302
302
|
return Get(urls.identity.sso.v2);
|
|
303
303
|
}
|
|
304
|
+
export async function getSocialLoginProvidersV2ForAuthenticatedUser() {
|
|
305
|
+
return Get(`${urls.identity.sso.v2}/authenticated`);
|
|
306
|
+
}
|
|
304
307
|
export async function getCustomSocialLoginProvidersV1() {
|
|
305
308
|
return Get(urls.identity.sso.custom.v1);
|
|
306
309
|
}
|
|
@@ -564,6 +567,9 @@ export async function verifyNewDeviceSession(body) {
|
|
|
564
567
|
export async function getVendorPublicAuthStrategiesConfig() {
|
|
565
568
|
return Get(`${urls.identity.configurations.v1}/auth/strategies/public`);
|
|
566
569
|
}
|
|
570
|
+
export async function getPublicAuthStrategiesConfigForAuthenticatedUser() {
|
|
571
|
+
return Get(`${urls.identity.configurations.v1}/auth/strategies`);
|
|
572
|
+
}
|
|
567
573
|
export async function getMFAStrategiesConfig() {
|
|
568
574
|
return Get(`${urls.identity.configurations.v1}/mfa/strategies`);
|
|
569
575
|
}
|
|
@@ -1,33 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* API response for user entitlements data.
|
|
3
|
-
* Including all user permissions
|
|
4
|
-
* Including also isGranted and isEntitled for permissions and features.
|
|
3
|
+
* Including all user granted permissions and features data.
|
|
5
4
|
*/
|
|
6
5
|
export interface UserEntitlementsResponse {
|
|
7
6
|
permissions: {
|
|
8
|
-
[permissionKey: string]:
|
|
7
|
+
[permissionKey: string]: Entitlement;
|
|
9
8
|
};
|
|
10
9
|
features: {
|
|
11
|
-
[featureKey: string]:
|
|
12
|
-
};
|
|
13
|
-
featureBundles: {
|
|
14
|
-
[featuresBundleKey: string]: FeaturesBundleEntitlement;
|
|
10
|
+
[featureKey: string]: Entitlement;
|
|
15
11
|
};
|
|
16
12
|
}
|
|
17
|
-
export interface
|
|
13
|
+
export interface Entitlement {
|
|
18
14
|
isEntitled: boolean;
|
|
19
15
|
notEntitledReason?: NotEntitledReason;
|
|
20
16
|
}
|
|
21
|
-
export interface FeatureEntitlement {
|
|
22
|
-
isEntitled: boolean;
|
|
23
|
-
isExpired: boolean;
|
|
24
|
-
expirationDate?: Date;
|
|
25
|
-
notEntitledReason?: NotEntitledReason;
|
|
26
|
-
}
|
|
27
|
-
export interface FeaturesBundleEntitlement {
|
|
28
|
-
isExpired: boolean;
|
|
29
|
-
expirationDate?: Date;
|
|
30
|
-
}
|
|
31
17
|
export declare enum NotEntitledReason {
|
|
32
18
|
MISSING_PERMISSION = "MISSING_PERMISSION",
|
|
33
19
|
MISSING_FEATURE = "MISSING_FEATURE",
|
package/index.js
CHANGED
package/node/auth/index.js
CHANGED
|
@@ -73,6 +73,7 @@ var _exportNames = {
|
|
|
73
73
|
getSSOPublicConfiguration: true,
|
|
74
74
|
getSocialLoginProviders: true,
|
|
75
75
|
getSocialLoginProvidersV2: true,
|
|
76
|
+
getSocialLoginProvidersV2ForAuthenticatedUser: true,
|
|
76
77
|
getCustomSocialLoginProvidersV1: true,
|
|
77
78
|
loginViaSocialLogin: true,
|
|
78
79
|
getVendorConfig: true,
|
|
@@ -132,6 +133,7 @@ var _exportNames = {
|
|
|
132
133
|
deleteWebAuthnDevice: true,
|
|
133
134
|
verifyNewDeviceSession: true,
|
|
134
135
|
getVendorPublicAuthStrategiesConfig: true,
|
|
136
|
+
getPublicAuthStrategiesConfigForAuthenticatedUser: true,
|
|
135
137
|
getMFAStrategiesConfig: true
|
|
136
138
|
};
|
|
137
139
|
exports.OAuthLogout = OAuthLogout;
|
|
@@ -183,6 +185,7 @@ exports.getCustomSocialLoginProvidersV1 = getCustomSocialLoginProvidersV1;
|
|
|
183
185
|
exports.getMFADevices = getMFADevices;
|
|
184
186
|
exports.getMFAStrategiesConfig = getMFAStrategiesConfig;
|
|
185
187
|
exports.getOidcConfiguration = getOidcConfiguration;
|
|
188
|
+
exports.getPublicAuthStrategiesConfigForAuthenticatedUser = getPublicAuthStrategiesConfigForAuthenticatedUser;
|
|
186
189
|
exports.getSSOConfigurations = getSSOConfigurations;
|
|
187
190
|
exports.getSSODefaultRoles = getSSODefaultRoles;
|
|
188
191
|
exports.getSSOGroups = getSSOGroups;
|
|
@@ -194,6 +197,7 @@ exports.getSamlVendorConfiguration = getSamlVendorConfiguration;
|
|
|
194
197
|
exports.getSessionConfigurations = getSessionConfigurations;
|
|
195
198
|
exports.getSocialLoginProviders = getSocialLoginProviders;
|
|
196
199
|
exports.getSocialLoginProvidersV2 = getSocialLoginProvidersV2;
|
|
200
|
+
exports.getSocialLoginProvidersV2ForAuthenticatedUser = getSocialLoginProvidersV2ForAuthenticatedUser;
|
|
197
201
|
exports.getTenantAccessTokensData = getTenantAccessTokensData;
|
|
198
202
|
exports.getTenantApiTokensData = getTenantApiTokensData;
|
|
199
203
|
exports.getUserAccessTokensData = getUserAccessTokensData;
|
|
@@ -671,6 +675,10 @@ async function getSocialLoginProvidersV2() {
|
|
|
671
675
|
return (0, _fetch.Get)(_constants.urls.identity.sso.v2);
|
|
672
676
|
}
|
|
673
677
|
|
|
678
|
+
async function getSocialLoginProvidersV2ForAuthenticatedUser() {
|
|
679
|
+
return (0, _fetch.Get)(`${_constants.urls.identity.sso.v2}/authenticated`);
|
|
680
|
+
}
|
|
681
|
+
|
|
674
682
|
async function getCustomSocialLoginProvidersV1() {
|
|
675
683
|
return (0, _fetch.Get)(_constants.urls.identity.sso.custom.v1);
|
|
676
684
|
}
|
|
@@ -991,6 +999,10 @@ async function getVendorPublicAuthStrategiesConfig() {
|
|
|
991
999
|
return (0, _fetch.Get)(`${_constants.urls.identity.configurations.v1}/auth/strategies/public`);
|
|
992
1000
|
}
|
|
993
1001
|
|
|
1002
|
+
async function getPublicAuthStrategiesConfigForAuthenticatedUser() {
|
|
1003
|
+
return (0, _fetch.Get)(`${_constants.urls.identity.configurations.v1}/auth/strategies`);
|
|
1004
|
+
}
|
|
1005
|
+
|
|
994
1006
|
async function getMFAStrategiesConfig() {
|
|
995
1007
|
return (0, _fetch.Get)(`${_constants.urls.identity.configurations.v1}/mfa/strategies`);
|
|
996
1008
|
}
|
package/node/index.js
CHANGED