@upstash/redis 1.0.0-alpha.7 → 1.0.2
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/chunk-2EIGUPGW.mjs +375 -0
- package/{chunk-AHCVU33N.mjs → chunk-WPH7MAB2.mjs} +1 -1
- package/cloudflare.d.ts +2 -2
- package/cloudflare.js +240 -663
- package/cloudflare.mjs +1 -1
- package/commands.d.ts +515 -3
- package/fastly.d.ts +2 -2
- package/fastly.js +240 -663
- package/fastly.mjs +1 -1
- package/index.d.ts +2 -2
- package/index.js +240 -663
- package/index.mjs +2 -2
- package/nodejs.d.ts +2 -2
- package/nodejs.js +240 -663
- package/nodejs.mjs +2 -2
- package/package.json +1 -1
- package/redis-1bab26d0.d.ts +976 -0
- package/zunionstore-e1cc0e90.d.ts +158 -0
- package/chunk-T66TTHSV.mjs +0 -798
- package/redis-71fa1ee6.d.ts +0 -966
- package/zunionstore-b38007ba.d.ts +0 -670
package/cloudflare.mjs
CHANGED
package/commands.d.ts
CHANGED
|
@@ -1,7 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { g as Command, N as NonEmptyArray, S as ScanCommandOptions } from './zunionstore-e1cc0e90';
|
|
2
|
+
export { g as Command, h as ScanCommand, S as ScanCommandOptions, b as ScoreMember, i as SetCommand, a as SetCommandOptions, T as Type, j as TypeCommand, U as UnlinkCommand, k as ZAddCommand, Z as ZAddCommandOptions, c as ZAddCommandOptionsWithIncr, l as ZInterStoreCommand, d as ZInterStoreCommandOptions, m as ZRangeCommand, e as ZRangeCommandOptions, n as ZUnionStoreCommand, f as ZUnionStoreCommandOptions } from './zunionstore-e1cc0e90';
|
|
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,6 +214,19 @@ 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
|
*/
|
|
@@ -49,10 +243,70 @@ declare class HSetNXCommand<TData> extends Command<0 | 1, "0" | "1"> {
|
|
|
49
243
|
constructor(key: string, field: string, value: TData);
|
|
50
244
|
}
|
|
51
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
|
+
|
|
52
292
|
declare class LInsertCommand<TData = string> extends Command<number, number> {
|
|
53
293
|
constructor(key: string, direction: "before" | "after", pivot: TData, value: TData);
|
|
54
294
|
}
|
|
55
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
|
+
|
|
56
310
|
/**
|
|
57
311
|
* @see https://redis.io/commands/lpush
|
|
58
312
|
*/
|
|
@@ -67,6 +321,10 @@ declare class LPushXCommand<TData> extends Command<number, number> {
|
|
|
67
321
|
constructor(key: string, ...elements: NonEmptyArray<TData>);
|
|
68
322
|
}
|
|
69
323
|
|
|
324
|
+
declare class LRangeCommand<TData = string> extends Command<TData[], unknown[]> {
|
|
325
|
+
constructor(key: string, start: number, end: number);
|
|
326
|
+
}
|
|
327
|
+
|
|
70
328
|
declare class LRemCommand<TData> extends Command<number, number> {
|
|
71
329
|
constructor(key: string, count: number, value: TData);
|
|
72
330
|
}
|
|
@@ -75,6 +333,17 @@ declare class LSetCommand<TData = string> extends Command<"OK", "OK"> {
|
|
|
75
333
|
constructor(key: string, value: TData, index: number);
|
|
76
334
|
}
|
|
77
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
|
+
|
|
78
347
|
/**
|
|
79
348
|
* @see https://redis.io/commands/mset
|
|
80
349
|
*/
|
|
@@ -93,6 +362,34 @@ declare class MSetNXCommand<TData = string> extends Command<number, number> {
|
|
|
93
362
|
});
|
|
94
363
|
}
|
|
95
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
|
+
|
|
96
393
|
/**
|
|
97
394
|
* @see https://redis.io/commands/psetex
|
|
98
395
|
*/
|
|
@@ -100,6 +397,13 @@ declare class PSetEXCommand<TData = string> extends Command<string, string> {
|
|
|
100
397
|
constructor(key: string, ttl: number, value: TData);
|
|
101
398
|
}
|
|
102
399
|
|
|
400
|
+
/**
|
|
401
|
+
* @see https://redis.io/commands/pttl
|
|
402
|
+
*/
|
|
403
|
+
declare class PTtlCommand extends Command<number, number> {
|
|
404
|
+
constructor(key: string);
|
|
405
|
+
}
|
|
406
|
+
|
|
103
407
|
/**
|
|
104
408
|
* @see https://redis.io/commands/randomkey
|
|
105
409
|
*/
|
|
@@ -107,6 +411,27 @@ declare class RandomKeyCommand extends Command<string | null, string | null> {
|
|
|
107
411
|
constructor();
|
|
108
412
|
}
|
|
109
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
|
+
|
|
110
435
|
/**
|
|
111
436
|
* @see https://redis.io/commands/rpush
|
|
112
437
|
*/
|
|
@@ -128,6 +453,34 @@ declare class SAddCommand<TData = string> extends Command<number, number> {
|
|
|
128
453
|
constructor(key: string, ...members: NonEmptyArray<TData>);
|
|
129
454
|
}
|
|
130
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
|
+
|
|
131
484
|
/**
|
|
132
485
|
* @see https://redis.io/commands/setex
|
|
133
486
|
*/
|
|
@@ -142,6 +495,27 @@ declare class SetNxCommand<TData = string> extends Command<number, number> {
|
|
|
142
495
|
constructor(key: string, value: TData);
|
|
143
496
|
}
|
|
144
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
|
+
|
|
145
519
|
/**
|
|
146
520
|
* @see https://redis.io/commands/sismember
|
|
147
521
|
*/
|
|
@@ -149,6 +523,13 @@ declare class SIsMemberCommand<TData = string> extends Command<0 | 1, "0" | "1">
|
|
|
149
523
|
constructor(key: string, member: TData);
|
|
150
524
|
}
|
|
151
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
|
+
|
|
152
533
|
/**
|
|
153
534
|
* @see https://redis.io/commands/smove
|
|
154
535
|
*/
|
|
@@ -156,6 +537,20 @@ declare class SMoveCommand<TData> extends Command<0 | 1, "0" | "1"> {
|
|
|
156
537
|
constructor(source: string, destination: string, member: TData);
|
|
157
538
|
}
|
|
158
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
|
+
|
|
159
554
|
/**
|
|
160
555
|
* @see https://redis.io/commands/srem
|
|
161
556
|
*/
|
|
@@ -163,6 +558,40 @@ declare class SRemCommand<TData = string> extends Command<number, number> {
|
|
|
163
558
|
constructor(key: string, ...members: NonEmptyArray<TData>);
|
|
164
559
|
}
|
|
165
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
|
+
|
|
166
595
|
/**
|
|
167
596
|
* @see https://redis.io/commands/time
|
|
168
597
|
*/
|
|
@@ -170,6 +599,34 @@ declare class TimeCommand extends Command<[number, number], [number, number]> {
|
|
|
170
599
|
constructor();
|
|
171
600
|
}
|
|
172
601
|
|
|
602
|
+
/**
|
|
603
|
+
* @see https://redis.io/commands/touch
|
|
604
|
+
*/
|
|
605
|
+
declare class TouchCommand extends Command<number, number> {
|
|
606
|
+
constructor(...keys: NonEmptyArray<string>);
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* @see https://redis.io/commands/ttl
|
|
611
|
+
*/
|
|
612
|
+
declare class TtlCommand extends Command<number, number> {
|
|
613
|
+
constructor(key: string);
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* @see https://redis.io/commands/zcard
|
|
618
|
+
*/
|
|
619
|
+
declare class ZCardCommand extends Command<number, number> {
|
|
620
|
+
constructor(key: string);
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* @see https://redis.io/commands/zcount
|
|
625
|
+
*/
|
|
626
|
+
declare class ZCountCommand extends Command<number, number> {
|
|
627
|
+
constructor(key: string, min: number | string, max: number | string);
|
|
628
|
+
}
|
|
629
|
+
|
|
173
630
|
/**
|
|
174
631
|
* @see https://redis.io/commands/zincrby
|
|
175
632
|
*/
|
|
@@ -177,6 +634,27 @@ declare class ZIncrByComand<TData> extends Command<number, number> {
|
|
|
177
634
|
constructor(key: string, increment: number, member: TData);
|
|
178
635
|
}
|
|
179
636
|
|
|
637
|
+
/**
|
|
638
|
+
* @see https://redis.io/commands/zlexcount
|
|
639
|
+
*/
|
|
640
|
+
declare class ZLexCountCommand extends Command<number, number> {
|
|
641
|
+
constructor(key: string, min: string, max: string);
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* @see https://redis.io/commands/zpopmax
|
|
646
|
+
*/
|
|
647
|
+
declare class ZPopMaxCommand<TData> extends Command<TData[], string[]> {
|
|
648
|
+
constructor(key: string, count?: number);
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* @see https://redis.io/commands/zpopmin
|
|
653
|
+
*/
|
|
654
|
+
declare class ZPopMinCommand<TData> extends Command<TData[], string[]> {
|
|
655
|
+
constructor(key: string, count?: number);
|
|
656
|
+
}
|
|
657
|
+
|
|
180
658
|
/**
|
|
181
659
|
* @see https://redis.io/commands/zrank
|
|
182
660
|
*/
|
|
@@ -191,6 +669,27 @@ declare class ZRemCommand<TData = string> extends Command<number, number> {
|
|
|
191
669
|
constructor(key: string, ...members: NonEmptyArray<TData>);
|
|
192
670
|
}
|
|
193
671
|
|
|
672
|
+
/**
|
|
673
|
+
* @see https://redis.io/commands/zremrangebylex
|
|
674
|
+
*/
|
|
675
|
+
declare class ZRemRangeByLexCommand extends Command<number, number> {
|
|
676
|
+
constructor(key: string, min: string, max: string);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* @see https://redis.io/commands/zremrangebyrank
|
|
681
|
+
*/
|
|
682
|
+
declare class ZRemRangeByRankCommand extends Command<number, number> {
|
|
683
|
+
constructor(key: string, start: number, stop: number);
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* @see https://redis.io/commands/zremrangebyscore
|
|
688
|
+
*/
|
|
689
|
+
declare class ZRemRangeByScoreCommand extends Command<number, number> {
|
|
690
|
+
constructor(key: string, min: number, max: number);
|
|
691
|
+
}
|
|
692
|
+
|
|
194
693
|
/**
|
|
195
694
|
* @see https://redis.io/commands/zrevrank
|
|
196
695
|
*/
|
|
@@ -198,6 +697,19 @@ declare class ZRevRankCommand<TData> extends Command<number | null, number | nul
|
|
|
198
697
|
constructor(key: string, member: TData);
|
|
199
698
|
}
|
|
200
699
|
|
|
700
|
+
/**
|
|
701
|
+
* @see https://redis.io/commands/zscan
|
|
702
|
+
*/
|
|
703
|
+
declare class ZScanCommand extends Command<[
|
|
704
|
+
number,
|
|
705
|
+
(string | number)[]
|
|
706
|
+
], [
|
|
707
|
+
number,
|
|
708
|
+
(string | number)[]
|
|
709
|
+
]> {
|
|
710
|
+
constructor(key: string, cursor: number, opts?: ScanCommandOptions);
|
|
711
|
+
}
|
|
712
|
+
|
|
201
713
|
/**
|
|
202
714
|
* @see https://redis.io/commands/zscore
|
|
203
715
|
*/
|
|
@@ -205,4 +717,4 @@ declare class ZScoreCommand<TData> extends Command<number | null, string | null>
|
|
|
205
717
|
constructor(key: string, member: TData);
|
|
206
718
|
}
|
|
207
719
|
|
|
208
|
-
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 };
|
|
720
|
+
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, TouchCommand, TtlCommand, ZCardCommand, ZCountCommand, ZIncrByComand, ZLexCountCommand, ZPopMaxCommand, ZPopMinCommand, ZRankCommand, ZRemCommand, ZRemRangeByLexCommand, ZRemRangeByRankCommand, ZRemRangeByScoreCommand, ZRevRankCommand, ZScanCommand, ZScoreCommand };
|
package/fastly.d.ts
CHANGED