import type { Cache, Store, Config } from 'cache-manager'; import Redis from 'ioredis'; import type { Cluster, ClusterNode, ClusterOptions, RedisOptions } from 'ioredis'; export declare class NoCacheableError implements Error { message: string; name: string; constructor(message: string); } export declare const avoidNoCacheable: (p: Promise) => Promise; export interface RedisClusterConfig { nodes: ClusterNode[]; options?: ClusterOptions; } export type RedisCache = Cache; export interface RedisStore extends Store { readonly isCacheable: (value: unknown) => boolean; get client(): Redis | Cluster; hget(key: string, field: string): Promise; hgetall(key: string): Promise | undefined>; hset(key: string, fieldValueRecord: Record): Promise; hkeys(key: string): Promise; hvals(key: string): Promise; hexists(key: string, field: string): Promise; hdel(key: string, field: string): Promise; expire(key: string, ttlSeconds: number): Promise; } export declare function redisStoreUsingClient(redisCache: Redis | Cluster, options?: Config): RedisStore; export declare function redisStore(options?: (RedisOptions | { clusterConfig: RedisClusterConfig; }) & Config): Promise;