@upstash/redis 1.2.0 → 1.3.0
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 +21 -0
- package/{chunk-HIDCSH5S.mjs → chunk-5LZNFEHI.mjs} +1 -3
- package/{chunk-FR62Y7XB.mjs → chunk-C2RGMNOQ.mjs} +23 -7
- package/{chunk-256N7RVN.mjs → chunk-CTSQDNTV.mjs} +16 -1
- package/{chunk-HZBBCLMC.mjs → chunk-K2UC7PHG.mjs} +66 -6
- package/cloudflare.d.ts +18 -16
- package/cloudflare.js +73 -12
- package/cloudflare.mjs +4 -6
- package/commands.d.ts +37 -3
- package/commands.js +71 -6
- package/commands.mjs +11 -1
- package/fastly.d.ts +23 -21
- package/fastly.js +73 -12
- package/fastly.mjs +4 -6
- package/http.d.ts +13 -6
- package/http.js +1 -3
- package/http.mjs +1 -1
- package/index.d.ts +5 -3
- package/index.js +98 -14
- package/index.mjs +4 -4
- package/nodejs.d.ts +46 -25
- package/nodejs.js +98 -14
- package/nodejs.mjs +4 -4
- package/package.json +1 -1
- package/{redis-a9efcf58.d.ts → redis-338577a3.d.ts} +508 -464
- package/{zunionstore-342168a6.d.ts → zunionstore-633a2e7a.d.ts} +17 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { S as ScanCommandOptions, a as SetCommandOptions, C as CommandArgs, U as UnlinkCommand,
|
|
1
|
+
import { Requester } from './http';
|
|
2
|
+
import { S as ScanCommandOptions, a as ScriptFlushCommandOptions, b as SetCommandOptions, C as CommandArgs, U as UnlinkCommand, c as ScoreMember, Z as ZAddCommandOptions, d as ZAddCommandOptionsWithIncr, e as ZInterStoreCommandOptions, f as ZRangeCommandOptions, g as ZUnionStoreCommandOptions, T as Type } from './zunionstore-633a2e7a';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Upstash REST API supports command pipelining to send multiple commands in
|
|
@@ -43,433 +43,455 @@ import { S as ScanCommandOptions, a as SetCommandOptions, C as CommandArgs, U as
|
|
|
43
43
|
declare class Pipeline {
|
|
44
44
|
private client;
|
|
45
45
|
private commands;
|
|
46
|
-
constructor(client:
|
|
47
|
-
/**
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
46
|
+
constructor(client: Requester);
|
|
47
|
+
/**
|
|
48
|
+
* Send the pipeline request to upstash.
|
|
49
|
+
*
|
|
50
|
+
* Returns an array with the results of all pipelined commands.
|
|
51
|
+
*
|
|
52
|
+
* You can define a return type manually to make working in typescript easier
|
|
53
|
+
* ```ts
|
|
54
|
+
* redis.pipeline().get("key").exec<[{ greeting: string }]>()
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
57
|
exec: <TCommandResults extends unknown[] = unknown[]>() => Promise<TCommandResults>;
|
|
58
58
|
/**
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
* Pushes a command into the pipelien and returns a chainable instance of the
|
|
60
|
+
* pipeline
|
|
61
|
+
*/
|
|
62
62
|
private chain;
|
|
63
63
|
/**
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
* @see https://redis.io/commands/append
|
|
65
|
+
*/
|
|
66
66
|
append: (key: string, value: string) => this;
|
|
67
67
|
/**
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
* @see https://redis.io/commands/bitcount
|
|
69
|
+
*/
|
|
70
70
|
bitcount: (key: string, start: number, end: number) => this;
|
|
71
71
|
/**
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
* @see https://redis.io/commands/bitop
|
|
73
|
+
*/
|
|
74
74
|
bitop: {
|
|
75
75
|
(op: "and" | "or" | "xor", destinationKey: string, sourceKey: string, ...sourceKeys: string[]): Pipeline;
|
|
76
76
|
(op: "not", destinationKey: string, sourceKey: string): Pipeline;
|
|
77
77
|
};
|
|
78
78
|
/**
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
* @see https://redis.io/commands/bitpos
|
|
80
|
+
*/
|
|
81
81
|
bitpos: (key: string, start: number, end: number) => this;
|
|
82
82
|
/**
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
* @see https://redis.io/commands/dbsize
|
|
84
|
+
*/
|
|
85
85
|
dbsize: () => this;
|
|
86
86
|
/**
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
* @see https://redis.io/commands/decr
|
|
88
|
+
*/
|
|
89
89
|
decr: (key: string) => this;
|
|
90
90
|
/**
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
* @see https://redis.io/commands/decrby
|
|
92
|
+
*/
|
|
93
93
|
decrby: (key: string, decrement: number) => this;
|
|
94
94
|
/**
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
* @see https://redis.io/commands/del
|
|
96
|
+
*/
|
|
97
97
|
del: (args_0: string, ...args_1: string[]) => this;
|
|
98
98
|
/**
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
* @see https://redis.io/commands/echo
|
|
100
|
+
*/
|
|
101
101
|
echo: (message: string) => this;
|
|
102
102
|
/**
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
*
|
|
104
|
+
* @see https://redis.io/commands/eval
|
|
105
|
+
*/
|
|
106
|
+
eval: <TArgs extends unknown[], TData = unknown>(script: string, keys: string[], args: TArgs) => this;
|
|
107
|
+
/**
|
|
108
|
+
*
|
|
109
|
+
* @see https://redis.io/commands/evalsha
|
|
110
|
+
*/
|
|
111
|
+
evalsha: <TArgs extends unknown[], TData = unknown>(sha1: string, keys: string[], args: TArgs) => this;
|
|
112
|
+
/**
|
|
113
|
+
* @see https://redis.io/commands/exists
|
|
114
|
+
*/
|
|
105
115
|
exists: (args_0: string, ...args_1: string[]) => this;
|
|
106
116
|
/**
|
|
107
|
-
|
|
108
|
-
|
|
117
|
+
* @see https://redis.io/commands/expire
|
|
118
|
+
*/
|
|
109
119
|
expire: (key: string, seconds: number) => this;
|
|
110
120
|
/**
|
|
111
|
-
|
|
112
|
-
|
|
121
|
+
* @see https://redis.io/commands/expireat
|
|
122
|
+
*/
|
|
113
123
|
expireat: (key: string, unix: number) => this;
|
|
114
124
|
/**
|
|
115
|
-
|
|
116
|
-
|
|
125
|
+
* @see https://redis.io/commands/flushall
|
|
126
|
+
*/
|
|
117
127
|
flushall: (opts?: {
|
|
118
128
|
async?: boolean | undefined;
|
|
119
129
|
} | undefined) => this;
|
|
120
130
|
/**
|
|
121
|
-
|
|
122
|
-
|
|
131
|
+
* @see https://redis.io/commands/flushdb
|
|
132
|
+
*/
|
|
123
133
|
flushdb: (opts?: {
|
|
124
134
|
async?: boolean | undefined;
|
|
125
135
|
} | undefined) => this;
|
|
126
136
|
/**
|
|
127
|
-
|
|
128
|
-
|
|
137
|
+
* @see https://redis.io/commands/get
|
|
138
|
+
*/
|
|
129
139
|
get: <TData>(key: string) => this;
|
|
130
140
|
/**
|
|
131
|
-
|
|
132
|
-
|
|
141
|
+
* @see https://redis.io/commands/getbit
|
|
142
|
+
*/
|
|
133
143
|
getbit: (key: string, offset: number) => this;
|
|
134
144
|
/**
|
|
135
|
-
|
|
136
|
-
|
|
145
|
+
* @see https://redis.io/commands/getrange
|
|
146
|
+
*/
|
|
137
147
|
getrange: (key: string, start: number, end: number) => this;
|
|
138
148
|
/**
|
|
139
|
-
|
|
140
|
-
|
|
149
|
+
* @see https://redis.io/commands/getset
|
|
150
|
+
*/
|
|
141
151
|
getset: <TData>(key: string, value: TData) => this;
|
|
142
152
|
/**
|
|
143
|
-
|
|
144
|
-
|
|
153
|
+
* @see https://redis.io/commands/hdel
|
|
154
|
+
*/
|
|
145
155
|
hdel: (key: string, field: string) => this;
|
|
146
156
|
/**
|
|
147
|
-
|
|
148
|
-
|
|
157
|
+
* @see https://redis.io/commands/hexists
|
|
158
|
+
*/
|
|
149
159
|
hexists: (key: string, field: string) => this;
|
|
150
160
|
/**
|
|
151
|
-
|
|
152
|
-
|
|
161
|
+
* @see https://redis.io/commands/hget
|
|
162
|
+
*/
|
|
153
163
|
hget: <TData>(key: string, field: string) => this;
|
|
154
164
|
/**
|
|
155
|
-
|
|
156
|
-
|
|
165
|
+
* @see https://redis.io/commands/hgetall
|
|
166
|
+
*/
|
|
157
167
|
hgetall: <TData extends Record<string, unknown>>(key: string) => this;
|
|
158
168
|
/**
|
|
159
|
-
|
|
160
|
-
|
|
169
|
+
* @see https://redis.io/commands/hincrby
|
|
170
|
+
*/
|
|
161
171
|
hincrby: (key: string, field: string, increment: number) => this;
|
|
162
172
|
/**
|
|
163
|
-
|
|
164
|
-
|
|
173
|
+
* @see https://redis.io/commands/hincrbyfloat
|
|
174
|
+
*/
|
|
165
175
|
hincrbyfloat: (key: string, field: string, increment: number) => this;
|
|
166
176
|
/**
|
|
167
|
-
|
|
168
|
-
|
|
177
|
+
* @see https://redis.io/commands/hkeys
|
|
178
|
+
*/
|
|
169
179
|
hkeys: (key: string) => this;
|
|
170
180
|
/**
|
|
171
|
-
|
|
172
|
-
|
|
181
|
+
* @see https://redis.io/commands/hlen
|
|
182
|
+
*/
|
|
173
183
|
hlen: (key: string) => this;
|
|
174
184
|
/**
|
|
175
|
-
|
|
176
|
-
|
|
185
|
+
* @see https://redis.io/commands/hmget
|
|
186
|
+
*/
|
|
177
187
|
hmget: <TData extends Record<string, unknown>>(key: string, ...fields: string[]) => this;
|
|
178
188
|
/**
|
|
179
|
-
|
|
180
|
-
|
|
189
|
+
* @see https://redis.io/commands/hmset
|
|
190
|
+
*/
|
|
181
191
|
hmset: <TData>(key: string, kv: {
|
|
182
192
|
[field: string]: TData;
|
|
183
193
|
}) => this;
|
|
184
194
|
/**
|
|
185
|
-
|
|
186
|
-
|
|
195
|
+
* @see https://redis.io/commands/hscan
|
|
196
|
+
*/
|
|
187
197
|
hscan: (key: string, cursor: number, opts?: ScanCommandOptions | undefined) => this;
|
|
188
198
|
/**
|
|
189
|
-
|
|
190
|
-
|
|
199
|
+
* @see https://redis.io/commands/hset
|
|
200
|
+
*/
|
|
191
201
|
hset: <TData>(key: string, kv: {
|
|
192
202
|
[field: string]: TData;
|
|
193
203
|
}) => this;
|
|
194
204
|
/**
|
|
195
|
-
|
|
196
|
-
|
|
205
|
+
* @see https://redis.io/commands/hsetnx
|
|
206
|
+
*/
|
|
197
207
|
hsetnx: <TData>(key: string, field: string, value: TData) => this;
|
|
198
208
|
/**
|
|
199
|
-
|
|
200
|
-
|
|
209
|
+
* @see https://redis.io/commands/hstrlen
|
|
210
|
+
*/
|
|
201
211
|
hstrlen: (key: string, field: string) => this;
|
|
202
212
|
/**
|
|
203
|
-
|
|
204
|
-
|
|
213
|
+
* @see https://redis.io/commands/hvals
|
|
214
|
+
*/
|
|
205
215
|
hvals: (key: string) => this;
|
|
206
216
|
/**
|
|
207
|
-
|
|
208
|
-
|
|
217
|
+
* @see https://redis.io/commands/incr
|
|
218
|
+
*/
|
|
209
219
|
incr: (key: string) => this;
|
|
210
220
|
/**
|
|
211
|
-
|
|
212
|
-
|
|
221
|
+
* @see https://redis.io/commands/incrby
|
|
222
|
+
*/
|
|
213
223
|
incrby: (key: string, value: number) => this;
|
|
214
224
|
/**
|
|
215
|
-
|
|
216
|
-
|
|
225
|
+
* @see https://redis.io/commands/incrbyfloat
|
|
226
|
+
*/
|
|
217
227
|
incrbyfloat: (key: string, value: number) => this;
|
|
218
228
|
/**
|
|
219
|
-
|
|
220
|
-
|
|
229
|
+
* @see https://redis.io/commands/keys
|
|
230
|
+
*/
|
|
221
231
|
keys: (pattern: string) => this;
|
|
222
232
|
/**
|
|
223
|
-
|
|
224
|
-
|
|
233
|
+
* @see https://redis.io/commands/lindex
|
|
234
|
+
*/
|
|
225
235
|
lindex: (key: string, index: number) => this;
|
|
226
236
|
/**
|
|
227
|
-
|
|
228
|
-
|
|
237
|
+
* @see https://redis.io/commands/linsert
|
|
238
|
+
*/
|
|
229
239
|
linsert: <TData>(key: string, direction: "before" | "after", pivot: TData, value: TData) => this;
|
|
230
240
|
/**
|
|
231
|
-
|
|
232
|
-
|
|
241
|
+
* @see https://redis.io/commands/llen
|
|
242
|
+
*/
|
|
233
243
|
llen: (key: string) => this;
|
|
234
244
|
/**
|
|
235
|
-
|
|
236
|
-
|
|
245
|
+
* @see https://redis.io/commands/lpop
|
|
246
|
+
*/
|
|
237
247
|
lpop: <TData>(key: string) => this;
|
|
238
248
|
/**
|
|
239
|
-
|
|
240
|
-
|
|
249
|
+
* @see https://redis.io/commands/lpush
|
|
250
|
+
*/
|
|
241
251
|
lpush: <TData>(key: string, elements_0: TData, ...elements_1: TData[]) => this;
|
|
242
252
|
/**
|
|
243
|
-
|
|
244
|
-
|
|
253
|
+
* @see https://redis.io/commands/lpushx
|
|
254
|
+
*/
|
|
245
255
|
lpushx: <TData>(key: string, elements_0: TData, ...elements_1: TData[]) => this;
|
|
246
256
|
/**
|
|
247
|
-
|
|
248
|
-
|
|
257
|
+
* @see https://redis.io/commands/lrange
|
|
258
|
+
*/
|
|
249
259
|
lrange: <TResult = string>(key: string, start: number, end: number) => this;
|
|
250
260
|
/**
|
|
251
|
-
|
|
252
|
-
|
|
261
|
+
* @see https://redis.io/commands/lrem
|
|
262
|
+
*/
|
|
253
263
|
lrem: <TData>(key: string, count: number, value: TData) => this;
|
|
254
264
|
/**
|
|
255
|
-
|
|
256
|
-
|
|
265
|
+
* @see https://redis.io/commands/lset
|
|
266
|
+
*/
|
|
257
267
|
lset: <TData>(key: string, value: TData, index: number) => this;
|
|
258
268
|
/**
|
|
259
|
-
|
|
260
|
-
|
|
269
|
+
* @see https://redis.io/commands/ltrim
|
|
270
|
+
*/
|
|
261
271
|
ltrim: (key: string, start: number, end: number) => this;
|
|
262
272
|
/**
|
|
263
|
-
|
|
264
|
-
|
|
273
|
+
* @see https://redis.io/commands/mget
|
|
274
|
+
*/
|
|
265
275
|
mget: <TData extends unknown[]>(args_0: string, ...args_1: string[]) => this;
|
|
266
276
|
/**
|
|
267
|
-
|
|
268
|
-
|
|
277
|
+
* @see https://redis.io/commands/mset
|
|
278
|
+
*/
|
|
269
279
|
mset: <TData>(kv: {
|
|
270
280
|
[key: string]: TData;
|
|
271
281
|
}) => this;
|
|
272
282
|
/**
|
|
273
|
-
|
|
274
|
-
|
|
283
|
+
* @see https://redis.io/commands/msetnx
|
|
284
|
+
*/
|
|
275
285
|
msetnx: <TData>(kv: {
|
|
276
286
|
[key: string]: TData;
|
|
277
287
|
}) => this;
|
|
278
288
|
/**
|
|
279
|
-
|
|
280
|
-
|
|
289
|
+
* @see https://redis.io/commands/persist
|
|
290
|
+
*/
|
|
281
291
|
persist: (key: string) => this;
|
|
282
292
|
/**
|
|
283
|
-
|
|
284
|
-
|
|
293
|
+
* @see https://redis.io/commands/pexpire
|
|
294
|
+
*/
|
|
285
295
|
pexpire: (key: string, milliseconds: number) => this;
|
|
286
296
|
/**
|
|
287
|
-
|
|
288
|
-
|
|
297
|
+
* @see https://redis.io/commands/pexpireat
|
|
298
|
+
*/
|
|
289
299
|
pexpireat: (key: string, unix: number) => this;
|
|
290
300
|
/**
|
|
291
|
-
|
|
292
|
-
|
|
301
|
+
* @see https://redis.io/commands/ping
|
|
302
|
+
*/
|
|
293
303
|
ping: (message?: string | undefined) => this;
|
|
294
304
|
/**
|
|
295
|
-
|
|
296
|
-
|
|
305
|
+
* @see https://redis.io/commands/psetex
|
|
306
|
+
*/
|
|
297
307
|
psetex: <TData>(key: string, ttl: number, value: TData) => this;
|
|
298
308
|
/**
|
|
299
|
-
|
|
300
|
-
|
|
309
|
+
* @see https://redis.io/commands/pttl
|
|
310
|
+
*/
|
|
301
311
|
pttl: (key: string) => this;
|
|
302
312
|
/**
|
|
303
|
-
|
|
304
|
-
|
|
313
|
+
* @see https://redis.io/commands/publish
|
|
314
|
+
*/
|
|
305
315
|
publish: (channel: string, message: unknown) => this;
|
|
306
316
|
/**
|
|
307
|
-
|
|
308
|
-
|
|
317
|
+
* @see https://redis.io/commands/randomkey
|
|
318
|
+
*/
|
|
309
319
|
randomkey: () => this;
|
|
310
320
|
/**
|
|
311
|
-
|
|
312
|
-
|
|
321
|
+
* @see https://redis.io/commands/rename
|
|
322
|
+
*/
|
|
313
323
|
rename: (source: string, destination: string) => this;
|
|
314
324
|
/**
|
|
315
|
-
|
|
316
|
-
|
|
325
|
+
* @see https://redis.io/commands/renamenx
|
|
326
|
+
*/
|
|
317
327
|
renamenx: (source: string, destination: string) => this;
|
|
318
328
|
/**
|
|
319
|
-
|
|
320
|
-
|
|
329
|
+
* @see https://redis.io/commands/rpop
|
|
330
|
+
*/
|
|
321
331
|
rpop: <TData = string>(key: string) => this;
|
|
322
332
|
/**
|
|
323
|
-
|
|
324
|
-
|
|
333
|
+
* @see https://redis.io/commands/rpush
|
|
334
|
+
*/
|
|
325
335
|
rpush: <TData>(key: string, elements_0: TData, ...elements_1: TData[]) => this;
|
|
326
336
|
/**
|
|
327
|
-
|
|
328
|
-
|
|
337
|
+
* @see https://redis.io/commands/rpushx
|
|
338
|
+
*/
|
|
329
339
|
rpushx: <TData>(key: string, elements_0: TData, ...elements_1: TData[]) => this;
|
|
330
340
|
/**
|
|
331
|
-
|
|
332
|
-
|
|
341
|
+
* @see https://redis.io/commands/sadd
|
|
342
|
+
*/
|
|
333
343
|
sadd: <TData>(key: string, members_0: TData, ...members_1: TData[]) => this;
|
|
334
344
|
/**
|
|
335
|
-
|
|
336
|
-
|
|
345
|
+
* @see https://redis.io/commands/scan
|
|
346
|
+
*/
|
|
337
347
|
scan: (cursor: number, opts?: ScanCommandOptions | undefined) => this;
|
|
338
348
|
/**
|
|
339
|
-
|
|
340
|
-
|
|
349
|
+
* @see https://redis.io/commands/scard
|
|
350
|
+
*/
|
|
341
351
|
scard: (key: string) => this;
|
|
342
352
|
/**
|
|
343
|
-
|
|
344
|
-
|
|
353
|
+
* @see https://redis.io/commands/script-exists
|
|
354
|
+
*/
|
|
355
|
+
scriptExists: (args_0: string, ...args_1: string[]) => this;
|
|
356
|
+
/**
|
|
357
|
+
* @see https://redis.io/commands/script-flush
|
|
358
|
+
*/
|
|
359
|
+
scriptFlush: (opts?: ScriptFlushCommandOptions | undefined) => this;
|
|
360
|
+
/**
|
|
361
|
+
* @see https://redis.io/commands/script-load
|
|
362
|
+
*/
|
|
363
|
+
scriptLoad: (script: string) => this;
|
|
364
|
+
/**
|
|
365
|
+
* @see https://redis.io/commands/sdiff
|
|
366
|
+
*/
|
|
345
367
|
sdiff: (key: string, ...keys: string[]) => this;
|
|
346
368
|
/**
|
|
347
|
-
|
|
348
|
-
|
|
369
|
+
* @see https://redis.io/commands/sdiffstore
|
|
370
|
+
*/
|
|
349
371
|
sdiffstore: (args_0: string, args_1: string, ...args_2: string[]) => this;
|
|
350
372
|
/**
|
|
351
|
-
|
|
352
|
-
|
|
373
|
+
* @see https://redis.io/commands/set
|
|
374
|
+
*/
|
|
353
375
|
set: <TData>(key: string, value: TData, opts?: SetCommandOptions | undefined) => this;
|
|
354
376
|
/**
|
|
355
|
-
|
|
356
|
-
|
|
377
|
+
* @see https://redis.io/commands/setbit
|
|
378
|
+
*/
|
|
357
379
|
setbit: (key: string, offset: number, value: 0 | 1) => this;
|
|
358
380
|
/**
|
|
359
|
-
|
|
360
|
-
|
|
381
|
+
* @see https://redis.io/commands/setex
|
|
382
|
+
*/
|
|
361
383
|
setex: <TData>(key: string, ttl: number, value: TData) => this;
|
|
362
384
|
/**
|
|
363
|
-
|
|
364
|
-
|
|
385
|
+
* @see https://redis.io/commands/setnx
|
|
386
|
+
*/
|
|
365
387
|
setnx: <TData>(key: string, value: TData) => this;
|
|
366
388
|
/**
|
|
367
|
-
|
|
368
|
-
|
|
389
|
+
* @see https://redis.io/commands/setrange
|
|
390
|
+
*/
|
|
369
391
|
setrange: (key: string, offset: number, value: string) => this;
|
|
370
392
|
/**
|
|
371
|
-
|
|
372
|
-
|
|
393
|
+
* @see https://redis.io/commands/sinter
|
|
394
|
+
*/
|
|
373
395
|
sinter: (key: string, ...keys: string[]) => this;
|
|
374
396
|
/**
|
|
375
|
-
|
|
376
|
-
|
|
397
|
+
* @see https://redis.io/commands/sinterstore
|
|
398
|
+
*/
|
|
377
399
|
sinterstore: (destination: string, key: string, ...keys: string[]) => this;
|
|
378
400
|
/**
|
|
379
|
-
|
|
380
|
-
|
|
401
|
+
* @see https://redis.io/commands/sismember
|
|
402
|
+
*/
|
|
381
403
|
sismember: <TData>(key: string, member: TData) => this;
|
|
382
404
|
/**
|
|
383
|
-
|
|
384
|
-
|
|
405
|
+
* @see https://redis.io/commands/smembers
|
|
406
|
+
*/
|
|
385
407
|
smembers: (key: string) => this;
|
|
386
408
|
/**
|
|
387
|
-
|
|
388
|
-
|
|
409
|
+
* @see https://redis.io/commands/smove
|
|
410
|
+
*/
|
|
389
411
|
smove: <TData>(source: string, destination: string, member: TData) => this;
|
|
390
412
|
/**
|
|
391
|
-
|
|
392
|
-
|
|
413
|
+
* @see https://redis.io/commands/spop
|
|
414
|
+
*/
|
|
393
415
|
spop: <TData>(key: string, count?: number | undefined) => this;
|
|
394
416
|
/**
|
|
395
|
-
|
|
396
|
-
|
|
417
|
+
* @see https://redis.io/commands/srandmember
|
|
418
|
+
*/
|
|
397
419
|
srandmember: <TData>(key: string, count?: number | undefined) => this;
|
|
398
420
|
/**
|
|
399
|
-
|
|
400
|
-
|
|
421
|
+
* @see https://redis.io/commands/srem
|
|
422
|
+
*/
|
|
401
423
|
srem: <TData>(key: string, members_0: TData, ...members_1: TData[]) => this;
|
|
402
424
|
/**
|
|
403
|
-
|
|
404
|
-
|
|
425
|
+
* @see https://redis.io/commands/sscan
|
|
426
|
+
*/
|
|
405
427
|
sscan: (key: string, cursor: number, opts?: ScanCommandOptions | undefined) => this;
|
|
406
428
|
/**
|
|
407
|
-
|
|
408
|
-
|
|
429
|
+
* @see https://redis.io/commands/strlen
|
|
430
|
+
*/
|
|
409
431
|
strlen: (key: string) => this;
|
|
410
432
|
/**
|
|
411
|
-
|
|
412
|
-
|
|
433
|
+
* @see https://redis.io/commands/sunion
|
|
434
|
+
*/
|
|
413
435
|
sunion: (key: string, ...keys: string[]) => this;
|
|
414
436
|
/**
|
|
415
|
-
|
|
416
|
-
|
|
437
|
+
* @see https://redis.io/commands/sunionstore
|
|
438
|
+
*/
|
|
417
439
|
sunionstore: (destination: string, key: string, ...keys: string[]) => this;
|
|
418
440
|
/**
|
|
419
|
-
|
|
420
|
-
|
|
441
|
+
* @see https://redis.io/commands/time
|
|
442
|
+
*/
|
|
421
443
|
time: () => this;
|
|
422
444
|
/**
|
|
423
|
-
|
|
424
|
-
|
|
445
|
+
* @see https://redis.io/commands/touch
|
|
446
|
+
*/
|
|
425
447
|
touch: (args_0: string, ...args_1: string[]) => this;
|
|
426
448
|
/**
|
|
427
|
-
|
|
428
|
-
|
|
449
|
+
* @see https://redis.io/commands/ttl
|
|
450
|
+
*/
|
|
429
451
|
ttl: (key: string) => this;
|
|
430
452
|
/**
|
|
431
|
-
|
|
432
|
-
|
|
453
|
+
* @see https://redis.io/commands/type
|
|
454
|
+
*/
|
|
433
455
|
type: (key: string) => this;
|
|
434
456
|
/**
|
|
435
|
-
|
|
436
|
-
|
|
457
|
+
* @see https://redis.io/commands/unlink
|
|
458
|
+
*/
|
|
437
459
|
unlink: (...args: CommandArgs<typeof UnlinkCommand>) => this;
|
|
438
460
|
/**
|
|
439
|
-
|
|
440
|
-
|
|
461
|
+
* @see https://redis.io/commands/zadd
|
|
462
|
+
*/
|
|
441
463
|
zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [string, ZAddCommandOptions | ZAddCommandOptionsWithIncr, ScoreMember<TData>, ...ScoreMember<TData>[]]) => this;
|
|
442
464
|
/**
|
|
443
|
-
|
|
444
|
-
|
|
465
|
+
* @see https://redis.io/commands/zcard
|
|
466
|
+
*/
|
|
445
467
|
zcard: (key: string) => this;
|
|
446
468
|
/**
|
|
447
|
-
|
|
448
|
-
|
|
469
|
+
* @see https://redis.io/commands/zcount
|
|
470
|
+
*/
|
|
449
471
|
zcount: (key: string, min: string | number, max: string | number) => this;
|
|
450
472
|
/**
|
|
451
|
-
|
|
452
|
-
|
|
473
|
+
* @see https://redis.io/commands/zincrby
|
|
474
|
+
*/
|
|
453
475
|
zincrby: <TData>(key: string, increment: number, member: TData) => this;
|
|
454
476
|
/**
|
|
455
|
-
|
|
456
|
-
|
|
477
|
+
* @see https://redis.io/commands/zinterstore
|
|
478
|
+
*/
|
|
457
479
|
zinterstore: (destination: string, numKeys: number, keys: string[], opts?: ZInterStoreCommandOptions | undefined) => this;
|
|
458
480
|
/**
|
|
459
|
-
|
|
460
|
-
|
|
481
|
+
* @see https://redis.io/commands/zlexcount
|
|
482
|
+
*/
|
|
461
483
|
zlexcount: (key: string, min: string, max: string) => this;
|
|
462
484
|
/**
|
|
463
|
-
|
|
464
|
-
|
|
485
|
+
* @see https://redis.io/commands/zpopmax
|
|
486
|
+
*/
|
|
465
487
|
zpopmax: <TData>(key: string, count?: number | undefined) => this;
|
|
466
488
|
/**
|
|
467
|
-
|
|
468
|
-
|
|
489
|
+
* @see https://redis.io/commands/zpopmin
|
|
490
|
+
*/
|
|
469
491
|
zpopmin: <TData>(key: string, count?: number | undefined) => this;
|
|
470
492
|
/**
|
|
471
|
-
|
|
472
|
-
|
|
493
|
+
* @see https://redis.io/commands/zrange
|
|
494
|
+
*/
|
|
473
495
|
zrange: <TData extends unknown[]>(...args: [key: string, min: number, max: number, opts?: ZRangeCommandOptions] | [
|
|
474
496
|
key: string,
|
|
475
497
|
min: `(${string}` | `[${string}` | "-" | "+",
|
|
@@ -486,40 +508,40 @@ declare class Pipeline {
|
|
|
486
508
|
} & ZRangeCommandOptions
|
|
487
509
|
]) => this;
|
|
488
510
|
/**
|
|
489
|
-
|
|
490
|
-
|
|
511
|
+
* @see https://redis.io/commands/zrank
|
|
512
|
+
*/
|
|
491
513
|
zrank: <TData>(key: string, member: TData) => this;
|
|
492
514
|
/**
|
|
493
|
-
|
|
494
|
-
|
|
515
|
+
* @see https://redis.io/commands/zrem
|
|
516
|
+
*/
|
|
495
517
|
zrem: <TData>(key: string, members_0: TData, ...members_1: TData[]) => this;
|
|
496
518
|
/**
|
|
497
|
-
|
|
498
|
-
|
|
519
|
+
* @see https://redis.io/commands/zremrangebylex
|
|
520
|
+
*/
|
|
499
521
|
zremrangebylex: (key: string, min: string, max: string) => this;
|
|
500
522
|
/**
|
|
501
|
-
|
|
502
|
-
|
|
523
|
+
* @see https://redis.io/commands/zremrangebyrank
|
|
524
|
+
*/
|
|
503
525
|
zremrangebyrank: (key: string, start: number, stop: number) => this;
|
|
504
526
|
/**
|
|
505
|
-
|
|
506
|
-
|
|
527
|
+
* @see https://redis.io/commands/zremrangebyscore
|
|
528
|
+
*/
|
|
507
529
|
zremrangebyscore: (key: string, min: number, max: number) => this;
|
|
508
530
|
/**
|
|
509
|
-
|
|
510
|
-
|
|
531
|
+
* @see https://redis.io/commands/zrevrank
|
|
532
|
+
*/
|
|
511
533
|
zrevrank: <TData>(key: string, member: TData) => this;
|
|
512
534
|
/**
|
|
513
|
-
|
|
514
|
-
|
|
535
|
+
* @see https://redis.io/commands/zscan
|
|
536
|
+
*/
|
|
515
537
|
zscan: (key: string, cursor: number, opts?: ScanCommandOptions | undefined) => this;
|
|
516
538
|
/**
|
|
517
|
-
|
|
518
|
-
|
|
539
|
+
* @see https://redis.io/commands/zscore
|
|
540
|
+
*/
|
|
519
541
|
zscore: <TData>(key: string, member: TData) => this;
|
|
520
542
|
/**
|
|
521
|
-
|
|
522
|
-
|
|
543
|
+
* @see https://redis.io/commands/zunionstore
|
|
544
|
+
*/
|
|
523
545
|
zunionstore: (destination: string, numKeys: number, keys: string[], opts?: ZUnionStoreCommandOptions | undefined) => this;
|
|
524
546
|
}
|
|
525
547
|
|
|
@@ -529,433 +551,455 @@ declare class Pipeline {
|
|
|
529
551
|
declare class Redis {
|
|
530
552
|
private readonly client;
|
|
531
553
|
/**
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
constructor(client:
|
|
543
|
-
/**
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
554
|
+
* Create a new redis client
|
|
555
|
+
*
|
|
556
|
+
* @example
|
|
557
|
+
* ```typescript
|
|
558
|
+
* const redis = new Redis({
|
|
559
|
+
* url: "<UPSTASH_REDIS_REST_URL>",
|
|
560
|
+
* token: "<UPSTASH_REDIS_REST_TOKEN>",
|
|
561
|
+
* });
|
|
562
|
+
* ```
|
|
563
|
+
*/
|
|
564
|
+
constructor(client: Requester);
|
|
565
|
+
/**
|
|
566
|
+
* Create a new pipeline that allows you to send requests in bulk.
|
|
567
|
+
*
|
|
568
|
+
* @see {@link Pipeline}
|
|
569
|
+
*/
|
|
548
570
|
pipeline: () => Pipeline;
|
|
549
571
|
/**
|
|
550
|
-
|
|
551
|
-
|
|
572
|
+
* @see https://redis.io/commands/append
|
|
573
|
+
*/
|
|
552
574
|
append: (key: string, value: string) => Promise<number>;
|
|
553
575
|
/**
|
|
554
|
-
|
|
555
|
-
|
|
576
|
+
* @see https://redis.io/commands/bitcount
|
|
577
|
+
*/
|
|
556
578
|
bitcount: (key: string, start: number, end: number) => Promise<number>;
|
|
557
579
|
/**
|
|
558
|
-
|
|
559
|
-
|
|
580
|
+
* @see https://redis.io/commands/bitop
|
|
581
|
+
*/
|
|
560
582
|
bitop: {
|
|
561
583
|
(op: "and" | "or" | "xor", destinationKey: string, sourceKey: string, ...sourceKeys: string[]): Promise<number>;
|
|
562
584
|
(op: "not", destinationKey: string, sourceKey: string): Promise<number>;
|
|
563
585
|
};
|
|
564
586
|
/**
|
|
565
|
-
|
|
566
|
-
|
|
587
|
+
* @see https://redis.io/commands/bitpos
|
|
588
|
+
*/
|
|
567
589
|
bitpos: (key: string, start: number, end: number) => Promise<number>;
|
|
568
590
|
/**
|
|
569
|
-
|
|
570
|
-
|
|
591
|
+
* @see https://redis.io/commands/dbsize
|
|
592
|
+
*/
|
|
571
593
|
dbsize: () => Promise<number>;
|
|
572
594
|
/**
|
|
573
|
-
|
|
574
|
-
|
|
595
|
+
* @see https://redis.io/commands/decr
|
|
596
|
+
*/
|
|
575
597
|
decr: (key: string) => Promise<number>;
|
|
576
598
|
/**
|
|
577
|
-
|
|
578
|
-
|
|
599
|
+
* @see https://redis.io/commands/decrby
|
|
600
|
+
*/
|
|
579
601
|
decrby: (key: string, decrement: number) => Promise<number>;
|
|
580
602
|
/**
|
|
581
|
-
|
|
582
|
-
|
|
603
|
+
* @see https://redis.io/commands/del
|
|
604
|
+
*/
|
|
583
605
|
del: (args_0: string, ...args_1: string[]) => Promise<number>;
|
|
584
606
|
/**
|
|
585
|
-
|
|
586
|
-
|
|
607
|
+
* @see https://redis.io/commands/echo
|
|
608
|
+
*/
|
|
587
609
|
echo: (message: string) => Promise<string>;
|
|
588
610
|
/**
|
|
589
|
-
|
|
590
|
-
|
|
611
|
+
*
|
|
612
|
+
* @see https://redis.io/commands/eval
|
|
613
|
+
*/
|
|
614
|
+
eval: <TArgs extends unknown[], TData = unknown>(script: string, keys: string[], args: TArgs) => Promise<unknown>;
|
|
615
|
+
/**
|
|
616
|
+
*
|
|
617
|
+
* @see https://redis.io/commands/evalsha
|
|
618
|
+
*/
|
|
619
|
+
evalsha: <TArgs extends unknown[], TData = unknown>(sha1: string, keys: string[], args: TArgs) => Promise<unknown>;
|
|
620
|
+
/**
|
|
621
|
+
* @see https://redis.io/commands/exists
|
|
622
|
+
*/
|
|
591
623
|
exists: (args_0: string, ...args_1: string[]) => Promise<number>;
|
|
592
624
|
/**
|
|
593
|
-
|
|
594
|
-
|
|
625
|
+
* @see https://redis.io/commands/expire
|
|
626
|
+
*/
|
|
595
627
|
expire: (key: string, seconds: number) => Promise<0 | 1>;
|
|
596
628
|
/**
|
|
597
|
-
|
|
598
|
-
|
|
629
|
+
* @see https://redis.io/commands/expireat
|
|
630
|
+
*/
|
|
599
631
|
expireat: (key: string, unix: number) => Promise<0 | 1>;
|
|
600
632
|
/**
|
|
601
|
-
|
|
602
|
-
|
|
633
|
+
* @see https://redis.io/commands/flushall
|
|
634
|
+
*/
|
|
603
635
|
flushall: (opts?: {
|
|
604
636
|
async?: boolean | undefined;
|
|
605
637
|
} | undefined) => Promise<"OK">;
|
|
606
638
|
/**
|
|
607
|
-
|
|
608
|
-
|
|
639
|
+
* @see https://redis.io/commands/flushdb
|
|
640
|
+
*/
|
|
609
641
|
flushdb: (opts?: {
|
|
610
642
|
async?: boolean | undefined;
|
|
611
643
|
} | undefined) => Promise<"OK">;
|
|
612
644
|
/**
|
|
613
|
-
|
|
614
|
-
|
|
645
|
+
* @see https://redis.io/commands/get
|
|
646
|
+
*/
|
|
615
647
|
get: <TData>(key: string) => Promise<TData | null>;
|
|
616
648
|
/**
|
|
617
|
-
|
|
618
|
-
|
|
649
|
+
* @see https://redis.io/commands/getbit
|
|
650
|
+
*/
|
|
619
651
|
getbit: (key: string, offset: number) => Promise<0 | 1>;
|
|
620
652
|
/**
|
|
621
|
-
|
|
622
|
-
|
|
653
|
+
* @see https://redis.io/commands/getrange
|
|
654
|
+
*/
|
|
623
655
|
getrange: (key: string, start: number, end: number) => Promise<string>;
|
|
624
656
|
/**
|
|
625
|
-
|
|
626
|
-
|
|
657
|
+
* @see https://redis.io/commands/getset
|
|
658
|
+
*/
|
|
627
659
|
getset: <TData>(key: string, value: TData) => Promise<TData | null>;
|
|
628
660
|
/**
|
|
629
|
-
|
|
630
|
-
|
|
661
|
+
* @see https://redis.io/commands/hdel
|
|
662
|
+
*/
|
|
631
663
|
hdel: (key: string, field: string) => Promise<0 | 1>;
|
|
632
664
|
/**
|
|
633
|
-
|
|
634
|
-
|
|
665
|
+
* @see https://redis.io/commands/hexists
|
|
666
|
+
*/
|
|
635
667
|
hexists: (key: string, field: string) => Promise<number>;
|
|
636
668
|
/**
|
|
637
|
-
|
|
638
|
-
|
|
669
|
+
* @see https://redis.io/commands/hget
|
|
670
|
+
*/
|
|
639
671
|
hget: <TData>(key: string, field: string) => Promise<TData | null>;
|
|
640
672
|
/**
|
|
641
|
-
|
|
642
|
-
|
|
673
|
+
* @see https://redis.io/commands/hgetall
|
|
674
|
+
*/
|
|
643
675
|
hgetall: <TData extends Record<string, unknown>>(key: string) => Promise<TData | null>;
|
|
644
676
|
/**
|
|
645
|
-
|
|
646
|
-
|
|
677
|
+
* @see https://redis.io/commands/hincrby
|
|
678
|
+
*/
|
|
647
679
|
hincrby: (key: string, field: string, increment: number) => Promise<number>;
|
|
648
680
|
/**
|
|
649
|
-
|
|
650
|
-
|
|
681
|
+
* @see https://redis.io/commands/hincrbyfloat
|
|
682
|
+
*/
|
|
651
683
|
hincrbyfloat: (key: string, field: string, increment: number) => Promise<number>;
|
|
652
684
|
/**
|
|
653
|
-
|
|
654
|
-
|
|
685
|
+
* @see https://redis.io/commands/hkeys
|
|
686
|
+
*/
|
|
655
687
|
hkeys: (key: string) => Promise<string[]>;
|
|
656
688
|
/**
|
|
657
|
-
|
|
658
|
-
|
|
689
|
+
* @see https://redis.io/commands/hlen
|
|
690
|
+
*/
|
|
659
691
|
hlen: (key: string) => Promise<number>;
|
|
660
692
|
/**
|
|
661
|
-
|
|
662
|
-
|
|
693
|
+
* @see https://redis.io/commands/hmget
|
|
694
|
+
*/
|
|
663
695
|
hmget: <TData extends Record<string, unknown>>(key: string, ...fields: string[]) => Promise<TData | null>;
|
|
664
696
|
/**
|
|
665
|
-
|
|
666
|
-
|
|
697
|
+
* @see https://redis.io/commands/hmset
|
|
698
|
+
*/
|
|
667
699
|
hmset: <TData>(key: string, kv: {
|
|
668
700
|
[field: string]: TData;
|
|
669
701
|
}) => Promise<number>;
|
|
670
702
|
/**
|
|
671
|
-
|
|
672
|
-
|
|
703
|
+
* @see https://redis.io/commands/hscan
|
|
704
|
+
*/
|
|
673
705
|
hscan: (key: string, cursor: number, opts?: ScanCommandOptions | undefined) => Promise<[number, (string | number)[]]>;
|
|
674
706
|
/**
|
|
675
|
-
|
|
676
|
-
|
|
707
|
+
* @see https://redis.io/commands/hset
|
|
708
|
+
*/
|
|
677
709
|
hset: <TData>(key: string, kv: {
|
|
678
710
|
[field: string]: TData;
|
|
679
711
|
}) => Promise<number>;
|
|
680
712
|
/**
|
|
681
|
-
|
|
682
|
-
|
|
713
|
+
* @see https://redis.io/commands/hsetnx
|
|
714
|
+
*/
|
|
683
715
|
hsetnx: <TData>(key: string, field: string, value: TData) => Promise<0 | 1>;
|
|
684
716
|
/**
|
|
685
|
-
|
|
686
|
-
|
|
717
|
+
* @see https://redis.io/commands/hstrlen
|
|
718
|
+
*/
|
|
687
719
|
hstrlen: (key: string, field: string) => Promise<number>;
|
|
688
720
|
/**
|
|
689
|
-
|
|
690
|
-
|
|
721
|
+
* @see https://redis.io/commands/hvals
|
|
722
|
+
*/
|
|
691
723
|
hvals: (key: string) => Promise<unknown[]>;
|
|
692
724
|
/**
|
|
693
|
-
|
|
694
|
-
|
|
725
|
+
* @see https://redis.io/commands/incr
|
|
726
|
+
*/
|
|
695
727
|
incr: (key: string) => Promise<number>;
|
|
696
728
|
/**
|
|
697
|
-
|
|
698
|
-
|
|
729
|
+
* @see https://redis.io/commands/incrby
|
|
730
|
+
*/
|
|
699
731
|
incrby: (key: string, value: number) => Promise<number>;
|
|
700
732
|
/**
|
|
701
|
-
|
|
702
|
-
|
|
733
|
+
* @see https://redis.io/commands/incrbyfloat
|
|
734
|
+
*/
|
|
703
735
|
incrbyfloat: (key: string, value: number) => Promise<number>;
|
|
704
736
|
/**
|
|
705
|
-
|
|
706
|
-
|
|
737
|
+
* @see https://redis.io/commands/keys
|
|
738
|
+
*/
|
|
707
739
|
keys: (pattern: string) => Promise<string[]>;
|
|
708
740
|
/**
|
|
709
|
-
|
|
710
|
-
|
|
741
|
+
* @see https://redis.io/commands/lindex
|
|
742
|
+
*/
|
|
711
743
|
lindex: (key: string, index: number) => Promise<string | null>;
|
|
712
744
|
/**
|
|
713
|
-
|
|
714
|
-
|
|
745
|
+
* @see https://redis.io/commands/linsert
|
|
746
|
+
*/
|
|
715
747
|
linsert: <TData>(key: string, direction: "before" | "after", pivot: TData, value: TData) => Promise<number>;
|
|
716
748
|
/**
|
|
717
|
-
|
|
718
|
-
|
|
749
|
+
* @see https://redis.io/commands/llen
|
|
750
|
+
*/
|
|
719
751
|
llen: (key: string) => Promise<number>;
|
|
720
752
|
/**
|
|
721
|
-
|
|
722
|
-
|
|
753
|
+
* @see https://redis.io/commands/lpop
|
|
754
|
+
*/
|
|
723
755
|
lpop: <TData>(key: string) => Promise<TData | null>;
|
|
724
756
|
/**
|
|
725
|
-
|
|
726
|
-
|
|
757
|
+
* @see https://redis.io/commands/lpush
|
|
758
|
+
*/
|
|
727
759
|
lpush: <TData>(key: string, elements_0: TData, ...elements_1: TData[]) => Promise<number>;
|
|
728
760
|
/**
|
|
729
|
-
|
|
730
|
-
|
|
761
|
+
* @see https://redis.io/commands/lpushx
|
|
762
|
+
*/
|
|
731
763
|
lpushx: <TData>(key: string, elements_0: TData, ...elements_1: TData[]) => Promise<number>;
|
|
732
764
|
/**
|
|
733
|
-
|
|
734
|
-
|
|
765
|
+
* @see https://redis.io/commands/lrange
|
|
766
|
+
*/
|
|
735
767
|
lrange: <TResult = string>(key: string, start: number, end: number) => Promise<TResult[]>;
|
|
736
768
|
/**
|
|
737
|
-
|
|
738
|
-
|
|
769
|
+
* @see https://redis.io/commands/lrem
|
|
770
|
+
*/
|
|
739
771
|
lrem: <TData>(key: string, count: number, value: TData) => Promise<number>;
|
|
740
772
|
/**
|
|
741
|
-
|
|
742
|
-
|
|
773
|
+
* @see https://redis.io/commands/lset
|
|
774
|
+
*/
|
|
743
775
|
lset: <TData>(key: string, value: TData, index: number) => Promise<"OK">;
|
|
744
776
|
/**
|
|
745
|
-
|
|
746
|
-
|
|
777
|
+
* @see https://redis.io/commands/ltrim
|
|
778
|
+
*/
|
|
747
779
|
ltrim: (key: string, start: number, end: number) => Promise<"OK">;
|
|
748
780
|
/**
|
|
749
|
-
|
|
750
|
-
|
|
781
|
+
* @see https://redis.io/commands/mget
|
|
782
|
+
*/
|
|
751
783
|
mget: <TData extends unknown[]>(args_0: string, ...args_1: string[]) => Promise<TData>;
|
|
752
784
|
/**
|
|
753
|
-
|
|
754
|
-
|
|
785
|
+
* @see https://redis.io/commands/mset
|
|
786
|
+
*/
|
|
755
787
|
mset: <TData>(kv: {
|
|
756
788
|
[key: string]: TData;
|
|
757
789
|
}) => Promise<"OK">;
|
|
758
790
|
/**
|
|
759
|
-
|
|
760
|
-
|
|
791
|
+
* @see https://redis.io/commands/msetnx
|
|
792
|
+
*/
|
|
761
793
|
msetnx: <TData>(kv: {
|
|
762
794
|
[key: string]: TData;
|
|
763
795
|
}) => Promise<number>;
|
|
764
796
|
/**
|
|
765
|
-
|
|
766
|
-
|
|
797
|
+
* @see https://redis.io/commands/persist
|
|
798
|
+
*/
|
|
767
799
|
persist: (key: string) => Promise<0 | 1>;
|
|
768
800
|
/**
|
|
769
|
-
|
|
770
|
-
|
|
801
|
+
* @see https://redis.io/commands/pexpire
|
|
802
|
+
*/
|
|
771
803
|
pexpire: (key: string, milliseconds: number) => Promise<0 | 1>;
|
|
772
804
|
/**
|
|
773
|
-
|
|
774
|
-
|
|
805
|
+
* @see https://redis.io/commands/pexpireat
|
|
806
|
+
*/
|
|
775
807
|
pexpireat: (key: string, unix: number) => Promise<0 | 1>;
|
|
776
808
|
/**
|
|
777
|
-
|
|
778
|
-
|
|
809
|
+
* @see https://redis.io/commands/ping
|
|
810
|
+
*/
|
|
779
811
|
ping: (message?: string | undefined) => Promise<string>;
|
|
780
812
|
/**
|
|
781
|
-
|
|
782
|
-
|
|
813
|
+
* @see https://redis.io/commands/psetex
|
|
814
|
+
*/
|
|
783
815
|
psetex: <TData>(key: string, ttl: number, value: TData) => Promise<string>;
|
|
784
816
|
/**
|
|
785
|
-
|
|
786
|
-
|
|
817
|
+
* @see https://redis.io/commands/pttl
|
|
818
|
+
*/
|
|
787
819
|
pttl: (key: string) => Promise<number>;
|
|
788
820
|
/**
|
|
789
|
-
|
|
790
|
-
|
|
821
|
+
* @see https://redis.io/commands/publish
|
|
822
|
+
*/
|
|
791
823
|
publish: (channel: string, message: unknown) => Promise<number>;
|
|
792
824
|
/**
|
|
793
|
-
|
|
794
|
-
|
|
825
|
+
* @see https://redis.io/commands/randomkey
|
|
826
|
+
*/
|
|
795
827
|
randomkey: () => Promise<string | null>;
|
|
796
828
|
/**
|
|
797
|
-
|
|
798
|
-
|
|
829
|
+
* @see https://redis.io/commands/rename
|
|
830
|
+
*/
|
|
799
831
|
rename: (source: string, destination: string) => Promise<"OK">;
|
|
800
832
|
/**
|
|
801
|
-
|
|
802
|
-
|
|
833
|
+
* @see https://redis.io/commands/renamenx
|
|
834
|
+
*/
|
|
803
835
|
renamenx: (source: string, destination: string) => Promise<0 | 1>;
|
|
804
836
|
/**
|
|
805
|
-
|
|
806
|
-
|
|
837
|
+
* @see https://redis.io/commands/rpop
|
|
838
|
+
*/
|
|
807
839
|
rpop: <TData = string>(key: string) => Promise<TData | null>;
|
|
808
840
|
/**
|
|
809
|
-
|
|
810
|
-
|
|
841
|
+
* @see https://redis.io/commands/rpush
|
|
842
|
+
*/
|
|
811
843
|
rpush: <TData>(key: string, elements_0: TData, ...elements_1: TData[]) => Promise<number>;
|
|
812
844
|
/**
|
|
813
|
-
|
|
814
|
-
|
|
845
|
+
* @see https://redis.io/commands/rpushx
|
|
846
|
+
*/
|
|
815
847
|
rpushx: <TData>(key: string, elements_0: TData, ...elements_1: TData[]) => Promise<number>;
|
|
816
848
|
/**
|
|
817
|
-
|
|
818
|
-
|
|
849
|
+
* @see https://redis.io/commands/sadd
|
|
850
|
+
*/
|
|
819
851
|
sadd: <TData>(key: string, members_0: TData, ...members_1: TData[]) => Promise<number>;
|
|
820
852
|
/**
|
|
821
|
-
|
|
822
|
-
|
|
853
|
+
* @see https://redis.io/commands/scan
|
|
854
|
+
*/
|
|
823
855
|
scan: (cursor: number, opts?: ScanCommandOptions | undefined) => Promise<[number, string[]]>;
|
|
824
856
|
/**
|
|
825
|
-
|
|
826
|
-
|
|
857
|
+
* @see https://redis.io/commands/scard
|
|
858
|
+
*/
|
|
827
859
|
scard: (key: string) => Promise<number>;
|
|
828
860
|
/**
|
|
829
|
-
|
|
830
|
-
|
|
861
|
+
* @see https://redis.io/commands/script-exists
|
|
862
|
+
*/
|
|
863
|
+
scriptExists: (args_0: string, ...args_1: string[]) => Promise<[]>;
|
|
864
|
+
/**
|
|
865
|
+
* @see https://redis.io/commands/script-flush
|
|
866
|
+
*/
|
|
867
|
+
scriptFlush: (opts?: ScriptFlushCommandOptions | undefined) => Promise<"OK">;
|
|
868
|
+
/**
|
|
869
|
+
* @see https://redis.io/commands/script-load
|
|
870
|
+
*/
|
|
871
|
+
scriptLoad: (script: string) => Promise<string>;
|
|
872
|
+
/**
|
|
873
|
+
* @see https://redis.io/commands/sdiff
|
|
874
|
+
*/
|
|
831
875
|
sdiff: (key: string, ...keys: string[]) => Promise<unknown[]>;
|
|
832
876
|
/**
|
|
833
|
-
|
|
834
|
-
|
|
877
|
+
* @see https://redis.io/commands/sdiffstore
|
|
878
|
+
*/
|
|
835
879
|
sdiffstore: (args_0: string, args_1: string, ...args_2: string[]) => Promise<number>;
|
|
836
880
|
/**
|
|
837
|
-
|
|
838
|
-
|
|
881
|
+
* @see https://redis.io/commands/set
|
|
882
|
+
*/
|
|
839
883
|
set: <TData>(key: string, value: TData, opts?: SetCommandOptions | undefined) => Promise<TData>;
|
|
840
884
|
/**
|
|
841
|
-
|
|
842
|
-
|
|
885
|
+
* @see https://redis.io/commands/setbit
|
|
886
|
+
*/
|
|
843
887
|
setbit: (key: string, offset: number, value: 0 | 1) => Promise<0 | 1>;
|
|
844
888
|
/**
|
|
845
|
-
|
|
846
|
-
|
|
889
|
+
* @see https://redis.io/commands/setex
|
|
890
|
+
*/
|
|
847
891
|
setex: <TData>(key: string, ttl: number, value: TData) => Promise<"OK">;
|
|
848
892
|
/**
|
|
849
|
-
|
|
850
|
-
|
|
893
|
+
* @see https://redis.io/commands/setnx
|
|
894
|
+
*/
|
|
851
895
|
setnx: <TData>(key: string, value: TData) => Promise<number>;
|
|
852
896
|
/**
|
|
853
|
-
|
|
854
|
-
|
|
897
|
+
* @see https://redis.io/commands/setrange
|
|
898
|
+
*/
|
|
855
899
|
setrange: (key: string, offset: number, value: string) => Promise<number>;
|
|
856
900
|
/**
|
|
857
|
-
|
|
858
|
-
|
|
901
|
+
* @see https://redis.io/commands/sinter
|
|
902
|
+
*/
|
|
859
903
|
sinter: (key: string, ...keys: string[]) => Promise<string[]>;
|
|
860
904
|
/**
|
|
861
|
-
|
|
862
|
-
|
|
905
|
+
* @see https://redis.io/commands/sinterstore
|
|
906
|
+
*/
|
|
863
907
|
sinterstore: (destination: string, key: string, ...keys: string[]) => Promise<string[]>;
|
|
864
908
|
/**
|
|
865
|
-
|
|
866
|
-
|
|
909
|
+
* @see https://redis.io/commands/sismember
|
|
910
|
+
*/
|
|
867
911
|
sismember: <TData>(key: string, member: TData) => Promise<0 | 1>;
|
|
868
912
|
/**
|
|
869
|
-
|
|
870
|
-
|
|
913
|
+
* @see https://redis.io/commands/smembers
|
|
914
|
+
*/
|
|
871
915
|
smembers: (key: string) => Promise<string[]>;
|
|
872
916
|
/**
|
|
873
|
-
|
|
874
|
-
|
|
917
|
+
* @see https://redis.io/commands/smove
|
|
918
|
+
*/
|
|
875
919
|
smove: <TData>(source: string, destination: string, member: TData) => Promise<0 | 1>;
|
|
876
920
|
/**
|
|
877
|
-
|
|
878
|
-
|
|
921
|
+
* @see https://redis.io/commands/spop
|
|
922
|
+
*/
|
|
879
923
|
spop: <TData>(key: string, count?: number | undefined) => Promise<TData | null>;
|
|
880
924
|
/**
|
|
881
|
-
|
|
882
|
-
|
|
925
|
+
* @see https://redis.io/commands/srandmember
|
|
926
|
+
*/
|
|
883
927
|
srandmember: <TData>(key: string, count?: number | undefined) => Promise<TData | null>;
|
|
884
928
|
/**
|
|
885
|
-
|
|
886
|
-
|
|
929
|
+
* @see https://redis.io/commands/srem
|
|
930
|
+
*/
|
|
887
931
|
srem: <TData>(key: string, members_0: TData, ...members_1: TData[]) => Promise<number>;
|
|
888
932
|
/**
|
|
889
|
-
|
|
890
|
-
|
|
933
|
+
* @see https://redis.io/commands/sscan
|
|
934
|
+
*/
|
|
891
935
|
sscan: (key: string, cursor: number, opts?: ScanCommandOptions | undefined) => Promise<[number, (string | number)[]]>;
|
|
892
936
|
/**
|
|
893
|
-
|
|
894
|
-
|
|
937
|
+
* @see https://redis.io/commands/strlen
|
|
938
|
+
*/
|
|
895
939
|
strlen: (key: string) => Promise<number>;
|
|
896
940
|
/**
|
|
897
|
-
|
|
898
|
-
|
|
941
|
+
* @see https://redis.io/commands/sunion
|
|
942
|
+
*/
|
|
899
943
|
sunion: (key: string, ...keys: string[]) => Promise<unknown[]>;
|
|
900
944
|
/**
|
|
901
|
-
|
|
902
|
-
|
|
945
|
+
* @see https://redis.io/commands/sunionstore
|
|
946
|
+
*/
|
|
903
947
|
sunionstore: (destination: string, key: string, ...keys: string[]) => Promise<number>;
|
|
904
948
|
/**
|
|
905
|
-
|
|
906
|
-
|
|
949
|
+
* @see https://redis.io/commands/time
|
|
950
|
+
*/
|
|
907
951
|
time: () => Promise<[number, number]>;
|
|
908
952
|
/**
|
|
909
|
-
|
|
910
|
-
|
|
953
|
+
* @see https://redis.io/commands/touch
|
|
954
|
+
*/
|
|
911
955
|
touch: (args_0: string, ...args_1: string[]) => Promise<number>;
|
|
912
956
|
/**
|
|
913
|
-
|
|
914
|
-
|
|
957
|
+
* @see https://redis.io/commands/ttl
|
|
958
|
+
*/
|
|
915
959
|
ttl: (key: string) => Promise<number>;
|
|
916
960
|
/**
|
|
917
|
-
|
|
918
|
-
|
|
961
|
+
* @see https://redis.io/commands/type
|
|
962
|
+
*/
|
|
919
963
|
type: (key: string) => Promise<Type>;
|
|
920
964
|
/**
|
|
921
|
-
|
|
922
|
-
|
|
965
|
+
* @see https://redis.io/commands/unlink
|
|
966
|
+
*/
|
|
923
967
|
unlink: (...args: CommandArgs<typeof UnlinkCommand>) => Promise<number>;
|
|
924
968
|
/**
|
|
925
|
-
|
|
926
|
-
|
|
969
|
+
* @see https://redis.io/commands/zadd
|
|
970
|
+
*/
|
|
927
971
|
zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [string, ZAddCommandOptions | ZAddCommandOptionsWithIncr, ScoreMember<TData>, ...ScoreMember<TData>[]]) => Promise<number | null>;
|
|
928
972
|
/**
|
|
929
|
-
|
|
930
|
-
|
|
973
|
+
* @see https://redis.io/commands/zcard
|
|
974
|
+
*/
|
|
931
975
|
zcard: (key: string) => Promise<number>;
|
|
932
976
|
/**
|
|
933
|
-
|
|
934
|
-
|
|
977
|
+
* @see https://redis.io/commands/zcount
|
|
978
|
+
*/
|
|
935
979
|
zcount: (key: string, min: string | number, max: string | number) => Promise<number>;
|
|
936
980
|
/**
|
|
937
|
-
|
|
938
|
-
|
|
981
|
+
* @see https://redis.io/commands/zincrby
|
|
982
|
+
*/
|
|
939
983
|
zincrby: <TData>(key: string, increment: number, member: TData) => Promise<number>;
|
|
940
984
|
/**
|
|
941
|
-
|
|
942
|
-
|
|
985
|
+
* @see https://redis.io/commands/zinterstore
|
|
986
|
+
*/
|
|
943
987
|
zinterstore: (destination: string, numKeys: number, keys: string[], opts?: ZInterStoreCommandOptions | undefined) => Promise<number>;
|
|
944
988
|
/**
|
|
945
|
-
|
|
946
|
-
|
|
989
|
+
* @see https://redis.io/commands/zlexcount
|
|
990
|
+
*/
|
|
947
991
|
zlexcount: (key: string, min: string, max: string) => Promise<number>;
|
|
948
992
|
/**
|
|
949
|
-
|
|
950
|
-
|
|
993
|
+
* @see https://redis.io/commands/zpopmax
|
|
994
|
+
*/
|
|
951
995
|
zpopmax: <TData>(key: string, count?: number | undefined) => Promise<TData[]>;
|
|
952
996
|
/**
|
|
953
|
-
|
|
954
|
-
|
|
997
|
+
* @see https://redis.io/commands/zpopmin
|
|
998
|
+
*/
|
|
955
999
|
zpopmin: <TData>(key: string, count?: number | undefined) => Promise<TData[]>;
|
|
956
1000
|
/**
|
|
957
|
-
|
|
958
|
-
|
|
1001
|
+
* @see https://redis.io/commands/zrange
|
|
1002
|
+
*/
|
|
959
1003
|
zrange: <TData extends unknown[]>(...args: [key: string, min: number, max: number, opts?: ZRangeCommandOptions] | [
|
|
960
1004
|
key: string,
|
|
961
1005
|
min: `(${string}` | `[${string}` | "-" | "+",
|
|
@@ -972,40 +1016,40 @@ declare class Redis {
|
|
|
972
1016
|
} & ZRangeCommandOptions
|
|
973
1017
|
]) => Promise<TData>;
|
|
974
1018
|
/**
|
|
975
|
-
|
|
976
|
-
|
|
1019
|
+
* @see https://redis.io/commands/zrank
|
|
1020
|
+
*/
|
|
977
1021
|
zrank: <TData>(key: string, member: TData) => Promise<number | null>;
|
|
978
1022
|
/**
|
|
979
|
-
|
|
980
|
-
|
|
1023
|
+
* @see https://redis.io/commands/zrem
|
|
1024
|
+
*/
|
|
981
1025
|
zrem: <TData>(key: string, members_0: TData, ...members_1: TData[]) => Promise<number>;
|
|
982
1026
|
/**
|
|
983
|
-
|
|
984
|
-
|
|
1027
|
+
* @see https://redis.io/commands/zremrangebylex
|
|
1028
|
+
*/
|
|
985
1029
|
zremrangebylex: (key: string, min: string, max: string) => Promise<number>;
|
|
986
1030
|
/**
|
|
987
|
-
|
|
988
|
-
|
|
1031
|
+
* @see https://redis.io/commands/zremrangebyrank
|
|
1032
|
+
*/
|
|
989
1033
|
zremrangebyrank: (key: string, start: number, stop: number) => Promise<number>;
|
|
990
1034
|
/**
|
|
991
|
-
|
|
992
|
-
|
|
1035
|
+
* @see https://redis.io/commands/zremrangebyscore
|
|
1036
|
+
*/
|
|
993
1037
|
zremrangebyscore: (key: string, min: number, max: number) => Promise<number>;
|
|
994
1038
|
/**
|
|
995
|
-
|
|
996
|
-
|
|
1039
|
+
* @see https://redis.io/commands/zrevrank
|
|
1040
|
+
*/
|
|
997
1041
|
zrevrank: <TData>(key: string, member: TData) => Promise<number | null>;
|
|
998
1042
|
/**
|
|
999
|
-
|
|
1000
|
-
|
|
1043
|
+
* @see https://redis.io/commands/zscan
|
|
1044
|
+
*/
|
|
1001
1045
|
zscan: (key: string, cursor: number, opts?: ScanCommandOptions | undefined) => Promise<[number, (string | number)[]]>;
|
|
1002
1046
|
/**
|
|
1003
|
-
|
|
1004
|
-
|
|
1047
|
+
* @see https://redis.io/commands/zscore
|
|
1048
|
+
*/
|
|
1005
1049
|
zscore: <TData>(key: string, member: TData) => Promise<number | null>;
|
|
1006
1050
|
/**
|
|
1007
|
-
|
|
1008
|
-
|
|
1051
|
+
* @see https://redis.io/commands/zunionstore
|
|
1052
|
+
*/
|
|
1009
1053
|
zunionstore: (destination: string, numKeys: number, keys: string[], opts?: ZUnionStoreCommandOptions | undefined) => Promise<number>;
|
|
1010
1054
|
}
|
|
1011
1055
|
|