import type { CommandOptions } from "./command"; import { Command } from "./command"; /** * @see https://redis.io/commands/xautoclaim * @see node_modules/@upstash/redis/docs/commands/stream/xautoclaim.mdx */ export class XAutoClaim extends Command { constructor( [key, group, consumer, minIdleTime, start, options]: [ key: string, group: string, consumer: string, minIdleTime: number, start: string, options?: { count?: number; justId?: boolean }, ], opts?: CommandOptions ) { const commands: unknown[] = []; if (typeof options?.count === "number") { commands.push("COUNT", options.count); } if (options?.justId) { commands.push("JUSTID"); } super(["XAUTOCLAIM", key, group, consumer, minIdleTime, start, ...commands], opts); } }