import type { Run, ApiCheck, ApiCheckResult } from "../types/index.js";
export interface Webhook {
    id: string;
    url: string;
    events: string[];
    projectId: string | null;
    secret: string | null;
    active: boolean;
    createdAt: string;
}
export declare function createWebhook(input: {
    url: string;
    events?: string[];
    projectId?: string;
    secret?: string;
}): Webhook;
export declare function getWebhook(id: string): Webhook | null;
export declare function listWebhooks(projectId?: string): Webhook[];
export declare function deleteWebhook(id: string): boolean;
export interface WebhookPayload {
    event: string;
    run: {
        id: string;
        url: string;
        status: string;
        passed: number;
        failed: number;
        total: number;
    };
    schedule?: {
        name: string;
        cronExpression: string;
    };
    timestamp: string;
}
export declare function signPayload(body: string, secret: string): string;
export declare function formatDiscordPayload(payload: WebhookPayload): Record<string, unknown>;
export declare function formatSlackPayload(payload: WebhookPayload): Record<string, unknown>;
export declare function dispatchWebhooks(event: string, run: Run, schedule?: {
    name: string;
    cronExpression: string;
}): Promise<void>;
export interface ApiCheckWebhookPayload {
    event: "api_check_failed";
    check: {
        id: string;
        name: string;
        method: string;
        url: string;
    };
    result: {
        id: string;
        status: string;
        statusCode: number | null;
        responseTimeMs: number | null;
        assertionsFailed: string[];
        error: string | null;
    };
    timestamp: string;
}
export declare function dispatchApiCheckWebhooks(check: ApiCheck, result: ApiCheckResult): Promise<void>;
export declare function testWebhook(id: string): Promise<boolean>;
//# sourceMappingURL=webhooks.d.ts.map