@upstash/redis 0.2.1 → 1.0.0-alpha.2
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/.eslintrc.js +49 -0
- package/.prettierrc.js +7 -0
- package/dist/chunk-7YUZYRJS.mjs +29 -0
- package/dist/chunk-FJSI5EBJ.mjs +38 -0
- package/dist/chunk-U7OXAQMQ.mjs +37 -0
- package/dist/chunk-Y5TC4HX2.mjs +798 -0
- package/dist/chunk-ZIB6XPPC.mjs +1061 -0
- package/dist/cloudflare.d.ts +38 -0
- package/dist/cloudflare.js +1738 -0
- package/dist/cloudflare.mjs +35 -0
- package/dist/commands.d.ts +206 -0
- package/dist/commands.js +1201 -0
- package/dist/commands.mjs +219 -0
- package/dist/fastly.d.ts +44 -0
- package/dist/fastly.js +1728 -0
- package/dist/fastly.mjs +25 -0
- package/dist/http.d.ts +29 -0
- package/dist/http.js +84 -0
- package/dist/http.mjs +7 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +1744 -0
- package/dist/index.mjs +13 -0
- package/dist/nodejs.d.ts +47 -0
- package/dist/nodejs.js +1742 -0
- package/dist/nodejs.mjs +10 -0
- package/dist/package.json +1 -0
- package/dist/redis-dd052782.d.ts +962 -0
- package/dist/zunionstore-dffa797d.d.ts +670 -0
- package/jest.config.js +194 -4
- package/package.json +1 -75
- package/pkg/cloudflare.ts +77 -0
- package/pkg/command.ts +40 -0
- package/pkg/commands/append.test.ts +28 -0
- package/pkg/commands/append.ts +10 -0
- package/pkg/commands/bitcount.test.ts +36 -0
- package/pkg/commands/bitcount.ts +19 -0
- package/pkg/commands/bitop.test.ts +44 -0
- package/pkg/commands/bitop.ts +22 -0
- package/pkg/commands/bitpos.test.ts +26 -0
- package/pkg/commands/bitpos.ts +10 -0
- package/pkg/commands/dbsize.test.ts +17 -0
- package/pkg/commands/dbsize.ts +10 -0
- package/pkg/commands/decr.test.ts +22 -0
- package/pkg/commands/decr.ts +10 -0
- package/pkg/commands/decrby.test.ts +23 -0
- package/pkg/commands/decrby.ts +10 -0
- package/pkg/commands/del.test.ts +38 -0
- package/pkg/commands/del.ts +11 -0
- package/pkg/commands/echo.test.ts +11 -0
- package/pkg/commands/echo.ts +10 -0
- package/pkg/commands/exists.test.ts +37 -0
- package/pkg/commands/exists.ts +11 -0
- package/pkg/commands/expire.test.ts +22 -0
- package/pkg/commands/expire.ts +10 -0
- package/pkg/commands/expireat.test.ts +24 -0
- package/pkg/commands/expireat.ts +10 -0
- package/pkg/commands/flushall.test.ts +17 -0
- package/pkg/commands/flushall.ts +13 -0
- package/pkg/commands/flushdb.test.ts +17 -0
- package/pkg/commands/flushdb.ts +13 -0
- package/pkg/commands/get.test.ts +34 -0
- package/pkg/commands/get.ts +10 -0
- package/pkg/commands/getbit.test.ts +16 -0
- package/pkg/commands/getbit.ts +10 -0
- package/pkg/commands/getrange.test.ts +25 -0
- package/pkg/commands/getrange.ts +10 -0
- package/pkg/commands/getset.test.ts +33 -0
- package/pkg/commands/getset.ts +10 -0
- package/pkg/commands/hdel.test.ts +30 -0
- package/pkg/commands/hdel.ts +10 -0
- package/pkg/commands/hexists.test.ts +31 -0
- package/pkg/commands/hexists.ts +10 -0
- package/pkg/commands/hget.test.ts +47 -0
- package/pkg/commands/hget.ts +10 -0
- package/pkg/commands/hgetall.test.ts +32 -0
- package/pkg/commands/hgetall.ts +35 -0
- package/pkg/commands/hincrby.test.ts +27 -0
- package/pkg/commands/hincrby.ts +10 -0
- package/pkg/commands/hincrbyfloat.test.ts +25 -0
- package/pkg/commands/hincrbyfloat.ts +10 -0
- package/pkg/commands/hkeys.test.ts +22 -0
- package/pkg/commands/hkeys.ts +10 -0
- package/pkg/commands/hlen.test.ts +24 -0
- package/pkg/commands/hlen.ts +10 -0
- package/pkg/commands/hmget.test.ts +48 -0
- package/pkg/commands/hmget.ts +41 -0
- package/pkg/commands/hmset.test.ts +24 -0
- package/pkg/commands/hmset.ts +10 -0
- package/pkg/commands/hscan.test.ts +46 -0
- package/pkg/commands/hscan.ts +22 -0
- package/pkg/commands/hset.test.ts +21 -0
- package/pkg/commands/hset.ts +10 -0
- package/pkg/commands/hsetnx.test.ts +37 -0
- package/pkg/commands/hsetnx.ts +10 -0
- package/pkg/commands/hstrlen.test.ts +24 -0
- package/pkg/commands/hstrlen.ts +10 -0
- package/pkg/commands/hvals.test.ts +23 -0
- package/pkg/commands/hvals.ts +10 -0
- package/pkg/commands/incr.test.ts +23 -0
- package/pkg/commands/incr.ts +10 -0
- package/pkg/commands/incrby.test.ts +23 -0
- package/pkg/commands/incrby.ts +10 -0
- package/pkg/commands/incrbyfloat.test.ts +24 -0
- package/pkg/commands/incrbyfloat.ts +10 -0
- package/pkg/commands/index.ts +107 -0
- package/pkg/commands/keys.test.ts +17 -0
- package/pkg/commands/keys.ts +10 -0
- package/pkg/commands/lindex.test.ts +33 -0
- package/pkg/commands/lindex.ts +7 -0
- package/pkg/commands/linsert.test.ts +19 -0
- package/pkg/commands/linsert.ts +6 -0
- package/pkg/commands/llen.test.ts +26 -0
- package/pkg/commands/llen.ts +10 -0
- package/pkg/commands/lpop.test.ts +27 -0
- package/pkg/commands/lpop.ts +10 -0
- package/pkg/commands/lpush.test.ts +17 -0
- package/pkg/commands/lpush.ts +11 -0
- package/pkg/commands/lpushx.test.ts +29 -0
- package/pkg/commands/lpushx.ts +11 -0
- package/pkg/commands/lrange.test.ts +22 -0
- package/pkg/commands/lrange.ts +7 -0
- package/pkg/commands/lrem.test.ts +19 -0
- package/pkg/commands/lrem.ts +6 -0
- package/pkg/commands/lset.test.ts +40 -0
- package/pkg/commands/lset.ts +7 -0
- package/pkg/commands/ltrim.test.ts +29 -0
- package/pkg/commands/ltrim.ts +7 -0
- package/pkg/commands/mget.test.ts +44 -0
- package/pkg/commands/mget.ts +9 -0
- package/pkg/commands/mset.test.ts +24 -0
- package/pkg/commands/mset.ts +10 -0
- package/pkg/commands/msetnx.test.ts +46 -0
- package/pkg/commands/msetnx.ts +10 -0
- package/pkg/commands/persist.test.ts +22 -0
- package/pkg/commands/persist.ts +10 -0
- package/pkg/commands/pexpire.test.ts +24 -0
- package/pkg/commands/pexpire.ts +10 -0
- package/pkg/commands/pexpireat.test.ts +24 -0
- package/pkg/commands/pexpireat.ts +10 -0
- package/pkg/commands/ping.test.ts +19 -0
- package/pkg/commands/ping.ts +13 -0
- package/pkg/commands/psetex.test.ts +23 -0
- package/pkg/commands/psetex.ts +10 -0
- package/pkg/commands/pttl.test.ts +17 -0
- package/pkg/commands/pttl.ts +10 -0
- package/pkg/commands/randomkey.test.ts +17 -0
- package/pkg/commands/randomkey.ts +10 -0
- package/pkg/commands/rename.test.ts +18 -0
- package/pkg/commands/rename.ts +10 -0
- package/pkg/commands/renamenx.test.ts +32 -0
- package/pkg/commands/renamenx.ts +10 -0
- package/pkg/commands/rpop.test.ts +27 -0
- package/pkg/commands/rpop.ts +10 -0
- package/pkg/commands/rpush.test.ts +17 -0
- package/pkg/commands/rpush.ts +11 -0
- package/pkg/commands/rpushx.test.ts +29 -0
- package/pkg/commands/rpushx.ts +11 -0
- package/pkg/commands/sadd.test.ts +16 -0
- package/pkg/commands/sadd.ts +11 -0
- package/pkg/commands/scan.test.ts +50 -0
- package/pkg/commands/scan.ts +21 -0
- package/pkg/commands/scard.test.ts +15 -0
- package/pkg/commands/scard.ts +9 -0
- package/pkg/commands/sdiff.test.ts +20 -0
- package/pkg/commands/sdiff.ts +9 -0
- package/pkg/commands/sdiffstore.test.ts +21 -0
- package/pkg/commands/sdiffstore.ts +10 -0
- package/pkg/commands/set.test.ts +112 -0
- package/pkg/commands/set.ts +53 -0
- package/pkg/commands/setbit.test.ts +16 -0
- package/pkg/commands/setbit.ts +10 -0
- package/pkg/commands/setex.test.ts +22 -0
- package/pkg/commands/setex.ts +10 -0
- package/pkg/commands/setnx.test.ts +27 -0
- package/pkg/commands/setnx.ts +10 -0
- package/pkg/commands/setrange.test.ts +25 -0
- package/pkg/commands/setrange.ts +10 -0
- package/pkg/commands/sinter.test.ts +36 -0
- package/pkg/commands/sinter.ts +9 -0
- package/pkg/commands/sinterstore.test.ts +21 -0
- package/pkg/commands/sinterstore.ts +9 -0
- package/pkg/commands/sismember.test.ts +30 -0
- package/pkg/commands/sismember.ts +9 -0
- package/pkg/commands/smembers.test.ts +22 -0
- package/pkg/commands/smembers.ts +10 -0
- package/pkg/commands/smove.test.ts +18 -0
- package/pkg/commands/smove.ts +9 -0
- package/pkg/commands/spop.test.ts +35 -0
- package/pkg/commands/spop.ts +13 -0
- package/pkg/commands/srandmember.test.ts +32 -0
- package/pkg/commands/srandmember.ts +13 -0
- package/pkg/commands/srem.test.ts +18 -0
- package/pkg/commands/srem.ts +10 -0
- package/pkg/commands/sscan.test.ts +50 -0
- package/pkg/commands/sscan.ts +22 -0
- package/pkg/commands/strlen.test.ts +16 -0
- package/pkg/commands/strlen.ts +10 -0
- package/pkg/commands/sunion.test.ts +22 -0
- package/pkg/commands/sunion.ts +10 -0
- package/pkg/commands/sunionstore.test.ts +29 -0
- package/pkg/commands/sunionstore.ts +10 -0
- package/pkg/commands/time.test.ts +11 -0
- package/pkg/commands/time.ts +9 -0
- package/pkg/commands/touch.test.ts +20 -0
- package/pkg/commands/touch.ts +10 -0
- package/pkg/commands/ttl.test.ts +17 -0
- package/pkg/commands/ttl.ts +10 -0
- package/pkg/commands/type.test.ts +72 -0
- package/pkg/commands/type.ts +11 -0
- package/pkg/commands/unlink.test.ts +21 -0
- package/pkg/commands/unlink.ts +10 -0
- package/pkg/commands/zadd.test.ts +177 -0
- package/pkg/commands/zadd.ts +64 -0
- package/pkg/commands/zcard.test.ts +15 -0
- package/pkg/commands/zcard.ts +10 -0
- package/pkg/commands/zcount.test.ts +15 -0
- package/pkg/commands/zcount.ts +9 -0
- package/pkg/commands/zincrby.test.ts +20 -0
- package/pkg/commands/zincrby.ts +9 -0
- package/pkg/commands/zinterstore.test.ts +239 -0
- package/pkg/commands/zinterstore.ts +55 -0
- package/pkg/commands/zlexcount.test.ts +22 -0
- package/pkg/commands/zlexcount.ts +9 -0
- package/pkg/commands/zpopmax.test.ts +45 -0
- package/pkg/commands/zpopmax.ts +13 -0
- package/pkg/commands/zpopmin.test.ts +49 -0
- package/pkg/commands/zpopmin.ts +13 -0
- package/pkg/commands/zrange.test.ts +52 -0
- package/pkg/commands/zrange.ts +22 -0
- package/pkg/commands/zrank.test.ts +22 -0
- package/pkg/commands/zrank.ts +10 -0
- package/pkg/commands/zrem.test.ts +20 -0
- package/pkg/commands/zrem.ts +10 -0
- package/pkg/commands/zremrangebylex.test.ts +26 -0
- package/pkg/commands/zremrangebylex.ts +9 -0
- package/pkg/commands/zremrangebyrank.test.ts +27 -0
- package/pkg/commands/zremrangebyrank.ts +9 -0
- package/pkg/commands/zremrangebyscore.test.ts +24 -0
- package/pkg/commands/zremrangebyscore.ts +9 -0
- package/pkg/commands/zrevrank.test.ts +22 -0
- package/pkg/commands/zrevrank.ts +10 -0
- package/pkg/commands/zscan.test.ts +50 -0
- package/pkg/commands/zscan.ts +22 -0
- package/pkg/commands/zscore.test.ts +18 -0
- package/pkg/commands/zscore.ts +10 -0
- package/pkg/commands/zunionstore.test.ts +215 -0
- package/pkg/commands/zunionstore.ts +55 -0
- package/pkg/commands/zz.ts +1 -0
- package/pkg/error.ts +9 -0
- package/pkg/fastly.ts +54 -0
- package/pkg/http.test.ts +34 -0
- package/pkg/http.ts +62 -0
- package/pkg/index.ts +2 -0
- package/pkg/nodejs.ts +83 -0
- package/pkg/pipeline.test.ts +177 -0
- package/pkg/pipeline.ts +999 -0
- package/pkg/redis.ts +930 -0
- package/pkg/test-utils.ts +41 -0
- package/pkg/types.ts +4 -0
- package/pkg/util.ts +22 -0
- package/pnpm-lock.yaml +3940 -0
- package/tsconfig.json +96 -16
- package/tsup.config.ts +16 -0
- package/README.md +0 -63
- package/dist/main/client.d.ts +0 -21
- package/dist/main/client.js +0 -564
- package/dist/main/index-cjs.d.ts +0 -1
- package/dist/main/index-cjs.js +0 -120
- package/dist/main/types.d.ts +0 -179
- package/dist/main/types.js +0 -2
- package/dist/module/client.d.ts +0 -21
- package/dist/module/client.js +0 -559
- package/dist/module/index.d.ts +0 -3
- package/dist/module/index.js +0 -3
- package/dist/module/types.d.ts +0 -179
- package/dist/module/types.js +0 -1
- package/src/client.ts +0 -626
- package/src/index-cjs.ts +0 -117
- package/src/index.ts +0 -118
- package/src/types.ts +0 -410
package/dist/main/types.d.ts
DELETED
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
export declare type ClientObjectProps = {
|
|
2
|
-
url?: undefined | string;
|
|
3
|
-
token?: undefined | string;
|
|
4
|
-
requestOptions?: undefined | RequestInit;
|
|
5
|
-
};
|
|
6
|
-
export declare type ReturnType = {
|
|
7
|
-
data: string | number | [] | any;
|
|
8
|
-
error: string | null;
|
|
9
|
-
};
|
|
10
|
-
export declare type MethodReturn = Promise<ReturnType>;
|
|
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;
|
|
15
|
-
declare type Auth1 = (options?: ClientObjectProps) => void;
|
|
16
|
-
declare type Auth2 = (url?: string, token?: string) => void;
|
|
17
|
-
declare type Auth3 = (url?: string | ClientObjectProps, token?: string) => void;
|
|
18
|
-
declare type SET1 = (key: string, value: string | number) => MethodReturn;
|
|
19
|
-
declare type SET2 = (key: string, value: string | number, timeType: 'EX' | 'PX', time: number | string) => MethodReturn;
|
|
20
|
-
declare type BITCOUNT1 = (key: string) => MethodReturn;
|
|
21
|
-
declare type BITCOUNT2 = (key: string, start: number | string, end: number | string) => MethodReturn;
|
|
22
|
-
declare type BITPOS1 = (key: string, bit: Bit) => MethodReturn;
|
|
23
|
-
declare type BITPOS2 = (key: string, bit: Bit, start: number) => MethodReturn;
|
|
24
|
-
declare type BITPOS3 = (key: string, bit: Bit, start: number, end: number) => MethodReturn;
|
|
25
|
-
declare type PING1 = () => MethodReturn;
|
|
26
|
-
declare type PING2 = (message: string) => MethodReturn;
|
|
27
|
-
declare type SCAN1 = (cursor: number | string) => MethodReturn;
|
|
28
|
-
declare type SCAN2 = (cursor: number | string, match: 'MATCH', pattern: string) => MethodReturn;
|
|
29
|
-
declare type SCAN3 = (cursor: number | string, count: 'COUNT', value: number | string) => MethodReturn;
|
|
30
|
-
declare type SCAN4 = (cursor: number | string, match: 'MATCH', pattern: string, count: 'COUNT', value: number | string) => MethodReturn;
|
|
31
|
-
declare type FLUSHALL1 = () => MethodReturn;
|
|
32
|
-
declare type FLUSHALL2 = (mode: 'ASYNC') => MethodReturn;
|
|
33
|
-
declare type FLUSHDB1 = () => MethodReturn;
|
|
34
|
-
declare type FLUSHDB2 = (mode: 'ASYNC' | 'SYNC') => MethodReturn;
|
|
35
|
-
declare type INFO1 = () => MethodReturn;
|
|
36
|
-
declare type INFO2 = (section: string) => MethodReturn;
|
|
37
|
-
declare type XSCAN1 = (key: string, cursor: number | string) => MethodReturn;
|
|
38
|
-
declare type XSCAN2 = (key: string, cursor: number | string, match: 'MATCH', pattern: string) => MethodReturn;
|
|
39
|
-
declare type XSCAN3 = (key: string, cursor: number | string, count: 'COUNT', value: number | string) => MethodReturn;
|
|
40
|
-
declare type XSCAN4 = (key: string, cursor: number | string, match: 'MATCH', pattern: string, count: 'COUNT', value: number | string) => MethodReturn;
|
|
41
|
-
declare type SPOP1 = (key: string) => MethodReturn;
|
|
42
|
-
declare type SPOP2 = (key: string, count: number) => MethodReturn;
|
|
43
|
-
declare type SRANDMEMBER1 = (key: string) => MethodReturn;
|
|
44
|
-
declare type SRANDMEMBER2 = (key: string, count: number) => MethodReturn;
|
|
45
|
-
declare type ZPOPMAX1 = (key: string) => MethodReturn;
|
|
46
|
-
declare type ZPOPMAX2 = (key: string, count: number | string) => MethodReturn;
|
|
47
|
-
declare type ZRANGE1 = (key: string, min: ZSetNumber, max: ZSetNumber) => MethodReturn;
|
|
48
|
-
declare type ZRANGE2 = (key: string, min: ZSetNumber, max: ZSetNumber, withscores: 'WITHSCORES') => MethodReturn;
|
|
49
|
-
declare type ZRANGEBYLEX1 = (key: string, min: ZSetNumber, max: ZSetNumber) => MethodReturn;
|
|
50
|
-
declare type ZRANGEBYLEX2 = (key: string, min: ZSetNumber, max: ZSetNumber, limit: 'LIMIT', offset: number | string, count: number | string) => MethodReturn;
|
|
51
|
-
declare type ZRANGEBYSCORE1 = (key: string, min: ZSetNumber, max: ZSetNumber) => MethodReturn;
|
|
52
|
-
declare type ZRANGEBYSCORE2 = (key: string, min: ZSetNumber, max: ZSetNumber, withScores: 'WITHSCORES') => MethodReturn;
|
|
53
|
-
declare type ZRANGEBYSCORE3 = (key: string, min: ZSetNumber, max: ZSetNumber, limit: 'LIMIT', offset: number | string, count: number | string) => MethodReturn;
|
|
54
|
-
declare type ZRANGEBYSCORE4 = (key: string, min: ZSetNumber, max: ZSetNumber, withScores: 'WITHSCORES', limit: 'LIMIT', offset: number | string, count: number | string) => MethodReturn;
|
|
55
|
-
declare type ZREVRANGEBYLEX1 = (key: string, max: ZSetNumber, min: ZSetNumber) => MethodReturn;
|
|
56
|
-
declare type ZREVRANGEBYLEX2 = (key: string, max: ZSetNumber, min: ZSetNumber, limit: 'LIMIT', offset: number | string, count: number | string) => MethodReturn;
|
|
57
|
-
declare type ZREVRANGEBYSCORE1 = (key: string, max: ZSetNumber, min: ZSetNumber) => MethodReturn;
|
|
58
|
-
declare type ZREVRANGEBYSCORE2 = (key: string, max: ZSetNumber, min: ZSetNumber, withScores: 'WITHSCORES') => MethodReturn;
|
|
59
|
-
declare type ZREVRANGEBYSCORE3 = (key: string, max: ZSetNumber, min: ZSetNumber, limit: 'LIMIT', offset: number | string, count: number | string) => MethodReturn;
|
|
60
|
-
declare type ZREVRANGEBYSCORE4 = (key: string, max: ZSetNumber, min: ZSetNumber, withScores: 'WITHSCORES', limit: 'LIMIT', offset: number | string, count: number | string) => MethodReturn;
|
|
61
|
-
declare type ZREVRANGE1 = (key: string, start: number | string, stop: number | string) => MethodReturn;
|
|
62
|
-
declare type ZREVRANGE2 = (key: string, start: number | string, stop: number | string, withscores: 'WITHSCORES') => MethodReturn;
|
|
63
|
-
export declare type Upstash = {
|
|
64
|
-
auth: Auth1 & Auth2 & Auth3;
|
|
65
|
-
append: (key: string, value: string) => MethodReturn;
|
|
66
|
-
decr: (key: string) => MethodReturn;
|
|
67
|
-
decrby: (key: string, decrement: number | string) => MethodReturn;
|
|
68
|
-
get: (key: string) => MethodReturn;
|
|
69
|
-
getrange: (key: string, start: number | string, end: number | string) => MethodReturn;
|
|
70
|
-
getset: (key: string, value: string) => MethodReturn;
|
|
71
|
-
incr: (key: string) => MethodReturn;
|
|
72
|
-
incrby: (key: string, increment: number | string) => MethodReturn;
|
|
73
|
-
incrbyfloat: (key: string, increment: number | string) => MethodReturn;
|
|
74
|
-
mget: (...key: any) => MethodReturn;
|
|
75
|
-
mset: (...keyValue: any) => MethodReturn;
|
|
76
|
-
msetnx: (...keyValue: any) => MethodReturn;
|
|
77
|
-
psetex: (key: string, miliseconds: number | string, value: string) => MethodReturn;
|
|
78
|
-
set: SET1 & SET2;
|
|
79
|
-
setex: (key: string, seconds: number | string, value: string) => MethodReturn;
|
|
80
|
-
setnx: (key: string, value: string) => MethodReturn;
|
|
81
|
-
setrange: (key: string, offset: number | string, value: string) => MethodReturn;
|
|
82
|
-
strlen: (key: string) => MethodReturn;
|
|
83
|
-
bitcount: BITCOUNT1 & BITCOUNT2;
|
|
84
|
-
bitop: (operation: 'AND' | 'OR' | 'XOR' | 'NOT', destKey: string, ...key: any) => MethodReturn;
|
|
85
|
-
bitpos: BITPOS1 & BITPOS2 & BITPOS3;
|
|
86
|
-
getbit: (key: string, offset: number | string) => MethodReturn;
|
|
87
|
-
setbit: (key: string, offset: number | string, value: Bit) => MethodReturn;
|
|
88
|
-
echo: (message: string) => MethodReturn;
|
|
89
|
-
ping: PING1 & PING2;
|
|
90
|
-
hdel: (key: string, ...field: any) => MethodReturn;
|
|
91
|
-
hexists: (key: string, field: string) => MethodReturn;
|
|
92
|
-
hget: (key: string, field: string) => MethodReturn;
|
|
93
|
-
hgetall: (key: string) => MethodReturn;
|
|
94
|
-
hincrby: (key: string, field: string, increment: number | string) => MethodReturn;
|
|
95
|
-
hincrbyfloat: (key: string, field: string, increment: number | string) => MethodReturn;
|
|
96
|
-
hkeys: (key: string) => MethodReturn;
|
|
97
|
-
hlen: (key: string) => MethodReturn;
|
|
98
|
-
hmget: (key: string, ...field: any) => MethodReturn;
|
|
99
|
-
hmset: (key: string, ...fieldValue: any) => MethodReturn;
|
|
100
|
-
hscan: XSCAN1 & XSCAN2 & XSCAN3 & XSCAN4;
|
|
101
|
-
hset: (key: string, ...fieldValue: any) => MethodReturn;
|
|
102
|
-
hsetnx: (key: string, field: string, value: string) => MethodReturn;
|
|
103
|
-
hvals: (key: string) => MethodReturn;
|
|
104
|
-
del: (...key: any) => MethodReturn;
|
|
105
|
-
exists: (...key: any) => MethodReturn;
|
|
106
|
-
expire: (key: string, seconds: number | string) => MethodReturn;
|
|
107
|
-
expireat: (key: string, timestamp: number | string) => MethodReturn;
|
|
108
|
-
keys: (pattern: string) => MethodReturn;
|
|
109
|
-
persist: (key: string) => MethodReturn;
|
|
110
|
-
pexpire: (key: string, miliseconds: number | string) => MethodReturn;
|
|
111
|
-
pexpireat: (key: string, milisecondsTimestamp: number | string) => MethodReturn;
|
|
112
|
-
pttl: (key: string) => MethodReturn;
|
|
113
|
-
randomkey: () => MethodReturn;
|
|
114
|
-
rename: (key: string, newKey: string) => MethodReturn;
|
|
115
|
-
renamenx: (key: string, newKey: string) => MethodReturn;
|
|
116
|
-
scan: SCAN1 & SCAN2 & SCAN3 & SCAN4;
|
|
117
|
-
touch: (...key: any) => MethodReturn;
|
|
118
|
-
ttl: (key: string) => MethodReturn;
|
|
119
|
-
type: (key: string) => MethodReturn;
|
|
120
|
-
unlink: (...key: any) => MethodReturn;
|
|
121
|
-
lindex: (key: string, index: number | string) => MethodReturn;
|
|
122
|
-
linsert: (key: string, option: 'BEFORE' | 'AFTER', pivot: string, element: string) => MethodReturn;
|
|
123
|
-
llen: (key: string) => MethodReturn;
|
|
124
|
-
lpop: (key: string) => MethodReturn;
|
|
125
|
-
lpush: (key: string, ...element: any) => MethodReturn;
|
|
126
|
-
lpushx: (key: string, ...element: any) => MethodReturn;
|
|
127
|
-
lrange: (key: string, start: number | string, stop: number | string) => MethodReturn;
|
|
128
|
-
lrem: (key: string, count: number | string, element: string) => MethodReturn;
|
|
129
|
-
lset: (key: string, index: number | string, element: string) => MethodReturn;
|
|
130
|
-
ltrim: (key: string, start: number | string, stop: number | string) => MethodReturn;
|
|
131
|
-
rpop: (key: string) => MethodReturn;
|
|
132
|
-
rpoplpush: (source: string, destination: string) => MethodReturn;
|
|
133
|
-
rpush: (key: string, ...element: any) => MethodReturn;
|
|
134
|
-
rpushx: (key: string, ...element: any) => MethodReturn;
|
|
135
|
-
dbsize: () => MethodReturn;
|
|
136
|
-
flushall: FLUSHALL1 & FLUSHALL2;
|
|
137
|
-
flushdb: FLUSHDB1 & FLUSHDB2;
|
|
138
|
-
info: INFO1 & INFO2;
|
|
139
|
-
time: () => MethodReturn;
|
|
140
|
-
sadd: (key: string, ...member: any) => MethodReturn;
|
|
141
|
-
scard: (key: string) => MethodReturn;
|
|
142
|
-
sdiff: (...key: any) => MethodReturn;
|
|
143
|
-
sdiffstore: (destination: string, ...key: any) => MethodReturn;
|
|
144
|
-
sinter: (...key: any) => MethodReturn;
|
|
145
|
-
sinterstore: (destination: string, ...key: any) => MethodReturn;
|
|
146
|
-
sismember: (key: string, member: string) => MethodReturn;
|
|
147
|
-
smembers: (key: string) => MethodReturn;
|
|
148
|
-
smove: (source: string, destination: string, member: string) => MethodReturn;
|
|
149
|
-
spop: SPOP1 & SPOP2;
|
|
150
|
-
srandmember: SRANDMEMBER1 & SRANDMEMBER2;
|
|
151
|
-
srem: (key: string, ...member: any) => MethodReturn;
|
|
152
|
-
sscan: XSCAN1 & XSCAN2 & XSCAN3 & XSCAN4;
|
|
153
|
-
sunion: (...key: any) => MethodReturn;
|
|
154
|
-
sunionstore: (destination: string, ...key: any) => MethodReturn;
|
|
155
|
-
zadd: (key: string, ...scoreMember: any) => MethodReturn;
|
|
156
|
-
zcard: (key: string) => MethodReturn;
|
|
157
|
-
zcount: (key: string, min: ZSetNumber, max: ZSetNumber) => MethodReturn;
|
|
158
|
-
zincrby: (key: string, increment: number | string, member: string) => MethodReturn;
|
|
159
|
-
zinterstore: (destination: string, numkeys: number | string, ...key: any) => MethodReturn;
|
|
160
|
-
zlexcount: (key: string, min: ZSetNumber, max: ZSetNumber) => MethodReturn;
|
|
161
|
-
zpopmax: ZPOPMAX1 & ZPOPMAX2;
|
|
162
|
-
zpopmin: ZPOPMAX1 & ZPOPMAX2;
|
|
163
|
-
zrange: ZRANGE1 & ZRANGE2;
|
|
164
|
-
zrangebylex: ZRANGEBYLEX1 & ZRANGEBYLEX2;
|
|
165
|
-
zrangebyscore: ZRANGEBYSCORE1 & ZRANGEBYSCORE2 & ZRANGEBYSCORE3 & ZRANGEBYSCORE4;
|
|
166
|
-
zrank: (key: string, member: string) => MethodReturn;
|
|
167
|
-
zrem: (key: string, ...member: any) => MethodReturn;
|
|
168
|
-
zremrangebylex: (key: string, min: ZSetNumber, max: ZSetNumber) => MethodReturn;
|
|
169
|
-
zremrangebyrank: (key: string, start: number | string, stop: number | string) => MethodReturn;
|
|
170
|
-
zremrangebyscore: (key: string, min: ZSetNumber, max: ZSetNumber) => MethodReturn;
|
|
171
|
-
zrevrange: ZREVRANGE1 & ZREVRANGE2;
|
|
172
|
-
zrevrangebylex: ZREVRANGEBYLEX1 & ZREVRANGEBYLEX2;
|
|
173
|
-
zrevrangebyscore: ZREVRANGEBYSCORE1 & ZREVRANGEBYSCORE2 & ZREVRANGEBYSCORE3 & ZREVRANGEBYSCORE4;
|
|
174
|
-
zrevrank: (key: string, member: string) => MethodReturn;
|
|
175
|
-
zscan: XSCAN1 & XSCAN2 & XSCAN3 & XSCAN4;
|
|
176
|
-
zscore: (key: string, member: string) => MethodReturn;
|
|
177
|
-
zunionstore: (destination: string, ...numkeys: any) => MethodReturn;
|
|
178
|
-
};
|
|
179
|
-
export {};
|
package/dist/main/types.js
DELETED
package/dist/module/client.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ClientObjectProps, Upstash } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Creates a Upstash Redis instance
|
|
4
|
-
*
|
|
5
|
-
* @constructor
|
|
6
|
-
* @param {Object} options
|
|
7
|
-
* @param {string} [options.url]
|
|
8
|
-
* @param {string} [options.token]
|
|
9
|
-
* @param {Object} [options.requestOptions]
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```js
|
|
13
|
-
* import upstash from '@upstash/redis'
|
|
14
|
-
*
|
|
15
|
-
* const redis1 = upstash('url', token);
|
|
16
|
-
* const redis2 = upstash({ url: '', token: '', requestOptions: {} });
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
declare function upstash(options?: ClientObjectProps): Upstash;
|
|
20
|
-
declare function upstash(url?: string, token?: string): Upstash;
|
|
21
|
-
export default upstash;
|