@upstash/redis 0.0.0-ci.d3170677a5859e31d40407781286bdf17d64ca72-20250220114636 → 0.0.0-ci.d3985e1d3f7f296ee10dff2746b51fa88dddc9a9-20251222113217

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.
@@ -77,7 +77,7 @@ type RetryConfig = false | {
77
77
  */
78
78
  retries?: number;
79
79
  /**
80
- * A backoff function receives the current retry cound and returns a number in milliseconds to wait before retrying.
80
+ * A backoff function receives the current retry count and returns a number in milliseconds to wait before retrying.
81
81
  *
82
82
  * @default
83
83
  * ```ts
@@ -86,6 +86,9 @@ type RetryConfig = false | {
86
86
  */
87
87
  backoff?: (retryCount: number) => number;
88
88
  };
89
+ type Options$1 = {
90
+ backend?: string;
91
+ };
89
92
  type RequesterConfig = {
90
93
  /**
91
94
  * Configure the retry behaviour in case of network errors
@@ -120,6 +123,19 @@ type RequesterConfig = {
120
123
  */
121
124
  cache?: CacheSetting;
122
125
  };
126
+ type HttpClientConfig = {
127
+ headers?: Record<string, string>;
128
+ baseUrl: string;
129
+ options?: Options$1;
130
+ retry?: RetryConfig;
131
+ agent?: any;
132
+ signal?: AbortSignal | (() => AbortSignal);
133
+ keepAlive?: boolean;
134
+ /**
135
+ * 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.
136
+ */
137
+ readYourWrites?: boolean;
138
+ } & RequesterConfig;
123
139
 
124
140
  type Serialize = (data: unknown) => string | number | boolean;
125
141
  type Deserialize<TResult, TData> = (result: TResult) => TData;
@@ -271,18 +287,6 @@ declare class ScriptFlushCommand extends Command<"OK", "OK"> {
271
287
  constructor([opts]: [opts?: ScriptFlushCommandOptions], cmdOpts?: CommandOptions<"OK", "OK">);
272
288
  }
273
289
 
274
- type ScanCommandOptions = {
275
- match?: string;
276
- count?: number;
277
- type?: string;
278
- };
279
- /**
280
- * @see https://redis.io/commands/scan
281
- */
282
- declare class ScanCommand extends Command<[string, string[]], [string, string[]]> {
283
- constructor([cursor, opts]: [cursor: string | number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[string, string[]], [string, string[]]>);
284
- }
285
-
286
290
  type GeoAddCommandOptions = {
287
291
  nx?: boolean;
288
292
  xx?: never;
@@ -308,6 +312,11 @@ declare class GeoAddCommand<TMemberType = string> extends Command<number | null,
308
312
  ], opts?: CommandOptions<number | null, number | null>);
309
313
  }
310
314
 
315
+ type ExpireOption = "NX" | "nx" | "XX" | "xx" | "GT" | "gt" | "LT" | "lt";
316
+ declare class ExpireCommand extends Command<"0" | "1", 0 | 1> {
317
+ constructor(cmd: [key: string, seconds: number, option?: ExpireOption], opts?: CommandOptions<"0" | "1", 0 | 1>);
318
+ }
319
+
311
320
  /**
312
321
  * @see https://redis.io/commands/append
313
322
  */
@@ -404,6 +413,13 @@ declare class EchoCommand extends Command<string, string> {
404
413
  constructor(cmd: [message: string], opts?: CommandOptions<string, string>);
405
414
  }
406
415
 
416
+ /**
417
+ * @see https://redis.io/commands/eval_ro
418
+ */
419
+ declare class EvalROCommand<TArgs extends unknown[], TData> extends Command<unknown, TData> {
420
+ constructor([script, keys, args]: [script: string, keys: string[], args: TArgs], opts?: CommandOptions<unknown, TData>);
421
+ }
422
+
407
423
  /**
408
424
  * @see https://redis.io/commands/eval
409
425
  */
@@ -411,6 +427,13 @@ declare class EvalCommand<TArgs extends unknown[], TData> extends Command<unknow
411
427
  constructor([script, keys, args]: [script: string, keys: string[], args: TArgs], opts?: CommandOptions<unknown, TData>);
412
428
  }
413
429
 
430
+ /**
431
+ * @see https://redis.io/commands/evalsha_ro
432
+ */
433
+ declare class EvalshaROCommand<TArgs extends unknown[], TData> extends Command<unknown, TData> {
434
+ constructor([sha, keys, args]: [sha: string, keys: string[], args?: TArgs], opts?: CommandOptions<unknown, TData>);
435
+ }
436
+
414
437
  /**
415
438
  * @see https://redis.io/commands/evalsha
416
439
  */
@@ -425,16 +448,11 @@ declare class ExistsCommand extends Command<number, number> {
425
448
  constructor(cmd: [...keys: string[]], opts?: CommandOptions<number, number>);
426
449
  }
427
450
 
428
- type ExpireOptions = "NX" | "nx" | "XX" | "xx" | "GT" | "gt" | "LT" | "lt";
429
- declare class ExpireCommand extends Command<"0" | "1", 0 | 1> {
430
- constructor(cmd: [key: string, seconds: number, option?: ExpireOptions], opts?: CommandOptions<"0" | "1", 0 | 1>);
431
- }
432
-
433
451
  /**
434
452
  * @see https://redis.io/commands/expireat
435
453
  */
436
454
  declare class ExpireAtCommand extends Command<"0" | "1", 0 | 1> {
437
- constructor(cmd: [key: string, unix: number], opts?: CommandOptions<"0" | "1", 0 | 1>);
455
+ constructor(cmd: [key: string, unix: number, option?: ExpireOption], opts?: CommandOptions<"0" | "1", 0 | 1>);
438
456
  }
439
457
 
