import { Document } from "@langchain/core/documents"; import { BaseStore } from "@langchain/core/stores"; /** * Class that provides a layer of abstraction over the base storage, * allowing for the encoding and decoding of keys and values. It extends * the BaseStore class. */ export declare class EncoderBackedStore extends BaseStore { lc_namespace: string[]; store: BaseStore; keyEncoder: (key: K) => string; valueSerializer: (value: V) => SerializedType; valueDeserializer: (value: SerializedType) => V; constructor(fields: { store: BaseStore; keyEncoder: (key: K) => string; valueSerializer: (value: V) => SerializedType; valueDeserializer: (value: SerializedType) => V; }); /** * Method to get multiple keys at once. It works with the encoded keys and * serialized values. * @param keys Array of keys to get * @returns Promise that resolves with an array of values or undefined for each key */ mget(keys: K[]): Promise<(V | undefined)[]>; /** * Method to set multiple keys at once. It works with the encoded keys and * serialized values. * @param keyValuePairs Array of key-value pairs to set * @returns Promise that resolves when the operation is complete */ mset(keyValuePairs: [K, V][]): Promise; /** * Method to delete multiple keys at once. It works with the encoded keys. * @param keys Array of keys to delete * @returns Promise that resolves when the operation is complete */ mdelete(keys: K[]): Promise; /** * Method to yield keys. It works with the encoded keys. * @param prefix Optional prefix to filter keys * @returns AsyncGenerator that yields keys */ yieldKeys(prefix?: string | undefined): AsyncGenerator; } export declare function createDocumentStoreFromByteStore(store: BaseStore): EncoderBackedStore>, Uint8Array>;