@upstash/redis 0.1.2 → 0.1.6

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 (41) hide show
  1. package/README.md +35 -16
  2. package/dist/main/{src/client.d.ts → client.d.ts} +7 -8
  3. package/dist/main/client.js +613 -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 +139 -0
  7. package/dist/main/{src/type.js → types.js} +0 -1
  8. package/dist/module/client.d.ts +24 -0
  9. package/dist/module/client.js +608 -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 +139 -0
  13. package/dist/module/types.js +1 -0
  14. package/package.json +16 -25
  15. package/src/client.ts +704 -0
  16. package/src/index-cjs.ts +117 -0
  17. package/src/index.ts +118 -0
  18. package/src/types.ts +153 -0
  19. package/tsconfig.json +9 -7
  20. package/tsconfig.module.json +3 -2
  21. package/dist/main/src/client.d.ts.map +0 -1
  22. package/dist/main/src/client.js +0 -715
  23. package/dist/main/src/client.js.map +0 -1
  24. package/dist/main/src/index.d.ts +0 -73
  25. package/dist/main/src/index.d.ts.map +0 -1
  26. package/dist/main/src/index.js +0 -124
  27. package/dist/main/src/index.js.map +0 -1
  28. package/dist/main/src/type.d.ts +0 -461
  29. package/dist/main/src/type.d.ts.map +0 -1
  30. package/dist/main/src/type.js.map +0 -1
  31. package/dist/main/utils/helper.d.ts +0 -5
  32. package/dist/main/utils/helper.d.ts.map +0 -1
  33. package/dist/main/utils/helper.js +0 -20
  34. package/dist/main/utils/helper.js.map +0 -1
  35. package/dist/module/utils/helper.d.ts +0 -5
  36. package/dist/module/utils/helper.d.ts.map +0 -1
  37. package/dist/module/utils/helper.js +0 -13
  38. package/dist/module/utils/helper.js.map +0 -1
  39. package/dist/umd/upstash-redis.js +0 -1
  40. package/utils/helper.ts +0 -17
  41. package/webpack.config.js +0 -34