440
458
  /**
@@ -681,6 +699,58 @@ declare class HExistsCommand extends Command<number, number> {
681
699
  constructor(cmd: [key: string, field: string], opts?: CommandOptions<number, number>);
682
700
  }
683
701
 
702
+ declare class HExpireCommand extends Command<(-2 | 0 | 1 | 2)[], (-2 | 0 | 1 | 2)[]> {
703
+ constructor(cmd: [
704
+ key: string,
705
+ fields: (string | number) | (string | number)[],
706
+ seconds: number,
707
+ option?: ExpireOption
708
+ ], opts?: CommandOptions<(-2 | 0 | 1 | 2)[], (-2 | 0 | 1 | 2)[]>);
709
+ }
710
+
711
+ declare class HExpireAtCommand extends Command<(-2 | 0 | 1 | 2)[], (-2 | 0 | 1 | 2)[]> {
712
+ constructor(cmd: [
713
+ key: string,
714
+ fields: (string | number) | (string | number)[],
715
+ timestamp: number,
716
+ option?: ExpireOption
717
+ ], opts?: CommandOptions<(-2 | 0 | 1 | 2)[], (-2 | 0 | 1 | 2)[]>);
718
+ }
719
+
720
+ declare class HExpireTimeCommand extends Command<number[], number[]> {
721
+ constructor(cmd: [key: string, fields: (string | number) | (string | number)[]], opts?: CommandOptions<number[], number[]>);
722
+ }
723
+
724
+ declare class HPersistCommand extends Command<(-2 | -1 | 1)[], (-2 | -1 | 1)[]> {
725
+ constructor(cmd: [key: string, fields: (string | number) | (string | number)[]], opts?: CommandOptions<(-2 | -1 | 1)[], (-2 | -1 | 1)[]>);
726
+ }
727
+
728
+ declare class HPExpireCommand extends Command<(-2 | 0 | 1 | 2)[], (-2 | 0 | 1 | 2)[]> {
729
+ constructor(cmd: [
730
+ key: string,
731
+ fields: (string | number) | (string | number)[],
732
+ milliseconds: number,
733
+ option?: ExpireOption
734
+ ], opts?: CommandOptions<(-2 | 0 | 1 | 2)[], (-2 | 0 | 1 | 2)[]>);
735
+ }
736
+
737
+ declare class HPExpireAtCommand extends Command<(-2 | 0 | 1 | 2)[], (-2 | 0 | 1 | 2)[]> {
738
+ constructor(cmd: [
739
+ key: string,
740
+ fields: (string | number) | (string | number)[],
741
+ timestamp: number,
742
+ option?: ExpireOption
743
+ ], opts?: CommandOptions<(-2 | 0 | 1 | 2)[], (-2 | 0 | 1 | 2)[]>);
744
+ }
745
+
746
+ declare class HPExpireTimeCommand extends Command<number[], number[]> {
747
+ constructor(cmd: [key: string, fields: (string | number) | (string | number)[]], opts?: CommandOptions<number[], number[]>);
748
+ }
749
+
750
+ declare class HPTtlCommand extends Command<number[], number[]> {
751
+ constructor(cmd: [key: string, fields: (string | number) | (string | number)[]], opts?: CommandOptions<number[], number[]>);
752
+ }
753
+
684
754
  /**
685
755
  * @see https://redis.io/commands/hget
686
756
  */
@@ -754,6 +824,39 @@ declare class HRandFieldCommand<TData extends string | string[] | Record<string,
754
824
  constructor(cmd: [key: string, count: number, withValues: boolean], opts?: CommandOptions<string[], Partial<TData>>);
755
825
  }
756
826
 
827
+ type ScanCommandOptionsStandard = {
828
+ match?: string;
829
+ count?: number;
830
+ type?: string;
831
+ withType?: false;
832
+ };
833
+ type ScanCommandOptionsWithType = {
834
+ match?: string;
835
+ count?: number;
836
+ /**
837
+ * Includes types of each key in the result
838
+ *
839
+ * @example
840
+ * ```typescript
841
+ * await redis.scan("0", { withType: true })
842
+ * // ["0", [{ key: "key1", type: "string" }, { key: "key2", type: "list" }]]
843
+ * ```
844
+ */
845
+ withType: true;
846
+ };
847
+ type ScanCommandOptions = ScanCommandOptionsStandard | ScanCommandOptionsWithType;
848
+ type ScanResultStandard = [string, string[]];
849
+ type ScanResultWithType = [string, {
850
+ key: string;
851
+ type: string;
852
+ }[]];
853
+ /**
854
+ * @see https://redis.io/commands/scan
855
+ */
856
+ declare class ScanCommand<TData = ScanResultStandard> extends Command<[string, string[]], TData> {
857
+ constructor([cursor, opts]: [cursor: string | number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[string, string[]], TData>);
858
+ }
859
+
757
860
  /**
758
861
  * @see https://redis.io/commands/hscan
759
862
  */
@@ -788,6 +891,10 @@ declare class HStrLenCommand extends Command<number, number> {
788
891
  constructor(cmd: [key: string, field: string], opts?: CommandOptions<number, number>);
789
892
  }
790
893
 
894
+ declare class HTtlCommand extends Command<number[], number[]> {
895
+ constructor(cmd: [key: string, fields: (string | number) | (string | number)[]], opts?: CommandOptions<number[], number[]>);
896
+ }
897
+
791
898
  /**
792
899
  * @see https://redis.io/commands/hvals
793
900
  */
@@ -894,6 +1001,13 @@ declare class JsonGetCommand<TData extends (unknown | Record<string, unknown>) |
894
1001
  ] | [key: string, ...path: string[]], opts?: CommandOptions<TData | null, TData | null>);
895
1002
  }
896
1003
 
1004
+ /**
1005
+ * @see https://redis.io/commands/json.merge
1006
+ */
1007
+ declare class JsonMergeCommand<TData extends string | number | Record<string, unknown> | Array<unknown>> extends Command<"OK" | null, "OK" | null> {
1008
+ constructor(cmd: [key: string, path: string, value: TData], opts?: CommandOptions<"OK" | null, "OK" | null>);
1009
+ }
1010
+
897
1011
  /**
898
1012
  * @see https://redis.io/commands/json.mget
899
1013
  */
@@ -1096,14 +1210,14 @@ declare class PersistCommand extends Command<"0" | "1", 0 | 1> {
1096
1210
  * @see https://redis.io/commands/pexpire
1097
1211
  */
1098
1212
  declare class PExpireCommand extends Command<"0" | "1", 0 | 1> {
1099
- constructor(cmd: [key: string, milliseconds: number], opts?: CommandOptions<"0" | "1", 0 | 1>);
1213
+ constructor(cmd: [key: string, milliseconds: number, option?: ExpireOption], opts?: CommandOptions<"0" | "1", 0 | 1>);
1100
1214
  }
1101
1215
 
1102
1216
  /**
1103
1217
  * @see https://redis.io/commands/pexpireat
1104
1218
  */
1105
1219
  declare class PExpireAtCommand extends Command<"0" | "1", 0 | 1> {
1106
- constructor(cmd: [key: string, unix: number], opts?: CommandOptions<"0" | "1", 0 | 1>);
1220
+ constructor(cmd: [key: string, unix: number, option?: ExpireOption], opts?: CommandOptions<"0" | "1", 0 | 1>);
1107
1221
  }
1108
1222
 
1109
1223
  /**
@@ -1463,16 +1577,33 @@ type XReadCommandOptions = [
1463
1577
  id: string | string[],
1464
1578
  options?: {
1465
1579
  count?: number;
1580
+ /**
1581
+ * @deprecated block is not yet supported in Upstash Redis
1582
+ */
1466
1583
  blockMS?: number;
1467
1584
  }
1468
1585
  ];
