/**
 * Server-side publish validation gate.
 *
 * The admin UI runs pre-publish checks, but the data layer is reachable by the
 * SDK, MCP tools, agents, and the public API — all of which could otherwise
 * publish broken content straight past those checks. This module is the single
 * shared validator the action layer runs on every publish so the rules hold no
 * matter who writes.
 *
 * Scope is deliberately narrow and universal: only publicly-routed content
 * (collections typed `page` or `post`) is gated, and only on hard, content-
 * agnostic invariants that make a *published* page genuinely broken (no title,
 * no URL). Field-shape rules belong in the collection's own field definitions.
 * Softer quality issues (missing description, etc.) are returned as warnings
 * and never block.
 */
import type { ActuateCMSConfig, CollectionDefinition } from '../config/types.js';
export type PublishValidationMode = 'block' | 'warn' | 'off';
export interface PublishValidationResult {
    errors: string[];
    warnings: string[];
}
/**
 * Resolve the configured gate mode. Defaults to `block` — a published page that
 * fails a hard invariant is a defect, and the whole point of the gate is to
 * stop it server-side. Operators can relax to `warn` (log only) or `off`.
 */
export declare function resolvePublishValidationMode(config: Pick<ActuateCMSConfig, 'seo'> | null | undefined): PublishValidationMode;
/**
 * Only publicly-routed content is gated. A collection qualifies when it is
 * explicitly typed `page` or `post`; everything else (internal singletons,
 * untyped/utility collections, forms with their own lifecycle) is skipped.
 */
export declare function isGatedContentCollection(collectionDef: CollectionDefinition | null | undefined): boolean;
/**
 * Validate a document that is about to be (or remain) published. `data` is the
 * full, merged document data as it will be stored.
 */
export declare function validatePublishableDocument(params: {
    data: Record<string, unknown>;
}): PublishValidationResult;
/**
 * Run the gate for a publish and apply the configured mode. Throws a single
 * combined error in `block` mode when there are hard errors; logs (non-test)
 * in `warn` mode; no-ops in `off` mode. Returns the raw result so callers can
 * surface warnings.
 */
export declare function enforcePublishValidation(params: {
    collectionDef: CollectionDefinition | null | undefined;
    data: Record<string, unknown>;
    config: Pick<ActuateCMSConfig, 'seo'> | null | undefined;
}): PublishValidationResult;
//# sourceMappingURL=publish.d.ts.map