@upstash/redis 0.1.5 → 0.1.9
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 +0 -32
- package/dist/main/client.d.ts +5 -8
- package/dist/main/client.js +121 -180
- package/dist/main/index-cjs.d.ts +1 -0
- package/dist/main/index-cjs.js +120 -0
- package/dist/main/types.d.ts +144 -121
- package/dist/module/client.d.ts +5 -8
- package/dist/module/client.js +123 -187
- package/dist/module/index.d.ts +30 -1
- package/dist/module/index.js +3 -12
- package/dist/module/types.d.ts +144 -121
- package/dist/module/types.js +1 -2
- package/package.json +7 -16
- package/src/client.ts +130 -205
- package/src/index-cjs.ts +117 -0
- package/src/types.ts +211 -122
- package/tsconfig.json +5 -8
- package/tsconfig.module.json +2 -0
- package/dist/main/index.d.ts +0 -3
- package/dist/main/index.js +0 -12
- package/dist/umd/upstash-redis.js +0 -1
- package/webpack.config.js +0 -34
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const client_1 = __importDefault(require("./client"));
|
|
7
|
+
const redis = (0, client_1.default)();
|
|
8
|
+
module.exports = client_1.default;
|
|
9
|
+
module.exports.auth = redis.auth;
|
|
10
|
+
module.exports.append = redis.append;
|
|
11
|
+
module.exports.decr = redis.decr;
|
|
12
|
+
module.exports.decrby = redis.decrby;
|
|
13
|
+
module.exports.get = redis.get;
|
|
14
|
+
module.exports.getrange = redis.getrange;
|
|
15
|
+
module.exports.getset = redis.getset;
|
|
16
|
+
module.exports.incr = redis.incr;
|
|
17
|
+
module.exports.incrby = redis.incrby;
|
|
18
|
+
module.exports.incrbyfloat = redis.incrbyfloat;
|
|
19
|
+
module.exports.mget = redis.mget;
|
|
20
|
+
module.exports.mset = redis.mset;
|
|
21
|
+
module.exports.msetnx = redis.msetnx;
|
|
22
|
+
module.exports.psetex = redis.psetex;
|
|
23
|
+
module.exports.set = redis.set;
|
|
24
|
+
module.exports.setex = redis.setex;
|
|
25
|
+
module.exports.setnx = redis.setnx;
|
|
26
|
+
module.exports.setrange = redis.setrange;
|
|
27
|
+
module.exports.strlen = redis.strlen;
|
|
28
|
+
module.exports.bitcount = redis.bitcount;
|
|
29
|
+
module.exports.bitop = redis.bitop;
|
|
30
|
+
module.exports.bitpos = redis.bitpos;
|
|
31
|
+
module.exports.getbit = redis.getbit;
|
|
32
|
+
module.exports.setbit = redis.setbit;
|
|
33
|
+
module.exports.echo = redis.echo;
|
|
34
|
+
module.exports.ping = redis.ping;
|
|
35
|
+
module.exports.hdel = redis.hdel;
|
|
36
|
+
module.exports.hexists = redis.hexists;
|
|
37
|
+
module.exports.hget = redis.hget;
|
|
38
|
+
module.exports.hgetall = redis.hgetall;
|
|
39
|
+
module.exports.hincrby = redis.hincrby;
|
|
40
|
+
module.exports.hincrbyfloat = redis.hincrbyfloat;
|
|
41
|
+
module.exports.hkeys = redis.hkeys;
|
|
42
|
+
module.exports.hlen = redis.hlen;
|
|
43
|
+
module.exports.hmget = redis.hmget;
|
|
44
|
+
module.exports.hmset = redis.hmset;
|
|
45
|
+
module.exports.hscan = redis.hscan;
|
|
46
|
+
module.exports.hset = redis.hset;
|
|
47
|
+
module.exports.hsetnx = redis.hsetnx;
|
|
48
|
+
module.exports.hvals = redis.hvals;
|
|
49
|
+
module.exports.del = redis.del;
|
|
50
|
+
module.exports.exists = redis.exists;
|
|
51
|
+
module.exports.expire = redis.expire;
|
|
52
|
+
module.exports.expireat = redis.expireat;
|
|
53
|
+
module.exports.keys = redis.keys;
|
|
54
|
+
module.exports.persist = redis.persist;
|
|
55
|
+
module.exports.pexpire = redis.pexpire;
|
|
56
|
+
module.exports.pexpireat = redis.pexpireat;
|
|
57
|
+
module.exports.pttl = redis.pttl;
|
|
58
|
+
module.exports.randomkey = redis.randomkey;
|
|
59
|
+
module.exports.rename = redis.rename;
|
|
60
|
+
module.exports.renamenx = redis.renamenx;
|
|
61
|
+
module.exports.scan = redis.scan;
|
|
62
|
+
module.exports.touch = redis.touch;
|
|
63
|
+
module.exports.ttl = redis.ttl;
|
|
64
|
+
module.exports.type = redis.type;
|
|
65
|
+
module.exports.unlink = redis.unlink;
|
|
66
|
+
module.exports.lindex = redis.lindex;
|
|
67
|
+
module.exports.linsert = redis.linsert;
|
|
68
|
+
module.exports.llen = redis.llen;
|
|
69
|
+
module.exports.lpop = redis.lpop;
|
|
70
|
+
module.exports.lpush = redis.lpush;
|
|
71
|
+
module.exports.lpushx = redis.lpushx;
|
|
72
|
+
module.exports.lrange = redis.lrange;
|
|
73
|
+
module.exports.lrem = redis.lrem;
|
|
74
|
+
module.exports.lset = redis.lset;
|
|
75
|
+
module.exports.ltrim = redis.ltrim;
|
|
76
|
+
module.exports.rpop = redis.rpop;
|
|
77
|
+
module.exports.rpoplpush = redis.rpoplpush;
|
|
78
|
+
module.exports.rpush = redis.rpush;
|
|
79
|
+
module.exports.rpushx = redis.rpushx;
|
|
80
|
+
module.exports.dbsize = redis.dbsize;
|
|
81
|
+
module.exports.flushall = redis.flushall;
|
|
82
|
+
module.exports.flushdb = redis.flushdb;
|
|
83
|
+
module.exports.info = redis.info;
|
|
84
|
+
module.exports.time = redis.time;
|
|
85
|
+
module.exports.sadd = redis.sadd;
|
|
86
|
+
module.exports.scard = redis.scard;
|
|
87
|
+
module.exports.sdiff = redis.sdiff;
|
|
88
|
+
module.exports.sdiffstore = redis.sdiffstore;
|
|
89
|
+
module.exports.sinter = redis.sinter;
|
|
90
|
+
module.exports.sinterstore = redis.sinterstore;
|
|
91
|
+
module.exports.sismember = redis.sismember;
|
|
92
|
+
module.exports.smembers = redis.smembers;
|
|
93
|
+
module.exports.smove = redis.smove;
|
|
94
|
+
module.exports.spop = redis.spop;
|
|
95
|
+
module.exports.srandmember = redis.srandmember;
|
|
96
|
+
module.exports.srem = redis.srem;
|
|
97
|
+
module.exports.sunion = redis.sunion;
|
|
98
|
+
module.exports.sunionstore = redis.sunionstore;
|
|
99
|
+
module.exports.zadd = redis.zadd;
|
|
100
|
+
module.exports.zcard = redis.zcard;
|
|
101
|
+
module.exports.zcount = redis.zcount;
|
|
102
|
+
module.exports.zincrby = redis.zincrby;
|
|
103
|
+
module.exports.zinterstore = redis.zinterstore;
|
|
104
|
+
module.exports.zlexcount = redis.zlexcount;
|
|
105
|
+
module.exports.zpopmax = redis.zpopmax;
|
|
106
|
+
module.exports.zpopmin = redis.zpopmin;
|
|
107
|
+
module.exports.zrange = redis.zrange;
|
|
108
|
+
module.exports.zrangebylex = redis.zrangebylex;
|
|
109
|
+
module.exports.zrangebyscore = redis.zrangebyscore;
|
|
110
|
+
module.exports.zrank = redis.zrank;
|
|
111
|
+
module.exports.zrem = redis.zrem;
|
|
112
|
+
module.exports.zremrangebylex = redis.zremrangebylex;
|
|
113
|
+
module.exports.zremrangebyrank = redis.zremrangebyrank;
|
|
114
|
+
module.exports.zremrangebyscore = redis.zremrangebyscore;
|
|
115
|
+
module.exports.zrevrange = redis.zrevrange;
|
|
116
|
+
module.exports.zrevrangebylex = redis.zrevrangebylex;
|
|
117
|
+
module.exports.zrevrangebyscore = redis.zrevrangebyscore;
|
|
118
|
+
module.exports.zrevrank = redis.zrevrank;
|
|
119
|
+
module.exports.zscore = redis.zscore;
|
|
120
|
+
module.exports.zunionstore = redis.zunionstore;
|
package/dist/main/types.d.ts
CHANGED
|
@@ -1,138 +1,161 @@
|
|
|
1
1
|
export declare type ClientObjectProps = {
|
|
2
2
|
url?: undefined | string;
|
|
3
3
|
token?: undefined | string;
|
|
4
|
-
|
|
5
|
-
readFromEdge?: boolean;
|
|
4
|
+
requestOptions?: undefined | RequestInit;
|
|
6
5
|
};
|
|
7
|
-
export declare type EdgeCacheType = null | 'miss' | 'hit';
|
|
8
6
|
export declare type ReturnType = {
|
|
9
7
|
data: string | number | [] | any;
|
|
10
8
|
error: string | null;
|
|
11
|
-
metadata?: {
|
|
12
|
-
edge: boolean;
|
|
13
|
-
cache: EdgeCacheType;
|
|
14
|
-
};
|
|
15
9
|
};
|
|
16
10
|
export declare type MethodReturn = Promise<ReturnType>;
|
|
17
|
-
export declare type RequestConfig = undefined | {
|
|
18
|
-
edge?: boolean;
|
|
19
|
-
};
|
|
20
11
|
export declare type Part = string | boolean | number;
|
|
12
|
+
export declare type Bit = 0 | 1;
|
|
13
|
+
export declare type Infinities = '+inf' | '-inf';
|
|
14
|
+
export declare type ZSetNumber = Infinities | number | string;
|
|
21
15
|
declare type Auth1 = (options?: ClientObjectProps) => void;
|
|
22
16
|
declare type Auth2 = (url?: string, token?: string) => void;
|
|
23
17
|
declare type Auth3 = (url?: string | ClientObjectProps, token?: string) => void;
|
|
24
18
|
export declare type Upstash = {
|
|
25
19
|
auth: Auth1 & Auth2 & Auth3;
|
|
26
|
-
append: (
|
|
27
|
-
decr: (
|
|
28
|
-
decrby: (
|
|
29
|
-
get: (
|
|
30
|
-
getrange: (
|
|
31
|
-
getset: (
|
|
32
|
-
incr: (
|
|
33
|
-
incrby: (
|
|
34
|
-
incrbyfloat: (
|
|
35
|
-
mget: (
|
|
36
|
-
mset: (
|
|
37
|
-
msetnx: (
|
|
38
|
-
psetex: (
|
|
39
|
-
set: (
|
|
40
|
-
setex: (
|
|
41
|
-
setnx: (
|
|
42
|
-
setrange: (
|
|
43
|
-
strlen: (
|
|
44
|
-
bitcount: (
|
|
45
|
-
bitop: (
|
|
46
|
-
bitpos: (
|
|
47
|
-
getbit: (
|
|
48
|
-
setbit: (
|
|
49
|
-
echo: (
|
|
50
|
-
ping: (
|
|
51
|
-
hdel: (
|
|
52
|
-
hexists: (
|
|
53
|
-
hget: (
|
|
54
|
-
hgetall: (
|
|
55
|
-
hincrby: (
|
|
56
|
-
hincrbyfloat: (
|
|
57
|
-
hkeys: (
|
|
58
|
-
hlen: (
|
|
59
|
-
hmget: (
|
|
60
|
-
hmset: (
|
|
61
|
-
hscan: (
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
20
|
+
append: (key: string, value: string) => MethodReturn;
|
|
21
|
+
decr: (key: string) => MethodReturn;
|
|
22
|
+
decrby: (key: string, decrement: number) => MethodReturn;
|
|
23
|
+
get: (key: string) => MethodReturn;
|
|
24
|
+
getrange: (key: string, start: number, end: number) => MethodReturn;
|
|
25
|
+
getset: (key: string, value: string) => MethodReturn;
|
|
26
|
+
incr: (key: string) => MethodReturn;
|
|
27
|
+
incrby: (key: string, value: number | string) => MethodReturn;
|
|
28
|
+
incrbyfloat: (key: string, value: number | string) => MethodReturn;
|
|
29
|
+
mget: (values: string[]) => MethodReturn;
|
|
30
|
+
mset: (values: string[]) => MethodReturn;
|
|
31
|
+
msetnx: (values: string[]) => MethodReturn;
|
|
32
|
+
psetex: (key: string, miliseconds: number, value: string | number) => MethodReturn;
|
|
33
|
+
set: (key: string, value: number | string) => MethodReturn;
|
|
34
|
+
setex: (key: string, seconds: number, value: string | number) => MethodReturn;
|
|
35
|
+
setnx: (key: string, value: string) => MethodReturn;
|
|
36
|
+
setrange: (key: string, offset: number | string, value: string) => MethodReturn;
|
|
37
|
+
strlen: (key: string) => MethodReturn;
|
|
38
|
+
bitcount: (key: string, start?: number, end?: number) => MethodReturn;
|
|
39
|
+
bitop: (operation: 'AND' | 'OR' | 'XOR' | 'NOT', destinationKey: string, sourceKeys: string[]) => MethodReturn;
|
|
40
|
+
bitpos: (key: string, bit: Bit, start?: number, end?: number) => MethodReturn;
|
|
41
|
+
getbit: (key: string, offset: number) => MethodReturn;
|
|
42
|
+
setbit: (key: string, offset: number, value: Bit) => MethodReturn;
|
|
43
|
+
echo: (value: string) => MethodReturn;
|
|
44
|
+
ping: (value?: string) => MethodReturn;
|
|
45
|
+
hdel: (key: string, fields: string[]) => MethodReturn;
|
|
46
|
+
hexists: (key: string, field: string) => MethodReturn;
|
|
47
|
+
hget: (key: string, field: string) => MethodReturn;
|
|
48
|
+
hgetall: (key: string) => MethodReturn;
|
|
49
|
+
hincrby: (key: string, field: string, increment: number | string) => MethodReturn;
|
|
50
|
+
hincrbyfloat: (key: string, field: string, increment: number | string) => MethodReturn;
|
|
51
|
+
hkeys: (key: string) => MethodReturn;
|
|
52
|
+
hlen: (key: string) => MethodReturn;
|
|
53
|
+
hmget: (key: string, fields: string[]) => MethodReturn;
|
|
54
|
+
hmset: (key: string, values: string[]) => MethodReturn;
|
|
55
|
+
hscan: (key: string, cursor: number, options?: {
|
|
56
|
+
match?: number | string;
|
|
57
|
+
count?: number | string;
|
|
58
|
+
}) => MethodReturn;
|
|
59
|
+
hset: (key: string, values: string[]) => MethodReturn;
|
|
60
|
+
hsetnx: (key: string, field: string, value: string) => MethodReturn;
|
|
61
|
+
hvals: (key: string) => MethodReturn;
|
|
62
|
+
del: (keys: string[]) => MethodReturn;
|
|
63
|
+
exists: (keys: string[]) => MethodReturn;
|
|
64
|
+
expire: (key: string, seconds: number) => MethodReturn;
|
|
65
|
+
expireat: (key: string, timestamp: number | string) => MethodReturn;
|
|
66
|
+
keys: (pattern: string) => MethodReturn;
|
|
67
|
+
persist: (key: string) => MethodReturn;
|
|
68
|
+
pexpire: (key: string, miliseconds: number) => MethodReturn;
|
|
69
|
+
pexpireat: (key: string, miliseconds: number) => MethodReturn;
|
|
70
|
+
pttl: (key: string) => MethodReturn;
|
|
71
|
+
randomkey: () => MethodReturn;
|
|
72
|
+
rename: (key: string, newKey: string) => MethodReturn;
|
|
73
|
+
renamenx: (key: string, newKey: string) => MethodReturn;
|
|
74
|
+
scan: (cursor: number, opitons?: {
|
|
75
|
+
match?: number | string;
|
|
76
|
+
count?: number | string;
|
|
77
|
+
}) => MethodReturn;
|
|
78
|
+
touch: (keys: string[]) => MethodReturn;
|
|
79
|
+
ttl: (key: string) => MethodReturn;
|
|
80
|
+
type: (key: string) => MethodReturn;
|
|
81
|
+
unlink: (keys: string[]) => MethodReturn;
|
|
82
|
+
lindex: (key: string, index: number) => MethodReturn;
|
|
83
|
+
linsert: (key: string, option: 'BEFORE' | 'AFTER', pivot: string, element: string) => MethodReturn;
|
|
84
|
+
llen: (key: string) => MethodReturn;
|
|
85
|
+
lpop: (key: string) => MethodReturn;
|
|
86
|
+
lpush: (key: string, elements: string[]) => MethodReturn;
|
|
87
|
+
lpushx: (key: string, elements: string[]) => MethodReturn;
|
|
88
|
+
lrange: (key: string, start: number, stop: number) => MethodReturn;
|
|
89
|
+
lrem: (key: string, count: number, element: string) => MethodReturn;
|
|
90
|
+
lset: (key: string, index: number, element: string) => MethodReturn;
|
|
91
|
+
ltrim: (key: string, start: number, stop: number) => MethodReturn;
|
|
92
|
+
rpop: (key: string) => MethodReturn;
|
|
93
|
+
rpoplpush: (source: string, destination: string) => MethodReturn;
|
|
94
|
+
rpush: (key: string, elements: string[]) => MethodReturn;
|
|
95
|
+
rpushx: (key: string, elements: string[]) => MethodReturn;
|
|
96
|
+
dbsize: () => MethodReturn;
|
|
97
|
+
flushall: (mode?: 'ASYNC') => MethodReturn;
|
|
98
|
+
flushdb: (mode?: 'ASYNC') => MethodReturn;
|
|
99
|
+
info: () => MethodReturn;
|
|
100
|
+
time: () => MethodReturn;
|
|
101
|
+
sadd: (key: string, members: string[]) => MethodReturn;
|
|
102
|
+
scard: (key: string) => MethodReturn;
|
|
103
|
+
sdiff: (keys: string[]) => MethodReturn;
|
|
104
|
+
sdiffstore: (destination: string, keys: string[]) => MethodReturn;
|
|
105
|
+
sinter: (keys: string[]) => MethodReturn;
|
|
106
|
+
sinterstore: (destination: string, keys: string[]) => MethodReturn;
|
|
107
|
+
sismember: (key: string, member: string) => MethodReturn;
|
|
108
|
+
smembers: (key: string) => MethodReturn;
|
|
109
|
+
smove: (source: string, destination: string, member: string) => MethodReturn;
|
|
110
|
+
spop: (key: string, count?: number) => MethodReturn;
|
|
111
|
+
srandmember: (key: string, count?: number) => MethodReturn;
|
|
112
|
+
srem: (key: string, members: string[]) => MethodReturn;
|
|
113
|
+
sunion: (keys: string[]) => MethodReturn;
|
|
114
|
+
sunionstore: (destination: string, keys: string[]) => MethodReturn;
|
|
115
|
+
zadd: (key: string, values: ZSetNumber[], options?: ({
|
|
116
|
+
xx?: boolean;
|
|
117
|
+
} | {
|
|
118
|
+
nx?: boolean;
|
|
119
|
+
}) & {
|
|
120
|
+
ch?: boolean;
|
|
121
|
+
incr: boolean;
|
|
122
|
+
}) => MethodReturn;
|
|
123
|
+
zcard: (key: string) => MethodReturn;
|
|
124
|
+
zcount: (key: string, min: ZSetNumber, max: ZSetNumber) => MethodReturn;
|
|
125
|
+
zincrby: (key: string, increment: number | string, member: string) => MethodReturn;
|
|
126
|
+
zinterstore: (destination: string, keys: string[], options?: {
|
|
127
|
+
weights?: number[];
|
|
128
|
+
aggregate?: 'MIN' | 'MAX' | 'SUM';
|
|
129
|
+
}) => MethodReturn;
|
|
130
|
+
zlexcount: (key: string, min: ZSetNumber, max: ZSetNumber) => MethodReturn;
|
|
131
|
+
zpopmax: (key: string, count?: number) => MethodReturn;
|
|
132
|
+
zpopmin: (key: string, count?: number) => MethodReturn;
|
|
133
|
+
zrange: (key: string, min: ZSetNumber, max: ZSetNumber, options?: {
|
|
134
|
+
withScores: boolean;
|
|
135
|
+
}) => MethodReturn;
|
|
136
|
+
zrangebylex: (key: string, min: ZSetNumber, max: ZSetNumber, offset?: number, count?: number) => MethodReturn;
|
|
137
|
+
zrangebyscore: (key: string, min: ZSetNumber, max: ZSetNumber, options?: {
|
|
138
|
+
withScores?: boolean;
|
|
139
|
+
limit?: {
|
|
140
|
+
offset: number;
|
|
141
|
+
count: number;
|
|
142
|
+
};
|
|
143
|
+
}) => MethodReturn;
|
|
144
|
+
zrank: (key: string, member: string) => MethodReturn;
|
|
145
|
+
zrem: (key: string, members: string[]) => MethodReturn;
|
|
146
|
+
zremrangebylex: (key: string, min: ZSetNumber, max: ZSetNumber) => MethodReturn;
|
|
147
|
+
zremrangebyrank: (key: string, start: number, stop: number) => MethodReturn;
|
|
148
|
+
zremrangebyscore: (key: string, min: ZSetNumber, max: ZSetNumber) => MethodReturn;
|
|
149
|
+
zrevrange: (key: string, start: number, stop: number, options?: {
|
|
150
|
+
withScores: boolean;
|
|
151
|
+
}) => MethodReturn;
|
|
152
|
+
zrevrangebylex: (key: string, max: ZSetNumber, min: ZSetNumber, offset?: number, count?: number) => MethodReturn;
|
|
153
|
+
zrevrangebyscore: (key: string, min: ZSetNumber, max: ZSetNumber) => MethodReturn;
|
|
154
|
+
zrevrank: (key: string, member: string) => MethodReturn;
|
|
155
|
+
zscore: (key: string, member: string) => MethodReturn;
|
|
156
|
+
zunionstore: (destination: string, keys: string[], options?: {
|
|
157
|
+
weights?: number[];
|
|
158
|
+
aggregate?: 'MIN' | 'MAX' | 'SUM';
|
|
159
|
+
}) => MethodReturn;
|
|
137
160
|
};
|
|
138
161
|
export {};
|
package/dist/module/client.d.ts
CHANGED
|
@@ -3,20 +3,17 @@ import { ClientObjectProps, Upstash } from './types';
|
|
|
3
3
|
* Creates a Upstash Redis instance
|
|
4
4
|
*
|
|
5
5
|
* @constructor
|
|
6
|
-
* @param {
|
|
7
|
-
* @param {string}
|
|
8
|
-
* @param {
|
|
9
|
-
* @param {
|
|
10
|
-
* @param {string} [options.token] - database rest token
|
|
11
|
-
* @param {string} [options.edgeUrl] - database rest edge url
|
|
12
|
-
* @param {string} [options.readFromEdge] - database rest read from edge
|
|
6
|
+
* @param {Object} options
|
|
7
|
+
* @param {string} [options.url]
|
|
8
|
+
* @param {string} [options.token]
|
|
9
|
+
* @param {Object} [options.requestOptions]
|
|
13
10
|
*
|
|
14
11
|
* @example
|
|
15
12
|
* ```js
|
|
16
13
|
* import upstash from '@upstash/redis'
|
|
17
14
|
*
|
|
18
15
|
* const redis1 = upstash('url', token);
|
|
19
|
-
* const redis2 = upstash({ url: '', token: '',
|
|
16
|
+
* const redis2 = upstash({ url: '', token: '', requestOptions: {} });
|
|
20
17
|
* ```
|
|
21
18
|
*/
|
|
22
19
|
declare function upstash(options?: ClientObjectProps): Upstash;
|