mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 18:48:27 +00:00
chore: Emit TypeScript declaration files so that we can type-check the extensions folder soon.
This commit is contained in:
@@ -31,7 +31,9 @@ function parseWebhookBody(req: Request, rawBody: string): WebhookRequestBody | n
|
||||
}
|
||||
}
|
||||
|
||||
export function createLineWebhookMiddleware(options: LineWebhookOptions) {
|
||||
export function createLineWebhookMiddleware(
|
||||
options: LineWebhookOptions,
|
||||
): (req: Request, res: Response, _next: NextFunction) => Promise<void> {
|
||||
const { channelSecret, onEvents, runtime } = options;
|
||||
|
||||
return async (req: Request, res: Response, _next: NextFunction): Promise<void> => {
|
||||
@@ -87,7 +89,10 @@ export interface StartLineWebhookOptions {
|
||||
path?: string;
|
||||
}
|
||||
|
||||
export function startLineWebhook(options: StartLineWebhookOptions) {
|
||||
export function startLineWebhook(options: StartLineWebhookOptions): {
|
||||
path: string;
|
||||
handler: (req: Request, res: Response, _next: NextFunction) => Promise<void>;
|
||||
} {
|
||||
const path = options.path ?? "/line/webhook";
|
||||
const middleware = createLineWebhookMiddleware({
|
||||
channelSecret: options.channelSecret,
|
||||
|
||||
Reference in New Issue
Block a user