@milkio/redis 1.0.0-beta.18 → 1.0.0-beta.180

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/index.d.ts CHANGED
@@ -1,311 +1,36 @@
1
- import type { RedisClientOptions } from "redis";
2
- export declare function createRedis<Options extends RedisClientOptions>(options: Options): Promise<{
3
- raw: import("@redis/client").RedisClientType<{
4
- graph: {
5
- CONFIG_GET: typeof import("@redis/graph/dist/commands/CONFIG_GET.js");
6
- configGet: typeof import("@redis/graph/dist/commands/CONFIG_GET.js");
7
- CONFIG_SET: typeof import("@redis/graph/dist/commands/CONFIG_SET.js");
8
- configSet: typeof import("@redis/graph/dist/commands/CONFIG_SET.js");
9
- DELETE: typeof import("@redis/graph/dist/commands/DELETE.js");
10
- delete: typeof import("@redis/graph/dist/commands/DELETE.js");
11
- EXPLAIN: typeof import("@redis/graph/dist/commands/EXPLAIN.js");
12
- explain: typeof import("@redis/graph/dist/commands/EXPLAIN.js");
13
- LIST: typeof import("@redis/graph/dist/commands/LIST.js");
14
- list: typeof import("@redis/graph/dist/commands/LIST.js");
15
- PROFILE: typeof import("@redis/graph/dist/commands/PROFILE.js");
16
- profile: typeof import("@redis/graph/dist/commands/PROFILE.js");
17
- QUERY: typeof import("@redis/graph/dist/commands/QUERY.js");
18
- query: typeof import("@redis/graph/dist/commands/QUERY.js");
19
- RO_QUERY: typeof import("@redis/graph/dist/commands/RO_QUERY.js");
20
- roQuery: typeof import("@redis/graph/dist/commands/RO_QUERY.js");
21
- SLOWLOG: typeof import("@redis/graph/dist/commands/SLOWLOG.js");
22
- slowLog: typeof import("@redis/graph/dist/commands/SLOWLOG.js");
23
- };
24
- json: {
25
- ARRAPPEND: typeof import("@redis/json/dist/commands/ARRAPPEND.js");
26
- arrAppend: typeof import("@redis/json/dist/commands/ARRAPPEND.js");
27
- ARRINDEX: typeof import("@redis/json/dist/commands/ARRINDEX.js");
28
- arrIndex: typeof import("@redis/json/dist/commands/ARRINDEX.js");
29
- ARRINSERT: typeof import("@redis/json/dist/commands/ARRINSERT.js");
30
- arrInsert: typeof import("@redis/json/dist/commands/ARRINSERT.js");
31
- ARRLEN: typeof import("@redis/json/dist/commands/ARRLEN.js");
32
- arrLen: typeof import("@redis/json/dist/commands/ARRLEN.js");
33
- ARRPOP: typeof import("@redis/json/dist/commands/ARRPOP.js");
34
- arrPop: typeof import("@redis/json/dist/commands/ARRPOP.js");
35
- ARRTRIM: typeof import("@redis/json/dist/commands/ARRTRIM.js");
36
- arrTrim: typeof import("@redis/json/dist/commands/ARRTRIM.js");
37
- DEBUG_MEMORY: typeof import("@redis/json/dist/commands/DEBUG_MEMORY.js");
38
- debugMemory: typeof import("@redis/json/dist/commands/DEBUG_MEMORY.js");
39
- DEL: typeof import("@redis/json/dist/commands/DEL.js");
40
- del: typeof import("@redis/json/dist/commands/DEL.js");
41
- FORGET: typeof import("@redis/json/dist/commands/FORGET.js");
42
- forget: typeof import("@redis/json/dist/commands/FORGET.js");
43
- GET: typeof import("@redis/json/dist/commands/GET.js");
44
- get: typeof import("@redis/json/dist/commands/GET.js");
45
- MERGE: typeof import("@redis/json/dist/commands/MERGE.js");
46
- merge: typeof import("@redis/json/dist/commands/MERGE.js");
47
- MGET: typeof import("@redis/json/dist/commands/MGET.js");
48
- mGet: typeof import("@redis/json/dist/commands/MGET.js");
49
- MSET: typeof import("@redis/json/dist/commands/MSET.js");
50
- mSet: typeof import("@redis/json/dist/commands/MSET.js");
51
- NUMINCRBY: typeof import("@redis/json/dist/commands/NUMINCRBY.js");
52
- numIncrBy: typeof import("@redis/json/dist/commands/NUMINCRBY.js");
53
- NUMMULTBY: typeof import("@redis/json/dist/commands/NUMMULTBY.js");
54
- numMultBy: typeof import("@redis/json/dist/commands/NUMMULTBY.js");
55
- OBJKEYS: typeof import("@redis/json/dist/commands/OBJKEYS.js");
56
- objKeys: typeof import("@redis/json/dist/commands/OBJKEYS.js");
57
- OBJLEN: typeof import("@redis/json/dist/commands/OBJLEN.js");
58
- objLen: typeof import("@redis/json/dist/commands/OBJLEN.js");
59
- RESP: typeof import("@redis/json/dist/commands/RESP.js");
60
- resp: typeof import("@redis/json/dist/commands/RESP.js");
61
- SET: typeof import("@redis/json/dist/commands/SET.js");
62
- set: typeof import("@redis/json/dist/commands/SET.js");
63
- STRAPPEND: typeof import("@redis/json/dist/commands/STRAPPEND.js");
64
- strAppend: typeof import("@redis/json/dist/commands/STRAPPEND.js");
65
- STRLEN: typeof import("@redis/json/dist/commands/STRLEN.js");
66
- strLen: typeof import("@redis/json/dist/commands/STRLEN.js");
67
- TYPE: typeof import("@redis/json/dist/commands/TYPE.js");
68
- type: typeof import("@redis/json/dist/commands/TYPE.js");
69
- };
70
- ft: {
71
- _LIST: typeof import("@redis/search/dist/commands/_LIST.js");
72
- _list: typeof import("@redis/search/dist/commands/_LIST.js");
73
- ALTER: typeof import("@redis/search/dist/commands/ALTER.js");
74
- alter: typeof import("@redis/search/dist/commands/ALTER.js");
75
- AGGREGATE_WITHCURSOR: typeof import("@redis/search/dist/commands/AGGREGATE_WITHCURSOR.js");
76
- aggregateWithCursor: typeof import("@redis/search/dist/commands/AGGREGATE_WITHCURSOR.js");
77
- AGGREGATE: typeof import("@redis/search/dist/commands/AGGREGATE.js");
78
- aggregate: typeof import("@redis/search/dist/commands/AGGREGATE.js");
79
- ALIASADD: typeof import("@redis/search/dist/commands/ALIASADD.js");
80
- aliasAdd: typeof import("@redis/search/dist/commands/ALIASADD.js");
81
- ALIASDEL: typeof import("@redis/search/dist/commands/ALIASDEL.js");
82
- aliasDel: typeof import("@redis/search/dist/commands/ALIASDEL.js");
83
- ALIASUPDATE: typeof import("@redis/search/dist/commands/ALIASUPDATE.js");
84
- aliasUpdate: typeof import("@redis/search/dist/commands/ALIASUPDATE.js");
85
- CONFIG_GET: typeof import("@redis/search/dist/commands/CONFIG_GET.js");
86
- configGet: typeof import("@redis/search/dist/commands/CONFIG_GET.js");
87
- CONFIG_SET: typeof import("@redis/search/dist/commands/CONFIG_SET.js");
88
- configSet: typeof import("@redis/search/dist/commands/CONFIG_SET.js");
89
- CREATE: typeof import("@redis/search/dist/commands/CREATE.js");
90
- create: typeof import("@redis/search/dist/commands/CREATE.js");
91
- CURSOR_DEL: typeof import("@redis/search/dist/commands/CURSOR_DEL.js");
92
- cursorDel: typeof import("@redis/search/dist/commands/CURSOR_DEL.js");
93
- CURSOR_READ: typeof import("@redis/search/dist/commands/CURSOR_READ.js");
94
- cursorRead: typeof import("@redis/search/dist/commands/CURSOR_READ.js");
95
- DICTADD: typeof import("@redis/search/dist/commands/DICTADD.js");
96
- dictAdd: typeof import("@redis/search/dist/commands/DICTADD.js");
97
- DICTDEL: typeof import("@redis/search/dist/commands/DICTDEL.js");
98
- dictDel: typeof import("@redis/search/dist/commands/DICTDEL.js");
99
- DICTDUMP: typeof import("@redis/search/dist/commands/DICTDUMP.js");
100
- dictDump: typeof import("@redis/search/dist/commands/DICTDUMP.js");
101
- DROPINDEX: typeof import("@redis/search/dist/commands/DROPINDEX.js");
102
- dropIndex: typeof import("@redis/search/dist/commands/DROPINDEX.js");
103
- EXPLAIN: typeof import("@redis/search/dist/commands/EXPLAIN.js");
104
- explain: typeof import("@redis/search/dist/commands/EXPLAIN.js");
105
- EXPLAINCLI: typeof import("@redis/search/dist/commands/EXPLAINCLI.js");
106
- explainCli: typeof import("@redis/search/dist/commands/EXPLAINCLI.js");
107
- INFO: typeof import("@redis/search/dist/commands/INFO.js");
108
- info: typeof import("@redis/search/dist/commands/INFO.js");
109
- PROFILESEARCH: typeof import("@redis/search/dist/commands/PROFILE_SEARCH.js");
110
- profileSearch: typeof import("@redis/search/dist/commands/PROFILE_SEARCH.js");
111
- PROFILEAGGREGATE: typeof import("@redis/search/dist/commands/PROFILE_AGGREGATE.js");
112
- profileAggregate: typeof import("@redis/search/dist/commands/PROFILE_AGGREGATE.js");
113
- SEARCH: typeof import("@redis/search/dist/commands/SEARCH.js");
114
- search: typeof import("@redis/search/dist/commands/SEARCH.js");
115
- SEARCH_NOCONTENT: typeof import("@redis/search/dist/commands/SEARCH_NOCONTENT.js");
116
- searchNoContent: typeof import("@redis/search/dist/commands/SEARCH_NOCONTENT.js");
117
- SPELLCHECK: typeof import("@redis/search/dist/commands/SPELLCHECK.js");
118
- spellCheck: typeof import("@redis/search/dist/commands/SPELLCHECK.js");
119
- SUGADD: typeof import("@redis/search/dist/commands/SUGADD.js");
120
- sugAdd: typeof import("@redis/search/dist/commands/SUGADD.js");
121
- SUGDEL: typeof import("@redis/search/dist/commands/SUGDEL.js");
122
- sugDel: typeof import("@redis/search/dist/commands/SUGDEL.js");
123
- SUGGET_WITHPAYLOADS: typeof import("@redis/search/dist/commands/SUGGET_WITHPAYLOADS.js");
124
- sugGetWithPayloads: typeof import("@redis/search/dist/commands/SUGGET_WITHPAYLOADS.js");
125
- SUGGET_WITHSCORES_WITHPAYLOADS: typeof import("@redis/search/dist/commands/SUGGET_WITHSCORES_WITHPAYLOADS.js");
126
- sugGetWithScoresWithPayloads: typeof import("@redis/search/dist/commands/SUGGET_WITHSCORES_WITHPAYLOADS.js");
127
- SUGGET_WITHSCORES: typeof import("@redis/search/dist/commands/SUGGET_WITHSCORES.js");
128
- sugGetWithScores: typeof import("@redis/search/dist/commands/SUGGET_WITHSCORES.js");
129
- SUGGET: typeof import("@redis/search/dist/commands/SUGGET.js");
130
- sugGet: typeof import("@redis/search/dist/commands/SUGGET.js");
131
- SUGLEN: typeof import("@redis/search/dist/commands/SUGLEN.js");
132
- sugLen: typeof import("@redis/search/dist/commands/SUGLEN.js");
133
- SYNDUMP: typeof import("@redis/search/dist/commands/SYNDUMP.js");
134
- synDump: typeof import("@redis/search/dist/commands/SYNDUMP.js");
135
- SYNUPDATE: typeof import("@redis/search/dist/commands/SYNUPDATE.js");
136
- synUpdate: typeof import("@redis/search/dist/commands/SYNUPDATE.js");
137
- TAGVALS: typeof import("@redis/search/dist/commands/TAGVALS.js");
138
- tagVals: typeof import("@redis/search/dist/commands/TAGVALS.js");
139
- };
140
- ts: {
141
- ADD: typeof import("@redis/time-series/dist/commands/ADD.js");
142
- add: typeof import("@redis/time-series/dist/commands/ADD.js");
143
- ALTER: typeof import("@redis/time-series/dist/commands/ALTER.js");
144
- alter: typeof import("@redis/time-series/dist/commands/ALTER.js");
145
- CREATE: typeof import("@redis/time-series/dist/commands/CREATE.js");
146
- create: typeof import("@redis/time-series/dist/commands/CREATE.js");
147
- CREATERULE: typeof import("@redis/time-series/dist/commands/CREATERULE.js");
148
- createRule: typeof import("@redis/time-series/dist/commands/CREATERULE.js");
149
- DECRBY: typeof import("@redis/time-series/dist/commands/DECRBY.js");
150
- decrBy: typeof import("@redis/time-series/dist/commands/DECRBY.js");
151
- DEL: typeof import("@redis/time-series/dist/commands/DEL.js");
152
- del: typeof import("@redis/time-series/dist/commands/DEL.js");
153
- DELETERULE: typeof import("@redis/time-series/dist/commands/DELETERULE.js");
154
- deleteRule: typeof import("@redis/time-series/dist/commands/DELETERULE.js");
155
- GET: typeof import("@redis/time-series/dist/commands/GET.js");
156
- get: typeof import("@redis/time-series/dist/commands/GET.js");
157
- INCRBY: typeof import("@redis/time-series/dist/commands/INCRBY.js");
158
- incrBy: typeof import("@redis/time-series/dist/commands/INCRBY.js");
159
- INFO_DEBUG: typeof import("@redis/time-series/dist/commands/INFO_DEBUG.js");
160
- infoDebug: typeof import("@redis/time-series/dist/commands/INFO_DEBUG.js");
161
- INFO: typeof import("@redis/time-series/dist/commands/INFO.js");
162
- info: typeof import("@redis/time-series/dist/commands/INFO.js");
163
- MADD: typeof import("@redis/time-series/dist/commands/MADD.js");
164
- mAdd: typeof import("@redis/time-series/dist/commands/MADD.js");
165
- MGET: typeof import("@redis/time-series/dist/commands/MGET.js");
166
- mGet: typeof import("@redis/time-series/dist/commands/MGET.js");
167
- MGET_WITHLABELS: typeof import("@redis/time-series/dist/commands/MGET_WITHLABELS.js");
168
- mGetWithLabels: typeof import("@redis/time-series/dist/commands/MGET_WITHLABELS.js");
169
- QUERYINDEX: typeof import("@redis/time-series/dist/commands/QUERYINDEX.js");
170
- queryIndex: typeof import("@redis/time-series/dist/commands/QUERYINDEX.js");
171
- RANGE: typeof import("@redis/time-series/dist/commands/RANGE.js");
172
- range: typeof import("@redis/time-series/dist/commands/RANGE.js");
173
- REVRANGE: typeof import("@redis/time-series/dist/commands/REVRANGE.js");
174
- revRange: typeof import("@redis/time-series/dist/commands/REVRANGE.js");
175
- MRANGE: typeof import("@redis/time-series/dist/commands/MRANGE.js");
176
- mRange: typeof import("@redis/time-series/dist/commands/MRANGE.js");
177
- MRANGE_WITHLABELS: typeof import("@redis/time-series/dist/commands/MRANGE_WITHLABELS.js");
178
- mRangeWithLabels: typeof import("@redis/time-series/dist/commands/MRANGE_WITHLABELS.js");
179
- MREVRANGE: typeof import("@redis/time-series/dist/commands/MREVRANGE.js");
180
- mRevRange: typeof import("@redis/time-series/dist/commands/MREVRANGE.js");
181
- MREVRANGE_WITHLABELS: typeof import("@redis/time-series/dist/commands/MREVRANGE_WITHLABELS.js");
182
- mRevRangeWithLabels: typeof import("@redis/time-series/dist/commands/MREVRANGE_WITHLABELS.js");
183
- };
184
- bf: {
185
- ADD: typeof import("@redis/bloom/dist/commands/bloom/ADD.js");
186
- add: typeof import("@redis/bloom/dist/commands/bloom/ADD.js");
187
- CARD: typeof import("@redis/bloom/dist/commands/bloom/CARD.js");
188
- card: typeof import("@redis/bloom/dist/commands/bloom/CARD.js");
189
- EXISTS: typeof import("@redis/bloom/dist/commands/bloom/EXISTS.js");
190
- exists: typeof import("@redis/bloom/dist/commands/bloom/EXISTS.js");
191
- INFO: typeof import("@redis/bloom/dist/commands/bloom/INFO.js");
192
- info: typeof import("@redis/bloom/dist/commands/bloom/INFO.js");
193
- INSERT: typeof import("@redis/bloom/dist/commands/bloom/INSERT.js");
194
- insert: typeof import("@redis/bloom/dist/commands/bloom/INSERT.js");
195
- LOADCHUNK: typeof import("@redis/bloom/dist/commands/bloom/LOADCHUNK.js");
196
- loadChunk: typeof import("@redis/bloom/dist/commands/bloom/LOADCHUNK.js");
197
- MADD: typeof import("@redis/bloom/dist/commands/bloom/MADD.js");
198
- mAdd: typeof import("@redis/bloom/dist/commands/bloom/MADD.js");
199
- MEXISTS: typeof import("@redis/bloom/dist/commands/bloom/MEXISTS.js");
200
- mExists: typeof import("@redis/bloom/dist/commands/bloom/MEXISTS.js");
201
- RESERVE: typeof import("@redis/bloom/dist/commands/bloom/RESERVE.js");
202
- reserve: typeof import("@redis/bloom/dist/commands/bloom/RESERVE.js");
203
- SCANDUMP: typeof import("@redis/bloom/dist/commands/bloom/SCANDUMP.js");
204
- scanDump: typeof import("@redis/bloom/dist/commands/bloom/SCANDUMP.js");
205
- };
206
- cms: {
207
- INCRBY: typeof import("@redis/bloom/dist/commands/count-min-sketch/INCRBY.js");
208
- incrBy: typeof import("@redis/bloom/dist/commands/count-min-sketch/INCRBY.js");
209
- INFO: typeof import("@redis/bloom/dist/commands/count-min-sketch/INFO.js");
210
- info: typeof import("@redis/bloom/dist/commands/count-min-sketch/INFO.js");
211
- INITBYDIM: typeof import("@redis/bloom/dist/commands/count-min-sketch/INITBYDIM.js");
212
- initByDim: typeof import("@redis/bloom/dist/commands/count-min-sketch/INITBYDIM.js");
213
- INITBYPROB: typeof import("@redis/bloom/dist/commands/count-min-sketch/INITBYPROB.js");
214
- initByProb: typeof import("@redis/bloom/dist/commands/count-min-sketch/INITBYPROB.js");
215
- MERGE: typeof import("@redis/bloom/dist/commands/count-min-sketch/MERGE.js");
216
- merge: typeof import("@redis/bloom/dist/commands/count-min-sketch/MERGE.js");
217
- QUERY: typeof import("@redis/bloom/dist/commands/count-min-sketch/QUERY.js");
218
- query: typeof import("@redis/bloom/dist/commands/count-min-sketch/QUERY.js");
219
- };
220
- cf: {
221
- ADD: typeof import("@redis/bloom/dist/commands/cuckoo/ADD.js");
222
- add: typeof import("@redis/bloom/dist/commands/cuckoo/ADD.js");
223
- ADDNX: typeof import("@redis/bloom/dist/commands/cuckoo/ADDNX.js");
224
- addNX: typeof import("@redis/bloom/dist/commands/cuckoo/ADDNX.js");
225
- COUNT: typeof import("@redis/bloom/dist/commands/cuckoo/COUNT.js");
226
- count: typeof import("@redis/bloom/dist/commands/cuckoo/COUNT.js");
227
- DEL: typeof import("@redis/bloom/dist/commands/cuckoo/DEL.js");
228
- del: typeof import("@redis/bloom/dist/commands/cuckoo/DEL.js");
229
- EXISTS: typeof import("@redis/bloom/dist/commands/cuckoo/EXISTS.js");
230
- exists: typeof import("@redis/bloom/dist/commands/cuckoo/EXISTS.js");
231
- INFO: typeof import("@redis/bloom/dist/commands/cuckoo/INFO.js");
232
- info: typeof import("@redis/bloom/dist/commands/cuckoo/INFO.js");
233
- INSERT: typeof import("@redis/bloom/dist/commands/cuckoo/INSERT.js");
234
- insert: typeof import("@redis/bloom/dist/commands/cuckoo/INSERT.js");
235
- INSERTNX: typeof import("@redis/bloom/dist/commands/cuckoo/INSERTNX.js");
236
- insertNX: typeof import("@redis/bloom/dist/commands/cuckoo/INSERTNX.js");
237
- LOADCHUNK: typeof import("@redis/bloom/dist/commands/cuckoo/LOADCHUNK.js");
238
- loadChunk: typeof import("@redis/bloom/dist/commands/cuckoo/LOADCHUNK.js");
239
- RESERVE: typeof import("@redis/bloom/dist/commands/cuckoo/RESERVE.js");
240
- reserve: typeof import("@redis/bloom/dist/commands/cuckoo/RESERVE.js");
241
- SCANDUMP: typeof import("@redis/bloom/dist/commands/cuckoo/SCANDUMP.js");
242
- scanDump: typeof import("@redis/bloom/dist/commands/cuckoo/SCANDUMP.js");
243
- };
244
- tDigest: {
245
- ADD: typeof import("@redis/bloom/dist/commands/t-digest/ADD.js");
246
- add: typeof import("@redis/bloom/dist/commands/t-digest/ADD.js");
247
- BYRANK: typeof import("@redis/bloom/dist/commands/t-digest/BYRANK.js");
248
- byRank: typeof import("@redis/bloom/dist/commands/t-digest/BYRANK.js");
249
- BYREVRANK: typeof import("@redis/bloom/dist/commands/t-digest/BYREVRANK.js");
250
- byRevRank: typeof import("@redis/bloom/dist/commands/t-digest/BYREVRANK.js");
251
- CDF: typeof import("@redis/bloom/dist/commands/t-digest/CDF.js");
252
- cdf: typeof import("@redis/bloom/dist/commands/t-digest/CDF.js");
253
- CREATE: typeof import("@redis/bloom/dist/commands/t-digest/CREATE.js");
254
- create: typeof import("@redis/bloom/dist/commands/t-digest/CREATE.js");
255
- INFO: typeof import("@redis/bloom/dist/commands/t-digest/INFO.js");
256
- info: typeof import("@redis/bloom/dist/commands/t-digest/INFO.js");
257
- MAX: typeof import("@redis/bloom/dist/commands/t-digest/MAX.js");
258
- max: typeof import("@redis/bloom/dist/commands/t-digest/MAX.js");
259
- MERGE: typeof import("@redis/bloom/dist/commands/t-digest/MERGE.js");
260
- merge: typeof import("@redis/bloom/dist/commands/t-digest/MERGE.js");
261
- MIN: typeof import("@redis/bloom/dist/commands/t-digest/MIN.js");
262
- min: typeof import("@redis/bloom/dist/commands/t-digest/MIN.js");
263
- QUANTILE: typeof import("@redis/bloom/dist/commands/t-digest/QUANTILE.js");
264
- quantile: typeof import("@redis/bloom/dist/commands/t-digest/QUANTILE.js");
265
- RANK: typeof import("@redis/bloom/dist/commands/t-digest/RANK.js");
266
- rank: typeof import("@redis/bloom/dist/commands/t-digest/RANK.js");
267
- RESET: typeof import("@redis/bloom/dist/commands/t-digest/RESET.js");
268
- reset: typeof import("@redis/bloom/dist/commands/t-digest/RESET.js");
269
- REVRANK: typeof import("@redis/bloom/dist/commands/t-digest/REVRANK.js");
270
- revRank: typeof import("@redis/bloom/dist/commands/t-digest/REVRANK.js");
271
- TRIMMED_MEAN: typeof import("@redis/bloom/dist/commands/t-digest/TRIMMED_MEAN.js");
272
- trimmedMean: typeof import("@redis/bloom/dist/commands/t-digest/TRIMMED_MEAN.js");
273
- };
274
- topK: {
275
- ADD: typeof import("@redis/bloom/dist/commands/top-k/ADD.js");
276
- add: typeof import("@redis/bloom/dist/commands/top-k/ADD.js");
277
- COUNT: typeof import("@redis/bloom/dist/commands/top-k/COUNT.js");
278
- count: typeof import("@redis/bloom/dist/commands/top-k/COUNT.js");
279
- INCRBY: typeof import("@redis/bloom/dist/commands/top-k/INCRBY.js");
280
- incrBy: typeof import("@redis/bloom/dist/commands/top-k/INCRBY.js");
281
- INFO: typeof import("@redis/bloom/dist/commands/top-k/INFO.js");
282
- info: typeof import("@redis/bloom/dist/commands/top-k/INFO.js");
283
- LIST_WITHCOUNT: typeof import("@redis/bloom/dist/commands/top-k/LIST_WITHCOUNT.js");
284
- listWithCount: typeof import("@redis/bloom/dist/commands/top-k/LIST_WITHCOUNT.js");
285
- LIST: typeof import("@redis/bloom/dist/commands/top-k/LIST.js");
286
- list: typeof import("@redis/bloom/dist/commands/top-k/LIST.js");
287
- QUERY: typeof import("@redis/bloom/dist/commands/top-k/QUERY.js");
288
- query: typeof import("@redis/bloom/dist/commands/top-k/QUERY.js");
289
- RESERVE: typeof import("@redis/bloom/dist/commands/top-k/RESERVE.js");
290
- reserve: typeof import("@redis/bloom/dist/commands/top-k/RESERVE.js");
291
- };
292
- } & import("redis").RedisModules, import("redis").RedisFunctions, import("redis").RedisScripts>;
293
- useCache: <T>(key: string, defaultValue?: T | undefined) => {
1
+ export type MilkioRedisCacheOptions<T> = {
2
+ defaultValue?: T | undefined;
3
+ expireMs: number;
4
+ };
5
+ export type MilkioRedisFetchOptions<T> = {
6
+ defaultValue?: T | undefined;
7
+ expireMs: number;
8
+ realExpireMs?: number;
9
+ lockInterval?: number;
10
+ refreshLockInterval?: number;
11
+ notFoundExpireMs?: number;
12
+ fetch: () => T | undefined | Promise<T | undefined>;
13
+ };
14
+ export type MilkioRedis<RedisT = any> = {
15
+ redis: RedisT;
16
+ useCache: <T>(key: string, options?: MilkioRedisCacheOptions<T>) => {
294
17
  set: (value: T, expireMs: number) => Promise<T>;
295
- get: () => Promise<undefined | T>;
296
- pull: () => Promise<any>;
18
+ get: () => Promise<T | undefined>;
19
+ pull: () => Promise<T | undefined>;
297
20
  has: () => Promise<boolean>;
298
21
  del: () => Promise<void>;
299
22
  };
23
+ useFetch: <T>(key: string, options: MilkioRedisFetchOptions<T>) => {
24
+ has: () => Promise<boolean>;
25
+ del: () => Promise<void>;
26
+ fetch: () => Promise<T>;
27
+ refresh: () => Promise<void>;
28
+ };
300
29
  useCount: (key: string) => {
301
30
  get: () => Promise<number>;
302
31
  add: (amount: number, expireMs?: number) => Promise<number>;
303
- sub: (key: string, amount: number) => Promise<number>;
32
+ sub: (amount: number) => Promise<number>;
304
33
  };
305
- useResultCache: <Handler extends () => unknown | Promise<unknown>>(key: string, expireMs: number, handler: Handler, options?: {
306
- realExpireMs?: number;
307
- lockInterval?: number;
308
- }) => Promise<Awaited<ReturnType<Handler>>>;
309
34
  useClockIn: (key: string, cleanDate: Date) => {
310
35
  clockIn: (offset: number) => Promise<void>;
311
36
  check: (offset: number) => Promise<boolean>;
@@ -315,5 +40,9 @@ export declare function createRedis<Options extends RedisClientOptions>(options:
315
40
  count: () => Promise<number>;
316
41
  clean: () => Promise<void>;
317
42
  };
318
- }>;
319
- export type Redis = Awaited<ReturnType<typeof createRedis>>;
43
+ };
44
+ export declare function createRedis<RedisT extends {
45
+ PSETEX: any;
46
+ [others: string | number | symbol]: any;
47
+ }>(redisClient: RedisT): Promise<MilkioRedis<RedisT>>;
48
+ export type Redis = MilkioRedis;