export * from '@llamaindex/core/storage/chat-store';
import { KVDocumentStore, BaseDocumentStore } from '@llamaindex/core/storage/doc-store';
export * from '@llamaindex/core/storage/doc-store';
import { BaseIndexStore } from '@llamaindex/core/storage/index-store';
export * from '@llamaindex/core/storage/index-store';
import { SimpleKVStore } from '@llamaindex/core/storage/kv-store';
export * from '@llamaindex/core/storage/kv-store';
import { VectorStoreByType, BaseVectorStore } from '@llamaindex/core/vector-store';

type SaveDict = Record<string, any>;
declare class SimpleDocumentStore extends KVDocumentStore {
    private kvStore;
    constructor(kvStore?: SimpleKVStore, namespace?: string);
    static fromPersistDir(persistDir?: string, namespace?: string): Promise<SimpleDocumentStore>;
    static fromPersistPath(persistPath: string, namespace?: string): Promise<SimpleDocumentStore>;
    persist(persistPath?: string): Promise<void>;
    static fromDict(saveDict: SaveDict, namespace?: string): SimpleDocumentStore;
    toDict(): SaveDict;
}

/**
 * Checks if a file exists.
 * Analogous to the os.path.exists function from Python.
 * @param path The path to the file to check.
 * @returns A promise that resolves to true if the file exists, false otherwise.
 */
declare function exists(path: string): Promise<boolean>;
/**
 * Recursively traverses a directory and yields all the paths to the files in it.
 * @param dirPath The path to the directory to traverse.
 */
declare function walk(dirPath: string): AsyncIterable<string>;

interface StorageContext {
    docStore: BaseDocumentStore;
    indexStore: BaseIndexStore;
    vectorStores: VectorStoreByType;
}
type BuilderParams = {
    docStore: BaseDocumentStore;
    indexStore: BaseIndexStore;
    vectorStore: BaseVectorStore;
    vectorStores: VectorStoreByType;
    persistDir: string;
};
declare function storageContextFromDefaults({ docStore, indexStore, vectorStore, vectorStores, persistDir, }: Partial<BuilderParams>): Promise<StorageContext>;

export { SimpleDocumentStore, type StorageContext, exists, storageContextFromDefaults, walk };
