import type { NextApiRequest, NextApiResponse } from 'next'; import type { NextRequest } from 'next/server'; import { NextResponse } from 'next/server'; import { WebhookOptions } from './webhook'; export type NextServerOptions = WebhookOptions; export interface NextAppRouteHandlers { GET: (request: NextRequest) => NextResponse; POST: (request: NextRequest) => Promise; } export type NextPagesHandler = (req: NextApiRequest, res: NextApiResponse) => Promise; export declare const getNextAppRouteHandlers: (fromPhoneNumberId: string, options?: NextServerOptions) => NextAppRouteHandlers; export declare function getNextPagesApiHandler(fromPhoneNumberId: string, options?: NextServerOptions): NextPagesHandler; export type { NextApiRequest, NextApiResponse } from 'next'; export type { NextRequest } from 'next/server'; export { NextResponse } from 'next/server';