@upstash/redis 0.0.0-ci.d7e9b41c567cee58f3e79a2198679be3662be6f8-20231109092942 → 0.0.0-ci.d8fb1ea41777a410b4cc4d3c1600060c679011e5-20240222001521

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.
@@ -344,11 +344,9 @@ declare class ExistsCommand extends Command<number, number> {
344
344
  constructor(cmd: [...keys: string[]], opts?: CommandOptions<number, number>);
345
345
  }
346
346
 
347
- /**
348
- * @see https://redis.io/commands/expire
349
- */
347
+ type ExpireOptions = "NX" | "nx" | "XX" | "xx" | "GT" | "gt" | "LT" | "lt";
350
348
  declare class ExpireCommand extends Command<"0" | "1", 0 | 1> {
351
- constructor(cmd: [key: string, seconds: number], opts?: CommandOptions<"0" | "1", 0 | 1>);
349
+ constructor(cmd: [key: string, seconds: number, option?: ExpireOptions], opts?: CommandOptions<"0" | "1", 0 | 1>);
352
350
  }
353
351
 
354
352
  /**
@@ -388,6 +386,13 @@ declare class GeoDistCommand<TMemberType = string> extends Command<number | null
388
386
  ], opts?: CommandOptions<number | null, number | null>);
389
387
  }
390
388
 
389
+ /**
390
+ * @see https://redis.io/commands/geohash
391
+ */
392
+ declare class GeoHashCommand<TMember = string> extends Command<(string | null)[], (string | null)[]> {
393
+ constructor(cmd: [string, ...(TMember[] | TMember[])], opts?: CommandOptions<(string | null)[], (string | null)[]>);
394
+ }
395
+
391
396
  type Coordinates = {
392
397
  lng: number;
393
398
  lat: number;
@@ -399,13 +404,6 @@ declare class GeoPosCommand<TMember = string> extends Command<(string | null)[][
399
404
  constructor(cmd: [string, ...(TMember[] | TMember[])], opts?: CommandOptions<(string | null)[][], Coordinates[]>);
400
405
  }
401
406
 
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
407
  type RadiusOptions$1 = "M" | "KM" | "FT" | "MI";
410
408
  type CenterPoint$1<TMemberType> = {
411
409
  type: "FROMMEMBER" | "frommember";
@@ -778,7 +776,7 @@ declare class JsonGetCommand<TData extends (unknown | Record<string, unknown>) |
778
776
  /**
779
777
  * @see https://redis.io/commands/json.mget
780
778
  */
781
- declare class JsonMGetCommand<TData extends (unknown | Record<string, unknown>)[]> extends Command<TData, TData> {
779
+ declare class JsonMGetCommand<TData = unknown[]> extends Command<TData, TData> {
782
780
  constructor(cmd: [keys: string[], path: string], opts?: CommandOptions<TData, TData>);
783
781
  }
784
782
 
@@ -1334,7 +1332,55 @@ declare class XRangeCommand<TData extends Record<string, Record<string, unknown>
1334
1332
  constructor([key, start, end, count]: [key: string, start: string, end: string, count?: number], opts?: CommandOptions<unknown[], TData[]>);
1335
1333
  }
1336
1334
 
1337
- type ZAddCommandOptions = ({
1335
+ type XReadCommandOptions = [
1336
+ key: string | string[],
1337
+ id: string | string[],
1338
+ options?: {
1339
+ count?: number;
1340
+ blockMS?: number;
1341
+ }
1342
+ ];
1343
+ type XReadOptions = XReadCommandOptions extends [infer K, infer I, ...any[]] ? K extends string ? I extends string ? [key: string, id: string, options?: {
1344
+ count?: number;
1345
+ blockMS?: number;
1346
+ }] : never : K extends string[] ? I extends string[] ? [key: string[], id: string[], options?: {
1347
+ count?: number;
1348
+ blockMS?: number;
1349
+ }] : never : never : never;
1350
+ /**
1351
+ * @see https://redis.io/commands/xread
1352
+ */
1353
+ declare class XReadCommand extends Command<number, unknown[]> {
1354
+ constructor([key, id, options]: XReadOptions, opts?: CommandOptions<number, unknown[]>);
1355
+ }
1356
+
1357
+ type Options = {
1358
+ count?: number;
1359
+ blockMS?: number;
1360
+ NOACK?: boolean;
1361
+ };
1362
+ type XReadGroupCommandOptions = [
1363
+ group: string,
1364
+ consumer: string,
1365
+ key: string | string[],
1366
+ id: string | string[],
1367
+ options?: Options
1368
+ ];
1369
+ type XReadGroupOptions = XReadGroupCommandOptions extends [
1370
+ string,
1371
+ string,
1372
+ infer TKey,
1373
+ infer TId,
1374
+ ...any[]
1375
+ ] ? 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;
1376
+ /**
1377
+ * @see https://redis.io/commands/xreadgroup
1378
+ */
1379
+ declare class XReadGroupCommand extends Command<number, unknown[]> {
1380
+ constructor([group, consumer, key, id, options]: XReadGroupOptions, opts?: CommandOptions<number, unknown[]>);
1381
+ }
1382
+
1383
+ type NXAndXXOptions = {
1338
1384
  nx: true;
1339
1385
  xx?: never;
1340
1386
  } | {
@@ -1343,12 +1389,23 @@ type ZAddCommandOptions = ({
1343
1389
  } | {
1344
1390
  nx?: never;
1345
1391
  xx?: never;
1346
- }) & {
1347
- ch?: true;
1348
1392
  };
1349
- type ZAddCommandOptionsWithIncr = ZAddCommandOptions & {
1350
- incr: true;
1393
+ type LTAndGTOptions = {
1394
+ lt: true;
1395
+ gt?: never;
1396
+ } | {
1397
+ lt?: never;
1398
+ gt: true;
1399
+ } | {
1400
+ lt?: never;
1401
+ gt?: never;
1402
+ };
1403
+ type ZAddCommandOptions = NXAndXXOptions & LTAndGTOptions & {
1404
+ ch?: true;
1405
+ } & {
1406
+ incr?: true;
1351
1407
  };
1408
+ type Arg2<TData> = ScoreMember<TData> | ZAddCommandOptions;
1352
1409
  type ScoreMember<TData> = {
1353
1410
  score: number;
1354
1411
  member: TData;
@@ -1357,12 +1414,7 @@ type ScoreMember<TData> = {
1357
1414
  * @see https://redis.io/commands/zadd
1358
1415
  */
1359
1416
  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>);
1417
+ constructor([key, arg1, ...arg2]: [string, Arg2<TData>, ...ScoreMember<TData>[]], opts?: CommandOptions<number | null, number | null>);
1366
1418
  }
1367
1419
 
1368
1420
  /**
@@ -1648,7 +1700,7 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
1648
1700
  /**
1649
1701
  * @see https://redis.io/commands/expire
1650
1702
  */
1651
- expire: (key: string, seconds: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
1703
+ expire: (key: string, seconds: number, option?: ("NX" | "nx" | "XX" | "xx" | "GT" | "gt" | "LT" | "lt") | undefined) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
1652
1704
  /**
1653
1705
  * @see https://redis.io/commands/expireat
1654
1706
  */
@@ -1663,6 +1715,96 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
1663
1715
  flushdb: (opts?: {
1664
1716
  async?: boolean | undefined;
1665
1717
  } | undefined) => Pipeline<[...TCommands, Command<any, "OK">]>;
1718
+ /**
1719
+ * @see https://redis.io/commands/geoadd
1720
+ */
1721
+ geoadd: <TData>(args_0: string, args_1: GeoAddCommandOptions | GeoMember<TData>, ...args_2: GeoMember<TData>[]) => Pipeline<[...TCommands, Command<any, number | null>]>;
1722
+ /**
1723
+ * @see https://redis.io/commands/geodist
1724
+ */
1725
+ geodist: <TData>(key: string, member1: TData, member2: TData, unit?: "M" | "KM" | "FT" | "MI" | undefined) => Pipeline<[...TCommands, Command<any, number | null>]>;
1726
+ /**
1727
+ * @see https://redis.io/commands/geopos
1728
+ */
1729
+ geopos: <TData>(args_0: string, ...args_1: TData[]) => Pipeline<[...TCommands, Command<any, {
1730
+ lng: number;
1731
+ lat: number;
1732
+ }[]>]>;
1733
+ /**
1734
+ * @see https://redis.io/commands/geohash
1735
+ */
1736
+ geohash: <TData>(args_0: string, ...args_1: TData[]) => Pipeline<[...TCommands, Command<any, (string | null)[]>]>;
1737
+ /**
1738
+ * @see https://redis.io/commands/geosearch
1739
+ */
1740
+ geosearch: <TData>(key: string, centerPoint: {
1741
+ type: "FROMLONLAT" | "fromlonlat";
1742
+ coordinate: {
1743
+ lon: number;
1744
+ lat: number;
1745
+ };
1746
+ } | {
1747
+ type: "FROMMEMBER" | "frommember";
1748
+ member: TData;
1749
+ }, shape: {
1750
+ type: "BYRADIUS" | "byradius";
1751
+ radius: number;
1752
+ radiusType: "M" | "KM" | "FT" | "MI";
1753
+ } | {
1754
+ type: "BYBOX" | "bybox";
1755
+ rect: {
1756
+ width: number;
1757
+ height: number;
1758
+ };
1759
+ rectType: "M" | "KM" | "FT" | "MI";
1760
+ }, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
1761
+ count?: {
1762
+ limit: number;
1763
+ any?: boolean | undefined;
1764
+ } | undefined;
1765
+ withCoord?: boolean | undefined;
1766
+ withDist?: boolean | undefined;
1767
+ withHash?: boolean | undefined;
1768
+ } | undefined) => Pipeline<[...TCommands, Command<any, ({
1769
+ member: TData;
1770
+ } & {
1771
+ coord?: {
1772
+ long: number;
1773
+ lat: number;
1774
+ } | undefined;
1775
+ dist?: number | undefined;
1776
+ hash?: string | undefined;
1777
+ })[]>]>;
1778
+ /**
1779
+ * @see https://redis.io/commands/geosearchstore
1780
+ */
1781
+ geosearchstore: <TData>(destination: string, key: string, centerPoint: {
1782
+ type: "FROMLONLAT" | "fromlonlat";
1783
+ coordinate: {
1784
+ lon: number;
1785
+ lat: number;
1786
+ };
1787
+ } | {
1788
+ type: "FROMMEMBER" | "frommember";
1789
+ member: TData;
1790
+ }, shape: {
1791
+ type: "BYRADIUS" | "byradius";
1792
+ radius: number;
1793
+ radiusType: "M" | "KM" | "FT" | "MI";
1794
+ } | {
1795
+ type: "BYBOX" | "bybox";
1796
+ rect: {
1797
+ width: number;
1798
+ height: number;
1799
+ };
1800
+ rectType: "M" | "KM" | "FT" | "MI";
1801
+ }, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
1802
+ count?: {
1803
+ limit: number;
1804
+ any?: boolean | undefined;
1805
+ } | undefined;
1806
+ storeDist?: boolean | undefined;
1807
+ } | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
1666
1808
  /**
1667
1809
  * @see https://redis.io/commands/get
1668
1810
  */
@@ -1847,6 +1989,18 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
1847
1989
  * @see https://redis.io/commands/pexpireat
1848
1990
  */
1849
1991
  pexpireat: (key: string, unix: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
1992
+ /**
1993
+ * @see https://redis.io/commands/pfadd
1994
+ */
1995
+ pfadd: (args_0: string, ...args_1: unknown[]) => Pipeline<[...TCommands, Command<any, number>]>;
1996
+ /**
1997
+ * @see https://redis.io/commands/pfcount
1998
+ */
1999
+ pfcount: (args_0: string, ...args_1: string[]) => Pipeline<[...TCommands, Command<any, number>]>;
2000
+ /**
2001
+ * @see https://redis.io/commands/pfmerge
2002
+ */
2003
+ pfmerge: (destination_key: string, ...args_1: string[]) => Pipeline<[...TCommands, Command<any, "OK">]>;
1850
2004
  /**
1851
2005
  * @see https://redis.io/commands/ping
1852
2006
  */
@@ -2011,7 +2165,129 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
2011
2165
  /**
2012
2166
  * @see https://redis.io/commands/zadd
2013
2167
  */
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>]>;
2168
+ zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [key: string, opts: ZAddCommandOptions, ScoreMember<TData>, ...ScoreMember<TData>[]]) => Pipeline<[...TCommands, Command<any, number | null>]>;
2169
+ /**
2170
+ * @see https://redis.io/commands/xadd
2171
+ */
2172
+ xadd: (key: string, id: string, entries: {
2173
+ [field: string]: unknown;
2174
+ }, opts?: {
2175
+ nomkStream?: boolean | undefined;
2176
+ trim?: (({
2177
+ type: "MAXLEN" | "maxlen";
2178
+ threshold: number;
2179
+ } | {
2180
+ type: "MINID" | "minid";
2181
+ threshold: string;
2182
+ }) & ({
2183
+ comparison: "~";
2184
+ limit?: number | undefined;
2185
+ } | {
2186
+ comparison: "=";
2187
+ limit?: undefined;
2188
+ })) | undefined;
2189
+ } | undefined) => Pipeline<[...TCommands, Command<any, string>]>;
2190
+ /**
2191
+ * @see https://redis.io/commands/xack
2192
+ */
2193
+ xack: (key: string, group: string, id: string | string[]) => Pipeline<[...TCommands, Command<any, number>]>;
2194
+ /**
2195
+ * @see https://redis.io/commands/xdel
2196
+ */
2197
+ xdel: (key: string, ids: string | string[]) => Pipeline<[...TCommands, Command<any, number>]>;
2198
+ /**
2199
+ * @see https://redis.io/commands/xgroup
2200
+ */
2201
+ xgroup: (key: string, opts: {
2202
+ type: "CREATE";
2203
+ group: string;
2204
+ id: string;
2205
+ options?: {
2206
+ MKSTREAM?: boolean | undefined;
2207
+ ENTRIESREAD?: number | undefined;
2208
+ } | undefined;
2209
+ } | {
2210
+ type: "CREATECONSUMER";
2211
+ group: string;
2212
+ consumer: string;
2213
+ } | {
2214
+ type: "DELCONSUMER";
2215
+ group: string;
2216
+ consumer: string;
2217
+ } | {
2218
+ type: "DESTROY";
2219
+ group: string;
2220
+ } | {
2221
+ type: "SETID";
2222
+ group: string;
2223
+ id: string;
2224
+ options?: {
2225
+ ENTRIESREAD?: number | undefined;
2226
+ } | undefined;
2227
+ }) => Pipeline<[...TCommands, Command<any, never>]>;
2228
+ /**
2229
+ * @see https://redis.io/commands/xread
2230
+ */
2231
+ xread: (...args: CommandArgs<typeof XReadCommand>) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
2232
+ /**
2233
+ * @see https://redis.io/commands/xreadgroup
2234
+ */
2235
+ xreadgroup: (...args: CommandArgs<typeof XReadGroupCommand>) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
2236
+ /**
2237
+ * @see https://redis.io/commands/xinfo
2238
+ */
2239
+ xinfo: (key: string, options: {
2240
+ type: "CONSUMERS";
2241
+ group: string;
2242
+ } | {
2243
+ type: "GROUPS";
2244
+ }) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
2245
+ /**
2246
+ * @see https://redis.io/commands/xlen
2247
+ */
2248
+ xlen: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
2249
+ /**
2250
+ * @see https://redis.io/commands/xpending
2251
+ */
2252
+ xpending: (key: string, group: string, start: string, end: string, count: number, options?: {
2253
+ idleTime?: number | undefined;
2254
+ consumer?: string | string[] | undefined;
2255
+ } | undefined) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
2256
+ /**
2257
+ * @see https://redis.io/commands/xclaim
2258
+ */
2259
+ xclaim: (key: string, group: string, consumer: string, minIdleTime: number, id: string | string[], options?: {
2260
+ idleMS?: number | undefined;
2261
+ timeMS?: number | undefined;
2262
+ retryCount?: number | undefined;
2263
+ force?: boolean | undefined;
2264
+ justId?: boolean | undefined;
2265
+ lastId?: number | undefined;
2266
+ } | undefined) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
2267
+ /**
2268
+ * @see https://redis.io/commands/xautoclaim
2269
+ */
2270
+ xautoclaim: (key: string, group: string, consumer: string, minIdleTime: number, start: string, options?: {
2271
+ count?: number | undefined;
2272
+ justId?: boolean | undefined;
2273
+ } | undefined) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
2274
+ /**
2275
+ * @see https://redis.io/commands/xtrim
2276
+ */
2277
+ xtrim: (key: string, options: {
2278
+ strategy: "MAXLEN" | "MINID";
2279
+ exactness?: "~" | "=" | undefined;
2280
+ threshold: string | number;
2281
+ limit?: number | undefined;
2282
+ }) => Pipeline<[...TCommands, Command<any, number>]>;
2283
+ /**
2284
+ * @see https://redis.io/commands/xrange
2285
+ */
2286
+ xrange: (key: string, start: string, end: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, Record<string, Record<string, unknown>>>]>;
2287
+ /**
2288
+ * @see https://redis.io/commands/xrevrange
2289
+ */
2290
+ xrevrange: (key: string, end: string, start: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, Record<string, Record<string, unknown>>>]>;
2015
2291
  /**
2016
2292
  * @see https://redis.io/commands/zcard
2017
2293
  */
@@ -2142,96 +2418,6 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
2142
2418
  * @see https://redis.io/commands/json.forget
2143
2419
  */
2144
2420
  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
2421
  /**
2236
2422
  * @see https://redis.io/commands/json.get
2237
2423
  */
@@ -2387,104 +2573,14 @@ declare class Redis {
2387
2573
  * @see https://redis.io/commands/json.forget
2388
2574
  */
2389
2575
  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
2576
  /**
2481
2577
  * @see https://redis.io/commands/json.get
2482
2578
  */
2483
- get: (...args: CommandArgs<typeof JsonGetCommand>) => Promise<any>;
2579
+ get: <TData>(...args: CommandArgs<typeof JsonGetCommand>) => Promise<TData | null>;
2484
2580
  /**
2485
2581
  * @see https://redis.io/commands/json.mget
2486
2582
  */
2487
- mget: (keys: string[], path: string) => Promise<any>;
2583
+ mget: <TData_1>(keys: string[], path: string) => Promise<TData_1>;
2488
2584
  /**
2489
2585
  * @see https://redis.io/commands/json.numincrby
2490
2586
  */
@@ -2617,7 +2713,7 @@ declare class Redis {
2617
2713
  /**
2618
2714
  * @see https://redis.io/commands/expire
2619
2715
  */
2620
- expire: (key: string, seconds: number) => Promise<0 | 1>;
2716
+ expire: (key: string, seconds: number, option?: ("NX" | "nx" | "XX" | "xx" | "GT" | "gt" | "LT" | "lt") | undefined) => Promise<0 | 1>;
2621
2717
  /**
2622
2718
  * @see https://redis.io/commands/expireat
2623
2719
  */
@@ -2632,6 +2728,96 @@ declare class Redis {
2632
2728
  flushdb: (opts?: {
2633
2729
  async?: boolean | undefined;
2634
2730
  } | undefined) => Promise<"OK">;
2731
+ /**
2732
+ * @see https://redis.io/commands/geoadd
2733
+ */
2734
+ geoadd: <TData>(args_0: string, args_1: GeoAddCommandOptions | GeoMember<TData>, ...args_2: GeoMember<TData>[]) => Promise<number | null>;
2735
+ /**
2736
+ * @see https://redis.io/commands/geopos
2737
+ */
2738
+ geopos: <TData>(args_0: string, ...args_1: TData[]) => Promise<{
2739
+ lng: number;
2740
+ lat: number;
2741
+ }[]>;
2742
+ /**
2743
+ * @see https://redis.io/commands/geodist
2744
+ */
2745
+ geodist: <TData>(key: string, member1: TData, member2: TData, unit?: "M" | "KM" | "FT" | "MI" | undefined) => Promise<number | null>;
2746
+ /**
2747
+ * @see https://redis.io/commands/geohash
2748
+ */
2749
+ geohash: <TData>(args_0: string, ...args_1: TData[]) => Promise<(string | null)[]>;
2750
+ /**
2751
+ * @see https://redis.io/commands/geosearch
2752
+ */
2753
+ geosearch: <TData>(key: string, centerPoint: {
2754
+ type: "FROMLONLAT" | "fromlonlat";
2755
+ coordinate: {
2756
+ lon: number;
2757
+ lat: number;
2758
+ };
2759
+ } | {
2760
+ type: "FROMMEMBER" | "frommember";
2761
+ member: TData;
2762
+ }, shape: {
2763
+ type: "BYRADIUS" | "byradius";
2764
+ radius: number;
2765
+ radiusType: "M" | "KM" | "FT" | "MI";
2766
+ } | {
2767
+ type: "BYBOX" | "bybox";
2768
+ rect: {
2769
+ width: number;
2770
+ height: number;
2771
+ };
2772
+ rectType: "M" | "KM" | "FT" | "MI";
2773
+ }, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
2774
+ count?: {
2775
+ limit: number;
2776
+ any?: boolean | undefined;
2777
+ } | undefined;
2778
+ withCoord?: boolean | undefined;
2779
+ withDist?: boolean | undefined;
2780
+ withHash?: boolean | undefined;
2781
+ } | undefined) => Promise<({
2782
+ member: TData;
2783
+ } & {
2784
+ coord?: {
2785
+ long: number;
2786
+ lat: number;
2787
+ } | undefined;
2788
+ dist?: number | undefined;
2789
+ hash?: string | undefined;
2790
+ })[]>;
2791
+ /**
2792
+ * @see https://redis.io/commands/geosearchstore
2793
+ */
2794
+ geosearchstore: <TData>(destination: string, key: string, centerPoint: {
2795
+ type: "FROMLONLAT" | "fromlonlat";
2796
+ coordinate: {
2797
+ lon: number;
2798
+ lat: number;
2799
+ };
2800
+ } | {
2801
+ type: "FROMMEMBER" | "frommember";
2802
+ member: TData;
2803
+ }, shape: {
2804
+ type: "BYRADIUS" | "byradius";
2805
+ radius: number;
2806
+ radiusType: "M" | "KM" | "FT" | "MI";
2807
+ } | {
2808
+ type: "BYBOX" | "bybox";
2809
+ rect: {
2810
+ width: number;
2811
+ height: number;
2812
+ };
2813
+ rectType: "M" | "KM" | "FT" | "MI";
2814
+ }, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
2815
+ count?: {
2816
+ limit: number;
2817
+ any?: boolean | undefined;
2818
+ } | undefined;
2819
+ storeDist?: boolean | undefined;
2820
+ } | undefined) => Promise<number>;
2635
2821
  /**
2636
2822
  * @see https://redis.io/commands/get
2637
2823
  */
@@ -2820,6 +3006,18 @@ declare class Redis {
2820
3006
  * @see https://redis.io/commands/pexpireat
2821
3007
  */
2822
3008
  pexpireat: (key: string, unix: number) => Promise<0 | 1>;
3009
+ /**
3010
+ * @see https://redis.io/commands/pfadd
3011
+ */
3012
+ pfadd: (args_0: string, ...args_1: unknown[]) => Promise<number>;
3013
+ /**
3014
+ * @see https://redis.io/commands/pfcount
3015
+ */
3016
+ pfcount: (args_0: string, ...args_1: string[]) => Promise<number>;
3017
+ /**
3018
+ * @see https://redis.io/commands/pfmerge
3019
+ */
3020
+ pfmerge: (destination_key: string, ...args_1: string[]) => Promise<"OK">;
2823
3021
  /**
2824
3022
  * @see https://redis.io/commands/ping
2825
3023
  */
@@ -3005,14 +3203,111 @@ declare class Redis {
3005
3203
  limit?: undefined;
3006
3204
  })) | undefined;
3007
3205
  } | undefined) => Promise<string>;
3206
+ /**
3207
+ * @see https://redis.io/commands/xack
3208
+ */
3209
+ xack: (key: string, group: string, id: string | string[]) => Promise<number>;
3210
+ /**
3211
+ * @see https://redis.io/commands/xdel
3212
+ */
3213
+ xdel: (key: string, ids: string | string[]) => Promise<number>;
3214
+ /**
3215
+ * @see https://redis.io/commands/xgroup
3216
+ */
3217
+ xgroup: (key: string, opts: {
3218
+ type: "CREATE";
3219
+ group: string;
3220
+ id: string;
3221
+ options?: {
3222
+ MKSTREAM?: boolean | undefined;
3223
+ ENTRIESREAD?: number | undefined;
3224
+ } | undefined;
3225
+ } | {
3226
+ type: "CREATECONSUMER";
3227
+ group: string;
3228
+ consumer: string;
3229
+ } | {
3230
+ type: "DELCONSUMER";
3231
+ group: string;
3232
+ consumer: string;
3233
+ } | {
3234
+ type: "DESTROY";
3235
+ group: string;
3236
+ } | {
3237
+ type: "SETID";
3238
+ group: string;
3239
+ id: string;
3240
+ options?: {
3241
+ ENTRIESREAD?: number | undefined;
3242
+ } | undefined;
3243
+ }) => Promise<never>;
3244
+ /**
3245
+ * @see https://redis.io/commands/xread
3246
+ */
3247
+ xread: (...args: CommandArgs<typeof XReadCommand>) => Promise<unknown[]>;
3248
+ /**
3249
+ * @see https://redis.io/commands/xreadgroup
3250
+ */
3251
+ xreadgroup: (...args: CommandArgs<typeof XReadGroupCommand>) => Promise<unknown[]>;
3252
+ /**
3253
+ * @see https://redis.io/commands/xinfo
3254
+ */
3255
+ xinfo: (key: string, options: {
3256
+ type: "CONSUMERS";
3257
+ group: string;
3258
+ } | {
3259
+ type: "GROUPS";
3260
+ }) => Promise<unknown[]>;
3261
+ /**
3262
+ * @see https://redis.io/commands/xlen
3263
+ */
3264
+ xlen: (key: string) => Promise<number>;
3265
+ /**
3266
+ * @see https://redis.io/commands/xpending
3267
+ */
3268
+ xpending: (key: string, group: string, start: string, end: string, count: number, options?: {
3269
+ idleTime?: number | undefined;
3270
+ consumer?: string | string[] | undefined;
3271
+ } | undefined) => Promise<unknown[]>;
3272
+ /**
3273
+ * @see https://redis.io/commands/xclaim
3274
+ */
3275
+ xclaim: (key: string, group: string, consumer: string, minIdleTime: number, id: string | string[], options?: {
3276
+ idleMS?: number | undefined;
3277
+ timeMS?: number | undefined;
3278
+ retryCount?: number | undefined;
3279
+ force?: boolean | undefined;
3280
+ justId?: boolean | undefined;
3281
+ lastId?: number | undefined;
3282
+ } | undefined) => Promise<unknown[]>;
3283
+ /**
3284
+ * @see https://redis.io/commands/xautoclaim
3285
+ */
3286
+ xautoclaim: (key: string, group: string, consumer: string, minIdleTime: number, start: string, options?: {
3287
+ count?: number | undefined;
3288
+ justId?: boolean | undefined;
3289
+ } | undefined) => Promise<unknown[]>;
3290
+ /**
3291
+ * @see https://redis.io/commands/xtrim
3292
+ */
3293
+ xtrim: (key: string, options: {
3294
+ strategy: "MAXLEN" | "MINID";
3295
+ exactness?: "~" | "=" | undefined;
3296
+ threshold: string | number;
3297
+ limit?: number | undefined;
3298
+ }) => Promise<number>;
3008
3299
  /**
3009
3300
  * @see https://redis.io/commands/xrange
3010
3301
  */
3011
3302
  xrange: (key: string, start: string, end: string, count?: number | undefined) => Promise<Record<string, Record<string, unknown>>>;
3303
+ /**
3304
+ * @see https://redis.io/commands/xrevrange
3305
+ */
3306
+ xrevrange: (key: string, end: string, start: string, count?: number | undefined) => Promise<Record<string, Record<string, unknown>>>;
3012
3307
  /**
3013
3308
  * @see https://redis.io/commands/zadd
3014
3309
  */
3015
- zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [key: string, opts: ZAddCommandOptions | ZAddCommandOptionsWithIncr, ScoreMember<TData>, ...ScoreMember<TData>[]]) => Promise<number | null>;
3310
+ zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [key: string, opts: ZAddCommandOptions, ScoreMember<TData>, ...ScoreMember<TData>[]]) => Promise<number | null>;
3016
3311
  /**
3017
3312
  * @see https://redis.io/commands/zcard
3018
3313
  */
@@ -3123,4 +3418,4 @@ declare class ZMScoreCommand<TData> extends Command<string[] | null, number[] |
3123
3418
  constructor(cmd: [key: string, members: TData[]], opts?: CommandOptions<string[] | null, number[] | null>);
3124
3419
  }
