openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
20 lines (19 loc) • 844 B
TypeScript
import type { WebhookRequestBody } from "@line/bot-sdk";
import type { NextFunction, Request, Response } from "express";
import { type RuntimeEnv } from "openclaw/plugin-sdk/runtime";
export interface LineWebhookOptions {
channelSecret: string;
onEvents: (body: WebhookRequestBody) => Promise<void>;
runtime?: RuntimeEnv;
}
export declare function createLineWebhookMiddleware(options: LineWebhookOptions): (req: Request, res: Response, _next: NextFunction) => Promise<void>;
export interface StartLineWebhookOptions {
channelSecret: string;
onEvents: (body: WebhookRequestBody) => Promise<void>;
runtime?: RuntimeEnv;
path?: string;
}
export declare function startLineWebhook(options: StartLineWebhookOptions): {
path: string;
handler: (req: Request, res: Response, _next: NextFunction) => Promise<void>;
};