@upstash/redis 0.0.0-ci.fc1b22d0-20231019 → 0.0.0-ci.fc2678933deb590c56ab2d204c262fcefa922e88-20231215102706

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -141,6 +141,13 @@ type ZUnionStoreCommandOptions = {
141
141
  weight?: never;
142
142
  weights?: never;
143
143
  });
144
+ /**
145
+ * @see https://redis.io/commands/zunionstore
146
+ */
147
+ declare class ZUnionStoreCommand extends Command<number, number> {
148
+ constructor(cmd: [destination: string, numKeys: 1, key: string, opts?: ZUnionStoreCommandOptions], cmdOpts?: CommandOptions<number, number>);
149
+ constructor(cmd: [destination: string, numKeys: number, keys: string[], opts?: ZUnionStoreCommandOptions], cmdOpts?: CommandOptions<number, number>);
150
+ }
144
151
 
145
152
  type ZUnionCommandOptions = {
146
153
  withScores?: boolean;
@@ -155,6 +162,13 @@ type ZUnionCommandOptions = {
155
162
  weight?: never;
156
163
  weights?: never;
157
164
  });
165
+ /**
166
+ * @see https://redis.io/commands/zunion
167
+ */
168
+ declare class ZUnionCommand<TData extends unknown[]> extends Command<string[], TData> {
169
+ constructor(cmd: [numKeys: 1, key: string, opts?: ZUnionCommandOptions], cmdOpts?: CommandOptions<string[], TData>);
170
+ constructor(cmd: [numKeys: number, keys: string[], opts?: ZUnionCommandOptions], cmdOpts?: CommandOptions<string[], TData>);
171
+ }
158
172
 
159
173
  type ZInterStoreCommandOptions = {
160
174
  aggregate?: "sum" | "min" | "max";
@@ -168,8 +182,21 @@ type ZInterStoreCommandOptions = {
168
182
  weight?: never;
169
183
  weights?: never;
170
184
  });
185
+ /**
186
+ * @see https://redis.io/commands/zInterstore
187
+ */
188
+ declare class ZInterStoreCommand extends Command<number, number> {
189
+ constructor(cmd: [destination: string, numKeys: 1, key: string, opts?: ZInterStoreCommandOptions], cmdOpts?: CommandOptions<number, number>);
190
+ constructor(cmd: [destination: string, numKeys: number, keys: string[], opts?: ZInterStoreCommandOptions], cmdOpts?: CommandOptions<number, number>);
191
+ }
171
192
 
172
193
  type Type = "string" | "list" | "set" | "zset" | "hash" | "none";
194
+ /**
195
+ * @see https://redis.io/commands/type
196
+ */
197
+ declare class TypeCommand extends Command<Type, Type> {
198
+ constructor(cmd: [key: string], opts?: CommandOptions<Type, Type>);
199
+ }
173
200
 
