import type { GrowthBook } from "../GrowthBook"; import type { UserScopedGrowthBook } from "../GrowthBookClient"; import { AnyGrowthBook } from "./utils/instance"; export declare const EVENT_INTERLEAVE_EXPOSURE = "Interleave Exposure"; export type InterleaveConfig = Record; export type InterleaveRanker = { key: string; config: C; }; export type InterleavedItem = { itemId: string; variation: string; position: number; competitive: boolean; }; export type InterleaveExposure = { timestamp: number; experimentId: string; rankingId: string; hashAttribute: string; hashValue: string; items: InterleavedItem[]; }; export type InterleavePluginOptions = { onExposure?: (exposure: InterleaveExposure) => void | Promise; }; export type InterleaveOptions = { key: string; getList: (config: C) => T[] | Promise; fallbackConfig: C; rankingId?: string; enabled?: boolean; getItemId?: (item: T) => string; maxItems?: number; }; export type InterleaveTrackingProps = { experiment_id?: string; ranking_id?: string; }; export type InterleaveResult = { result: T[]; inExperiment: boolean; variation?: string; rankingId: string; trackingProps: InterleaveTrackingProps; }; type InterleaveInstance = GrowthBook | UserScopedGrowthBook; export declare function interleavePlugin(options?: InterleavePluginOptions): (gb: AnyGrowthBook) => void; type RankerList = { variation: string; items: T[]; }; export declare function teamDraft(lists: [RankerList, RankerList], getItemId: (item: T) => string, firstPicker: (round: number) => 0 | 1, maxItems?: number): { items: T[]; meta: InterleavedItem[]; }; export declare function interleave(gb: InterleaveInstance, options: InterleaveOptions): Promise>; export declare function getInterleaveRankers(gb: AnyGrowthBook): Record[]>; export declare function getInterleaveRankersForKey(gb: AnyGrowthBook, key: string): InterleaveRanker[]; export {}; //# sourceMappingURL=interleave.d.ts.map