export type FeatureFlagValue = any; export interface IFeatureFlagSet { [key: string]: FeatureFlagValue; } export interface IFeatureFlagChange { id: string; oldValue: FeatureFlagValue; newValue: FeatureFlagValue; } export interface IOption { secret: string; anonymous?: boolean; bootstrap?: IFeatureFlag[]; streamingUri?: string; eventsUri?: string; api?: string; appType?: string; user?: IUser; enableDataSync?: boolean; } export interface IUser { name: string; keyId: string; customizedProperties?: ICustomizedProperty[]; } export interface ICustomizedProperty { name: string; value: string | number | boolean; } export interface IVariationOption { id: number; value: FeatureFlagValue; } export interface IFeatureFlagVariation { id?: string; sendToExperiment?: boolean; timestamp?: number; variation?: { id: number; value: FeatureFlagValue; }; } export interface IFeatureFlagVariationBuffer { id: string; timestamp: number; variationValue: FeatureFlagValue; } export declare enum InsightType { featureFlagUsage = 1, customEvent = 2, pageView = 3, click = 4 } export declare enum VariationDataType { string = "string", boolean = "boolean", number = "number", json = "json" } export interface IInsight extends IFeatureFlagVariation, ICustomEvent { insightType: InsightType; } export interface IFeatureFlagBase { id: string; variation: FeatureFlagValue; variationType: VariationDataType; } export interface IFeatureFlag extends IFeatureFlagBase { sendToExperiment: boolean; timestamp: number; variationOptions: IVariationOption[]; } export interface IDataStore { featureFlags: { [key: string]: IFeatureFlag; }; } export declare enum StreamResponseEventType { full = "full", patch = "patch" } export declare enum FeatureFlagUpdateOperation { update = "update" } export interface IStreamResponse { eventType: StreamResponseEventType; userKeyId: string; featureFlags: IFeatureFlag[]; } export interface ICustomEvent { type?: string; eventName: string; numericValue?: number; }