@upstash/redis 0.0.0-ci.fd62df5f23c9d3ce31f52781474d711bbed876d2-20231031095501 → 0.0.0-ci.ff7a0b135b28ff50a7e2634a78123684be3ed71f-20241105152627
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 +7 -3
- package/chunk-O2BCOVQA.mjs +3809 -0
- package/cloudflare.d.mts +15 -5
- package/cloudflare.d.ts +15 -5
- package/cloudflare.js +3921 -1
- package/cloudflare.mjs +93 -1
- package/fastly.d.mts +10 -5
- package/fastly.d.ts +10 -5
- package/fastly.js +3894 -1
- package/fastly.mjs +66 -1
- package/nodejs.d.mts +17 -24
- package/nodejs.d.ts +17 -24
- package/nodejs.js +3941 -1
- package/nodejs.mjs +113 -1
- package/package.json +1 -1
- package/{zmscore-10fd3773.d.ts → zmscore-Dc6Llqgr.d.mts} +721 -338
- package/zmscore-Dc6Llqgr.d.ts +3509 -0
- package/chunk-6556OV4Z.mjs +0 -1
- package/chunk-ZI3I2JE2.js +0 -1
|
@@ -23,7 +23,10 @@ type RedisOptions = {
|
|
|
23
23
|
* @default true
|
|
24
24
|
*/
|
|
25
25
|
automaticDeserialization?: boolean;
|
|
26
|
+
latencyLogging?: boolean;
|
|
26
27
|
enableTelemetry?: boolean;
|
|
28
|
+
enableAutoPipelining?: boolean;
|
|
29
|
+
readYourWrites?: boolean;
|
|
27
30
|
};
|
|
28
31
|
|
|
29
32
|
type CacheSetting = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload";
|
|
@@ -33,12 +36,21 @@ type UpstashRequest = {
|
|
|
33
36
|
* Request body will be serialized to json
|
|
34
37
|
*/
|
|
35
38
|
body?: unknown;
|
|
39
|
+
upstashSyncToken?: string;
|
|
36
40
|
};
|
|
37
41
|
type UpstashResponse<TResult> = {
|
|
38
42
|
result?: TResult;
|
|
39
43
|
error?: string;
|
|
40
44
|
};
|
|
41
45
|
interface Requester {
|
|
46
|
+
/**
|
|
47
|
+
* When this flag is enabled, any subsequent commands issued by this client are guaranteed to observe the effects of all earlier writes submitted by the same client.
|
|
48
|
+
*/
|
|
49
|
+
readYourWrites?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* This token is used to ensure that the client is in sync with the server. On each request, we send this token in the header, and the server will return a new token.
|
|
52
|
+
*/
|
|
53
|
+
upstashSyncToken?: string;
|
|
42
54
|
request: <TResult = unknown>(req: UpstashRequest) => Promise<UpstashResponse<TResult>>;
|
|
43
55
|
}
|
|
44
56
|
type RetryConfig = false | {
|
|
@@ -106,6 +118,7 @@ type CommandOptions<TResult, TData> = {
|
|
|
106
118
|
* @default true
|
|
107
119
|
*/
|
|
108
120
|
automaticDeserialization?: boolean;
|
|
121
|
+
latencyLogging?: boolean;
|
|
109
122
|
};
|
|
110
123
|
/**
|
|
111
124
|
* Command offers default (de)serialization and the exec method to all commands.
|
|
@@ -220,8 +233,8 @@ type ScanCommandOptions = {
|
|
|
220
233
|
/**
|
|
221
234
|
* @see https://redis.io/commands/scan
|
|
222
235
|
*/
|
|
223
|
-
declare class ScanCommand extends Command<[
|
|
224
|
-
constructor([cursor, opts]: [cursor: number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[
|
|
236
|
+
declare class ScanCommand extends Command<[string, string[]], [string, string[]]> {
|
|
237
|
+
constructor([cursor, opts]: [cursor: string | number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[string, string[]], [string, string[]]>);
|
|
225
238
|
}
|
|
226
239
|
|
|
227
240
|
type GeoAddCommandOptions = {
|
|
@@ -233,11 +246,11 @@ type GeoAddCommandOptions = {
|
|
|
233
246
|
} & {
|
|
234
247
|
ch?: boolean;
|
|
235
248
|
});
|
|
236
|
-
|
|
249
|
+
type GeoMember<TMemberType> = {
|
|
237
250
|
latitude: number;
|
|
238
251
|
longitude: number;
|
|
239
252
|
member: TMemberType;
|
|
240
|
-
}
|
|
253
|
+
};
|
|
241
254
|
/**
|
|
242
255
|
* @see https://redis.io/commands/geoadd
|
|
243
256
|
*/
|
|
@@ -264,6 +277,28 @@ declare class BitCountCommand extends Command<number, number> {
|
|
|
264
277
|
constructor(cmd: [key: string, start: number, end: number], opts?: CommandOptions<number, number>);
|
|
265
278
|
}
|
|
266
279
|
|
|
280
|
+
type SubCommandArgs<TRest extends unknown[] = []> = [
|
|
281
|
+
encoding: string,
|
|
282
|
+
offset: number | string,
|
|
283
|
+
...rest: TRest
|
|
284
|
+
];
|
|
285
|
+
/**
|
|
286
|
+
* @see https://redis.io/commands/bitfield
|
|
287
|
+
*/
|
|
288
|
+
declare class BitFieldCommand<T = Promise<number[]>> {
|
|
289
|
+
private client;
|
|
290
|
+
private opts?;
|
|
291
|
+
private execOperation;
|
|
292
|
+
private command;
|
|
293
|
+
constructor(args: [key: string], client: Requester, opts?: CommandOptions<number[], number[]> | undefined, execOperation?: (command: Command<number[], number[]>) => T);
|
|
294
|
+
private chain;
|
|
295
|
+
get(...args: SubCommandArgs): this;
|
|
296
|
+
set(...args: SubCommandArgs<[value: number]>): this;
|
|
297
|
+
incrby(...args: SubCommandArgs<[increment: number]>): this;
|
|
298
|
+
overflow(overflow: "WRAP" | "SAT" | "FAIL"): this;
|
|
299
|
+
exec(): T;
|
|
300
|
+
}
|
|
301
|
+
|
|
267
302
|
/**
|
|
268
303
|
* @see https://redis.io/commands/bitop
|
|
269
304
|
*/
|
|
@@ -344,11 +379,9 @@ declare class ExistsCommand extends Command<number, number> {
|
|
|
344
379
|
constructor(cmd: [...keys: string[]], opts?: CommandOptions<number, number>);
|
|
345
380
|
}
|
|
346
381
|
|
|
347
|
-
|
|
348
|
-
* @see https://redis.io/commands/expire
|
|
349
|
-
*/
|
|
382
|
+
type ExpireOptions = "NX" | "nx" | "XX" | "xx" | "GT" | "gt" | "LT" | "lt";
|
|
350
383
|
declare class ExpireCommand extends Command<"0" | "1", 0 | 1> {
|
|
351
|
-
constructor(cmd: [key: string, seconds: number], opts?: CommandOptions<"0" | "1", 0 | 1>);
|
|
384
|
+
constructor(cmd: [key: string, seconds: number, option?: ExpireOptions], opts?: CommandOptions<"0" | "1", 0 | 1>);
|
|
352
385
|
}
|
|
353
386
|
|
|
354
387
|
/**
|
|
@@ -388,6 +421,13 @@ declare class GeoDistCommand<TMemberType = string> extends Command<number | null
|
|
|
388
421
|
], opts?: CommandOptions<number | null, number | null>);
|
|
389
422
|
}
|
|
390
423
|
|
|
424
|
+
/**
|
|
425
|
+
* @see https://redis.io/commands/geohash
|
|
426
|
+
*/
|
|
427
|
+
declare class GeoHashCommand<TMember = string> extends Command<(string | null)[], (string | null)[]> {
|
|
428
|
+
constructor(cmd: [string, ...TMember[]], opts?: CommandOptions<(string | null)[], (string | null)[]>);
|
|
429
|
+
}
|
|
430
|
+
|
|
391
431
|
type Coordinates = {
|
|
392
432
|
lng: number;
|
|
393
433
|
lat: number;
|
|
@@ -399,13 +439,6 @@ declare class GeoPosCommand<TMember = string> extends Command<(string | null)[][
|
|
|
399
439
|
constructor(cmd: [string, ...(TMember[] | TMember[])], opts?: CommandOptions<(string | null)[][], Coordinates[]>);
|
|
400
440
|
}
|
|
401
441
|
|
|
402
|
-
/**
|
|
403
|
-
* @see https://redis.io/commands/geohash
|
|
404
|
-
*/
|
|
405
|
-
declare class GeoHashCommand<TMember = string> extends Command<(string | null)[], (string | null)[]> {
|
|
406
|
-
constructor(cmd: [string, ...(TMember[] | TMember[])], opts?: CommandOptions<(string | null)[], (string | null)[]>);
|
|
407
|
-
}
|
|
408
|
-
|
|
409
442
|
type RadiusOptions$1 = "M" | "KM" | "FT" | "MI";
|
|
410
443
|
type CenterPoint$1<TMemberType> = {
|
|
411
444
|
type: "FROMMEMBER" | "frommember";
|
|
@@ -619,9 +652,7 @@ declare class HMGetCommand<TData extends Record<string, unknown>> extends Comman
|
|
|
619
652
|
* @see https://redis.io/commands/hmset
|
|
620
653
|
*/
|
|
621
654
|
declare class HMSetCommand<TData> extends Command<"OK", "OK"> {
|
|
622
|
-
constructor([key, kv]: [key: string, kv:
|
|
623
|
-
[field: string]: TData;
|
|
624
|
-
}], opts?: CommandOptions<"OK", "OK">);
|
|
655
|
+
constructor([key, kv]: [key: string, kv: Record<string, TData>], opts?: CommandOptions<"OK", "OK">);
|
|
625
656
|
}
|
|
626
657
|
|
|
627
658
|
/**
|
|
@@ -637,22 +668,20 @@ declare class HRandFieldCommand<TData extends string | string[] | Record<string,
|
|
|
637
668
|
* @see https://redis.io/commands/hscan
|
|
638
669
|
*/
|
|
639
670
|
declare class HScanCommand extends Command<[
|
|
640
|
-
|
|
671
|
+
string,
|
|
641
672
|
(string | number)[]
|
|
642
673
|
], [
|
|
643
|
-
|
|
674
|
+
string,
|
|
644
675
|
(string | number)[]
|
|
645
676
|
]> {
|
|
646
|
-
constructor([key, cursor, cmdOpts]: [key: string, cursor: number, cmdOpts?: ScanCommandOptions], opts?: CommandOptions<[
|
|
677
|
+
constructor([key, cursor, cmdOpts]: [key: string, cursor: string | number, cmdOpts?: ScanCommandOptions], opts?: CommandOptions<[string, (string | number)[]], [string, (string | number)[]]>);
|
|
647
678
|
}
|
|
648
679
|
|
|
649
680
|
/**
|
|
650
681
|
* @see https://redis.io/commands/hset
|
|
651
682
|
*/
|
|
652
683
|
declare class HSetCommand<TData> extends Command<number, number> {
|
|
653
|
-
constructor([key, kv]: [key: string, kv:
|
|
654
|
-
[field: string]: TData;
|
|
655
|
-
}], opts?: CommandOptions<number, number>);
|
|
684
|
+
constructor([key, kv]: [key: string, kv: Record<string, TData>], opts?: CommandOptions<number, number>);
|
|
656
685
|
}
|
|
657
686
|
|
|
658
687
|
/**
|
|
@@ -778,10 +807,21 @@ declare class JsonGetCommand<TData extends (unknown | Record<string, unknown>) |
|
|
|
778
807
|
/**
|
|
779
808
|
* @see https://redis.io/commands/json.mget
|
|
780
809
|
*/
|
|
781
|
-
declare class JsonMGetCommand<TData
|
|
810
|
+
declare class JsonMGetCommand<TData = unknown[]> extends Command<TData, TData> {
|
|
782
811
|
constructor(cmd: [keys: string[], path: string], opts?: CommandOptions<TData, TData>);
|
|
783
812
|
}
|
|
784
813
|
|
|
814
|
+
/**
|
|
815
|
+
* @see https://redis.io/commands/json.mset
|
|
816
|
+
*/
|
|
817
|
+
declare class JsonMSetCommand<TData extends number | string | boolean | Record<string, unknown> | (number | string | boolean | Record<string, unknown>)[]> extends Command<"OK" | null, "OK" | null> {
|
|
818
|
+
constructor(cmd: {
|
|
819
|
+
key: string;
|
|
820
|
+
path: string;
|
|
821
|
+
value: TData;
|
|
822
|
+
}[], opts?: CommandOptions<"OK" | null, "OK" | null>);
|
|
823
|
+
}
|
|
824
|
+
|
|
785
825
|
/**
|
|
786
826
|
* @see https://redis.io/commands/json.numincrby
|
|
787
827
|
*/
|
|
@@ -938,25 +978,21 @@ declare class LTrimCommand extends Command<"OK", "OK"> {
|
|
|
938
978
|
* @see https://redis.io/commands/mget
|
|
939
979
|
*/
|
|
940
980
|
declare class MGetCommand<TData extends unknown[]> extends Command<(string | null)[], TData> {
|
|
941
|
-
constructor(cmd: [string[]] | [...
|
|
981
|
+
constructor(cmd: [string[]] | [...string[]], opts?: CommandOptions<(string | null)[], TData>);
|
|
942
982
|
}
|
|
943
983
|
|
|
944
984
|
/**
|
|
945
985
|
* @see https://redis.io/commands/mset
|
|
946
986
|
*/
|
|
947
987
|
declare class MSetCommand<TData> extends Command<"OK", "OK"> {
|
|
948
|
-
constructor([kv]: [kv:
|
|
949
|
-
[key: string]: TData;
|
|
950
|
-
}], opts?: CommandOptions<"OK", "OK">);
|
|
988
|
+
constructor([kv]: [kv: Record<string, TData>], opts?: CommandOptions<"OK", "OK">);
|
|
951
989
|
}
|
|
952
990
|
|
|
953
991
|
/**
|
|
954
992
|
* @see https://redis.io/commands/msetnx
|
|
955
993
|
*/
|
|
956
994
|
declare class MSetNXCommand<TData = string> extends Command<number, number> {
|
|
957
|
-
constructor([kv]: [kv:
|
|
958
|
-
[key: string]: TData;
|
|
959
|
-
}], opts?: CommandOptions<number, number>);
|
|
995
|
+
constructor([kv]: [kv: Record<string, TData>], opts?: CommandOptions<number, number>);
|
|
960
996
|
}
|
|
961
997
|
|
|
962
998
|
/**
|
|
@@ -1054,7 +1090,7 @@ declare class RPushXCommand<TData = string> extends Command<number, number> {
|
|
|
1054
1090
|
* @see https://redis.io/commands/sadd
|
|
1055
1091
|
*/
|
|
1056
1092
|
declare class SAddCommand<TData = string> extends Command<number, number> {
|
|
1057
|
-
constructor(cmd: [key: string, ...members: TData[]], opts?: CommandOptions<number, number>);
|
|
1093
|
+
constructor(cmd: [key: string, member: TData, ...members: TData[]], opts?: CommandOptions<number, number>);
|
|
1058
1094
|
}
|
|
1059
1095
|
|
|
1060
1096
|
/**
|
|
@@ -1242,13 +1278,13 @@ declare class SRemCommand<TData = string> extends Command<number, number> {
|
|
|
1242
1278
|
* @see https://redis.io/commands/sscan
|
|
1243
1279
|
*/
|
|
1244
1280
|
declare class SScanCommand extends Command<[
|
|
1245
|
-
|
|
1281
|
+
string,
|
|
1246
1282
|
(string | number)[]
|
|
1247
1283
|
], [
|
|
1248
|
-
|
|
1284
|
+
string,
|
|
1249
1285
|
(string | number)[]
|
|
1250
1286
|
]> {
|
|
1251
|
-
constructor([key, cursor, opts]: [key: string, cursor: number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[
|
|
1287
|
+
constructor([key, cursor, opts]: [key: string, cursor: string | number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[string, (string | number)[]], [string, (string | number)[]]>);
|
|
1252
1288
|
}
|
|
1253
1289
|
|
|
1254
1290
|
/**
|
|
@@ -1323,9 +1359,7 @@ declare class XAddCommand extends Command<string, string> {
|
|
|
1323
1359
|
constructor([key, id, entries, opts]: [
|
|
1324
1360
|
key: string,
|
|
1325
1361
|
id: "*" | string,
|
|
1326
|
-
entries:
|
|
1327
|
-
[field: string]: unknown;
|
|
1328
|
-
},
|
|
1362
|
+
entries: Record<string, unknown>,
|
|
1329
1363
|
opts?: XAddCommandOptions
|
|
1330
1364
|
], commandOptions?: CommandOptions<string, string>);
|
|
1331
1365
|
}
|
|
@@ -1334,7 +1368,55 @@ declare class XRangeCommand<TData extends Record<string, Record<string, unknown>
|
|
|
1334
1368
|
constructor([key, start, end, count]: [key: string, start: string, end: string, count?: number], opts?: CommandOptions<unknown[], TData[]>);
|
|
1335
1369
|
}
|
|
1336
1370
|
|
|
1337
|
-
type
|
|
1371
|
+
type XReadCommandOptions = [
|
|
1372
|
+
key: string | string[],
|
|
1373
|
+
id: string | string[],
|
|
1374
|
+
options?: {
|
|
1375
|
+
count?: number;
|
|
1376
|
+
blockMS?: number;
|
|
1377
|
+
}
|
|
1378
|
+
];
|
|
1379
|
+
type XReadOptions = XReadCommandOptions extends [infer K, infer I, ...any[]] ? K extends string ? I extends string ? [key: string, id: string, options?: {
|
|
1380
|
+
count?: number;
|
|
1381
|
+
blockMS?: number;
|
|
1382
|
+
}] : never : K extends string[] ? I extends string[] ? [key: string[], id: string[], options?: {
|
|
1383
|
+
count?: number;
|
|
1384
|
+
blockMS?: number;
|
|
1385
|
+
}] : never : never : never;
|
|
1386
|
+
/**
|
|
1387
|
+
* @see https://redis.io/commands/xread
|
|
1388
|
+
*/
|
|
1389
|
+
declare class XReadCommand extends Command<number, unknown[]> {
|
|
1390
|
+
constructor([key, id, options]: XReadOptions, opts?: CommandOptions<number, unknown[]>);
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
type Options = {
|
|
1394
|
+
count?: number;
|
|
1395
|
+
blockMS?: number;
|
|
1396
|
+
NOACK?: boolean;
|
|
1397
|
+
};
|
|
1398
|
+
type XReadGroupCommandOptions = [
|
|
1399
|
+
group: string,
|
|
1400
|
+
consumer: string,
|
|
1401
|
+
key: string | string[],
|
|
1402
|
+
id: string | string[],
|
|
1403
|
+
options?: Options
|
|
1404
|
+
];
|
|
1405
|
+
type XReadGroupOptions = XReadGroupCommandOptions extends [
|
|
1406
|
+
string,
|
|
1407
|
+
string,
|
|
1408
|
+
infer TKey,
|
|
1409
|
+
infer TId,
|
|
1410
|
+
...any[]
|
|
1411
|
+
] ? TKey extends string ? TId extends string ? [group: string, consumer: string, key: string, id: string, options?: Options] : never : TKey extends string[] ? TId extends string[] ? [group: string, consumer: string, key: string[], id: string[], options?: Options] : never : never : never;
|
|
1412
|
+
/**
|
|
1413
|
+
* @see https://redis.io/commands/xreadgroup
|
|
1414
|
+
*/
|
|
1415
|
+
declare class XReadGroupCommand extends Command<number, unknown[]> {
|
|
1416
|
+
constructor([group, consumer, key, id, options]: XReadGroupOptions, opts?: CommandOptions<number, unknown[]>);
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
type NXAndXXOptions = {
|
|
1338
1420
|
nx: true;
|
|
1339
1421
|
xx?: never;
|
|
1340
1422
|
} | {
|
|
@@ -1343,12 +1425,23 @@ type ZAddCommandOptions = ({
|
|
|
1343
1425
|
} | {
|
|
1344
1426
|
nx?: never;
|
|
1345
1427
|
xx?: never;
|
|
1346
|
-
}) & {
|
|
1347
|
-
ch?: true;
|
|
1348
1428
|
};
|
|
1349
|
-
type
|
|
1350
|
-
|
|
1429
|
+
type LTAndGTOptions = {
|
|
1430
|
+
lt: true;
|
|
1431
|
+
gt?: never;
|
|
1432
|
+
} | {
|
|
1433
|
+
lt?: never;
|
|
1434
|
+
gt: true;
|
|
1435
|
+
} | {
|
|
1436
|
+
lt?: never;
|
|
1437
|
+
gt?: never;
|
|
1438
|
+
};
|
|
1439
|
+
type ZAddCommandOptions = NXAndXXOptions & LTAndGTOptions & {
|
|
1440
|
+
ch?: true;
|
|
1441
|
+
} & {
|
|
1442
|
+
incr?: true;
|
|
1351
1443
|
};
|
|
1444
|
+
type Arg2<TData> = ScoreMember<TData> | ZAddCommandOptions;
|
|
1352
1445
|
type ScoreMember<TData> = {
|
|
1353
1446
|
score: number;
|
|
1354
1447
|
member: TData;
|
|
@@ -1357,12 +1450,7 @@ type ScoreMember<TData> = {
|
|
|
1357
1450
|
* @see https://redis.io/commands/zadd
|
|
1358
1451
|
*/
|
|
1359
1452
|
declare class ZAddCommand<TData = string> extends Command<number | null, number | null> {
|
|
1360
|
-
constructor(
|
|
1361
|
-
constructor(cmd: [
|
|
1362
|
-
key: string,
|
|
1363
|
-
opts: ZAddCommandOptions | ZAddCommandOptionsWithIncr,
|
|
1364
|
-
...scoreMemberPairs: ScoreMember<TData>[]
|
|
1365
|
-
], opts?: CommandOptions<number | null, number | null>);
|
|
1453
|
+
constructor([key, arg1, ...arg2]: [string, Arg2<TData>, ...ScoreMember<TData>[]], opts?: CommandOptions<number | null, number | null>);
|
|
1366
1454
|
}
|
|
1367
1455
|
|
|
1368
1456
|
/**
|
|
@@ -1495,13 +1583,13 @@ declare class ZRevRankCommand<TData> extends Command<number | null, number | nul
|
|
|
1495
1583
|
* @see https://redis.io/commands/zscan
|
|
1496
1584
|
*/
|
|
1497
1585
|
declare class ZScanCommand extends Command<[
|
|
1498
|
-
|
|
1586
|
+
string,
|
|
1499
1587
|
(string | number)[]
|
|
1500
1588
|
], [
|
|
1501
|
-
|
|
1589
|
+
string,
|
|
1502
1590
|
(string | number)[]
|
|
1503
1591
|
]> {
|
|
1504
|
-
constructor([key, cursor, opts]: [key: string, cursor: number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[
|
|
1592
|
+
constructor([key, cursor, opts]: [key: string, cursor: string | number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[string, (string | number)[]], [string, (string | number)[]]>);
|
|
1505
1593
|
}
|
|
1506
1594
|
|
|
1507
1595
|
/**
|
|
@@ -1514,6 +1602,39 @@ declare class ZScoreCommand<TData> extends Command<string | null, number | null>
|
|
|
1514
1602
|
type InferResponseData<T extends unknown[]> = {
|
|
1515
1603
|
[K in keyof T]: T[K] extends Command<any, infer TData> ? TData : unknown;
|
|
1516
1604
|
};
|
|
1605
|
+
interface ExecMethod<TCommands extends Command<any, any>[]> {
|
|
1606
|
+
/**
|
|
1607
|
+
* Send the pipeline request to upstash.
|
|
1608
|
+
*
|
|
1609
|
+
* Returns an array with the results of all pipelined commands.
|
|
1610
|
+
*
|
|
1611
|
+
* If all commands are statically chained from start to finish, types are inferred. You can still define a return type manually if necessary though:
|
|
1612
|
+
* ```ts
|
|
1613
|
+
* const p = redis.pipeline()
|
|
1614
|
+
* p.get("key")
|
|
1615
|
+
* const result = p.exec<[{ greeting: string }]>()
|
|
1616
|
+
* ```
|
|
1617
|
+
*
|
|
1618
|
+
* If one of the commands get an error, the whole pipeline fails. Alternatively, you can set the keepErrors option to true in order to get the errors individually.
|
|
1619
|
+
*
|
|
1620
|
+
* If keepErrors is set to true, a list of objects is returned where each object corresponds to a command and is of type: `{ result: unknown, error?: string }`.
|
|
1621
|
+
*
|
|
1622
|
+
* ```ts
|
|
1623
|
+
* const p = redis.pipeline()
|
|
1624
|
+
* p.get("key")
|
|
1625
|
+
*
|
|
1626
|
+
* const result = await p.exec({ keepErrors: true });
|
|
1627
|
+
* const getResult = result[0].result
|
|
1628
|
+
* const getError = result[0].error
|
|
1629
|
+
* ```
|
|
1630
|
+
*/
|
|
1631
|
+
<TCommandResults extends unknown[] = [] extends TCommands ? unknown[] : InferResponseData<TCommands>>(): Promise<TCommandResults>;
|
|
1632
|
+
<TCommandResults extends unknown[] = [] extends TCommands ? unknown[] : InferResponseData<TCommands>>(options: {
|
|
1633
|
+
keepErrors: true;
|
|
1634
|
+
}): Promise<{
|
|
1635
|
+
[K in keyof TCommandResults]: UpstashResponse<TCommandResults[K]>;
|
|
1636
|
+
}>;
|
|
1637
|
+
}
|
|
1517
1638
|
/**
|
|
1518
1639
|
* Upstash REST API supports command pipelining to send multiple commands in
|
|
1519
1640
|
* batch, instead of sending each command one by one and waiting for a response.
|
|
@@ -1562,19 +1683,7 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
1562
1683
|
commandOptions?: CommandOptions<any, any>;
|
|
1563
1684
|
multiExec?: boolean;
|
|
1564
1685
|
});
|
|
1565
|
-
|
|
1566
|
-
* Send the pipeline request to upstash.
|
|
1567
|
-
*
|
|
1568
|
-
* Returns an array with the results of all pipelined commands.
|
|
1569
|
-
*
|
|
1570
|
-
* If all commands are statically chained from start to finish, types are inferred. You can still define a return type manually if necessary though:
|
|
1571
|
-
* ```ts
|
|
1572
|
-
* const p = redis.pipeline()
|
|
1573
|
-
* p.get("key")
|
|
1574
|
-
* const result = p.exec<[{ greeting: string }]>()
|
|
1575
|
-
* ```
|
|
1576
|
-
*/
|
|
1577
|
-
exec: <TCommandResults extends unknown[] = [] extends TCommands ? unknown[] : InferResponseData<TCommands>>() => Promise<TCommandResults>;
|
|
1686
|
+
exec: ExecMethod<TCommands>;
|
|
1578
1687
|
/**
|
|
1579
1688
|
* Returns the length of pipeline before the execution
|
|
1580
1689
|
*/
|
|
@@ -1592,6 +1701,23 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
1592
1701
|
* @see https://redis.io/commands/bitcount
|
|
1593
1702
|
*/
|
|
1594
1703
|
bitcount: (key: string, start: number, end: number) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
1704
|
+
/**
|
|
1705
|
+
* Returns an instance that can be used to execute `BITFIELD` commands on one key.
|
|
1706
|
+
*
|
|
1707
|
+
* @example
|
|
1708
|
+
* ```typescript
|
|
1709
|
+
* redis.set("mykey", 0);
|
|
1710
|
+
* const result = await redis.pipeline()
|
|
1711
|
+
* .bitfield("mykey")
|
|
1712
|
+
* .set("u4", 0, 16)
|
|
1713
|
+
* .incr("u4", "#1", 1)
|
|
1714
|
+
* .exec();
|
|
1715
|
+
* console.log(result); // [[0, 1]]
|
|
1716
|
+
* ```
|
|
1717
|
+
*
|
|
1718
|
+
* @see https://redis.io/commands/bitfield
|
|
1719
|
+
*/
|
|
1720
|
+
bitfield: (key: string) => BitFieldCommand<Pipeline<[...TCommands, Command<any, number[]>]>>;
|
|
1595
1721
|
/**
|
|
1596
1722
|
* @see https://redis.io/commands/bitop
|
|
1597
1723
|
*/
|
|
@@ -1648,7 +1774,7 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
1648
1774
|
/**
|
|
1649
1775
|
* @see https://redis.io/commands/expire
|
|
1650
1776
|
*/
|
|
1651
|
-
expire: (key: string, seconds: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
|
|
1777
|
+
expire: (key: string, seconds: number, option?: ("NX" | "nx" | "XX" | "xx" | "GT" | "gt" | "LT" | "lt") | undefined) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
|
|
1652
1778
|
/**
|
|
1653
1779
|
* @see https://redis.io/commands/expireat
|
|
1654
1780
|
*/
|
|
@@ -1661,8 +1787,98 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
1661
1787
|
* @see https://redis.io/commands/flushdb
|
|
1662
1788
|
*/
|
|
1663
1789
|
flushdb: (opts?: {
|
|
1664
|
-
async?: boolean
|
|
1790
|
+
async?: boolean;
|
|
1665
1791
|
} | undefined) => Pipeline<[...TCommands, Command<any, "OK">]>;
|
|
1792
|
+
/**
|
|
1793
|
+
* @see https://redis.io/commands/geoadd
|
|
1794
|
+
*/
|
|
1795
|
+
geoadd: <TData>(args_0: string, args_1: GeoAddCommandOptions | GeoMember<TData>, ...args_2: GeoMember<TData>[]) => Pipeline<[...TCommands, Command<any, number | null>]>;
|
|
1796
|
+
/**
|
|
1797
|
+
* @see https://redis.io/commands/geodist
|
|
1798
|
+
*/
|
|
1799
|
+
geodist: <TData>(key: string, member1: TData, member2: TData, unit?: "M" | "KM" | "FT" | "MI" | undefined) => Pipeline<[...TCommands, Command<any, number | null>]>;
|
|
1800
|
+
/**
|
|
1801
|
+
* @see https://redis.io/commands/geopos
|
|
1802
|
+
*/
|
|
1803
|
+
geopos: <TData>(args_0: string, ...args_1: TData[]) => Pipeline<[...TCommands, Command<any, {
|
|
1804
|
+
lng: number;
|
|
1805
|
+
lat: number;
|
|
1806
|
+
}[]>]>;
|
|
1807
|
+
/**
|
|
1808
|
+
* @see https://redis.io/commands/geohash
|
|
1809
|
+
*/
|
|
1810
|
+
geohash: <TData>(args_0: string, ...args_1: TData[]) => Pipeline<[...TCommands, Command<any, (string | null)[]>]>;
|
|
1811
|
+
/**
|
|
1812
|
+
* @see https://redis.io/commands/geosearch
|
|
1813
|
+
*/
|
|
1814
|
+
geosearch: <TData>(key: string, centerPoint: {
|
|
1815
|
+
type: "FROMLONLAT" | "fromlonlat";
|
|
1816
|
+
coordinate: {
|
|
1817
|
+
lon: number;
|
|
1818
|
+
lat: number;
|
|
1819
|
+
};
|
|
1820
|
+
} | {
|
|
1821
|
+
type: "FROMMEMBER" | "frommember";
|
|
1822
|
+
member: TData;
|
|
1823
|
+
}, shape: {
|
|
1824
|
+
type: "BYRADIUS" | "byradius";
|
|
1825
|
+
radius: number;
|
|
1826
|
+
radiusType: "M" | "KM" | "FT" | "MI";
|
|
1827
|
+
} | {
|
|
1828
|
+
type: "BYBOX" | "bybox";
|
|
1829
|
+
rect: {
|
|
1830
|
+
width: number;
|
|
1831
|
+
height: number;
|
|
1832
|
+
};
|
|
1833
|
+
rectType: "M" | "KM" | "FT" | "MI";
|
|
1834
|
+
}, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
|
|
1835
|
+
count?: {
|
|
1836
|
+
limit: number;
|
|
1837
|
+
any?: boolean;
|
|
1838
|
+
};
|
|
1839
|
+
withCoord?: boolean;
|
|
1840
|
+
withDist?: boolean;
|
|
1841
|
+
withHash?: boolean;
|
|
1842
|
+
} | undefined) => Pipeline<[...TCommands, Command<any, ({
|
|
1843
|
+
member: TData;
|
|
1844
|
+
} & {
|
|
1845
|
+
coord?: {
|
|
1846
|
+
long: number;
|
|
1847
|
+
lat: number;
|
|
1848
|
+
} | undefined;
|
|
1849
|
+
dist?: number | undefined;
|
|
1850
|
+
hash?: string | undefined;
|
|
1851
|
+
})[]>]>;
|
|
1852
|
+
/**
|
|
1853
|
+
* @see https://redis.io/commands/geosearchstore
|
|
1854
|
+
*/
|
|
1855
|
+
geosearchstore: <TData>(destination: string, key: string, centerPoint: {
|
|
1856
|
+
type: "FROMLONLAT" | "fromlonlat";
|
|
1857
|
+
coordinate: {
|
|
1858
|
+
lon: number;
|
|
1859
|
+
lat: number;
|
|
1860
|
+
};
|
|
1861
|
+
} | {
|
|
1862
|
+
type: "FROMMEMBER" | "frommember";
|
|
1863
|
+
member: TData;
|
|
1864
|
+
}, shape: {
|
|
1865
|
+
type: "BYRADIUS" | "byradius";
|
|
1866
|
+
radius: number;
|
|
1867
|
+
radiusType: "M" | "KM" | "FT" | "MI";
|
|
1868
|
+
} | {
|
|
1869
|
+
type: "BYBOX" | "bybox";
|
|
1870
|
+
rect: {
|
|
1871
|
+
width: number;
|
|
1872
|
+
height: number;
|
|
1873
|
+
};
|
|
1874
|
+
rectType: "M" | "KM" | "FT" | "MI";
|
|
1875
|
+
}, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
|
|
1876
|
+
count?: {
|
|
1877
|
+
limit: number;
|
|
1878
|
+
any?: boolean;
|
|
1879
|
+
};
|
|
1880
|
+
storeDist?: boolean;
|
|
1881
|
+
} | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
1666
1882
|
/**
|
|
1667
1883
|
* @see https://redis.io/commands/get
|
|
1668
1884
|
*/
|
|
@@ -1722,9 +1938,7 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
1722
1938
|
/**
|
|
1723
1939
|
* @see https://redis.io/commands/hmset
|
|
1724
1940
|
*/
|
|
1725
|
-
hmset: <TData>(key: string, kv:
|
|
1726
|
-
[field: string]: TData;
|
|
1727
|
-
}) => Pipeline<[...TCommands, Command<any, "OK">]>;
|
|
1941
|
+
hmset: <TData>(key: string, kv: Record<string, TData>) => Pipeline<[...TCommands, Command<any, "OK">]>;
|
|
1728
1942
|
/**
|
|
1729
1943
|
* @see https://redis.io/commands/hrandfield
|
|
1730
1944
|
*/
|
|
@@ -1732,13 +1946,11 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
1732
1946
|
/**
|
|
1733
1947
|
* @see https://redis.io/commands/hscan
|
|
1734
1948
|
*/
|
|
1735
|
-
hscan: (key: string, cursor: number, cmdOpts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [
|
|
1949
|
+
hscan: (key: string, cursor: string | number, cmdOpts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [string, (string | number)[]]>]>;
|
|
1736
1950
|
/**
|
|
1737
1951
|
* @see https://redis.io/commands/hset
|
|
1738
1952
|
*/
|
|
1739
|
-
hset: <TData>(key: string, kv:
|
|
1740
|
-
[field: string]: TData;
|
|
1741
|
-
}) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
1953
|
+
hset: <TData>(key: string, kv: Record<string, TData>) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
1742
1954
|
/**
|
|
1743
1955
|
* @see https://redis.io/commands/hsetnx
|
|
1744
1956
|
*/
|
|
@@ -1787,13 +1999,17 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
1787
1999
|
* @see https://redis.io/commands/lpop
|
|
1788
2000
|
*/
|
|
1789
2001
|
lpop: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
|
|
2002
|
+
/**
|
|
2003
|
+
* @see https://redis.io/commands/lmpop
|
|
2004
|
+
*/
|
|
2005
|
+
lmpop: <TData>(numkeys: number, keys: string[], args_2: "LEFT" | "RIGHT", count?: number | undefined) => Pipeline<[...TCommands, Command<any, [string, TData[]] | null>]>;
|
|
1790
2006
|
/**
|
|
1791
2007
|
* @see https://redis.io/commands/lpos
|
|
1792
2008
|
*/
|
|
1793
2009
|
lpos: <TData>(key: string, element: unknown, opts?: {
|
|
1794
|
-
rank?: number
|
|
1795
|
-
count?: number
|
|
1796
|
-
maxLen?: number
|
|
2010
|
+
rank?: number;
|
|
2011
|
+
count?: number;
|
|
2012
|
+
maxLen?: number;
|
|
1797
2013
|
} | undefined) => Pipeline<[...TCommands, Command<any, TData>]>;
|
|
1798
2014
|
/**
|
|
1799
2015
|
* @see https://redis.io/commands/lpush
|
|
@@ -1826,15 +2042,11 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
1826
2042
|
/**
|
|
1827
2043
|
* @see https://redis.io/commands/mset
|
|
1828
2044
|
*/
|
|
1829
|
-
mset: <TData>(kv:
|
|
1830
|
-
[key: string]: TData;
|
|
1831
|
-
}) => Pipeline<[...TCommands, Command<any, "OK">]>;
|
|
2045
|
+
mset: <TData>(kv: Record<string, TData>) => Pipeline<[...TCommands, Command<any, "OK">]>;
|
|
1832
2046
|
/**
|
|
1833
2047
|
* @see https://redis.io/commands/msetnx
|
|
1834
2048
|
*/
|
|
1835
|
-
msetnx: <TData>(kv:
|
|
1836
|
-
[key: string]: TData;
|
|
1837
|
-
}) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
2049
|
+
msetnx: <TData>(kv: Record<string, TData>) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
1838
2050
|
/**
|
|
1839
2051
|
* @see https://redis.io/commands/persist
|
|
1840
2052
|
*/
|
|
@@ -1847,6 +2059,18 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
1847
2059
|
* @see https://redis.io/commands/pexpireat
|
|
1848
2060
|
*/
|
|
1849
2061
|
pexpireat: (key: string, unix: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
|
|
2062
|
+
/**
|
|
2063
|
+
* @see https://redis.io/commands/pfadd
|
|
2064
|
+
*/
|
|
2065
|
+
pfadd: (args_0: string, ...args_1: unknown[]) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
2066
|
+
/**
|
|
2067
|
+
* @see https://redis.io/commands/pfcount
|
|
2068
|
+
*/
|
|
2069
|
+
pfcount: (args_0: string, ...args_1: string[]) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
2070
|
+
/**
|
|
2071
|
+
* @see https://redis.io/commands/pfmerge
|
|
2072
|
+
*/
|
|
2073
|
+
pfmerge: (destination_key: string, ...args_1: string[]) => Pipeline<[...TCommands, Command<any, "OK">]>;
|
|
1850
2074
|
/**
|
|
1851
2075
|
* @see https://redis.io/commands/ping
|
|
1852
2076
|
*/
|
|
@@ -1890,11 +2114,11 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
1890
2114
|
/**
|
|
1891
2115
|
* @see https://redis.io/commands/sadd
|
|
1892
2116
|
*/
|
|
1893
|
-
sadd: <TData>(key: string, ...members: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
2117
|
+
sadd: <TData>(key: string, member: TData, ...members: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
1894
2118
|
/**
|
|
1895
2119
|
* @see https://redis.io/commands/scan
|
|
1896
2120
|
*/
|
|
1897
|
-
scan: (cursor: number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [
|
|
2121
|
+
scan: (cursor: string | number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [string, string[]]>]>;
|
|
1898
2122
|
/**
|
|
1899
2123
|
* @see https://redis.io/commands/scard
|
|
1900
2124
|
*/
|
|
@@ -1975,7 +2199,7 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
1975
2199
|
/**
|
|
1976
2200
|
* @see https://redis.io/commands/sscan
|
|
1977
2201
|
*/
|
|
1978
|
-
sscan: (key: string, cursor: number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [
|
|
2202
|
+
sscan: (key: string, cursor: string | number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [string, (string | number)[]]>]>;
|
|
1979
2203
|
/**
|
|
1980
2204
|
* @see https://redis.io/commands/strlen
|
|
1981
2205
|
*/
|
|
@@ -2011,7 +2235,127 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
2011
2235
|
/**
|
|
2012
2236
|
* @see https://redis.io/commands/zadd
|
|
2013
2237
|
*/
|
|
2014
|
-
zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [key: string, opts: ZAddCommandOptions
|
|
2238
|
+
zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [key: string, opts: ZAddCommandOptions, ...scoreMemberPairs: [ScoreMember<TData>, ...ScoreMember<TData>[]]]) => Pipeline<[...TCommands, Command<any, number | null>]>;
|
|
2239
|
+
/**
|
|
2240
|
+
* @see https://redis.io/commands/xadd
|
|
2241
|
+
*/
|
|
2242
|
+
xadd: (key: string, id: string, entries: Record<string, unknown>, opts?: {
|
|
2243
|
+
nomkStream?: boolean;
|
|
2244
|
+
trim?: ({
|
|
2245
|
+
type: "MAXLEN" | "maxlen";
|
|
2246
|
+
threshold: number;
|
|
2247
|
+
} | {
|
|
2248
|
+
type: "MINID" | "minid";
|
|
2249
|
+
threshold: string;
|
|
2250
|
+
}) & ({
|
|
2251
|
+
comparison: "~";
|
|
2252
|
+
limit?: number;
|
|
2253
|
+
} | {
|
|
2254
|
+
comparison: "=";
|
|
2255
|
+
limit?: never;
|
|
2256
|
+
});
|
|
2257
|
+
} | undefined) => Pipeline<[...TCommands, Command<any, string>]>;
|
|
2258
|
+
/**
|
|
2259
|
+
* @see https://redis.io/commands/xack
|
|
2260
|
+
*/
|
|
2261
|
+
xack: (key: string, group: string, id: string | string[]) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
2262
|
+
/**
|
|
2263
|
+
* @see https://redis.io/commands/xdel
|
|
2264
|
+
*/
|
|
2265
|
+
xdel: (key: string, ids: string | string[]) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
2266
|
+
/**
|
|
2267
|
+
* @see https://redis.io/commands/xgroup
|
|
2268
|
+
*/
|
|
2269
|
+
xgroup: (key: string, opts: {
|
|
2270
|
+
type: "CREATE";
|
|
2271
|
+
group: string;
|
|
2272
|
+
id: `$` | string;
|
|
2273
|
+
options?: {
|
|
2274
|
+
MKSTREAM?: boolean;
|
|
2275
|
+
ENTRIESREAD?: number;
|
|
2276
|
+
};
|
|
2277
|
+
} | {
|
|
2278
|
+
type: "CREATECONSUMER";
|
|
2279
|
+
group: string;
|
|
2280
|
+
consumer: string;
|
|
2281
|
+
} | {
|
|
2282
|
+
type: "DELCONSUMER";
|
|
2283
|
+
group: string;
|
|
2284
|
+
consumer: string;
|
|
2285
|
+
} | {
|
|
2286
|
+
type: "DESTROY";
|
|
2287
|
+
group: string;
|
|
2288
|
+
} | {
|
|
2289
|
+
type: "SETID";
|
|
2290
|
+
group: string;
|
|
2291
|
+
id: `$` | string;
|
|
2292
|
+
options?: {
|
|
2293
|
+
ENTRIESREAD?: number;
|
|
2294
|
+
};
|
|
2295
|
+
}) => Pipeline<[...TCommands, Command<any, never>]>;
|
|
2296
|
+
/**
|
|
2297
|
+
* @see https://redis.io/commands/xread
|
|
2298
|
+
*/
|
|
2299
|
+
xread: (...args: CommandArgs<typeof XReadCommand>) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
|
|
2300
|
+
/**
|
|
2301
|
+
* @see https://redis.io/commands/xreadgroup
|
|
2302
|
+
*/
|
|
2303
|
+
xreadgroup: (...args: CommandArgs<typeof XReadGroupCommand>) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
|
|
2304
|
+
/**
|
|
2305
|
+
* @see https://redis.io/commands/xinfo
|
|
2306
|
+
*/
|
|
2307
|
+
xinfo: (key: string, options: {
|
|
2308
|
+
type: "CONSUMERS";
|
|
2309
|
+
group: string;
|
|
2310
|
+
} | {
|
|
2311
|
+
type: "GROUPS";
|
|
2312
|
+
}) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
|
|
2313
|
+
/**
|
|
2314
|
+
* @see https://redis.io/commands/xlen
|
|
2315
|
+
*/
|
|
2316
|
+
xlen: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
2317
|
+
/**
|
|
2318
|
+
* @see https://redis.io/commands/xpending
|
|
2319
|
+
*/
|
|
2320
|
+
xpending: (key: string, group: string, start: string, end: string, count: number, options?: {
|
|
2321
|
+
idleTime?: number;
|
|
2322
|
+
consumer?: string | string[];
|
|
2323
|
+
} | undefined) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
|
|
2324
|
+
/**
|
|
2325
|
+
* @see https://redis.io/commands/xclaim
|
|
2326
|
+
*/
|
|
2327
|
+
xclaim: (key: string, group: string, consumer: string, minIdleTime: number, id: string | string[], options?: {
|
|
2328
|
+
idleMS?: number;
|
|
2329
|
+
timeMS?: number;
|
|
2330
|
+
retryCount?: number;
|
|
2331
|
+
force?: boolean;
|
|
2332
|
+
justId?: boolean;
|
|
2333
|
+
lastId?: number;
|
|
2334
|
+
} | undefined) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
|
|
2335
|
+
/**
|
|
2336
|
+
* @see https://redis.io/commands/xautoclaim
|
|
2337
|
+
*/
|
|
2338
|
+
xautoclaim: (key: string, group: string, consumer: string, minIdleTime: number, start: string, options?: {
|
|
2339
|
+
count?: number;
|
|
2340
|
+
justId?: boolean;
|
|
2341
|
+
} | undefined) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
|
|
2342
|
+
/**
|
|
2343
|
+
* @see https://redis.io/commands/xtrim
|
|
2344
|
+
*/
|
|
2345
|
+
xtrim: (key: string, options: {
|
|
2346
|
+
strategy: "MAXLEN" | "MINID";
|
|
2347
|
+
exactness?: "~" | "=";
|
|
2348
|
+
threshold: number | string;
|
|
2349
|
+
limit?: number;
|
|
2350
|
+
}) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
2351
|
+
/**
|
|
2352
|
+
* @see https://redis.io/commands/xrange
|
|
2353
|
+
*/
|
|
2354
|
+
xrange: (key: string, start: string, end: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, Record<string, Record<string, unknown>>>]>;
|
|
2355
|
+
/**
|
|
2356
|
+
* @see https://redis.io/commands/xrevrange
|
|
2357
|
+
*/
|
|
2358
|
+
xrevrange: (key: string, end: string, start: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, Record<string, Record<string, unknown>>>]>;
|
|
2015
2359
|
/**
|
|
2016
2360
|
* @see https://redis.io/commands/zcard
|
|
2017
2361
|
*/
|
|
@@ -2047,21 +2391,11 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
2047
2391
|
/**
|
|
2048
2392
|
* @see https://redis.io/commands/zrange
|
|
2049
2393
|
*/
|
|
2050
|
-
zrange: <TData extends unknown[]>(...args: [key: string, min: number, max: number, opts?: ZRangeCommandOptions] | [
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
byLex: true;
|
|
2056
|
-
} & ZRangeCommandOptions
|
|
2057
|
-
] | [
|
|
2058
|
-
key: string,
|
|
2059
|
-
min: number | `(${number}` | "-inf" | "+inf",
|
|
2060
|
-
max: number | `(${number}` | "-inf" | "+inf",
|
|
2061
|
-
opts: {
|
|
2062
|
-
byScore: true;
|
|
2063
|
-
} & ZRangeCommandOptions
|
|
2064
|
-
]) => Pipeline<[...TCommands, Command<any, TData>]>;
|
|
2394
|
+
zrange: <TData extends unknown[]>(...args: [key: string, min: number, max: number, opts?: ZRangeCommandOptions] | [key: string, min: `(${string}` | `[${string}` | "-" | "+", max: `(${string}` | `[${string}` | "-" | "+", opts: {
|
|
2395
|
+
byLex: true;
|
|
2396
|
+
} & ZRangeCommandOptions] | [key: string, min: number | `(${number}` | "-inf" | "+inf", max: number | `(${number}` | "-inf" | "+inf", opts: {
|
|
2397
|
+
byScore: true;
|
|
2398
|
+
} & ZRangeCommandOptions]) => Pipeline<[...TCommands, Command<any, TData>]>;
|
|
2065
2399
|
/**
|
|
2066
2400
|
* @see https://redis.io/commands/zrank
|
|
2067
2401
|
*/
|
|
@@ -2089,7 +2423,7 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
2089
2423
|
/**
|
|
2090
2424
|
* @see https://redis.io/commands/zscan
|
|
2091
2425
|
*/
|
|
2092
|
-
zscan: (key: string, cursor: number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [
|
|
2426
|
+
zscan: (key: string, cursor: string | number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [string, (string | number)[]]>]>;
|
|
2093
2427
|
/**
|
|
2094
2428
|
* @see https://redis.io/commands/zscore
|
|
2095
2429
|
*/
|
|
@@ -2142,96 +2476,6 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
2142
2476
|
* @see https://redis.io/commands/json.forget
|
|
2143
2477
|
*/
|
|
2144
2478
|
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
2479
|
/**
|
|
2236
2480
|
* @see https://redis.io/commands/json.get
|
|
2237
2481
|
*/
|
|
@@ -2240,6 +2484,10 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
2240
2484
|
* @see https://redis.io/commands/json.mget
|
|
2241
2485
|
*/
|
|
2242
2486
|
mget: (keys: string[], path: string) => Pipeline<[...TCommands, Command<any, any>]>;
|
|
2487
|
+
/**
|
|
2488
|
+
* @see https://redis.io/commands/json.mset
|
|
2489
|
+
*/
|
|
2490
|
+
mset: (...args: CommandArgs<typeof JsonMSetCommand>) => Pipeline<[...TCommands, Command<any, "OK" | null>]>;
|
|
2243
2491
|
/**
|
|
2244
2492
|
* @see https://redis.io/commands/json.numincrby
|
|
2245
2493
|
*/
|
|
@@ -2265,9 +2513,9 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
2265
2513
|
*/
|
|
2266
2514
|
set: (key: string, path: string, value: string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown>)[], opts?: {
|
|
2267
2515
|
nx: true;
|
|
2268
|
-
xx?:
|
|
2516
|
+
xx?: never;
|
|
2269
2517
|
} | {
|
|
2270
|
-
nx?:
|
|
2518
|
+
nx?: never;
|
|
2271
2519
|
xx: true;
|
|
2272
2520
|
} | undefined) => Pipeline<[...TCommands, Command<any, "OK" | null>]>;
|
|
2273
2521
|
/**
|
|
@@ -2338,6 +2586,7 @@ declare class Redis {
|
|
|
2338
2586
|
protected client: Requester;
|
|
2339
2587
|
protected opts?: CommandOptions<any, any>;
|
|
2340
2588
|
protected enableTelemetry: boolean;
|
|
2589
|
+
protected enableAutoPipelining: boolean;
|
|
2341
2590
|
/**
|
|
2342
2591
|
* Create a new redis client
|
|
2343
2592
|
*
|
|
@@ -2350,6 +2599,8 @@ declare class Redis {
|
|
|
2350
2599
|
* ```
|
|
2351
2600
|
*/
|
|
2352
2601
|
constructor(client: Requester, opts?: RedisOptions);
|
|
2602
|
+
get readYourWritesSyncToken(): string | undefined;
|
|
2603
|
+
set readYourWritesSyncToken(session: string | undefined);
|
|
2353
2604
|
get json(): {
|
|
2354
2605
|
/**
|
|
2355
2606
|
* @see https://redis.io/commands/json.arrappend
|
|
@@ -2387,104 +2638,18 @@ declare class Redis {
|
|
|
2387
2638
|
* @see https://redis.io/commands/json.forget
|
|
2388
2639
|
*/
|
|
2389
2640
|
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
2641
|
/**
|
|
2481
2642
|
* @see https://redis.io/commands/json.get
|
|
2482
2643
|
*/
|
|
2483
|
-
get: (...args: CommandArgs<typeof JsonGetCommand>) => Promise<
|
|
2644
|
+
get: <TData>(...args: CommandArgs<typeof JsonGetCommand>) => Promise<TData | null>;
|
|
2484
2645
|
/**
|
|
2485
2646
|
* @see https://redis.io/commands/json.mget
|
|
2486
2647
|
*/
|
|
2487
|
-
mget: (keys: string[], path: string) => Promise<
|
|
2648
|
+
mget: <TData>(keys: string[], path: string) => Promise<TData>;
|
|
2649
|
+
/**
|
|
2650
|
+
* @see https://redis.io/commands/json.mset
|
|
2651
|
+
*/
|
|
2652
|
+
mset: (...args: CommandArgs<typeof JsonMSetCommand>) => Promise<"OK" | null>;
|
|
2488
2653
|
/**
|
|
2489
2654
|
* @see https://redis.io/commands/json.numincrby
|
|
2490
2655
|
*/
|
|
@@ -2510,9 +2675,9 @@ declare class Redis {
|
|
|
2510
2675
|
*/
|
|
2511
2676
|
set: (key: string, path: string, value: string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown>)[], opts?: {
|
|
2512
2677
|
nx: true;
|
|
2513
|
-
xx?:
|
|
2678
|
+
xx?: never;
|
|
2514
2679
|
} | {
|
|
2515
|
-
nx?:
|
|
2680
|
+
nx?: never;
|
|
2516
2681
|
xx: true;
|
|
2517
2682
|
} | undefined) => Promise<"OK" | null>;
|
|
2518
2683
|
/**
|
|
@@ -2547,6 +2712,7 @@ declare class Redis {
|
|
|
2547
2712
|
* @see {@link Pipeline}
|
|
2548
2713
|
*/
|
|
2549
2714
|
pipeline: () => Pipeline<[]>;
|
|
2715
|
+
protected autoPipeline: () => Redis;
|
|
2550
2716
|
/**
|
|
2551
2717
|
* Create a new transaction to allow executing multiple steps atomically.
|
|
2552
2718
|
*
|
|
@@ -2557,6 +2723,22 @@ declare class Redis {
|
|
|
2557
2723
|
* @see {@link Pipeline}
|
|
2558
2724
|
*/
|
|
2559
2725
|
multi: () => Pipeline<[]>;
|
|
2726
|
+
/**
|
|
2727
|
+
* Returns an instance that can be used to execute `BITFIELD` commands on one key.
|
|
2728
|
+
*
|
|
2729
|
+
* @example
|
|
2730
|
+
* ```typescript
|
|
2731
|
+
* redis.set("mykey", 0);
|
|
2732
|
+
* const result = await redis.bitfield("mykey")
|
|
2733
|
+
* .set("u4", 0, 16)
|
|
2734
|
+
* .incr("u4", "#1", 1)
|
|
2735
|
+
* .exec();
|
|
2736
|
+
* console.log(result); // [0, 1]
|
|
2737
|
+
* ```
|
|
2738
|
+
*
|
|
2739
|
+
* @see https://redis.io/commands/bitfield
|
|
2740
|
+
*/
|
|
2741
|
+
bitfield: (key: string) => BitFieldCommand<Promise<number[]>>;
|
|
2560
2742
|
/**
|
|
2561
2743
|
* @see https://redis.io/commands/append
|
|
2562
2744
|
*/
|
|
@@ -2617,7 +2799,7 @@ declare class Redis {
|
|
|
2617
2799
|
/**
|
|
2618
2800
|
* @see https://redis.io/commands/expire
|
|
2619
2801
|
*/
|
|
2620
|
-
expire: (key: string, seconds: number) => Promise<0 | 1>;
|
|
2802
|
+
expire: (key: string, seconds: number, option?: ("NX" | "nx" | "XX" | "xx" | "GT" | "gt" | "LT" | "lt") | undefined) => Promise<0 | 1>;
|
|
2621
2803
|
/**
|
|
2622
2804
|
* @see https://redis.io/commands/expireat
|
|
2623
2805
|
*/
|
|
@@ -2630,8 +2812,98 @@ declare class Redis {
|
|
|
2630
2812
|
* @see https://redis.io/commands/flushdb
|
|
2631
2813
|
*/
|
|
2632
2814
|
flushdb: (opts?: {
|
|
2633
|
-
async?: boolean
|
|
2815
|
+
async?: boolean;
|
|
2634
2816
|
} | undefined) => Promise<"OK">;
|
|
2817
|
+
/**
|
|
2818
|
+
* @see https://redis.io/commands/geoadd
|
|
2819
|
+
*/
|
|
2820
|
+
geoadd: <TData>(args_0: string, args_1: GeoAddCommandOptions | GeoMember<TData>, ...args_2: GeoMember<TData>[]) => Promise<number | null>;
|
|
2821
|
+
/**
|
|
2822
|
+
* @see https://redis.io/commands/geopos
|
|
2823
|
+
*/
|
|
2824
|
+
geopos: <TData>(args_0: string, ...args_1: TData[]) => Promise<{
|
|
2825
|
+
lng: number;
|
|
2826
|
+
lat: number;
|
|
2827
|
+
}[]>;
|
|
2828
|
+
/**
|
|
2829
|
+
* @see https://redis.io/commands/geodist
|
|
2830
|
+
*/
|
|
2831
|
+
geodist: <TData>(key: string, member1: TData, member2: TData, unit?: "M" | "KM" | "FT" | "MI" | undefined) => Promise<number | null>;
|
|
2832
|
+
/**
|
|
2833
|
+
* @see https://redis.io/commands/geohash
|
|
2834
|
+
*/
|
|
2835
|
+
geohash: <TData>(args_0: string, ...args_1: TData[]) => Promise<(string | null)[]>;
|
|
2836
|
+
/**
|
|
2837
|
+
* @see https://redis.io/commands/geosearch
|
|
2838
|
+
*/
|
|
2839
|
+
geosearch: <TData>(key: string, centerPoint: {
|
|
2840
|
+
type: "FROMLONLAT" | "fromlonlat";
|
|
2841
|
+
coordinate: {
|
|
2842
|
+
lon: number;
|
|
2843
|
+
lat: number;
|
|
2844
|
+
};
|
|
2845
|
+
} | {
|
|
2846
|
+
type: "FROMMEMBER" | "frommember";
|
|
2847
|
+
member: TData;
|
|
2848
|
+
}, shape: {
|
|
2849
|
+
type: "BYRADIUS" | "byradius";
|
|
2850
|
+
radius: number;
|
|
2851
|
+
radiusType: "M" | "KM" | "FT" | "MI";
|
|
2852
|
+
} | {
|
|
2853
|
+
type: "BYBOX" | "bybox";
|
|
2854
|
+
rect: {
|
|
2855
|
+
width: number;
|
|
2856
|
+
height: number;
|
|
2857
|
+
};
|
|
2858
|
+
rectType: "M" | "KM" | "FT" | "MI";
|
|
2859
|
+
}, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
|
|
2860
|
+
count?: {
|
|
2861
|
+
limit: number;
|
|
2862
|
+
any?: boolean;
|
|
2863
|
+
};
|
|
2864
|
+
withCoord?: boolean;
|
|
2865
|
+
withDist?: boolean;
|
|
2866
|
+
withHash?: boolean;
|
|
2867
|
+
} | undefined) => Promise<({
|
|
2868
|
+
member: TData;
|
|
2869
|
+
} & {
|
|
2870
|
+
coord?: {
|
|
2871
|
+
long: number;
|
|
2872
|
+
lat: number;
|
|
2873
|
+
} | undefined;
|
|
2874
|
+
dist?: number | undefined;
|
|
2875
|
+
hash?: string | undefined;
|
|
2876
|
+
})[]>;
|
|
2877
|
+
/**
|
|
2878
|
+
* @see https://redis.io/commands/geosearchstore
|
|
2879
|
+
*/
|
|
2880
|
+
geosearchstore: <TData>(destination: string, key: string, centerPoint: {
|
|
2881
|
+
type: "FROMLONLAT" | "fromlonlat";
|
|
2882
|
+
coordinate: {
|
|
2883
|
+
lon: number;
|
|
2884
|
+
lat: number;
|
|
2885
|
+
};
|
|
2886
|
+
} | {
|
|
2887
|
+
type: "FROMMEMBER" | "frommember";
|
|
2888
|
+
member: TData;
|
|
2889
|
+
}, shape: {
|
|
2890
|
+
type: "BYRADIUS" | "byradius";
|
|
2891
|
+
radius: number;
|
|
2892
|
+
radiusType: "M" | "KM" | "FT" | "MI";
|
|
2893
|
+
} | {
|
|
2894
|
+
type: "BYBOX" | "bybox";
|
|
2895
|
+
rect: {
|
|
2896
|
+
width: number;
|
|
2897
|
+
height: number;
|
|
2898
|
+
};
|
|
2899
|
+
rectType: "M" | "KM" | "FT" | "MI";
|
|
2900
|
+
}, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
|
|
2901
|
+
count?: {
|
|
2902
|
+
limit: number;
|
|
2903
|
+
any?: boolean;
|
|
2904
|
+
};
|
|
2905
|
+
storeDist?: boolean;
|
|
2906
|
+
} | undefined) => Promise<number>;
|
|
2635
2907
|
/**
|
|
2636
2908
|
* @see https://redis.io/commands/get
|
|
2637
2909
|
*/
|
|
@@ -2691,27 +2963,23 @@ declare class Redis {
|
|
|
2691
2963
|
/**
|
|
2692
2964
|
* @see https://redis.io/commands/hmset
|
|
2693
2965
|
*/
|
|
2694
|
-
hmset: <TData>(key: string, kv:
|
|
2695
|
-
[field: string]: TData;
|
|
2696
|
-
}) => Promise<"OK">;
|
|
2966
|
+
hmset: <TData>(key: string, kv: Record<string, TData>) => Promise<"OK">;
|
|
2697
2967
|
/**
|
|
2698
2968
|
* @see https://redis.io/commands/hrandfield
|
|
2699
2969
|
*/
|
|
2700
2970
|
hrandfield: {
|
|
2701
|
-
(key: string): Promise<string>;
|
|
2971
|
+
(key: string): Promise<string | null>;
|
|
2702
2972
|
(key: string, count: number): Promise<string[]>;
|
|
2703
2973
|
<TData extends Record<string, unknown>>(key: string, count: number, withValues: boolean): Promise<Partial<TData>>;
|
|
2704
2974
|
};
|
|
2705
2975
|
/**
|
|
2706
2976
|
* @see https://redis.io/commands/hscan
|
|
2707
2977
|
*/
|
|
2708
|
-
hscan: (key: string, cursor: number, cmdOpts?: ScanCommandOptions | undefined) => Promise<[
|
|
2978
|
+
hscan: (key: string, cursor: string | number, cmdOpts?: ScanCommandOptions | undefined) => Promise<[string, (string | number)[]]>;
|
|
2709
2979
|
/**
|
|
2710
2980
|
* @see https://redis.io/commands/hset
|
|
2711
2981
|
*/
|
|
2712
|
-
hset: <TData>(key: string, kv:
|
|
2713
|
-
[field: string]: TData;
|
|
2714
|
-
}) => Promise<number>;
|
|
2982
|
+
hset: <TData>(key: string, kv: Record<string, TData>) => Promise<number>;
|
|
2715
2983
|
/**
|
|
2716
2984
|
* @see https://redis.io/commands/hsetnx
|
|
2717
2985
|
*/
|
|
@@ -2760,13 +3028,17 @@ declare class Redis {
|
|
|
2760
3028
|
* @see https://redis.io/commands/lpop
|
|
2761
3029
|
*/
|
|
2762
3030
|
lpop: <TData>(key: string, count?: number | undefined) => Promise<TData | null>;
|
|
3031
|
+
/**
|
|
3032
|
+
* @see https://redis.io/commands/lmpop
|
|
3033
|
+
*/
|
|
3034
|
+
lmpop: <TData>(numkeys: number, keys: string[], args_2: "LEFT" | "RIGHT", count?: number | undefined) => Promise<[string, TData[]] | null>;
|
|
2763
3035
|
/**
|
|
2764
3036
|
* @see https://redis.io/commands/lpos
|
|
2765
3037
|
*/
|
|
2766
3038
|
lpos: <TData = number>(key: string, element: unknown, opts?: {
|
|
2767
|
-
rank?: number
|
|
2768
|
-
count?: number
|
|
2769
|
-
maxLen?: number
|
|
3039
|
+
rank?: number;
|
|
3040
|
+
count?: number;
|
|
3041
|
+
maxLen?: number;
|
|
2770
3042
|
} | undefined) => Promise<TData>;
|
|
2771
3043
|
/**
|
|
2772
3044
|
* @see https://redis.io/commands/lpush
|
|
@@ -2799,15 +3071,11 @@ declare class Redis {
|
|
|
2799
3071
|
/**
|
|
2800
3072
|
* @see https://redis.io/commands/mset
|
|
2801
3073
|
*/
|
|
2802
|
-
mset: <TData>(kv:
|
|
2803
|
-
[key: string]: TData;
|
|
2804
|
-
}) => Promise<"OK">;
|
|
3074
|
+
mset: <TData>(kv: Record<string, TData>) => Promise<"OK">;
|
|
2805
3075
|
/**
|
|
2806
3076
|
* @see https://redis.io/commands/msetnx
|
|
2807
3077
|
*/
|
|
2808
|
-
msetnx: <TData>(kv:
|
|
2809
|
-
[key: string]: TData;
|
|
2810
|
-
}) => Promise<number>;
|
|
3078
|
+
msetnx: <TData>(kv: Record<string, TData>) => Promise<number>;
|
|
2811
3079
|
/**
|
|
2812
3080
|
* @see https://redis.io/commands/persist
|
|
2813
3081
|
*/
|
|
@@ -2820,6 +3088,18 @@ declare class Redis {
|
|
|
2820
3088
|
* @see https://redis.io/commands/pexpireat
|
|
2821
3089
|
*/
|
|
2822
3090
|
pexpireat: (key: string, unix: number) => Promise<0 | 1>;
|
|
3091
|
+
/**
|
|
3092
|
+
* @see https://redis.io/commands/pfadd
|
|
3093
|
+
*/
|
|
3094
|
+
pfadd: (args_0: string, ...args_1: unknown[]) => Promise<number>;
|
|
3095
|
+
/**
|
|
3096
|
+
* @see https://redis.io/commands/pfcount
|
|
3097
|
+
*/
|
|
3098
|
+
pfcount: (args_0: string, ...args_1: string[]) => Promise<number>;
|
|
3099
|
+
/**
|
|
3100
|
+
* @see https://redis.io/commands/pfmerge
|
|
3101
|
+
*/
|
|
3102
|
+
pfmerge: (destination_key: string, ...args_1: string[]) => Promise<"OK">;
|
|
2823
3103
|
/**
|
|
2824
3104
|
* @see https://redis.io/commands/ping
|
|
2825
3105
|
*/
|
|
@@ -2863,11 +3143,11 @@ declare class Redis {
|
|
|
2863
3143
|
/**
|
|
2864
3144
|
* @see https://redis.io/commands/sadd
|
|
2865
3145
|
*/
|
|
2866
|
-
sadd: <TData>(key: string, ...members: TData[]) => Promise<number>;
|
|
3146
|
+
sadd: <TData>(key: string, member: TData, ...members: TData[]) => Promise<number>;
|
|
2867
3147
|
/**
|
|
2868
3148
|
* @see https://redis.io/commands/scan
|
|
2869
3149
|
*/
|
|
2870
|
-
scan: (cursor: number, opts?: ScanCommandOptions | undefined) => Promise<[
|
|
3150
|
+
scan: (cursor: string | number, opts?: ScanCommandOptions | undefined) => Promise<[string, string[]]>;
|
|
2871
3151
|
/**
|
|
2872
3152
|
* @see https://redis.io/commands/scard
|
|
2873
3153
|
*/
|
|
@@ -2951,7 +3231,7 @@ declare class Redis {
|
|
|
2951
3231
|
/**
|
|
2952
3232
|
* @see https://redis.io/commands/sscan
|
|
2953
3233
|
*/
|
|
2954
|
-
sscan: (key: string, cursor: number, opts?: ScanCommandOptions | undefined) => Promise<[
|
|
3234
|
+
sscan: (key: string, cursor: string | number, opts?: ScanCommandOptions | undefined) => Promise<[string, (string | number)[]]>;
|
|
2955
3235
|
/**
|
|
2956
3236
|
* @see https://redis.io/commands/strlen
|
|
2957
3237
|
*/
|
|
@@ -2987,11 +3267,9 @@ declare class Redis {
|
|
|
2987
3267
|
/**
|
|
2988
3268
|
* @see https://redis.io/commands/xadd
|
|
2989
3269
|
*/
|
|
2990
|
-
xadd: (key: string, id: string, entries: {
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
nomkStream?: boolean | undefined;
|
|
2994
|
-
trim?: (({
|
|
3270
|
+
xadd: (key: string, id: string, entries: Record<string, unknown>, opts?: {
|
|
3271
|
+
nomkStream?: boolean;
|
|
3272
|
+
trim?: ({
|
|
2995
3273
|
type: "MAXLEN" | "maxlen";
|
|
2996
3274
|
threshold: number;
|
|
2997
3275
|
} | {
|
|
@@ -2999,20 +3277,117 @@ declare class Redis {
|
|
|
2999
3277
|
threshold: string;
|
|
3000
3278
|
}) & ({
|
|
3001
3279
|
comparison: "~";
|
|
3002
|
-
limit?: number
|
|
3280
|
+
limit?: number;
|
|
3003
3281
|
} | {
|
|
3004
3282
|
comparison: "=";
|
|
3005
|
-
limit?:
|
|
3006
|
-
})
|
|
3283
|
+
limit?: never;
|
|
3284
|
+
});
|
|
3007
3285
|
} | undefined) => Promise<string>;
|
|
3286
|
+
/**
|
|
3287
|
+
* @see https://redis.io/commands/xack
|
|
3288
|
+
*/
|
|
3289
|
+
xack: (key: string, group: string, id: string | string[]) => Promise<number>;
|
|
3290
|
+
/**
|
|
3291
|
+
* @see https://redis.io/commands/xdel
|
|
3292
|
+
*/
|
|
3293
|
+
xdel: (key: string, ids: string | string[]) => Promise<number>;
|
|
3294
|
+
/**
|
|
3295
|
+
* @see https://redis.io/commands/xgroup
|
|
3296
|
+
*/
|
|
3297
|
+
xgroup: (key: string, opts: {
|
|
3298
|
+
type: "CREATE";
|
|
3299
|
+
group: string;
|
|
3300
|
+
id: `$` | string;
|
|
3301
|
+
options?: {
|
|
3302
|
+
MKSTREAM?: boolean;
|
|
3303
|
+
ENTRIESREAD?: number;
|
|
3304
|
+
};
|
|
3305
|
+
} | {
|
|
3306
|
+
type: "CREATECONSUMER";
|
|
3307
|
+
group: string;
|
|
3308
|
+
consumer: string;
|
|
3309
|
+
} | {
|
|
3310
|
+
type: "DELCONSUMER";
|
|
3311
|
+
group: string;
|
|
3312
|
+
consumer: string;
|
|
3313
|
+
} | {
|
|
3314
|
+
type: "DESTROY";
|
|
3315
|
+
group: string;
|
|
3316
|
+
} | {
|
|
3317
|
+
type: "SETID";
|
|
3318
|
+
group: string;
|
|
3319
|
+
id: `$` | string;
|
|
3320
|
+
options?: {
|
|
3321
|
+
ENTRIESREAD?: number;
|
|
3322
|
+
};
|
|
3323
|
+
}) => Promise<never>;
|
|
3324
|
+
/**
|
|
3325
|
+
* @see https://redis.io/commands/xread
|
|
3326
|
+
*/
|
|
3327
|
+
xread: (...args: CommandArgs<typeof XReadCommand>) => Promise<unknown[]>;
|
|
3328
|
+
/**
|
|
3329
|
+
* @see https://redis.io/commands/xreadgroup
|
|
3330
|
+
*/
|
|
3331
|
+
xreadgroup: (...args: CommandArgs<typeof XReadGroupCommand>) => Promise<unknown[]>;
|
|
3332
|
+
/**
|
|
3333
|
+
* @see https://redis.io/commands/xinfo
|
|
3334
|
+
*/
|
|
3335
|
+
xinfo: (key: string, options: {
|
|
3336
|
+
type: "CONSUMERS";
|
|
3337
|
+
group: string;
|
|
3338
|
+
} | {
|
|
3339
|
+
type: "GROUPS";
|
|
3340
|
+
}) => Promise<unknown[]>;
|
|
3341
|
+
/**
|
|
3342
|
+
* @see https://redis.io/commands/xlen
|
|
3343
|
+
*/
|
|
3344
|
+
xlen: (key: string) => Promise<number>;
|
|
3345
|
+
/**
|
|
3346
|
+
* @see https://redis.io/commands/xpending
|
|
3347
|
+
*/
|
|
3348
|
+
xpending: (key: string, group: string, start: string, end: string, count: number, options?: {
|
|
3349
|
+
idleTime?: number;
|
|
3350
|
+
consumer?: string | string[];
|
|
3351
|
+
} | undefined) => Promise<unknown[]>;
|
|
3352
|
+
/**
|
|
3353
|
+
* @see https://redis.io/commands/xclaim
|
|
3354
|
+
*/
|
|
3355
|
+
xclaim: (key: string, group: string, consumer: string, minIdleTime: number, id: string | string[], options?: {
|
|
3356
|
+
idleMS?: number;
|
|
3357
|
+
timeMS?: number;
|
|
3358
|
+
retryCount?: number;
|
|
3359
|
+
force?: boolean;
|
|
3360
|
+
justId?: boolean;
|
|
3361
|
+
lastId?: number;
|
|
3362
|
+
} | undefined) => Promise<unknown[]>;
|
|
3363
|
+
/**
|
|
3364
|
+
* @see https://redis.io/commands/xautoclaim
|
|
3365
|
+
*/
|
|
3366
|
+
xautoclaim: (key: string, group: string, consumer: string, minIdleTime: number, start: string, options?: {
|
|
3367
|
+
count?: number;
|
|
3368
|
+
justId?: boolean;
|
|
3369
|
+
} | undefined) => Promise<unknown[]>;
|
|
3370
|
+
/**
|
|
3371
|
+
* @see https://redis.io/commands/xtrim
|
|
3372
|
+
*/
|
|
3373
|
+
xtrim: (key: string, options: {
|
|
3374
|
+
strategy: "MAXLEN" | "MINID";
|
|
3375
|
+
exactness?: "~" | "=";
|
|
3376
|
+
threshold: number | string;
|
|
3377
|
+
limit?: number;
|
|
3378
|
+
}) => Promise<number>;
|
|
3008
3379
|
/**
|
|
3009
3380
|
* @see https://redis.io/commands/xrange
|
|
3010
3381
|
*/
|
|
3011
3382
|
xrange: (key: string, start: string, end: string, count?: number | undefined) => Promise<Record<string, Record<string, unknown>>>;
|
|
3383
|
+
/**
|
|
3384
|
+
* @see https://redis.io/commands/xrevrange
|
|
3385
|
+
*/
|
|
3386
|
+
xrevrange: (key: string, end: string, start: string, count?: number | undefined) => Promise<Record<string, Record<string, unknown>>>;
|
|
3012
3387
|
/**
|
|
3013
3388
|
* @see https://redis.io/commands/zadd
|
|
3014
3389
|
*/
|
|
3015
|
-
zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [key: string, opts: ZAddCommandOptions
|
|
3390
|
+
zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [key: string, opts: ZAddCommandOptions, ...scoreMemberPairs: [ScoreMember<TData>, ...ScoreMember<TData>[]]]) => Promise<number | null>;
|
|
3016
3391
|
/**
|
|
3017
3392
|
* @see https://redis.io/commands/zcard
|
|
3018
3393
|
*/
|
|
@@ -3052,21 +3427,11 @@ declare class Redis {
|
|
|
3052
3427
|
/**
|
|
3053
3428
|
* @see https://redis.io/commands/zrange
|
|
3054
3429
|
*/
|
|
3055
|
-
zrange: <TData extends unknown[]>(...args: [key: string, min: number, max: number, opts?: ZRangeCommandOptions] | [
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
byLex: true;
|
|
3061
|
-
} & ZRangeCommandOptions
|
|
3062
|
-
] | [
|
|
3063
|
-
key: string,
|
|
3064
|
-
min: number | `(${number}` | "-inf" | "+inf",
|
|
3065
|
-
max: number | `(${number}` | "-inf" | "+inf",
|
|
3066
|
-
opts: {
|
|
3067
|
-
byScore: true;
|
|
3068
|
-
} & ZRangeCommandOptions
|
|
3069
|
-
]) => Promise<TData>;
|
|
3430
|
+
zrange: <TData extends unknown[]>(...args: [key: string, min: number, max: number, opts?: ZRangeCommandOptions] | [key: string, min: `(${string}` | `[${string}` | "-" | "+", max: `(${string}` | `[${string}` | "-" | "+", opts: {
|
|
3431
|
+
byLex: true;
|
|
3432
|
+
} & ZRangeCommandOptions] | [key: string, min: number | `(${number}` | "-inf" | "+inf", max: number | `(${number}` | "-inf" | "+inf", opts: {
|
|
3433
|
+
byScore: true;
|
|
3434
|
+
} & ZRangeCommandOptions]) => Promise<TData>;
|
|
3070
3435
|
/**
|
|
3071
3436
|
* @see https://redis.io/commands/zrank
|
|
3072
3437
|
*/
|
|
@@ -3094,7 +3459,7 @@ declare class Redis {
|
|
|
3094
3459
|
/**
|
|
3095
3460
|
* @see https://redis.io/commands/zscan
|
|
3096
3461
|
*/
|
|
3097
|
-
zscan: (key: string, cursor: number, opts?: ScanCommandOptions | undefined) => Promise<[
|
|
3462
|
+
zscan: (key: string, cursor: string | number, opts?: ScanCommandOptions | undefined) => Promise<[string, (string | number)[]]>;
|
|
3098
3463
|
/**
|
|
3099
3464
|
* @see https://redis.io/commands/zscore
|
|
3100
3465
|
*/
|
|
@@ -3109,6 +3474,24 @@ declare class Redis {
|
|
|
3109
3474
|
zunionstore: (destination: string, numKeys: number, keys: string[], opts?: ZUnionStoreCommandOptions | undefined) => Promise<number>;
|
|
3110
3475
|
}
|
|
3111
3476
|
|
|
3477
|
+
/**
|
|
3478
|
+
* Result of a bad request to upstash
|
|
3479
|
+
*/
|
|
3480
|
+
declare class UpstashError extends Error {
|
|
3481
|
+
constructor(message: string);
|
|
3482
|
+
}
|
|
3483
|
+
declare class UrlError extends Error {
|
|
3484
|
+
constructor(url: string);
|
|
3485
|
+
}
|
|
3486
|
+
|
|
3487
|
+
type error_UpstashError = UpstashError;
|
|
3488
|
+
declare const error_UpstashError: typeof UpstashError;
|
|
3489
|
+
type error_UrlError = UrlError;
|
|
3490
|
+
declare const error_UrlError: typeof UrlError;
|
|
3491
|
+
declare namespace error {
|
|
3492
|
+
export { error_UpstashError as UpstashError, error_UrlError as UrlError };
|
|
3493
|
+
}
|
|
3494
|
+
|
|
3112
3495
|
/**
|
|
3113
3496
|
* @see https://redis.io/commands/zdiffstore
|
|
3114
3497
|
*/
|
|
@@ -3123,4 +3506,4 @@ declare class ZMScoreCommand<TData> extends Command<string[] | null, number[] |
|
|
|
3123
3506
|
constructor(cmd: [key: string, members: TData[]], opts?: CommandOptions<string[] | null, number[] | null>);
|
|
3124
3507
|
}
|
|
3125
3508
|
|
|
3126
|
-
export {
|
|
3509
|
+
export { HValsCommand as $, AppendCommand as A, BitCountCommand as B, CopyCommand as C, DBSizeCommand as D, EchoCommand as E, FlushAllCommand as F, GeoAddCommand as G, GetRangeCommand as H, GetSetCommand as I, HDelCommand as J, HExistsCommand as K, HGetCommand as L, HGetAllCommand as M, HIncrByCommand as N, HIncrByFloatCommand as O, Pipeline as P, HKeysCommand as Q, type RedisOptions as R, HLenCommand as S, HMGetCommand as T, type UpstashRequest as U, HMSetCommand as V, HRandFieldCommand as W, HScanCommand as X, HSetCommand as Y, HSetNXCommand as Z, HStrLenCommand as _, type RequesterConfig as a, SetBitCommand as a$, IncrCommand as a0, IncrByCommand as a1, IncrByFloatCommand as a2, JsonArrAppendCommand as a3, JsonArrIndexCommand as a4, JsonArrInsertCommand as a5, JsonArrLenCommand as a6, JsonArrPopCommand as a7, JsonArrTrimCommand as a8, JsonClearCommand as a9, MGetCommand as aA, MSetCommand as aB, MSetNXCommand as aC, PersistCommand as aD, PExpireCommand as aE, PExpireAtCommand as aF, PingCommand as aG, PSetEXCommand as aH, PTtlCommand as aI, PublishCommand as aJ, RandomKeyCommand as aK, RenameCommand as aL, RenameNXCommand as aM, RPopCommand as aN, RPushCommand as aO, RPushXCommand as aP, SAddCommand as aQ, ScanCommand as aR, type ScanCommandOptions as aS, SCardCommand as aT, ScriptExistsCommand as aU, ScriptFlushCommand as aV, ScriptLoadCommand as aW, SDiffCommand as aX, SDiffStoreCommand as aY, SetCommand as aZ, type SetCommandOptions as a_, JsonDelCommand as aa, JsonForgetCommand as ab, JsonGetCommand as ac, JsonMGetCommand as ad, JsonNumIncrByCommand as ae, JsonNumMultByCommand as af, JsonObjKeysCommand as ag, JsonObjLenCommand as ah, JsonRespCommand as ai, JsonSetCommand as aj, JsonStrAppendCommand as ak, JsonStrLenCommand as al, JsonToggleCommand as am, JsonTypeCommand as an, KeysCommand as ao, LIndexCommand as ap, LInsertCommand as aq, LLenCommand as ar, LMoveCommand as as, LPopCommand as at, LPushCommand as au, LPushXCommand as av, LRangeCommand as aw, LRemCommand as ax, LSetCommand as ay, LTrimCommand as az, Redis as b, SetExCommand as b0, SetNxCommand as b1, SetRangeCommand as b2, SInterCommand as b3, SInterStoreCommand as b4, SIsMemberCommand as b5, SMembersCommand as b6, SMIsMemberCommand as b7, SMoveCommand as b8, SPopCommand as b9, ZPopMinCommand as bA, ZRangeCommand as bB, type ZRangeCommandOptions as bC, ZRankCommand as bD, ZRemCommand as bE, ZRemRangeByLexCommand as bF, ZRemRangeByRankCommand as bG, ZRemRangeByScoreCommand as bH, ZRevRankCommand as bI, ZScanCommand as bJ, ZScoreCommand as bK, ZUnionCommand as bL, type ZUnionCommandOptions as bM, ZUnionStoreCommand as bN, type ZUnionStoreCommandOptions as bO, SRandMemberCommand as ba, SRemCommand as bb, SScanCommand as bc, StrLenCommand as bd, SUnionCommand as be, SUnionStoreCommand as bf, TimeCommand as bg, TouchCommand as bh, TtlCommand as bi, type Type as bj, TypeCommand as bk, UnlinkCommand as bl, XAddCommand as bm, XRangeCommand as bn, type ScoreMember as bo, type ZAddCommandOptions as bp, ZAddCommand as bq, ZCardCommand as br, ZCountCommand as bs, ZDiffStoreCommand as bt, ZIncrByCommand as bu, ZInterStoreCommand as bv, type ZInterStoreCommandOptions as bw, ZLexCountCommand as bx, ZMScoreCommand as by, ZPopMaxCommand as bz, type UpstashResponse as c, type Requester as d, error as e, BitOpCommand as f, BitPosCommand as g, DecrCommand as h, DecrByCommand as i, DelCommand as j, EvalCommand as k, EvalshaCommand as l, ExistsCommand as m, ExpireCommand as n, ExpireAtCommand as o, FlushDBCommand as p, type GeoAddCommandOptions as q, type GeoMember as r, GeoDistCommand as s, GeoHashCommand as t, GeoPosCommand as u, GeoSearchCommand as v, GeoSearchStoreCommand as w, GetCommand as x, GetBitCommand as y, GetDelCommand as z };
|