@frontegg/rest-api
Advanced tools
Comparing version 3.0.127 to 3.0.128
@@ -1,7 +0,9 @@ | ||
import { EntitlementsResponse } from './interfaces'; | ||
import { UserEntitlementsResponse } from './interfaces'; | ||
/** | ||
* Load entitlements on/off values map by keys | ||
* Load user entitlements data. | ||
* Including all user permissions, features and bundles data. | ||
* Including also isGranted and isEntitled for permissions and features. | ||
* | ||
* ``authorized user`` | ||
*/ | ||
export declare function loadEntitlements(): Promise<EntitlementsResponse>; | ||
export declare function loadEntitlements(): Promise<UserEntitlementsResponse>; |
/** | ||
* Load entitlements on/off values map by keys API response | ||
* API response for user entitlements data. | ||
* Including all user permissions, features and bundles data. | ||
* Including also isGranted and isEntitled for permissions and features. | ||
*/ | ||
export interface EntitlementsResponse { | ||
[key: string]: boolean; | ||
export interface UserEntitlementsResponse { | ||
permissions: { | ||
[permissionKey: string]: PermissionEntitlement; | ||
}; | ||
features: { | ||
[featureKey: string]: FeatureEntitlement; | ||
}; | ||
featureBundles: { | ||
[featuresBundleKey: string]: FeaturesBundleEntitlement; | ||
}; | ||
} | ||
export interface PermissionEntitlement { | ||
isGranted: boolean; | ||
isEntitled: boolean; | ||
isExpired: boolean; | ||
notEntitledReason: NotEntitledReason; | ||
expirationDate?: Date; | ||
} | ||
export interface FeatureEntitlement { | ||
isEntitled: boolean; | ||
isExpired: boolean; | ||
expirationDate?: Date; | ||
notEntitledReason: NotEntitledReason; | ||
} | ||
export interface FeaturesBundleEntitlement { | ||
isExpired: boolean; | ||
expirationDate?: Date; | ||
} | ||
export declare enum NotEntitledReason { | ||
MISSING_PERMISSION = "MISSING_PERMISSION", | ||
MISSING_FEATURE = "MISSING_FEATURE", | ||
BUNDLE_EXPIRED = "BUNDLE_EXPIRED" | ||
} |
@@ -1,1 +0,7 @@ | ||
export {}; | ||
export let NotEntitledReason; | ||
(function (NotEntitledReason) { | ||
NotEntitledReason["MISSING_PERMISSION"] = "MISSING_PERMISSION"; | ||
NotEntitledReason["MISSING_FEATURE"] = "MISSING_FEATURE"; | ||
NotEntitledReason["BUNDLE_EXPIRED"] = "BUNDLE_EXPIRED"; | ||
})(NotEntitledReason || (NotEntitledReason = {})); |
@@ -1,2 +0,2 @@ | ||
/** @license Frontegg v3.0.127 | ||
/** @license Frontegg v3.0.128 | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
@@ -5,2 +5,11 @@ "use strict"; | ||
value: true | ||
}); | ||
}); | ||
exports.NotEntitledReason = void 0; | ||
let NotEntitledReason; | ||
exports.NotEntitledReason = NotEntitledReason; | ||
(function (NotEntitledReason) { | ||
NotEntitledReason["MISSING_PERMISSION"] = "MISSING_PERMISSION"; | ||
NotEntitledReason["MISSING_FEATURE"] = "MISSING_FEATURE"; | ||
NotEntitledReason["BUNDLE_EXPIRED"] = "BUNDLE_EXPIRED"; | ||
})(NotEntitledReason || (exports.NotEntitledReason = NotEntitledReason = {})); |
@@ -1,2 +0,2 @@ | ||
/** @license Frontegg v3.0.127 | ||
/** @license Frontegg v3.0.128 | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
{ | ||
"name": "@frontegg/rest-api", | ||
"version": "3.0.127", | ||
"version": "3.0.128", | ||
"main": "./node/index.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
348813
9703