import type { WebhookEvent } from "@line/bot-sdk"; import type { BotConfig } from "../config/config.js"; import type { RuntimeEnv } from "../runtime.js"; import type { ResolvedLineAccount } from "./types.js"; import { type LineInboundContext } from "./bot-message-context.js"; export interface LineHandlerContext { cfg: BotConfig; account: ResolvedLineAccount; runtime: RuntimeEnv; mediaMaxBytes: number; processMessage: (ctx: LineInboundContext) => Promise; replayCache?: LineWebhookReplayCache; } export type LineWebhookReplayCache = { seenEvents: Map; inFlightEvents: Map>; lastPruneAtMs: number; }; export declare function createLineWebhookReplayCache(): LineWebhookReplayCache; export declare function handleLineWebhookEvents(events: WebhookEvent[], context: LineHandlerContext): Promise;