import { type Violation } from "@bufbuild/protovalidate";
import type { DescMessage, MessageShape } from "@bufbuild/protobuf";
/**
 * Validates a proto message against its schema-defined buf.validate constraints.
 *
 * Returns an empty array when valid, or an array of {@link Violation} objects.
 * This uses the same validation engine as the backend (protovalidate), ensuring
 * frontend and backend validation are always consistent.
 */
export declare function validateMessage<Desc extends DescMessage>(schema: Desc, message: MessageShape<Desc>): Violation[];
/**
 * Extracts the first violation message for a given field path.
 *
 * @param violations - Array of violations from {@link validateMessage}
 * @param fieldPath - Dot-separated field path (e.g., "slug", "metadata.slug")
 * @returns The first violation message for that field, or `null` if none.
 */
export declare function getFieldError(violations: Violation[], fieldPath: string): string | null;
/**
 * Extracts all violation messages for a given field path.
 *
 * @param violations - Array of violations from {@link validateMessage}
 * @param fieldPath - Dot-separated field path (e.g., "slug", "metadata.slug")
 * @returns Array of violation messages (empty if none).
 */
export declare function getFieldErrors(violations: Violation[], fieldPath: string): string[];
//# sourceMappingURL=validate.d.ts.map