import { CdmCorpusContext } from '../Cdm/CdmCorpusContext';
/**
  * The CDM base class for an adapter object that can read and write documents from a data source.
  * This allows a user flexibility to interact with data from multiple sources without having
  * to manually copy data to the location where the Object Model is running. By deriving from this
  * this class, users can to create their own adapter if needed.
 */
export declare abstract class StorageAdapterBase {
    /**
     * The CDM corpus context, gives information for the logger.
     */
    ctx: CdmCorpusContext;
    /**
     * The location hint, gives a hint to the reader app about the
     * location where the adapter implementation (Nuget, NPM...) can be obtained.
     */
    locationHint: string;
    /**
     * Returns true if the adapter can read data, false otherwise.
     */
    canRead(): boolean;
    /**
     * Returns true if the adapter can write data, false otherwise.
     */
    canWrite(): boolean;
    /**
     * Returns JSON data that exists at the path as a JSON string
     */
    readAsync(corpusPath: string): Promise<string>;
    /**
     * writes the object data to the specified document path
     */
    writeAsync(corpusPath: string, data: string): Promise<void>;
    /**
     * converts a corpus path into a path in the domain of this adapter
     */
    createAdapterPath(corpusPath: string): string;
    /**
     * converts a path in the domain of this adapter into a corpus path
     */
    createCorpusPath(adapterPath: string): string;
    /**
     * Returns the last modified time of the file accessible by the adapter
     */
    computeLastModifiedTimeAsync(corpusPath: string): Promise<Date>;
    /**
     * Returns a list corpus paths to all files and folders at or under the
     * provided corpus path to a folder
     */
    fetchAllFilesAsync(folderCorpusPath: string): Promise<string[]>;
    /**
     * Applies the JSON config, has to be called after default constructor.
     */
    updateConfig(config: string): void;
    /**
     * Constructs the config.
     * Reeturns the object, representing the constructed config for that adapter.
     */
    fetchConfig(): string;
    /**
     * Empties the cache of files and folders if the storage adapter uses a cache
     */
    clearCache(): void;
    /**
     * If true, inherited classes should cache and reuse file query results if they support caching
     */
    protected isCacheEnabled(): boolean;
    /**
     * Calling this function tells the adapter it may cache and reuse file query results, as opposed to
     * reissuing queries to the underlying file storage, which may be a costly operation. This adapter is
     * allowed to cache and reuse queries until the object returned by this function has its dispose
     * function called. If createFileQueryCacheContext is called multiple times, caching is allowed until
     * all objects returned have thier dispose function called. Intended usage is for callers to wrap a
     * set of operations that should use caching with a try-finally block and call dispose inside finally.
     */
    createFileQueryCacheContext(): StorageAdapterCacheContext;
    private activeCacheContexts;
    /**
     * This function exists so that the StorageAdapterCacheContext's dispose function can remove itself
     * from the StorageAdapter's activeCacheContexts without needing to make activeCacheContexts public
     * @param adapter the adapter this function is created for
     */
    private createDisposeAdapterContextFunc;
}
/**
 * This class is used to track requests to enable file query caching. Each time a request to enable
 * caching is made an instance of this class is created and added the the StorageAdapter's activeCacheContexts
 * set. When dispose is called, this object is removed from that set. Whenever any items are in the adapter's
 * activeCacheContexts, caching is enabled.
 */
export declare class StorageAdapterCacheContext {
    private disposeFunc;
    constructor(dispose: {
        (StorageAdapterCacheContext: any): void;
    });
    dispose(): void;
}
export interface configObjectType {
    type?: string;
    root?: string;
    appId?: string;
    defaultNamespace?: string;
    adapters?: any[];
    hosts?: any[];
    locationHint?: string;
    config?: configObjectType;
    tenant?: string;
    clientId?: string;
    hostname?: string;
    sharedKey?: string;
    secret?: string;
    timeout?: number;
    maximumTimeout?: number;
    numberOfRetries?: number;
    sasToken?: string;
    endpoint?: string;
}
