@upstash/redis 0.1.8 → 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/dist/main/types.d.ts +143 -111
- package/dist/module/index.d.ts +30 -1
- package/dist/module/types.d.ts +143 -111
- package/package.json +1 -1
- package/src/types.ts +210 -111
package/dist/main/types.d.ts
CHANGED
|
@@ -9,121 +9,153 @@ export declare type ReturnType = {
|
|
|
9
9
|
};
|
|
10
10
|
export declare type MethodReturn = Promise<ReturnType>;
|
|
11
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;
|
|
12
15
|
declare type Auth1 = (options?: ClientObjectProps) => void;
|
|
13
16
|
declare type Auth2 = (url?: string, token?: string) => void;
|
|
14
17
|
declare type Auth3 = (url?: string | ClientObjectProps, token?: string) => void;
|
|
15
18
|
export declare type Upstash = {
|
|
16
19
|
auth: Auth1 & Auth2 & Auth3;
|
|
17
|
-
append: (
|
|
18
|
-
decr: (
|
|
19
|
-
decrby: (
|
|
20
|
-
get: (
|
|
21
|
-
getrange: (
|
|
22
|
-
getset: (
|
|
23
|
-
incr: (
|
|
24
|
-
incrby: (
|
|
25
|
-
incrbyfloat: (
|
|
26
|
-
mget: (
|
|
27
|
-
mset: (
|
|
28
|
-
msetnx: (
|
|
29
|
-
psetex: (
|
|
30
|
-
set: (
|
|
31
|
-
setex: (
|
|
32
|
-
setnx: (
|
|
33
|
-
setrange: (
|
|
34
|
-
strlen: (
|
|
35
|
-
bitcount: (
|
|
36
|
-
bitop: (
|
|
37
|
-
bitpos: (
|
|
38
|
-
getbit: (
|
|
39
|
-
setbit: (
|
|
40
|
-
echo: (
|
|
41
|
-
ping: (
|
|
42
|
-
hdel: (
|
|
43
|
-
hexists: (
|
|
44
|
-
hget: (
|
|
45
|
-
hgetall: (
|
|
46
|
-
hincrby: (
|
|
47
|
-
hincrbyfloat: (
|
|
48
|
-
hkeys: (
|
|
49
|
-
hlen: (
|
|
50
|
-
hmget: (
|
|
51
|
-
hmset: (
|
|
52
|
-
hscan: (
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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
|
-
|
|
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;
|
|
128
160
|
};
|
|
129
161
|
export {};
|
package/dist/module/index.d.ts
CHANGED
|
@@ -1,3 +1,32 @@
|
|
|
1
1
|
import upstash from './client';
|
|
2
2
|
export default upstash;
|
|
3
|
-
export declare const auth: ((options?: import("./types").ClientObjectProps | undefined) => void) & ((url?: string | undefined, token?: string | undefined) => void) & ((url?: string | import("./types").ClientObjectProps | undefined, token?: string | undefined) => void), append: (
|
|
3
|
+
export declare const auth: ((options?: import("./types").ClientObjectProps | undefined) => void) & ((url?: string | undefined, token?: string | undefined) => void) & ((url?: string | import("./types").ClientObjectProps | undefined, token?: string | undefined) => void), append: (key: string, value: string) => import("./types").MethodReturn, decr: (key: string) => import("./types").MethodReturn, decrby: (key: string, decrement: number) => import("./types").MethodReturn, get: (key: string) => import("./types").MethodReturn, getrange: (key: string, start: number, end: number) => import("./types").MethodReturn, getset: (key: string, value: string) => import("./types").MethodReturn, incr: (key: string) => import("./types").MethodReturn, incrby: (key: string, value: string | number) => import("./types").MethodReturn, incrbyfloat: (key: string, value: string | number) => import("./types").MethodReturn, mget: (values: string[]) => import("./types").MethodReturn, mset: (values: string[]) => import("./types").MethodReturn, msetnx: (values: string[]) => import("./types").MethodReturn, psetex: (key: string, miliseconds: number, value: string | number) => import("./types").MethodReturn, set: (key: string, value: string | number) => import("./types").MethodReturn, setex: (key: string, seconds: number, value: string | number) => import("./types").MethodReturn, setnx: (key: string, value: string) => import("./types").MethodReturn, setrange: (key: string, offset: string | number, value: string) => import("./types").MethodReturn, strlen: (key: string) => import("./types").MethodReturn, bitcount: (key: string, start?: number | undefined, end?: number | undefined) => import("./types").MethodReturn, bitop: (operation: "AND" | "OR" | "XOR" | "NOT", destinationKey: string, sourceKeys: string[]) => import("./types").MethodReturn, bitpos: (key: string, bit: import("./types").Bit, start?: number | undefined, end?: number | undefined) => import("./types").MethodReturn, getbit: (key: string, offset: number) => import("./types").MethodReturn, setbit: (key: string, offset: number, value: import("./types").Bit) => import("./types").MethodReturn, echo: (value: string) => import("./types").MethodReturn, ping: (value?: string | undefined) => import("./types").MethodReturn, hdel: (key: string, fields: string[]) => import("./types").MethodReturn, hexists: (key: string, field: string) => import("./types").MethodReturn, hget: (key: string, field: string) => import("./types").MethodReturn, hgetall: (key: string) => import("./types").MethodReturn, hincrby: (key: string, field: string, increment: string | number) => import("./types").MethodReturn, hincrbyfloat: (key: string, field: string, increment: string | number) => import("./types").MethodReturn, hkeys: (key: string) => import("./types").MethodReturn, hlen: (key: string) => import("./types").MethodReturn, hmget: (key: string, fields: string[]) => import("./types").MethodReturn, hmset: (key: string, values: string[]) => import("./types").MethodReturn, hscan: (key: string, cursor: number, options?: {
|
|
4
|
+
match?: string | number | undefined;
|
|
5
|
+
count?: string | number | undefined;
|
|
6
|
+
} | undefined) => import("./types").MethodReturn, hset: (key: string, values: string[]) => import("./types").MethodReturn, hsetnx: (key: string, field: string, value: string) => import("./types").MethodReturn, hvals: (key: string) => import("./types").MethodReturn, del: (keys: string[]) => import("./types").MethodReturn, exists: (keys: string[]) => import("./types").MethodReturn, expire: (key: string, seconds: number) => import("./types").MethodReturn, expireat: (key: string, timestamp: string | number) => import("./types").MethodReturn, keys: (pattern: string) => import("./types").MethodReturn, persist: (key: string) => import("./types").MethodReturn, pexpire: (key: string, miliseconds: number) => import("./types").MethodReturn, pexpireat: (key: string, miliseconds: number) => import("./types").MethodReturn, pttl: (key: string) => import("./types").MethodReturn, randomkey: () => import("./types").MethodReturn, rename: (key: string, newKey: string) => import("./types").MethodReturn, renamenx: (key: string, newKey: string) => import("./types").MethodReturn, scan: (cursor: number, opitons?: {
|
|
7
|
+
match?: string | number | undefined;
|
|
8
|
+
count?: string | number | undefined;
|
|
9
|
+
} | undefined) => import("./types").MethodReturn, touch: (keys: string[]) => import("./types").MethodReturn, ttl: (key: string) => import("./types").MethodReturn, type: (key: string) => import("./types").MethodReturn, unlink: (keys: string[]) => import("./types").MethodReturn, lindex: (key: string, index: number) => import("./types").MethodReturn, linsert: (key: string, option: "BEFORE" | "AFTER", pivot: string, element: string) => import("./types").MethodReturn, llen: (key: string) => import("./types").MethodReturn, lpop: (key: string) => import("./types").MethodReturn, lpush: (key: string, elements: string[]) => import("./types").MethodReturn, lpushx: (key: string, elements: string[]) => import("./types").MethodReturn, lrange: (key: string, start: number, stop: number) => import("./types").MethodReturn, lrem: (key: string, count: number, element: string) => import("./types").MethodReturn, lset: (key: string, index: number, element: string) => import("./types").MethodReturn, ltrim: (key: string, start: number, stop: number) => import("./types").MethodReturn, rpop: (key: string) => import("./types").MethodReturn, rpoplpush: (source: string, destination: string) => import("./types").MethodReturn, rpush: (key: string, elements: string[]) => import("./types").MethodReturn, rpushx: (key: string, elements: string[]) => import("./types").MethodReturn, dbsize: () => import("./types").MethodReturn, flushall: (mode?: "ASYNC" | undefined) => import("./types").MethodReturn, flushdb: (mode?: "ASYNC" | undefined) => import("./types").MethodReturn, info: () => import("./types").MethodReturn, time: () => import("./types").MethodReturn, sadd: (key: string, members: string[]) => import("./types").MethodReturn, scard: (key: string) => import("./types").MethodReturn, sdiff: (keys: string[]) => import("./types").MethodReturn, sdiffstore: (destination: string, keys: string[]) => import("./types").MethodReturn, sinter: (keys: string[]) => import("./types").MethodReturn, sinterstore: (destination: string, keys: string[]) => import("./types").MethodReturn, sismember: (key: string, member: string) => import("./types").MethodReturn, smembers: (key: string) => import("./types").MethodReturn, smove: (source: string, destination: string, member: string) => import("./types").MethodReturn, spop: (key: string, count?: number | undefined) => import("./types").MethodReturn, srandmember: (key: string, count?: number | undefined) => import("./types").MethodReturn, srem: (key: string, members: string[]) => import("./types").MethodReturn, sunion: (keys: string[]) => import("./types").MethodReturn, sunionstore: (destination: string, keys: string[]) => import("./types").MethodReturn, zadd: (key: string, values: import("./types").ZSetNumber[], options?: (({
|
|
10
|
+
xx?: boolean | undefined;
|
|
11
|
+
} | {
|
|
12
|
+
nx?: boolean | undefined;
|
|
13
|
+
}) & {
|
|
14
|
+
ch?: boolean | undefined;
|
|
15
|
+
incr: boolean;
|
|
16
|
+
}) | undefined) => import("./types").MethodReturn, zcard: (key: string) => import("./types").MethodReturn, zcount: (key: string, min: import("./types").ZSetNumber, max: import("./types").ZSetNumber) => import("./types").MethodReturn, zincrby: (key: string, increment: string | number, member: string) => import("./types").MethodReturn, zinterstore: (destination: string, keys: string[], options?: {
|
|
17
|
+
weights?: number[] | undefined;
|
|
18
|
+
aggregate?: "MIN" | "MAX" | "SUM" | undefined;
|
|
19
|
+
} | undefined) => import("./types").MethodReturn, zlexcount: (key: string, min: import("./types").ZSetNumber, max: import("./types").ZSetNumber) => import("./types").MethodReturn, zpopmax: (key: string, count?: number | undefined) => import("./types").MethodReturn, zpopmin: (key: string, count?: number | undefined) => import("./types").MethodReturn, zrange: (key: string, min: import("./types").ZSetNumber, max: import("./types").ZSetNumber, options?: {
|
|
20
|
+
withScores: boolean;
|
|
21
|
+
} | undefined) => import("./types").MethodReturn, zrangebylex: (key: string, min: import("./types").ZSetNumber, max: import("./types").ZSetNumber, offset?: number | undefined, count?: number | undefined) => import("./types").MethodReturn, zrangebyscore: (key: string, min: import("./types").ZSetNumber, max: import("./types").ZSetNumber, options?: {
|
|
22
|
+
withScores?: boolean | undefined;
|
|
23
|
+
limit?: {
|
|
24
|
+
offset: number;
|
|
25
|
+
count: number;
|
|
26
|
+
} | undefined;
|
|
27
|
+
} | undefined) => import("./types").MethodReturn, zrank: (key: string, member: string) => import("./types").MethodReturn, zrem: (key: string, members: string[]) => import("./types").MethodReturn, zremrangebylex: (key: string, min: import("./types").ZSetNumber, max: import("./types").ZSetNumber) => import("./types").MethodReturn, zremrangebyrank: (key: string, start: number, stop: number) => import("./types").MethodReturn, zremrangebyscore: (key: string, min: import("./types").ZSetNumber, max: import("./types").ZSetNumber) => import("./types").MethodReturn, zrevrange: (key: string, start: number, stop: number, options?: {
|
|
28
|
+
withScores: boolean;
|
|
29
|
+
} | undefined) => import("./types").MethodReturn, zrevrangebylex: (key: string, max: import("./types").ZSetNumber, min: import("./types").ZSetNumber, offset?: number | undefined, count?: number | undefined) => import("./types").MethodReturn, zrevrangebyscore: (key: string, min: import("./types").ZSetNumber, max: import("./types").ZSetNumber) => import("./types").MethodReturn, zrevrank: (key: string, member: string) => import("./types").MethodReturn, zscore: (key: string, member: string) => import("./types").MethodReturn, zunionstore: (destination: string, keys: string[], options?: {
|
|
30
|
+
weights?: number[] | undefined;
|
|
31
|
+
aggregate?: "MIN" | "MAX" | "SUM" | undefined;
|
|
32
|
+
} | undefined) => import("./types").MethodReturn;
|
package/dist/module/types.d.ts
CHANGED
|
@@ -9,121 +9,153 @@ export declare type ReturnType = {
|
|
|
9
9
|
};
|
|
10
10
|
export declare type MethodReturn = Promise<ReturnType>;
|
|
11
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;
|
|
12
15
|
declare type Auth1 = (options?: ClientObjectProps) => void;
|
|
13
16
|
declare type Auth2 = (url?: string, token?: string) => void;
|
|
14
17
|
declare type Auth3 = (url?: string | ClientObjectProps, token?: string) => void;
|
|
15
18
|
export declare type Upstash = {
|
|
16
19
|
auth: Auth1 & Auth2 & Auth3;
|
|
17
|
-
append: (
|
|
18
|
-
decr: (
|
|
19
|
-
decrby: (
|
|
20
|
-
get: (
|
|
21
|
-
getrange: (
|
|
22
|
-
getset: (
|
|
23
|
-
incr: (
|
|
24
|
-
incrby: (
|
|
25
|
-
incrbyfloat: (
|
|
26
|
-
mget: (
|
|
27
|
-
mset: (
|
|
28
|
-
msetnx: (
|
|
29
|
-
psetex: (
|
|
30
|
-
set: (
|
|
31
|
-
setex: (
|
|
32
|
-
setnx: (
|
|
33
|
-
setrange: (
|
|
34
|
-
strlen: (
|
|
35
|
-
bitcount: (
|
|
36
|
-
bitop: (
|
|
37
|
-
bitpos: (
|
|
38
|
-
getbit: (
|
|
39
|
-
setbit: (
|
|
40
|
-
echo: (
|
|
41
|
-
ping: (
|
|
42
|
-
hdel: (
|
|
43
|
-
hexists: (
|
|
44
|
-
hget: (
|
|
45
|
-
hgetall: (
|
|
46
|
-
hincrby: (
|
|
47
|
-
hincrbyfloat: (
|
|
48
|
-
hkeys: (
|
|
49
|
-
hlen: (
|
|
50
|
-
hmget: (
|
|
51
|
-
hmset: (
|
|
52
|
-
hscan: (
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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
|
-
|
|
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;
|
|
128
160
|
};
|
|
129
161
|
export {};
|
package/package.json
CHANGED
package/src/types.ts
CHANGED
|
@@ -13,6 +13,12 @@ export type MethodReturn = Promise<ReturnType>;
|
|
|
13
13
|
|
|
14
14
|
export type Part = string | boolean | number;
|
|
15
15
|
|
|
16
|
+
export type Bit = 0 | 1;
|
|
17
|
+
|
|
18
|
+
export type Infinities = '+inf' | '-inf';
|
|
19
|
+
|
|
20
|
+
export type ZSetNumber = Infinities | number | string;
|
|
21
|
+
|
|
16
22
|
type Auth1 = (options?: ClientObjectProps) => void;
|
|
17
23
|
type Auth2 = (url?: string, token?: string) => void;
|
|
18
24
|
type Auth3 = (url?: string | ClientObjectProps, token?: string) => void;
|
|
@@ -20,123 +26,216 @@ type Auth3 = (url?: string | ClientObjectProps, token?: string) => void;
|
|
|
20
26
|
export type Upstash = {
|
|
21
27
|
auth: Auth1 & Auth2 & Auth3;
|
|
22
28
|
//
|
|
23
|
-
append: (
|
|
24
|
-
decr: (
|
|
25
|
-
decrby: (
|
|
26
|
-
get: (
|
|
27
|
-
getrange: (
|
|
28
|
-
getset: (
|
|
29
|
-
incr: (
|
|
30
|
-
incrby: (
|
|
31
|
-
incrbyfloat: (
|
|
32
|
-
mget: (
|
|
33
|
-
mset: (
|
|
34
|
-
msetnx: (
|
|
35
|
-
psetex: (
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
29
|
+
append: (key: string, value: string) => MethodReturn;
|
|
30
|
+
decr: (key: string) => MethodReturn;
|
|
31
|
+
decrby: (key: string, decrement: number) => MethodReturn;
|
|
32
|
+
get: (key: string) => MethodReturn;
|
|
33
|
+
getrange: (key: string, start: number, end: number) => MethodReturn;
|
|
34
|
+
getset: (key: string, value: string) => MethodReturn;
|
|
35
|
+
incr: (key: string) => MethodReturn;
|
|
36
|
+
incrby: (key: string, value: number | string) => MethodReturn;
|
|
37
|
+
incrbyfloat: (key: string, value: number | string) => MethodReturn;
|
|
38
|
+
mget: (values: string[]) => MethodReturn;
|
|
39
|
+
mset: (values: string[]) => MethodReturn;
|
|
40
|
+
msetnx: (values: string[]) => MethodReturn;
|
|
41
|
+
psetex: (
|
|
42
|
+
key: string,
|
|
43
|
+
miliseconds: number,
|
|
44
|
+
value: string | number
|
|
45
|
+
) => MethodReturn;
|
|
46
|
+
set: (key: string, value: number | string) => MethodReturn;
|
|
47
|
+
setex: (key: string, seconds: number, value: string | number) => MethodReturn;
|
|
48
|
+
setnx: (key: string, value: string) => MethodReturn;
|
|
49
|
+
setrange: (
|
|
50
|
+
key: string,
|
|
51
|
+
offset: number | string,
|
|
52
|
+
value: string
|
|
53
|
+
) => MethodReturn;
|
|
54
|
+
strlen: (key: string) => MethodReturn;
|
|
41
55
|
//
|
|
42
|
-
bitcount: (
|
|
43
|
-
bitop: (
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
56
|
+
bitcount: (key: string, start?: number, end?: number) => MethodReturn;
|
|
57
|
+
bitop: (
|
|
58
|
+
operation: 'AND' | 'OR' | 'XOR' | 'NOT',
|
|
59
|
+
destinationKey: string,
|
|
60
|
+
sourceKeys: string[]
|
|
61
|
+
) => MethodReturn;
|
|
62
|
+
bitpos: (key: string, bit: Bit, start?: number, end?: number) => MethodReturn;
|
|
63
|
+
getbit: (key: string, offset: number) => MethodReturn;
|
|
64
|
+
setbit: (key: string, offset: number, value: Bit) => MethodReturn;
|
|
47
65
|
//
|
|
48
|
-
echo: (
|
|
49
|
-
ping: (
|
|
66
|
+
echo: (value: string) => MethodReturn;
|
|
67
|
+
ping: (value?: string) => MethodReturn;
|
|
50
68
|
//
|
|
51
|
-
hdel: (
|
|
52
|
-
hexists: (
|
|
53
|
-
hget: (
|
|
54
|
-
hgetall: (
|
|
55
|
-
hincrby: (
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
69
|
+
hdel: (key: string, fields: string[]) => MethodReturn;
|
|
70
|
+
hexists: (key: string, field: string) => MethodReturn;
|
|
71
|
+
hget: (key: string, field: string) => MethodReturn;
|
|
72
|
+
hgetall: (key: string) => MethodReturn;
|
|
73
|
+
hincrby: (
|
|
74
|
+
key: string,
|
|
75
|
+
field: string,
|
|
76
|
+
increment: number | string
|
|
77
|
+
) => MethodReturn;
|
|
78
|
+
hincrbyfloat: (
|
|
79
|
+
key: string,
|
|
80
|
+
field: string,
|
|
81
|
+
increment: number | string
|
|
82
|
+
) => MethodReturn;
|
|
83
|
+
hkeys: (key: string) => MethodReturn;
|
|
84
|
+
hlen: (key: string) => MethodReturn;
|
|
85
|
+
hmget: (key: string, fields: string[]) => MethodReturn;
|
|
86
|
+
hmset: (key: string, values: string[]) => MethodReturn;
|
|
87
|
+
hscan: (
|
|
88
|
+
key: string,
|
|
89
|
+
cursor: number,
|
|
90
|
+
options?: { match?: number | string; count?: number | string }
|
|
91
|
+
) => MethodReturn;
|
|
92
|
+
hset: (key: string, values: string[]) => MethodReturn;
|
|
93
|
+
hsetnx: (key: string, field: string, value: string) => MethodReturn;
|
|
94
|
+
hvals: (key: string) => MethodReturn;
|
|
65
95
|
//
|
|
66
|
-
del: (
|
|
67
|
-
exists: (
|
|
68
|
-
expire: (
|
|
69
|
-
expireat: (
|
|
70
|
-
keys: (
|
|
71
|
-
persist: (
|
|
72
|
-
pexpire: (
|
|
73
|
-
pexpireat: (
|
|
74
|
-
pttl: (
|
|
75
|
-
randomkey: (
|
|
76
|
-
rename: (
|
|
77
|
-
renamenx: (
|
|
78
|
-
scan: (
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
96
|
+
del: (keys: string[]) => MethodReturn;
|
|
97
|
+
exists: (keys: string[]) => MethodReturn;
|
|
98
|
+
expire: (key: string, seconds: number) => MethodReturn;
|
|
99
|
+
expireat: (key: string, timestamp: number | string) => MethodReturn;
|
|
100
|
+
keys: (pattern: string) => MethodReturn;
|
|
101
|
+
persist: (key: string) => MethodReturn;
|
|
102
|
+
pexpire: (key: string, miliseconds: number) => MethodReturn;
|
|
103
|
+
pexpireat: (key: string, miliseconds: number) => MethodReturn;
|
|
104
|
+
pttl: (key: string) => MethodReturn;
|
|
105
|
+
randomkey: () => MethodReturn;
|
|
106
|
+
rename: (key: string, newKey: string) => MethodReturn;
|
|
107
|
+
renamenx: (key: string, newKey: string) => MethodReturn;
|
|
108
|
+
scan: (
|
|
109
|
+
cursor: number,
|
|
110
|
+
opitons?: { match?: number | string; count?: number | string }
|
|
111
|
+
) => MethodReturn;
|
|
112
|
+
touch: (keys: string[]) => MethodReturn;
|
|
113
|
+
ttl: (key: string) => MethodReturn;
|
|
114
|
+
type: (key: string) => MethodReturn;
|
|
115
|
+
unlink: (keys: string[]) => MethodReturn;
|
|
83
116
|
//
|
|
84
|
-
lindex: (
|
|
85
|
-
linsert: (
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
117
|
+
lindex: (key: string, index: number) => MethodReturn;
|
|
118
|
+
linsert: (
|
|
119
|
+
key: string,
|
|
120
|
+
option: 'BEFORE' | 'AFTER',
|
|
121
|
+
pivot: string,
|
|
122
|
+
element: string
|
|
123
|
+
) => MethodReturn;
|
|
124
|
+
llen: (key: string) => MethodReturn;
|
|
125
|
+
lpop: (key: string) => MethodReturn;
|
|
126
|
+
lpush: (key: string, elements: string[]) => MethodReturn;
|
|
127
|
+
lpushx: (key: string, elements: string[]) => MethodReturn;
|
|
128
|
+
lrange: (key: string, start: number, stop: number) => MethodReturn;
|
|
129
|
+
lrem: (key: string, count: number, element: string) => MethodReturn;
|
|
130
|
+
lset: (key: string, index: number, element: string) => MethodReturn;
|
|
131
|
+
ltrim: (key: string, start: number, stop: number) => MethodReturn;
|
|
132
|
+
rpop: (key: string) => MethodReturn;
|
|
133
|
+
rpoplpush: (source: string, destination: string) => MethodReturn;
|
|
134
|
+
rpush: (key: string, elements: string[]) => MethodReturn;
|
|
135
|
+
rpushx: (key: string, elements: string[]) => MethodReturn;
|
|
98
136
|
//
|
|
99
|
-
dbsize: (
|
|
100
|
-
flushall: (
|
|
101
|
-
flushdb: (
|
|
102
|
-
info: (
|
|
103
|
-
time: (
|
|
137
|
+
dbsize: () => MethodReturn;
|
|
138
|
+
flushall: (mode?: 'ASYNC') => MethodReturn;
|
|
139
|
+
flushdb: (mode?: 'ASYNC') => MethodReturn;
|
|
140
|
+
info: () => MethodReturn;
|
|
141
|
+
time: () => MethodReturn;
|
|
104
142
|
//
|
|
105
|
-
sadd: (
|
|
106
|
-
scard: (
|
|
107
|
-
sdiff: (
|
|
108
|
-
sdiffstore: (
|
|
109
|
-
sinter: (
|
|
110
|
-
sinterstore: (
|
|
111
|
-
sismember: (
|
|
112
|
-
smembers: (
|
|
113
|
-
smove: (
|
|
114
|
-
spop: (
|
|
115
|
-
srandmember: (
|
|
116
|
-
srem: (
|
|
117
|
-
sunion: (
|
|
118
|
-
sunionstore: (
|
|
143
|
+
sadd: (key: string, members: string[]) => MethodReturn;
|
|
144
|
+
scard: (key: string) => MethodReturn;
|
|
145
|
+
sdiff: (keys: string[]) => MethodReturn;
|
|
146
|
+
sdiffstore: (destination: string, keys: string[]) => MethodReturn;
|
|
147
|
+
sinter: (keys: string[]) => MethodReturn;
|
|
148
|
+
sinterstore: (destination: string, keys: string[]) => MethodReturn;
|
|
149
|
+
sismember: (key: string, member: string) => MethodReturn;
|
|
150
|
+
smembers: (key: string) => MethodReturn;
|
|
151
|
+
smove: (source: string, destination: string, member: string) => MethodReturn;
|
|
152
|
+
spop: (key: string, count?: number) => MethodReturn;
|
|
153
|
+
srandmember: (key: string, count?: number) => MethodReturn;
|
|
154
|
+
srem: (key: string, members: string[]) => MethodReturn;
|
|
155
|
+
sunion: (keys: string[]) => MethodReturn;
|
|
156
|
+
sunionstore: (destination: string, keys: string[]) => MethodReturn;
|
|
119
157
|
//
|
|
120
|
-
zadd: (
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
158
|
+
zadd: (
|
|
159
|
+
key: string,
|
|
160
|
+
values: ZSetNumber[],
|
|
161
|
+
options?: ({ xx?: boolean } | { nx?: boolean }) & {
|
|
162
|
+
ch?: boolean;
|
|
163
|
+
incr: boolean;
|
|
164
|
+
}
|
|
165
|
+
) => MethodReturn;
|
|
166
|
+
zcard: (key: string) => MethodReturn;
|
|
167
|
+
zcount: (key: string, min: ZSetNumber, max: ZSetNumber) => MethodReturn;
|
|
168
|
+
zincrby: (
|
|
169
|
+
key: string,
|
|
170
|
+
increment: number | string,
|
|
171
|
+
member: string
|
|
172
|
+
) => MethodReturn;
|
|
173
|
+
zinterstore: (
|
|
174
|
+
destination: string,
|
|
175
|
+
keys: string[],
|
|
176
|
+
options?: { weights?: number[]; aggregate?: 'MIN' | 'MAX' | 'SUM' }
|
|
177
|
+
) => MethodReturn;
|
|
178
|
+
zlexcount: (key: string, min: ZSetNumber, max: ZSetNumber) => MethodReturn;
|
|
179
|
+
zpopmax: (key: string, count?: number) => MethodReturn;
|
|
180
|
+
zpopmin: (key: string, count?: number) => MethodReturn;
|
|
181
|
+
zrange: (
|
|
182
|
+
key: string,
|
|
183
|
+
min: ZSetNumber,
|
|
184
|
+
max: ZSetNumber,
|
|
185
|
+
options?: { withScores: boolean }
|
|
186
|
+
) => MethodReturn;
|
|
187
|
+
zrangebylex: (
|
|
188
|
+
key: string,
|
|
189
|
+
min: ZSetNumber,
|
|
190
|
+
max: ZSetNumber,
|
|
191
|
+
offset?: number,
|
|
192
|
+
count?: number
|
|
193
|
+
) => MethodReturn;
|
|
194
|
+
zrangebyscore: (
|
|
195
|
+
key: string,
|
|
196
|
+
min: ZSetNumber,
|
|
197
|
+
max: ZSetNumber,
|
|
198
|
+
options?: {
|
|
199
|
+
withScores?: boolean;
|
|
200
|
+
limit?: { offset: number; count: number };
|
|
201
|
+
}
|
|
202
|
+
) => MethodReturn;
|
|
203
|
+
zrank: (key: string, member: string) => MethodReturn;
|
|
204
|
+
zrem: (key: string, members: string[]) => MethodReturn;
|
|
205
|
+
zremrangebylex: (
|
|
206
|
+
key: string,
|
|
207
|
+
min: ZSetNumber,
|
|
208
|
+
max: ZSetNumber
|
|
209
|
+
) => MethodReturn;
|
|
210
|
+
zremrangebyrank: (key: string, start: number, stop: number) => MethodReturn;
|
|
211
|
+
zremrangebyscore: (
|
|
212
|
+
key: string,
|
|
213
|
+
min: ZSetNumber,
|
|
214
|
+
max: ZSetNumber
|
|
215
|
+
) => MethodReturn;
|
|
216
|
+
zrevrange: (
|
|
217
|
+
key: string,
|
|
218
|
+
start: number,
|
|
219
|
+
stop: number,
|
|
220
|
+
options?: { withScores: boolean }
|
|
221
|
+
) => MethodReturn;
|
|
222
|
+
zrevrangebylex: (
|
|
223
|
+
key: string,
|
|
224
|
+
max: ZSetNumber,
|
|
225
|
+
min: ZSetNumber,
|
|
226
|
+
offset?: number,
|
|
227
|
+
count?: number
|
|
228
|
+
) => MethodReturn;
|
|
229
|
+
zrevrangebyscore: (
|
|
230
|
+
key: string,
|
|
231
|
+
min: ZSetNumber,
|
|
232
|
+
max: ZSetNumber
|
|
233
|
+
) => MethodReturn;
|
|
234
|
+
zrevrank: (key: string, member: string) => MethodReturn;
|
|
235
|
+
zscore: (key: string, member: string) => MethodReturn;
|
|
236
|
+
zunionstore: (
|
|
237
|
+
destination: string,
|
|
238
|
+
keys: string[],
|
|
239
|
+
options?: { weights?: number[]; aggregate?: 'MIN' | 'MAX' | 'SUM' }
|
|
240
|
+
) => MethodReturn;
|
|
142
241
|
};
|