/** * Minimal structural view of the `redis` v4 client used by the migration steps. * A client from `createClient()` satisfies it; tests can pass lightweight fakes. */ /** * SCAN reply: `redis` v4 returns the object form; the raw `[cursor, keys]` form is * accepted for clients that pass the RESP reply through unchanged. */ export type MigrationScanReply = { cursor: number; keys: string[]; } | [cursor: string, keys: string[]]; export interface MigrationRedisClient { sendCommand(args: string[]): Promise; dbSize(): Promise; scan(cursor: number, options: { MATCH?: string; COUNT?: number; }): Promise; type(key: string): Promise; pTTL(key: string): Promise; get(key: string): Promise; hGetAll(key: string): Promise>; sMembers(key: string): Promise; lRange(key: string, start: number, stop: number): Promise; zRangeWithScores(key: string, start: number, stop: number): Promise>; }