import { BasePlatformAdapter, MessageEvent, ProcessingOutcome, SendResult } from './platform-base.js'; import type { PlatformConfig } from './platform-base.js'; export interface WebhookRoute { secret: string; events?: string[]; prompt?: string; skills?: string[]; deliver?: string; deliverExtra?: Record; deliverOnly?: boolean; rateLimit?: number; } export interface WebhookConfig extends PlatformConfig { host?: string; port?: number; secret?: string; routes?: Record; } interface WebhookRequest { route: string; headers: Record; body: string; payload: Record; } declare const DEFAULT_PORT = 8644; declare const INSECURE_NO_AUTH = "INSECURE_NO_AUTH"; declare const MAX_BODY_BYTES = 1048576; export declare class WebhookChannel extends BasePlatformAdapter { private host; private port; private globalSecret; private routes; private seenDeliveries; private rateLimitWindows; private deliveryInfo; constructor(config: WebhookConfig); connect(): Promise; disconnect(): Promise; validateSignature(routeKey: string, body: string, headers: Record): boolean; isRateLimited(routeKey: string): boolean; isIdempotent(deliveryId: string): boolean; handleWebhookPost(req: WebhookRequest): Promise<{ status: number; body: string; }>; send(_chatId: string, _content: string, _replyTo?: string, _metadata?: Record): Promise; editMessage(_chatId: string, messageId: string, _content: string, _finalize?: boolean): Promise; sendTyping(_chatId: string, _metadata?: Record): Promise; stopTyping(_chatId: string): Promise; sendImage(chatId: string, imageUrl: string, caption?: string, _replyTo?: string, _metadata?: Record): Promise; sendAnimation(chatId: string, animationUrl: string, caption?: string, replyTo?: string, metadata?: Record): Promise; getChatInfo(_chatId: string): Promise>; addRoute(key: string, route: WebhookRoute): void; removeRoute(key: string): void; listRoutes(): string[]; get serverHost(): string; get serverPort(): number; onProcessingComplete(_event: MessageEvent, _outcome: ProcessingOutcome): void; } export { DEFAULT_PORT, INSECURE_NO_AUTH, MAX_BODY_BYTES }; //# sourceMappingURL=webhook.d.ts.map