import COMMANDS from '../commands'; import { MULTI_REPLY, MultiReply, MultiReplyType, RedisMultiQueuedCommand } from '../multi-command'; import { ReplyWithTypeMapping, CommandReply, Command, CommandArguments, CommanderConfig, RedisFunctions, RedisModules, RedisScripts, RespVersions, TransformReply, TypeMapping, RedisArgument } from '../RESP/types'; import { Tail } from '../commands/generic-transformers'; type CommandSignature, C extends Command, M extends RedisModules, F extends RedisFunctions, S extends RedisScripts, RESP extends RespVersions, TYPE_MAPPING extends TypeMapping> = (...args: Tail>) => RedisClusterMultiCommandType<[ ...REPLIES, ReplyWithTypeMapping, TYPE_MAPPING> ], M, F, S, RESP, TYPE_MAPPING>; type WithCommands, M extends RedisModules, F extends RedisFunctions, S extends RedisScripts, RESP extends RespVersions, TYPE_MAPPING extends TypeMapping> = { [P in keyof typeof COMMANDS]: CommandSignature; }; type WithModules, M extends RedisModules, F extends RedisFunctions, S extends RedisScripts, RESP extends RespVersions, TYPE_MAPPING extends TypeMapping> = { [P in keyof M]: { [C in keyof M[P]]: CommandSignature; }; }; type WithFunctions, M extends RedisModules, F extends RedisFunctions, S extends RedisScripts, RESP extends RespVersions, TYPE_MAPPING extends TypeMapping> = { [L in keyof F]: { [C in keyof F[L]]: CommandSignature; }; }; type WithScripts, M extends RedisModules, F extends RedisFunctions, S extends RedisScripts, RESP extends RespVersions, TYPE_MAPPING extends TypeMapping> = { [P in keyof S]: CommandSignature; }; export type RedisClusterMultiCommandType, M extends RedisModules, F extends RedisFunctions, S extends RedisScripts, RESP extends RespVersions, TYPE_MAPPING extends TypeMapping> = (RedisClusterMultiCommand & WithCommands & WithModules & WithFunctions & WithScripts); export type ClusterMultiExecute = (firstKey: RedisArgument | undefined, isReadonly: boolean | undefined, commands: Array) => Promise>; export default class RedisClusterMultiCommand { #private; static extend, F extends RedisFunctions = Record, S extends RedisScripts = Record, RESP extends RespVersions = 2>(config?: CommanderConfig): any; constructor(executeMulti: ClusterMultiExecute, executePipeline: ClusterMultiExecute, routing: RedisArgument | undefined, typeMapping?: TypeMapping); addCommand(firstKey: RedisArgument | undefined, isReadonly: boolean | undefined, args: CommandArguments, transformReply?: TransformReply): this; exec(execAsPipeline?: boolean): Promise>; EXEC: (execAsPipeline?: boolean) => Promise>; execTyped(execAsPipeline?: boolean): Promise; execAsPipeline(): Promise>; execAsPipelineTyped(): Promise; } export {}; //# sourceMappingURL=multi-command.d.ts.map