UNPKG

growthbook

Version:

The GrowthBook command-line interface (CLI) for working with the GrowthBook A/B testing, feature flagging, and experimentation platform

20 lines (19 loc) 803 B
import { BaseApiRepository, BaseRepository, Pagination } from './base.repository'; import { Feature, FeaturesApi } from '../generated/api'; import { SimplifiedFeature } from '../utils/feature'; export declare class FeaturesRepository extends BaseRepository implements BaseApiRepository<FeaturesApi> { getFeature(featureKey: string): Promise<Feature>; listFeatures(limit: number, offset: number, projectId?: string): Promise<ListFeaturesResponse>; toggleFeature({ enabled, reason, featureKey, environment, }: ToggleFeatureOptions): Promise<Feature>; api(): FeaturesApi; } type ToggleFeatureOptions = { featureKey: string; environment: string; enabled: boolean; reason: string; }; type ListFeaturesResponse = Pagination & { features: SimplifiedFeature[]; }; export {};