/**
 * sinks/types.ts
 *
 * The ReportSink interface — the contract for all report delivery destinations.
 *
 * Sinks receive published reports and deliver them to external systems
 * (BigQuery, Slack, GitHub, webhooks, etc.). Each sink is self-contained:
 * it handles its own connection, schema mapping, and error handling.
 *
 * Design principle P6: Sinks are fire-and-forget. A sink failure is logged
 * but never blocks the pipeline, the Sanity write, or other sinks.
 *
 * @see docs/design-docs/report-store/sink-architecture.md
 */
import type { Report, SinkHealthStatus, SinkPayload, SinkResult } from "../pipeline/types.js";
import type { SinkRouting } from "./schema.js";
/**
 * A ReportSink receives published reports and delivers them to an
 * external system.
 *
 * Retries are handled by the sink runner (3 retries, exponential backoff)
 * — implementations should not retry internally.
 */
export interface ReportSink {
    /**
     * Optional health check — called at pipeline start to surface
     * configuration errors early (missing credentials, unreachable endpoint).
     */
    healthCheck?(): Promise<SinkHealthStatus>;
    /** Human-readable name for logging and diagnostics */
    readonly name: string;
    /**
     * Deliver a report to this sink's destination.
     *
     * Called after the report is written to the Sanity Content Lake
     * (system of record). The Sanity document is the source of truth;
     * sinks receive a copy.
     *
     * Implementations may accept either a plain Report (backward compatible)
     * or a SinkPayload (includes threshold violations and severity context).
     *
     * @returns Result indicating success, skip, or failure.
     */
    publish(report: Report | SinkPayload): Promise<SinkResult>;
    /** Optional routing rules from config/sinks.yaml */
    readonly routing?: SinkRouting;
}
/**
 * Check whether a sink should receive a delivery based on its routing
 * rules and the payload's severity/comparison data.
 *
 * Returns true (deliver) when:
 * - The sink has no routing config (backward compatible — receives everything)
 * - The payload's maxSeverity matches an enabled routing rule
 * - The payload has regressions and the sink's `regression` rule is enabled
 *
 * @see docs/archive/exec-plans/scenario-matrix-implementation/phase-5-readiness-thresholds.md
 */
export declare function shouldDeliver(routing: SinkRouting | undefined, payload: SinkPayload): boolean;
