import { PrismaClient } from "./types-prisma";
import type { NextApiRequest, NextApiResponse } from "next";
import { NextHandler } from "next-connect";
import { NextAdminOptions } from "./types";
type CreateAppHandlerParams<P extends string = "nextadmin"> = {
    /**
     * `apiBasePath` is a string that represents the base path of the admin API route. (e.g. `/api`) - optional.
     */
    apiBasePath: string;
    /**
     * Next-admin options
     */
    options?: NextAdminOptions;
    /**
     * Prisma client instance
     */
    prisma: PrismaClient;
    /**
     * A function that acts as a middleware. Useful to add authentication logic for example.
     */
    onRequest?: (req: NextApiRequest, res: NextApiResponse, next: NextHandler) => Promise<void>;
    paramKey?: P;
};
export declare const createHandler: <P extends string = "nextadmin">({ apiBasePath, options, prisma, paramKey, onRequest, }: CreateAppHandlerParams<P>) => {
    run: (req: NextApiRequest, res: NextApiResponse) => Promise<unknown>;
    router: import("next-connect/types/node").NodeRouter<NextApiRequest, NextApiResponse>;
};
export {};
//# sourceMappingURL=pageHandler.d.ts.map