import { NextApiHandler, NextApiRequest, NextApiResponse } from 'next'; export interface ApiMethodHandlers { get?: (req: NextApiRequest, res: NextApiResponse) => Promise; post?: (req: NextApiRequest, res: NextApiResponse) => Promise; put?: (req: NextApiRequest, res: NextApiResponse) => Promise; delete?: (req: NextApiRequest, res: NextApiResponse) => Promise; patch?: (req: NextApiRequest, res: NextApiResponse) => Promise; [key: string]: ((req: NextApiRequest, res: NextApiResponse) => Promise) | undefined; } /** * Creates an API handler that routes to the appropriate method handler based on the HTTP method * @param handlers Object with method handlers (get, post, put, delete, patch) * @returns A Next.js API handler */ export declare function createMethodHandler(handlers: ApiMethodHandlers): NextApiHandler; export default createMethodHandler;