import * as core from "../pkg/redis.js";
import { Requester, RequesterConfig, UpstashRequest, UpstashResponse } from "../pkg/http.js";
export type { Requester, UpstashRequest, UpstashResponse };
/**
 * Connection credentials for upstash redis.
 * Get them from https://console.upstash.com/redis/<uuid>
 */
export type RedisConfigNodejs = {
    /**
     * UPSTASH_REDIS_REST_URL
     */
    url: string;
    /**
     * UPSTASH_REDIS_REST_TOKEN
     */
    token: string;
    /**
     * An agent allows you to reuse connections to reduce latency for multiple sequential requests.
     *
     * This is a node specific implementation and is not supported in various runtimes like Vercel
     * edge functions.
     *
     * @example
     * ```ts
     * import https from "https"
     *
     * const options: RedisConfigNodejs = {
     *  agent: new https.Agent({ keepAlive: true })
     * }
     * ```
     */
    agent?: any;
} & core.RedisOptions & RequesterConfig;
/**
 * Serverless redis client for upstash.
 */
export declare class Redis extends core.Redis {
    /**
     * Create a new redis client by providing the url and token
     *
     * @example
     * ```typescript
     * const redis = new Redis({
     *  url: "<UPSTASH_REDIS_REST_URL>",
     *  token: "<UPSTASH_REDIS_REST_TOKEN>",
     * });
     * ```
     */
    constructor(config: RedisConfigNodejs);
    /**
     * Create a new redis client by providing a custom `Requester` implementation
     *
     * @example
     * ```ts
     *
     * import { UpstashRequest, Requester, UpstashResponse, Redis } from "@upstash/redis"
     *
     *  const requester: Requester = {
     *    request: <TResult>(req: UpstashRequest): Promise<UpstashResponse<TResult>> => {
     *      // ...
     *    }
     *  }
     *
     * const redis = new Redis(requester)
     * ```
     */
    constructor(requesters: Requester);
    /**
     * Create a new Upstash Redis instance from environment variables.
     *
     * Use this to automatically load connection secrets from your environment
     * variables. For instance when using the Vercel integration.
     *
     * This tries to load `UPSTASH_REDIS_REST_URL` and `UPSTASH_REDIS_REST_TOKEN` from
     * your environment using `process.env`.
     */
    static fromEnv(config?: Omit<RedisConfigNodejs, "url" | "token">): Redis;
}
