/**
 * @sanity/ailf-core — Sink schemas
 *
 * Zod schemas for runtime validation of config/sinks.yaml — the configuration
 * file for report delivery sinks.
 *
 * Each sink type has its own config schema, and the top-level SinksFileSchema
 * validates the complete YAML structure. The discriminated union on `type`
 * ensures type-safe parsing with clear error messages for unknown sink types.
 *
 * Usage:
 *   import { SinksFileSchema } from "./schema.js"
 *   const parsed = SinksFileSchema.parse(rawYaml)
 *
 * @see docs/design-docs/report-store/sink-architecture.md
 */
import { z } from "zod";
/** All supported sink types as a Zod union. */
export declare const SinkTypeSchema: z.ZodEnum<{
    bigquery: "bigquery";
    "github-comment": "github-comment";
    slack: "slack";
    webhook: "webhook";
}>;
/** Supported sink type string literal union. */
export type SinkType = z.infer<typeof SinkTypeSchema>;
/**
 * Schema for sink routing rules.
 * Controls which messages are delivered based on severity and type.
 * When omitted, the sink receives all reports (backward compatible).
 */
export declare const SinkRoutingSchema: z.ZodObject<{
    critical: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
    digest: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
    info: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
    regression: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
    warning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
}, z.core.$strip>;
/** Inferred TypeScript type for sink routing rules. */
/** Config schema for a generic webhook sink. */
export declare const WebhookSinkConfigSchema: z.ZodObject<{
    enabled: z.ZodDefault<z.ZodBoolean>;
    headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    routing: z.ZodOptional<z.ZodObject<{
        critical: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        digest: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        info: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        regression: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        warning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
    }, z.core.$strip>>;
    type: z.ZodLiteral<"webhook">;
    url: z.ZodString;
}, z.core.$strip>;
export type SinkRouting = z.infer<typeof SinkRoutingSchema>;
/** Config schema for a Slack notification sink. */
export declare const SlackSinkConfigSchema: z.ZodObject<{
    channel: z.ZodOptional<z.ZodString>;
    enabled: z.ZodDefault<z.ZodBoolean>;
    routing: z.ZodOptional<z.ZodObject<{
        critical: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        digest: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        info: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        regression: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        warning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
    }, z.core.$strip>>;
    type: z.ZodLiteral<"slack">;
    webhookUrl: z.ZodString;
}, z.core.$strip>;
/** Config schema for a GitHub PR comment sink. */
export declare const GitHubCommentSinkConfigSchema: z.ZodObject<{
    enabled: z.ZodDefault<z.ZodBoolean>;
    routing: z.ZodOptional<z.ZodObject<{
        critical: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        digest: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        info: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        regression: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        warning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
    }, z.core.$strip>>;
    token: z.ZodOptional<z.ZodString>;
    type: z.ZodLiteral<"github-comment">;
}, z.core.$strip>;
/** Config schema for a BigQuery sink. */
export declare const BigQuerySinkConfigSchema: z.ZodObject<{
    credentials: z.ZodOptional<z.ZodString>;
    dataset: z.ZodString;
    enabled: z.ZodDefault<z.ZodBoolean>;
    project: z.ZodString;
    routing: z.ZodOptional<z.ZodObject<{
        critical: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        digest: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        info: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        regression: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        warning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
    }, z.core.$strip>>;
    type: z.ZodLiteral<"bigquery">;
}, z.core.$strip>;
/**
 * A single sink configuration — discriminated on the `type` field.
 *
 * Zod v4 discriminatedUnion provides clear errors when the `type` value
 * doesn't match any known sink.
 */
export declare const SinkConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    credentials: z.ZodOptional<z.ZodString>;
    dataset: z.ZodString;
    enabled: z.ZodDefault<z.ZodBoolean>;
    project: z.ZodString;
    routing: z.ZodOptional<z.ZodObject<{
        critical: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        digest: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        info: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        regression: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        warning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
    }, z.core.$strip>>;
    type: z.ZodLiteral<"bigquery">;
}, z.core.$strip>, z.ZodObject<{
    enabled: z.ZodDefault<z.ZodBoolean>;
    routing: z.ZodOptional<z.ZodObject<{
        critical: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        digest: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        info: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        regression: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        warning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
    }, z.core.$strip>>;
    token: z.ZodOptional<z.ZodString>;
    type: z.ZodLiteral<"github-comment">;
}, z.core.$strip>, z.ZodObject<{
    channel: z.ZodOptional<z.ZodString>;
    enabled: z.ZodDefault<z.ZodBoolean>;
    routing: z.ZodOptional<z.ZodObject<{
        critical: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        digest: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        info: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        regression: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        warning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
    }, z.core.$strip>>;
    type: z.ZodLiteral<"slack">;
    webhookUrl: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
    enabled: z.ZodDefault<z.ZodBoolean>;
    headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    routing: z.ZodOptional<z.ZodObject<{
        critical: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        digest: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        info: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        regression: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        warning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
    }, z.core.$strip>>;
    type: z.ZodLiteral<"webhook">;
    url: z.ZodString;
}, z.core.$strip>], "type">;
/** Inferred TypeScript type for a single sink config. */
export type SinkConfig = z.infer<typeof SinkConfigSchema>;
/** Schema for the complete config/sinks.yaml file. */
export declare const SinksFileSchema: z.ZodObject<{
    sinks: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
        credentials: z.ZodOptional<z.ZodString>;
        dataset: z.ZodString;
        enabled: z.ZodDefault<z.ZodBoolean>;
        project: z.ZodString;
        routing: z.ZodOptional<z.ZodObject<{
            critical: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
            digest: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
            info: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
            regression: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
            warning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        }, z.core.$strip>>;
        type: z.ZodLiteral<"bigquery">;
    }, z.core.$strip>, z.ZodObject<{
        enabled: z.ZodDefault<z.ZodBoolean>;
        routing: z.ZodOptional<z.ZodObject<{
            critical: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
            digest: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
            info: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
            regression: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
            warning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        }, z.core.$strip>>;
        token: z.ZodOptional<z.ZodString>;
        type: z.ZodLiteral<"github-comment">;
    }, z.core.$strip>, z.ZodObject<{
        channel: z.ZodOptional<z.ZodString>;
        enabled: z.ZodDefault<z.ZodBoolean>;
        routing: z.ZodOptional<z.ZodObject<{
            critical: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
            digest: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
            info: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
            regression: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
            warning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        }, z.core.$strip>>;
        type: z.ZodLiteral<"slack">;
        webhookUrl: z.ZodString;
    }, z.core.$strip>, z.ZodObject<{
        enabled: z.ZodDefault<z.ZodBoolean>;
        headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
        routing: z.ZodOptional<z.ZodObject<{
            critical: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
            digest: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
            info: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
            regression: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
            warning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
        }, z.core.$strip>>;
        type: z.ZodLiteral<"webhook">;
        url: z.ZodString;
    }, z.core.$strip>], "type">>>;
}, z.core.$strip>;
/** Inferred TypeScript type for the full sinks config file. */
export type SinksFile = z.infer<typeof SinksFileSchema>;
