import { NextRequest } from 'next/server';
import { S as ServeHandlerOptions } from '../index-CbB8FSnY.cjs';
export { C as Client, N as NovuRequestHandler, w as workflow } from '../index-CbB8FSnY.cjs';
export { C as CronExpression, W as Workflow } from '../health-check.types-D8gbU9cU.cjs';
import { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.cjs';
import 'json-schema-to-ts';
import 'zod';

declare const frameworkName: SupportedFrameworkName;
/**
 * Defines a request handler for Next.js 12+.
 *
 * The argument types are kept abstract due to varying type checks across
 * Next.js versions. Next.js 15 uses `RouteContext` for the second argument,
 * while versions 13 and 14 omit it, and version 12 uses `NextApiResponse`,
 * which varies by environment (edge vs serverless).
 */
type RequestHandler = (expectedReq: NextRequest, res: unknown) => Promise<Response>;
/**
 * In Next.js, serve and register any declared workflows with Novu, making
 * them available to be triggered by events.
 *
 * Supports Next.js 12+, both serverless and edge.
 *
 * @example Next.js <=12 or the pages router can export the handler directly
 * ```ts
 * import { serve } from "@novu/framework/next";
 * import { myWorkflow } from "./src/novu/workflows"; // Your workflows
 *
 * export default serve({ workflows: [myWorkflow] });
 * ```
 *
 * @example Next.js >=13 with the `app` dir must export individual methods
 * ```ts
 * import { serve } from "@novu/framework/next";
 * import { myWorkflow } from "./src/novu/workflows";
 *
 * export const { GET, POST, OPTIONS } = serve({ workflows: [myWorkflow] });
 * ```
 */
declare const serve: (options: ServeHandlerOptions) => RequestHandler & {
    GET: RequestHandler;
    POST: RequestHandler;
    OPTIONS: RequestHandler;
};

export { type RequestHandler, ServeHandlerOptions, frameworkName, serve };
