@upstash/redis 1.0.0-alpha.4 → 1.0.1
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 +256 -0
- package/chunk-2EIGUPGW.mjs +375 -0
- package/{chunk-ZIB6XPPC.mjs → chunk-HGM7M7CJ.mjs} +9 -4
- package/{chunk-6GEVIAL6.mjs → chunk-WPH7MAB2.mjs} +1 -1
- package/cloudflare.d.ts +2 -2
- package/cloudflare.js +248 -667
- package/cloudflare.mjs +2 -2
- package/commands.d.ts +511 -4
- package/commands.js +10 -4
- package/commands.mjs +3 -1
- package/fastly.d.ts +2 -2
- package/fastly.js +248 -667
- package/fastly.mjs +2 -2
- package/index.d.ts +2 -2
- package/index.js +248 -667
- package/index.mjs +3 -3
- package/nodejs.d.ts +2 -2
- package/nodejs.js +248 -667
- package/nodejs.mjs +3 -3
- package/package.json +1 -1
- package/redis-05a33429.d.ts +976 -0
- package/zunionstore-98bb4d18.d.ts +165 -0
- package/chunk-Y5TC4HX2.mjs +0 -798
- package/redis-dd052782.d.ts +0 -962
- package/zunionstore-dffa797d.d.ts +0 -670
package/cloudflare.mjs
CHANGED
package/commands.d.ts
CHANGED
|
@@ -1,7 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { h as Command, N as NonEmptyArray, S as ScanCommandOptions } from './zunionstore-98bb4d18';
|
|
2
|
+
export { h as Command, i as ScanCommand, S as ScanCommandOptions, b as ScoreMember, j as SetCommand, a as SetCommandOptions, T as TouchCommand, g as Type, k as TypeCommand, U as UnlinkCommand, l as ZAddCommand, Z as ZAddCommandOptions, c as ZAddCommandOptionsWithIncr, m as ZInterStoreCommand, d as ZInterStoreCommandOptions, n as ZRangeCommand, e as ZRangeCommandOptions, o as ZUnionStoreCommand, f as ZUnionStoreCommandOptions } from './zunionstore-98bb4d18';
|
|
3
3
|
import './http';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* @see https://redis.io/commands/append
|
|
7
|
+
*/
|
|
8
|
+
declare class AppendCommand extends Command<number, number> {
|
|
9
|
+
constructor(key: string, value: string);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @see https://redis.io/commands/bitcount
|
|
14
|
+
*/
|
|
15
|
+
declare class BitCountCommand extends Command<number, number> {
|
|
16
|
+
constructor(key: string, start?: never, end?: never);
|
|
17
|
+
constructor(key: string, start: number, end: number);
|
|
18
|
+
}
|
|
19
|
+
|
|
5
20
|
/**
|
|
6
21
|
* @see https://redis.io/commands/bitop
|
|
7
22
|
*/
|
|
@@ -10,6 +25,13 @@ declare class BitOpCommand extends Command<number, number> {
|
|
|
10
25
|
constructor(op: "not", destinationKey: string, sourceKey: string);
|
|
11
26
|
}
|
|
12
27
|
|
|
28
|
+
/**
|
|
29
|
+
* @see https://redis.io/commands/bitpos
|
|
30
|
+
*/
|
|
31
|
+
declare class BitPosCommand extends Command<number, number> {
|
|
32
|
+
constructor(key: string, start: number, end: number);
|
|
33
|
+
}
|
|
34
|
+
|
|
13
35
|
/**
|
|
14
36
|
* @see https://redis.io/commands/dbsize
|
|
15
37
|
*/
|
|
@@ -17,6 +39,94 @@ declare class DBSizeCommand extends Command<number, number> {
|
|
|
17
39
|
constructor();
|
|
18
40
|
}
|
|
19
41
|
|
|
42
|
+
/**
|
|
43
|
+
* @see https://redis.io/commands/decr
|
|
44
|
+
*/
|
|
45
|
+
declare class DecrCommand extends Command<number, number> {
|
|
46
|
+
constructor(key: string);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @see https://redis.io/commands/decrby
|
|
51
|
+
*/
|
|
52
|
+
declare class DecrByCommand extends Command<number, number> {
|
|
53
|
+
constructor(key: string, decrement: number);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @see https://redis.io/commands/del
|
|
58
|
+
*/
|
|
59
|
+
declare class DelCommand extends Command<number, number> {
|
|
60
|
+
constructor(...keys: NonEmptyArray<string>);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @see https://redis.io/commands/echo
|
|
65
|
+
*/
|
|
66
|
+
declare class EchoCommand extends Command<string, string> {
|
|
67
|
+
constructor(message: string);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @see https://redis.io/commands/exists
|
|
72
|
+
*/
|
|
73
|
+
declare class ExistsCommand extends Command<0 | 1, "0" | "1"> {
|
|
74
|
+
constructor(...keys: NonEmptyArray<string>);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @see https://redis.io/commands/expire
|
|
79
|
+
*/
|
|
80
|
+
declare class ExpireCommand extends Command<0 | 1, "0" | "1"> {
|
|
81
|
+
constructor(key: string, seconds: number);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @see https://redis.io/commands/expireat
|
|
86
|
+
*/
|
|
87
|
+
declare class ExpireAtCommand extends Command<0 | 1, "0" | "1"> {
|
|
88
|
+
constructor(key: string, unix: number);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @see https://redis.io/commands/flushall
|
|
93
|
+
*/
|
|
94
|
+
declare class FlushAllCommand extends Command<"OK", "OK"> {
|
|
95
|
+
constructor(opts?: {
|
|
96
|
+
async?: boolean;
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* @see https://redis.io/commands/flushdb
|
|
102
|
+
*/
|
|
103
|
+
declare class FlushDBCommand extends Command<"OK", "OK"> {
|
|
104
|
+
constructor(opts?: {
|
|
105
|
+
async?: boolean;
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* @see https://redis.io/commands/get
|
|
111
|
+
*/
|
|
112
|
+
declare class GetCommand<TData = string> extends Command<TData | null, unknown | null> {
|
|
113
|
+
constructor(key: string);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @see https://redis.io/commands/getbit
|
|
118
|
+
*/
|
|
119
|
+
declare class GetBitCommand extends Command<0 | 1, "0" | "1"> {
|
|
120
|
+
constructor(key: string, offset: number);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* @see https://redis.io/commands/getrange
|
|
125
|
+
*/
|
|
126
|
+
declare class GetRangeCommand extends Command<string, string> {
|
|
127
|
+
constructor(key: string, start: number, end: number);
|
|
128
|
+
}
|
|
129
|
+
|
|
20
130
|
/**
|
|
21
131
|
* @see https://redis.io/commands/getset
|
|
22
132
|
*/
|
|
@@ -24,6 +134,77 @@ declare class GetSetCommand<TData = string> extends Command<TData | null, unknow
|
|
|
24
134
|
constructor(key: string, value: TData);
|
|
25
135
|
}
|
|
26
136
|
|
|
137
|
+
/**
|
|
138
|
+
* @see https://redis.io/commands/hdel
|
|
139
|
+
*/
|
|
140
|
+
declare class HDelCommand extends Command<0 | 1, "0" | "1"> {
|
|
141
|
+
constructor(key: string, field: string);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* @see https://redis.io/commands/hexists
|
|
146
|
+
*/
|
|
147
|
+
declare class HExistsCommand extends Command<number, number> {
|
|
148
|
+
constructor(key: string, field: string);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* @see https://redis.io/commands/hget
|
|
153
|
+
*/
|
|
154
|
+
declare class HGetCommand<TData> extends Command<TData | null, unknown | null> {
|
|
155
|
+
constructor(key: string, field: string);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* @see https://redis.io/commands/hgetall
|
|
160
|
+
*/
|
|
161
|
+
declare class HGetAllCommand<TData extends Record<string, unknown>> extends Command<TData | null, unknown | null> {
|
|
162
|
+
constructor(key: string);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* @see https://redis.io/commands/hincrby
|
|
167
|
+
*/
|
|
168
|
+
declare class HIncrByCommand extends Command<number, number> {
|
|
169
|
+
constructor(key: string, field: string, increment: number);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* @see https://redis.io/commands/hincrbyfloat
|
|
174
|
+
*/
|
|
175
|
+
declare class HIncrByFloatCommand extends Command<number, number> {
|
|
176
|
+
constructor(key: string, field: string, increment: number);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* @see https://redis.io/commands/hkeys
|
|
181
|
+
*/
|
|
182
|
+
declare class HKeysCommand extends Command<string[], string[]> {
|
|
183
|
+
constructor(key: string);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* @see https://redis.io/commands/hlen
|
|
188
|
+
*/
|
|
189
|
+
declare class HLenCommand extends Command<number, number> {
|
|
190
|
+
constructor(key: string);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* hmget returns an object of all requested fields from a hash
|
|
195
|
+
* The field values are returned as an object like this:
|
|
196
|
+
* ```ts
|
|
197
|
+
* {[fieldName: string]: T | null}
|
|
198
|
+
* ```
|
|
199
|
+
*
|
|
200
|
+
* In case the hash does not exist or all fields are empty `null` is returned
|
|
201
|
+
*
|
|
202
|
+
* @see https://redis.io/commands/hmget
|
|
203
|
+
*/
|
|
204
|
+
declare class HMGetCommand<TData extends Record<string, unknown>> extends Command<TData | null, (string | null)[]> {
|
|
205
|
+
constructor(key: string, ...fields: string[]);
|
|
206
|
+
}
|
|
207
|
+
|
|
27
208
|
/**
|
|
28
209
|
* @see https://redis.io/commands/hmset
|
|
29
210
|
*/
|
|
@@ -33,11 +214,26 @@ declare class HMSetCommand<TData> extends Command<number, number> {
|
|
|
33
214
|
});
|
|
34
215
|
}
|
|
35
216
|
|
|
217
|
+
/**
|
|
218
|
+
* @see https://redis.io/commands/hscan
|
|
219
|
+
*/
|
|
220
|
+
declare class HScanCommand extends Command<[
|
|
221
|
+
number,
|
|
222
|
+
(string | number)[]
|
|
223
|
+
], [
|
|
224
|
+
number,
|
|
225
|
+
(string | number)[]
|
|
226
|
+
]> {
|
|
227
|
+
constructor(key: string, cursor: number, opts?: ScanCommandOptions);
|
|
228
|
+
}
|
|
229
|
+
|
|
36
230
|
/**
|
|
37
231
|
* @see https://redis.io/commands/hset
|
|
38
232
|
*/
|
|
39
233
|
declare class HSetCommand<TData> extends Command<number, number> {
|
|
40
|
-
constructor(key: string,
|
|
234
|
+
constructor(key: string, kv: {
|
|
235
|
+
[field: string]: TData;
|
|
236
|
+
});
|
|
41
237
|
}
|
|
42
238
|
|
|
43
239
|
/**
|
|
@@ -47,10 +243,70 @@ declare class HSetNXCommand<TData> extends Command<0 | 1, "0" | "1"> {
|
|
|
47
243
|
constructor(key: string, field: string, value: TData);
|
|
48
244
|
}
|
|
49
245
|
|
|
246
|
+
/**
|
|
247
|
+
* @see https://redis.io/commands/hstrlen
|
|
248
|
+
*/
|
|
249
|
+
declare class HStrLenCommand extends Command<number, number> {
|
|
250
|
+
constructor(key: string, field: string);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* @see https://redis.io/commands/hvals
|
|
255
|
+
*/
|
|
256
|
+
declare class HValsCommand<TData extends unknown[]> extends Command<TData, unknown[]> {
|
|
257
|
+
constructor(key: string);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* @see https://redis.io/commands/incr
|
|
262
|
+
*/
|
|
263
|
+
declare class IncrCommand extends Command<number, number> {
|
|
264
|
+
constructor(key: string);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* @see https://redis.io/commands/incrby
|
|
269
|
+
*/
|
|
270
|
+
declare class IncrByCommand extends Command<number, number> {
|
|
271
|
+
constructor(key: string, value: number);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* @see https://redis.io/commands/incrbyfloat
|
|
276
|
+
*/
|
|
277
|
+
declare class IncrByFloatCommand extends Command<number, number> {
|
|
278
|
+
constructor(key: string, value: number);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* @see https://redis.io/commands/keys
|
|
283
|
+
*/
|
|
284
|
+
declare class KeysCommand extends Command<string[], string[]> {
|
|
285
|
+
constructor(pattern: string);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
declare class LIndexCommand<TData = string> extends Command<TData | null, unknown | null> {
|
|
289
|
+
constructor(key: string, index: number);
|
|
290
|
+
}
|
|
291
|
+
|
|
50
292
|
declare class LInsertCommand<TData = string> extends Command<number, number> {
|
|
51
293
|
constructor(key: string, direction: "before" | "after", pivot: TData, value: TData);
|
|
52
294
|
}
|
|
53
295
|
|
|
296
|
+
/**
|
|
297
|
+
* @see https://redis.io/commands/llen
|
|
298
|
+
*/
|
|
299
|
+
declare class LLenCommand extends Command<number, number> {
|
|
300
|
+
constructor(key: string);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* @see https://redis.io/commands/lpop
|
|
305
|
+
*/
|
|
306
|
+
declare class LPopCommand<TData = string> extends Command<TData | null, unknown | null> {
|
|
307
|
+
constructor(key: string);
|
|
308
|
+
}
|
|
309
|
+
|
|
54
310
|
/**
|
|
55
311
|
* @see https://redis.io/commands/lpush
|
|
56
312
|
*/
|
|
@@ -65,6 +321,10 @@ declare class LPushXCommand<TData> extends Command<number, number> {
|
|
|
65
321
|
constructor(key: string, ...elements: NonEmptyArray<TData>);
|
|
66
322
|
}
|
|
67
323
|
|
|
324
|
+
declare class LRangeCommand<TData = string> extends Command<TData[], unknown[]> {
|
|
325
|
+
constructor(key: string, start: number, end: number);
|
|
326
|
+
}
|
|
327
|
+
|
|
68
328
|
declare class LRemCommand<TData> extends Command<number, number> {
|
|
69
329
|
constructor(key: string, count: number, value: TData);
|
|
70
330
|
}
|
|
@@ -73,6 +333,17 @@ declare class LSetCommand<TData = string> extends Command<"OK", "OK"> {
|
|
|
73
333
|
constructor(key: string, value: TData, index: number);
|
|
74
334
|
}
|
|
75
335
|
|
|
336
|
+
declare class LTrimCommand extends Command<"OK", "OK"> {
|
|
337
|
+
constructor(key: string, start: number, end: number);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* @see https://redis.io/commands/mget
|
|
342
|
+
*/
|
|
343
|
+
declare class MGetCommand<TData extends unknown[]> extends Command<TData, (string | null)[]> {
|
|
344
|
+
constructor(...keys: [string, ...string[]]);
|
|
345
|
+
}
|
|
346
|
+
|
|
76
347
|
/**
|
|
77
348
|
* @see https://redis.io/commands/mset
|
|
78
349
|
*/
|
|
@@ -91,6 +362,34 @@ declare class MSetNXCommand<TData = string> extends Command<number, number> {
|
|
|
91
362
|
});
|
|
92
363
|
}
|
|
93
364
|
|
|
365
|
+
/**
|
|
366
|
+
* @see https://redis.io/commands/persist
|
|
367
|
+
*/
|
|
368
|
+
declare class PersistCommand extends Command<0 | 1, "0" | "1"> {
|
|
369
|
+
constructor(key: string);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* @see https://redis.io/commands/pexpire
|
|
374
|
+
*/
|
|
375
|
+
declare class PExpireCommand extends Command<0 | 1, "0" | "1"> {
|
|
376
|
+
constructor(key: string, milliseconds: number);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* @see https://redis.io/commands/pexpireat
|
|
381
|
+
*/
|
|
382
|
+
declare class PExpireAtCommand extends Command<0 | 1, "0" | "1"> {
|
|
383
|
+
constructor(key: string, unix: number);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* @see https://redis.io/commands/ping
|
|
388
|
+
*/
|
|
389
|
+
declare class PingCommand extends Command<string | "PONG", string | "PONG"> {
|
|
390
|
+
constructor(message?: string);
|
|
391
|
+
}
|
|
392
|
+
|
|
94
393
|
/**
|
|
95
394
|
* @see https://redis.io/commands/psetex
|
|
96
395
|
*/
|
|
@@ -98,6 +397,13 @@ declare class PSetEXCommand<TData = string> extends Command<string, string> {
|
|
|
98
397
|
constructor(key: string, ttl: number, value: TData);
|
|
99
398
|
}
|
|
100
399
|
|
|
400
|
+
/**
|
|
401
|
+
* @see https://redis.io/commands/pttl
|
|
402
|
+
*/
|
|
403
|
+
declare class PTtlCommand extends Command<number, number> {
|
|
404
|
+
constructor(key: string);
|
|
405
|
+
}
|
|
406
|
+
|
|
101
407
|
/**
|
|
102
408
|
* @see https://redis.io/commands/randomkey
|
|
103
409
|
*/
|
|
@@ -105,6 +411,27 @@ declare class RandomKeyCommand extends Command<string | null, string | null> {
|
|
|
105
411
|
constructor();
|
|
106
412
|
}
|
|
107
413
|
|
|
414
|
+
/**
|
|
415
|
+
* @see https://redis.io/commands/rename
|
|
416
|
+
*/
|
|
417
|
+
declare class RenameCommand extends Command<"OK", "OK"> {
|
|
418
|
+
constructor(source: string, destination: string);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* @see https://redis.io/commands/renamenx
|
|
423
|
+
*/
|
|
424
|
+
declare class RenameNXCommand extends Command<0 | 1, "0" | "1"> {
|
|
425
|
+
constructor(source: string, destination: string);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* @see https://redis.io/commands/rpop
|
|
430
|
+
*/
|
|
431
|
+
declare class RPopCommand<TData = string> extends Command<TData | null, unknown | null> {
|
|
432
|
+
constructor(key: string);
|
|
433
|
+
}
|
|
434
|
+
|
|
108
435
|
/**
|
|
109
436
|
* @see https://redis.io/commands/rpush
|
|
110
437
|
*/
|
|
@@ -126,6 +453,34 @@ declare class SAddCommand<TData = string> extends Command<number, number> {
|
|
|
126
453
|
constructor(key: string, ...members: NonEmptyArray<TData>);
|
|
127
454
|
}
|
|
128
455
|
|
|
456
|
+
/**
|
|
457
|
+
* @see https://redis.io/commands/scard
|
|
458
|
+
*/
|
|
459
|
+
declare class SCardCommand extends Command<number, number> {
|
|
460
|
+
constructor(key: string);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* @see https://redis.io/commands/sdiff
|
|
465
|
+
*/
|
|
466
|
+
declare class SDiffCommand<TData> extends Command<TData[], unknown[]> {
|
|
467
|
+
constructor(key: string, ...keys: string[]);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* @see https://redis.io/commands/sdiffstpre
|
|
472
|
+
*/
|
|
473
|
+
declare class SDiffStoreCommand extends Command<number, number> {
|
|
474
|
+
constructor(destination: string, ...keys: NonEmptyArray<string>);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* @see https://redis.io/commands/setbit
|
|
479
|
+
*/
|
|
480
|
+
declare class SetBitCommand extends Command<0 | 1, "0" | "1"> {
|
|
481
|
+
constructor(key: string, offset: number, value: 0 | 1);
|
|
482
|
+
}
|
|
483
|
+
|
|
129
484
|
/**
|
|
130
485
|
* @see https://redis.io/commands/setex
|
|
131
486
|
*/
|
|
@@ -140,6 +495,27 @@ declare class SetNxCommand<TData = string> extends Command<number, number> {
|
|
|
140
495
|
constructor(key: string, value: TData);
|
|
141
496
|
}
|
|
142
497
|
|
|
498
|
+
/**
|
|
499
|
+
* @see https://redis.io/commands/setrange
|
|
500
|
+
*/
|
|
501
|
+
declare class SetRangeCommand extends Command<number, number> {
|
|
502
|
+
constructor(key: string, offset: number, value: string);
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* @see https://redis.io/commands/sinter
|
|
507
|
+
*/
|
|
508
|
+
declare class SInterCommand<TData = string> extends Command<TData[], unknown[]> {
|
|
509
|
+
constructor(key: string, ...keys: string[]);
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* @see https://redis.io/commands/sinterstore
|
|
514
|
+
*/
|
|
515
|
+
declare class SInterStoreCommand<TData = string> extends Command<TData[], unknown[]> {
|
|
516
|
+
constructor(destination: string, key: string, ...keys: string[]);
|
|
517
|
+
}
|
|
518
|
+
|
|
143
519
|
/**
|
|
144
520
|
* @see https://redis.io/commands/sismember
|
|
145
521
|
*/
|
|
@@ -147,6 +523,13 @@ declare class SIsMemberCommand<TData = string> extends Command<0 | 1, "0" | "1">
|
|
|
147
523
|
constructor(key: string, member: TData);
|
|
148
524
|
}
|
|
149
525
|
|
|
526
|
+
/**
|
|
527
|
+
* @see https://redis.io/commands/smembers
|
|
528
|
+
*/
|
|
529
|
+
declare class SMembersCommand<TData = string> extends Command<TData[], unknown[]> {
|
|
530
|
+
constructor(key: string);
|
|
531
|
+
}
|
|
532
|
+
|
|
150
533
|
/**
|
|
151
534
|
* @see https://redis.io/commands/smove
|
|
152
535
|
*/
|
|
@@ -154,6 +537,20 @@ declare class SMoveCommand<TData> extends Command<0 | 1, "0" | "1"> {
|
|
|
154
537
|
constructor(source: string, destination: string, member: TData);
|
|
155
538
|
}
|
|
156
539
|
|
|
540
|
+
/**
|
|
541
|
+
* @see https://redis.io/commands/spop
|
|
542
|
+
*/
|
|
543
|
+
declare class SPopCommand<TData = number> extends Command<TData | null, string | null> {
|
|
544
|
+
constructor(key: string, count?: number);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* @see https://redis.io/commands/srandmember
|
|
549
|
+
*/
|
|
550
|
+
declare class SRandMemberCommand<TData> extends Command<TData | null, string | null> {
|
|
551
|
+
constructor(key: string, count?: number);
|
|
552
|
+
}
|
|
553
|
+
|
|
157
554
|
/**
|
|
158
555
|
* @see https://redis.io/commands/srem
|
|
159
556
|
*/
|
|
@@ -161,6 +558,40 @@ declare class SRemCommand<TData = string> extends Command<number, number> {
|
|
|
161
558
|
constructor(key: string, ...members: NonEmptyArray<TData>);
|
|
162
559
|
}
|
|
163
560
|
|
|
561
|
+
/**
|
|
562
|
+
* @see https://redis.io/commands/sscan
|
|
563
|
+
*/
|
|
564
|
+
declare class SScanCommand extends Command<[
|
|
565
|
+
number,
|
|
566
|
+
(string | number)[]
|
|
567
|
+
], [
|
|
568
|
+
number,
|
|
569
|
+
(string | number)[]
|
|
570
|
+
]> {
|
|
571
|
+
constructor(key: string, cursor: number, opts?: ScanCommandOptions);
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* @see https://redis.io/commands/strlen
|
|
576
|
+
*/
|
|
577
|
+
declare class StrLenCommand extends Command<number, number> {
|
|
578
|
+
constructor(key: string);
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* @see https://redis.io/commands/sunion
|
|
583
|
+
*/
|
|
584
|
+
declare class SUnionCommand<TData> extends Command<TData[], string[]> {
|
|
585
|
+
constructor(key: string, ...keys: string[]);
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* @see https://redis.io/commands/sunionstore
|
|
590
|
+
*/
|
|
591
|
+
declare class SUnionStoreCommand extends Command<number, number> {
|
|
592
|
+
constructor(destination: string, key: string, ...keys: string[]);
|
|
593
|
+
}
|
|
594
|
+
|
|
164
595
|
/**
|
|
165
596
|
* @see https://redis.io/commands/time
|
|
166
597
|
*/
|
|
@@ -168,6 +599,27 @@ declare class TimeCommand extends Command<[number, number], [number, number]> {
|
|
|
168
599
|
constructor();
|
|
169
600
|
}
|
|
170
601
|
|
|
602
|
+
/**
|
|
603
|
+
* @see https://redis.io/commands/ttl
|
|
604
|
+
*/
|
|
605
|
+
declare class TtlCommand extends Command<number, number> {
|
|
606
|
+
constructor(key: string);
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* @see https://redis.io/commands/zcard
|
|
611
|
+
*/
|
|
612
|
+
declare class ZCardCommand extends Command<number, number> {
|
|
613
|
+
constructor(key: string);
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* @see https://redis.io/commands/zcount
|
|
618
|
+
*/
|
|
619
|
+
declare class ZCountCommand extends Command<number, number> {
|
|
620
|
+
constructor(key: string, min: number | string, max: number | string);
|
|
621
|
+
}
|
|
622
|
+
|
|
171
623
|
/**
|
|
172
624
|
* @see https://redis.io/commands/zincrby
|
|
173
625
|
*/
|
|
@@ -175,6 +627,27 @@ declare class ZIncrByComand<TData> extends Command<number, number> {
|
|
|
175
627
|
constructor(key: string, increment: number, member: TData);
|
|
176
628
|
}
|
|
177
629
|
|
|
630
|
+
/**
|
|
631
|
+
* @see https://redis.io/commands/zlexcount
|
|
632
|
+
*/
|
|
633
|
+
declare class ZLexCountCommand extends Command<number, number> {
|
|
634
|
+
constructor(key: string, min: string, max: string);
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* @see https://redis.io/commands/zpopmax
|
|
639
|
+
*/
|
|
640
|
+
declare class ZPopMaxCommand<TData> extends Command<TData[], string[]> {
|
|
641
|
+
constructor(key: string, count?: number);
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* @see https://redis.io/commands/zpopmin
|
|
646
|
+
*/
|
|
647
|
+
declare class ZPopMinCommand<TData> extends Command<TData[], string[]> {
|
|
648
|
+
constructor(key: string, count?: number);
|
|
649
|
+
}
|
|
650
|
+
|
|
178
651
|
/**
|
|
179
652
|
* @see https://redis.io/commands/zrank
|
|
180
653
|
*/
|
|
@@ -189,6 +662,27 @@ declare class ZRemCommand<TData = string> extends Command<number, number> {
|
|
|
189
662
|
constructor(key: string, ...members: NonEmptyArray<TData>);
|
|
190
663
|
}
|
|
191
664
|
|
|
665
|
+
/**
|
|
666
|
+
* @see https://redis.io/commands/zremrangebylex
|
|
667
|
+
*/
|
|
668
|
+
declare class ZRemRangeByLexCommand extends Command<number, number> {
|
|
669
|
+
constructor(key: string, min: string, max: string);
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
/**
|
|
673
|
+
* @see https://redis.io/commands/zremrangebyrank
|
|
674
|
+
*/
|
|
675
|
+
declare class ZRemRangeByRankCommand extends Command<number, number> {
|
|
676
|
+
constructor(key: string, start: number, stop: number);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* @see https://redis.io/commands/zremrangebyscore
|
|
681
|
+
*/
|
|
682
|
+
declare class ZRemRangeByScoreCommand extends Command<number, number> {
|
|
683
|
+
constructor(key: string, min: number, max: number);
|
|
684
|
+
}
|
|
685
|
+
|
|
192
686
|
/**
|
|
193
687
|
* @see https://redis.io/commands/zrevrank
|
|
194
688
|
*/
|
|
@@ -196,6 +690,19 @@ declare class ZRevRankCommand<TData> extends Command<number | null, number | nul
|
|
|
196
690
|
constructor(key: string, member: TData);
|
|
197
691
|
}
|
|
198
692
|
|
|
693
|
+
/**
|
|
694
|
+
* @see https://redis.io/commands/zscan
|
|
695
|
+
*/
|
|
696
|
+
declare class ZScanCommand extends Command<[
|
|
697
|
+
number,
|
|
698
|
+
(string | number)[]
|
|
699
|
+
], [
|
|
700
|
+
number,
|
|
701
|
+
(string | number)[]
|
|
702
|
+
]> {
|
|
703
|
+
constructor(key: string, cursor: number, opts?: ScanCommandOptions);
|
|
704
|
+
}
|
|
705
|
+
|
|
199
706
|
/**
|
|
200
707
|
* @see https://redis.io/commands/zscore
|
|
201
708
|
*/
|
|
@@ -203,4 +710,4 @@ declare class ZScoreCommand<TData> extends Command<number | null, string | null>
|
|
|
203
710
|
constructor(key: string, member: TData);
|
|
204
711
|
}
|
|
205
712
|
|
|
206
|
-
export { BitOpCommand, DBSizeCommand, GetSetCommand, HMSetCommand, HSetCommand, HSetNXCommand, LInsertCommand, LPushCommand, LPushXCommand, LRemCommand, LSetCommand, MSetCommand, MSetNXCommand, PSetEXCommand, RPushCommand, RPushXCommand, RandomKeyCommand, SAddCommand, SIsMemberCommand, SMoveCommand, SRemCommand, SetExCommand, SetNxCommand, TimeCommand, ZIncrByComand, ZRankCommand, ZRemCommand, ZRevRankCommand, ZScoreCommand };
|
|
713
|
+
export { AppendCommand, BitCountCommand, BitOpCommand, BitPosCommand, DBSizeCommand, DecrByCommand, DecrCommand, DelCommand, EchoCommand, ExistsCommand, ExpireAtCommand, ExpireCommand, FlushAllCommand, FlushDBCommand, GetBitCommand, GetCommand, GetRangeCommand, GetSetCommand, HDelCommand, HExistsCommand, HGetAllCommand, HGetCommand, HIncrByCommand, HIncrByFloatCommand, HKeysCommand, HLenCommand, HMGetCommand, HMSetCommand, HScanCommand, HSetCommand, HSetNXCommand, HStrLenCommand, HValsCommand, IncrByCommand, IncrByFloatCommand, IncrCommand, KeysCommand, LIndexCommand, LInsertCommand, LLenCommand, LPopCommand, LPushCommand, LPushXCommand, LRangeCommand, LRemCommand, LSetCommand, LTrimCommand, MGetCommand, MSetCommand, MSetNXCommand, PExpireAtCommand, PExpireCommand, PSetEXCommand, PTtlCommand, PersistCommand, PingCommand, RPopCommand, RPushCommand, RPushXCommand, RandomKeyCommand, RenameCommand, RenameNXCommand, SAddCommand, SCardCommand, SDiffCommand, SDiffStoreCommand, SInterCommand, SInterStoreCommand, SIsMemberCommand, SMembersCommand, SMoveCommand, SPopCommand, SRandMemberCommand, SRemCommand, SScanCommand, SUnionCommand, SUnionStoreCommand, SetBitCommand, SetExCommand, SetNxCommand, SetRangeCommand, StrLenCommand, TimeCommand, TtlCommand, ZCardCommand, ZCountCommand, ZIncrByComand, ZLexCountCommand, ZPopMaxCommand, ZPopMinCommand, ZRankCommand, ZRemCommand, ZRemRangeByLexCommand, ZRemRangeByRankCommand, ZRemRangeByScoreCommand, ZRevRankCommand, ZScanCommand, ZScoreCommand };
|