@upstash/redis 0.0.0-ci.93b939fbaff48659ccbb9d2abf465e731c909229-20231219200325 → 0.0.0-ci.9411f96a2a3307906eef6f50c0df3cb43c92221d-20240626100524
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.
- package/README.md +6 -1
- package/chunk-L7IXRP4Z.js +1 -0
- package/chunk-P34GVAKK.mjs +1 -0
- package/cloudflare.d.mts +5 -4
- package/cloudflare.d.ts +5 -4
- package/cloudflare.js +1 -1
- package/cloudflare.mjs +1 -1
- package/fastly.d.mts +5 -4
- package/fastly.d.ts +5 -4
- package/fastly.js +1 -1
- package/fastly.mjs +1 -1
- package/nodejs.d.mts +6 -4
- package/nodejs.d.ts +6 -4
- package/nodejs.js +1 -1
- package/nodejs.mjs +1 -1
- package/package.json +1 -1
- package/{zmscore-fa7fc9c8.d.ts → zmscore-6061c3e1.d.ts} +461 -222
- package/chunk-3KV34DA6.mjs +0 -1
- package/chunk-DRRUVDJQ.js +0 -1
|
@@ -23,7 +23,9 @@ type RedisOptions = {
|
|
|
23
23
|
* @default true
|
|
24
24
|
*/
|
|
25
25
|
automaticDeserialization?: boolean;
|
|
26
|
+
latencyLogging?: boolean;
|
|
26
27
|
enableTelemetry?: boolean;
|
|
28
|
+
enableAutoPipelining?: boolean;
|
|
27
29
|
};
|
|
28
30
|
|
|
29
31
|
type CacheSetting = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload";
|
|
@@ -106,6 +108,7 @@ type CommandOptions<TResult, TData> = {
|
|
|
106
108
|
* @default true
|
|
107
109
|
*/
|
|
108
110
|
automaticDeserialization?: boolean;
|
|
111
|
+
latencyLogging?: boolean;
|
|
109
112
|
};
|
|
110
113
|
/**
|
|
111
114
|
* Command offers default (de)serialization and the exec method to all commands.
|
|
@@ -129,7 +132,8 @@ declare class Command<TResult, TData> {
|
|
|
129
132
|
exec(client: Requester): Promise<TData>;
|
|
130
133
|
}
|
|
131
134
|
|
|
132
|
-
type
|
|
135
|
+
type ZUnionCommandOptions = {
|
|
136
|
+
withScores?: boolean;
|
|
133
137
|
aggregate?: "sum" | "min" | "max";
|
|
134
138
|
} & ({
|
|
135
139
|
weight: number;
|
|
@@ -142,15 +146,14 @@ type ZUnionStoreCommandOptions = {
|
|
|
142
146
|
weights?: never;
|
|
143
147
|
});
|
|
144
148
|
/**
|
|
145
|
-
* @see https://redis.io/commands/
|
|
149
|
+
* @see https://redis.io/commands/zunion
|
|
146
150
|
*/
|
|
147
|
-
declare class
|
|
148
|
-
constructor(cmd: [
|
|
149
|
-
constructor(cmd: [
|
|
151
|
+
declare class ZUnionCommand<TData extends unknown[]> extends Command<string[], TData> {
|
|
152
|
+
constructor(cmd: [numKeys: 1, key: string, opts?: ZUnionCommandOptions], cmdOpts?: CommandOptions<string[], TData>);
|
|
153
|
+
constructor(cmd: [numKeys: number, keys: string[], opts?: ZUnionCommandOptions], cmdOpts?: CommandOptions<string[], TData>);
|
|
150
154
|
}
|
|
151
155
|
|
|
152
|
-
type
|
|
153
|
-
withScores?: boolean;
|
|
156
|
+
type ZUnionStoreCommandOptions = {
|
|
154
157
|
aggregate?: "sum" | "min" | "max";
|
|
155
158
|
} & ({
|
|
156
159
|
weight: number;
|
|
@@ -163,11 +166,11 @@ type ZUnionCommandOptions = {
|
|
|
163
166
|
weights?: never;
|
|
164
167
|
});
|
|
165
168
|
/**
|
|
166
|
-
* @see https://redis.io/commands/
|
|
169
|
+
* @see https://redis.io/commands/zunionstore
|
|
167
170
|
*/
|
|
168
|
-
declare class
|
|
169
|
-
constructor(cmd: [numKeys: 1, key: string, opts?:
|
|
170
|
-
constructor(cmd: [numKeys: number, keys: string[], opts?:
|
|
171
|
+
declare class ZUnionStoreCommand extends Command<number, number> {
|
|
172
|
+
constructor(cmd: [destination: string, numKeys: 1, key: string, opts?: ZUnionStoreCommandOptions], cmdOpts?: CommandOptions<number, number>);
|
|
173
|
+
constructor(cmd: [destination: string, numKeys: number, keys: string[], opts?: ZUnionStoreCommandOptions], cmdOpts?: CommandOptions<number, number>);
|
|
171
174
|
}
|
|
172
175
|
|
|
173
176
|
type ZInterStoreCommandOptions = {
|
|
@@ -220,8 +223,8 @@ type ScanCommandOptions = {
|
|
|
220
223
|
/**
|
|
221
224
|
* @see https://redis.io/commands/scan
|
|
222
225
|
*/
|
|
223
|
-
declare class ScanCommand extends Command<[
|
|
224
|
-
constructor([cursor, opts]: [cursor: number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[
|
|
226
|
+
declare class ScanCommand extends Command<[string, string[]], [string, string[]]> {
|
|
227
|
+
constructor([cursor, opts]: [cursor: string | number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[string, string[]], [string, string[]]>);
|
|
225
228
|
}
|
|
226
229
|
|
|
227
230
|
type GeoAddCommandOptions = {
|
|
@@ -635,13 +638,13 @@ declare class HRandFieldCommand<TData extends string | string[] | Record<string,
|
|
|
635
638
|
* @see https://redis.io/commands/hscan
|
|
636
639
|
*/
|
|
637
640
|
declare class HScanCommand extends Command<[
|
|
638
|
-
|
|
641
|
+
string,
|
|
639
642
|
(string | number)[]
|
|
640
643
|
], [
|
|
641
|
-
|
|
644
|
+
string,
|
|
642
645
|
(string | number)[]
|
|
643
646
|
]> {
|
|
644
|
-
constructor([key, cursor, cmdOpts]: [key: string, cursor: number, cmdOpts?: ScanCommandOptions], opts?: CommandOptions<[
|
|
647
|
+
constructor([key, cursor, cmdOpts]: [key: string, cursor: string | number, cmdOpts?: ScanCommandOptions], opts?: CommandOptions<[string, (string | number)[]], [string, (string | number)[]]>);
|
|
645
648
|
}
|
|
646
649
|
|
|
647
650
|
/**
|
|
@@ -776,7 +779,7 @@ declare class JsonGetCommand<TData extends (unknown | Record<string, unknown>) |
|
|
|
776
779
|
/**
|
|
777
780
|
* @see https://redis.io/commands/json.mget
|
|
778
781
|
*/
|
|
779
|
-
declare class JsonMGetCommand<TData
|
|
782
|
+
declare class JsonMGetCommand<TData = unknown[]> extends Command<TData, TData> {
|
|
780
783
|
constructor(cmd: [keys: string[], path: string], opts?: CommandOptions<TData, TData>);
|
|
781
784
|
}
|
|
782
785
|
|
|
@@ -1240,13 +1243,13 @@ declare class SRemCommand<TData = string> extends Command<number, number> {
|
|
|
1240
1243
|
* @see https://redis.io/commands/sscan
|
|
1241
1244
|
*/
|
|
1242
1245
|
declare class SScanCommand extends Command<[
|
|
1243
|
-
|
|
1246
|
+
string,
|
|
1244
1247
|
(string | number)[]
|
|
1245
1248
|
], [
|
|
1246
|
-
|
|
1249
|
+
string,
|
|
1247
1250
|
(string | number)[]
|
|
1248
1251
|
]> {
|
|
1249
|
-
constructor([key, cursor, opts]: [key: string, cursor: number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[
|
|
1252
|
+
constructor([key, cursor, opts]: [key: string, cursor: string | number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[string, (string | number)[]], [string, (string | number)[]]>);
|
|
1250
1253
|
}
|
|
1251
1254
|
|
|
1252
1255
|
/**
|
|
@@ -1332,6 +1335,54 @@ declare class XRangeCommand<TData extends Record<string, Record<string, unknown>
|
|
|
1332
1335
|
constructor([key, start, end, count]: [key: string, start: string, end: string, count?: number], opts?: CommandOptions<unknown[], TData[]>);
|
|
1333
1336
|
}
|
|
1334
1337
|
|
|
1338
|
+
type XReadCommandOptions = [
|
|
1339
|
+
key: string | string[],
|
|
1340
|
+
id: string | string[],
|
|
1341
|
+
options?: {
|
|
1342
|
+
count?: number;
|
|
1343
|
+
blockMS?: number;
|
|
1344
|
+
}
|
|
1345
|
+
];
|
|
1346
|
+
type XReadOptions = XReadCommandOptions extends [infer K, infer I, ...any[]] ? K extends string ? I extends string ? [key: string, id: string, options?: {
|
|
1347
|
+
count?: number;
|
|
1348
|
+
blockMS?: number;
|
|
1349
|
+
}] : never : K extends string[] ? I extends string[] ? [key: string[], id: string[], options?: {
|
|
1350
|
+
count?: number;
|
|
1351
|
+
blockMS?: number;
|
|
1352
|
+
}] : never : never : never;
|
|
1353
|
+
/**
|
|
1354
|
+
* @see https://redis.io/commands/xread
|
|
1355
|
+
*/
|
|
1356
|
+
declare class XReadCommand extends Command<number, unknown[]> {
|
|
1357
|
+
constructor([key, id, options]: XReadOptions, opts?: CommandOptions<number, unknown[]>);
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
type Options = {
|
|
1361
|
+
count?: number;
|
|
1362
|
+
blockMS?: number;
|
|
1363
|
+
NOACK?: boolean;
|
|
1364
|
+
};
|
|
1365
|
+
type XReadGroupCommandOptions = [
|
|
1366
|
+
group: string,
|
|
1367
|
+
consumer: string,
|
|
1368
|
+
key: string | string[],
|
|
1369
|
+
id: string | string[],
|
|
1370
|
+
options?: Options
|
|
1371
|
+
];
|
|
1372
|
+
type XReadGroupOptions = XReadGroupCommandOptions extends [
|
|
1373
|
+
string,
|
|
1374
|
+
string,
|
|
1375
|
+
infer TKey,
|
|
1376
|
+
infer TId,
|
|
1377
|
+
...any[]
|
|
1378
|
+
] ? 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;
|
|
1379
|
+
/**
|
|
1380
|
+
* @see https://redis.io/commands/xreadgroup
|
|
1381
|
+
*/
|
|
1382
|
+
declare class XReadGroupCommand extends Command<number, unknown[]> {
|
|
1383
|
+
constructor([group, consumer, key, id, options]: XReadGroupOptions, opts?: CommandOptions<number, unknown[]>);
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1335
1386
|
type NXAndXXOptions = {
|
|
1336
1387
|
nx: true;
|
|
1337
1388
|
xx?: never;
|
|
@@ -1499,13 +1550,13 @@ declare class ZRevRankCommand<TData> extends Command<number | null, number | nul
|
|
|
1499
1550
|
* @see https://redis.io/commands/zscan
|
|
1500
1551
|
*/
|
|
1501
1552
|
declare class ZScanCommand extends Command<[
|
|
1502
|
-
|
|
1553
|
+
string,
|
|
1503
1554
|
(string | number)[]
|
|
1504
1555
|
], [
|
|
1505
|
-
|
|
1556
|
+
string,
|
|
1506
1557
|
(string | number)[]
|
|
1507
1558
|
]> {
|
|
1508
|
-
constructor([key, cursor, opts]: [key: string, cursor: number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[
|
|
1559
|
+
constructor([key, cursor, opts]: [key: string, cursor: string | number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[string, (string | number)[]], [string, (string | number)[]]>);
|
|
1509
1560
|
}
|
|
1510
1561
|
|
|
1511
1562
|
/**
|
|
@@ -1601,10 +1652,7 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
1601
1652
|
*/
|
|
1602
1653
|
bitop: {
|
|
1603
1654
|
(op: "and" | "or" | "xor", destinationKey: string, sourceKey: string, ...sourceKeys: string[]): Pipeline<[...TCommands, BitOpCommand]>;
|
|
1604
|
-
(op: "not", destinationKey: string, sourceKey: string): Pipeline<[
|
|
1605
|
-
...TCommands,
|
|
1606
|
-
BitOpCommand
|
|
1607
|
-
]>;
|
|
1655
|
+
(op: "not", destinationKey: string, sourceKey: string): Pipeline<[...TCommands, BitOpCommand]>;
|
|
1608
1656
|
};
|
|
1609
1657
|
/**
|
|
1610
1658
|
* @see https://redis.io/commands/bitpos
|
|
@@ -1670,6 +1718,96 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
1670
1718
|
flushdb: (opts?: {
|
|
1671
1719
|
async?: boolean | undefined;
|
|
1672
1720
|
} | undefined) => Pipeline<[...TCommands, Command<any, "OK">]>;
|
|
1721
|
+
/**
|
|
1722
|
+
* @see https://redis.io/commands/geoadd
|
|
1723
|
+
*/
|
|
1724
|
+
geoadd: <TData>(args_0: string, args_1: GeoAddCommandOptions | GeoMember<TData>, ...args_2: GeoMember<TData>[]) => Pipeline<[...TCommands, Command<any, number | null>]>;
|
|
1725
|
+
/**
|
|
1726
|
+
* @see https://redis.io/commands/geodist
|
|
1727
|
+
*/
|
|
1728
|
+
geodist: <TData>(key: string, member1: TData, member2: TData, unit?: "M" | "KM" | "FT" | "MI" | undefined) => Pipeline<[...TCommands, Command<any, number | null>]>;
|
|
1729
|
+
/**
|
|
1730
|
+
* @see https://redis.io/commands/geopos
|
|
1731
|
+
*/
|
|
1732
|
+
geopos: <TData>(args_0: string, ...args_1: TData[]) => Pipeline<[...TCommands, Command<any, {
|
|
1733
|
+
lng: number;
|
|
1734
|
+
lat: number;
|
|
1735
|
+
}[]>]>;
|
|
1736
|
+
/**
|
|
1737
|
+
* @see https://redis.io/commands/geohash
|
|
1738
|
+
*/
|
|
1739
|
+
geohash: <TData>(args_0: string, ...args_1: TData[]) => Pipeline<[...TCommands, Command<any, (string | null)[]>]>;
|
|
1740
|
+
/**
|
|
1741
|
+
* @see https://redis.io/commands/geosearch
|
|
1742
|
+
*/
|
|
1743
|
+
geosearch: <TData>(key: string, centerPoint: {
|
|
1744
|
+
type: "FROMLONLAT" | "fromlonlat";
|
|
1745
|
+
coordinate: {
|
|
1746
|
+
lon: number;
|
|
1747
|
+
lat: number;
|
|
1748
|
+
};
|
|
1749
|
+
} | {
|
|
1750
|
+
type: "FROMMEMBER" | "frommember";
|
|
1751
|
+
member: TData;
|
|
1752
|
+
}, shape: {
|
|
1753
|
+
type: "BYRADIUS" | "byradius";
|
|
1754
|
+
radius: number;
|
|
1755
|
+
radiusType: "M" | "KM" | "FT" | "MI";
|
|
1756
|
+
} | {
|
|
1757
|
+
type: "BYBOX" | "bybox";
|
|
1758
|
+
rect: {
|
|
1759
|
+
width: number;
|
|
1760
|
+
height: number;
|
|
1761
|
+
};
|
|
1762
|
+
rectType: "M" | "KM" | "FT" | "MI";
|
|
1763
|
+
}, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
|
|
1764
|
+
count?: {
|
|
1765
|
+
limit: number;
|
|
1766
|
+
any?: boolean | undefined;
|
|
1767
|
+
} | undefined;
|
|
1768
|
+
withCoord?: boolean | undefined;
|
|
1769
|
+
withDist?: boolean | undefined;
|
|
1770
|
+
withHash?: boolean | undefined;
|
|
1771
|
+
} | undefined) => Pipeline<[...TCommands, Command<any, ({
|
|
1772
|
+
member: TData;
|
|
1773
|
+
} & {
|
|
1774
|
+
coord?: {
|
|
1775
|
+
long: number;
|
|
1776
|
+
lat: number;
|
|
1777
|
+
} | undefined;
|
|
1778
|
+
dist?: number | undefined;
|
|
1779
|
+
hash?: string | undefined;
|
|
1780
|
+
})[]>]>;
|
|
1781
|
+
/**
|
|
1782
|
+
* @see https://redis.io/commands/geosearchstore
|
|
1783
|
+
*/
|
|
1784
|
+
geosearchstore: <TData>(destination: string, key: string, centerPoint: {
|
|
1785
|
+
type: "FROMLONLAT" | "fromlonlat";
|
|
1786
|
+
coordinate: {
|
|
1787
|
+
lon: number;
|
|
1788
|
+
lat: number;
|
|
1789
|
+
};
|
|
1790
|
+
} | {
|
|
1791
|
+
type: "FROMMEMBER" | "frommember";
|
|
1792
|
+
member: TData;
|
|
1793
|
+
}, shape: {
|
|
1794
|
+
type: "BYRADIUS" | "byradius";
|
|
1795
|
+
radius: number;
|
|
1796
|
+
radiusType: "M" | "KM" | "FT" | "MI";
|
|
1797
|
+
} | {
|
|
1798
|
+
type: "BYBOX" | "bybox";
|
|
1799
|
+
rect: {
|
|
1800
|
+
width: number;
|
|
1801
|
+
height: number;
|
|
1802
|
+
};
|
|
1803
|
+
rectType: "M" | "KM" | "FT" | "MI";
|
|
1804
|
+
}, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
|
|
1805
|
+
count?: {
|
|
1806
|
+
limit: number;
|
|
1807
|
+
any?: boolean | undefined;
|
|
1808
|
+
} | undefined;
|
|
1809
|
+
storeDist?: boolean | undefined;
|
|
1810
|
+
} | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
1673
1811
|
/**
|
|
1674
1812
|
* @see https://redis.io/commands/get
|
|
1675
1813
|
*/
|
|
@@ -1735,11 +1873,11 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
1735
1873
|
/**
|
|
1736
1874
|
* @see https://redis.io/commands/hrandfield
|
|
1737
1875
|
*/
|
|
1738
|
-
hrandfield: <TData extends string |
|
|
1876
|
+
hrandfield: <TData extends string | Record<string, unknown> | string[]>(key: string, count?: number, withValues?: boolean) => Pipeline<[...TCommands, Command<any, TData>]>;
|
|
1739
1877
|
/**
|
|
1740
1878
|
* @see https://redis.io/commands/hscan
|
|
1741
1879
|
*/
|
|
1742
|
-
hscan: (key: string, cursor: number, cmdOpts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [
|
|
1880
|
+
hscan: (key: string, cursor: string | number, cmdOpts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [string, (string | number)[]]>]>;
|
|
1743
1881
|
/**
|
|
1744
1882
|
* @see https://redis.io/commands/hset
|
|
1745
1883
|
*/
|
|
@@ -1794,6 +1932,10 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
1794
1932
|
* @see https://redis.io/commands/lpop
|
|
1795
1933
|
*/
|
|
1796
1934
|
lpop: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
|
|
1935
|
+
/**
|
|
1936
|
+
* @see https://redis.io/commands/lmpop
|
|
1937
|
+
*/
|
|
1938
|
+
lmpop: <TData>(numkeys: number, keys: string[], args_2: "LEFT" | "RIGHT", count?: number | undefined) => Pipeline<[...TCommands, Command<any, [string, TData[]] | null>]>;
|
|
1797
1939
|
/**
|
|
1798
1940
|
* @see https://redis.io/commands/lpos
|
|
1799
1941
|
*/
|
|
@@ -1913,7 +2055,7 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
1913
2055
|
/**
|
|
1914
2056
|
* @see https://redis.io/commands/scan
|
|
1915
2057
|
*/
|
|
1916
|
-
scan: (cursor: number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [
|
|
2058
|
+
scan: (cursor: string | number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [string, string[]]>]>;
|
|
1917
2059
|
/**
|
|
1918
2060
|
* @see https://redis.io/commands/scard
|
|
1919
2061
|
*/
|
|
@@ -1994,7 +2136,7 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
1994
2136
|
/**
|
|
1995
2137
|
* @see https://redis.io/commands/sscan
|
|
1996
2138
|
*/
|
|
1997
|
-
sscan: (key: string, cursor: number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [
|
|
2139
|
+
sscan: (key: string, cursor: string | number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [string, (string | number)[]]>]>;
|
|
1998
2140
|
/**
|
|
1999
2141
|
* @see https://redis.io/commands/strlen
|
|
2000
2142
|
*/
|
|
@@ -2030,7 +2172,11 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
2030
2172
|
/**
|
|
2031
2173
|
* @see https://redis.io/commands/zadd
|
|
2032
2174
|
*/
|
|
2033
|
-
zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [
|
|
2175
|
+
zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [
|
|
2176
|
+
key: string,
|
|
2177
|
+
opts: ZAddCommandOptions,
|
|
2178
|
+
...scoreMemberPairs: [ScoreMember<TData>, ...ScoreMember<TData>[]]
|
|
2179
|
+
]) => Pipeline<[...TCommands, Command<any, number | null>]>;
|
|
2034
2180
|
/**
|
|
2035
2181
|
* @see https://redis.io/commands/xadd
|
|
2036
2182
|
*/
|
|
@@ -2052,14 +2198,90 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
2052
2198
|
limit?: undefined;
|
|
2053
2199
|
})) | undefined;
|
|
2054
2200
|
} | undefined) => Pipeline<[...TCommands, Command<any, string>]>;
|
|
2201
|
+
/**
|
|
2202
|
+
* @see https://redis.io/commands/xack
|
|
2203
|
+
*/
|
|
2204
|
+
xack: (key: string, group: string, id: string | string[]) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
2055
2205
|
/**
|
|
2056
2206
|
* @see https://redis.io/commands/xdel
|
|
2057
2207
|
*/
|
|
2058
2208
|
xdel: (key: string, ids: string | string[]) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
2209
|
+
/**
|
|
2210
|
+
* @see https://redis.io/commands/xgroup
|
|
2211
|
+
*/
|
|
2212
|
+
xgroup: (key: string, opts: {
|
|
2213
|
+
type: "CREATE";
|
|
2214
|
+
group: string;
|
|
2215
|
+
id: string;
|
|
2216
|
+
options?: {
|
|
2217
|
+
MKSTREAM?: boolean | undefined;
|
|
2218
|
+
ENTRIESREAD?: number | undefined;
|
|
2219
|
+
} | undefined;
|
|
2220
|
+
} | {
|
|
2221
|
+
type: "CREATECONSUMER";
|
|
2222
|
+
group: string;
|
|
2223
|
+
consumer: string;
|
|
2224
|
+
} | {
|
|
2225
|
+
type: "DELCONSUMER";
|
|
2226
|
+
group: string;
|
|
2227
|
+
consumer: string;
|
|
2228
|
+
} | {
|
|
2229
|
+
type: "DESTROY";
|
|
2230
|
+
group: string;
|
|
2231
|
+
} | {
|
|
2232
|
+
type: "SETID";
|
|
2233
|
+
group: string;
|
|
2234
|
+
id: string;
|
|
2235
|
+
options?: {
|
|
2236
|
+
ENTRIESREAD?: number | undefined;
|
|
2237
|
+
} | undefined;
|
|
2238
|
+
}) => Pipeline<[...TCommands, Command<any, never>]>;
|
|
2239
|
+
/**
|
|
2240
|
+
* @see https://redis.io/commands/xread
|
|
2241
|
+
*/
|
|
2242
|
+
xread: (...args: CommandArgs<typeof XReadCommand>) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
|
|
2243
|
+
/**
|
|
2244
|
+
* @see https://redis.io/commands/xreadgroup
|
|
2245
|
+
*/
|
|
2246
|
+
xreadgroup: (...args: CommandArgs<typeof XReadGroupCommand>) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
|
|
2247
|
+
/**
|
|
2248
|
+
* @see https://redis.io/commands/xinfo
|
|
2249
|
+
*/
|
|
2250
|
+
xinfo: (key: string, options: {
|
|
2251
|
+
type: "CONSUMERS";
|
|
2252
|
+
group: string;
|
|
2253
|
+
} | {
|
|
2254
|
+
type: "GROUPS";
|
|
2255
|
+
}) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
|
|
2059
2256
|
/**
|
|
2060
2257
|
* @see https://redis.io/commands/xlen
|
|
2061
2258
|
*/
|
|
2062
2259
|
xlen: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
2260
|
+
/**
|
|
2261
|
+
* @see https://redis.io/commands/xpending
|
|
2262
|
+
*/
|
|
2263
|
+
xpending: (key: string, group: string, start: string, end: string, count: number, options?: {
|
|
2264
|
+
idleTime?: number | undefined;
|
|
2265
|
+
consumer?: string | string[] | undefined;
|
|
2266
|
+
} | undefined) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
|
|
2267
|
+
/**
|
|
2268
|
+
* @see https://redis.io/commands/xclaim
|
|
2269
|
+
*/
|
|
2270
|
+
xclaim: (key: string, group: string, consumer: string, minIdleTime: number, id: string | string[], options?: {
|
|
2271
|
+
idleMS?: number | undefined;
|
|
2272
|
+
timeMS?: number | undefined;
|
|
2273
|
+
retryCount?: number | undefined;
|
|
2274
|
+
force?: boolean | undefined;
|
|
2275
|
+
justId?: boolean | undefined;
|
|
2276
|
+
lastId?: number | undefined;
|
|
2277
|
+
} | undefined) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
|
|
2278
|
+
/**
|
|
2279
|
+
* @see https://redis.io/commands/xautoclaim
|
|
2280
|
+
*/
|
|
2281
|
+
xautoclaim: (key: string, group: string, consumer: string, minIdleTime: number, start: string, options?: {
|
|
2282
|
+
count?: number | undefined;
|
|
2283
|
+
justId?: boolean | undefined;
|
|
2284
|
+
} | undefined) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
|
|
2063
2285
|
/**
|
|
2064
2286
|
* @see https://redis.io/commands/xtrim
|
|
2065
2287
|
*/
|
|
@@ -2154,7 +2376,7 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
2154
2376
|
/**
|
|
2155
2377
|
* @see https://redis.io/commands/zscan
|
|
2156
2378
|
*/
|
|
2157
|
-
zscan: (key: string, cursor: number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [
|
|
2379
|
+
zscan: (key: string, cursor: string | number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [string, (string | number)[]]>]>;
|
|
2158
2380
|
/**
|
|
2159
2381
|
* @see https://redis.io/commands/zscore
|
|
2160
2382
|
*/
|
|
@@ -2207,96 +2429,6 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
2207
2429
|
* @see https://redis.io/commands/json.forget
|
|
2208
2430
|
*/
|
|
2209
2431
|
forget: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
2210
|
-
/**
|
|
2211
|
-
* @see https://redis.io/commands/geoadd
|
|
2212
|
-
*/
|
|
2213
|
-
geoadd: (args_0: string, args_1: GeoAddCommandOptions | GeoMember<unknown>, ...args_2: GeoMember<unknown>[]) => Pipeline<[...TCommands, Command<any, number | null>]>;
|
|
2214
|
-
/**
|
|
2215
|
-
* @see https://redis.io/commands/geodist
|
|
2216
|
-
*/
|
|
2217
|
-
geodist: (key: string, member1: unknown, member2: unknown, unit?: "M" | "KM" | "FT" | "MI" | undefined) => Pipeline<[...TCommands, Command<any, number | null>]>;
|
|
2218
|
-
/**
|
|
2219
|
-
* @see https://redis.io/commands/geopos
|
|
2220
|
-
*/
|
|
2221
|
-
geopos: (args_0: string, ...args_1: unknown[]) => Pipeline<[...TCommands, Command<any, {
|
|
2222
|
-
lng: number;
|
|
2223
|
-
lat: number;
|
|
2224
|
-
}[]>]>;
|
|
2225
|
-
/**
|
|
2226
|
-
* @see https://redis.io/commands/geohash
|
|
2227
|
-
*/
|
|
2228
|
-
geohash: (args_0: string, ...args_1: unknown[]) => Pipeline<[...TCommands, Command<any, (string | null)[]>]>;
|
|
2229
|
-
/**
|
|
2230
|
-
* @see https://redis.io/commands/geosearch
|
|
2231
|
-
*/
|
|
2232
|
-
geosearch: (key: string, centerPoint: {
|
|
2233
|
-
type: "FROMLONLAT" | "fromlonlat";
|
|
2234
|
-
coordinate: {
|
|
2235
|
-
lon: number;
|
|
2236
|
-
lat: number;
|
|
2237
|
-
};
|
|
2238
|
-
} | {
|
|
2239
|
-
type: "FROMMEMBER" | "frommember";
|
|
2240
|
-
member: unknown;
|
|
2241
|
-
}, shape: {
|
|
2242
|
-
type: "BYRADIUS" | "byradius";
|
|
2243
|
-
radius: number;
|
|
2244
|
-
radiusType: "M" | "KM" | "FT" | "MI";
|
|
2245
|
-
} | {
|
|
2246
|
-
type: "BYBOX" | "bybox";
|
|
2247
|
-
rect: {
|
|
2248
|
-
width: number;
|
|
2249
|
-
height: number;
|
|
2250
|
-
};
|
|
2251
|
-
rectType: "M" | "KM" | "FT" | "MI";
|
|
2252
|
-
}, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
|
|
2253
|
-
count?: {
|
|
2254
|
-
limit: number;
|
|
2255
|
-
any?: boolean | undefined;
|
|
2256
|
-
} | undefined;
|
|
2257
|
-
withCoord?: boolean | undefined;
|
|
2258
|
-
withDist?: boolean | undefined;
|
|
2259
|
-
withHash?: boolean | undefined;
|
|
2260
|
-
} | undefined) => Pipeline<[...TCommands, Command<any, ({
|
|
2261
|
-
member: unknown;
|
|
2262
|
-
} & {
|
|
2263
|
-
coord?: {
|
|
2264
|
-
long: number;
|
|
2265
|
-
lat: number;
|
|
2266
|
-
} | undefined;
|
|
2267
|
-
dist?: number | undefined;
|
|
2268
|
-
hash?: string | undefined;
|
|
2269
|
-
})[]>]>;
|
|
2270
|
-
/**
|
|
2271
|
-
* @see https://redis.io/commands/geosearchstore
|
|
2272
|
-
*/
|
|
2273
|
-
geosearchstore: (destination: string, key: string, centerPoint: {
|
|
2274
|
-
type: "FROMLONLAT" | "fromlonlat";
|
|
2275
|
-
coordinate: {
|
|
2276
|
-
lon: number;
|
|
2277
|
-
lat: number;
|
|
2278
|
-
};
|
|
2279
|
-
} | {
|
|
2280
|
-
type: "FROMMEMBER" | "frommember";
|
|
2281
|
-
member: unknown;
|
|
2282
|
-
}, shape: {
|
|
2283
|
-
type: "BYRADIUS" | "byradius";
|
|
2284
|
-
radius: number;
|
|
2285
|
-
radiusType: "M" | "KM" | "FT" | "MI";
|
|
2286
|
-
} | {
|
|
2287
|
-
type: "BYBOX" | "bybox";
|
|
2288
|
-
rect: {
|
|
2289
|
-
width: number;
|
|
2290
|
-
height: number;
|
|
2291
|
-
};
|
|
2292
|
-
rectType: "M" | "KM" | "FT" | "MI";
|
|
2293
|
-
}, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
|
|
2294
|
-
count?: {
|
|
2295
|
-
limit: number;
|
|
2296
|
-
any?: boolean | undefined;
|
|
2297
|
-
} | undefined;
|
|
2298
|
-
storeDist?: boolean | undefined;
|
|
2299
|
-
} | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
2300
2432
|
/**
|
|
2301
2433
|
* @see https://redis.io/commands/json.get
|
|
2302
2434
|
*/
|
|
@@ -2403,6 +2535,7 @@ declare class Redis {
|
|
|
2403
2535
|
protected client: Requester;
|
|
2404
2536
|
protected opts?: CommandOptions<any, any>;
|
|
2405
2537
|
protected enableTelemetry: boolean;
|
|
2538
|
+
protected enableAutoPipelining: boolean;
|
|
2406
2539
|
/**
|
|
2407
2540
|
* Create a new redis client
|
|
2408
2541
|
*
|
|
@@ -2452,104 +2585,14 @@ declare class Redis {
|
|
|
2452
2585
|
* @see https://redis.io/commands/json.forget
|
|
2453
2586
|
*/
|
|
2454
2587
|
forget: (key: string, path?: string | undefined) => Promise<number>;
|
|
2455
|
-
/**
|
|
2456
|
-
* @see https://redis.io/commands/geoadd
|
|
2457
|
-
*/
|
|
2458
|
-
geoadd: (args_0: string, args_1: GeoAddCommandOptions | GeoMember<unknown>, ...args_2: GeoMember<unknown>[]) => Promise<number | null>;
|
|
2459
|
-
/**
|
|
2460
|
-
* @see https://redis.io/commands/geopos
|
|
2461
|
-
*/
|
|
2462
|
-
geopos: (args_0: string, ...args_1: unknown[]) => Promise<{
|
|
2463
|
-
lng: number;
|
|
2464
|
-
lat: number;
|
|
2465
|
-
}[]>;
|
|
2466
|
-
/**
|
|
2467
|
-
* @see https://redis.io/commands/geodist
|
|
2468
|
-
*/
|
|
2469
|
-
geodist: (key: string, member1: unknown, member2: unknown, unit?: "M" | "KM" | "FT" | "MI" | undefined) => Promise<number | null>;
|
|
2470
|
-
/**
|
|
2471
|
-
* @see https://redis.io/commands/geohash
|
|
2472
|
-
*/
|
|
2473
|
-
geohash: (args_0: string, ...args_1: unknown[]) => Promise<(string | null)[]>;
|
|
2474
|
-
/**
|
|
2475
|
-
* @see https://redis.io/commands/geosearch
|
|
2476
|
-
*/
|
|
2477
|
-
geosearch: (key: string, centerPoint: {
|
|
2478
|
-
type: "FROMLONLAT" | "fromlonlat";
|
|
2479
|
-
coordinate: {
|
|
2480
|
-
lon: number;
|
|
2481
|
-
lat: number;
|
|
2482
|
-
};
|
|
2483
|
-
} | {
|
|
2484
|
-
type: "FROMMEMBER" | "frommember";
|
|
2485
|
-
member: unknown;
|
|
2486
|
-
}, shape: {
|
|
2487
|
-
type: "BYRADIUS" | "byradius";
|
|
2488
|
-
radius: number;
|
|
2489
|
-
radiusType: "M" | "KM" | "FT" | "MI";
|
|
2490
|
-
} | {
|
|
2491
|
-
type: "BYBOX" | "bybox";
|
|
2492
|
-
rect: {
|
|
2493
|
-
width: number;
|
|
2494
|
-
height: number;
|
|
2495
|
-
};
|
|
2496
|
-
rectType: "M" | "KM" | "FT" | "MI";
|
|
2497
|
-
}, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
|
|
2498
|
-
count?: {
|
|
2499
|
-
limit: number;
|
|
2500
|
-
any?: boolean | undefined;
|
|
2501
|
-
} | undefined;
|
|
2502
|
-
withCoord?: boolean | undefined;
|
|
2503
|
-
withDist?: boolean | undefined;
|
|
2504
|
-
withHash?: boolean | undefined;
|
|
2505
|
-
} | undefined) => Promise<({
|
|
2506
|
-
member: unknown;
|
|
2507
|
-
} & {
|
|
2508
|
-
coord?: {
|
|
2509
|
-
long: number;
|
|
2510
|
-
lat: number;
|
|
2511
|
-
} | undefined;
|
|
2512
|
-
dist?: number | undefined;
|
|
2513
|
-
hash?: string | undefined;
|
|
2514
|
-
})[]>;
|
|
2515
|
-
/**
|
|
2516
|
-
* @see https://redis.io/commands/geosearchstore
|
|
2517
|
-
*/
|
|
2518
|
-
geosearchstore: (destination: string, key: string, centerPoint: {
|
|
2519
|
-
type: "FROMLONLAT" | "fromlonlat";
|
|
2520
|
-
coordinate: {
|
|
2521
|
-
lon: number;
|
|
2522
|
-
lat: number;
|
|
2523
|
-
};
|
|
2524
|
-
} | {
|
|
2525
|
-
type: "FROMMEMBER" | "frommember";
|
|
2526
|
-
member: unknown;
|
|
2527
|
-
}, shape: {
|
|
2528
|
-
type: "BYRADIUS" | "byradius";
|
|
2529
|
-
radius: number;
|
|
2530
|
-
radiusType: "M" | "KM" | "FT" | "MI";
|
|
2531
|
-
} | {
|
|
2532
|
-
type: "BYBOX" | "bybox";
|
|
2533
|
-
rect: {
|
|
2534
|
-
width: number;
|
|
2535
|
-
height: number;
|
|
2536
|
-
};
|
|
2537
|
-
rectType: "M" | "KM" | "FT" | "MI";
|
|
2538
|
-
}, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
|
|
2539
|
-
count?: {
|
|
2540
|
-
limit: number;
|
|
2541
|
-
any?: boolean | undefined;
|
|
2542
|
-
} | undefined;
|
|
2543
|
-
storeDist?: boolean | undefined;
|
|
2544
|
-
} | undefined) => Promise<number>;
|
|
2545
2588
|
/**
|
|
2546
2589
|
* @see https://redis.io/commands/json.get
|
|
2547
2590
|
*/
|
|
2548
|
-
get: (...args: CommandArgs<typeof JsonGetCommand>) => Promise<
|
|
2591
|
+
get: <TData>(...args: CommandArgs<typeof JsonGetCommand>) => Promise<TData | null>;
|
|
2549
2592
|
/**
|
|
2550
2593
|
* @see https://redis.io/commands/json.mget
|
|
2551
2594
|
*/
|
|
2552
|
-
mget: (keys: string[], path: string) => Promise<
|
|
2595
|
+
mget: <TData_1>(keys: string[], path: string) => Promise<TData_1>;
|
|
2553
2596
|
/**
|
|
2554
2597
|
* @see https://redis.io/commands/json.numincrby
|
|
2555
2598
|
*/
|
|
@@ -2612,6 +2655,7 @@ declare class Redis {
|
|
|
2612
2655
|
* @see {@link Pipeline}
|
|
2613
2656
|
*/
|
|
2614
2657
|
pipeline: () => Pipeline<[]>;
|
|
2658
|
+
protected autoPipeline: () => Redis;
|
|
2615
2659
|
/**
|
|
2616
2660
|
* Create a new transaction to allow executing multiple steps atomically.
|
|
2617
2661
|
*
|
|
@@ -2697,6 +2741,96 @@ declare class Redis {
|
|
|
2697
2741
|
flushdb: (opts?: {
|
|
2698
2742
|
async?: boolean | undefined;
|
|
2699
2743
|
} | undefined) => Promise<"OK">;
|
|
2744
|
+
/**
|
|
2745
|
+
* @see https://redis.io/commands/geoadd
|
|
2746
|
+
*/
|
|
2747
|
+
geoadd: <TData>(args_0: string, args_1: GeoAddCommandOptions | GeoMember<TData>, ...args_2: GeoMember<TData>[]) => Promise<number | null>;
|
|
2748
|
+
/**
|
|
2749
|
+
* @see https://redis.io/commands/geopos
|
|
2750
|
+
*/
|
|
2751
|
+
geopos: <TData>(args_0: string, ...args_1: TData[]) => Promise<{
|
|
2752
|
+
lng: number;
|
|
2753
|
+
lat: number;
|
|
2754
|
+
}[]>;
|
|
2755
|
+
/**
|
|
2756
|
+
* @see https://redis.io/commands/geodist
|
|
2757
|
+
*/
|
|
2758
|
+
geodist: <TData>(key: string, member1: TData, member2: TData, unit?: "M" | "KM" | "FT" | "MI" | undefined) => Promise<number | null>;
|
|
2759
|
+
/**
|
|
2760
|
+
* @see https://redis.io/commands/geohash
|
|
2761
|
+
*/
|
|
2762
|
+
geohash: <TData>(args_0: string, ...args_1: TData[]) => Promise<(string | null)[]>;
|
|
2763
|
+
/**
|
|
2764
|
+
* @see https://redis.io/commands/geosearch
|
|
2765
|
+
*/
|
|
2766
|
+
geosearch: <TData>(key: string, centerPoint: {
|
|
2767
|
+
type: "FROMLONLAT" | "fromlonlat";
|
|
2768
|
+
coordinate: {
|
|
2769
|
+
lon: number;
|
|
2770
|
+
lat: number;
|
|
2771
|
+
};
|
|
2772
|
+
} | {
|
|
2773
|
+
type: "FROMMEMBER" | "frommember";
|
|
2774
|
+
member: TData;
|
|
2775
|
+
}, shape: {
|
|
2776
|
+
type: "BYRADIUS" | "byradius";
|
|
2777
|
+
radius: number;
|
|
2778
|
+
radiusType: "M" | "KM" | "FT" | "MI";
|
|
2779
|
+
} | {
|
|
2780
|
+
type: "BYBOX" | "bybox";
|
|
2781
|
+
rect: {
|
|
2782
|
+
width: number;
|
|
2783
|
+
height: number;
|
|
2784
|
+
};
|
|
2785
|
+
rectType: "M" | "KM" | "FT" | "MI";
|
|
2786
|
+
}, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
|
|
2787
|
+
count?: {
|
|
2788
|
+
limit: number;
|
|
2789
|
+
any?: boolean | undefined;
|
|
2790
|
+
} | undefined;
|
|
2791
|
+
withCoord?: boolean | undefined;
|
|
2792
|
+
withDist?: boolean | undefined;
|
|
2793
|
+
withHash?: boolean | undefined;
|
|
2794
|
+
} | undefined) => Promise<({
|
|
2795
|
+
member: TData;
|
|
2796
|
+
} & {
|
|
2797
|
+
coord?: {
|
|
2798
|
+
long: number;
|
|
2799
|
+
lat: number;
|
|
2800
|
+
} | undefined;
|
|
2801
|
+
dist?: number | undefined;
|
|
2802
|
+
hash?: string | undefined;
|
|
2803
|
+
})[]>;
|
|
2804
|
+
/**
|
|
2805
|
+
* @see https://redis.io/commands/geosearchstore
|
|
2806
|
+
*/
|
|
2807
|
+
geosearchstore: <TData>(destination: string, key: string, centerPoint: {
|
|
2808
|
+
type: "FROMLONLAT" | "fromlonlat";
|
|
2809
|
+
coordinate: {
|
|
2810
|
+
lon: number;
|
|
2811
|
+
lat: number;
|
|
2812
|
+
};
|
|
2813
|
+
} | {
|
|
2814
|
+
type: "FROMMEMBER" | "frommember";
|
|
2815
|
+
member: TData;
|
|
2816
|
+
}, shape: {
|
|
2817
|
+
type: "BYRADIUS" | "byradius";
|
|
2818
|
+
radius: number;
|
|
2819
|
+
radiusType: "M" | "KM" | "FT" | "MI";
|
|
2820
|
+
} | {
|
|
2821
|
+
type: "BYBOX" | "bybox";
|
|
2822
|
+
rect: {
|
|
2823
|
+
width: number;
|
|
2824
|
+
height: number;
|
|
2825
|
+
};
|
|
2826
|
+
rectType: "M" | "KM" | "FT" | "MI";
|
|
2827
|
+
}, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
|
|
2828
|
+
count?: {
|
|
2829
|
+
limit: number;
|
|
2830
|
+
any?: boolean | undefined;
|
|
2831
|
+
} | undefined;
|
|
2832
|
+
storeDist?: boolean | undefined;
|
|
2833
|
+
} | undefined) => Promise<number>;
|
|
2700
2834
|
/**
|
|
2701
2835
|
* @see https://redis.io/commands/get
|
|
2702
2836
|
*/
|
|
@@ -2763,14 +2897,14 @@ declare class Redis {
|
|
|
2763
2897
|
* @see https://redis.io/commands/hrandfield
|
|
2764
2898
|
*/
|
|
2765
2899
|
hrandfield: {
|
|
2766
|
-
(key: string): Promise<string>;
|
|
2900
|
+
(key: string): Promise<string | null>;
|
|
2767
2901
|
(key: string, count: number): Promise<string[]>;
|
|
2768
2902
|
<TData extends Record<string, unknown>>(key: string, count: number, withValues: boolean): Promise<Partial<TData>>;
|
|
2769
2903
|
};
|
|
2770
2904
|
/**
|
|
2771
2905
|
* @see https://redis.io/commands/hscan
|
|
2772
2906
|
*/
|
|
2773
|
-
hscan: (key: string, cursor: number, cmdOpts?: ScanCommandOptions | undefined) => Promise<[
|
|
2907
|
+
hscan: (key: string, cursor: string | number, cmdOpts?: ScanCommandOptions | undefined) => Promise<[string, (string | number)[]]>;
|
|
2774
2908
|
/**
|
|
2775
2909
|
* @see https://redis.io/commands/hset
|
|
2776
2910
|
*/
|
|
@@ -2825,6 +2959,10 @@ declare class Redis {
|
|
|
2825
2959
|
* @see https://redis.io/commands/lpop
|
|
2826
2960
|
*/
|
|
2827
2961
|
lpop: <TData>(key: string, count?: number | undefined) => Promise<TData | null>;
|
|
2962
|
+
/**
|
|
2963
|
+
* @see https://redis.io/commands/lmpop
|
|
2964
|
+
*/
|
|
2965
|
+
lmpop: <TData>(numkeys: number, keys: string[], args_2: "LEFT" | "RIGHT", count?: number | undefined) => Promise<[string, TData[]] | null>;
|
|
2828
2966
|
/**
|
|
2829
2967
|
* @see https://redis.io/commands/lpos
|
|
2830
2968
|
*/
|
|
@@ -2944,7 +3082,7 @@ declare class Redis {
|
|
|
2944
3082
|
/**
|
|
2945
3083
|
* @see https://redis.io/commands/scan
|
|
2946
3084
|
*/
|
|
2947
|
-
scan: (cursor: number, opts?: ScanCommandOptions | undefined) => Promise<[
|
|
3085
|
+
scan: (cursor: string | number, opts?: ScanCommandOptions | undefined) => Promise<[string, string[]]>;
|
|
2948
3086
|
/**
|
|
2949
3087
|
* @see https://redis.io/commands/scard
|
|
2950
3088
|
*/
|
|
@@ -3028,7 +3166,7 @@ declare class Redis {
|
|
|
3028
3166
|
/**
|
|
3029
3167
|
* @see https://redis.io/commands/sscan
|
|
3030
3168
|
*/
|
|
3031
|
-
sscan: (key: string, cursor: number, opts?: ScanCommandOptions | undefined) => Promise<[
|
|
3169
|
+
sscan: (key: string, cursor: string | number, opts?: ScanCommandOptions | undefined) => Promise<[string, (string | number)[]]>;
|
|
3032
3170
|
/**
|
|
3033
3171
|
* @see https://redis.io/commands/strlen
|
|
3034
3172
|
*/
|
|
@@ -3082,14 +3220,90 @@ declare class Redis {
|
|
|
3082
3220
|
limit?: undefined;
|
|
3083
3221
|
})) | undefined;
|
|
3084
3222
|
} | undefined) => Promise<string>;
|
|
3223
|
+
/**
|
|
3224
|
+
* @see https://redis.io/commands/xack
|
|
3225
|
+
*/
|
|
3226
|
+
xack: (key: string, group: string, id: string | string[]) => Promise<number>;
|
|
3085
3227
|
/**
|
|
3086
3228
|
* @see https://redis.io/commands/xdel
|
|
3087
3229
|
*/
|
|
3088
3230
|
xdel: (key: string, ids: string | string[]) => Promise<number>;
|
|
3231
|
+
/**
|
|
3232
|
+
* @see https://redis.io/commands/xgroup
|
|
3233
|
+
*/
|
|
3234
|
+
xgroup: (key: string, opts: {
|
|
3235
|
+
type: "CREATE";
|
|
3236
|
+
group: string;
|
|
3237
|
+
id: string;
|
|
3238
|
+
options?: {
|
|
3239
|
+
MKSTREAM?: boolean | undefined;
|
|
3240
|
+
ENTRIESREAD?: number | undefined;
|
|
3241
|
+
} | undefined;
|
|
3242
|
+
} | {
|
|
3243
|
+
type: "CREATECONSUMER";
|
|
3244
|
+
group: string;
|
|
3245
|
+
consumer: string;
|
|
3246
|
+
} | {
|
|
3247
|
+
type: "DELCONSUMER";
|
|
3248
|
+
group: string;
|
|
3249
|
+
consumer: string;
|
|
3250
|
+
} | {
|
|
3251
|
+
type: "DESTROY";
|
|
3252
|
+
group: string;
|
|
3253
|
+
} | {
|
|
3254
|
+
type: "SETID";
|
|
3255
|
+
group: string;
|
|
3256
|
+
id: string;
|
|
3257
|
+
options?: {
|
|
3258
|
+
ENTRIESREAD?: number | undefined;
|
|
3259
|
+
} | undefined;
|
|
3260
|
+
}) => Promise<never>;
|
|
3261
|
+
/**
|
|
3262
|
+
* @see https://redis.io/commands/xread
|
|
3263
|
+
*/
|
|
3264
|
+
xread: (...args: CommandArgs<typeof XReadCommand>) => Promise<unknown[]>;
|
|
3265
|
+
/**
|
|
3266
|
+
* @see https://redis.io/commands/xreadgroup
|
|
3267
|
+
*/
|
|
3268
|
+
xreadgroup: (...args: CommandArgs<typeof XReadGroupCommand>) => Promise<unknown[]>;
|
|
3269
|
+
/**
|
|
3270
|
+
* @see https://redis.io/commands/xinfo
|
|
3271
|
+
*/
|
|
3272
|
+
xinfo: (key: string, options: {
|
|
3273
|
+
type: "CONSUMERS";
|
|
3274
|
+
group: string;
|
|
3275
|
+
} | {
|
|
3276
|
+
type: "GROUPS";
|
|
3277
|
+
}) => Promise<unknown[]>;
|
|
3089
3278
|
/**
|
|
3090
3279
|
* @see https://redis.io/commands/xlen
|
|
3091
3280
|
*/
|
|
3092
3281
|
xlen: (key: string) => Promise<number>;
|
|
3282
|
+
/**
|
|
3283
|
+
* @see https://redis.io/commands/xpending
|
|
3284
|
+
*/
|
|
3285
|
+
xpending: (key: string, group: string, start: string, end: string, count: number, options?: {
|
|
3286
|
+
idleTime?: number | undefined;
|
|
3287
|
+
consumer?: string | string[] | undefined;
|
|
3288
|
+
} | undefined) => Promise<unknown[]>;
|
|
3289
|
+
/**
|
|
3290
|
+
* @see https://redis.io/commands/xclaim
|
|
3291
|
+
*/
|
|
3292
|
+
xclaim: (key: string, group: string, consumer: string, minIdleTime: number, id: string | string[], options?: {
|
|
3293
|
+
idleMS?: number | undefined;
|
|
3294
|
+
timeMS?: number | undefined;
|
|
3295
|
+
retryCount?: number | undefined;
|
|
3296
|
+
force?: boolean | undefined;
|
|
3297
|
+
justId?: boolean | undefined;
|
|
3298
|
+
lastId?: number | undefined;
|
|
3299
|
+
} | undefined) => Promise<unknown[]>;
|
|
3300
|
+
/**
|
|
3301
|
+
* @see https://redis.io/commands/xautoclaim
|
|
3302
|
+
*/
|
|
3303
|
+
xautoclaim: (key: string, group: string, consumer: string, minIdleTime: number, start: string, options?: {
|
|
3304
|
+
count?: number | undefined;
|
|
3305
|
+
justId?: boolean | undefined;
|
|
3306
|
+
} | undefined) => Promise<unknown[]>;
|
|
3093
3307
|
/**
|
|
3094
3308
|
* @see https://redis.io/commands/xtrim
|
|
3095
3309
|
*/
|
|
@@ -3110,7 +3324,11 @@ declare class Redis {
|
|
|
3110
3324
|
/**
|
|
3111
3325
|
* @see https://redis.io/commands/zadd
|
|
3112
3326
|
*/
|
|
3113
|
-
zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [
|
|
3327
|
+
zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [
|
|
3328
|
+
key: string,
|
|
3329
|
+
opts: ZAddCommandOptions,
|
|
3330
|
+
...scoreMemberPairs: [ScoreMember<TData>, ...ScoreMember<TData>[]]
|
|
3331
|
+
]) => Promise<number | null>;
|
|
3114
3332
|
/**
|
|
3115
3333
|
* @see https://redis.io/commands/zcard
|
|
3116
3334
|
*/
|
|
@@ -3192,7 +3410,7 @@ declare class Redis {
|
|
|
3192
3410
|
/**
|
|
3193
3411
|
* @see https://redis.io/commands/zscan
|
|
3194
3412
|
*/
|
|
3195
|
-
zscan: (key: string, cursor: number, opts?: ScanCommandOptions | undefined) => Promise<[
|
|
3413
|
+
zscan: (key: string, cursor: string | number, opts?: ScanCommandOptions | undefined) => Promise<[string, (string | number)[]]>;
|
|
3196
3414
|
/**
|
|
3197
3415
|
* @see https://redis.io/commands/zscore
|
|
3198
3416
|
*/
|
|
@@ -3207,6 +3425,27 @@ declare class Redis {
|
|
|
3207
3425
|
zunionstore: (destination: string, numKeys: number, keys: string[], opts?: ZUnionStoreCommandOptions | undefined) => Promise<number>;
|
|
3208
3426
|
}
|
|
3209
3427
|
|
|
3428
|
+
/**
|
|
3429
|
+
* Result of a bad request to upstash
|
|
3430
|
+
*/
|
|
3431
|
+
declare class UpstashError extends Error {
|
|
3432
|
+
constructor(message: string);
|
|
3433
|
+
}
|
|
3434
|
+
declare class UrlError extends Error {
|
|
3435
|
+
constructor(url: string);
|
|
3436
|
+
}
|
|
3437
|
+
|
|
3438
|
+
type error_UpstashError = UpstashError;
|
|
3439
|
+
declare const error_UpstashError: typeof UpstashError;
|
|
3440
|
+
type error_UrlError = UrlError;
|
|
3441
|
+
declare const error_UrlError: typeof UrlError;
|
|
3442
|
+
declare namespace error {
|
|
3443
|
+
export {
|
|
3444
|
+
error_UpstashError as UpstashError,
|
|
3445
|
+
error_UrlError as UrlError,
|
|
3446
|
+
};
|
|
3447
|
+
}
|
|
3448
|
+
|
|
3210
3449
|
/**
|
|
3211
3450
|
* @see https://redis.io/commands/zdiffstore
|
|
3212
3451
|
*/
|
|
@@ -3221,4 +3460,4 @@ declare class ZMScoreCommand<TData> extends Command<string[] | null, number[] |
|
|
|
3221
3460
|
constructor(cmd: [key: string, members: TData[]], opts?: CommandOptions<string[] | null, number[] | null>);
|
|
3222
3461
|
}
|
|
3223
3462
|
|
|
3224
|
-
export {
|
|
3463
|
+
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, RedisOptions as R, HLenCommand as S, HMGetCommand as T, UpstashRequest as U, HMSetCommand as V, HRandFieldCommand as W, HScanCommand as X, HSetCommand as Y, HSetNXCommand as Z, HStrLenCommand as _, 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, ScanCommandOptions as aS, SCardCommand as aT, ScriptExistsCommand as aU, ScriptFlushCommand as aV, ScriptLoadCommand as aW, SDiffCommand as aX, SDiffStoreCommand as aY, SetCommand as aZ, 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, 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, ZUnionCommandOptions as bM, ZUnionStoreCommand as bN, 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 as bj, TypeCommand as bk, UnlinkCommand as bl, XAddCommand as bm, XRangeCommand as bn, ScoreMember as bo, ZAddCommandOptions as bp, ZAddCommand as bq, ZCardCommand as br, ZCountCommand as bs, ZDiffStoreCommand as bt, ZIncrByCommand as bu, ZInterStoreCommand as bv, ZInterStoreCommandOptions as bw, ZLexCountCommand as bx, ZMScoreCommand as by, ZPopMaxCommand as bz, Requester as c, UpstashResponse 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, GeoAddCommandOptions as q, 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 };
|