import type Parser from "web-tree-sitter";
export interface MetadataFields {
    title?: string;
    description?: string;
    openGraph?: {
        title?: string;
        description?: string;
        images?: string[];
    };
    twitter?: {
        card?: string;
        title?: string;
        description?: string;
    };
    alternates?: {
        canonical?: string;
    };
    robots?: string;
    other?: Record<string, unknown>;
    /** Set when the metadata export references an identifier or a non-literal expression. */
    _non_literal?: boolean;
}
/** Unwrap a tree-sitter string node (e.g. `"foo"`, `'foo'`, `` `foo` ``) to its literal content, or null. */
export declare function readStringLiteral(node: Parser.SyntaxNode | null | undefined): string | null;
/**
 * Parse a Next.js page/layout for `metadata` or `generateMetadata` exports.
 *
 * Supports two shapes:
 *   - `export const metadata = { title: "...", ... }`
 *   - `export async function generateMetadata() { return { ... }; }`
 *
 * Returns an empty object when no metadata export is present, and sets
 * `_non_literal: true` when the export exists but is not a parseable object
 * literal (e.g. `export const metadata = someExternal`).
 */
export declare function parseMetadataExport(tree: Parser.Tree, _source: string): MetadataFields;
export type FetchCallee = "fetch" | "cookies" | "headers" | "unstable_noStore";
export interface FetchCall {
    callee: FetchCallee;
    line: number;
    /**
     * Parsed cache directive from fetch() options:
     *   - `"force-cache"` / `"no-store"` / `"default"` / ...
     *   - `"isr-60"` for `next: { revalidate: 60 }`
     *   - `null` when no options or fetch callee
     */
    cacheOption: string | null;
    /** True if this awaited call is sequential w.r.t. a previous await in the same block. */
    isSequential: boolean;
    /** True if this call forces SSR (cookies/headers, fetch no-store, unstable_noStore). */
    isSsrTrigger: boolean;
}
/**
 * Read all fetch/cookies/headers/unstable_noStore calls out of a tree.
 *
 * `isSequential` is set when two awaited fetches live in the same statement_block
 * with no identifier overlap between the earlier statement's bindings and the
 * later statement's argument expression. Callers wanting waterfall detection
 * use this flag directly.
 *
 * `// sequential intentional` comments on the line preceding an await suppress
 * the flag for that await.
 */
export declare function extractFetchCalls(tree: Parser.Tree, source: string): FetchCall[];
//# sourceMappingURL=nextjs-metadata-readers.d.ts.map