import { NextApiRequestLike, NextApiResponseLike } from "./types.js"; import { Client, LinkResolverFunction } from "@prismicio/client"; //#region src/pages/redirectToPreviewURL.d.ts export type RedirectToPreviewURLConfig = { /** The Prismic client configured for the preview session's repository. */ client: Pick; /** * The `req` object from a Next.js API route. * * @see Next.js API route docs: \ */ req: NextApiRequestLike; /** * The `res` object from a Next.js API route. * * @see Next.js API route docs: \ */ res: NextApiResponseLike; /** * A Link Resolver used to resolve the previewed document's URL. * * @see To learn more about Link Resolver: {@link https://prismic.io/docs/core-concepts/link-resolver-route-resolver} */ linkResolver?: LinkResolverFunction; /** * The default redirect URL if a URL cannot be determined for the previewed document. * * **Note**: If you `next.config.js` file contains a `basePath`, the `defaultURL` option must * _not_ include it. Instead, provide the `basePath` property using the `basePath` option. */ defaultURL?: string; /** * The `basePath` for the Next.js app as it is defined in `next.config.js`. This option can be * omitted if the app does not have a `basePath`. * * @remarks * The Router Handler or API route is unable to detect the app's `basePath` automatically. It * must be provided to `redirectToPreviewURL()` manually. */ basePath?: string; }; export declare function redirectToPreviewURL(config: RedirectToPreviewURLConfig): Promise; //#endregion //# sourceMappingURL=redirectToPreviewURL.d.ts.map