@upstash/redis 0.2.0 → 1.0.0-alpha.1
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/dist/chunk-RYSRH3HC.mjs +1084 -0
- package/dist/commands.d.ts +205 -0
- package/dist/commands.js +1201 -0
- package/dist/commands.mjs +218 -0
- package/dist/index.d.ts +1011 -0
- package/dist/index.js +1754 -0
- package/dist/index.mjs +862 -0
- package/dist/zunionstore-462de5d3.d.ts +695 -0
- package/package.json +1 -75
- package/README.md +0 -63
- package/dist/main/client.d.ts +0 -21
- package/dist/main/client.js +0 -556
- package/dist/main/index-cjs.d.ts +0 -1
- package/dist/main/index-cjs.js +0 -120
- package/dist/main/types.d.ts +0 -177
- package/dist/main/types.js +0 -2
- package/dist/module/client.d.ts +0 -21
- package/dist/module/client.js +0 -551
- package/dist/module/index.d.ts +0 -3
- package/dist/module/index.js +0 -3
- package/dist/module/types.d.ts +0 -177
- package/dist/module/types.js +0 -1
- package/jest.config.js +0 -5
- package/src/client.ts +0 -618
- package/src/index-cjs.ts +0 -117
- package/src/index.ts +0 -118
- package/src/types.ts +0 -408
- package/tsconfig.json +0 -20
- package/tsconfig.module.json +0 -8
package/src/index-cjs.ts
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import upstash from './client';
|
|
2
|
-
|
|
3
|
-
const redis = upstash();
|
|
4
|
-
|
|
5
|
-
module.exports = upstash;
|
|
6
|
-
module.exports.auth = redis.auth;
|
|
7
|
-
module.exports.append = redis.append;
|
|
8
|
-
module.exports.decr = redis.decr;
|
|
9
|
-
module.exports.decrby = redis.decrby;
|
|
10
|
-
module.exports.get = redis.get;
|
|
11
|
-
module.exports.getrange = redis.getrange;
|
|
12
|
-
module.exports.getset = redis.getset;
|
|
13
|
-
module.exports.incr = redis.incr;
|
|
14
|
-
module.exports.incrby = redis.incrby;
|
|
15
|
-
module.exports.incrbyfloat = redis.incrbyfloat;
|
|
16
|
-
module.exports.mget = redis.mget;
|
|
17
|
-
module.exports.mset = redis.mset;
|
|
18
|
-
module.exports.msetnx = redis.msetnx;
|
|
19
|
-
module.exports.psetex = redis.psetex;
|
|
20
|
-
module.exports.set = redis.set;
|
|
21
|
-
module.exports.setex = redis.setex;
|
|
22
|
-
module.exports.setnx = redis.setnx;
|
|
23
|
-
module.exports.setrange = redis.setrange;
|
|
24
|
-
module.exports.strlen = redis.strlen;
|
|
25
|
-
module.exports.bitcount = redis.bitcount;
|
|
26
|
-
module.exports.bitop = redis.bitop;
|
|
27
|
-
module.exports.bitpos = redis.bitpos;
|
|
28
|
-
module.exports.getbit = redis.getbit;
|
|
29
|
-
module.exports.setbit = redis.setbit;
|
|
30
|
-
module.exports.echo = redis.echo;
|
|
31
|
-
module.exports.ping = redis.ping;
|
|
32
|
-
module.exports.hdel = redis.hdel;
|
|
33
|
-
module.exports.hexists = redis.hexists;
|
|
34
|
-
module.exports.hget = redis.hget;
|
|
35
|
-
module.exports.hgetall = redis.hgetall;
|
|
36
|
-
module.exports.hincrby = redis.hincrby;
|
|
37
|
-
module.exports.hincrbyfloat = redis.hincrbyfloat;
|
|
38
|
-
module.exports.hkeys = redis.hkeys;
|
|
39
|
-
module.exports.hlen = redis.hlen;
|
|
40
|
-
module.exports.hmget = redis.hmget;
|
|
41
|
-
module.exports.hmset = redis.hmset;
|
|
42
|
-
module.exports.hscan = redis.hscan;
|
|
43
|
-
module.exports.hset = redis.hset;
|
|
44
|
-
module.exports.hsetnx = redis.hsetnx;
|
|
45
|
-
module.exports.hvals = redis.hvals;
|
|
46
|
-
module.exports.del = redis.del;
|
|
47
|
-
module.exports.exists = redis.exists;
|
|
48
|
-
module.exports.expire = redis.expire;
|
|
49
|
-
module.exports.expireat = redis.expireat;
|
|
50
|
-
module.exports.keys = redis.keys;
|
|
51
|
-
module.exports.persist = redis.persist;
|
|
52
|
-
module.exports.pexpire = redis.pexpire;
|
|
53
|
-
module.exports.pexpireat = redis.pexpireat;
|
|
54
|
-
module.exports.pttl = redis.pttl;
|
|
55
|
-
module.exports.randomkey = redis.randomkey;
|
|
56
|
-
module.exports.rename = redis.rename;
|
|
57
|
-
module.exports.renamenx = redis.renamenx;
|
|
58
|
-
module.exports.scan = redis.scan;
|
|
59
|
-
module.exports.touch = redis.touch;
|
|
60
|
-
module.exports.ttl = redis.ttl;
|
|
61
|
-
module.exports.type = redis.type;
|
|
62
|
-
module.exports.unlink = redis.unlink;
|
|
63
|
-
module.exports.lindex = redis.lindex;
|
|
64
|
-
module.exports.linsert = redis.linsert;
|
|
65
|
-
module.exports.llen = redis.llen;
|
|
66
|
-
module.exports.lpop = redis.lpop;
|
|
67
|
-
module.exports.lpush = redis.lpush;
|
|
68
|
-
module.exports.lpushx = redis.lpushx;
|
|
69
|
-
module.exports.lrange = redis.lrange;
|
|
70
|
-
module.exports.lrem = redis.lrem;
|
|
71
|
-
module.exports.lset = redis.lset;
|
|
72
|
-
module.exports.ltrim = redis.ltrim;
|
|
73
|
-
module.exports.rpop = redis.rpop;
|
|
74
|
-
module.exports.rpoplpush = redis.rpoplpush;
|
|
75
|
-
module.exports.rpush = redis.rpush;
|
|
76
|
-
module.exports.rpushx = redis.rpushx;
|
|
77
|
-
module.exports.dbsize = redis.dbsize;
|
|
78
|
-
module.exports.flushall = redis.flushall;
|
|
79
|
-
module.exports.flushdb = redis.flushdb;
|
|
80
|
-
module.exports.info = redis.info;
|
|
81
|
-
module.exports.time = redis.time;
|
|
82
|
-
module.exports.sadd = redis.sadd;
|
|
83
|
-
module.exports.scard = redis.scard;
|
|
84
|
-
module.exports.sdiff = redis.sdiff;
|
|
85
|
-
module.exports.sdiffstore = redis.sdiffstore;
|
|
86
|
-
module.exports.sinter = redis.sinter;
|
|
87
|
-
module.exports.sinterstore = redis.sinterstore;
|
|
88
|
-
module.exports.sismember = redis.sismember;
|
|
89
|
-
module.exports.smembers = redis.smembers;
|
|
90
|
-
module.exports.smove = redis.smove;
|
|
91
|
-
module.exports.spop = redis.spop;
|
|
92
|
-
module.exports.srandmember = redis.srandmember;
|
|
93
|
-
module.exports.srem = redis.srem;
|
|
94
|
-
module.exports.sunion = redis.sunion;
|
|
95
|
-
module.exports.sunionstore = redis.sunionstore;
|
|
96
|
-
module.exports.zadd = redis.zadd;
|
|
97
|
-
module.exports.zcard = redis.zcard;
|
|
98
|
-
module.exports.zcount = redis.zcount;
|
|
99
|
-
module.exports.zincrby = redis.zincrby;
|
|
100
|
-
module.exports.zinterstore = redis.zinterstore;
|
|
101
|
-
module.exports.zlexcount = redis.zlexcount;
|
|
102
|
-
module.exports.zpopmax = redis.zpopmax;
|
|
103
|
-
module.exports.zpopmin = redis.zpopmin;
|
|
104
|
-
module.exports.zrange = redis.zrange;
|
|
105
|
-
module.exports.zrangebylex = redis.zrangebylex;
|
|
106
|
-
module.exports.zrangebyscore = redis.zrangebyscore;
|
|
107
|
-
module.exports.zrank = redis.zrank;
|
|
108
|
-
module.exports.zrem = redis.zrem;
|
|
109
|
-
module.exports.zremrangebylex = redis.zremrangebylex;
|
|
110
|
-
module.exports.zremrangebyrank = redis.zremrangebyrank;
|
|
111
|
-
module.exports.zremrangebyscore = redis.zremrangebyscore;
|
|
112
|
-
module.exports.zrevrange = redis.zrevrange;
|
|
113
|
-
module.exports.zrevrangebylex = redis.zrevrangebylex;
|
|
114
|
-
module.exports.zrevrangebyscore = redis.zrevrangebyscore;
|
|
115
|
-
module.exports.zrevrank = redis.zrevrank;
|
|
116
|
-
module.exports.zscore = redis.zscore;
|
|
117
|
-
module.exports.zunionstore = redis.zunionstore;
|
package/src/index.ts
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import upstash from './client';
|
|
2
|
-
|
|
3
|
-
export default upstash;
|
|
4
|
-
|
|
5
|
-
export const {
|
|
6
|
-
auth,
|
|
7
|
-
append,
|
|
8
|
-
decr,
|
|
9
|
-
decrby,
|
|
10
|
-
get,
|
|
11
|
-
getrange,
|
|
12
|
-
getset,
|
|
13
|
-
incr,
|
|
14
|
-
incrby,
|
|
15
|
-
incrbyfloat,
|
|
16
|
-
mget,
|
|
17
|
-
mset,
|
|
18
|
-
msetnx,
|
|
19
|
-
psetex,
|
|
20
|
-
set,
|
|
21
|
-
setex,
|
|
22
|
-
setnx,
|
|
23
|
-
setrange,
|
|
24
|
-
strlen,
|
|
25
|
-
bitcount,
|
|
26
|
-
bitop,
|
|
27
|
-
bitpos,
|
|
28
|
-
getbit,
|
|
29
|
-
setbit,
|
|
30
|
-
echo,
|
|
31
|
-
ping,
|
|
32
|
-
hdel,
|
|
33
|
-
hexists,
|
|
34
|
-
hget,
|
|
35
|
-
hgetall,
|
|
36
|
-
hincrby,
|
|
37
|
-
hincrbyfloat,
|
|
38
|
-
hkeys,
|
|
39
|
-
hlen,
|
|
40
|
-
hmget,
|
|
41
|
-
hmset,
|
|
42
|
-
hscan,
|
|
43
|
-
hset,
|
|
44
|
-
hsetnx,
|
|
45
|
-
hvals,
|
|
46
|
-
del,
|
|
47
|
-
exists,
|
|
48
|
-
expire,
|
|
49
|
-
expireat,
|
|
50
|
-
keys,
|
|
51
|
-
persist,
|
|
52
|
-
pexpire,
|
|
53
|
-
pexpireat,
|
|
54
|
-
pttl,
|
|
55
|
-
randomkey,
|
|
56
|
-
rename,
|
|
57
|
-
renamenx,
|
|
58
|
-
scan,
|
|
59
|
-
touch,
|
|
60
|
-
ttl,
|
|
61
|
-
type,
|
|
62
|
-
unlink,
|
|
63
|
-
lindex,
|
|
64
|
-
linsert,
|
|
65
|
-
llen,
|
|
66
|
-
lpop,
|
|
67
|
-
lpush,
|
|
68
|
-
lpushx,
|
|
69
|
-
lrange,
|
|
70
|
-
lrem,
|
|
71
|
-
lset,
|
|
72
|
-
ltrim,
|
|
73
|
-
rpop,
|
|
74
|
-
rpoplpush,
|
|
75
|
-
rpush,
|
|
76
|
-
rpushx,
|
|
77
|
-
dbsize,
|
|
78
|
-
flushall,
|
|
79
|
-
flushdb,
|
|
80
|
-
info,
|
|
81
|
-
time,
|
|
82
|
-
sadd,
|
|
83
|
-
scard,
|
|
84
|
-
sdiff,
|
|
85
|
-
sdiffstore,
|
|
86
|
-
sinter,
|
|
87
|
-
sinterstore,
|
|
88
|
-
sismember,
|
|
89
|
-
smembers,
|
|
90
|
-
smove,
|
|
91
|
-
spop,
|
|
92
|
-
srandmember,
|
|
93
|
-
srem,
|
|
94
|
-
sunion,
|
|
95
|
-
sunionstore,
|
|
96
|
-
zadd,
|
|
97
|
-
zcard,
|
|
98
|
-
zcount,
|
|
99
|
-
zincrby,
|
|
100
|
-
zinterstore,
|
|
101
|
-
zlexcount,
|
|
102
|
-
zpopmax,
|
|
103
|
-
zpopmin,
|
|
104
|
-
zrange,
|
|
105
|
-
zrangebylex,
|
|
106
|
-
zrangebyscore,
|
|
107
|
-
zrank,
|
|
108
|
-
zrem,
|
|
109
|
-
zremrangebylex,
|
|
110
|
-
zremrangebyrank,
|
|
111
|
-
zremrangebyscore,
|
|
112
|
-
zrevrange,
|
|
113
|
-
zrevrangebylex,
|
|
114
|
-
zrevrangebyscore,
|
|
115
|
-
zrevrank,
|
|
116
|
-
zscore,
|
|
117
|
-
zunionstore,
|
|
118
|
-
} = upstash();
|
package/src/types.ts
DELETED
|
@@ -1,408 +0,0 @@
|
|
|
1
|
-
export type ClientObjectProps = {
|
|
2
|
-
url?: undefined | string;
|
|
3
|
-
token?: undefined | string;
|
|
4
|
-
requestOptions?: undefined | RequestInit;
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export type ReturnType = {
|
|
8
|
-
data: string | number | [] | any;
|
|
9
|
-
error: string | null;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export type MethodReturn = Promise<ReturnType>;
|
|
13
|
-
|
|
14
|
-
export type Part = string | boolean | number;
|
|
15
|
-
|
|
16
|
-
export type Bit = 0 | 1;
|
|
17
|
-
|
|
18
|
-
export type Infinities = '+inf' | '-inf';
|
|
19
|
-
|
|
20
|
-
export type ZSetNumber = Infinities | number | string;
|
|
21
|
-
|
|
22
|
-
type Auth1 = (options?: ClientObjectProps) => void;
|
|
23
|
-
type Auth2 = (url?: string, token?: string) => void;
|
|
24
|
-
type Auth3 = (url?: string | ClientObjectProps, token?: string) => void;
|
|
25
|
-
|
|
26
|
-
type SET1 = (key: string, value: string | number) => MethodReturn;
|
|
27
|
-
type SET2 = (
|
|
28
|
-
key: string,
|
|
29
|
-
value: string | number,
|
|
30
|
-
timeType: 'EX' | 'PX',
|
|
31
|
-
time: number | string
|
|
32
|
-
) => MethodReturn;
|
|
33
|
-
|
|
34
|
-
type BITCOUNT1 = (key: string) => MethodReturn;
|
|
35
|
-
type BITCOUNT2 = (
|
|
36
|
-
key: string,
|
|
37
|
-
start: number | string,
|
|
38
|
-
end: number | string
|
|
39
|
-
) => MethodReturn;
|
|
40
|
-
|
|
41
|
-
type BITPOS1 = (key: string, bit: Bit) => MethodReturn;
|
|
42
|
-
type BITPOS2 = (key: string, bit: Bit, start: number) => MethodReturn;
|
|
43
|
-
type BITPOS3 = (
|
|
44
|
-
key: string,
|
|
45
|
-
bit: Bit,
|
|
46
|
-
start: number,
|
|
47
|
-
end: number
|
|
48
|
-
) => MethodReturn;
|
|
49
|
-
|
|
50
|
-
type PING1 = () => MethodReturn;
|
|
51
|
-
type PING2 = (message: string) => MethodReturn;
|
|
52
|
-
|
|
53
|
-
type HSCAN1 = (key: string, cursor: number | string) => MethodReturn;
|
|
54
|
-
type HSCAN2 = (
|
|
55
|
-
key: string,
|
|
56
|
-
cursor: number | string,
|
|
57
|
-
match: 'MATCH',
|
|
58
|
-
pattern: string
|
|
59
|
-
) => MethodReturn;
|
|
60
|
-
type HSCAN3 = (
|
|
61
|
-
key: string,
|
|
62
|
-
cursor: number | string,
|
|
63
|
-
count: 'COUNT',
|
|
64
|
-
value: number | string
|
|
65
|
-
) => MethodReturn;
|
|
66
|
-
type HSCAN4 = (
|
|
67
|
-
key: string,
|
|
68
|
-
cursor: number | string,
|
|
69
|
-
match: 'MATCH',
|
|
70
|
-
pattern: string,
|
|
71
|
-
count: 'COUNT',
|
|
72
|
-
value: number | string
|
|
73
|
-
) => MethodReturn;
|
|
74
|
-
|
|
75
|
-
type SCAN1 = (cursor: number | string) => MethodReturn;
|
|
76
|
-
type SCAN2 = (
|
|
77
|
-
cursor: number | string,
|
|
78
|
-
match: 'MATCH',
|
|
79
|
-
pattern: string
|
|
80
|
-
) => MethodReturn;
|
|
81
|
-
type SCAN3 = (
|
|
82
|
-
cursor: number | string,
|
|
83
|
-
count: 'COUNT',
|
|
84
|
-
value: number | string
|
|
85
|
-
) => MethodReturn;
|
|
86
|
-
type SCAN4 = (
|
|
87
|
-
cursor: number | string,
|
|
88
|
-
match: 'MATCH',
|
|
89
|
-
pattern: string,
|
|
90
|
-
count: 'COUNT',
|
|
91
|
-
value: number | string
|
|
92
|
-
) => MethodReturn;
|
|
93
|
-
|
|
94
|
-
type FLUSHALL1 = () => MethodReturn;
|
|
95
|
-
type FLUSHALL2 = (mode: 'ASYNC') => MethodReturn;
|
|
96
|
-
|
|
97
|
-
type FLUSHDB1 = () => MethodReturn;
|
|
98
|
-
type FLUSHDB2 = (mode: 'ASYNC' | 'SYNC') => MethodReturn;
|
|
99
|
-
|
|
100
|
-
type INFO1 = () => MethodReturn;
|
|
101
|
-
type INFO2 = (section: string) => MethodReturn;
|
|
102
|
-
|
|
103
|
-
type SPOP1 = (key: string) => MethodReturn;
|
|
104
|
-
type SPOP2 = (key: string, count: number) => MethodReturn;
|
|
105
|
-
|
|
106
|
-
type SRANDMEMBER1 = (key: string) => MethodReturn;
|
|
107
|
-
type SRANDMEMBER2 = (key: string, count: number) => MethodReturn;
|
|
108
|
-
|
|
109
|
-
type ZPOPMAX1 = (key: string) => MethodReturn;
|
|
110
|
-
type ZPOPMAX2 = (key: string, count: number | string) => MethodReturn;
|
|
111
|
-
|
|
112
|
-
type ZRANGE1 = (key: string, min: ZSetNumber, max: ZSetNumber) => MethodReturn;
|
|
113
|
-
type ZRANGE2 = (
|
|
114
|
-
key: string,
|
|
115
|
-
min: ZSetNumber,
|
|
116
|
-
max: ZSetNumber,
|
|
117
|
-
withscores: 'WITHSCORES'
|
|
118
|
-
) => MethodReturn;
|
|
119
|
-
|
|
120
|
-
type ZRANGEBYLEX1 = (
|
|
121
|
-
key: string,
|
|
122
|
-
min: ZSetNumber,
|
|
123
|
-
max: ZSetNumber
|
|
124
|
-
) => MethodReturn;
|
|
125
|
-
type ZRANGEBYLEX2 = (
|
|
126
|
-
key: string,
|
|
127
|
-
min: ZSetNumber,
|
|
128
|
-
max: ZSetNumber,
|
|
129
|
-
limit: 'LIMIT',
|
|
130
|
-
offset: number | string,
|
|
131
|
-
count: number | string
|
|
132
|
-
) => MethodReturn;
|
|
133
|
-
|
|
134
|
-
type ZRANGEBYSCORE1 = (
|
|
135
|
-
key: string,
|
|
136
|
-
min: ZSetNumber,
|
|
137
|
-
max: ZSetNumber
|
|
138
|
-
) => MethodReturn;
|
|
139
|
-
type ZRANGEBYSCORE2 = (
|
|
140
|
-
key: string,
|
|
141
|
-
min: ZSetNumber,
|
|
142
|
-
max: ZSetNumber,
|
|
143
|
-
withScores: 'WITHSCORES'
|
|
144
|
-
) => MethodReturn;
|
|
145
|
-
type ZRANGEBYSCORE3 = (
|
|
146
|
-
key: string,
|
|
147
|
-
min: ZSetNumber,
|
|
148
|
-
max: ZSetNumber,
|
|
149
|
-
limit: 'LIMIT',
|
|
150
|
-
offset: number | string,
|
|
151
|
-
count: number | string
|
|
152
|
-
) => MethodReturn;
|
|
153
|
-
type ZRANGEBYSCORE4 = (
|
|
154
|
-
key: string,
|
|
155
|
-
min: ZSetNumber,
|
|
156
|
-
max: ZSetNumber,
|
|
157
|
-
withScores: 'WITHSCORES',
|
|
158
|
-
limit: 'LIMIT',
|
|
159
|
-
offset: number | string,
|
|
160
|
-
count: number | string
|
|
161
|
-
) => MethodReturn;
|
|
162
|
-
|
|
163
|
-
type ZREVRANGEBYLEX1 = (
|
|
164
|
-
key: string,
|
|
165
|
-
max: ZSetNumber,
|
|
166
|
-
min: ZSetNumber
|
|
167
|
-
) => MethodReturn;
|
|
168
|
-
type ZREVRANGEBYLEX2 = (
|
|
169
|
-
key: string,
|
|
170
|
-
max: ZSetNumber,
|
|
171
|
-
min: ZSetNumber,
|
|
172
|
-
limit: 'LIMIT',
|
|
173
|
-
offset: number | string,
|
|
174
|
-
count: number | string
|
|
175
|
-
) => MethodReturn;
|
|
176
|
-
|
|
177
|
-
type ZREVRANGEBYSCORE1 = (
|
|
178
|
-
key: string,
|
|
179
|
-
max: ZSetNumber,
|
|
180
|
-
min: ZSetNumber
|
|
181
|
-
) => MethodReturn;
|
|
182
|
-
type ZREVRANGEBYSCORE2 = (
|
|
183
|
-
key: string,
|
|
184
|
-
max: ZSetNumber,
|
|
185
|
-
min: ZSetNumber,
|
|
186
|
-
withScores: 'WITHSCORES'
|
|
187
|
-
) => MethodReturn;
|
|
188
|
-
type ZREVRANGEBYSCORE3 = (
|
|
189
|
-
key: string,
|
|
190
|
-
max: ZSetNumber,
|
|
191
|
-
min: ZSetNumber,
|
|
192
|
-
limit: 'LIMIT',
|
|
193
|
-
offset: number | string,
|
|
194
|
-
count: number | string
|
|
195
|
-
) => MethodReturn;
|
|
196
|
-
type ZREVRANGEBYSCORE4 = (
|
|
197
|
-
key: string,
|
|
198
|
-
max: ZSetNumber,
|
|
199
|
-
min: ZSetNumber,
|
|
200
|
-
withScores: 'WITHSCORES',
|
|
201
|
-
limit: 'LIMIT',
|
|
202
|
-
offset: number | string,
|
|
203
|
-
count: number | string
|
|
204
|
-
) => MethodReturn;
|
|
205
|
-
|
|
206
|
-
type ZREVRANGE1 = (
|
|
207
|
-
key: string,
|
|
208
|
-
start: number | string,
|
|
209
|
-
stop: number | string
|
|
210
|
-
) => MethodReturn;
|
|
211
|
-
type ZREVRANGE2 = (
|
|
212
|
-
key: string,
|
|
213
|
-
start: number | string,
|
|
214
|
-
stop: number | string,
|
|
215
|
-
withscores: 'WITHSCORES'
|
|
216
|
-
) => MethodReturn;
|
|
217
|
-
|
|
218
|
-
export type Upstash = {
|
|
219
|
-
auth: Auth1 & Auth2 & Auth3;
|
|
220
|
-
//
|
|
221
|
-
append: (key: string, value: string) => MethodReturn;
|
|
222
|
-
decr: (key: string) => MethodReturn;
|
|
223
|
-
decrby: (key: string, decrement: number | string) => MethodReturn;
|
|
224
|
-
get: (key: string) => MethodReturn;
|
|
225
|
-
getrange: (
|
|
226
|
-
key: string,
|
|
227
|
-
start: number | string,
|
|
228
|
-
end: number | string
|
|
229
|
-
) => MethodReturn;
|
|
230
|
-
getset: (key: string, value: string) => MethodReturn;
|
|
231
|
-
incr: (key: string) => MethodReturn;
|
|
232
|
-
incrby: (key: string, increment: number | string) => MethodReturn;
|
|
233
|
-
incrbyfloat: (key: string, increment: number | string) => MethodReturn;
|
|
234
|
-
mget: (...key: any) => MethodReturn;
|
|
235
|
-
mset: (...keyValue: any) => MethodReturn;
|
|
236
|
-
msetnx: (...keyValue: any) => MethodReturn;
|
|
237
|
-
psetex: (
|
|
238
|
-
key: string,
|
|
239
|
-
miliseconds: number | string,
|
|
240
|
-
value: string
|
|
241
|
-
) => MethodReturn;
|
|
242
|
-
set: SET1 & SET2;
|
|
243
|
-
setex: (key: string, seconds: number | string, value: string) => MethodReturn;
|
|
244
|
-
setnx: (key: string, value: string) => MethodReturn;
|
|
245
|
-
setrange: (
|
|
246
|
-
key: string,
|
|
247
|
-
offset: number | string,
|
|
248
|
-
value: string
|
|
249
|
-
) => MethodReturn;
|
|
250
|
-
strlen: (key: string) => MethodReturn;
|
|
251
|
-
//
|
|
252
|
-
bitcount: BITCOUNT1 & BITCOUNT2;
|
|
253
|
-
bitop: (
|
|
254
|
-
operation: 'AND' | 'OR' | 'XOR' | 'NOT',
|
|
255
|
-
destKey: string,
|
|
256
|
-
...key: any
|
|
257
|
-
) => MethodReturn;
|
|
258
|
-
bitpos: BITPOS1 & BITPOS2 & BITPOS3;
|
|
259
|
-
getbit: (key: string, offset: number | string) => MethodReturn;
|
|
260
|
-
setbit: (key: string, offset: number | string, value: Bit) => MethodReturn;
|
|
261
|
-
//
|
|
262
|
-
echo: (message: string) => MethodReturn;
|
|
263
|
-
ping: PING1 & PING2;
|
|
264
|
-
//
|
|
265
|
-
hdel: (key: string, ...field: any) => MethodReturn;
|
|
266
|
-
hexists: (key: string, field: string) => MethodReturn;
|
|
267
|
-
hget: (key: string, field: string) => MethodReturn;
|
|
268
|
-
hgetall: (key: string) => MethodReturn;
|
|
269
|
-
hincrby: (
|
|
270
|
-
key: string,
|
|
271
|
-
field: string,
|
|
272
|
-
increment: number | string
|
|
273
|
-
) => MethodReturn;
|
|
274
|
-
hincrbyfloat: (
|
|
275
|
-
key: string,
|
|
276
|
-
field: string,
|
|
277
|
-
increment: number | string
|
|
278
|
-
) => MethodReturn;
|
|
279
|
-
hkeys: (key: string) => MethodReturn;
|
|
280
|
-
hlen: (key: string) => MethodReturn;
|
|
281
|
-
hmget: (key: string, ...field: any) => MethodReturn;
|
|
282
|
-
hmset: (key: string, ...fieldValue: any) => MethodReturn;
|
|
283
|
-
hscan: HSCAN1 & HSCAN2 & HSCAN3 & HSCAN4;
|
|
284
|
-
hset: (key: string, ...fieldValue: any) => MethodReturn;
|
|
285
|
-
hsetnx: (key: string, field: string, value: string) => MethodReturn;
|
|
286
|
-
hvals: (key: string) => MethodReturn;
|
|
287
|
-
//
|
|
288
|
-
del: (...key: any) => MethodReturn;
|
|
289
|
-
exists: (...key: any) => MethodReturn;
|
|
290
|
-
expire: (key: string, seconds: number | string) => MethodReturn;
|
|
291
|
-
expireat: (key: string, timestamp: number | string) => MethodReturn;
|
|
292
|
-
keys: (pattern: string) => MethodReturn;
|
|
293
|
-
persist: (key: string) => MethodReturn;
|
|
294
|
-
pexpire: (key: string, miliseconds: number | string) => MethodReturn;
|
|
295
|
-
pexpireat: (
|
|
296
|
-
key: string,
|
|
297
|
-
milisecondsTimestamp: number | string
|
|
298
|
-
) => MethodReturn;
|
|
299
|
-
pttl: (key: string) => MethodReturn;
|
|
300
|
-
randomkey: () => MethodReturn;
|
|
301
|
-
rename: (key: string, newKey: string) => MethodReturn;
|
|
302
|
-
renamenx: (key: string, newKey: string) => MethodReturn;
|
|
303
|
-
scan: SCAN1 & SCAN2 & SCAN3 & SCAN4;
|
|
304
|
-
touch: (...key: any) => MethodReturn;
|
|
305
|
-
ttl: (key: string) => MethodReturn;
|
|
306
|
-
type: (key: string) => MethodReturn;
|
|
307
|
-
unlink: (...key: any) => MethodReturn;
|
|
308
|
-
//
|
|
309
|
-
lindex: (key: string, index: number | string) => MethodReturn;
|
|
310
|
-
linsert: (
|
|
311
|
-
key: string,
|
|
312
|
-
option: 'BEFORE' | 'AFTER',
|
|
313
|
-
pivot: string,
|
|
314
|
-
element: string
|
|
315
|
-
) => MethodReturn;
|
|
316
|
-
llen: (key: string) => MethodReturn;
|
|
317
|
-
lpop: (key: string) => MethodReturn;
|
|
318
|
-
lpush: (key: string, ...element: any) => MethodReturn;
|
|
319
|
-
lpushx: (key: string, ...element: any) => MethodReturn;
|
|
320
|
-
lrange: (
|
|
321
|
-
key: string,
|
|
322
|
-
start: number | string,
|
|
323
|
-
stop: number | string
|
|
324
|
-
) => MethodReturn;
|
|
325
|
-
lrem: (key: string, count: number | string, element: string) => MethodReturn;
|
|
326
|
-
lset: (key: string, index: number | string, element: string) => MethodReturn;
|
|
327
|
-
ltrim: (
|
|
328
|
-
key: string,
|
|
329
|
-
start: number | string,
|
|
330
|
-
stop: number | string
|
|
331
|
-
) => MethodReturn;
|
|
332
|
-
rpop: (key: string) => MethodReturn;
|
|
333
|
-
rpoplpush: (source: string, destination: string) => MethodReturn;
|
|
334
|
-
rpush: (key: string, ...element: any) => MethodReturn;
|
|
335
|
-
rpushx: (key: string, ...element: any) => MethodReturn;
|
|
336
|
-
//
|
|
337
|
-
dbsize: () => MethodReturn;
|
|
338
|
-
flushall: FLUSHALL1 & FLUSHALL2;
|
|
339
|
-
flushdb: FLUSHDB1 & FLUSHDB2;
|
|
340
|
-
info: INFO1 & INFO2;
|
|
341
|
-
time: () => MethodReturn;
|
|
342
|
-
//
|
|
343
|
-
sadd: (key: string, ...member: any) => MethodReturn;
|
|
344
|
-
scard: (key: string) => MethodReturn;
|
|
345
|
-
sdiff: (...key: any) => MethodReturn;
|
|
346
|
-
sdiffstore: (destination: string, ...key: any) => MethodReturn;
|
|
347
|
-
sinter: (...key: any) => MethodReturn;
|
|
348
|
-
sinterstore: (destination: string, ...key: any) => MethodReturn;
|
|
349
|
-
sismember: (key: string, member: string) => MethodReturn;
|
|
350
|
-
smembers: (key: string) => MethodReturn;
|
|
351
|
-
smove: (source: string, destination: string, member: string) => MethodReturn;
|
|
352
|
-
spop: SPOP1 & SPOP2;
|
|
353
|
-
srandmember: SRANDMEMBER1 & SRANDMEMBER2;
|
|
354
|
-
srem: (key: string, ...member: any) => MethodReturn;
|
|
355
|
-
sunion: (...key: any) => MethodReturn;
|
|
356
|
-
sunionstore: (destination: string, ...key: any) => MethodReturn;
|
|
357
|
-
//
|
|
358
|
-
zadd: (key: string, ...scoreMember: any) => MethodReturn;
|
|
359
|
-
zcard: (key: string) => MethodReturn;
|
|
360
|
-
zcount: (key: string, min: ZSetNumber, max: ZSetNumber) => MethodReturn;
|
|
361
|
-
zincrby: (
|
|
362
|
-
key: string,
|
|
363
|
-
increment: number | string,
|
|
364
|
-
member: string
|
|
365
|
-
) => MethodReturn;
|
|
366
|
-
// TODO: fix args
|
|
367
|
-
zinterstore: (
|
|
368
|
-
destination: string,
|
|
369
|
-
numkeys: number | string,
|
|
370
|
-
...key: any
|
|
371
|
-
) => MethodReturn;
|
|
372
|
-
zlexcount: (key: string, min: ZSetNumber, max: ZSetNumber) => MethodReturn;
|
|
373
|
-
zpopmax: ZPOPMAX1 & ZPOPMAX2;
|
|
374
|
-
zpopmin: ZPOPMAX1 & ZPOPMAX2;
|
|
375
|
-
zrange: ZRANGE1 & ZRANGE2;
|
|
376
|
-
zrangebylex: ZRANGEBYLEX1 & ZRANGEBYLEX2;
|
|
377
|
-
zrangebyscore: ZRANGEBYSCORE1 &
|
|
378
|
-
ZRANGEBYSCORE2 &
|
|
379
|
-
ZRANGEBYSCORE3 &
|
|
380
|
-
ZRANGEBYSCORE4;
|
|
381
|
-
zrank: (key: string, member: string) => MethodReturn;
|
|
382
|
-
zrem: (key: string, ...member: any) => MethodReturn;
|
|
383
|
-
zremrangebylex: (
|
|
384
|
-
key: string,
|
|
385
|
-
min: ZSetNumber,
|
|
386
|
-
max: ZSetNumber
|
|
387
|
-
) => MethodReturn;
|
|
388
|
-
zremrangebyrank: (
|
|
389
|
-
key: string,
|
|
390
|
-
start: number | string,
|
|
391
|
-
stop: number | string
|
|
392
|
-
) => MethodReturn;
|
|
393
|
-
zremrangebyscore: (
|
|
394
|
-
key: string,
|
|
395
|
-
min: ZSetNumber,
|
|
396
|
-
max: ZSetNumber
|
|
397
|
-
) => MethodReturn;
|
|
398
|
-
zrevrange: ZREVRANGE1 & ZREVRANGE2;
|
|
399
|
-
zrevrangebylex: ZREVRANGEBYLEX1 & ZREVRANGEBYLEX2;
|
|
400
|
-
zrevrangebyscore: ZREVRANGEBYSCORE1 &
|
|
401
|
-
ZREVRANGEBYSCORE2 &
|
|
402
|
-
ZREVRANGEBYSCORE3 &
|
|
403
|
-
ZREVRANGEBYSCORE4;
|
|
404
|
-
zrevrank: (key: string, member: string) => MethodReturn;
|
|
405
|
-
zscore: (key: string, member: string) => MethodReturn;
|
|
406
|
-
// TODO: fix args
|
|
407
|
-
zunionstore: (destination: string, ...numkeys: any) => MethodReturn;
|
|
408
|
-
};
|
package/tsconfig.json
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"files": ["src/index-cjs.ts"],
|
|
3
|
-
"exclude": ["./**/dist", "node_modules"],
|
|
4
|
-
"compilerOptions": {
|
|
5
|
-
"declaration": true,
|
|
6
|
-
"lib": ["ES2015", "DOM"],
|
|
7
|
-
"module": "CommonJS",
|
|
8
|
-
"rootDir": "src",
|
|
9
|
-
"outDir": "dist/main",
|
|
10
|
-
"target": "ES2015",
|
|
11
|
-
"strict": true,
|
|
12
|
-
"moduleResolution": "Node",
|
|
13
|
-
"forceConsistentCasingInFileNames": true,
|
|
14
|
-
"stripInternal": true,
|
|
15
|
-
"allowSyntheticDefaultImports": true,
|
|
16
|
-
"esModuleInterop": true,
|
|
17
|
-
"baseUrl": ".",
|
|
18
|
-
"typeRoots": ["./src/types", "node_modules/@types"]
|
|
19
|
-
}
|
|
20
|
-
}
|