package/src/client.ts ADDED
@@ -0,0 +1,704 @@
1
+ import fetch from 'isomorphic-unfetch';
2
+ import {
3
+ ClientObjectProps,
4
+ EdgeCacheType,
5
+ MethodReturn,
6
+ Part,
7
+ RequestConfig,
8
+ ReturnType,
9
+ Upstash,
10
+ } from './types';
11
+
12
+ /**
13
+ * Parse Options
14
+ */
15
+ function parseOptions(
16
+ url?: string | ClientObjectProps,
17
+ token?: string,
18
+ edgeUrl?: string,
19
+ readFromEdge?: boolean,
20
+ requestOptions: undefined | RequestInit = {}
21
+ ): ClientObjectProps {
22
+ if (typeof url === 'object' && url !== null) {
23
+ return parseOptions(
24
+ url.url,
25
+ url.token,
26
+ url.edgeUrl,
27
+ url.readFromEdge,
28
+ url.requestOptions
29
+ );
30
+ }
31
+
32
+ // try auto fill from env variables
33
+ if (!url && typeof window === 'undefined') {
34
+ url = process.env.UPSTASH_REDIS_REST_URL;
35
+ token = process.env.UPSTASH_REDIS_REST_TOKEN;
36
+ edgeUrl = process.env.UPSTASH_REDIS_EDGE_URL;
37
+ }
38
+
39
+ readFromEdge = edgeUrl ? readFromEdge ?? true : false;
40
+
41
+ return edgeUrl
42
+ ? { url: url as string, token, edgeUrl, readFromEdge, requestOptions }
43
+ : { url: url as string, token, requestOptions };
44
+ }
45
+
46
+ /**
47
+ * Fetch
48
+ */
49
+ async function fetchData(
50
+ url: string,
51
+ options: ClientObjectProps,
52
+ init: RequestInit
53
+ ): Promise<ReturnType> {
54
+ try {
55
+ const res = await fetch(url, {
56
+ ...init,
57
+ headers: {
58
+ Authorization: `Bearer ${options.token}`,
59
+ ...init.headers,
60
+ ...options.requestOptions?.headers,
61
+ },
62
+ ...options.requestOptions,
63
+ });
64
+
65
+ const data = await res.json();
66
+
67
+ if (!res.ok) {
68
+ if (data.error) throw data.error;
69
+ throw `Upstash failed with (${res.status}): ${JSON.stringify(
70
+ data,
71
+ null,
72
+ 2
73
+ )}`;
74
+ }
75
+
76
+ let edge = false;
77
+ let cache: EdgeCacheType = null;
78
+
79
+ switch (res.headers.get('x-cache')) {
80
+ case 'Hit from cloudfront':
81
+ edge = true;
82
+ cache = 'hit';
83
+ break;
84
+ case 'Miss from cloudfront':
85
+ edge = true;
86
+ cache = 'miss';
87
+ break;
88
+ }
89
+
90
+ return {
91
+ data: data.result,
92
+ error: null,
93
+ metadata: { edge, cache },
94
+ };
95
+ } catch (err) {
96
+ return {
97
+ data: null,
98
+ // @ts-ignore
99
+ error: err,
100
+ metadata: { edge: false, cache: null },
101
+ };
102
+ }
103
+ }
104
+
105
+ /**
106
+ * Request
107
+ */
108
+ function request(
109
+ options: ClientObjectProps,
110
+ config: RequestConfig,
111
+ ...parts: Part[]
112
+ ): MethodReturn {
113
+ if (!options.url) {
114
+ throw 'Database url not found?';
115
+ }
116
+
117
+ if (!options.edgeUrl) {
118
+ if (options.readFromEdge || config?.edge) {
119
+ throw 'You need to set Edge Url to read from edge.';
120
+ }
121
+ }
122
+
123
+ let fromEdge = !!options.edgeUrl && options.readFromEdge !== false;
124
+
125
+ if (config === undefined) {
126
+ fromEdge = false;
127
+ } else if (options.edgeUrl) {
128
+ fromEdge = config?.edge ?? true;
129
+ }
130
+
131
+ if (fromEdge) {
132
+ const command = encodeURI(parts.join('/'));
133
+ const edgeUrlWithPath = `${options.edgeUrl!}/${command}`;
134
+ return fetchData(edgeUrlWithPath, options, { method: 'GET' });
135
+ } else {
136
+ return fetchData(options.url!, options, {
137
+ method: 'POST',
138
+ body: JSON.stringify(parts),
139
+ });
140
+ }
141
+ }
142
+
143
+ function hasConfig(options: ClientObjectProps, command: string, a: any) {
144
+ let lastArg;
145
+ let args = [...a];
146
+
147
+ if (a.length > 0) {
148
+ lastArg = args.pop();
149
+ }
150
+
151
+ if (typeof lastArg === 'object' && lastArg !== null) {
152
+ return request(options, lastArg, command, ...args);
153
+ } else {
154
+ return request(options, {}, command, ...a);
155
+ }
156
+ }
157
+
158
+ /**
159
+ * Creates a Upstash Redis instance
160
+ *
161
+ * @constructor
162
+ * @param {string} url - database rest url
163
+ * @param {string} token - database rest token
164
+ * @param {Object} options - database config
165
+ * @param {string} [options.url] - database rest url
166
+ * @param {string} [options.token] - database rest token
167
+ * @param {string} [options.edgeUrl] - database rest edge url
168
+ * @param {string} [options.readFromEdge] - database rest read from edge
169
+ *
170
+ * @example
171
+ * ```js
172
+ * import upstash from '@upstash/redis'
173
+ *
174
+ * const redis1 = upstash('url', token);
175
+ * const redis2 = upstash({ url: '', token: '', edgeUrl: '', readFromEdge: false });
176
+ * ```
177
+ */
178
+
179
+ function upstash(options?: ClientObjectProps): Upstash;
180
+ function upstash(url?: string, token?: string): Upstash;
181
+ function upstash(url?: string | ClientObjectProps, token?: string): Upstash {
182
+ const options: ClientObjectProps = parseOptions(url, token);
183
+
184
+ /**
185
+ * Auth
186
+ */
187
+
188
+ function auth(): void {
189
+ Object.assign(
190
+ options,
191
+ {
192
+ url: undefined,
193
+ token: undefined,
194
+ edgeUrl: undefined,
195
+ readFromEdge: undefined,
196
+ },
197
+ parseOptions(arguments[0], arguments[1])
198
+ );
199
+ }
200
+
201
+ /**
202
+ * STRING
203
+ */
204
+
205
+ function append() {
206
+ return request(options, undefined, 'append', ...arguments);
207
+ }
208
+ function decr() {
209
+ return request(options, undefined, 'decr', ...arguments);
210
+ }
211
+ function decrby() {
212
+ return request(options, undefined, 'decrby', ...arguments);
213
+ }
214
+ function get() {
215
+ return hasConfig(options, 'get', arguments);
216
+ }
217
+ function getrange() {
218
+ return hasConfig(options, 'getrange', arguments);
219
+ }
220
+ function getset() {
221
+ return request(options, undefined, 'getset', ...arguments);
222
+ }
223
+ function incr() {
224
+ return request(options, undefined, 'incr', ...arguments);
225
+ }
226
+ function incrby() {
227
+ return request(options, undefined, 'incrby', ...arguments);
228
+ }
229
+ function incrbyfloat() {
230
+ return request(options, undefined, 'incrbyfloat', ...arguments);
231
+ }
232
+ function mget() {
233
+ return hasConfig(options, 'mget', arguments);
234
+ }
235
+ function mset() {
236
+ return request(options, undefined, 'mset', ...arguments);
237
+ }
238
+ function msetnx() {
239
+ return request(options, undefined, 'msetnx', ...arguments);
240
+ }
241
+ function psetex() {
242
+ return request(options, undefined, 'psetex', ...arguments);
243
+ }
244
+ function set() {
245
+ return request(options, undefined, 'set', ...arguments);
246
+ }
247
+ function setex() {
248
+ return request(options, undefined, 'setex', ...arguments);
249
+ }
250
+ function setnx() {
251
+ return request(options, undefined, 'setnx', ...arguments);
252
+ }
253
+ function setrange() {
254
+ return request(options, undefined, 'setrange', ...arguments);
255
+ }
256
+ function strlen() {
257
+ return hasConfig(options, 'strlen', arguments);
258
+ }
259
+
260
+ /**
261
+ * BITMAPS
262
+ */
263
+
264
+ function bitcount() {
265
+ return hasConfig(options, 'bitcount', arguments);
266
+ }
267
+ function bitop() {
268
+ return request(options, undefined, 'bitop', ...arguments);
269
+ }
270
+ function bitpos() {
271
+ return hasConfig(options, 'bitpos', arguments);
272
+ }
273
+ function getbit() {
274
+ return hasConfig(options, 'getbit', arguments);
275
+ }
276
+ function setbit() {
277
+ return request(options, undefined, 'setbit', ...arguments);
278
+ }
279
+
280
+ /**
281
+ * CONNECTION
282
+ */
283
+
284
+ function echo() {
285
+ return hasConfig(options, 'echo', arguments);
286
+ }
287
+ function ping() {
288
+ return hasConfig(options, 'ping', arguments);
289
+ }
290
+
291
+ /**
292
+ * HASHES
293
+ */
294
+
295
+ function hdel(): MethodReturn {
296
+ return request(options, undefined, 'hdel', ...arguments);
297
+ }
298
+ function hexists(): MethodReturn {
299
+ return hasConfig(options, 'hexists', arguments);
300
+ }
301
+ function hget(): MethodReturn {
302
+ return hasConfig(options, 'hget', arguments);
303
+ }
304
+ function hgetall(): MethodReturn {
305
+ return hasConfig(options, 'hgetall', arguments);
306
+ }
307
+ function hincrby(): MethodReturn {
308
+ return request(options, undefined, 'hincrby', ...arguments);
309
+ }
310
+ function hincrbyfloat(): MethodReturn {
311
+ return request(options, undefined, 'hincrbyfloat', ...arguments);
312
+ }
313
+ function hkeys(): MethodReturn {
314
+ return hasConfig(options, 'hkeys', arguments);
315
+ }
316
+ function hlen(): MethodReturn {
317
+ return hasConfig(options, 'hlen', arguments);
318
+ }
319
+ function hmget(): MethodReturn {
320
+ return hasConfig(options, 'hmget', arguments);
321
+ }
322
+ function hmset(): MethodReturn {
323
+ return request(options, undefined, 'hmset', ...arguments);
324
+ }
325
+ function hscan(): MethodReturn {
326
+ return request(options, undefined, 'hscan', ...arguments);
327
+ }
328
+ function hset(): MethodReturn {
329
+ return request(options, undefined, 'hset', ...arguments);
330
+ }
331
+ function hsetnx(): MethodReturn {
332
+ return request(options, undefined, 'hsetnx', ...arguments);
333
+ }
334
+ function hvals(): MethodReturn {
335
+ return hasConfig(options, 'hvals', arguments);
336
+ }
337
+
338
+ /**
339
+ * KEYS
340
+ */
341
+
342
+ function del(): MethodReturn {
343
+ return request(options, undefined, 'del', ...arguments);
344
+ }
345
+ function exists(): MethodReturn {
346
+ return hasConfig(options, 'exists', arguments);
347
+ }
348
+ function expire(): MethodReturn {
349
+ return request(options, undefined, 'expire', ...arguments);
350
+ }
351
+ function expireat(): MethodReturn {
352
+ return request(options, undefined, 'expireat', ...arguments);
353
+ }
354
+ function keys(): MethodReturn {
355
+ return hasConfig(options, 'keys', arguments);
356
+ }
357
+ function persist(): MethodReturn {
358
+ return request(options, undefined, 'persist', ...arguments);
359
+ }
360
+ function pexpire(): MethodReturn {
361
+ return request(options, undefined, 'pexpire', ...arguments);
362
+ }
363
+ function pexpireat(): MethodReturn {
364
+ return request(options, undefined, 'pexpireat', ...arguments);
365
+ }
366
+ function pttl(): MethodReturn {
367
+ return hasConfig(options, 'pttl', arguments);
368
+ }
369
+ function randomkey(): MethodReturn {
370
+ return request(options, undefined, 'randomkey', ...arguments);
371
+ }
372
+ function rename(): MethodReturn {
373
+ return request(options, undefined, 'rename', ...arguments);
374
+ }
375
+ function renamenx(): MethodReturn {
376
+ return request(options, undefined, 'renamenx', ...arguments);
377
+ }
378
+ function scan(): MethodReturn {
379
+ return request(options, undefined, 'scan', ...arguments);
380
+ }
381
+ function touch(): MethodReturn {
382
+ return request(options, undefined, 'touch', ...arguments);
383
+ }
384
+ function ttl(): MethodReturn {
385
+ return hasConfig(options, 'ttl', arguments);
386
+ }
387
+ function type(): MethodReturn {
388
+ return hasConfig(options, 'type', arguments);
389
+ }
390
+ function unlink(): MethodReturn {
391
+ return request(options, undefined, 'unlink', ...arguments);
392
+ }
393
+
394
+ /**
395
+ * LISTS
396
+ */
397
+
398
+ function lindex(): MethodReturn {
399
+ return hasConfig(options, 'lindex', arguments);
400
+ }
401
+ function linsert(): MethodReturn {
402
+ return request(options, undefined, 'linsert', ...arguments);
403
+ }
404
+ function llen(): MethodReturn {
405
+ return hasConfig(options, 'llen', arguments);
406
+ }
407
+ function lpop(): MethodReturn {
408
+ return request(options, undefined, 'lpop', ...arguments);
409
+ }
410
+ function lpush(): MethodReturn {
411
+ return request(options, undefined, 'lpush', ...arguments);
412
+ }
413
+ function lpushx(): MethodReturn {
414
+ return request(options, undefined, 'lpushx', ...arguments);
415
+ }
416
+ function lrange(): MethodReturn {
417
+ return hasConfig(options, 'lrange', arguments);
418
+ }
419
+ function lrem(): MethodReturn {
420
+ return request(options, undefined, 'lrem', ...arguments);
421
+ }
422
+ function lset(): MethodReturn {
423
+ return request(options, undefined, 'lset', ...arguments);
424
+ }
425
+ function ltrim(): MethodReturn {
426
+ return request(options, undefined, 'ltrim', ...arguments);
427
+ }
428
+ function rpop(): MethodReturn {
429
+ return request(options, undefined, 'rpop', ...arguments);
430
+ }
431
+ function rpoplpush(): MethodReturn {
432
+ return request(options, undefined, 'rpoplpush', ...arguments);
433
+ }
434
+ function rpush(): MethodReturn {
435
+ return request(options, undefined, 'rpush', ...arguments);
436
+ }
437
+ function rpushx(): MethodReturn {
438
+ return request(options, undefined, 'rpushx', ...arguments);
439
+ }
440
+
441
+ /**
442
+ * SERVER
443
+ */
444
+
445
+ function dbsize(): MethodReturn {
446
+ return hasConfig(options, 'dbsize', arguments);
447
+ }
448
+ function flushall(): MethodReturn {
449
+ return request(options, undefined, 'flushall', ...arguments);
450
+ }
451
+ function flushdb(): MethodReturn {
452
+ return request(options, undefined, 'flushdb', ...arguments);
453
+ }
454
+ function info(): MethodReturn {
455
+ return hasConfig(options, 'info', arguments);
456
+ }
457
+ function time(): MethodReturn {
458
+ return request(options, undefined, 'time', ...arguments);
459
+ }
460
+
461
+ /**
462
+ * SET
463
+ */
464
+
465
+ function sadd(): MethodReturn {
466
+ return request(options, undefined, 'sadd', ...arguments);
467
+ }
468
+ function scard(): MethodReturn {
469
+ return request(options, undefined, 'scard', ...arguments);
470
+ }
471
+ function sdiff(): MethodReturn {
472
+ return hasConfig(options, 'sdiff', arguments);
473
+ }
474
+ function sdiffstore(): MethodReturn {
475
+ return request(options, undefined, 'sdiffstore', ...arguments);
476
+ }
477
+ function sinter(): MethodReturn {
478
+ return hasConfig(options, 'sinter', arguments);
479
+ }
480
+ function sinterstore(): MethodReturn {
481
+ return request(options, undefined, 'sinterstore', ...arguments);
482
+ }
483
+ function sismember(): MethodReturn {
484
+ return hasConfig(options, 'sismember', arguments);
485
+ }
486
+ function smembers(): MethodReturn {
487
+ return hasConfig(options, 'smembers', arguments);
488
+ }
489
+ function smove(): MethodReturn {
490
+ return request(options, undefined, 'smove', ...arguments);
491
+ }
492
+ function spop(): MethodReturn {
493
+ return request(options, undefined, 'spop', ...arguments);
494
+ }
495
+ function srandmember(): MethodReturn {
496
+ return hasConfig(options, 'srandmember', arguments);
497
+ }
498
+ function srem(): MethodReturn {
499
+ return request(options, undefined, 'srem', ...arguments);
500
+ }
501
+ function sunion(): MethodReturn {
502
+ return hasConfig(options, 'sunion', arguments);
503
+ }
504
+ function sunionstore(): MethodReturn {
505
+ return request(options, undefined, 'sunionstore', ...arguments);
506
+ }
507
+
508
+ /**
509
+ * SORTED SETS
510
+ */
511
+
512
+ function zadd(): MethodReturn {
513
+ return request(options, undefined, 'zadd', ...arguments);
514
+ }
515
+ function zcard(): MethodReturn {
516
+ return hasConfig(options, 'zcard', arguments);
517
+ }
518
+ function zcount(): MethodReturn {
519
+ return hasConfig(options, 'zcount', arguments);
520
+ }
521
+ function zincrby(): MethodReturn {
522
+ return request(options, undefined, 'zincrby', ...arguments);
523
+ }
524
+ function zinterstore(): MethodReturn {
525
+ return request(options, undefined, 'zinterstore', ...arguments);
526
+ }
527
+ function zlexcount(): MethodReturn {
528
+ return hasConfig(options, 'zlexcount', arguments);
529
+ }
530
+ function zpopmax(): MethodReturn {
531
+ return request(options, undefined, 'zpopmax', ...arguments);
532
+ }
533
+ function zpopmin(): MethodReturn {
534
+ return request(options, undefined, 'zpopmin', ...arguments);
535
+ }
536
+ function zrange(): MethodReturn {
537
+ return hasConfig(options, 'zrange', arguments);
538
+ }
539
+ function zrangebylex(): MethodReturn {
540
+ return hasConfig(options, 'zrangebylex', arguments);
541
+ }
542
+ function zrangebyscore(): MethodReturn {
543
+ return hasConfig(options, 'zrangebyscore', arguments);
544
+ }
545
+ function zrank(): MethodReturn {
546
+ return hasConfig(options, 'zrank', arguments);
547
+ }
548
+ function zrem(): MethodReturn {
549
+ return request(options, undefined, 'zrem', ...arguments);
550
+ }
551
+ function zremrangebylex(): MethodReturn {
552
+ return request(options, undefined, 'zremrangebylex', ...arguments);
553
+ }
554
+ function zremrangebyrank(): MethodReturn {
555
+ return request(options, undefined, 'zremrangebyrank', ...arguments);
556
+ }
557
+ function zremrangebyscore(): MethodReturn {
558
+ return request(options, undefined, 'zremrangebyscore', ...arguments);
559
+ }
560
+ function zrevrange(): MethodReturn {
561
+ return hasConfig(options, 'zrevrange', arguments);
562
+ }
563
+ function zrevrangebylex(): MethodReturn {
564
+ return hasConfig(options, 'zrevrangebylex', arguments);
565
+ }
566
+ function zrevrangebyscore(): MethodReturn {
567
+ return hasConfig(options, 'zrevrangebyscore', arguments);
568
+ }
569
+ function zrevrank(): MethodReturn {
570
+ return hasConfig(options, 'zrevrank', arguments);
571
+ }
572
+ function zscore(): MethodReturn {
573
+ return hasConfig(options, 'zscore', arguments);
574
+ }
575
+ function zunionstore(): MethodReturn {
576
+ return request(options, undefined, 'zunionstore', ...arguments);
577
+ }
578
+
579
+ return {
580
+ auth,
581
+ // STRING
582
+ append,
583
+ decr,
584
+ decrby,
585
+ get,
586
+ getrange,
587
+ getset,
588
+ incr,
589
+ incrby,
590
+ incrbyfloat,
591
+ mget,
592
+ mset,
593
+ msetnx,
594
+ psetex,
595
+ set,
596
+ setex,
597
+ setnx,
598
+ setrange,
599
+ strlen,
600
+ // BITMAPS
601
+ bitcount,
602
+ bitop,
603
+ bitpos,
604
+ getbit,
605
+ setbit,
606
+ // CONNECTION
607
+ echo,
608
+ ping,
609
+ // HASHES
610
+ hdel,
611
+ hexists,
612
+ hget,
613
+ hgetall,
614
+ hincrby,
615
+ hincrbyfloat,
616
+ hkeys,
617
+ hlen,
618
+ hmget,
619
+ hmset,
620
+ hscan,
621
+ hset,
622
+ hsetnx,
623
+ hvals,
624
+ // KEYS
625
+ del,
626
+ exists,
627
+ expire,
628
+ expireat,
629
+ keys,
630
+ persist,
631
+ pexpire,
632
+ pexpireat,
633
+ pttl,
634
+ randomkey,
635
+ rename,
636
+ renamenx,
637
+ scan,
638
+ touch,
639
+ ttl,
640
+ type,
641
+ unlink,
642
+ // LISTS
643
+ lindex,
644
+ linsert,
645
+ llen,
646
+ lpop,
647
+ lpush,
648
+ lpushx,
649
+ lrange,
650
+ lrem,
651
+ lset,
652
+ ltrim,
653
+ rpop,
654
+ rpoplpush,
655
+ rpush,
656
+ rpushx,
657
+ // SERVER
658
+ dbsize,
659
+ flushall,
660
+ flushdb,
661
+ info,
662
+ time,
663
+ // SET
664
+ sadd,
665
+ scard,
666
+ sdiff,
667
+ sdiffstore,
668
+ sinter,
669
+ sinterstore,
670
+ sismember,
671
+ smembers,
672
+ smove,
673
+ spop,
674
+ srandmember,
675
+ srem,
676
+ sunion,
677
+ sunionstore,
678
+ // SORTED SETS
679
+ zadd,
680
+ zcard,
681
+ zcount,
682
+ zincrby,
683
+ zinterstore,
684
+ zlexcount,
685
+ zpopmax,
686
+ zpopmin,
687
+ zrange,
688
+ zrangebylex,
689
+ zrangebyscore,
690
+ zrank,
691
+ zrem,
692
+ zremrangebylex,
693
+ zremrangebyrank,
694
+ zremrangebyscore,
695
+ zrevrange,
696
+ zrevrangebylex,
697
+ zrevrangebyscore,
698
+ zrevrank,
699
+ zscore,
700
+ zunionstore,
701
+ };
702
+ }
703
+
704
+ export default upstash;