import { PurgeService } from '@nanoesis/engine';

interface CloudflarePurgeConfig {
    /** The Cloudflare zone ID fronting the published site. */
    readonly zoneId: string;
    /** A scoped API token with the "Cache Purge" permission for the zone. */
    readonly apiToken: string;
    /** Injected for tests; defaults to the global `fetch`. */
    readonly fetch?: typeof fetch;
    /** Override the API base (defaults to the public Cloudflare endpoint). */
    readonly baseUrl?: string;
}
/**
 * A {@link PurgeService} that invalidates an entire Cloudflare zone after a publish
 * (DESIGN §11, Phase 1 purges everything, no per-path batching). It is a single HTTP
 * call (`POST /zones/{zone}/purge_cache` with `purge_everything: true`), so it needs no
 * SDK; `fetch` is injected for hermetic testing. The host wires this in production; the
 * local example uses the engine's no-op purge instead (no Cloudflare account needed).
 */
declare class CloudflarePurge implements PurgeService {
    private readonly config;
    private readonly fetchFn;
    private readonly endpoint;
    constructor(config: CloudflarePurgeConfig);
    purgeAll(): Promise<void>;
}

export { CloudflarePurge, type CloudflarePurgeConfig };
