import { NextRequest, NextResponse } from "next/server"; import { ServiceParams } from "./service"; import { getService } from "./utils"; export const getBot = async ( _req: NextRequest, params: ServiceParams, ): Promise => (await getService(params))?.getBot(params); export const sendMessage = async ( req: NextRequest, params: ServiceParams, ): Promise => (await getService(params))?.sendMessage(req, params); export const receiveMessage = async ( req: NextRequest, params: ServiceParams, ): Promise => (await getService(params))?.receiveMessage(req, params); export const handleWebhook = async ( req: NextRequest, params: ServiceParams, ): Promise => (await getService(params))?.handleWebhook(req); export const relinkBot = async ( _req: NextRequest, params: ServiceParams, ): Promise => (await getService(params))?.relink(params);