export declare const IDLE_CLEANUP_AFTER_MS = 60000;
type BucketConfig = {
    maxTokens: number;
    /**
     * Tokens added per second
     * */
    refillRate: number;
    /**
     * Max ms a request waits in queue before being rejected
     * */
    queueTimeout: number;
    /**
     * Maximum size of queue
     */
    maxQueueSize?: number;
};
export type QueueEntry = {
    resolve: () => void;
    reject: (reason: Error) => void;
    timeoutId: ReturnType<typeof setTimeout>;
};
export type Bucket = BucketConfig & {
    appKey: string;
    appInstanceId: string;
    tokens: number;
    lastRefill: number;
    lastActivity: number;
    queue: QueueEntry[];
    refillTimer: ReturnType<typeof setInterval> | null;
};
export type RateLimiterConfig = {
    enabled?: boolean;
    debug?: boolean;
    defaults?: BucketConfig;
    overrides?: Record<string, Partial<BucketConfig>>;
};
export declare const DEFAULT_CONFIG: Required<RateLimiterConfig>;
export type ReportBucket = {
    id: string;
    appKey: string;
    appInstanceId: string;
    maxTokens: number;
    queueLength: number;
    queueTimeout: number;
    refillRate: number;
};
export {};
//# sourceMappingURL=constants.d.ts.map