import { CdmCorpusContext, CdmCorpusDefinition, CdmDocumentDefinition, CdmFolderDefinition, CdmObject, cdmObjectType, copyOptions, resolveOptions } from '../internal';
import { IPersistence } from './Common/IPersistence';
export declare class PersistenceLayer {
    private TAG;
    static cdmFolder: string;
    static modelJson: string;
    /**
     * @internal
     */
    corpus: CdmCorpusDefinition;
    /**
     * @internal
     */
    ctx: CdmCorpusContext;
    private readonly registeredPersistenceFormats;
    private readonly isRegisteredPersistenceAsync;
    /**
     * Constructs a PersistenceLayer and registers persistence classes to load and save known file formats.
     * @param corpus The corpus that owns this persistence layer.
     */
    constructor(corpus: CdmCorpusDefinition);
    /**
     * @param args arguments passed to the persistence class.
     * @param objectType any of cdmObjectType.
     * @param persistenceType a type supported by the persistence layer. Can by any of PersistenceTypes.
     */
    static fromData<T extends CdmObject>(...args: any[]): T;
    /**
     * @param instance the instance that is going to be serialized.
     * @param resOpt information about how to resolve the instance.
     * @param persistenceType a type supported by the persistence layer. Can by any of PersistenceTypes.
     * @param options set of options to specify how the output format.
     */
    static toData<T extends CdmObject, U>(instance: T, resOpt: resolveOptions, options: copyOptions, persistenceType: string): U;
    static fetchPersistenceClass(objectType: cdmObjectType, persistenceType: string): IPersistence;
    /**
     * @internal
     * Loads a document from the folder path.
     * @param folder The folder that contains the document we want to load.
     * @param docName The document name.
     * @param docContainer The loaded document, if it was previously loaded.
     * @param resOpt Optional parameter. The resolve options.
     */
    LoadDocumentFromPathAsync(folder: CdmFolderDefinition, docName: string, docContainer: CdmDocumentDefinition, resOpt?: resolveOptions): Promise<CdmDocumentDefinition>;
    /**
     * @internal
     * a manifest or document can be saved with a new or exisitng name. This function on the corpus does all the actual work
     * because the corpus knows about persistence types and about the storage adapters
     * if saved with the same name, then consider this document 'clean' from changes. if saved with a back compat model or
     * to a different name, then the source object is still 'dirty'
     * an option will cause us to also save any linked documents.
     */
    saveDocumentAsAsync(doc: CdmDocumentDefinition, options: copyOptions, newName: string, saveReferenced: boolean): Promise<boolean>;
    private fetchRegisteredPersistenceFormat;
}
