@upstash/redis 0.1.22 → 0.2.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.
Files changed (55) hide show
  1. package/README.md +13 -53
  2. package/dist/main/client.d.ts +21 -0
  3. package/dist/main/client.js +556 -0
  4. package/dist/main/index-cjs.d.ts +1 -0
  5. package/dist/main/index-cjs.js +120 -0
  6. package/dist/main/types.d.ts +177 -0
  7. package/dist/main/{src/type.js → types.js} +0 -1
  8. package/dist/module/client.d.ts +21 -0
  9. package/dist/module/client.js +551 -0
  10. package/dist/module/index.d.ts +3 -0
  11. package/dist/module/index.js +3 -0
  12. package/dist/module/types.d.ts +177 -0
  13. package/dist/module/types.js +1 -0
  14. package/package.json +16 -25
  15. package/src/client.ts +307 -921
  16. package/src/index-cjs.ts +117 -0
  17. package/src/index.ts +4 -119
  18. package/src/types.ts +408 -0
  19. package/tsconfig.json +9 -7
  20. package/tsconfig.module.json +3 -2
  21. package/dist/main/src/client.d.ts +0 -25
  22. package/dist/main/src/client.d.ts.map +0 -1
  23. package/dist/main/src/client.js +0 -748
  24. package/dist/main/src/client.js.map +0 -1
  25. package/dist/main/src/index.d.ts +0 -73
  26. package/dist/main/src/index.d.ts.map +0 -1
  27. package/dist/main/src/index.js +0 -124
  28. package/dist/main/src/index.js.map +0 -1
  29. package/dist/main/src/type.d.ts +0 -466
  30. package/dist/main/src/type.d.ts.map +0 -1
  31. package/dist/main/src/type.js.map +0 -1
  32. package/dist/main/utils/helper.d.ts +0 -5
  33. package/dist/main/utils/helper.d.ts.map +0 -1
  34. package/dist/main/utils/helper.js +0 -20
  35. package/dist/main/utils/helper.js.map +0 -1
  36. package/dist/module/src/client.d.ts +0 -25
  37. package/dist/module/src/client.d.ts.map +0 -1
  38. package/dist/module/src/client.js +0 -743
  39. package/dist/module/src/client.js.map +0 -1
  40. package/dist/module/src/index.d.ts +0 -73
  41. package/dist/module/src/index.d.ts.map +0 -1
  42. package/dist/module/src/index.js +0 -5
  43. package/dist/module/src/index.js.map +0 -1
  44. package/dist/module/src/type.d.ts +0 -466
  45. package/dist/module/src/type.d.ts.map +0 -1
  46. package/dist/module/src/type.js +0 -2
  47. package/dist/module/src/type.js.map +0 -1
  48. package/dist/module/utils/helper.d.ts +0 -5
  49. package/dist/module/utils/helper.d.ts.map +0 -1
  50. package/dist/module/utils/helper.js +0 -13
  51. package/dist/module/utils/helper.js.map +0 -1
  52. package/dist/umd/upstash-redis.js +0 -1
  53. package/src/type.ts +0 -1194
  54. package/utils/helper.ts +0 -17
  55. package/webpack.config.js +0 -34
