import { Redis, RedisOptions } from "ioredis"; import { Result } from "@openally/result"; import type { DatabaseConnection, KeyType } from "../../types/index.js"; export type KVType = "raw" | "object"; export type StringOrObject = string | Record; export interface GetConnectionPerfResponse { isAlive: boolean; perf: number; } export interface ClearExpiredOptions { banTimeInSecond: number; } export type RedisIsKeyExpiredOptions = ClearExpiredOptions & { key: KeyType; }; export interface RedisSetValueOptions> { key: KeyType; value: Partial; type: KVType; expiresIn?: number; } export type RedisAdapterOptions = Partial & { attempt?: number; disconnectionTimeout?: number; }; export declare class RedisAdapter extends Redis implements DatabaseConnection { #private; constructor(options?: RedisAdapterOptions); initialize(): Promise; close(forceExit?: boolean, attempt?: number): Promise; isAlive(): Promise; getPerformance(): Promise; setValue(options: RedisSetValueOptions): Promise>; getValue(key: KeyType, type: KVType): Promise; deleteValue(key: KeyType): Promise; private assertConnection; private assertDisconnection; } //# sourceMappingURL=redis.adapter.d.ts.map