/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { IFluidDataStoreRuntime, IChannelStorageService } from "@fluidframework/datastore-definitions";
import { ITelemetryContext, ISummaryTreeWithStats, IGarbageCollectionData } from "@fluidframework/runtime-definitions";
import { ICodecOptions } from "../codec";
import { Dependee, Dependent, FieldStoredSchema, SchemaData, StoredSchemaRepository, TreeStoredSchema, TreeSchemaIdentifier, SchemaEvents } from "../core";
import { Summarizable, SummaryElementParser, SummaryElementStringifier } from "../shared-tree-core";
import { JsonCompatibleReadOnly } from "../util";
/**
 * Provides methods for summarizing and loading a schema repository.
 */
export declare class SchemaSummarizer implements Summarizable {
    private readonly runtime;
    private readonly schema;
    readonly key = "Schema";
    private readonly schemaBlob;
    private readonly codec;
    constructor(runtime: IFluidDataStoreRuntime, schema: StoredSchemaRepository, options: ICodecOptions);
    getAttachSummary(stringify: SummaryElementStringifier, fullTree?: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;
    summarize(stringify: SummaryElementStringifier, fullTree?: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext): Promise<ISummaryTreeWithStats>;
    getGCData(fullGC?: boolean): IGarbageCollectionData;
    load(services: IChannelStorageService, parse: SummaryElementParser): Promise<void>;
}
interface SchemaOp {
    readonly type: "SchemaOp";
    readonly data: string;
}
/**
 * Wraps a StoredSchemaRepository, adjusting its "update" function to hook into Fluid Ops.
 *
 * TODO: this should be more integrated with transactions.
 */
export declare class SchemaEditor<TRepository extends StoredSchemaRepository> implements StoredSchemaRepository {
    readonly inner: TRepository;
    private readonly submit;
    private readonly codec;
    constructor(inner: TRepository, submit: (op: SchemaOp) => void, options: ICodecOptions);
    on<K extends keyof SchemaEvents>(eventName: K, listener: SchemaEvents[K]): () => void;
    /**
     * @returns true if this is a schema op and was handled.
     *
     * TODO: Shared tree needs a pattern for handling non-changeset operations.
     * See TODO on `SharedTree.processCore`.
     */
    tryHandleOp(encodedOp: JsonCompatibleReadOnly): boolean;
    tryApplyStashedOp(encodedOp: JsonCompatibleReadOnly): boolean;
    /**
     * @returns true iff this is a schema op and was submitted.
     *
     * TODO: Shared tree needs a pattern for handling non-changeset operations.
     * See TODO on `SharedTree.processCore`.
     */
    tryResubmitOp(content: JsonCompatibleReadOnly): boolean;
    update(newSchema: SchemaData): void;
    registerDependent(dependent: Dependent): boolean;
    removeDependent(dependent: Dependent): void;
    get computationName(): string;
    get listDependees(): undefined | (() => Iterable<Dependee>);
    get rootFieldSchema(): FieldStoredSchema;
    get treeSchema(): ReadonlyMap<TreeSchemaIdentifier, TreeStoredSchema>;
    private tryDecodeOp;
}
export {};
//# sourceMappingURL=schemaSummarizer.d.ts.map