import { Hono } from 'hono';
import type { DedupCache } from '../webhook/dedup.js';
import type { WebhookInfo } from '../webhook/handler.js';
import type { GenericSourceManager } from '../webhook/generic-sources.js';
/**
 * Dependencies for generic webhook routes.
 */
export interface GenericWebhookRoutesDeps {
    /** Generic source manager for source lookup and validation */
    sourceManager: GenericSourceManager;
    /** Delivery ID deduplication cache */
    dedup: DedupCache;
    /** Processing callback -- connects to the trigger matching pipeline */
    onWebhook: (info: WebhookInfo) => Promise<void>;
}
/**
 * Create generic webhook routes for non-GitHub webhook ingestion.
 *
 * Endpoint: POST /webhook/:orgId/generic/:sourceId
 *
 * Handler flow:
 * 1. Read raw body
 * 2. Look up source from GenericSourceManager
 * 3. Check payload size
 * 4. Rate limit check
 * 5. Verify signature using per-source verification config
 * 6. Extract idempotency key, check dedup
 * 7. Extract event type, check allowed events
 * 8. Normalize and process through pipeline
 * 9. Return response
 *
 * @param deps - Dependencies (source manager, dedup cache, processing callback)
 * @returns Hono app with generic webhook routes
 */
export declare function createGenericWebhookRoutes(deps: GenericWebhookRoutesDeps): Hono;
//# sourceMappingURL=webhooks.d.ts.map