/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { Named } from "../../util";
import { SchemaData, Adapters, AdaptedViewSchema, Compatibility } from "../../core";
import { FullSchemaPolicy } from "../modular-schema";
import { TypedSchemaCollection } from "./schemaBuilder";
/**
 * A collection of View information for schema, including policy.
 */
export declare class ViewSchema {
    readonly policy: FullSchemaPolicy;
    readonly adapters: Adapters;
    readonly schema: TypedSchemaCollection;
    constructor(policy: FullSchemaPolicy, adapters: Adapters, schema: TypedSchemaCollection);
    /**
     * 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: SchemaData): {
        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.
     * Maybe pass in StoredSchemaRepository and optional ObservingDependent?
     */
    adaptRepo(stored: SchemaData): 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.
 * @public
 */
export interface Sourced {
    readonly builder: Named<string>;
}
//# sourceMappingURL=view.d.ts.map