3125
3420
 
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 };
3421
+ export { IncrByCommand as $, AppendCommand as A, BitCountCommand as B, CopyCommand as C, DBSizeCommand as D, EchoCommand as E, FlushAllCommand as F, GeoAddCommand as G, GetSetCommand as H, HDelCommand as I, HExistsCommand as J, HGetCommand as K, HGetAllCommand as L, HIncrByCommand as M, HIncrByFloatCommand as N, HKeysCommand as O, HLenCommand as P, HMGetCommand as Q, RedisOptions as R, HMSetCommand as S, HRandFieldCommand as T, UpstashRequest as U, HScanCommand as V, HSetCommand as W, HSetNXCommand as X, HStrLenCommand as Y, HValsCommand as Z, IncrCommand as _, RequesterConfig as a, SetNxCommand as a$, IncrByFloatCommand as a0, JsonArrAppendCommand as a1, JsonArrIndexCommand as a2, JsonArrInsertCommand as a3, JsonArrLenCommand as a4, JsonArrPopCommand as a5, JsonArrTrimCommand as a6, JsonClearCommand as a7, JsonDelCommand as a8, JsonForgetCommand as a9, MSetNXCommand as aA, PersistCommand as aB, PExpireCommand as aC, PExpireAtCommand as aD, PingCommand as aE, PSetEXCommand as aF, PTtlCommand as aG, PublishCommand as aH, RandomKeyCommand as aI, RenameCommand as aJ, RenameNXCommand as aK, RPopCommand as aL, RPushCommand as aM, RPushXCommand as aN, SAddCommand as aO, ScanCommand as aP, ScanCommandOptions as aQ, SCardCommand as aR, ScriptExistsCommand as aS, ScriptFlushCommand as aT, ScriptLoadCommand as aU, SDiffCommand as aV, SDiffStoreCommand as aW, SetCommand as aX, SetCommandOptions as aY, SetBitCommand as aZ, SetExCommand as a_, JsonGetCommand as aa, JsonMGetCommand as ab, JsonNumIncrByCommand as ac, JsonNumMultByCommand as ad, JsonObjKeysCommand as ae, JsonObjLenCommand as af, JsonRespCommand as ag, JsonSetCommand as ah, JsonStrAppendCommand as ai, JsonStrLenCommand as aj, JsonToggleCommand as ak, JsonTypeCommand as al, KeysCommand as am, LIndexCommand as an, LInsertCommand as ao, LLenCommand as ap, LMoveCommand as aq, LPopCommand as ar, LPushCommand as as, LPushXCommand as at, LRangeCommand as au, LRemCommand as av, LSetCommand as aw, LTrimCommand as ax, MGetCommand as ay, MSetCommand as az, Redis as b, SetRangeCommand as b0, SInterCommand as b1, SInterStoreCommand as b2, SIsMemberCommand as b3, SMembersCommand as b4, SMIsMemberCommand as b5, SMoveCommand as b6, SPopCommand as b7, SRandMemberCommand as b8, SRemCommand as b9, ZRangeCommandOptions as bA, ZRankCommand as bB, ZRemCommand as bC, ZRemRangeByLexCommand as bD, ZRemRangeByRankCommand as bE, ZRemRangeByScoreCommand as bF, ZRevRankCommand as bG, ZScanCommand as bH, ZScoreCommand as bI, ZUnionCommand as bJ, ZUnionCommandOptions as bK, ZUnionStoreCommand as bL, ZUnionStoreCommandOptions as bM, SScanCommand as ba, StrLenCommand as bb, SUnionCommand as bc, SUnionStoreCommand as bd, TimeCommand as be, TouchCommand as bf, TtlCommand as bg, Type as bh, TypeCommand as bi, UnlinkCommand as bj, XAddCommand as bk, XRangeCommand as bl, ScoreMember as bm, ZAddCommandOptions as bn, ZAddCommand as bo, ZCardCommand as bp, ZCountCommand as bq, ZDiffStoreCommand as br, ZIncrByCommand as bs, ZInterStoreCommand as bt, ZInterStoreCommandOptions as bu, ZLexCountCommand as bv, ZMScoreCommand as bw, ZPopMaxCommand as bx, ZPopMinCommand as by, ZRangeCommand as bz, Requester as c, UpstashResponse as d, BitOpCommand as e, BitPosCommand as f, DecrCommand as g, DecrByCommand as h, DelCommand as i, EvalCommand as j, EvalshaCommand as k, ExistsCommand as l, ExpireCommand as m, ExpireAtCommand as n, FlushDBCommand as o, GeoAddCommandOptions as p, GeoMember as q, GeoDistCommand as r, GeoHashCommand as s, GeoPosCommand as t, GeoSearchCommand as u, GeoSearchStoreCommand as v, GetCommand as w, GetBitCommand as x, GetDelCommand as y, GetRangeCommand as z };