From b82b0bbfbdbc4f49f20afc0783c389e8c9dfb953 Mon Sep 17 00:00:00 2001 From: Siarhei Fedartsou Date: Sat, 2 Nov 2024 11:07:50 +0100 Subject: [PATCH] Add *Buffer methods typings for XCLAIM/XAUTOCLAIM/XREADGROUP/XPENDING Signed-off-by: Siarhei Fedartsou --- lib/utils/RedisCommander.ts | 3144 ++++++++++++++++++++++++++++++----- 1 file changed, 2713 insertions(+), 431 deletions(-) diff --git a/lib/utils/RedisCommander.ts b/lib/utils/RedisCommander.ts index 215ed50..52a8407 100644 --- a/lib/utils/RedisCommander.ts +++ b/lib/utils/RedisCommander.ts @@ -8579,6 +8579,84 @@ interface RedisCommander { justid: "JUSTID", callback?: Callback ): Result; + + xautoclaimBuffer( + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + start: string | Buffer | number, + callback?: Callback + ): Result; + xautoclaimBuffer( + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + start: string | Buffer | number, + justid: "JUSTID", + callback?: Callback + ): Result; + xautoclaimBuffer( + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + start: string | Buffer | number, + countToken: "COUNT", + count: number | string, + callback?: Callback + ): Result; + xautoclaimBuffer( + 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; + + xautoclaimBuffer( + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + start: string | Buffer | number, + callback?: Callback + ): Result; + xautoclaimBuffer( + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + start: string | Buffer | number, + justid: "JUSTID", + callback?: Callback + ): Result; + xautoclaimBuffer( + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + start: string | Buffer | number, + countToken: "COUNT", + count: number | string, + callback?: Callback + ): Result; + xautoclaimBuffer( + 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 to the specified consumer. @@ -8818,58 +8896,6 @@ interface RedisCommander { justid: "JUSTID" ] ): Result; - xclaim( - ...args: [ - key: RedisKey, - group: string | Buffer, - consumer: string | Buffer, - minIdleTime: string | Buffer | number, - ...ids: (string | Buffer | number)[], - unixTimeMillisecondsToken: "TIME", - unixTimeMilliseconds: number | string, - force: "FORCE", - callback: Callback - ] - ): Result; - xclaim( - ...args: [ - key: RedisKey, - group: string | Buffer, - consumer: string | Buffer, - minIdleTime: string | Buffer | number, - ...ids: (string | Buffer | number)[], - unixTimeMillisecondsToken: "TIME", - unixTimeMilliseconds: number | string, - force: "FORCE" - ] - ): Result; - xclaim( - ...args: [ - key: RedisKey, - group: string | Buffer, - consumer: string | Buffer, - minIdleTime: string | Buffer | number, - ...ids: (string | Buffer | number)[], - unixTimeMillisecondsToken: "TIME", - unixTimeMilliseconds: number | string, - force: "FORCE", - justid: "JUSTID", - callback: Callback - ] - ): Result; - xclaim( - ...args: [ - key: RedisKey, - group: string | Buffer, - consumer: string | Buffer, - minIdleTime: string | Buffer | number, - ...ids: (string | Buffer | number)[], - unixTimeMillisecondsToken: "TIME", - unixTimeMilliseconds: number | string, - force: "FORCE", - justid: "JUSTID" - ] - ): Result; xclaim( ...args: [ key: RedisKey, @@ -9451,142 +9477,1924 @@ interface RedisCommander { ] ): Result; - /** - * Removes the specified entries from the stream. Returns the number of items actually deleted, that may be different from the number of IDs passed in case certain IDs do not exist. - * - _group_: stream - * - _complexity_: O(1) for each single item to delete in the stream, regardless of the stream size. - * - _since_: 5.0.0 - */ - xdel( + xclaimBuffer( ...args: [ key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, ...ids: (string | Buffer | number)[], - callback: Callback + callback: Callback ] - ): Result; - xdel( - ...args: [key: RedisKey, ...ids: (string | Buffer | number)[]] - ): Result; - - /** - * Create a consumer group. - * - _group_: stream - * - _complexity_: O(1) - * - _since_: 5.0.0 - */ - xgroup( - subcommand: "CREATE", - key: RedisKey, - groupname: string | Buffer, - id: string | Buffer | number, - callback?: Callback - ): Result; - xgroup( - subcommand: "CREATE", - key: RedisKey, - groupname: string | Buffer, - id: string | Buffer | number, - entriesReadToken: "ENTRIESREAD", - entriesRead: number | string, - callback?: Callback - ): Result; - xgroup( - subcommand: "CREATE", - key: RedisKey, - groupname: string | Buffer, - id: string | Buffer | number, - mkstream: "MKSTREAM", - callback?: Callback - ): Result; - xgroup( - subcommand: "CREATE", - key: RedisKey, - groupname: string | Buffer, - id: string | Buffer | number, - mkstream: "MKSTREAM", - entriesReadToken: "ENTRIESREAD", - entriesRead: number | string, - callback?: Callback - ): Result; - xgroup( - subcommand: "CREATE", - key: RedisKey, - groupname: string | Buffer, - newId: "$", - callback?: Callback - ): Result; - xgroup( - subcommand: "CREATE", - key: RedisKey, - groupname: string | Buffer, - newId: "$", - entriesReadToken: "ENTRIESREAD", - entriesRead: number | string, - callback?: Callback - ): Result; - xgroup( - subcommand: "CREATE", - key: RedisKey, - groupname: string | Buffer, - newId: "$", - mkstream: "MKSTREAM", - callback?: Callback - ): Result; - xgroup( - subcommand: "CREATE", - key: RedisKey, - groupname: string | Buffer, - newId: "$", - mkstream: "MKSTREAM", - entriesReadToken: "ENTRIESREAD", - entriesRead: number | string, - callback?: Callback - ): Result; - - /** - * Create a consumer in a consumer group. - * - _group_: stream - * - _complexity_: O(1) - * - _since_: 6.2.0 - */ - xgroup( - subcommand: "CREATECONSUMER", - key: RedisKey, - groupname: string | Buffer, - consumername: string | Buffer, - callback?: Callback - ): Result; - - /** - * Delete a consumer from a consumer group. - * - _group_: stream - * - _complexity_: O(1) - * - _since_: 5.0.0 - */ - xgroup( - subcommand: "DELCONSUMER", - key: RedisKey, - groupname: string | Buffer, - consumername: string | Buffer, - callback?: Callback - ): Result; - - /** - * Destroy 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, - groupname: string | Buffer, - callback?: Callback - ): Result; - - /** - * Show helpful text about the different subcommands - * - _group_: stream + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[] + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + force: "FORCE", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + force: "FORCE" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + force: "FORCE", + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + force: "FORCE", + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + countToken: "RETRYCOUNT", + count: number | string, + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + countToken: "RETRYCOUNT", + count: number | string + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + countToken: "RETRYCOUNT", + count: number | string, + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + countToken: "RETRYCOUNT", + count: number | string, + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE", + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE", + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + force: "FORCE", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + force: "FORCE" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + force: "FORCE", + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + force: "FORCE", + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + force: "FORCE", + callback: Callback + ] + ): Result; + xclaim( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + force: "FORCE" + ] + ): Result; + xclaim( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + force: "FORCE", + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + force: "FORCE", + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE", + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE", + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + force: "FORCE", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + force: "FORCE" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + force: "FORCE", + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + force: "FORCE", + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + countToken: "RETRYCOUNT", + count: number | string, + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + countToken: "RETRYCOUNT", + count: number | string + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + countToken: "RETRYCOUNT", + count: number | string, + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + countToken: "RETRYCOUNT", + count: number | string, + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE", + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE", + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + force: "FORCE", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + force: "FORCE" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + force: "FORCE", + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + force: "FORCE", + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + justid: "JUSTID" + ] + ): Result; + xclaim( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE", + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaim( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE", + justid: "JUSTID" + ] + ): Result; + + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[] + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + force: "FORCE", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + force: "FORCE" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + force: "FORCE", + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + force: "FORCE", + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + countToken: "RETRYCOUNT", + count: number | string, + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + countToken: "RETRYCOUNT", + count: number | string + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + countToken: "RETRYCOUNT", + count: number | string, + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + countToken: "RETRYCOUNT", + count: number | string, + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE", + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE", + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + force: "FORCE", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + force: "FORCE" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + force: "FORCE", + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + force: "FORCE", + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE", + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE", + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + force: "FORCE", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + force: "FORCE" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + force: "FORCE", + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + force: "FORCE", + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + countToken: "RETRYCOUNT", + count: number | string, + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + countToken: "RETRYCOUNT", + count: number | string + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + countToken: "RETRYCOUNT", + count: number | string, + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + countToken: "RETRYCOUNT", + count: number | string, + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE", + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE", + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + force: "FORCE", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + force: "FORCE" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + force: "FORCE", + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + force: "FORCE", + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + justid: "JUSTID" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE" + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE", + justid: "JUSTID", + callback: Callback + ] + ): Result; + xclaimBuffer( + ...args: [ + key: RedisKey, + group: string | Buffer, + consumer: string | Buffer, + minIdleTime: string | Buffer | number, + ...ids: (string | Buffer | number)[], + msToken: "IDLE", + ms: number | string, + unixTimeMillisecondsToken: "TIME", + unixTimeMilliseconds: number | string, + countToken: "RETRYCOUNT", + count: number | string, + force: "FORCE", + justid: "JUSTID" + ] + ): Result; + + /** + * Removes the specified entries from the stream. Returns the number of items actually deleted, that may be different from the number of IDs passed in case certain IDs do not exist. + * - _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; + + /** + * Create a consumer group. + * - _group_: stream + * - _complexity_: O(1) + * - _since_: 5.0.0 + */ + xgroup( + subcommand: "CREATE", + key: RedisKey, + groupname: string | Buffer, + id: string | Buffer | number, + callback?: Callback + ): Result; + xgroup( + subcommand: "CREATE", + key: RedisKey, + groupname: string | Buffer, + id: string | Buffer | number, + entriesReadToken: "ENTRIESREAD", + entriesRead: number | string, + callback?: Callback + ): Result; + xgroup( + subcommand: "CREATE", + key: RedisKey, + groupname: string | Buffer, + id: string | Buffer | number, + mkstream: "MKSTREAM", + callback?: Callback + ): Result; + xgroup( + subcommand: "CREATE", + key: RedisKey, + groupname: string | Buffer, + id: string | Buffer | number, + mkstream: "MKSTREAM", + entriesReadToken: "ENTRIESREAD", + entriesRead: number | string, + callback?: Callback + ): Result; + xgroup( + subcommand: "CREATE", + key: RedisKey, + groupname: string | Buffer, + newId: "$", + callback?: Callback + ): Result; + xgroup( + subcommand: "CREATE", + key: RedisKey, + groupname: string | Buffer, + newId: "$", + entriesReadToken: "ENTRIESREAD", + entriesRead: number | string, + callback?: Callback + ): Result; + xgroup( + subcommand: "CREATE", + key: RedisKey, + groupname: string | Buffer, + newId: "$", + mkstream: "MKSTREAM", + callback?: Callback + ): Result; + xgroup( + subcommand: "CREATE", + key: RedisKey, + groupname: string | Buffer, + newId: "$", + mkstream: "MKSTREAM", + entriesReadToken: "ENTRIESREAD", + entriesRead: number | string, + callback?: Callback + ): Result; + + /** + * Create a consumer in a consumer group. + * - _group_: stream + * - _complexity_: O(1) + * - _since_: 6.2.0 + */ + xgroup( + subcommand: "CREATECONSUMER", + key: RedisKey, + groupname: string | Buffer, + consumername: string | Buffer, + callback?: Callback + ): Result; + + /** + * Delete a consumer from a consumer group. + * - _group_: stream + * - _complexity_: O(1) + * - _since_: 5.0.0 + */ + xgroup( + subcommand: "DELCONSUMER", + key: RedisKey, + groupname: string | Buffer, + consumername: string | Buffer, + callback?: Callback + ): Result; + + /** + * Destroy 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, + groupname: string | Buffer, + callback?: Callback + ): Result; + + /** + * Show helpful text about the different subcommands + * - _group_: stream * - _complexity_: O(1) * - _since_: 5.0.0 */ @@ -9656,347 +11464,821 @@ interface RedisCommander { xinfo( subcommand: "GROUPS", key: RedisKey, - callback?: Callback - ): Result; - - /** - * Show helpful text about the different subcommands - * - _group_: stream - * - _complexity_: O(1) - * - _since_: 5.0.0 - */ - xinfo( - subcommand: "HELP", - callback?: Callback - ): Result; + callback?: Callback + ): Result; + + /** + * Show helpful text about the different subcommands + * - _group_: stream + * - _complexity_: O(1) + * - _since_: 5.0.0 + */ + xinfo( + subcommand: "HELP", + callback?: Callback + ): Result; + + /** + * Get 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, + fullToken: "FULL", + callback?: Callback + ): Result; + xinfo( + subcommand: "STREAM", + key: RedisKey, + fullToken: "FULL", + countToken: "COUNT", + count: number | string, + callback?: Callback + ): Result; + + /** + * Return the number of entries in a stream + * - _group_: stream + * - _complexity_: O(1) + * - _since_: 5.0.0 + */ + xlen(key: RedisKey, callback?: Callback): Result; + + /** + * Return information and entries from a stream consumer group pending entries list, that are messages fetched but never acknowledged. + * - _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; + + xpendingBuffer( + key: RedisKey, + group: string | Buffer, + callback?: Callback + ): Result; + xpendingBuffer( + key: RedisKey, + group: string | Buffer, + start: string | Buffer | number, + end: string | Buffer | number, + count: number | string, + callback?: Callback + ): Result; + xpendingBuffer( + key: RedisKey, + group: string | Buffer, + start: string | Buffer | number, + end: string | Buffer | number, + count: number | string, + consumer: string | Buffer, + callback?: Callback + ): Result; + xpendingBuffer( + key: RedisKey, + group: string | Buffer, + minIdleTimeToken: "IDLE", + minIdleTime: number | string, + start: string | Buffer | number, + end: string | Buffer | number, + count: number | string, + callback?: Callback + ): Result; + xpendingBuffer( + 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; + + xpendingBuffer( + key: RedisKey, + group: string | Buffer, + callback?: Callback + ): Result; + xpendingBuffer( + key: RedisKey, + group: string | Buffer, + start: string | Buffer | number, + end: string | Buffer | number, + count: number | string, + callback?: Callback + ): Result; + xpendingBuffer( + key: RedisKey, + group: string | Buffer, + start: string | Buffer | number, + end: string | Buffer | number, + count: number | string, + consumer: string | Buffer, + callback?: Callback + ): Result; + xpendingBuffer( + key: RedisKey, + group: string | Buffer, + minIdleTimeToken: "IDLE", + minIdleTime: number | string, + start: string | Buffer | number, + end: string | Buffer | number, + count: number | string, + callback?: Callback + ): Result; + xpendingBuffer( + 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; /** - * Get information about a stream + * Return a range of elements in a stream, with IDs matching the specified IDs interval * - _group_: stream - * - _complexity_: O(1) + * - _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 */ - xinfo( - subcommand: "STREAM", + xrange( key: RedisKey, - callback?: Callback - ): Result; - xinfo( - subcommand: "STREAM", + start: string | Buffer | number, + end: string | Buffer | number, + callback?: Callback<[id: string, fields: string[]][]> + ): Result<[id: string, fields: string[]][], Context>; + xrangeBuffer( key: RedisKey, - fullToken: "FULL", - callback?: Callback - ): Result; - xinfo( - subcommand: "STREAM", + start: string | Buffer | number, + end: string | Buffer | number, + callback?: Callback<[id: Buffer, fields: Buffer[]][]> + ): Result<[id: Buffer, fields: Buffer[]][], Context>; + xrange( key: RedisKey, - fullToken: "FULL", + start: string | Buffer | number, + end: string | Buffer | number, countToken: "COUNT", count: number | string, - callback?: Callback - ): Result; + 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>; /** - * Return the number of entries in a stream + * Return never seen elements in multiple streams, with IDs greater than the ones reported by the caller for each stream. Can block. * - _group_: stream - * - _complexity_: O(1) + * - _complexity_: For each stream mentioned: O(N) with N being the number of elements being returned, it means that XREAD-ing with a fixed COUNT is O(1). Note that when the BLOCK option is used, XADD will pay O(M) time in order to serve the M clients blocked on the stream getting new data. * - _since_: 5.0.0 */ - xlen(key: RedisKey, callback?: Callback): Result; + 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 + >; /** - * Return information and entries from a stream consumer group pending entries list, that are messages fetched but never acknowledged. + * Return new entries from a stream using a consumer group, or access the history of the pending entries for a given consumer. Can block. * - _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. + * - _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 */ - xpending( - key: RedisKey, - group: string | Buffer, - callback?: Callback + xreadgroup( + ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, + streamsToken: "STREAMS", + ...args: RedisValue[], + callback: Callback + ] ): Result; - xpending( - key: RedisKey, - group: string | Buffer, - start: string | Buffer | number, - end: string | Buffer | number, - count: number | string, - callback?: Callback + xreadgroup( + ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, + streamsToken: "STREAMS", + ...args: RedisValue[] + ] ): Result; - xpending( - key: RedisKey, - group: string | Buffer, - start: string | Buffer | number, - end: string | Buffer | number, - count: number | string, - consumer: string | Buffer, - callback?: Callback + xreadgroup( + ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, + noack: "NOACK", + streamsToken: "STREAMS", + ...args: RedisValue[], + 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 + xreadgroup( + ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, + noack: "NOACK", + streamsToken: "STREAMS", + ...args: RedisValue[] + ] ): 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 + xreadgroup( + ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, + millisecondsToken: "BLOCK", + milliseconds: number | string, + streamsToken: "STREAMS", + ...args: RedisValue[], + callback: Callback + ] + ): Result; + xreadgroup( + ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, + millisecondsToken: "BLOCK", + milliseconds: number | string, + streamsToken: "STREAMS", + ...args: RedisValue[] + ] + ): Result; + xreadgroup( + ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, + millisecondsToken: "BLOCK", + milliseconds: number | string, + noack: "NOACK", + streamsToken: "STREAMS", + ...args: RedisValue[], + callback: Callback + ] + ): Result; + xreadgroup( + ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, + millisecondsToken: "BLOCK", + milliseconds: number | string, + noack: "NOACK", + streamsToken: "STREAMS", + ...args: RedisValue[] + ] + ): Result; + xreadgroup( + ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, + countToken: "COUNT", + count: number | string, + streamsToken: "STREAMS", + ...args: RedisValue[], + callback: Callback + ] + ): Result; + xreadgroup( + ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, + countToken: "COUNT", + count: number | string, + streamsToken: "STREAMS", + ...args: RedisValue[] + ] + ): Result; + xreadgroup( + ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, + countToken: "COUNT", + count: number | string, + noack: "NOACK", + streamsToken: "STREAMS", + ...args: RedisValue[], + callback: Callback + ] + ): Result; + xreadgroup( + ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, + countToken: "COUNT", + count: number | string, + noack: "NOACK", + streamsToken: "STREAMS", + ...args: RedisValue[] + ] + ): Result; + xreadgroup( + ...args: [ + groupConsumerToken: "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: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, + countToken: "COUNT", + count: number | string, + millisecondsToken: "BLOCK", + milliseconds: number | string, + streamsToken: "STREAMS", + ...args: RedisValue[] + ] + ): Result; + xreadgroup( + ...args: [ + groupConsumerToken: "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: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, + countToken: "COUNT", + count: number | string, + millisecondsToken: "BLOCK", + milliseconds: number | string, + noack: "NOACK", + streamsToken: "STREAMS", + ...args: RedisValue[] + ] ): Result; - /** - * Return a range of elements in a stream, with IDs matching the specified IDs interval - * - _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>; - - /** - * Return never seen elements in multiple streams, with IDs greater than the ones reported by the caller for each stream. Can block. - * - _group_: stream - * - _complexity_: For each stream mentioned: O(N) with N being the number of elements being returned, it means that XREAD-ing with a fixed COUNT is O(1). Note that when the BLOCK option is used, XADD will pay O(M) time in order to serve the M clients blocked on the stream getting new data. - * - _since_: 5.0.0 - */ - xread( + xreadgroupBuffer( ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, streamsToken: "STREAMS", ...args: RedisValue[], - callback: Callback< - [key: string, items: [id: string, fields: string[]][]][] | null - > + callback: Callback ] - ): Result< - [key: string, items: [id: string, fields: string[]][]][] | null, - Context - >; - xreadBuffer( + ): Result; + xreadgroupBuffer( + ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, + streamsToken: "STREAMS", + ...args: RedisValue[] + ] + ): Result; + xreadgroupBuffer( ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, + noack: "NOACK", streamsToken: "STREAMS", ...args: RedisValue[], - callback: Callback< - [key: Buffer, items: [id: Buffer, fields: Buffer[]][]][] | null - > + callback: Callback ] - ): 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( + ): Result; + xreadgroupBuffer( + ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, + noack: "NOACK", + streamsToken: "STREAMS", + ...args: RedisValue[] + ] + ): Result; + xreadgroupBuffer( ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, millisecondsToken: "BLOCK", milliseconds: number | string, streamsToken: "STREAMS", ...args: RedisValue[], - callback: Callback< - [key: string, items: [id: string, fields: string[]][]][] | null - > + callback: Callback ] - ): Result< - [key: string, items: [id: string, fields: string[]][]][] | null, - Context - >; - xreadBuffer( + ): Result; + xreadgroupBuffer( ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, millisecondsToken: "BLOCK", milliseconds: number | string, streamsToken: "STREAMS", - ...args: RedisValue[], - callback: Callback< - [key: Buffer, items: [id: Buffer, fields: Buffer[]][]][] | null - > + ...args: RedisValue[] ] - ): Result< - [key: Buffer, items: [id: Buffer, fields: Buffer[]][]][] | null, - Context - >; - xread( + ): Result; + xreadgroupBuffer( ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, millisecondsToken: "BLOCK", milliseconds: number | string, + noack: "NOACK", streamsToken: "STREAMS", - ...args: RedisValue[] + ...args: RedisValue[], + callback: Callback ] - ): Result< - [key: string, items: [id: string, fields: string[]][]][] | null, - Context - >; - xreadBuffer( + ): Result; + xreadgroupBuffer( ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, millisecondsToken: "BLOCK", milliseconds: number | string, + noack: "NOACK", streamsToken: "STREAMS", ...args: RedisValue[] ] - ): Result< - [key: Buffer, items: [id: Buffer, fields: Buffer[]][]][] | null, - Context - >; - xread( + ): Result; + xreadgroupBuffer( ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, countToken: "COUNT", count: number | string, streamsToken: "STREAMS", ...args: RedisValue[], - callback: Callback< - [key: string, items: [id: string, fields: string[]][]][] | null - > + callback: Callback ] - ): Result< - [key: string, items: [id: string, fields: string[]][]][] | null, - Context - >; - xreadBuffer( + ): Result; + xreadgroupBuffer( ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, countToken: "COUNT", count: number | string, streamsToken: "STREAMS", - ...args: RedisValue[], - callback: Callback< - [key: Buffer, items: [id: Buffer, fields: Buffer[]][]][] | null - > + ...args: RedisValue[] ] - ): Result< - [key: Buffer, items: [id: Buffer, fields: Buffer[]][]][] | null, - Context - >; - xread( + ): Result; + xreadgroupBuffer( ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, countToken: "COUNT", count: number | string, + noack: "NOACK", streamsToken: "STREAMS", - ...args: RedisValue[] + ...args: RedisValue[], + callback: Callback ] - ): Result< - [key: string, items: [id: string, fields: string[]][]][] | null, - Context - >; - xreadBuffer( + ): Result; + xreadgroupBuffer( ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, countToken: "COUNT", count: number | string, + noack: "NOACK", streamsToken: "STREAMS", ...args: RedisValue[] ] - ): Result< - [key: Buffer, items: [id: Buffer, fields: Buffer[]][]][] | null, - Context - >; - xread( + ): Result; + xreadgroupBuffer( ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, countToken: "COUNT", count: number | string, millisecondsToken: "BLOCK", milliseconds: number | string, streamsToken: "STREAMS", ...args: RedisValue[], - callback: Callback< - [key: string, items: [id: string, fields: string[]][]][] | null - > + callback: Callback ] - ): Result< - [key: string, items: [id: string, fields: string[]][]][] | null, - Context - >; - xreadBuffer( + ): Result; + xreadgroupBuffer( ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, countToken: "COUNT", count: number | string, millisecondsToken: "BLOCK", milliseconds: number | string, streamsToken: "STREAMS", - ...args: RedisValue[], - callback: Callback< - [key: Buffer, items: [id: Buffer, fields: Buffer[]][]][] | null - > + ...args: RedisValue[] ] - ): Result< - [key: Buffer, items: [id: Buffer, fields: Buffer[]][]][] | null, - Context - >; - xread( + ): Result; + xreadgroupBuffer( ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, countToken: "COUNT", count: number | string, millisecondsToken: "BLOCK", milliseconds: number | string, + noack: "NOACK", streamsToken: "STREAMS", - ...args: RedisValue[] + ...args: RedisValue[], + callback: Callback ] - ): Result< - [key: string, items: [id: string, fields: string[]][]][] | null, - Context - >; - xreadBuffer( + ): Result; + xreadgroupBuffer( ...args: [ + groupConsumerToken: "GROUP", + group: string | Buffer, + consumer: string | Buffer, countToken: "COUNT", count: number | string, millisecondsToken: "BLOCK", milliseconds: number | string, + noack: "NOACK", streamsToken: "STREAMS", ...args: RedisValue[] ] - ): Result< - [key: Buffer, items: [id: Buffer, fields: Buffer[]][]][] | null, - Context - >; + ): Result; - /** - * Return new entries from a stream using a consumer group, or access the history of the pending entries for a given consumer. Can block. - * - _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( + xreadgroupBuffer( ...args: [ groupConsumerToken: "GROUP", group: string | Buffer, @@ -10006,7 +12288,7 @@ interface RedisCommander { callback: Callback ] ): Result; - xreadgroup( + xreadgroupBuffer( ...args: [ groupConsumerToken: "GROUP", group: string | Buffer, @@ -10015,7 +12297,7 @@ interface RedisCommander { ...args: RedisValue[] ] ): Result; - xreadgroup( + xreadgroupBuffer( ...args: [ groupConsumerToken: "GROUP", group: string | Buffer, @@ -10026,7 +12308,7 @@ interface RedisCommander { callback: Callback ] ): Result; - xreadgroup( + xreadgroupBuffer( ...args: [ groupConsumerToken: "GROUP", group: string | Buffer, @@ -10036,7 +12318,7 @@ interface RedisCommander { ...args: RedisValue[] ] ): Result; - xreadgroup( + xreadgroupBuffer( ...args: [ groupConsumerToken: "GROUP", group: string | Buffer, @@ -10048,7 +12330,7 @@ interface RedisCommander { callback: Callback ] ): Result; - xreadgroup( + xreadgroupBuffer( ...args: [ groupConsumerToken: "GROUP", group: string | Buffer, @@ -10059,7 +12341,7 @@ interface RedisCommander { ...args: RedisValue[] ] ): Result; - xreadgroup( + xreadgroupBuffer( ...args: [ groupConsumerToken: "GROUP", group: string | Buffer, @@ -10072,7 +12354,7 @@ interface RedisCommander { callback: Callback ] ): Result; - xreadgroup( + xreadgroupBuffer( ...args: [ groupConsumerToken: "GROUP", group: string | Buffer, @@ -10084,7 +12366,7 @@ interface RedisCommander { ...args: RedisValue[] ] ): Result; - xreadgroup( + xreadgroupBuffer( ...args: [ groupConsumerToken: "GROUP", group: string | Buffer, @@ -10096,7 +12378,7 @@ interface RedisCommander { callback: Callback ] ): Result; - xreadgroup( + xreadgroupBuffer( ...args: [ groupConsumerToken: "GROUP", group: string | Buffer, @@ -10107,7 +12389,7 @@ interface RedisCommander { ...args: RedisValue[] ] ): Result; - xreadgroup( + xreadgroupBuffer( ...args: [ groupConsumerToken: "GROUP", group: string | Buffer, @@ -10120,7 +12402,7 @@ interface RedisCommander { callback: Callback ] ): Result; - xreadgroup( + xreadgroupBuffer( ...args: [ groupConsumerToken: "GROUP", group: string | Buffer, @@ -10132,7 +12414,7 @@ interface RedisCommander { ...args: RedisValue[] ] ): Result; - xreadgroup( + xreadgroupBuffer( ...args: [ groupConsumerToken: "GROUP", group: string | Buffer, @@ -10146,7 +12428,7 @@ interface RedisCommander { callback: Callback ] ): Result; - xreadgroup( + xreadgroupBuffer( ...args: [ groupConsumerToken: "GROUP", group: string | Buffer, @@ -10159,7 +12441,7 @@ interface RedisCommander { ...args: RedisValue[] ] ): Result; - xreadgroup( + xreadgroupBuffer( ...args: [ groupConsumerToken: "GROUP", group: string | Buffer, @@ -10174,7 +12456,7 @@ interface RedisCommander { callback: Callback ] ): Result; - xreadgroup( + xreadgroupBuffer( ...args: [ groupConsumerToken: "GROUP", group: string | Buffer,