@upstash/redis 0.0.0-ci.8e8c4bf1901b98b64d9a6a6700eb9936adcb4367-20240725180120 → 0.0.0-ci.8f4f0dd9bfb854edaf3fd55f3011d5c6f010867e-20251212122920
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 +10 -1
- package/chunk-WTYE7OV3.mjs +4520 -0
- package/cloudflare.d.mts +5 -5
- package/cloudflare.d.ts +5 -5
- package/cloudflare.js +4626 -1
- package/cloudflare.mjs +97 -1
- package/fastly.d.mts +2 -2
- package/fastly.d.ts +2 -2
- package/fastly.js +4595 -1
- package/fastly.mjs +66 -1
- package/nodejs.d.mts +14 -6
- package/nodejs.d.ts +14 -6
- package/nodejs.js +4648 -1
- package/nodejs.mjs +119 -1
- package/package.json +1 -1
- package/{zmscore-DFM865AH.d.mts → zmscore-DhpQcqpW.d.mts} +641 -65
- package/{zmscore-DFM865AH.d.ts → zmscore-DhpQcqpW.d.ts} +641 -65
- package/chunk-444SOLGY.js +0 -1
- package/chunk-ITRFDQY2.mjs +0 -1
|
@@ -36,7 +36,23 @@ type UpstashRequest = {
|
|
|
36
36
|
* Request body will be serialized to json
|
|
37
37
|
*/
|
|
38
38
|
body?: unknown;
|
|
39
|
+
/**
|
|
40
|
+
* Additional headers for the request
|
|
41
|
+
*/
|
|
42
|
+
headers?: Record<string, string>;
|
|
39
43
|
upstashSyncToken?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Callback for handling streaming messages
|
|
46
|
+
*/
|
|
47
|
+
onMessage?: (data: string) => void;
|
|
48
|
+
/**
|
|
49
|
+
* Whether this request expects a streaming response
|
|
50
|
+
*/
|
|
51
|
+
isStreaming?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Abort signal for the request
|
|
54
|
+
*/
|
|
55
|
+
signal?: AbortSignal;
|
|
40
56
|
};
|
|
41
57
|
type UpstashResponse<TResult> = {
|
|
42
58
|
result?: TResult;
|
|
@@ -46,11 +62,11 @@ interface Requester {
|
|
|
46
62
|
/**
|
|
47
63
|
* 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
64
|
*/
|
|
49
|
-
readYourWrites
|
|
65
|
+
readYourWrites?: boolean;
|
|
50
66
|
/**
|
|
51
67
|
* 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
68
|
*/
|
|
53
|
-
upstashSyncToken
|
|
69
|
+
upstashSyncToken?: string;
|
|
54
70
|
request: <TResult = unknown>(req: UpstashRequest) => Promise<UpstashResponse<TResult>>;
|
|
55
71
|
}
|
|
56
72
|
type RetryConfig = false | {
|
|
@@ -61,7 +77,7 @@ type RetryConfig = false | {
|
|
|
61
77
|
*/
|
|
62
78
|
retries?: number;
|
|
63
79
|
/**
|
|
64
|
-
* A backoff function receives the current retry
|
|
80
|
+
* A backoff function receives the current retry count and returns a number in milliseconds to wait before retrying.
|
|
65
81
|
*
|
|
66
82
|
* @default
|
|
67
83
|
* ```ts
|
|
@@ -70,6 +86,9 @@ type RetryConfig = false | {
|
|
|
70
86
|
*/
|
|
71
87
|
backoff?: (retryCount: number) => number;
|
|
72
88
|
};
|
|
89
|
+
type Options$1 = {
|
|
90
|
+
backend?: string;
|
|
91
|
+
};
|
|
73
92
|
type RequesterConfig = {
|
|
74
93
|
/**
|
|
75
94
|
* Configure the retry behaviour in case of network errors
|
|
@@ -104,6 +123,19 @@ type RequesterConfig = {
|
|
|
104
123
|
*/
|
|
105
124
|
cache?: CacheSetting;
|
|
106
125
|
};
|
|
126
|
+
type HttpClientConfig = {
|
|
127
|
+
headers?: Record<string, string>;
|
|
128
|
+
baseUrl: string;
|
|
129
|
+
options?: Options$1;
|
|
130
|
+
retry?: RetryConfig;
|
|
131
|
+
agent?: any;
|
|
132
|
+
signal?: AbortSignal | (() => AbortSignal);
|
|
133
|
+
keepAlive?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* When this flag is enabled, any subsequent commands issued by this client are guaranteed to observe the effects of all earlier writes submitted by the same client.
|
|
136
|
+
*/
|
|
137
|
+
readYourWrites?: boolean;
|
|
138
|
+
} & RequesterConfig;
|
|
107
139
|
|
|
108
140
|
type Serialize = (data: unknown) => string | number | boolean;
|
|
109
141
|
type Deserialize<TResult, TData> = (result: TResult) => TData;
|
|
@@ -119,6 +151,31 @@ type CommandOptions<TResult, TData> = {
|
|
|
119
151
|
*/
|
|
120
152
|
automaticDeserialization?: boolean;
|
|
121
153
|
latencyLogging?: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Additional headers to be sent with the request
|
|
156
|
+
*/
|
|
157
|
+
headers?: Record<string, string>;
|
|
158
|
+
/**
|
|
159
|
+
* Path to append to the URL
|
|
160
|
+
*/
|
|
161
|
+
path?: string[];
|
|
162
|
+
/**
|
|
163
|
+
* Options for streaming requests, mainly used for subscribe, monitor commands
|
|
164
|
+
**/
|
|
165
|
+
streamOptions?: {
|
|
166
|
+
/**
|
|
167
|
+
* Callback to be called when a message is received
|
|
168
|
+
*/
|
|
169
|
+
onMessage?: (data: string) => void;
|
|
170
|
+
/**
|
|
171
|
+
* Whether the request is streaming
|
|
172
|
+
*/
|
|
173
|
+
isStreaming?: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Signal to abort the request
|
|
176
|
+
*/
|
|
177
|
+
signal?: AbortSignal;
|
|
178
|
+
};
|
|
122
179
|
};
|
|
123
180
|
/**
|
|
124
181
|
* Command offers default (de)serialization and the exec method to all commands.
|
|
@@ -130,6 +187,11 @@ declare class Command<TResult, TData> {
|
|
|
130
187
|
readonly command: (string | number | boolean)[];
|
|
131
188
|
readonly serialize: Serialize;
|
|
132
189
|
readonly deserialize: Deserialize<TResult, TData>;
|
|
190
|
+
protected readonly headers?: Record<string, string>;
|
|
191
|
+
protected readonly path?: string[];
|
|
192
|
+
protected readonly onMessage?: (data: string) => void;
|
|
193
|
+
protected readonly isStreaming: boolean;
|
|
194
|
+
protected readonly signal?: AbortSignal;
|
|
133
195
|
/**
|
|
134
196
|
* Create a new command instance.
|
|
135
197
|
*
|
|
@@ -225,18 +287,6 @@ declare class ScriptFlushCommand extends Command<"OK", "OK"> {
|
|
|
225
287
|
constructor([opts]: [opts?: ScriptFlushCommandOptions], cmdOpts?: CommandOptions<"OK", "OK">);
|
|
226
288
|
}
|
|
227
289
|
|
|
228
|
-
type ScanCommandOptions = {
|
|
229
|
-
match?: string;
|
|
230
|
-
count?: number;
|
|
231
|
-
type?: string;
|
|
232
|
-
};
|
|
233
|
-
/**
|
|
234
|
-
* @see https://redis.io/commands/scan
|
|
235
|
-
*/
|
|
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[]]>);
|
|
238
|
-
}
|
|
239
|
-
|
|
240
290
|
type GeoAddCommandOptions = {
|
|
241
291
|
nx?: boolean;
|
|
242
292
|
xx?: never;
|
|
@@ -262,6 +312,11 @@ declare class GeoAddCommand<TMemberType = string> extends Command<number | null,
|
|
|
262
312
|
], opts?: CommandOptions<number | null, number | null>);
|
|
263
313
|
}
|
|
264
314
|
|
|
315
|
+
type ExpireOption = "NX" | "nx" | "XX" | "xx" | "GT" | "gt" | "LT" | "lt";
|
|
316
|
+
declare class ExpireCommand extends Command<"0" | "1", 0 | 1> {
|
|
317
|
+
constructor(cmd: [key: string, seconds: number, option?: ExpireOption], opts?: CommandOptions<"0" | "1", 0 | 1>);
|
|
318
|
+
}
|
|
319
|
+
|
|
265
320
|
/**
|
|
266
321
|
* @see https://redis.io/commands/append
|
|
267
322
|
*/
|
|
@@ -280,7 +335,7 @@ declare class BitCountCommand extends Command<number, number> {
|
|
|
280
335
|
type SubCommandArgs<TRest extends unknown[] = []> = [
|
|
281
336
|
encoding: string,
|
|
282
337
|
offset: number | string,
|
|
283
|
-
...TRest
|
|
338
|
+
...rest: TRest
|
|
284
339
|
];
|
|
285
340
|
/**
|
|
286
341
|
* @see https://redis.io/commands/bitfield
|
|
@@ -358,6 +413,13 @@ declare class EchoCommand extends Command<string, string> {
|
|
|
358
413
|
constructor(cmd: [message: string], opts?: CommandOptions<string, string>);
|
|
359
414
|
}
|
|
360
415
|
|
|
416
|
+
/**
|
|
417
|
+
* @see https://redis.io/commands/eval_ro
|
|
418
|
+
*/
|
|
419
|
+
declare class EvalROCommand<TArgs extends unknown[], TData> extends Command<unknown, TData> {
|
|
420
|
+
constructor([script, keys, args]: [script: string, keys: string[], args: TArgs], opts?: CommandOptions<unknown, TData>);
|
|
421
|
+
}
|
|
422
|
+
|
|
361
423
|
/**
|
|
362
424
|
* @see https://redis.io/commands/eval
|
|
363
425
|
*/
|
|
@@ -365,6 +427,13 @@ declare class EvalCommand<TArgs extends unknown[], TData> extends Command<unknow
|
|
|
365
427
|
constructor([script, keys, args]: [script: string, keys: string[], args: TArgs], opts?: CommandOptions<unknown, TData>);
|
|
366
428
|
}
|
|
367
429
|
|
|
430
|
+
/**
|
|
431
|
+
* @see https://redis.io/commands/evalsha_ro
|
|
432
|
+
*/
|
|
433
|
+
declare class EvalshaROCommand<TArgs extends unknown[], TData> extends Command<unknown, TData> {
|
|
434
|
+
constructor([sha, keys, args]: [sha: string, keys: string[], args?: TArgs], opts?: CommandOptions<unknown, TData>);
|
|
435
|
+
}
|
|
436
|
+
|
|
368
437
|
/**
|
|
369
438
|
* @see https://redis.io/commands/evalsha
|
|
370
439
|
*/
|
|
@@ -379,16 +448,11 @@ declare class ExistsCommand extends Command<number, number> {
|
|
|
379
448
|
constructor(cmd: [...keys: string[]], opts?: CommandOptions<number, number>);
|
|
380
449
|
}
|
|
381
450
|
|
|
382
|
-
type ExpireOptions = "NX" | "nx" | "XX" | "xx" | "GT" | "gt" | "LT" | "lt";
|
|
383
|
-
declare class ExpireCommand extends Command<"0" | "1", 0 | 1> {
|
|
384
|
-
constructor(cmd: [key: string, seconds: number, option?: ExpireOptions], opts?: CommandOptions<"0" | "1", 0 | 1>);
|
|
385
|
-
}
|
|
386
|
-
|
|
387
451
|
/**
|
|
388
452
|
* @see https://redis.io/commands/expireat
|
|
389
453
|
*/
|
|
390
454
|
declare class ExpireAtCommand extends Command<"0" | "1", 0 | 1> {
|
|
391
|
-
constructor(cmd: [key: string, unix: number], opts?: CommandOptions<"0" | "1", 0 | 1>);
|
|
455
|
+
constructor(cmd: [key: string, unix: number, option?: ExpireOption], opts?: CommandOptions<"0" | "1", 0 | 1>);
|
|
392
456
|
}
|
|
393
457
|
|
|
394
458
|
/**
|
|
@@ -563,6 +627,50 @@ declare class GetDelCommand<TData = string> extends Command<unknown | null, TDat
|
|
|
563
627
|
constructor(cmd: [key: string], opts?: CommandOptions<unknown | null, TData | null>);
|
|
564
628
|
}
|
|
565
629
|
|
|
630
|
+
type GetExCommandOptions = {
|
|
631
|
+
ex: number;
|
|
632
|
+
px?: never;
|
|
633
|
+
exat?: never;
|
|
634
|
+
pxat?: never;
|
|
635
|
+
persist?: never;
|
|
636
|
+
} | {
|
|
637
|
+
ex?: never;
|
|
638
|
+
px: number;
|
|
639
|
+
exat?: never;
|
|
640
|
+
pxat?: never;
|
|
641
|
+
persist?: never;
|
|
642
|
+
} | {
|
|
643
|
+
ex?: never;
|
|
644
|
+
px?: never;
|
|
645
|
+
exat: number;
|
|
646
|
+
pxat?: never;
|
|
647
|
+
persist?: never;
|
|
648
|
+
} | {
|
|
649
|
+
ex?: never;
|
|
650
|
+
px?: never;
|
|
651
|
+
exat?: never;
|
|
652
|
+
pxat: number;
|
|
653
|
+
persist?: never;
|
|
654
|
+
} | {
|
|
655
|
+
ex?: never;
|
|
656
|
+
px?: never;
|
|
657
|
+
exat?: never;
|
|
658
|
+
pxat?: never;
|
|
659
|
+
persist: true;
|
|
660
|
+
} | {
|
|
661
|
+
ex?: never;
|
|
662
|
+
px?: never;
|
|
663
|
+
exat?: never;
|
|
664
|
+
pxat?: never;
|
|
665
|
+
persist?: never;
|
|
666
|
+
};
|
|
667
|
+
/**
|
|
668
|
+
* @see https://redis.io/commands/getex
|
|
669
|
+
*/
|
|
670
|
+
declare class GetExCommand<TData = string> extends Command<unknown | null, TData | null> {
|
|
671
|
+
constructor([key, opts]: [key: string, opts?: GetExCommandOptions], cmdOpts?: CommandOptions<unknown | null, TData | null>);
|
|
672
|
+
}
|
|
673
|
+
|
|
566
674
|
/**
|
|
567
675
|
* @see https://redis.io/commands/getrange
|
|
568
676
|
*/
|
|
@@ -591,6 +699,58 @@ declare class HExistsCommand extends Command<number, number> {
|
|
|
591
699
|
constructor(cmd: [key: string, field: string], opts?: CommandOptions<number, number>);
|
|
592
700
|
}
|
|
593
701
|
|
|
702
|
+
declare class HExpireCommand extends Command<(-2 | 0 | 1 | 2)[], (-2 | 0 | 1 | 2)[]> {
|
|
703
|
+
constructor(cmd: [
|
|
704
|
+
key: string,
|
|
705
|
+
fields: (string | number) | (string | number)[],
|
|
706
|
+
seconds: number,
|
|
707
|
+
option?: ExpireOption
|
|
708
|
+
], opts?: CommandOptions<(-2 | 0 | 1 | 2)[], (-2 | 0 | 1 | 2)[]>);
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
declare class HExpireAtCommand extends Command<(-2 | 0 | 1 | 2)[], (-2 | 0 | 1 | 2)[]> {
|
|
712
|
+
constructor(cmd: [
|
|
713
|
+
key: string,
|
|
714
|
+
fields: (string | number) | (string | number)[],
|
|
715
|
+
timestamp: number,
|
|
716
|
+
option?: ExpireOption
|
|
717
|
+
], opts?: CommandOptions<(-2 | 0 | 1 | 2)[], (-2 | 0 | 1 | 2)[]>);
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
declare class HExpireTimeCommand extends Command<number[], number[]> {
|
|
721
|
+
constructor(cmd: [key: string, fields: (string | number) | (string | number)[]], opts?: CommandOptions<number[], number[]>);
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
declare class HPersistCommand extends Command<(-2 | -1 | 1)[], (-2 | -1 | 1)[]> {
|
|
725
|
+
constructor(cmd: [key: string, fields: (string | number) | (string | number)[]], opts?: CommandOptions<(-2 | -1 | 1)[], (-2 | -1 | 1)[]>);
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
declare class HPExpireCommand extends Command<(-2 | 0 | 1 | 2)[], (-2 | 0 | 1 | 2)[]> {
|
|
729
|
+
constructor(cmd: [
|
|
730
|
+
key: string,
|
|
731
|
+
fields: (string | number) | (string | number)[],
|
|
732
|
+
milliseconds: number,
|
|
733
|
+
option?: ExpireOption
|
|
734
|
+
], opts?: CommandOptions<(-2 | 0 | 1 | 2)[], (-2 | 0 | 1 | 2)[]>);
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
declare class HPExpireAtCommand extends Command<(-2 | 0 | 1 | 2)[], (-2 | 0 | 1 | 2)[]> {
|
|
738
|
+
constructor(cmd: [
|
|
739
|
+
key: string,
|
|
740
|
+
fields: (string | number) | (string | number)[],
|
|
741
|
+
timestamp: number,
|
|
742
|
+
option?: ExpireOption
|
|
743
|
+
], opts?: CommandOptions<(-2 | 0 | 1 | 2)[], (-2 | 0 | 1 | 2)[]>);
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
declare class HPExpireTimeCommand extends Command<number[], number[]> {
|
|
747
|
+
constructor(cmd: [key: string, fields: (string | number) | (string | number)[]], opts?: CommandOptions<number[], number[]>);
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
declare class HPTtlCommand extends Command<number[], number[]> {
|
|
751
|
+
constructor(cmd: [key: string, fields: (string | number) | (string | number)[]], opts?: CommandOptions<number[], number[]>);
|
|
752
|
+
}
|
|
753
|
+
|
|
594
754
|
/**
|
|
595
755
|
* @see https://redis.io/commands/hget
|
|
596
756
|
*/
|
|
@@ -664,6 +824,39 @@ declare class HRandFieldCommand<TData extends string | string[] | Record<string,
|
|
|
664
824
|
constructor(cmd: [key: string, count: number, withValues: boolean], opts?: CommandOptions<string[], Partial<TData>>);
|
|
665
825
|
}
|
|
666
826
|
|
|
827
|
+
type ScanCommandOptionsStandard = {
|
|
828
|
+
match?: string;
|
|
829
|
+
count?: number;
|
|
830
|
+
type?: string;
|
|
831
|
+
withType?: false;
|
|
832
|
+
};
|
|
833
|
+
type ScanCommandOptionsWithType = {
|
|
834
|
+
match?: string;
|
|
835
|
+
count?: number;
|
|
836
|
+
/**
|
|
837
|
+
* Includes types of each key in the result
|
|
838
|
+
*
|
|
839
|
+
* @example
|
|
840
|
+
* ```typescript
|
|
841
|
+
* await redis.scan("0", { withType: true })
|
|
842
|
+
* // ["0", [{ key: "key1", type: "string" }, { key: "key2", type: "list" }]]
|
|
843
|
+
* ```
|
|
844
|
+
*/
|
|
845
|
+
withType: true;
|
|
846
|
+
};
|
|
847
|
+
type ScanCommandOptions = ScanCommandOptionsStandard | ScanCommandOptionsWithType;
|
|
848
|
+
type ScanResultStandard = [string, string[]];
|
|
849
|
+
type ScanResultWithType = [string, {
|
|
850
|
+
key: string;
|
|
851
|
+
type: string;
|
|
852
|
+
}[]];
|
|
853
|
+
/**
|
|
854
|
+
* @see https://redis.io/commands/scan
|
|
855
|
+
*/
|
|
856
|
+
declare class ScanCommand<TData = ScanResultStandard> extends Command<[string, string[]], TData> {
|
|
857
|
+
constructor([cursor, opts]: [cursor: string | number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[string, string[]], TData>);
|
|
858
|
+
}
|
|
859
|
+
|
|
667
860
|
/**
|
|
668
861
|
* @see https://redis.io/commands/hscan
|
|
669
862
|
*/
|
|
@@ -698,6 +891,10 @@ declare class HStrLenCommand extends Command<number, number> {
|
|
|
698
891
|
constructor(cmd: [key: string, field: string], opts?: CommandOptions<number, number>);
|
|
699
892
|
}
|
|
700
893
|
|
|
894
|
+
declare class HTtlCommand extends Command<number[], number[]> {
|
|
895
|
+
constructor(cmd: [key: string, fields: (string | number) | (string | number)[]], opts?: CommandOptions<number[], number[]>);
|
|
896
|
+
}
|
|
897
|
+
|
|
701
898
|
/**
|
|
702
899
|
* @see https://redis.io/commands/hvals
|
|
703
900
|
*/
|
|
@@ -804,6 +1001,13 @@ declare class JsonGetCommand<TData extends (unknown | Record<string, unknown>) |
|
|
|
804
1001
|
] | [key: string, ...path: string[]], opts?: CommandOptions<TData | null, TData | null>);
|
|
805
1002
|
}
|
|
806
1003
|
|
|
1004
|
+
/**
|
|
1005
|
+
* @see https://redis.io/commands/json.merge
|
|
1006
|
+
*/
|
|
1007
|
+
declare class JsonMergeCommand<TData extends string | number | Record<string, unknown> | Array<unknown>> extends Command<"OK" | null, "OK" | null> {
|
|
1008
|
+
constructor(cmd: [key: string, path: string, value: TData], opts?: CommandOptions<"OK" | null, "OK" | null>);
|
|
1009
|
+
}
|
|
1010
|
+
|
|
807
1011
|
/**
|
|
808
1012
|
* @see https://redis.io/commands/json.mget
|
|
809
1013
|
*/
|
|
@@ -1006,14 +1210,14 @@ declare class PersistCommand extends Command<"0" | "1", 0 | 1> {
|
|
|
1006
1210
|
* @see https://redis.io/commands/pexpire
|
|
1007
1211
|
*/
|
|
1008
1212
|
declare class PExpireCommand extends Command<"0" | "1", 0 | 1> {
|
|
1009
|
-
constructor(cmd: [key: string, milliseconds: number], opts?: CommandOptions<"0" | "1", 0 | 1>);
|
|
1213
|
+
constructor(cmd: [key: string, milliseconds: number, option?: ExpireOption], opts?: CommandOptions<"0" | "1", 0 | 1>);
|
|
1010
1214
|
}
|
|
1011
1215
|
|
|
1012
1216
|
/**
|
|
1013
1217
|
* @see https://redis.io/commands/pexpireat
|
|
1014
1218
|
*/
|
|
1015
1219
|
declare class PExpireAtCommand extends Command<"0" | "1", 0 | 1> {
|
|
1016
|
-
constructor(cmd: [key: string, unix: number], opts?: CommandOptions<"0" | "1", 0 | 1>);
|
|
1220
|
+
constructor(cmd: [key: string, unix: number, option?: ExpireOption], opts?: CommandOptions<"0" | "1", 0 | 1>);
|
|
1017
1221
|
}
|
|
1018
1222
|
|
|
1019
1223
|
/**
|
|
@@ -1090,7 +1294,7 @@ declare class RPushXCommand<TData = string> extends Command<number, number> {
|
|
|
1090
1294
|
* @see https://redis.io/commands/sadd
|
|
1091
1295
|
*/
|
|
1092
1296
|
declare class SAddCommand<TData = string> extends Command<number, number> {
|
|
1093
|
-
constructor(cmd: [key: string, ...members: TData[]], opts?: CommandOptions<number, number>);
|
|
1297
|
+
constructor(cmd: [key: string, member: TData, ...members: TData[]], opts?: CommandOptions<number, number>);
|
|
1094
1298
|
}
|
|
1095
1299
|
|
|
1096
1300
|
/**
|
|
@@ -1373,16 +1577,33 @@ type XReadCommandOptions = [
|
|
|
1373
1577
|
id: string | string[],
|
|
1374
1578
|
options?: {
|
|
1375
1579
|
count?: number;
|
|
1580
|
+
/**
|
|
1581
|
+
* @deprecated block is not yet supported in Upstash Redis
|
|
1582
|
+
*/
|
|
1376
1583
|
blockMS?: number;
|
|
1377
1584
|
}
|
|
1378
1585
|
];
|
|
1379
|
-
type XReadOptions = XReadCommandOptions extends [infer K, infer I, ...any[]] ? K extends string ? I extends string ? [
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1586
|
+
type XReadOptions = XReadCommandOptions extends [infer K, infer I, ...any[]] ? K extends string ? I extends string ? [
|
|
1587
|
+
key: string,
|
|
1588
|
+
id: string,
|
|
1589
|
+
options?: {
|
|
1590
|
+
count?: number;
|
|
1591
|
+
/**
|
|
1592
|
+
* @deprecated block is not yet supported in Upstash Redis
|
|
1593
|
+
*/
|
|
1594
|
+
blockMS?: number;
|
|
1595
|
+
}
|
|
1596
|
+
] : never : K extends string[] ? I extends string[] ? [
|
|
1597
|
+
key: string[],
|
|
1598
|
+
id: string[],
|
|
1599
|
+
options?: {
|
|
1600
|
+
count?: number;
|
|
1601
|
+
/**
|
|
1602
|
+
* @deprecated block is not yet supported in Upstash Redis
|
|
1603
|
+
*/
|
|
1604
|
+
blockMS?: number;
|
|
1605
|
+
}
|
|
1606
|
+
] : never : never : never;
|
|
1386
1607
|
/**
|
|
1387
1608
|
* @see https://redis.io/commands/xread
|
|
1388
1609
|
*/
|
|
@@ -1392,6 +1613,9 @@ declare class XReadCommand extends Command<number, unknown[]> {
|
|
|
1392
1613
|
|
|
1393
1614
|
type Options = {
|
|
1394
1615
|
count?: number;
|
|
1616
|
+
/**
|
|
1617
|
+
* @deprecated block is not yet supported in Upstash Redis
|
|
1618
|
+
*/
|
|
1395
1619
|
blockMS?: number;
|
|
1396
1620
|
NOACK?: boolean;
|
|
1397
1621
|
};
|
|
@@ -1569,7 +1793,11 @@ declare class ZRemRangeByRankCommand extends Command<number, number> {
|
|
|
1569
1793
|
* @see https://redis.io/commands/zremrangebyscore
|
|
1570
1794
|
*/
|
|
1571
1795
|
declare class ZRemRangeByScoreCommand extends Command<number, number> {
|
|
1572
|
-
constructor(cmd: [
|
|
1796
|
+
constructor(cmd: [
|
|
1797
|
+
key: string,
|
|
1798
|
+
min: number | `(${number}` | "-inf" | "+inf",
|
|
1799
|
+
max: number | `(${number}` | "-inf" | "+inf"
|
|
1800
|
+
], opts?: CommandOptions<number, number>);
|
|
1573
1801
|
}
|
|
1574
1802
|
|
|
1575
1803
|
/**
|
|
@@ -1599,9 +1827,79 @@ declare class ZScoreCommand<TData> extends Command<string | null, number | null>
|
|
|
1599
1827
|
constructor(cmd: [key: string, member: TData], opts?: CommandOptions<string | null, number | null>);
|
|
1600
1828
|
}
|
|
1601
1829
|
|
|
1830
|
+
type BaseMessageData<TMessage> = {
|
|
1831
|
+
channel: string;
|
|
1832
|
+
message: TMessage;
|
|
1833
|
+
};
|
|
1834
|
+
type PatternMessageData<TMessage> = BaseMessageData<TMessage> & {
|
|
1835
|
+
pattern: string;
|
|
1836
|
+
};
|
|
1837
|
+
type SubscriptionCountEvent = number;
|
|
1838
|
+
type MessageEventMap<TMessage> = {
|
|
1839
|
+
message: BaseMessageData<TMessage>;
|
|
1840
|
+
subscribe: SubscriptionCountEvent;
|
|
1841
|
+
unsubscribe: SubscriptionCountEvent;
|
|
1842
|
+
pmessage: PatternMessageData<TMessage>;
|
|
1843
|
+
psubscribe: SubscriptionCountEvent;
|
|
1844
|
+
punsubscribe: SubscriptionCountEvent;
|
|
1845
|
+
error: Error;
|
|
1846
|
+
[key: `message:${string}`]: BaseMessageData<TMessage>;
|
|
1847
|
+
[key: `pmessage:${string}`]: PatternMessageData<TMessage>;
|
|
1848
|
+
};
|
|
1849
|
+
type EventType = keyof MessageEventMap<any>;
|
|
1850
|
+
type Listener<TMessage, T extends EventType> = (event: MessageEventMap<TMessage>[T]) => void;
|
|
1851
|
+
declare class Subscriber<TMessage = any> extends EventTarget {
|
|
1852
|
+
private subscriptions;
|
|
1853
|
+
private client;
|
|
1854
|
+
private listeners;
|
|
1855
|
+
private opts?;
|
|
1856
|
+
constructor(client: Requester, channels: string[], isPattern?: boolean, opts?: Pick<RedisOptions, "automaticDeserialization">);
|
|
1857
|
+
private subscribeToChannel;
|
|
1858
|
+
private subscribeToPattern;
|
|
1859
|
+
private handleMessage;
|
|
1860
|
+
private dispatchToListeners;
|
|
1861
|
+
on<T extends keyof MessageEventMap<TMessage>>(type: T, listener: Listener<TMessage, T>): void;
|
|
1862
|
+
removeAllListeners(): void;
|
|
1863
|
+
unsubscribe(channels?: string[]): Promise<void>;
|
|
1864
|
+
getSubscribedChannels(): string[];
|
|
1865
|
+
}
|
|
1866
|
+
|
|
1602
1867
|
type InferResponseData<T extends unknown[]> = {
|
|
1603
1868
|
[K in keyof T]: T[K] extends Command<any, infer TData> ? TData : unknown;
|
|
1604
1869
|
};
|
|
1870
|
+
interface ExecMethod<TCommands extends Command<any, any>[]> {
|
|
1871
|
+
/**
|
|
1872
|
+
* Send the pipeline request to upstash.
|
|
1873
|
+
*
|
|
1874
|
+
* Returns an array with the results of all pipelined commands.
|
|
1875
|
+
*
|
|
1876
|
+
* If all commands are statically chained from start to finish, types are inferred. You can still define a return type manually if necessary though:
|
|
1877
|
+
* ```ts
|
|
1878
|
+
* const p = redis.pipeline()
|
|
1879
|
+
* p.get("key")
|
|
1880
|
+
* const result = p.exec<[{ greeting: string }]>()
|
|
1881
|
+
* ```
|
|
1882
|
+
*
|
|
1883
|
+
* 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.
|
|
1884
|
+
*
|
|
1885
|
+
* 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 }`.
|
|
1886
|
+
*
|
|
1887
|
+
* ```ts
|
|
1888
|
+
* const p = redis.pipeline()
|
|
1889
|
+
* p.get("key")
|
|
1890
|
+
*
|
|
1891
|
+
* const result = await p.exec({ keepErrors: true });
|
|
1892
|
+
* const getResult = result[0].result
|
|
1893
|
+
* const getError = result[0].error
|
|
1894
|
+
* ```
|
|
1895
|
+
*/
|
|
1896
|
+
<TCommandResults extends unknown[] = [] extends TCommands ? unknown[] : InferResponseData<TCommands>>(): Promise<TCommandResults>;
|
|
1897
|
+
<TCommandResults extends unknown[] = [] extends TCommands ? unknown[] : InferResponseData<TCommands>>(options: {
|
|
1898
|
+
keepErrors: true;
|
|
1899
|
+
}): Promise<{
|
|
1900
|
+
[K in keyof TCommandResults]: UpstashResponse<TCommandResults[K]>;
|
|
1901
|
+
}>;
|
|
1902
|
+
}
|
|
1605
1903
|
/**
|
|
1606
1904
|
* Upstash REST API supports command pipelining to send multiple commands in
|
|
1607
1905
|
* batch, instead of sending each command one by one and waiting for a response.
|
|
@@ -1650,19 +1948,7 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
1650
1948
|
commandOptions?: CommandOptions<any, any>;
|
|
1651
1949
|
multiExec?: boolean;
|
|
1652
1950
|
});
|
|
1653
|
-
|
|
1654
|
-
* Send the pipeline request to upstash.
|
|
1655
|
-
*
|
|
1656
|
-
* Returns an array with the results of all pipelined commands.
|
|
1657
|
-
*
|
|
1658
|
-
* If all commands are statically chained from start to finish, types are inferred. You can still define a return type manually if necessary though:
|
|
1659
|
-
* ```ts
|
|
1660
|
-
* const p = redis.pipeline()
|
|
1661
|
-
* p.get("key")
|
|
1662
|
-
* const result = p.exec<[{ greeting: string }]>()
|
|
1663
|
-
* ```
|
|
1664
|
-
*/
|
|
1665
|
-
exec: <TCommandResults extends unknown[] = [] extends TCommands ? unknown[] : InferResponseData<TCommands>>() => Promise<TCommandResults>;
|
|
1951
|
+
exec: ExecMethod<TCommands>;
|
|
1666
1952
|
/**
|
|
1667
1953
|
* Returns the length of pipeline before the execution
|
|
1668
1954
|
*/
|
|
@@ -1738,10 +2024,18 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
1738
2024
|
* @see https://redis.io/commands/echo
|
|
1739
2025
|
*/
|
|
1740
2026
|
echo: (message: string) => Pipeline<[...TCommands, Command<any, string>]>;
|
|
2027
|
+
/**
|
|
2028
|
+
* @see https://redis.io/commands/eval_ro
|
|
2029
|
+
*/
|
|
2030
|
+
evalRo: <TArgs extends unknown[], TData = unknown>(script: string, keys: string[], args: TArgs) => Pipeline<[...TCommands, Command<any, TData>]>;
|
|
1741
2031
|
/**
|
|
1742
2032
|
* @see https://redis.io/commands/eval
|
|
1743
2033
|
*/
|
|
1744
2034
|
eval: <TArgs extends unknown[], TData = unknown>(script: string, keys: string[], args: TArgs) => Pipeline<[...TCommands, Command<any, TData>]>;
|
|
2035
|
+
/**
|
|
2036
|
+
* @see https://redis.io/commands/evalsha_ro
|
|
2037
|
+
*/
|
|
2038
|
+
evalshaRo: <TArgs extends unknown[], TData = unknown>(sha1: string, keys: string[], args: TArgs) => Pipeline<[...TCommands, Command<any, TData>]>;
|
|
1745
2039
|
/**
|
|
1746
2040
|
* @see https://redis.io/commands/evalsha
|
|
1747
2041
|
*/
|
|
@@ -1753,11 +2047,11 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
1753
2047
|
/**
|
|
1754
2048
|
* @see https://redis.io/commands/expire
|
|
1755
2049
|
*/
|
|
1756
|
-
expire: (key: string, seconds: number, option?:
|
|
2050
|
+
expire: (key: string, seconds: number, option?: ExpireOption | undefined) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
|
|
1757
2051
|
/**
|
|
1758
2052
|
* @see https://redis.io/commands/expireat
|
|
1759
2053
|
*/
|
|
1760
|
-
expireat: (key: string, unix: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
|
|
2054
|
+
expireat: (key: string, unix: number, option?: ExpireOption | undefined) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
|
|
1761
2055
|
/**
|
|
1762
2056
|
* @see https://redis.io/commands/flushall
|
|
1763
2057
|
*/
|
|
@@ -1870,6 +2164,46 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
1870
2164
|
* @see https://redis.io/commands/getdel
|
|
1871
2165
|
*/
|
|
1872
2166
|
getdel: <TData>(key: string) => Pipeline<[...TCommands, Command<any, TData | null>]>;
|
|
2167
|
+
/**
|
|
2168
|
+
* @see https://redis.io/commands/getex
|
|
2169
|
+
*/
|
|
2170
|
+
getex: <TData>(key: string, opts?: ({
|
|
2171
|
+
ex: number;
|
|
2172
|
+
px?: never;
|
|
2173
|
+
exat?: never;
|
|
2174
|
+
pxat?: never;
|
|
2175
|
+
persist?: never;
|
|
2176
|
+
} | {
|
|
2177
|
+
ex?: never;
|
|
2178
|
+
px: number;
|
|
2179
|
+
exat?: never;
|
|
2180
|
+
pxat?: never;
|
|
2181
|
+
persist?: never;
|
|
2182
|
+
} | {
|
|
2183
|
+
ex?: never;
|
|
2184
|
+
px?: never;
|
|
2185
|
+
exat: number;
|
|
2186
|
+
pxat?: never;
|
|
2187
|
+
persist?: never;
|
|
2188
|
+
} | {
|
|
2189
|
+
ex?: never;
|
|
2190
|
+
px?: never;
|
|
2191
|
+
exat?: never;
|
|
2192
|
+
pxat: number;
|
|
2193
|
+
persist?: never;
|
|
2194
|
+
} | {
|
|
2195
|
+
ex?: never;
|
|
2196
|
+
px?: never;
|
|
2197
|
+
exat?: never;
|
|
2198
|
+
pxat?: never;
|
|
2199
|
+
persist: true;
|
|
2200
|
+
} | {
|
|
2201
|
+
ex?: never;
|
|
2202
|
+
px?: never;
|
|
2203
|
+
exat?: never;
|
|
2204
|
+
pxat?: never;
|
|
2205
|
+
persist?: never;
|
|
2206
|
+
}) | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
|
|
1873
2207
|
/**
|
|
1874
2208
|
* @see https://redis.io/commands/getrange
|
|
1875
2209
|
*/
|
|
@@ -1886,6 +2220,42 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
1886
2220
|
* @see https://redis.io/commands/hexists
|
|
1887
2221
|
*/
|
|
1888
2222
|
hexists: (key: string, field: string) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
2223
|
+
/**
|
|
2224
|
+
* @see https://redis.io/commands/hexpire
|
|
2225
|
+
*/
|
|
2226
|
+
hexpire: (key: string, fields: string | number | (string | number)[], seconds: number, option?: ExpireOption | undefined) => Pipeline<[...TCommands, Command<any, (0 | 1 | 2 | -2)[]>]>;
|
|
2227
|
+
/**
|
|
2228
|
+
* @see https://redis.io/commands/hexpireat
|
|
2229
|
+
*/
|
|
2230
|
+
hexpireat: (key: string, fields: string | number | (string | number)[], timestamp: number, option?: ExpireOption | undefined) => Pipeline<[...TCommands, Command<any, (0 | 1 | 2 | -2)[]>]>;
|
|
2231
|
+
/**
|
|
2232
|
+
* @see https://redis.io/commands/hexpiretime
|
|
2233
|
+
*/
|
|
2234
|
+
hexpiretime: (key: string, fields: string | number | (string | number)[]) => Pipeline<[...TCommands, Command<any, number[]>]>;
|
|
2235
|
+
/**
|
|
2236
|
+
* @see https://redis.io/commands/httl
|
|
2237
|
+
*/
|
|
2238
|
+
httl: (key: string, fields: string | number | (string | number)[]) => Pipeline<[...TCommands, Command<any, number[]>]>;
|
|
2239
|
+
/**
|
|
2240
|
+
* @see https://redis.io/commands/hpexpire
|
|
2241
|
+
*/
|
|
2242
|
+
hpexpire: (key: string, fields: string | number | (string | number)[], milliseconds: number, option?: ExpireOption | undefined) => Pipeline<[...TCommands, Command<any, (0 | 1 | 2 | -2)[]>]>;
|
|
2243
|
+
/**
|
|
2244
|
+
* @see https://redis.io/commands/hpexpireat
|
|
2245
|
+
*/
|
|
2246
|
+
hpexpireat: (key: string, fields: string | number | (string | number)[], timestamp: number, option?: ExpireOption | undefined) => Pipeline<[...TCommands, Command<any, (0 | 1 | 2 | -2)[]>]>;
|
|
2247
|
+
/**
|
|
2248
|
+
* @see https://redis.io/commands/hpexpiretime
|
|
2249
|
+
*/
|
|
2250
|
+
hpexpiretime: (key: string, fields: string | number | (string | number)[]) => Pipeline<[...TCommands, Command<any, number[]>]>;
|
|
2251
|
+
/**
|
|
2252
|
+
* @see https://redis.io/commands/hpttl
|
|
2253
|
+
*/
|
|
2254
|
+
hpttl: (key: string, fields: string | number | (string | number)[]) => Pipeline<[...TCommands, Command<any, number[]>]>;
|
|
2255
|
+
/**
|
|
2256
|
+
* @see https://redis.io/commands/hpersist
|
|
2257
|
+
*/
|
|
2258
|
+
hpersist: (key: string, fields: string | number | (string | number)[]) => Pipeline<[...TCommands, Command<any, (1 | -2 | -1)[]>]>;
|
|
1889
2259
|
/**
|
|
1890
2260
|
* @see https://redis.io/commands/hget
|
|
1891
2261
|
*/
|
|
@@ -2033,11 +2403,11 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
2033
2403
|
/**
|
|
2034
2404
|
* @see https://redis.io/commands/pexpire
|
|
2035
2405
|
*/
|
|
2036
|
-
pexpire: (key: string, milliseconds: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
|
|
2406
|
+
pexpire: (key: string, milliseconds: number, option?: ExpireOption | undefined) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
|
|
2037
2407
|
/**
|
|
2038
2408
|
* @see https://redis.io/commands/pexpireat
|
|
2039
2409
|
*/
|
|
2040
|
-
pexpireat: (key: string, unix: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
|
|
2410
|
+
pexpireat: (key: string, unix: number, option?: ExpireOption | undefined) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
|
|
2041
2411
|
/**
|
|
2042
2412
|
* @see https://redis.io/commands/pfadd
|
|
2043
2413
|
*/
|
|
@@ -2093,11 +2463,11 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
2093
2463
|
/**
|
|
2094
2464
|
* @see https://redis.io/commands/sadd
|
|
2095
2465
|
*/
|
|
2096
|
-
sadd: <TData>(key: string, ...members: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
2466
|
+
sadd: <TData>(key: string, member: TData, ...members: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
2097
2467
|
/**
|
|
2098
2468
|
* @see https://redis.io/commands/scan
|
|
2099
2469
|
*/
|
|
2100
|
-
scan: (cursor: string | number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any,
|
|
2470
|
+
scan: (cursor: string | number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, any>]>;
|
|
2101
2471
|
/**
|
|
2102
2472
|
* @see https://redis.io/commands/scard
|
|
2103
2473
|
*/
|
|
@@ -2394,7 +2764,7 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
2394
2764
|
/**
|
|
2395
2765
|
* @see https://redis.io/commands/zremrangebyscore
|
|
2396
2766
|
*/
|
|
2397
|
-
zremrangebyscore: (key: string, min: number, max: number) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
2767
|
+
zremrangebyscore: (key: string, min: number | `(${number}` | "-inf" | "+inf", max: number | `(${number}` | "-inf" | "+inf") => Pipeline<[...TCommands, Command<any, number>]>;
|
|
2398
2768
|
/**
|
|
2399
2769
|
* @see https://redis.io/commands/zrevrank
|
|
2400
2770
|
*/
|
|
@@ -2459,6 +2829,10 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
2459
2829
|
* @see https://redis.io/commands/json.get
|
|
2460
2830
|
*/
|
|
2461
2831
|
get: (...args: CommandArgs<typeof JsonGetCommand>) => Pipeline<[...TCommands, Command<any, any>]>;
|
|
2832
|
+
/**
|
|
2833
|
+
* @see https://redis.io/commands/json.merge
|
|
2834
|
+
*/
|
|
2835
|
+
merge: (key: string, path: string, value: string | number | unknown[] | Record<string, unknown>) => Pipeline<[...TCommands, Command<any, "OK" | null>]>;
|
|
2462
2836
|
/**
|
|
2463
2837
|
* @see https://redis.io/commands/json.mget
|
|
2464
2838
|
*/
|
|
@@ -2534,9 +2908,20 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
2534
2908
|
*/
|
|
2535
2909
|
declare class Script<TResult = unknown> {
|
|
2536
2910
|
readonly script: string;
|
|
2537
|
-
|
|
2911
|
+
/**
|
|
2912
|
+
* @deprecated This property is initialized to an empty string and will be set in the init method
|
|
2913
|
+
* asynchronously. Do not use this property immidiately after the constructor.
|
|
2914
|
+
*
|
|
2915
|
+
* This property is only exposed for backwards compatibility and will be removed in the
|
|
2916
|
+
* future major release.
|
|
2917
|
+
*/
|
|
2918
|
+
sha1: string;
|
|
2538
2919
|
private readonly redis;
|
|
2539
2920
|
constructor(redis: Redis, script: string);
|
|
2921
|
+
/**
|
|
2922
|
+
* Initialize the script by computing its SHA-1 hash.
|
|
2923
|
+
*/
|
|
2924
|
+
private init;
|
|
2540
2925
|
/**
|
|
2541
2926
|
* Send an `EVAL` command to redis.
|
|
2542
2927
|
*/
|
|
@@ -2558,6 +2943,56 @@ declare class Script<TResult = unknown> {
|
|
|
2558
2943
|
private digest;
|
|
2559
2944
|
}
|
|
2560
2945
|
|
|
2946
|
+
/**
|
|
2947
|
+
* Creates a new script.
|
|
2948
|
+
*
|
|
2949
|
+
* Scripts offer the ability to optimistically try to execute a script without having to send the
|
|
2950
|
+
* entire script to the server. If the script is loaded on the server, it tries again by sending
|
|
2951
|
+
* the entire script. Afterwards, the script is cached on the server.
|
|
2952
|
+
*
|
|
2953
|
+
* @example
|
|
2954
|
+
* ```ts
|
|
2955
|
+
* const redis = new Redis({...})
|
|
2956
|
+
*
|
|
2957
|
+
* const script = redis.createScript<string>("return ARGV[1];", { readOnly: true })
|
|
2958
|
+
* const arg1 = await script.evalRo([], ["Hello World"])
|
|
2959
|
+
* expect(arg1, "Hello World")
|
|
2960
|
+
* ```
|
|
2961
|
+
*/
|
|
2962
|
+
declare class ScriptRO<TResult = unknown> {
|
|
2963
|
+
readonly script: string;
|
|
2964
|
+
/**
|
|
2965
|
+
* @deprecated This property is initialized to an empty string and will be set in the init method
|
|
2966
|
+
* asynchronously. Do not use this property immidiately after the constructor.
|
|
2967
|
+
*
|
|
2968
|
+
* This property is only exposed for backwards compatibility and will be removed in the
|
|
2969
|
+
* future major release.
|
|
2970
|
+
*/
|
|
2971
|
+
sha1: string;
|
|
2972
|
+
private readonly redis;
|
|
2973
|
+
constructor(redis: Redis, script: string);
|
|
2974
|
+
private init;
|
|
2975
|
+
/**
|
|
2976
|
+
* Send an `EVAL_RO` command to redis.
|
|
2977
|
+
*/
|
|
2978
|
+
evalRo(keys: string[], args: string[]): Promise<TResult>;
|
|
2979
|
+
/**
|
|
2980
|
+
* Calculates the sha1 hash of the script and then calls `EVALSHA_RO`.
|
|
2981
|
+
*/
|
|
2982
|
+
evalshaRo(keys: string[], args: string[]): Promise<TResult>;
|
|
2983
|
+
/**
|
|
2984
|
+
* Optimistically try to run `EVALSHA_RO` first.
|
|
2985
|
+
* If the script is not loaded in redis, it will fall back and try again with `EVAL_RO`.
|
|
2986
|
+
*
|
|
2987
|
+
* Following calls will be able to use the cached script
|
|
2988
|
+
*/
|
|
2989
|
+
exec(keys: string[], args: string[]): Promise<TResult>;
|
|
2990
|
+
/**
|
|
2991
|
+
* Compute the sha1 hash of the script and return its hex representation.
|
|
2992
|
+
*/
|
|
2993
|
+
private digest;
|
|
2994
|
+
}
|
|
2995
|
+
|
|
2561
2996
|
/**
|
|
2562
2997
|
* Serverless redis client for upstash.
|
|
2563
2998
|
*/
|
|
@@ -2578,6 +3013,8 @@ declare class Redis {
|
|
|
2578
3013
|
* ```
|
|
2579
3014
|
*/
|
|
2580
3015
|
constructor(client: Requester, opts?: RedisOptions);
|
|
3016
|
+
get readYourWritesSyncToken(): string | undefined;
|
|
3017
|
+
set readYourWritesSyncToken(session: string | undefined);
|
|
2581
3018
|
get json(): {
|
|
2582
3019
|
/**
|
|
2583
3020
|
* @see https://redis.io/commands/json.arrappend
|
|
@@ -2619,6 +3056,10 @@ declare class Redis {
|
|
|
2619
3056
|
* @see https://redis.io/commands/json.get
|
|
2620
3057
|
*/
|
|
2621
3058
|
get: <TData>(...args: CommandArgs<typeof JsonGetCommand>) => Promise<TData | null>;
|
|
3059
|
+
/**
|
|
3060
|
+
* @see https://redis.io/commands/json.merge
|
|
3061
|
+
*/
|
|
3062
|
+
merge: (key: string, path: string, value: string | number | unknown[] | Record<string, unknown>) => Promise<"OK" | null>;
|
|
2622
3063
|
/**
|
|
2623
3064
|
* @see https://redis.io/commands/json.mget
|
|
2624
3065
|
*/
|
|
@@ -2682,7 +3123,37 @@ declare class Redis {
|
|
|
2682
3123
|
* Technically this is not private, we can hide it from intellisense by doing this
|
|
2683
3124
|
*/
|
|
2684
3125
|
protected addTelemetry: (telemetry: Telemetry) => void;
|
|
2685
|
-
|
|
3126
|
+
/**
|
|
3127
|
+
* Creates a new script.
|
|
3128
|
+
*
|
|
3129
|
+
* Scripts offer the ability to optimistically try to execute a script without having to send the
|
|
3130
|
+
* entire script to the server. If the script is loaded on the server, it tries again by sending
|
|
3131
|
+
* the entire script. Afterwards, the script is cached on the server.
|
|
3132
|
+
*
|
|
3133
|
+
* @param script - The script to create
|
|
3134
|
+
* @param opts - Optional options to pass to the script `{ readonly?: boolean }`
|
|
3135
|
+
* @returns A new script
|
|
3136
|
+
*
|
|
3137
|
+
* @example
|
|
3138
|
+
* ```ts
|
|
3139
|
+
* const redis = new Redis({...})
|
|
3140
|
+
*
|
|
3141
|
+
* const script = redis.createScript<string>("return ARGV[1];")
|
|
3142
|
+
* const arg1 = await script.eval([], ["Hello World"])
|
|
3143
|
+
* expect(arg1, "Hello World")
|
|
3144
|
+
* ```
|
|
3145
|
+
* @example
|
|
3146
|
+
* ```ts
|
|
3147
|
+
* const redis = new Redis({...})
|
|
3148
|
+
*
|
|
3149
|
+
* const script = redis.createScript<string>("return ARGV[1];", { readonly: true })
|
|
3150
|
+
* const arg1 = await script.evalRo([], ["Hello World"])
|
|
3151
|
+
* expect(arg1, "Hello World")
|
|
3152
|
+
* ```
|
|
3153
|
+
*/
|
|
3154
|
+
createScript<TResult = unknown, TReadonly extends boolean = false>(script: string, opts?: {
|
|
3155
|
+
readonly?: TReadonly;
|
|
3156
|
+
}): TReadonly extends true ? ScriptRO<TResult> : Script<TResult>;
|
|
2686
3157
|
/**
|
|
2687
3158
|
* Create a new pipeline that allows you to send requests in bulk.
|
|
2688
3159
|
*
|
|
@@ -2761,14 +3232,26 @@ declare class Redis {
|
|
|
2761
3232
|
* @see https://redis.io/commands/echo
|
|
2762
3233
|
*/
|
|
2763
3234
|
echo: (message: string) => Promise<string>;
|
|
3235
|
+
/**
|
|
3236
|
+
* @see https://redis.io/commands/eval_ro
|
|
3237
|
+
*/
|
|
3238
|
+
evalRo: <TArgs extends unknown[], TData = unknown>(script: string, keys: string[], args: TArgs) => Promise<TData>;
|
|
2764
3239
|
/**
|
|
2765
3240
|
* @see https://redis.io/commands/eval
|
|
2766
3241
|
*/
|
|
2767
3242
|
eval: <TArgs extends unknown[], TData = unknown>(script: string, keys: string[], args: TArgs) => Promise<TData>;
|
|
3243
|
+
/**
|
|
3244
|
+
* @see https://redis.io/commands/evalsha_ro
|
|
3245
|
+
*/
|
|
3246
|
+
evalshaRo: <TArgs extends unknown[], TData = unknown>(sha1: string, keys: string[], args: TArgs) => Promise<TData>;
|
|
2768
3247
|
/**
|
|
2769
3248
|
* @see https://redis.io/commands/evalsha
|
|
2770
3249
|
*/
|
|
2771
3250
|
evalsha: <TArgs extends unknown[], TData = unknown>(sha1: string, keys: string[], args: TArgs) => Promise<TData>;
|
|
3251
|
+
/**
|
|
3252
|
+
* Generic method to execute any Redis command.
|
|
3253
|
+
*/
|
|
3254
|
+
exec: <TResult>(args: [command: string, ...args: (string | number | boolean)[]]) => Promise<TResult>;
|
|
2772
3255
|
/**
|
|
2773
3256
|
* @see https://redis.io/commands/exists
|
|
2774
3257
|
*/
|
|
@@ -2776,11 +3259,11 @@ declare class Redis {
|
|
|
2776
3259
|
/**
|
|
2777
3260
|
* @see https://redis.io/commands/expire
|
|
2778
3261
|
*/
|
|
2779
|
-
expire: (key: string, seconds: number, option?:
|
|
3262
|
+
expire: (key: string, seconds: number, option?: ExpireOption | undefined) => Promise<0 | 1>;
|
|
2780
3263
|
/**
|
|
2781
3264
|
* @see https://redis.io/commands/expireat
|
|
2782
3265
|
*/
|
|
2783
|
-
expireat: (key: string, unix: number) => Promise<0 | 1>;
|
|
3266
|
+
expireat: (key: string, unix: number, option?: ExpireOption | undefined) => Promise<0 | 1>;
|
|
2784
3267
|
/**
|
|
2785
3268
|
* @see https://redis.io/commands/flushall
|
|
2786
3269
|
*/
|
|
@@ -2893,6 +3376,46 @@ declare class Redis {
|
|
|
2893
3376
|
* @see https://redis.io/commands/getdel
|
|
2894
3377
|
*/
|
|
2895
3378
|
getdel: <TData>(key: string) => Promise<TData | null>;
|
|
3379
|
+
/**
|
|
3380
|
+
* @see https://redis.io/commands/getex
|
|
3381
|
+
*/
|
|
3382
|
+
getex: <TData>(key: string, opts?: ({
|
|
3383
|
+
ex: number;
|
|
3384
|
+
px?: never;
|
|
3385
|
+
exat?: never;
|
|
3386
|
+
pxat?: never;
|
|
3387
|
+
persist?: never;
|
|
3388
|
+
} | {
|
|
3389
|
+
ex?: never;
|
|
3390
|
+
px: number;
|
|
3391
|
+
exat?: never;
|
|
3392
|
+
pxat?: never;
|
|
3393
|
+
persist?: never;
|
|
3394
|
+
} | {
|
|
3395
|
+
ex?: never;
|
|
3396
|
+
px?: never;
|
|
3397
|
+
exat: number;
|
|
3398
|
+
pxat?: never;
|
|
3399
|
+
persist?: never;
|
|
3400
|
+
} | {
|
|
3401
|
+
ex?: never;
|
|
3402
|
+
px?: never;
|
|
3403
|
+
exat?: never;
|
|
3404
|
+
pxat: number;
|
|
3405
|
+
persist?: never;
|
|
3406
|
+
} | {
|
|
3407
|
+
ex?: never;
|
|
3408
|
+
px?: never;
|
|
3409
|
+
exat?: never;
|
|
3410
|
+
pxat?: never;
|
|
3411
|
+
persist: true;
|
|
3412
|
+
} | {
|
|
3413
|
+
ex?: never;
|
|
3414
|
+
px?: never;
|
|
3415
|
+
exat?: never;
|
|
3416
|
+
pxat?: never;
|
|
3417
|
+
persist?: never;
|
|
3418
|
+
}) | undefined) => Promise<TData | null>;
|
|
2896
3419
|
/**
|
|
2897
3420
|
* @see https://redis.io/commands/getrange
|
|
2898
3421
|
*/
|
|
@@ -2909,6 +3432,42 @@ declare class Redis {
|
|
|
2909
3432
|
* @see https://redis.io/commands/hexists
|
|
2910
3433
|
*/
|
|
2911
3434
|
hexists: (key: string, field: string) => Promise<number>;
|
|
3435
|
+
/**
|
|
3436
|
+
* @see https://redis.io/commands/hexpire
|
|
3437
|
+
*/
|
|
3438
|
+
hexpire: (key: string, fields: string | number | (string | number)[], seconds: number, option?: ExpireOption | undefined) => Promise<(0 | 1 | 2 | -2)[]>;
|
|
3439
|
+
/**
|
|
3440
|
+
* @see https://redis.io/commands/hexpireat
|
|
3441
|
+
*/
|
|
3442
|
+
hexpireat: (key: string, fields: string | number | (string | number)[], timestamp: number, option?: ExpireOption | undefined) => Promise<(0 | 1 | 2 | -2)[]>;
|
|
3443
|
+
/**
|
|
3444
|
+
* @see https://redis.io/commands/hexpiretime
|
|
3445
|
+
*/
|
|
3446
|
+
hexpiretime: (key: string, fields: string | number | (string | number)[]) => Promise<number[]>;
|
|
3447
|
+
/**
|
|
3448
|
+
* @see https://redis.io/commands/httl
|
|
3449
|
+
*/
|
|
3450
|
+
httl: (key: string, fields: string | number | (string | number)[]) => Promise<number[]>;
|
|
3451
|
+
/**
|
|
3452
|
+
* @see https://redis.io/commands/hpexpire
|
|
3453
|
+
*/
|
|
3454
|
+
hpexpire: (key: string, fields: string | number | (string | number)[], milliseconds: number, option?: ExpireOption | undefined) => Promise<(0 | 1 | 2 | -2)[]>;
|
|
3455
|
+
/**
|
|
3456
|
+
* @see https://redis.io/commands/hpexpireat
|
|
3457
|
+
*/
|
|
3458
|
+
hpexpireat: (key: string, fields: string | number | (string | number)[], timestamp: number, option?: ExpireOption | undefined) => Promise<(0 | 1 | 2 | -2)[]>;
|
|
3459
|
+
/**
|
|
3460
|
+
* @see https://redis.io/commands/hpexpiretime
|
|
3461
|
+
*/
|
|
3462
|
+
hpexpiretime: (key: string, fields: string | number | (string | number)[]) => Promise<number[]>;
|
|
3463
|
+
/**
|
|
3464
|
+
* @see https://redis.io/commands/hpttl
|
|
3465
|
+
*/
|
|
3466
|
+
hpttl: (key: string, fields: string | number | (string | number)[]) => Promise<number[]>;
|
|
3467
|
+
/**
|
|
3468
|
+
* @see https://redis.io/commands/hpersist
|
|
3469
|
+
*/
|
|
3470
|
+
hpersist: (key: string, fields: string | number | (string | number)[]) => Promise<(1 | -2 | -1)[]>;
|
|
2912
3471
|
/**
|
|
2913
3472
|
* @see https://redis.io/commands/hget
|
|
2914
3473
|
*/
|
|
@@ -3060,11 +3619,11 @@ declare class Redis {
|
|
|
3060
3619
|
/**
|
|
3061
3620
|
* @see https://redis.io/commands/pexpire
|
|
3062
3621
|
*/
|
|
3063
|
-
pexpire: (key: string, milliseconds: number) => Promise<0 | 1>;
|
|
3622
|
+
pexpire: (key: string, milliseconds: number, option?: ExpireOption | undefined) => Promise<0 | 1>;
|
|
3064
3623
|
/**
|
|
3065
3624
|
* @see https://redis.io/commands/pexpireat
|
|
3066
3625
|
*/
|
|
3067
|
-
pexpireat: (key: string, unix: number) => Promise<0 | 1>;
|
|
3626
|
+
pexpireat: (key: string, unix: number, option?: ExpireOption | undefined) => Promise<0 | 1>;
|
|
3068
3627
|
/**
|
|
3069
3628
|
* @see https://redis.io/commands/pfadd
|
|
3070
3629
|
*/
|
|
@@ -3085,6 +3644,10 @@ declare class Redis {
|
|
|
3085
3644
|
* @see https://redis.io/commands/psetex
|
|
3086
3645
|
*/
|
|
3087
3646
|
psetex: <TData>(key: string, ttl: number, value: TData) => Promise<string>;
|
|
3647
|
+
/**
|
|
3648
|
+
* @see https://redis.io/commands/psubscribe
|
|
3649
|
+
*/
|
|
3650
|
+
psubscribe: <TMessage>(patterns: string | string[]) => Subscriber<TMessage>;
|
|
3088
3651
|
/**
|
|
3089
3652
|
* @see https://redis.io/commands/pttl
|
|
3090
3653
|
*/
|
|
@@ -3120,11 +3683,14 @@ declare class Redis {
|
|
|
3120
3683
|
/**
|
|
3121
3684
|
* @see https://redis.io/commands/sadd
|
|
3122
3685
|
*/
|
|
3123
|
-
sadd: <TData>(key: string, ...members: TData[]) => Promise<number>;
|
|
3686
|
+
sadd: <TData>(key: string, member: TData, ...members: TData[]) => Promise<number>;
|
|
3124
3687
|
/**
|
|
3125
3688
|
* @see https://redis.io/commands/scan
|
|
3126
3689
|
*/
|
|
3127
|
-
scan
|
|
3690
|
+
scan(cursor: string | number): Promise<ScanResultStandard>;
|
|
3691
|
+
scan<TOptions extends ScanCommandOptions>(cursor: string | number, opts: TOptions): Promise<TOptions extends {
|
|
3692
|
+
withType: true;
|
|
3693
|
+
} ? ScanResultWithType : ScanResultStandard>;
|
|
3128
3694
|
/**
|
|
3129
3695
|
* @see https://redis.io/commands/scard
|
|
3130
3696
|
*/
|
|
@@ -3213,6 +3779,10 @@ declare class Redis {
|
|
|
3213
3779
|
* @see https://redis.io/commands/strlen
|
|
3214
3780
|
*/
|
|
3215
3781
|
strlen: (key: string) => Promise<number>;
|
|
3782
|
+
/**
|
|
3783
|
+
* @see https://redis.io/commands/subscribe
|
|
3784
|
+
*/
|
|
3785
|
+
subscribe: <TMessage>(channels: string | string[]) => Subscriber<TMessage>;
|
|
3216
3786
|
/**
|
|
3217
3787
|
* @see https://redis.io/commands/sunion
|
|
3218
3788
|
*/
|
|
@@ -3428,7 +3998,7 @@ declare class Redis {
|
|
|
3428
3998
|
/**
|
|
3429
3999
|
* @see https://redis.io/commands/zremrangebyscore
|
|
3430
4000
|
*/
|
|
3431
|
-
zremrangebyscore: (key: string, min: number, max: number) => Promise<number>;
|
|
4001
|
+
zremrangebyscore: (key: string, min: number | `(${number}` | "-inf" | "+inf", max: number | `(${number}` | "-inf" | "+inf") => Promise<number>;
|
|
3432
4002
|
/**
|
|
3433
4003
|
* @see https://redis.io/commands/zrevrank
|
|
3434
4004
|
*/
|
|
@@ -3451,22 +4021,28 @@ declare class Redis {
|
|
|
3451
4021
|
zunionstore: (destination: string, numKeys: number, keys: string[], opts?: ZUnionStoreCommandOptions | undefined) => Promise<number>;
|
|
3452
4022
|
}
|
|
3453
4023
|
|
|
4024
|
+
type UpstashErrorOptions = Pick<NonNullable<ConstructorParameters<typeof Error>[1]>, "cause">;
|
|
3454
4025
|
/**
|
|
3455
4026
|
* Result of a bad request to upstash
|
|
3456
4027
|
*/
|
|
3457
4028
|
declare class UpstashError extends Error {
|
|
3458
|
-
constructor(message: string);
|
|
4029
|
+
constructor(message: string, options?: ErrorOptions);
|
|
3459
4030
|
}
|
|
3460
4031
|
declare class UrlError extends Error {
|
|
3461
4032
|
constructor(url: string);
|
|
3462
4033
|
}
|
|
4034
|
+
declare class UpstashJSONParseError extends UpstashError {
|
|
4035
|
+
constructor(body: string, options?: UpstashErrorOptions);
|
|
4036
|
+
}
|
|
3463
4037
|
|
|
3464
4038
|
type error_UpstashError = UpstashError;
|
|
3465
4039
|
declare const error_UpstashError: typeof UpstashError;
|
|
4040
|
+
type error_UpstashJSONParseError = UpstashJSONParseError;
|
|
4041
|
+
declare const error_UpstashJSONParseError: typeof UpstashJSONParseError;
|
|
3466
4042
|
type error_UrlError = UrlError;
|
|
3467
4043
|
declare const error_UrlError: typeof UrlError;
|
|
3468
4044
|
declare namespace error {
|
|
3469
|
-
export { error_UpstashError as UpstashError, error_UrlError as UrlError };
|
|
4045
|
+
export { error_UpstashError as UpstashError, error_UpstashJSONParseError as UpstashJSONParseError, error_UrlError as UrlError };
|
|
3470
4046
|
}
|
|
3471
4047
|
|
|
3472
4048
|
/**
|
|
@@ -3483,4 +4059,4 @@ declare class ZMScoreCommand<TData> extends Command<string[] | null, number[] |
|
|
|
3483
4059
|
constructor(cmd: [key: string, members: TData[]], opts?: CommandOptions<string[] | null, number[] | null>);
|
|
3484
4060
|
}
|
|
3485
4061
|
|
|
3486
|
-
export {
|
|
4062
|
+
export { HPersistCommand as $, AppendCommand as A, BitCountCommand as B, CopyCommand as C, DBSizeCommand as D, EchoCommand as E, FlushAllCommand as F, GeoAddCommand as G, type HttpClientConfig as H, GetCommand as I, GetBitCommand as J, GetDelCommand as K, GetExCommand as L, GetRangeCommand as M, GetSetCommand as N, HDelCommand as O, Pipeline as P, HExistsCommand as Q, type RedisOptions as R, HExpireCommand as S, HExpireAtCommand as T, type UpstashRequest as U, HExpireTimeCommand as V, HTtlCommand as W, HPExpireCommand as X, HPExpireAtCommand as Y, HPExpireTimeCommand as Z, HPTtlCommand as _, type RequesterConfig as a, RenameNXCommand as a$, HGetCommand as a0, HGetAllCommand as a1, HIncrByCommand as a2, HIncrByFloatCommand as a3, HKeysCommand as a4, HLenCommand as a5, HMGetCommand as a6, HMSetCommand as a7, HRandFieldCommand as a8, HScanCommand as a9, JsonStrLenCommand as aA, JsonToggleCommand as aB, JsonTypeCommand as aC, KeysCommand as aD, LIndexCommand as aE, LInsertCommand as aF, LLenCommand as aG, LMoveCommand as aH, LPopCommand as aI, LPushCommand as aJ, LPushXCommand as aK, LRangeCommand as aL, LRemCommand as aM, LSetCommand as aN, LTrimCommand as aO, MGetCommand as aP, MSetCommand as aQ, MSetNXCommand as aR, PersistCommand as aS, PExpireCommand as aT, PExpireAtCommand as aU, PingCommand as aV, PSetEXCommand as aW, PTtlCommand as aX, PublishCommand as aY, RandomKeyCommand as aZ, RenameCommand as a_, HSetCommand as aa, HSetNXCommand as ab, HStrLenCommand as ac, HValsCommand as ad, IncrCommand as ae, IncrByCommand as af, IncrByFloatCommand as ag, JsonArrAppendCommand as ah, JsonArrIndexCommand as ai, JsonArrInsertCommand as aj, JsonArrLenCommand as ak, JsonArrPopCommand as al, JsonArrTrimCommand as am, JsonClearCommand as an, JsonDelCommand as ao, JsonForgetCommand as ap, JsonGetCommand as aq, JsonMergeCommand as ar, JsonMGetCommand as as, JsonNumIncrByCommand as at, JsonNumMultByCommand as au, JsonObjKeysCommand as av, JsonObjLenCommand as aw, JsonRespCommand as ax, JsonSetCommand as ay, JsonStrAppendCommand as az, Redis as b, type ZUnionCommandOptions as b$, RPopCommand as b0, RPushCommand as b1, RPushXCommand as b2, SAddCommand as b3, ScanCommand as b4, type ScanCommandOptions as b5, SCardCommand as b6, ScriptExistsCommand as b7, ScriptFlushCommand as b8, ScriptLoadCommand as b9, UnlinkCommand as bA, XAddCommand as bB, XRangeCommand as bC, type ScoreMember as bD, type ZAddCommandOptions as bE, ZAddCommand as bF, ZCardCommand as bG, ZCountCommand as bH, ZDiffStoreCommand as bI, ZIncrByCommand as bJ, ZInterStoreCommand as bK, type ZInterStoreCommandOptions as bL, ZLexCountCommand as bM, ZMScoreCommand as bN, ZPopMaxCommand as bO, ZPopMinCommand as bP, ZRangeCommand as bQ, type ZRangeCommandOptions as bR, ZRankCommand as bS, ZRemCommand as bT, ZRemRangeByLexCommand as bU, ZRemRangeByRankCommand as bV, ZRemRangeByScoreCommand as bW, ZRevRankCommand as bX, ZScanCommand as bY, ZScoreCommand as bZ, ZUnionCommand as b_, SDiffCommand as ba, SDiffStoreCommand as bb, SetCommand as bc, type SetCommandOptions as bd, SetBitCommand as be, SetExCommand as bf, SetNxCommand as bg, SetRangeCommand as bh, SInterCommand as bi, SInterStoreCommand as bj, SIsMemberCommand as bk, SMembersCommand as bl, SMIsMemberCommand as bm, SMoveCommand as bn, SPopCommand as bo, SRandMemberCommand as bp, SRemCommand as bq, SScanCommand as br, StrLenCommand as bs, SUnionCommand as bt, SUnionStoreCommand as bu, TimeCommand as bv, TouchCommand as bw, TtlCommand as bx, type Type as by, TypeCommand as bz, type Requester as c, ZUnionStoreCommand as c0, type ZUnionStoreCommandOptions as c1, type UpstashResponse as d, error as e, BitOpCommand as f, BitPosCommand as g, DecrCommand as h, DecrByCommand as i, DelCommand as j, EvalROCommand as k, EvalCommand as l, EvalshaROCommand as m, EvalshaCommand as n, ExistsCommand as o, ExpireCommand as p, type ExpireOption as q, ExpireAtCommand as r, FlushDBCommand as s, type GeoAddCommandOptions as t, type GeoMember as u, GeoDistCommand as v, GeoHashCommand as w, GeoPosCommand as x, GeoSearchCommand as y, GeoSearchStoreCommand as z };
|