1469
- type XReadOptions = XReadCommandOptions extends [infer K, infer I, ...any[]] ? K extends string ? I extends string ? [key: string, id: string, options?: {
1470
- count?: number;
1471
- blockMS?: number;
1472
- }] : never : K extends string[] ? I extends string[] ? [key: string[], id: string[], options?: {
1473
- count?: number;
1474
- blockMS?: number;
1475
- }] : never : never : never;
1586
+ type XReadOptions = XReadCommandOptions extends [infer K, infer I, ...any[]] ? K extends string ? I extends string ? [
1587
+ key: string,
1588
+ id: string,
1589
+ options?: {
1590
+ count?: number;
1591
+ /**
1592
+ * @deprecated block is not yet supported in Upstash Redis
1593
+ */
1594
+ blockMS?: number;
1595
+ }
1596
+ ] : never : K extends string[] ? I extends string[] ? [
1597
+ key: string[],
1598
+ id: string[],
1599
+ options?: {
1600
+ count?: number;
1601
+ /**
1602
+ * @deprecated block is not yet supported in Upstash Redis
1603
+ */
1604
+ blockMS?: number;
1605
+ }
1606
+ ] : never : never : never;
1476
1607
  /**
1477
1608
  * @see https://redis.io/commands/xread
1478
1609
  */
