@upstash/redis 0.0.0-ci.a5d572330a5c2987b0d97a4856a8270acdaa1581 → 0.0.0-ci.ab13a19fb29aed87c738632a215dbb1ec16a825e-20241004200556

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.
@@ -23,7 +23,10 @@ type RedisOptions = {
23
23
  * @default true
24
24
  */
25
25
  automaticDeserialization?: boolean;
26
+ latencyLogging?: boolean;
26
27
  enableTelemetry?: boolean;
28
+ enableAutoPipelining?: boolean;
29
+ readYourWrites?: boolean;
27
30
  };
28
31
 
29
32
  type CacheSetting = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload";
@@ -33,12 +36,21 @@ type UpstashRequest = {
33
36
  * Request body will be serialized to json
34
37
  */
35
38
  body?: unknown;
39
+ upstashSyncToken?: string;
36
40
  };
37
41
  type UpstashResponse<TResult> = {
38
42
  result?: TResult;
39
43
  error?: string;
40
44
  };
41
45
  interface Requester {
46
+ /**
47
+ * When this flag is enabled, any subsequent commands issued by this client are guaranteed to observe the effects of all earlier writes submitted by the same client.
48
+ */
49
+ readYourWrites?: boolean;
50
+ /**
51
+ * This token is used to ensure that the client is in sync with the server. On each request, we send this token in the header, and the server will return a new token.
52
+ */
53
+ upstashSyncToken?: string;
42
54
  request: <TResult = unknown>(req: UpstashRequest) => Promise<UpstashResponse<TResult>>;
43
55
  }
