import type { OpenAPIRef, OpenAPIDefinition } from '../types/index.js';
import type { MergedOpenAPISchema } from './types.js';
import type { Options } from './config-options/types.js';
/**
 * Loads and keeps spec. Provides raw spec operations
 */
export declare function pushRef(stack: string[], ref?: string): string[];
export declare function concatRefStacks(base: string[], stack?: string[]): string[];
export declare class OpenAPIParser {
    private options;
    definitionUrl?: string;
    definition: OpenAPIDefinition;
    private readonly allowMergeRefs;
    constructor(definition: OpenAPIDefinition, definitionUrl?: string, options?: Options & {
        versionId?: string;
    });
    validate(spec: GenericObject): void;
    /**
     * get spec part by JsonPointer ($ref)
     */
    byRef: <T>(ref: string) => T | undefined;
    /**
     * checks if the object is OpenAPI reference (contains $ref property)
     */
    isRef<T>(obj: OpenAPIRef | T): obj is OpenAPIRef;
    /**
     * Resolve given reference object or return as is if it is not a reference
     * @param obj object to dereference
     * @param baseRefsStack
     * @param mergeAsAllOf
     */
    deref<T>(obj: OpenAPIRef | T, baseRefsStack?: string[], mergeAsAllOf?: boolean, level?: number): {
        resolved: T;
        refsStack: string[];
    };
    mergeRefs<T>(ref: OpenAPIRef, resolved: T, mergeAsAllOf: boolean): T;
    /**
     * Merge allOf constraints.
     * @param schema schema with allOF
     * @param $ref pointer of the schema
     * @param refsStack
     * @param absolutePointer
     */
    mergeAllOf(schema: MergedOpenAPISchema, $ref: string | undefined, refsStack: string[], absolutePointer?: string, level?: number): MergedOpenAPISchema;
    /**
     * Find all derived definitions among #/components/schemas from any of $refs
     * returns map of definition pointer to definition name
     * @param $refs array of references to find derived from
     */
    findDerived($refs: string[]): Record<string, string[] | string>;
    private hoistOneOfs;
}
