import type { CliContractsDocument } from "./types.js"; export declare class RefResolutionError extends Error { readonly ref: string; constructor(ref: string, message: string); } export interface ResolveRefsOptions { basePath?: string; } /** * Resolves `$ref` pointers within a contract document. * * - Internal refs (`#/components/schemas/Error`) are resolved against the * document root. * - External file refs (`./path/to/file.yaml#/json/pointer`) are resolved * relative to `basePath` (the directory containing the contract file). * The referenced file is loaded, parsed as YAML, and the JSON pointer * is resolved within it. Nested `$ref` inside the external document * are resolved against that document's own root. * * Returns a deep copy with all $refs replaced by the referenced value. */ export declare function resolveRefs(doc: CliContractsDocument, options?: ResolveRefsOptions): CliContractsDocument; /** * Collects all `$ref` strings found in the document. */ export declare function collectRefs(obj: unknown): string[]; /** * Validates that all $ref pointers resolve to existing paths. * Checks both internal (`#/`) and external file refs. */ export declare function validateRefs(doc: CliContractsDocument, options?: { basePath?: string; }): { valid: boolean; unresolvedRefs: string[]; }; //# sourceMappingURL=ref-resolver.d.ts.map