/**
 * Next.js revalidation handler for webhook-based cache invalidation
 *
 * This module provides a pre-built API route handler for processing
 * CMS webhooks and revalidating Next.js cache entries.
 *
 * @example One-line setup in consumer site
 * ```ts
 * // app/api/revalidate/route.ts
 * import { createRevalidateHandler } from '@riverbankcms/sdk/next/revalidate';
 * export const POST = createRevalidateHandler();
 * ```
 *
 * @example With custom options
 * ```ts
 * // app/api/revalidate/route.ts
 * import { createRevalidateHandler } from '@riverbankcms/sdk/next/revalidate';
 *
 * export const POST = createRevalidateHandler({
 *   onRevalidate: (payload, items) => {
 *     console.log(`Revalidated ${items.length} items for ${payload.event}`);
 *   },
 * });
 * ```
 */
import { type WebhookPayload } from '../webhooks/verify';
/**
 * Options for the revalidation handler.
 */
export interface RevalidateHandlerOptions {
    /**
     * Override the webhook secret. Defaults to RIVERBANK_WEBHOOK_SECRET env var.
     */
    secret?: string;
    /**
     * Callback called after successful revalidation.
     * Useful for logging or analytics.
     */
    onRevalidate?: (payload: WebhookPayload, revalidatedItems: string[]) => void;
}
/**
 * Create a Next.js API route handler for webhook revalidation.
 *
 * The handler:
 * 1. Verifies the webhook signature using HMAC-SHA256
 * 2. Calls `revalidateTag()` for each tag in the payload
 * 3. Calls `revalidatePath()` if a path is included in the data
 * 4. Returns a JSON response with the revalidation results
 *
 * @param options - Configuration options
 * @returns A Next.js Route Handler function
 *
 * @example
 * ```ts
 * // app/api/revalidate/route.ts
 * import { createRevalidateHandler } from '@riverbankcms/sdk/next/revalidate';
 *
 * export const POST = createRevalidateHandler();
 * ```
 */
export declare function createRevalidateHandler(options?: RevalidateHandlerOptions): (request: Request) => Promise<Response>;
