/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { AdaptedViewSchema, type Adapters, type TreeStoredSchema } from "../../core/index.js";
import { type FullSchemaPolicy } from "../../feature-libraries/index.js";
import { type FieldSchema, type ImplicitFieldSchema } from "../schemaTypes.js";
import type { SchemaCompatibilityStatus } from "./tree.js";
/**
 * A collection of View information for schema, including policy.
 */
export declare class ViewSchema {
    readonly policy: FullSchemaPolicy;
    readonly adapters: Adapters;
    /**
     * Cached conversion of the view schema in the stored schema format.
     */
    private readonly viewSchemaAsStored;
    /**
     * Normalized view schema (implicitly allowed view schema types are converted to their canonical form).
     */
    readonly schema: FieldSchema;
    /**
     * @param viewSchema - Schema for the root field of this view.
     */
    constructor(policy: FullSchemaPolicy, adapters: Adapters, viewSchema: ImplicitFieldSchema);
    /**
     * 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): Omit<SchemaCompatibilityStatus, "canInitialize">;
    /**
     * 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;
}
//# sourceMappingURL=view.d.ts.map