/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { AdaptedViewSchema, type Adapters, Compatibility, type TreeStoredSchema } from "../../core/index.js";
import { type Named } from "../../util/index.js";
import { type FullSchemaPolicy } from "../modular-schema/index.js";
/**
 * A collection of View information for schema, including policy.
 */
export declare class ViewSchema {
    readonly policy: FullSchemaPolicy;
    readonly adapters: Adapters;
    readonly storedSchema: TreeStoredSchema;
    /**
     * @param storedSchema - Cached conversion of view schema into a stored schema.
     */
    constructor(policy: FullSchemaPolicy, adapters: Adapters, storedSchema: TreeStoredSchema);
    /**
     * Determines the compatibility of a stored document
     * (based on its stored schema) with a viewer (based on its view schema).
     *
     * Adapters can be provided to handle differences between the two schema.
     * Adapters should only use to types in the `view` SchemaRepository.
     *
     * TODO: this API violates the parse don't validate design philosophy.
     * It should be wrapped with (or replaced by) a parse style API.
     */
    checkCompatibility(stored: TreeStoredSchema): {
        read: Compatibility;
        write: Compatibility;
        writeAllowingStoredSchemaUpdates: Compatibility;
    };
    /**
     * Compute a schema that `original` could be viewed as using adapters as needed.
     *
     * TODO: have a way for callers to get invalidated on schema updates.
     */
    adaptRepo(stored: TreeStoredSchema): AdaptedViewSchema;
    /**
     * Adapt original such that it allows member types which can be adapted to its specified types.
     */
    private adaptField;
    private adaptTree;
}
/**
 * Record where a schema came from for error reporting purposes.
 */
export interface Sourced {
    readonly builder: Named<string>;
}
//# sourceMappingURL=view.d.ts.map