import { RedisCacheConfig } from "../types/redisCache";
import { IPlugin } from "@mercury-js/core";
import type { Mercury } from "@mercury-js/core";
import { RedisClientType, SchemaFieldTypes } from 'redis';
declare module "@mercury-js/core" {
    interface Mercury {
        cache: RedisCache;
    }
}
declare const redisFieldType: {
    string: SchemaFieldTypes;
    number: SchemaFieldTypes;
    boolean: SchemaFieldTypes;
    tag: SchemaFieldTypes;
    geo: SchemaFieldTypes;
    vector: SchemaFieldTypes;
};
type RedisFieldType = typeof redisFieldType;
export declare class RedisCache implements IPlugin {
    _mercury?: Mercury;
    installed: boolean;
    prefix: string;
    client: RedisClientType;
    models: any[];
    constructor({ prefix, client }: Partial<RedisCacheConfig>);
    private initializeClient;
    init(mercury: Mercury): void;
    private get mercury();
    private connect;
    run(): void;
    setClient(client: RedisClientType): void;
    set(key: string, value: string): Promise<void>;
    delete(key: string): Promise<void>;
    get(key: string): Promise<string | null>;
    createSchema(name: string, fields: {
        [x: string]: {
            type: keyof RedisFieldType;
            sortable?: boolean;
            noindex?: boolean;
        };
    }, options: any): Promise<void>;
    insert(name: string, data: any): Promise<any>;
    search(name: string, query: string): Promise<{
        total: number;
        documents: {
            id: string;
            value: {
                [x: string]: string | number | any | any[] | null;
            };
        }[];
    }>;
}
export {};
