import { ICallback } from '../../async/index.js'; import { EventEmitter } from '../../event/index.js'; import { PanicError } from '../../errors/index.js'; export * from './config.js'; export type TRedisClientEvent = { error: (err: Error) => void; ready: () => void; end: () => void; message: (channel: string, message: string) => void; pmessage: (pattern: string, channel: string, message: string) => void; }; export interface IRedisClient extends EventEmitter { validateRedisVersion(major: number, feature?: number, minor?: number): boolean; validateRedisServerSupport(cb: ICallback): void; getInfo(cb: ICallback): void; updateServerVersion(cb: ICallback): void; loadBuiltInScriptFiles(cb: ICallback): void; loadScriptFiles(scriptMap: Record, cb: ICallback>): void; loadScript(script: string, cb: ICallback): void; getScriptId(name: string): string | PanicError; runScript(scriptName: string, keys: (string | number)[], args: (string | number)[], cb: ICallback): void; evalsha(hash: string, args: (string | number)[] | string | number, cb: (err?: Error | null, res?: unknown) => void): void; ping(cb: ICallback): void; halt(cb: ICallback): void; end(flush: boolean): void; shutdown(cb: ICallback): void; flushall(cb: ICallback): void; psubscribe(pattern: string): void; punsubscribe(channel?: string): void; subscribe(channel: string): void; unsubscribe(channel?: string): void; publish(channel: string, message: string, cb: ICallback): void; exists(key: string, cb: ICallback): void; get(key: string, cb: ICallback): void; set(key: string, value: string, options: { expire?: { mode: 'EX' | 'PX'; value: number; }; exists?: 'NX' | 'XX'; }, cb: ICallback): void; del(key: string | string[], cb: ICallback): void; mget(keys: string[], cb: ICallback<(string | null)[]>): void; incr(key: string, cb: ICallback): void; decr(key: string, cb: ICallback): void; incrby(key: string, increment: number, cb: ICallback): void; decrby(key: string, decrement: number, cb: ICallback): void; expire(key: string, seconds: number, cb: ICallback): void; pexpire(key: string, milliseconds: number, cb: ICallback): void; ttl(key: string, cb: ICallback): void; pttl(key: string, cb: ICallback): void; multi(): IRedisTransaction; watch(args: string[], cb: ICallback): void; unwatch(cb: ICallback): void; hgetall(key: string, cb: ICallback>): void; hscan(key: string, cursor: string, options: { MATCH?: string; COUNT?: number; }, cb: ICallback<{ cursor: string; result: Record; }>): void; hscanAll(key: string, options: { MATCH?: string; COUNT?: number; }, cb: ICallback>): void; hget(key: string, field: string, cb: ICallback): void; hset(key: string, field: string, value: string | number, cb: ICallback): void; hdel(key: string, fields: string | string[], cb: ICallback): void; hkeys(key: string, cb: ICallback): void; hlen(key: string, cb: ICallback): void; hmget(source: string, keys: string[], cb: ICallback<(string | null)[]>): void; brpoplpush(source: string, destination: string, timeout: number, cb: ICallback): void; rpoplpush(source: string, destination: string, cb: ICallback): void; lpoprpush(source: string, destination: string, cb: ICallback): void; lmove(source: string, destination: string, from: 'LEFT' | 'RIGHT', to: 'LEFT' | 'RIGHT', cb: ICallback): void; lrange(key: string, start: number, stop: number, cb: ICallback): void; lrem(key: string, count: number, element: string, cb: ICallback): void; lpush(key: string, elements: string | string[], cb: ICallback): void; rpush(key: string, elements: string | string[], cb: ICallback): void; lpop(key: string, cb: ICallback): void; rpop(key: string, cb: ICallback): void; ltrim(key: string, start: number, stop: number, cb: ICallback): void; llen(key: string, cb: ICallback): void; lindex(key: string, index: number, cb: ICallback): void; sismember(key: string, member: string, cb: ICallback): void; smembers(key: string, cb: ICallback): void; sscan(key: string, cursor: string, options: { MATCH?: string; COUNT?: number; }, cb: ICallback<{ cursor: string; items: string[]; }>): void; sscanAll(key: string, options: { MATCH?: string; COUNT?: number; }, cb: ICallback): void; sadd(key: string, member: string, cb: ICallback): void; srem(key: string, member: string, cb: ICallback): void; scard(key: string, cb: ICallback): void; zadd(key: string, score: number, member: string, cb: ICallback): void; zcard(key: string, cb: ICallback): void; zrange(key: string, min: number, max: number, cb: ICallback): void; zrevrange(key: string, min: number, max: number, cb: ICallback): void; zrangebyscore(key: string, min: number | string, max: number | string, offset: number, count: number, cb: ICallback): void; zpoprpush(source: string, destination: string, cb: ICallback): void; zpoplpush(source: string, destination: string, cb: ICallback): void; zscan(key: string, cursor: string, options: { MATCH?: string; COUNT?: number; }, cb: ICallback<{ cursor: string; items: string[]; }>): void; zrangebyscorewithscores(source: string, min: number | string, max: number | string, cb: ICallback>): void; zrem(source: string, id: string, cb: ICallback): void; zremrangebyscore(source: string, min: number | string, max: number | string, cb: ICallback): void; zcount(key: string, min: string | number, max: string | number, cb: ICallback): void; zscore(key: string, member: string, cb: ICallback): void; } export interface IRedisTransaction { get(key: string): this; hget(key: string, field: string): this; smembers(key: string): this; hgetall(key: string): this; zcard(key: string): this; scard(key: string): this; llen(key: string): this; zscore(key: string, member: string): this; del(key: string | string[]): this; set(key: string, value: string | number, options: { expire?: { mode: 'EX' | 'PX'; value: number; }; exists?: 'NX' | 'XX'; }): void; lrem(key: string, count: number, element: string): this; lpop(key: string): this; rpush(key: string, element: string): this; rpop(key: string): this; lpush(key: string, element: string): this; hdel(key: string, field: string | string[]): this; srem(key: string, element: string | string[]): this; sadd(key: string, element: string): this; zrem(key: string, element: string | string[]): this; zadd(key: string, score: number, element: string): this; hset(key: string, field: string, value: string | number): this; ltrim(key: string, start: number, stop: number): this; rpoplpush(source: string, destination: string): this; hincrby(key: string, field: string, by: number): this; incr(key: string): this; decr(key: string): this; incrby(key: string, increment: number): this; decrby(key: string, decrement: number): this; pexpire(key: string, millis: number): this; expire(key: string, secs: number): this; exec(cb: ICallback): void; } declare module 'ioredis' { interface Commands { lmove(source: string, destination: string, from: 'LEFT' | 'RIGHT', to: 'LEFT' | 'RIGHT', cb: ICallback): void; } } //# sourceMappingURL=redis-client.d.ts.map