/// <reference types="node" />
import { QuirrelClient, EnqueueJobOpts, EnqueueJobOptions, Job, DefaultJobOptions, QuirrelJobHandler, QuirrelOptions } from "./client";
import type { IncomingHttpHeaders } from "http";
export interface NextApiRequest {
    body: any;
    headers: IncomingHttpHeaders;
}
export interface NextApiResponse {
    setHeader(key: string, value: string): void;
    status(code: number): void;
    send(body: string): void;
}
export declare type NextApiHandler = (req: NextApiRequest, res: NextApiResponse) => void | Promise<void>;
export { Job, EnqueueJobOpts, EnqueueJobOptions, DefaultJobOptions, QuirrelJobHandler, };
export declare type Queue<Payload> = Omit<QuirrelClient<Payload>, "respondTo" | "makeRequest">;
export declare function Queue<Payload>(route: string, handler: QuirrelJobHandler<Payload>, options?: QuirrelOptions): Queue<Payload> & NextApiHandler;
export declare function CronJob(route: string, cronSchedule: NonNullable<NonNullable<EnqueueJobOptions["repeat"]>["cron"]>, handler: () => Promise<void>, options?: QuirrelOptions): unknown;
