UNPKG

unleash-server

Version:

Unleash is an enterprise ready feature flag service. It provides different strategies for handling feature flags.

29 lines 1.53 kB
import type { IUnleashConfig } from '../types/option.js'; import type { IUnleashStores } from '../types/stores.js'; import type { IFavoriteFeature, IFavoriteProject } from '../types/favorites.js'; import { type IAuditUser } from '../types/index.js'; import type { IUser } from '../types/user.js'; import type { IFavoriteProjectKey } from '../types/stores/favorite-projects.js'; import type EventService from '../features/events/event-service.js'; export interface IFavoriteFeatureProps { feature: string; user: IUser; } export interface IFavoriteProjectProps { project: string; user: IUser; } export declare class FavoritesService { private config; private logger; private favoriteFeaturesStore; private favoriteProjectsStore; private eventService; constructor({ favoriteFeaturesStore, favoriteProjectsStore, }: Pick<IUnleashStores, 'favoriteFeaturesStore' | 'favoriteProjectsStore'>, config: IUnleashConfig, eventService: EventService); favoriteFeature({ feature, user }: IFavoriteFeatureProps, auditUser: IAuditUser): Promise<IFavoriteFeature>; unfavoriteFeature({ feature, user }: IFavoriteFeatureProps, auditUser: IAuditUser): Promise<void>; favoriteProject({ project, user }: IFavoriteProjectProps, auditUser: IAuditUser): Promise<IFavoriteProject>; unfavoriteProject({ project, user }: IFavoriteProjectProps, auditUser: IAuditUser): Promise<void>; isFavoriteProject(favorite: IFavoriteProjectKey): Promise<boolean>; } //# sourceMappingURL=favorites-service.d.ts.map