@@ -1482,6 +1613,9 @@ declare class XReadCommand extends Command<number, unknown[]> {
1482
1613
 
1483
1614
  type Options = {
1484
1615
  count?: number;
1616
+ /**
1617
+ * @deprecated block is not yet supported in Upstash Redis
1618
+ */
1485
1619
  blockMS?: number;
1486
1620
  NOACK?: boolean;
1487
1621
  };
@@ -1659,7 +1793,11 @@ declare class ZRemRangeByRankCommand extends Command<number, number> {
1659
1793
  * @see https://redis.io/commands/zremrangebyscore
1660
1794
  */
1661
1795
  declare class ZRemRangeByScoreCommand extends Command<number, number> {
1662
- constructor(cmd: [key: string, min: number, max: number], opts?: CommandOptions<number, number>);
1796
+ constructor(cmd: [
1797
+ key: string,
1798
+ min: number | `(${number}` | "-inf" | "+inf",
1799
+ max: number | `(${number}` | "-inf" | "+inf"
1800
+ ], opts?: CommandOptions<number, number>);
1663
1801
  }
1664
1802
 
1665
1803
  /**
@@ -1689,23 +1827,38 @@ declare class ZScoreCommand<TData> extends Command<string | null, number | null>
1689
1827
  constructor(cmd: [key: string, member: TData], opts?: CommandOptions<string | null, number | null>);
1690
1828
  }
1691
1829
 
1692
- type MessageEvent = {
1693
- type: string;
1694
- data: any;
1695
- channel?: string;
1696
- pattern?: string;
1830
+ type BaseMessageData<TMessage> = {
1831
+ channel: string;
1832
+ message: TMessage;
1833
+ };
1834
+ type PatternMessageData<TMessage> = BaseMessageData<TMessage> & {
1835
+ pattern: string;
1697
1836
  };
1698
- type Listener = (event: MessageEvent["data"]) => void;
1699
- declare class Subscriber extends EventTarget {
1837
+ type SubscriptionCountEvent = number;
1838
+ type MessageEventMap<TMessage> = {
1839
+ message: BaseMessageData<TMessage>;
1840
+ subscribe: SubscriptionCountEvent;
1841
+ unsubscribe: SubscriptionCountEvent;
1842
+ pmessage: PatternMessageData<TMessage>;
1843
+ psubscribe: SubscriptionCountEvent;
1844
+ punsubscribe: SubscriptionCountEvent;
1845
+ error: Error;
1846
+ [key: `message:${string}`]: BaseMessageData<TMessage>;
1847
+ [key: `pmessage:${string}`]: PatternMessageData<TMessage>;
1848
+ };
1849
+ type EventType = keyof MessageEventMap<any>;
1850
+ type Listener<TMessage, T extends EventType> = (event: MessageEventMap<TMessage>[T]) => void;
1851
+ declare class Subscriber<TMessage = any> extends EventTarget {
1700
1852
  private subscriptions;
1701
1853
  private client;
1702
1854
  private listeners;
1703
- constructor(client: Requester, channels: string[], isPattern?: boolean);
1855
+ private opts?;
1856
+ constructor(client: Requester, channels: string[], isPattern?: boolean, opts?: Pick<RedisOptions, "automaticDeserialization">);
1704
1857
  private subscribeToChannel;
1705
1858
  private subscribeToPattern;
1706
1859
  private handleMessage;
1707
1860
  private dispatchToListeners;
1708
- on(type: string, listener: Listener): void;
1861
+ on<T extends keyof MessageEventMap<TMessage>>(type: T, listener: Listener<TMessage, T>): void;
1709
1862
  removeAllListeners(): void;
1710
1863
  unsubscribe(channels?: string[]): Promise<void>;
1711
1864
  getSubscribedChannels(): string[];
@@ -1871,10 +2024,18 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
1871
2024
  * @see https://redis.io/commands/echo
1872
2025
  */
1873
2026
  echo: (message: string) => Pipeline<[...TCommands, Command<any, string>]>;
2027
+ /**
2028
+ * @see https://redis.io/commands/eval_ro
2029
+ */
2030
+ evalRo: <TArgs extends unknown[], TData = unknown>(script: string, keys: string[], args: TArgs) => Pipeline<[...TCommands, Command<any, TData>]>;
1874
2031
  /**
1875
2032
  * @see https://redis.io/commands/eval
1876
2033
  */
1877
2034
  eval: <TArgs extends unknown[], TData = unknown>(script: string, keys: string[], args: TArgs) => Pipeline<[...TCommands, Command<any, TData>]>;
2035
+ /**
2036
+ * @see https://redis.io/commands/evalsha_ro
2037
+ */
2038
+ evalshaRo: <TArgs extends unknown[], TData = unknown>(sha1: string, keys: string[], args: TArgs) => Pipeline<[...TCommands, Command<any, TData>]>;
1878
2039
  /**
1879
2040
  * @see https://redis.io/commands/evalsha
1880
2041
  */
@@ -1886,11 +2047,11 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
1886
2047
  /**
1887
2048
  * @see https://redis.io/commands/expire
1888
2049
  */
1889
- expire: (key: string, seconds: number, option?: ("NX" | "nx" | "XX" | "xx" | "GT" | "gt" | "LT" | "lt") | undefined) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
2050
+ expire: (key: string, seconds: number, option?: ExpireOption | undefined) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
1890
2051
  /**
1891
2052
  * @see https://redis.io/commands/expireat
1892
2053
  */
1893
- expireat: (key: string, unix: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
2054
+ expireat: (key: string, unix: number, option?: ExpireOption | undefined) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
1894
2055
  /**
1895
2056
  * @see https://redis.io/commands/flushall
1896
2057
  */
@@ -2059,6 +2220,42 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
2059
2220
  * @see https://redis.io/commands/hexists
2060
2221
  */
2061
2222
  hexists: (key: string, field: string) => Pipeline<[...TCommands, Command<any, number>]>;
2223
+ /**
2224
+ * @see https://redis.io/commands/hexpire
2225
+ */
2226
+ hexpire: (key: string, fields: string | number | (string | number)[], seconds: number, option?: ExpireOption | undefined) => Pipeline<[...TCommands, Command<any, (0 | 1 | 2 | -2)[]>]>;
2227
+ /**
2228
+ * @see https://redis.io/commands/hexpireat
2229
+ */
2230
+ hexpireat: (key: string, fields: string | number | (string | number)[], timestamp: number, option?: ExpireOption | undefined) => Pipeline<[...TCommands, Command<any, (0 | 1 | 2 | -2)[]>]>;
2231
+ /**
2232
+ * @see https://redis.io/commands/hexpiretime
2233
+ */
2234
+ hexpiretime: (key: string, fields: string | number | (string | number)[]) => Pipeline<[...TCommands, Command<any, number[]>]>;
2235
+ /**
2236
+ * @see https://redis.io/commands/httl
2237
+ */
2238
+ httl: (key: string, fields: string | number | (string | number)[]) => Pipeline<[...TCommands, Command<any, number[]>]>;
2239
+ /**
2240
+ * @see https://redis.io/commands/hpexpire
2241
+ */
2242
+ hpexpire: (key: string, fields: string | number | (string | number)[], milliseconds: number, option?: ExpireOption | undefined) => Pipeline<[...TCommands, Command<any, (0 | 1 | 2 | -2)[]>]>;
2243
+ /**
2244
+ * @see https://redis.io/commands/hpexpireat
2245
+ */
2246
+ hpexpireat: (key: string, fields: string | number | (string | number)[], timestamp: number, option?: ExpireOption | undefined) => Pipeline<[...TCommands, Command<any, (0 | 1 | 2 | -2)[]>]>;
2247
+ /**
2248
+ * @see https://redis.io/commands/hpexpiretime
2249
+ */
2250
+ hpexpiretime: (key: string, fields: string | number | (string | number)[]) => Pipeline<[...TCommands, Command<any, number[]>]>;
2251
+ /**
2252
+ * @see https://redis.io/commands/hpttl
2253
+ */
2254
+ hpttl: (key: string, fields: string | number | (string | number)[]) => Pipeline<[...TCommands, Command<any, number[]>]>;
2255
+ /**
2256
+ * @see https://redis.io/commands/hpersist
2257
+ */
2258
+ hpersist: (key: string, fields: string | number | (string | number)[]) => Pipeline<[...TCommands, Command<any, (1 | -2 | -1)[]>]>;
2062
2259
  /**
2063
2260
  * @see https://redis.io/commands/hget
2064
2261
  */
@@ -2206,11 +2403,11 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
2206
2403
  /**
2207
2404
  * @see https://redis.io/commands/pexpire
2208
2405
  */
2209
- pexpire: (key: string, milliseconds: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
2406
+ pexpire: (key: string, milliseconds: number, option?: ExpireOption | undefined) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
2210
2407
  /**
2211
2408
  * @see https://redis.io/commands/pexpireat
2212
2409
  */
2213
- pexpireat: (key: string, unix: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
2410
+ pexpireat: (key: string, unix: number, option?: ExpireOption | undefined) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
2214
2411
  /**
2215
2412
  * @see https://redis.io/commands/pfadd
2216
2413
  */
@@ -2270,7 +2467,7 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
2270
2467
  /**
2271
2468
  * @see https://redis.io/commands/scan
2272
2469
  */
2273
- scan: (cursor: string | number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [string, string[]]>]>;
2470
+ scan: (cursor: string | number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, any>]>;
2274
2471
  /**
2275
2472
  * @see https://redis.io/commands/scard
2276
2473
  */
@@ -2567,7 +2764,7 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
2567
2764
  /**
2568
2765
  * @see https://redis.io/commands/zremrangebyscore
2569
2766
  */
2570
- zremrangebyscore: (key: string, min: number, max: number) => Pipeline<[...TCommands, Command<any, number>]>;
2767
+ zremrangebyscore: (key: string, min: number | `(${number}` | "-inf" | "+inf", max: number | `(${number}` | "-inf" | "+inf") => Pipeline<[...TCommands, Command<any, number>]>;
2571
2768
  /**
2572
2769
  * @see https://redis.io/commands/zrevrank
2573
2770
  */
@@ -2632,6 +2829,10 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
2632
2829
  * @see https://redis.io/commands/json.get
2633
2830
  */
2634
2831
  get: (...args: CommandArgs<typeof JsonGetCommand>) => Pipeline<[...TCommands, Command<any, any>]>;
2832
+ /**
2833
+ * @see https://redis.io/commands/json.merge
2834
+ */
2835
+ merge: (key: string, path: string, value: string | number | unknown[] | Record<string, unknown>) => Pipeline<[...TCommands, Command<any, "OK" | null>]>;
2635
2836
  /**
2636
2837
  * @see https://redis.io/commands/json.mget
2637
2838
  */
@@ -2687,6 +2888,58 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
2687
2888
  */
2688
2889
  type: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, string[]>]>;
2689
2890
  };
2891
+ get functions(): {
2892
+ /**
2893
+ * @see https://redis.io/docs/latest/commands/function-load/
2894
+ */
2895
+ load: (args_0: {
2896
+ code: string;
2897
+ replace?: boolean;
2898
+ }) => Pipeline<[...TCommands, Command<any, string>]>;
2899
+ /**
2900
+ * @see https://redis.io/docs/latest/commands/function-list/
2901
+ */
2902
+ list: (args?: {
2903
+ libraryName?: string;
2904
+ withCode?: boolean;
2905
+ } | undefined) => Pipeline<[...TCommands, Command<any, {
2906
+ libraryName: string;
2907
+ engine: string;
2908
+ functions: {
2909
+ name: string;
2910
+ description?: string;
2911
+ flags: string[];
2912
+ }[];
2913
+ libraryCode?: string;
2914
+ }[]>]>;
2915
+ /**
2916
+ * @see https://redis.io/docs/latest/commands/function-delete/
2917
+ */
2918
+ delete: (libraryName: string) => Pipeline<[...TCommands, Command<any, "OK">]>;
2919
+ /**
2920
+ * @see https://redis.io/docs/latest/commands/function-flush/
2921
+ */
2922
+ flush: () => Pipeline<[...TCommands, Command<any, "OK">]>;
2923
+ /**
2924
+ * @see https://redis.io/docs/latest/commands/function-stats/
2925
+ */
2926
+ stats: () => Pipeline<[...TCommands, Command<any, {
2927
+ engines: {
2928
+ [k: string]: {
2929
+ librariesCount: unknown;
2930
+ functionsCount: unknown;
2931
+ };
2932
+ };
2933
+ }>]>;
2934
+ /**
2935
+ * @see https://redis.io/docs/latest/commands/fcall/
2936
+ */
2937
+ call: <TData = unknown>(fn: string, keys?: string[] | undefined, args?: string[] | undefined) => Pipeline<[...TCommands, Command<any, TData>]>;
2938
+ /**
2939
+ * @see https://redis.io/docs/latest/commands/fcall_ro/
2940
+ */
2941
+ callRo: <TData = unknown>(fn: string, keys?: string[] | undefined, args?: string[] | undefined) => Pipeline<[...TCommands, Command<any, TData>]>;
2942
+ };
2690
2943
  }
2691
2944
 
2692
2945
  /**
@@ -2707,9 +2960,20 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
2707
2960
  */
2708
2961
  declare class Script<TResult = unknown> {
2709
2962
  readonly script: string;
2710
- readonly sha1: string;
2963
+ /**
2964
+ * @deprecated This property is initialized to an empty string and will be set in the init method
2965
+ * asynchronously. Do not use this property immidiately after the constructor.
2966
+ *
2967
+ * This property is only exposed for backwards compatibility and will be removed in the
2968
+ * future major release.
2969
+ */
2970
+ sha1: string;
2711
2971
  private readonly redis;
2712
2972
  constructor(redis: Redis, script: string);
2973
+ /**
2974
+ * Initialize the script by computing its SHA-1 hash.
2975
+ */
2976
+ private init;
2713
2977
  /**
2714
2978
  * Send an `EVAL` command to redis.
2715
2979
  */
@@ -2731,6 +2995,56 @@ declare class Script<TResult = unknown> {
2731
2995
  private digest;
2732
2996
  }
2733
2997
 
2998
+ /**
2999
+ * Creates a new script.
3000
+ *
3001
+ * Scripts offer the ability to optimistically try to execute a script without having to send the
3002
+ * entire script to the server. If the script is loaded on the server, it tries again by sending
3003
+ * the entire script. Afterwards, the script is cached on the server.
3004
+ *
3005
+ * @example
3006
+ * ```ts
3007
+ * const redis = new Redis({...})
3008
+ *
3009
+ * const script = redis.createScript<string>("return ARGV[1];", { readOnly: true })
3010
+ * const arg1 = await script.evalRo([], ["Hello World"])
3011
+ * expect(arg1, "Hello World")
3012
+ * ```
3013
+ */
3014
+ declare class ScriptRO<TResult = unknown> {
3015
+ readonly script: string;
3016
+ /**
3017
+ * @deprecated This property is initialized to an empty string and will be set in the init method
3018
+ * asynchronously. Do not use this property immidiately after the constructor.
3019
+ *
3020
+ * This property is only exposed for backwards compatibility and will be removed in the
3021
+ * future major release.
3022
+ */
3023
+ sha1: string;
3024
+ private readonly redis;
3025
+ constructor(redis: Redis, script: string);
3026
+ private init;
3027
+ /**
3028
+ * Send an `EVAL_RO` command to redis.
3029
+ */
3030
+ evalRo(keys: string[], args: string[]): Promise<TResult>;
3031
+ /**
3032
+ * Calculates the sha1 hash of the script and then calls `EVALSHA_RO`.
3033
+ */
3034
+ evalshaRo(keys: string[], args: string[]): Promise<TResult>;
3035
+ /**
3036
+ * Optimistically try to run `EVALSHA_RO` first.
3037
+ * If the script is not loaded in redis, it will fall back and try again with `EVAL_RO`.
3038
+ *
3039
+ * Following calls will be able to use the cached script
3040
+ */
3041
+ exec(keys: string[], args: string[]): Promise<TResult>;
3042
+ /**
3043
+ * Compute the sha1 hash of the script and return its hex representation.
3044
+ */
3045
+ private digest;
3046
+ }
3047
+
2734
3048
  /**
2735
3049
  * Serverless redis client for upstash.
2736
3050
  */
@@ -2794,6 +3108,10 @@ declare class Redis {
2794
3108
  * @see https://redis.io/commands/json.get
2795
3109
  */
2796
3110
  get: <TData>(...args: CommandArgs<typeof JsonGetCommand>) => Promise<TData | null>;
3111
+ /**
3112
+ * @see https://redis.io/commands/json.merge
3113
+ */
3114
+ merge: (key: string, path: string, value: string | number | unknown[] | Record<string, unknown>) => Promise<"OK" | null>;
2797
3115
  /**
2798
3116
  * @see https://redis.io/commands/json.mget
2799
3117
  */
@@ -2849,6 +3167,60 @@ declare class Redis {
2849
3167
  */
2850
3168
  type: (key: string, path?: string | undefined) => Promise<string[]>;
2851
3169
  };
3170
+ get functions(): {
3171
+ /**
3172
+ * @see https://redis.io/docs/latest/commands/function-load/
3173
+ */
3174
+ load: (args_0: {
3175
+ code: string;
3176
+ replace?: boolean;
3177
+ }) => Promise<string>;
3178
+ /**
3179
+ * @see https://redis.io/docs/latest/commands/function-list/
3180
+ */
3181
+ list: (args?: {
3182
+ libraryName?: string;
3183
+ withCode?: boolean;
3184
+ } | undefined) => Promise<{
3185
+ libraryName: string;
3186
+ engine: string;
3187
+ functions: {
3188
+ name: string;
3189
+ description?: string;
3190
+ flags: string[];
3191
+ }[];
3192
+ libraryCode?: string;
3193
+ }[]>;
3194
+ /**
3195
+ * @see https://redis.io/docs/latest/commands/function-delete/
3196
+ */
3197
+ delete: (libraryName: string) => Promise<"OK">;
3198
+ /**
3199
+ * @see https://redis.io/docs/latest/commands/function-flush/
3200
+ */
3201
+ flush: () => Promise<"OK">;
3202
+ /**
3203
+ * @see https://redis.io/docs/latest/commands/function-stats/
3204
+ *
3205
+ * Note: `running_script` field is not supported and therefore not included in the type.
3206
+ */
3207
+ stats: () => Promise<{
3208
+ engines: {
3209
+ [k: string]: {
3210
+ librariesCount: unknown;
3211
+ functionsCount: unknown;
3212
+ };
3213
+ };
3214
+ }>;
3215
+ /**
3216
+ * @see https://redis.io/docs/latest/commands/fcall/
3217
+ */
3218
+ call: <TData = unknown>(fn: string, keys?: string[] | undefined, args?: string[] | undefined) => Promise<TData>;
3219
+ /**
3220
+ * @see https://redis.io/docs/latest/commands/fcall_ro/
3221
+ */
3222
+ callRo: <TData = unknown>(fn: string, keys?: string[] | undefined, args?: string[] | undefined) => Promise<TData>;
3223
+ };
2852
3224
  /**
2853
3225
  * Wrap a new middleware around the HTTP client.
2854
3226
  */
@@ -2857,7 +3229,37 @@ declare class Redis {
2857
3229
  * Technically this is not private, we can hide it from intellisense by doing this
2858
3230
  */
2859
3231
  protected addTelemetry: (telemetry: Telemetry) => void;
2860
- createScript(script: string): Script;
3232
+ /**
3233
+ * Creates a new script.
3234
+ *
3235
+ * Scripts offer the ability to optimistically try to execute a script without having to send the
3236
+ * entire script to the server. If the script is loaded on the server, it tries again by sending
3237
+ * the entire script. Afterwards, the script is cached on the server.
3238
+ *
3239
+ * @param script - The script to create
3240
+ * @param opts - Optional options to pass to the script `{ readonly?: boolean }`
3241
+ * @returns A new script
3242
+ *
3243
+ * @example
3244
+ * ```ts
3245
+ * const redis = new Redis({...})
3246
+ *
3247
+ * const script = redis.createScript<string>("return ARGV[1];")
3248
+ * const arg1 = await script.eval([], ["Hello World"])
3249
+ * expect(arg1, "Hello World")
3250
+ * ```
3251
+ * @example
3252
+ * ```ts
3253
+ * const redis = new Redis({...})
3254
+ *
3255
+ * const script = redis.createScript<string>("return ARGV[1];", { readonly: true })
3256
+ * const arg1 = await script.evalRo([], ["Hello World"])
3257
+ * expect(arg1, "Hello World")
3258
+ * ```
3259
+ */
3260
+ createScript<TResult = unknown, TReadonly extends boolean = false>(script: string, opts?: {
3261
+ readonly?: TReadonly;
3262
+ }): TReadonly extends true ? ScriptRO<TResult> : Script<TResult>;
2861
3263
  /**
2862
3264
  * Create a new pipeline that allows you to send requests in bulk.
2863
3265
  *
@@ -2936,10 +3338,18 @@ declare class Redis {
2936
3338
  * @see https://redis.io/commands/echo
2937
3339
  */
2938
3340
  echo: (message: string) => Promise<string>;
3341
+ /**
3342
+ * @see https://redis.io/commands/eval_ro
3343
+ */
3344
+ evalRo: <TArgs extends unknown[], TData = unknown>(script: string, keys: string[], args: TArgs) => Promise<TData>;
2939
3345
  /**
2940
3346
  * @see https://redis.io/commands/eval
2941
3347
  */
2942
3348
  eval: <TArgs extends unknown[], TData = unknown>(script: string, keys: string[], args: TArgs) => Promise<TData>;
3349
+ /**
3350
+ * @see https://redis.io/commands/evalsha_ro
3351
+ */
3352
+ evalshaRo: <TArgs extends unknown[], TData = unknown>(sha1: string, keys: string[], args: TArgs) => Promise<TData>;
2943
3353
  /**
2944
3354
  * @see https://redis.io/commands/evalsha
2945
3355
  */
@@ -2955,11 +3365,11 @@ declare class Redis {
2955
3365
  /**
2956
3366
  * @see https://redis.io/commands/expire
2957
3367
  */
2958
- expire: (key: string, seconds: number, option?: ("NX" | "nx" | "XX" | "xx" | "GT" | "gt" | "LT" | "lt") | undefined) => Promise<0 | 1>;
3368
+ expire: (key: string, seconds: number, option?: ExpireOption | undefined) => Promise<0 | 1>;
2959
3369
  /**
2960
3370
  * @see https://redis.io/commands/expireat
2961
3371
  */
2962
- expireat: (key: string, unix: number) => Promise<0 | 1>;
3372
+ expireat: (key: string, unix: number, option?: ExpireOption | undefined) => Promise<0 | 1>;
2963
3373
  /**
2964
3374
  * @see https://redis.io/commands/flushall
2965
3375
  */
@@ -3128,6 +3538,42 @@ declare class Redis {
3128
3538
  * @see https://redis.io/commands/hexists
3129
3539
  */
3130
3540
  hexists: (key: string, field: string) => Promise<number>;
3541
+ /**
3542
+ * @see https://redis.io/commands/hexpire
3543
+ */
3544
+ hexpire: (key: string, fields: string | number | (string | number)[], seconds: number, option?: ExpireOption | undefined) => Promise<(0 | 1 | 2 | -2)[]>;
3545
+ /**
3546
+ * @see https://redis.io/commands/hexpireat
3547
+ */
3548
+ hexpireat: (key: string, fields: string | number | (string | number)[], timestamp: number, option?: ExpireOption | undefined) => Promise<(0 | 1 | 2 | -2)[]>;
3549
+ /**
3550
+ * @see https://redis.io/commands/hexpiretime
3551
+ */
3552
+ hexpiretime: (key: string, fields: string | number | (string | number)[]) => Promise<number[]>;
3553
+ /**
3554
+ * @see https://redis.io/commands/httl
3555
+ */
3556
+ httl: (key: string, fields: string | number | (string | number)[]) => Promise<number[]>;
3557
+ /**
3558
+ * @see https://redis.io/commands/hpexpire
3559
+ */
3560
+ hpexpire: (key: string, fields: string | number | (string | number)[], milliseconds: number, option?: ExpireOption | undefined) => Promise<(0 | 1 | 2 | -2)[]>;
3561
+ /**
3562
+ * @see https://redis.io/commands/hpexpireat
3563
+ */
3564
+ hpexpireat: (key: string, fields: string | number | (string | number)[], timestamp: number, option?: ExpireOption | undefined) => Promise<(0 | 1 | 2 | -2)[]>;
3565
+ /**
3566
+ * @see https://redis.io/commands/hpexpiretime
3567
+ */
3568
+ hpexpiretime: (key: string, fields: string | number | (string | number)[]) => Promise<number[]>;
3569
+ /**
3570
+ * @see https://redis.io/commands/hpttl
3571
+ */
3572
+ hpttl: (key: string, fields: string | number | (string | number)[]) => Promise<number[]>;
3573
+ /**
3574
+ * @see https://redis.io/commands/hpersist
3575
+ */
3576
+ hpersist: (key: string, fields: string | number | (string | number)[]) => Promise<(1 | -2 | -1)[]>;
3131
3577
  /**
3132
3578
  * @see https://redis.io/commands/hget
3133
3579
  */
@@ -3279,11 +3725,11 @@ declare class Redis {
3279
3725
  /**
3280
3726
  * @see https://redis.io/commands/pexpire
3281
3727
  */
3282
- pexpire: (key: string, milliseconds: number) => Promise<0 | 1>;
3728
+ pexpire: (key: string, milliseconds: number, option?: ExpireOption | undefined) => Promise<0 | 1>;
3283
3729
  /**
3284
3730
  * @see https://redis.io/commands/pexpireat
3285
3731
  */
3286
- pexpireat: (key: string, unix: number) => Promise<0 | 1>;
3732
+ pexpireat: (key: string, unix: number, option?: ExpireOption | undefined) => Promise<0 | 1>;
3287
3733
  /**
3288
3734
  * @see https://redis.io/commands/pfadd
3289
3735
  */
@@ -3304,7 +3750,10 @@ declare class Redis {
3304
3750
  * @see https://redis.io/commands/psetex
3305
3751
  */
3306
3752
  psetex: <TData>(key: string, ttl: number, value: TData) => Promise<string>;
3307
- psubscribe: (patterns: string | string[]) => Subscriber;
3753
+ /**
3754
+ * @see https://redis.io/commands/psubscribe
3755
+ */
3756
+ psubscribe: <TMessage>(patterns: string | string[]) => Subscriber<TMessage>;
3308
3757
  /**
3309
3758
  * @see https://redis.io/commands/pttl
3310
3759
  */
@@ -3344,7 +3793,10 @@ declare class Redis {
3344
3793
  /**
3345
3794
  * @see https://redis.io/commands/scan
3346
3795
  */
3347
- scan: (cursor: string | number, opts?: ScanCommandOptions | undefined) => Promise<[string, string[]]>;
3796
+ scan(cursor: string | number): Promise<ScanResultStandard>;
3797
+ scan<TOptions extends ScanCommandOptions>(cursor: string | number, opts: TOptions): Promise<TOptions extends {
3798
+ withType: true;
3799
+ } ? ScanResultWithType : ScanResultStandard>;
3348
3800
  /**
3349
3801
  * @see https://redis.io/commands/scard
3350
3802
  */
@@ -3436,7 +3888,7 @@ declare class Redis {
3436
3888
  /**
3437
3889
  * @see https://redis.io/commands/subscribe
3438
3890
  */
3439
- subscribe: (channels: string | string[]) => Subscriber;
3891
+ subscribe: <TMessage>(channels: string | string[]) => Subscriber<TMessage>;
3440
3892
  /**
3441
3893
  * @see https://redis.io/commands/sunion
3442
3894
  */
@@ -3652,7 +4104,7 @@ declare class Redis {
3652
4104
  /**
3653
4105
  * @see https://redis.io/commands/zremrangebyscore
3654
4106
  */
3655
- zremrangebyscore: (key: string, min: number, max: number) => Promise<number>;
4107
+ zremrangebyscore: (key: string, min: number | `(${number}` | "-inf" | "+inf", max: number | `(${number}` | "-inf" | "+inf") => Promise<number>;
3656
4108
  /**
3657
4109
  * @see https://redis.io/commands/zrevrank
3658
4110
  */
@@ -3675,22 +4127,28 @@ declare class Redis {
3675
4127
  zunionstore: (destination: string, numKeys: number, keys: string[], opts?: ZUnionStoreCommandOptions | undefined) => Promise<number>;
3676
4128
  }
3677
4129
 
4130
+ type UpstashErrorOptions = Pick<NonNullable<ConstructorParameters<typeof Error>[1]>, "cause">;
3678
4131
  /**
3679
4132
  * Result of a bad request to upstash
3680
4133
  */
3681
4134
  declare class UpstashError extends Error {
3682
- constructor(message: string);
4135
+ constructor(message: string, options?: ErrorOptions);
3683
4136
  }
3684
4137
  declare class UrlError extends Error {
3685
4138
  constructor(url: string);
3686
4139
  }
4140
+ declare class UpstashJSONParseError extends UpstashError {
4141
+ constructor(body: string, options?: UpstashErrorOptions);
4142
+ }
3687
4143
 
3688
4144
  type error_UpstashError = UpstashError;
3689
4145
  declare const error_UpstashError: typeof UpstashError;
4146
+ type error_UpstashJSONParseError = UpstashJSONParseError;
4147
+ declare const error_UpstashJSONParseError: typeof UpstashJSONParseError;
3690
4148
  type error_UrlError = UrlError;
3691
4149
  declare const error_UrlError: typeof UrlError;
3692
4150
  declare namespace error {
3693
- export { error_UpstashError as UpstashError, error_UrlError as UrlError };
4151
+ export { error_UpstashError as UpstashError, error_UpstashJSONParseError as UpstashJSONParseError, error_UrlError as UrlError };
3694
4152
  }
3695
4153
 
3696
4154
  /**
@@ -3707,4 +4165,4 @@ declare class ZMScoreCommand<TData> extends Command<string[] | null, number[] |
3707
4165
  constructor(cmd: [key: string, members: TData[]], opts?: CommandOptions<string[] | null, number[] | null>);
3708
4166
  }
3709
4167
 
3710
- export { HStrLenCommand as $, AppendCommand as A, BitCountCommand as B, CopyCommand as C, DBSizeCommand as D, EchoCommand as E, FlushAllCommand as F, GeoAddCommand as G, GetExCommand as H, GetRangeCommand as I, GetSetCommand as J, HDelCommand as K, HExistsCommand as L, HGetCommand as M, HGetAllCommand as N, HIncrByCommand as O, Pipeline as P, HIncrByFloatCommand as Q, type RedisOptions as R, HKeysCommand as S, HLenCommand as T, type UpstashRequest as U, HMGetCommand as V, HMSetCommand as W, HRandFieldCommand as X, HScanCommand as Y, HSetCommand as Z, HSetNXCommand as _, type RequesterConfig as a, type SetCommandOptions as a$, HValsCommand as a0, IncrCommand as a1, IncrByCommand as a2, IncrByFloatCommand as a3, JsonArrAppendCommand as a4, JsonArrIndexCommand as a5, JsonArrInsertCommand as a6, JsonArrLenCommand as a7, JsonArrPopCommand as a8, JsonArrTrimCommand as a9, LTrimCommand as aA, MGetCommand as aB, MSetCommand as aC, MSetNXCommand as aD, PersistCommand as aE, PExpireCommand as aF, PExpireAtCommand as aG, PingCommand as aH, PSetEXCommand as aI, PTtlCommand as aJ, PublishCommand as aK, RandomKeyCommand as aL, RenameCommand as aM, RenameNXCommand as aN, RPopCommand as aO, RPushCommand as aP, RPushXCommand as aQ, SAddCommand as aR, ScanCommand as aS, type ScanCommandOptions as aT, SCardCommand as aU, ScriptExistsCommand as aV, ScriptFlushCommand as aW, ScriptLoadCommand as aX, SDiffCommand as aY, SDiffStoreCommand as aZ, SetCommand as a_, JsonClearCommand as aa, JsonDelCommand as ab, JsonForgetCommand as ac, JsonGetCommand as ad, JsonMGetCommand as ae, JsonNumIncrByCommand as af, JsonNumMultByCommand as ag, JsonObjKeysCommand as ah, JsonObjLenCommand as ai, JsonRespCommand as aj, JsonSetCommand as ak, JsonStrAppendCommand as al, JsonStrLenCommand as am, JsonToggleCommand as an, JsonTypeCommand as ao, KeysCommand as ap, LIndexCommand as aq, LInsertCommand as ar, LLenCommand as as, LMoveCommand as at, LPopCommand as au, LPushCommand as av, LPushXCommand as aw, LRangeCommand as ax, LRemCommand as ay, LSetCommand as az, Redis as b, SetBitCommand as b0, SetExCommand as b1, SetNxCommand as b2, SetRangeCommand as b3, SInterCommand as b4, SInterStoreCommand as b5, SIsMemberCommand as b6, SMembersCommand as b7, SMIsMemberCommand as b8, SMoveCommand as b9, ZPopMaxCommand as bA, ZPopMinCommand as bB, ZRangeCommand as bC, type ZRangeCommandOptions as bD, ZRankCommand as bE, ZRemCommand as bF, ZRemRangeByLexCommand as bG, ZRemRangeByRankCommand as bH, ZRemRangeByScoreCommand as bI, ZRevRankCommand as bJ, ZScanCommand as bK, ZScoreCommand as bL, ZUnionCommand as bM, type ZUnionCommandOptions as bN, ZUnionStoreCommand as bO, type ZUnionStoreCommandOptions as bP, SPopCommand as ba, SRandMemberCommand as bb, SRemCommand as bc, SScanCommand as bd, StrLenCommand as be, SUnionCommand as bf, SUnionStoreCommand as bg, TimeCommand as bh, TouchCommand as bi, TtlCommand as bj, type Type as bk, TypeCommand as bl, UnlinkCommand as bm, XAddCommand as bn, XRangeCommand as bo, type ScoreMember as bp, type ZAddCommandOptions as bq, ZAddCommand as br, ZCardCommand as bs, ZCountCommand as bt, ZDiffStoreCommand as bu, ZIncrByCommand as bv, ZInterStoreCommand as bw, type ZInterStoreCommandOptions as bx, ZLexCountCommand as by, ZMScoreCommand 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 };
4168
+ export { HPersistCommand as $, AppendCommand as A, BitCountCommand as B, CopyCommand as C, DBSizeCommand as D, EchoCommand as E, FlushAllCommand as F, GeoAddCommand as G, type HttpClientConfig as H, GetCommand as I, GetBitCommand as J, GetDelCommand as K, GetExCommand as L, GetRangeCommand as M, GetSetCommand as N, HDelCommand as O, Pipeline as P, HExistsCommand as Q, type RedisOptions as R, HExpireCommand as S, HExpireAtCommand as T, type UpstashRequest as U, HExpireTimeCommand as V, HTtlCommand as W, HPExpireCommand as X, HPExpireAtCommand as Y, HPExpireTimeCommand as Z, HPTtlCommand as _, type RequesterConfig as a, RenameNXCommand as a$, HGetCommand as a0, HGetAllCommand as a1, HIncrByCommand as a2, HIncrByFloatCommand as a3, HKeysCommand as a4, HLenCommand as a5, HMGetCommand as a6, HMSetCommand as a7, HRandFieldCommand as a8, HScanCommand as a9, JsonStrLenCommand as aA, JsonToggleCommand as aB, JsonTypeCommand as aC, KeysCommand as aD, LIndexCommand as aE, LInsertCommand as aF, LLenCommand as aG, LMoveCommand as aH, LPopCommand as aI, LPushCommand as aJ, LPushXCommand as aK, LRangeCommand as aL, LRemCommand as aM, LSetCommand as aN, LTrimCommand as aO, MGetCommand as aP, MSetCommand as aQ, MSetNXCommand as aR, PersistCommand as aS, PExpireCommand as aT, PExpireAtCommand as aU, PingCommand as aV, PSetEXCommand as aW, PTtlCommand as aX, PublishCommand as aY, RandomKeyCommand as aZ, RenameCommand as a_, HSetCommand as aa, HSetNXCommand as ab, HStrLenCommand as ac, HValsCommand as ad, IncrCommand as ae, IncrByCommand as af, IncrByFloatCommand as ag, JsonArrAppendCommand as ah, JsonArrIndexCommand as ai, JsonArrInsertCommand as aj, JsonArrLenCommand as ak, JsonArrPopCommand as al, JsonArrTrimCommand as am, JsonClearCommand as an, JsonDelCommand as ao, JsonForgetCommand as ap, JsonGetCommand as aq, JsonMergeCommand as ar, JsonMGetCommand as as, JsonNumIncrByCommand as at, JsonNumMultByCommand as au, JsonObjKeysCommand as av, JsonObjLenCommand as aw, JsonRespCommand as ax, JsonSetCommand as ay, JsonStrAppendCommand as az, Redis as b, type ZUnionCommandOptions as b$, RPopCommand as b0, RPushCommand as b1, RPushXCommand as b2, SAddCommand as b3, ScanCommand as b4, type ScanCommandOptions as b5, SCardCommand as b6, ScriptExistsCommand as b7, ScriptFlushCommand as b8, ScriptLoadCommand as b9, UnlinkCommand as bA, XAddCommand as bB, XRangeCommand as bC, type ScoreMember as bD, type ZAddCommandOptions as bE, ZAddCommand as bF, ZCardCommand as bG, ZCountCommand as bH, ZDiffStoreCommand as bI, ZIncrByCommand as bJ, ZInterStoreCommand as bK, type ZInterStoreCommandOptions as bL, ZLexCountCommand as bM, ZMScoreCommand as bN, ZPopMaxCommand as bO, ZPopMinCommand as bP, ZRangeCommand as bQ, type ZRangeCommandOptions as bR, ZRankCommand as bS, ZRemCommand as bT, ZRemRangeByLexCommand as bU, ZRemRangeByRankCommand as bV, ZRemRangeByScoreCommand as bW, ZRevRankCommand as bX, ZScanCommand as bY, ZScoreCommand as bZ, ZUnionCommand as b_, SDiffCommand as ba, SDiffStoreCommand as bb, SetCommand as bc, type SetCommandOptions as bd, SetBitCommand as be, SetExCommand as bf, SetNxCommand as bg, SetRangeCommand as bh, SInterCommand as bi, SInterStoreCommand as bj, SIsMemberCommand as bk, SMembersCommand as bl, SMIsMemberCommand as bm, SMoveCommand as bn, SPopCommand as bo, SRandMemberCommand as bp, SRemCommand as bq, SScanCommand as br, StrLenCommand as bs, SUnionCommand as bt, SUnionStoreCommand as bu, TimeCommand as bv, TouchCommand as bw, TtlCommand as bx, type Type as by, TypeCommand as bz, type Requester as c, ZUnionStoreCommand as c0, type ZUnionStoreCommandOptions as c1, type UpstashResponse as d, error as e, BitOpCommand as f, BitPosCommand as g, DecrCommand as h, DecrByCommand as i, DelCommand as j, EvalROCommand as k, EvalCommand as l, EvalshaROCommand as m, EvalshaCommand as n, ExistsCommand as o, ExpireCommand as p, type ExpireOption as q, ExpireAtCommand as r, FlushDBCommand as s, type GeoAddCommandOptions as t, type GeoMember as u, GeoDistCommand as v, GeoHashCommand as w, GeoPosCommand as x, GeoSearchCommand as y, GeoSearchStoreCommand as z };