import type { RedisRestore, RedisStoreLike } from '@struktoai/mirage-core/resource/redis/store'; import type { RedisClientType } from 'redis'; export interface RedisStoreOptions { url?: string; client?: RedisClientType; keyPrefix?: string; } export declare class RedisStore implements RedisStoreLike { readonly url: string; readonly keyPrefix: string; private readonly providedClient; private clientPromise; constructor(options?: RedisStoreOptions); fk(path: string): string; dk(): string; mk(path: string): string; ak(path: string): string; client(): Promise; open(): Promise; getFile(path: string): Promise; /** * A byte window of a stored file, or null when the key is absent. * * `GETRANGE` slices server-side, so a window costs the window rather than * the whole value on the wire. Its bounds are inclusive and `-1` means the * last byte, which is how "to the end" is spelled. * * `EXISTS` rides along because `GETRANGE` answers an empty string for a * missing key, for an empty file and for a window past the end alike; * without it a read of a deleted path would return an empty buffer instead * of throwing. The two are issued together rather than through `MULTI`, * which drops the Buffer type mapping and hands back a lossy string: * node-redis pipelines commands issued in the same tick, so this is still * one round trip. * * @param path mount-relative path of the file * @param offset first byte to read * @param size how many bytes, or null for the rest */ getFileRange(path: string, offset: number, size: number | null): Promise; setFile(path: string, data: Uint8Array): Promise; delFile(path: string): Promise; hasFile(path: string): Promise; listFiles(prefix?: string): Promise; fileLen(path: string): Promise; hasDir(path: string): Promise; addDir(path: string): Promise; removeDir(path: string): Promise; listDirs(): Promise>; getModified(path: string): Promise; setModified(path: string, ts: string): Promise; delModified(path: string): Promise; getAttrs(path: string): Promise>; setAttrs(path: string, fields: Record): Promise; delAttrs(path: string): Promise; private scanKeys; listAttrs(): Promise>>; listModified(): Promise>; restore(state: RedisRestore): Promise; clear(): Promise; close(): Promise; } //# sourceMappingURL=store.d.ts.map