import type { Database } from "bun:sqlite";
import type { Webhook, CreateWebhookInput } from "../types/index.js";
/**
 * Validate webhook URL to prevent SSRF attacks.
 * Blocks localhost, private IPs, and cloud metadata endpoints.
 */
export declare function validateWebhookUrl(urlString: string): {
    valid: false;
    error: string;
} | {
    valid: true;
};
export interface WebhookDelivery {
    id: string;
    webhook_id: string;
    event: string;
    payload: string;
    status_code: number | null;
    response: string | null;
    attempt: number;
    created_at: string;
}
export declare function createWebhook(input: CreateWebhookInput, db?: Database): Webhook;
export declare function getWebhook(id: string, db?: Database): Webhook | null;
export declare function listWebhooks(db?: Database): Webhook[];
export declare function deleteWebhook(id: string, db?: Database): boolean;
export declare function listDeliveries(webhookId?: string, limit?: number, db?: Database): WebhookDelivery[];
export declare function dispatchWebhook(event: string, payload: unknown, db?: Database): Promise<void>;
//# sourceMappingURL=webhooks.d.ts.map