import type { WebhookRequestBody } from "@line/bot-sdk"; import type { Request, Response, NextFunction } from "express"; import type { BotConfig } from "../config/config.js"; import type { LineInboundContext } from "./bot-message-context.js"; import type { ResolvedLineAccount } from "./types.js"; import { type RuntimeEnv } from "../runtime.js"; export interface LineBotOptions { channelAccessToken: string; channelSecret: string; accountId?: string; runtime?: RuntimeEnv; config?: BotConfig; mediaMaxMb?: number; onMessage?: (ctx: LineInboundContext) => Promise; } export interface LineBot { handleWebhook: (body: WebhookRequestBody) => Promise; account: ResolvedLineAccount; } export declare function createLineBot(opts: LineBotOptions): LineBot; export declare function createLineWebhookCallback(bot: LineBot, channelSecret: string, path?: string): { path: string; handler: (req: Request, res: Response, _next: NextFunction) => Promise; };