import { Subscription, PartialObserver } from 'rxjs'; import { Entitlement, CustomAttributes, EntitledToOptions, LoadEntitlementsCallback } from '@frontegg/types'; import { FronteggAppService } from './frontegg-app.service'; import { FronteggUserSubscriptionService } from './frontegg-user-subscription.service'; import * as i0 from "@angular/core"; /** * An entitlements service for: * 1. Managing state subscription. * 2. Querying about feature and permission entitlements state. * 3. Load entitlements on demand. */ export declare class FronteggEntitlementsService { private fronteggAppService; private fronteggUserSubscriptionService; constructor(fronteggAppService: FronteggAppService, fronteggUserSubscriptionService: FronteggUserSubscriptionService); /** * @param feature featureKey * @param observer For receiving the feature entitlements result including if the user is entitled to the given feature. * Attaching the justification if not entitled * @param customAttributes consumer attributes * @returns a subscription to be able to unsubscribe * @throws when entitlement is not enabled via frontegg options */ featureEntitlements$(feature: string, observer: PartialObserver, customAttributes?: CustomAttributes): Subscription; /** * @param permission permission key * @param observer For receiving the permission entitlements result including if the user is entitled to the given permission. * Attaching the justification if not entitled * @param customAttributes consumer attributes * @returns a subscription to be able to unsubscribe */ permissionEntitlements$(permission: string, observer: PartialObserver, customAttributes?: CustomAttributes): Subscription; /** * @param options permissionKey or featureKey in an options object * @param observer For receiving the permission entitlements result including if the user is entitled to the given permission. * Attaching the justification if not entitled * @param customAttributes consumer attributes * @returns a subscription to be able to unsubscribe */ entitlements$(options: EntitledToOptions, observer: PartialObserver, customAttributes?: CustomAttributes): Subscription; /** * Load entitlements data on demand * @param callback called on request completed with true if succeeded, false if failed */ loadEntitlements(callback?: LoadEntitlementsCallback): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } //# sourceMappingURL=frontegg-entitlements.service.d.ts.map