import { ParamStoreConfig } from './ParamStoreTypes'; import { BootstrapMetadata } from './StatsigEvent'; import { Flatten } from './TypingUtils'; type EvaluationBase = { id_type: string; name: string; rule_id: string; secondary_exposures: SecondaryExposure[] | string[]; value: T; version?: string; }; export type SecondaryExposure = { gate: string; gateValue: string; ruleID: string; }; export type GateEvaluation = EvaluationBase; export type ExperimentEvaluation = Flatten> & { group_name?: string; group: string; id_type: string; is_device_based: boolean; is_experiment_active?: boolean; is_user_in_experiment?: boolean; passed?: boolean; is_in_layer?: boolean; explicit_parameters?: string[]; }>; export type DynamicConfigEvaluation = ExperimentEvaluation; export type LayerEvaluation = Flatten & { allocated_experiment_name: string; explicit_parameters: string[]; undelegated_secondary_exposures?: SecondaryExposure[] | string[]; parameter_rule_ids?: Record; }>; export type AnyEvaluation = GateEvaluation | ExperimentEvaluation | DynamicConfigEvaluation | LayerEvaluation; export type EvaluationDetails = { reason: string; lcut?: number; receivedAt?: number; warnings?: StatsigWarnings[]; bootstrapMetadata?: BootstrapMetadata; }; export type DetailedStoreResult = { result: T | null; details: EvaluationDetails; }; export type StatsigWarnings = 'PartialUserMatch' | 'StableIDMismatch' | 'MultipleInitializations' | 'NoCachedValues'; export {};