/** * This file is generated by @ioredis/interface-generator. * Don't edit it manually. Instead, run `npm run generate` to update * this file. */ /// import { Callback } from "../types"; export declare type RedisKey = string | Buffer; export declare type RedisValue = string | Buffer | number; export interface ResultTypes { default: Promise; pipeline: ChainableCommander; } export interface ChainableCommander extends RedisCommander<{ type: "pipeline"; }> { length: number; } export declare type ClientContext = { type: keyof ResultTypes; }; export declare type Result = ResultTypes[Context["type"]]; interface RedisCommander { /** * Call arbitrary commands. * * `redis.call('set', 'foo', 'bar')` is the same as `redis.set('foo', 'bar')`, * so the only case you need to use this method is when the command is not * supported by ioredis. * * ```ts * redis.call('set', 'foo', 'bar'); * redis.call('get', 'foo', (err, value) => { * // value === 'bar' * }); * ``` */ call(command: string, callback?: Callback): Result; call(command: string, args: (string | Buffer | number)[], callback?: Callback): Result; call(...args: [ command: string, ...args: (string | Buffer | number)[], callback: Callback ]): Result; call(...args: [command: string, ...args: (string | Buffer | number)[]]): Result; callBuffer(command: string, callback?: Callback): Result; callBuffer(command: string, args: (string | Buffer | number)[], callback?: Callback): Result; callBuffer(...args: [ command: string, ...args: (string | Buffer | number)[], callback: Callback ]): Result; callBuffer(...args: [command: string, ...args: (string | Buffer | number)[]]): Result; /** * Lists the ACL categories, or the commands inside a category. * - _group_: server * - _complexity_: O(1) since the categories and commands are a fixed set. * - _since_: 6.0.0 */ acl(subcommand: "CAT", callback?: Callback): Result; acl(subcommand: "CAT", category: string | Buffer, callback?: Callback): Result; /** * Deletes ACL users, and terminates their connections. * - _group_: server * - _complexity_: O(1) amortized time considering the typical user. * - _since_: 6.0.0 */ acl(...args: [ subcommand: "DELUSER", ...usernames: (string | Buffer)[], callback: Callback ]): Result; acl(...args: [subcommand: "DELUSER", ...usernames: (string | Buffer)[]]): Result; /** * Simulates the execution of a command by a user, without executing the command. * - _group_: server * - _complexity_: O(1). * - _since_: 7.0.0 */ acl(subcommand: "DRYRUN", username: string | Buffer, command: string | Buffer, callback?: Callback): Result; aclBuffer(subcommand: "DRYRUN", username: string | Buffer, command: string | Buffer, callback?: Callback): Result; acl(...args: [ subcommand: "DRYRUN", username: string | Buffer, command: string | Buffer, ...args: (string | Buffer | number)[], callback: Callback ]): Result; aclBuffer(...args: [ subcommand: "DRYRUN", username: string | Buffer, command: string | Buffer, ...args: (string | Buffer | number)[], callback: Callback ]): Result; acl(...args: [ subcommand: "DRYRUN", username: string | Buffer, command: string | Buffer, ...args: (string | Buffer | number)[] ]): Result; aclBuffer(...args: [ subcommand: "DRYRUN", username: string | Buffer, command: string | Buffer, ...args: (string | Buffer | number)[] ]): Result; /** * Generates a pseudorandom, secure password that can be used to identify ACL users. * - _group_: server * - _complexity_: O(1) * - _since_: 6.0.0 */ acl(subcommand: "GENPASS", callback?: Callback): Result; aclBuffer(subcommand: "GENPASS", callback?: Callback): Result; acl(subcommand: "GENPASS", bits: number | string, callback?: Callback): Result; aclBuffer(subcommand: "GENPASS", bits: number | string, callback?: Callback): Result; /** * Lists the ACL rules of a user. * - _group_: server * - _complexity_: O(N). Where N is the number of password, command and pattern rules that the user has. * - _since_: 6.0.0 */ acl(subcommand: "GETUSER", username: string | Buffer, callback?: Callback): Result; aclBuffer(subcommand: "GETUSER", username: string | Buffer, callback?: Callback): Result; /** * Returns helpful text about the different subcommands. * - _group_: server * - _complexity_: O(1) * - _since_: 6.0.0 */ acl(subcommand: "HELP", callback?: Callback): Result; /** * Dumps the effective rules in ACL file format. * - _group_: server * - _complexity_: O(N). Where N is the number of configured users. * - _since_: 6.0.0 */ acl(subcommand: "LIST", callback?: Callback): Result; aclBuffer(subcommand: "LIST", callback?: Callback): Result; /** * Reloads the rules from the configured ACL file. * - _group_: server * - _complexity_: O(N). Where N is the number of configured users. * - _since_: 6.0.0 */ acl(subcommand: "LOAD", callback?: Callback<"OK">): Result<"OK", Context>; /** * Lists recent security events generated due to ACL rules. * - _group_: server * - _complexity_: O(N) with N being the number of entries shown. * - _since_: 6.0.0 */ acl(subcommand: "LOG", callback?: Callback): Result; acl(subcommand: "LOG", count: number | string, callback?: Callback): Result; acl(subcommand: "LOG", reset: "RESET", callback?: Callback): Result; /** * Saves the effective ACL rules in the configured ACL file. * - _group_: server * - _complexity_: O(N). Where N is the number of configured users. * - _since_: 6.0.0 */ acl(subcommand: "SAVE", callback?: Callback<"OK">): Result<"OK", Context>; /** * Creates and modifies an ACL user and its rules. * - _group_: server * - _complexity_: O(N). Where N is the number of rules provided. * - _since_: 6.0.0 */ acl(subcommand: "SETUSER", username: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>; acl(...args: [ subcommand: "SETUSER", username: string | Buffer, ...rules: (string | Buffer)[], callback: Callback<"OK"> ]): Result<"OK", Context>; acl(...args: [ subcommand: "SETUSER", username: string | Buffer, ...rules: (string | Buffer)[] ]): Result<"OK", Context>; /** * Lists all ACL users. * - _group_: server * - _complexity_: O(N). Where N is the number of configured users. * - _since_: 6.0.0 */ acl(subcommand: "USERS", callback?: Callback): Result; aclBuffer(subcommand: "USERS", callback?: Callback): Result; /** * Returns the authenticated username of the current connection. * - _group_: server * - _complexity_: O(1) * - _since_: 6.0.0 */ acl(subcommand: "WHOAMI", callback?: Callback): Result; aclBuffer(subcommand: "WHOAMI", callback?: Callback): Result; /** * Appends a string to the value of a key. Creates the key if it doesn't exist. * - _group_: string * - _complexity_: O(1). The amortized time complexity is O(1) assuming the appended value is small and the already present value is of any size, since the dynamic string library used by the server will double the free space available on every reallocation. * - _since_: 2.0.0 */ append(key: RedisKey, value: string | Buffer | number, callback?: Callback): Result; /** * Signals that a cluster client is following an -ASK redirect. * - _group_: cluster * - _complexity_: O(1) * - _since_: 3.0.0 */ asking(callback?: Callback<"OK">): Result<"OK", Context>; /** * Authenticates the connection. * - _group_: connection * - _complexity_: O(N) where N is the number of passwords defined for the user * - _since_: 1.0.0 */ auth(password: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>; auth(username: string | Buffer, password: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>; /** * Asynchronously rewrites the append-only file to disk. * - _group_: server * - _complexity_: O(1) * - _since_: 1.0.0 */ bgrewriteaof(callback?: Callback): Result; bgrewriteaofBuffer(callback?: Callback): Result; /** * Asynchronously saves the database(s) to disk. * - _group_: server * - _complexity_: O(1) * - _since_: 1.0.0 */ bgsave(callback?: Callback<"OK">): Result<"OK", Context>; bgsave(schedule: "SCHEDULE", callback?: Callback<"OK">): Result<"OK", Context>; /** * Counts the number of set bits (population counting) in a string. * - _group_: bitmap * - _complexity_: O(N) * - _since_: 2.6.0 */ bitcount(key: RedisKey, callback?: Callback): Result; bitcount(key: RedisKey, start: number | string, callback?: Callback): Result; bitcount(key: RedisKey, start: number | string, end: number | string, callback?: Callback): Result; bitcount(key: RedisKey, start: number | string, end: number | string, byte: "BYTE", callback?: Callback): Result; bitcount(key: RedisKey, start: number | string, end: number | string, bit: "BIT", callback?: Callback): Result; /** * Performs arbitrary bitfield integer operations on strings. * - _group_: bitmap * - _complexity_: O(1) for each subcommand specified * - _since_: 3.2.0 */ bitfield(key: RedisKey, callback?: Callback): Result; bitfield(key: RedisKey, getBlockToken: "GET", encoding: string | Buffer, offset: number | string, callback?: Callback): Result; bitfield(key: RedisKey, setBlockToken: "SET", encoding: string | Buffer, offset: number | string, value: number | string, callback?: Callback): Result; bitfield(key: RedisKey, incrbyBlockToken: "INCRBY", encoding: string | Buffer, offset: number | string, increment: number | string, callback?: Callback): Result; bitfield(key: RedisKey, overflow: "OVERFLOW", wrap: "WRAP", setBlockToken: "SET", encoding: string | Buffer, offset: number | string, value: number | string, callback?: Callback): Result; bitfield(key: RedisKey, overflow: "OVERFLOW", wrap: "WRAP", incrbyBlockToken: "INCRBY", encoding: string | Buffer, offset: number | string, increment: number | string, callback?: Callback): Result; bitfield(key: RedisKey, overflow: "OVERFLOW", sat: "SAT", setBlockToken: "SET", encoding: string | Buffer, offset: number | string, value: number | string, callback?: Callback): Result; bitfield(key: RedisKey, overflow: "OVERFLOW", sat: "SAT", incrbyBlockToken: "INCRBY", encoding: string | Buffer, offset: number | string, increment: number | string, callback?: Callback): Result; bitfield(key: RedisKey, overflow: "OVERFLOW", fail: "FAIL", setBlockToken: "SET", encoding: string | Buffer, offset: number | string, value: number | string, callback?: Callback): Result; bitfield(key: RedisKey, overflow: "OVERFLOW", fail: "FAIL", incrbyBlockToken: "INCRBY", encoding: string | Buffer, offset: number | string, increment: number | string, callback?: Callback): Result; /** * Performs arbitrary read-only bitfield integer operations on strings. * - _group_: bitmap * - _complexity_: O(1) for each subcommand specified * - _since_: 6.0.0 */ bitfield_ro(key: RedisKey, callback?: Callback): Result; bitfield_ro(...args: [ key: RedisKey, getBlockToken: "GET", ...getBlocks: (string | Buffer | number)[], callback: Callback ]): Result; bitfield_ro(...args: [ key: RedisKey, getBlockToken: "GET", ...getBlocks: (string | Buffer | number)[] ]): Result; /** * Performs bitwise operations on multiple strings, and stores the result. * - _group_: bitmap * - _complexity_: O(N) * - _since_: 2.6.0 */ bitop(...args: [ and: "AND", destkey: RedisKey, ...keys: RedisKey[], callback: Callback ]): Result; bitop(...args: [ and: "AND", destkey: RedisKey, keys: RedisKey[], callback: Callback ]): Result; bitop(...args: [and: "AND", destkey: RedisKey, ...keys: RedisKey[]]): Result; bitop(...args: [and: "AND", destkey: RedisKey, keys: RedisKey[]]): Result; bitop(...args: [ or: "OR", destkey: RedisKey, ...keys: RedisKey[], callback: Callback ]): Result; bitop(...args: [ or: "OR", destkey: RedisKey, keys: RedisKey[], callback: Callback ]): Result; bitop(...args: [or: "OR", destkey: RedisKey, ...keys: RedisKey[]]): Result; bitop(...args: [or: "OR", destkey: RedisKey, keys: RedisKey[]]): Result; bitop(...args: [ xor: "XOR", destkey: RedisKey, ...keys: RedisKey[], callback: Callback ]): Result; bitop(...args: [ xor: "XOR", destkey: RedisKey, keys: RedisKey[], callback: Callback ]): Result; bitop(...args: [xor: "XOR", destkey: RedisKey, ...keys: RedisKey[]]): Result; bitop(...args: [xor: "XOR", destkey: RedisKey, keys: RedisKey[]]): Result; bitop(...args: [ not: "NOT", destkey: RedisKey, ...keys: RedisKey[], callback: Callback ]): Result; bitop(...args: [ not: "NOT", destkey: RedisKey, keys: RedisKey[], callback: Callback ]): Result; bitop(...args: [not: "NOT", destkey: RedisKey, ...keys: RedisKey[]]): Result; bitop(...args: [not: "NOT", destkey: RedisKey, keys: RedisKey[]]): Result; /** * Finds the first set (1) or clear (0) bit in a string. * - _group_: bitmap * - _complexity_: O(N) * - _since_: 2.8.7 */ bitpos(key: RedisKey, bit: number | string, callback?: Callback): Result; bitpos(key: RedisKey, bit: number | string, start: number | string, callback?: Callback): Result; bitpos(key: RedisKey, bit: number | string, start: number | string, end: number | string, callback?: Callback): Result; bitpos(key: RedisKey, bit: number | string, start: number | string, end: number | string, byte: "BYTE", callback?: Callback): Result; bitpos(key: RedisKey, bit: number | string, start: number | string, end: number | string, bit1: "BIT", callback?: Callback): Result; /** * Pops an element from a list, pushes it to another list and returns it. Blocks until an element is available otherwise. Deletes the list if the last element was moved. * - _group_: list * - _complexity_: O(1) * - _since_: 6.2.0 */ blmove(source: RedisKey, destination: RedisKey, left: "LEFT", left1: "LEFT", timeout: number | string, callback?: Callback): Result; blmoveBuffer(source: RedisKey, destination: RedisKey, left: "LEFT", left1: "LEFT", timeout: number | string, callback?: Callback): Result; blmove(source: RedisKey, destination: RedisKey, left: "LEFT", right: "RIGHT", timeout: number | string, callback?: Callback): Result; blmoveBuffer(source: RedisKey, destination: RedisKey, left: "LEFT", right: "RIGHT", timeout: number | string, callback?: Callback): Result; blmove(source: RedisKey, destination: RedisKey, right: "RIGHT", left: "LEFT", timeout: number | string, callback?: Callback): Result; blmoveBuffer(source: RedisKey, destination: RedisKey, right: "RIGHT", left: "LEFT", timeout: number | string, callback?: Callback): Result; blmove(source: RedisKey, destination: RedisKey, right: "RIGHT", right1: "RIGHT", timeout: number | string, callback?: Callback): Result; blmoveBuffer(source: RedisKey, destination: RedisKey, right: "RIGHT", right1: "RIGHT", timeout: number | string, callback?: Callback): Result; /** * Pops the first element from one of multiple lists. Blocks until an element is available otherwise. Deletes the list if the last element was popped. * - _group_: list * - _complexity_: O(N+M) where N is the number of provided keys and M is the number of elements returned. * - _since_: 7.0.0 */ blmpop(...args: [ timeout: number | string, numkeys: number | string, ...keys: RedisKey[], left: "LEFT", callback: Callback<[key: string, members: string[]] | null> ]): Result<[key: string, members: string[]] | null, Context>; blmpopBuffer(...args: [ timeout: number | string, numkeys: number | string, ...keys: RedisKey[], left: "LEFT", callback: Callback<[key: Buffer, members: Buffer[]] | null> ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; blmpop(...args: [ timeout: number | string, numkeys: number | string, keys: RedisKey[], left: "LEFT", callback: Callback<[key: string, members: string[]] | null> ]): Result<[key: string, members: string[]] | null, Context>; blmpopBuffer(...args: [ timeout: number | string, numkeys: number | string, keys: RedisKey[], left: "LEFT", callback: Callback<[key: Buffer, members: Buffer[]] | null> ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; blmpop(...args: [ timeout: number | string, numkeys: number | string, ...keys: RedisKey[], left: "LEFT" ]): Result<[key: string, members: string[]] | null, Context>; blmpopBuffer(...args: [ timeout: number | string, numkeys: number | string, ...keys: RedisKey[], left: "LEFT" ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; blmpop(...args: [ timeout: number | string, numkeys: number | string, keys: RedisKey[], left: "LEFT" ]): Result<[key: string, members: string[]] | null, Context>; blmpopBuffer(...args: [ timeout: number | string, numkeys: number | string, keys: RedisKey[], left: "LEFT" ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; blmpop(...args: [ timeout: number | string, numkeys: number | string, ...keys: RedisKey[], left: "LEFT", countToken: "COUNT", count: number | string, callback: Callback<[key: string, members: string[]] | null> ]): Result<[key: string, members: string[]] | null, Context>; blmpopBuffer(...args: [ timeout: number | string, numkeys: number | string, ...keys: RedisKey[], left: "LEFT", countToken: "COUNT", count: number | string, callback: Callback<[key: Buffer, members: Buffer[]] | null> ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; blmpop(...args: [ timeout: number | string, numkeys: number | string, keys: RedisKey[], left: "LEFT", countToken: "COUNT", count: number | string, callback: Callback<[key: string, members: string[]] | null> ]): Result<[key: string, members: string[]] | null, Context>; blmpopBuffer(...args: [ timeout: number | string, numkeys: number | string, keys: RedisKey[], left: "LEFT", countToken: "COUNT", count: number | string, callback: Callback<[key: Buffer, members: Buffer[]] | null> ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; blmpop(...args: [ timeout: number | string, numkeys: number | string, ...keys: RedisKey[], left: "LEFT", countToken: "COUNT", count: number | string ]): Result<[key: string, members: string[]] | null, Context>; blmpopBuffer(...args: [ timeout: number | string, numkeys: number | string, ...keys: RedisKey[], left: "LEFT", countToken: "COUNT", count: number | string ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; blmpop(...args: [ timeout: number | string, numkeys: number | string, keys: RedisKey[], left: "LEFT", countToken: "COUNT", count: number | string ]): Result<[key: string, members: string[]] | null, Context>; blmpopBuffer(...args: [ timeout: number | string, numkeys: number | string, keys: RedisKey[], left: "LEFT", countToken: "COUNT", count: number | string ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; blmpop(...args: [ timeout: number | string, numkeys: number | string, ...keys: RedisKey[], right: "RIGHT", callback: Callback<[key: string, members: string[]] | null> ]): Result<[key: string, members: string[]] | null, Context>; blmpopBuffer(...args: [ timeout: number | string, numkeys: number | string, ...keys: RedisKey[], right: "RIGHT", callback: Callback<[key: Buffer, members: Buffer[]] | null> ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; blmpop(...args: [ timeout: number | string, numkeys: number | string, keys: RedisKey[], right: "RIGHT", callback: Callback<[key: string, members: string[]] | null> ]): Result<[key: string, members: string[]] | null, Context>; blmpopBuffer(...args: [ timeout: number | string, numkeys: number | string, keys: RedisKey[], right: "RIGHT", callback: Callback<[key: Buffer, members: Buffer[]] | null> ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; blmpop(...args: [ timeout: number | string, numkeys: number | string, ...keys: RedisKey[], right: "RIGHT" ]): Result<[key: string, members: string[]] | null, Context>; blmpopBuffer(...args: [ timeout: number | string, numkeys: number | string, ...keys: RedisKey[], right: "RIGHT" ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; blmpop(...args: [ timeout: number | string, numkeys: number | string, keys: RedisKey[], right: "RIGHT" ]): Result<[key: string, members: string[]] | null, Context>; blmpopBuffer(...args: [ timeout: number | string, numkeys: number | string, keys: RedisKey[], right: "RIGHT" ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; blmpop(...args: [ timeout: number | string, numkeys: number | string, ...keys: RedisKey[], right: "RIGHT", countToken: "COUNT", count: number | string, callback: Callback<[key: string, members: string[]] | null> ]): Result<[key: string, members: string[]] | null, Context>; blmpopBuffer(...args: [ timeout: number | string, numkeys: number | string, ...keys: RedisKey[], right: "RIGHT", countToken: "COUNT", count: number | string, callback: Callback<[key: Buffer, members: Buffer[]] | null> ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; blmpop(...args: [ timeout: number | string, numkeys: number | string, keys: RedisKey[], right: "RIGHT", countToken: "COUNT", count: number | string, callback: Callback<[key: string, members: string[]] | null> ]): Result<[key: string, members: string[]] | null, Context>; blmpopBuffer(...args: [ timeout: number | string, numkeys: number | string, keys: RedisKey[], right: "RIGHT", countToken: "COUNT", count: number | string, callback: Callback<[key: Buffer, members: Buffer[]] | null> ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; blmpop(...args: [ timeout: number | string, numkeys: number | string, ...keys: RedisKey[], right: "RIGHT", countToken: "COUNT", count: number | string ]): Result<[key: string, members: string[]] | null, Context>; blmpopBuffer(...args: [ timeout: number | string, numkeys: number | string, ...keys: RedisKey[], right: "RIGHT", countToken: "COUNT", count: number | string ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; blmpop(...args: [ timeout: number | string, numkeys: number | string, keys: RedisKey[], right: "RIGHT", countToken: "COUNT", count: number | string ]): Result<[key: string, members: string[]] | null, Context>; blmpopBuffer(...args: [ timeout: number | string, numkeys: number | string, keys: RedisKey[], right: "RIGHT", countToken: "COUNT", count: number | string ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; /** * Removes and returns the first element in a list. Blocks until an element is available otherwise. Deletes the list if the last element was popped. * - _group_: list * - _complexity_: O(N) where N is the number of provided keys. * - _since_: 2.0.0 */ blpop(...args: [ ...keys: RedisKey[], timeout: number | string, callback: Callback<[string, string] | null> ]): Result<[string, string] | null, Context>; blpopBuffer(...args: [ ...keys: RedisKey[], timeout: number | string, callback: Callback<[Buffer, Buffer] | null> ]): Result<[Buffer, Buffer] | null, Context>; blpop(...args: [ keys: RedisKey[], timeout: number | string, callback: Callback<[string, string] | null> ]): Result<[string, string] | null, Context>; blpopBuffer(...args: [ keys: RedisKey[], timeout: number | string, callback: Callback<[Buffer, Buffer] | null> ]): Result<[Buffer, Buffer] | null, Context>; blpop(...args: [...keys: RedisKey[], timeout: number | string]): Result<[string, string] | null, Context>; blpopBuffer(...args: [...keys: RedisKey[], timeout: number | string]): Result<[Buffer, Buffer] | null, Context>; blpop(...args: [keys: RedisKey[], timeout: number | string]): Result<[string, string] | null, Context>; blpopBuffer(...args: [keys: RedisKey[], timeout: number | string]): Result<[Buffer, Buffer] | null, Context>; /** * Removes and returns the last element in a list. Blocks until an element is available otherwise. Deletes the list if the last element was popped. * - _group_: list * - _complexity_: O(N) where N is the number of provided keys. * - _since_: 2.0.0 */ brpop(...args: [ ...keys: RedisKey[], timeout: number | string, callback: Callback<[string, string] | null> ]): Result<[string, string] | null, Context>; brpopBuffer(...args: [ ...keys: RedisKey[], timeout: number | string, callback: Callback<[Buffer, Buffer] | null> ]): Result<[Buffer, Buffer] | null, Context>; brpop(...args: [ keys: RedisKey[], timeout: number | string, callback: Callback<[string, string] | null> ]): Result<[string, string] | null, Context>; brpopBuffer(...args: [ keys: RedisKey[], timeout: number | string, callback: Callback<[Buffer, Buffer] | null> ]): Result<[Buffer, Buffer] | null, Context>; brpop(...args: [...keys: RedisKey[], timeout: number | string]): Result<[string, string] | null, Context>; brpopBuffer(...args: [...keys: RedisKey[], timeout: number | string]): Result<[Buffer, Buffer] | null, Context>; brpop(...args: [keys: RedisKey[], timeout: number | string]): Result<[string, string] | null, Context>; brpopBuffer(...args: [keys: RedisKey[], timeout: number | string]): Result<[Buffer, Buffer] | null, Context>; /** * Pops an element from a list, pushes it to another list and returns it. Block until an element is available otherwise. Deletes the list if the last element was popped. * - _group_: list * - _complexity_: O(1) * - _since_: 2.2.0 */ brpoplpush(source: RedisKey, destination: RedisKey, timeout: number | string, callback?: Callback): Result; brpoplpushBuffer(source: RedisKey, destination: RedisKey, timeout: number | string, callback?: Callback): Result; /** * Removes and returns a member by score from one or more sorted sets. Blocks until a member is available otherwise. Deletes the sorted set if the last element was popped. * - _group_: sorted-set * - _complexity_: O(K) + O(M*log(N)) where K is the number of provided keys, N being the number of elements in the sorted set, and M being the number of elements popped. * - _since_: 7.0.0 */ bzmpop(...args: [ timeout: number | string, numkeys: number | string, ...keys: RedisKey[], min: "MIN", callback: Callback ]): Result; bzmpop(...args: [ timeout: number | string, numkeys: number | string, keys: RedisKey[], min: "MIN", callback: Callback ]): Result; bzmpop(...args: [ timeout: number | string, numkeys: number | string, ...keys: RedisKey[], min: "MIN" ]): Result; bzmpop(...args: [ timeout: number | string, numkeys: number | string, keys: RedisKey[], min: "MIN" ]): Result; bzmpop(...args: [ timeout: number | string, numkeys: number | string, ...keys: RedisKey[], min: "MIN", countToken: "COUNT", count: number | string, callback: Callback ]): Result; bzmpop(...args: [ timeout: number | string, numkeys: number | string, keys: RedisKey[], min: "MIN", countToken: "COUNT", count: number | string, callback: Callback ]): Result; bzmpop(...args: [ timeout: number | string, numkeys: number | string, ...keys: RedisKey[], min: "MIN", countToken: "COUNT", count: number | string ]): Result; bzmpop(...args: [ timeout: number | string, numkeys: number | string, keys: RedisKey[], min: "MIN", countToken: "COUNT", count: number | string ]): Result; bzmpop(...args: [ timeout: number | string, numkeys: number | string, ...keys: RedisKey[], max: "MAX", callback: Callback ]): Result; bzmpop(...args: [ timeout: number | string, numkeys: number | string, keys: RedisKey[], max: "MAX", callback: Callback ]): Result; bzmpop(...args: [ timeout: number | string, numkeys: number | string, ...keys: RedisKey[], max: "MAX" ]): Result; bzmpop(...args: [ timeout: number | string, numkeys: number | string, keys: RedisKey[], max: "MAX" ]): Result; bzmpop(...args: [ timeout: number | string, numkeys: number | string, ...keys: RedisKey[], max: "MAX", countToken: "COUNT", count: number | string, callback: Callback ]): Result; bzmpop(...args: [ timeout: number | string, numkeys: number | string, keys: RedisKey[], max: "MAX", countToken: "COUNT", count: number | string, callback: Callback ]): Result; bzmpop(...args: [ timeout: number | string, numkeys: number | string, ...keys: RedisKey[], max: "MAX", countToken: "COUNT", count: number | string ]): Result; bzmpop(...args: [ timeout: number | string, numkeys: number | string, keys: RedisKey[], max: "MAX", countToken: "COUNT", count: number | string ]): Result; /** * Removes and returns the member with the highest score from one or more sorted sets. Blocks until a member available otherwise. Deletes the sorted set if the last element was popped. * - _group_: sorted-set * - _complexity_: O(log(N)) with N being the number of elements in the sorted set. * - _since_: 5.0.0 */ bzpopmax(...args: [ ...keys: RedisKey[], timeout: number | string, callback: Callback<[key: string, member: string, score: string] | null> ]): Result<[key: string, member: string, score: string] | null, Context>; bzpopmaxBuffer(...args: [ ...keys: RedisKey[], timeout: number | string, callback: Callback<[key: Buffer, member: Buffer, score: Buffer] | null> ]): Result<[key: Buffer, member: Buffer, score: Buffer] | null, Context>; bzpopmax(...args: [ keys: RedisKey[], timeout: number | string, callback: Callback<[key: string, member: string, score: string] | null> ]): Result<[key: string, member: string, score: string] | null, Context>; bzpopmaxBuffer(...args: [ keys: RedisKey[], timeout: number | string, callback: Callback<[key: Buffer, member: Buffer, score: Buffer] | null> ]): Result<[key: Buffer, member: Buffer, score: Buffer] | null, Context>; bzpopmax(...args: [...keys: RedisKey[], timeout: number | string]): Result<[key: string, member: string, score: string] | null, Context>; bzpopmaxBuffer(...args: [...keys: RedisKey[], timeout: number | string]): Result<[key: Buffer, member: Buffer, score: Buffer] | null, Context>; bzpopmax(...args: [keys: RedisKey[], timeout: number | string]): Result<[key: string, member: string, score: string] | null, Context>; bzpopmaxBuffer(...args: [keys: RedisKey[], timeout: number | string]): Result<[key: Buffer, member: Buffer, score: Buffer] | null, Context>; /** * Removes and returns the member with the lowest score from one or more sorted sets. Blocks until a member is available otherwise. Deletes the sorted set if the last element was popped. * - _group_: sorted-set * - _complexity_: O(log(N)) with N being the number of elements in the sorted set. * - _since_: 5.0.0 */ bzpopmin(...args: [ ...keys: RedisKey[], timeout: number | string, callback: Callback<[key: string, member: string, score: string] | null> ]): Result<[key: string, member: string, score: string] | null, Context>; bzpopminBuffer(...args: [ ...keys: RedisKey[], timeout: number | string, callback: Callback<[key: Buffer, member: Buffer, score: Buffer] | null> ]): Result<[key: Buffer, member: Buffer, score: Buffer] | null, Context>; bzpopmin(...args: [ keys: RedisKey[], timeout: number | string, callback: Callback<[key: string, member: string, score: string] | null> ]): Result<[key: string, member: string, score: string] | null, Context>; bzpopminBuffer(...args: [ keys: RedisKey[], timeout: number | string, callback: Callback<[key: Buffer, member: Buffer, score: Buffer] | null> ]): Result<[key: Buffer, member: Buffer, score: Buffer] | null, Context>; bzpopmin(...args: [...keys: RedisKey[], timeout: number | string]): Result<[key: string, member: string, score: string] | null, Context>; bzpopminBuffer(...args: [...keys: RedisKey[], timeout: number | string]): Result<[key: Buffer, member: Buffer, score: Buffer] | null, Context>; bzpopmin(...args: [keys: RedisKey[], timeout: number | string]): Result<[key: string, member: string, score: string] | null, Context>; bzpopminBuffer(...args: [keys: RedisKey[], timeout: number | string]): Result<[key: Buffer, member: Buffer, score: Buffer] | null, Context>; /** * Instructs the server whether to track the keys in the next request. * - _group_: connection * - _complexity_: O(1) * - _since_: 6.0.0 */ client(subcommand: "CACHING", yes: "YES", callback?: Callback<"OK">): Result<"OK", Context>; client(subcommand: "CACHING", no: "NO", callback?: Callback<"OK">): Result<"OK", Context>; /** * A client claims its capability. * - _group_: connection * - _complexity_: O(1) * - _since_: 8.0.0 */ client(...args: [ subcommand: "CAPA", ...capabilities: (string | Buffer)[], callback: Callback ]): Result; client(...args: [subcommand: "CAPA", ...capabilities: (string | Buffer)[]]): Result; /** * Returns the name of the connection. * - _group_: connection * - _complexity_: O(1) * - _since_: 2.6.9 */ client(subcommand: "GETNAME", callback?: Callback): Result; clientBuffer(subcommand: "GETNAME", callback?: Callback): Result; /** * Returns the client ID to which the connection's tracking notifications are redirected. * - _group_: connection * - _complexity_: O(1) * - _since_: 6.0.0 */ client(subcommand: "GETREDIR", callback?: Callback): Result; /** * Returns helpful text about the different subcommands. * - _group_: connection * - _complexity_: O(1) * - _since_: 5.0.0 */ client(subcommand: "HELP", callback?: Callback): Result; /** * Returns the unique client ID of the connection. * - _group_: connection * - _complexity_: O(1) * - _since_: 5.0.0 */ client(subcommand: "ID", callback?: Callback): Result; /** * Returns information about the connection. * - _group_: connection * - _complexity_: O(1) * - _since_: 6.2.0 */ client(subcommand: "INFO", callback?: Callback): Result; clientBuffer(subcommand: "INFO", callback?: Callback): Result; /** * Terminates open connections. * - _group_: connection * - _complexity_: O(N) where N is the number of client connections * - _since_: 2.4.0 */ client(subcommand: "KILL", oldFormat: string | Buffer, callback?: Callback): Result; client(subcommand: "KILL", callback?: Callback): Result; client(subcommand: "KILL", clientIdToken: "ID", clientId: number | string, callback?: Callback): Result; client(subcommand: "KILL", callback?: Callback): Result; client(subcommand: "KILL", type: "TYPE", normal: "NORMAL", callback?: Callback): Result; client(subcommand: "KILL", type: "TYPE", master: "MASTER", callback?: Callback): Result; client(subcommand: "KILL", type: "TYPE", primary: "PRIMARY", callback?: Callback): Result; client(subcommand: "KILL", type: "TYPE", slave: "SLAVE", callback?: Callback): Result; client(subcommand: "KILL", type: "TYPE", replica: "REPLICA", callback?: Callback): Result; client(subcommand: "KILL", type: "TYPE", pubsub: "PUBSUB", callback?: Callback): Result; client(subcommand: "KILL", callback?: Callback): Result; client(subcommand: "KILL", usernameToken: "USER", username: string | Buffer, callback?: Callback): Result; client(subcommand: "KILL", callback?: Callback): Result; client(subcommand: "KILL", addrToken: "ADDR", addr: string | Buffer, callback?: Callback): Result; client(subcommand: "KILL", callback?: Callback): Result; client(subcommand: "KILL", laddrToken: "LADDR", laddr: string | Buffer, callback?: Callback): Result; client(subcommand: "KILL", callback?: Callback): Result; client(subcommand: "KILL", skipme: "SKIPME", yes: "YES", callback?: Callback): Result; client(subcommand: "KILL", skipme: "SKIPME", no: "NO", callback?: Callback): Result; client(subcommand: "KILL", callback?: Callback): Result; client(subcommand: "KILL", maxageToken: "MAXAGE", maxage: number | string, callback?: Callback): Result; /** * Lists open connections. * - _group_: connection * - _complexity_: O(N) where N is the number of client connections * - _since_: 2.4.0 */ client(subcommand: "LIST", callback?: Callback): Result; client(...args: [ subcommand: "LIST", clientIdToken: "ID", ...clientIds: (number | string)[], callback: Callback ]): Result; client(...args: [ subcommand: "LIST", clientIdToken: "ID", ...clientIds: (number | string)[] ]): Result; client(subcommand: "LIST", type: "TYPE", normal: "NORMAL", callback?: Callback): Result; client(...args: [ subcommand: "LIST", type: "TYPE", normal: "NORMAL", clientIdToken: "ID", ...clientIds: (number | string)[], callback: Callback ]): Result; client(...args: [ subcommand: "LIST", type: "TYPE", normal: "NORMAL", clientIdToken: "ID", ...clientIds: (number | string)[] ]): Result; client(subcommand: "LIST", type: "TYPE", master: "MASTER", callback?: Callback): Result; client(...args: [ subcommand: "LIST", type: "TYPE", master: "MASTER", clientIdToken: "ID", ...clientIds: (number | string)[], callback: Callback ]): Result; client(...args: [ subcommand: "LIST", type: "TYPE", master: "MASTER", clientIdToken: "ID", ...clientIds: (number | string)[] ]): Result; client(subcommand: "LIST", type: "TYPE", replica: "REPLICA", callback?: Callback): Result; client(...args: [ subcommand: "LIST", type: "TYPE", replica: "REPLICA", clientIdToken: "ID", ...clientIds: (number | string)[], callback: Callback ]): Result; client(...args: [ subcommand: "LIST", type: "TYPE", replica: "REPLICA", clientIdToken: "ID", ...clientIds: (number | string)[] ]): Result; client(subcommand: "LIST", type: "TYPE", pubsub: "PUBSUB", callback?: Callback): Result; client(...args: [ subcommand: "LIST", type: "TYPE", pubsub: "PUBSUB", clientIdToken: "ID", ...clientIds: (number | string)[], callback: Callback ]): Result; client(...args: [ subcommand: "LIST", type: "TYPE", pubsub: "PUBSUB", clientIdToken: "ID", ...clientIds: (number | string)[] ]): Result; /** * Sets the client eviction mode of the connection. * - _group_: connection * - _complexity_: O(1) * - _since_: 7.0.0 */ client(subcommand: "NO-EVICT", on: "ON", callback?: Callback): Result; client(subcommand: "NO-EVICT", off: "OFF", callback?: Callback): Result; /** * Controls whether commands sent by the client affect the LRU/LFU of accessed keys. * - _group_: connection * - _complexity_: O(1) * - _since_: 7.2.0 */ client(subcommand: "NO-TOUCH", on: "ON", callback?: Callback): Result; client(subcommand: "NO-TOUCH", off: "OFF", callback?: Callback): Result; /** * Suspends commands processing. * - _group_: connection * - _complexity_: O(1) * - _since_: 3.0.0 */ client(subcommand: "PAUSE", timeout: number | string, callback?: Callback<"OK">): Result<"OK", Context>; client(subcommand: "PAUSE", timeout: number | string, write: "WRITE", callback?: Callback<"OK">): Result<"OK", Context>; client(subcommand: "PAUSE", timeout: number | string, all: "ALL", callback?: Callback<"OK">): Result<"OK", Context>; /** * Instructs the server whether to reply to commands. * - _group_: connection * - _complexity_: O(1) * - _since_: 3.2.0 */ client(subcommand: "REPLY", on: "ON", callback?: Callback): Result; client(subcommand: "REPLY", off: "OFF", callback?: Callback): Result; client(subcommand: "REPLY", skip: "SKIP", callback?: Callback): Result; /** * Sets information specific to the client or connection. * - _group_: connection * - _complexity_: O(1) * - _since_: 7.2.0 */ client(subcommand: "SETINFO", libnameToken: "LIB-NAME", libname: string | Buffer, callback?: Callback): Result; clientBuffer(subcommand: "SETINFO", libnameToken: "LIB-NAME", libname: string | Buffer, callback?: Callback): Result; client(subcommand: "SETINFO", libverToken: "LIB-VER", libver: string | Buffer, callback?: Callback): Result; clientBuffer(subcommand: "SETINFO", libverToken: "LIB-VER", libver: string | Buffer, callback?: Callback): Result; /** * Sets the connection name. * - _group_: connection * - _complexity_: O(1) * - _since_: 2.6.9 */ client(subcommand: "SETNAME", connectionName: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>; /** * Controls server-assisted client-side caching for the connection. * - _group_: connection * - _complexity_: O(1). Some options may introduce additional complexity. * - _since_: 6.0.0 */ client(...args: [ subcommand: "TRACKING", ...args: RedisValue[], callback: Callback ]): Result; client(...args: [subcommand: "TRACKING", ...args: RedisValue[]]): Result; /** * Returns information about server-assisted client-side caching for the connection. * - _group_: connection * - _complexity_: O(1) * - _since_: 6.2.0 */ client(subcommand: "TRACKINGINFO", callback?: Callback): Result; clientBuffer(subcommand: "TRACKINGINFO", callback?: Callback): Result; /** * Unblocks a client blocked by a blocking command from a different connection. * - _group_: connection * - _complexity_: O(log N) where N is the number of client connections * - _since_: 5.0.0 */ client(subcommand: "UNBLOCK", clientId: number | string, callback?: Callback): Result; client(subcommand: "UNBLOCK", clientId: number | string, timeout: "TIMEOUT", callback?: Callback): Result; client(subcommand: "UNBLOCK", clientId: number | string, error: "ERROR", callback?: Callback): Result; /** * Resumes processing commands from paused clients. * - _group_: connection * - _complexity_: O(N) Where N is the number of paused clients * - _since_: 6.2.0 */ client(subcommand: "UNPAUSE", callback?: Callback<"OK">): Result<"OK", Context>; /** * Assigns new hash slots to a node. * - _group_: cluster * - _complexity_: O(N) where N is the total number of hash slot arguments * - _since_: 3.0.0 */ cluster(...args: [ subcommand: "ADDSLOTS", ...slots: (number | string)[], callback: Callback<[ startSlotRange: number, endSlotRange: number, ...nodes: [ host: string, port: number, nodeId: string, info: unknown[] ][] ][]> ]): Result<[ startSlotRange: number, endSlotRange: number, ...nodes: [host: string, port: number, nodeId: string, info: unknown[]][] ][], Context>; cluster(...args: [ subcommand: "ADDSLOTS", slots: (number | string)[], callback: Callback<[ startSlotRange: number, endSlotRange: number, ...nodes: [ host: string, port: number, nodeId: string, info: unknown[] ][] ][]> ]): Result<[ startSlotRange: number, endSlotRange: number, ...nodes: [host: string, port: number, nodeId: string, info: unknown[]][] ][], Context>; cluster(...args: [subcommand: "ADDSLOTS", ...slots: (number | string)[]]): Result<[ startSlotRange: number, endSlotRange: number, ...nodes: [host: string, port: number, nodeId: string, info: unknown[]][] ][], Context>; cluster(...args: [subcommand: "ADDSLOTS", slots: (number | string)[]]): Result<[ startSlotRange: number, endSlotRange: number, ...nodes: [host: string, port: number, nodeId: string, info: unknown[]][] ][], Context>; /** * Assigns new hash slot ranges to a node. * - _group_: cluster * - _complexity_: O(N) where N is the total number of the slots between the start slot and end slot arguments. * - _since_: 7.0.0 */ cluster(...args: [ subcommand: "ADDSLOTSRANGE", ...ranges: (string | number)[], callback: Callback<[ startSlotRange: number, endSlotRange: number, ...nodes: [ host: string, port: number, nodeId: string, info: unknown[] ][] ][]> ]): Result<[ startSlotRange: number, endSlotRange: number, ...nodes: [host: string, port: number, nodeId: string, info: unknown[]][] ][], Context>; cluster(...args: [subcommand: "ADDSLOTSRANGE", ...ranges: (string | number)[]]): Result<[ startSlotRange: number, endSlotRange: number, ...nodes: [host: string, port: number, nodeId: string, info: unknown[]][] ][], Context>; /** * Advances the cluster config epoch. * - _group_: cluster * - _complexity_: O(1) * - _since_: 3.0.0 */ cluster(subcommand: "BUMPEPOCH", callback?: Callback<"BUMPED" | "STILL">): Result<"BUMPED" | "STILL", Context>; /** * Returns the number of active failure reports active for a node. * - _group_: cluster * - _complexity_: O(N) where N is the number of failure reports * - _since_: 3.0.0 */ cluster(subcommand: "COUNT-FAILURE-REPORTS", nodeId: string | Buffer | number, callback?: Callback): Result; /** * Returns the number of keys in a hash slot. * - _group_: cluster * - _complexity_: O(1) * - _since_: 3.0.0 */ cluster(subcommand: "COUNTKEYSINSLOT", slot: number | string, callback?: Callback): Result; /** * Sets hash slots as unbound for a node. * - _group_: cluster * - _complexity_: O(N) where N is the total number of hash slot arguments * - _since_: 3.0.0 */ cluster(...args: [ subcommand: "DELSLOTS", ...slots: (number | string)[], callback: Callback<[ startSlotRange: number, endSlotRange: number, ...nodes: [ host: string, port: number, nodeId: string, info: unknown[] ][] ][]> ]): Result<[ startSlotRange: number, endSlotRange: number, ...nodes: [host: string, port: number, nodeId: string, info: unknown[]][] ][], Context>; cluster(...args: [ subcommand: "DELSLOTS", slots: (number | string)[], callback: Callback<[ startSlotRange: number, endSlotRange: number, ...nodes: [ host: string, port: number, nodeId: string, info: unknown[] ][] ][]> ]): Result<[ startSlotRange: number, endSlotRange: number, ...nodes: [host: string, port: number, nodeId: string, info: unknown[]][] ][], Context>; cluster(...args: [subcommand: "DELSLOTS", ...slots: (number | string)[]]): Result<[ startSlotRange: number, endSlotRange: number, ...nodes: [host: string, port: number, nodeId: string, info: unknown[]][] ][], Context>; cluster(...args: [subcommand: "DELSLOTS", slots: (number | string)[]]): Result<[ startSlotRange: number, endSlotRange: number, ...nodes: [host: string, port: number, nodeId: string, info: unknown[]][] ][], Context>; /** * Sets hash slot ranges as unbound for a node. * - _group_: cluster * - _complexity_: O(N) where N is the total number of the slots between the start slot and end slot arguments. * - _since_: 7.0.0 */ cluster(...args: [ subcommand: "DELSLOTSRANGE", ...ranges: (string | number)[], callback: Callback<[ startSlotRange: number, endSlotRange: number, ...nodes: [ host: string, port: number, nodeId: string, info: unknown[] ][] ][]> ]): Result<[ startSlotRange: number, endSlotRange: number, ...nodes: [host: string, port: number, nodeId: string, info: unknown[]][] ][], Context>; cluster(...args: [subcommand: "DELSLOTSRANGE", ...ranges: (string | number)[]]): Result<[ startSlotRange: number, endSlotRange: number, ...nodes: [host: string, port: number, nodeId: string, info: unknown[]][] ][], Context>; /** * Forces a replica to perform a manual failover of its primary. * - _group_: cluster * - _complexity_: O(1) * - _since_: 3.0.0 */ cluster(subcommand: "FAILOVER", callback?: Callback<"OK">): Result<"OK", Context>; cluster(subcommand: "FAILOVER", force: "FORCE", callback?: Callback<"OK">): Result<"OK", Context>; cluster(subcommand: "FAILOVER", takeover: "TAKEOVER", callback?: Callback<"OK">): Result<"OK", Context>; /** * Deletes all slots information from a node. * - _group_: cluster * - _complexity_: O(1) * - _since_: 3.0.0 */ cluster(subcommand: "FLUSHSLOTS", callback?: Callback<[ startSlotRange: number, endSlotRange: number, ...nodes: [ host: string, port: number, nodeId: string, info: unknown[] ][] ][]>): Result<[ startSlotRange: number, endSlotRange: number, ...nodes: [host: string, port: number, nodeId: string, info: unknown[]][] ][], Context>; /** * Removes a node from the nodes table. * - _group_: cluster * - _complexity_: O(1) * - _since_: 3.0.0 */ cluster(subcommand: "FORGET", nodeId: string | Buffer | number, callback?: Callback<"OK">): Result<"OK", Context>; /** * Returns the key names in a hash slot. * - _group_: cluster * - _complexity_: O(N) where N is the number of requested keys * - _since_: 3.0.0 */ cluster(subcommand: "GETKEYSINSLOT", slot: number | string, count: number | string, callback?: Callback): Result; /** * Returns helpful text about the different subcommands. * - _group_: cluster * - _complexity_: O(1) * - _since_: 5.0.0 */ cluster(subcommand: "HELP", callback?: Callback): Result; /** * Returns information about the state of a node. * - _group_: cluster * - _complexity_: O(1) * - _since_: 3.0.0 */ cluster(subcommand: "INFO", callback?: Callback): Result; /** * Returns the hash slot for a key. * - _group_: cluster * - _complexity_: O(N) where N is the number of bytes in the key * - _since_: 3.0.0 */ cluster(subcommand: "KEYSLOT", key: string | Buffer, callback?: Callback): Result; /** * Returns a list of all TCP links to and from peer nodes. * - _group_: cluster * - _complexity_: O(N) where N is the total number of Cluster nodes * - _since_: 7.0.0 */ cluster(subcommand: "LINKS", callback?: Callback): Result; /** * Forces a node to handshake with another node. * - _group_: cluster * - _complexity_: O(1) * - _since_: 3.0.0 */ cluster(subcommand: "MEET", ip: string | Buffer, port: number | string, callback?: Callback<"OK">): Result<"OK", Context>; cluster(subcommand: "MEET", ip: string | Buffer, port: number | string, clusterBusPort: number | string, callback?: Callback<"OK">): Result<"OK", Context>; /** * Returns the ID of a node. * - _group_: cluster * - _complexity_: O(1) * - _since_: 3.0.0 */ cluster(subcommand: "MYID", callback?: Callback): Result; /** * Returns the shard ID of a node. * - _group_: cluster * - _complexity_: O(1) * - _since_: 7.2.0 */ cluster(subcommand: "MYSHARDID", callback?: Callback): Result; /** * Returns the cluster configuration for a node. * - _group_: cluster * - _complexity_: O(N) where N is the total number of Cluster nodes * - _since_: 3.0.0 */ cluster(subcommand: "NODES", callback?: Callback): Result; /** * Lists the replica nodes of a primary node. * - _group_: cluster * - _complexity_: O(N) where N is the number of replicas. * - _since_: 5.0.0 */ cluster(subcommand: "REPLICAS", nodeId: string | Buffer | number, callback?: Callback): Result; /** * Configure a node as replica of a primary node. * - _group_: cluster * - _complexity_: O(1) * - _since_: 3.0.0 */ cluster(subcommand: "REPLICATE", nodeId: string | Buffer | number, callback?: Callback<"OK">): Result<"OK", Context>; /** * Resets a node. * - _group_: cluster * - _complexity_: O(N) where N is the number of known nodes. The command may execute a FLUSHALL as a side effect. * - _since_: 3.0.0 */ cluster(subcommand: "RESET", callback?: Callback<"OK">): Result<"OK", Context>; cluster(subcommand: "RESET", hard: "HARD", callback?: Callback<"OK">): Result<"OK", Context>; cluster(subcommand: "RESET", soft: "SOFT", callback?: Callback<"OK">): Result<"OK", Context>; /** * Forces a node to save the cluster configuration to disk. * - _group_: cluster * - _complexity_: O(1) * - _since_: 3.0.0 */ cluster(subcommand: "SAVECONFIG", callback?: Callback<"OK">): Result<"OK", Context>; /** * Sets the configuration epoch for a new node. * - _group_: cluster * - _complexity_: O(1) * - _since_: 3.0.0 */ cluster(subcommand: "SET-CONFIG-EPOCH", configEpoch: number | string, callback?: Callback<"OK">): Result<"OK", Context>; /** * Binds a hash slot to a node. * - _group_: cluster * - _complexity_: O(1) * - _since_: 3.0.0 */ cluster(subcommand: "SETSLOT", slot: number | string, importingToken: "IMPORTING", importing: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>; cluster(subcommand: "SETSLOT", slot: number | string, importingToken: "IMPORTING", importing: string | Buffer, timeoutToken: "TIMEOUT", timeout: number | string, callback?: Callback<"OK">): Result<"OK", Context>; cluster(subcommand: "SETSLOT", slot: number | string, migratingToken: "MIGRATING", migrating: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>; cluster(subcommand: "SETSLOT", slot: number | string, migratingToken: "MIGRATING", migrating: string | Buffer, timeoutToken: "TIMEOUT", timeout: number | string, callback?: Callback<"OK">): Result<"OK", Context>; cluster(subcommand: "SETSLOT", slot: number | string, nodeToken: "NODE", node: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>; cluster(subcommand: "SETSLOT", slot: number | string, nodeToken: "NODE", node: string | Buffer, timeoutToken: "TIMEOUT", timeout: number | string, callback?: Callback<"OK">): Result<"OK", Context>; cluster(subcommand: "SETSLOT", slot: number | string, stable: "STABLE", callback?: Callback<"OK">): Result<"OK", Context>; cluster(subcommand: "SETSLOT", slot: number | string, stable: "STABLE", timeoutToken: "TIMEOUT", timeout: number | string, callback?: Callback<"OK">): Result<"OK", Context>; /** * Returns the mapping of cluster slots to shards. * - _group_: cluster * - _complexity_: O(N) where N is the total number of cluster nodes * - _since_: 7.0.0 */ cluster(subcommand: "SHARDS", callback?: Callback): Result; /** * Lists the replica nodes of a primary node. * - _group_: cluster * - _complexity_: O(N) where N is the number of replicas. * - _since_: 3.0.0 */ cluster(subcommand: "SLAVES", nodeId: string | Buffer | number, callback?: Callback): Result; /** * Return an array of slot usage statistics for slots assigned to the current node. * - _group_: cluster * - _complexity_: O(N) where N is the total number of slots based on arguments. O(N*log(N)) with ORDERBY subcommand. * - _since_: 8.0.0 */ cluster(subcommand: "SLOT-STATS", slotsrangeToken: "SLOTSRANGE", startSlot: number | string, endSlot: number | string, callback?: Callback): Result; cluster(subcommand: "SLOT-STATS", orderbyToken: "ORDERBY", metric: string | Buffer, callback?: Callback): Result; cluster(subcommand: "SLOT-STATS", orderbyToken: "ORDERBY", metric: string | Buffer, asc: "ASC", callback?: Callback): Result; cluster(subcommand: "SLOT-STATS", orderbyToken: "ORDERBY", metric: string | Buffer, desc: "DESC", callback?: Callback): Result; cluster(subcommand: "SLOT-STATS", orderbyToken: "ORDERBY", metric: string | Buffer, limitToken: "LIMIT", limit: number | string, callback?: Callback): Result; cluster(subcommand: "SLOT-STATS", orderbyToken: "ORDERBY", metric: string | Buffer, limitToken: "LIMIT", limit: number | string, asc: "ASC", callback?: Callback): Result; cluster(subcommand: "SLOT-STATS", orderbyToken: "ORDERBY", metric: string | Buffer, limitToken: "LIMIT", limit: number | string, desc: "DESC", callback?: Callback): Result; /** * Returns the mapping of cluster slots to nodes. * - _group_: cluster * - _complexity_: O(N) where N is the total number of Cluster nodes * - _since_: 3.0.0 */ cluster(subcommand: "SLOTS", callback?: Callback<[ startSlotRange: number, endSlotRange: number, ...nodes: [ host: string, port: number, nodeId: string, info: unknown[] ][] ][]>): Result<[ startSlotRange: number, endSlotRange: number, ...nodes: [host: string, port: number, nodeId: string, info: unknown[]][] ][], Context>; /** * Returns a count of commands. * - _group_: server * - _complexity_: O(1) * - _since_: 2.8.13 */ command(subcommand: "COUNT", callback?: Callback): Result; /** * Returns documentary information about one, multiple or all commands. * - _group_: server * - _complexity_: O(N) where N is the number of commands to look up * - _since_: 7.0.0 */ command(subcommand: "DOCS", callback?: Callback): Result; command(...args: [ subcommand: "DOCS", ...commandNames: (string | Buffer)[], callback: Callback ]): Result; command(...args: [subcommand: "DOCS", ...commandNames: (string | Buffer)[]]): Result; /** * Extracts the key names from an arbitrary command. * - _group_: server * - _complexity_: O(N) where N is the number of arguments to the command * - _since_: 2.8.13 */ command(subcommand: "GETKEYS", command: string | Buffer, callback?: Callback): Result; command(...args: [ subcommand: "GETKEYS", command: string | Buffer, ...args: (string | Buffer | number)[], callback: Callback ]): Result; command(...args: [ subcommand: "GETKEYS", command: string | Buffer, ...args: (string | Buffer | number)[] ]): Result; /** * Extracts the key names and access flags for an arbitrary command. * - _group_: server * - _complexity_: O(N) where N is the number of arguments to the command * - _since_: 7.0.0 */ command(subcommand: "GETKEYSANDFLAGS", command: string | Buffer, callback?: Callback): Result; command(...args: [ subcommand: "GETKEYSANDFLAGS", command: string | Buffer, ...args: (string | Buffer | number)[], callback: Callback ]): Result; command(...args: [ subcommand: "GETKEYSANDFLAGS", command: string | Buffer, ...args: (string | Buffer | number)[] ]): Result; /** * Returns helpful text about the different subcommands. * - _group_: server * - _complexity_: O(1) * - _since_: 5.0.0 */ command(subcommand: "HELP", callback?: Callback): Result; /** * Returns information about one, multiple or all commands. * - _group_: server * - _complexity_: O(N) where N is the number of commands to look up * - _since_: 2.8.13 */ command(subcommand: "INFO", callback?: Callback): Result; command(...args: [ subcommand: "INFO", ...commandNames: (string | Buffer)[], callback: Callback ]): Result; command(...args: [subcommand: "INFO", ...commandNames: (string | Buffer)[]]): Result; /** * Returns a list of command names. * - _group_: server * - _complexity_: O(N) where N is the total number of commands * - _since_: 7.0.0 */ command(subcommand: "LIST", callback?: Callback): Result; command(subcommand: "LIST", filterby: "FILTERBY", moduleNameToken: "MODULE", moduleName: string | Buffer, callback?: Callback): Result; command(subcommand: "LIST", filterby: "FILTERBY", categoryToken: "ACLCAT", category: string | Buffer, callback?: Callback): Result; command(subcommand: "LIST", filterby: "FILTERBY", patternToken: "PATTERN", pattern: string, callback?: Callback): Result; /** * Returns the effective values of configuration parameters. * - _group_: server * - _complexity_: O(N) when N is the number of configuration parameters provided * - _since_: 2.0.0 */ config(...args: [ subcommand: "GET", ...parameters: (string | Buffer)[], callback: Callback ]): Result; config(...args: [subcommand: "GET", ...parameters: (string | Buffer)[]]): Result; /** * Returns helpful text about the different subcommands. * - _group_: server * - _complexity_: O(1) * - _since_: 5.0.0 */ config(subcommand: "HELP", callback?: Callback): Result; /** * Resets the server's statistics. * - _group_: server * - _complexity_: O(1) * - _since_: 2.0.0 */ config(subcommand: "RESETSTAT", callback?: Callback): Result; /** * Persists the effective configuration to file. * - _group_: server * - _complexity_: O(1) * - _since_: 2.8.0 */ config(subcommand: "REWRITE", callback?: Callback): Result; /** * Sets configuration parameters in-flight. * - _group_: server * - _complexity_: O(N) when N is the number of configuration parameters provided * - _since_: 2.0.0 */ config(...args: [ subcommand: "SET", ...data: (string | Buffer | number)[], callback: Callback ]): Result; config(...args: [subcommand: "SET", ...data: (string | Buffer | number)[]]): Result; /** * Copies the value of a key to a new key. * - _group_: generic * - _complexity_: O(N) worst case for collections, where N is the number of nested items. O(1) for string values. * - _since_: 6.2.0 */ copy(source: RedisKey, destination: RedisKey, callback?: Callback): Result; copy(source: RedisKey, destination: RedisKey, replace: "REPLACE", callback?: Callback): Result; copy(source: RedisKey, destination: RedisKey, destinationDbToken: "DB", destinationDb: number | string, callback?: Callback): Result; copy(source: RedisKey, destination: RedisKey, destinationDbToken: "DB", destinationDb: number | string, replace: "REPLACE", callback?: Callback): Result; /** * Returns the number of keys in the database. * - _group_: server * - _complexity_: O(1) * - _since_: 1.0.0 */ dbsize(callback?: Callback): Result; /** * A container for debugging commands. * - _group_: server * - _complexity_: Depends on subcommand. * - _since_: 1.0.0 */ debug(subcommand: string, callback?: Callback): Result; debug(...args: [ subcommand: string, ...args: (string | Buffer | number)[], callback: Callback ]): Result; debug(...args: [subcommand: string, ...args: (string | Buffer | number)[]]): Result; /** * Decrements the integer value of a key by one. Uses 0 as initial value if the key doesn't exist. * - _group_: string * - _complexity_: O(1) * - _since_: 1.0.0 */ decr(key: RedisKey, callback?: Callback): Result; /** * Decrements a number from the integer value of a key. Uses 0 as initial value if the key doesn't exist. * - _group_: string * - _complexity_: O(1) * - _since_: 1.0.0 */ decrby(key: RedisKey, decrement: number | string, callback?: Callback): Result; /** * Deletes one or more keys. * - _group_: generic * - _complexity_: O(N) where N is the number of keys that will be removed. When a key to remove holds a value other than a string, the individual complexity for this key is O(M) where M is the number of elements in the list, set, sorted set or hash. Removing a single key that holds a string value is O(1). * - _since_: 1.0.0 */ del(...args: [...keys: RedisKey[], callback: Callback]): Result; del(...args: [keys: RedisKey[], callback: Callback]): Result; del(...args: [...keys: RedisKey[]]): Result; del(...args: [keys: RedisKey[]]): Result; /** * Discards a transaction. * - _group_: transactions * - _complexity_: O(N), when N is the number of queued commands * - _since_: 2.0.0 */ discard(callback?: Callback<"OK">): Result<"OK", Context>; /** * Returns a serialized representation of the value stored at a key. * - _group_: generic * - _complexity_: O(1) to access the key and additional O(N*M) to serialize it, where N is the number of objects composing the value and M their average size. For small string values the time complexity is thus O(1)+O(1*M) where M is small, so simply O(1). * - _since_: 2.6.0 */ dump(key: RedisKey, callback?: Callback): Result; dumpBuffer(key: RedisKey, callback?: Callback): Result; /** * Returns the given string. * - _group_: connection * - _complexity_: O(1) * - _since_: 1.0.0 */ echo(message: string | Buffer, callback?: Callback): Result; echoBuffer(message: string | Buffer, callback?: Callback): Result; /** * Executes a server-side Lua script. * - _group_: scripting * - _complexity_: Depends on the script that is executed. * - _since_: 2.6.0 */ eval(script: string | Buffer, numkeys: number | string, callback?: Callback): Result; eval(...args: [ script: string | Buffer, numkeys: number | string, ...args: (string | Buffer | number)[], callback: Callback ]): Result; eval(...args: [ script: string | Buffer, numkeys: number | string, ...args: (string | Buffer | number)[] ]): Result; eval(...args: [ script: string | Buffer, numkeys: number | string, ...keys: RedisKey[], callback: Callback ]): Result; eval(...args: [ script: string | Buffer, numkeys: number | string, keys: RedisKey[], callback: Callback ]): Result; eval(...args: [ script: string | Buffer, numkeys: number | string, ...keys: RedisKey[] ]): Result; eval(...args: [ script: string | Buffer, numkeys: number | string, keys: RedisKey[] ]): Result; eval(...args: [ script: string | Buffer, numkeys: number | string, ...args: RedisValue[], callback: Callback ]): Result; eval(...args: [ script: string | Buffer, numkeys: number | string, ...args: RedisValue[] ]): Result; /** * Executes a read-only server-side Lua script. * - _group_: scripting * - _complexity_: Depends on the script that is executed. * - _since_: 7.0.0 */ eval_ro(script: string | Buffer, numkeys: number | string, callback?: Callback): Result; eval_ro(...args: [ script: string | Buffer, numkeys: number | string, ...args: (string | Buffer | number)[], callback: Callback ]): Result; eval_ro(...args: [ script: string | Buffer, numkeys: number | string, ...args: (string | Buffer | number)[] ]): Result; eval_ro(...args: [ script: string | Buffer, numkeys: number | string, ...keys: RedisKey[], callback: Callback ]): Result; eval_ro(...args: [ script: string | Buffer, numkeys: number | string, keys: RedisKey[], callback: Callback ]): Result; eval_ro(...args: [ script: string | Buffer, numkeys: number | string, ...keys: RedisKey[] ]): Result; eval_ro(...args: [ script: string | Buffer, numkeys: number | string, keys: RedisKey[] ]): Result; eval_ro(...args: [ script: string | Buffer, numkeys: number | string, ...args: RedisValue[], callback: Callback ]): Result; eval_ro(...args: [ script: string | Buffer, numkeys: number | string, ...args: RedisValue[] ]): Result; /** * Executes a server-side Lua script by SHA1 digest. * - _group_: scripting * - _complexity_: Depends on the script that is executed. * - _since_: 2.6.0 */ evalsha(sha1: string | Buffer, numkeys: number | string, callback?: Callback): Result; evalsha(...args: [ sha1: string | Buffer, numkeys: number | string, ...args: (string | Buffer | number)[], callback: Callback ]): Result; evalsha(...args: [ sha1: string | Buffer, numkeys: number | string, ...args: (string | Buffer | number)[] ]): Result; evalsha(...args: [ sha1: string | Buffer, numkeys: number | string, ...keys: RedisKey[], callback: Callback ]): Result; evalsha(...args: [ sha1: string | Buffer, numkeys: number | string, keys: RedisKey[], callback: Callback ]): Result; evalsha(...args: [ sha1: string | Buffer, numkeys: number | string, ...keys: RedisKey[] ]): Result; evalsha(...args: [sha1: string | Buffer, numkeys: number | string, keys: RedisKey[]]): Result; evalsha(...args: [ sha1: string | Buffer, numkeys: number | string, ...args: RedisValue[], callback: Callback ]): Result; evalsha(...args: [ sha1: string | Buffer, numkeys: number | string, ...args: RedisValue[] ]): Result; /** * Executes a read-only server-side Lua script by SHA1 digest. * - _group_: scripting * - _complexity_: Depends on the script that is executed. * - _since_: 7.0.0 */ evalsha_ro(sha1: string | Buffer, numkeys: number | string, callback?: Callback): Result; evalsha_ro(...args: [ sha1: string | Buffer, numkeys: number | string, ...args: (string | Buffer | number)[], callback: Callback ]): Result; evalsha_ro(...args: [ sha1: string | Buffer, numkeys: number | string, ...args: (string | Buffer | number)[] ]): Result; evalsha_ro(...args: [ sha1: string | Buffer, numkeys: number | string, ...keys: RedisKey[], callback: Callback ]): Result; evalsha_ro(...args: [ sha1: string | Buffer, numkeys: number | string, keys: RedisKey[], callback: Callback ]): Result; evalsha_ro(...args: [ sha1: string | Buffer, numkeys: number | string, ...keys: RedisKey[] ]): Result; evalsha_ro(...args: [sha1: string | Buffer, numkeys: number | string, keys: RedisKey[]]): Result; evalsha_ro(...args: [ sha1: string | Buffer, numkeys: number | string, ...args: RedisValue[], callback: Callback ]): Result; evalsha_ro(...args: [ sha1: string | Buffer, numkeys: number | string, ...args: RedisValue[] ]): Result; /** * Executes all commands in a transaction. * - _group_: transactions * - _complexity_: Depends on commands in the transaction * - _since_: 1.2.0 */ exec(callback?: Callback<[error: Error | null, result: unknown][] | null>): Promise<[error: Error | null, result: unknown][] | null>; /** * Determines whether one or more keys exist. * - _group_: generic * - _complexity_: O(N) where N is the number of keys to check. * - _since_: 1.0.0 */ exists(...args: [...keys: RedisKey[], callback: Callback]): Result; exists(...args: [keys: RedisKey[], callback: Callback]): Result; exists(...args: [...keys: RedisKey[]]): Result; exists(...args: [keys: RedisKey[]]): Result; /** * Sets the expiration time of a key in seconds. * - _group_: generic * - _complexity_: O(1) * - _since_: 1.0.0 */ expire(key: RedisKey, seconds: number | string, callback?: Callback): Result; expire(key: RedisKey, seconds: number | string, nx: "NX", callback?: Callback): Result; expire(key: RedisKey, seconds: number | string, xx: "XX", callback?: Callback): Result; expire(key: RedisKey, seconds: number | string, gt: "GT", callback?: Callback): Result; expire(key: RedisKey, seconds: number | string, lt: "LT", callback?: Callback): Result; /** * Sets the expiration time of a key to a Unix timestamp. * - _group_: generic * - _complexity_: O(1) * - _since_: 1.2.0 */ expireat(key: RedisKey, unixTimeSeconds: number | string, callback?: Callback): Result; expireat(key: RedisKey, unixTimeSeconds: number | string, nx: "NX", callback?: Callback): Result; expireat(key: RedisKey, unixTimeSeconds: number | string, xx: "XX", callback?: Callback): Result; expireat(key: RedisKey, unixTimeSeconds: number | string, gt: "GT", callback?: Callback): Result; expireat(key: RedisKey, unixTimeSeconds: number | string, lt: "LT", callback?: Callback): Result; /** * Returns the expiration time of a key as a Unix timestamp. * - _group_: generic * - _complexity_: O(1) * - _since_: 7.0.0 */ expiretime(key: RedisKey, callback?: Callback): Result; /** * Starts a coordinated failover from a server to one of its replicas. * - _group_: server * - _complexity_: O(1) * - _since_: 6.2.0 */ failover(callback?: Callback<"OK">): Result<"OK", Context>; failover(millisecondsToken: "TIMEOUT", milliseconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>; failover(abort: "ABORT", callback?: Callback<"OK">): Result<"OK", Context>; failover(abort: "ABORT", millisecondsToken: "TIMEOUT", milliseconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>; failover(targetToken: "TO", host: string | Buffer, port: number | string, callback?: Callback<"OK">): Result<"OK", Context>; failover(targetToken: "TO", host: string | Buffer, port: number | string, millisecondsToken: "TIMEOUT", milliseconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>; failover(targetToken: "TO", host: string | Buffer, port: number | string, abort: "ABORT", callback?: Callback<"OK">): Result<"OK", Context>; failover(targetToken: "TO", host: string | Buffer, port: number | string, abort: "ABORT", millisecondsToken: "TIMEOUT", milliseconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>; failover(targetToken: "TO", host: string | Buffer, port: number | string, force: "FORCE", callback?: Callback<"OK">): Result<"OK", Context>; failover(targetToken: "TO", host: string | Buffer, port: number | string, force: "FORCE", millisecondsToken: "TIMEOUT", milliseconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>; failover(targetToken: "TO", host: string | Buffer, port: number | string, force: "FORCE", abort: "ABORT", callback?: Callback<"OK">): Result<"OK", Context>; failover(targetToken: "TO", host: string | Buffer, port: number | string, force: "FORCE", abort: "ABORT", millisecondsToken: "TIMEOUT", milliseconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>; /** * Invokes a function. * - _group_: scripting * - _complexity_: Depends on the function that is executed. * - _since_: 7.0.0 */ fcall(fun: string | Buffer, numkeys: number | string, callback?: Callback): Result; fcall(...args: [ fun: string | Buffer, numkeys: number | string, ...args: (string | Buffer | number)[], callback: Callback ]): Result; fcall(...args: [ fun: string | Buffer, numkeys: number | string, ...args: (string | Buffer | number)[] ]): Result; fcall(...args: [ fun: string | Buffer, numkeys: number | string, ...keys: RedisKey[], callback: Callback ]): Result; fcall(...args: [ fun: string | Buffer, numkeys: number | string, keys: RedisKey[], callback: Callback ]): Result; fcall(...args: [ fun: string | Buffer, numkeys: number | string, ...keys: RedisKey[] ]): Result; fcall(...args: [fun: string | Buffer, numkeys: number | string, keys: RedisKey[]]): Result; fcall(...args: [ fun: string | Buffer, numkeys: number | string, ...args: RedisValue[], callback: Callback ]): Result; fcall(...args: [ fun: string | Buffer, numkeys: number | string, ...args: RedisValue[] ]): Result; /** * Invokes a read-only function. * - _group_: scripting * - _complexity_: Depends on the function that is executed. * - _since_: 7.0.0 */ fcall_ro(fun: string | Buffer, numkeys: number | string, callback?: Callback): Result; fcall_ro(...args: [ fun: string | Buffer, numkeys: number | string, ...args: (string | Buffer | number)[], callback: Callback ]): Result; fcall_ro(...args: [ fun: string | Buffer, numkeys: number | string, ...args: (string | Buffer | number)[] ]): Result; fcall_ro(...args: [ fun: string | Buffer, numkeys: number | string, ...keys: RedisKey[], callback: Callback ]): Result; fcall_ro(...args: [ fun: string | Buffer, numkeys: number | string, keys: RedisKey[], callback: Callback ]): Result; fcall_ro(...args: [ fun: string | Buffer, numkeys: number | string, ...keys: RedisKey[] ]): Result; fcall_ro(...args: [fun: string | Buffer, numkeys: number | string, keys: RedisKey[]]): Result; fcall_ro(...args: [ fun: string | Buffer, numkeys: number | string, ...args: RedisValue[], callback: Callback ]): Result; fcall_ro(...args: [ fun: string | Buffer, numkeys: number | string, ...args: RedisValue[] ]): Result; /** * Removes all keys from all databases. * - _group_: server * - _complexity_: O(N) where N is the total number of keys in all databases * - _since_: 1.0.0 */ flushall(callback?: Callback<"OK">): Result<"OK", Context>; flushall(async: "ASYNC", callback?: Callback<"OK">): Result<"OK", Context>; flushall(sync: "SYNC", callback?: Callback<"OK">): Result<"OK", Context>; /** * Remove all keys from the current database. * - _group_: server * - _complexity_: O(N) where N is the number of keys in the selected database * - _since_: 1.0.0 */ flushdb(callback?: Callback<"OK">): Result<"OK", Context>; flushdb(async: "ASYNC", callback?: Callback<"OK">): Result<"OK", Context>; flushdb(sync: "SYNC", callback?: Callback<"OK">): Result<"OK", Context>; /** * Adds one or more members to a geospatial index. The key is created if it doesn't exist. * - _group_: geo * - _complexity_: O(log(N)) for each item added, where N is the number of elements in the sorted set. * - _since_: 3.2.0 */ geoadd(...args: [ key: RedisKey, ...data: (string | Buffer | number)[], callback: Callback ]): Result; geoadd(...args: [key: RedisKey, ...data: (string | Buffer | number)[]]): Result; geoadd(...args: [ key: RedisKey, ch: "CH", ...data: (string | Buffer | number)[], callback: Callback ]): Result; geoadd(...args: [key: RedisKey, ch: "CH", ...data: (string | Buffer | number)[]]): Result; geoadd(...args: [ key: RedisKey, nx: "NX", ...data: (string | Buffer | number)[], callback: Callback ]): Result; geoadd(...args: [key: RedisKey, nx: "NX", ...data: (string | Buffer | number)[]]): Result; geoadd(...args: [ key: RedisKey, nx: "NX", ch: "CH", ...data: (string | Buffer | number)[], callback: Callback ]): Result; geoadd(...args: [ key: RedisKey, nx: "NX", ch: "CH", ...data: (string | Buffer | number)[] ]): Result; geoadd(...args: [ key: RedisKey, xx: "XX", ...data: (string | Buffer | number)[], callback: Callback ]): Result; geoadd(...args: [key: RedisKey, xx: "XX", ...data: (string | Buffer | number)[]]): Result; geoadd(...args: [ key: RedisKey, xx: "XX", ch: "CH", ...data: (string | Buffer | number)[], callback: Callback ]): Result; geoadd(...args: [ key: RedisKey, xx: "XX", ch: "CH", ...data: (string | Buffer | number)[] ]): Result; /** * Returns the distance between two members of a geospatial index. * - _group_: geo * - _complexity_: O(1) * - _since_: 3.2.0 */ geodist(key: RedisKey, member1: string | Buffer | number, member2: string | Buffer | number, callback?: Callback): Result; geodistBuffer(key: RedisKey, member1: string | Buffer | number, member2: string | Buffer | number, callback?: Callback): Result; geodist(key: RedisKey, member1: string | Buffer | number, member2: string | Buffer | number, m: "M", callback?: Callback): Result; geodistBuffer(key: RedisKey, member1: string | Buffer | number, member2: string | Buffer | number, m: "M", callback?: Callback): Result; geodist(key: RedisKey, member1: string | Buffer | number, member2: string | Buffer | number, km: "KM", callback?: Callback): Result; geodistBuffer(key: RedisKey, member1: string | Buffer | number, member2: string | Buffer | number, km: "KM", callback?: Callback): Result; geodist(key: RedisKey, member1: string | Buffer | number, member2: string | Buffer | number, ft: "FT", callback?: Callback): Result; geodistBuffer(key: RedisKey, member1: string | Buffer | number, member2: string | Buffer | number, ft: "FT", callback?: Callback): Result; geodist(key: RedisKey, member1: string | Buffer | number, member2: string | Buffer | number, mi: "MI", callback?: Callback): Result; geodistBuffer(key: RedisKey, member1: string | Buffer | number, member2: string | Buffer | number, mi: "MI", callback?: Callback): Result; /** * Returns members from a geospatial index as geohash strings. * - _group_: geo * - _complexity_: O(1) for each member requested. * - _since_: 3.2.0 */ geohash(key: RedisKey, callback?: Callback): Result; geohashBuffer(key: RedisKey, callback?: Callback): Result; geohash(...args: [ key: RedisKey, ...members: (string | Buffer | number)[], callback: Callback ]): Result; geohashBuffer(...args: [ key: RedisKey, ...members: (string | Buffer | number)[], callback: Callback ]): Result; geohash(...args: [ key: RedisKey, members: (string | Buffer | number)[], callback: Callback ]): Result; geohashBuffer(...args: [ key: RedisKey, members: (string | Buffer | number)[], callback: Callback ]): Result; geohash(...args: [key: RedisKey, ...members: (string | Buffer | number)[]]): Result; geohashBuffer(...args: [key: RedisKey, ...members: (string | Buffer | number)[]]): Result; geohash(...args: [key: RedisKey, members: (string | Buffer | number)[]]): Result; geohashBuffer(...args: [key: RedisKey, members: (string | Buffer | number)[]]): Result; /** * Returns the longitude and latitude of members from a geospatial index. * - _group_: geo * - _complexity_: O(1) for each member requested. * - _since_: 3.2.0 */ geopos(key: RedisKey, callback?: Callback<([longitude: string, latitude: string] | null)[]>): Result<([longitude: string, latitude: string] | null)[], Context>; geopos(...args: [ key: RedisKey, ...members: (string | Buffer | number)[], callback: Callback<([longitude: string, latitude: string] | null)[]> ]): Result<([longitude: string, latitude: string] | null)[], Context>; geopos(...args: [ key: RedisKey, members: (string | Buffer | number)[], callback: Callback<([longitude: string, latitude: string] | null)[]> ]): Result<([longitude: string, latitude: string] | null)[], Context>; geopos(...args: [key: RedisKey, ...members: (string | Buffer | number)[]]): Result<([longitude: string, latitude: string] | null)[], Context>; geopos(...args: [key: RedisKey, members: (string | Buffer | number)[]]): Result<([longitude: string, latitude: string] | null)[], Context>; /** * Queries a geospatial index for members within a distance from a coordinate, optionally stores the result. * - _group_: geo * - _complexity_: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index. * - _since_: 3.2.0 */ georadius(...args: [ key: RedisKey, longitude: number | string, latitude: number | string, radius: number | string, ...args: RedisValue[], callback: Callback ]): Result; georadius(...args: [ key: RedisKey, longitude: number | string, latitude: number | string, radius: number | string, ...args: RedisValue[] ]): Result; /** * Returns members from a geospatial index that are within a distance from a coordinate. * - _group_: geo * - _complexity_: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index. * - _since_: 3.2.10 */ georadius_ro(...args: [ key: RedisKey, longitude: number | string, latitude: number | string, radius: number | string, ...args: RedisValue[], callback: Callback ]): Result; georadius_ro(...args: [ key: RedisKey, longitude: number | string, latitude: number | string, radius: number | string, ...args: RedisValue[] ]): Result; /** * Queries a geospatial index for members within a distance from a member, optionally stores the result. * - _group_: geo * - _complexity_: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index. * - _since_: 3.2.0 */ georadiusbymember(...args: [ key: RedisKey, member: string | Buffer | number, radius: number | string, ...args: RedisValue[], callback: Callback ]): Result; georadiusbymember(...args: [ key: RedisKey, member: string | Buffer | number, radius: number | string, ...args: RedisValue[] ]): Result; /** * Returns members from a geospatial index that are within a distance from a member. * - _group_: geo * - _complexity_: O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index. * - _since_: 3.2.10 */ georadiusbymember_ro(...args: [ key: RedisKey, member: string | Buffer | number, radius: number | string, ...args: RedisValue[], callback: Callback ]): Result; georadiusbymember_ro(...args: [ key: RedisKey, member: string | Buffer | number, radius: number | string, ...args: RedisValue[] ]): Result; /** * Queries a geospatial index for members inside an area of a box or a circle. * - _group_: geo * - _complexity_: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape * - _since_: 6.2.0 */ geosearch(...args: [ key: RedisKey, ...args: RedisValue[], callback: Callback ]): Result; geosearch(...args: [key: RedisKey, ...args: RedisValue[]]): Result; /** * Queries a geospatial index for members inside an area of a box or a circle, optionally stores the result. * - _group_: geo * - _complexity_: O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape * - _since_: 6.2.0 */ geosearchstore(...args: [ destination: RedisKey, source: RedisKey, ...args: RedisValue[], callback: Callback ]): Result; geosearchstore(...args: [destination: RedisKey, source: RedisKey, ...args: RedisValue[]]): Result; /** * Returns the string value of a key. * - _group_: string * - _complexity_: O(1) * - _since_: 1.0.0 */ get(key: RedisKey, callback?: Callback): Result; getBuffer(key: RedisKey, callback?: Callback): Result; /** * Returns a bit value by offset. * - _group_: bitmap * - _complexity_: O(1) * - _since_: 2.2.0 */ getbit(key: RedisKey, offset: number | string, callback?: Callback): Result; /** * Returns the string value of a key after deleting the key. * - _group_: string * - _complexity_: O(1) * - _since_: 6.2.0 */ getdel(key: RedisKey, callback?: Callback): Result; getdelBuffer(key: RedisKey, callback?: Callback): Result; /** * Returns the string value of a key after setting its expiration time. * - _group_: string * - _complexity_: O(1) * - _since_: 6.2.0 */ getex(key: RedisKey, callback?: Callback): Result; getexBuffer(key: RedisKey, callback?: Callback): Result; getex(key: RedisKey, secondsToken: "EX", seconds: number | string, callback?: Callback): Result; getexBuffer(key: RedisKey, secondsToken: "EX", seconds: number | string, callback?: Callback): Result; getex(key: RedisKey, millisecondsToken: "PX", milliseconds: number | string, callback?: Callback): Result; getexBuffer(key: RedisKey, millisecondsToken: "PX", milliseconds: number | string, callback?: Callback): Result; getex(key: RedisKey, unixTimeSecondsToken: "EXAT", unixTimeSeconds: number | string, callback?: Callback): Result; getexBuffer(key: RedisKey, unixTimeSecondsToken: "EXAT", unixTimeSeconds: number | string, callback?: Callback): Result; getex(key: RedisKey, unixTimeMillisecondsToken: "PXAT", unixTimeMilliseconds: number | string, callback?: Callback): Result; getexBuffer(key: RedisKey, unixTimeMillisecondsToken: "PXAT", unixTimeMilliseconds: number | string, callback?: Callback): Result; getex(key: RedisKey, persist: "PERSIST", callback?: Callback): Result; getexBuffer(key: RedisKey, persist: "PERSIST", callback?: Callback): Result; /** * Returns a substring of the string stored at a key. * - _group_: string * - _complexity_: O(N) where N is the length of the returned string. The complexity is ultimately determined by the returned length, but because creating a substring from an existing string is very cheap, it can be considered O(1) for small strings. * - _since_: 2.4.0 */ getrange(key: RedisKey, start: number | string, end: number | string, callback?: Callback): Result; getrangeBuffer(key: RedisKey, start: number | string, end: number | string, callback?: Callback): Result; /** * Returns the previous string value of a key after setting it to a new value. * - _group_: string * - _complexity_: O(1) * - _since_: 1.0.0 */ getset(key: RedisKey, value: string | Buffer | number, callback?: Callback): Result; getsetBuffer(key: RedisKey, value: string | Buffer | number, callback?: Callback): Result; /** * Deletes one or more fields and their values from a hash. Deletes the hash if no fields remain. * - _group_: hash * - _complexity_: O(N) where N is the number of fields to be removed. * - _since_: 2.0.0 */ hdel(...args: [ key: RedisKey, ...fields: (string | Buffer)[], callback: Callback ]): Result; hdel(...args: [key: RedisKey, ...fields: (string | Buffer)[]]): Result; /** * Handshakes with the server. * - _group_: connection * - _complexity_: O(1) * - _since_: 6.0.0 */ hello(callback?: Callback): Result; hello(protover: number | string, callback?: Callback): Result; hello(protover: number | string, clientnameToken: "SETNAME", clientname: string | Buffer, callback?: Callback): Result; hello(protover: number | string, authToken: "AUTH", username: string | Buffer, password: string | Buffer, callback?: Callback): Result; hello(protover: number | string, authToken: "AUTH", username: string | Buffer, password: string | Buffer, clientnameToken: "SETNAME", clientname: string | Buffer, callback?: Callback): Result; /** * Determines whether a field exists in a hash. * - _group_: hash * - _complexity_: O(1) * - _since_: 2.0.0 */ hexists(key: RedisKey, field: string | Buffer, callback?: Callback): Result; /** * Returns the value of a field in a hash. * - _group_: hash * - _complexity_: O(1) * - _since_: 2.0.0 */ hget(key: RedisKey, field: string | Buffer, callback?: Callback): Result; hgetBuffer(key: RedisKey, field: string | Buffer, callback?: Callback): Result; /** * Returns all fields and values in a hash. * - _group_: hash * - _complexity_: O(N) where N is the size of the hash. * - _since_: 2.0.0 */ hgetall(key: RedisKey, callback?: Callback>): Result, Context>; hgetallBuffer(key: RedisKey, callback?: Callback>): Result, Context>; /** * Increments the integer value of a field in a hash by a number. Uses 0 as initial value if the field doesn't exist. * - _group_: hash * - _complexity_: O(1) * - _since_: 2.0.0 */ hincrby(key: RedisKey, field: string | Buffer, increment: number | string, callback?: Callback): Result; /** * Increments the floating point value of a field by a number. Uses 0 as initial value if the field doesn't exist. * - _group_: hash * - _complexity_: O(1) * - _since_: 2.6.0 */ hincrbyfloat(key: RedisKey, field: string | Buffer, increment: number | string, callback?: Callback): Result; hincrbyfloatBuffer(key: RedisKey, field: string | Buffer, increment: number | string, callback?: Callback): Result; /** * Returns all fields in a hash. * - _group_: hash * - _complexity_: O(N) where N is the size of the hash. * - _since_: 2.0.0 */ hkeys(key: RedisKey, callback?: Callback): Result; hkeysBuffer(key: RedisKey, callback?: Callback): Result; /** * Returns the number of fields in a hash. * - _group_: hash * - _complexity_: O(1) * - _since_: 2.0.0 */ hlen(key: RedisKey, callback?: Callback): Result; /** * Returns the values of all fields in a hash. * - _group_: hash * - _complexity_: O(N) where N is the number of fields being requested. * - _since_: 2.0.0 */ hmget(...args: [ key: RedisKey, ...fields: (string | Buffer)[], callback: Callback<(string | null)[]> ]): Result<(string | null)[], Context>; hmgetBuffer(...args: [ key: RedisKey, ...fields: (string | Buffer)[], callback: Callback<(Buffer | null)[]> ]): Result<(Buffer | null)[], Context>; hmget(...args: [key: RedisKey, ...fields: (string | Buffer)[]]): Result<(string | null)[], Context>; hmgetBuffer(...args: [key: RedisKey, ...fields: (string | Buffer)[]]): Result<(Buffer | null)[], Context>; /** * Sets the values of multiple fields. * - _group_: hash * - _complexity_: O(N) where N is the number of fields being set. * - _since_: 2.0.0 */ hmset(key: RedisKey, object: object, callback?: Callback<"OK">): Result<"OK", Context>; hmset(key: RedisKey, map: Map, callback?: Callback<"OK">): Result<"OK", Context>; hmset(...args: [ key: RedisKey, ...data: (string | Buffer | number)[], callback: Callback<"OK"> ]): Result<"OK", Context>; hmset(...args: [key: RedisKey, ...data: (string | Buffer | number)[]]): Result<"OK", Context>; /** * Returns one or more random fields from a hash. * - _group_: hash * - _complexity_: O(N) where N is the number of fields returned * - _since_: 6.2.0 */ hrandfield(key: RedisKey, callback?: Callback): Result; hrandfieldBuffer(key: RedisKey, callback?: Callback): Result; hrandfield(key: RedisKey, count: number | string, callback?: Callback): Result; hrandfieldBuffer(key: RedisKey, count: number | string, callback?: Callback): Result; hrandfield(key: RedisKey, count: number | string, withvalues: "WITHVALUES", callback?: Callback): Result; hrandfieldBuffer(key: RedisKey, count: number | string, withvalues: "WITHVALUES", callback?: Callback): Result; /** * Iterates over fields and values of a hash. * - _group_: hash * - _complexity_: O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection. * - _since_: 2.8.0 */ hscan(key: RedisKey, cursor: number | string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; hscanBuffer(key: RedisKey, cursor: number | string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; hscan(key: RedisKey, cursor: number | string, novalues: "NOVALUES", callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; hscanBuffer(key: RedisKey, cursor: number | string, novalues: "NOVALUES", callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; hscan(key: RedisKey, cursor: number | string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; hscanBuffer(key: RedisKey, cursor: number | string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; hscan(key: RedisKey, cursor: number | string, countToken: "COUNT", count: number | string, novalues: "NOVALUES", callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; hscanBuffer(key: RedisKey, cursor: number | string, countToken: "COUNT", count: number | string, novalues: "NOVALUES", callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; hscan(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; hscanBuffer(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; hscan(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, novalues: "NOVALUES", callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; hscanBuffer(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, novalues: "NOVALUES", callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; hscan(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; hscanBuffer(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; hscan(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, novalues: "NOVALUES", callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; hscanBuffer(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, novalues: "NOVALUES", callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; /** * Creates or modifies the value of a field in a hash. * - _group_: hash * - _complexity_: O(1) for each field/value pair added, so O(N) to add N field/value pairs when the command is called with multiple field/value pairs. * - _since_: 2.0.0 */ hset(key: RedisKey, object: object, callback?: Callback): Result; hset(key: RedisKey, map: Map, callback?: Callback): Result; hset(...args: [ key: RedisKey, ...data: (string | Buffer | number)[], callback: Callback ]): Result; hset(...args: [key: RedisKey, ...data: (string | Buffer | number)[]]): Result; /** * Sets the value of a field in a hash only when the field doesn't exist. * - _group_: hash * - _complexity_: O(1) * - _since_: 2.0.0 */ hsetnx(key: RedisKey, field: string | Buffer, value: string | Buffer | number, callback?: Callback): Result; /** * Returns the length of the value of a field. * - _group_: hash * - _complexity_: O(1) * - _since_: 3.2.0 */ hstrlen(key: RedisKey, field: string | Buffer, callback?: Callback): Result; /** * Returns all values in a hash. * - _group_: hash * - _complexity_: O(N) where N is the size of the hash. * - _since_: 2.0.0 */ hvals(key: RedisKey, callback?: Callback): Result; hvalsBuffer(key: RedisKey, callback?: Callback): Result; /** * Increments the integer value of a key by one. Uses 0 as initial value if the key doesn't exist. * - _group_: string * - _complexity_: O(1) * - _since_: 1.0.0 */ incr(key: RedisKey, callback?: Callback): Result; /** * Increments the integer value of a key by a number. Uses 0 as initial value if the key doesn't exist. * - _group_: string * - _complexity_: O(1) * - _since_: 1.0.0 */ incrby(key: RedisKey, increment: number | string, callback?: Callback): Result; /** * Increment the floating point value of a key by a number. Uses 0 as initial value if the key doesn't exist. * - _group_: string * - _complexity_: O(1) * - _since_: 2.6.0 */ incrbyfloat(key: RedisKey, increment: number | string, callback?: Callback): Result; /** * Returns information and statistics about the server. * - _group_: server * - _complexity_: O(1) * - _since_: 1.0.0 */ info(callback?: Callback): Result; info(...args: [...sections: (string | Buffer)[], callback: Callback]): Result; info(...args: [...sections: (string | Buffer)[]]): Result; /** * Returns all key names that match a pattern. * - _group_: generic * - _complexity_: O(N) with N being the number of keys in the database, under the assumption that the key names in the database and the given pattern have limited length. * - _since_: 1.0.0 */ keys(pattern: string, callback?: Callback): Result; keysBuffer(pattern: string, callback?: Callback): Result; /** * Returns the Unix timestamp of the last successful save to disk. * - _group_: server * - _complexity_: O(1) * - _since_: 1.0.0 */ lastsave(callback?: Callback): Result; /** * Returns a human-readable latency analysis report. * - _group_: server * - _complexity_: O(1) * - _since_: 2.8.13 */ latency(subcommand: "DOCTOR", callback?: Callback): Result; /** * Returns a latency graph for an event. * - _group_: server * - _complexity_: O(1) * - _since_: 2.8.13 */ latency(subcommand: "GRAPH", event: string | Buffer, callback?: Callback): Result; /** * Returns helpful text about the different subcommands. * - _group_: server * - _complexity_: O(1) * - _since_: 2.8.13 */ latency(subcommand: "HELP", callback?: Callback): Result; /** * Returns the cumulative distribution of latencies of a subset or all commands. * - _group_: server * - _complexity_: O(N) where N is the number of commands with latency information being retrieved. * - _since_: 7.0.0 */ latency(subcommand: "HISTOGRAM", callback?: Callback): Result; latency(...args: [ subcommand: "HISTOGRAM", ...commands: (string | Buffer)[], callback: Callback ]): Result; latency(...args: [subcommand: "HISTOGRAM", ...commands: (string | Buffer)[]]): Result; /** * Returns timestamp-latency samples for an event. * - _group_: server * - _complexity_: O(1) * - _since_: 2.8.13 */ latency(subcommand: "HISTORY", event: string | Buffer, callback?: Callback): Result; /** * Returns the latest latency samples for all events. * - _group_: server * - _complexity_: O(1) * - _since_: 2.8.13 */ latency(subcommand: "LATEST", callback?: Callback): Result; /** * Resets the latency data for one or more events. * - _group_: server * - _complexity_: O(1) * - _since_: 2.8.13 */ latency(subcommand: "RESET", callback?: Callback): Result; latency(...args: [ subcommand: "RESET", ...events: (string | Buffer)[], callback: Callback ]): Result; latency(...args: [subcommand: "RESET", ...events: (string | Buffer)[]]): Result; /** * Finds the longest common substring. * - _group_: string * - _complexity_: O(N*M) where N and M are the lengths of s1 and s2, respectively * - _since_: 7.0.0 */ lcs(key1: RedisKey, key2: RedisKey, callback?: Callback): Result; lcs(key1: RedisKey, key2: RedisKey, withmatchlen: "WITHMATCHLEN", callback?: Callback): Result; lcs(key1: RedisKey, key2: RedisKey, minMatchLenToken: "MINMATCHLEN", minMatchLen: number | string, callback?: Callback): Result; lcs(key1: RedisKey, key2: RedisKey, minMatchLenToken: "MINMATCHLEN", minMatchLen: number | string, withmatchlen: "WITHMATCHLEN", callback?: Callback): Result; lcs(key1: RedisKey, key2: RedisKey, idx: "IDX", callback?: Callback): Result; lcs(key1: RedisKey, key2: RedisKey, idx: "IDX", withmatchlen: "WITHMATCHLEN", callback?: Callback): Result; lcs(key1: RedisKey, key2: RedisKey, idx: "IDX", minMatchLenToken: "MINMATCHLEN", minMatchLen: number | string, callback?: Callback): Result; lcs(key1: RedisKey, key2: RedisKey, idx: "IDX", minMatchLenToken: "MINMATCHLEN", minMatchLen: number | string, withmatchlen: "WITHMATCHLEN", callback?: Callback): Result; lcs(key1: RedisKey, key2: RedisKey, len: "LEN", callback?: Callback): Result; lcs(key1: RedisKey, key2: RedisKey, len: "LEN", withmatchlen: "WITHMATCHLEN", callback?: Callback): Result; lcs(key1: RedisKey, key2: RedisKey, len: "LEN", minMatchLenToken: "MINMATCHLEN", minMatchLen: number | string, callback?: Callback): Result; lcs(key1: RedisKey, key2: RedisKey, len: "LEN", minMatchLenToken: "MINMATCHLEN", minMatchLen: number | string, withmatchlen: "WITHMATCHLEN", callback?: Callback): Result; lcs(key1: RedisKey, key2: RedisKey, len: "LEN", idx: "IDX", callback?: Callback): Result; lcs(key1: RedisKey, key2: RedisKey, len: "LEN", idx: "IDX", withmatchlen: "WITHMATCHLEN", callback?: Callback): Result; lcs(key1: RedisKey, key2: RedisKey, len: "LEN", idx: "IDX", minMatchLenToken: "MINMATCHLEN", minMatchLen: number | string, callback?: Callback): Result; lcs(key1: RedisKey, key2: RedisKey, len: "LEN", idx: "IDX", minMatchLenToken: "MINMATCHLEN", minMatchLen: number | string, withmatchlen: "WITHMATCHLEN", callback?: Callback): Result; /** * Returns an element from a list by its index. * - _group_: list * - _complexity_: O(N) where N is the number of elements to traverse to get to the element at index. This makes asking for the first or the last element of the list O(1). * - _since_: 1.0.0 */ lindex(key: RedisKey, index: number | string, callback?: Callback): Result; lindexBuffer(key: RedisKey, index: number | string, callback?: Callback): Result; /** * Inserts an element before or after another element in a list. * - _group_: list * - _complexity_: O(N) where N is the number of elements to traverse before seeing the value pivot. This means that inserting somewhere on the left end on the list (head) can be considered O(1) and inserting somewhere on the right end (tail) is O(N). * - _since_: 2.2.0 */ linsert(key: RedisKey, before: "BEFORE", pivot: string | Buffer | number, element: string | Buffer | number, callback?: Callback): Result; linsert(key: RedisKey, after: "AFTER", pivot: string | Buffer | number, element: string | Buffer | number, callback?: Callback): Result; /** * Returns the length of a list. * - _group_: list * - _complexity_: O(1) * - _since_: 1.0.0 */ llen(key: RedisKey, callback?: Callback): Result; /** * Returns an element after popping it from one list and pushing it to another. Deletes the list if the last element was moved. * - _group_: list * - _complexity_: O(1) * - _since_: 6.2.0 */ lmove(source: RedisKey, destination: RedisKey, left: "LEFT", left1: "LEFT", callback?: Callback): Result; lmoveBuffer(source: RedisKey, destination: RedisKey, left: "LEFT", left1: "LEFT", callback?: Callback): Result; lmove(source: RedisKey, destination: RedisKey, left: "LEFT", right: "RIGHT", callback?: Callback): Result; lmoveBuffer(source: RedisKey, destination: RedisKey, left: "LEFT", right: "RIGHT", callback?: Callback): Result; lmove(source: RedisKey, destination: RedisKey, right: "RIGHT", left: "LEFT", callback?: Callback): Result; lmoveBuffer(source: RedisKey, destination: RedisKey, right: "RIGHT", left: "LEFT", callback?: Callback): Result; lmove(source: RedisKey, destination: RedisKey, right: "RIGHT", right1: "RIGHT", callback?: Callback): Result; lmoveBuffer(source: RedisKey, destination: RedisKey, right: "RIGHT", right1: "RIGHT", callback?: Callback): Result; /** * Returns multiple elements from a list after removing them. Deletes the list if the last element was popped. * - _group_: list * - _complexity_: O(N+M) where N is the number of provided keys and M is the number of elements returned. * - _since_: 7.0.0 */ lmpop(...args: [ numkeys: number | string, ...keys: RedisKey[], left: "LEFT", callback: Callback<[key: string, members: string[]] | null> ]): Result<[key: string, members: string[]] | null, Context>; lmpopBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], left: "LEFT", callback: Callback<[key: Buffer, members: Buffer[]] | null> ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; lmpop(...args: [ numkeys: number | string, keys: RedisKey[], left: "LEFT", callback: Callback<[key: string, members: string[]] | null> ]): Result<[key: string, members: string[]] | null, Context>; lmpopBuffer(...args: [ numkeys: number | string, keys: RedisKey[], left: "LEFT", callback: Callback<[key: Buffer, members: Buffer[]] | null> ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; lmpop(...args: [numkeys: number | string, ...keys: RedisKey[], left: "LEFT"]): Result<[key: string, members: string[]] | null, Context>; lmpopBuffer(...args: [numkeys: number | string, ...keys: RedisKey[], left: "LEFT"]): Result<[key: Buffer, members: Buffer[]] | null, Context>; lmpop(...args: [numkeys: number | string, keys: RedisKey[], left: "LEFT"]): Result<[key: string, members: string[]] | null, Context>; lmpopBuffer(...args: [numkeys: number | string, keys: RedisKey[], left: "LEFT"]): Result<[key: Buffer, members: Buffer[]] | null, Context>; lmpop(...args: [ numkeys: number | string, ...keys: RedisKey[], left: "LEFT", countToken: "COUNT", count: number | string, callback: Callback<[key: string, members: string[]] | null> ]): Result<[key: string, members: string[]] | null, Context>; lmpopBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], left: "LEFT", countToken: "COUNT", count: number | string, callback: Callback<[key: Buffer, members: Buffer[]] | null> ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; lmpop(...args: [ numkeys: number | string, keys: RedisKey[], left: "LEFT", countToken: "COUNT", count: number | string, callback: Callback<[key: string, members: string[]] | null> ]): Result<[key: string, members: string[]] | null, Context>; lmpopBuffer(...args: [ numkeys: number | string, keys: RedisKey[], left: "LEFT", countToken: "COUNT", count: number | string, callback: Callback<[key: Buffer, members: Buffer[]] | null> ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; lmpop(...args: [ numkeys: number | string, ...keys: RedisKey[], left: "LEFT", countToken: "COUNT", count: number | string ]): Result<[key: string, members: string[]] | null, Context>; lmpopBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], left: "LEFT", countToken: "COUNT", count: number | string ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; lmpop(...args: [ numkeys: number | string, keys: RedisKey[], left: "LEFT", countToken: "COUNT", count: number | string ]): Result<[key: string, members: string[]] | null, Context>; lmpopBuffer(...args: [ numkeys: number | string, keys: RedisKey[], left: "LEFT", countToken: "COUNT", count: number | string ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; lmpop(...args: [ numkeys: number | string, ...keys: RedisKey[], right: "RIGHT", callback: Callback<[key: string, members: string[]] | null> ]): Result<[key: string, members: string[]] | null, Context>; lmpopBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], right: "RIGHT", callback: Callback<[key: Buffer, members: Buffer[]] | null> ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; lmpop(...args: [ numkeys: number | string, keys: RedisKey[], right: "RIGHT", callback: Callback<[key: string, members: string[]] | null> ]): Result<[key: string, members: string[]] | null, Context>; lmpopBuffer(...args: [ numkeys: number | string, keys: RedisKey[], right: "RIGHT", callback: Callback<[key: Buffer, members: Buffer[]] | null> ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; lmpop(...args: [numkeys: number | string, ...keys: RedisKey[], right: "RIGHT"]): Result<[key: string, members: string[]] | null, Context>; lmpopBuffer(...args: [numkeys: number | string, ...keys: RedisKey[], right: "RIGHT"]): Result<[key: Buffer, members: Buffer[]] | null, Context>; lmpop(...args: [numkeys: number | string, keys: RedisKey[], right: "RIGHT"]): Result<[key: string, members: string[]] | null, Context>; lmpopBuffer(...args: [numkeys: number | string, keys: RedisKey[], right: "RIGHT"]): Result<[key: Buffer, members: Buffer[]] | null, Context>; lmpop(...args: [ numkeys: number | string, ...keys: RedisKey[], right: "RIGHT", countToken: "COUNT", count: number | string, callback: Callback<[key: string, members: string[]] | null> ]): Result<[key: string, members: string[]] | null, Context>; lmpopBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], right: "RIGHT", countToken: "COUNT", count: number | string, callback: Callback<[key: Buffer, members: Buffer[]] | null> ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; lmpop(...args: [ numkeys: number | string, keys: RedisKey[], right: "RIGHT", countToken: "COUNT", count: number | string, callback: Callback<[key: string, members: string[]] | null> ]): Result<[key: string, members: string[]] | null, Context>; lmpopBuffer(...args: [ numkeys: number | string, keys: RedisKey[], right: "RIGHT", countToken: "COUNT", count: number | string, callback: Callback<[key: Buffer, members: Buffer[]] | null> ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; lmpop(...args: [ numkeys: number | string, ...keys: RedisKey[], right: "RIGHT", countToken: "COUNT", count: number | string ]): Result<[key: string, members: string[]] | null, Context>; lmpopBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], right: "RIGHT", countToken: "COUNT", count: number | string ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; lmpop(...args: [ numkeys: number | string, keys: RedisKey[], right: "RIGHT", countToken: "COUNT", count: number | string ]): Result<[key: string, members: string[]] | null, Context>; lmpopBuffer(...args: [ numkeys: number | string, keys: RedisKey[], right: "RIGHT", countToken: "COUNT", count: number | string ]): Result<[key: Buffer, members: Buffer[]] | null, Context>; /** * Displays computer art and the server version * - _group_: server * - _complexity_: undefined * - _since_: 5.0.0 */ lolwut(callback?: Callback): Result; lolwut(versionToken: "VERSION", version: number | string, callback?: Callback): Result; /** * Returns the first elements in a list after removing it. Deletes the list if the last element was popped. * - _group_: list * - _complexity_: O(N) where N is the number of elements returned * - _since_: 1.0.0 */ lpop(key: RedisKey, callback?: Callback): Result; lpopBuffer(key: RedisKey, callback?: Callback): Result; lpop(key: RedisKey, count: number | string, callback?: Callback): Result; lpopBuffer(key: RedisKey, count: number | string, callback?: Callback): Result; /** * Returns the index of matching elements in a list. * - _group_: list * - _complexity_: O(N) where N is the number of elements in the list, for the average case. When searching for elements near the head or the tail of the list, or when the MAXLEN option is provided, the command may run in constant time. * - _since_: 6.0.6 */ lpos(key: RedisKey, element: string | Buffer | number, callback?: Callback): Result; lpos(key: RedisKey, element: string | Buffer | number, lenToken: "MAXLEN", len: number | string, callback?: Callback): Result; lpos(key: RedisKey, element: string | Buffer | number, numMatchesToken: "COUNT", numMatches: number | string, callback?: Callback): Result; lpos(key: RedisKey, element: string | Buffer | number, numMatchesToken: "COUNT", numMatches: number | string, lenToken: "MAXLEN", len: number | string, callback?: Callback): Result; lpos(key: RedisKey, element: string | Buffer | number, rankToken: "RANK", rank: number | string, callback?: Callback): Result; lpos(key: RedisKey, element: string | Buffer | number, rankToken: "RANK", rank: number | string, lenToken: "MAXLEN", len: number | string, callback?: Callback): Result; lpos(key: RedisKey, element: string | Buffer | number, rankToken: "RANK", rank: number | string, numMatchesToken: "COUNT", numMatches: number | string, callback?: Callback): Result; lpos(key: RedisKey, element: string | Buffer | number, rankToken: "RANK", rank: number | string, numMatchesToken: "COUNT", numMatches: number | string, lenToken: "MAXLEN", len: number | string, callback?: Callback): Result; /** * Prepends one or more elements to a list. Creates the key if it doesn't exist. * - _group_: list * - _complexity_: O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments. * - _since_: 1.0.0 */ lpush(...args: [ key: RedisKey, ...elements: (string | Buffer | number)[], callback: Callback ]): Result; lpush(...args: [key: RedisKey, ...elements: (string | Buffer | number)[]]): Result; /** * Prepends one or more elements to a list only when the list exists. * - _group_: list * - _complexity_: O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments. * - _since_: 2.2.0 */ lpushx(...args: [ key: RedisKey, ...elements: (string | Buffer | number)[], callback: Callback ]): Result; lpushx(...args: [key: RedisKey, ...elements: (string | Buffer | number)[]]): Result; /** * Returns a range of elements from a list. * - _group_: list * - _complexity_: O(S+N) where S is the distance of start offset from HEAD for small lists, from nearest end (HEAD or TAIL) for large lists; and N is the number of elements in the specified range. * - _since_: 1.0.0 */ lrange(key: RedisKey, start: number | string, stop: number | string, callback?: Callback): Result; lrangeBuffer(key: RedisKey, start: number | string, stop: number | string, callback?: Callback): Result; /** * Removes elements from a list. Deletes the list if the last element was removed. * - _group_: list * - _complexity_: O(N+M) where N is the length of the list and M is the number of elements removed. * - _since_: 1.0.0 */ lrem(key: RedisKey, count: number | string, element: string | Buffer | number, callback?: Callback): Result; /** * Sets the value of an element in a list by its index. * - _group_: list * - _complexity_: O(N) where N is the length of the list. Setting either the first or the last element of the list is O(1). * - _since_: 1.0.0 */ lset(key: RedisKey, index: number | string, element: string | Buffer | number, callback?: Callback<"OK">): Result<"OK", Context>; /** * Removes elements from both ends a list. Deletes the list if all elements were trimmed. * - _group_: list * - _complexity_: O(N) where N is the number of elements to be removed by the operation. * - _since_: 1.0.0 */ ltrim(key: RedisKey, start: number | string, stop: number | string, callback?: Callback<"OK">): Result<"OK", Context>; /** * Outputs a memory problems report. * - _group_: server * - _complexity_: O(1) * - _since_: 4.0.0 */ memory(subcommand: "DOCTOR", callback?: Callback): Result; /** * Returns helpful text about the different subcommands. * - _group_: server * - _complexity_: O(1) * - _since_: 4.0.0 */ memory(subcommand: "HELP", callback?: Callback): Result; /** * Returns the allocator statistics. * - _group_: server * - _complexity_: Depends on how much memory is allocated, could be slow * - _since_: 4.0.0 */ memory(subcommand: "MALLOC-STATS", callback?: Callback): Result; /** * Asks the allocator to release memory. * - _group_: server * - _complexity_: Depends on how much memory is allocated, could be slow * - _since_: 4.0.0 */ memory(subcommand: "PURGE", callback?: Callback<"OK">): Result<"OK", Context>; /** * Returns details about memory usage. * - _group_: server * - _complexity_: O(1) * - _since_: 4.0.0 */ memory(subcommand: "STATS", callback?: Callback): Result; /** * Estimates the memory usage of a key. * - _group_: server * - _complexity_: O(N) where N is the number of samples. * - _since_: 4.0.0 */ memory(subcommand: "USAGE", key: RedisKey, callback?: Callback): Result; memory(subcommand: "USAGE", key: RedisKey, countToken: "SAMPLES", count: number | string, callback?: Callback): Result; /** * Atomically returns the string values of one or more keys. * - _group_: string * - _complexity_: O(N) where N is the number of keys to retrieve. * - _since_: 1.0.0 */ mget(...args: [...keys: RedisKey[], callback: Callback<(string | null)[]>]): Result<(string | null)[], Context>; mgetBuffer(...args: [...keys: RedisKey[], callback: Callback<(Buffer | null)[]>]): Result<(Buffer | null)[], Context>; mget(...args: [keys: RedisKey[], callback: Callback<(string | null)[]>]): Result<(string | null)[], Context>; mgetBuffer(...args: [keys: RedisKey[], callback: Callback<(Buffer | null)[]>]): Result<(Buffer | null)[], Context>; mget(...args: [...keys: RedisKey[]]): Result<(string | null)[], Context>; mgetBuffer(...args: [...keys: RedisKey[]]): Result<(Buffer | null)[], Context>; mget(...args: [keys: RedisKey[]]): Result<(string | null)[], Context>; mgetBuffer(...args: [keys: RedisKey[]]): Result<(Buffer | null)[], Context>; /** * Atomically transfers a key from one instance to another. * - _group_: generic * - _complexity_: This command actually executes a DUMP+DEL in the source instance, and a RESTORE in the target instance. See the pages of these commands for time complexity. Also an O(N) data transfer between the two instances is performed. * - _since_: 2.6.0 */ migrate(host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, callback?: Callback<"OK">): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, keysToken: "KEYS", ...keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, keysToken: "KEYS", keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, keysToken: "KEYS", ...keys: RedisKey[] ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, keysToken: "KEYS", keys: RedisKey[] ]): Result<"OK", Context>; migrate(host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, authToken: "AUTH", auth: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[] ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", keys: RedisKey[] ]): Result<"OK", Context>; migrate(host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[] ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", keys: RedisKey[] ]): Result<"OK", Context>; migrate(host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, replace: "REPLACE", callback?: Callback<"OK">): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, replace: "REPLACE", keysToken: "KEYS", ...keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, replace: "REPLACE", keysToken: "KEYS", keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, replace: "REPLACE", keysToken: "KEYS", ...keys: RedisKey[] ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, replace: "REPLACE", keysToken: "KEYS", keys: RedisKey[] ]): Result<"OK", Context>; migrate(host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, replace: "REPLACE", authToken: "AUTH", auth: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, replace: "REPLACE", authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, replace: "REPLACE", authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, replace: "REPLACE", authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[] ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, replace: "REPLACE", authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", keys: RedisKey[] ]): Result<"OK", Context>; migrate(host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, replace: "REPLACE", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, replace: "REPLACE", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, replace: "REPLACE", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, replace: "REPLACE", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[] ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, replace: "REPLACE", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", keys: RedisKey[] ]): Result<"OK", Context>; migrate(host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", callback?: Callback<"OK">): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", keysToken: "KEYS", ...keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", keysToken: "KEYS", keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", keysToken: "KEYS", ...keys: RedisKey[] ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", keysToken: "KEYS", keys: RedisKey[] ]): Result<"OK", Context>; migrate(host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", authToken: "AUTH", auth: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[] ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", keys: RedisKey[] ]): Result<"OK", Context>; migrate(host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[] ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", keys: RedisKey[] ]): Result<"OK", Context>; migrate(host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", callback?: Callback<"OK">): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", keysToken: "KEYS", ...keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", keysToken: "KEYS", keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", keysToken: "KEYS", ...keys: RedisKey[] ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", keysToken: "KEYS", keys: RedisKey[] ]): Result<"OK", Context>; migrate(host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", authToken: "AUTH", auth: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[] ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", keys: RedisKey[] ]): Result<"OK", Context>; migrate(host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[] ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, key: RedisKey, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", keys: RedisKey[] ]): Result<"OK", Context>; migrate(host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, callback?: Callback<"OK">): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, keysToken: "KEYS", ...keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, keysToken: "KEYS", keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, keysToken: "KEYS", ...keys: RedisKey[] ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, keysToken: "KEYS", keys: RedisKey[] ]): Result<"OK", Context>; migrate(host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, authToken: "AUTH", auth: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[] ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", keys: RedisKey[] ]): Result<"OK", Context>; migrate(host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[] ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", keys: RedisKey[] ]): Result<"OK", Context>; migrate(host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, replace: "REPLACE", callback?: Callback<"OK">): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, replace: "REPLACE", keysToken: "KEYS", ...keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, replace: "REPLACE", keysToken: "KEYS", keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, replace: "REPLACE", keysToken: "KEYS", ...keys: RedisKey[] ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, replace: "REPLACE", keysToken: "KEYS", keys: RedisKey[] ]): Result<"OK", Context>; migrate(host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, replace: "REPLACE", authToken: "AUTH", auth: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, replace: "REPLACE", authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, replace: "REPLACE", authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, replace: "REPLACE", authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[] ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, replace: "REPLACE", authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", keys: RedisKey[] ]): Result<"OK", Context>; migrate(host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, replace: "REPLACE", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, replace: "REPLACE", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, replace: "REPLACE", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, replace: "REPLACE", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[] ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, replace: "REPLACE", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", keys: RedisKey[] ]): Result<"OK", Context>; migrate(host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", callback?: Callback<"OK">): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", keysToken: "KEYS", ...keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", keysToken: "KEYS", keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", keysToken: "KEYS", ...keys: RedisKey[] ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", keysToken: "KEYS", keys: RedisKey[] ]): Result<"OK", Context>; migrate(host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", authToken: "AUTH", auth: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[] ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", keys: RedisKey[] ]): Result<"OK", Context>; migrate(host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[] ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", keys: RedisKey[] ]): Result<"OK", Context>; migrate(host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", callback?: Callback<"OK">): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", keysToken: "KEYS", ...keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", keysToken: "KEYS", keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", keysToken: "KEYS", ...keys: RedisKey[] ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", keysToken: "KEYS", keys: RedisKey[] ]): Result<"OK", Context>; migrate(host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", authToken: "AUTH", auth: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[] ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", authToken: "AUTH", auth: string | Buffer, keysToken: "KEYS", keys: RedisKey[] ]): Result<"OK", Context>; migrate(host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, callback?: Callback<"OK">): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", keys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", ...keys: RedisKey[] ]): Result<"OK", Context>; migrate(...args: [ host: string | Buffer, port: number | string, destinationDb: number | string, timeout: number | string, copy: "COPY", replace: "REPLACE", auth2Token: "AUTH2", username: string | Buffer, password: string | Buffer, keysToken: "KEYS", keys: RedisKey[] ]): Result<"OK", Context>; /** * Returns helpful text about the different subcommands. * - _group_: server * - _complexity_: O(1) * - _since_: 5.0.0 */ module(subcommand: "HELP", callback?: Callback): Result; /** * Returns all loaded modules. * - _group_: server * - _complexity_: O(N) where N is the number of loaded modules. * - _since_: 4.0.0 */ module(subcommand: "LIST", callback?: Callback): Result; /** * Loads a module. * - _group_: server * - _complexity_: O(1) * - _since_: 4.0.0 */ module(subcommand: "LOAD", path: string | Buffer, callback?: Callback): Result; module(...args: [ subcommand: "LOAD", path: string | Buffer, ...args: (string | Buffer | number)[], callback: Callback ]): Result; module(...args: [ subcommand: "LOAD", path: string | Buffer, ...args: (string | Buffer | number)[] ]): Result; /** * Loads a module using extended parameters. * - _group_: server * - _complexity_: O(1) * - _since_: 7.0.0 */ module(subcommand: "LOADEX", path: string | Buffer, callback?: Callback): Result; module(...args: [ subcommand: "LOADEX", path: string | Buffer, argsToken: "ARGS", ...args: (string | Buffer | number)[], callback: Callback ]): Result; module(...args: [ subcommand: "LOADEX", path: string | Buffer, argsToken: "ARGS", ...args: (string | Buffer | number)[] ]): Result; module(...args: [ subcommand: "LOADEX", path: string | Buffer, configsToken: "CONFIG", ...configs: (string | Buffer | number)[], callback: Callback ]): Result; module(...args: [ subcommand: "LOADEX", path: string | Buffer, configsToken: "CONFIG", ...configs: (string | Buffer | number)[] ]): Result; module(...args: [ subcommand: "LOADEX", path: string | Buffer, configsToken: "CONFIG", ...args: RedisValue[], callback: Callback ]): Result; module(...args: [ subcommand: "LOADEX", path: string | Buffer, configsToken: "CONFIG", ...args: RedisValue[] ]): Result; /** * Unloads a module. * - _group_: server * - _complexity_: O(1) * - _since_: 4.0.0 */ module(subcommand: "UNLOAD", name: string | Buffer, callback?: Callback): Result; /** * Moves a key to another database. * - _group_: generic * - _complexity_: O(1) * - _since_: 1.0.0 */ move(key: RedisKey, db: number | string, callback?: Callback): Result; /** * Atomically creates or modifies the string values of one or more keys. * - _group_: string * - _complexity_: O(N) where N is the number of keys to set. * - _since_: 1.0.1 */ mset(object: object, callback?: Callback<"OK">): Result<"OK", Context>; mset(map: Map, callback?: Callback<"OK">): Result<"OK", Context>; mset(...args: [ ...data: (RedisKey | string | Buffer | number)[], callback: Callback<"OK"> ]): Result<"OK", Context>; mset(...args: [...data: (RedisKey | string | Buffer | number)[]]): Result<"OK", Context>; /** * Atomically modifies the string values of one or more keys only when all keys don't exist. * - _group_: string * - _complexity_: O(N) where N is the number of keys to set. * - _since_: 1.0.1 */ msetnx(object: object, callback?: Callback<"OK">): Result<"OK", Context>; msetnx(map: Map, callback?: Callback<"OK">): Result<"OK", Context>; msetnx(...args: [ ...data: (RedisKey | string | Buffer | number)[], callback: Callback ]): Result; msetnx(...args: [...data: (RedisKey | string | Buffer | number)[]]): Result; /** * Returns the internal encoding of an object. * - _group_: generic * - _complexity_: O(1) * - _since_: 2.2.3 */ object(subcommand: "ENCODING", key: RedisKey, callback?: Callback): Result; /** * Returns the logarithmic access frequency counter of an object. * - _group_: generic * - _complexity_: O(1) * - _since_: 4.0.0 */ object(subcommand: "FREQ", key: RedisKey, callback?: Callback): Result; /** * Returns helpful text about the different subcommands. * - _group_: generic * - _complexity_: O(1) * - _since_: 6.2.0 */ object(subcommand: "HELP", callback?: Callback): Result; /** * Returns the time since the last access to an object. * - _group_: generic * - _complexity_: O(1) * - _since_: 2.2.3 */ object(subcommand: "IDLETIME", key: RedisKey, callback?: Callback): Result; /** * Returns the reference count of a value of a key. * - _group_: generic * - _complexity_: O(1) * - _since_: 2.2.3 */ object(subcommand: "REFCOUNT", key: RedisKey, callback?: Callback): Result; /** * Removes the expiration time of a key. * - _group_: generic * - _complexity_: O(1) * - _since_: 2.2.0 */ persist(key: RedisKey, callback?: Callback): Result; /** * Sets the expiration time of a key in milliseconds. * - _group_: generic * - _complexity_: O(1) * - _since_: 2.6.0 */ pexpire(key: RedisKey, milliseconds: number | string, callback?: Callback): Result; pexpire(key: RedisKey, milliseconds: number | string, nx: "NX", callback?: Callback): Result; pexpire(key: RedisKey, milliseconds: number | string, xx: "XX", callback?: Callback): Result; pexpire(key: RedisKey, milliseconds: number | string, gt: "GT", callback?: Callback): Result; pexpire(key: RedisKey, milliseconds: number | string, lt: "LT", callback?: Callback): Result; /** * Sets the expiration time of a key to a Unix milliseconds timestamp. * - _group_: generic * - _complexity_: O(1) * - _since_: 2.6.0 */ pexpireat(key: RedisKey, unixTimeMilliseconds: number | string, callback?: Callback): Result; pexpireat(key: RedisKey, unixTimeMilliseconds: number | string, nx: "NX", callback?: Callback): Result; pexpireat(key: RedisKey, unixTimeMilliseconds: number | string, xx: "XX", callback?: Callback): Result; pexpireat(key: RedisKey, unixTimeMilliseconds: number | string, gt: "GT", callback?: Callback): Result; pexpireat(key: RedisKey, unixTimeMilliseconds: number | string, lt: "LT", callback?: Callback): Result; /** * Returns the expiration time of a key as a Unix milliseconds timestamp. * - _group_: generic * - _complexity_: O(1) * - _since_: 7.0.0 */ pexpiretime(key: RedisKey, callback?: Callback): Result; /** * Adds elements to a HyperLogLog key. Creates the key if it doesn't exist. * - _group_: hyperloglog * - _complexity_: O(1) to add every element. * - _since_: 2.8.9 */ pfadd(key: RedisKey, callback?: Callback): Result; pfadd(...args: [ key: RedisKey, ...elements: (string | Buffer | number)[], callback: Callback ]): Result; pfadd(...args: [key: RedisKey, ...elements: (string | Buffer | number)[]]): Result; /** * Returns the approximated cardinality of the set(s) observed by the HyperLogLog key(s). * - _group_: hyperloglog * - _complexity_: O(1) with a very small average constant time when called with a single key. O(N) with N being the number of keys, and much bigger constant times, when called with multiple keys. * - _since_: 2.8.9 */ pfcount(...args: [...keys: RedisKey[], callback: Callback]): Result; pfcount(...args: [keys: RedisKey[], callback: Callback]): Result; pfcount(...args: [...keys: RedisKey[]]): Result; pfcount(...args: [keys: RedisKey[]]): Result; /** * Internal commands for debugging HyperLogLog values. * - _group_: hyperloglog * - _complexity_: N/A * - _since_: 2.8.9 */ pfdebug(subcommand: string | Buffer, key: RedisKey, callback?: Callback): Result; /** * Merges one or more HyperLogLog values into a single key. * - _group_: hyperloglog * - _complexity_: O(N) to merge N HyperLogLogs, but with high constant times. * - _since_: 2.8.9 */ pfmerge(destkey: RedisKey, callback?: Callback<"OK">): Result<"OK", Context>; pfmerge(...args: [ destkey: RedisKey, ...sourcekeys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; pfmerge(...args: [ destkey: RedisKey, sourcekeys: RedisKey[], callback: Callback<"OK"> ]): Result<"OK", Context>; pfmerge(...args: [destkey: RedisKey, ...sourcekeys: RedisKey[]]): Result<"OK", Context>; pfmerge(...args: [destkey: RedisKey, sourcekeys: RedisKey[]]): Result<"OK", Context>; /** * An internal command for testing HyperLogLog values. * - _group_: hyperloglog * - _complexity_: N/A * - _since_: 2.8.9 */ pfselftest(callback?: Callback): Result; /** * Returns the server's liveliness response. * - _group_: connection * - _complexity_: O(1) * - _since_: 1.0.0 */ ping(callback?: Callback<"PONG">): Result<"PONG", Context>; ping(message: string | Buffer, callback?: Callback): Result; pingBuffer(message: string | Buffer, callback?: Callback): Result; /** * Sets both string value and expiration time in milliseconds of a key. The key is created if it doesn't exist. * - _group_: string * - _complexity_: O(1) * - _since_: 2.6.0 */ psetex(key: RedisKey, milliseconds: number | string, value: string | Buffer | number, callback?: Callback): Result; /** * Listens for messages published to channels that match one or more patterns. * - _group_: pubsub * - _complexity_: O(N) where N is the number of patterns to subscribe to. * - _since_: 2.0.0 */ psubscribe(...args: [...patterns: string[], callback: Callback]): Result; psubscribe(...args: [...patterns: string[]]): Result; /** * An internal command used in replication. * - _group_: server * - _complexity_: undefined * - _since_: 2.8.0 */ psync(replicationid: string | Buffer | number, offset: number | string, callback?: Callback): Result; /** * Returns the expiration time in milliseconds of a key. * - _group_: generic * - _complexity_: O(1) * - _since_: 2.6.0 */ pttl(key: RedisKey, callback?: Callback): Result; /** * Posts a message to a channel. * - _group_: pubsub * - _complexity_: O(N+M) where N is the number of clients subscribed to the receiving channel and M is the total number of subscribed patterns (by any client). * - _since_: 2.0.0 */ publish(channel: string | Buffer, message: string | Buffer, callback?: Callback): Result; /** * Returns the active channels. * - _group_: pubsub * - _complexity_: O(N) where N is the number of active channels, and assuming constant time pattern matching (relatively short channels and patterns) * - _since_: 2.8.0 */ pubsub(subcommand: "CHANNELS", callback?: Callback): Result; pubsub(subcommand: "CHANNELS", pattern: string, callback?: Callback): Result; /** * Returns helpful text about the different subcommands. * - _group_: pubsub * - _complexity_: O(1) * - _since_: 6.2.0 */ pubsub(subcommand: "HELP", callback?: Callback): Result; /** * Returns a count of unique pattern subscriptions. * - _group_: pubsub * - _complexity_: O(1) * - _since_: 2.8.0 */ pubsub(subcommand: "NUMPAT", callback?: Callback): Result; /** * Returns a count of subscribers to channels. * - _group_: pubsub * - _complexity_: O(N) for the NUMSUB subcommand, where N is the number of requested channels * - _since_: 2.8.0 */ pubsub(subcommand: "NUMSUB", callback?: Callback): Result; pubsub(...args: [ subcommand: "NUMSUB", ...channels: (string | Buffer)[], callback: Callback ]): Result; pubsub(...args: [subcommand: "NUMSUB", ...channels: (string | Buffer)[]]): Result; /** * Returns the active shard channels. * - _group_: pubsub * - _complexity_: O(N) where N is the number of active shard channels, and assuming constant time pattern matching (relatively short shard channels). * - _since_: 7.0.0 */ pubsub(subcommand: "SHARDCHANNELS", callback?: Callback): Result; pubsub(subcommand: "SHARDCHANNELS", pattern: string, callback?: Callback): Result; /** * Returns the count of subscribers of shard channels. * - _group_: pubsub * - _complexity_: O(N) for the SHARDNUMSUB subcommand, where N is the number of requested shard channels * - _since_: 7.0.0 */ pubsub(subcommand: "SHARDNUMSUB", callback?: Callback): Result; pubsub(...args: [ subcommand: "SHARDNUMSUB", ...shardchannels: (string | Buffer)[], callback: Callback ]): Result; pubsub(...args: [subcommand: "SHARDNUMSUB", ...shardchannels: (string | Buffer)[]]): Result; /** * Stops listening to messages published to channels that match one or more patterns. * - _group_: pubsub * - _complexity_: O(N) where N is the number of patterns to unsubscribe. * - _since_: 2.0.0 */ punsubscribe(callback?: Callback): Result; punsubscribe(...args: [...patterns: string[], callback: Callback]): Result; punsubscribe(...args: [...patterns: string[]]): Result; /** * Closes the connection. * - _group_: connection * - _complexity_: O(1) * - _since_: 1.0.0 */ quit(callback?: Callback<"OK">): Result<"OK", Context>; /** * Returns a random key name from the database. * - _group_: generic * - _complexity_: O(1) * - _since_: 1.0.0 */ randomkey(callback?: Callback): Result; randomkeyBuffer(callback?: Callback): Result; /** * Enables read-only queries for a connection to a Valkey replica node. * - _group_: cluster * - _complexity_: O(1) * - _since_: 3.0.0 */ readonly(callback?: Callback<"OK">): Result<"OK", Context>; /** * Enables read-write queries for a connection to a Valkey replica node. * - _group_: cluster * - _complexity_: O(1) * - _since_: 3.0.0 */ readwrite(callback?: Callback<"OK">): Result<"OK", Context>; /** * Renames a key and overwrites the destination. * - _group_: generic * - _complexity_: O(1) * - _since_: 1.0.0 */ rename(key: RedisKey, newkey: RedisKey, callback?: Callback<"OK">): Result<"OK", Context>; /** * Renames a key only when the target key name doesn't exist. * - _group_: generic * - _complexity_: O(1) * - _since_: 1.0.0 */ renamenx(key: RedisKey, newkey: RedisKey, callback?: Callback): Result; /** * An internal command for configuring the replication stream. * - _group_: server * - _complexity_: O(1) * - _since_: 3.0.0 */ replconf(callback?: Callback): Result; /** * Configures a server as replica of another, or promotes it to a primary. * - _group_: server * - _complexity_: O(1) * - _since_: 5.0.0 */ replicaof(host: string | Buffer, port: number | string, callback?: Callback<"OK">): Result<"OK", Context>; replicaof(no: "NO", one: "ONE", callback?: Callback<"OK">): Result<"OK", Context>; /** * Resets the connection. * - _group_: connection * - _complexity_: O(1) * - _since_: 6.2.0 */ reset(callback?: Callback<"OK">): Result<"OK", Context>; /** * Creates a key from the serialized representation of a value. * - _group_: generic * - _complexity_: O(1) to create the new key and additional O(N*M) to reconstruct the serialized value, where N is the number of objects composing the value and M their average size. For small string values the time complexity is thus O(1)+O(1*M) where M is small, so simply O(1). However for sorted set values the complexity is O(N*M*log(N)) because inserting values into sorted sets is O(log(N)). * - _since_: 2.6.0 */ restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, callback?: Callback<"OK">): Result<"OK", Context>; restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, frequencyToken: "FREQ", frequency: number | string, callback?: Callback<"OK">): Result<"OK", Context>; restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, secondsToken: "IDLETIME", seconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>; restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, secondsToken: "IDLETIME", seconds: number | string, frequencyToken: "FREQ", frequency: number | string, callback?: Callback<"OK">): Result<"OK", Context>; restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, absttl: "ABSTTL", callback?: Callback<"OK">): Result<"OK", Context>; restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, absttl: "ABSTTL", frequencyToken: "FREQ", frequency: number | string, callback?: Callback<"OK">): Result<"OK", Context>; restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, absttl: "ABSTTL", secondsToken: "IDLETIME", seconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>; restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, absttl: "ABSTTL", secondsToken: "IDLETIME", seconds: number | string, frequencyToken: "FREQ", frequency: number | string, callback?: Callback<"OK">): Result<"OK", Context>; restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", callback?: Callback<"OK">): Result<"OK", Context>; restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", frequencyToken: "FREQ", frequency: number | string, callback?: Callback<"OK">): Result<"OK", Context>; restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", secondsToken: "IDLETIME", seconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>; restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", secondsToken: "IDLETIME", seconds: number | string, frequencyToken: "FREQ", frequency: number | string, callback?: Callback<"OK">): Result<"OK", Context>; restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", absttl: "ABSTTL", callback?: Callback<"OK">): Result<"OK", Context>; restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", absttl: "ABSTTL", frequencyToken: "FREQ", frequency: number | string, callback?: Callback<"OK">): Result<"OK", Context>; restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", absttl: "ABSTTL", secondsToken: "IDLETIME", seconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>; restore(key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", absttl: "ABSTTL", secondsToken: "IDLETIME", seconds: number | string, frequencyToken: "FREQ", frequency: number | string, callback?: Callback<"OK">): Result<"OK", Context>; /** * An internal command for migrating keys in a cluster. * - _group_: server * - _complexity_: O(1) to create the new key and additional O(N*M) to reconstruct the serialized value, where N is the number of objects composing the value and M their average size. For small string values the time complexity is thus O(1)+O(1*M) where M is small, so simply O(1). However for sorted set values the complexity is O(N*M*log(N)) because inserting values into sorted sets is O(log(N)). * - _since_: 3.0.0 */ ["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, callback?: Callback): Result; ["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, frequencyToken: "FREQ", frequency: number | string, callback?: Callback): Result; ["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, secondsToken: "IDLETIME", seconds: number | string, callback?: Callback): Result; ["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, secondsToken: "IDLETIME", seconds: number | string, frequencyToken: "FREQ", frequency: number | string, callback?: Callback): Result; ["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, absttl: "ABSTTL", callback?: Callback): Result; ["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, absttl: "ABSTTL", frequencyToken: "FREQ", frequency: number | string, callback?: Callback): Result; ["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, absttl: "ABSTTL", secondsToken: "IDLETIME", seconds: number | string, callback?: Callback): Result; ["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, absttl: "ABSTTL", secondsToken: "IDLETIME", seconds: number | string, frequencyToken: "FREQ", frequency: number | string, callback?: Callback): Result; ["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", callback?: Callback): Result; ["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", frequencyToken: "FREQ", frequency: number | string, callback?: Callback): Result; ["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", secondsToken: "IDLETIME", seconds: number | string, callback?: Callback): Result; ["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", secondsToken: "IDLETIME", seconds: number | string, frequencyToken: "FREQ", frequency: number | string, callback?: Callback): Result; ["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", absttl: "ABSTTL", callback?: Callback): Result; ["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", absttl: "ABSTTL", frequencyToken: "FREQ", frequency: number | string, callback?: Callback): Result; ["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", absttl: "ABSTTL", secondsToken: "IDLETIME", seconds: number | string, callback?: Callback): Result; ["restore-asking"](key: RedisKey, ttl: number | string, serializedValue: string | Buffer | number, replace: "REPLACE", absttl: "ABSTTL", secondsToken: "IDLETIME", seconds: number | string, frequencyToken: "FREQ", frequency: number | string, callback?: Callback): Result; /** * Returns the replication role. * - _group_: server * - _complexity_: O(1) * - _since_: 2.8.12 */ role(callback?: Callback): Result; /** * Returns and removes the last elements of a list. Deletes the list if the last element was popped. * - _group_: list * - _complexity_: O(N) where N is the number of elements returned * - _since_: 1.0.0 */ rpop(key: RedisKey, callback?: Callback): Result; rpopBuffer(key: RedisKey, callback?: Callback): Result; rpop(key: RedisKey, count: number | string, callback?: Callback): Result; rpopBuffer(key: RedisKey, count: number | string, callback?: Callback): Result; /** * Returns the last element of a list after removing and pushing it to another list. Deletes the list if the last element was popped. * - _group_: list * - _complexity_: O(1) * - _since_: 1.2.0 */ rpoplpush(source: RedisKey, destination: RedisKey, callback?: Callback): Result; rpoplpushBuffer(source: RedisKey, destination: RedisKey, callback?: Callback): Result; /** * Appends one or more elements to a list. Creates the key if it doesn't exist. * - _group_: list * - _complexity_: O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments. * - _since_: 1.0.0 */ rpush(...args: [ key: RedisKey, ...elements: (string | Buffer | number)[], callback: Callback ]): Result; rpush(...args: [key: RedisKey, ...elements: (string | Buffer | number)[]]): Result; /** * Appends an element to a list only when the list exists. * - _group_: list * - _complexity_: O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments. * - _since_: 2.2.0 */ rpushx(...args: [ key: RedisKey, ...elements: (string | Buffer | number)[], callback: Callback ]): Result; rpushx(...args: [key: RedisKey, ...elements: (string | Buffer | number)[]]): Result; /** * Adds one or more members to a set. Creates the key if it doesn't exist. * - _group_: set * - _complexity_: O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments. * - _since_: 1.0.0 */ sadd(...args: [ key: RedisKey, ...members: (string | Buffer | number)[], callback: Callback ]): Result; sadd(...args: [ key: RedisKey, members: (string | Buffer | number)[], callback: Callback ]): Result; sadd(...args: [key: RedisKey, ...members: (string | Buffer | number)[]]): Result; sadd(...args: [key: RedisKey, members: (string | Buffer | number)[]]): Result; /** * Synchronously saves the database(s) to disk. * - _group_: server * - _complexity_: O(N) where N is the total number of keys in all databases * - _since_: 1.0.0 */ save(callback?: Callback<"OK">): Result<"OK", Context>; /** * Iterates over the key names in the database. * - _group_: generic * - _complexity_: O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection. * - _since_: 2.8.0 */ scan(cursor: number | string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; scanBuffer(cursor: number | string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; scan(cursor: number | string, typeToken: "TYPE", type: string | Buffer, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; scanBuffer(cursor: number | string, typeToken: "TYPE", type: string | Buffer, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; scan(cursor: number | string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; scanBuffer(cursor: number | string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; scan(cursor: number | string, countToken: "COUNT", count: number | string, typeToken: "TYPE", type: string | Buffer, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; scanBuffer(cursor: number | string, countToken: "COUNT", count: number | string, typeToken: "TYPE", type: string | Buffer, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; scan(cursor: number | string, patternToken: "MATCH", pattern: string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; scanBuffer(cursor: number | string, patternToken: "MATCH", pattern: string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; scan(cursor: number | string, patternToken: "MATCH", pattern: string, typeToken: "TYPE", type: string | Buffer, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; scanBuffer(cursor: number | string, patternToken: "MATCH", pattern: string, typeToken: "TYPE", type: string | Buffer, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; scan(cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; scanBuffer(cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; scan(cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, typeToken: "TYPE", type: string | Buffer, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; scanBuffer(cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, typeToken: "TYPE", type: string | Buffer, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; /** * Returns the number of members in a set. * - _group_: set * - _complexity_: O(1) * - _since_: 1.0.0 */ scard(key: RedisKey, callback?: Callback): Result; /** * Sets the debug mode of server-side Lua scripts. * - _group_: scripting * - _complexity_: O(1) * - _since_: 3.2.0 */ script(subcommand: "DEBUG", yes: "YES", callback?: Callback): Result; script(subcommand: "DEBUG", sync: "SYNC", callback?: Callback): Result; script(subcommand: "DEBUG", no: "NO", callback?: Callback): Result; /** * Determines whether server-side Lua scripts exist in the script cache. * - _group_: scripting * - _complexity_: O(N) with N being the number of scripts to check (so checking a single script is an O(1) operation). * - _since_: 2.6.0 */ script(...args: [ subcommand: "EXISTS", ...sha1s: (string | Buffer)[], callback: Callback ]): Result; script(...args: [subcommand: "EXISTS", ...sha1s: (string | Buffer)[]]): Result; /** * Removes all server-side Lua scripts from the script cache. * - _group_: scripting * - _complexity_: O(N) with N being the number of scripts in cache * - _since_: 2.6.0 */ script(subcommand: "FLUSH", callback?: Callback): Result; script(subcommand: "FLUSH", async: "ASYNC", callback?: Callback): Result; script(subcommand: "FLUSH", sync: "SYNC", callback?: Callback): Result; /** * Returns helpful text about the different subcommands. * - _group_: scripting * - _complexity_: O(1) * - _since_: 5.0.0 */ script(subcommand: "HELP", callback?: Callback): Result; /** * Terminates a server-side Lua script during execution. * - _group_: scripting * - _complexity_: O(1) * - _since_: 2.6.0 */ script(subcommand: "KILL", callback?: Callback): Result; /** * Loads a server-side Lua script to the script cache. * - _group_: scripting * - _complexity_: O(N) with N being the length in bytes of the script body. * - _since_: 2.6.0 */ script(subcommand: "LOAD", script: string | Buffer, callback?: Callback): Result; /** * Show server-side Lua script in the script cache. * - _group_: scripting * - _complexity_: O(1). * - _since_: 8.0.0 */ script(subcommand: "SHOW", sha1: string | Buffer, callback?: Callback): Result; /** * Returns the difference of multiple sets. * - _group_: set * - _complexity_: O(N) where N is the total number of elements in all given sets. * - _since_: 1.0.0 */ sdiff(...args: [...keys: RedisKey[], callback: Callback]): Result; sdiffBuffer(...args: [...keys: RedisKey[], callback: Callback]): Result; sdiff(...args: [keys: RedisKey[], callback: Callback]): Result; sdiffBuffer(...args: [keys: RedisKey[], callback: Callback]): Result; sdiff(...args: [...keys: RedisKey[]]): Result; sdiffBuffer(...args: [...keys: RedisKey[]]): Result; sdiff(...args: [keys: RedisKey[]]): Result; sdiffBuffer(...args: [keys: RedisKey[]]): Result; /** * Stores the difference of multiple sets in a key. * - _group_: set * - _complexity_: O(N) where N is the total number of elements in all given sets. * - _since_: 1.0.0 */ sdiffstore(...args: [ destination: RedisKey, ...keys: RedisKey[], callback: Callback ]): Result; sdiffstore(...args: [ destination: RedisKey, keys: RedisKey[], callback: Callback ]): Result; sdiffstore(...args: [destination: RedisKey, ...keys: RedisKey[]]): Result; sdiffstore(...args: [destination: RedisKey, keys: RedisKey[]]): Result; /** * Changes the selected database. * - _group_: connection * - _complexity_: O(1) * - _since_: 1.0.0 */ select(index: number | string, callback?: Callback<"OK">): Result<"OK", Context>; /** * Sets the string value of a key, ignoring its type. The key is created if it doesn't exist. * - _group_: string * - _complexity_: O(1) * - _since_: 1.0.0 */ set(key: RedisKey, value: string | Buffer | number, callback?: Callback<"OK">): Result<"OK", Context>; set(key: RedisKey, value: string | Buffer | number, get: "GET", callback?: Callback): Result; setBuffer(key: RedisKey, value: string | Buffer | number, get: "GET", callback?: Callback): Result; set(key: RedisKey, value: string | Buffer | number, nx: "NX", callback?: Callback<"OK" | null>): Result<"OK" | null, Context>; set(key: RedisKey, value: string | Buffer | number, nx: "NX", get: "GET", callback?: Callback): Result; setBuffer(key: RedisKey, value: string | Buffer | number, nx: "NX", get: "GET", callback?: Callback): Result; set(key: RedisKey, value: string | Buffer | number, xx: "XX", callback?: Callback<"OK" | null>): Result<"OK" | null, Context>; set(key: RedisKey, value: string | Buffer | number, xx: "XX", get: "GET", callback?: Callback): Result; setBuffer(key: RedisKey, value: string | Buffer | number, xx: "XX", get: "GET", callback?: Callback): Result; set(key: RedisKey, value: string | Buffer | number, secondsToken: "EX", seconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>; set(key: RedisKey, value: string | Buffer | number, secondsToken: "EX", seconds: number | string, get: "GET", callback?: Callback): Result; setBuffer(key: RedisKey, value: string | Buffer | number, secondsToken: "EX", seconds: number | string, get: "GET", callback?: Callback): Result; set(key: RedisKey, value: string | Buffer | number, secondsToken: "EX", seconds: number | string, nx: "NX", callback?: Callback<"OK" | null>): Result<"OK" | null, Context>; set(key: RedisKey, value: string | Buffer | number, secondsToken: "EX", seconds: number | string, nx: "NX", get: "GET", callback?: Callback): Result; setBuffer(key: RedisKey, value: string | Buffer | number, secondsToken: "EX", seconds: number | string, nx: "NX", get: "GET", callback?: Callback): Result; set(key: RedisKey, value: string | Buffer | number, secondsToken: "EX", seconds: number | string, xx: "XX", callback?: Callback<"OK" | null>): Result<"OK" | null, Context>; set(key: RedisKey, value: string | Buffer | number, secondsToken: "EX", seconds: number | string, xx: "XX", get: "GET", callback?: Callback): Result; setBuffer(key: RedisKey, value: string | Buffer | number, secondsToken: "EX", seconds: number | string, xx: "XX", get: "GET", callback?: Callback): Result; set(key: RedisKey, value: string | Buffer | number, millisecondsToken: "PX", milliseconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>; set(key: RedisKey, value: string | Buffer | number, millisecondsToken: "PX", milliseconds: number | string, get: "GET", callback?: Callback): Result; setBuffer(key: RedisKey, value: string | Buffer | number, millisecondsToken: "PX", milliseconds: number | string, get: "GET", callback?: Callback): Result; set(key: RedisKey, value: string | Buffer | number, millisecondsToken: "PX", milliseconds: number | string, nx: "NX", callback?: Callback<"OK" | null>): Result<"OK" | null, Context>; set(key: RedisKey, value: string | Buffer | number, millisecondsToken: "PX", milliseconds: number | string, nx: "NX", get: "GET", callback?: Callback): Result; setBuffer(key: RedisKey, value: string | Buffer | number, millisecondsToken: "PX", milliseconds: number | string, nx: "NX", get: "GET", callback?: Callback): Result; set(key: RedisKey, value: string | Buffer | number, millisecondsToken: "PX", milliseconds: number | string, xx: "XX", callback?: Callback<"OK" | null>): Result<"OK" | null, Context>; set(key: RedisKey, value: string | Buffer | number, millisecondsToken: "PX", milliseconds: number | string, xx: "XX", get: "GET", callback?: Callback): Result; setBuffer(key: RedisKey, value: string | Buffer | number, millisecondsToken: "PX", milliseconds: number | string, xx: "XX", get: "GET", callback?: Callback): Result; set(key: RedisKey, value: string | Buffer | number, unixTimeSecondsToken: "EXAT", unixTimeSeconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>; set(key: RedisKey, value: string | Buffer | number, unixTimeSecondsToken: "EXAT", unixTimeSeconds: number | string, get: "GET", callback?: Callback): Result; setBuffer(key: RedisKey, value: string | Buffer | number, unixTimeSecondsToken: "EXAT", unixTimeSeconds: number | string, get: "GET", callback?: Callback): Result; set(key: RedisKey, value: string | Buffer | number, unixTimeSecondsToken: "EXAT", unixTimeSeconds: number | string, nx: "NX", callback?: Callback<"OK" | null>): Result<"OK" | null, Context>; set(key: RedisKey, value: string | Buffer | number, unixTimeSecondsToken: "EXAT", unixTimeSeconds: number | string, nx: "NX", get: "GET", callback?: Callback): Result; setBuffer(key: RedisKey, value: string | Buffer | number, unixTimeSecondsToken: "EXAT", unixTimeSeconds: number | string, nx: "NX", get: "GET", callback?: Callback): Result; set(key: RedisKey, value: string | Buffer | number, unixTimeSecondsToken: "EXAT", unixTimeSeconds: number | string, xx: "XX", callback?: Callback<"OK" | null>): Result<"OK" | null, Context>; set(key: RedisKey, value: string | Buffer | number, unixTimeSecondsToken: "EXAT", unixTimeSeconds: number | string, xx: "XX", get: "GET", callback?: Callback): Result; setBuffer(key: RedisKey, value: string | Buffer | number, unixTimeSecondsToken: "EXAT", unixTimeSeconds: number | string, xx: "XX", get: "GET", callback?: Callback): Result; set(key: RedisKey, value: string | Buffer | number, unixTimeMillisecondsToken: "PXAT", unixTimeMilliseconds: number | string, callback?: Callback<"OK">): Result<"OK", Context>; set(key: RedisKey, value: string | Buffer | number, unixTimeMillisecondsToken: "PXAT", unixTimeMilliseconds: number | string, get: "GET", callback?: Callback): Result; setBuffer(key: RedisKey, value: string | Buffer | number, unixTimeMillisecondsToken: "PXAT", unixTimeMilliseconds: number | string, get: "GET", callback?: Callback): Result; set(key: RedisKey, value: string | Buffer | number, unixTimeMillisecondsToken: "PXAT", unixTimeMilliseconds: number | string, nx: "NX", callback?: Callback<"OK" | null>): Result<"OK" | null, Context>; set(key: RedisKey, value: string | Buffer | number, unixTimeMillisecondsToken: "PXAT", unixTimeMilliseconds: number | string, nx: "NX", get: "GET", callback?: Callback): Result; setBuffer(key: RedisKey, value: string | Buffer | number, unixTimeMillisecondsToken: "PXAT", unixTimeMilliseconds: number | string, nx: "NX", get: "GET", callback?: Callback): Result; set(key: RedisKey, value: string | Buffer | number, unixTimeMillisecondsToken: "PXAT", unixTimeMilliseconds: number | string, xx: "XX", callback?: Callback<"OK" | null>): Result<"OK" | null, Context>; set(key: RedisKey, value: string | Buffer | number, unixTimeMillisecondsToken: "PXAT", unixTimeMilliseconds: number | string, xx: "XX", get: "GET", callback?: Callback): Result; setBuffer(key: RedisKey, value: string | Buffer | number, unixTimeMillisecondsToken: "PXAT", unixTimeMilliseconds: number | string, xx: "XX", get: "GET", callback?: Callback): Result; set(key: RedisKey, value: string | Buffer | number, keepttl: "KEEPTTL", callback?: Callback<"OK">): Result<"OK", Context>; set(key: RedisKey, value: string | Buffer | number, keepttl: "KEEPTTL", get: "GET", callback?: Callback): Result; setBuffer(key: RedisKey, value: string | Buffer | number, keepttl: "KEEPTTL", get: "GET", callback?: Callback): Result; set(key: RedisKey, value: string | Buffer | number, keepttl: "KEEPTTL", nx: "NX", callback?: Callback<"OK" | null>): Result<"OK" | null, Context>; set(key: RedisKey, value: string | Buffer | number, keepttl: "KEEPTTL", nx: "NX", get: "GET", callback?: Callback): Result; setBuffer(key: RedisKey, value: string | Buffer | number, keepttl: "KEEPTTL", nx: "NX", get: "GET", callback?: Callback): Result; set(key: RedisKey, value: string | Buffer | number, keepttl: "KEEPTTL", xx: "XX", callback?: Callback<"OK" | null>): Result<"OK" | null, Context>; set(key: RedisKey, value: string | Buffer | number, keepttl: "KEEPTTL", xx: "XX", get: "GET", callback?: Callback): Result; setBuffer(key: RedisKey, value: string | Buffer | number, keepttl: "KEEPTTL", xx: "XX", get: "GET", callback?: Callback): Result; /** * Sets or clears the bit at offset of the string value. Creates the key if it doesn't exist. * - _group_: bitmap * - _complexity_: O(1) * - _since_: 2.2.0 */ setbit(key: RedisKey, offset: number | string, value: number | string, callback?: Callback): Result; /** * Sets the string value and expiration time of a key. Creates the key if it doesn't exist. * - _group_: string * - _complexity_: O(1) * - _since_: 2.0.0 */ setex(key: RedisKey, seconds: number | string, value: string | Buffer | number, callback?: Callback<"OK">): Result<"OK", Context>; /** * Set the string value of a key only when the key doesn't exist. * - _group_: string * - _complexity_: O(1) * - _since_: 1.0.0 */ setnx(key: RedisKey, value: string | Buffer | number, callback?: Callback): Result; /** * Overwrites a part of a string value with another by an offset. Creates the key if it doesn't exist. * - _group_: string * - _complexity_: O(1), not counting the time taken to copy the new string in place. Usually, this string is very small so the amortized complexity is O(1). Otherwise, complexity is O(M) with M being the length of the value argument. * - _since_: 2.2.0 */ setrange(key: RedisKey, offset: number | string, value: string | Buffer | number, callback?: Callback): Result; /** * Synchronously saves the database(s) to disk and shuts down the server. * - _group_: server * - _complexity_: O(N) when saving, where N is the total number of keys in all databases when saving data, otherwise O(1) * - _since_: 1.0.0 */ shutdown(callback?: Callback<"OK">): Result<"OK", Context>; shutdown(callback?: Callback<"OK">): Result<"OK", Context>; shutdown(force: "FORCE", callback?: Callback<"OK">): Result<"OK", Context>; shutdown(now: "NOW", callback?: Callback<"OK">): Result<"OK", Context>; shutdown(now: "NOW", force: "FORCE", callback?: Callback<"OK">): Result<"OK", Context>; shutdown(nosave: "NOSAVE", callback?: Callback<"OK">): Result<"OK", Context>; shutdown(nosave: "NOSAVE", force: "FORCE", callback?: Callback<"OK">): Result<"OK", Context>; shutdown(nosave: "NOSAVE", now: "NOW", callback?: Callback<"OK">): Result<"OK", Context>; shutdown(nosave: "NOSAVE", now: "NOW", force: "FORCE", callback?: Callback<"OK">): Result<"OK", Context>; shutdown(save: "SAVE", callback?: Callback<"OK">): Result<"OK", Context>; shutdown(save: "SAVE", force: "FORCE", callback?: Callback<"OK">): Result<"OK", Context>; shutdown(save: "SAVE", now: "NOW", callback?: Callback<"OK">): Result<"OK", Context>; shutdown(save: "SAVE", now: "NOW", force: "FORCE", callback?: Callback<"OK">): Result<"OK", Context>; shutdown(abort: "ABORT", callback?: Callback<"OK">): Result<"OK", Context>; /** * Returns the intersect of multiple sets. * - _group_: set * - _complexity_: O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets. * - _since_: 1.0.0 */ sinter(...args: [...keys: RedisKey[], callback: Callback]): Result; sinterBuffer(...args: [...keys: RedisKey[], callback: Callback]): Result; sinter(...args: [keys: RedisKey[], callback: Callback]): Result; sinterBuffer(...args: [keys: RedisKey[], callback: Callback]): Result; sinter(...args: [...keys: RedisKey[]]): Result; sinterBuffer(...args: [...keys: RedisKey[]]): Result; sinter(...args: [keys: RedisKey[]]): Result; sinterBuffer(...args: [keys: RedisKey[]]): Result; /** * Returns the number of members of the intersect of multiple sets. * - _group_: set * - _complexity_: O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets. * - _since_: 7.0.0 */ sintercard(...args: [ numkeys: number | string, ...keys: RedisKey[], callback: Callback ]): Result; sintercard(...args: [ numkeys: number | string, keys: RedisKey[], callback: Callback ]): Result; sintercard(...args: [numkeys: number | string, ...keys: RedisKey[]]): Result; sintercard(...args: [numkeys: number | string, keys: RedisKey[]]): Result; sintercard(...args: [ numkeys: number | string, ...keys: RedisKey[], limitToken: "LIMIT", limit: number | string, callback: Callback ]): Result; sintercard(...args: [ numkeys: number | string, keys: RedisKey[], limitToken: "LIMIT", limit: number | string, callback: Callback ]): Result; sintercard(...args: [ numkeys: number | string, ...keys: RedisKey[], limitToken: "LIMIT", limit: number | string ]): Result; sintercard(...args: [ numkeys: number | string, keys: RedisKey[], limitToken: "LIMIT", limit: number | string ]): Result; /** * Stores the intersect of multiple sets in a key. * - _group_: set * - _complexity_: O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets. * - _since_: 1.0.0 */ sinterstore(...args: [ destination: RedisKey, ...keys: RedisKey[], callback: Callback ]): Result; sinterstore(...args: [ destination: RedisKey, keys: RedisKey[], callback: Callback ]): Result; sinterstore(...args: [destination: RedisKey, ...keys: RedisKey[]]): Result; sinterstore(...args: [destination: RedisKey, keys: RedisKey[]]): Result; /** * Determines whether a member belongs to a set. * - _group_: set * - _complexity_: O(1) * - _since_: 1.0.0 */ sismember(key: RedisKey, member: string | Buffer | number, callback?: Callback): Result; /** * Sets a server as a replica of another, or promotes it to being a primary. * - _group_: server * - _complexity_: O(1) * - _since_: 1.0.0 */ slaveof(host: string | Buffer, port: number | string, callback?: Callback<"OK">): Result<"OK", Context>; slaveof(no: "NO", one: "ONE", callback?: Callback<"OK">): Result<"OK", Context>; /** * Returns the slow log's entries. * - _group_: server * - _complexity_: O(N) where N is the number of entries returned * - _since_: 2.2.12 */ slowlog(subcommand: "GET", callback?: Callback): Result; slowlog(subcommand: "GET", count: number | string, callback?: Callback): Result; /** * Show helpful text about the different subcommands * - _group_: server * - _complexity_: O(1) * - _since_: 6.2.0 */ slowlog(subcommand: "HELP", callback?: Callback): Result; /** * Returns the number of entries in the slow log. * - _group_: server * - _complexity_: O(1) * - _since_: 2.2.12 */ slowlog(subcommand: "LEN", callback?: Callback): Result; /** * Clears all entries from the slow log. * - _group_: server * - _complexity_: O(N) where N is the number of entries in the slowlog * - _since_: 2.2.12 */ slowlog(subcommand: "RESET", callback?: Callback): Result; /** * Returns all members of a set. * - _group_: set * - _complexity_: O(N) where N is the set cardinality. * - _since_: 1.0.0 */ smembers(key: RedisKey, callback?: Callback): Result; smembersBuffer(key: RedisKey, callback?: Callback): Result; /** * Determines whether multiple members belong to a set. * - _group_: set * - _complexity_: O(N) where N is the number of elements being checked for membership * - _since_: 6.2.0 */ smismember(...args: [ key: RedisKey, ...members: (string | Buffer | number)[], callback: Callback ]): Result; smismember(...args: [ key: RedisKey, members: (string | Buffer | number)[], callback: Callback ]): Result; smismember(...args: [key: RedisKey, ...members: (string | Buffer | number)[]]): Result; smismember(...args: [key: RedisKey, members: (string | Buffer | number)[]]): Result; /** * Moves a member from one set to another. * - _group_: set * - _complexity_: O(1) * - _since_: 1.0.0 */ smove(source: RedisKey, destination: RedisKey, member: string | Buffer | number, callback?: Callback): Result; /** * Sorts the elements in a list, a set, or a sorted set, optionally storing the result. * - _group_: generic * - _complexity_: O(N+M*log(M)) where N is the number of elements in the list or set to sort, and M the number of returned elements. When the elements are not sorted, complexity is O(N). * - _since_: 1.0.0 */ sort(...args: [key: RedisKey, ...args: RedisValue[], callback: Callback]): Result; sort(...args: [key: RedisKey, ...args: RedisValue[]]): Result; /** * Returns the sorted elements of a list, a set, or a sorted set. * - _group_: generic * - _complexity_: O(N+M*log(M)) where N is the number of elements in the list or set to sort, and M the number of returned elements. When the elements are not sorted, complexity is O(N). * - _since_: 7.0.0 */ sort_ro(key: RedisKey, callback?: Callback): Result; sort_ro(key: RedisKey, alpha: "ALPHA", callback?: Callback): Result; sort_ro(key: RedisKey, asc: "ASC", callback?: Callback): Result; sort_ro(key: RedisKey, asc: "ASC", alpha: "ALPHA", callback?: Callback): Result; sort_ro(key: RedisKey, desc: "DESC", callback?: Callback): Result; sort_ro(key: RedisKey, desc: "DESC", alpha: "ALPHA", callback?: Callback): Result; sort_ro(...args: [ key: RedisKey, getPatternToken: "GET", ...getPatterns: string[], callback: Callback ]): Result; sort_ro(...args: [key: RedisKey, getPatternToken: "GET", ...getPatterns: string[]]): Result; sort_ro(...args: [ key: RedisKey, getPatternToken: "GET", ...getPatterns: string[], alpha: "ALPHA", callback: Callback ]): Result; sort_ro(...args: [ key: RedisKey, getPatternToken: "GET", ...getPatterns: string[], alpha: "ALPHA" ]): Result; sort_ro(...args: [ key: RedisKey, getPatternToken: "GET", ...getPatterns: string[], asc: "ASC", callback: Callback ]): Result; sort_ro(...args: [ key: RedisKey, getPatternToken: "GET", ...getPatterns: string[], asc: "ASC" ]): Result; sort_ro(...args: [ key: RedisKey, getPatternToken: "GET", ...getPatterns: string[], asc: "ASC", alpha: "ALPHA", callback: Callback ]): Result; sort_ro(...args: [ key: RedisKey, getPatternToken: "GET", ...getPatterns: string[], asc: "ASC", alpha: "ALPHA" ]): Result; sort_ro(...args: [ key: RedisKey, getPatternToken: "GET", ...getPatterns: string[], desc: "DESC", callback: Callback ]): Result; sort_ro(...args: [ key: RedisKey, getPatternToken: "GET", ...getPatterns: string[], desc: "DESC" ]): Result; sort_ro(...args: [ key: RedisKey, getPatternToken: "GET", ...getPatterns: string[], desc: "DESC", alpha: "ALPHA", callback: Callback ]): Result; sort_ro(...args: [ key: RedisKey, getPatternToken: "GET", ...getPatterns: string[], desc: "DESC", alpha: "ALPHA" ]): Result; sort_ro(key: RedisKey, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; sort_ro(key: RedisKey, limitToken: "LIMIT", offset: number | string, count: number | string, alpha: "ALPHA", callback?: Callback): Result; sort_ro(key: RedisKey, limitToken: "LIMIT", offset: number | string, count: number | string, asc: "ASC", callback?: Callback): Result; sort_ro(key: RedisKey, limitToken: "LIMIT", offset: number | string, count: number | string, asc: "ASC", alpha: "ALPHA", callback?: Callback): Result; sort_ro(key: RedisKey, limitToken: "LIMIT", offset: number | string, count: number | string, desc: "DESC", callback?: Callback): Result; sort_ro(key: RedisKey, limitToken: "LIMIT", offset: number | string, count: number | string, desc: "DESC", alpha: "ALPHA", callback?: Callback): Result; sort_ro(...args: [ key: RedisKey, limitToken: "LIMIT", offset: number | string, count: number | string, getPatternToken: "GET", ...getPatterns: string[], callback: Callback ]): Result; sort_ro(...args: [ key: RedisKey, limitToken: "LIMIT", offset: number | string, count: number | string, getPatternToken: "GET", ...getPatterns: string[] ]): Result; sort_ro(...args: [ key: RedisKey, limitToken: "LIMIT", offset: number | string, count: number | string, getPatternToken: "GET", ...getPatterns: string[], alpha: "ALPHA", callback: Callback ]): Result; sort_ro(...args: [ key: RedisKey, limitToken: "LIMIT", offset: number | string, count: number | string, getPatternToken: "GET", ...getPatterns: string[], alpha: "ALPHA" ]): Result; sort_ro(...args: [ key: RedisKey, limitToken: "LIMIT", offset: number | string, count: number | string, getPatternToken: "GET", ...getPatterns: string[], asc: "ASC", callback: Callback ]): Result; sort_ro(...args: [ key: RedisKey, limitToken: "LIMIT", offset: number | string, count: number | string, getPatternToken: "GET", ...getPatterns: string[], asc: "ASC" ]): Result; sort_ro(...args: [ key: RedisKey, limitToken: "LIMIT", offset: number | string, count: number | string, getPatternToken: "GET", ...getPatterns: string[], asc: "ASC", alpha: "ALPHA", callback: Callback ]): Result; sort_ro(...args: [ key: RedisKey, limitToken: "LIMIT", offset: number | string, count: number | string, getPatternToken: "GET", ...getPatterns: string[], asc: "ASC", alpha: "ALPHA" ]): Result; sort_ro(...args: [ key: RedisKey, limitToken: "LIMIT", offset: number | string, count: number | string, getPatternToken: "GET", ...getPatterns: string[], desc: "DESC", callback: Callback ]): Result; sort_ro(...args: [ key: RedisKey, limitToken: "LIMIT", offset: number | string, count: number | string, getPatternToken: "GET", ...getPatterns: string[], desc: "DESC" ]): Result; sort_ro(...args: [ key: RedisKey, limitToken: "LIMIT", offset: number | string, count: number | string, getPatternToken: "GET", ...getPatterns: string[], desc: "DESC", alpha: "ALPHA", callback: Callback ]): Result; sort_ro(...args: [ key: RedisKey, limitToken: "LIMIT", offset: number | string, count: number | string, getPatternToken: "GET", ...getPatterns: string[], desc: "DESC", alpha: "ALPHA" ]): Result; sort_ro(key: RedisKey, byPatternToken: "BY", byPattern: string, callback?: Callback): Result; sort_ro(key: RedisKey, byPatternToken: "BY", byPattern: string, alpha: "ALPHA", callback?: Callback): Result; sort_ro(key: RedisKey, byPatternToken: "BY", byPattern: string, asc: "ASC", callback?: Callback): Result; sort_ro(key: RedisKey, byPatternToken: "BY", byPattern: string, asc: "ASC", alpha: "ALPHA", callback?: Callback): Result; sort_ro(key: RedisKey, byPatternToken: "BY", byPattern: string, desc: "DESC", callback?: Callback): Result; sort_ro(key: RedisKey, byPatternToken: "BY", byPattern: string, desc: "DESC", alpha: "ALPHA", callback?: Callback): Result; sort_ro(...args: [ key: RedisKey, byPatternToken: "BY", byPattern: string, getPatternToken: "GET", ...getPatterns: string[], callback: Callback ]): Result; sort_ro(...args: [ key: RedisKey, byPatternToken: "BY", byPattern: string, getPatternToken: "GET", ...getPatterns: string[] ]): Result; sort_ro(...args: [ key: RedisKey, byPatternToken: "BY", byPattern: string, getPatternToken: "GET", ...getPatterns: string[], alpha: "ALPHA", callback: Callback ]): Result; sort_ro(...args: [ key: RedisKey, byPatternToken: "BY", byPattern: string, getPatternToken: "GET", ...getPatterns: string[], alpha: "ALPHA" ]): Result; sort_ro(...args: [ key: RedisKey, byPatternToken: "BY", byPattern: string, getPatternToken: "GET", ...getPatterns: string[], asc: "ASC", callback: Callback ]): Result; sort_ro(...args: [ key: RedisKey, byPatternToken: "BY", byPattern: string, getPatternToken: "GET", ...getPatterns: string[], asc: "ASC" ]): Result; sort_ro(...args: [ key: RedisKey, byPatternToken: "BY", byPattern: string, getPatternToken: "GET", ...getPatterns: string[], asc: "ASC", alpha: "ALPHA", callback: Callback ]): Result; sort_ro(...args: [ key: RedisKey, byPatternToken: "BY", byPattern: string, getPatternToken: "GET", ...getPatterns: string[], asc: "ASC", alpha: "ALPHA" ]): Result; sort_ro(...args: [ key: RedisKey, byPatternToken: "BY", byPattern: string, getPatternToken: "GET", ...getPatterns: string[], desc: "DESC", callback: Callback ]): Result; sort_ro(...args: [ key: RedisKey, byPatternToken: "BY", byPattern: string, getPatternToken: "GET", ...getPatterns: string[], desc: "DESC" ]): Result; sort_ro(...args: [ key: RedisKey, byPatternToken: "BY", byPattern: string, getPatternToken: "GET", ...getPatterns: string[], desc: "DESC", alpha: "ALPHA", callback: Callback ]): Result; sort_ro(...args: [ key: RedisKey, byPatternToken: "BY", byPattern: string, getPatternToken: "GET", ...getPatterns: string[], desc: "DESC", alpha: "ALPHA" ]): Result; sort_ro(key: RedisKey, byPatternToken: "BY", byPattern: string, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; sort_ro(key: RedisKey, byPatternToken: "BY", byPattern: string, limitToken: "LIMIT", offset: number | string, count: number | string, alpha: "ALPHA", callback?: Callback): Result; sort_ro(key: RedisKey, byPatternToken: "BY", byPattern: string, limitToken: "LIMIT", offset: number | string, count: number | string, asc: "ASC", callback?: Callback): Result; sort_ro(key: RedisKey, byPatternToken: "BY", byPattern: string, limitToken: "LIMIT", offset: number | string, count: number | string, asc: "ASC", alpha: "ALPHA", callback?: Callback): Result; sort_ro(key: RedisKey, byPatternToken: "BY", byPattern: string, limitToken: "LIMIT", offset: number | string, count: number | string, desc: "DESC", callback?: Callback): Result; sort_ro(key: RedisKey, byPatternToken: "BY", byPattern: string, limitToken: "LIMIT", offset: number | string, count: number | string, desc: "DESC", alpha: "ALPHA", callback?: Callback): Result; sort_ro(...args: [ key: RedisKey, byPatternToken: "BY", byPattern: string, limitToken: "LIMIT", offset: number | string, count: number | string, getPatternToken: "GET", ...getPatterns: string[], callback: Callback ]): Result; sort_ro(...args: [ key: RedisKey, byPatternToken: "BY", byPattern: string, limitToken: "LIMIT", offset: number | string, count: number | string, getPatternToken: "GET", ...getPatterns: string[] ]): Result; sort_ro(...args: [ key: RedisKey, byPatternToken: "BY", byPattern: string, limitToken: "LIMIT", offset: number | string, count: number | string, getPatternToken: "GET", ...getPatterns: string[], alpha: "ALPHA", callback: Callback ]): Result; sort_ro(...args: [ key: RedisKey, byPatternToken: "BY", byPattern: string, limitToken: "LIMIT", offset: number | string, count: number | string, getPatternToken: "GET", ...getPatterns: string[], alpha: "ALPHA" ]): Result; sort_ro(...args: [ key: RedisKey, byPatternToken: "BY", byPattern: string, limitToken: "LIMIT", offset: number | string, count: number | string, getPatternToken: "GET", ...getPatterns: string[], asc: "ASC", callback: Callback ]): Result; sort_ro(...args: [ key: RedisKey, byPatternToken: "BY", byPattern: string, limitToken: "LIMIT", offset: number | string, count: number | string, getPatternToken: "GET", ...getPatterns: string[], asc: "ASC" ]): Result; sort_ro(...args: [ key: RedisKey, byPatternToken: "BY", byPattern: string, limitToken: "LIMIT", offset: number | string, count: number | string, getPatternToken: "GET", ...getPatterns: string[], asc: "ASC", alpha: "ALPHA", callback: Callback ]): Result; sort_ro(...args: [ key: RedisKey, byPatternToken: "BY", byPattern: string, limitToken: "LIMIT", offset: number | string, count: number | string, getPatternToken: "GET", ...getPatterns: string[], asc: "ASC", alpha: "ALPHA" ]): Result; sort_ro(...args: [ key: RedisKey, byPatternToken: "BY", byPattern: string, limitToken: "LIMIT", offset: number | string, count: number | string, getPatternToken: "GET", ...getPatterns: string[], desc: "DESC", callback: Callback ]): Result; sort_ro(...args: [ key: RedisKey, byPatternToken: "BY", byPattern: string, limitToken: "LIMIT", offset: number | string, count: number | string, getPatternToken: "GET", ...getPatterns: string[], desc: "DESC" ]): Result; sort_ro(...args: [ key: RedisKey, byPatternToken: "BY", byPattern: string, limitToken: "LIMIT", offset: number | string, count: number | string, getPatternToken: "GET", ...getPatterns: string[], desc: "DESC", alpha: "ALPHA", callback: Callback ]): Result; sort_ro(...args: [ key: RedisKey, byPatternToken: "BY", byPattern: string, limitToken: "LIMIT", offset: number | string, count: number | string, getPatternToken: "GET", ...getPatterns: string[], desc: "DESC", alpha: "ALPHA" ]): Result; /** * Returns one or more random members from a set after removing them. Deletes the set if the last member was popped. * - _group_: set * - _complexity_: Without the count argument O(1), otherwise O(N) where N is the value of the passed count. * - _since_: 1.0.0 */ spop(key: RedisKey, callback?: Callback): Result; spopBuffer(key: RedisKey, callback?: Callback): Result; spop(key: RedisKey, count: number | string, callback?: Callback): Result; spopBuffer(key: RedisKey, count: number | string, callback?: Callback): Result; /** * Post a message to a shard channel * - _group_: pubsub * - _complexity_: O(N) where N is the number of clients subscribed to the receiving shard channel. * - _since_: 7.0.0 */ spublish(shardchannel: string | Buffer, message: string | Buffer, callback?: Callback): Result; /** * Get one or multiple random members from a set * - _group_: set * - _complexity_: Without the count argument O(1), otherwise O(N) where N is the absolute value of the passed count. * - _since_: 1.0.0 */ srandmember(key: RedisKey, callback?: Callback): Result; srandmemberBuffer(key: RedisKey, callback?: Callback): Result; srandmember(key: RedisKey, count: number | string, callback?: Callback): Result; srandmemberBuffer(key: RedisKey, count: number | string, callback?: Callback): Result; /** * Removes one or more members from a set. Deletes the set if the last member was removed. * - _group_: set * - _complexity_: O(N) where N is the number of members to be removed. * - _since_: 1.0.0 */ srem(...args: [ key: RedisKey, ...members: (string | Buffer | number)[], callback: Callback ]): Result; srem(...args: [ key: RedisKey, members: (string | Buffer | number)[], callback: Callback ]): Result; srem(...args: [key: RedisKey, ...members: (string | Buffer | number)[]]): Result; srem(...args: [key: RedisKey, members: (string | Buffer | number)[]]): Result; /** * Iterates over members of a set. * - _group_: set * - _complexity_: O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection. * - _since_: 2.8.0 */ sscan(key: RedisKey, cursor: number | string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; sscanBuffer(key: RedisKey, cursor: number | string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; sscan(key: RedisKey, cursor: number | string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; sscanBuffer(key: RedisKey, cursor: number | string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; sscan(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; sscanBuffer(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; sscan(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; sscanBuffer(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; /** * Listens for messages published to shard channels. * - _group_: pubsub * - _complexity_: O(N) where N is the number of shard channels to subscribe to. * - _since_: 7.0.0 */ ssubscribe(...args: [ ...shardchannels: (string | Buffer)[], callback: Callback ]): Result; ssubscribe(...args: [...shardchannels: (string | Buffer)[]]): Result; /** * Returns the length of a string value. * - _group_: string * - _complexity_: O(1) * - _since_: 2.2.0 */ strlen(key: RedisKey, callback?: Callback): Result; /** * Listens for messages published to channels. * - _group_: pubsub * - _complexity_: O(N) where N is the number of channels to subscribe to. * - _since_: 2.0.0 */ subscribe(...args: [...channels: (string | Buffer)[], callback: Callback]): Result; subscribe(...args: [...channels: (string | Buffer)[]]): Result; /** * Returns a substring from a string value. * - _group_: string * - _complexity_: O(N) where N is the length of the returned string. The complexity is ultimately determined by the returned length, but because creating a substring from an existing string is very cheap, it can be considered O(1) for small strings. * - _since_: 1.0.0 */ substr(key: RedisKey, start: number | string, end: number | string, callback?: Callback): Result; /** * Returns the union of multiple sets. * - _group_: set * - _complexity_: O(N) where N is the total number of elements in all given sets. * - _since_: 1.0.0 */ sunion(...args: [...keys: RedisKey[], callback: Callback]): Result; sunionBuffer(...args: [...keys: RedisKey[], callback: Callback]): Result; sunion(...args: [keys: RedisKey[], callback: Callback]): Result; sunionBuffer(...args: [keys: RedisKey[], callback: Callback]): Result; sunion(...args: [...keys: RedisKey[]]): Result; sunionBuffer(...args: [...keys: RedisKey[]]): Result; sunion(...args: [keys: RedisKey[]]): Result; sunionBuffer(...args: [keys: RedisKey[]]): Result; /** * Stores the union of multiple sets in a key. * - _group_: set * - _complexity_: O(N) where N is the total number of elements in all given sets. * - _since_: 1.0.0 */ sunionstore(...args: [ destination: RedisKey, ...keys: RedisKey[], callback: Callback ]): Result; sunionstore(...args: [ destination: RedisKey, keys: RedisKey[], callback: Callback ]): Result; sunionstore(...args: [destination: RedisKey, ...keys: RedisKey[]]): Result; sunionstore(...args: [destination: RedisKey, keys: RedisKey[]]): Result; /** * Stops listening to messages posted to shard channels. * - _group_: pubsub * - _complexity_: O(N) where N is the number of shard channels to unsubscribe. * - _since_: 7.0.0 */ sunsubscribe(callback?: Callback): Result; sunsubscribe(...args: [ ...shardchannels: (string | Buffer)[], callback: Callback ]): Result; sunsubscribe(...args: [...shardchannels: (string | Buffer)[]]): Result; /** * Swaps two databases. * - _group_: server * - _complexity_: O(N) where N is the count of clients watching or blocking on keys from both databases. * - _since_: 4.0.0 */ swapdb(index1: number | string, index2: number | string, callback?: Callback<"OK">): Result<"OK", Context>; /** * An internal command used in replication. * - _group_: server * - _complexity_: undefined * - _since_: 1.0.0 */ sync(callback?: Callback): Result; /** * Returns the server time. * - _group_: server * - _complexity_: O(1) * - _since_: 2.6.0 */ time(callback?: Callback): Result; /** * Returns the number of existing keys out of those specified after updating the time they were last accessed. * - _group_: generic * - _complexity_: O(N) where N is the number of keys that will be touched. * - _since_: 3.2.1 */ touch(...args: [...keys: RedisKey[], callback: Callback]): Result; touch(...args: [keys: RedisKey[], callback: Callback]): Result; touch(...args: [...keys: RedisKey[]]): Result; touch(...args: [keys: RedisKey[]]): Result; /** * Returns the expiration time in seconds of a key. * - _group_: generic * - _complexity_: O(1) * - _since_: 1.0.0 */ ttl(key: RedisKey, callback?: Callback): Result; /** * Determines the type of value stored at a key. * - _group_: generic * - _complexity_: O(1) * - _since_: 1.0.0 */ type(key: RedisKey, callback?: Callback): Result; /** * Asynchronously deletes one or more keys. * - _group_: generic * - _complexity_: O(1) for each key removed regardless of its size. Then the command does O(N) work in a different thread in order to reclaim memory, where N is the number of allocations the deleted objects where composed of. * - _since_: 4.0.0 */ unlink(...args: [...keys: RedisKey[], callback: Callback]): Result; unlink(...args: [keys: RedisKey[], callback: Callback]): Result; unlink(...args: [...keys: RedisKey[]]): Result; unlink(...args: [keys: RedisKey[]]): Result; /** * Stops listening to messages posted to channels. * - _group_: pubsub * - _complexity_: O(N) where N is the number of channels to unsubscribe. * - _since_: 2.0.0 */ unsubscribe(callback?: Callback): Result; unsubscribe(...args: [...channels: (string | Buffer)[], callback: Callback]): Result; unsubscribe(...args: [...channels: (string | Buffer)[]]): Result; /** * Forgets about watched keys of a transaction. * - _group_: transactions * - _complexity_: O(1) * - _since_: 2.2.0 */ unwatch(callback?: Callback<"OK">): Result<"OK", Context>; /** * Blocks until the asynchronous replication of all preceding write commands sent by the connection is completed. * - _group_: generic * - _complexity_: O(1) * - _since_: 3.0.0 */ wait(numreplicas: number | string, timeout: number | string, callback?: Callback): Result; /** * Blocks until all of the preceding write commands sent by the connection are written to the append-only file of the primary and/or replicas. * - _group_: generic * - _complexity_: O(1) * - _since_: 7.2.0 */ waitaof(numlocal: number | string, numreplicas: number | string, timeout: number | string, callback?: Callback): Result; /** * Monitors changes to keys to determine the execution of a transaction. * - _group_: transactions * - _complexity_: O(1) for every key. * - _since_: 2.2.0 */ watch(...args: [...keys: RedisKey[], callback: Callback<"OK">]): Result<"OK", Context>; watch(...args: [keys: RedisKey[], callback: Callback<"OK">]): Result<"OK", Context>; watch(...args: [...keys: RedisKey[]]): Result<"OK", Context>; watch(...args: [keys: RedisKey[]]): Result<"OK", Context>; /** * Returns the number of messages that were successfully acknowledged by the consumer group member of a stream. * - _group_: stream * - _complexity_: O(1) for each message ID processed. * - _since_: 5.0.0 */ xack(...args: [ key: RedisKey, group: string | Buffer, ...ids: (string | Buffer | number)[], callback: Callback ]): Result; xack(...args: [ key: RedisKey, group: string | Buffer, ...ids: (string | Buffer | number)[] ]): Result; /** * Appends a new message to a stream. Creates the key if it doesn't exist. * - _group_: stream * - _complexity_: O(1) when adding a new entry, O(N) when trimming where N being the number of entries evicted. * - _since_: 5.0.0 */ xadd(...args: [ key: RedisKey, ...args: RedisValue[], callback: Callback ]): Result; xaddBuffer(...args: [ key: RedisKey, ...args: RedisValue[], callback: Callback ]): Result; xadd(...args: [key: RedisKey, ...args: RedisValue[]]): Result; xaddBuffer(...args: [key: RedisKey, ...args: RedisValue[]]): Result; /** * Changes, or acquires, ownership of messages in a consumer group, as if the messages were delivered to as consumer group member. * - _group_: stream * - _complexity_: O(1) if COUNT is small. * - _since_: 6.2.0 */ xautoclaim(key: RedisKey, group: string | Buffer, consumer: string | Buffer, minIdleTime: string | Buffer | number, start: string | Buffer | number, callback?: Callback): Result; xautoclaim(key: RedisKey, group: string | Buffer, consumer: string | Buffer, minIdleTime: string | Buffer | number, start: string | Buffer | number, justid: "JUSTID", callback?: Callback): Result; xautoclaim(key: RedisKey, group: string | Buffer, consumer: string | Buffer, minIdleTime: string | Buffer | number, start: string | Buffer | number, countToken: "COUNT", count: number | string, callback?: Callback): Result; xautoclaim(key: RedisKey, group: string | Buffer, consumer: string | Buffer, minIdleTime: string | Buffer | number, start: string | Buffer | number, countToken: "COUNT", count: number | string, justid: "JUSTID", callback?: Callback): Result; /** * Changes, or acquires, ownership of a message in a consumer group, as if the message was delivered a consumer group member. * - _group_: stream * - _complexity_: O(log N) with N being the number of messages in the PEL of the consumer group. * - _since_: 5.0.0 */ xclaim(...args: [ key: RedisKey, group: string | Buffer, consumer: string | Buffer, minIdleTime: string | Buffer | number, ...args: RedisValue[], callback: Callback ]): Result; xclaim(...args: [ key: RedisKey, group: string | Buffer, consumer: string | Buffer, minIdleTime: string | Buffer | number, ...args: RedisValue[] ]): Result; /** * Returns the number of messages after removing them from a stream. * - _group_: stream * - _complexity_: O(1) for each single item to delete in the stream, regardless of the stream size. * - _since_: 5.0.0 */ xdel(...args: [ key: RedisKey, ...ids: (string | Buffer | number)[], callback: Callback ]): Result; xdel(...args: [key: RedisKey, ...ids: (string | Buffer | number)[]]): Result; /** * Creates a consumer group. * - _group_: stream * - _complexity_: O(1) * - _since_: 5.0.0 */ xgroup(subcommand: "CREATE", key: RedisKey, group: string | Buffer, id: string | Buffer | number, callback?: Callback): Result; xgroup(subcommand: "CREATE", key: RedisKey, group: string | Buffer, id: string | Buffer | number, entriesreadToken: "ENTRIESREAD", entriesread: number | string, callback?: Callback): Result; xgroup(subcommand: "CREATE", key: RedisKey, group: string | Buffer, id: string | Buffer | number, mkstream: "MKSTREAM", callback?: Callback): Result; xgroup(subcommand: "CREATE", key: RedisKey, group: string | Buffer, id: string | Buffer | number, mkstream: "MKSTREAM", entriesreadToken: "ENTRIESREAD", entriesread: number | string, callback?: Callback): Result; xgroup(subcommand: "CREATE", key: RedisKey, group: string | Buffer, newId: "$", callback?: Callback): Result; xgroup(subcommand: "CREATE", key: RedisKey, group: string | Buffer, newId: "$", entriesreadToken: "ENTRIESREAD", entriesread: number | string, callback?: Callback): Result; xgroup(subcommand: "CREATE", key: RedisKey, group: string | Buffer, newId: "$", mkstream: "MKSTREAM", callback?: Callback): Result; xgroup(subcommand: "CREATE", key: RedisKey, group: string | Buffer, newId: "$", mkstream: "MKSTREAM", entriesreadToken: "ENTRIESREAD", entriesread: number | string, callback?: Callback): Result; /** * Creates a consumer in a consumer group. * - _group_: stream * - _complexity_: O(1) * - _since_: 6.2.0 */ xgroup(subcommand: "CREATECONSUMER", key: RedisKey, group: string | Buffer, consumer: string | Buffer, callback?: Callback): Result; /** * Deletes a consumer from a consumer group. * - _group_: stream * - _complexity_: O(1) * - _since_: 5.0.0 */ xgroup(subcommand: "DELCONSUMER", key: RedisKey, group: string | Buffer, consumer: string | Buffer, callback?: Callback): Result; /** * Destroys a consumer group. * - _group_: stream * - _complexity_: O(N) where N is the number of entries in the group's pending entries list (PEL). * - _since_: 5.0.0 */ xgroup(subcommand: "DESTROY", key: RedisKey, group: string | Buffer, callback?: Callback): Result; /** * Returns helpful text about the different subcommands. * - _group_: stream * - _complexity_: O(1) * - _since_: 5.0.0 */ xgroup(subcommand: "HELP", callback?: Callback): Result; /** * Sets the last-delivered ID of a consumer group. * - _group_: stream * - _complexity_: O(1) * - _since_: 5.0.0 */ xgroup(subcommand: "SETID", key: RedisKey, group: string | Buffer, id: string | Buffer | number, callback?: Callback): Result; xgroup(subcommand: "SETID", key: RedisKey, group: string | Buffer, id: string | Buffer | number, entriesreadToken: "ENTRIESREAD", entriesread: number | string, callback?: Callback): Result; xgroup(subcommand: "SETID", key: RedisKey, group: string | Buffer, newId: "$", callback?: Callback): Result; xgroup(subcommand: "SETID", key: RedisKey, group: string | Buffer, newId: "$", entriesreadToken: "ENTRIESREAD", entriesread: number | string, callback?: Callback): Result; /** * Returns a list of the consumers in a consumer group. * - _group_: stream * - _complexity_: O(1) * - _since_: 5.0.0 */ xinfo(subcommand: "CONSUMERS", key: RedisKey, group: string | Buffer, callback?: Callback): Result; /** * Returns a list of the consumer groups of a stream. * - _group_: stream * - _complexity_: O(1) * - _since_: 5.0.0 */ xinfo(subcommand: "GROUPS", key: RedisKey, callback?: Callback): Result; /** * Returns helpful text about the different subcommands. * - _group_: stream * - _complexity_: O(1) * - _since_: 5.0.0 */ xinfo(subcommand: "HELP", callback?: Callback): Result; /** * Returns information about a stream. * - _group_: stream * - _complexity_: O(1) * - _since_: 5.0.0 */ xinfo(subcommand: "STREAM", key: RedisKey, callback?: Callback): Result; xinfo(subcommand: "STREAM", key: RedisKey, full: "FULL", callback?: Callback): Result; xinfo(subcommand: "STREAM", key: RedisKey, full: "FULL", countToken: "COUNT", count: number | string, callback?: Callback): Result; /** * Return the number of messages in a stream. * - _group_: stream * - _complexity_: O(1) * - _since_: 5.0.0 */ xlen(key: RedisKey, callback?: Callback): Result; /** * Returns the information and entries from a stream consumer group's pending entries list. * - _group_: stream * - _complexity_: O(N) with N being the number of elements returned, so asking for a small fixed number of entries per call is O(1). O(M), where M is the total number of entries scanned when used with the IDLE filter. When the command returns just the summary and the list of consumers is small, it runs in O(1) time; otherwise, an additional O(N) time for iterating every consumer. * - _since_: 5.0.0 */ xpending(key: RedisKey, group: string | Buffer, callback?: Callback): Result; xpending(key: RedisKey, group: string | Buffer, start: string | Buffer | number, end: string | Buffer | number, count: number | string, callback?: Callback): Result; xpending(key: RedisKey, group: string | Buffer, start: string | Buffer | number, end: string | Buffer | number, count: number | string, consumer: string | Buffer, callback?: Callback): Result; xpending(key: RedisKey, group: string | Buffer, minIdleTimeToken: "IDLE", minIdleTime: number | string, start: string | Buffer | number, end: string | Buffer | number, count: number | string, callback?: Callback): Result; xpending(key: RedisKey, group: string | Buffer, minIdleTimeToken: "IDLE", minIdleTime: number | string, start: string | Buffer | number, end: string | Buffer | number, count: number | string, consumer: string | Buffer, callback?: Callback): Result; /** * Returns the messages from a stream within a range of IDs. * - _group_: stream * - _complexity_: O(N) with N being the number of elements being returned. If N is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it O(1). * - _since_: 5.0.0 */ xrange(key: RedisKey, start: string | Buffer | number, end: string | Buffer | number, callback?: Callback<[id: string, fields: string[]][]>): Result<[id: string, fields: string[]][], Context>; xrangeBuffer(key: RedisKey, start: string | Buffer | number, end: string | Buffer | number, callback?: Callback<[id: Buffer, fields: Buffer[]][]>): Result<[id: Buffer, fields: Buffer[]][], Context>; xrange(key: RedisKey, start: string | Buffer | number, end: string | Buffer | number, countToken: "COUNT", count: number | string, callback?: Callback<[id: string, fields: string[]][]>): Result<[id: string, fields: string[]][], Context>; xrangeBuffer(key: RedisKey, start: string | Buffer | number, end: string | Buffer | number, countToken: "COUNT", count: number | string, callback?: Callback<[id: Buffer, fields: Buffer[]][]>): Result<[id: Buffer, fields: Buffer[]][], Context>; /** * Returns messages from multiple streams with IDs greater than the ones requested. Blocks until a message is available otherwise. * - _group_: stream * - _complexity_: undefined * - _since_: 5.0.0 */ xread(...args: [ streamsToken: "STREAMS", ...args: RedisValue[], callback: Callback<[ key: string, items: [id: string, fields: string[]][] ][] | null> ]): Result<[ key: string, items: [id: string, fields: string[]][] ][] | null, Context>; xreadBuffer(...args: [ streamsToken: "STREAMS", ...args: RedisValue[], callback: Callback<[ key: Buffer, items: [id: Buffer, fields: Buffer[]][] ][] | null> ]): Result<[ key: Buffer, items: [id: Buffer, fields: Buffer[]][] ][] | null, Context>; xread(...args: [streamsToken: "STREAMS", ...args: RedisValue[]]): Result<[ key: string, items: [id: string, fields: string[]][] ][] | null, Context>; xreadBuffer(...args: [streamsToken: "STREAMS", ...args: RedisValue[]]): Result<[ key: Buffer, items: [id: Buffer, fields: Buffer[]][] ][] | null, Context>; xread(...args: [ millisecondsToken: "BLOCK", milliseconds: number | string, streamsToken: "STREAMS", ...args: RedisValue[], callback: Callback<[ key: string, items: [id: string, fields: string[]][] ][] | null> ]): Result<[ key: string, items: [id: string, fields: string[]][] ][] | null, Context>; xreadBuffer(...args: [ millisecondsToken: "BLOCK", milliseconds: number | string, streamsToken: "STREAMS", ...args: RedisValue[], callback: Callback<[ key: Buffer, items: [id: Buffer, fields: Buffer[]][] ][] | null> ]): Result<[ key: Buffer, items: [id: Buffer, fields: Buffer[]][] ][] | null, Context>; xread(...args: [ millisecondsToken: "BLOCK", milliseconds: number | string, streamsToken: "STREAMS", ...args: RedisValue[] ]): Result<[ key: string, items: [id: string, fields: string[]][] ][] | null, Context>; xreadBuffer(...args: [ millisecondsToken: "BLOCK", milliseconds: number | string, streamsToken: "STREAMS", ...args: RedisValue[] ]): Result<[ key: Buffer, items: [id: Buffer, fields: Buffer[]][] ][] | null, Context>; xread(...args: [ countToken: "COUNT", count: number | string, streamsToken: "STREAMS", ...args: RedisValue[], callback: Callback<[ key: string, items: [id: string, fields: string[]][] ][] | null> ]): Result<[ key: string, items: [id: string, fields: string[]][] ][] | null, Context>; xreadBuffer(...args: [ countToken: "COUNT", count: number | string, streamsToken: "STREAMS", ...args: RedisValue[], callback: Callback<[ key: Buffer, items: [id: Buffer, fields: Buffer[]][] ][] | null> ]): Result<[ key: Buffer, items: [id: Buffer, fields: Buffer[]][] ][] | null, Context>; xread(...args: [ countToken: "COUNT", count: number | string, streamsToken: "STREAMS", ...args: RedisValue[] ]): Result<[ key: string, items: [id: string, fields: string[]][] ][] | null, Context>; xreadBuffer(...args: [ countToken: "COUNT", count: number | string, streamsToken: "STREAMS", ...args: RedisValue[] ]): Result<[ key: Buffer, items: [id: Buffer, fields: Buffer[]][] ][] | null, Context>; xread(...args: [ countToken: "COUNT", count: number | string, millisecondsToken: "BLOCK", milliseconds: number | string, streamsToken: "STREAMS", ...args: RedisValue[], callback: Callback<[ key: string, items: [id: string, fields: string[]][] ][] | null> ]): Result<[ key: string, items: [id: string, fields: string[]][] ][] | null, Context>; xreadBuffer(...args: [ countToken: "COUNT", count: number | string, millisecondsToken: "BLOCK", milliseconds: number | string, streamsToken: "STREAMS", ...args: RedisValue[], callback: Callback<[ key: Buffer, items: [id: Buffer, fields: Buffer[]][] ][] | null> ]): Result<[ key: Buffer, items: [id: Buffer, fields: Buffer[]][] ][] | null, Context>; xread(...args: [ countToken: "COUNT", count: number | string, millisecondsToken: "BLOCK", milliseconds: number | string, streamsToken: "STREAMS", ...args: RedisValue[] ]): Result<[ key: string, items: [id: string, fields: string[]][] ][] | null, Context>; xreadBuffer(...args: [ countToken: "COUNT", count: number | string, millisecondsToken: "BLOCK", milliseconds: number | string, streamsToken: "STREAMS", ...args: RedisValue[] ]): Result<[ key: Buffer, items: [id: Buffer, fields: Buffer[]][] ][] | null, Context>; /** * Returns new or historical messages from a stream for a consumer in a group. Blocks until a message is available otherwise. * - _group_: stream * - _complexity_: For each stream mentioned: O(M) with M being the number of elements returned. If M is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it O(1). On the other side when XREADGROUP blocks, XADD will pay the O(N) time in order to serve the N clients blocked on the stream getting new data. * - _since_: 5.0.0 */ xreadgroup(...args: [ groupBlockToken: "GROUP", group: string | Buffer, consumer: string | Buffer, streamsToken: "STREAMS", ...args: RedisValue[], callback: Callback ]): Result; xreadgroup(...args: [ groupBlockToken: "GROUP", group: string | Buffer, consumer: string | Buffer, streamsToken: "STREAMS", ...args: RedisValue[] ]): Result; xreadgroup(...args: [ groupBlockToken: "GROUP", group: string | Buffer, consumer: string | Buffer, noack: "NOACK", streamsToken: "STREAMS", ...args: RedisValue[], callback: Callback ]): Result; xreadgroup(...args: [ groupBlockToken: "GROUP", group: string | Buffer, consumer: string | Buffer, noack: "NOACK", streamsToken: "STREAMS", ...args: RedisValue[] ]): Result; xreadgroup(...args: [ groupBlockToken: "GROUP", group: string | Buffer, consumer: string | Buffer, millisecondsToken: "BLOCK", milliseconds: number | string, streamsToken: "STREAMS", ...args: RedisValue[], callback: Callback ]): Result; xreadgroup(...args: [ groupBlockToken: "GROUP", group: string | Buffer, consumer: string | Buffer, millisecondsToken: "BLOCK", milliseconds: number | string, streamsToken: "STREAMS", ...args: RedisValue[] ]): Result; xreadgroup(...args: [ groupBlockToken: "GROUP", group: string | Buffer, consumer: string | Buffer, millisecondsToken: "BLOCK", milliseconds: number | string, noack: "NOACK", streamsToken: "STREAMS", ...args: RedisValue[], callback: Callback ]): Result; xreadgroup(...args: [ groupBlockToken: "GROUP", group: string | Buffer, consumer: string | Buffer, millisecondsToken: "BLOCK", milliseconds: number | string, noack: "NOACK", streamsToken: "STREAMS", ...args: RedisValue[] ]): Result; xreadgroup(...args: [ groupBlockToken: "GROUP", group: string | Buffer, consumer: string | Buffer, countToken: "COUNT", count: number | string, streamsToken: "STREAMS", ...args: RedisValue[], callback: Callback ]): Result; xreadgroup(...args: [ groupBlockToken: "GROUP", group: string | Buffer, consumer: string | Buffer, countToken: "COUNT", count: number | string, streamsToken: "STREAMS", ...args: RedisValue[] ]): Result; xreadgroup(...args: [ groupBlockToken: "GROUP", group: string | Buffer, consumer: string | Buffer, countToken: "COUNT", count: number | string, noack: "NOACK", streamsToken: "STREAMS", ...args: RedisValue[], callback: Callback ]): Result; xreadgroup(...args: [ groupBlockToken: "GROUP", group: string | Buffer, consumer: string | Buffer, countToken: "COUNT", count: number | string, noack: "NOACK", streamsToken: "STREAMS", ...args: RedisValue[] ]): Result; xreadgroup(...args: [ groupBlockToken: "GROUP", group: string | Buffer, consumer: string | Buffer, countToken: "COUNT", count: number | string, millisecondsToken: "BLOCK", milliseconds: number | string, streamsToken: "STREAMS", ...args: RedisValue[], callback: Callback ]): Result; xreadgroup(...args: [ groupBlockToken: "GROUP", group: string | Buffer, consumer: string | Buffer, countToken: "COUNT", count: number | string, millisecondsToken: "BLOCK", milliseconds: number | string, streamsToken: "STREAMS", ...args: RedisValue[] ]): Result; xreadgroup(...args: [ groupBlockToken: "GROUP", group: string | Buffer, consumer: string | Buffer, countToken: "COUNT", count: number | string, millisecondsToken: "BLOCK", milliseconds: number | string, noack: "NOACK", streamsToken: "STREAMS", ...args: RedisValue[], callback: Callback ]): Result; xreadgroup(...args: [ groupBlockToken: "GROUP", group: string | Buffer, consumer: string | Buffer, countToken: "COUNT", count: number | string, millisecondsToken: "BLOCK", milliseconds: number | string, noack: "NOACK", streamsToken: "STREAMS", ...args: RedisValue[] ]): Result; /** * Returns the messages from a stream within a range of IDs in reverse order. * - _group_: stream * - _complexity_: O(N) with N being the number of elements returned. If N is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it O(1). * - _since_: 5.0.0 */ xrevrange(key: RedisKey, end: string | Buffer | number, start: string | Buffer | number, callback?: Callback<[id: string, fields: string[]][]>): Result<[id: string, fields: string[]][], Context>; xrevrangeBuffer(key: RedisKey, end: string | Buffer | number, start: string | Buffer | number, callback?: Callback<[id: Buffer, fields: Buffer[]][]>): Result<[id: Buffer, fields: Buffer[]][], Context>; xrevrange(key: RedisKey, end: string | Buffer | number, start: string | Buffer | number, countToken: "COUNT", count: number | string, callback?: Callback<[id: string, fields: string[]][]>): Result<[id: string, fields: string[]][], Context>; xrevrangeBuffer(key: RedisKey, end: string | Buffer | number, start: string | Buffer | number, countToken: "COUNT", count: number | string, callback?: Callback<[id: Buffer, fields: Buffer[]][]>): Result<[id: Buffer, fields: Buffer[]][], Context>; /** * An internal command for replicating stream values. * - _group_: stream * - _complexity_: O(1) * - _since_: 5.0.0 */ xsetid(key: RedisKey, lastId: string | Buffer | number, callback?: Callback): Result; xsetid(key: RedisKey, lastId: string | Buffer | number, maxDeletedIdToken: "MAXDELETEDID", maxDeletedId: string | Buffer | number, callback?: Callback): Result; xsetid(key: RedisKey, lastId: string | Buffer | number, entriesAddedToken: "ENTRIESADDED", entriesAdded: number | string, callback?: Callback): Result; xsetid(key: RedisKey, lastId: string | Buffer | number, entriesAddedToken: "ENTRIESADDED", entriesAdded: number | string, maxDeletedIdToken: "MAXDELETEDID", maxDeletedId: string | Buffer | number, callback?: Callback): Result; /** * Deletes messages from the beginning of a stream. * - _group_: stream * - _complexity_: O(N), with N being the number of evicted entries. Constant times are very small however, since entries are organized in macro nodes containing multiple entries that can be released with a single deallocation. * - _since_: 5.0.0 */ xtrim(key: RedisKey, maxlen: "MAXLEN", threshold: string | Buffer | number, callback?: Callback): Result; xtrim(key: RedisKey, maxlen: "MAXLEN", threshold: string | Buffer | number, countToken: "LIMIT", count: number | string, callback?: Callback): Result; xtrim(key: RedisKey, maxlen: "MAXLEN", equal: "=", threshold: string | Buffer | number, callback?: Callback): Result; xtrim(key: RedisKey, maxlen: "MAXLEN", equal: "=", threshold: string | Buffer | number, countToken: "LIMIT", count: number | string, callback?: Callback): Result; xtrim(key: RedisKey, maxlen: "MAXLEN", approximately: "~", threshold: string | Buffer | number, callback?: Callback): Result; xtrim(key: RedisKey, maxlen: "MAXLEN", approximately: "~", threshold: string | Buffer | number, countToken: "LIMIT", count: number | string, callback?: Callback): Result; xtrim(key: RedisKey, minid: "MINID", threshold: string | Buffer | number, callback?: Callback): Result; xtrim(key: RedisKey, minid: "MINID", threshold: string | Buffer | number, countToken: "LIMIT", count: number | string, callback?: Callback): Result; xtrim(key: RedisKey, minid: "MINID", equal: "=", threshold: string | Buffer | number, callback?: Callback): Result; xtrim(key: RedisKey, minid: "MINID", equal: "=", threshold: string | Buffer | number, countToken: "LIMIT", count: number | string, callback?: Callback): Result; xtrim(key: RedisKey, minid: "MINID", approximately: "~", threshold: string | Buffer | number, callback?: Callback): Result; xtrim(key: RedisKey, minid: "MINID", approximately: "~", threshold: string | Buffer | number, countToken: "LIMIT", count: number | string, callback?: Callback): Result; /** * Adds one or more members to a sorted set, or updates their scores. Creates the key if it doesn't exist. * - _group_: sorted-set * - _complexity_: O(log(N)) for each item added, where N is the number of elements in the sorted set. * - _since_: 1.2.0 */ zadd(...args: [ key: RedisKey, ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [key: RedisKey, ...data: (string | Buffer | number)[]]): Result; zadd(...args: [ key: RedisKey, incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zaddBuffer(...args: [ key: RedisKey, incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zaddBuffer(...args: [ key: RedisKey, incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, ch: "CH", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [key: RedisKey, ch: "CH", ...data: (string | Buffer | number)[]]): Result; zadd(...args: [ key: RedisKey, ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zaddBuffer(...args: [ key: RedisKey, ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zaddBuffer(...args: [ key: RedisKey, ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, gt: "GT", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [key: RedisKey, gt: "GT", ...data: (string | Buffer | number)[]]): Result; zadd(...args: [ key: RedisKey, gt: "GT", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zaddBuffer(...args: [ key: RedisKey, gt: "GT", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, gt: "GT", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zaddBuffer(...args: [ key: RedisKey, gt: "GT", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, gt: "GT", ch: "CH", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, gt: "GT", ch: "CH", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, gt: "GT", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zaddBuffer(...args: [ key: RedisKey, gt: "GT", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, gt: "GT", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zaddBuffer(...args: [ key: RedisKey, gt: "GT", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, lt: "LT", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [key: RedisKey, lt: "LT", ...data: (string | Buffer | number)[]]): Result; zadd(...args: [ key: RedisKey, lt: "LT", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zaddBuffer(...args: [ key: RedisKey, lt: "LT", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, lt: "LT", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zaddBuffer(...args: [ key: RedisKey, lt: "LT", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, lt: "LT", ch: "CH", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, lt: "LT", ch: "CH", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, lt: "LT", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zaddBuffer(...args: [ key: RedisKey, lt: "LT", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, lt: "LT", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zaddBuffer(...args: [ key: RedisKey, lt: "LT", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, nx: "NX", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [key: RedisKey, nx: "NX", ...data: (string | Buffer | number)[]]): Result; zadd(...args: [ key: RedisKey, nx: "NX", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zaddBuffer(...args: [ key: RedisKey, nx: "NX", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, nx: "NX", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zaddBuffer(...args: [ key: RedisKey, nx: "NX", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, nx: "NX", ch: "CH", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, nx: "NX", ch: "CH", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, nx: "NX", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zaddBuffer(...args: [ key: RedisKey, nx: "NX", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, nx: "NX", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zaddBuffer(...args: [ key: RedisKey, nx: "NX", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, nx: "NX", gt: "GT", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, nx: "NX", gt: "GT", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, nx: "NX", gt: "GT", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zaddBuffer(...args: [ key: RedisKey, nx: "NX", gt: "GT", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, nx: "NX", gt: "GT", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zaddBuffer(...args: [ key: RedisKey, nx: "NX", gt: "GT", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, nx: "NX", gt: "GT", ch: "CH", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, nx: "NX", gt: "GT", ch: "CH", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, nx: "NX", gt: "GT", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zaddBuffer(...args: [ key: RedisKey, nx: "NX", gt: "GT", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, nx: "NX", gt: "GT", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zaddBuffer(...args: [ key: RedisKey, nx: "NX", gt: "GT", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, nx: "NX", lt: "LT", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, nx: "NX", lt: "LT", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, nx: "NX", lt: "LT", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zaddBuffer(...args: [ key: RedisKey, nx: "NX", lt: "LT", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, nx: "NX", lt: "LT", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zaddBuffer(...args: [ key: RedisKey, nx: "NX", lt: "LT", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, nx: "NX", lt: "LT", ch: "CH", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, nx: "NX", lt: "LT", ch: "CH", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, nx: "NX", lt: "LT", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zaddBuffer(...args: [ key: RedisKey, nx: "NX", lt: "LT", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, nx: "NX", lt: "LT", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zaddBuffer(...args: [ key: RedisKey, nx: "NX", lt: "LT", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, xx: "XX", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [key: RedisKey, xx: "XX", ...data: (string | Buffer | number)[]]): Result; zadd(...args: [ key: RedisKey, xx: "XX", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zaddBuffer(...args: [ key: RedisKey, xx: "XX", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, xx: "XX", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zaddBuffer(...args: [ key: RedisKey, xx: "XX", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, xx: "XX", ch: "CH", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, xx: "XX", ch: "CH", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, xx: "XX", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zaddBuffer(...args: [ key: RedisKey, xx: "XX", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, xx: "XX", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zaddBuffer(...args: [ key: RedisKey, xx: "XX", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, xx: "XX", gt: "GT", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, xx: "XX", gt: "GT", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, xx: "XX", gt: "GT", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zaddBuffer(...args: [ key: RedisKey, xx: "XX", gt: "GT", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, xx: "XX", gt: "GT", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zaddBuffer(...args: [ key: RedisKey, xx: "XX", gt: "GT", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, xx: "XX", gt: "GT", ch: "CH", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, xx: "XX", gt: "GT", ch: "CH", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, xx: "XX", gt: "GT", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zaddBuffer(...args: [ key: RedisKey, xx: "XX", gt: "GT", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, xx: "XX", gt: "GT", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zaddBuffer(...args: [ key: RedisKey, xx: "XX", gt: "GT", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, xx: "XX", lt: "LT", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, xx: "XX", lt: "LT", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, xx: "XX", lt: "LT", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zaddBuffer(...args: [ key: RedisKey, xx: "XX", lt: "LT", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, xx: "XX", lt: "LT", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zaddBuffer(...args: [ key: RedisKey, xx: "XX", lt: "LT", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, xx: "XX", lt: "LT", ch: "CH", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, xx: "XX", lt: "LT", ch: "CH", ...data: (string | Buffer | number)[] ]): Result; zadd(...args: [ key: RedisKey, xx: "XX", lt: "LT", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zaddBuffer(...args: [ key: RedisKey, xx: "XX", lt: "LT", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[], callback: Callback ]): Result; zadd(...args: [ key: RedisKey, xx: "XX", lt: "LT", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; zaddBuffer(...args: [ key: RedisKey, xx: "XX", lt: "LT", ch: "CH", incr: "INCR", ...data: (string | Buffer | number)[] ]): Result; /** * Returns the number of members in a sorted set. * - _group_: sorted-set * - _complexity_: O(1) * - _since_: 1.2.0 */ zcard(key: RedisKey, callback?: Callback): Result; /** * Returns the count of members in a sorted set that have scores within a range. * - _group_: sorted-set * - _complexity_: O(log(N)) with N being the number of elements in the sorted set. * - _since_: 2.0.0 */ zcount(key: RedisKey, min: number | string, max: number | string, callback?: Callback): Result; /** * Returns the difference between multiple sorted sets. * - _group_: sorted-set * - _complexity_: O(L + (N-K)log(N)) worst case where L is the total number of elements in all the sets, N is the size of the first set, and K is the size of the result set. * - _since_: 6.2.0 */ zdiff(...args: [ numkeys: number | string, ...keys: RedisKey[], callback: Callback ]): Result; zdiffBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], callback: Callback ]): Result; zdiff(...args: [ numkeys: number | string, keys: RedisKey[], callback: Callback ]): Result; zdiffBuffer(...args: [ numkeys: number | string, keys: RedisKey[], callback: Callback ]): Result; zdiff(...args: [numkeys: number | string, ...keys: RedisKey[]]): Result; zdiffBuffer(...args: [numkeys: number | string, ...keys: RedisKey[]]): Result; zdiff(...args: [numkeys: number | string, keys: RedisKey[]]): Result; zdiffBuffer(...args: [numkeys: number | string, keys: RedisKey[]]): Result; zdiff(...args: [ numkeys: number | string, ...keys: RedisKey[], withscores: "WITHSCORES", callback: Callback ]): Result; zdiffBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], withscores: "WITHSCORES", callback: Callback ]): Result; zdiff(...args: [ numkeys: number | string, keys: RedisKey[], withscores: "WITHSCORES", callback: Callback ]): Result; zdiffBuffer(...args: [ numkeys: number | string, keys: RedisKey[], withscores: "WITHSCORES", callback: Callback ]): Result; zdiff(...args: [ numkeys: number | string, ...keys: RedisKey[], withscores: "WITHSCORES" ]): Result; zdiffBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], withscores: "WITHSCORES" ]): Result; zdiff(...args: [ numkeys: number | string, keys: RedisKey[], withscores: "WITHSCORES" ]): Result; zdiffBuffer(...args: [ numkeys: number | string, keys: RedisKey[], withscores: "WITHSCORES" ]): Result; /** * Stores the difference of multiple sorted sets in a key. * - _group_: sorted-set * - _complexity_: O(L + (N-K)log(N)) worst case where L is the total number of elements in all the sets, N is the size of the first set, and K is the size of the result set. * - _since_: 6.2.0 */ zdiffstore(...args: [ destination: RedisKey, numkeys: number | string, ...keys: RedisKey[], callback: Callback ]): Result; zdiffstore(...args: [ destination: RedisKey, numkeys: number | string, keys: RedisKey[], callback: Callback ]): Result; zdiffstore(...args: [ destination: RedisKey, numkeys: number | string, ...keys: RedisKey[] ]): Result; zdiffstore(...args: [destination: RedisKey, numkeys: number | string, keys: RedisKey[]]): Result; /** * Increments the score of a member in a sorted set. * - _group_: sorted-set * - _complexity_: O(log(N)) where N is the number of elements in the sorted set. * - _since_: 1.2.0 */ zincrby(key: RedisKey, increment: number | string, member: string | Buffer | number, callback?: Callback): Result; zincrbyBuffer(key: RedisKey, increment: number | string, member: string | Buffer | number, callback?: Callback): Result; /** * Returns the intersect of multiple sorted sets. * - _group_: sorted-set * - _complexity_: O(N*K)+O(M*log(M)) worst case with N being the smallest input sorted set, K being the number of input sorted sets and M being the number of elements in the resulting sorted set. * - _since_: 6.2.0 */ zinter(...args: [ numkeys: number | string, ...keys: RedisKey[], callback: Callback ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], callback: Callback ]): Result; zinter(...args: [ numkeys: number | string, keys: RedisKey[], callback: Callback ]): Result; zinterBuffer(...args: [ numkeys: number | string, keys: RedisKey[], callback: Callback ]): Result; zinter(...args: [numkeys: number | string, ...keys: RedisKey[]]): Result; zinterBuffer(...args: [numkeys: number | string, ...keys: RedisKey[]]): Result; zinter(...args: [numkeys: number | string, keys: RedisKey[]]): Result; zinterBuffer(...args: [numkeys: number | string, keys: RedisKey[]]): Result; zinter(...args: [ numkeys: number | string, ...keys: RedisKey[], withscores: "WITHSCORES", callback: Callback ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], withscores: "WITHSCORES", callback: Callback ]): Result; zinter(...args: [ numkeys: number | string, keys: RedisKey[], withscores: "WITHSCORES", callback: Callback ]): Result; zinterBuffer(...args: [ numkeys: number | string, keys: RedisKey[], withscores: "WITHSCORES", callback: Callback ]): Result; zinter(...args: [ numkeys: number | string, ...keys: RedisKey[], withscores: "WITHSCORES" ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], withscores: "WITHSCORES" ]): Result; zinter(...args: [ numkeys: number | string, keys: RedisKey[], withscores: "WITHSCORES" ]): Result; zinterBuffer(...args: [ numkeys: number | string, keys: RedisKey[], withscores: "WITHSCORES" ]): Result; zinter(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", callback: Callback ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", callback: Callback ]): Result; zinter(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", callback: Callback ]): Result; zinterBuffer(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", callback: Callback ]): Result; zinter(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM" ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM" ]): Result; zinter(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM" ]): Result; zinterBuffer(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM" ]): Result; zinter(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", withscores: "WITHSCORES", callback: Callback ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", withscores: "WITHSCORES", callback: Callback ]): Result; zinter(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", withscores: "WITHSCORES", callback: Callback ]): Result; zinterBuffer(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", withscores: "WITHSCORES", callback: Callback ]): Result; zinter(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", withscores: "WITHSCORES" ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", withscores: "WITHSCORES" ]): Result; zinter(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", withscores: "WITHSCORES" ]): Result; zinterBuffer(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", withscores: "WITHSCORES" ]): Result; zinter(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", callback: Callback ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", callback: Callback ]): Result; zinter(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", callback: Callback ]): Result; zinterBuffer(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", callback: Callback ]): Result; zinter(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN" ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN" ]): Result; zinter(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN" ]): Result; zinterBuffer(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN" ]): Result; zinter(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", withscores: "WITHSCORES", callback: Callback ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", withscores: "WITHSCORES", callback: Callback ]): Result; zinter(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", withscores: "WITHSCORES", callback: Callback ]): Result; zinterBuffer(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", withscores: "WITHSCORES", callback: Callback ]): Result; zinter(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", withscores: "WITHSCORES" ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", withscores: "WITHSCORES" ]): Result; zinter(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", withscores: "WITHSCORES" ]): Result; zinterBuffer(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", withscores: "WITHSCORES" ]): Result; zinter(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", callback: Callback ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", callback: Callback ]): Result; zinter(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", callback: Callback ]): Result; zinterBuffer(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", callback: Callback ]): Result; zinter(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX" ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX" ]): Result; zinter(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX" ]): Result; zinterBuffer(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX" ]): Result; zinter(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", withscores: "WITHSCORES", callback: Callback ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", withscores: "WITHSCORES", callback: Callback ]): Result; zinter(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", withscores: "WITHSCORES", callback: Callback ]): Result; zinterBuffer(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", withscores: "WITHSCORES", callback: Callback ]): Result; zinter(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", withscores: "WITHSCORES" ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", withscores: "WITHSCORES" ]): Result; zinter(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", withscores: "WITHSCORES" ]): Result; zinterBuffer(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", withscores: "WITHSCORES" ]): Result; zinter(...args: [ numkeys: number | string, ...args: RedisValue[], callback: Callback ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], callback: Callback ]): Result; zinter(...args: [numkeys: number | string, ...args: RedisValue[]]): Result; zinterBuffer(...args: [numkeys: number | string, ...args: RedisValue[]]): Result; zinter(...args: [ numkeys: number | string, ...args: RedisValue[], withscores: "WITHSCORES", callback: Callback ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], withscores: "WITHSCORES", callback: Callback ]): Result; zinter(...args: [ numkeys: number | string, ...args: RedisValue[], withscores: "WITHSCORES" ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], withscores: "WITHSCORES" ]): Result; zinter(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", sum: "SUM", callback: Callback ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", sum: "SUM", callback: Callback ]): Result; zinter(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", sum: "SUM" ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", sum: "SUM" ]): Result; zinter(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", sum: "SUM", withscores: "WITHSCORES", callback: Callback ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", sum: "SUM", withscores: "WITHSCORES", callback: Callback ]): Result; zinter(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", sum: "SUM", withscores: "WITHSCORES" ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", sum: "SUM", withscores: "WITHSCORES" ]): Result; zinter(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", min: "MIN", callback: Callback ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", min: "MIN", callback: Callback ]): Result; zinter(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", min: "MIN" ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", min: "MIN" ]): Result; zinter(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", min: "MIN", withscores: "WITHSCORES", callback: Callback ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", min: "MIN", withscores: "WITHSCORES", callback: Callback ]): Result; zinter(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", min: "MIN", withscores: "WITHSCORES" ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", min: "MIN", withscores: "WITHSCORES" ]): Result; zinter(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", max: "MAX", callback: Callback ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", max: "MAX", callback: Callback ]): Result; zinter(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", max: "MAX" ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", max: "MAX" ]): Result; zinter(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", max: "MAX", withscores: "WITHSCORES", callback: Callback ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", max: "MAX", withscores: "WITHSCORES", callback: Callback ]): Result; zinter(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", max: "MAX", withscores: "WITHSCORES" ]): Result; zinterBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", max: "MAX", withscores: "WITHSCORES" ]): Result; /** * Returns the number of members of the intersect of multiple sorted sets. * - _group_: sorted-set * - _complexity_: O(N*K) worst case with N being the smallest input sorted set, K being the number of input sorted sets. * - _since_: 7.0.0 */ zintercard(...args: [ numkeys: number | string, ...keys: RedisKey[], callback: Callback ]): Result; zintercard(...args: [ numkeys: number | string, keys: RedisKey[], callback: Callback ]): Result; zintercard(...args: [numkeys: number | string, ...keys: RedisKey[]]): Result; zintercard(...args: [numkeys: number | string, keys: RedisKey[]]): Result; zintercard(...args: [ numkeys: number | string, ...keys: RedisKey[], limitToken: "LIMIT", limit: number | string, callback: Callback ]): Result; zintercard(...args: [ numkeys: number | string, keys: RedisKey[], limitToken: "LIMIT", limit: number | string, callback: Callback ]): Result; zintercard(...args: [ numkeys: number | string, ...keys: RedisKey[], limitToken: "LIMIT", limit: number | string ]): Result; zintercard(...args: [ numkeys: number | string, keys: RedisKey[], limitToken: "LIMIT", limit: number | string ]): Result; /** * Stores the intersect of multiple sorted sets in a key. * - _group_: sorted-set * - _complexity_: O(N*K)+O(M*log(M)) worst case with N being the smallest input sorted set, K being the number of input sorted sets and M being the number of elements in the resulting sorted set. * - _since_: 2.0.0 */ zinterstore(...args: [ destination: RedisKey, numkeys: number | string, ...keys: RedisKey[], callback: Callback ]): Result; zinterstore(...args: [ destination: RedisKey, numkeys: number | string, keys: RedisKey[], callback: Callback ]): Result; zinterstore(...args: [ destination: RedisKey, numkeys: number | string, ...keys: RedisKey[] ]): Result; zinterstore(...args: [destination: RedisKey, numkeys: number | string, keys: RedisKey[]]): Result; zinterstore(...args: [ destination: RedisKey, numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", callback: Callback ]): Result; zinterstore(...args: [ destination: RedisKey, numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", callback: Callback ]): Result; zinterstore(...args: [ destination: RedisKey, numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM" ]): Result; zinterstore(...args: [ destination: RedisKey, numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM" ]): Result; zinterstore(...args: [ destination: RedisKey, numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", callback: Callback ]): Result; zinterstore(...args: [ destination: RedisKey, numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", callback: Callback ]): Result; zinterstore(...args: [ destination: RedisKey, numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN" ]): Result; zinterstore(...args: [ destination: RedisKey, numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN" ]): Result; zinterstore(...args: [ destination: RedisKey, numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", callback: Callback ]): Result; zinterstore(...args: [ destination: RedisKey, numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", callback: Callback ]): Result; zinterstore(...args: [ destination: RedisKey, numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX" ]): Result; zinterstore(...args: [ destination: RedisKey, numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX" ]): Result; zinterstore(...args: [ destination: RedisKey, numkeys: number | string, ...args: RedisValue[], callback: Callback ]): Result; zinterstore(...args: [ destination: RedisKey, numkeys: number | string, ...args: RedisValue[] ]): Result; zinterstore(...args: [ destination: RedisKey, numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", sum: "SUM", callback: Callback ]): Result; zinterstore(...args: [ destination: RedisKey, numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", sum: "SUM" ]): Result; zinterstore(...args: [ destination: RedisKey, numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", min: "MIN", callback: Callback ]): Result; zinterstore(...args: [ destination: RedisKey, numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", min: "MIN" ]): Result; zinterstore(...args: [ destination: RedisKey, numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", max: "MAX", callback: Callback ]): Result; zinterstore(...args: [ destination: RedisKey, numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", max: "MAX" ]): Result; /** * Returns the number of members in a sorted set within a lexicographical range. * - _group_: sorted-set * - _complexity_: O(log(N)) with N being the number of elements in the sorted set. * - _since_: 2.8.9 */ zlexcount(key: RedisKey, min: string | Buffer | number, max: string | Buffer | number, callback?: Callback): Result; /** * Returns the highest- or lowest-scoring members from one or more sorted sets after removing them. Deletes the sorted set if the last member was popped. * - _group_: sorted-set * - _complexity_: O(K) + O(M*log(N)) where K is the number of provided keys, N being the number of elements in the sorted set, and M being the number of elements popped. * - _since_: 7.0.0 */ zmpop(...args: [ numkeys: number | string, ...keys: RedisKey[], min: "MIN", callback: Callback ]): Result; zmpop(...args: [ numkeys: number | string, keys: RedisKey[], min: "MIN", callback: Callback ]): Result; zmpop(...args: [numkeys: number | string, ...keys: RedisKey[], min: "MIN"]): Result; zmpop(...args: [numkeys: number | string, keys: RedisKey[], min: "MIN"]): Result; zmpop(...args: [ numkeys: number | string, ...keys: RedisKey[], min: "MIN", countToken: "COUNT", count: number | string, callback: Callback ]): Result; zmpop(...args: [ numkeys: number | string, keys: RedisKey[], min: "MIN", countToken: "COUNT", count: number | string, callback: Callback ]): Result; zmpop(...args: [ numkeys: number | string, ...keys: RedisKey[], min: "MIN", countToken: "COUNT", count: number | string ]): Result; zmpop(...args: [ numkeys: number | string, keys: RedisKey[], min: "MIN", countToken: "COUNT", count: number | string ]): Result; zmpop(...args: [ numkeys: number | string, ...keys: RedisKey[], max: "MAX", callback: Callback ]): Result; zmpop(...args: [ numkeys: number | string, keys: RedisKey[], max: "MAX", callback: Callback ]): Result; zmpop(...args: [numkeys: number | string, ...keys: RedisKey[], max: "MAX"]): Result; zmpop(...args: [numkeys: number | string, keys: RedisKey[], max: "MAX"]): Result; zmpop(...args: [ numkeys: number | string, ...keys: RedisKey[], max: "MAX", countToken: "COUNT", count: number | string, callback: Callback ]): Result; zmpop(...args: [ numkeys: number | string, keys: RedisKey[], max: "MAX", countToken: "COUNT", count: number | string, callback: Callback ]): Result; zmpop(...args: [ numkeys: number | string, ...keys: RedisKey[], max: "MAX", countToken: "COUNT", count: number | string ]): Result; zmpop(...args: [ numkeys: number | string, keys: RedisKey[], max: "MAX", countToken: "COUNT", count: number | string ]): Result; /** * Returns the score of one or more members in a sorted set. * - _group_: sorted-set * - _complexity_: O(N) where N is the number of members being requested. * - _since_: 6.2.0 */ zmscore(...args: [ key: RedisKey, ...members: (string | Buffer | number)[], callback: Callback<(string | null)[]> ]): Result<(string | null)[], Context>; zmscoreBuffer(...args: [ key: RedisKey, ...members: (string | Buffer | number)[], callback: Callback<(Buffer | null)[]> ]): Result<(Buffer | null)[], Context>; zmscore(...args: [ key: RedisKey, members: (string | Buffer | number)[], callback: Callback<(string | null)[]> ]): Result<(string | null)[], Context>; zmscoreBuffer(...args: [ key: RedisKey, members: (string | Buffer | number)[], callback: Callback<(Buffer | null)[]> ]): Result<(Buffer | null)[], Context>; zmscore(...args: [key: RedisKey, ...members: (string | Buffer | number)[]]): Result<(string | null)[], Context>; zmscoreBuffer(...args: [key: RedisKey, ...members: (string | Buffer | number)[]]): Result<(Buffer | null)[], Context>; zmscore(...args: [key: RedisKey, members: (string | Buffer | number)[]]): Result<(string | null)[], Context>; zmscoreBuffer(...args: [key: RedisKey, members: (string | Buffer | number)[]]): Result<(Buffer | null)[], Context>; /** * Returns the highest-scoring members from a sorted set after removing them. Deletes the sorted set if the last member was popped. * - _group_: sorted-set * - _complexity_: O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped. * - _since_: 5.0.0 */ zpopmax(key: RedisKey, callback?: Callback): Result; zpopmaxBuffer(key: RedisKey, callback?: Callback): Result; zpopmax(key: RedisKey, count: number | string, callback?: Callback): Result; zpopmaxBuffer(key: RedisKey, count: number | string, callback?: Callback): Result; /** * Returns the lowest-scoring members from a sorted set after removing them. Deletes the sorted set if the last member was popped. * - _group_: sorted-set * - _complexity_: O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped. * - _since_: 5.0.0 */ zpopmin(key: RedisKey, callback?: Callback): Result; zpopminBuffer(key: RedisKey, callback?: Callback): Result; zpopmin(key: RedisKey, count: number | string, callback?: Callback): Result; zpopminBuffer(key: RedisKey, count: number | string, callback?: Callback): Result; /** * Returns one or more random members from a sorted set. * - _group_: sorted-set * - _complexity_: O(N) where N is the number of members returned * - _since_: 6.2.0 */ zrandmember(key: RedisKey, callback?: Callback): Result; zrandmemberBuffer(key: RedisKey, callback?: Callback): Result; zrandmember(key: RedisKey, count: number | string, callback?: Callback): Result; zrandmemberBuffer(key: RedisKey, count: number | string, callback?: Callback): Result; zrandmember(key: RedisKey, count: number | string, withscores: "WITHSCORES", callback?: Callback): Result; zrandmemberBuffer(key: RedisKey, count: number | string, withscores: "WITHSCORES", callback?: Callback): Result; /** * Returns members in a sorted set within a range of indexes. * - _group_: sorted-set * - _complexity_: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned. * - _since_: 1.2.0 */ zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, callback?: Callback): Result; zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, callback?: Callback): Result; zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, withscores: "WITHSCORES", callback?: Callback): Result; zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, withscores: "WITHSCORES", callback?: Callback): Result; zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, limitToken: "LIMIT", offset: number | string, count: number | string, withscores: "WITHSCORES", callback?: Callback): Result; zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, limitToken: "LIMIT", offset: number | string, count: number | string, withscores: "WITHSCORES", callback?: Callback): Result; zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, rev: "REV", callback?: Callback): Result; zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, rev: "REV", callback?: Callback): Result; zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, rev: "REV", withscores: "WITHSCORES", callback?: Callback): Result; zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, rev: "REV", withscores: "WITHSCORES", callback?: Callback): Result; zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, withscores: "WITHSCORES", callback?: Callback): Result; zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, withscores: "WITHSCORES", callback?: Callback): Result; zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", callback?: Callback): Result; zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", callback?: Callback): Result; zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", withscores: "WITHSCORES", callback?: Callback): Result; zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", withscores: "WITHSCORES", callback?: Callback): Result; zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", limitToken: "LIMIT", offset: number | string, count: number | string, withscores: "WITHSCORES", callback?: Callback): Result; zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", limitToken: "LIMIT", offset: number | string, count: number | string, withscores: "WITHSCORES", callback?: Callback): Result; zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", rev: "REV", callback?: Callback): Result; zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", rev: "REV", callback?: Callback): Result; zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", rev: "REV", withscores: "WITHSCORES", callback?: Callback): Result; zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", rev: "REV", withscores: "WITHSCORES", callback?: Callback): Result; zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, withscores: "WITHSCORES", callback?: Callback): Result; zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, byscore: "BYSCORE", rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, withscores: "WITHSCORES", callback?: Callback): Result; zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", callback?: Callback): Result; zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", callback?: Callback): Result; zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", withscores: "WITHSCORES", callback?: Callback): Result; zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", withscores: "WITHSCORES", callback?: Callback): Result; zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", limitToken: "LIMIT", offset: number | string, count: number | string, withscores: "WITHSCORES", callback?: Callback): Result; zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", limitToken: "LIMIT", offset: number | string, count: number | string, withscores: "WITHSCORES", callback?: Callback): Result; zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", rev: "REV", callback?: Callback): Result; zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", rev: "REV", callback?: Callback): Result; zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", rev: "REV", withscores: "WITHSCORES", callback?: Callback): Result; zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", rev: "REV", withscores: "WITHSCORES", callback?: Callback): Result; zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; zrange(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, withscores: "WITHSCORES", callback?: Callback): Result; zrangeBuffer(key: RedisKey, start: string | Buffer | number, stop: string | Buffer, bylex: "BYLEX", rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, withscores: "WITHSCORES", callback?: Callback): Result; /** * Returns members in a sorted set within a lexicographical range. * - _group_: sorted-set * - _complexity_: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)). * - _since_: 2.8.9 */ zrangebylex(key: RedisKey, min: string | Buffer | number, max: string | Buffer | number, callback?: Callback): Result; zrangebylexBuffer(key: RedisKey, min: string | Buffer | number, max: string | Buffer | number, callback?: Callback): Result; zrangebylex(key: RedisKey, min: string | Buffer | number, max: string | Buffer | number, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; zrangebylexBuffer(key: RedisKey, min: string | Buffer | number, max: string | Buffer | number, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; /** * Returns members in a sorted set within a range of scores. * - _group_: sorted-set * - _complexity_: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)). * - _since_: 1.0.5 */ zrangebyscore(key: RedisKey, min: number | string, max: number | string, callback?: Callback): Result; zrangebyscoreBuffer(key: RedisKey, min: number | string, max: number | string, callback?: Callback): Result; zrangebyscore(key: RedisKey, min: number | string, max: number | string, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; zrangebyscoreBuffer(key: RedisKey, min: number | string, max: number | string, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; zrangebyscore(key: RedisKey, min: number | string, max: number | string, withscores: "WITHSCORES", callback?: Callback): Result; zrangebyscoreBuffer(key: RedisKey, min: number | string, max: number | string, withscores: "WITHSCORES", callback?: Callback): Result; zrangebyscore(key: RedisKey, min: number | string, max: number | string, withscores: "WITHSCORES", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; zrangebyscoreBuffer(key: RedisKey, min: number | string, max: number | string, withscores: "WITHSCORES", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; /** * Stores a range of members from sorted set in a key. * - _group_: sorted-set * - _complexity_: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements stored into the destination key. * - _since_: 6.2.0 */ zrangestore(dst: RedisKey, src: RedisKey, min: string | Buffer | number, max: string | Buffer | number, callback?: Callback): Result; zrangestore(dst: RedisKey, src: RedisKey, min: string | Buffer | number, max: string | Buffer | number, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; zrangestore(dst: RedisKey, src: RedisKey, min: string | Buffer | number, max: string | Buffer | number, rev: "REV", callback?: Callback): Result; zrangestore(dst: RedisKey, src: RedisKey, min: string | Buffer | number, max: string | Buffer | number, rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; zrangestore(dst: RedisKey, src: RedisKey, min: string | Buffer | number, max: string | Buffer | number, byscore: "BYSCORE", callback?: Callback): Result; zrangestore(dst: RedisKey, src: RedisKey, min: string | Buffer | number, max: string | Buffer | number, byscore: "BYSCORE", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; zrangestore(dst: RedisKey, src: RedisKey, min: string | Buffer | number, max: string | Buffer | number, byscore: "BYSCORE", rev: "REV", callback?: Callback): Result; zrangestore(dst: RedisKey, src: RedisKey, min: string | Buffer | number, max: string | Buffer | number, byscore: "BYSCORE", rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; zrangestore(dst: RedisKey, src: RedisKey, min: string | Buffer | number, max: string | Buffer | number, bylex: "BYLEX", callback?: Callback): Result; zrangestore(dst: RedisKey, src: RedisKey, min: string | Buffer | number, max: string | Buffer | number, bylex: "BYLEX", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; zrangestore(dst: RedisKey, src: RedisKey, min: string | Buffer | number, max: string | Buffer | number, bylex: "BYLEX", rev: "REV", callback?: Callback): Result; zrangestore(dst: RedisKey, src: RedisKey, min: string | Buffer | number, max: string | Buffer | number, bylex: "BYLEX", rev: "REV", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; /** * Returns the index of a member in a sorted set ordered by ascending scores. * - _group_: sorted-set * - _complexity_: O(log(N)) * - _since_: 2.0.0 */ zrank(key: RedisKey, member: string | Buffer | number, callback?: Callback): Result; zrank(key: RedisKey, member: string | Buffer | number, withscore: "WITHSCORE", callback?: Callback): Result; /** * Removes one or more members from a sorted set. Deletes the sorted set if all members were removed. * - _group_: sorted-set * - _complexity_: O(M*log(N)) with N being the number of elements in the sorted set and M the number of elements to be removed. * - _since_: 1.2.0 */ zrem(...args: [ key: RedisKey, ...members: (string | Buffer | number)[], callback: Callback ]): Result; zrem(...args: [ key: RedisKey, members: (string | Buffer | number)[], callback: Callback ]): Result; zrem(...args: [key: RedisKey, ...members: (string | Buffer | number)[]]): Result; zrem(...args: [key: RedisKey, members: (string | Buffer | number)[]]): Result; /** * Removes members in a sorted set within a lexicographical range. Deletes the sorted set if all members were removed. * - _group_: sorted-set * - _complexity_: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation. * - _since_: 2.8.9 */ zremrangebylex(key: RedisKey, min: string | Buffer | number, max: string | Buffer | number, callback?: Callback): Result; /** * Removes members in a sorted set within a range of indexes. Deletes the sorted set if all members were removed. * - _group_: sorted-set * - _complexity_: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation. * - _since_: 2.0.0 */ zremrangebyrank(key: RedisKey, start: number | string, stop: number | string, callback?: Callback): Result; /** * Removes members in a sorted set within a range of scores. Deletes the sorted set if all members were removed. * - _group_: sorted-set * - _complexity_: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation. * - _since_: 1.2.0 */ zremrangebyscore(key: RedisKey, min: number | string, max: number | string, callback?: Callback): Result; /** * Returns members in a sorted set within a range of indexes in reverse order. * - _group_: sorted-set * - _complexity_: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned. * - _since_: 1.2.0 */ zrevrange(key: RedisKey, start: number | string, stop: number | string, callback?: Callback): Result; zrevrangeBuffer(key: RedisKey, start: number | string, stop: number | string, callback?: Callback): Result; zrevrange(key: RedisKey, start: number | string, stop: number | string, withscores: "WITHSCORES", callback?: Callback): Result; zrevrangeBuffer(key: RedisKey, start: number | string, stop: number | string, withscores: "WITHSCORES", callback?: Callback): Result; /** * Returns members in a sorted set within a lexicographical range in reverse order. * - _group_: sorted-set * - _complexity_: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)). * - _since_: 2.8.9 */ zrevrangebylex(key: RedisKey, max: string | Buffer | number, min: string | Buffer | number, callback?: Callback): Result; zrevrangebylexBuffer(key: RedisKey, max: string | Buffer | number, min: string | Buffer | number, callback?: Callback): Result; zrevrangebylex(key: RedisKey, max: string | Buffer | number, min: string | Buffer | number, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; zrevrangebylexBuffer(key: RedisKey, max: string | Buffer | number, min: string | Buffer | number, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; /** * Returns members in a sorted set within a range of scores in reverse order. * - _group_: sorted-set * - _complexity_: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)). * - _since_: 2.2.0 */ zrevrangebyscore(key: RedisKey, max: number | string, min: number | string, callback?: Callback): Result; zrevrangebyscoreBuffer(key: RedisKey, max: number | string, min: number | string, callback?: Callback): Result; zrevrangebyscore(key: RedisKey, max: number | string, min: number | string, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; zrevrangebyscoreBuffer(key: RedisKey, max: number | string, min: number | string, limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; zrevrangebyscore(key: RedisKey, max: number | string, min: number | string, withscores: "WITHSCORES", callback?: Callback): Result; zrevrangebyscoreBuffer(key: RedisKey, max: number | string, min: number | string, withscores: "WITHSCORES", callback?: Callback): Result; zrevrangebyscore(key: RedisKey, max: number | string, min: number | string, withscores: "WITHSCORES", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; zrevrangebyscoreBuffer(key: RedisKey, max: number | string, min: number | string, withscores: "WITHSCORES", limitToken: "LIMIT", offset: number | string, count: number | string, callback?: Callback): Result; /** * Returns the index of a member in a sorted set ordered by descending scores. * - _group_: sorted-set * - _complexity_: O(log(N)) * - _since_: 2.0.0 */ zrevrank(key: RedisKey, member: string | Buffer | number, callback?: Callback): Result; zrevrank(key: RedisKey, member: string | Buffer | number, withscore: "WITHSCORE", callback?: Callback): Result; /** * Iterates over members and scores of a sorted set. * - _group_: sorted-set * - _complexity_: O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection. * - _since_: 2.8.0 */ zscan(key: RedisKey, cursor: number | string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; zscanBuffer(key: RedisKey, cursor: number | string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; zscan(key: RedisKey, cursor: number | string, noscores: "NOSCORES", callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; zscanBuffer(key: RedisKey, cursor: number | string, noscores: "NOSCORES", callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; zscan(key: RedisKey, cursor: number | string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; zscanBuffer(key: RedisKey, cursor: number | string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; zscan(key: RedisKey, cursor: number | string, countToken: "COUNT", count: number | string, noscores: "NOSCORES", callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; zscanBuffer(key: RedisKey, cursor: number | string, countToken: "COUNT", count: number | string, noscores: "NOSCORES", callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; zscan(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; zscanBuffer(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; zscan(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, noscores: "NOSCORES", callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; zscanBuffer(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, noscores: "NOSCORES", callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; zscan(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; zscanBuffer(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; zscan(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, noscores: "NOSCORES", callback?: Callback<[cursor: string, elements: string[]]>): Result<[cursor: string, elements: string[]], Context>; zscanBuffer(key: RedisKey, cursor: number | string, patternToken: "MATCH", pattern: string, countToken: "COUNT", count: number | string, noscores: "NOSCORES", callback?: Callback<[cursor: Buffer, elements: Buffer[]]>): Result<[cursor: Buffer, elements: Buffer[]], Context>; /** * Returns the score of a member in a sorted set. * - _group_: sorted-set * - _complexity_: O(1) * - _since_: 1.2.0 */ zscore(key: RedisKey, member: string | Buffer | number, callback?: Callback): Result; zscoreBuffer(key: RedisKey, member: string | Buffer | number, callback?: Callback): Result; /** * Returns the union of multiple sorted sets. * - _group_: sorted-set * - _complexity_: O(N)+O(M*log(M)) with N being the sum of the sizes of the input sorted sets, and M being the number of elements in the resulting sorted set. * - _since_: 6.2.0 */ zunion(...args: [ numkeys: number | string, ...keys: RedisKey[], callback: Callback ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], callback: Callback ]): Result; zunion(...args: [ numkeys: number | string, keys: RedisKey[], callback: Callback ]): Result; zunionBuffer(...args: [ numkeys: number | string, keys: RedisKey[], callback: Callback ]): Result; zunion(...args: [numkeys: number | string, ...keys: RedisKey[]]): Result; zunionBuffer(...args: [numkeys: number | string, ...keys: RedisKey[]]): Result; zunion(...args: [numkeys: number | string, keys: RedisKey[]]): Result; zunionBuffer(...args: [numkeys: number | string, keys: RedisKey[]]): Result; zunion(...args: [ numkeys: number | string, ...keys: RedisKey[], withscores: "WITHSCORES", callback: Callback ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], withscores: "WITHSCORES", callback: Callback ]): Result; zunion(...args: [ numkeys: number | string, keys: RedisKey[], withscores: "WITHSCORES", callback: Callback ]): Result; zunionBuffer(...args: [ numkeys: number | string, keys: RedisKey[], withscores: "WITHSCORES", callback: Callback ]): Result; zunion(...args: [ numkeys: number | string, ...keys: RedisKey[], withscores: "WITHSCORES" ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], withscores: "WITHSCORES" ]): Result; zunion(...args: [ numkeys: number | string, keys: RedisKey[], withscores: "WITHSCORES" ]): Result; zunionBuffer(...args: [ numkeys: number | string, keys: RedisKey[], withscores: "WITHSCORES" ]): Result; zunion(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", callback: Callback ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", callback: Callback ]): Result; zunion(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", callback: Callback ]): Result; zunionBuffer(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", callback: Callback ]): Result; zunion(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM" ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM" ]): Result; zunion(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM" ]): Result; zunionBuffer(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM" ]): Result; zunion(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", withscores: "WITHSCORES", callback: Callback ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", withscores: "WITHSCORES", callback: Callback ]): Result; zunion(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", withscores: "WITHSCORES", callback: Callback ]): Result; zunionBuffer(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", withscores: "WITHSCORES", callback: Callback ]): Result; zunion(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", withscores: "WITHSCORES" ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", withscores: "WITHSCORES" ]): Result; zunion(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", withscores: "WITHSCORES" ]): Result; zunionBuffer(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", withscores: "WITHSCORES" ]): Result; zunion(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", callback: Callback ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", callback: Callback ]): Result; zunion(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", callback: Callback ]): Result; zunionBuffer(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", callback: Callback ]): Result; zunion(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN" ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN" ]): Result; zunion(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN" ]): Result; zunionBuffer(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN" ]): Result; zunion(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", withscores: "WITHSCORES", callback: Callback ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", withscores: "WITHSCORES", callback: Callback ]): Result; zunion(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", withscores: "WITHSCORES", callback: Callback ]): Result; zunionBuffer(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", withscores: "WITHSCORES", callback: Callback ]): Result; zunion(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", withscores: "WITHSCORES" ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", withscores: "WITHSCORES" ]): Result; zunion(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", withscores: "WITHSCORES" ]): Result; zunionBuffer(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", withscores: "WITHSCORES" ]): Result; zunion(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", callback: Callback ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", callback: Callback ]): Result; zunion(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", callback: Callback ]): Result; zunionBuffer(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", callback: Callback ]): Result; zunion(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX" ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX" ]): Result; zunion(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX" ]): Result; zunionBuffer(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX" ]): Result; zunion(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", withscores: "WITHSCORES", callback: Callback ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", withscores: "WITHSCORES", callback: Callback ]): Result; zunion(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", withscores: "WITHSCORES", callback: Callback ]): Result; zunionBuffer(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", withscores: "WITHSCORES", callback: Callback ]): Result; zunion(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", withscores: "WITHSCORES" ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", withscores: "WITHSCORES" ]): Result; zunion(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", withscores: "WITHSCORES" ]): Result; zunionBuffer(...args: [ numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", withscores: "WITHSCORES" ]): Result; zunion(...args: [ numkeys: number | string, ...args: RedisValue[], callback: Callback ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], callback: Callback ]): Result; zunion(...args: [numkeys: number | string, ...args: RedisValue[]]): Result; zunionBuffer(...args: [numkeys: number | string, ...args: RedisValue[]]): Result; zunion(...args: [ numkeys: number | string, ...args: RedisValue[], withscores: "WITHSCORES", callback: Callback ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], withscores: "WITHSCORES", callback: Callback ]): Result; zunion(...args: [ numkeys: number | string, ...args: RedisValue[], withscores: "WITHSCORES" ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], withscores: "WITHSCORES" ]): Result; zunion(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", sum: "SUM", callback: Callback ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", sum: "SUM", callback: Callback ]): Result; zunion(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", sum: "SUM" ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", sum: "SUM" ]): Result; zunion(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", sum: "SUM", withscores: "WITHSCORES", callback: Callback ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", sum: "SUM", withscores: "WITHSCORES", callback: Callback ]): Result; zunion(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", sum: "SUM", withscores: "WITHSCORES" ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", sum: "SUM", withscores: "WITHSCORES" ]): Result; zunion(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", min: "MIN", callback: Callback ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", min: "MIN", callback: Callback ]): Result; zunion(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", min: "MIN" ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", min: "MIN" ]): Result; zunion(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", min: "MIN", withscores: "WITHSCORES", callback: Callback ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", min: "MIN", withscores: "WITHSCORES", callback: Callback ]): Result; zunion(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", min: "MIN", withscores: "WITHSCORES" ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", min: "MIN", withscores: "WITHSCORES" ]): Result; zunion(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", max: "MAX", callback: Callback ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", max: "MAX", callback: Callback ]): Result; zunion(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", max: "MAX" ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", max: "MAX" ]): Result; zunion(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", max: "MAX", withscores: "WITHSCORES", callback: Callback ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", max: "MAX", withscores: "WITHSCORES", callback: Callback ]): Result; zunion(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", max: "MAX", withscores: "WITHSCORES" ]): Result; zunionBuffer(...args: [ numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", max: "MAX", withscores: "WITHSCORES" ]): Result; /** * Stores the union of multiple sorted sets in a key. * - _group_: sorted-set * - _complexity_: O(N)+O(M log(M)) with N being the sum of the sizes of the input sorted sets, and M being the number of elements in the resulting sorted set. * - _since_: 2.0.0 */ zunionstore(...args: [ destination: RedisKey, numkeys: number | string, ...keys: RedisKey[], callback: Callback ]): Result; zunionstore(...args: [ destination: RedisKey, numkeys: number | string, keys: RedisKey[], callback: Callback ]): Result; zunionstore(...args: [ destination: RedisKey, numkeys: number | string, ...keys: RedisKey[] ]): Result; zunionstore(...args: [destination: RedisKey, numkeys: number | string, keys: RedisKey[]]): Result; zunionstore(...args: [ destination: RedisKey, numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", callback: Callback ]): Result; zunionstore(...args: [ destination: RedisKey, numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM", callback: Callback ]): Result; zunionstore(...args: [ destination: RedisKey, numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM" ]): Result; zunionstore(...args: [ destination: RedisKey, numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", sum: "SUM" ]): Result; zunionstore(...args: [ destination: RedisKey, numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", callback: Callback ]): Result; zunionstore(...args: [ destination: RedisKey, numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN", callback: Callback ]): Result; zunionstore(...args: [ destination: RedisKey, numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN" ]): Result; zunionstore(...args: [ destination: RedisKey, numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", min: "MIN" ]): Result; zunionstore(...args: [ destination: RedisKey, numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", callback: Callback ]): Result; zunionstore(...args: [ destination: RedisKey, numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX", callback: Callback ]): Result; zunionstore(...args: [ destination: RedisKey, numkeys: number | string, ...keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX" ]): Result; zunionstore(...args: [ destination: RedisKey, numkeys: number | string, keys: RedisKey[], aggregate: "AGGREGATE", max: "MAX" ]): Result; zunionstore(...args: [ destination: RedisKey, numkeys: number | string, ...args: RedisValue[], callback: Callback ]): Result; zunionstore(...args: [ destination: RedisKey, numkeys: number | string, ...args: RedisValue[] ]): Result; zunionstore(...args: [ destination: RedisKey, numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", sum: "SUM", callback: Callback ]): Result; zunionstore(...args: [ destination: RedisKey, numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", sum: "SUM" ]): Result; zunionstore(...args: [ destination: RedisKey, numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", min: "MIN", callback: Callback ]): Result; zunionstore(...args: [ destination: RedisKey, numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", min: "MIN" ]): Result; zunionstore(...args: [ destination: RedisKey, numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", max: "MAX", callback: Callback ]): Result; zunionstore(...args: [ destination: RedisKey, numkeys: number | string, ...args: RedisValue[], aggregate: "AGGREGATE", max: "MAX" ]): Result; } export default RedisCommander;