@upstash/redis 0.0.0-ci.c6073771-20221015 → 0.0.0-ci.c6ee554dfd070cbc4a6b48f35dc4b300be4a3065-20231219194648

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