@upstash/redis 0.0.0-ci.d6b2e753-20220903 → 0.0.0-ci.d7fcd3c36f1ee4f5033d8520dbf69ded03192429-20240626095216

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.
Files changed (419) hide show
  1. package/README.md +36 -22
  2. package/chunk-L7IXRP4Z.js +1 -0
  3. package/chunk-P34GVAKK.mjs +1 -0
  4. package/cloudflare.d.mts +51 -0
  5. package/cloudflare.d.ts +51 -0
  6. package/cloudflare.js +1 -0
  7. package/cloudflare.mjs +1 -0
  8. package/fastly.d.mts +44 -0
  9. package/fastly.d.ts +44 -0
  10. package/fastly.js +1 -0
  11. package/fastly.mjs +1 -0
  12. package/nodejs.d.mts +87 -0
  13. package/nodejs.d.ts +87 -0
  14. package/nodejs.js +1 -0
  15. package/nodejs.mjs +1 -0
  16. package/package.json +1 -63
  17. package/zmscore-6061c3e1.d.ts +3463 -0
  18. package/.releaserc +0 -14
  19. package/esm/deps/deno.land/x/base64@v0.2.1/base.js +0 -100
  20. package/esm/deps/deno.land/x/base64@v0.2.1/base64url.js +0 -9
  21. package/esm/deps/deno.land/x/sha1@v1.0.3/deps.js +0 -1
  22. package/esm/deps/deno.land/x/sha1@v1.0.3/mod.js +0 -191
  23. package/esm/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.js +0 -50
  24. package/esm/package.json +0 -3
  25. package/esm/pkg/commands/append.js +0 -9
  26. package/esm/pkg/commands/bitcount.js +0 -16
  27. package/esm/pkg/commands/bitop.js +0 -9
  28. package/esm/pkg/commands/bitpos.js +0 -9
  29. package/esm/pkg/commands/command.js +0 -57
  30. package/esm/pkg/commands/dbsize.js +0 -9
  31. package/esm/pkg/commands/decr.js +0 -9
  32. package/esm/pkg/commands/decrby.js +0 -9
  33. package/esm/pkg/commands/del.js +0 -9
  34. package/esm/pkg/commands/echo.js +0 -9
  35. package/esm/pkg/commands/eval.js +0 -9
  36. package/esm/pkg/commands/evalsha.js +0 -9
  37. package/esm/pkg/commands/exists.js +0 -9
  38. package/esm/pkg/commands/expire.js +0 -9
  39. package/esm/pkg/commands/expireat.js +0 -9
  40. package/esm/pkg/commands/flushall.js +0 -13
  41. package/esm/pkg/commands/flushdb.js +0 -13
  42. package/esm/pkg/commands/get.js +0 -9
  43. package/esm/pkg/commands/getbit.js +0 -9
  44. package/esm/pkg/commands/getrange.js +0 -9
  45. package/esm/pkg/commands/getset.js +0 -9
  46. package/esm/pkg/commands/hdel.js +0 -9
  47. package/esm/pkg/commands/hexists.js +0 -9
  48. package/esm/pkg/commands/hget.js +0 -9
  49. package/esm/pkg/commands/hgetall.js +0 -33
  50. package/esm/pkg/commands/hincrby.js +0 -9
  51. package/esm/pkg/commands/hincrbyfloat.js +0 -9
  52. package/esm/pkg/commands/hkeys.js +0 -9
  53. package/esm/pkg/commands/hlen.js +0 -9
  54. package/esm/pkg/commands/hmget.js +0 -35
  55. package/esm/pkg/commands/hmset.js +0 -13
  56. package/esm/pkg/commands/hscan.js +0 -16
  57. package/esm/pkg/commands/hset.js +0 -13
  58. package/esm/pkg/commands/hsetnx.js +0 -9
  59. package/esm/pkg/commands/hstrlen.js +0 -9
  60. package/esm/pkg/commands/hvals.js +0 -9
  61. package/esm/pkg/commands/incr.js +0 -9
  62. package/esm/pkg/commands/incrby.js +0 -9
  63. package/esm/pkg/commands/incrbyfloat.js +0 -9
  64. package/esm/pkg/commands/keys.js +0 -9
  65. package/esm/pkg/commands/lindex.js +0 -6
  66. package/esm/pkg/commands/linsert.js +0 -6
  67. package/esm/pkg/commands/llen.js +0 -9
  68. package/esm/pkg/commands/lpop.js +0 -9
  69. package/esm/pkg/commands/lpos.js +0 -19
  70. package/esm/pkg/commands/lpush.js +0 -9
  71. package/esm/pkg/commands/lpushx.js +0 -9
  72. package/esm/pkg/commands/lrange.js +0 -6
  73. package/esm/pkg/commands/lrem.js +0 -6
  74. package/esm/pkg/commands/lset.js +0 -6
  75. package/esm/pkg/commands/ltrim.js +0 -6
  76. package/esm/pkg/commands/mget.js +0 -9
  77. package/esm/pkg/commands/mod.js +0 -115
  78. package/esm/pkg/commands/mset.js +0 -12
  79. package/esm/pkg/commands/msetnx.js +0 -9
  80. package/esm/pkg/commands/persist.js +0 -9
  81. package/esm/pkg/commands/pexpire.js +0 -9
  82. package/esm/pkg/commands/pexpireat.js +0 -9
  83. package/esm/pkg/commands/ping.js +0 -13
  84. package/esm/pkg/commands/psetex.js +0 -9
  85. package/esm/pkg/commands/pttl.js +0 -9
  86. package/esm/pkg/commands/publish.js +0 -9
  87. package/esm/pkg/commands/randomkey.js +0 -9
  88. package/esm/pkg/commands/rename.js +0 -9
  89. package/esm/pkg/commands/renamenx.js +0 -9
  90. package/esm/pkg/commands/rpop.js +0 -9
  91. package/esm/pkg/commands/rpush.js +0 -9
  92. package/esm/pkg/commands/rpushx.js +0 -9
  93. package/esm/pkg/commands/sadd.js +0 -9
  94. package/esm/pkg/commands/scan.js +0 -19
  95. package/esm/pkg/commands/scard.js +0 -9
  96. package/esm/pkg/commands/script_exists.js +0 -12
  97. package/esm/pkg/commands/script_flush.js +0 -16
  98. package/esm/pkg/commands/script_load.js +0 -9
  99. package/esm/pkg/commands/sdiff.js +0 -9
  100. package/esm/pkg/commands/sdiffstore.js +0 -9
  101. package/esm/pkg/commands/set.js +0 -36
  102. package/esm/pkg/commands/setbit.js +0 -9
  103. package/esm/pkg/commands/setex.js +0 -9
  104. package/esm/pkg/commands/setnx.js +0 -9
  105. package/esm/pkg/commands/setrange.js +0 -9
  106. package/esm/pkg/commands/sinter.js +0 -9
  107. package/esm/pkg/commands/sinterstore.js +0 -9
  108. package/esm/pkg/commands/sismember.js +0 -9
  109. package/esm/pkg/commands/smembers.js +0 -9
  110. package/esm/pkg/commands/smove.js +0 -9
  111. package/esm/pkg/commands/spop.js +0 -13
  112. package/esm/pkg/commands/srandmember.js +0 -13
  113. package/esm/pkg/commands/srem.js +0 -9
  114. package/esm/pkg/commands/sscan.js +0 -16
  115. package/esm/pkg/commands/strlen.js +0 -9
  116. package/esm/pkg/commands/sunion.js +0 -9
  117. package/esm/pkg/commands/sunionstore.js +0 -9
  118. package/esm/pkg/commands/time.js +0 -9
  119. package/esm/pkg/commands/touch.js +0 -9
  120. package/esm/pkg/commands/ttl.js +0 -9
  121. package/esm/pkg/commands/type.js +0 -9
  122. package/esm/pkg/commands/unlink.js +0 -9
  123. package/esm/pkg/commands/zadd.js +0 -26
  124. package/esm/pkg/commands/zcard.js +0 -9
  125. package/esm/pkg/commands/zcount.js +0 -9
  126. package/esm/pkg/commands/zincrby.js +0 -9
  127. package/esm/pkg/commands/zinterstore.js +0 -27
  128. package/esm/pkg/commands/zlexcount.js +0 -9
  129. package/esm/pkg/commands/zmscore.js +0 -10
  130. package/esm/pkg/commands/zpopmax.js +0 -13
  131. package/esm/pkg/commands/zpopmin.js +0 -13
  132. package/esm/pkg/commands/zrange.js +0 -26
  133. package/esm/pkg/commands/zrank.js +0 -9
  134. package/esm/pkg/commands/zrem.js +0 -9
  135. package/esm/pkg/commands/zremrangebylex.js +0 -9
  136. package/esm/pkg/commands/zremrangebyrank.js +0 -9
  137. package/esm/pkg/commands/zremrangebyscore.js +0 -9
  138. package/esm/pkg/commands/zrevrank.js +0 -9
  139. package/esm/pkg/commands/zscan.js +0 -16
  140. package/esm/pkg/commands/zscore.js +0 -9
  141. package/esm/pkg/commands/zunionstore.js +0 -27
  142. package/esm/pkg/error.js +0 -9
  143. package/esm/pkg/http.js +0 -77
  144. package/esm/pkg/pipeline.js +0 -1144
  145. package/esm/pkg/redis.js +0 -1102
  146. package/esm/pkg/script.js +0 -77
  147. package/esm/pkg/types.js +0 -1
  148. package/esm/pkg/util.js +0 -31
  149. package/esm/platforms/cloudflare.js +0 -62
  150. package/esm/platforms/fastly.js +0 -40
  151. package/esm/platforms/node_with_fetch.js +0 -60
  152. package/esm/platforms/nodejs.js +0 -59
  153. package/script/deps/deno.land/x/base64@v0.2.1/base.js +0 -104
  154. package/script/deps/deno.land/x/base64@v0.2.1/base64url.js +0 -13
  155. package/script/deps/deno.land/x/sha1@v1.0.3/deps.js +0 -6
  156. package/script/deps/deno.land/x/sha1@v1.0.3/mod.js +0 -196
  157. package/script/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.js +0 -55
  158. package/script/package.json +0 -3
  159. package/script/pkg/commands/append.js +0 -13
  160. package/script/pkg/commands/bitcount.js +0 -20
  161. package/script/pkg/commands/bitop.js +0 -13
  162. package/script/pkg/commands/bitpos.js +0 -13
  163. package/script/pkg/commands/command.js +0 -61
  164. package/script/pkg/commands/dbsize.js +0 -13
  165. package/script/pkg/commands/decr.js +0 -13
  166. package/script/pkg/commands/decrby.js +0 -13
  167. package/script/pkg/commands/del.js +0 -13
  168. package/script/pkg/commands/echo.js +0 -13
  169. package/script/pkg/commands/eval.js +0 -13
  170. package/script/pkg/commands/evalsha.js +0 -13
  171. package/script/pkg/commands/exists.js +0 -13
  172. package/script/pkg/commands/expire.js +0 -13
  173. package/script/pkg/commands/expireat.js +0 -13
  174. package/script/pkg/commands/flushall.js +0 -17
  175. package/script/pkg/commands/flushdb.js +0 -17
  176. package/script/pkg/commands/get.js +0 -13
  177. package/script/pkg/commands/getbit.js +0 -13
  178. package/script/pkg/commands/getrange.js +0 -13
  179. package/script/pkg/commands/getset.js +0 -13
  180. package/script/pkg/commands/hdel.js +0 -13
  181. package/script/pkg/commands/hexists.js +0 -13
  182. package/script/pkg/commands/hget.js +0 -13
  183. package/script/pkg/commands/hgetall.js +0 -37
  184. package/script/pkg/commands/hincrby.js +0 -13
  185. package/script/pkg/commands/hincrbyfloat.js +0 -13
  186. package/script/pkg/commands/hkeys.js +0 -13
  187. package/script/pkg/commands/hlen.js +0 -13
  188. package/script/pkg/commands/hmget.js +0 -39
  189. package/script/pkg/commands/hmset.js +0 -17
  190. package/script/pkg/commands/hscan.js +0 -20
  191. package/script/pkg/commands/hset.js +0 -17
  192. package/script/pkg/commands/hsetnx.js +0 -13
  193. package/script/pkg/commands/hstrlen.js +0 -13
  194. package/script/pkg/commands/hvals.js +0 -13
  195. package/script/pkg/commands/incr.js +0 -13
  196. package/script/pkg/commands/incrby.js +0 -13
  197. package/script/pkg/commands/incrbyfloat.js +0 -13
  198. package/script/pkg/commands/keys.js +0 -13
  199. package/script/pkg/commands/lindex.js +0 -10
  200. package/script/pkg/commands/linsert.js +0 -10
  201. package/script/pkg/commands/llen.js +0 -13
  202. package/script/pkg/commands/lpop.js +0 -13
  203. package/script/pkg/commands/lpos.js +0 -23
  204. package/script/pkg/commands/lpush.js +0 -13
  205. package/script/pkg/commands/lpushx.js +0 -13
  206. package/script/pkg/commands/lrange.js +0 -10
  207. package/script/pkg/commands/lrem.js +0 -10
  208. package/script/pkg/commands/lset.js +0 -10
  209. package/script/pkg/commands/ltrim.js +0 -10
  210. package/script/pkg/commands/mget.js +0 -13
  211. package/script/pkg/commands/mod.js +0 -131
  212. package/script/pkg/commands/mset.js +0 -16
  213. package/script/pkg/commands/msetnx.js +0 -13
  214. package/script/pkg/commands/persist.js +0 -13
  215. package/script/pkg/commands/pexpire.js +0 -13
  216. package/script/pkg/commands/pexpireat.js +0 -13
  217. package/script/pkg/commands/ping.js +0 -17
  218. package/script/pkg/commands/psetex.js +0 -13
  219. package/script/pkg/commands/pttl.js +0 -13
  220. package/script/pkg/commands/publish.js +0 -13
  221. package/script/pkg/commands/randomkey.js +0 -13
  222. package/script/pkg/commands/rename.js +0 -13
  223. package/script/pkg/commands/renamenx.js +0 -13
  224. package/script/pkg/commands/rpop.js +0 -13
  225. package/script/pkg/commands/rpush.js +0 -13
  226. package/script/pkg/commands/rpushx.js +0 -13
  227. package/script/pkg/commands/sadd.js +0 -13
  228. package/script/pkg/commands/scan.js +0 -23
  229. package/script/pkg/commands/scard.js +0 -13
  230. package/script/pkg/commands/script_exists.js +0 -16
  231. package/script/pkg/commands/script_flush.js +0 -20
  232. package/script/pkg/commands/script_load.js +0 -13
  233. package/script/pkg/commands/sdiff.js +0 -13
  234. package/script/pkg/commands/sdiffstore.js +0 -13
  235. package/script/pkg/commands/set.js +0 -40
  236. package/script/pkg/commands/setbit.js +0 -13
  237. package/script/pkg/commands/setex.js +0 -13
  238. package/script/pkg/commands/setnx.js +0 -13
  239. package/script/pkg/commands/setrange.js +0 -13
  240. package/script/pkg/commands/sinter.js +0 -13
  241. package/script/pkg/commands/sinterstore.js +0 -13
  242. package/script/pkg/commands/sismember.js +0 -13
  243. package/script/pkg/commands/smembers.js +0 -13
  244. package/script/pkg/commands/smove.js +0 -13
  245. package/script/pkg/commands/spop.js +0 -17
  246. package/script/pkg/commands/srandmember.js +0 -17
  247. package/script/pkg/commands/srem.js +0 -13
  248. package/script/pkg/commands/sscan.js +0 -20
  249. package/script/pkg/commands/strlen.js +0 -13
  250. package/script/pkg/commands/sunion.js +0 -13
  251. package/script/pkg/commands/sunionstore.js +0 -13
  252. package/script/pkg/commands/time.js +0 -13
  253. package/script/pkg/commands/touch.js +0 -13
  254. package/script/pkg/commands/ttl.js +0 -13
  255. package/script/pkg/commands/type.js +0 -13
  256. package/script/pkg/commands/unlink.js +0 -13
  257. package/script/pkg/commands/zadd.js +0 -30
  258. package/script/pkg/commands/zcard.js +0 -13
  259. package/script/pkg/commands/zcount.js +0 -13
  260. package/script/pkg/commands/zincrby.js +0 -13
  261. package/script/pkg/commands/zinterstore.js +0 -31
  262. package/script/pkg/commands/zlexcount.js +0 -13
  263. package/script/pkg/commands/zmscore.js +0 -14
  264. package/script/pkg/commands/zpopmax.js +0 -17
  265. package/script/pkg/commands/zpopmin.js +0 -17
  266. package/script/pkg/commands/zrange.js +0 -30
  267. package/script/pkg/commands/zrank.js +0 -13
  268. package/script/pkg/commands/zrem.js +0 -13
  269. package/script/pkg/commands/zremrangebylex.js +0 -13
  270. package/script/pkg/commands/zremrangebyrank.js +0 -13
  271. package/script/pkg/commands/zremrangebyscore.js +0 -13
  272. package/script/pkg/commands/zrevrank.js +0 -13
  273. package/script/pkg/commands/zscan.js +0 -20
  274. package/script/pkg/commands/zscore.js +0 -13
  275. package/script/pkg/commands/zunionstore.js +0 -31
  276. package/script/pkg/error.js +0 -13
  277. package/script/pkg/http.js +0 -81
  278. package/script/pkg/pipeline.js +0 -1148
  279. package/script/pkg/redis.js +0 -1106
  280. package/script/pkg/script.js +0 -81
  281. package/script/pkg/types.js +0 -2
  282. package/script/pkg/util.js +0 -35
  283. package/script/platforms/cloudflare.js +0 -89
  284. package/script/platforms/fastly.js +0 -67
  285. package/script/platforms/node_with_fetch.js +0 -87
  286. package/script/platforms/nodejs.js +0 -86
  287. package/types/deps/deno.land/x/base64@v0.2.1/base.d.ts +0 -5
  288. package/types/deps/deno.land/x/base64@v0.2.1/base64url.d.ts +0 -1
  289. package/types/deps/deno.land/x/sha1@v1.0.3/deps.d.ts +0 -1
  290. package/types/deps/deno.land/x/sha1@v1.0.3/mod.d.ts +0 -26
  291. package/types/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.d.ts +0 -3
  292. package/types/pkg/commands/append.d.ts +0 -7
  293. package/types/pkg/commands/bitcount.d.ts +0 -8
  294. package/types/pkg/commands/bitop.d.ts +0 -12
  295. package/types/pkg/commands/bitpos.d.ts +0 -7
  296. package/types/pkg/commands/command.d.ts +0 -37
  297. package/types/pkg/commands/dbsize.d.ts +0 -7
  298. package/types/pkg/commands/decr.d.ts +0 -7
  299. package/types/pkg/commands/decrby.d.ts +0 -7
  300. package/types/pkg/commands/del.d.ts +0 -7
  301. package/types/pkg/commands/echo.d.ts +0 -7
  302. package/types/pkg/commands/eval.d.ts +0 -7
  303. package/types/pkg/commands/evalsha.d.ts +0 -7
  304. package/types/pkg/commands/exists.d.ts +0 -7
  305. package/types/pkg/commands/expire.d.ts +0 -7
  306. package/types/pkg/commands/expireat.d.ts +0 -7
  307. package/types/pkg/commands/flushall.d.ts +0 -9
  308. package/types/pkg/commands/flushdb.d.ts +0 -9
  309. package/types/pkg/commands/get.d.ts +0 -7
  310. package/types/pkg/commands/getbit.d.ts +0 -7
  311. package/types/pkg/commands/getrange.d.ts +0 -7
  312. package/types/pkg/commands/getset.d.ts +0 -7
  313. package/types/pkg/commands/hdel.d.ts +0 -7
  314. package/types/pkg/commands/hexists.d.ts +0 -7
  315. package/types/pkg/commands/hget.d.ts +0 -7
  316. package/types/pkg/commands/hgetall.d.ts +0 -7
  317. package/types/pkg/commands/hincrby.d.ts +0 -7
  318. package/types/pkg/commands/hincrbyfloat.d.ts +0 -7
  319. package/types/pkg/commands/hkeys.d.ts +0 -7
  320. package/types/pkg/commands/hlen.d.ts +0 -7
  321. package/types/pkg/commands/hmget.d.ts +0 -15
  322. package/types/pkg/commands/hmset.d.ts +0 -9
  323. package/types/pkg/commands/hscan.d.ts +0 -24
  324. package/types/pkg/commands/hset.d.ts +0 -9
  325. package/types/pkg/commands/hsetnx.d.ts +0 -7
  326. package/types/pkg/commands/hstrlen.d.ts +0 -7
  327. package/types/pkg/commands/hvals.d.ts +0 -7
  328. package/types/pkg/commands/incr.d.ts +0 -7
  329. package/types/pkg/commands/incrby.d.ts +0 -7
  330. package/types/pkg/commands/incrbyfloat.d.ts +0 -7
  331. package/types/pkg/commands/keys.d.ts +0 -7
  332. package/types/pkg/commands/lindex.d.ts +0 -4
  333. package/types/pkg/commands/linsert.d.ts +0 -9
  334. package/types/pkg/commands/llen.d.ts +0 -7
  335. package/types/pkg/commands/lpop.d.ts +0 -7
  336. package/types/pkg/commands/lpos.d.ts +0 -15
  337. package/types/pkg/commands/lpush.d.ts +0 -7
  338. package/types/pkg/commands/lpushx.d.ts +0 -7
  339. package/types/pkg/commands/lrange.d.ts +0 -4
  340. package/types/pkg/commands/lrem.d.ts +0 -4
  341. package/types/pkg/commands/lset.d.ts +0 -4
  342. package/types/pkg/commands/ltrim.d.ts +0 -4
  343. package/types/pkg/commands/mget.d.ts +0 -7
  344. package/types/pkg/commands/mod.d.ts +0 -115
  345. package/types/pkg/commands/mset.d.ts +0 -9
  346. package/types/pkg/commands/msetnx.d.ts +0 -9
  347. package/types/pkg/commands/persist.d.ts +0 -7
  348. package/types/pkg/commands/pexpire.d.ts +0 -7
  349. package/types/pkg/commands/pexpireat.d.ts +0 -7
  350. package/types/pkg/commands/ping.d.ts +0 -7
  351. package/types/pkg/commands/psetex.d.ts +0 -7
  352. package/types/pkg/commands/pttl.d.ts +0 -7
  353. package/types/pkg/commands/publish.d.ts +0 -7
  354. package/types/pkg/commands/randomkey.d.ts +0 -7
  355. package/types/pkg/commands/rename.d.ts +0 -7
  356. package/types/pkg/commands/renamenx.d.ts +0 -7
  357. package/types/pkg/commands/rpop.d.ts +0 -7
  358. package/types/pkg/commands/rpush.d.ts +0 -7
  359. package/types/pkg/commands/rpushx.d.ts +0 -7
  360. package/types/pkg/commands/sadd.d.ts +0 -7
  361. package/types/pkg/commands/scan.d.ts +0 -18
  362. package/types/pkg/commands/scard.d.ts +0 -7
  363. package/types/pkg/commands/script_exists.d.ts +0 -7
  364. package/types/pkg/commands/script_flush.d.ts +0 -14
  365. package/types/pkg/commands/script_load.d.ts +0 -7
  366. package/types/pkg/commands/sdiff.d.ts +0 -7
  367. package/types/pkg/commands/sdiffstore.d.ts +0 -7
  368. package/types/pkg/commands/set.d.ts +0 -55
  369. package/types/pkg/commands/setbit.d.ts +0 -7
  370. package/types/pkg/commands/setex.d.ts +0 -7
  371. package/types/pkg/commands/setnx.d.ts +0 -7
  372. package/types/pkg/commands/setrange.d.ts +0 -7
  373. package/types/pkg/commands/sinter.d.ts +0 -7
  374. package/types/pkg/commands/sinterstore.d.ts +0 -7
  375. package/types/pkg/commands/sismember.d.ts +0 -7
  376. package/types/pkg/commands/smembers.d.ts +0 -7
  377. package/types/pkg/commands/smove.d.ts +0 -7
  378. package/types/pkg/commands/spop.d.ts +0 -7
  379. package/types/pkg/commands/srandmember.d.ts +0 -7
  380. package/types/pkg/commands/srem.d.ts +0 -7
  381. package/types/pkg/commands/sscan.d.ts +0 -24
  382. package/types/pkg/commands/strlen.d.ts +0 -7
  383. package/types/pkg/commands/sunion.d.ts +0 -7
  384. package/types/pkg/commands/sunionstore.d.ts +0 -7
  385. package/types/pkg/commands/time.d.ts +0 -7
  386. package/types/pkg/commands/touch.d.ts +0 -7
  387. package/types/pkg/commands/ttl.d.ts +0 -7
  388. package/types/pkg/commands/type.d.ts +0 -8
  389. package/types/pkg/commands/unlink.d.ts +0 -7
  390. package/types/pkg/commands/zadd.d.ts +0 -35
  391. package/types/pkg/commands/zcard.d.ts +0 -7
  392. package/types/pkg/commands/zcount.d.ts +0 -7
  393. package/types/pkg/commands/zincrby.d.ts +0 -7
  394. package/types/pkg/commands/zinterstore.d.ts +0 -30
  395. package/types/pkg/commands/zlexcount.d.ts +0 -7
  396. package/types/pkg/commands/zmscore.d.ts +0 -7
  397. package/types/pkg/commands/zpopmax.d.ts +0 -7
  398. package/types/pkg/commands/zpopmin.d.ts +0 -7
  399. package/types/pkg/commands/zrange.d.ts +0 -42
  400. package/types/pkg/commands/zrank.d.ts +0 -7
  401. package/types/pkg/commands/zrem.d.ts +0 -7
  402. package/types/pkg/commands/zremrangebylex.d.ts +0 -7
  403. package/types/pkg/commands/zremrangebyrank.d.ts +0 -7
  404. package/types/pkg/commands/zremrangebyscore.d.ts +0 -7
  405. package/types/pkg/commands/zrevrank.d.ts +0 -7
  406. package/types/pkg/commands/zscan.d.ts +0 -24
  407. package/types/pkg/commands/zscore.d.ts +0 -7
  408. package/types/pkg/commands/zunionstore.d.ts +0 -30
  409. package/types/pkg/error.d.ts +0 -6
  410. package/types/pkg/http.d.ts +0 -54
  411. package/types/pkg/pipeline.d.ts +0 -552
  412. package/types/pkg/redis.d.ts +0 -534
  413. package/types/pkg/script.d.ts +0 -42
  414. package/types/pkg/types.d.ts +0 -1
  415. package/types/pkg/util.d.ts +0 -1
  416. package/types/platforms/cloudflare.d.ts +0 -42
  417. package/types/platforms/fastly.d.ts +0 -45
  418. package/types/platforms/node_with_fetch.d.ts +0 -82
  419. package/types/platforms/nodejs.d.ts +0 -81
