import { RedisAccessor } from '../../accessor/redis.ts'; import type { RegisteredCommand } from '../../commands/config.ts'; import type { RegisteredOp } from '../../ops/registry.ts'; import { PathSpec } from '../../types.ts'; import type { FileStat } from '../../types.ts'; import { BaseResource } from '../base.ts'; import type { FindOptions, Resource } from '../base.ts'; import { REDACTED_SECRET } from '../secrets.ts'; import type { RedisStoreLike } from './store.ts'; export interface RedisResourceState { type: string; config: { url: typeof REDACTED_SECRET; keyPrefix: string; }; keyPrefix: string; files: Record; dirs: string[]; attrs?: Record>; modified?: Record; } /** * A redis keyspace mounted as a filesystem, over whatever store it is given. * * The runtime packages subclass this as `RedisResource`, only to build the store: node opens a * RESP client from a redis URL, the browser speaks Upstash's REST shape over * fetch. Everything a mount does, ops table and commands included, lives here * once, because none of it depends on the transport. */ export declare class RedisResourceBase extends BaseResource implements Resource { readonly kind: string; readonly cachesReads: boolean; readonly sizesAlwaysKnown: boolean; readonly indexTtl: number; readonly prompt: string; readonly store: RedisStoreLike; readonly accessor: RedisAccessor; readonly opsMap: Record; constructor(store: RedisStoreLike); get url(): string; get keyPrefix(): string; storageId(): string; open(): Promise; close(): Promise; ops(): readonly RegisteredOp[]; commands(): readonly RegisteredCommand[]; streamPath(p: PathSpec): AsyncIterable; readFile(p: PathSpec): Promise; writeFile(p: PathSpec, data: Uint8Array): Promise; appendFile(p: PathSpec, data: Uint8Array): Promise; readdir(p: PathSpec): Promise; stat(p: PathSpec): Promise; exists(p: PathSpec): Promise; mkdir(p: PathSpec, options?: { recursive?: boolean; }): Promise; rmdir(p: PathSpec): Promise; unlink(p: PathSpec): Promise; rename(src: PathSpec, dst: PathSpec): Promise; truncate(p: PathSpec, length: number): Promise; copy(src: PathSpec, dst: PathSpec): Promise; rmR(p: PathSpec): Promise; du(p: PathSpec): Promise; find(p: PathSpec, options?: FindOptions): Promise; glob(paths: readonly PathSpec[], prefix?: string): Promise; getState(): Promise; loadState(state: RedisResourceState): Promise; } //# sourceMappingURL=redis.d.ts.map