unleash-server
Version:
Unleash is an enterprise ready feature flag service. It provides different strategies for handling feature flags.
20 lines • 1.01 kB
TypeScript
import type EventEmitter from 'events';
import type { IFavoriteFeaturesStore } from '../types/index.js';
import type { LogProvider } from '../logger.js';
import type { IFavoriteFeatureKey } from '../types/stores/favorite-features.js';
import type { IFavoriteFeature } from '../types/favorites.js';
import type { Db } from './db.js';
export declare class FavoriteFeaturesStore implements IFavoriteFeaturesStore {
private logger;
private eventBus;
private db;
constructor(db: Db, eventBus: EventEmitter, getLogger: LogProvider);
addFavoriteFeature({ userId, feature, }: IFavoriteFeatureKey): Promise<IFavoriteFeature>;
delete({ userId, feature }: IFavoriteFeatureKey): Promise<void>;
deleteAll(): Promise<void>;
destroy(): void;
exists({ userId, feature }: IFavoriteFeatureKey): Promise<boolean>;
get({ userId, feature, }: IFavoriteFeatureKey): Promise<IFavoriteFeature>;
getAll(): Promise<IFavoriteFeature[]>;
}
//# sourceMappingURL=favorite-features-store.d.ts.map