@@ -0,0 +1,3463 @@
1
+ type CommandArgs<TCommand extends new (..._args: any) => any> = ConstructorParameters<TCommand>[0];
2
+ type Telemetry = {
3
+ /**
4
+ * Upstash-Telemetry-Sdk
5
+ * @example @upstash/redis@v1.1.1
6
+ */
7
+ sdk?: string;
8
+ /**
9
+ * Upstash-Telemetry-Platform
10
+ * @example cloudflare
11
+ */
12
+ platform?: string;
13
+ /**
14
+ * Upstash-Telemetry-Runtime
15
+ * @example node@v18
16
+ */
17
+ runtime?: string;
18
+ };
19
+ type RedisOptions = {
20
+ /**
21
+ * Automatically try to deserialize the returned data from upstash using `JSON.deserialize`
22
+ *
23
+ * @default true
24
+ */
25
+ automaticDeserialization?: boolean;
26
+ latencyLogging?: boolean;
27
+ enableTelemetry?: boolean;
28
+ enableAutoPipelining?: boolean;
29
+ };
30
+
31
+ type CacheSetting = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload";
32
+ type UpstashRequest = {
33
+ path?: string[];
34
+ /**
35
+ * Request body will be serialized to json
36
+ */
37
+ body?: unknown;
38
+ };
39
+ type UpstashResponse<TResult> = {
40
+ result?: TResult;
41
+ error?: string;
42
+ };
43
+ interface Requester {
44
+ request: <TResult = unknown>(req: UpstashRequest) => Promise<UpstashResponse<TResult>>;
45
+ }
46
+ type RetryConfig = false | {
47
+ /**
48
+ * The number of retries to attempt before giving up.
49
+ *
50
+ * @default 5
51
+ */
52
+ retries?: number;
53
+ /**
54
+ * A backoff function receives the current retry cound and returns a number in milliseconds to wait before retrying.
55
+ *
56
+ * @default
57
+ * ```ts
58
+ * Math.exp(retryCount) * 50
59
+ * ```
60
+ */
61
+ backoff?: (retryCount: number) => number;
62
+ };
63
+ type RequesterConfig = {
64
+ /**
65
+ * Configure the retry behaviour in case of network errors
66
+ */
67
+ retry?: RetryConfig;
68
+ /**
69
+ * Due to the nature of dynamic and custom data, it is possible to write data to redis that is not
70
+ * valid json and will therefore cause errors when deserializing. This used to happen very
71
+ * frequently with non-utf8 data, such as emojis.
72
+ *
73
+ * By default we will therefore encode the data as base64 on the server, before sending it to the
74
+ * client. The client will then decode the base64 data and parse it as utf8.
75
+ *
76
+ * For very large entries, this can add a few milliseconds, so if you are sure that your data is
77
+ * valid utf8, you can disable this behaviour by setting this option to false.
78
+ *
79
+ * Here's what the response body looks like:
80
+ *
81
+ * ```json
82
+ * {
83
+ * result?: "base64-encoded",
84
+ * error?: string
85
+ * }
86
+ * ```
87
+ *
88
+ * @default "base64"
89
+ */
90
+ responseEncoding?: false | "base64";
91
+ /**
92
+ * Configure the cache behaviour
93
+ * @default "no-store"
94
+ */
95
+ cache?: CacheSetting;
96
+ };
97
+
98
+ type Serialize = (data: unknown) => string | number | boolean;
99
+ type Deserialize<TResult, TData> = (result: TResult) => TData;
100
+ type CommandOptions<TResult, TData> = {
101
+ /**
102
+ * Custom deserializer
103
+ */
104
+ deserialize?: (result: TResult) => TData;
105
+ /**
106
+ * Automatically try to deserialize the returned data from upstash using `JSON.deserialize`
107
+ *
108
+ * @default true
109
+ */
110
+ automaticDeserialization?: boolean;
111
+ latencyLogging?: boolean;
112
+ };
113
+ /**
114
+ * Command offers default (de)serialization and the exec method to all commands.
115
+ *
116
+ * TData represents what the user will enter or receive,
117
+ * TResult is the raw data returned from upstash, which may need to be transformed or parsed.
118
+ */
119
+ declare class Command<TResult, TData> {
120
+ readonly command: (string | number | boolean)[];
121
+ readonly serialize: Serialize;
122
+ readonly deserialize: Deserialize<TResult, TData>;
123
+ /**
124
+ * Create a new command instance.
125
+ *
126
+ * You can define a custom `deserialize` function. By default we try to deserialize as json.
127
+ */
128
+ constructor(command: (string | boolean | number | unknown)[], opts?: CommandOptions<TResult, TData>);
129
+ /**
130
+ * Execute the command using a client.
131
+ */
132
+ exec(client: Requester): Promise<TData>;
133
+ }
134
+
135
+ type ZUnionCommandOptions = {
136
+ withScores?: boolean;
137
+ aggregate?: "sum" | "min" | "max";
138
+ } & ({
139
+ weight: number;
140
+ weights?: never;
141
+ } | {
142
+ weight?: never;
143
+ weights: number[];
144
+ } | {
145
+ weight?: never;
146
+ weights?: never;
147
+ });
148
+ /**
149
+ * @see https://redis.io/commands/zunion
150
+ */
151
+ declare class ZUnionCommand<TData extends unknown[]> extends Command<string[], TData> {
152
+ constructor(cmd: [numKeys: 1, key: string, opts?: ZUnionCommandOptions], cmdOpts?: CommandOptions<string[], TData>);
153
+ constructor(cmd: [numKeys: number, keys: string[], opts?: ZUnionCommandOptions], cmdOpts?: CommandOptions<string[], TData>);
154
+ }
155
+
156
+ type ZUnionStoreCommandOptions = {
157
+ aggregate?: "sum" | "min" | "max";
158
+ } & ({
159
+ weight: number;
160
+ weights?: never;
161
+ } | {
162
+ weight?: never;
163
+ weights: number[];
164
+ } | {
165
+ weight?: never;
166
+ weights?: never;
167
+ });
168
+ /**
169
+ * @see https://redis.io/commands/zunionstore
170
+ */
171
+ declare class ZUnionStoreCommand extends Command<number, number> {
172
+ constructor(cmd: [destination: string, numKeys: 1, key: string, opts?: ZUnionStoreCommandOptions], cmdOpts?: CommandOptions<number, number>);
173
+ constructor(cmd: [destination: string, numKeys: number, keys: string[], opts?: ZUnionStoreCommandOptions], cmdOpts?: CommandOptions<number, number>);
174
+ }
175
+
176
+ type ZInterStoreCommandOptions = {
177
+ aggregate?: "sum" | "min" | "max";
178
+ } & ({
179
+ weight: number;
180
+ weights?: never;
181
+ } | {
182
+ weight?: never;
183
+ weights: number[];
184
+ } | {
185
+ weight?: never;
186
+ weights?: never;
187
+ });
188
+ /**
189
+ * @see https://redis.io/commands/zInterstore
190
+ */
191
+ declare class ZInterStoreCommand extends Command<number, number> {
192
+ constructor(cmd: [destination: string, numKeys: 1, key: string, opts?: ZInterStoreCommandOptions], cmdOpts?: CommandOptions<number, number>);
193
+ constructor(cmd: [destination: string, numKeys: number, keys: string[], opts?: ZInterStoreCommandOptions], cmdOpts?: CommandOptions<number, number>);
194
+ }
195
+
196
+ type Type = "string" | "list" | "set" | "zset" | "hash" | "none";
197
+ /**
198
+ * @see https://redis.io/commands/type
199
+ */
200
+ declare class TypeCommand extends Command<Type, Type> {
201
+ constructor(cmd: [key: string], opts?: CommandOptions<Type, Type>);
202
+ }
203
+
204
+ type ScriptFlushCommandOptions = {
205
+ sync: true;
206
+ async?: never;
207
+ } | {
208
+ sync?: never;
209
+ async: true;
210
+ };
211
+ /**
212
+ * @see https://redis.io/commands/script-flush
213
+ */
214
+ declare class ScriptFlushCommand extends Command<"OK", "OK"> {
215
+ constructor([opts]: [opts?: ScriptFlushCommandOptions], cmdOpts?: CommandOptions<"OK", "OK">);
216
+ }
217
+
218
+ type ScanCommandOptions = {
219
+ match?: string;
220
+ count?: number;
221
+ type?: string;
222
+ };
223
+ /**
224
+ * @see https://redis.io/commands/scan
225
+ */
226
+ declare class ScanCommand extends Command<[string, string[]], [string, string[]]> {
227
+ constructor([cursor, opts]: [cursor: string | number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[string, string[]], [string, string[]]>);
228
+ }
229
+
230
+ type GeoAddCommandOptions = {
231
+ nx?: boolean;
232
+ xx?: never;
233
+ } | ({
234
+ nx?: never;
235
+ xx?: boolean;
236
+ } & {
237
+ ch?: boolean;
238
+ });
239
+ interface GeoMember<TMemberType> {
240
+ latitude: number;
241
+ longitude: number;
242
+ member: TMemberType;
243
+ }
244
+ /**
245
+ * @see https://redis.io/commands/geoadd
246
+ */
247
+ declare class GeoAddCommand<TMemberType = string> extends Command<number | null, number | null> {
248
+ constructor([key, arg1, ...arg2]: [
249
+ string,
250
+ GeoMember<TMemberType> | GeoAddCommandOptions,
251
+ ...GeoMember<TMemberType>[]
252
+ ], opts?: CommandOptions<number | null, number | null>);
253
+ }
254
+
255
+ /**
256
+ * @see https://redis.io/commands/append
257
+ */
258
+ declare class AppendCommand extends Command<number, number> {
259
+ constructor(cmd: [key: string, value: string], opts?: CommandOptions<number, number>);
260
+ }
261
+
262
+ /**
263
+ * @see https://redis.io/commands/bitcount
264
+ */
265
+ declare class BitCountCommand extends Command<number, number> {
266
+ constructor(cmd: [key: string, start?: never, end?: never], opts?: CommandOptions<number, number>);
267
+ constructor(cmd: [key: string, start: number, end: number], opts?: CommandOptions<number, number>);
268
+ }
269
+
270
+ /**
271
+ * @see https://redis.io/commands/bitop
272
+ */
273
+ declare class BitOpCommand extends Command<number, number> {
274
+ constructor(cmd: [op: "and" | "or" | "xor", destinationKey: string, ...sourceKeys: string[]], opts?: CommandOptions<number, number>);
275
+ constructor(cmd: [op: "not", destinationKey: string, sourceKey: string], opts?: CommandOptions<number, number>);
276
+ }
277
+
278
+ /**
279
+ * @see https://redis.io/commands/bitpos
280
+ */
281
+ declare class BitPosCommand extends Command<number, number> {
282
+ constructor(cmd: [key: string, bit: 0 | 1, start?: number, end?: number], opts?: CommandOptions<number, number>);
283
+ }
284
+
285
+ /**
286
+ * @see https://redis.io/commands/copy
287
+ */
288
+ declare class CopyCommand extends Command<number, "COPIED" | "NOT_COPIED"> {
289
+ constructor([key, destinationKey, opts]: [key: string, destinationKey: string, opts?: {
290
+ replace: boolean;
291
+ }], commandOptions?: CommandOptions<number, "COPIED" | "NOT_COPIED">);
292
+ }
293
+
294
+ /**
295
+ * @see https://redis.io/commands/dbsize
296
+ */
297
+ declare class DBSizeCommand extends Command<number, number> {
298
+ constructor(opts?: CommandOptions<number, number>);
299
+ }
300
+
301
+ /**
302
+ * @see https://redis.io/commands/decr
303
+ */
304
+ declare class DecrCommand extends Command<number, number> {
305
+ constructor(cmd: [key: string], opts?: CommandOptions<number, number>);
306
+ }
307
+
308
+ /**
309
+ * @see https://redis.io/commands/decrby
310
+ */
311
+ declare class DecrByCommand extends Command<number, number> {
312
+ constructor(cmd: [key: string, decrement: number], opts?: CommandOptions<number, number>);
313
+ }
314
+
315
+ /**
316
+ * @see https://redis.io/commands/del
317
+ */
318
+ declare class DelCommand extends Command<number, number> {
319
+ constructor(cmd: [...keys: string[]], opts?: CommandOptions<number, number>);
320
+ }
321
+
322
+ /**
323
+ * @see https://redis.io/commands/echo
324
+ */
325
+ declare class EchoCommand extends Command<string, string> {
326
+ constructor(cmd: [message: string], opts?: CommandOptions<string, string>);
327
+ }
328
+
329
+ /**
330
+ * @see https://redis.io/commands/eval
331
+ */
332
+ declare class EvalCommand<TArgs extends unknown[], TData> extends Command<unknown, TData> {
333
+ constructor([script, keys, args]: [script: string, keys: string[], args: TArgs], opts?: CommandOptions<unknown, TData>);
334
+ }
335
+
336
+ /**
337
+ * @see https://redis.io/commands/evalsha
338
+ */
339
+ declare class EvalshaCommand<TArgs extends unknown[], TData> extends Command<unknown, TData> {
340
+ constructor([sha, keys, args]: [sha: string, keys: string[], args?: TArgs], opts?: CommandOptions<unknown, TData>);
341
+ }
342
+
343
+ /**
344
+ * @see https://redis.io/commands/exists
345
+ */
346
+ declare class ExistsCommand extends Command<number, number> {
347
+ constructor(cmd: [...keys: string[]], opts?: CommandOptions<number, number>);
348
+ }
349
+
350
+ type ExpireOptions = "NX" | "nx" | "XX" | "xx" | "GT" | "gt" | "LT" | "lt";
351
+ declare class ExpireCommand extends Command<"0" | "1", 0 | 1> {
352
+ constructor(cmd: [key: string, seconds: number, option?: ExpireOptions], opts?: CommandOptions<"0" | "1", 0 | 1>);
353
+ }
354
+
355
+ /**
356
+ * @see https://redis.io/commands/expireat
357
+ */
358
+ declare class ExpireAtCommand extends Command<"0" | "1", 0 | 1> {
359
+ constructor(cmd: [key: string, unix: number], opts?: CommandOptions<"0" | "1", 0 | 1>);
360
+ }
361
+
362
+ /**
363
+ * @see https://redis.io/commands/flushall
364
+ */
365
+ declare class FlushAllCommand extends Command<"OK", "OK"> {
366
+ constructor(args?: [{
367
+ async?: boolean;
368
+ }], opts?: CommandOptions<"OK", "OK">);
369
+ }
370
+
371
+ /**
372
+ * @see https://redis.io/commands/flushdb
373
+ */
374
+ declare class FlushDBCommand extends Command<"OK", "OK"> {
375
+ constructor([opts]: [opts?: {
376
+ async?: boolean;
377
+ }], cmdOpts?: CommandOptions<"OK", "OK">);
378
+ }
379
+
380
+ /**
381
+ * @see https://redis.io/commands/geodist
382
+ */
383
+ declare class GeoDistCommand<TMemberType = string> extends Command<number | null, number | null> {
384
+ constructor([key, member1, member2, unit]: [
385
+ key: string,
386
+ member1: TMemberType,
387
+ member2: TMemberType,
388
+ unit?: "M" | "KM" | "FT" | "MI"
389
+ ], opts?: CommandOptions<number | null, number | null>);
390
+ }
391
+
392
+ /**
393
+ * @see https://redis.io/commands/geohash
394
+ */
395
+ declare class GeoHashCommand<TMember = string> extends Command<(string | null)[], (string | null)[]> {
396
+ constructor(cmd: [string, ...(TMember[] | TMember[])], opts?: CommandOptions<(string | null)[], (string | null)[]>);
397
+ }
398
+
399
+ type Coordinates = {
400
+ lng: number;
401
+ lat: number;
402
+ };
403
+ /**
404
+ * @see https://redis.io/commands/geopos
405
+ */
406
+ declare class GeoPosCommand<TMember = string> extends Command<(string | null)[][], Coordinates[]> {
407
+ constructor(cmd: [string, ...(TMember[] | TMember[])], opts?: CommandOptions<(string | null)[][], Coordinates[]>);
408
+ }
409
+
410
+ type RadiusOptions$1 = "M" | "KM" | "FT" | "MI";
411
+ type CenterPoint$1<TMemberType> = {
412
+ type: "FROMMEMBER" | "frommember";
413
+ member: TMemberType;
414
+ } | {
415
+ type: "FROMLONLAT" | "fromlonlat";
416
+ coordinate: {
417
+ lon: number;
418
+ lat: number;
419
+ };
420
+ };
421
+ type Shape$1 = {
422
+ type: "BYRADIUS" | "byradius";
423
+ radius: number;
424
+ radiusType: RadiusOptions$1;
425
+ } | {
426
+ type: "BYBOX" | "bybox";
427
+ rect: {
428
+ width: number;
429
+ height: number;
430
+ };
431
+ rectType: RadiusOptions$1;
432
+ };
433
+ type GeoSearchCommandOptions$1 = {
434
+ count?: {
435
+ limit: number;
436
+ any?: boolean;
437
+ };
438
+ withCoord?: boolean;
439
+ withDist?: boolean;
440
+ withHash?: boolean;
441
+ };
442
+ type OptionMappings = {
443
+ withHash: "hash";
444
+ withCoord: "coord";
445
+ withDist: "dist";
446
+ };
447
+ type GeoSearchOptions<TOptions> = {
448
+ [K in keyof TOptions as K extends keyof OptionMappings ? OptionMappings[K] : never]: K extends "withHash" ? string : K extends "withCoord" ? {
449
+ long: number;
450
+ lat: number;
451
+ } : K extends "withDist" ? number : never;
452
+ };
453
+ type GeoSearchResponse<TOptions, TMemberType> = ({
454
+ member: TMemberType;
455
+ } & GeoSearchOptions<TOptions>)[];
456
+ /**
457
+ * @see https://redis.io/commands/geosearch
458
+ */
459
+ declare class GeoSearchCommand<TMemberType = string, TOptions extends GeoSearchCommandOptions$1 = GeoSearchCommandOptions$1> extends Command<any[] | any[][], GeoSearchResponse<TOptions, TMemberType>> {
460
+ constructor([key, centerPoint, shape, order, opts]: [
461
+ key: string,
462
+ centerPoint: CenterPoint$1<TMemberType>,
463
+ shape: Shape$1,
464
+ order: "ASC" | "DESC" | "asc" | "desc",
465
+ opts?: TOptions
466
+ ], commandOptions?: CommandOptions<any[] | any[][], GeoSearchResponse<TOptions, TMemberType>>);
467
+ }
468
+
469
+ type RadiusOptions = "M" | "KM" | "FT" | "MI";
470
+ type CenterPoint<TMemberType> = {
471
+ type: "FROMMEMBER" | "frommember";
472
+ member: TMemberType;
473
+ } | {
474
+ type: "FROMLONLAT" | "fromlonlat";
475
+ coordinate: {
476
+ lon: number;
477
+ lat: number;
478
+ };
479
+ };
480
+ type Shape = {
481
+ type: "BYRADIUS" | "byradius";
482
+ radius: number;
483
+ radiusType: RadiusOptions;
484
+ } | {
485
+ type: "BYBOX" | "bybox";
486
+ rect: {
487
+ width: number;
488
+ height: number;
489
+ };
490
+ rectType: RadiusOptions;
491
+ };
492
+ type GeoSearchCommandOptions = {
493
+ count?: {
494
+ limit: number;
495
+ any?: boolean;
496
+ };
497
+ storeDist?: boolean;
498
+ };
499
+ /**
500
+ * @see https://redis.io/commands/geosearchstore
501
+ */
502
+ declare class GeoSearchStoreCommand<TMemberType = string, TOptions extends GeoSearchCommandOptions = GeoSearchCommandOptions> extends Command<any[] | any[][], number> {
503
+ constructor([destination, key, centerPoint, shape, order, opts]: [
504
+ destination: string,
505
+ key: string,
506
+ centerPoint: CenterPoint<TMemberType>,
507
+ shape: Shape,
508
+ order: "ASC" | "DESC" | "asc" | "desc",
509
+ opts?: TOptions
510
+ ], commandOptions?: CommandOptions<any[] | any[][], number>);
511
+ }
512
+
513
+ /**
514
+ * @see https://redis.io/commands/get
515
+ */
516
+ declare class GetCommand<TData = string> extends Command<unknown | null, TData | null> {
517
+ constructor(cmd: [key: string], opts?: CommandOptions<unknown | null, TData | null>);
518
+ }
519
+
520
+ /**
521
+ * @see https://redis.io/commands/getbit
522
+ */
523
+ declare class GetBitCommand extends Command<"0" | "1", 0 | 1> {
524
+ constructor(cmd: [key: string, offset: number], opts?: CommandOptions<"0" | "1", 0 | 1>);
525
+ }
526
+
527
+ /**
528
+ * @see https://redis.io/commands/getdel
529
+ */
530
+ declare class GetDelCommand<TData = string> extends Command<unknown | null, TData | null> {
531
+ constructor(cmd: [key: string], opts?: CommandOptions<unknown | null, TData | null>);
532
+ }
533
+
534
+ /**
535
+ * @see https://redis.io/commands/getrange
536
+ */
537
+ declare class GetRangeCommand extends Command<string, string> {
538
+ constructor(cmd: [key: string, start: number, end: number], opts?: CommandOptions<string, string>);
539
+ }
540
+
541
+ /**
542
+ * @see https://redis.io/commands/getset
543
+ */
544
+ declare class GetSetCommand<TData = string> extends Command<unknown | null, TData | null> {
545
+ constructor(cmd: [key: string, value: TData], opts?: CommandOptions<unknown | null, TData | null>);
546
+ }
547
+
548
+ /**
549
+ * @see https://redis.io/commands/hdel
550
+ */
551
+ declare class HDelCommand extends Command<"0" | "1", 0 | 1> {
552
+ constructor(cmd: [key: string, ...fields: string[]], opts?: CommandOptions<"0" | "1", 0 | 1>);
553
+ }
554
+
555
+ /**
556
+ * @see https://redis.io/commands/hexists
557
+ */
558
+ declare class HExistsCommand extends Command<number, number> {
559
+ constructor(cmd: [key: string, field: string], opts?: CommandOptions<number, number>);
560
+ }
561
+
562
+ /**
563
+ * @see https://redis.io/commands/hget
564
+ */
565
+ declare class HGetCommand<TData> extends Command<unknown | null, TData | null> {
566
+ constructor(cmd: [key: string, field: string], opts?: CommandOptions<unknown | null, TData | null>);
567
+ }
568
+
569
+ /**
570
+ * @see https://redis.io/commands/hgetall
571
+ */
572
+ declare class HGetAllCommand<TData extends Record<string, unknown>> extends Command<unknown | null, TData | null> {
573
+ constructor(cmd: [key: string], opts?: CommandOptions<unknown | null, TData | null>);
574
+ }
575
+
576
+ /**
577
+ * @see https://redis.io/commands/hincrby
578
+ */
579
+ declare class HIncrByCommand extends Command<number, number> {
580
+ constructor(cmd: [key: string, field: string, increment: number], opts?: CommandOptions<number, number>);
581
+ }
582
+
583
+ /**
584
+ * @see https://redis.io/commands/hincrbyfloat
585
+ */
586
+ declare class HIncrByFloatCommand extends Command<number, number> {
587
+ constructor(cmd: [key: string, field: string, increment: number], opts?: CommandOptions<number, number>);
588
+ }
589
+
590
+ /**
591
+ * @see https://redis.io/commands/hkeys
592
+ */
593
+ declare class HKeysCommand extends Command<string[], string[]> {
594
+ constructor([key]: [key: string], opts?: CommandOptions<string[], string[]>);
595
+ }
596
+
597
+ /**
598
+ * @see https://redis.io/commands/hlen
599
+ */
600
+ declare class HLenCommand extends Command<number, number> {
601
+ constructor(cmd: [key: string], opts?: CommandOptions<number, number>);
602
+ }
603
+
604
+ /**
605
+ * hmget returns an object of all requested fields from a hash
606
+ * The field values are returned as an object like this:
607
+ * ```ts
608
+ * {[fieldName: string]: T | null}
609
+ * ```
610
+ *
611
+ * In case the hash does not exist or all fields are empty `null` is returned
612
+ *
613
+ * @see https://redis.io/commands/hmget
614
+ */
615
+ declare class HMGetCommand<TData extends Record<string, unknown>> extends Command<(string | null)[], TData | null> {
616
+ constructor([key, ...fields]: [key: string, ...fields: string[]], opts?: CommandOptions<(string | null)[], TData | null>);
617
+ }
618
+
619
+ /**
620
+ * @see https://redis.io/commands/hmset
621
+ */
622
+ declare class HMSetCommand<TData> extends Command<"OK", "OK"> {
623
+ constructor([key, kv]: [key: string, kv: {
624
+ [field: string]: TData;
625
+ }], opts?: CommandOptions<"OK", "OK">);
626
+ }
627
+
628
+ /**
629
+ * @see https://redis.io/commands/hrandfield
630
+ */
631
+ declare class HRandFieldCommand<TData extends string | string[] | Record<string, unknown>> extends Command<string | string[], TData> {
632
+ constructor(cmd: [key: string], opts?: CommandOptions<string, string>);
633
+ constructor(cmd: [key: string, count: number], opts?: CommandOptions<string[], string[]>);
634
+ constructor(cmd: [key: string, count: number, withValues: boolean], opts?: CommandOptions<string[], Partial<TData>>);
635
+ }
636
+
637
+ /**
638
+ * @see https://redis.io/commands/hscan
639
+ */
640
+ declare class HScanCommand extends Command<[
641
+ string,
642
+ (string | number)[]
643
+ ], [
644
+ string,
645
+ (string | number)[]
646
+ ]> {
647
+ constructor([key, cursor, cmdOpts]: [key: string, cursor: string | number, cmdOpts?: ScanCommandOptions], opts?: CommandOptions<[string, (string | number)[]], [string, (string | number)[]]>);
648
+ }
649
+
650
+ /**
651
+ * @see https://redis.io/commands/hset
652
+ */
653
+ declare class HSetCommand<TData> extends Command<number, number> {
654
+ constructor([key, kv]: [key: string, kv: {
655
+ [field: string]: TData;
656
+ }], opts?: CommandOptions<number, number>);
657
+ }
658
+
659
+ /**
660
+ * @see https://redis.io/commands/hsetnx
661
+ */
662
+ declare class HSetNXCommand<TData> extends Command<"0" | "1", 0 | 1> {
663
+ constructor(cmd: [key: string, field: string, value: TData], opts?: CommandOptions<"0" | "1", 0 | 1>);
664
+ }
665
+
666
+ /**
667
+ * @see https://redis.io/commands/hstrlen
668
+ */
669
+ declare class HStrLenCommand extends Command<number, number> {
670
+ constructor(cmd: [key: string, field: string], opts?: CommandOptions<number, number>);
671
+ }
672
+
673
+ /**
674
+ * @see https://redis.io/commands/hvals
675
+ */
676
+ declare class HValsCommand<TData extends unknown[]> extends Command<unknown[], TData> {
677
+ constructor(cmd: [key: string], opts?: CommandOptions<unknown[], TData>);
678
+ }
679
+
680
+ /**
681
+ * @see https://redis.io/commands/incr
682
+ */
683
+ declare class IncrCommand extends Command<number, number> {
684
+ constructor(cmd: [key: string], opts?: CommandOptions<number, number>);
685
+ }
686
+
687
+ /**
688
+ * @see https://redis.io/commands/incrby
689
+ */
690
+ declare class IncrByCommand extends Command<number, number> {
691
+ constructor(cmd: [key: string, value: number], opts?: CommandOptions<number, number>);
692
+ }
693
+
694
+ /**
695
+ * @see https://redis.io/commands/incrbyfloat
696
+ */
697
+ declare class IncrByFloatCommand extends Command<number, number> {
698
+ constructor(cmd: [key: string, value: number], opts?: CommandOptions<number, number>);
699
+ }
700
+
701
+ /**
702
+ * @see https://redis.io/commands/json.arrappend
703
+ */
704
+ declare class JsonArrAppendCommand<TData extends unknown[]> extends Command<(null | string)[], (null | number)[]> {
705
+ constructor(cmd: [key: string, path: string, ...values: TData], opts?: CommandOptions<(null | string)[], (null | number)[]>);
706
+ }
707
+
708
+ /**
709
+ * @see https://redis.io/commands/json.arrindex
710
+ */
711
+ declare class JsonArrIndexCommand<TValue> extends Command<(null | string)[], (null | number)[]> {
712
+ constructor(cmd: [key: string, path: string, value: TValue, start?: number, stop?: number], opts?: CommandOptions<(null | string)[], (null | number)[]>);
713
+ }
714
+
715
+ /**
716
+ * @see https://redis.io/commands/json.arrinsert
717
+ */
718
+ declare class JsonArrInsertCommand<TData extends unknown[]> extends Command<(null | string)[], (null | number)[]> {
719
+ constructor(cmd: [key: string, path: string, index: number, ...values: TData], opts?: CommandOptions<(null | string)[], (null | number)[]>);
720
+ }
721
+
722
+ /**
723
+ * @see https://redis.io/commands/json.arrlen
724
+ */
725
+ declare class JsonArrLenCommand extends Command<(null | string)[], (null | number)[]> {
726
+ constructor(cmd: [key: string, path?: string], opts?: CommandOptions<(null | string)[], (null | number)[]>);
727
+ }
728
+
729
+ /**
730
+ * @see https://redis.io/commands/json.arrpop
731
+ */
732
+ declare class JsonArrPopCommand<TData> extends Command<(null | string)[], (TData | null)[]> {
733
+ constructor(cmd: [key: string, path?: string, index?: number], opts?: CommandOptions<(null | string)[], (TData | null)[]>);
734
+ }
735
+
736
+ /**
737
+ * @see https://redis.io/commands/json.arrtrim
738
+ */
739
+ declare class JsonArrTrimCommand extends Command<(null | string)[], (null | number)[]> {
740
+ constructor(cmd: [key: string, path?: string, start?: number, stop?: number], opts?: CommandOptions<(null | string)[], (null | number)[]>);
741
+ }
742
+
743
+ /**
744
+ * @see https://redis.io/commands/json.clear
745
+ */
746
+ declare class JsonClearCommand extends Command<number, number> {
747
+ constructor(cmd: [key: string, path?: string], opts?: CommandOptions<number, number>);
748
+ }
749
+
750
+ /**
751
+ * @see https://redis.io/commands/json.del
752
+ */
753
+ declare class JsonDelCommand extends Command<number, number> {
754
+ constructor(cmd: [key: string, path?: string], opts?: CommandOptions<number, number>);
755
+ }
756
+
757
+ /**
758
+ * @see https://redis.io/commands/json.forget
759
+ */
760
+ declare class JsonForgetCommand extends Command<number, number> {
761
+ constructor(cmd: [key: string, path?: string], opts?: CommandOptions<number, number>);
762
+ }
763
+
764
+ /**
765
+ * @see https://redis.io/commands/json.get
766
+ */
767
+ declare class JsonGetCommand<TData extends (unknown | Record<string, unknown>) | (unknown | Record<string, unknown>)[]> extends Command<TData | null, TData | null> {
768
+ constructor(cmd: [
769
+ key: string,
770
+ opts?: {
771
+ indent?: string;
772
+ newline?: string;
773
+ space?: string;
774
+ },
775
+ ...path: string[]
776
+ ] | [key: string, ...path: string[]], opts?: CommandOptions<TData | null, TData | null>);
777
+ }
778
+
779
+ /**
780
+ * @see https://redis.io/commands/json.mget
781
+ */
782
+ declare class JsonMGetCommand<TData = unknown[]> extends Command<TData, TData> {
783
+ constructor(cmd: [keys: string[], path: string], opts?: CommandOptions<TData, TData>);
784
+ }
785
+
786
+ /**
787
+ * @see https://redis.io/commands/json.numincrby
788
+ */
789
+ declare class JsonNumIncrByCommand extends Command<(null | string)[], (null | number)[]> {
790
+ constructor(cmd: [key: string, path: string, value: number], opts?: CommandOptions<(null | string)[], (null | number)[]>);
791
+ }
792
+
793
+ /**
794
+ * @see https://redis.io/commands/json.nummultby
795
+ */
796
+ declare class JsonNumMultByCommand extends Command<(null | string)[], (null | number)[]> {
797
+ constructor(cmd: [key: string, path: string, value: number], opts?: CommandOptions<(null | string)[], (null | number)[]>);
798
+ }
799
+
800
+ /**
801
+ * @see https://redis.io/commands/json.objkeys
802
+ */
803
+ declare class JsonObjKeysCommand extends Command<(string[] | null)[], (string[] | null)[]> {
804
+ constructor(cmd: [key: string, path?: string], opts?: CommandOptions<(string[] | null)[], (string[] | null)[]>);
805
+ }
806
+
807
+ /**
808
+ * @see https://redis.io/commands/json.objlen
809
+ */
810
+ declare class JsonObjLenCommand extends Command<(number | null)[], (number | null)[]> {
811
+ constructor(cmd: [key: string, path?: string], opts?: CommandOptions<(number | null)[], (number | null)[]>);
812
+ }
813
+
814
+ /**
815
+ * @see https://redis.io/commands/json.resp
816
+ */
817
+ declare class JsonRespCommand<TData extends unknown[]> extends Command<TData, TData> {
818
+ constructor(cmd: [key: string, path?: string], opts?: CommandOptions<TData, TData>);
819
+ }
820
+
821
+ /**
822
+ * @see https://redis.io/commands/json.set
823
+ */
824
+ declare class JsonSetCommand<TData extends number | string | boolean | Record<string, unknown> | (number | string | boolean | Record<string, unknown>)[]> extends Command<"OK" | null, "OK" | null> {
825
+ constructor(cmd: [
826
+ key: string,
827
+ path: string,
828
+ value: TData,
829
+ opts?: {
830
+ nx: true;
831
+ xx?: never;
832
+ } | {
833
+ nx?: never;
834
+ xx: true;
835
+ }
836
+ ], opts?: CommandOptions<"OK" | null, "OK" | null>);
837
+ }
838
+
839
+ /**
840
+ * @see https://redis.io/commands/json.strappend
841
+ */
842
+ declare class JsonStrAppendCommand extends Command<(null | string)[], (null | number)[]> {
843
+ constructor(cmd: [key: string, path: string, value: string], opts?: CommandOptions<(null | string)[], (null | number)[]>);
844
+ }
845
+
846
+ /**
847
+ * @see https://redis.io/commands/json.strlen
848
+ */
849
+ declare class JsonStrLenCommand extends Command<(number | null)[], (number | null)[]> {
850
+ constructor(cmd: [key: string, path?: string], opts?: CommandOptions<(number | null)[], (number | null)[]>);
851
+ }
852
+
853
+ /**
854
+ * @see https://redis.io/commands/json.toggle
855
+ */
856
+ declare class JsonToggleCommand extends Command<number[], number[]> {
857
+ constructor(cmd: [key: string, path: string], opts?: CommandOptions<number[], number[]>);
858
+ }
859
+
860
+ /**
861
+ * @see https://redis.io/commands/json.type
862
+ */
863
+ declare class JsonTypeCommand extends Command<string[], string[]> {
864
+ constructor(cmd: [key: string, path?: string], opts?: CommandOptions<string[], string[]>);
865
+ }
866
+
867
+ /**
868
+ * @see https://redis.io/commands/keys
869
+ */
870
+ declare class KeysCommand extends Command<string[], string[]> {
871
+ constructor(cmd: [pattern: string], opts?: CommandOptions<string[], string[]>);
872
+ }
873
+
874
+ declare class LIndexCommand<TData = string> extends Command<unknown | null, TData | null> {
875
+ constructor(cmd: [key: string, index: number], opts?: CommandOptions<unknown | null, TData | null>);
876
+ }
877
+
878
+ declare class LInsertCommand<TData = string> extends Command<number, number> {
879
+ constructor(cmd: [key: string, direction: "before" | "after", pivot: TData, value: TData], opts?: CommandOptions<number, number>);
880
+ }
881
+
882
+ /**
883
+ * @see https://redis.io/commands/llen
884
+ */
885
+ declare class LLenCommand extends Command<number, number> {
886
+ constructor(cmd: [key: string], opts?: CommandOptions<number, number>);
887
+ }
888
+
889
+ /**
890
+ * @see https://redis.io/commands/lmove
891
+ */
892
+ declare class LMoveCommand<TData = string> extends Command<TData, TData> {
893
+ constructor(cmd: [
894
+ source: string,
895
+ destination: string,
896
+ whereFrom: "left" | "right",
897
+ whereTo: "left" | "right"
898
+ ], opts?: CommandOptions<TData, TData>);
899
+ }
900
+
901
+ /**
902
+ * @see https://redis.io/commands/lpop
903
+ */
904
+ declare class LPopCommand<TData = string> extends Command<unknown | null, TData | null> {
905
+ constructor(cmd: [key: string, count?: number], opts?: CommandOptions<unknown | null, TData | null>);
906
+ }
907
+
908
+ /**
909
+ * @see https://redis.io/commands/lpush
910
+ */
911
+ declare class LPushCommand<TData = string> extends Command<number, number> {
912
+ constructor(cmd: [key: string, ...elements: TData[]], opts?: CommandOptions<number, number>);
913
+ }
914
+
915
+ /**
916
+ * @see https://redis.io/commands/lpushx
917
+ */
918
+ declare class LPushXCommand<TData> extends Command<number, number> {
919
+ constructor(cmd: [key: string, ...elements: TData[]], opts?: CommandOptions<number, number>);
920
+ }
921
+
922
+ declare class LRangeCommand<TData = string> extends Command<unknown[], TData[]> {
923
+ constructor(cmd: [key: string, start: number, end: number], opts?: CommandOptions<unknown[], TData[]>);
924
+ }
925
+
926
+ declare class LRemCommand<TData> extends Command<number, number> {
927
+ constructor(cmd: [key: string, count: number, value: TData], opts?: CommandOptions<number, number>);
928
+ }
929
+
930
+ declare class LSetCommand<TData = string> extends Command<"OK", "OK"> {
931
+ constructor(cmd: [key: string, index: number, data: TData], opts?: CommandOptions<"OK", "OK">);
932
+ }
933
+
934
+ declare class LTrimCommand extends Command<"OK", "OK"> {
935
+ constructor(cmd: [key: string, start: number, end: number], opts?: CommandOptions<"OK", "OK">);
936
+ }
937
+
938
+ /**
939
+ * @see https://redis.io/commands/mget
940
+ */
941
+ declare class MGetCommand<TData extends unknown[]> extends Command<(string | null)[], TData> {
942
+ constructor(cmd: [string[]] | [...(string[] | string[])], opts?: CommandOptions<(string | null)[], TData>);
943
+ }
944
+
945
+ /**
946
+ * @see https://redis.io/commands/mset
947
+ */
948
+ declare class MSetCommand<TData> extends Command<"OK", "OK"> {
949
+ constructor([kv]: [kv: {
950
+ [key: string]: TData;
951
+ }], opts?: CommandOptions<"OK", "OK">);
952
+ }
953
+
954
+ /**
955
+ * @see https://redis.io/commands/msetnx
956
+ */
957
+ declare class MSetNXCommand<TData = string> extends Command<number, number> {
958
+ constructor([kv]: [kv: {
959
+ [key: string]: TData;
960
+ }], opts?: CommandOptions<number, number>);
961
+ }
962
+
963
+ /**
964
+ * @see https://redis.io/commands/persist
965
+ */
966
+ declare class PersistCommand extends Command<"0" | "1", 0 | 1> {
967
+ constructor(cmd: [key: string], opts?: CommandOptions<"0" | "1", 0 | 1>);
968
+ }
969
+
970
+ /**
971
+ * @see https://redis.io/commands/pexpire
972
+ */
973
+ declare class PExpireCommand extends Command<"0" | "1", 0 | 1> {
974
+ constructor(cmd: [key: string, milliseconds: number], opts?: CommandOptions<"0" | "1", 0 | 1>);
975
+ }
976
+
977
+ /**
978
+ * @see https://redis.io/commands/pexpireat
979
+ */
980
+ declare class PExpireAtCommand extends Command<"0" | "1", 0 | 1> {
981
+ constructor(cmd: [key: string, unix: number], opts?: CommandOptions<"0" | "1", 0 | 1>);
982
+ }
983
+
984
+ /**
985
+ * @see https://redis.io/commands/ping
986
+ */
987
+ declare class PingCommand extends Command<string | "PONG", string | "PONG"> {
988
+ constructor(cmd?: [message?: string], opts?: CommandOptions<string | "PONG", string | "PONG">);
989
+ }
990
+
991
+ /**
992
+ * @see https://redis.io/commands/psetex
993
+ */
994
+ declare class PSetEXCommand<TData = string> extends Command<string, string> {
995
+ constructor(cmd: [key: string, ttl: number, value: TData], opts?: CommandOptions<string, string>);
996
+ }
997
+
998
+ /**
999
+ * @see https://redis.io/commands/pttl
1000
+ */
1001
+ declare class PTtlCommand extends Command<number, number> {
1002
+ constructor(cmd: [key: string], opts?: CommandOptions<number, number>);
1003
+ }
1004
+
1005
+ /**
1006
+ * @see https://redis.io/commands/publish
1007
+ */
1008
+ declare class PublishCommand<TMessage = unknown> extends Command<number, number> {
1009
+ constructor(cmd: [channel: string, message: TMessage], opts?: CommandOptions<number, number>);
1010
+ }
1011
+
1012
+ /**
1013
+ * @see https://redis.io/commands/randomkey
1014
+ */
1015
+ declare class RandomKeyCommand extends Command<string | null, string | null> {
1016
+ constructor(opts?: CommandOptions<string | null, string | null>);
1017
+ }
1018
+
1019
+ /**
1020
+ * @see https://redis.io/commands/rename
1021
+ */
1022
+ declare class RenameCommand extends Command<"OK", "OK"> {
1023
+ constructor(cmd: [source: string, destination: string], opts?: CommandOptions<"OK", "OK">);
1024
+ }
1025
+
1026
+ /**
1027
+ * @see https://redis.io/commands/renamenx
1028
+ */
1029
+ declare class RenameNXCommand extends Command<"0" | "1", 0 | 1> {
1030
+ constructor(cmd: [source: string, destination: string], opts?: CommandOptions<"0" | "1", 0 | 1>);
1031
+ }
1032
+
1033
+ /**
1034
+ * @see https://redis.io/commands/rpop
1035
+ */
1036
+ declare class RPopCommand<TData extends unknown | unknown[] = string> extends Command<unknown | null, TData | null> {
1037
+ constructor(cmd: [key: string, count?: number], opts?: CommandOptions<unknown | null, TData | null>);
1038
+ }
1039
+
1040
+ /**
1041
+ * @see https://redis.io/commands/rpush
1042
+ */
1043
+ declare class RPushCommand<TData = string> extends Command<number, number> {
1044
+ constructor(cmd: [key: string, ...elements: TData[]], opts?: CommandOptions<number, number>);
1045
+ }
1046
+
1047
+ /**
1048
+ * @see https://redis.io/commands/rpushx
1049
+ */
1050
+ declare class RPushXCommand<TData = string> extends Command<number, number> {
1051
+ constructor(cmd: [key: string, ...elements: TData[]], opts?: CommandOptions<number, number>);
1052
+ }
1053
+
1054
+ /**
1055
+ * @see https://redis.io/commands/sadd
1056
+ */
1057
+ declare class SAddCommand<TData = string> extends Command<number, number> {
1058
+ constructor(cmd: [key: string, ...members: TData[]], opts?: CommandOptions<number, number>);
1059
+ }
1060
+
1061
+ /**
1062
+ * @see https://redis.io/commands/scard
1063
+ */
1064
+ declare class SCardCommand extends Command<number, number> {
1065
+ constructor(cmd: [key: string], opts?: CommandOptions<number, number>);
1066
+ }
1067
+
1068
+ /**
1069
+ * @see https://redis.io/commands/script-exists
1070
+ */
1071
+ declare class ScriptExistsCommand<T extends string[]> extends Command<string[], number[]> {
1072
+ constructor(hashes: T, opts?: CommandOptions<string[], number[]>);
1073
+ }
1074
+
1075
+ /**
1076
+ * @see https://redis.io/commands/script-load
1077
+ */
1078
+ declare class ScriptLoadCommand extends Command<string, string> {
1079
+ constructor(args: [script: string], opts?: CommandOptions<string, string>);
1080
+ }
1081
+
1082
+ /**
1083
+ * @see https://redis.io/commands/sdiff
1084
+ */
1085
+ declare class SDiffCommand<TData> extends Command<unknown[], TData[]> {
1086
+ constructor(cmd: [key: string, ...keys: string[]], opts?: CommandOptions<unknown[], TData[]>);
1087
+ }
1088
+
1089
+ /**
1090
+ * @see https://redis.io/commands/sdiffstore
1091
+ */
1092
+ declare class SDiffStoreCommand extends Command<number, number> {
1093
+ constructor(cmd: [destination: string, ...keys: string[]], opts?: CommandOptions<number, number>);
1094
+ }
1095
+
1096
+ type SetCommandOptions = {
1097
+ get?: boolean;
1098
+ } & ({
1099
+ ex: number;
1100
+ px?: never;
1101
+ exat?: never;
1102
+ pxat?: never;
1103
+ keepTtl?: never;
1104
+ } | {
1105
+ ex?: never;
1106
+ px: number;
1107
+ exat?: never;
1108
+ pxat?: never;
1109
+ keepTtl?: never;
1110
+ } | {
1111
+ ex?: never;
1112
+ px?: never;
1113
+ exat: number;
1114
+ pxat?: never;
1115
+ keepTtl?: never;
1116
+ } | {
1117
+ ex?: never;
1118
+ px?: never;
1119
+ exat?: never;
1120
+ pxat: number;
1121
+ keepTtl?: never;
1122
+ } | {
1123
+ ex?: never;
1124
+ px?: never;
1125
+ exat?: never;
1126
+ pxat?: never;
1127
+ keepTtl: true;
1128
+ } | {
1129
+ ex?: never;
1130
+ px?: never;
1131
+ exat?: never;
1132
+ pxat?: never;
1133
+ keepTtl?: never;
1134
+ }) & ({
1135
+ nx: true;
1136
+ xx?: never;
1137
+ } | {
1138
+ xx: true;
1139
+ nx?: never;
1140
+ } | {
1141
+ xx?: never;
1142
+ nx?: never;
1143
+ });
1144
+ /**
1145
+ * @see https://redis.io/commands/set
1146
+ */
1147
+ declare class SetCommand<TData, TResult = TData | "OK" | null> extends Command<TResult, TData | "OK" | null> {
1148
+ constructor([key, value, opts]: [key: string, value: TData, opts?: SetCommandOptions], cmdOpts?: CommandOptions<TResult, TData>);
1149
+ }
1150
+
1151
+ /**
1152
+ * @see https://redis.io/commands/setbit
1153
+ */
1154
+ declare class SetBitCommand extends Command<"0" | "1", 0 | 1> {
1155
+ constructor(cmd: [key: string, offset: number, value: 0 | 1], opts?: CommandOptions<"0" | "1", 0 | 1>);
1156
+ }
1157
+
1158
+ /**
1159
+ * @see https://redis.io/commands/setex
1160
+ */
1161
+ declare class SetExCommand<TData = string> extends Command<"OK", "OK"> {
1162
+ constructor(cmd: [key: string, ttl: number, value: TData], opts?: CommandOptions<"OK", "OK">);
1163
+ }
1164
+
1165
+ /**
1166
+ * @see https://redis.io/commands/setnx
1167
+ */
1168
+ declare class SetNxCommand<TData = string> extends Command<number, number> {
1169
+ constructor(cmd: [key: string, value: TData], opts?: CommandOptions<number, number>);
1170
+ }
1171
+
1172
+ /**
1173
+ * @see https://redis.io/commands/setrange
1174
+ */
1175
+ declare class SetRangeCommand extends Command<number, number> {
1176
+ constructor(cmd: [key: string, offset: number, value: string], opts?: CommandOptions<number, number>);
1177
+ }
1178
+
1179
+ /**
1180
+ * @see https://redis.io/commands/sinter
1181
+ */
1182
+ declare class SInterCommand<TData = string> extends Command<unknown[], TData[]> {
1183
+ constructor(cmd: [key: string, ...keys: string[]], opts?: CommandOptions<unknown[], TData[]>);
1184
+ }
1185
+
1186
+ /**
1187
+ * @see https://redis.io/commands/sinterstore
1188
+ */
1189
+ declare class SInterStoreCommand extends Command<number, number> {
1190
+ constructor(cmd: [destination: string, key: string, ...keys: string[]], opts?: CommandOptions<number, number>);
1191
+ }
1192
+
1193
+ /**
1194
+ * @see https://redis.io/commands/sismember
1195
+ */
1196
+ declare class SIsMemberCommand<TData = string> extends Command<"0" | "1", 0 | 1> {
1197
+ constructor(cmd: [key: string, member: TData], opts?: CommandOptions<"0" | "1", 0 | 1>);
1198
+ }
1199
+
1200
+ /**
1201
+ * @see https://redis.io/commands/smembers
1202
+ */
1203
+ declare class SMembersCommand<TData extends unknown[] = string[]> extends Command<unknown[], TData> {
1204
+ constructor(cmd: [key: string], opts?: CommandOptions<unknown[], TData>);
1205
+ }
1206
+
1207
+ /**
1208
+ * @see https://redis.io/commands/smismember
1209
+ */
1210
+ declare class SMIsMemberCommand<TMembers extends unknown[]> extends Command<("0" | "1")[], (0 | 1)[]> {
1211
+ constructor(cmd: [key: string, members: TMembers], opts?: CommandOptions<("0" | "1")[], (0 | 1)[]>);
1212
+ }
1213
+
1214
+ /**
1215
+ * @see https://redis.io/commands/smove
1216
+ */
1217
+ declare class SMoveCommand<TData> extends Command<"0" | "1", 0 | 1> {
1218
+ constructor(cmd: [source: string, destination: string, member: TData], opts?: CommandOptions<"0" | "1", 0 | 1>);
1219
+ }
1220
+
1221
+ /**
1222
+ * @see https://redis.io/commands/spop
1223
+ */
1224
+ declare class SPopCommand<TData> extends Command<string | string[] | null, TData | null> {
1225
+ constructor([key, count]: [key: string, count?: number], opts?: CommandOptions<string | string[] | null, TData | null>);
1226
+ }
1227
+
1228
+ /**
1229
+ * @see https://redis.io/commands/srandmember
1230
+ */
1231
+ declare class SRandMemberCommand<TData> extends Command<string | null, TData | null> {
1232
+ constructor([key, count]: [key: string, count?: number], opts?: CommandOptions<string | null, TData | null>);
1233
+ }
1234
+
1235
+ /**
1236
+ * @see https://redis.io/commands/srem
1237
+ */
1238
+ declare class SRemCommand<TData = string> extends Command<number, number> {
1239
+ constructor(cmd: [key: string, ...members: TData[]], opts?: CommandOptions<number, number>);
1240
+ }
1241
+
1242
+ /**
1243
+ * @see https://redis.io/commands/sscan
1244
+ */
1245
+ declare class SScanCommand extends Command<[
1246
+ string,
1247
+ (string | number)[]
1248
+ ], [
1249
+ string,
1250
+ (string | number)[]
1251
+ ]> {
1252
+ constructor([key, cursor, opts]: [key: string, cursor: string | number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[string, (string | number)[]], [string, (string | number)[]]>);
1253
+ }
1254
+
1255
+ /**
1256
+ * @see https://redis.io/commands/strlen
1257
+ */
1258
+ declare class StrLenCommand extends Command<number, number> {
1259
+ constructor(cmd: [key: string], opts?: CommandOptions<number, number>);
1260
+ }
1261
+
1262
+ /**
1263
+ * @see https://redis.io/commands/sunion
1264
+ */
1265
+ declare class SUnionCommand<TData> extends Command<string[], TData[]> {
1266
+ constructor(cmd: [key: string, ...keys: string[]], opts?: CommandOptions<string[], TData[]>);
1267
+ }
1268
+
1269
+ /**
1270
+ * @see https://redis.io/commands/sunionstore
1271
+ */
1272
+ declare class SUnionStoreCommand extends Command<number, number> {
1273
+ constructor(cmd: [destination: string, key: string, ...keys: string[]], opts?: CommandOptions<number, number>);
1274
+ }
1275
+
1276
+ /**
1277
+ * @see https://redis.io/commands/time
1278
+ */
1279
+ declare class TimeCommand extends Command<[number, number], [number, number]> {
1280
+ constructor(opts?: CommandOptions<[number, number], [number, number]>);
1281
+ }
1282
+
1283
+ /**
1284
+ * @see https://redis.io/commands/touch
1285
+ */
1286
+ declare class TouchCommand extends Command<number, number> {
1287
+ constructor(cmd: [...keys: string[]], opts?: CommandOptions<number, number>);
1288
+ }
1289
+
1290
+ /**
1291
+ * @see https://redis.io/commands/ttl
1292
+ */
1293
+ declare class TtlCommand extends Command<number, number> {
1294
+ constructor(cmd: [key: string], opts?: CommandOptions<number, number>);
1295
+ }
1296
+
1297
+ /**
1298
+ * @see https://redis.io/commands/unlink
1299
+ */
1300
+ declare class UnlinkCommand extends Command<number, number> {
1301
+ constructor(cmd: [...keys: string[]], opts?: CommandOptions<number, number>);
1302
+ }
1303
+
1304
+ type XAddCommandOptions = {
1305
+ nomkStream?: boolean;
1306
+ trim?: ({
1307
+ type: "MAXLEN" | "maxlen";
1308
+ threshold: number;
1309
+ } | {
1310
+ type: "MINID" | "minid";
1311
+ threshold: string;
1312
+ }) & ({
1313
+ comparison: "~";
1314
+ limit?: number;
1315
+ } | {
1316
+ comparison: "=";
1317
+ limit?: never;
1318
+ });
1319
+ };
1320
+ /**
1321
+ * @see https://redis.io/commands/xadd
1322
+ */
1323
+ declare class XAddCommand extends Command<string, string> {
1324
+ constructor([key, id, entries, opts]: [
1325
+ key: string,
1326
+ id: "*" | string,
1327
+ entries: {
1328
+ [field: string]: unknown;
1329
+ },
1330
+ opts?: XAddCommandOptions
1331
+ ], commandOptions?: CommandOptions<string, string>);
1332
+ }
1333
+
1334
+ declare class XRangeCommand<TData extends Record<string, Record<string, unknown>>> extends Command<string[][], TData> {
1335
+ constructor([key, start, end, count]: [key: string, start: string, end: string, count?: number], opts?: CommandOptions<unknown[], TData[]>);
1336
+ }
1337
+
1338
+ type XReadCommandOptions = [
1339
+ key: string | string[],
1340
+ id: string | string[],
1341
+ options?: {
1342
+ count?: number;
1343
+ blockMS?: number;
1344
+ }
1345
+ ];
1346
+ type XReadOptions = XReadCommandOptions extends [infer K, infer I, ...any[]] ? K extends string ? I extends string ? [key: string, id: string, options?: {
1347
+ count?: number;
1348
+ blockMS?: number;
1349
+ }] : never : K extends string[] ? I extends string[] ? [key: string[], id: string[], options?: {
1350
+ count?: number;
1351
+ blockMS?: number;
1352
+ }] : never : never : never;
1353
+ /**
1354
+ * @see https://redis.io/commands/xread
1355
+ */
1356
+ declare class XReadCommand extends Command<number, unknown[]> {
1357
+ constructor([key, id, options]: XReadOptions, opts?: CommandOptions<number, unknown[]>);
1358
+ }
1359
+
1360
+ type Options = {
1361
+ count?: number;
1362
+ blockMS?: number;
1363
+ NOACK?: boolean;
1364
+ };
1365
+ type XReadGroupCommandOptions = [
1366
+ group: string,
1367
+ consumer: string,
1368
+ key: string | string[],
1369
+ id: string | string[],
1370
+ options?: Options
1371
+ ];
1372
+ type XReadGroupOptions = XReadGroupCommandOptions extends [
1373
+ string,
1374
+ string,
1375
+ infer TKey,
1376
+ infer TId,
1377
+ ...any[]
1378
+ ] ? TKey extends string ? TId extends string ? [group: string, consumer: string, key: string, id: string, options?: Options] : never : TKey extends string[] ? TId extends string[] ? [group: string, consumer: string, key: string[], id: string[], options?: Options] : never : never : never;
1379
+ /**
1380
+ * @see https://redis.io/commands/xreadgroup
1381
+ */
1382
+ declare class XReadGroupCommand extends Command<number, unknown[]> {
1383
+ constructor([group, consumer, key, id, options]: XReadGroupOptions, opts?: CommandOptions<number, unknown[]>);
1384
+ }
1385
+
1386
+ type NXAndXXOptions = {
1387
+ nx: true;
1388
+ xx?: never;
1389
+ } | {
1390
+ nx?: never;
1391
+ xx: true;
1392
+ } | {
1393
+ nx?: never;
1394
+ xx?: never;
1395
+ };
1396
+ type LTAndGTOptions = {
1397
+ lt: true;
1398
+ gt?: never;
1399
+ } | {
1400
+ lt?: never;
1401
+ gt: true;
1402
+ } | {
1403
+ lt?: never;
1404
+ gt?: never;
1405
+ };
1406
+ type ZAddCommandOptions = NXAndXXOptions & LTAndGTOptions & {
1407
+ ch?: true;
1408
+ } & {
1409
+ incr?: true;
1410
+ };
1411
+ type Arg2<TData> = ScoreMember<TData> | ZAddCommandOptions;
1412
+ type ScoreMember<TData> = {
1413
+ score: number;
1414
+ member: TData;
1415
+ };
1416
+ /**
1417
+ * @see https://redis.io/commands/zadd
1418
+ */
1419
+ declare class ZAddCommand<TData = string> extends Command<number | null, number | null> {
1420
+ constructor([key, arg1, ...arg2]: [string, Arg2<TData>, ...ScoreMember<TData>[]], opts?: CommandOptions<number | null, number | null>);
1421
+ }
1422
+
1423
+ /**
1424
+ * @see https://redis.io/commands/zcard
1425
+ */
1426
+ declare class ZCardCommand extends Command<number, number> {
1427
+ constructor(cmd: [key: string], opts?: CommandOptions<number, number>);
1428
+ }
1429
+
1430
+ /**
1431
+ * @see https://redis.io/commands/zcount
1432
+ */
1433
+ declare class ZCountCommand extends Command<number, number> {
1434
+ constructor(cmd: [key: string, min: number | string, max: number | string], opts?: CommandOptions<number, number>);
1435
+ }
1436
+
1437
+ /**
1438
+ * @see https://redis.io/commands/zincrby
1439
+ */
1440
+ declare class ZIncrByCommand<TData> extends Command<number, number> {
1441
+ constructor(cmd: [key: string, increment: number, member: TData], opts?: CommandOptions<number, number>);
1442
+ }
1443
+
1444
+ /**
1445
+ * @see https://redis.io/commands/zlexcount
1446
+ */
1447
+ declare class ZLexCountCommand extends Command<number, number> {
1448
+ constructor(cmd: [key: string, min: string, max: string], opts?: CommandOptions<number, number>);
1449
+ }
1450
+
1451
+ /**
1452
+ * @see https://redis.io/commands/zpopmax
1453
+ */
1454
+ declare class ZPopMaxCommand<TData> extends Command<string[], TData[]> {
1455
+ constructor([key, count]: [key: string, count?: number], opts?: CommandOptions<string[], TData[]>);
1456
+ }
1457
+
1458
+ /**
1459
+ * @see https://redis.io/commands/zpopmin
1460
+ */
1461
+ declare class ZPopMinCommand<TData> extends Command<string[], TData[]> {
1462
+ constructor([key, count]: [key: string, count?: number], opts?: CommandOptions<string[], TData[]>);
1463
+ }
1464
+
1465
+ type ZRangeCommandOptions = {
1466
+ withScores?: boolean;
1467
+ rev?: boolean;
1468
+ } & ({
1469
+ byScore: true;
1470
+ byLex?: never;
1471
+ } | {
1472
+ byScore?: never;
1473
+ byLex: true;
1474
+ } | {
1475
+ byScore?: never;
1476
+ byLex?: never;
1477
+ }) & ({
1478
+ offset: number;
1479
+ count: number;
1480
+ } | {
1481
+ offset?: never;
1482
+ count?: never;
1483
+ });
1484
+ /**
1485
+ * @see https://redis.io/commands/zrange
1486
+ */
1487
+ declare class ZRangeCommand<TData extends unknown[]> extends Command<string[], TData> {
1488
+ constructor(cmd: [key: string, min: number, max: number, opts?: ZRangeCommandOptions], cmdOpts?: CommandOptions<string[], TData>);
1489
+ constructor(cmd: [
1490
+ key: string,
1491
+ min: `(${string}` | `[${string}` | "-" | "+",
1492
+ max: `(${string}` | `[${string}` | "-" | "+",
1493
+ opts: {
1494
+ byLex: true;
1495
+ } & ZRangeCommandOptions
1496
+ ], cmdOpts?: CommandOptions<string[], TData>);
1497
+ constructor(cmd: [
1498
+ key: string,
1499
+ min: number | `(${number}` | "-inf" | "+inf",
1500
+ max: number | `(${number}` | "-inf" | "+inf",
1501
+ opts: {
1502
+ byScore: true;
1503
+ } & ZRangeCommandOptions
1504
+ ], cmdOpts?: CommandOptions<string[], TData>);
1505
+ }
1506
+
1507
+ /**
1508
+ * @see https://redis.io/commands/zrank
1509
+ */
1510
+ declare class ZRankCommand<TData> extends Command<number | null, number | null> {
1511
+ constructor(cmd: [key: string, member: TData], opts?: CommandOptions<number | null, number | null>);
1512
+ }
1513
+
1514
+ /**
1515
+ * @see https://redis.io/commands/zrem
1516
+ */
1517
+ declare class ZRemCommand<TData = string> extends Command<number, number> {
1518
+ constructor(cmd: [key: string, ...members: TData[]], opts?: CommandOptions<number, number>);
1519
+ }
1520
+
1521
+ /**
1522
+ * @see https://redis.io/commands/zremrangebylex
1523
+ */
1524
+ declare class ZRemRangeByLexCommand extends Command<number, number> {
1525
+ constructor(cmd: [key: string, min: string, max: string], opts?: CommandOptions<number, number>);
1526
+ }
1527
+
1528
+ /**
1529
+ * @see https://redis.io/commands/zremrangebyrank
1530
+ */
1531
+ declare class ZRemRangeByRankCommand extends Command<number, number> {
1532
+ constructor(cmd: [key: string, start: number, stop: number], opts?: CommandOptions<number, number>);
1533
+ }
1534
+
1535
+ /**
1536
+ * @see https://redis.io/commands/zremrangebyscore
1537
+ */
1538
+ declare class ZRemRangeByScoreCommand extends Command<number, number> {
1539
+ constructor(cmd: [key: string, min: number, max: number], opts?: CommandOptions<number, number>);
1540
+ }
1541
+
1542
+ /**
1543
+ * @see https://redis.io/commands/zrevrank
1544
+ */
1545
+ declare class ZRevRankCommand<TData> extends Command<number | null, number | null> {
1546
+ constructor(cmd: [key: string, member: TData], opts?: CommandOptions<number | null, number | null>);
1547
+ }
1548
+
1549
+ /**
1550
+ * @see https://redis.io/commands/zscan
1551
+ */
1552
+ declare class ZScanCommand extends Command<[
1553
+ string,
1554
+ (string | number)[]
1555
+ ], [
1556
+ string,
1557
+ (string | number)[]
1558
+ ]> {
1559
+ constructor([key, cursor, opts]: [key: string, cursor: string | number, opts?: ScanCommandOptions], cmdOpts?: CommandOptions<[string, (string | number)[]], [string, (string | number)[]]>);
1560
+ }
1561
+
1562
+ /**
1563
+ * @see https://redis.io/commands/zscore
1564
+ */
1565
+ declare class ZScoreCommand<TData> extends Command<string | null, number | null> {
1566
+ constructor(cmd: [key: string, member: TData], opts?: CommandOptions<string | null, number | null>);
1567
+ }
1568
+
1569
+ type InferResponseData<T extends unknown[]> = {
1570
+ [K in keyof T]: T[K] extends Command<any, infer TData> ? TData : unknown;
1571
+ };
1572
+ /**
1573
+ * Upstash REST API supports command pipelining to send multiple commands in
1574
+ * batch, instead of sending each command one by one and waiting for a response.
1575
+ * When using pipelines, several commands are sent using a single HTTP request,
1576
+ * and a single JSON array response is returned. Each item in the response array
1577
+ * corresponds to the command in the same order within the pipeline.
1578
+ *
1579
+ * **NOTE:**
1580
+ *
1581
+ * Execution of the pipeline is not atomic. Even though each command in
1582
+ * the pipeline will be executed in order, commands sent by other clients can
1583
+ * interleave with the pipeline.
1584
+ *
1585
+ * **Examples:**
1586
+ *
1587
+ * ```ts
1588
+ * const p = redis.pipeline() // or redis.multi()
1589
+ * p.set("key","value")
1590
+ * p.get("key")
1591
+ * const res = await p.exec()
1592
+ * ```
1593
+ *
1594
+ * You can also chain commands together
1595
+ * ```ts
1596
+ * const p = redis.pipeline()
1597
+ * const res = await p.set("key","value").get("key").exec()
1598
+ * ```
1599
+ *
1600
+ * Return types are inferred if all commands are chained, but you can still
1601
+ * override the response type manually:
1602
+ * ```ts
1603
+ * redis.pipeline()
1604
+ * .set("key", { greeting: "hello"})
1605
+ * .get("key")
1606
+ * .exec<["OK", { greeting: string } ]>()
1607
+ *
1608
+ * ```
1609
+ */
1610
+ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
1611
+ private client;
1612
+ private commands;
1613
+ private commandOptions?;
1614
+ private multiExec;
1615
+ constructor(opts: {
1616
+ client: Requester;
1617
+ commandOptions?: CommandOptions<any, any>;
1618
+ multiExec?: boolean;
1619
+ });
1620
+ /**
1621
+ * Send the pipeline request to upstash.
1622
+ *
1623
+ * Returns an array with the results of all pipelined commands.
1624
+ *
1625
+ * If all commands are statically chained from start to finish, types are inferred. You can still define a return type manually if necessary though:
1626
+ * ```ts
1627
+ * const p = redis.pipeline()
1628
+ * p.get("key")
1629
+ * const result = p.exec<[{ greeting: string }]>()
1630
+ * ```
1631
+ */
1632
+ exec: <TCommandResults extends unknown[] = [] extends TCommands ? unknown[] : InferResponseData<TCommands>>() => Promise<TCommandResults>;
1633
+ /**
1634
+ * Returns the length of pipeline before the execution
1635
+ */
1636
+ length(): number;
1637
+ /**
1638
+ * Pushes a command into the pipeline and returns a chainable instance of the
1639
+ * pipeline
1640
+ */
1641
+ private chain;
1642
+ /**
1643
+ * @see https://redis.io/commands/append
1644
+ */
1645
+ append: (key: string, value: string) => Pipeline<[...TCommands, Command<any, number>]>;
1646
+ /**
1647
+ * @see https://redis.io/commands/bitcount
1648
+ */
1649
+ bitcount: (key: string, start: number, end: number) => Pipeline<[...TCommands, Command<any, number>]>;
1650
+ /**
1651
+ * @see https://redis.io/commands/bitop
1652
+ */
1653
+ bitop: {
1654
+ (op: "and" | "or" | "xor", destinationKey: string, sourceKey: string, ...sourceKeys: string[]): Pipeline<[...TCommands, BitOpCommand]>;
1655
+ (op: "not", destinationKey: string, sourceKey: string): Pipeline<[...TCommands, BitOpCommand]>;
1656
+ };
1657
+ /**
1658
+ * @see https://redis.io/commands/bitpos
1659
+ */
1660
+ bitpos: (key: string, bit: 0 | 1, start?: number | undefined, end?: number | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
1661
+ /**
1662
+ * @see https://redis.io/commands/copy
1663
+ */
1664
+ copy: (key: string, destinationKey: string, opts?: {
1665
+ replace: boolean;
1666
+ } | undefined) => Pipeline<[...TCommands, Command<any, "COPIED" | "NOT_COPIED">]>;
1667
+ /**
1668
+ * @see https://redis.io/commands/zdiffstore
1669
+ */
1670
+ zdiffstore: (destination: string, numkeys: number, ...keys: string[]) => Pipeline<[...TCommands, Command<any, number>]>;
1671
+ /**
1672
+ * @see https://redis.io/commands/dbsize
1673
+ */
1674
+ dbsize: () => Pipeline<[...TCommands, Command<any, number>]>;
1675
+ /**
1676
+ * @see https://redis.io/commands/decr
1677
+ */
1678
+ decr: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
1679
+ /**
1680
+ * @see https://redis.io/commands/decrby
1681
+ */
1682
+ decrby: (key: string, decrement: number) => Pipeline<[...TCommands, Command<any, number>]>;
1683
+ /**
1684
+ * @see https://redis.io/commands/del
1685
+ */
1686
+ del: (...args: CommandArgs<typeof DelCommand>) => Pipeline<[...TCommands, Command<any, number>]>;
1687
+ /**
1688
+ * @see https://redis.io/commands/echo
1689
+ */
1690
+ echo: (message: string) => Pipeline<[...TCommands, Command<any, string>]>;
1691
+ /**
1692
+ * @see https://redis.io/commands/eval
1693
+ */
1694
+ eval: <TArgs extends unknown[], TData = unknown>(script: string, keys: string[], args: TArgs) => Pipeline<[...TCommands, Command<any, TData>]>;
1695
+ /**
1696
+ * @see https://redis.io/commands/evalsha
1697
+ */
1698
+ evalsha: <TArgs extends unknown[], TData = unknown>(sha1: string, keys: string[], args: TArgs) => Pipeline<[...TCommands, Command<any, TData>]>;
1699
+ /**
1700
+ * @see https://redis.io/commands/exists
1701
+ */
1702
+ exists: (...args: CommandArgs<typeof ExistsCommand>) => Pipeline<[...TCommands, Command<any, number>]>;
1703
+ /**
1704
+ * @see https://redis.io/commands/expire
1705
+ */
1706
+ expire: (key: string, seconds: number, option?: ("NX" | "nx" | "XX" | "xx" | "GT" | "gt" | "LT" | "lt") | undefined) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
1707
+ /**
1708
+ * @see https://redis.io/commands/expireat
1709
+ */
1710
+ expireat: (key: string, unix: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
1711
+ /**
1712
+ * @see https://redis.io/commands/flushall
1713
+ */
1714
+ flushall: (args?: CommandArgs<typeof FlushAllCommand>) => Pipeline<[...TCommands, Command<any, "OK">]>;
1715
+ /**
1716
+ * @see https://redis.io/commands/flushdb
1717
+ */
1718
+ flushdb: (opts?: {
1719
+ async?: boolean | undefined;
1720
+ } | undefined) => Pipeline<[...TCommands, Command<any, "OK">]>;
1721
+ /**
1722
+ * @see https://redis.io/commands/geoadd
1723
+ */
1724
+ geoadd: <TData>(args_0: string, args_1: GeoAddCommandOptions | GeoMember<TData>, ...args_2: GeoMember<TData>[]) => Pipeline<[...TCommands, Command<any, number | null>]>;
1725
+ /**
1726
+ * @see https://redis.io/commands/geodist
1727
+ */
1728
+ geodist: <TData>(key: string, member1: TData, member2: TData, unit?: "M" | "KM" | "FT" | "MI" | undefined) => Pipeline<[...TCommands, Command<any, number | null>]>;
1729
+ /**
1730
+ * @see https://redis.io/commands/geopos
1731
+ */
1732
+ geopos: <TData>(args_0: string, ...args_1: TData[]) => Pipeline<[...TCommands, Command<any, {
1733
+ lng: number;
1734
+ lat: number;
1735
+ }[]>]>;
1736
+ /**
1737
+ * @see https://redis.io/commands/geohash
1738
+ */
1739
+ geohash: <TData>(args_0: string, ...args_1: TData[]) => Pipeline<[...TCommands, Command<any, (string | null)[]>]>;
1740
+ /**
1741
+ * @see https://redis.io/commands/geosearch
1742
+ */
1743
+ geosearch: <TData>(key: string, centerPoint: {
1744
+ type: "FROMLONLAT" | "fromlonlat";
1745
+ coordinate: {
1746
+ lon: number;
1747
+ lat: number;
1748
+ };
1749
+ } | {
1750
+ type: "FROMMEMBER" | "frommember";
1751
+ member: TData;
1752
+ }, shape: {
1753
+ type: "BYRADIUS" | "byradius";
1754
+ radius: number;
1755
+ radiusType: "M" | "KM" | "FT" | "MI";
1756
+ } | {
1757
+ type: "BYBOX" | "bybox";
1758
+ rect: {
1759
+ width: number;
1760
+ height: number;
1761
+ };
1762
+ rectType: "M" | "KM" | "FT" | "MI";
1763
+ }, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
1764
+ count?: {
1765
+ limit: number;
1766
+ any?: boolean | undefined;
1767
+ } | undefined;
1768
+ withCoord?: boolean | undefined;
1769
+ withDist?: boolean | undefined;
1770
+ withHash?: boolean | undefined;
1771
+ } | undefined) => Pipeline<[...TCommands, Command<any, ({
1772
+ member: TData;
1773
+ } & {
1774
+ coord?: {
1775
+ long: number;
1776
+ lat: number;
1777
+ } | undefined;
1778
+ dist?: number | undefined;
1779
+ hash?: string | undefined;
1780
+ })[]>]>;
1781
+ /**
1782
+ * @see https://redis.io/commands/geosearchstore
1783
+ */
1784
+ geosearchstore: <TData>(destination: string, key: string, centerPoint: {
1785
+ type: "FROMLONLAT" | "fromlonlat";
1786
+ coordinate: {
1787
+ lon: number;
1788
+ lat: number;
1789
+ };
1790
+ } | {
1791
+ type: "FROMMEMBER" | "frommember";
1792
+ member: TData;
1793
+ }, shape: {
1794
+ type: "BYRADIUS" | "byradius";
1795
+ radius: number;
1796
+ radiusType: "M" | "KM" | "FT" | "MI";
1797
+ } | {
1798
+ type: "BYBOX" | "bybox";
1799
+ rect: {
1800
+ width: number;
1801
+ height: number;
1802
+ };
1803
+ rectType: "M" | "KM" | "FT" | "MI";
1804
+ }, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
1805
+ count?: {
1806
+ limit: number;
1807
+ any?: boolean | undefined;
1808
+ } | undefined;
1809
+ storeDist?: boolean | undefined;
1810
+ } | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
1811
+ /**
1812
+ * @see https://redis.io/commands/get
1813
+ */
1814
+ get: <TData>(key: string) => Pipeline<[...TCommands, Command<any, TData | null>]>;
1815
+ /**
1816
+ * @see https://redis.io/commands/getbit
1817
+ */
1818
+ getbit: (key: string, offset: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
1819
+ /**
1820
+ * @see https://redis.io/commands/getdel
1821
+ */
1822
+ getdel: <TData>(key: string) => Pipeline<[...TCommands, Command<any, TData | null>]>;
1823
+ /**
1824
+ * @see https://redis.io/commands/getrange
1825
+ */
1826
+ getrange: (key: string, start: number, end: number) => Pipeline<[...TCommands, Command<any, string>]>;
1827
+ /**
1828
+ * @see https://redis.io/commands/getset
1829
+ */
1830
+ getset: <TData>(key: string, value: TData) => Pipeline<[...TCommands, Command<any, TData | null>]>;
1831
+ /**
1832
+ * @see https://redis.io/commands/hdel
1833
+ */
1834
+ hdel: (key: string, ...fields: string[]) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
1835
+ /**
1836
+ * @see https://redis.io/commands/hexists
1837
+ */
1838
+ hexists: (key: string, field: string) => Pipeline<[...TCommands, Command<any, number>]>;
1839
+ /**
1840
+ * @see https://redis.io/commands/hget
1841
+ */
1842
+ hget: <TData>(key: string, field: string) => Pipeline<[...TCommands, Command<any, TData | null>]>;
1843
+ /**
1844
+ * @see https://redis.io/commands/hgetall
1845
+ */
1846
+ hgetall: <TData extends Record<string, unknown>>(key: string) => Pipeline<[...TCommands, Command<any, TData | null>]>;
1847
+ /**
1848
+ * @see https://redis.io/commands/hincrby
1849
+ */
1850
+ hincrby: (key: string, field: string, increment: number) => Pipeline<[...TCommands, Command<any, number>]>;
1851
+ /**
1852
+ * @see https://redis.io/commands/hincrbyfloat
1853
+ */
1854
+ hincrbyfloat: (key: string, field: string, increment: number) => Pipeline<[...TCommands, Command<any, number>]>;
1855
+ /**
1856
+ * @see https://redis.io/commands/hkeys
1857
+ */
1858
+ hkeys: (key: string) => Pipeline<[...TCommands, Command<any, string[]>]>;
1859
+ /**
1860
+ * @see https://redis.io/commands/hlen
1861
+ */
1862
+ hlen: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
1863
+ /**
1864
+ * @see https://redis.io/commands/hmget
1865
+ */
1866
+ hmget: <TData extends Record<string, unknown>>(key: string, ...fields: string[]) => Pipeline<[...TCommands, Command<any, TData | null>]>;
1867
+ /**
1868
+ * @see https://redis.io/commands/hmset
1869
+ */
1870
+ hmset: <TData>(key: string, kv: {
1871
+ [field: string]: TData;
1872
+ }) => Pipeline<[...TCommands, Command<any, "OK">]>;
1873
+ /**
1874
+ * @see https://redis.io/commands/hrandfield
1875
+ */
1876
+ hrandfield: <TData extends string | Record<string, unknown> | string[]>(key: string, count?: number, withValues?: boolean) => Pipeline<[...TCommands, Command<any, TData>]>;
1877
+ /**
1878
+ * @see https://redis.io/commands/hscan
1879
+ */
1880
+ hscan: (key: string, cursor: string | number, cmdOpts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [string, (string | number)[]]>]>;
1881
+ /**
1882
+ * @see https://redis.io/commands/hset
1883
+ */
1884
+ hset: <TData>(key: string, kv: {
1885
+ [field: string]: TData;
1886
+ }) => Pipeline<[...TCommands, Command<any, number>]>;
1887
+ /**
1888
+ * @see https://redis.io/commands/hsetnx
1889
+ */
1890
+ hsetnx: <TData>(key: string, field: string, value: TData) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
1891
+ /**
1892
+ * @see https://redis.io/commands/hstrlen
1893
+ */
1894
+ hstrlen: (key: string, field: string) => Pipeline<[...TCommands, Command<any, number>]>;
1895
+ /**
1896
+ * @see https://redis.io/commands/hvals
1897
+ */
1898
+ hvals: (key: string) => Pipeline<[...TCommands, Command<any, any>]>;
1899
+ /**
1900
+ * @see https://redis.io/commands/incr
1901
+ */
1902
+ incr: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
1903
+ /**
1904
+ * @see https://redis.io/commands/incrby
1905
+ */
1906
+ incrby: (key: string, value: number) => Pipeline<[...TCommands, Command<any, number>]>;
1907
+ /**
1908
+ * @see https://redis.io/commands/incrbyfloat
1909
+ */
1910
+ incrbyfloat: (key: string, value: number) => Pipeline<[...TCommands, Command<any, number>]>;
1911
+ /**
1912
+ * @see https://redis.io/commands/keys
1913
+ */
1914
+ keys: (pattern: string) => Pipeline<[...TCommands, Command<any, string[]>]>;
1915
+ /**
1916
+ * @see https://redis.io/commands/lindex
1917
+ */
1918
+ lindex: (key: string, index: number) => Pipeline<[...TCommands, Command<any, any>]>;
1919
+ /**
1920
+ * @see https://redis.io/commands/linsert
1921
+ */
1922
+ linsert: <TData>(key: string, direction: "before" | "after", pivot: TData, value: TData) => Pipeline<[...TCommands, Command<any, number>]>;
1923
+ /**
1924
+ * @see https://redis.io/commands/llen
1925
+ */
1926
+ llen: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
1927
+ /**
1928
+ * @see https://redis.io/commands/lmove
1929
+ */
1930
+ lmove: <TData = string>(source: string, destination: string, whereFrom: "left" | "right", whereTo: "left" | "right") => Pipeline<[...TCommands, Command<any, TData>]>;
1931
+ /**
1932
+ * @see https://redis.io/commands/lpop
1933
+ */
1934
+ lpop: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
1935
+ /**
1936
+ * @see https://redis.io/commands/lmpop
1937
+ */
1938
+ lmpop: <TData>(numkeys: number, keys: string[], args_2: "LEFT" | "RIGHT", count?: number | undefined) => Pipeline<[...TCommands, Command<any, [string, TData[]] | null>]>;
1939
+ /**
1940
+ * @see https://redis.io/commands/lpos
1941
+ */
1942
+ lpos: <TData>(key: string, element: unknown, opts?: {
1943
+ rank?: number | undefined;
1944
+ count?: number | undefined;
1945
+ maxLen?: number | undefined;
1946
+ } | undefined) => Pipeline<[...TCommands, Command<any, TData>]>;
1947
+ /**
1948
+ * @see https://redis.io/commands/lpush
1949
+ */
1950
+ lpush: <TData>(key: string, ...elements: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
1951
+ /**
1952
+ * @see https://redis.io/commands/lpushx
1953
+ */
1954
+ lpushx: <TData>(key: string, ...elements: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
1955
+ /**
1956
+ * @see https://redis.io/commands/lrange
1957
+ */
1958
+ lrange: <TResult = string>(key: string, start: number, end: number) => Pipeline<[...TCommands, Command<any, TResult[]>]>;
1959
+ /**
1960
+ * @see https://redis.io/commands/lrem
1961
+ */
1962
+ lrem: <TData>(key: string, count: number, value: TData) => Pipeline<[...TCommands, Command<any, number>]>;
1963
+ /**
1964
+ * @see https://redis.io/commands/lset
1965
+ */
1966
+ lset: <TData>(key: string, index: number, value: TData) => Pipeline<[...TCommands, Command<any, "OK">]>;
1967
+ /**
1968
+ * @see https://redis.io/commands/ltrim
1969
+ */
1970
+ ltrim: (key: string, start: number, end: number) => Pipeline<[...TCommands, Command<any, "OK">]>;
1971
+ /**
1972
+ * @see https://redis.io/commands/mget
1973
+ */
1974
+ mget: <TData extends unknown[]>(...args: CommandArgs<typeof MGetCommand>) => Pipeline<[...TCommands, Command<any, TData>]>;
1975
+ /**
1976
+ * @see https://redis.io/commands/mset
1977
+ */
1978
+ mset: <TData>(kv: {
1979
+ [key: string]: TData;
1980
+ }) => Pipeline<[...TCommands, Command<any, "OK">]>;
1981
+ /**
1982
+ * @see https://redis.io/commands/msetnx
1983
+ */
1984
+ msetnx: <TData>(kv: {
1985
+ [key: string]: TData;
1986
+ }) => Pipeline<[...TCommands, Command<any, number>]>;
1987
+ /**
1988
+ * @see https://redis.io/commands/persist
1989
+ */
1990
+ persist: (key: string) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
1991
+ /**
1992
+ * @see https://redis.io/commands/pexpire
1993
+ */
1994
+ pexpire: (key: string, milliseconds: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
1995
+ /**
1996
+ * @see https://redis.io/commands/pexpireat
1997
+ */
1998
+ pexpireat: (key: string, unix: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
1999
+ /**
2000
+ * @see https://redis.io/commands/pfadd
2001
+ */
2002
+ pfadd: (args_0: string, ...args_1: unknown[]) => Pipeline<[...TCommands, Command<any, number>]>;
2003
+ /**
2004
+ * @see https://redis.io/commands/pfcount
2005
+ */
2006
+ pfcount: (args_0: string, ...args_1: string[]) => Pipeline<[...TCommands, Command<any, number>]>;
2007
+ /**
2008
+ * @see https://redis.io/commands/pfmerge
2009
+ */
2010
+ pfmerge: (destination_key: string, ...args_1: string[]) => Pipeline<[...TCommands, Command<any, "OK">]>;
2011
+ /**
2012
+ * @see https://redis.io/commands/ping
2013
+ */
2014
+ ping: (args?: CommandArgs<typeof PingCommand>) => Pipeline<[...TCommands, Command<any, string>]>;
2015
+ /**
2016
+ * @see https://redis.io/commands/psetex
2017
+ */
2018
+ psetex: <TData>(key: string, ttl: number, value: TData) => Pipeline<[...TCommands, Command<any, string>]>;
2019
+ /**
2020
+ * @see https://redis.io/commands/pttl
2021
+ */
2022
+ pttl: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
2023
+ /**
2024
+ * @see https://redis.io/commands/publish
2025
+ */
2026
+ publish: (channel: string, message: unknown) => Pipeline<[...TCommands, Command<any, number>]>;
2027
+ /**
2028
+ * @see https://redis.io/commands/randomkey
2029
+ */
2030
+ randomkey: () => Pipeline<[...TCommands, Command<any, string | null>]>;
2031
+ /**
2032
+ * @see https://redis.io/commands/rename
2033
+ */
2034
+ rename: (source: string, destination: string) => Pipeline<[...TCommands, Command<any, "OK">]>;
2035
+ /**
2036
+ * @see https://redis.io/commands/renamenx
2037
+ */
2038
+ renamenx: (source: string, destination: string) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
2039
+ /**
2040
+ * @see https://redis.io/commands/rpop
2041
+ */
2042
+ rpop: <TData = string>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
2043
+ /**
2044
+ * @see https://redis.io/commands/rpush
2045
+ */
2046
+ rpush: <TData>(key: string, ...elements: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
2047
+ /**
2048
+ * @see https://redis.io/commands/rpushx
2049
+ */
2050
+ rpushx: <TData>(key: string, ...elements: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
2051
+ /**
2052
+ * @see https://redis.io/commands/sadd
2053
+ */
2054
+ sadd: <TData>(key: string, ...members: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
2055
+ /**
2056
+ * @see https://redis.io/commands/scan
2057
+ */
2058
+ scan: (cursor: string | number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [string, string[]]>]>;
2059
+ /**
2060
+ * @see https://redis.io/commands/scard
2061
+ */
2062
+ scard: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
2063
+ /**
2064
+ * @see https://redis.io/commands/script-exists
2065
+ */
2066
+ scriptExists: (...args: CommandArgs<typeof ScriptExistsCommand>) => Pipeline<[...TCommands, Command<any, number[]>]>;
2067
+ /**
2068
+ * @see https://redis.io/commands/script-flush
2069
+ */
2070
+ scriptFlush: (opts?: ScriptFlushCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, "OK">]>;
2071
+ /**
2072
+ * @see https://redis.io/commands/script-load
2073
+ */
2074
+ scriptLoad: (script: string) => Pipeline<[...TCommands, Command<any, string>]>;
2075
+ sdiff: (key: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
2076
+ /**
2077
+ * @see https://redis.io/commands/sdiffstore
2078
+ */
2079
+ sdiffstore: (destination: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, number>]>;
2080
+ /**
2081
+ * @see https://redis.io/commands/set
2082
+ */
2083
+ set: <TData>(key: string, value: TData, opts?: SetCommandOptions) => Pipeline<[...TCommands, Command<any, "OK" | TData | null>]>;
2084
+ /**
2085
+ * @see https://redis.io/commands/setbit
2086
+ */
2087
+ setbit: (key: string, offset: number, value: 0 | 1) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
2088
+ /**
2089
+ * @see https://redis.io/commands/setex
2090
+ */
2091
+ setex: <TData>(key: string, ttl: number, value: TData) => Pipeline<[...TCommands, Command<any, "OK">]>;
2092
+ /**
2093
+ * @see https://redis.io/commands/setnx
2094
+ */
2095
+ setnx: <TData>(key: string, value: TData) => Pipeline<[...TCommands, Command<any, number>]>;
2096
+ /**
2097
+ * @see https://redis.io/commands/setrange
2098
+ */
2099
+ setrange: (key: string, offset: number, value: string) => Pipeline<[...TCommands, Command<any, number>]>;
2100
+ /**
2101
+ * @see https://redis.io/commands/sinter
2102
+ */
2103
+ sinter: (key: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, string[]>]>;
2104
+ /**
2105
+ * @see https://redis.io/commands/sinterstore
2106
+ */
2107
+ sinterstore: (destination: string, key: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, number>]>;
2108
+ /**
2109
+ * @see https://redis.io/commands/sismember
2110
+ */
2111
+ sismember: <TData>(key: string, member: TData) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
2112
+ /**
2113
+ * @see https://redis.io/commands/smembers
2114
+ */
2115
+ smembers: <TData extends unknown[] = string[]>(key: string) => Pipeline<[...TCommands, Command<any, TData>]>;
2116
+ /**
2117
+ * @see https://redis.io/commands/smismember
2118
+ */
2119
+ smismember: <TMembers extends unknown[]>(key: string, members: TMembers) => Pipeline<[...TCommands, Command<any, (0 | 1)[]>]>;
2120
+ /**
2121
+ * @see https://redis.io/commands/smove
2122
+ */
2123
+ smove: <TData>(source: string, destination: string, member: TData) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
2124
+ /**
2125
+ * @see https://redis.io/commands/spop
2126
+ */
2127
+ spop: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
2128
+ /**
2129
+ * @see https://redis.io/commands/srandmember
2130
+ */
2131
+ srandmember: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
2132
+ /**
2133
+ * @see https://redis.io/commands/srem
2134
+ */
2135
+ srem: <TData>(key: string, ...members: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
2136
+ /**
2137
+ * @see https://redis.io/commands/sscan
2138
+ */
2139
+ sscan: (key: string, cursor: string | number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [string, (string | number)[]]>]>;
2140
+ /**
2141
+ * @see https://redis.io/commands/strlen
2142
+ */
2143
+ strlen: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
2144
+ /**
2145
+ * @see https://redis.io/commands/sunion
2146
+ */
2147
+ sunion: (key: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
2148
+ /**
2149
+ * @see https://redis.io/commands/sunionstore
2150
+ */
2151
+ sunionstore: (destination: string, key: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, number>]>;
2152
+ /**
2153
+ * @see https://redis.io/commands/time
2154
+ */
2155
+ time: () => Pipeline<[...TCommands, Command<any, [number, number]>]>;
2156
+ /**
2157
+ * @see https://redis.io/commands/touch
2158
+ */
2159
+ touch: (...args: CommandArgs<typeof TouchCommand>) => Pipeline<[...TCommands, Command<any, number>]>;
2160
+ /**
2161
+ * @see https://redis.io/commands/ttl
2162
+ */
2163
+ ttl: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
2164
+ /**
2165
+ * @see https://redis.io/commands/type
2166
+ */
2167
+ type: (key: string) => Pipeline<[...TCommands, Command<any, Type>]>;
2168
+ /**
2169
+ * @see https://redis.io/commands/unlink
2170
+ */
2171
+ unlink: (...args: CommandArgs<typeof UnlinkCommand>) => Pipeline<[...TCommands, Command<any, number>]>;
2172
+ /**
2173
+ * @see https://redis.io/commands/zadd
2174
+ */
2175
+ zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [
2176
+ key: string,
2177
+ opts: ZAddCommandOptions,
2178
+ ...scoreMemberPairs: [ScoreMember<TData>, ...ScoreMember<TData>[]]
2179
+ ]) => Pipeline<[...TCommands, Command<any, number | null>]>;
2180
+ /**
2181
+ * @see https://redis.io/commands/xadd
2182
+ */
2183
+ xadd: (key: string, id: string, entries: {
2184
+ [field: string]: unknown;
2185
+ }, opts?: {
2186
+ nomkStream?: boolean | undefined;
2187
+ trim?: (({
2188
+ type: "MAXLEN" | "maxlen";
2189
+ threshold: number;
2190
+ } | {
2191
+ type: "MINID" | "minid";
2192
+ threshold: string;
2193
+ }) & ({
2194
+ comparison: "~";
2195
+ limit?: number | undefined;
2196
+ } | {
2197
+ comparison: "=";
2198
+ limit?: undefined;
2199
+ })) | undefined;
2200
+ } | undefined) => Pipeline<[...TCommands, Command<any, string>]>;
2201
+ /**
2202
+ * @see https://redis.io/commands/xack
2203
+ */
2204
+ xack: (key: string, group: string, id: string | string[]) => Pipeline<[...TCommands, Command<any, number>]>;
2205
+ /**
2206
+ * @see https://redis.io/commands/xdel
2207
+ */
2208
+ xdel: (key: string, ids: string | string[]) => Pipeline<[...TCommands, Command<any, number>]>;
2209
+ /**
2210
+ * @see https://redis.io/commands/xgroup
2211
+ */
2212
+ xgroup: (key: string, opts: {
2213
+ type: "CREATE";
2214
+ group: string;
2215
+ id: string;
2216
+ options?: {
2217
+ MKSTREAM?: boolean | undefined;
2218
+ ENTRIESREAD?: number | undefined;
2219
+ } | undefined;
2220
+ } | {
2221
+ type: "CREATECONSUMER";
2222
+ group: string;
2223
+ consumer: string;
2224
+ } | {
2225
+ type: "DELCONSUMER";
2226
+ group: string;
2227
+ consumer: string;
2228
+ } | {
2229
+ type: "DESTROY";
2230
+ group: string;
2231
+ } | {
2232
+ type: "SETID";
2233
+ group: string;
2234
+ id: string;
2235
+ options?: {
2236
+ ENTRIESREAD?: number | undefined;
2237
+ } | undefined;
2238
+ }) => Pipeline<[...TCommands, Command<any, never>]>;
2239
+ /**
2240
+ * @see https://redis.io/commands/xread
2241
+ */
2242
+ xread: (...args: CommandArgs<typeof XReadCommand>) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
2243
+ /**
2244
+ * @see https://redis.io/commands/xreadgroup
2245
+ */
2246
+ xreadgroup: (...args: CommandArgs<typeof XReadGroupCommand>) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
2247
+ /**
2248
+ * @see https://redis.io/commands/xinfo
2249
+ */
2250
+ xinfo: (key: string, options: {
2251
+ type: "CONSUMERS";
2252
+ group: string;
2253
+ } | {
2254
+ type: "GROUPS";
2255
+ }) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
2256
+ /**
2257
+ * @see https://redis.io/commands/xlen
2258
+ */
2259
+ xlen: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
2260
+ /**
2261
+ * @see https://redis.io/commands/xpending
2262
+ */
2263
+ xpending: (key: string, group: string, start: string, end: string, count: number, options?: {
2264
+ idleTime?: number | undefined;
2265
+ consumer?: string | string[] | undefined;
2266
+ } | undefined) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
2267
+ /**
2268
+ * @see https://redis.io/commands/xclaim
2269
+ */
2270
+ xclaim: (key: string, group: string, consumer: string, minIdleTime: number, id: string | string[], options?: {
2271
+ idleMS?: number | undefined;
2272
+ timeMS?: number | undefined;
2273
+ retryCount?: number | undefined;
2274
+ force?: boolean | undefined;
2275
+ justId?: boolean | undefined;
2276
+ lastId?: number | undefined;
2277
+ } | undefined) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
2278
+ /**
2279
+ * @see https://redis.io/commands/xautoclaim
2280
+ */
2281
+ xautoclaim: (key: string, group: string, consumer: string, minIdleTime: number, start: string, options?: {
2282
+ count?: number | undefined;
2283
+ justId?: boolean | undefined;
2284
+ } | undefined) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
2285
+ /**
2286
+ * @see https://redis.io/commands/xtrim
2287
+ */
2288
+ xtrim: (key: string, options: {
2289
+ strategy: "MAXLEN" | "MINID";
2290
+ exactness?: "~" | "=" | undefined;
2291
+ threshold: string | number;
2292
+ limit?: number | undefined;
2293
+ }) => Pipeline<[...TCommands, Command<any, number>]>;
2294
+ /**
2295
+ * @see https://redis.io/commands/xrange
2296
+ */
2297
+ xrange: (key: string, start: string, end: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, Record<string, Record<string, unknown>>>]>;
2298
+ /**
2299
+ * @see https://redis.io/commands/xrevrange
2300
+ */
2301
+ xrevrange: (key: string, end: string, start: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, Record<string, Record<string, unknown>>>]>;
2302
+ /**
2303
+ * @see https://redis.io/commands/zcard
2304
+ */
2305
+ zcard: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
2306
+ /**
2307
+ * @see https://redis.io/commands/zcount
2308
+ */
2309
+ zcount: (key: string, min: string | number, max: string | number) => Pipeline<[...TCommands, Command<any, number>]>;
2310
+ /**
2311
+ * @see https://redis.io/commands/zincrby
2312
+ */
2313
+ zincrby: <TData>(key: string, increment: number, member: TData) => Pipeline<[...TCommands, Command<any, number>]>;
2314
+ /**
2315
+ * @see https://redis.io/commands/zinterstore
2316
+ */
2317
+ zinterstore: (destination: string, numKeys: number, keys: string[], opts?: ZInterStoreCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
2318
+ /**
2319
+ * @see https://redis.io/commands/zlexcount
2320
+ */
2321
+ zlexcount: (key: string, min: string, max: string) => Pipeline<[...TCommands, Command<any, number>]>;
2322
+ /**
2323
+ * @see https://redis.io/commands/zmscore
2324
+ */
2325
+ zmscore: (key: string, members: unknown[]) => Pipeline<[...TCommands, Command<any, number[] | null>]>;
2326
+ /**
2327
+ * @see https://redis.io/commands/zpopmax
2328
+ */
2329
+ zpopmax: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData[]>]>;
2330
+ /**
2331
+ * @see https://redis.io/commands/zpopmin
2332
+ */
2333
+ zpopmin: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData[]>]>;
2334
+ /**
2335
+ * @see https://redis.io/commands/zrange
2336
+ */
2337
+ zrange: <TData extends unknown[]>(...args: [key: string, min: number, max: number, opts?: ZRangeCommandOptions] | [
2338
+ key: string,
2339
+ min: `(${string}` | `[${string}` | "-" | "+",
2340
+ max: `(${string}` | `[${string}` | "-" | "+",
2341
+ opts: {
2342
+ byLex: true;
2343
+ } & ZRangeCommandOptions
2344
+ ] | [
2345
+ key: string,
2346
+ min: number | `(${number}` | "-inf" | "+inf",
2347
+ max: number | `(${number}` | "-inf" | "+inf",
2348
+ opts: {
2349
+ byScore: true;
2350
+ } & ZRangeCommandOptions
2351
+ ]) => Pipeline<[...TCommands, Command<any, TData>]>;
2352
+ /**
2353
+ * @see https://redis.io/commands/zrank
2354
+ */
2355
+ zrank: <TData>(key: string, member: TData) => Pipeline<[...TCommands, Command<any, number | null>]>;
2356
+ /**
2357
+ * @see https://redis.io/commands/zrem
2358
+ */
2359
+ zrem: <TData>(key: string, ...members: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
2360
+ /**
2361
+ * @see https://redis.io/commands/zremrangebylex
2362
+ */
2363
+ zremrangebylex: (key: string, min: string, max: string) => Pipeline<[...TCommands, Command<any, number>]>;
2364
+ /**
2365
+ * @see https://redis.io/commands/zremrangebyrank
2366
+ */
2367
+ zremrangebyrank: (key: string, start: number, stop: number) => Pipeline<[...TCommands, Command<any, number>]>;
2368
+ /**
2369
+ * @see https://redis.io/commands/zremrangebyscore
2370
+ */
2371
+ zremrangebyscore: (key: string, min: number, max: number) => Pipeline<[...TCommands, Command<any, number>]>;
2372
+ /**
2373
+ * @see https://redis.io/commands/zrevrank
2374
+ */
2375
+ zrevrank: <TData>(key: string, member: TData) => Pipeline<[...TCommands, Command<any, number | null>]>;
2376
+ /**
2377
+ * @see https://redis.io/commands/zscan
2378
+ */
2379
+ zscan: (key: string, cursor: string | number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [string, (string | number)[]]>]>;
2380
+ /**
2381
+ * @see https://redis.io/commands/zscore
2382
+ */
2383
+ zscore: <TData>(key: string, member: TData) => Pipeline<[...TCommands, Command<any, number | null>]>;
2384
+ /**
2385
+ * @see https://redis.io/commands/zunionstore
2386
+ */
2387
+ zunionstore: (destination: string, numKeys: number, keys: string[], opts?: ZUnionStoreCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
2388
+ /**
2389
+ * @see https://redis.io/commands/zunion
2390
+ */
2391
+ zunion: (numKeys: number, keys: string[], opts?: ZUnionCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, any>]>;
2392
+ /**
2393
+ * @see https://redis.io/commands/?group=json
2394
+ */
2395
+ get json(): {
2396
+ /**
2397
+ * @see https://redis.io/commands/json.arrappend
2398
+ */
2399
+ arrappend: (key: string, path: string, ...values: unknown[]) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
2400
+ /**
2401
+ * @see https://redis.io/commands/json.arrindex
2402
+ */
2403
+ arrindex: (key: string, path: string, value: unknown, start?: number | undefined, stop?: number | undefined) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
2404
+ /**
2405
+ * @see https://redis.io/commands/json.arrinsert
2406
+ */
2407
+ arrinsert: (key: string, path: string, index: number, ...values: unknown[]) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
2408
+ /**
2409
+ * @see https://redis.io/commands/json.arrlen
2410
+ */
2411
+ arrlen: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
2412
+ /**
2413
+ * @see https://redis.io/commands/json.arrpop
2414
+ */
2415
+ arrpop: (key: string, path?: string | undefined, index?: number | undefined) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
2416
+ /**
2417
+ * @see https://redis.io/commands/json.arrtrim
2418
+ */
2419
+ arrtrim: (key: string, path?: string | undefined, start?: number | undefined, stop?: number | undefined) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
2420
+ /**
2421
+ * @see https://redis.io/commands/json.clear
2422
+ */
2423
+ clear: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
2424
+ /**
2425
+ * @see https://redis.io/commands/json.del
2426
+ */
2427
+ del: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
2428
+ /**
2429
+ * @see https://redis.io/commands/json.forget
2430
+ */
2431
+ forget: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
2432
+ /**
2433
+ * @see https://redis.io/commands/json.get
2434
+ */
2435
+ get: (...args: CommandArgs<typeof JsonGetCommand>) => Pipeline<[...TCommands, Command<any, any>]>;
2436
+ /**
2437
+ * @see https://redis.io/commands/json.mget
2438
+ */
2439
+ mget: (keys: string[], path: string) => Pipeline<[...TCommands, Command<any, any>]>;
2440
+ /**
2441
+ * @see https://redis.io/commands/json.numincrby
2442
+ */
2443
+ numincrby: (key: string, path: string, value: number) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
2444
+ /**
2445
+ * @see https://redis.io/commands/json.nummultby
2446
+ */
2447
+ nummultby: (key: string, path: string, value: number) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
2448
+ /**
2449
+ * @see https://redis.io/commands/json.objkeys
2450
+ */
2451
+ objkeys: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, (string[] | null)[]>]>;
2452
+ /**
2453
+ * @see https://redis.io/commands/json.objlen
2454
+ */
2455
+ objlen: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
2456
+ /**
2457
+ * @see https://redis.io/commands/json.resp
2458
+ */
2459
+ resp: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, any>]>;
2460
+ /**
2461
+ * @see https://redis.io/commands/json.set
2462
+ */
2463
+ set: (key: string, path: string, value: string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown>)[], opts?: {
2464
+ nx: true;
2465
+ xx?: undefined;
2466
+ } | {
2467
+ nx?: undefined;
2468
+ xx: true;
2469
+ } | undefined) => Pipeline<[...TCommands, Command<any, "OK" | null>]>;
2470
+ /**
2471
+ * @see https://redis.io/commands/json.strappend
2472
+ */
2473
+ strappend: (key: string, path: string, value: string) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
2474
+ /**
2475
+ * @see https://redis.io/commands/json.strlen
2476
+ */
2477
+ strlen: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
2478
+ /**
2479
+ * @see https://redis.io/commands/json.toggle
2480
+ */
2481
+ toggle: (key: string, path: string) => Pipeline<[...TCommands, Command<any, number[]>]>;
2482
+ /**
2483
+ * @see https://redis.io/commands/json.type
2484
+ */
2485
+ type: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, string[]>]>;
2486
+ };
2487
+ }
2488
+
2489
+ /**
2490
+ * Creates a new script.
2491
+ *
2492
+ * Scripts offer the ability to optimistically try to execute a script without having to send the
2493
+ * entire script to the server. If the script is loaded on the server, it tries again by sending
2494
+ * the entire script. Afterwards, the script is cached on the server.
2495
+ *
2496
+ * @example
2497
+ * ```ts
2498
+ * const redis = new Redis({...})
2499
+ *
2500
+ * const script = redis.createScript<string>("return ARGV[1];")
2501
+ * const arg1 = await script.eval([], ["Hello World"])
2502
+ * expect(arg1, "Hello World")
2503
+ * ```
2504
+ */
2505
+ declare class Script<TResult = unknown> {
2506
+ readonly script: string;
2507
+ readonly sha1: string;
2508
+ private readonly redis;
2509
+ constructor(redis: Redis, script: string);
2510
+ /**
2511
+ * Send an `EVAL` command to redis.
2512
+ */
2513
+ eval(keys: string[], args: string[]): Promise<TResult>;
2514
+ /**
2515
+ * Calculates the sha1 hash of the script and then calls `EVALSHA`.
2516
+ */
2517
+ evalsha(keys: string[], args: string[]): Promise<TResult>;
2518
+ /**
2519
+ * Optimistically try to run `EVALSHA` first.
2520
+ * If the script is not loaded in redis, it will fall back and try again with `EVAL`.
2521
+ *
2522
+ * Following calls will be able to use the cached script
2523
+ */
2524
+ exec(keys: string[], args: string[]): Promise<TResult>;
2525
+ /**
2526
+ * Compute the sha1 hash of the script and return its hex representation.
2527
+ */
2528
+ private digest;
2529
+ }
2530
+
2531
+ /**
2532
+ * Serverless redis client for upstash.
2533
+ */
2534
+ declare class Redis {
2535
+ protected client: Requester;
2536
+ protected opts?: CommandOptions<any, any>;
2537
+ protected enableTelemetry: boolean;
2538
+ protected enableAutoPipelining: boolean;
2539
+ /**
2540
+ * Create a new redis client
2541
+ *
2542
+ * @example
2543
+ * ```typescript
2544
+ * const redis = new Redis({
2545
+ * url: "<UPSTASH_REDIS_REST_URL>",
2546
+ * token: "<UPSTASH_REDIS_REST_TOKEN>",
2547
+ * });
2548
+ * ```
2549
+ */
2550
+ constructor(client: Requester, opts?: RedisOptions);
2551
+ get json(): {
2552
+ /**
2553
+ * @see https://redis.io/commands/json.arrappend
2554
+ */
2555
+ arrappend: (key: string, path: string, ...values: unknown[]) => Promise<(number | null)[]>;
2556
+ /**
2557
+ * @see https://redis.io/commands/json.arrindex
2558
+ */
2559
+ arrindex: (key: string, path: string, value: unknown, start?: number | undefined, stop?: number | undefined) => Promise<(number | null)[]>;
2560
+ /**
2561
+ * @see https://redis.io/commands/json.arrinsert
2562
+ */
2563
+ arrinsert: (key: string, path: string, index: number, ...values: unknown[]) => Promise<(number | null)[]>;
2564
+ /**
2565
+ * @see https://redis.io/commands/json.arrlen
2566
+ */
2567
+ arrlen: (key: string, path?: string | undefined) => Promise<(number | null)[]>;
2568
+ /**
2569
+ * @see https://redis.io/commands/json.arrpop
2570
+ */
2571
+ arrpop: (key: string, path?: string | undefined, index?: number | undefined) => Promise<unknown[]>;
2572
+ /**
2573
+ * @see https://redis.io/commands/json.arrtrim
2574
+ */
2575
+ arrtrim: (key: string, path?: string | undefined, start?: number | undefined, stop?: number | undefined) => Promise<(number | null)[]>;
2576
+ /**
2577
+ * @see https://redis.io/commands/json.clear
2578
+ */
2579
+ clear: (key: string, path?: string | undefined) => Promise<number>;
2580
+ /**
2581
+ * @see https://redis.io/commands/json.del
2582
+ */
2583
+ del: (key: string, path?: string | undefined) => Promise<number>;
2584
+ /**
2585
+ * @see https://redis.io/commands/json.forget
2586
+ */
2587
+ forget: (key: string, path?: string | undefined) => Promise<number>;
2588
+ /**
2589
+ * @see https://redis.io/commands/json.get
2590
+ */
2591
+ get: <TData>(...args: CommandArgs<typeof JsonGetCommand>) => Promise<TData | null>;
2592
+ /**
2593
+ * @see https://redis.io/commands/json.mget
2594
+ */
2595
+ mget: <TData_1>(keys: string[], path: string) => Promise<TData_1>;
2596
+ /**
2597
+ * @see https://redis.io/commands/json.numincrby
2598
+ */
2599
+ numincrby: (key: string, path: string, value: number) => Promise<(number | null)[]>;
2600
+ /**
2601
+ * @see https://redis.io/commands/json.nummultby
2602
+ */
2603
+ nummultby: (key: string, path: string, value: number) => Promise<(number | null)[]>;
2604
+ /**
2605
+ * @see https://redis.io/commands/json.objkeys
2606
+ */
2607
+ objkeys: (key: string, path?: string | undefined) => Promise<(string[] | null)[]>;
2608
+ /**
2609
+ * @see https://redis.io/commands/json.objlen
2610
+ */
2611
+ objlen: (key: string, path?: string | undefined) => Promise<(number | null)[]>;
2612
+ /**
2613
+ * @see https://redis.io/commands/json.resp
2614
+ */
2615
+ resp: (key: string, path?: string | undefined) => Promise<any>;
2616
+ /**
2617
+ * @see https://redis.io/commands/json.set
2618
+ */
2619
+ set: (key: string, path: string, value: string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown>)[], opts?: {
2620
+ nx: true;
2621
+ xx?: undefined;
2622
+ } | {
2623
+ nx?: undefined;
2624
+ xx: true;
2625
+ } | undefined) => Promise<"OK" | null>;
2626
+ /**
2627
+ * @see https://redis.io/commands/json.strappend
2628
+ */
2629
+ strappend: (key: string, path: string, value: string) => Promise<(number | null)[]>;
2630
+ /**
2631
+ * @see https://redis.io/commands/json.strlen
2632
+ */
2633
+ strlen: (key: string, path?: string | undefined) => Promise<(number | null)[]>;
2634
+ /**
2635
+ * @see https://redis.io/commands/json.toggle
2636
+ */
2637
+ toggle: (key: string, path: string) => Promise<number[]>;
2638
+ /**
2639
+ * @see https://redis.io/commands/json.type
2640
+ */
2641
+ type: (key: string, path?: string | undefined) => Promise<string[]>;
2642
+ };
2643
+ /**
2644
+ * Wrap a new middleware around the HTTP client.
2645
+ */
2646
+ use: <TResult = unknown>(middleware: (r: UpstashRequest, next: <TResult_1 = unknown>(req: UpstashRequest) => Promise<UpstashResponse<TResult_1>>) => Promise<UpstashResponse<TResult>>) => void;
2647
+ /**
2648
+ * Technically this is not private, we can hide it from intellisense by doing this
2649
+ */
2650
+ protected addTelemetry: (telemetry: Telemetry) => void;
2651
+ createScript(script: string): Script;
2652
+ /**
2653
+ * Create a new pipeline that allows you to send requests in bulk.
2654
+ *
2655
+ * @see {@link Pipeline}
2656
+ */
2657
+ pipeline: () => Pipeline<[]>;
2658
+ protected autoPipeline: () => Redis;
2659
+ /**
2660
+ * Create a new transaction to allow executing multiple steps atomically.
2661
+ *
2662
+ * All the commands in a transaction are serialized and executed sequentially. A request sent by
2663
+ * another client will never be served in the middle of the execution of a Redis Transaction. This
2664
+ * guarantees that the commands are executed as a single isolated operation.
2665
+ *
2666
+ * @see {@link Pipeline}
2667
+ */
2668
+ multi: () => Pipeline<[]>;
2669
+ /**
2670
+ * @see https://redis.io/commands/append
2671
+ */
2672
+ append: (key: string, value: string) => Promise<number>;
2673
+ /**
2674
+ * @see https://redis.io/commands/bitcount
2675
+ */
2676
+ bitcount: (key: string, start: number, end: number) => Promise<number>;
2677
+ /**
2678
+ * @see https://redis.io/commands/bitop
2679
+ */
2680
+ bitop: {
2681
+ (op: "and" | "or" | "xor", destinationKey: string, sourceKey: string, ...sourceKeys: string[]): Promise<number>;
2682
+ (op: "not", destinationKey: string, sourceKey: string): Promise<number>;
2683
+ };
2684
+ /**
2685
+ * @see https://redis.io/commands/bitpos
2686
+ */
2687
+ bitpos: (key: string, bit: 0 | 1, start?: number | undefined, end?: number | undefined) => Promise<number>;
2688
+ /**
2689
+ * @see https://redis.io/commands/copy
2690
+ */
2691
+ copy: (key: string, destinationKey: string, opts?: {
2692
+ replace: boolean;
2693
+ } | undefined) => Promise<"COPIED" | "NOT_COPIED">;
2694
+ /**
2695
+ * @see https://redis.io/commands/dbsize
2696
+ */
2697
+ dbsize: () => Promise<number>;
2698
+ /**
2699
+ * @see https://redis.io/commands/decr
2700
+ */
2701
+ decr: (key: string) => Promise<number>;
2702
+ /**
2703
+ * @see https://redis.io/commands/decrby
2704
+ */
2705
+ decrby: (key: string, decrement: number) => Promise<number>;
2706
+ /**
2707
+ * @see https://redis.io/commands/del
2708
+ */
2709
+ del: (...args: CommandArgs<typeof DelCommand>) => Promise<number>;
2710
+ /**
2711
+ * @see https://redis.io/commands/echo
2712
+ */
2713
+ echo: (message: string) => Promise<string>;
2714
+ /**
2715
+ * @see https://redis.io/commands/eval
2716
+ */
2717
+ eval: <TArgs extends unknown[], TData = unknown>(script: string, keys: string[], args: TArgs) => Promise<TData>;
2718
+ /**
2719
+ * @see https://redis.io/commands/evalsha
2720
+ */
2721
+ evalsha: <TArgs extends unknown[], TData = unknown>(sha1: string, keys: string[], args: TArgs) => Promise<TData>;
2722
+ /**
2723
+ * @see https://redis.io/commands/exists
2724
+ */
2725
+ exists: (...args: CommandArgs<typeof ExistsCommand>) => Promise<number>;
2726
+ /**
2727
+ * @see https://redis.io/commands/expire
2728
+ */
2729
+ expire: (key: string, seconds: number, option?: ("NX" | "nx" | "XX" | "xx" | "GT" | "gt" | "LT" | "lt") | undefined) => Promise<0 | 1>;
2730
+ /**
2731
+ * @see https://redis.io/commands/expireat
2732
+ */
2733
+ expireat: (key: string, unix: number) => Promise<0 | 1>;
2734
+ /**
2735
+ * @see https://redis.io/commands/flushall
2736
+ */
2737
+ flushall: (args?: CommandArgs<typeof FlushAllCommand>) => Promise<"OK">;
2738
+ /**
2739
+ * @see https://redis.io/commands/flushdb
2740
+ */
2741
+ flushdb: (opts?: {
2742
+ async?: boolean | undefined;
2743
+ } | undefined) => Promise<"OK">;
2744
+ /**
2745
+ * @see https://redis.io/commands/geoadd
2746
+ */
2747
+ geoadd: <TData>(args_0: string, args_1: GeoAddCommandOptions | GeoMember<TData>, ...args_2: GeoMember<TData>[]) => Promise<number | null>;
2748
+ /**
2749
+ * @see https://redis.io/commands/geopos
2750
+ */
2751
+ geopos: <TData>(args_0: string, ...args_1: TData[]) => Promise<{
2752
+ lng: number;
2753
+ lat: number;
2754
+ }[]>;
2755
+ /**
2756
+ * @see https://redis.io/commands/geodist
2757
+ */
2758
+ geodist: <TData>(key: string, member1: TData, member2: TData, unit?: "M" | "KM" | "FT" | "MI" | undefined) => Promise<number | null>;
2759
+ /**
2760
+ * @see https://redis.io/commands/geohash
2761
+ */
2762
+ geohash: <TData>(args_0: string, ...args_1: TData[]) => Promise<(string | null)[]>;
2763
+ /**
2764
+ * @see https://redis.io/commands/geosearch
2765
+ */
2766
+ geosearch: <TData>(key: string, centerPoint: {
2767
+ type: "FROMLONLAT" | "fromlonlat";
2768
+ coordinate: {
2769
+ lon: number;
2770
+ lat: number;
2771
+ };
2772
+ } | {
2773
+ type: "FROMMEMBER" | "frommember";
2774
+ member: TData;
2775
+ }, shape: {
2776
+ type: "BYRADIUS" | "byradius";
2777
+ radius: number;
2778
+ radiusType: "M" | "KM" | "FT" | "MI";
2779
+ } | {
2780
+ type: "BYBOX" | "bybox";
2781
+ rect: {
2782
+ width: number;
2783
+ height: number;
2784
+ };
2785
+ rectType: "M" | "KM" | "FT" | "MI";
2786
+ }, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
2787
+ count?: {
2788
+ limit: number;
2789
+ any?: boolean | undefined;
2790
+ } | undefined;
2791
+ withCoord?: boolean | undefined;
2792
+ withDist?: boolean | undefined;
2793
+ withHash?: boolean | undefined;
2794
+ } | undefined) => Promise<({
2795
+ member: TData;
2796
+ } & {
2797
+ coord?: {
2798
+ long: number;
2799
+ lat: number;
2800
+ } | undefined;
2801
+ dist?: number | undefined;
2802
+ hash?: string | undefined;
2803
+ })[]>;
2804
+ /**
2805
+ * @see https://redis.io/commands/geosearchstore
2806
+ */
2807
+ geosearchstore: <TData>(destination: string, key: string, centerPoint: {
2808
+ type: "FROMLONLAT" | "fromlonlat";
2809
+ coordinate: {
2810
+ lon: number;
2811
+ lat: number;
2812
+ };
2813
+ } | {
2814
+ type: "FROMMEMBER" | "frommember";
2815
+ member: TData;
2816
+ }, shape: {
2817
+ type: "BYRADIUS" | "byradius";
2818
+ radius: number;
2819
+ radiusType: "M" | "KM" | "FT" | "MI";
2820
+ } | {
2821
+ type: "BYBOX" | "bybox";
2822
+ rect: {
2823
+ width: number;
2824
+ height: number;
2825
+ };
2826
+ rectType: "M" | "KM" | "FT" | "MI";
2827
+ }, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
2828
+ count?: {
2829
+ limit: number;
2830
+ any?: boolean | undefined;
2831
+ } | undefined;
2832
+ storeDist?: boolean | undefined;
2833
+ } | undefined) => Promise<number>;
2834
+ /**
2835
+ * @see https://redis.io/commands/get
2836
+ */
2837
+ get: <TData>(key: string) => Promise<TData | null>;
2838
+ /**
2839
+ * @see https://redis.io/commands/getbit
2840
+ */
2841
+ getbit: (key: string, offset: number) => Promise<0 | 1>;
2842
+ /**
2843
+ * @see https://redis.io/commands/getdel
2844
+ */
2845
+ getdel: <TData>(key: string) => Promise<TData | null>;
2846
+ /**
2847
+ * @see https://redis.io/commands/getrange
2848
+ */
2849
+ getrange: (key: string, start: number, end: number) => Promise<string>;
2850
+ /**
2851
+ * @see https://redis.io/commands/getset
2852
+ */
2853
+ getset: <TData>(key: string, value: TData) => Promise<TData | null>;
2854
+ /**
2855
+ * @see https://redis.io/commands/hdel
2856
+ */
2857
+ hdel: (key: string, ...fields: string[]) => Promise<0 | 1>;
2858
+ /**
2859
+ * @see https://redis.io/commands/hexists
2860
+ */
2861
+ hexists: (key: string, field: string) => Promise<number>;
2862
+ /**
2863
+ * @see https://redis.io/commands/hget
2864
+ */
2865
+ hget: <TData>(key: string, field: string) => Promise<TData | null>;
2866
+ /**
2867
+ * @see https://redis.io/commands/hgetall
2868
+ */
2869
+ hgetall: <TData extends Record<string, unknown>>(key: string) => Promise<TData | null>;
2870
+ /**
2871
+ * @see https://redis.io/commands/hincrby
2872
+ */
2873
+ hincrby: (key: string, field: string, increment: number) => Promise<number>;
2874
+ /**
2875
+ * @see https://redis.io/commands/hincrbyfloat
2876
+ */
2877
+ hincrbyfloat: (key: string, field: string, increment: number) => Promise<number>;
2878
+ /**
2879
+ * @see https://redis.io/commands/hkeys
2880
+ */
2881
+ hkeys: (key: string) => Promise<string[]>;
2882
+ /**
2883
+ * @see https://redis.io/commands/hlen
2884
+ */
2885
+ hlen: (key: string) => Promise<number>;
2886
+ /**
2887
+ * @see https://redis.io/commands/hmget
2888
+ */
2889
+ hmget: <TData extends Record<string, unknown>>(key: string, ...fields: string[]) => Promise<TData | null>;
2890
+ /**
2891
+ * @see https://redis.io/commands/hmset
2892
+ */
2893
+ hmset: <TData>(key: string, kv: {
2894
+ [field: string]: TData;
2895
+ }) => Promise<"OK">;
2896
+ /**
2897
+ * @see https://redis.io/commands/hrandfield
2898
+ */
2899
+ hrandfield: {
2900
+ (key: string): Promise<string | null>;
2901
+ (key: string, count: number): Promise<string[]>;
2902
+ <TData extends Record<string, unknown>>(key: string, count: number, withValues: boolean): Promise<Partial<TData>>;
2903
+ };
2904
+ /**
2905
+ * @see https://redis.io/commands/hscan
2906
+ */
2907
+ hscan: (key: string, cursor: string | number, cmdOpts?: ScanCommandOptions | undefined) => Promise<[string, (string | number)[]]>;
2908
+ /**
2909
+ * @see https://redis.io/commands/hset
2910
+ */
2911
+ hset: <TData>(key: string, kv: {
2912
+ [field: string]: TData;
2913
+ }) => Promise<number>;
2914
+ /**
2915
+ * @see https://redis.io/commands/hsetnx
2916
+ */
2917
+ hsetnx: <TData>(key: string, field: string, value: TData) => Promise<0 | 1>;
2918
+ /**
2919
+ * @see https://redis.io/commands/hstrlen
2920
+ */
2921
+ hstrlen: (key: string, field: string) => Promise<number>;
2922
+ /**
2923
+ * @see https://redis.io/commands/hvals
2924
+ */
2925
+ hvals: (key: string) => Promise<any>;
2926
+ /**
2927
+ * @see https://redis.io/commands/incr
2928
+ */
2929
+ incr: (key: string) => Promise<number>;
2930
+ /**
2931
+ * @see https://redis.io/commands/incrby
2932
+ */
2933
+ incrby: (key: string, value: number) => Promise<number>;
2934
+ /**
2935
+ * @see https://redis.io/commands/incrbyfloat
2936
+ */
2937
+ incrbyfloat: (key: string, value: number) => Promise<number>;
2938
+ /**
2939
+ * @see https://redis.io/commands/keys
2940
+ */
2941
+ keys: (pattern: string) => Promise<string[]>;
2942
+ /**
2943
+ * @see https://redis.io/commands/lindex
2944
+ */
2945
+ lindex: (key: string, index: number) => Promise<any>;
2946
+ /**
2947
+ * @see https://redis.io/commands/linsert
2948
+ */
2949
+ linsert: <TData>(key: string, direction: "before" | "after", pivot: TData, value: TData) => Promise<number>;
2950
+ /**
2951
+ * @see https://redis.io/commands/llen
2952
+ */
2953
+ llen: (key: string) => Promise<number>;
2954
+ /**
2955
+ * @see https://redis.io/commands/lmove
2956
+ */
2957
+ lmove: <TData = string>(source: string, destination: string, whereFrom: "left" | "right", whereTo: "left" | "right") => Promise<TData>;
2958
+ /**
2959
+ * @see https://redis.io/commands/lpop
2960
+ */
2961
+ lpop: <TData>(key: string, count?: number | undefined) => Promise<TData | null>;
2962
+ /**
2963
+ * @see https://redis.io/commands/lmpop
2964
+ */
2965
+ lmpop: <TData>(numkeys: number, keys: string[], args_2: "LEFT" | "RIGHT", count?: number | undefined) => Promise<[string, TData[]] | null>;
2966
+ /**
2967
+ * @see https://redis.io/commands/lpos
2968
+ */
2969
+ lpos: <TData = number>(key: string, element: unknown, opts?: {
2970
+ rank?: number | undefined;
2971
+ count?: number | undefined;
2972
+ maxLen?: number | undefined;
2973
+ } | undefined) => Promise<TData>;
2974
+ /**
2975
+ * @see https://redis.io/commands/lpush
2976
+ */
2977
+ lpush: <TData>(key: string, ...elements: TData[]) => Promise<number>;
2978
+ /**
2979
+ * @see https://redis.io/commands/lpushx
2980
+ */
2981
+ lpushx: <TData>(key: string, ...elements: TData[]) => Promise<number>;
2982
+ /**
2983
+ * @see https://redis.io/commands/lrange
2984
+ */
2985
+ lrange: <TResult = string>(key: string, start: number, end: number) => Promise<TResult[]>;
2986
+ /**
2987
+ * @see https://redis.io/commands/lrem
2988
+ */
2989
+ lrem: <TData>(key: string, count: number, value: TData) => Promise<number>;
2990
+ /**
2991
+ * @see https://redis.io/commands/lset
2992
+ */
2993
+ lset: <TData>(key: string, index: number, value: TData) => Promise<"OK">;
2994
+ /**
2995
+ * @see https://redis.io/commands/ltrim
2996
+ */
2997
+ ltrim: (key: string, start: number, end: number) => Promise<"OK">;
2998
+ /**
2999
+ * @see https://redis.io/commands/mget
3000
+ */
3001
+ mget: <TData extends unknown[]>(...args: CommandArgs<typeof MGetCommand>) => Promise<TData>;
3002
+ /**
3003
+ * @see https://redis.io/commands/mset
3004
+ */
3005
+ mset: <TData>(kv: {
3006
+ [key: string]: TData;
3007
+ }) => Promise<"OK">;
3008
+ /**
3009
+ * @see https://redis.io/commands/msetnx
3010
+ */
3011
+ msetnx: <TData>(kv: {
3012
+ [key: string]: TData;
3013
+ }) => Promise<number>;
3014
+ /**
3015
+ * @see https://redis.io/commands/persist
3016
+ */
3017
+ persist: (key: string) => Promise<0 | 1>;
3018
+ /**
3019
+ * @see https://redis.io/commands/pexpire
3020
+ */
3021
+ pexpire: (key: string, milliseconds: number) => Promise<0 | 1>;
3022
+ /**
3023
+ * @see https://redis.io/commands/pexpireat
3024
+ */
3025
+ pexpireat: (key: string, unix: number) => Promise<0 | 1>;
3026
+ /**
3027
+ * @see https://redis.io/commands/pfadd
3028
+ */
3029
+ pfadd: (args_0: string, ...args_1: unknown[]) => Promise<number>;
3030
+ /**
3031
+ * @see https://redis.io/commands/pfcount
3032
+ */
3033
+ pfcount: (args_0: string, ...args_1: string[]) => Promise<number>;
3034
+ /**
3035
+ * @see https://redis.io/commands/pfmerge
3036
+ */
3037
+ pfmerge: (destination_key: string, ...args_1: string[]) => Promise<"OK">;
3038
+ /**
3039
+ * @see https://redis.io/commands/ping
3040
+ */
3041
+ ping: (args?: CommandArgs<typeof PingCommand>) => Promise<string>;
3042
+ /**
3043
+ * @see https://redis.io/commands/psetex
3044
+ */
3045
+ psetex: <TData>(key: string, ttl: number, value: TData) => Promise<string>;
3046
+ /**
3047
+ * @see https://redis.io/commands/pttl
3048
+ */
3049
+ pttl: (key: string) => Promise<number>;
3050
+ /**
3051
+ * @see https://redis.io/commands/publish
3052
+ */
3053
+ publish: (channel: string, message: unknown) => Promise<number>;
3054
+ /**
3055
+ * @see https://redis.io/commands/randomkey
3056
+ */
3057
+ randomkey: () => Promise<string | null>;
3058
+ /**
3059
+ * @see https://redis.io/commands/rename
3060
+ */
3061
+ rename: (source: string, destination: string) => Promise<"OK">;
3062
+ /**
3063
+ * @see https://redis.io/commands/renamenx
3064
+ */
3065
+ renamenx: (source: string, destination: string) => Promise<0 | 1>;
3066
+ /**
3067
+ * @see https://redis.io/commands/rpop
3068
+ */
3069
+ rpop: <TData = string>(key: string, count?: number | undefined) => Promise<TData | null>;
3070
+ /**
3071
+ * @see https://redis.io/commands/rpush
3072
+ */
3073
+ rpush: <TData>(key: string, ...elements: TData[]) => Promise<number>;
3074
+ /**
3075
+ * @see https://redis.io/commands/rpushx
3076
+ */
3077
+ rpushx: <TData>(key: string, ...elements: TData[]) => Promise<number>;
3078
+ /**
3079
+ * @see https://redis.io/commands/sadd
3080
+ */
3081
+ sadd: <TData>(key: string, ...members: TData[]) => Promise<number>;
3082
+ /**
3083
+ * @see https://redis.io/commands/scan
3084
+ */
3085
+ scan: (cursor: string | number, opts?: ScanCommandOptions | undefined) => Promise<[string, string[]]>;
3086
+ /**
3087
+ * @see https://redis.io/commands/scard
3088
+ */
3089
+ scard: (key: string) => Promise<number>;
3090
+ /**
3091
+ * @see https://redis.io/commands/script-exists
3092
+ */
3093
+ scriptExists: (...args: CommandArgs<typeof ScriptExistsCommand>) => Promise<number[]>;
3094
+ /**
3095
+ * @see https://redis.io/commands/script-flush
3096
+ */
3097
+ scriptFlush: (opts?: ScriptFlushCommandOptions | undefined) => Promise<"OK">;
3098
+ /**
3099
+ * @see https://redis.io/commands/script-load
3100
+ */
3101
+ scriptLoad: (script: string) => Promise<string>;
3102
+ /**
3103
+ * @see https://redis.io/commands/sdiff
3104
+ */
3105
+ sdiff: (key: string, ...keys: string[]) => Promise<unknown[]>;
3106
+ /**
3107
+ * @see https://redis.io/commands/sdiffstore
3108
+ */
3109
+ sdiffstore: (destination: string, ...keys: string[]) => Promise<number>;
3110
+ /**
3111
+ * @see https://redis.io/commands/set
3112
+ */
3113
+ set: <TData>(key: string, value: TData, opts?: SetCommandOptions) => Promise<"OK" | TData | null>;
3114
+ /**
3115
+ * @see https://redis.io/commands/setbit
3116
+ */
3117
+ setbit: (key: string, offset: number, value: 0 | 1) => Promise<0 | 1>;
3118
+ /**
3119
+ * @see https://redis.io/commands/setex
3120
+ */
3121
+ setex: <TData>(key: string, ttl: number, value: TData) => Promise<"OK">;
3122
+ /**
3123
+ * @see https://redis.io/commands/setnx
3124
+ */
3125
+ setnx: <TData>(key: string, value: TData) => Promise<number>;
3126
+ /**
3127
+ * @see https://redis.io/commands/setrange
3128
+ */
3129
+ setrange: (key: string, offset: number, value: string) => Promise<number>;
3130
+ /**
3131
+ * @see https://redis.io/commands/sinter
3132
+ */
3133
+ sinter: (key: string, ...keys: string[]) => Promise<string[]>;
3134
+ /**
3135
+ * @see https://redis.io/commands/sinterstore
3136
+ */
3137
+ sinterstore: (destination: string, key: string, ...keys: string[]) => Promise<number>;
3138
+ /**
3139
+ * @see https://redis.io/commands/sismember
3140
+ */
3141
+ sismember: <TData>(key: string, member: TData) => Promise<0 | 1>;
3142
+ /**
3143
+ * @see https://redis.io/commands/smismember
3144
+ */
3145
+ smismember: <TMembers extends unknown[]>(key: string, members: TMembers) => Promise<(0 | 1)[]>;
3146
+ /**
3147
+ * @see https://redis.io/commands/smembers
3148
+ */
3149
+ smembers: <TData extends unknown[] = string[]>(key: string) => Promise<TData>;
3150
+ /**
3151
+ * @see https://redis.io/commands/smove
3152
+ */
3153
+ smove: <TData>(source: string, destination: string, member: TData) => Promise<0 | 1>;
3154
+ /**
3155
+ * @see https://redis.io/commands/spop
3156
+ */
3157
+ spop: <TData>(key: string, count?: number | undefined) => Promise<TData | null>;
3158
+ /**
3159
+ * @see https://redis.io/commands/srandmember
3160
+ */
3161
+ srandmember: <TData>(key: string, count?: number | undefined) => Promise<TData | null>;
3162
+ /**
3163
+ * @see https://redis.io/commands/srem
3164
+ */
3165
+ srem: <TData>(key: string, ...members: TData[]) => Promise<number>;
3166
+ /**
3167
+ * @see https://redis.io/commands/sscan
3168
+ */
3169
+ sscan: (key: string, cursor: string | number, opts?: ScanCommandOptions | undefined) => Promise<[string, (string | number)[]]>;
3170
+ /**
3171
+ * @see https://redis.io/commands/strlen
3172
+ */
3173
+ strlen: (key: string) => Promise<number>;
3174
+ /**
3175
+ * @see https://redis.io/commands/sunion
3176
+ */
3177
+ sunion: (key: string, ...keys: string[]) => Promise<unknown[]>;
3178
+ /**
3179
+ * @see https://redis.io/commands/sunionstore
3180
+ */
3181
+ sunionstore: (destination: string, key: string, ...keys: string[]) => Promise<number>;
3182
+ /**
3183
+ * @see https://redis.io/commands/time
3184
+ */
3185
+ time: () => Promise<[number, number]>;
3186
+ /**
3187
+ * @see https://redis.io/commands/touch
3188
+ */
3189
+ touch: (...args: CommandArgs<typeof TouchCommand>) => Promise<number>;
3190
+ /**
3191
+ * @see https://redis.io/commands/ttl
3192
+ */
3193
+ ttl: (key: string) => Promise<number>;
3194
+ /**
3195
+ * @see https://redis.io/commands/type
3196
+ */
3197
+ type: (key: string) => Promise<Type>;
3198
+ /**
3199
+ * @see https://redis.io/commands/unlink
3200
+ */
3201
+ unlink: (...args: CommandArgs<typeof UnlinkCommand>) => Promise<number>;
3202
+ /**
3203
+ * @see https://redis.io/commands/xadd
3204
+ */
3205
+ xadd: (key: string, id: string, entries: {
3206
+ [field: string]: unknown;
3207
+ }, opts?: {
3208
+ nomkStream?: boolean | undefined;
3209
+ trim?: (({
3210
+ type: "MAXLEN" | "maxlen";
3211
+ threshold: number;
3212
+ } | {
3213
+ type: "MINID" | "minid";
3214
+ threshold: string;
3215
+ }) & ({
3216
+ comparison: "~";
3217
+ limit?: number | undefined;
3218
+ } | {
3219
+ comparison: "=";
3220
+ limit?: undefined;
3221
+ })) | undefined;
3222
+ } | undefined) => Promise<string>;
3223
+ /**
3224
+ * @see https://redis.io/commands/xack
3225
+ */
3226
+ xack: (key: string, group: string, id: string | string[]) => Promise<number>;
3227
+ /**
3228
+ * @see https://redis.io/commands/xdel
3229
+ */
3230
+ xdel: (key: string, ids: string | string[]) => Promise<number>;
3231
+ /**
3232
+ * @see https://redis.io/commands/xgroup
3233
+ */
3234
+ xgroup: (key: string, opts: {
3235
+ type: "CREATE";
3236
+ group: string;
3237
+ id: string;
3238
+ options?: {
3239
+ MKSTREAM?: boolean | undefined;
3240
+ ENTRIESREAD?: number | undefined;
3241
+ } | undefined;
3242
+ } | {
3243
+ type: "CREATECONSUMER";
3244
+ group: string;
3245
+ consumer: string;
3246
+ } | {
3247
+ type: "DELCONSUMER";
3248
+ group: string;
3249
+ consumer: string;
3250
+ } | {
3251
+ type: "DESTROY";
3252
+ group: string;
3253
+ } | {
3254
+ type: "SETID";
3255
+ group: string;
3256
+ id: string;
3257
+ options?: {
3258
+ ENTRIESREAD?: number | undefined;
3259
+ } | undefined;
3260
+ }) => Promise<never>;
3261
+ /**
3262
+ * @see https://redis.io/commands/xread
3263
+ */
3264
+ xread: (...args: CommandArgs<typeof XReadCommand>) => Promise<unknown[]>;
3265
+ /**
3266
+ * @see https://redis.io/commands/xreadgroup
3267
+ */
3268
+ xreadgroup: (...args: CommandArgs<typeof XReadGroupCommand>) => Promise<unknown[]>;
3269
+ /**
3270
+ * @see https://redis.io/commands/xinfo
3271
+ */
3272
+ xinfo: (key: string, options: {
3273
+ type: "CONSUMERS";
3274
+ group: string;
3275
+ } | {
3276
+ type: "GROUPS";
3277
+ }) => Promise<unknown[]>;
3278
+ /**
3279
+ * @see https://redis.io/commands/xlen
3280
+ */
3281
+ xlen: (key: string) => Promise<number>;
3282
+ /**
3283
+ * @see https://redis.io/commands/xpending
3284
+ */
3285
+ xpending: (key: string, group: string, start: string, end: string, count: number, options?: {
3286
+ idleTime?: number | undefined;
3287
+ consumer?: string | string[] | undefined;
3288
+ } | undefined) => Promise<unknown[]>;
3289
+ /**
3290
+ * @see https://redis.io/commands/xclaim
3291
+ */
3292
+ xclaim: (key: string, group: string, consumer: string, minIdleTime: number, id: string | string[], options?: {
3293
+ idleMS?: number | undefined;
3294
+ timeMS?: number | undefined;
3295
+ retryCount?: number | undefined;
3296
+ force?: boolean | undefined;
3297
+ justId?: boolean | undefined;
3298
+ lastId?: number | undefined;
3299
+ } | undefined) => Promise<unknown[]>;
3300
+ /**
3301
+ * @see https://redis.io/commands/xautoclaim
3302
+ */
3303
+ xautoclaim: (key: string, group: string, consumer: string, minIdleTime: number, start: string, options?: {
3304
+ count?: number | undefined;
3305
+ justId?: boolean | undefined;
3306
+ } | undefined) => Promise<unknown[]>;
3307
+ /**
3308
+ * @see https://redis.io/commands/xtrim
3309
+ */
3310
+ xtrim: (key: string, options: {
3311
+ strategy: "MAXLEN" | "MINID";
3312
+ exactness?: "~" | "=" | undefined;
3313
+ threshold: string | number;
3314
+ limit?: number | undefined;
3315
+ }) => Promise<number>;
3316
+ /**
3317
+ * @see https://redis.io/commands/xrange
3318
+ */
3319
+ xrange: (key: string, start: string, end: string, count?: number | undefined) => Promise<Record<string, Record<string, unknown>>>;
3320
+ /**
3321
+ * @see https://redis.io/commands/xrevrange
3322
+ */
3323
+ xrevrange: (key: string, end: string, start: string, count?: number | undefined) => Promise<Record<string, Record<string, unknown>>>;
3324
+ /**
3325
+ * @see https://redis.io/commands/zadd
3326
+ */
3327
+ zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [
3328
+ key: string,
3329
+ opts: ZAddCommandOptions,
3330
+ ...scoreMemberPairs: [ScoreMember<TData>, ...ScoreMember<TData>[]]
3331
+ ]) => Promise<number | null>;
3332
+ /**
3333
+ * @see https://redis.io/commands/zcard
3334
+ */
3335
+ zcard: (key: string) => Promise<number>;
3336
+ /**
3337
+ * @see https://redis.io/commands/zcount
3338
+ */
3339
+ zcount: (key: string, min: string | number, max: string | number) => Promise<number>;
3340
+ /**
3341
+ * @see https://redis.io/commands/zdiffstore
3342
+ */
3343
+ zdiffstore: (destination: string, numkeys: number, ...keys: string[]) => Promise<number>;
3344
+ /**
3345
+ * @see https://redis.io/commands/zincrby
3346
+ */
3347
+ zincrby: <TData>(key: string, increment: number, member: TData) => Promise<number>;
3348
+ /**
3349
+ * @see https://redis.io/commands/zinterstore
3350
+ */
3351
+ zinterstore: (destination: string, numKeys: number, keys: string[], opts?: ZInterStoreCommandOptions | undefined) => Promise<number>;
3352
+ /**
3353
+ * @see https://redis.io/commands/zlexcount
3354
+ */
3355
+ zlexcount: (key: string, min: string, max: string) => Promise<number>;
3356
+ /**
3357
+ * @see https://redis.io/commands/zmscore
3358
+ */
3359
+ zmscore: (key: string, members: unknown[]) => Promise<number[] | null>;
3360
+ /**
3361
+ * @see https://redis.io/commands/zpopmax
3362
+ */
3363
+ zpopmax: <TData>(key: string, count?: number | undefined) => Promise<TData[]>;
3364
+ /**
3365
+ * @see https://redis.io/commands/zpopmin
3366
+ */
3367
+ zpopmin: <TData>(key: string, count?: number | undefined) => Promise<TData[]>;
3368
+ /**
3369
+ * @see https://redis.io/commands/zrange
3370
+ */
3371
+ zrange: <TData extends unknown[]>(...args: [key: string, min: number, max: number, opts?: ZRangeCommandOptions] | [
3372
+ key: string,
3373
+ min: `(${string}` | `[${string}` | "-" | "+",
3374
+ max: `(${string}` | `[${string}` | "-" | "+",
3375
+ opts: {
3376
+ byLex: true;
3377
+ } & ZRangeCommandOptions
3378
+ ] | [
3379
+ key: string,
3380
+ min: number | `(${number}` | "-inf" | "+inf",
3381
+ max: number | `(${number}` | "-inf" | "+inf",
3382
+ opts: {
3383
+ byScore: true;
3384
+ } & ZRangeCommandOptions
3385
+ ]) => Promise<TData>;
3386
+ /**
3387
+ * @see https://redis.io/commands/zrank
3388
+ */
3389
+ zrank: <TData>(key: string, member: TData) => Promise<number | null>;
3390
+ /**
3391
+ * @see https://redis.io/commands/zrem
3392
+ */
3393
+ zrem: <TData>(key: string, ...members: TData[]) => Promise<number>;
3394
+ /**
3395
+ * @see https://redis.io/commands/zremrangebylex
3396
+ */
3397
+ zremrangebylex: (key: string, min: string, max: string) => Promise<number>;
3398
+ /**
3399
+ * @see https://redis.io/commands/zremrangebyrank
3400
+ */
3401
+ zremrangebyrank: (key: string, start: number, stop: number) => Promise<number>;
3402
+ /**
3403
+ * @see https://redis.io/commands/zremrangebyscore
3404
+ */
3405
+ zremrangebyscore: (key: string, min: number, max: number) => Promise<number>;
3406
+ /**
3407
+ * @see https://redis.io/commands/zrevrank
3408
+ */
3409
+ zrevrank: <TData>(key: string, member: TData) => Promise<number | null>;
3410
+ /**
3411
+ * @see https://redis.io/commands/zscan
3412
+ */
3413
+ zscan: (key: string, cursor: string | number, opts?: ScanCommandOptions | undefined) => Promise<[string, (string | number)[]]>;
3414
+ /**
3415
+ * @see https://redis.io/commands/zscore
3416
+ */
3417
+ zscore: <TData>(key: string, member: TData) => Promise<number | null>;
3418
+ /**
3419
+ * @see https://redis.io/commands/zunion
3420
+ */
3421
+ zunion: (numKeys: number, keys: string[], opts?: ZUnionCommandOptions | undefined) => Promise<any>;
3422
+ /**
3423
+ * @see https://redis.io/commands/zunionstore
3424
+ */
3425
+ zunionstore: (destination: string, numKeys: number, keys: string[], opts?: ZUnionStoreCommandOptions | undefined) => Promise<number>;
3426
+ }
3427
+
3428
+ /**
3429
+ * Result of a bad request to upstash
3430
+ */
3431
+ declare class UpstashError extends Error {
3432
+ constructor(message: string);
3433
+ }
3434
+ declare class UrlError extends Error {
3435
+ constructor(url: string);
3436
+ }
3437
+
3438
+ type error_UpstashError = UpstashError;
3439
+ declare const error_UpstashError: typeof UpstashError;
3440
+ type error_UrlError = UrlError;
3441
+ declare const error_UrlError: typeof UrlError;
3442
+ declare namespace error {
3443
+ export {
3444
+ error_UpstashError as UpstashError,
3445
+ error_UrlError as UrlError,
3446
+ };
3447
+ }
3448
+
3449
+ /**
3450
+ * @see https://redis.io/commands/zdiffstore
3451
+ */
3452
+ declare class ZDiffStoreCommand extends Command<number, number> {
3453
+ constructor(cmd: [destination: string, numkeys: number, ...keys: string[]], opts?: CommandOptions<number, number>);
3454
+ }
3455
+
3456
+ /**
3457
+ * @see https://redis.io/commands/zmscore
3458
+ */
3459
+ declare class ZMScoreCommand<TData> extends Command<string[] | null, number[] | null> {
3460
+ constructor(cmd: [key: string, members: TData[]], opts?: CommandOptions<string[] | null, number[] | null>);
3461
+ }
3462
+
3463
+ export { HValsCommand as $, AppendCommand as A, BitCountCommand as B, CopyCommand as C, DBSizeCommand as D, EchoCommand as E, FlushAllCommand as F, GeoAddCommand as G, GetRangeCommand as H, GetSetCommand as I, HDelCommand as J, HExistsCommand as K, HGetCommand as L, HGetAllCommand as M, HIncrByCommand as N, HIncrByFloatCommand as O, Pipeline as P, HKeysCommand as Q, RedisOptions as R, HLenCommand as S, HMGetCommand as T, UpstashRequest as U, HMSetCommand as V, HRandFieldCommand as W, HScanCommand as X, HSetCommand as Y, HSetNXCommand as Z, HStrLenCommand as _, RequesterConfig as a, SetBitCommand as a$, IncrCommand as a0, IncrByCommand as a1, IncrByFloatCommand as a2, JsonArrAppendCommand as a3, JsonArrIndexCommand as a4, JsonArrInsertCommand as a5, JsonArrLenCommand as a6, JsonArrPopCommand as a7, JsonArrTrimCommand as a8, JsonClearCommand as a9, MGetCommand as aA, MSetCommand as aB, MSetNXCommand as aC, PersistCommand as aD, PExpireCommand as aE, PExpireAtCommand as aF, PingCommand as aG, PSetEXCommand as aH, PTtlCommand as aI, PublishCommand as aJ, RandomKeyCommand as aK, RenameCommand as aL, RenameNXCommand as aM, RPopCommand as aN, RPushCommand as aO, RPushXCommand as aP, SAddCommand as aQ, ScanCommand as aR, ScanCommandOptions as aS, SCardCommand as aT, ScriptExistsCommand as aU, ScriptFlushCommand as aV, ScriptLoadCommand as aW, SDiffCommand as aX, SDiffStoreCommand as aY, SetCommand as aZ, SetCommandOptions as a_, JsonDelCommand as aa, JsonForgetCommand as ab, JsonGetCommand as ac, JsonMGetCommand as ad, JsonNumIncrByCommand as ae, JsonNumMultByCommand as af, JsonObjKeysCommand as ag, JsonObjLenCommand as ah, JsonRespCommand as ai, JsonSetCommand as aj, JsonStrAppendCommand as ak, JsonStrLenCommand as al, JsonToggleCommand as am, JsonTypeCommand as an, KeysCommand as ao, LIndexCommand as ap, LInsertCommand as aq, LLenCommand as ar, LMoveCommand as as, LPopCommand as at, LPushCommand as au, LPushXCommand as av, LRangeCommand as aw, LRemCommand as ax, LSetCommand as ay, LTrimCommand as az, Redis as b, SetExCommand as b0, SetNxCommand as b1, SetRangeCommand as b2, SInterCommand as b3, SInterStoreCommand as b4, SIsMemberCommand as b5, SMembersCommand as b6, SMIsMemberCommand as b7, SMoveCommand as b8, SPopCommand as b9, ZPopMinCommand as bA, ZRangeCommand as bB, ZRangeCommandOptions as bC, ZRankCommand as bD, ZRemCommand as bE, ZRemRangeByLexCommand as bF, ZRemRangeByRankCommand as bG, ZRemRangeByScoreCommand as bH, ZRevRankCommand as bI, ZScanCommand as bJ, ZScoreCommand as bK, ZUnionCommand as bL, ZUnionCommandOptions as bM, ZUnionStoreCommand as bN, ZUnionStoreCommandOptions as bO, SRandMemberCommand as ba, SRemCommand as bb, SScanCommand as bc, StrLenCommand as bd, SUnionCommand as be, SUnionStoreCommand as bf, TimeCommand as bg, TouchCommand as bh, TtlCommand as bi, Type as bj, TypeCommand as bk, UnlinkCommand as bl, XAddCommand as bm, XRangeCommand as bn, ScoreMember as bo, ZAddCommandOptions as bp, ZAddCommand as bq, ZCardCommand as br, ZCountCommand as bs, ZDiffStoreCommand as bt, ZIncrByCommand as bu, ZInterStoreCommand as bv, ZInterStoreCommandOptions as bw, ZLexCountCommand as bx, ZMScoreCommand as by, ZPopMaxCommand as bz, Requester as c, UpstashResponse as d, error as e, BitOpCommand as f, BitPosCommand as g, DecrCommand as h, DecrByCommand as i, DelCommand as j, EvalCommand as k, EvalshaCommand as l, ExistsCommand as m, ExpireCommand as n, ExpireAtCommand as o, FlushDBCommand as p, GeoAddCommandOptions as q, GeoMember as r, GeoDistCommand as s, GeoHashCommand as t, GeoPosCommand as u, GeoSearchCommand as v, GeoSearchStoreCommand as w, GetCommand as x, GetBitCommand as y, GetDelCommand as z };