import type { PreviewData } from "next"; import type { Client } from "@prismicio/client"; import type { NextApiRequestLike } from "./types"; /** * Configuration for `enableAutoPreviews`. * * @typeParam TPreviewData - Next.js preview data object. */ export type EnableAutoPreviewsConfig = { /** Prismic client with which automatic previews will be enabled. */ client: Pick; /** * The `previewData` object provided in the `getStaticProps()` or * `getServerSideProps()` context object. */ previewData?: PreviewData; /** * The `req` object from a Next.js API route. * * @see Next.js API route docs: \ */ req?: NextApiRequestLike; }; /** * Configures a Prismic client to automatically query draft content during a * preview session. It either takes in a Next.js `getStaticProps` context object * or a Next.js API endpoint request object. * * @param config - Configuration for the function. */ export declare function enableAutoPreviews(config: EnableAutoPreviewsConfig): void;