import { Logger } from 'pino';
import { Fetch } from "./types.js";
export declare const ANALYTICS_ENDPOINT = "./analytics/flags/";
export interface AnalyticsProcessorOptions {
    /** URL of the Flagsmith analytics events API endpoint
     * @example https://flagsmith.example.com/api/v1/analytics
     */
    analyticsUrl?: string;
    /** Client-side key of the environment that analytics will be recorded for. **/
    environmentKey: string;
    /** Duration in milliseconds to wait for API requests to complete before timing out. Defaults to {@link DEFAULT_REQUEST_TIMEOUT_MS}. **/
    requestTimeoutMs?: number;
    logger?: Logger;
    /** Custom {@link fetch} implementation to use for API requests. **/
    fetch?: Fetch;
    /** @deprecated Use {@link analyticsUrl} instead. **/
    baseApiUrl?: string;
}
/**
 * Tracks how often individual features are evaluated whenever {@link trackFeature} is called.
 *
 * Analytics data is posted after {@link trackFeature} is called and at least {@link ANALYTICS_TIMER} seconds have
 * passed since the previous analytics API request was made (if any), or by calling {@link flush}.
 *
 * Data will stay in memory indefinitely until it can be successfully posted to the API.
 * @see https://docs.flagsmith.com/advanced-use/flag-analytics.
 */
export declare class AnalyticsProcessor {
    private analyticsUrl;
    private environmentKey;
    private lastFlushed;
    analyticsData: {
        [key: string]: any;
    };
    private requestTimeoutMs;
    private logger;
    private currentFlush;
    private customFetch;
    constructor(data: AnalyticsProcessorOptions);
    /**
     * Try to flush pending collected data to the Flagsmith analytics API.
     */
    flush(): Promise<void>;
    /**
     * Track a single evaluation event for a feature.
     *
     * @see FlagsmithConfig.enableAnalytics
     */
    trackFeature(featureName: string): void;
}
