import type { NetworkConfig, PromotionSelection } from './types'; export interface CapDayState { day: string; count: number; lastShown: number; } export type CapState = Record; export declare function readCapState(): CapState; export declare function writeCapState(state: CapState): void; export declare function isCapped(state: CapState, siteId: string, day: string, capPerDay: number): boolean; export declare function recordImpression(state: CapState, siteId: string, day: string, now?: number): CapState; export interface PickWithCapInput { config: NetworkConfig; hostSiteId: string; slotId: string; timeBucket: string; locale: string; capState: CapState; seedExtra?: string; } /** * Client-side cap-aware selection: the deterministic server pick first; when * it is capped for this visitor, pick among uncapped alternatives with the * same weighted mechanism; when everything is capped, fall back to the * least-recently-shown destination so the slot still renders. */ export declare function pickPromotionWithCap(input: PickWithCapInput): PromotionSelection | null; //# sourceMappingURL=cap.d.ts.map