@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.
@@ -0,0 +1,205 @@
1
+ import { au as Command, N as NonEmptyArray } from './zunionstore-462de5d3';
2
+ export { A as AppendCommand, B as BitCountCommand, a as BitPosCommand, b as DecrByCommand, D as DecrCommand, c as DelCommand, E as EchoCommand, d as ExistsCommand, f as ExpireAtCommand, e as ExpireCommand, F as FlushAllCommand, g as FlushDBCommand, h as GetBitCommand, G as GetCommand, i as GetRangeCommand, j as HDelCommand, k as HExistsCommand, m as HGetAllCommand, l as HGetCommand, n as HIncrByCommand, o as HIncrByFloatCommand, p as HKeysCommand, q as HLenCommand, r as HMGetCommand, s as HScanCommand, t as HStrLenCommand, u as HValsCommand, v as IncrByCommand, w as IncrByFloatCommand, I as IncrCommand, K as KeysCommand, L as LIndexCommand, x as LLenCommand, y as LPopCommand, z as LRangeCommand, J as LTrimCommand, M as MGetCommand, Q as PExpireAtCommand, O as PExpireCommand, S as PTtlCommand, P as PersistCommand, R as PingCommand, V as RPopCommand, T as RenameCommand, U as RenameNXCommand, X as SCardCommand, Y as SDiffCommand, Z as SDiffStoreCommand, a1 as SInterCommand, a2 as SInterStoreCommand, a3 as SMembersCommand, a4 as SPopCommand, a5 as SRandMemberCommand, a6 as SScanCommand, a8 as SUnionCommand, a9 as SUnionStoreCommand, W as ScanCommand, av as ScanCommandOptions, ae as ScoreMember, $ as SetBitCommand, aw as SetCommand, _ as SetCommandOptions, a0 as SetRangeCommand, a7 as StrLenCommand, aa as TouchCommand, ab as TtlCommand, at as Type, ac as TypeCommand, ad as UnlinkCommand, ax as ZAddCommand, af as ZAddCommandOptions, ag as ZAddCommandOptionsWithIncr, ah as ZCardCommand, ai as ZCountCommand, aj as ZInterStoreCommand, ay as ZInterStoreCommandOptions, ak as ZLexCountCommand, al as ZPopMaxCommand, am as ZPopMinCommand, an as ZRangeCommand, az as ZRangeCommandOptions, ao as ZRemRangeByLexCommand, ap as ZRemRangeByRankCommand, aq as ZRemRangeByScoreCommand, ar as ZScanCommand, as as ZUnionStoreCommand, aA as ZUnionStoreCommandOptions } from './zunionstore-462de5d3';
3
+
4
+ /**
5
+ * @see https://redis.io/commands/bitop
6
+ */
7
+ declare class BitOpCommand extends Command<number, number> {
8
+ constructor(op: "and" | "or" | "xor", destinationKey: string, sourceKey: string, ...sourceKeys: string[]);
9
+ constructor(op: "not", destinationKey: string, sourceKey: string);
10
+ }
11
+
12
+ /**
13
+ * @see https://redis.io/commands/dbsize
14
+ */
15
+ declare class DBSizeCommand extends Command<number, number> {
16
+ constructor();
17
+ }
18
+
19
+ /**
20
+ * @see https://redis.io/commands/getset
21
+ */
22
+ declare class GetSetCommand<TData = string> extends Command<TData | null, unknown | null> {
23
+ constructor(key: string, value: TData);
24
+ }
25
+
26
+ /**
27
+ * @see https://redis.io/commands/hmset
28
+ */
29
+ declare class HMSetCommand<TData> extends Command<number, number> {
30
+ constructor(key: string, kv: {
31
+ [field: string]: TData;
32
+ });
33
+ }
34
+
35
+ /**
36
+ * @see https://redis.io/commands/hset
37
+ */
38
+ declare class HSetCommand<TData> extends Command<number, number> {
39
+ constructor(key: string, field: string, value: TData);
40
+ }
41
+
42
+ /**
43
+ * @see https://redis.io/commands/hsetnx
44
+ */
45
+ declare class HSetNXCommand<TData> extends Command<0 | 1, "0" | "1"> {
46
+ constructor(key: string, field: string, value: TData);
47
+ }
48
+
49
+ declare class LInsertCommand<TData = string> extends Command<number, number> {
50
+ constructor(key: string, direction: "before" | "after", pivot: TData, value: TData);
51
+ }
52
+
53
+ /**
54
+ * @see https://redis.io/commands/lpush
55
+ */
56
+ declare class LPushCommand<TData = string> extends Command<number, number> {
57
+ constructor(key: string, ...elements: NonEmptyArray<TData>);
58
+ }
59
+
60
+ /**
61
+ * @see https://redis.io/commands/lpushx
62
+ */
63
+ declare class LPushXCommand<TData> extends Command<number, number> {
64
+ constructor(key: string, ...elements: NonEmptyArray<TData>);
65
+ }
66
+
67
+ declare class LRemCommand<TData> extends Command<number, number> {
68
+ constructor(key: string, count: number, value: TData);
69
+ }
70
+
71
+ declare class LSetCommand<TData = string> extends Command<"OK", "OK"> {
72
+ constructor(key: string, value: TData, index: number);
73
+ }
74
+
75
+ /**
76
+ * @see https://redis.io/commands/mset
77
+ */
78
+ declare class MSetCommand<TData> extends Command<"OK", "OK"> {
79
+ constructor(kv: {
80
+ [key: string]: TData;
81
+ });
82
+ }
83
+
84
+ /**
85
+ * @see https://redis.io/commands/msetnx
86
+ */
87
+ declare class MSetNXCommand<TData = string> extends Command<number, number> {
88
+ constructor(kv: {
89
+ [key: string]: TData;
90
+ });
91
+ }
92
+
93
+ /**
94
+ * @see https://redis.io/commands/psetex
95
+ */
96
+ declare class PSetEXCommand<TData = string> extends Command<string, string> {
97
+ constructor(key: string, ttl: number, value: TData);
98
+ }
99
+
100
+ /**
101
+ * @see https://redis.io/commands/randomkey
102
+ */
103
+ declare class RandomKeyCommand extends Command<string | null, string | null> {
104
+ constructor();
105
+ }
106
+
107
+ /**
108
+ * @see https://redis.io/commands/rpush
109
+ */
110
+ declare class RPushCommand<TData = string> extends Command<number, number> {
111
+ constructor(key: string, ...elements: NonEmptyArray<TData>);
112
+ }
113
+
114
+ /**
115
+ * @see https://redis.io/commands/rpushx
116
+ */
117
+ declare class RPushXCommand<TData = string> extends Command<number, number> {
118
+ constructor(key: string, ...elements: NonEmptyArray<TData>);
119
+ }
120
+
121
+ /**
122
+ * @see https://redis.io/commands/sadd
123
+ */
124
+ declare class SAddCommand<TData = string> extends Command<number, number> {
125
+ constructor(key: string, ...members: NonEmptyArray<TData>);
126
+ }
127
+
128
+ /**
129
+ * @see https://redis.io/commands/setex
130
+ */
131
+ declare class SetExCommand<TData = string> extends Command<"OK", "OK"> {
132
+ constructor(key: string, ttl: number, value: TData);
133
+ }
134
+
135
+ /**
136
+ * @see https://redis.io/commands/setnx
137
+ */
138
+ declare class SetNxCommand<TData = string> extends Command<number, number> {
139
+ constructor(key: string, value: TData);
140
+ }
141
+
142
+ /**
143
+ * @see https://redis.io/commands/sismember
144
+ */
145
+ declare class SIsMemberCommand<TData = string> extends Command<0 | 1, "0" | "1"> {
146
+ constructor(key: string, member: TData);
147
+ }
148
+
149
+ /**
150
+ * @see https://redis.io/commands/smove
151
+ */
152
+ declare class SMoveCommand<TData> extends Command<0 | 1, "0" | "1"> {
153
+ constructor(source: string, destination: string, member: TData);
154
+ }
155
+
156
+ /**
157
+ * @see https://redis.io/commands/srem
158
+ */
159
+ declare class SRemCommand<TData = string> extends Command<number, number> {
160
+ constructor(key: string, ...members: NonEmptyArray<TData>);
161
+ }
162
+
163
+ /**
164
+ * @see https://redis.io/commands/time
165
+ */
166
+ declare class TimeCommand extends Command<[number, number], [number, number]> {
167
+ constructor();
168
+ }
169
+
170
+ /**
171
+ * @see https://redis.io/commands/zincrby
172
+ */
173
+ declare class ZIncrByComand<TData> extends Command<number, number> {
174
+ constructor(key: string, increment: number, member: TData);
175
+ }
176
+
177
+ /**
178
+ * @see https://redis.io/commands/zrank
179
+ */
180
+ declare class ZRankCommand<TData> extends Command<number | null, number | null> {
181
+ constructor(key: string, member: TData);
182
+ }
183
+
184
+ /**
185
+ * @see https://redis.io/commands/zrem
186
+ */
187
+ declare class ZRemCommand<TData = string> extends Command<number, number> {
188
+ constructor(key: string, ...members: NonEmptyArray<TData>);
189
+ }
190
+
191
+ /**
192
+ * @see https://redis.io/commands/zrevrank
193
+ */
194
+ declare class ZRevRankCommand<TData> extends Command<number | null, number | null> {
195
+ constructor(key: string, member: TData);
196
+ }
197
+
198
+ /**
199
+ * @see https://redis.io/commands/zscore
200
+ */
201
+ declare class ZScoreCommand<TData> extends Command<number | null, string | null> {
202
+ constructor(key: string, member: TData);
203
+ }
204
+
205
+ export { BitOpCommand, DBSizeCommand, GetSetCommand, HMSetCommand, HSetCommand, HSetNXCommand, LInsertCommand, LPushCommand, LPushXCommand, LRemCommand, LSetCommand, MSetCommand, MSetNXCommand, PSetEXCommand, RPushCommand, RPushXCommand, RandomKeyCommand, SAddCommand, SIsMemberCommand, SMoveCommand, SRemCommand, SetExCommand, SetNxCommand, TimeCommand, ZIncrByComand, ZRankCommand, ZRemCommand, ZRevRankCommand, ZScoreCommand };