import { Context } from '@declaro/core';
import { Redis as RedisInstance, type RedisOptions } from 'ioredis';
import { RedisRepository } from './repository';
export declare const RedisEvents: {
    Connect: string;
    Destroy: string;
};
export declare const REDIS_CLIENT_KEY: unique symbol;
export declare const REDIS_PUB_KEY: unique symbol;
export declare const REDIS_SUB_KEY: unique symbol;
export declare const REDIS_OPTIONS_KEY: unique symbol;
/**
 * @deprecated Use context's DI system instead
 * @param options The options to pass to the Redis client
 * @returns
 */
export declare const redisMiddleware: (options?: RedisOptions) => (context: Context) => Promise<void>;
/**
 * Get the centralized redis connection
 * NOTE: Do not use this connection to subscribe to events. Create your own instead with createRedis.
 * @param context
 * @returns
 */
export declare function useRedis(context: Context): RedisInstance;
/**
 * Get the redis options that were provided
 *
 * @param context
 * @returns The redis options that were provided in the given context
 */
export declare function useRedisOptions(context: Context): RedisOptions;
/**
 * Create a Redis connection
 *
 * @param context The context in which to create the Redis instance
 */
export declare function createRedis(context: Context): RedisInstance;
export declare function useRedisRepository<T = string>(context: Context): RedisRepository<T>;
