Wrapped provider native client object that standardizes the interface for all providers.

interface IORedisClientType {
    call(command: string, ...args: any[]): Promise<any>;
    del(key: string): Promise<number>;
    exec(): Promise<unknown[]>;
    exists(key: string): Promise<number>;
    flushdb(): Promise<string>;
    get(key: string): Promise<string>;
    hdel(key: string, ...fields: string[]): Promise<number>;
    hget(key: string, itemId: string): Promise<string>;
    hgetall(key: string): Promise<StringStringType>;
    hincrbyfloat(key: string, itemId: string, value: number): Promise<number>;
    hmget(key: string, itemIds: string[]): Promise<string[]>;
    hset(key: string, values: Record<string, string>): Promise<number>;
    lpush(key: string, ...args: string[]): Promise<number>;
    lrange(key: string, start: number, end: number): Promise<string[]>;
    mintKey(type: KeyType, params: KeyStoreParams): string;
    multi(): IORedisMultiType;
    on(event: string, callback: ((...args: any[]) => void)): void;
    psubscribe(pattern: string, callback: ((channel: string, message: string) => void)): Promise<void>;
    publish(channel: string, message: string): Promise<number>;
    punsubscribe(pattern: string): void;
    punsubscribe(channel: string): void;
    quit(): Promise<string>;
    rpush(key: string, ...args: string[]): Promise<number>;
    sendCommand(args: any[]): Promise<any>;
    set(key: string, value: string): Promise<string>;
    subscribe(channel: string, callback: ((channel: string, message: string) => void)): void;
    transact(): ProviderTransaction;
    unsubscribe(channel: string): void;
    xack(key: string, group: string, id: string): Promise<number>;
    xack(key: string, group: string, ...ids: string[]): Promise<number>;
    xadd(key: string, id: string, fields: any, message?: string): Promise<string>;
    xclaim(key: string, group: string, consumer: string, minIdleTime: number, id: string, ...args: string[]): Promise<ReclaimedMessageType>;
    xdel(key: string, id: string): Promise<number>;
    xdel(key: string, ...ids: string[]): Promise<number>;
    xgroup(command: string, key: string, groupName: string, id?: string, mkStream?: "MKSTREAM"): Promise<string | number>;
    xinfo(command: string, key: string): Promise<unknown>;
    xlen(key: string): Promise<number>;
    xpending(key: string, group: string, start?: string, end?: string, count?: number, consumer?: string): Promise<unknown[] | [string, string, number, number] | [string, string, number, [string, number][]][]>;
    xrange(key: string, start: string, end: string): Promise<string[][]>;
    xreadgroup(command: "GROUP", groupName: string, consumerName: string, blockOption: string, blockTime: number, streamsOption: string, streamName: string, key: string): Promise<string[][]>;
    zadd(...args: (string | number)[]): Promise<number>;
    zrange(key: string, start: number, end: number, withScores?: "WITHSCORES"): Promise<string[]>;
    zrank(key: string, member: string): Promise<number>;
    zscore(key: string, value: string): Promise<number>;
}

Hierarchy (view full)

Methods

  • Parameters

    • command: string
    • Rest...args: any[]

    Returns Promise<any>

  • Parameters

    • key: string

    Returns Promise<number>

  • Parameters

    • key: string

    Returns Promise<number>

  • Parameters

    • key: string

    Returns Promise<string>

  • Parameters

    • key: string
    • Rest...fields: string[]

    Returns Promise<number>

  • Parameters

    • key: string
    • itemId: string

    Returns Promise<string>

  • Parameters

    • key: string
    • itemId: string
    • value: number

    Returns Promise<number>

  • Parameters

    • key: string
    • itemIds: string[]

    Returns Promise<string[]>

  • Parameters

    • key: string
    • values: Record<string, string>

    Returns Promise<number>

  • Parameters

    • key: string
    • Rest...args: string[]

    Returns Promise<number>

  • Parameters

    • key: string
    • start: number
    • end: number

    Returns Promise<string[]>

  • Parameters

    • event: string
    • callback: ((...args: any[]) => void)
        • (...args): void
        • Parameters

          • Rest...args: any[]

          Returns void

    Returns void

  • Parameters

    • pattern: string
    • callback: ((channel: string, message: string) => void)
        • (channel, message): void
        • Parameters

          • channel: string
          • message: string

          Returns void

    Returns Promise<void>

  • Parameters

    • channel: string
    • message: string

    Returns Promise<number>

  • Parameters

    • pattern: string

    Returns void

  • Parameters

    • channel: string

    Returns void

  • Parameters

    • key: string
    • Rest...args: string[]

    Returns Promise<number>

  • Parameters

    • args: any[]

    Returns Promise<any>

  • Parameters

    • key: string
    • value: string

    Returns Promise<string>

  • Parameters

    • channel: string
    • callback: ((channel: string, message: string) => void)
        • (channel, message): void
        • Parameters

          • channel: string
          • message: string

          Returns void

    Returns void

  • Parameters

    • channel: string

    Returns void

  • Parameters

    • key: string
    • group: string
    • id: string

    Returns Promise<number>

  • Parameters

    • key: string
    • group: string
    • Rest...ids: string[]

    Returns Promise<number>

  • Parameters

    • key: string
    • id: string
    • fields: any
    • Optionalmessage: string

    Returns Promise<string>

  • Parameters

    • key: string
    • id: string

    Returns Promise<number>

  • Parameters

    • key: string
    • Rest...ids: string[]

    Returns Promise<number>

  • Parameters

    • command: string
    • key: string
    • groupName: string
    • Optionalid: string
    • OptionalmkStream: "MKSTREAM"

    Returns Promise<string | number>

  • Parameters

    • command: string
    • key: string

    Returns Promise<unknown>

  • Parameters

    • key: string

    Returns Promise<number>

  • Parameters

    • key: string
    • group: string
    • Optionalstart: string
    • Optionalend: string
    • Optionalcount: number
    • Optionalconsumer: string

    Returns Promise<unknown[] | [string, string, number, number] | [string, string, number, [string, number][]][]>

  • Parameters

    • key: string
    • start: string
    • end: string

    Returns Promise<string[][]>

  • Parameters

    • command: "GROUP"
    • groupName: string
    • consumerName: string
    • blockOption: string
    • blockTime: number
    • streamsOption: string
    • streamName: string
    • key: string

    Returns Promise<string[][]>

  • Parameters

    • Rest...args: (string | number)[]

    Returns Promise<number>

  • Parameters

    • key: string
    • start: number
    • end: number
    • OptionalwithScores: "WITHSCORES"

    Returns Promise<string[]>

  • Parameters

    • key: string
    • member: string

    Returns Promise<number>

  • Parameters

    • key: string
    • value: string

    Returns Promise<number>