44
56
  type RetryConfig = false | {
@@ -106,6 +118,7 @@ type CommandOptions<TResult, TData> = {
106
118
  * @default true
107
119
  */
108
120
  automaticDeserialization?: boolean;
121
+ latencyLogging?: boolean;
109
122
  };
110
123
  /**
111
124
  * Command offers default (de)serialization and the exec method to all commands.
@@ -220,8 +233,8 @@ type ScanCommandOptions = {
220
233
  /**
221
234
  * @see https://redis.io/commands/scan
222
235
  */
223
- declare class ScanCommand extends Command<[number, string[]], [number, string[]]> {
224
- constructor([cursor, opts]: [cursor: number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[number, string[]], [number, string[]]>);
236
+ declare class ScanCommand extends Command<[string, string[]], [string, string[]]> {
237
+ constructor([cursor, opts]: [cursor: string | number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[string, string[]], [string, string[]]>);
225
238
  }
226
239
 
227
240
  type GeoAddCommandOptions = {
@@ -233,11 +246,11 @@ type GeoAddCommandOptions = {
233
246
  } & {
234
247
  ch?: boolean;
235
248
  });
236
- interface GeoMember<TMemberType> {
249
+ type GeoMember<TMemberType> = {
237
250
  latitude: number;
238
251
  longitude: number;
239
252
  member: TMemberType;
240
- }
253
+ };
241
254
  /**
242
255
  * @see https://redis.io/commands/geoadd
243
256
  */
@@ -264,6 +277,28 @@ declare class BitCountCommand extends Command<number, number> {
264
277
  constructor(cmd: [key: string, start: number, end: number], opts?: CommandOptions<number, number>);
265
278
  }
266
279
 
280
+ type SubCommandArgs<TRest extends unknown[] = []> = [
281
+ encoding: string,
282
+ offset: number | string,
283
+ ...rest: TRest
284
+ ];
285
+ /**
286
+ * @see https://redis.io/commands/bitfield
287
+ */
288
+ declare class BitFieldCommand<T = Promise<number[]>> {
289
+ private client;
290
+ private opts?;
291
+ private execOperation;
292
+ private command;
293
+ constructor(args: [key: string], client: Requester, opts?: CommandOptions<number[], number[]> | undefined, execOperation?: (command: Command<number[], number[]>) => T);
294
+ private chain;
295
+ get(...args: SubCommandArgs): this;
296
+ set(...args: SubCommandArgs<[value: number]>): this;
297
+ incrby(...args: SubCommandArgs<[increment: number]>): this;
298
+ overflow(overflow: "WRAP" | "SAT" | "FAIL"): this;
299
+ exec(): T;
300
+ }
301
+
267
302
  /**
268
303
  * @see https://redis.io/commands/bitop
269
304
  */
@@ -344,11 +379,9 @@ declare class ExistsCommand extends Command<number, number> {
344
379
  constructor(cmd: [...keys: string[]], opts?: CommandOptions<number, number>);
345
380
  }
346
381
 
347
- /**
348
- * @see https://redis.io/commands/expire
349
- */
382
+ type ExpireOptions = "NX" | "nx" | "XX" | "xx" | "GT" | "gt" | "LT" | "lt";
350
383
  declare class ExpireCommand extends Command<"0" | "1", 0 | 1> {
351
- constructor(cmd: [key: string, seconds: number], opts?: CommandOptions<"0" | "1", 0 | 1>);
384
+ constructor(cmd: [key: string, seconds: number, option?: ExpireOptions], opts?: CommandOptions<"0" | "1", 0 | 1>);
352
385
  }
353
386
 
354
387
  /**
@@ -388,6 +421,13 @@ declare class GeoDistCommand<TMemberType = string> extends Command<number | null
388
421
  ], opts?: CommandOptions<number | null, number | null>);
389
422
  }
390
423
 
424
+ /**
425
+ * @see https://redis.io/commands/geohash
426
+ */
427
+ declare class GeoHashCommand<TMember = string> extends Command<(string | null)[], (string | null)[]> {
428
+ constructor(cmd: [string, ...TMember[]], opts?: CommandOptions<(string | null)[], (string | null)[]>);
429
+ }
430
+
391
431
  type Coordinates = {
392
432
  lng: number;
393
433
  lat: number;
@@ -399,13 +439,6 @@ declare class GeoPosCommand<TMember = string> extends Command<(string | null)[][
399
439
  constructor(cmd: [string, ...(TMember[] | TMember[])], opts?: CommandOptions<(string | null)[][], Coordinates[]>);
400
440
  }
401
441
 
402
- /**
403
- * @see https://redis.io/commands/geohash
404
- */
405
- declare class GeoHashCommand<TMember = string> extends Command<(string | null)[], (string | null)[]> {
406
- constructor(cmd: [string, ...(TMember[] | TMember[])], opts?: CommandOptions<(string | null)[], (string | null)[]>);
407
- }
408
-
409
442
  type RadiusOptions$1 = "M" | "KM" | "FT" | "MI";
410
443
  type CenterPoint$1<TMemberType> = {
411
444
  type: "FROMMEMBER" | "frommember";
@@ -619,9 +652,7 @@ declare class HMGetCommand<TData extends Record<string, unknown>> extends Comman
619
652
  * @see https://redis.io/commands/hmset
620
653
  */
621
654
  declare class HMSetCommand<TData> extends Command<"OK", "OK"> {
622
- constructor([key, kv]: [key: string, kv: {
623
- [field: string]: TData;
624
- }], opts?: CommandOptions<"OK", "OK">);
655
+ constructor([key, kv]: [key: string, kv: Record<string, TData>], opts?: CommandOptions<"OK", "OK">);
625
656
  }
626
657
 
627
658
  /**
@@ -637,22 +668,20 @@ declare class HRandFieldCommand<TData extends string | string[] | Record<string,
637
668
  * @see https://redis.io/commands/hscan
638
669
  */
639
670
  declare class HScanCommand extends Command<[
640
- number,
671
+ string,
641
672
  (string | number)[]
642
673
  ], [
643
- number,
674
+ string,
644
675
  (string | number)[]
645
676
  ]> {
646
- constructor([key, cursor, cmdOpts]: [key: string, cursor: number, cmdOpts?: ScanCommandOptions], opts?: CommandOptions<[number, (string | number)[]], [number, (string | number)[]]>);
677
+ constructor([key, cursor, cmdOpts]: [key: string, cursor: string | number, cmdOpts?: ScanCommandOptions], opts?: CommandOptions<[string, (string | number)[]], [string, (string | number)[]]>);
647
678
  }
648
679
 
649
680
  /**
650
681
  * @see https://redis.io/commands/hset
651
682
  */
652
683
  declare class HSetCommand<TData> extends Command<number, number> {
653
- constructor([key, kv]: [key: string, kv: {
654
- [field: string]: TData;
655
- }], opts?: CommandOptions<number, number>);
684
+ constructor([key, kv]: [key: string, kv: Record<string, TData>], opts?: CommandOptions<number, number>);
656
685
  }
657
686
 
658
687
  /**
@@ -778,10 +807,21 @@ declare class JsonGetCommand<TData extends (unknown | Record<string, unknown>) |
778
807
  /**
779
808
  * @see https://redis.io/commands/json.mget
780
809
  */
781
- declare class JsonMGetCommand<TData extends (unknown | Record<string, unknown>)[]> extends Command<TData, TData> {
810
+ declare class JsonMGetCommand<TData = unknown[]> extends Command<TData, TData> {
782
811
  constructor(cmd: [keys: string[], path: string], opts?: CommandOptions<TData, TData>);
783
812
  }
784
813
 
814
+ /**
815
+ * @see https://redis.io/commands/json.mset
816
+ */
817
+ declare class JsonMSetCommand<TData extends number | string | boolean | Record<string, unknown> | (number | string | boolean | Record<string, unknown>)[]> extends Command<"OK" | null, "OK" | null> {
818
+ constructor(cmd: {
819
+ key: string;
820
+ path: string;
821
+ value: TData;
822
+ }[], opts?: CommandOptions<"OK" | null, "OK" | null>);
823
+ }
824
+
785
825
  /**
786
826
  * @see https://redis.io/commands/json.numincrby
787
827
  */
@@ -938,25 +978,21 @@ declare class LTrimCommand extends Command<"OK", "OK"> {
938
978
  * @see https://redis.io/commands/mget
939
979
  */
940
980
  declare class MGetCommand<TData extends unknown[]> extends Command<(string | null)[], TData> {
941
- constructor(cmd: [string[]] | [...(string[] | string[])], opts?: CommandOptions<(string | null)[], TData>);
981
+ constructor(cmd: [string[]] | [...string[]], opts?: CommandOptions<(string | null)[], TData>);
942
982
  }
943
983
 
944
984
  /**
945
985
  * @see https://redis.io/commands/mset
946
986
  */
947
987
  declare class MSetCommand<TData> extends Command<"OK", "OK"> {
948
- constructor([kv]: [kv: {
949
- [key: string]: TData;
950
- }], opts?: CommandOptions<"OK", "OK">);
988
+ constructor([kv]: [kv: Record<string, TData>], opts?: CommandOptions<"OK", "OK">);
951
989
  }
952
990
 
953
991
  /**
954
992
  * @see https://redis.io/commands/msetnx
955
993
  */
956
994
  declare class MSetNXCommand<TData = string> extends Command<number, number> {
957
- constructor([kv]: [kv: {
958
- [key: string]: TData;
959
- }], opts?: CommandOptions<number, number>);
995
+ constructor([kv]: [kv: Record<string, TData>], opts?: CommandOptions<number, number>);
960
996
  }
961
997
 
962
998
  /**
@@ -1054,7 +1090,7 @@ declare class RPushXCommand<TData = string> extends Command<number, number> {
1054
1090
  * @see https://redis.io/commands/sadd
1055
1091
  */
1056
1092
  declare class SAddCommand<TData = string> extends Command<number, number> {
1057
- constructor(cmd: [key: string, ...members: TData[]], opts?: CommandOptions<number, number>);
1093
+ constructor(cmd: [key: string, member: TData, ...members: TData[]], opts?: CommandOptions<number, number>);
1058
1094
  }
1059
1095
 
1060
1096
  /**
@@ -1242,13 +1278,13 @@ declare class SRemCommand<TData = string> extends Command<number, number> {
1242
1278
  * @see https://redis.io/commands/sscan
1243
1279
  */
1244
1280
  declare class SScanCommand extends Command<[
1245
- number,
1281
+ string,
1246
1282
  (string | number)[]
1247
1283
  ], [
1248
- number,
1284
+ string,
1249
1285
  (string | number)[]
1250
1286
  ]> {
1251
- constructor([key, cursor, opts]: [key: string, cursor: number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[number, (string | number)[]], [number, (string | number)[]]>);
1287
+ constructor([key, cursor, opts]: [key: string, cursor: string | number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[string, (string | number)[]], [string, (string | number)[]]>);
1252
1288
  }
1253
1289
 
1254
1290
  /**
@@ -1323,9 +1359,7 @@ declare class XAddCommand extends Command<string, string> {
1323
1359
  constructor([key, id, entries, opts]: [
1324
1360
  key: string,
1325
1361
  id: "*" | string,
1326
- entries: {
1327
- [field: string]: unknown;
1328
- },
1362
+ entries: Record<string, unknown>,
1329
1363
  opts?: XAddCommandOptions
1330
1364
  ], commandOptions?: CommandOptions<string, string>);
1331
1365
  }
@@ -1334,7 +1368,55 @@ declare class XRangeCommand<TData extends Record<string, Record<string, unknown>
1334
1368
  constructor([key, start, end, count]: [key: string, start: string, end: string, count?: number], opts?: CommandOptions<unknown[], TData[]>);
1335
1369
  }
1336
1370
 
1337
- type ZAddCommandOptions = ({
1371
+ type XReadCommandOptions = [
1372
+ key: string | string[],
1373
+ id: string | string[],
1374
+ options?: {
1375
+ count?: number;
1376
+ blockMS?: number;
1377
+ }
1378
+ ];
1379
+ type XReadOptions = XReadCommandOptions extends [infer K, infer I, ...any[]] ? K extends string ? I extends string ? [key: string, id: string, options?: {
1380
+ count?: number;
1381
+ blockMS?: number;
1382
+ }] : never : K extends string[] ? I extends string[] ? [key: string[], id: string[], options?: {
1383
+ count?: number;
1384
+ blockMS?: number;
1385
+ }] : never : never : never;
1386
+ /**
1387
+ * @see https://redis.io/commands/xread
1388
+ */
1389
+ declare class XReadCommand extends Command<number, unknown[]> {
1390
+ constructor([key, id, options]: XReadOptions, opts?: CommandOptions<number, unknown[]>);
1391
+ }
1392
+
1393
+ type Options = {
1394
+ count?: number;
1395
+ blockMS?: number;
1396
+ NOACK?: boolean;
1397
+ };
1398
+ type XReadGroupCommandOptions = [
1399
+ group: string,
1400
+ consumer: string,
1401
+ key: string | string[],
1402
+ id: string | string[],
1403
+ options?: Options
1404
+ ];
1405
+ type XReadGroupOptions = XReadGroupCommandOptions extends [
1406
+ string,
1407
+ string,
1408
+ infer TKey,
1409
+ infer TId,
1410
+ ...any[]
1411
+ ] ? TKey extends string ? TId extends string ? [group: string, consumer: string, key: string, id: string, options?: Options] : never : TKey extends string[] ? TId extends string[] ? [group: string, consumer: string, key: string[], id: string[], options?: Options] : never : never : never;
1412
+ /**
1413
+ * @see https://redis.io/commands/xreadgroup
1414
+ */
1415
+ declare class XReadGroupCommand extends Command<number, unknown[]> {
1416
+ constructor([group, consumer, key, id, options]: XReadGroupOptions, opts?: CommandOptions<number, unknown[]>);
1417
+ }
1418
+
1419
+ type NXAndXXOptions = {
1338
1420
  nx: true;
1339
1421
  xx?: never;
1340
1422
  } | {
@@ -1343,12 +1425,23 @@ type ZAddCommandOptions = ({
1343
1425
  } | {
1344
1426
  nx?: never;
1345
1427
  xx?: never;
1346
- }) & {
1347
- ch?: true;
1348
1428
  };
1349
- type ZAddCommandOptionsWithIncr = ZAddCommandOptions & {
1350
- incr: true;
1429
+ type LTAndGTOptions = {
1430
+ lt: true;
1431
+ gt?: never;
1432
+ } | {
1433
+ lt?: never;
1434
+ gt: true;
1435
+ } | {
1436
+ lt?: never;
1437
+ gt?: never;
1438
+ };
1439
+ type ZAddCommandOptions = NXAndXXOptions & LTAndGTOptions & {
1440
+ ch?: true;
1441
+ } & {
1442
+ incr?: true;
1351
1443
  };
1444
+ type Arg2<TData> = ScoreMember<TData> | ZAddCommandOptions;
1352
1445
  type ScoreMember<TData> = {
1353
1446
  score: number;
1354
1447
  member: TData;
@@ -1357,12 +1450,7 @@ type ScoreMember<TData> = {
1357
1450
  * @see https://redis.io/commands/zadd
1358
1451
  */
1359
1452
  declare class ZAddCommand<TData = string> extends Command<number | null, number | null> {
1360
- constructor(cmd: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]], opts?: CommandOptions<number | null, number | null>);
1361
- constructor(cmd: [
1362
- key: string,
1363
- opts: ZAddCommandOptions | ZAddCommandOptionsWithIncr,
1364
- ...scoreMemberPairs: ScoreMember<TData>[]
1365
- ], opts?: CommandOptions<number | null, number | null>);
1453
+ constructor([key, arg1, ...arg2]: [string, Arg2<TData>, ...ScoreMember<TData>[]], opts?: CommandOptions<number | null, number | null>);
1366
1454
  }
1367
1455
 
1368
1456
  /**
@@ -1495,13 +1583,13 @@ declare class ZRevRankCommand<TData> extends Command<number | null, number | nul
1495
1583
  * @see https://redis.io/commands/zscan
1496
1584
  */
1497
1585
  declare class ZScanCommand extends Command<[
1498
- number,
1586
+ string,
1499
1587
  (string | number)[]
1500
1588
  ], [
1501
- number,
1589
+ string,
1502
1590
  (string | number)[]
1503
1591
  ]> {
1504
- constructor([key, cursor, opts]: [key: string, cursor: number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[number, (string | number)[]], [number, (string | number)[]]>);
1592
+ constructor([key, cursor, opts]: [key: string, cursor: string | number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[string, (string | number)[]], [string, (string | number)[]]>);
1505
1593
  }
1506
1594
 
1507
1595
  /**
@@ -1574,7 +1662,7 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
1574
1662
  * const result = p.exec<[{ greeting: string }]>()
1575
1663
  * ```
1576
1664
  */
1577
- exec: <TCommandResults extends unknown[] = [] extends TCommands ? unknown[] : InferResponseData<TCommands>>() => Promise<TCommandResults>;
1665
+ exec: <TCommandResults extends unknown[] = [] extends TCommands ? unknown[] : InferResponseData<TCommands>, TKeepErrors extends true | undefined = undefined>(keepErrors?: TKeepErrors) => Promise<TKeepErrors extends true ? UpstashResponse<any>[] : TCommandResults>;
1578
1666
  /**
1579
1667
  * Returns the length of pipeline before the execution
1580
1668
  */
@@ -1592,6 +1680,23 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
1592
1680
  * @see https://redis.io/commands/bitcount
1593
1681
  */
1594
1682
  bitcount: (key: string, start: number, end: number) => Pipeline<[...TCommands, Command<any, number>]>;
1683
+ /**
1684
+ * Returns an instance that can be used to execute `BITFIELD` commands on one key.
1685
+ *
1686
+ * @example
1687
+ * ```typescript
1688
+ * redis.set("mykey", 0);
1689
+ * const result = await redis.pipeline()
1690
+ * .bitfield("mykey")
1691
+ * .set("u4", 0, 16)
1692
+ * .incr("u4", "#1", 1)
1693
+ * .exec();
1694
+ * console.log(result); // [[0, 1]]
1695
+ * ```
1696
+ *
1697
+ * @see https://redis.io/commands/bitfield
1698
+ */
1699
+ bitfield: (key: string) => BitFieldCommand<Pipeline<[...TCommands, Command<any, number[]>]>>;
1595
1700
  /**
1596
1701
  * @see https://redis.io/commands/bitop
1597
1702
  */
@@ -1648,7 +1753,7 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
1648
1753
  /**
1649
1754
  * @see https://redis.io/commands/expire
1650
1755
  */
1651
- expire: (key: string, seconds: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
1756
+ expire: (key: string, seconds: number, option?: ("NX" | "nx" | "XX" | "xx" | "GT" | "gt" | "LT" | "lt") | undefined) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
1652
1757
  /**
1653
1758
  * @see https://redis.io/commands/expireat
1654
1759
  */
@@ -1661,8 +1766,98 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
1661
1766
  * @see https://redis.io/commands/flushdb
1662
1767
  */
1663
1768
  flushdb: (opts?: {
1664
- async?: boolean | undefined;
1769
+ async?: boolean;
1665
1770
  } | undefined) => Pipeline<[...TCommands, Command<any, "OK">]>;
1771
+ /**
1772
+ * @see https://redis.io/commands/geoadd
1773
+ */
1774
+ geoadd: <TData>(args_0: string, args_1: GeoAddCommandOptions | GeoMember<TData>, ...args_2: GeoMember<TData>[]) => Pipeline<[...TCommands, Command<any, number | null>]>;
1775
+ /**
1776
+ * @see https://redis.io/commands/geodist
1777
+ */
1778
+ geodist: <TData>(key: string, member1: TData, member2: TData, unit?: "M" | "KM" | "FT" | "MI" | undefined) => Pipeline<[...TCommands, Command<any, number | null>]>;
1779
+ /**
1780
+ * @see https://redis.io/commands/geopos
1781
+ */
1782
+ geopos: <TData>(args_0: string, ...args_1: TData[]) => Pipeline<[...TCommands, Command<any, {
1783
+ lng: number;
1784
+ lat: number;
1785
+ }[]>]>;
1786
+ /**
1787
+ * @see https://redis.io/commands/geohash
1788
+ */
1789
+ geohash: <TData>(args_0: string, ...args_1: TData[]) => Pipeline<[...TCommands, Command<any, (string | null)[]>]>;
1790
+ /**
1791
+ * @see https://redis.io/commands/geosearch
1792
+ */
1793
+ geosearch: <TData>(key: string, centerPoint: {
1794
+ type: "FROMLONLAT" | "fromlonlat";
1795
+ coordinate: {
1796
+ lon: number;
1797
+ lat: number;
1798
+ };
1799
+ } | {
1800
+ type: "FROMMEMBER" | "frommember";
1801
+ member: TData;
1802
+ }, shape: {
1803
+ type: "BYRADIUS" | "byradius";
1804
+ radius: number;
1805
+ radiusType: "M" | "KM" | "FT" | "MI";
1806
+ } | {
1807
+ type: "BYBOX" | "bybox";
1808
+ rect: {
1809
+ width: number;
1810
+ height: number;
1811
+ };
1812
+ rectType: "M" | "KM" | "FT" | "MI";
1813
+ }, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
1814
+ count?: {
1815
+ limit: number;
1816
+ any?: boolean;
1817
+ };
1818
+ withCoord?: boolean;
1819
+ withDist?: boolean;
1820
+ withHash?: boolean;
1821
+ } | undefined) => Pipeline<[...TCommands, Command<any, ({
1822
+ member: TData;
1823
+ } & {
1824
+ coord?: {
1825
+ long: number;
1826
+ lat: number;
1827
+ } | undefined;
1828
+ dist?: number | undefined;
1829
+ hash?: string | undefined;
1830
+ })[]>]>;
1831
+ /**
1832
+ * @see https://redis.io/commands/geosearchstore
1833
+ */
1834
+ geosearchstore: <TData>(destination: string, key: string, centerPoint: {
1835
+ type: "FROMLONLAT" | "fromlonlat";
1836
+ coordinate: {
1837
+ lon: number;
1838
+ lat: number;
1839
+ };
1840
+ } | {
1841
+ type: "FROMMEMBER" | "frommember";
1842
+ member: TData;
1843
+ }, shape: {
1844
+ type: "BYRADIUS" | "byradius";
1845
+ radius: number;
1846
+ radiusType: "M" | "KM" | "FT" | "MI";
1847
+ } | {
1848
+ type: "BYBOX" | "bybox";
1849
+ rect: {
1850
+ width: number;
1851
+ height: number;
1852
+ };
1853
+ rectType: "M" | "KM" | "FT" | "MI";
1854
+ }, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
1855
+ count?: {
1856
+ limit: number;
1857
+ any?: boolean;
1858
+ };
1859
+ storeDist?: boolean;
1860
+ } | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
1666
1861
  /**
1667
1862
  * @see https://redis.io/commands/get
1668
1863
  */
@@ -1722,9 +1917,7 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
1722
1917
  /**
1723
1918
  * @see https://redis.io/commands/hmset
1724
1919
  */
1725
- hmset: <TData>(key: string, kv: {
1726
- [field: string]: TData;
1727
- }) => Pipeline<[...TCommands, Command<any, "OK">]>;
1920
+ hmset: <TData>(key: string, kv: Record<string, TData>) => Pipeline<[...TCommands, Command<any, "OK">]>;
1728
1921
  /**
1729
1922
  * @see https://redis.io/commands/hrandfield
1730
1923
  */
@@ -1732,13 +1925,11 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
1732
1925
  /**
1733
1926
  * @see https://redis.io/commands/hscan
1734
1927
  */
1735
- hscan: (key: string, cursor: number, cmdOpts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [number, (string | number)[]]>]>;
1928
+ hscan: (key: string, cursor: string | number, cmdOpts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [string, (string | number)[]]>]>;
1736
1929
  /**
1737
1930
  * @see https://redis.io/commands/hset
1738
1931
  */
1739
- hset: <TData>(key: string, kv: {
1740
- [field: string]: TData;
1741
- }) => Pipeline<[...TCommands, Command<any, number>]>;
1932
+ hset: <TData>(key: string, kv: Record<string, TData>) => Pipeline<[...TCommands, Command<any, number>]>;
1742
1933
  /**
1743
1934
  * @see https://redis.io/commands/hsetnx
1744
1935
  */
@@ -1787,13 +1978,17 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
1787
1978
  * @see https://redis.io/commands/lpop
1788
1979
  */
1789
1980
  lpop: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
1981
+ /**
1982
+ * @see https://redis.io/commands/lmpop
1983
+ */
1984
+ lmpop: <TData>(numkeys: number, keys: string[], args_2: "LEFT" | "RIGHT", count?: number | undefined) => Pipeline<[...TCommands, Command<any, [string, TData[]] | null>]>;
1790
1985
  /**
1791
1986
  * @see https://redis.io/commands/lpos
1792
1987
  */
1793
1988
  lpos: <TData>(key: string, element: unknown, opts?: {
1794
- rank?: number | undefined;
1795
- count?: number | undefined;
1796
- maxLen?: number | undefined;
1989
+ rank?: number;
1990
+ count?: number;
1991
+ maxLen?: number;
1797
1992
  } | undefined) => Pipeline<[...TCommands, Command<any, TData>]>;
1798
1993
  /**
1799
1994
  * @see https://redis.io/commands/lpush
@@ -1826,15 +2021,11 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
1826
2021
  /**
1827
2022
  * @see https://redis.io/commands/mset
1828
2023
  */
1829
- mset: <TData>(kv: {
1830
- [key: string]: TData;
1831
- }) => Pipeline<[...TCommands, Command<any, "OK">]>;
2024
+ mset: <TData>(kv: Record<string, TData>) => Pipeline<[...TCommands, Command<any, "OK">]>;
1832
2025
  /**
1833
2026
  * @see https://redis.io/commands/msetnx
1834
2027
  */
1835
- msetnx: <TData>(kv: {
1836
- [key: string]: TData;
1837
- }) => Pipeline<[...TCommands, Command<any, number>]>;
2028
+ msetnx: <TData>(kv: Record<string, TData>) => Pipeline<[...TCommands, Command<any, number>]>;
1838
2029
  /**
1839
2030
  * @see https://redis.io/commands/persist
1840
2031
  */
@@ -1847,6 +2038,18 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
1847
2038
  * @see https://redis.io/commands/pexpireat
1848
2039
  */
1849
2040
  pexpireat: (key: string, unix: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
2041
+ /**
2042
+ * @see https://redis.io/commands/pfadd
2043
+ */
2044
+ pfadd: (args_0: string, ...args_1: unknown[]) => Pipeline<[...TCommands, Command<any, number>]>;
2045
+ /**
2046
+ * @see https://redis.io/commands/pfcount
2047
+ */
2048
+ pfcount: (args_0: string, ...args_1: string[]) => Pipeline<[...TCommands, Command<any, number>]>;
2049
+ /**
2050
+ * @see https://redis.io/commands/pfmerge
2051
+ */
2052
+ pfmerge: (destination_key: string, ...args_1: string[]) => Pipeline<[...TCommands, Command<any, "OK">]>;
1850
2053
  /**
1851
2054
  * @see https://redis.io/commands/ping
1852
2055
  */
@@ -1890,11 +2093,11 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
1890
2093
  /**
1891
2094
  * @see https://redis.io/commands/sadd
1892
2095
  */
1893
- sadd: <TData>(key: string, ...members: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
2096
+ sadd: <TData>(key: string, member: TData, ...members: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
1894
2097
  /**
1895
2098
  * @see https://redis.io/commands/scan
1896
2099
  */
1897
- scan: (cursor: number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [number, string[]]>]>;
2100
+ scan: (cursor: string | number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [string, string[]]>]>;
1898
2101
  /**
1899
2102
  * @see https://redis.io/commands/scard
1900
2103
  */
@@ -1975,7 +2178,7 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
1975
2178
  /**
1976
2179
  * @see https://redis.io/commands/sscan
1977
2180
  */
1978
- sscan: (key: string, cursor: number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [number, (string | number)[]]>]>;
2181
+ sscan: (key: string, cursor: string | number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [string, (string | number)[]]>]>;
1979
2182
  /**
1980
2183
  * @see https://redis.io/commands/strlen
1981
2184
  */
@@ -2011,7 +2214,127 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
2011
2214
  /**
2012
2215
  * @see https://redis.io/commands/zadd
2013
2216
  */
2014
- 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>]>;
2217
+ zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [key: string, opts: ZAddCommandOptions, ...scoreMemberPairs: [ScoreMember<TData>, ...ScoreMember<TData>[]]]) => Pipeline<[...TCommands, Command<any, number | null>]>;
2218
+ /**
2219
+ * @see https://redis.io/commands/xadd
2220
+ */
2221
+ xadd: (key: string, id: string, entries: Record<string, unknown>, opts?: {
2222
+ nomkStream?: boolean;
2223
+ trim?: ({
2224
+ type: "MAXLEN" | "maxlen";
2225
+ threshold: number;
2226
+ } | {
2227
+ type: "MINID" | "minid";
2228
+ threshold: string;
2229
+ }) & ({
2230
+ comparison: "~";
2231
+ limit?: number;
2232
+ } | {
2233
+ comparison: "=";
2234
+ limit?: never;
2235
+ });
2236
+ } | undefined) => Pipeline<[...TCommands, Command<any, string>]>;
2237
+ /**
2238
+ * @see https://redis.io/commands/xack
2239
+ */
2240
+ xack: (key: string, group: string, id: string | string[]) => Pipeline<[...TCommands, Command<any, number>]>;
2241
+ /**
2242
+ * @see https://redis.io/commands/xdel
2243
+ */
2244
+ xdel: (key: string, ids: string | string[]) => Pipeline<[...TCommands, Command<any, number>]>;
2245
+ /**
2246
+ * @see https://redis.io/commands/xgroup
2247
+ */
2248
+ xgroup: (key: string, opts: {
2249
+ type: "CREATE";
2250
+ group: string;
2251
+ id: `$` | string;
2252
+ options?: {
2253
+ MKSTREAM?: boolean;
2254
+ ENTRIESREAD?: number;
2255
+ };
2256
+ } | {
2257
+ type: "CREATECONSUMER";
2258
+ group: string;
2259
+ consumer: string;
2260
+ } | {
2261
+ type: "DELCONSUMER";
2262
+ group: string;
2263
+ consumer: string;
2264
+ } | {
2265
+ type: "DESTROY";
2266
+ group: string;
2267
+ } | {
2268
+ type: "SETID";
2269
+ group: string;
2270
+ id: `$` | string;
2271
+ options?: {
2272
+ ENTRIESREAD?: number;
2273
+ };
2274
+ }) => Pipeline<[...TCommands, Command<any, never>]>;
2275
+ /**
2276
+ * @see https://redis.io/commands/xread
2277
+ */
2278
+ xread: (...args: CommandArgs<typeof XReadCommand>) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
2279
+ /**
2280
+ * @see https://redis.io/commands/xreadgroup
2281
+ */
2282
+ xreadgroup: (...args: CommandArgs<typeof XReadGroupCommand>) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
2283
+ /**
2284
+ * @see https://redis.io/commands/xinfo
2285
+ */
2286
+ xinfo: (key: string, options: {
2287
+ type: "CONSUMERS";
2288
+ group: string;
2289
+ } | {
2290
+ type: "GROUPS";
2291
+ }) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
2292
+ /**
2293
+ * @see https://redis.io/commands/xlen
2294
+ */
2295
+ xlen: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
2296
+ /**
2297
+ * @see https://redis.io/commands/xpending
2298
+ */
2299
+ xpending: (key: string, group: string, start: string, end: string, count: number, options?: {
2300
+ idleTime?: number;
2301
+ consumer?: string | string[];
2302
+ } | undefined) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
2303
+ /**
2304
+ * @see https://redis.io/commands/xclaim
2305
+ */
2306
+ xclaim: (key: string, group: string, consumer: string, minIdleTime: number, id: string | string[], options?: {
2307
+ idleMS?: number;
2308
+ timeMS?: number;
2309
+ retryCount?: number;
2310
+ force?: boolean;
2311
+ justId?: boolean;
2312
+ lastId?: number;
2313
+ } | undefined) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
2314
+ /**
2315
+ * @see https://redis.io/commands/xautoclaim
2316
+ */
2317
+ xautoclaim: (key: string, group: string, consumer: string, minIdleTime: number, start: string, options?: {
2318
+ count?: number;
2319
+ justId?: boolean;
2320
+ } | undefined) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
2321
+ /**
2322
+ * @see https://redis.io/commands/xtrim
2323
+ */
2324
+ xtrim: (key: string, options: {
2325
+ strategy: "MAXLEN" | "MINID";
2326
+ exactness?: "~" | "=";
2327
+ threshold: number | string;
2328
+ limit?: number;
2329
+ }) => Pipeline<[...TCommands, Command<any, number>]>;
2330
+ /**
2331
+ * @see https://redis.io/commands/xrange
2332
+ */
2333
+ xrange: (key: string, start: string, end: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, Record<string, Record<string, unknown>>>]>;
2334
+ /**
2335
+ * @see https://redis.io/commands/xrevrange
2336
+ */
2337
+ xrevrange: (key: string, end: string, start: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, Record<string, Record<string, unknown>>>]>;
2015
2338
  /**
2016
2339
  * @see https://redis.io/commands/zcard
2017
2340
  */
@@ -2047,21 +2370,11 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
2047
2370
  /**
2048
2371
  * @see https://redis.io/commands/zrange
2049
2372
  */
2050
- zrange: <TData extends unknown[]>(...args: [key: string, min: number, max: number, opts?: ZRangeCommandOptions] | [
2051
- key: string,
2052
- min: `(${string}` | `[${string}` | "-" | "+",
2053
- max: `(${string}` | `[${string}` | "-" | "+",
2054
- opts: {
2055
- byLex: true;
2056
- } & ZRangeCommandOptions
2057
- ] | [
2058
- key: string,
2059
- min: number | `(${number}` | "-inf" | "+inf",
2060
- max: number | `(${number}` | "-inf" | "+inf",
2061
- opts: {
2062
- byScore: true;
2063
- } & ZRangeCommandOptions
2064
- ]) => Pipeline<[...TCommands, Command<any, TData>]>;
2373
+ zrange: <TData extends unknown[]>(...args: [key: string, min: number, max: number, opts?: ZRangeCommandOptions] | [key: string, min: `(${string}` | `[${string}` | "-" | "+", max: `(${string}` | `[${string}` | "-" | "+", opts: {
2374
+ byLex: true;
2375
+ } & ZRangeCommandOptions] | [key: string, min: number | `(${number}` | "-inf" | "+inf", max: number | `(${number}` | "-inf" | "+inf", opts: {
2376
+ byScore: true;
2377
+ } & ZRangeCommandOptions]) => Pipeline<[...TCommands, Command<any, TData>]>;
2065
2378
  /**
2066
2379
  * @see https://redis.io/commands/zrank
2067
2380
  */
@@ -2089,7 +2402,7 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
2089
2402
  /**
2090
2403
  * @see https://redis.io/commands/zscan
2091
2404
  */
2092
- zscan: (key: string, cursor: number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [number, (string | number)[]]>]>;
2405
+ zscan: (key: string, cursor: string | number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [string, (string | number)[]]>]>;
2093
2406
  /**
2094
2407
  * @see https://redis.io/commands/zscore
2095
2408
  */
@@ -2142,96 +2455,6 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
2142
2455
  * @see https://redis.io/commands/json.forget
2143
2456
  */
2144
2457
  forget: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
2145
- /**
2146
- * @see https://redis.io/commands/geoadd
2147
- */
2148
- geoadd: (args_0: string, args_1: GeoAddCommandOptions | GeoMember<unknown>, ...args_2: GeoMember<unknown>[]) => Pipeline<[...TCommands, Command<any, number | null>]>;
2149
- /**
2150
- * @see https://redis.io/commands/geodist
2151
- */
2152
- geodist: (key: string, member1: unknown, member2: unknown, unit?: "M" | "KM" | "FT" | "MI" | undefined) => Pipeline<[...TCommands, Command<any, number | null>]>;
2153
- /**
2154
- * @see https://redis.io/commands/geopos
2155
- */
2156
- geopos: (args_0: string, ...args_1: unknown[]) => Pipeline<[...TCommands, Command<any, {
2157
- lng: number;
2158
- lat: number;
2159
- }[]>]>;
2160
- /**
2161
- * @see https://redis.io/commands/geohash
2162
- */
2163
- geohash: (args_0: string, ...args_1: unknown[]) => Pipeline<[...TCommands, Command<any, (string | null)[]>]>;
2164
- /**
2165
- * @see https://redis.io/commands/geosearch
2166
- */
2167
- geosearch: (key: string, centerPoint: {
2168
- type: "FROMLONLAT" | "fromlonlat";
2169
- coordinate: {
2170
- lon: number;
2171
- lat: number;
2172
- };
2173
- } | {
2174
- type: "FROMMEMBER" | "frommember";
2175
- member: unknown;
2176
- }, shape: {
2177
- type: "BYRADIUS" | "byradius";
2178
- radius: number;
2179
- radiusType: "M" | "KM" | "FT" | "MI";
2180
- } | {
2181
- type: "BYBOX" | "bybox";
2182
- rect: {
2183
- width: number;
2184
- height: number;
2185
- };
2186
- rectType: "M" | "KM" | "FT" | "MI";
2187
- }, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
2188
- count?: {
2189
- limit: number;
2190
- any?: boolean | undefined;
2191
- } | undefined;
2192
- withCoord?: boolean | undefined;
2193
- withDist?: boolean | undefined;
2194
- withHash?: boolean | undefined;
2195
- } | undefined) => Pipeline<[...TCommands, Command<any, ({
2196
- member: unknown;
2197
- } & {
2198
- coord?: {
2199
- long: number;
2200
- lat: number;
2201
- } | undefined;
2202
- dist?: number | undefined;
2203
- hash?: string | undefined;
2204
- })[]>]>;
2205
- /**
2206
- * @see https://redis.io/commands/geosearchstore
2207
- */
2208
- geosearchstore: (destination: string, key: string, centerPoint: {
2209
- type: "FROMLONLAT" | "fromlonlat";
2210
- coordinate: {
2211
- lon: number;
2212
- lat: number;
2213
- };
2214
- } | {
2215
- type: "FROMMEMBER" | "frommember";
2216
- member: unknown;
2217
- }, shape: {
2218
- type: "BYRADIUS" | "byradius";
2219
- radius: number;
2220
- radiusType: "M" | "KM" | "FT" | "MI";
2221
- } | {
2222
- type: "BYBOX" | "bybox";
2223
- rect: {
2224
- width: number;
2225
- height: number;
2226
- };
2227
- rectType: "M" | "KM" | "FT" | "MI";
2228
- }, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
2229
- count?: {
2230
- limit: number;
2231
- any?: boolean | undefined;
2232
- } | undefined;
2233
- storeDist?: boolean | undefined;
2234
- } | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
2235
2458
  /**
2236
2459
  * @see https://redis.io/commands/json.get
2237
2460
  */
@@ -2240,6 +2463,10 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
2240
2463
  * @see https://redis.io/commands/json.mget
2241
2464
  */
2242
2465
  mget: (keys: string[], path: string) => Pipeline<[...TCommands, Command<any, any>]>;
2466
+ /**
2467
+ * @see https://redis.io/commands/json.mset
2468
+ */
2469
+ mset: (...args: CommandArgs<typeof JsonMSetCommand>) => Pipeline<[...TCommands, Command<any, "OK" | null>]>;
2243
2470
  /**
2244
2471
  * @see https://redis.io/commands/json.numincrby
2245
2472
  */
@@ -2265,9 +2492,9 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
2265
2492
  */
2266
2493
  set: (key: string, path: string, value: string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown>)[], opts?: {
2267
2494
  nx: true;
2268
- xx?: undefined;
2495
+ xx?: never;
2269
2496
  } | {
2270
- nx?: undefined;
2497
+ nx?: never;
2271
2498
  xx: true;
2272
2499
  } | undefined) => Pipeline<[...TCommands, Command<any, "OK" | null>]>;
2273
2500
  /**
@@ -2338,6 +2565,7 @@ declare class Redis {
2338
2565
  protected client: Requester;
2339
2566
  protected opts?: CommandOptions<any, any>;
2340
2567
  protected enableTelemetry: boolean;
2568
+ protected enableAutoPipelining: boolean;
2341
2569
  /**
2342
2570
  * Create a new redis client
2343
2571
  *
@@ -2350,6 +2578,8 @@ declare class Redis {
2350
2578
  * ```
2351
2579
  */
2352
2580
  constructor(client: Requester, opts?: RedisOptions);
2581
+ get readYourWritesSyncToken(): string | undefined;
2582
+ set readYourWritesSyncToken(session: string | undefined);
2353
2583
  get json(): {
2354
2584
  /**
2355
2585
  * @see https://redis.io/commands/json.arrappend
@@ -2387,104 +2617,18 @@ declare class Redis {
2387
2617
  * @see https://redis.io/commands/json.forget
2388
2618
  */
2389
2619
  forget: (key: string, path?: string | undefined) => Promise<number>;
2390
- /**
2391
- * @see https://redis.io/commands/geoadd
2392
- */
2393
- geoadd: (args_0: string, args_1: GeoAddCommandOptions | GeoMember<unknown>, ...args_2: GeoMember<unknown>[]) => Promise<number | null>;
2394
- /**
2395
- * @see https://redis.io/commands/geopos
2396
- */
2397
- geopos: (args_0: string, ...args_1: unknown[]) => Promise<{
2398
- lng: number;
2399
- lat: number;
2400
- }[]>;
2401
- /**
2402
- * @see https://redis.io/commands/geodist
2403
- */
2404
- geodist: (key: string, member1: unknown, member2: unknown, unit?: "M" | "KM" | "FT" | "MI" | undefined) => Promise<number | null>;
2405
- /**
2406
- * @see https://redis.io/commands/geohash
2407
- */
2408
- geohash: (args_0: string, ...args_1: unknown[]) => Promise<(string | null)[]>;
2409
- /**
2410
- * @see https://redis.io/commands/geosearch
2411
- */
2412
- geosearch: (key: string, centerPoint: {
2413
- type: "FROMLONLAT" | "fromlonlat";
2414
- coordinate: {
2415
- lon: number;
2416
- lat: number;
2417
- };
2418
- } | {
2419
- type: "FROMMEMBER" | "frommember";
2420
- member: unknown;
2421
- }, shape: {
2422
- type: "BYRADIUS" | "byradius";
2423
- radius: number;
2424
- radiusType: "M" | "KM" | "FT" | "MI";
2425
- } | {
2426
- type: "BYBOX" | "bybox";
2427
- rect: {
2428
- width: number;
2429
- height: number;
2430
- };
2431
- rectType: "M" | "KM" | "FT" | "MI";
2432
- }, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
2433
- count?: {
2434
- limit: number;
2435
- any?: boolean | undefined;
2436
- } | undefined;
2437
- withCoord?: boolean | undefined;
2438
- withDist?: boolean | undefined;
2439
- withHash?: boolean | undefined;
2440
- } | undefined) => Promise<({
2441
- member: unknown;
2442
- } & {
2443
- coord?: {
2444
- long: number;
2445
- lat: number;
2446
- } | undefined;
2447
- dist?: number | undefined;
2448
- hash?: string | undefined;
2449
- })[]>;
2450
- /**
2451
- * @see https://redis.io/commands/geosearchstore
2452
- */
2453
- geosearchstore: (destination: string, key: string, centerPoint: {
2454
- type: "FROMLONLAT" | "fromlonlat";
2455
- coordinate: {
2456
- lon: number;
2457
- lat: number;
2458
- };
2459
- } | {
2460
- type: "FROMMEMBER" | "frommember";
2461
- member: unknown;
2462
- }, shape: {
2463
- type: "BYRADIUS" | "byradius";
2464
- radius: number;
2465
- radiusType: "M" | "KM" | "FT" | "MI";
2466
- } | {
2467
- type: "BYBOX" | "bybox";
2468
- rect: {
2469
- width: number;
2470
- height: number;
2471
- };
2472
- rectType: "M" | "KM" | "FT" | "MI";
2473
- }, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
2474
- count?: {
2475
- limit: number;
2476
- any?: boolean | undefined;
2477
- } | undefined;
2478
- storeDist?: boolean | undefined;
2479
- } | undefined) => Promise<number>;
2480
2620
  /**
2481
2621
  * @see https://redis.io/commands/json.get
2482
2622
  */
2483
- get: (...args: CommandArgs<typeof JsonGetCommand>) => Promise<any>;
2623
+ get: <TData>(...args: CommandArgs<typeof JsonGetCommand>) => Promise<TData | null>;
2484
2624
  /**
2485
2625
  * @see https://redis.io/commands/json.mget
2486
2626
  */
2487
- mget: (keys: string[], path: string) => Promise<any>;
2627
+ mget: <TData>(keys: string[], path: string) => Promise<TData>;
2628
+ /**
2629
+ * @see https://redis.io/commands/json.mset
2630
+ */
2631
+ mset: (...args: CommandArgs<typeof JsonMSetCommand>) => Promise<"OK" | null>;
2488
2632
  /**
2489
2633
  * @see https://redis.io/commands/json.numincrby
2490
2634
  */
@@ -2510,9 +2654,9 @@ declare class Redis {
2510
2654
  */
2511
2655
  set: (key: string, path: string, value: string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown>)[], opts?: {
2512
2656
  nx: true;
2513
- xx?: undefined;
2657
+ xx?: never;
2514
2658
  } | {
2515
- nx?: undefined;
2659
+ nx?: never;
2516
2660
  xx: true;
2517
2661
  } | undefined) => Promise<"OK" | null>;
2518
2662
  /**
@@ -2547,6 +2691,7 @@ declare class Redis {
2547
2691
  * @see {@link Pipeline}
2548
2692
  */
2549
2693
  pipeline: () => Pipeline<[]>;
2694
+ protected autoPipeline: () => Redis;
2550
2695
  /**
2551
2696
  * Create a new transaction to allow executing multiple steps atomically.
2552
2697
  *
@@ -2557,6 +2702,22 @@ declare class Redis {
2557
2702
  * @see {@link Pipeline}
2558
2703
  */
2559
2704
  multi: () => Pipeline<[]>;
2705
+ /**
2706
+ * Returns an instance that can be used to execute `BITFIELD` commands on one key.
2707
+ *
2708
+ * @example
2709
+ * ```typescript
2710
+ * redis.set("mykey", 0);
2711
+ * const result = await redis.bitfield("mykey")
2712
+ * .set("u4", 0, 16)
2713
+ * .incr("u4", "#1", 1)
2714
+ * .exec();
2715
+ * console.log(result); // [0, 1]
2716
+ * ```
2717
+ *
2718
+ * @see https://redis.io/commands/bitfield
2719
+ */
2720
+ bitfield: (key: string) => BitFieldCommand<Promise<number[]>>;
2560
2721
  /**
2561
2722
  * @see https://redis.io/commands/append
2562
2723
  */
@@ -2617,7 +2778,7 @@ declare class Redis {
2617
2778
  /**
2618
2779
  * @see https://redis.io/commands/expire
2619
2780
  */
2620
- expire: (key: string, seconds: number) => Promise<0 | 1>;
2781
+ expire: (key: string, seconds: number, option?: ("NX" | "nx" | "XX" | "xx" | "GT" | "gt" | "LT" | "lt") | undefined) => Promise<0 | 1>;
2621
2782
  /**
2622
2783
  * @see https://redis.io/commands/expireat
2623
2784
  */
@@ -2630,8 +2791,98 @@ declare class Redis {
2630
2791
  * @see https://redis.io/commands/flushdb
2631
2792
  */
2632
2793
  flushdb: (opts?: {
2633
- async?: boolean | undefined;
2794
+ async?: boolean;
2634
2795
  } | undefined) => Promise<"OK">;
2796
+ /**
2797
+ * @see https://redis.io/commands/geoadd
2798
+ */
2799
+ geoadd: <TData>(args_0: string, args_1: GeoAddCommandOptions | GeoMember<TData>, ...args_2: GeoMember<TData>[]) => Promise<number | null>;
2800
+ /**
2801
+ * @see https://redis.io/commands/geopos
2802
+ */
2803
+ geopos: <TData>(args_0: string, ...args_1: TData[]) => Promise<{
2804
+ lng: number;
2805
+ lat: number;
2806
+ }[]>;
2807
+ /**
2808
+ * @see https://redis.io/commands/geodist
2809
+ */
2810
+ geodist: <TData>(key: string, member1: TData, member2: TData, unit?: "M" | "KM" | "FT" | "MI" | undefined) => Promise<number | null>;
2811
+ /**
2812
+ * @see https://redis.io/commands/geohash
2813
+ */
2814
+ geohash: <TData>(args_0: string, ...args_1: TData[]) => Promise<(string | null)[]>;
2815
+ /**
2816
+ * @see https://redis.io/commands/geosearch
2817
+ */
2818
+ geosearch: <TData>(key: string, centerPoint: {
2819
+ type: "FROMLONLAT" | "fromlonlat";
2820
+ coordinate: {
2821
+ lon: number;
2822
+ lat: number;
2823
+ };
2824
+ } | {
2825
+ type: "FROMMEMBER" | "frommember";
2826
+ member: TData;
2827
+ }, shape: {
2828
+ type: "BYRADIUS" | "byradius";
2829
+ radius: number;
2830
+ radiusType: "M" | "KM" | "FT" | "MI";
2831
+ } | {
2832
+ type: "BYBOX" | "bybox";
2833
+ rect: {
2834
+ width: number;
2835
+ height: number;
2836
+ };
2837
+ rectType: "M" | "KM" | "FT" | "MI";
2838
+ }, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
2839
+ count?: {
2840
+ limit: number;
2841
+ any?: boolean;
2842
+ };
2843
+ withCoord?: boolean;
2844
+ withDist?: boolean;
2845
+ withHash?: boolean;
2846
+ } | undefined) => Promise<({
2847
+ member: TData;
2848
+ } & {
2849
+ coord?: {
2850
+ long: number;
2851
+ lat: number;
2852
+ } | undefined;
2853
+ dist?: number | undefined;
2854
+ hash?: string | undefined;
2855
+ })[]>;
2856
+ /**
2857
+ * @see https://redis.io/commands/geosearchstore
2858
+ */
2859
+ geosearchstore: <TData>(destination: string, key: string, centerPoint: {
2860
+ type: "FROMLONLAT" | "fromlonlat";
2861
+ coordinate: {
2862
+ lon: number;
2863
+ lat: number;
2864
+ };
2865
+ } | {
2866
+ type: "FROMMEMBER" | "frommember";
2867
+ member: TData;
2868
+ }, shape: {
2869
+ type: "BYRADIUS" | "byradius";
2870
+ radius: number;
2871
+ radiusType: "M" | "KM" | "FT" | "MI";
2872
+ } | {
2873
+ type: "BYBOX" | "bybox";
2874
+ rect: {
2875
+ width: number;
2876
+ height: number;
2877
+ };
2878
+ rectType: "M" | "KM" | "FT" | "MI";
2879
+ }, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
2880
+ count?: {
2881
+ limit: number;
2882
+ any?: boolean;
2883
+ };
2884
+ storeDist?: boolean;
2885
+ } | undefined) => Promise<number>;
2635
2886
  /**
2636
2887
  * @see https://redis.io/commands/get
2637
2888
  */
@@ -2691,27 +2942,23 @@ declare class Redis {
2691
2942
  /**
2692
2943
  * @see https://redis.io/commands/hmset
2693
2944
  */
2694
- hmset: <TData>(key: string, kv: {
2695
- [field: string]: TData;
2696
- }) => Promise<"OK">;
2945
+ hmset: <TData>(key: string, kv: Record<string, TData>) => Promise<"OK">;
2697
2946
  /**
2698
2947
  * @see https://redis.io/commands/hrandfield
2699
2948
  */
2700
2949
  hrandfield: {
2701
- (key: string): Promise<string>;
2950
+ (key: string): Promise<string | null>;
2702
2951
  (key: string, count: number): Promise<string[]>;
2703
2952
  <TData extends Record<string, unknown>>(key: string, count: number, withValues: boolean): Promise<Partial<TData>>;
2704
2953
  };
2705
2954
  /**
2706
2955
  * @see https://redis.io/commands/hscan
2707
2956
  */
2708
- hscan: (key: string, cursor: number, cmdOpts?: ScanCommandOptions | undefined) => Promise<[number, (string | number)[]]>;
2957
+ hscan: (key: string, cursor: string | number, cmdOpts?: ScanCommandOptions | undefined) => Promise<[string, (string | number)[]]>;
2709
2958
  /**
2710
2959
  * @see https://redis.io/commands/hset
2711
2960
  */
2712
- hset: <TData>(key: string, kv: {
2713
- [field: string]: TData;
2714
- }) => Promise<number>;
2961
+ hset: <TData>(key: string, kv: Record<string, TData>) => Promise<number>;
2715
2962
  /**
2716
2963
  * @see https://redis.io/commands/hsetnx
2717
2964
  */
@@ -2760,13 +3007,17 @@ declare class Redis {
2760
3007
  * @see https://redis.io/commands/lpop
2761
3008
  */
2762
3009
  lpop: <TData>(key: string, count?: number | undefined) => Promise<TData | null>;
3010
+ /**
3011
+ * @see https://redis.io/commands/lmpop
3012
+ */
3013
+ lmpop: <TData>(numkeys: number, keys: string[], args_2: "LEFT" | "RIGHT", count?: number | undefined) => Promise<[string, TData[]] | null>;
2763
3014
  /**
2764
3015
  * @see https://redis.io/commands/lpos
2765
3016
  */
2766
3017
  lpos: <TData = number>(key: string, element: unknown, opts?: {
2767
- rank?: number | undefined;
2768
- count?: number | undefined;
2769
- maxLen?: number | undefined;
3018
+ rank?: number;
3019
+ count?: number;
3020
+ maxLen?: number;
2770
3021
  } | undefined) => Promise<TData>;
2771
3022
  /**
2772
3023
  * @see https://redis.io/commands/lpush
@@ -2799,15 +3050,11 @@ declare class Redis {
2799
3050
  /**
2800
3051
  * @see https://redis.io/commands/mset
2801
3052
  */
2802
- mset: <TData>(kv: {
2803
- [key: string]: TData;
2804
- }) => Promise<"OK">;
3053
+ mset: <TData>(kv: Record<string, TData>) => Promise<"OK">;
2805
3054
  /**
2806
3055
  * @see https://redis.io/commands/msetnx
2807
3056
  */
2808
- msetnx: <TData>(kv: {
2809
- [key: string]: TData;
2810
- }) => Promise<number>;
3057
+ msetnx: <TData>(kv: Record<string, TData>) => Promise<number>;
2811
3058
  /**
2812
3059
  * @see https://redis.io/commands/persist
2813
3060
  */
@@ -2820,6 +3067,18 @@ declare class Redis {
2820
3067
  * @see https://redis.io/commands/pexpireat
2821
3068
  */
2822
3069
  pexpireat: (key: string, unix: number) => Promise<0 | 1>;
3070
+ /**
3071
+ * @see https://redis.io/commands/pfadd
3072
+ */
3073
+ pfadd: (args_0: string, ...args_1: unknown[]) => Promise<number>;
3074
+ /**
3075
+ * @see https://redis.io/commands/pfcount
3076
+ */
3077
+ pfcount: (args_0: string, ...args_1: string[]) => Promise<number>;
3078
+ /**
3079
+ * @see https://redis.io/commands/pfmerge
3080
+ */
3081
+ pfmerge: (destination_key: string, ...args_1: string[]) => Promise<"OK">;
2823
3082
  /**
2824
3083
  * @see https://redis.io/commands/ping
2825
3084
  */
@@ -2863,11 +3122,11 @@ declare class Redis {
2863
3122
  /**
2864
3123
  * @see https://redis.io/commands/sadd
2865
3124
  */
2866
- sadd: <TData>(key: string, ...members: TData[]) => Promise<number>;
3125
+ sadd: <TData>(key: string, member: TData, ...members: TData[]) => Promise<number>;
2867
3126
  /**
2868
3127
  * @see https://redis.io/commands/scan
2869
3128
  */
2870
- scan: (cursor: number, opts?: ScanCommandOptions | undefined) => Promise<[number, string[]]>;
3129
+ scan: (cursor: string | number, opts?: ScanCommandOptions | undefined) => Promise<[string, string[]]>;
2871
3130
  /**
2872
3131
  * @see https://redis.io/commands/scard
2873
3132
  */
@@ -2951,7 +3210,7 @@ declare class Redis {
2951
3210
  /**
2952
3211
  * @see https://redis.io/commands/sscan
2953
3212
  */
2954
- sscan: (key: string, cursor: number, opts?: ScanCommandOptions | undefined) => Promise<[number, (string | number)[]]>;
3213
+ sscan: (key: string, cursor: string | number, opts?: ScanCommandOptions | undefined) => Promise<[string, (string | number)[]]>;
2955
3214
  /**
2956
3215
  * @see https://redis.io/commands/strlen
2957
3216
  */
@@ -2987,11 +3246,9 @@ declare class Redis {
2987
3246
  /**
2988
3247
  * @see https://redis.io/commands/xadd
2989
3248
  */
2990
- xadd: (key: string, id: string, entries: {
2991
- [field: string]: unknown;
2992
- }, opts?: {
2993
- nomkStream?: boolean | undefined;
2994
- trim?: (({
3249
+ xadd: (key: string, id: string, entries: Record<string, unknown>, opts?: {
3250
+ nomkStream?: boolean;
3251
+ trim?: ({
2995
3252
  type: "MAXLEN" | "maxlen";
2996
3253
  threshold: number;
2997
3254
  } | {
@@ -2999,20 +3256,117 @@ declare class Redis {
2999
3256
  threshold: string;
3000
3257
  }) & ({
3001
3258
  comparison: "~";
3002
- limit?: number | undefined;
3259
+ limit?: number;
3003
3260
  } | {
3004
3261
  comparison: "=";
3005
- limit?: undefined;
3006
- })) | undefined;
3262
+ limit?: never;
3263
+ });
3007
3264
  } | undefined) => Promise<string>;
3265
+ /**
3266
+ * @see https://redis.io/commands/xack
3267
+ */
3268
+ xack: (key: string, group: string, id: string | string[]) => Promise<number>;
3269
+ /**
3270
+ * @see https://redis.io/commands/xdel
3271
+ */
3272
+ xdel: (key: string, ids: string | string[]) => Promise<number>;
3273
+ /**
3274
+ * @see https://redis.io/commands/xgroup
3275
+ */
3276
+ xgroup: (key: string, opts: {
3277
+ type: "CREATE";
3278
+ group: string;
3279
+ id: `$` | string;
3280
+ options?: {
3281
+ MKSTREAM?: boolean;
3282
+ ENTRIESREAD?: number;
3283
+ };
3284
+ } | {
3285
+ type: "CREATECONSUMER";
3286
+ group: string;
3287
+ consumer: string;
3288
+ } | {
3289
+ type: "DELCONSUMER";
3290
+ group: string;
3291
+ consumer: string;
3292
+ } | {
3293
+ type: "DESTROY";
3294
+ group: string;
3295
+ } | {
3296
+ type: "SETID";
3297
+ group: string;
3298
+ id: `$` | string;
3299
+ options?: {
3300
+ ENTRIESREAD?: number;
3301
+ };
3302
+ }) => Promise<never>;
3303
+ /**
3304
+ * @see https://redis.io/commands/xread
3305
+ */
3306
+ xread: (...args: CommandArgs<typeof XReadCommand>) => Promise<unknown[]>;
3307
+ /**
3308
+ * @see https://redis.io/commands/xreadgroup
3309
+ */
3310
+ xreadgroup: (...args: CommandArgs<typeof XReadGroupCommand>) => Promise<unknown[]>;
3311
+ /**
3312
+ * @see https://redis.io/commands/xinfo
3313
+ */
3314
+ xinfo: (key: string, options: {
3315
+ type: "CONSUMERS";
3316
+ group: string;
3317
+ } | {
3318
+ type: "GROUPS";
3319
+ }) => Promise<unknown[]>;
3320
+ /**
3321
+ * @see https://redis.io/commands/xlen
3322
+ */
3323
+ xlen: (key: string) => Promise<number>;
3324
+ /**
3325
+ * @see https://redis.io/commands/xpending
3326
+ */
3327
+ xpending: (key: string, group: string, start: string, end: string, count: number, options?: {
3328
+ idleTime?: number;
3329
+ consumer?: string | string[];
3330
+ } | undefined) => Promise<unknown[]>;
3331
+ /**
3332
+ * @see https://redis.io/commands/xclaim
3333
+ */
3334
+ xclaim: (key: string, group: string, consumer: string, minIdleTime: number, id: string | string[], options?: {
3335
+ idleMS?: number;
3336
+ timeMS?: number;
3337
+ retryCount?: number;
3338
+ force?: boolean;
3339
+ justId?: boolean;
3340
+ lastId?: number;
3341
+ } | undefined) => Promise<unknown[]>;
3342
+ /**
3343
+ * @see https://redis.io/commands/xautoclaim
3344
+ */
3345
+ xautoclaim: (key: string, group: string, consumer: string, minIdleTime: number, start: string, options?: {
3346
+ count?: number;
3347
+ justId?: boolean;
3348
+ } | undefined) => Promise<unknown[]>;
3349
+ /**
3350
+ * @see https://redis.io/commands/xtrim
3351
+ */
3352
+ xtrim: (key: string, options: {
3353
+ strategy: "MAXLEN" | "MINID";
3354
+ exactness?: "~" | "=";
3355
+ threshold: number | string;
3356
+ limit?: number;
3357
+ }) => Promise<number>;
3008
3358
  /**
3009
3359
  * @see https://redis.io/commands/xrange
3010
3360
  */
3011
3361
  xrange: (key: string, start: string, end: string, count?: number | undefined) => Promise<Record<string, Record<string, unknown>>>;
3362
+ /**
3363
+ * @see https://redis.io/commands/xrevrange
3364
+ */
3365
+ xrevrange: (key: string, end: string, start: string, count?: number | undefined) => Promise<Record<string, Record<string, unknown>>>;
3012
3366
  /**
3013
3367
  * @see https://redis.io/commands/zadd
3014
3368
  */
3015
- zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [key: string, opts: ZAddCommandOptions | ZAddCommandOptionsWithIncr, ScoreMember<TData>, ...ScoreMember<TData>[]]) => Promise<number | null>;
3369
+ zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [key: string, opts: ZAddCommandOptions, ...scoreMemberPairs: [ScoreMember<TData>, ...ScoreMember<TData>[]]]) => Promise<number | null>;
3016
3370
  /**
3017
3371
  * @see https://redis.io/commands/zcard
3018
3372
  */
@@ -3052,21 +3406,11 @@ declare class Redis {
3052
3406
  /**
3053
3407
  * @see https://redis.io/commands/zrange
3054
3408
  */
3055
- zrange: <TData extends unknown[]>(...args: [key: string, min: number, max: number, opts?: ZRangeCommandOptions] | [
3056
- key: string,
3057
- min: `(${string}` | `[${string}` | "-" | "+",
3058
- max: `(${string}` | `[${string}` | "-" | "+",
3059
- opts: {
3060
- byLex: true;
3061
- } & ZRangeCommandOptions
3062
- ] | [
3063
- key: string,
3064
- min: number | `(${number}` | "-inf" | "+inf",
3065
- max: number | `(${number}` | "-inf" | "+inf",
3066
- opts: {
3067
- byScore: true;
3068
- } & ZRangeCommandOptions
3069
- ]) => Promise<TData>;
3409
+ zrange: <TData extends unknown[]>(...args: [key: string, min: number, max: number, opts?: ZRangeCommandOptions] | [key: string, min: `(${string}` | `[${string}` | "-" | "+", max: `(${string}` | `[${string}` | "-" | "+", opts: {
3410
+ byLex: true;
3411
+ } & ZRangeCommandOptions] | [key: string, min: number | `(${number}` | "-inf" | "+inf", max: number | `(${number}` | "-inf" | "+inf", opts: {
3412
+ byScore: true;
3413
+ } & ZRangeCommandOptions]) => Promise<TData>;
3070
3414
  /**
3071
3415
  * @see https://redis.io/commands/zrank
3072
3416
  */
@@ -3094,7 +3438,7 @@ declare class Redis {
3094
3438
  /**
3095
3439
  * @see https://redis.io/commands/zscan
3096
3440
  */
3097
- zscan: (key: string, cursor: number, opts?: ScanCommandOptions | undefined) => Promise<[number, (string | number)[]]>;
3441
+ zscan: (key: string, cursor: string | number, opts?: ScanCommandOptions | undefined) => Promise<[string, (string | number)[]]>;
3098
3442
  /**
3099
3443
  * @see https://redis.io/commands/zscore
3100
3444
  */
@@ -3109,6 +3453,24 @@ declare class Redis {
3109
3453
  zunionstore: (destination: string, numKeys: number, keys: string[], opts?: ZUnionStoreCommandOptions | undefined) => Promise<number>;
3110
3454
  }
3111
3455
 
3456
+ /**
3457
+ * Result of a bad request to upstash
3458
+ */
3459
+ declare class UpstashError extends Error {
3460
+ constructor(message: string);
3461
+ }
3462
+ declare class UrlError extends Error {
3463
+ constructor(url: string);
3464
+ }
3465
+
3466
+ type error_UpstashError = UpstashError;
3467
+ declare const error_UpstashError: typeof UpstashError;
3468
+ type error_UrlError = UrlError;
3469
+ declare const error_UrlError: typeof UrlError;
3470
+ declare namespace error {
3471
+ export { error_UpstashError as UpstashError, error_UrlError as UrlError };
3472
+ }
3473
+
3112
3474
  /**
3113
3475
  * @see https://redis.io/commands/zdiffstore
3114
3476
  */
@@ -3123,4 +3485,4 @@ declare class ZMScoreCommand<TData> extends Command<string[] | null, number[] |
3123
3485
  constructor(cmd: [key: string, members: TData[]], opts?: CommandOptions<string[] | null, number[] | null>);
3124
3486
  }
3125
3487
 
3126
- 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, ZRangeCommand as bA, ZRangeCommandOptions as bB, ZRankCommand as bC, ZRemCommand as bD, ZRemRangeByLexCommand as bE, ZRemRangeByRankCommand as bF, ZRemRangeByScoreCommand as bG, ZRevRankCommand as bH, ZScanCommand as bI, ZScoreCommand as bJ, ZUnionCommand as bK, ZUnionCommandOptions as bL, ZUnionStoreCommand as bM, ZUnionStoreCommandOptions as bN, 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, ZAddCommandOptionsWithIncr as bo, ZAddCommand as bp, ZCardCommand as bq, ZCountCommand as br, ZDiffStoreCommand as bs, ZIncrByCommand as bt, ZInterStoreCommand as bu, ZInterStoreCommandOptions as bv, ZLexCountCommand as bw, ZMScoreCommand as bx, ZPopMaxCommand as by, ZPopMinCommand 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 };
3488
+ export { HValsCommand as $, AppendCommand as A, BitCountCommand as B, CopyCommand as C, DBSizeCommand as D, EchoCommand as E, FlushAllCommand as F, GeoAddCommand as G, GetRangeCommand as H, GetSetCommand as I, HDelCommand as J, HExistsCommand as K, HGetCommand as L, HGetAllCommand as M, HIncrByCommand as N, HIncrByFloatCommand as O, Pipeline as P, HKeysCommand as Q, type RedisOptions as R, HLenCommand as S, HMGetCommand as T, type UpstashRequest as U, HMSetCommand as V, HRandFieldCommand as W, HScanCommand as X, HSetCommand as Y, HSetNXCommand as Z, HStrLenCommand as _, type RequesterConfig as a, SetBitCommand as a$, IncrCommand as a0, IncrByCommand as a1, IncrByFloatCommand as a2, JsonArrAppendCommand as a3, JsonArrIndexCommand as a4, JsonArrInsertCommand as a5, JsonArrLenCommand as a6, JsonArrPopCommand as a7, JsonArrTrimCommand as a8, JsonClearCommand as a9, MGetCommand as aA, MSetCommand as aB, MSetNXCommand as aC, PersistCommand as aD, PExpireCommand as aE, PExpireAtCommand as aF, PingCommand as aG, PSetEXCommand as aH, PTtlCommand as aI, PublishCommand as aJ, RandomKeyCommand as aK, RenameCommand as aL, RenameNXCommand as aM, RPopCommand as aN, RPushCommand as aO, RPushXCommand as aP, SAddCommand as aQ, ScanCommand as aR, type ScanCommandOptions as aS, SCardCommand as aT, ScriptExistsCommand as aU, ScriptFlushCommand as aV, ScriptLoadCommand as aW, SDiffCommand as aX, SDiffStoreCommand as aY, SetCommand as aZ, type SetCommandOptions as a_, JsonDelCommand as aa, JsonForgetCommand as ab, JsonGetCommand as ac, JsonMGetCommand as ad, JsonNumIncrByCommand as ae, JsonNumMultByCommand as af, JsonObjKeysCommand as ag, JsonObjLenCommand as ah, JsonRespCommand as ai, JsonSetCommand as aj, JsonStrAppendCommand as ak, JsonStrLenCommand as al, JsonToggleCommand as am, JsonTypeCommand as an, KeysCommand as ao, LIndexCommand as ap, LInsertCommand as aq, LLenCommand as ar, LMoveCommand as as, LPopCommand as at, LPushCommand as au, LPushXCommand as av, LRangeCommand as aw, LRemCommand as ax, LSetCommand as ay, LTrimCommand as az, Redis as b, SetExCommand as b0, SetNxCommand as b1, SetRangeCommand as b2, SInterCommand as b3, SInterStoreCommand as b4, SIsMemberCommand as b5, SMembersCommand as b6, SMIsMemberCommand as b7, SMoveCommand as b8, SPopCommand as b9, ZPopMinCommand as bA, ZRangeCommand as bB, type ZRangeCommandOptions as bC, ZRankCommand as bD, ZRemCommand as bE, ZRemRangeByLexCommand as bF, ZRemRangeByRankCommand as bG, ZRemRangeByScoreCommand as bH, ZRevRankCommand as bI, ZScanCommand as bJ, ZScoreCommand as bK, ZUnionCommand as bL, type ZUnionCommandOptions as bM, ZUnionStoreCommand as bN, type ZUnionStoreCommandOptions as bO, SRandMemberCommand as ba, SRemCommand as bb, SScanCommand as bc, StrLenCommand as bd, SUnionCommand as be, SUnionStoreCommand as bf, TimeCommand as bg, TouchCommand as bh, TtlCommand as bi, type Type as bj, TypeCommand as bk, UnlinkCommand as bl, XAddCommand as bm, XRangeCommand as bn, type ScoreMember as bo, type ZAddCommandOptions as bp, ZAddCommand as bq, ZCardCommand as br, ZCountCommand as bs, ZDiffStoreCommand as bt, ZIncrByCommand as bu, ZInterStoreCommand as bv, type ZInterStoreCommandOptions as bw, ZLexCountCommand as bx, ZMScoreCommand as by, ZPopMaxCommand as bz, type UpstashResponse as c, type Requester as d, error as e, BitOpCommand as f, BitPosCommand as g, DecrCommand as h, DecrByCommand as i, DelCommand as j, EvalCommand as k, EvalshaCommand as l, ExistsCommand as m, ExpireCommand as n, ExpireAtCommand as o, FlushDBCommand as p, type GeoAddCommandOptions as q, type GeoMember as r, GeoDistCommand as s, GeoHashCommand as t, GeoPosCommand as u, GeoSearchCommand as v, GeoSearchStoreCommand as w, GetCommand as x, GetBitCommand as y, GetDelCommand as z };