import { type Surface } from "./helpers/check-surface-compatibility.js"; /** * Result of a Block Kit validation. */ export interface ValidationResult { valid: boolean; errors: string[]; } /** * Payload targets recognized by the wrapper. `blocks` validates a bare blocks * array; `modal` / `home` validate a view envelope. */ export type ValidationTarget = "blocks" | "modal" | "home"; export interface ValidateBlockKitOptions { /** Which top-level shape to validate. Defaults to `blocks`. */ target?: ValidationTarget; /** * Which Slack surface the payload will render on. Used to enforce surface * compatibility. When `target` is `modal` or `home`, the surface is derived * automatically. */ surface?: Surface; } /** * Validates a Slack Block Kit payload against the JSON Schema and the set of * caveat helpers (duplicate block_ids, duplicate action_ids within a block, * cumulative markdown length, single-table, single-plan, focus_on_load * uniqueness, surface compatibility). * * The helpers run only once the payload satisfies the JSON Schema. When the * schema rejects it, the schema errors are returned on their own: the caveat * rules are cross-checks between fields that are already known to be * well-formed, and skipping them keeps a payload that ignores the schema's * size caps from reaching the helpers' per-element loops. `valid` is the same * either way — schema errors alone already make it `false`. * @param input - the payload to validate * @param options - target shape + optional surface * @returns `{ valid, errors }` — `errors` is a flat array of human-readable messages */ export declare function validateBlockKit(input: unknown, options?: ValidateBlockKitOptions): ValidationResult; //# sourceMappingURL=validate-block-kit.d.ts.map