174
201
  type ScriptFlushCommandOptions = {
175
202
  sync: true;
@@ -178,12 +205,24 @@ type ScriptFlushCommandOptions = {
178
205
  sync?: never;
179
206
  async: true;
180
207
  };
208
+ /**
209
+ * @see https://redis.io/commands/script-flush
210
+ */
211
+ declare class ScriptFlushCommand extends Command<"OK", "OK"> {
212
+ constructor([opts]: [opts?: ScriptFlushCommandOptions], cmdOpts?: CommandOptions<"OK", "OK">);
213
+ }
181
214
 
182
215
  type ScanCommandOptions = {
183
216
  match?: string;
184
217
  count?: number;
185
218
  type?: string;
186
219
  };
220
+ /**
221
+ * @see https://redis.io/commands/scan
222
+ */
223
+ declare class ScanCommand extends Command<[number, string[]], [number, string[]]> {
224
+ constructor([cursor, opts]: [cursor: number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[number, string[]], [number, string[]]>);
225
+ }
187
226
 
188
227
  type GeoAddCommandOptions = {
189
228
  nx?: boolean;
@@ -199,6 +238,31 @@ interface GeoMember<TMemberType> {
199
238
  longitude: number;
200
239
  member: TMemberType;
201
240
  }
241
+ /**
242
+ * @see https://redis.io/commands/geoadd
243
+ */
244
+ declare class GeoAddCommand<TMemberType = string> extends Command<number | null, number | null> {
245
+ constructor([key, arg1, ...arg2]: [
246
+ string,
247
+ GeoMember<TMemberType> | GeoAddCommandOptions,
248
+ ...GeoMember<TMemberType>[]
249
+ ], opts?: CommandOptions<number | null, number | null>);
250
+ }
251
+
252
+ /**
253
+ * @see https://redis.io/commands/append
254
+ */
255
+ declare class AppendCommand extends Command<number, number> {
256
+ constructor(cmd: [key: string, value: string], opts?: CommandOptions<number, number>);
257
+ }
258
+
259
+ /**
260
+ * @see https://redis.io/commands/bitcount
261
+ */
262
+ declare class BitCountCommand extends Command<number, number> {
263
+ constructor(cmd: [key: string, start?: never, end?: never], opts?: CommandOptions<number, number>);
264
+ constructor(cmd: [key: string, start: number, end: number], opts?: CommandOptions<number, number>);
265
+ }
202
266
 
203
267
  /**
204
268
  * @see https://redis.io/commands/bitop
@@ -208,6 +272,43 @@ declare class BitOpCommand extends Command<number, number> {
208
272
  constructor(cmd: [op: "not", destinationKey: string, sourceKey: string], opts?: CommandOptions<number, number>);
209
273
  }
210
274
 
275
+ /**
276
+ * @see https://redis.io/commands/bitpos
277
+ */
278
+ declare class BitPosCommand extends Command<number, number> {
279
+ constructor(cmd: [key: string, bit: 0 | 1, start?: number, end?: number], opts?: CommandOptions<number, number>);
280
+ }
281
+
282
+ /**
283
+ * @see https://redis.io/commands/copy
284
+ */
285
+ declare class CopyCommand extends Command<number, "COPIED" | "NOT_COPIED"> {
286
+ constructor([key, destinationKey, opts]: [key: string, destinationKey: string, opts?: {
287
+ replace: boolean;
288
+ }], commandOptions?: CommandOptions<number, "COPIED" | "NOT_COPIED">);
289
+ }
290
+
291
+ /**
292
+ * @see https://redis.io/commands/dbsize
293
+ */
294
+ declare class DBSizeCommand extends Command<number, number> {
295
+ constructor(opts?: CommandOptions<number, number>);
296
+ }
297
+
298
+ /**
299
+ * @see https://redis.io/commands/decr
300
+ */
301
+ declare class DecrCommand extends Command<number, number> {
302
+ constructor(cmd: [key: string], opts?: CommandOptions<number, number>);
303
+ }
304
+
305
+ /**
306
+ * @see https://redis.io/commands/decrby
307
+ */
308
+ declare class DecrByCommand extends Command<number, number> {
309
+ constructor(cmd: [key: string, decrement: number], opts?: CommandOptions<number, number>);
310
+ }
311
+
211
312
  /**
212
313
  * @see https://redis.io/commands/del
213
314
  */
@@ -215,6 +316,27 @@ declare class DelCommand extends Command<number, number> {
215
316
  constructor(cmd: [...keys: string[]], opts?: CommandOptions<number, number>);
216
317
  }
217
318
 
319
+ /**
320
+ * @see https://redis.io/commands/echo
321
+ */
322
+ declare class EchoCommand extends Command<string, string> {
323
+ constructor(cmd: [message: string], opts?: CommandOptions<string, string>);
324
+ }
325
+
326
+ /**
327
+ * @see https://redis.io/commands/eval
328
+ */
329
+ declare class EvalCommand<TArgs extends unknown[], TData> extends Command<unknown, TData> {
330
+ constructor([script, keys, args]: [script: string, keys: string[], args: TArgs], opts?: CommandOptions<unknown, TData>);
331
+ }
332
+
333
+ /**
334
+ * @see https://redis.io/commands/evalsha
335
+ */
336
+ declare class EvalshaCommand<TArgs extends unknown[], TData> extends Command<unknown, TData> {
337
+ constructor([sha, keys, args]: [sha: string, keys: string[], args?: TArgs], opts?: CommandOptions<unknown, TData>);
338
+ }
339
+
218
340
  /**
219
341
  * @see https://redis.io/commands/exists
220
342
  */
@@ -222,6 +344,20 @@ declare class ExistsCommand extends Command<number, number> {
222
344
  constructor(cmd: [...keys: string[]], opts?: CommandOptions<number, number>);
223
345
  }
224
346
 
347
+ /**
348
+ * @see https://redis.io/commands/expire
349
+ */
350
+ declare class ExpireCommand extends Command<"0" | "1", 0 | 1> {
351
+ constructor(cmd: [key: string, seconds: number], opts?: CommandOptions<"0" | "1", 0 | 1>);
352
+ }
353
+
354
+ /**
355
+ * @see https://redis.io/commands/expireat
356
+ */
357
+ declare class ExpireAtCommand extends Command<"0" | "1", 0 | 1> {
358
+ constructor(cmd: [key: string, unix: number], opts?: CommandOptions<"0" | "1", 0 | 1>);
359
+ }
360
+
225
361
  /**
226
362
  * @see https://redis.io/commands/flushall
227
363
  */
@@ -232,90 +368,917 @@ declare class FlushAllCommand extends Command<"OK", "OK"> {
232
368
  }
233
369
 
234
370
  /**
235
- * @see https://redis.io/commands/json.get
371
+ * @see https://redis.io/commands/flushdb
372
+ */
373
+ declare class FlushDBCommand extends Command<"OK", "OK"> {
374
+ constructor([opts]: [opts?: {
375
+ async?: boolean;
376
+ }], cmdOpts?: CommandOptions<"OK", "OK">);
377
+ }
378
+
379
+ /**
380
+ * @see https://redis.io/commands/geodist
381
+ */
382
+ declare class GeoDistCommand<TMemberType = string> extends Command<number | null, number | null> {
383
+ constructor([key, member1, member2, unit]: [
384
+ key: string,
385
+ member1: TMemberType,
386
+ member2: TMemberType,
387
+ unit?: "M" | "KM" | "FT" | "MI"
388
+ ], opts?: CommandOptions<number | null, number | null>);
389
+ }
390
+
391
+ /**
392
+ * @see https://redis.io/commands/geohash
393
+ */
394
+ declare class GeoHashCommand<TMember = string> extends Command<(string | null)[], (string | null)[]> {
395
+ constructor(cmd: [string, ...(TMember[] | TMember[])], opts?: CommandOptions<(string | null)[], (string | null)[]>);
396
+ }
397
+
398
+ type Coordinates = {
399
+ lng: number;
400
+ lat: number;
401
+ };
402
+ /**
403
+ * @see https://redis.io/commands/geopos
404
+ */
405
+ declare class GeoPosCommand<TMember = string> extends Command<(string | null)[][], Coordinates[]> {
406
+ constructor(cmd: [string, ...(TMember[] | TMember[])], opts?: CommandOptions<(string | null)[][], Coordinates[]>);
407
+ }
408
+
409
+ type RadiusOptions$1 = "M" | "KM" | "FT" | "MI";
410
+ type CenterPoint$1<TMemberType> = {
411
+ type: "FROMMEMBER" | "frommember";
412
+ member: TMemberType;
413
+ } | {
414
+ type: "FROMLONLAT" | "fromlonlat";
415
+ coordinate: {
416
+ lon: number;
417
+ lat: number;
418
+ };
419
+ };
420
+ type Shape$1 = {
421
+ type: "BYRADIUS" | "byradius";
422
+ radius: number;
423
+ radiusType: RadiusOptions$1;
424
+ } | {
425
+ type: "BYBOX" | "bybox";
426
+ rect: {
427
+ width: number;
428
+ height: number;
429
+ };
430
+ rectType: RadiusOptions$1;
431
+ };
432
+ type GeoSearchCommandOptions$1 = {
433
+ count?: {
434
+ limit: number;
435
+ any?: boolean;
436
+ };
437
+ withCoord?: boolean;
438
+ withDist?: boolean;
439
+ withHash?: boolean;
440
+ };
441
+ type OptionMappings = {
442
+ withHash: "hash";
443
+ withCoord: "coord";
444
+ withDist: "dist";
445
+ };
446
+ type GeoSearchOptions<TOptions> = {
447
+ [K in keyof TOptions as K extends keyof OptionMappings ? OptionMappings[K] : never]: K extends "withHash" ? string : K extends "withCoord" ? {
448
+ long: number;
449
+ lat: number;
450
+ } : K extends "withDist" ? number : never;
451
+ };
452
+ type GeoSearchResponse<TOptions, TMemberType> = ({
453
+ member: TMemberType;
454
+ } & GeoSearchOptions<TOptions>)[];
455
+ /**
456
+ * @see https://redis.io/commands/geosearch
457
+ */
458
+ declare class GeoSearchCommand<TMemberType = string, TOptions extends GeoSearchCommandOptions$1 = GeoSearchCommandOptions$1> extends Command<any[] | any[][], GeoSearchResponse<TOptions, TMemberType>> {
459
+ constructor([key, centerPoint, shape, order, opts]: [
460
+ key: string,
461
+ centerPoint: CenterPoint$1<TMemberType>,
462
+ shape: Shape$1,
463
+ order: "ASC" | "DESC" | "asc" | "desc",
464
+ opts?: TOptions
465
+ ], commandOptions?: CommandOptions<any[] | any[][], GeoSearchResponse<TOptions, TMemberType>>);
466
+ }
467
+
468
+ type RadiusOptions = "M" | "KM" | "FT" | "MI";
469
+ type CenterPoint<TMemberType> = {
470
+ type: "FROMMEMBER" | "frommember";
471
+ member: TMemberType;
472
+ } | {
473
+ type: "FROMLONLAT" | "fromlonlat";
474
+ coordinate: {
475
+ lon: number;
476
+ lat: number;
477
+ };
478
+ };
479
+ type Shape = {
480
+ type: "BYRADIUS" | "byradius";
481
+ radius: number;
482
+ radiusType: RadiusOptions;
483
+ } | {
484
+ type: "BYBOX" | "bybox";
485
+ rect: {
486
+ width: number;
487
+ height: number;
488
+ };
489
+ rectType: RadiusOptions;
490
+ };
491
+ type GeoSearchCommandOptions = {
492
+ count?: {
493
+ limit: number;
494
+ any?: boolean;
495
+ };
496
+ storeDist?: boolean;
497
+ };
498
+ /**
499
+ * @see https://redis.io/commands/geosearchstore
500
+ */
501
+ declare class GeoSearchStoreCommand<TMemberType = string, TOptions extends GeoSearchCommandOptions = GeoSearchCommandOptions> extends Command<any[] | any[][], number> {
502
+ constructor([destination, key, centerPoint, shape, order, opts]: [
503
+ destination: string,
504
+ key: string,
505
+ centerPoint: CenterPoint<TMemberType>,
506
+ shape: Shape,
507
+ order: "ASC" | "DESC" | "asc" | "desc",
508
+ opts?: TOptions
509
+ ], commandOptions?: CommandOptions<any[] | any[][], number>);
510
+ }
511
+
512
+ /**
513
+ * @see https://redis.io/commands/get
514
+ */
515
+ declare class GetCommand<TData = string> extends Command<unknown | null, TData | null> {
516
+ constructor(cmd: [key: string], opts?: CommandOptions<unknown | null, TData | null>);
517
+ }
518
+
519
+ /**
520
+ * @see https://redis.io/commands/getbit
521
+ */
522
+ declare class GetBitCommand extends Command<"0" | "1", 0 | 1> {
523
+ constructor(cmd: [key: string, offset: number], opts?: CommandOptions<"0" | "1", 0 | 1>);
524
+ }
525
+
526
+ /**
527
+ * @see https://redis.io/commands/getdel
528
+ */
529
+ declare class GetDelCommand<TData = string> extends Command<unknown | null, TData | null> {
530
+ constructor(cmd: [key: string], opts?: CommandOptions<unknown | null, TData | null>);
531
+ }
532
+
533
+ /**
534
+ * @see https://redis.io/commands/getrange
535
+ */
536
+ declare class GetRangeCommand extends Command<string, string> {
537
+ constructor(cmd: [key: string, start: number, end: number], opts?: CommandOptions<string, string>);
538
+ }
539
+
540
+ /**
541
+ * @see https://redis.io/commands/getset
542
+ */
543
+ declare class GetSetCommand<TData = string> extends Command<unknown | null, TData | null> {
544
+ constructor(cmd: [key: string, value: TData], opts?: CommandOptions<unknown | null, TData | null>);
545
+ }
546
+
547
+ /**
548
+ * @see https://redis.io/commands/hdel
549
+ */
550
+ declare class HDelCommand extends Command<"0" | "1", 0 | 1> {
551
+ constructor(cmd: [key: string, ...fields: string[]], opts?: CommandOptions<"0" | "1", 0 | 1>);
552
+ }
553
+
554
+ /**
555
+ * @see https://redis.io/commands/hexists
556
+ */
557
+ declare class HExistsCommand extends Command<number, number> {
558
+ constructor(cmd: [key: string, field: string], opts?: CommandOptions<number, number>);
559
+ }
560
+
561
+ /**
562
+ * @see https://redis.io/commands/hget
563
+ */
564
+ declare class HGetCommand<TData> extends Command<unknown | null, TData | null> {
565
+ constructor(cmd: [key: string, field: string], opts?: CommandOptions<unknown | null, TData | null>);
566
+ }
567
+
568
+ /**
569
+ * @see https://redis.io/commands/hgetall
570
+ */
571
+ declare class HGetAllCommand<TData extends Record<string, unknown>> extends Command<unknown | null, TData | null> {
572
+ constructor(cmd: [key: string], opts?: CommandOptions<unknown | null, TData | null>);
573
+ }
574
+
575
+ /**
576
+ * @see https://redis.io/commands/hincrby
577
+ */
578
+ declare class HIncrByCommand extends Command<number, number> {
579
+ constructor(cmd: [key: string, field: string, increment: number], opts?: CommandOptions<number, number>);
580
+ }
581
+
582
+ /**
583
+ * @see https://redis.io/commands/hincrbyfloat
584
+ */
585
+ declare class HIncrByFloatCommand extends Command<number, number> {
586
+ constructor(cmd: [key: string, field: string, increment: number], opts?: CommandOptions<number, number>);
587
+ }
588
+
589
+ /**
590
+ * @see https://redis.io/commands/hkeys
591
+ */
592
+ declare class HKeysCommand extends Command<string[], string[]> {
593
+ constructor([key]: [key: string], opts?: CommandOptions<string[], string[]>);
594
+ }
595
+
596
+ /**
597
+ * @see https://redis.io/commands/hlen
598
+ */
599
+ declare class HLenCommand extends Command<number, number> {
600
+ constructor(cmd: [key: string], opts?: CommandOptions<number, number>);
601
+ }
602
+
603
+ /**
604
+ * hmget returns an object of all requested fields from a hash
605
+ * The field values are returned as an object like this:
606
+ * ```ts
607
+ * {[fieldName: string]: T | null}
608
+ * ```
609
+ *
610
+ * In case the hash does not exist or all fields are empty `null` is returned
611
+ *
612
+ * @see https://redis.io/commands/hmget
613
+ */
614
+ declare class HMGetCommand<TData extends Record<string, unknown>> extends Command<(string | null)[], TData | null> {
615
+ constructor([key, ...fields]: [key: string, ...fields: string[]], opts?: CommandOptions<(string | null)[], TData | null>);
616
+ }
617
+
618
+ /**
619
+ * @see https://redis.io/commands/hmset
620
+ */
621
+ declare class HMSetCommand<TData> extends Command<"OK", "OK"> {
622
+ constructor([key, kv]: [key: string, kv: {
623
+ [field: string]: TData;
624
+ }], opts?: CommandOptions<"OK", "OK">);
625
+ }
626
+
627
+ /**
628
+ * @see https://redis.io/commands/hrandfield
629
+ */
630
+ declare class HRandFieldCommand<TData extends string | string[] | Record<string, unknown>> extends Command<string | string[], TData> {
631
+ constructor(cmd: [key: string], opts?: CommandOptions<string, string>);
632
+ constructor(cmd: [key: string, count: number], opts?: CommandOptions<string[], string[]>);
633
+ constructor(cmd: [key: string, count: number, withValues: boolean], opts?: CommandOptions<string[], Partial<TData>>);
634
+ }
635
+
636
+ /**
637
+ * @see https://redis.io/commands/hscan
638
+ */
639
+ declare class HScanCommand extends Command<[
640
+ number,
641
+ (string | number)[]
642
+ ], [
643
+ number,
644
+ (string | number)[]
645
+ ]> {
646
+ constructor([key, cursor, cmdOpts]: [key: string, cursor: number, cmdOpts?: ScanCommandOptions], opts?: CommandOptions<[number, (string | number)[]], [number, (string | number)[]]>);
647
+ }
648
+
649
+ /**
650
+ * @see https://redis.io/commands/hset
651
+ */
652
+ declare class HSetCommand<TData> extends Command<number, number> {
653
+ constructor([key, kv]: [key: string, kv: {
654
+ [field: string]: TData;
655
+ }], opts?: CommandOptions<number, number>);
656
+ }
657
+
658
+ /**
659
+ * @see https://redis.io/commands/hsetnx
660
+ */
661
+ declare class HSetNXCommand<TData> extends Command<"0" | "1", 0 | 1> {
662
+ constructor(cmd: [key: string, field: string, value: TData], opts?: CommandOptions<"0" | "1", 0 | 1>);
663
+ }
664
+
665
+ /**
666
+ * @see https://redis.io/commands/hstrlen
667
+ */
668
+ declare class HStrLenCommand extends Command<number, number> {
669
+ constructor(cmd: [key: string, field: string], opts?: CommandOptions<number, number>);
670
+ }
671
+
672
+ /**
673
+ * @see https://redis.io/commands/hvals
674
+ */
675
+ declare class HValsCommand<TData extends unknown[]> extends Command<unknown[], TData> {
676
+ constructor(cmd: [key: string], opts?: CommandOptions<unknown[], TData>);
677
+ }
678
+
679
+ /**
680
+ * @see https://redis.io/commands/incr
681
+ */
682
+ declare class IncrCommand extends Command<number, number> {
683
+ constructor(cmd: [key: string], opts?: CommandOptions<number, number>);
684
+ }
685
+
686
+ /**
687
+ * @see https://redis.io/commands/incrby
688
+ */
689
+ declare class IncrByCommand extends Command<number, number> {
690
+ constructor(cmd: [key: string, value: number], opts?: CommandOptions<number, number>);
691
+ }
692
+
693
+ /**
694
+ * @see https://redis.io/commands/incrbyfloat
695
+ */
696
+ declare class IncrByFloatCommand extends Command<number, number> {
697
+ constructor(cmd: [key: string, value: number], opts?: CommandOptions<number, number>);
698
+ }
699
+
700
+ /**
701
+ * @see https://redis.io/commands/json.arrappend
702
+ */
703
+ declare class JsonArrAppendCommand<TData extends unknown[]> extends Command<(null | string)[], (null | number)[]> {
704
+ constructor(cmd: [key: string, path: string, ...values: TData], opts?: CommandOptions<(null | string)[], (null | number)[]>);
705
+ }
706
+
707
+ /**
708
+ * @see https://redis.io/commands/json.arrindex
709
+ */
710
+ declare class JsonArrIndexCommand<TValue> extends Command<(null | string)[], (null | number)[]> {
711
+ constructor(cmd: [key: string, path: string, value: TValue, start?: number, stop?: number], opts?: CommandOptions<(null | string)[], (null | number)[]>);
712
+ }
713
+
714
+ /**
715
+ * @see https://redis.io/commands/json.arrinsert
716
+ */
717
+ declare class JsonArrInsertCommand<TData extends unknown[]> extends Command<(null | string)[], (null | number)[]> {
718
+ constructor(cmd: [key: string, path: string, index: number, ...values: TData], opts?: CommandOptions<(null | string)[], (null | number)[]>);
719
+ }
720
+
721
+ /**
722
+ * @see https://redis.io/commands/json.arrlen
723
+ */
724
+ declare class JsonArrLenCommand extends Command<(null | string)[], (null | number)[]> {
725
+ constructor(cmd: [key: string, path?: string], opts?: CommandOptions<(null | string)[], (null | number)[]>);
726
+ }
727
+
728
+ /**
729
+ * @see https://redis.io/commands/json.arrpop
730
+ */
731
+ declare class JsonArrPopCommand<TData> extends Command<(null | string)[], (TData | null)[]> {
732
+ constructor(cmd: [key: string, path?: string, index?: number], opts?: CommandOptions<(null | string)[], (TData | null)[]>);
733
+ }
734
+
735
+ /**
736
+ * @see https://redis.io/commands/json.arrtrim
737
+ */
738
+ declare class JsonArrTrimCommand extends Command<(null | string)[], (null | number)[]> {
739
+ constructor(cmd: [key: string, path?: string, start?: number, stop?: number], opts?: CommandOptions<(null | string)[], (null | number)[]>);
740
+ }
741
+
742
+ /**
743
+ * @see https://redis.io/commands/json.clear
744
+ */
745
+ declare class JsonClearCommand extends Command<number, number> {
746
+ constructor(cmd: [key: string, path?: string], opts?: CommandOptions<number, number>);
747
+ }
748
+
749
+ /**
750
+ * @see https://redis.io/commands/json.del
751
+ */
752
+ declare class JsonDelCommand extends Command<number, number> {
753
+ constructor(cmd: [key: string, path?: string], opts?: CommandOptions<number, number>);
754
+ }
755
+
756
+ /**
757
+ * @see https://redis.io/commands/json.forget
758
+ */
759
+ declare class JsonForgetCommand extends Command<number, number> {
760
+ constructor(cmd: [key: string, path?: string], opts?: CommandOptions<number, number>);
761
+ }
762
+
763
+ /**
764
+ * @see https://redis.io/commands/json.get
765
+ */
766
+ declare class JsonGetCommand<TData extends (unknown | Record<string, unknown>) | (unknown | Record<string, unknown>)[]> extends Command<TData | null, TData | null> {
767
+ constructor(cmd: [
768
+ key: string,
769
+ opts?: {
770
+ indent?: string;
771
+ newline?: string;
772
+ space?: string;
773
+ },
774
+ ...path: string[]
775
+ ] | [key: string, ...path: string[]], opts?: CommandOptions<TData | null, TData | null>);
776
+ }
777
+
778
+ /**
779
+ * @see https://redis.io/commands/json.mget
780
+ */
781
+ declare class JsonMGetCommand<TData extends (unknown | Record<string, unknown>)[]> extends Command<TData, TData> {
782
+ constructor(cmd: [keys: string[], path: string], opts?: CommandOptions<TData, TData>);
783
+ }
784
+
785
+ /**
786
+ * @see https://redis.io/commands/json.numincrby
787
+ */
788
+ declare class JsonNumIncrByCommand extends Command<(null | string)[], (null | number)[]> {
789
+ constructor(cmd: [key: string, path: string, value: number], opts?: CommandOptions<(null | string)[], (null | number)[]>);
790
+ }
791
+
792
+ /**
793
+ * @see https://redis.io/commands/json.nummultby
794
+ */
795
+ declare class JsonNumMultByCommand extends Command<(null | string)[], (null | number)[]> {
796
+ constructor(cmd: [key: string, path: string, value: number], opts?: CommandOptions<(null | string)[], (null | number)[]>);
797
+ }
798
+
799
+ /**
800
+ * @see https://redis.io/commands/json.objkeys
801
+ */
802
+ declare class JsonObjKeysCommand extends Command<(string[] | null)[], (string[] | null)[]> {
803
+ constructor(cmd: [key: string, path?: string], opts?: CommandOptions<(string[] | null)[], (string[] | null)[]>);
804
+ }
805
+
806
+ /**
807
+ * @see https://redis.io/commands/json.objlen
808
+ */
809
+ declare class JsonObjLenCommand extends Command<(number | null)[], (number | null)[]> {
810
+ constructor(cmd: [key: string, path?: string], opts?: CommandOptions<(number | null)[], (number | null)[]>);
811
+ }
812
+
813
+ /**
814
+ * @see https://redis.io/commands/json.resp
815
+ */
816
+ declare class JsonRespCommand<TData extends unknown[]> extends Command<TData, TData> {
817
+ constructor(cmd: [key: string, path?: string], opts?: CommandOptions<TData, TData>);
818
+ }
819
+
820
+ /**
821
+ * @see https://redis.io/commands/json.set
822
+ */
823
+ declare class JsonSetCommand<TData extends number | string | boolean | Record<string, unknown> | (number | string | boolean | Record<string, unknown>)[]> extends Command<"OK" | null, "OK" | null> {
824
+ constructor(cmd: [
825
+ key: string,
826
+ path: string,
827
+ value: TData,
828
+ opts?: {
829
+ nx: true;
830
+ xx?: never;
831
+ } | {
832
+ nx?: never;
833
+ xx: true;
834
+ }
835
+ ], opts?: CommandOptions<"OK" | null, "OK" | null>);
836
+ }
837
+
838
+ /**
839
+ * @see https://redis.io/commands/json.strappend
840
+ */
841
+ declare class JsonStrAppendCommand extends Command<(null | string)[], (null | number)[]> {
842
+ constructor(cmd: [key: string, path: string, value: string], opts?: CommandOptions<(null | string)[], (null | number)[]>);
843
+ }
844
+
845
+ /**
846
+ * @see https://redis.io/commands/json.strlen
847
+ */
848
+ declare class JsonStrLenCommand extends Command<(number | null)[], (number | null)[]> {
849
+ constructor(cmd: [key: string, path?: string], opts?: CommandOptions<(number | null)[], (number | null)[]>);
850
+ }
851
+
852
+ /**
853
+ * @see https://redis.io/commands/json.toggle
854
+ */
855
+ declare class JsonToggleCommand extends Command<number[], number[]> {
856
+ constructor(cmd: [key: string, path: string], opts?: CommandOptions<number[], number[]>);
857
+ }
858
+
859
+ /**
860
+ * @see https://redis.io/commands/json.type
861
+ */
862
+ declare class JsonTypeCommand extends Command<string[], string[]> {
863
+ constructor(cmd: [key: string, path?: string], opts?: CommandOptions<string[], string[]>);
864
+ }
865
+
866
+ /**
867
+ * @see https://redis.io/commands/keys
868
+ */
869
+ declare class KeysCommand extends Command<string[], string[]> {
870
+ constructor(cmd: [pattern: string], opts?: CommandOptions<string[], string[]>);
871
+ }
872
+
873
+ declare class LIndexCommand<TData = string> extends Command<unknown | null, TData | null> {
874
+ constructor(cmd: [key: string, index: number], opts?: CommandOptions<unknown | null, TData | null>);
875
+ }
876
+
877
+ declare class LInsertCommand<TData = string> extends Command<number, number> {
878
+ constructor(cmd: [key: string, direction: "before" | "after", pivot: TData, value: TData], opts?: CommandOptions<number, number>);
879
+ }
880
+
881
+ /**
882
+ * @see https://redis.io/commands/llen
883
+ */
884
+ declare class LLenCommand extends Command<number, number> {
885
+ constructor(cmd: [key: string], opts?: CommandOptions<number, number>);
886
+ }
887
+
888
+ /**
889
+ * @see https://redis.io/commands/lmove
890
+ */
891
+ declare class LMoveCommand<TData = string> extends Command<TData, TData> {
892
+ constructor(cmd: [
893
+ source: string,
894
+ destination: string,
895
+ whereFrom: "left" | "right",
896
+ whereTo: "left" | "right"
897
+ ], opts?: CommandOptions<TData, TData>);
898
+ }
899
+
900
+ /**
901
+ * @see https://redis.io/commands/lpop
902
+ */
903
+ declare class LPopCommand<TData = string> extends Command<unknown | null, TData | null> {
904
+ constructor(cmd: [key: string, count?: number], opts?: CommandOptions<unknown | null, TData | null>);
905
+ }
906
+
907
+ /**
908
+ * @see https://redis.io/commands/lpush
909
+ */
910
+ declare class LPushCommand<TData = string> extends Command<number, number> {
911
+ constructor(cmd: [key: string, ...elements: TData[]], opts?: CommandOptions<number, number>);
912
+ }
913
+
914
+ /**
915
+ * @see https://redis.io/commands/lpushx
916
+ */
917
+ declare class LPushXCommand<TData> extends Command<number, number> {
918
+ constructor(cmd: [key: string, ...elements: TData[]], opts?: CommandOptions<number, number>);
919
+ }
920
+
921
+ declare class LRangeCommand<TData = string> extends Command<unknown[], TData[]> {
922
+ constructor(cmd: [key: string, start: number, end: number], opts?: CommandOptions<unknown[], TData[]>);
923
+ }
924
+
925
+ declare class LRemCommand<TData> extends Command<number, number> {
926
+ constructor(cmd: [key: string, count: number, value: TData], opts?: CommandOptions<number, number>);
927
+ }
928
+
929
+ declare class LSetCommand<TData = string> extends Command<"OK", "OK"> {
930
+ constructor(cmd: [key: string, index: number, data: TData], opts?: CommandOptions<"OK", "OK">);
931
+ }
932
+
933
+ declare class LTrimCommand extends Command<"OK", "OK"> {
934
+ constructor(cmd: [key: string, start: number, end: number], opts?: CommandOptions<"OK", "OK">);
935
+ }
936
+
937
+ /**
938
+ * @see https://redis.io/commands/mget
939
+ */
940
+ declare class MGetCommand<TData extends unknown[]> extends Command<(string | null)[], TData> {
941
+ constructor(cmd: [string[]] | [...(string[] | string[])], opts?: CommandOptions<(string | null)[], TData>);
942
+ }
943
+
944
+ /**
945
+ * @see https://redis.io/commands/mset
946
+ */
947
+ declare class MSetCommand<TData> extends Command<"OK", "OK"> {
948
+ constructor([kv]: [kv: {
949
+ [key: string]: TData;
950
+ }], opts?: CommandOptions<"OK", "OK">);
951
+ }
952
+
953
+ /**
954
+ * @see https://redis.io/commands/msetnx
955
+ */
956
+ declare class MSetNXCommand<TData = string> extends Command<number, number> {
957
+ constructor([kv]: [kv: {
958
+ [key: string]: TData;
959
+ }], opts?: CommandOptions<number, number>);
960
+ }
961
+
962
+ /**
963
+ * @see https://redis.io/commands/persist
964
+ */
965
+ declare class PersistCommand extends Command<"0" | "1", 0 | 1> {
966
+ constructor(cmd: [key: string], opts?: CommandOptions<"0" | "1", 0 | 1>);
967
+ }
968
+
969
+ /**
970
+ * @see https://redis.io/commands/pexpire
971
+ */
972
+ declare class PExpireCommand extends Command<"0" | "1", 0 | 1> {
973
+ constructor(cmd: [key: string, milliseconds: number], opts?: CommandOptions<"0" | "1", 0 | 1>);
974
+ }
975
+
976
+ /**
977
+ * @see https://redis.io/commands/pexpireat
978
+ */
979
+ declare class PExpireAtCommand extends Command<"0" | "1", 0 | 1> {
980
+ constructor(cmd: [key: string, unix: number], opts?: CommandOptions<"0" | "1", 0 | 1>);
981
+ }
982
+
983
+ /**
984
+ * @see https://redis.io/commands/ping
985
+ */
986
+ declare class PingCommand extends Command<string | "PONG", string | "PONG"> {
987
+ constructor(cmd?: [message?: string], opts?: CommandOptions<string | "PONG", string | "PONG">);
988
+ }
989
+
990
+ /**
991
+ * @see https://redis.io/commands/psetex
992
+ */
993
+ declare class PSetEXCommand<TData = string> extends Command<string, string> {
994
+ constructor(cmd: [key: string, ttl: number, value: TData], opts?: CommandOptions<string, string>);
995
+ }
996
+
997
+ /**
998
+ * @see https://redis.io/commands/pttl
999
+ */
1000
+ declare class PTtlCommand extends Command<number, number> {
1001
+ constructor(cmd: [key: string], opts?: CommandOptions<number, number>);
1002
+ }
1003
+
1004
+ /**
1005
+ * @see https://redis.io/commands/publish
1006
+ */
1007
+ declare class PublishCommand<TMessage = unknown> extends Command<number, number> {
1008
+ constructor(cmd: [channel: string, message: TMessage], opts?: CommandOptions<number, number>);
1009
+ }
1010
+
1011
+ /**
1012
+ * @see https://redis.io/commands/randomkey
1013
+ */
1014
+ declare class RandomKeyCommand extends Command<string | null, string | null> {
1015
+ constructor(opts?: CommandOptions<string | null, string | null>);
1016
+ }
1017
+
1018
+ /**
1019
+ * @see https://redis.io/commands/rename
1020
+ */
1021
+ declare class RenameCommand extends Command<"OK", "OK"> {
1022
+ constructor(cmd: [source: string, destination: string], opts?: CommandOptions<"OK", "OK">);
1023
+ }
1024
+
1025
+ /**
1026
+ * @see https://redis.io/commands/renamenx
1027
+ */
1028
+ declare class RenameNXCommand extends Command<"0" | "1", 0 | 1> {
1029
+ constructor(cmd: [source: string, destination: string], opts?: CommandOptions<"0" | "1", 0 | 1>);
1030
+ }
1031
+
1032
+ /**
1033
+ * @see https://redis.io/commands/rpop
1034
+ */
1035
+ declare class RPopCommand<TData extends unknown | unknown[] = string> extends Command<unknown | null, TData | null> {
1036
+ constructor(cmd: [key: string, count?: number], opts?: CommandOptions<unknown | null, TData | null>);
1037
+ }
1038
+
1039
+ /**
1040
+ * @see https://redis.io/commands/rpush
1041
+ */
1042
+ declare class RPushCommand<TData = string> extends Command<number, number> {
1043
+ constructor(cmd: [key: string, ...elements: TData[]], opts?: CommandOptions<number, number>);
1044
+ }
1045
+
1046
+ /**
1047
+ * @see https://redis.io/commands/rpushx
1048
+ */
1049
+ declare class RPushXCommand<TData = string> extends Command<number, number> {
1050
+ constructor(cmd: [key: string, ...elements: TData[]], opts?: CommandOptions<number, number>);
1051
+ }
1052
+
1053
+ /**
1054
+ * @see https://redis.io/commands/sadd
1055
+ */
1056
+ declare class SAddCommand<TData = string> extends Command<number, number> {
1057
+ constructor(cmd: [key: string, ...members: TData[]], opts?: CommandOptions<number, number>);
1058
+ }
1059
+
1060
+ /**
1061
+ * @see https://redis.io/commands/scard
1062
+ */
1063
+ declare class SCardCommand extends Command<number, number> {
1064
+ constructor(cmd: [key: string], opts?: CommandOptions<number, number>);
1065
+ }
1066
+
1067
+ /**
1068
+ * @see https://redis.io/commands/script-exists
1069
+ */
1070
+ declare class ScriptExistsCommand<T extends string[]> extends Command<string[], number[]> {
1071
+ constructor(hashes: T, opts?: CommandOptions<string[], number[]>);
1072
+ }
1073
+
1074
+ /**
1075
+ * @see https://redis.io/commands/script-load
1076
+ */
1077
+ declare class ScriptLoadCommand extends Command<string, string> {
1078
+ constructor(args: [script: string], opts?: CommandOptions<string, string>);
1079
+ }
1080
+
1081
+ /**
1082
+ * @see https://redis.io/commands/sdiff
1083
+ */
1084
+ declare class SDiffCommand<TData> extends Command<unknown[], TData[]> {
1085
+ constructor(cmd: [key: string, ...keys: string[]], opts?: CommandOptions<unknown[], TData[]>);
1086
+ }
1087
+
1088
+ /**
1089
+ * @see https://redis.io/commands/sdiffstore
1090
+ */
1091
+ declare class SDiffStoreCommand extends Command<number, number> {
1092
+ constructor(cmd: [destination: string, ...keys: string[]], opts?: CommandOptions<number, number>);
1093
+ }
1094
+
1095
+ type SetCommandOptions = {
1096
+ get?: boolean;
1097
+ } & ({
1098
+ ex: number;
1099
+ px?: never;
1100
+ exat?: never;
1101
+ pxat?: never;
1102
+ keepTtl?: never;
1103
+ } | {
1104
+ ex?: never;
1105
+ px: number;
1106
+ exat?: never;
1107
+ pxat?: never;
1108
+ keepTtl?: never;
1109
+ } | {
1110
+ ex?: never;
1111
+ px?: never;
1112
+ exat: number;
1113
+ pxat?: never;
1114
+ keepTtl?: never;
1115
+ } | {
1116
+ ex?: never;
1117
+ px?: never;
1118
+ exat?: never;
1119
+ pxat: number;
1120
+ keepTtl?: never;
1121
+ } | {
1122
+ ex?: never;
1123
+ px?: never;
1124
+ exat?: never;
1125
+ pxat?: never;
1126
+ keepTtl: true;
1127
+ } | {
1128
+ ex?: never;
1129
+ px?: never;
1130
+ exat?: never;
1131
+ pxat?: never;
1132
+ keepTtl?: never;
1133
+ }) & ({
1134
+ nx: true;
1135
+ xx?: never;
1136
+ } | {
1137
+ xx: true;
1138
+ nx?: never;
1139
+ } | {
1140
+ xx?: never;
1141
+ nx?: never;
1142
+ });
1143
+ /**
1144
+ * @see https://redis.io/commands/set
1145
+ */
1146
+ declare class SetCommand<TData, TResult = TData | "OK" | null> extends Command<TResult, TData | "OK" | null> {
1147
+ constructor([key, value, opts]: [key: string, value: TData, opts?: SetCommandOptions], cmdOpts?: CommandOptions<TResult, TData>);
1148
+ }
1149
+
1150
+ /**
1151
+ * @see https://redis.io/commands/setbit
1152
+ */
1153
+ declare class SetBitCommand extends Command<"0" | "1", 0 | 1> {
1154
+ constructor(cmd: [key: string, offset: number, value: 0 | 1], opts?: CommandOptions<"0" | "1", 0 | 1>);
1155
+ }
1156
+
1157
+ /**
1158
+ * @see https://redis.io/commands/setex
1159
+ */
1160
+ declare class SetExCommand<TData = string> extends Command<"OK", "OK"> {
1161
+ constructor(cmd: [key: string, ttl: number, value: TData], opts?: CommandOptions<"OK", "OK">);
1162
+ }
1163
+
1164
+ /**
1165
+ * @see https://redis.io/commands/setnx
1166
+ */
1167
+ declare class SetNxCommand<TData = string> extends Command<number, number> {
1168
+ constructor(cmd: [key: string, value: TData], opts?: CommandOptions<number, number>);
1169
+ }
1170
+
1171
+ /**
1172
+ * @see https://redis.io/commands/setrange
1173
+ */
1174
+ declare class SetRangeCommand extends Command<number, number> {
1175
+ constructor(cmd: [key: string, offset: number, value: string], opts?: CommandOptions<number, number>);
1176
+ }
1177
+
1178
+ /**
1179
+ * @see https://redis.io/commands/sinter
1180
+ */
1181
+ declare class SInterCommand<TData = string> extends Command<unknown[], TData[]> {
1182
+ constructor(cmd: [key: string, ...keys: string[]], opts?: CommandOptions<unknown[], TData[]>);
1183
+ }
1184
+
1185
+ /**
1186
+ * @see https://redis.io/commands/sinterstore
1187
+ */
1188
+ declare class SInterStoreCommand extends Command<number, number> {
1189
+ constructor(cmd: [destination: string, key: string, ...keys: string[]], opts?: CommandOptions<number, number>);
1190
+ }
1191
+
1192
+ /**
1193
+ * @see https://redis.io/commands/sismember
1194
+ */
1195
+ declare class SIsMemberCommand<TData = string> extends Command<"0" | "1", 0 | 1> {
1196
+ constructor(cmd: [key: string, member: TData], opts?: CommandOptions<"0" | "1", 0 | 1>);
1197
+ }
1198
+
1199
+ /**
1200
+ * @see https://redis.io/commands/smembers
1201
+ */
1202
+ declare class SMembersCommand<TData extends unknown[] = string[]> extends Command<unknown[], TData> {
1203
+ constructor(cmd: [key: string], opts?: CommandOptions<unknown[], TData>);
1204
+ }
1205
+
1206
+ /**
1207
+ * @see https://redis.io/commands/smismember
1208
+ */
1209
+ declare class SMIsMemberCommand<TMembers extends unknown[]> extends Command<("0" | "1")[], (0 | 1)[]> {
1210
+ constructor(cmd: [key: string, members: TMembers], opts?: CommandOptions<("0" | "1")[], (0 | 1)[]>);
1211
+ }
1212
+
1213
+ /**
1214
+ * @see https://redis.io/commands/smove
1215
+ */
1216
+ declare class SMoveCommand<TData> extends Command<"0" | "1", 0 | 1> {
1217
+ constructor(cmd: [source: string, destination: string, member: TData], opts?: CommandOptions<"0" | "1", 0 | 1>);
1218
+ }
1219
+
1220
+ /**
1221
+ * @see https://redis.io/commands/spop
1222
+ */
1223
+ declare class SPopCommand<TData> extends Command<string | string[] | null, TData | null> {
1224
+ constructor([key, count]: [key: string, count?: number], opts?: CommandOptions<string | string[] | null, TData | null>);
1225
+ }
1226
+
1227
+ /**
1228
+ * @see https://redis.io/commands/srandmember
1229
+ */
1230
+ declare class SRandMemberCommand<TData> extends Command<string | null, TData | null> {
1231
+ constructor([key, count]: [key: string, count?: number], opts?: CommandOptions<string | null, TData | null>);
1232
+ }
1233
+
1234
+ /**
1235
+ * @see https://redis.io/commands/srem
1236
+ */
1237
+ declare class SRemCommand<TData = string> extends Command<number, number> {
1238
+ constructor(cmd: [key: string, ...members: TData[]], opts?: CommandOptions<number, number>);
1239
+ }
1240
+
1241
+ /**
1242
+ * @see https://redis.io/commands/sscan
1243
+ */
1244
+ declare class SScanCommand extends Command<[
1245
+ number,
1246
+ (string | number)[]
1247
+ ], [
1248
+ number,
1249
+ (string | number)[]
1250
+ ]> {
1251
+ constructor([key, cursor, opts]: [key: string, cursor: number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[number, (string | number)[]], [number, (string | number)[]]>);
1252
+ }
1253
+
1254
+ /**
1255
+ * @see https://redis.io/commands/strlen
236
1256
  */
237
- declare class JsonGetCommand<TData extends (unknown | Record<string, unknown>) | (unknown | Record<string, unknown>)[]> extends Command<TData | null, TData | null> {
238
- constructor(cmd: [
239
- key: string,
240
- opts?: {
241
- indent?: string;
242
- newline?: string;
243
- space?: string;
244
- },
245
- ...path: string[]
246
- ] | [key: string, ...path: string[]], opts?: CommandOptions<TData | null, TData | null>);
1257
+ declare class StrLenCommand extends Command<number, number> {
1258
+ constructor(cmd: [key: string], opts?: CommandOptions<number, number>);
247
1259
  }
248
1260
 
249
1261
  /**
250
- * @see https://redis.io/commands/mget
1262
+ * @see https://redis.io/commands/sunion
251
1263
  */
252
- declare class MGetCommand<TData extends unknown[]> extends Command<(string | null)[], TData> {
253
- constructor(cmd: [string[]] | [...(string[] | string[])], opts?: CommandOptions<(string | null)[], TData>);
1264
+ declare class SUnionCommand<TData> extends Command<string[], TData[]> {
1265
+ constructor(cmd: [key: string, ...keys: string[]], opts?: CommandOptions<string[], TData[]>);
254
1266
  }
255
1267
 
256
1268
  /**
257
- * @see https://redis.io/commands/ping
1269
+ * @see https://redis.io/commands/sunionstore
258
1270
  */
259
- declare class PingCommand extends Command<string | "PONG", string | "PONG"> {
260
- constructor(cmd?: [message?: string], opts?: CommandOptions<string | "PONG", string | "PONG">);
1271
+ declare class SUnionStoreCommand extends Command<number, number> {
1272
+ constructor(cmd: [destination: string, key: string, ...keys: string[]], opts?: CommandOptions<number, number>);
261
1273
  }
262
1274
 
263
1275
  /**
264
- * @see https://redis.io/commands/script-exists
1276
+ * @see https://redis.io/commands/time
265
1277
  */
266
- declare class ScriptExistsCommand<T extends string[]> extends Command<string[], number[]> {
267
- constructor(hashes: T, opts?: CommandOptions<string[], number[]>);
1278
+ declare class TimeCommand extends Command<[number, number], [number, number]> {
1279
+ constructor(opts?: CommandOptions<[number, number], [number, number]>);
268
1280
  }
269
1281
 
270
- type SetCommandOptions = {
271
- get?: boolean;
272
- } & ({
273
- ex: number;
274
- px?: never;
275
- exat?: never;
276
- pxat?: never;
277
- keepTtl?: never;
278
- } | {
279
- ex?: never;
280
- px: number;
281
- exat?: never;
282
- pxat?: never;
283
- keepTtl?: never;
284
- } | {
285
- ex?: never;
286
- px?: never;
287
- exat: number;
288
- pxat?: never;
289
- keepTtl?: never;
290
- } | {
291
- ex?: never;
292
- px?: never;
293
- exat?: never;
294
- pxat: number;
295
- keepTtl?: never;
296
- } | {
297
- ex?: never;
298
- px?: never;
299
- exat?: never;
300
- pxat?: never;
301
- keepTtl: true;
302
- } | {
303
- ex?: never;
304
- px?: never;
305
- exat?: never;
306
- pxat?: never;
307
- keepTtl?: never;
308
- }) & ({
309
- nx: true;
310
- xx?: never;
311
- } | {
312
- xx: true;
313
- nx?: never;
314
- } | {
315
- xx?: never;
316
- nx?: never;
317
- });
318
-
319
1282
  /**
320
1283
  * @see https://redis.io/commands/touch
321
1284
  */
@@ -323,6 +1286,13 @@ declare class TouchCommand extends Command<number, number> {
323
1286
  constructor(cmd: [...keys: string[]], opts?: CommandOptions<number, number>);
324
1287
  }
325
1288
 
1289
+ /**
1290
+ * @see https://redis.io/commands/ttl
1291
+ */
1292
+ declare class TtlCommand extends Command<number, number> {
1293
+ constructor(cmd: [key: string], opts?: CommandOptions<number, number>);
1294
+ }
1295
+
326
1296
  /**
327
1297
  * @see https://redis.io/commands/unlink
328
1298
  */
@@ -330,7 +1300,41 @@ declare class UnlinkCommand extends Command<number, number> {
330
1300
  constructor(cmd: [...keys: string[]], opts?: CommandOptions<number, number>);
331
1301
  }
332
1302
 
333
- type ZAddCommandOptions = ({
1303
+ type XAddCommandOptions = {
1304
+ nomkStream?: boolean;
1305
+ trim?: ({
1306
+ type: "MAXLEN" | "maxlen";
1307
+ threshold: number;
1308
+ } | {
1309
+ type: "MINID" | "minid";
1310
+ threshold: string;
1311
+ }) & ({
1312
+ comparison: "~";
1313
+ limit?: number;
1314
+ } | {
1315
+ comparison: "=";
1316
+ limit?: never;
1317
+ });
1318
+ };
1319
+ /**
1320
+ * @see https://redis.io/commands/xadd
1321
+ */
1322
+ declare class XAddCommand extends Command<string, string> {
1323
+ constructor([key, id, entries, opts]: [
1324
+ key: string,
1325
+ id: "*" | string,
1326
+ entries: {
1327
+ [field: string]: unknown;
1328
+ },
1329
+ opts?: XAddCommandOptions
1330
+ ], commandOptions?: CommandOptions<string, string>);
1331
+ }
1332
+
1333
+ declare class XRangeCommand<TData extends Record<string, Record<string, unknown>>> extends Command<string[][], TData> {
1334
+ constructor([key, start, end, count]: [key: string, start: string, end: string, count?: number], opts?: CommandOptions<unknown[], TData[]>);
1335
+ }
1336
+
1337
+ type NXAndXXOptions = {
334
1338
  nx: true;
335
1339
  xx?: never;
336
1340
  } | {
@@ -339,16 +1343,75 @@ type ZAddCommandOptions = ({
339
1343
  } | {
340
1344
  nx?: never;
341
1345
  xx?: never;
342
- }) & {
343
- ch?: true;
344
1346
  };
345
- type ZAddCommandOptionsWithIncr = ZAddCommandOptions & {
346
- incr: true;
1347
+ type LTAndGTOptions = {
1348
+ lt: true;
1349
+ gt?: never;
1350
+ } | {
1351
+ lt?: never;
1352
+ gt: true;
1353
+ } | {
1354
+ lt?: never;
1355
+ gt?: never;
1356
+ };
1357
+ type ZAddCommandOptions = NXAndXXOptions & LTAndGTOptions & {
1358
+ ch?: true;
1359
+ } & {
1360
+ incr?: true;
347
1361
  };
1362
+ type Arg2<TData> = ScoreMember<TData> | ZAddCommandOptions;
348
1363
  type ScoreMember<TData> = {
349
1364
  score: number;
350
1365
  member: TData;
351
1366
  };
1367
+ /**
1368
+ * @see https://redis.io/commands/zadd
1369
+ */
1370
+ declare class ZAddCommand<TData = string> extends Command<number | null, number | null> {
1371
+ constructor([key, arg1, ...arg2]: [string, Arg2<TData>, ...ScoreMember<TData>[]], opts?: CommandOptions<number | null, number | null>);
1372
+ }
1373
+
1374
+ /**
1375
+ * @see https://redis.io/commands/zcard
1376
+ */
1377
+ declare class ZCardCommand extends Command<number, number> {
1378
+ constructor(cmd: [key: string], opts?: CommandOptions<number, number>);
1379
+ }
1380
+
1381
+ /**
1382
+ * @see https://redis.io/commands/zcount
1383
+ */
1384
+ declare class ZCountCommand extends Command<number, number> {
1385
+ constructor(cmd: [key: string, min: number | string, max: number | string], opts?: CommandOptions<number, number>);
1386
+ }
1387
+
1388
+ /**
1389
+ * @see https://redis.io/commands/zincrby
1390
+ */
1391
+ declare class ZIncrByCommand<TData> extends Command<number, number> {
1392
+ constructor(cmd: [key: string, increment: number, member: TData], opts?: CommandOptions<number, number>);
1393
+ }
1394
+
1395
+ /**
1396
+ * @see https://redis.io/commands/zlexcount
1397
+ */
1398
+ declare class ZLexCountCommand extends Command<number, number> {
1399
+ constructor(cmd: [key: string, min: string, max: string], opts?: CommandOptions<number, number>);
1400
+ }
1401
+
1402
+ /**
1403
+ * @see https://redis.io/commands/zpopmax
1404
+ */
1405
+ declare class ZPopMaxCommand<TData> extends Command<string[], TData[]> {
1406
+ constructor([key, count]: [key: string, count?: number], opts?: CommandOptions<string[], TData[]>);
1407
+ }
1408
+
1409
+ /**
1410
+ * @see https://redis.io/commands/zpopmin
1411
+ */
1412
+ declare class ZPopMinCommand<TData> extends Command<string[], TData[]> {
1413
+ constructor([key, count]: [key: string, count?: number], opts?: CommandOptions<string[], TData[]>);
1414
+ }
352
1415
 
353
1416
  type ZRangeCommandOptions = {
354
1417
  withScores?: boolean;
@@ -369,6 +1432,90 @@ type ZRangeCommandOptions = {
369
1432
  offset?: never;
370
1433
  count?: never;
371
1434
  });
1435
+ /**
1436
+ * @see https://redis.io/commands/zrange
1437
+ */
1438
+ declare class ZRangeCommand<TData extends unknown[]> extends Command<string[], TData> {
1439
+ constructor(cmd: [key: string, min: number, max: number, opts?: ZRangeCommandOptions], cmdOpts?: CommandOptions<string[], TData>);
1440
+ constructor(cmd: [
1441
+ key: string,
1442
+ min: `(${string}` | `[${string}` | "-" | "+",
1443
+ max: `(${string}` | `[${string}` | "-" | "+",
1444
+ opts: {
1445
+ byLex: true;
1446
+ } & ZRangeCommandOptions
1447
+ ], cmdOpts?: CommandOptions<string[], TData>);
1448
+ constructor(cmd: [
1449
+ key: string,
1450
+ min: number | `(${number}` | "-inf" | "+inf",
1451
+ max: number | `(${number}` | "-inf" | "+inf",
1452
+ opts: {
1453
+ byScore: true;
1454
+ } & ZRangeCommandOptions
1455
+ ], cmdOpts?: CommandOptions<string[], TData>);
1456
+ }
1457
+
1458
+ /**
1459
+ * @see https://redis.io/commands/zrank
1460
+ */
1461
+ declare class ZRankCommand<TData> extends Command<number | null, number | null> {
1462
+ constructor(cmd: [key: string, member: TData], opts?: CommandOptions<number | null, number | null>);
1463
+ }
1464
+
1465
+ /**
1466
+ * @see https://redis.io/commands/zrem
1467
+ */
1468
+ declare class ZRemCommand<TData = string> extends Command<number, number> {
1469
+ constructor(cmd: [key: string, ...members: TData[]], opts?: CommandOptions<number, number>);
1470
+ }
1471
+
1472
+ /**
1473
+ * @see https://redis.io/commands/zremrangebylex
1474
+ */
1475
+ declare class ZRemRangeByLexCommand extends Command<number, number> {
1476
+ constructor(cmd: [key: string, min: string, max: string], opts?: CommandOptions<number, number>);
1477
+ }
1478
+
1479
+ /**
1480
+ * @see https://redis.io/commands/zremrangebyrank
1481
+ */
1482
+ declare class ZRemRangeByRankCommand extends Command<number, number> {
1483
+ constructor(cmd: [key: string, start: number, stop: number], opts?: CommandOptions<number, number>);
1484
+ }
1485
+
1486
+ /**
1487
+ * @see https://redis.io/commands/zremrangebyscore
1488
+ */
1489
+ declare class ZRemRangeByScoreCommand extends Command<number, number> {
1490
+ constructor(cmd: [key: string, min: number, max: number], opts?: CommandOptions<number, number>);
1491
+ }
1492
+
1493
+ /**
1494
+ * @see https://redis.io/commands/zrevrank
1495
+ */
1496
+ declare class ZRevRankCommand<TData> extends Command<number | null, number | null> {
1497
+ constructor(cmd: [key: string, member: TData], opts?: CommandOptions<number | null, number | null>);
1498
+ }
1499
+
1500
+ /**
1501
+ * @see https://redis.io/commands/zscan
1502
+ */
1503
+ declare class ZScanCommand extends Command<[
1504
+ number,
1505
+ (string | number)[]
1506
+ ], [
1507
+ number,
1508
+ (string | number)[]
1509
+ ]> {
1510
+ constructor([key, cursor, opts]: [key: string, cursor: number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[number, (string | number)[]], [number, (string | number)[]]>);
1511
+ }
1512
+
1513
+ /**
1514
+ * @see https://redis.io/commands/zscore
1515
+ */
1516
+ declare class ZScoreCommand<TData> extends Command<string | null, number | null> {
1517
+ constructor(cmd: [key: string, member: TData], opts?: CommandOptions<string | null, number | null>);
1518
+ }
372
1519
 
373
1520
  type InferResponseData<T extends unknown[]> = {
374
1521
  [K in keyof T]: T[K] extends Command<any, infer TData> ? TData : unknown;
@@ -456,12 +1603,21 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
456
1603
  */
457
1604
  bitop: {
458
1605
  (op: "and" | "or" | "xor", destinationKey: string, sourceKey: string, ...sourceKeys: string[]): Pipeline<[...TCommands, BitOpCommand]>;
459
- (op: "not", destinationKey: string, sourceKey: string): Pipeline<[...TCommands, BitOpCommand]>;
1606
+ (op: "not", destinationKey: string, sourceKey: string): Pipeline<[
1607
+ ...TCommands,
1608
+ BitOpCommand
1609
+ ]>;
460
1610
  };
461
1611
  /**
462
1612
  * @see https://redis.io/commands/bitpos
463
1613
  */
464
1614
  bitpos: (key: string, bit: 0 | 1, start?: number | undefined, end?: number | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
1615
+ /**
1616
+ * @see https://redis.io/commands/copy
1617
+ */
1618
+ copy: (key: string, destinationKey: string, opts?: {
1619
+ replace: boolean;
1620
+ } | undefined) => Pipeline<[...TCommands, Command<any, "COPIED" | "NOT_COPIED">]>;
465
1621
  /**
466
1622
  * @see https://redis.io/commands/zdiffstore
467
1623
  */
@@ -700,6 +1856,18 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
700
1856
  * @see https://redis.io/commands/pexpireat
701
1857
  */
702
1858
  pexpireat: (key: string, unix: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
1859
+ /**
1860
+ * @see https://redis.io/commands/pfadd
1861
+ */
1862
+ pfadd: (args_0: string, ...args_1: unknown[]) => Pipeline<[...TCommands, Command<any, number>]>;
1863
+ /**
1864
+ * @see https://redis.io/commands/pfcount
1865
+ */
1866
+ pfcount: (args_0: string, ...args_1: string[]) => Pipeline<[...TCommands, Command<any, number>]>;
1867
+ /**
1868
+ * @see https://redis.io/commands/pfmerge
1869
+ */
1870
+ pfmerge: (destination_key: string, ...args_1: string[]) => Pipeline<[...TCommands, Command<any, "OK">]>;
703
1871
  /**
704
1872
  * @see https://redis.io/commands/ping
705
1873
  */
@@ -864,7 +2032,53 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
864
2032
  /**
865
2033
  * @see https://redis.io/commands/zadd
866
2034
  */
867
- zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [key: string, opts: ZAddCommandOptions | ZAddCommandOptionsWithIncr, ScoreMember<TData>, ...ScoreMember<TData>[]]) => Pipeline<[...TCommands, Command<any, number | null>]>;
2035
+ zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [key: string, opts: ZAddCommandOptions, ScoreMember<TData>, ...ScoreMember<TData>[]]) => Pipeline<[...TCommands, Command<any, number | null>]>;
2036
+ /**
2037
+ * @see https://redis.io/commands/xadd
2038
+ */
2039
+ xadd: (key: string, id: string, entries: {
2040
+ [field: string]: unknown;
2041
+ }, opts?: {
2042
+ nomkStream?: boolean | undefined;
2043
+ trim?: (({
2044
+ type: "MAXLEN" | "maxlen";
2045
+ threshold: number;
2046
+ } | {
2047
+ type: "MINID" | "minid";
2048
+ threshold: string;
2049
+ }) & ({
2050
+ comparison: "~";
2051
+ limit?: number | undefined;
2052
+ } | {
2053
+ comparison: "=";
2054
+ limit?: undefined;
2055
+ })) | undefined;
2056
+ } | undefined) => Pipeline<[...TCommands, Command<any, string>]>;
2057
+ /**
2058
+ * @see https://redis.io/commands/xdel
2059
+ */
2060
+ xdel: (key: string, ids: string | string[]) => Pipeline<[...TCommands, Command<any, number>]>;
2061
+ /**
2062
+ * @see https://redis.io/commands/xlen
2063
+ */
2064
+ xlen: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
2065
+ /**
2066
+ * @see https://redis.io/commands/xtrim
2067
+ */
2068
+ xtrim: (key: string, options: {
2069
+ strategy: "MAXLEN" | "MINID";
2070
+ exactness?: "~" | "=" | undefined;
2071
+ threshold: string | number;
2072
+ limit?: number | undefined;
2073
+ }) => Pipeline<[...TCommands, Command<any, number>]>;
2074
+ /**
2075
+ * @see https://redis.io/commands/xrange
2076
+ */
2077
+ xrange: (key: string, start: string, end: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, Record<string, Record<string, unknown>>>]>;
2078
+ /**
2079
+ * @see https://redis.io/commands/xrevrange
2080
+ */
2081
+ xrevrange: (key: string, end: string, start: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, Record<string, Record<string, unknown>>>]>;
868
2082
  /**
869
2083
  * @see https://redis.io/commands/zcard
870
2084
  */
@@ -998,11 +2212,93 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
998
2212
  /**
999
2213
  * @see https://redis.io/commands/geoadd
1000
2214
  */
1001
- geoadd: (args_0: string, args_1: GeoAddCommandOptions | GeoMember<unknown>, ...args_2: GeoMember<unknown>[]) => Promise<number | null>;
2215
+ geoadd: (args_0: string, args_1: GeoAddCommandOptions | GeoMember<unknown>, ...args_2: GeoMember<unknown>[]) => Pipeline<[...TCommands, Command<any, number | null>]>;
1002
2216
  /**
1003
2217
  * @see https://redis.io/commands/geodist
1004
2218
  */
1005
- geodist: (key: string, member1: unknown, member2: unknown, unit?: "M" | "KM" | "FT" | "MI" | undefined) => Promise<number | null>;
2219
+ geodist: (key: string, member1: unknown, member2: unknown, unit?: "M" | "KM" | "FT" | "MI" | undefined) => Pipeline<[...TCommands, Command<any, number | null>]>;
2220
+ /**
2221
+ * @see https://redis.io/commands/geopos
2222
+ */
2223
+ geopos: (args_0: string, ...args_1: unknown[]) => Pipeline<[...TCommands, Command<any, {
2224
+ lng: number;
2225
+ lat: number;
2226
+ }[]>]>;
2227
+ /**
2228
+ * @see https://redis.io/commands/geohash
2229
+ */
2230
+ geohash: (args_0: string, ...args_1: unknown[]) => Pipeline<[...TCommands, Command<any, (string | null)[]>]>;
2231
+ /**
2232
+ * @see https://redis.io/commands/geosearch
2233
+ */
2234
+ geosearch: (key: string, centerPoint: {
2235
+ type: "FROMLONLAT" | "fromlonlat";
2236
+ coordinate: {
2237
+ lon: number;
2238
+ lat: number;
2239
+ };
2240
+ } | {
2241
+ type: "FROMMEMBER" | "frommember";
2242
+ member: unknown;
2243
+ }, shape: {
2244
+ type: "BYRADIUS" | "byradius";
2245
+ radius: number;
2246
+ radiusType: "M" | "KM" | "FT" | "MI";
2247
+ } | {
2248
+ type: "BYBOX" | "bybox";
2249
+ rect: {
2250
+ width: number;
2251
+ height: number;
2252
+ };
2253
+ rectType: "M" | "KM" | "FT" | "MI";
2254
+ }, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
2255
+ count?: {
2256
+ limit: number;
2257
+ any?: boolean | undefined;
2258
+ } | undefined;
2259
+ withCoord?: boolean | undefined;
2260
+ withDist?: boolean | undefined;
2261
+ withHash?: boolean | undefined;
2262
+ } | undefined) => Pipeline<[...TCommands, Command<any, ({
2263
+ member: unknown;
2264
+ } & {
2265
+ coord?: {
2266
+ long: number;
2267
+ lat: number;
2268
+ } | undefined;
2269
+ dist?: number | undefined;
2270
+ hash?: string | undefined;
2271
+ })[]>]>;
2272
+ /**
2273
+ * @see https://redis.io/commands/geosearchstore
2274
+ */
2275
+ geosearchstore: (destination: string, key: string, centerPoint: {
2276
+ type: "FROMLONLAT" | "fromlonlat";
2277
+ coordinate: {
2278
+ lon: number;
2279
+ lat: number;
2280
+ };
2281
+ } | {
2282
+ type: "FROMMEMBER" | "frommember";
2283
+ member: unknown;
2284
+ }, shape: {
2285
+ type: "BYRADIUS" | "byradius";
2286
+ radius: number;
2287
+ radiusType: "M" | "KM" | "FT" | "MI";
2288
+ } | {
2289
+ type: "BYBOX" | "bybox";
2290
+ rect: {
2291
+ width: number;
2292
+ height: number;
2293
+ };
2294
+ rectType: "M" | "KM" | "FT" | "MI";
2295
+ }, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
2296
+ count?: {
2297
+ limit: number;
2298
+ any?: boolean | undefined;
2299
+ } | undefined;
2300
+ storeDist?: boolean | undefined;
2301
+ } | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
1006
2302
  /**
1007
2303
  * @see https://redis.io/commands/json.get
1008
2304
  */
@@ -1162,10 +2458,92 @@ declare class Redis {
1162
2458
  * @see https://redis.io/commands/geoadd
1163
2459
  */
1164
2460
  geoadd: (args_0: string, args_1: GeoAddCommandOptions | GeoMember<unknown>, ...args_2: GeoMember<unknown>[]) => Promise<number | null>;
2461
+ /**
2462
+ * @see https://redis.io/commands/geopos
2463
+ */
2464
+ geopos: (args_0: string, ...args_1: unknown[]) => Promise<{
2465
+ lng: number;
2466
+ lat: number;
2467
+ }[]>;
1165
2468
  /**
1166
2469
  * @see https://redis.io/commands/geodist
1167
2470
  */
1168
2471
  geodist: (key: string, member1: unknown, member2: unknown, unit?: "M" | "KM" | "FT" | "MI" | undefined) => Promise<number | null>;
2472
+ /**
2473
+ * @see https://redis.io/commands/geohash
2474
+ */
2475
+ geohash: (args_0: string, ...args_1: unknown[]) => Promise<(string | null)[]>;
2476
+ /**
2477
+ * @see https://redis.io/commands/geosearch
2478
+ */
2479
+ geosearch: (key: string, centerPoint: {
2480
+ type: "FROMLONLAT" | "fromlonlat";
2481
+ coordinate: {
2482
+ lon: number;
2483
+ lat: number;
2484
+ };
2485
+ } | {
2486
+ type: "FROMMEMBER" | "frommember";
2487
+ member: unknown;
2488
+ }, shape: {
2489
+ type: "BYRADIUS" | "byradius";
2490
+ radius: number;
2491
+ radiusType: "M" | "KM" | "FT" | "MI";
2492
+ } | {
2493
+ type: "BYBOX" | "bybox";
2494
+ rect: {
2495
+ width: number;
2496
+ height: number;
2497
+ };
2498
+ rectType: "M" | "KM" | "FT" | "MI";
2499
+ }, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
2500
+ count?: {
2501
+ limit: number;
2502
+ any?: boolean | undefined;
2503
+ } | undefined;
2504
+ withCoord?: boolean | undefined;
2505
+ withDist?: boolean | undefined;
2506
+ withHash?: boolean | undefined;
2507
+ } | undefined) => Promise<({
2508
+ member: unknown;
2509
+ } & {
2510
+ coord?: {
2511
+ long: number;
2512
+ lat: number;
2513
+ } | undefined;
2514
+ dist?: number | undefined;
2515
+ hash?: string | undefined;
2516
+ })[]>;
2517
+ /**
2518
+ * @see https://redis.io/commands/geosearchstore
2519
+ */
2520
+ geosearchstore: (destination: string, key: string, centerPoint: {
2521
+ type: "FROMLONLAT" | "fromlonlat";
2522
+ coordinate: {
2523
+ lon: number;
2524
+ lat: number;
2525
+ };
2526
+ } | {
2527
+ type: "FROMMEMBER" | "frommember";
2528
+ member: unknown;
2529
+ }, shape: {
2530
+ type: "BYRADIUS" | "byradius";
2531
+ radius: number;
2532
+ radiusType: "M" | "KM" | "FT" | "MI";
2533
+ } | {
2534
+ type: "BYBOX" | "bybox";
2535
+ rect: {
2536
+ width: number;
2537
+ height: number;
2538
+ };
2539
+ rectType: "M" | "KM" | "FT" | "MI";
2540
+ }, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
2541
+ count?: {
2542
+ limit: number;
2543
+ any?: boolean | undefined;
2544
+ } | undefined;
2545
+ storeDist?: boolean | undefined;
2546
+ } | undefined) => Promise<number>;
1169
2547
  /**
1170
2548
  * @see https://redis.io/commands/json.get
1171
2549
  */
@@ -1265,6 +2643,12 @@ declare class Redis {
1265
2643
  * @see https://redis.io/commands/bitpos
1266
2644
  */
1267
2645
  bitpos: (key: string, bit: 0 | 1, start?: number | undefined, end?: number | undefined) => Promise<number>;
2646
+ /**
2647
+ * @see https://redis.io/commands/copy
2648
+ */
2649
+ copy: (key: string, destinationKey: string, opts?: {
2650
+ replace: boolean;
2651
+ } | undefined) => Promise<"COPIED" | "NOT_COPIED">;
1268
2652
  /**
1269
2653
  * @see https://redis.io/commands/dbsize
1270
2654
  */
@@ -1503,6 +2887,18 @@ declare class Redis {
1503
2887
  * @see https://redis.io/commands/pexpireat
1504
2888
  */
1505
2889
  pexpireat: (key: string, unix: number) => Promise<0 | 1>;
2890
+ /**
2891
+ * @see https://redis.io/commands/pfadd
2892
+ */
2893
+ pfadd: (args_0: string, ...args_1: unknown[]) => Promise<number>;
2894
+ /**
2895
+ * @see https://redis.io/commands/pfcount
2896
+ */
2897
+ pfcount: (args_0: string, ...args_1: string[]) => Promise<number>;
2898
+ /**
2899
+ * @see https://redis.io/commands/pfmerge
2900
+ */
2901
+ pfmerge: (destination_key: string, ...args_1: string[]) => Promise<"OK">;
1506
2902
  /**
1507
2903
  * @see https://redis.io/commands/ping
1508
2904
  */
@@ -1688,14 +3084,35 @@ declare class Redis {
1688
3084
  limit?: undefined;
1689
3085
  })) | undefined;
1690
3086
  } | undefined) => Promise<string>;
3087
+ /**
3088
+ * @see https://redis.io/commands/xdel
3089
+ */
3090
+ xdel: (key: string, ids: string | string[]) => Promise<number>;
3091
+ /**
3092
+ * @see https://redis.io/commands/xlen
3093
+ */
3094
+ xlen: (key: string) => Promise<number>;
3095
+ /**
3096
+ * @see https://redis.io/commands/xtrim
3097
+ */
3098
+ xtrim: (key: string, options: {
3099
+ strategy: "MAXLEN" | "MINID";
3100
+ exactness?: "~" | "=" | undefined;
3101
+ threshold: string | number;
3102
+ limit?: number | undefined;
3103
+ }) => Promise<number>;
1691
3104
  /**
1692
3105
  * @see https://redis.io/commands/xrange
1693
3106
  */
1694
3107
  xrange: (key: string, start: string, end: string, count?: number | undefined) => Promise<Record<string, Record<string, unknown>>>;
3108
+ /**
3109
+ * @see https://redis.io/commands/xrevrange
3110
+ */
3111
+ xrevrange: (key: string, end: string, start: string, count?: number | undefined) => Promise<Record<string, Record<string, unknown>>>;
1695
3112
  /**
1696
3113
  * @see https://redis.io/commands/zadd
1697
3114
  */
1698
- zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [key: string, opts: ZAddCommandOptions | ZAddCommandOptionsWithIncr, ScoreMember<TData>, ...ScoreMember<TData>[]]) => Promise<number | null>;
3115
+ zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [key: string, opts: ZAddCommandOptions, ScoreMember<TData>, ...ScoreMember<TData>[]]) => Promise<number | null>;
1699
3116
  /**
1700
3117
  * @see https://redis.io/commands/zcard
1701
3118
  */
@@ -1792,4 +3209,18 @@ declare class Redis {
1792
3209
  zunionstore: (destination: string, numKeys: number, keys: string[], opts?: ZUnionStoreCommandOptions | undefined) => Promise<number>;
1793
3210
  }
1794
3211
 
1795
- export { RedisOptions as R, UpstashRequest as U, RequesterConfig as a, Redis as b, Requester as c, UpstashResponse as d };
3212
+ /**
3213
+ * @see https://redis.io/commands/zdiffstore
3214
+ */
3215
+ declare class ZDiffStoreCommand extends Command<number, number> {
3216
+ constructor(cmd: [destination: string, numkeys: number, ...keys: string[]], opts?: CommandOptions<number, number>);
3217
+ }
3218
+
3219
+ /**
3220
+ * @see https://redis.io/commands/zmscore
3221
+ */
3222
+ declare class ZMScoreCommand<TData> extends Command<string[] | null, number[] | null> {
3223
+ constructor(cmd: [key: string, members: TData[]], opts?: CommandOptions<string[] | null, number[] | null>);
3224
+ }
3225
+
3226
+ export { IncrByCommand as $, AppendCommand as A, BitCountCommand as B, CopyCommand as C, DBSizeCommand as D, EchoCommand as E, FlushAllCommand as F, GeoAddCommand as G, GetSetCommand as H, HDelCommand as I, HExistsCommand as J, HGetCommand as K, HGetAllCommand as L, HIncrByCommand as M, HIncrByFloatCommand as N, HKeysCommand as O, HLenCommand as P, HMGetCommand as Q, RedisOptions as R, HMSetCommand as S, HRandFieldCommand as T, UpstashRequest as U, HScanCommand as V, HSetCommand as W, HSetNXCommand as X, HStrLenCommand as Y, HValsCommand as Z, IncrCommand as _, RequesterConfig as a, SetNxCommand as a$, IncrByFloatCommand as a0, JsonArrAppendCommand as a1, JsonArrIndexCommand as a2, JsonArrInsertCommand as a3, JsonArrLenCommand as a4, JsonArrPopCommand as a5, JsonArrTrimCommand as a6, JsonClearCommand as a7, JsonDelCommand as a8, JsonForgetCommand as a9, MSetNXCommand as aA, PersistCommand as aB, PExpireCommand as aC, PExpireAtCommand as aD, PingCommand as aE, PSetEXCommand as aF, PTtlCommand as aG, PublishCommand as aH, RandomKeyCommand as aI, RenameCommand as aJ, RenameNXCommand as aK, RPopCommand as aL, RPushCommand as aM, RPushXCommand as aN, SAddCommand as aO, ScanCommand as aP, ScanCommandOptions as aQ, SCardCommand as aR, ScriptExistsCommand as aS, ScriptFlushCommand as aT, ScriptLoadCommand as aU, SDiffCommand as aV, SDiffStoreCommand as aW, SetCommand as aX, SetCommandOptions as aY, SetBitCommand as aZ, SetExCommand as a_, JsonGetCommand as aa, JsonMGetCommand as ab, JsonNumIncrByCommand as ac, JsonNumMultByCommand as ad, JsonObjKeysCommand as ae, JsonObjLenCommand as af, JsonRespCommand as ag, JsonSetCommand as ah, JsonStrAppendCommand as ai, JsonStrLenCommand as aj, JsonToggleCommand as ak, JsonTypeCommand as al, KeysCommand as am, LIndexCommand as an, LInsertCommand as ao, LLenCommand as ap, LMoveCommand as aq, LPopCommand as ar, LPushCommand as as, LPushXCommand as at, LRangeCommand as au, LRemCommand as av, LSetCommand as aw, LTrimCommand as ax, MGetCommand as ay, MSetCommand as az, Redis as b, SetRangeCommand as b0, SInterCommand as b1, SInterStoreCommand as b2, SIsMemberCommand as b3, SMembersCommand as b4, SMIsMemberCommand as b5, SMoveCommand as b6, SPopCommand as b7, SRandMemberCommand as b8, SRemCommand as b9, ZRangeCommandOptions as bA, ZRankCommand as bB, ZRemCommand as bC, ZRemRangeByLexCommand as bD, ZRemRangeByRankCommand as bE, ZRemRangeByScoreCommand as bF, ZRevRankCommand as bG, ZScanCommand as bH, ZScoreCommand as bI, ZUnionCommand as bJ, ZUnionCommandOptions as bK, ZUnionStoreCommand as bL, ZUnionStoreCommandOptions as bM, SScanCommand as ba, StrLenCommand as bb, SUnionCommand as bc, SUnionStoreCommand as bd, TimeCommand as be, TouchCommand as bf, TtlCommand as bg, Type as bh, TypeCommand as bi, UnlinkCommand as bj, XAddCommand as bk, XRangeCommand as bl, ScoreMember as bm, ZAddCommandOptions as bn, ZAddCommand as bo, ZCardCommand as bp, ZCountCommand as bq, ZDiffStoreCommand as br, ZIncrByCommand as bs, ZInterStoreCommand as bt, ZInterStoreCommandOptions as bu, ZLexCountCommand as bv, ZMScoreCommand as bw, ZPopMaxCommand as bx, ZPopMinCommand as by, ZRangeCommand as bz, Requester as c, UpstashResponse as d, BitOpCommand as e, BitPosCommand as f, DecrCommand as g, DecrByCommand as h, DelCommand as i, EvalCommand as j, EvalshaCommand as k, ExistsCommand as l, ExpireCommand as m, ExpireAtCommand as n, FlushDBCommand as o, GeoAddCommandOptions as p, GeoMember as q, GeoDistCommand as r, GeoHashCommand as s, GeoPosCommand as t, GeoSearchCommand as u, GeoSearchStoreCommand as v, GetCommand as w, GetBitCommand as x, GetDelCommand as y, GetRangeCommand as z };