import type Parser from "web-tree-sitter";
export interface ZodFieldType {
    type: string;
    constraints?: string[];
    nested?: Record<string, ZodFieldType>;
    optional?: boolean;
    nullable?: boolean;
}
export interface ZodShape {
    fields: Record<string, ZodFieldType>;
    partial: boolean;
}
/**
 * Extract the shape of a top-level Zod schema from a source tree.
 *
 * Walks `variable_declarator` nodes and tries each one's initializer. Returns
 * the first successfully parsed Zod schema, or `null` when no z.object(...) is
 * found. Other validation libraries (Yup, Joi, etc.) intentionally return null
 * — downstream tools wrap this and add `schema_lib: "unknown"` at their own
 * aggregation level.
 */
export declare function extractZodSchema(tree: Parser.Tree, _source: string): ZodShape | null;
export type LinkRefKind = "link" | "router_push" | "router_replace";
export interface LinkRef {
    /** Literal href value when isDynamic=false; raw expression text otherwise. */
    href: string;
    /** True if the href is a template literal with substitutions or a non-literal expression. */
    isDynamic: boolean;
    /** 1-indexed line number of the attribute / call site. */
    line: number;
    /** The kind of navigation source. */
    kind: LinkRefKind;
}
/**
 * Extract navigation target references from a parsed tree:
 *   - `<Link href="/path">` JSX components
 *   - `router.push("/path")` / `router.replace("/path")` call sites
 *
 * Literal string values populate `href` with the unquoted content and
 * `isDynamic: false`. Template literals with substitutions and identifier
 * references populate `href` with the raw expression text and `isDynamic: true`.
 */
export declare function extractLinkHrefs(tree: Parser.Tree, _source: string): LinkRef[];
//# sourceMappingURL=nextjs-ast-readers.d.ts.map