package/src/type.ts DELETED
@@ -1,1194 +0,0 @@
1
- export type ClientObjectProps = {
2
- url?: undefined | string;
3
- token?: undefined | string;
4
- edgeUrl?: undefined | string;
5
- readFromEdge?: boolean;
6
- };
7
-
8
- export type EdgeCacheType = null | 'miss' | 'hit';
9
-
10
- export type ReturnType = {
11
- data: string | number | [] | any;
12
- error: string | null;
13
- metadata?: { edge: boolean; cache: EdgeCacheType };
14
- };
15
-
16
- export type MethodReturn = Promise<ReturnType>;
17
-
18
- export type Callback = (res: ReturnType) => any;
19
-
20
- export type RequestConfig =
21
- | false
22
- | undefined
23
- | {
24
- edge?: boolean;
25
- };
26
-
27
- export type Part = string | boolean | number;
28
-
29
- export type Bit = 0 | 1;
30
-
31
- export type Infinities = '+inf' | '-inf';
32
-
33
- export type ZSetNumber = Infinities | number | string;
34
-
35
- type Auth1 = (url?: string, token?: string) => void;
36
- type Auth2 = (options?: ClientObjectProps) => void;
37
-
38
- type AppendProps1 = (
39
- key: string,
40
- value: string,
41
- callback?: Callback
42
- ) => MethodReturn;
43
- type AppendProps0 = (key: string, value: string) => MethodReturn;
44
-
45
- type DecrProps1 = (key: string, callback?: Callback) => MethodReturn;
46
- type DecrProps0 = (key: string) => MethodReturn;
47
-
48
- type DecrByProps1 = (
49
- key: string,
50
- decrement: number,
51
- callback?: Callback
52
- ) => MethodReturn;
53
- type DecrByProps0 = (key: string, decrement: number) => MethodReturn;
54
-
55
- type GetProps2 = (
56
- key: string,
57
- config?: RequestConfig,
58
- callback?: Callback
59
- ) => MethodReturn;
60
- type GetProps1 = (key: string, callback?: Callback) => MethodReturn;
61
- type GetProps0 = (key: string) => MethodReturn;
62
-
63
- type GetRangeProps2 = (
64
- key: string,
65
- start: number,
66
- end: number,
67
- config?: RequestConfig,
68
- callback?: Callback
69
- ) => MethodReturn;
70
- type GetRangeProps1 = (
71
- key: string,
72
- start: number,
73
- end: number,
74
- callback?: Callback
75
- ) => MethodReturn;
76
- type GetRangeProps0 = (key: string, start: number, end: number) => MethodReturn;
77
-
78
- type GetSetProps1 = (
79
- key: string,
80
- value: string,
81
- callback?: Callback
82
- ) => MethodReturn;
83
- type GetSetProps0 = (key: string, value: string) => MethodReturn;
84
-
85
- type IncrProps1 = (key: string, callback?: Callback) => MethodReturn;
86
- type IncrProps0 = (key: string) => MethodReturn;
87
-
88
- type IncrByProps1 = (
89
- key: string,
90
- value: number | string,
91
- callback?: Callback
92
- ) => MethodReturn;
93
- type IncrByProps0 = (key: string, value: number | string) => MethodReturn;
94
-
95
- type IncrByFloatProps1 = (
96
- key: string,
97
- value: number | string,
98
- callback?: Callback
99
- ) => MethodReturn;
100
- type IncrByFloatProps0 = (key: string, value: number | string) => MethodReturn;
101
-
102
- type MGetProps2 = (
103
- values: string[],
104
- config?: RequestConfig,
105
- callback?: Callback
106
- ) => MethodReturn;
107
- type MGetProps1 = (values: string[], callback?: Callback) => MethodReturn;
108
- type MGetProps0 = (values: string[]) => MethodReturn;
109
-
110
- type MSetProps1 = (values: string[], callback?: Callback) => MethodReturn;
111
- type MSetProps0 = (values: string[]) => MethodReturn;
112
-
113
- type MSetNxProps1 = (values: string[], callback?: Callback) => MethodReturn;
114
- type MSetNxProps0 = (values: string[]) => MethodReturn;
115
-
116
- type PSetExProps1 = (
117
- key: string,
118
- miliseconds: number,
119
- value: string | number,
120
- callback?: Callback
121
- ) => MethodReturn;
122
- type PSetExProps0 = (
123
- key: string,
124
- miliseconds: number,
125
- value: string | number
126
- ) => MethodReturn;
127
-
128
- type SetProps1 = (
129
- key: string,
130
- value: number | string,
131
- callback?: Callback
132
- ) => MethodReturn;
133
- type SetProps0 = (key: string, value: number | string) => MethodReturn;
134
-
135
- type SetExProps1 = (
136
- key: string,
137
- seconds: number,
138
- value: string | number,
139
- callback?: Callback
140
- ) => MethodReturn;
141
- type SetExProps0 = (
142
- key: string,
143
- seconds: number,
144
- value: string | number
145
- ) => MethodReturn;
146
-
147
- type SetNxProps1 = (
148
- key: string,
149
- value: string,
150
- callback?: Callback
151
- ) => MethodReturn;
152
- type SetNxProps0 = (key: string, value: string) => MethodReturn;
153
-
154
- type SetRangeProps1 = (
155
- key: string,
156
- offset: number | string,
157
- value: string,
158
- callback?: Callback
159
- ) => MethodReturn;
160
- type SetRangeProps0 = (
161
- key: string,
162
- offset: number | string,
163
- value: string
164
- ) => MethodReturn;
165
-
166
- type StrLenProps2 = (
167
- key: string,
168
- config?: RequestConfig,
169
- callback?: Callback
170
- ) => MethodReturn;
171
- type StrLenProps1 = (key: string, callback?: Callback) => MethodReturn;
172
- type StrLenProps0 = (key: string) => MethodReturn;
173
-
174
- type BitCountProps2 = (
175
- key: string,
176
- start?: number,
177
- end?: number,
178
- config?: RequestConfig,
179
- callback?: Callback
180
- ) => MethodReturn;
181
- type BitCountProps1 = (
182
- key: string,
183
- start?: number,
184
- end?: number,
185
- callback?: Callback
186
- ) => MethodReturn;
187
- type BitCountProps0 = (
188
- key: string,
189
- start?: number,
190
- end?: number
191
- ) => MethodReturn;
192
-
193
- type BiTopProps1 = (
194
- operation: 'AND' | 'OR' | 'XOR' | 'NOT',
195
- destinationKey: string,
196
- sourceKeys: string[],
197
- callback?: Callback
198
- ) => MethodReturn;
199
- type BiTopProps0 = (
200
- operation: 'AND' | 'OR' | 'XOR' | 'NOT',
201
- destinationKey: string,
202
- sourceKeys: string[]
203
- ) => MethodReturn;
204
-
205
- type BitPosProps2 = (
206
- key: string,
207
- bit: Bit,
208
- start?: number,
209
- end?: number,
210
- config?: RequestConfig,
211
- callback?: Callback
212
- ) => MethodReturn;
213
- type BitPosProps1 = (
214
- key: string,
215
- bit: Bit,
216
- start?: number,
217
- end?: number,
218
- callback?: Callback
219
- ) => MethodReturn;
220
- type BitPosProps0 = (
221
- key: string,
222
- bit: Bit,
223
- start?: number,
224
- end?: number
225
- ) => MethodReturn;
226
-
227
- type GetBitProps2 = (
228
- key: string,
229
- offset: number,
230
- config?: RequestConfig,
231
- callback?: Callback
232
- ) => MethodReturn;
233
- type GetBitProps1 = (
234
- key: string,
235
- offset: number,
236
- callback?: Callback
237
- ) => MethodReturn;
238
- type GetBitProps0 = (key: string, offset: number) => MethodReturn;
239
-
240
- type SetBitProps1 = (
241
- key: string,
242
- offset: number,
243
- value: Bit,
244
- callback?: Callback
245
- ) => MethodReturn;
246
- type SetBitProps0 = (key: string, offset: number, value: Bit) => MethodReturn;
247
-
248
- type EchoProps2 = (
249
- value: string,
250
- config?: RequestConfig,
251
- callback?: Callback
252
- ) => MethodReturn;
253
- type EchoProps1 = (value: string, callback?: Callback) => MethodReturn;
254
- type EchoProps0 = (value: string) => MethodReturn;
255
-
256
- type PingProps2 = (
257
- value?: string,
258
- config?: RequestConfig,
259
- callback?: Callback
260
- ) => MethodReturn;
261
- type PingProps1 = (value?: string, callback?: Callback) => MethodReturn;
262
- type PingProps0 = (value?: string) => MethodReturn;
263
-
264
- type HDelProps1 = (
265
- key: string,
266
- fields: string[],
267
- callback?: Callback
268
- ) => MethodReturn;
269
- type HDelProps0 = (key: string, fields: string[]) => MethodReturn;
270
-
271
- type HExistsProps2 = (
272
- key: string,
273
- field: string,
274
- config?: RequestConfig,
275
- callback?: Callback
276
- ) => MethodReturn;
277
- type HExistsProps1 = (
278
- key: string,
279
- field: string,
280
- callback?: Callback
281
- ) => MethodReturn;
282
- type HExistsProps0 = (key: string, field: string) => MethodReturn;
283
-
284
- type HGetProps2 = (
285
- key: string,
286
- field: string,
287
- config?: RequestConfig,
288
- callback?: Callback
289
- ) => MethodReturn;
290
- type HGetProps1 = (
291
- key: string,
292
- field: string,
293
- callback?: Callback
294
- ) => MethodReturn;
295
- type HGetProps0 = (key: string, field: string) => MethodReturn;
296
-
297
- type HGetAllProps2 = (
298
- key: string,
299
- config?: RequestConfig,
300
- callback?: Callback
301
- ) => MethodReturn;
302
- type HGetAllProps1 = (key: string, callback?: Callback) => MethodReturn;
303
- type HGetAllProps0 = (key: string) => MethodReturn;
304
-
305
- type HIncrByProps1 = (
306
- key: string,
307
- field: string,
308
- increment: number | string,
309
- callback?: Callback
310
- ) => MethodReturn;
311
- type HIncrByProps0 = (
312
- key: string,
313
- field: string,
314
- increment: number | string
315
- ) => MethodReturn;
316
-
317
- type HIncrByFloatProps1 = (
318
- key: string,
319
- field: string,
320
- increment: number | string,
321
- callback?: Callback
322
- ) => MethodReturn;
323
- type HIncrByFloatProps0 = (
324
- key: string,
325
- field: string,
326
- increment: number | string
327
- ) => MethodReturn;
328
-
329
- type HKeysProps2 = (
330
- key: string,
331
- config?: RequestConfig,
332
- callback?: Callback
333
- ) => MethodReturn;
334
- type HKeysProps1 = (key: string, callback?: Callback) => MethodReturn;
335
- type HKeysProps0 = (key: string) => MethodReturn;
336
-
337
- type HLenProps2 = (
338
- key: string,
339
- config?: RequestConfig,
340
- callback?: Callback
341
- ) => MethodReturn;
342
- type HLenProps1 = (key: string, callback?: Callback) => MethodReturn;
343
- type HLenProps0 = (key: string) => MethodReturn;
344
-
345
- type HmGetProps2 = (
346
- key: string,
347
- fields: string[],
348
- config?: RequestConfig,
349
- callback?: Callback
350
- ) => MethodReturn;
351
- type HmGetProps1 = (
352
- key: string,
353
- fields: string[],
354
- callback?: Callback
355
- ) => MethodReturn;
356
- type HmGetProps0 = (key: string, fields: string[]) => MethodReturn;
357
-
358
- type HmSetProps1 = (
359
- key: string,
360
- values: string[],
361
- callback?: Callback
362
- ) => MethodReturn;
363
- type HmSetProps0 = (key: string, values: string[]) => MethodReturn;
364
-
365
- type HScanProps1 = (
366
- key: string,
367
- cursor: number,
368
- options?: { match?: number | string; count?: number | string },
369
- callback?: Callback
370
- ) => MethodReturn;
371
- type HScanProps0 = (
372
- key: string,
373
- cursor: number,
374
- options?: { match?: number | string; count?: number | string }
375
- ) => MethodReturn;
376
-
377
- type HSetProps1 = (
378
- key: string,
379
- values: string[],
380
- callback?: Callback
381
- ) => MethodReturn;
382
- type HSetProps0 = (key: string, values: string[]) => MethodReturn;
383
-
384
- type HSetNxProps1 = (
385
- key: string,
386
- field: string,
387
- value: string,
388
- callback?: Callback
389
- ) => MethodReturn;
390
- type HSetNxProps0 = (key: string, field: string, value: string) => MethodReturn;
391
-
392
- type HValsProps2 = (
393
- key: string,
394
- config?: RequestConfig,
395
- callback?: Callback
396
- ) => MethodReturn;
397
- type HValsProps1 = (key: string, callback?: Callback) => MethodReturn;
398
- type HValsProps0 = (key: string) => MethodReturn;
399
-
400
- type DelProps1 = (keys: string[], callback?: Callback) => MethodReturn;
401
- type DelProps0 = (keys: string[]) => MethodReturn;
402
-
403
- type ExistsProps2 = (
404
- keys: string[],
405
- config?: RequestConfig,
406
- callback?: Callback
407
- ) => MethodReturn;
408
- type ExistsProps1 = (keys: string[], callback?: Callback) => MethodReturn;
409
- type ExistsProps0 = (keys: string[]) => MethodReturn;
410
-
411
- type ExpireProps1 = (
412
- key: string,
413
- seconds: number,
414
- callback?: Callback
415
- ) => MethodReturn;
416
- type ExpireProps0 = (key: string, seconds: number) => MethodReturn;
417
-
418
- type ExpireAtProps1 = (
419
- key: string,
420
- timestamp: number | string,
421
- callback?: Callback
422
- ) => MethodReturn;
423
- type ExpireAtProps0 = (key: string, timestamp: number | string) => MethodReturn;
424
-
425
- type KeysProps2 = (
426
- pattern: string,
427
- config?: RequestConfig,
428
- callback?: Callback
429
- ) => MethodReturn;
430
- type KeysProps1 = (pattern: string, callback?: Callback) => MethodReturn;
431
- type KeysProps0 = (pattern: string) => MethodReturn;
432
-
433
- type PersistProps1 = (key: string, callback?: Callback) => MethodReturn;
434
- type PersistProps0 = (key: string) => MethodReturn;
435
-
436
- type PExpireProps1 = (
437
- key: string,
438
- miliseconds: number,
439
- callback?: Callback
440
- ) => MethodReturn;
441
- type PExpireProps0 = (key: string, miliseconds: number) => MethodReturn;
442
-
443
- type PTTLProps2 = (
444
- key: string,
445
- config?: RequestConfig,
446
- callback?: Callback
447
- ) => MethodReturn;
448
- type PTTLProps1 = (key: string, callback?: Callback) => MethodReturn;
449
- type PTTLProps0 = (key: string) => MethodReturn;
450
-
451
- type RandomKeyProps1 = (callback?: Callback) => MethodReturn;
452
- type RandomKeyProps0 = () => MethodReturn;
453
-
454
- type RenameProps1 = (
455
- key: string,
456
- newKey: string,
457
- callback?: Callback
458
- ) => MethodReturn;
459
- type RenameProps0 = (key: string, newKey: string) => MethodReturn;
460
-
461
- type RenameNxProps1 = (
462
- key: string,
463
- newKey: string,
464
- callback?: Callback
465
- ) => MethodReturn;
466
- type RenameNxProps0 = (key: string, newKey: string) => MethodReturn;
467
-
468
- type ScanProps1 = (
469
- cursor: number,
470
- opitons?: { match?: number | string; count?: number | string },
471
- callback?: Callback
472
- ) => MethodReturn;
473
- type ScanProps0 = (
474
- cursor: number,
475
- opitons?: { match?: number | string; count?: number | string }
476
- ) => MethodReturn;
477
-
478
- type TouchProps1 = (keys: string[], callback?: Callback) => MethodReturn;
479
- type TouchProps0 = (keys: string[]) => MethodReturn;
480
-
481
- type TTLProps2 = (
482
- key: string,
483
- config?: RequestConfig,
484
- callback?: Callback
485
- ) => MethodReturn;
486
- type TTLProps1 = (key: string, callback?: Callback) => MethodReturn;
487
- type TTLProps0 = (key: string) => MethodReturn;
488
-
489
- type TypeProps2 = (
490
- key: string,
491
- config?: RequestConfig,
492
- callback?: Callback
493
- ) => MethodReturn;
494
- type TypeProps1 = (key: string, callback?: Callback) => MethodReturn;
495
- type TypeProps0 = (key: string) => MethodReturn;
496
-
497
- type UnlinkProps1 = (keys: string[], callback?: Callback) => MethodReturn;
498
- type UnlinkProps0 = (keys: string[]) => MethodReturn;
499
-
500
- type LIndexProps2 = (
501
- key: string,
502
- index: number,
503
- config?: RequestConfig,
504
- callback?: Callback
505
- ) => MethodReturn;
506
- type LIndexProps1 = (
507
- key: string,
508
- index: number,
509
- callback?: Callback
510
- ) => MethodReturn;
511
- type LIndexProps0 = (key: string, index: number) => MethodReturn;
512
-
513
- type LInsertProps1 = (
514
- key: string,
515
- option: 'BEFORE' | 'AFTER',
516
- pivot: string,
517
- element: string,
518
- callback?: Callback
519
- ) => MethodReturn;
520
- type LInsertProps0 = (
521
- key: string,
522
- option: 'BEFORE' | 'AFTER',
523
- pivot: string,
524
- element: string
525
- ) => MethodReturn;
526
-
527
- type LLenProps2 = (
528
- key: string,
529
- config?: RequestConfig,
530
- callback?: Callback
531
- ) => MethodReturn;
532
- type LLenProps1 = (key: string, callback?: Callback) => MethodReturn;
533
- type LLenProps0 = (key: string) => MethodReturn;
534
-
535
- type LPopProps1 = (key: string, callback?: Callback) => MethodReturn;
536
- type LPopProps0 = (key: string) => MethodReturn;
537
-
538
- type LPushProps1 = (
539
- key: string,
540
- elements: string[],
541
- callback?: Callback
542
- ) => MethodReturn;
543
- type LPushProps0 = (key: string, elements: string[]) => MethodReturn;
544
-
545
- type LRangeProps2 = (
546
- key: string,
547
- start: number,
548
- stop: number,
549
- config?: RequestConfig,
550
- callback?: Callback
551
- ) => MethodReturn;
552
- type LRangeProps1 = (
553
- key: string,
554
- start: number,
555
- stop: number,
556
- callback?: Callback
557
- ) => MethodReturn;
558
- type LRangeProps0 = (key: string, start: number, stop: number) => MethodReturn;
559
-
560
- type LRemProps1 = (
561
- key: string,
562
- count: number,
563
- element: string,
564
- callback?: Callback
565
- ) => MethodReturn;
566
- type LRemProps0 = (key: string, count: number, element: string) => MethodReturn;
567
-
568
- type LSetProps1 = (
569
- key: string,
570
- index: number,
571
- element: string,
572
- callback?: Callback
573
- ) => MethodReturn;
574
- type LSetProps0 = (key: string, index: number, element: string) => MethodReturn;
575
-
576
- type LTrimProps1 = (
577
- key: string,
578
- start: number,
579
- stop: number,
580
- callback?: Callback
581
- ) => MethodReturn;
582
- type LTrimProps0 = (key: string, start: number, stop: number) => MethodReturn;
583
-
584
- type RPopProps1 = (key: string, callback?: Callback) => MethodReturn;
585
- type RPopProps0 = (key: string) => MethodReturn;
586
-
587
- type RPopLPushProps1 = (
588
- source: string,
589
- destination: string,
590
- callback?: Callback
591
- ) => MethodReturn;
592
- type RPopLPushProps0 = (source: string, destination: string) => MethodReturn;
593
-
594
- type RPushProps1 = (
595
- key: string,
596
- elements: string[],
597
- callback?: Callback
598
- ) => MethodReturn;
599
- type RPushProps0 = (key: string, elements: string[]) => MethodReturn;
600
-
601
- type DBSizeProps2 = (
602
- config?: RequestConfig,
603
- callback?: Callback
604
- ) => MethodReturn;
605
- type DBSizeProps1 = (callback?: Callback) => MethodReturn;
606
- type DBSizeProps0 = () => MethodReturn;
607
-
608
- type FlushAllProps1 = (mode?: 'ASYNC', callback?: Callback) => MethodReturn;
609
- type FlushAllProps0 = (mode?: 'ASYNC') => MethodReturn;
610
-
611
- type InfoProps2 = (config?: RequestConfig, callback?: Callback) => MethodReturn;
612
- type InfoProps1 = (callback?: Callback) => MethodReturn;
613
- type InfoProps0 = () => MethodReturn;
614
-
615
- type TimeProps1 = (callback?: Callback) => MethodReturn;
616
- type TimeProps0 = () => MethodReturn;
617
-
618
- type SAddProps1 = (
619
- key: string,
620
- members: string[],
621
- callback?: Callback
622
- ) => MethodReturn;
623
- type SAddProps0 = (key: string, members: string[]) => MethodReturn;
624
-
625
- type SCardProps1 = (key: string, callback?: Callback) => MethodReturn;
626
- type SCardProps0 = (key: string) => MethodReturn;
627
-
628
- type SDiffProps2 = (
629
- keys: string[],
630
- config?: RequestConfig,
631
- callback?: Callback
632
- ) => MethodReturn;
633
- type SDiffProps1 = (keys: string[], callback?: Callback) => MethodReturn;
634
- type SDiffProps0 = (keys: string[]) => MethodReturn;
635
-
636
- type SDiffStoreProps1 = (
637
- destination: string,
638
- keys: string[],
639
- callback?: Callback
640
- ) => MethodReturn;
641
- type SDiffStoreProps0 = (destination: string, keys: string[]) => MethodReturn;
642
-
643
- type SInterProps2 = (
644
- keys: string[],
645
- config?: RequestConfig,
646
- callback?: Callback
647
- ) => MethodReturn;
648
- type SInterProps1 = (keys: string[], callback?: Callback) => MethodReturn;
649
- type SInterProps0 = (keys: string[]) => MethodReturn;
650
-
651
- type SInterStoreProps1 = (
652
- destination: string,
653
- keys: string[],
654
- callback?: Callback
655
- ) => MethodReturn;
656
- type SInterStoreProps0 = (destination: string, keys: string[]) => MethodReturn;
657
-
658
- type SIsMemberProps2 = (
659
- key: string,
660
- member: string,
661
- config?: RequestConfig,
662
- callback?: Callback
663
- ) => MethodReturn;
664
- type SIsMemberProps1 = (
665
- key: string,
666
- member: string,
667
- callback?: Callback
668
- ) => MethodReturn;
669
- type SIsMemberProps0 = (key: string, member: string) => MethodReturn;
670
-
671
- type SMembersProps2 = (
672
- key: string,
673
- config?: RequestConfig,
674
- callback?: Callback
675
- ) => MethodReturn;
676
- type SMembersProps1 = (key: string, callback?: Callback) => MethodReturn;
677
- type SMembersProps0 = (key: string) => MethodReturn;
678
-
679
- type SMoveProps1 = (
680
- source: string,
681
- destination: string,
682
- member: string,
683
- callback?: Callback
684
- ) => MethodReturn;
685
- type SMoveProps0 = (
686
- source: string,
687
- destination: string,
688
- member: string
689
- ) => MethodReturn;
690
-
691
- type SPopProps1 = (
692
- key: string,
693
- count?: number,
694
- callback?: Callback
695
- ) => MethodReturn;
696
- type SPopProps0 = (key: string, count?: number) => MethodReturn;
697
-
698
- type SRandMemberProps2 = (
699
- key: string,
700
- count?: number,
701
- config?: RequestConfig,
702
- callback?: Callback
703
- ) => MethodReturn;
704
- type SRandMemberProps1 = (
705
- key: string,
706
- count?: number,
707
- callback?: Callback
708
- ) => MethodReturn;
709
- type SRandMemberProps0 = (key: string, count?: number) => MethodReturn;
710
-
711
- type SRemProps1 = (
712
- key: string,
713
- members: string[],
714
- callback?: Callback
715
- ) => MethodReturn;
716
- type SRemProps0 = (key: string, members: string[]) => MethodReturn;
717
-
718
- type SUnionProps2 = (
719
- keys: string[],
720
- config?: RequestConfig,
721
- callback?: Callback
722
- ) => MethodReturn;
723
- type SUnionProps1 = (keys: string[], callback?: Callback) => MethodReturn;
724
- type SUnionProps0 = (keys: string[]) => MethodReturn;
725
-
726
- type SUnionStoreProps1 = (
727
- destination: string,
728
- keys: string[],
729
- callback?: Callback
730
- ) => MethodReturn;
731
- type SUnionStoreProps0 = (destination: string, keys: string[]) => MethodReturn;
732
-
733
- type ZAddProps1 = (
734
- key: string,
735
- values: ZSetNumber[],
736
- options?: ({ xx?: boolean } | { nx?: boolean }) & {
737
- ch?: boolean;
738
- incr: boolean;
739
- },
740
- callback?: Callback
741
- ) => MethodReturn;
742
- type ZAddProps0 = (
743
- key: string,
744
- values: ZSetNumber[],
745
- options?: ({ xx?: boolean } | { nx?: boolean }) & {
746
- ch?: boolean;
747
- incr: boolean;
748
- }
749
- ) => MethodReturn;
750
-
751
- type ZCardProps2 = (
752
- key: string,
753
- config?: RequestConfig,
754
- callback?: Callback
755
- ) => MethodReturn;
756
- type ZCardProps1 = (key: string, callback?: Callback) => MethodReturn;
757
- type ZCardProps0 = (key: string) => MethodReturn;
758
-
759
- type ZCountProps2 = (
760
- key: string,
761
- min: ZSetNumber,
762
- max: ZSetNumber,
763
- config?: RequestConfig,
764
- callback?: Callback
765
- ) => MethodReturn;
766
- type ZCountProps1 = (
767
- key: string,
768
- min: ZSetNumber,
769
- max: ZSetNumber,
770
- callback?: Callback
771
- ) => MethodReturn;
772
- type ZCountProps0 = (
773
- key: string,
774
- min: ZSetNumber,
775
- max: ZSetNumber
776
- ) => MethodReturn;
777
-
778
- type ZIncrByProps1 = (
779
- key: string,
780
- increment: number | string,
781
- member: string,
782
- callback?: Callback
783
- ) => MethodReturn;
784
- type ZIncrByProps0 = (
785
- key: string,
786
- increment: number | string,
787
- member: string
788
- ) => MethodReturn;
789
-
790
- type ZInterStoreProps1 = (
791
- destination: string,
792
- keys: string[],
793
- options?: { weights?: number[]; aggregate?: 'MIN' | 'MAX' | 'SUM' },
794
- callback?: Callback
795
- ) => MethodReturn;
796
- type ZInterStoreProps0 = (
797
- destination: string,
798
- keys: string[],
799
- options?: { weights?: number[]; aggregate?: 'MIN' | 'MAX' | 'SUM' }
800
- ) => MethodReturn;
801
-
802
- type ZLexCountProps2 = (
803
- key: string,
804
- min: ZSetNumber,
805
- max: ZSetNumber,
806
- config?: RequestConfig,
807
- callback?: Callback
808
- ) => MethodReturn;
809
- type ZLexCountProps1 = (
810
- key: string,
811
- min: ZSetNumber,
812
- max: ZSetNumber,
813
- callback?: Callback
814
- ) => MethodReturn;
815
- type ZLexCountProps0 = (
816
- key: string,
817
- min: ZSetNumber,
818
- max: ZSetNumber
819
- ) => MethodReturn;
820
-
821
- type ZPopMaxProps1 = (
822
- key: string,
823
- count?: number,
824
- callback?: Callback
825
- ) => MethodReturn;
826
- type ZPopMaxProps0 = (key: string, count?: number) => MethodReturn;
827
-
828
- type ZRangeProps2 = (
829
- key: string,
830
- min: ZSetNumber,
831
- max: ZSetNumber,
832
- options?: { withScores: boolean },
833
- config?: RequestConfig,
834
- callback?: Callback
835
- ) => MethodReturn;
836
- type ZRangeProps1 = (
837
- key: string,
838
- min: ZSetNumber,
839
- max: ZSetNumber,
840
- options?: { withScores: boolean },
841
- callback?: Callback
842
- ) => MethodReturn;
843
- type ZRangeProps0 = (
844
- key: string,
845
- min: ZSetNumber,
846
- max: ZSetNumber,
847
- options?: { withScores: boolean }
848
- ) => MethodReturn;
849
-
850
- type ZRangeByLexProps2 = (
851
- key: string,
852
- min: ZSetNumber,
853
- max: ZSetNumber,
854
- offset?: number,
855
- count?: number,
856
- config?: RequestConfig,
857
- callback?: Callback
858
- ) => MethodReturn;
859
- type ZRangeByLexProps1 = (
860
- key: string,
861
- min: ZSetNumber,
862
- max: ZSetNumber,
863
- offset?: number,
864
- count?: number,
865
- callback?: Callback
866
- ) => MethodReturn;
867
- type ZRangeByLexProps0 = (
868
- key: string,
869
- min: ZSetNumber,
870
- max: ZSetNumber,
871
- offset?: number,
872
- count?: number
873
- ) => MethodReturn;
874
-
875
- type ZRangeByScoreProps2 = (
876
- key: string,
877
- min: ZSetNumber,
878
- max: ZSetNumber,
879
- options?: {
880
- withScores?: boolean;
881
- limit?: { offset: number; count: number };
882
- },
883
- config?: RequestConfig,
884
- callback?: Callback
885
- ) => MethodReturn;
886
- type ZRangeByScoreProps1 = (
887
- key: string,
888
- min: ZSetNumber,
889
- max: ZSetNumber,
890
- options?: {
891
- withScores?: boolean;
892
- limit?: { offset: number; count: number };
893
- },
894
- callback?: Callback
895
- ) => MethodReturn;
896
- type ZRangeByScoreProps0 = (
897
- key: string,
898
- min: ZSetNumber,
899
- max: ZSetNumber,
900
- options?: {
901
- withScores?: boolean;
902
- limit?: { offset: number; count: number };
903
- }
904
- ) => MethodReturn;
905
-
906
- type ZRankProps2 = (
907
- key: string,
908
- member: string,
909
- config?: RequestConfig,
910
- callback?: Callback
911
- ) => MethodReturn;
912
- type ZRankProps1 = (
913
- key: string,
914
- member: string,
915
- callback?: Callback
916
- ) => MethodReturn;
917
- type ZRankProps0 = (key: string, member: string) => MethodReturn;
918
-
919
- type ZRemProps1 = (
920
- key: string,
921
- members: string[],
922
- callback?: Callback
923
- ) => MethodReturn;
924
- type ZRemProps0 = (key: string, members: string[]) => MethodReturn;
925
-
926
- type ZRemRangeByLexProps1 = (
927
- key: string,
928
- min: ZSetNumber,
929
- max: ZSetNumber,
930
- callback?: Callback
931
- ) => MethodReturn;
932
- type ZRemRangeByLexProps0 = (
933
- key: string,
934
- min: ZSetNumber,
935
- max: ZSetNumber
936
- ) => MethodReturn;
937
-
938
- type ZRemRangeByRankProps1 = (
939
- key: string,
940
- start: number,
941
- stop: number,
942
- callback?: Callback
943
- ) => MethodReturn;
944
- type ZRemRangeByRankProps0 = (
945
- key: string,
946
- start: number,
947
- stop: number
948
- ) => MethodReturn;
949
-
950
- type ZRemRangeByScoreProps1 = (
951
- key: string,
952
- min: ZSetNumber,
953
- max: ZSetNumber,
954
- callback?: Callback
955
- ) => MethodReturn;
956
- type ZRemRangeByScoreProps0 = (
957
- key: string,
958
- min: ZSetNumber,
959
- max: ZSetNumber
960
- ) => MethodReturn;
961
-
962
- type ZRevRangeProps2 = (
963
- key: string,
964
- start: number,
965
- stop: number,
966
- options?: { withScores: boolean },
967
- config?: RequestConfig,
968
- callback?: Callback
969
- ) => MethodReturn;
970
- type ZRevRangeProps1 = (
971
- key: string,
972
- start: number,
973
- stop: number,
974
- options?: { withScores: boolean },
975
- callback?: Callback
976
- ) => MethodReturn;
977
- type ZRevRangeProps0 = (
978
- key: string,
979
- start: number,
980
- stop: number,
981
- options?: { withScores: boolean }
982
- ) => MethodReturn;
983
-
984
- type ZRevRangeByLexProps2 = (
985
- key: string,
986
- max: ZSetNumber,
987
- min: ZSetNumber,
988
- offset?: number,
989
- count?: number,
990
- config?: RequestConfig,
991
- callback?: Callback
992
- ) => MethodReturn;
993
- type ZRevRangeByLexProps1 = (
994
- key: string,
995
- max: ZSetNumber,
996
- min: ZSetNumber,
997
- offset?: number,
998
- count?: number,
999
- callback?: Callback
1000
- ) => MethodReturn;
1001
- type ZRevRangeByLexProps0 = (
1002
- key: string,
1003
- max: ZSetNumber,
1004
- min: ZSetNumber,
1005
- offset?: number,
1006
- count?: number
1007
- ) => MethodReturn;
1008
-
1009
- type ZRevRangeByScoreProps2 = (
1010
- key: string,
1011
- min: ZSetNumber,
1012
- max: ZSetNumber,
1013
- config?: RequestConfig,
1014
- callback?: Callback
1015
- ) => MethodReturn;
1016
- type ZRevRangeByScoreProps1 = (
1017
- key: string,
1018
- min: ZSetNumber,
1019
- max: ZSetNumber,
1020
- callback?: Callback
1021
- ) => MethodReturn;
1022
- type ZRevRangeByScoreProps0 = (
1023
- key: string,
1024
- min: ZSetNumber,
1025
- max: ZSetNumber
1026
- ) => MethodReturn;
1027
-
1028
- type ZRevRankProps2 = (
1029
- key: string,
1030
- member: string,
1031
- config?: RequestConfig,
1032
- callback?: Callback
1033
- ) => MethodReturn;
1034
- type ZRevRankProps1 = (
1035
- key: string,
1036
- member: string,
1037
- callback?: Callback
1038
- ) => MethodReturn;
1039
- type ZRevRankProps0 = (key: string, member: string) => MethodReturn;
1040
-
1041
- type ZScoreProps2 = (
1042
- key: string,
1043
- member: string,
1044
- config?: RequestConfig,
1045
- callback?: Callback
1046
- ) => MethodReturn;
1047
- type ZScoreProps1 = (
1048
- key: string,
1049
- member: string,
1050
- callback?: Callback
1051
- ) => MethodReturn;
1052
- type ZScoreProps0 = (key: string, member: string) => MethodReturn;
1053
-
1054
- type ZUnionStoreProps1 = (
1055
- destination: string,
1056
- keys: string[],
1057
- options?: { weights?: number[]; aggregate?: 'MIN' | 'MAX' | 'SUM' },
1058
- callback?: Callback
1059
- ) => MethodReturn;
1060
- type ZUnionStoreProps0 = (
1061
- destination: string,
1062
- keys: string[],
1063
- options?: { weights?: number[]; aggregate?: 'MIN' | 'MAX' | 'SUM' }
1064
- ) => MethodReturn;
1065
-
1066
- export type Upstash = {
1067
- auth: Auth1 & Auth2;
1068
- //
1069
- append: AppendProps0 & AppendProps1;
1070
- decr: DecrProps0 & DecrProps1;
1071
- decrby: DecrByProps0 & DecrByProps1;
1072
- get: GetProps0 & GetProps2 & GetProps1;
1073
- getrange: GetRangeProps0 & GetRangeProps1 & GetRangeProps2;
1074
- getset: GetSetProps0 & GetSetProps1;
1075
- incr: IncrProps0 & IncrProps1;
1076
- incrby: IncrByProps0 & IncrByProps1;
1077
- incrbyfloat: IncrByFloatProps0 & IncrByFloatProps1;
1078
- mget: MGetProps0 & MGetProps1 & MGetProps2;
1079
- mset: MSetProps0 & MSetProps1;
1080
- msetnx: MSetNxProps0 & MSetNxProps1;
1081
- psetex: PSetExProps0 & PSetExProps1;
1082
- set: SetProps0 & SetProps1;
1083
- setex: SetExProps0 & SetExProps1;
1084
- setnx: SetNxProps0 & SetNxProps1;
1085
- setrange: SetRangeProps0 & SetRangeProps1;
1086
- strlen: StrLenProps0 & StrLenProps1 & StrLenProps2;
1087
- //
1088
- bitcount: BitCountProps0 & BitCountProps1 & BitCountProps2;
1089
- bitop: BiTopProps0 & BiTopProps1;
1090
- bitpos: BitPosProps0 & BitPosProps1 & BitPosProps2;
1091
- getbit: GetBitProps0 & GetBitProps1 & GetBitProps2;
1092
- setbit: SetBitProps0 & SetBitProps1;
1093
- //
1094
- echo: EchoProps0 & EchoProps1 & EchoProps2;
1095
- ping: PingProps0 & PingProps1 & PingProps2;
1096
- //
1097
- hdel: HDelProps0 & HDelProps1;
1098
- hexists: HExistsProps0 & HExistsProps1 & HExistsProps2;
1099
- hget: HGetProps0 & HGetProps1 & HGetProps2;
1100
- hgetall: HGetAllProps0 & HGetAllProps1 & HGetAllProps2;
1101
- hincrby: HIncrByProps0 & HIncrByProps1;
1102
- hincrbyfloat: HIncrByFloatProps0 & HIncrByFloatProps1;
1103
- hkeys: HKeysProps0 & HKeysProps1 & HKeysProps2;
1104
- hlen: HLenProps0 & HLenProps1 & HLenProps2;
1105
- hmget: HmGetProps0 & HmGetProps1 & HmGetProps2;
1106
- hmset: HmSetProps0 & HmSetProps1;
1107
- hscan: HScanProps0 & HScanProps1;
1108
- hset: HSetProps0 & HSetProps1;
1109
- hsetnx: HSetNxProps0 & HSetNxProps1;
1110
- hvals: HValsProps0 & HValsProps1 & HValsProps2;
1111
- //
1112
- del: DelProps0 & DelProps1;
1113
- exists: ExistsProps0 & ExistsProps1 & ExistsProps2;
1114
- expire: ExpireProps0 & ExpireProps1;
1115
- expireat: ExpireAtProps0 & ExpireAtProps1;
1116
- keys: KeysProps0 & KeysProps1 & KeysProps2;
1117
- persist: PersistProps0 & PersistProps1;
1118
- pexpire: PExpireProps0 & PExpireProps1;
1119
- pexpireat: PExpireProps0 & PExpireProps1;
1120
- pttl: PTTLProps0 & PTTLProps1 & PTTLProps2;
1121
- randomkey: RandomKeyProps0 & RandomKeyProps1;
1122
- rename: RenameProps0 & RenameProps1;
1123
- renamenx: RenameNxProps0 & RenameNxProps1;
1124
- scan: ScanProps0 & ScanProps1;
1125
- touch: TouchProps0 & TouchProps1;
1126
- ttl: TTLProps0 & TTLProps1 & TTLProps2;
1127
- type: TypeProps0 & TypeProps1 & TypeProps2;
1128
- unlink: UnlinkProps0 & UnlinkProps1;
1129
- //
1130
- lindex: LIndexProps0 & LIndexProps1 & LIndexProps2;
1131
- linsert: LInsertProps0 & LInsertProps1;
1132
- llen: LLenProps0 & LLenProps1 & LLenProps2;
1133
- lpop: LPopProps0 & LPopProps1;
1134
- lpush: LPushProps0 & LPushProps1;
1135
- lpushx: LPushProps0 & LPushProps1;
1136
- lrange: LRangeProps0 & LRangeProps1 & LRangeProps2;
1137
- lrem: LRemProps0 & LRemProps1;
1138
- lset: LSetProps0 & LSetProps1;
1139
- ltrim: LTrimProps0 & LTrimProps1;
1140
- rpop: RPopProps0 & RPopProps1;
1141
- rpoplpush: RPopLPushProps0 & RPopLPushProps1;
1142
- rpush: RPushProps0 & RPushProps1;
1143
- rpushx: RPushProps0 & RPushProps1;
1144
- //
1145
- dbsize: DBSizeProps0 & DBSizeProps1 & DBSizeProps2;
1146
- flushall: FlushAllProps0 & FlushAllProps1;
1147
- flushdb: FlushAllProps0 & FlushAllProps1;
1148
- info: InfoProps0 & InfoProps1 & InfoProps2;
1149
- time: TimeProps0 & TimeProps1;
1150
- //
1151
- sadd: SAddProps0 & SAddProps1;
1152
- scard: SCardProps0 & SCardProps1;
1153
- sdiff: SDiffProps0 & SDiffProps1 & SDiffProps2;
1154
- sdiffstore: SDiffStoreProps0 & SDiffStoreProps1;
1155
- sinter: SInterProps0 & SInterProps1 & SInterProps2;
1156
- sinterstore: SInterStoreProps0 & SInterStoreProps1;
1157
- sismember: SIsMemberProps0 & SIsMemberProps1 & SIsMemberProps2;
1158
- smembers: SMembersProps0 & SMembersProps1 & SMembersProps2;
1159
- smove: SMoveProps0 & SMoveProps1;
1160
- spop: SPopProps0 & SPopProps1;
1161
- srandmember: SRandMemberProps0 & SRandMemberProps1 & SRandMemberProps2;
1162
- srem: SRemProps0 & SRemProps1;
1163
- sunion: SUnionProps0 & SUnionProps2 & SUnionProps1;
1164
- sunionstore: SUnionStoreProps0 & SUnionStoreProps1;
1165
- //
1166
- zadd: ZAddProps0 & ZAddProps1;
1167
- zcard: ZCardProps0 & ZCardProps1 & ZCardProps2;
1168
- zcount: ZCountProps0 & ZCountProps1 & ZCountProps2;
1169
- zincrby: ZIncrByProps0 & ZIncrByProps1;
1170
- zinterstore: ZInterStoreProps0 & ZInterStoreProps1;
1171
- zlexcount: ZLexCountProps0 & ZLexCountProps1 & ZLexCountProps2;
1172
- zpopmax: ZPopMaxProps0 & ZPopMaxProps1;
1173
- zpopmin: ZPopMaxProps0 & ZPopMaxProps1;
1174
- zrange: ZRangeProps0 & ZRangeProps1 & ZRangeProps2;
1175
- zrangebylex: ZRangeByLexProps0 & ZRangeByLexProps1 & ZRangeByLexProps2;
1176
- zrangebyscore: ZRangeByScoreProps0 &
1177
- ZRangeByScoreProps1 &
1178
- ZRangeByScoreProps2;
1179
- zrank: ZRankProps0 & ZRankProps1 & ZRankProps2;
1180
- zrem: ZRemProps0 & ZRemProps1;
1181
- zremrangebylex: ZRemRangeByLexProps0 & ZRemRangeByLexProps1;
1182
- zremrangebyrank: ZRemRangeByRankProps0 & ZRemRangeByRankProps1;
1183
- zremrangebyscore: ZRemRangeByScoreProps0 & ZRemRangeByScoreProps1;
1184
- zrevrange: ZRevRangeProps0 & ZRevRangeProps1 & ZRevRangeProps2;
1185
- zrevrangebylex: ZRevRangeByLexProps0 &
1186
- ZRevRangeByLexProps1 &
1187
- ZRevRangeByLexProps2;
1188
- zrevrangebyscore: ZRevRangeByScoreProps0 &
1189
- ZRevRangeByScoreProps1 &
1190
- ZRevRangeByScoreProps2;
1191
- zrevrank: ZRevRankProps0 & ZRevRankProps1 & ZRevRankProps2;
1192
- zscore: ZScoreProps0 & ZScoreProps1 & ZScoreProps2;
1193
- zunionstore: ZUnionStoreProps0 & ZUnionStoreProps1;
1194
- };