@upstash/redis 1.24.0-next.2 → 1.24.0

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 (506) hide show
  1. package/README.md +11 -4
  2. package/cloudflare.d.mts +45 -0
  3. package/{types/platforms/cloudflare.d.ts → cloudflare.d.ts} +9 -7
  4. package/cloudflare.js +1 -0
  5. package/cloudflare.mjs +1 -0
  6. package/fastly.d.mts +43 -0
  7. package/{types/platforms/fastly.d.ts → fastly.d.ts} +8 -6
  8. package/fastly.js +1 -0
  9. package/fastly.mjs +1 -0
  10. package/{types/platforms/node_with_fetch.d.ts → nodejs.d.mts} +24 -7
  11. package/{types/platforms/nodejs.d.ts → nodejs.d.ts} +8 -6
  12. package/nodejs.js +1 -0
  13. package/nodejs.mjs +1 -0
  14. package/package.json +23 -65
  15. package/redis-b1b1b1df.d.ts +1959 -0
  16. package/.releaserc +0 -14
  17. package/esm/deps/deno.land/x/base64@v0.2.1/base.js +0 -100
  18. package/esm/deps/deno.land/x/base64@v0.2.1/base64url.js +0 -9
  19. package/esm/deps/deno.land/x/sha1@v1.0.3/deps.js +0 -1
  20. package/esm/deps/deno.land/x/sha1@v1.0.3/mod.js +0 -191
  21. package/esm/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.js +0 -50
  22. package/esm/package.json +0 -3
  23. package/esm/pkg/commands/append.js +0 -9
  24. package/esm/pkg/commands/bitcount.js +0 -16
  25. package/esm/pkg/commands/bitop.js +0 -9
  26. package/esm/pkg/commands/bitpos.js +0 -9
  27. package/esm/pkg/commands/command.js +0 -66
  28. package/esm/pkg/commands/dbsize.js +0 -9
  29. package/esm/pkg/commands/decr.js +0 -9
  30. package/esm/pkg/commands/decrby.js +0 -9
  31. package/esm/pkg/commands/del.js +0 -9
  32. package/esm/pkg/commands/echo.js +0 -9
  33. package/esm/pkg/commands/eval.js +0 -9
  34. package/esm/pkg/commands/evalsha.js +0 -9
  35. package/esm/pkg/commands/exists.js +0 -9
  36. package/esm/pkg/commands/expire.js +0 -9
  37. package/esm/pkg/commands/expireat.js +0 -9
  38. package/esm/pkg/commands/flushall.js +0 -13
  39. package/esm/pkg/commands/flushdb.js +0 -13
  40. package/esm/pkg/commands/geo_add.js +0 -27
  41. package/esm/pkg/commands/get.js +0 -9
  42. package/esm/pkg/commands/getbit.js +0 -9
  43. package/esm/pkg/commands/getdel.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 -37
  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/hrandfield.js +0 -39
  57. package/esm/pkg/commands/hscan.js +0 -16
  58. package/esm/pkg/commands/hset.js +0 -13
  59. package/esm/pkg/commands/hsetnx.js +0 -9
  60. package/esm/pkg/commands/hstrlen.js +0 -9
  61. package/esm/pkg/commands/hvals.js +0 -9
  62. package/esm/pkg/commands/incr.js +0 -9
  63. package/esm/pkg/commands/incrby.js +0 -9
  64. package/esm/pkg/commands/incrbyfloat.js +0 -9
  65. package/esm/pkg/commands/json_arrappend.js +0 -9
  66. package/esm/pkg/commands/json_arrindex.js +0 -9
  67. package/esm/pkg/commands/json_arrinsert.js +0 -9
  68. package/esm/pkg/commands/json_arrlen.js +0 -9
  69. package/esm/pkg/commands/json_arrpop.js +0 -9
  70. package/esm/pkg/commands/json_arrtrim.js +0 -12
  71. package/esm/pkg/commands/json_clear.js +0 -9
  72. package/esm/pkg/commands/json_del.js +0 -9
  73. package/esm/pkg/commands/json_forget.js +0 -9
  74. package/esm/pkg/commands/json_get.js +0 -30
  75. package/esm/pkg/commands/json_mget.js +0 -9
  76. package/esm/pkg/commands/json_numincrby.js +0 -9
  77. package/esm/pkg/commands/json_nummultby.js +0 -9
  78. package/esm/pkg/commands/json_objkeys.js +0 -9
  79. package/esm/pkg/commands/json_objlen.js +0 -9
  80. package/esm/pkg/commands/json_resp.js +0 -9
  81. package/esm/pkg/commands/json_set.js +0 -18
  82. package/esm/pkg/commands/json_strappend.js +0 -9
  83. package/esm/pkg/commands/json_strlen.js +0 -9
  84. package/esm/pkg/commands/json_toggle.js +0 -9
  85. package/esm/pkg/commands/json_type.js +0 -9
  86. package/esm/pkg/commands/keys.js +0 -9
  87. package/esm/pkg/commands/lindex.js +0 -6
  88. package/esm/pkg/commands/linsert.js +0 -6
  89. package/esm/pkg/commands/llen.js +0 -9
  90. package/esm/pkg/commands/lmove.js +0 -9
  91. package/esm/pkg/commands/lpop.js +0 -9
  92. package/esm/pkg/commands/lpos.js +0 -19
  93. package/esm/pkg/commands/lpush.js +0 -9
  94. package/esm/pkg/commands/lpushx.js +0 -9
  95. package/esm/pkg/commands/lrange.js +0 -6
  96. package/esm/pkg/commands/lrem.js +0 -6
  97. package/esm/pkg/commands/lset.js +0 -6
  98. package/esm/pkg/commands/ltrim.js +0 -6
  99. package/esm/pkg/commands/mget.js +0 -9
  100. package/esm/pkg/commands/mod.js +0 -144
  101. package/esm/pkg/commands/mset.js +0 -12
  102. package/esm/pkg/commands/msetnx.js +0 -9
  103. package/esm/pkg/commands/persist.js +0 -9
  104. package/esm/pkg/commands/pexpire.js +0 -9
  105. package/esm/pkg/commands/pexpireat.js +0 -9
  106. package/esm/pkg/commands/ping.js +0 -13
  107. package/esm/pkg/commands/psetex.js +0 -9
  108. package/esm/pkg/commands/pttl.js +0 -9
  109. package/esm/pkg/commands/publish.js +0 -9
  110. package/esm/pkg/commands/randomkey.js +0 -9
  111. package/esm/pkg/commands/rename.js +0 -9
  112. package/esm/pkg/commands/renamenx.js +0 -9
  113. package/esm/pkg/commands/rpop.js +0 -9
  114. package/esm/pkg/commands/rpush.js +0 -9
  115. package/esm/pkg/commands/rpushx.js +0 -9
  116. package/esm/pkg/commands/sadd.js +0 -9
  117. package/esm/pkg/commands/scan.js +0 -19
  118. package/esm/pkg/commands/scard.js +0 -9
  119. package/esm/pkg/commands/script_exists.js +0 -12
  120. package/esm/pkg/commands/script_flush.js +0 -16
  121. package/esm/pkg/commands/script_load.js +0 -9
  122. package/esm/pkg/commands/sdiff.js +0 -9
  123. package/esm/pkg/commands/sdiffstore.js +0 -9
  124. package/esm/pkg/commands/set.js +0 -36
  125. package/esm/pkg/commands/setbit.js +0 -9
  126. package/esm/pkg/commands/setex.js +0 -9
  127. package/esm/pkg/commands/setnx.js +0 -9
  128. package/esm/pkg/commands/setrange.js +0 -9
  129. package/esm/pkg/commands/sinter.js +0 -9
  130. package/esm/pkg/commands/sinterstore.js +0 -9
  131. package/esm/pkg/commands/sismember.js +0 -9
  132. package/esm/pkg/commands/smembers.js +0 -9
  133. package/esm/pkg/commands/smismember.js +0 -9
  134. package/esm/pkg/commands/smove.js +0 -9
  135. package/esm/pkg/commands/spop.js +0 -13
  136. package/esm/pkg/commands/srandmember.js +0 -13
  137. package/esm/pkg/commands/srem.js +0 -9
  138. package/esm/pkg/commands/sscan.js +0 -16
  139. package/esm/pkg/commands/strlen.js +0 -9
  140. package/esm/pkg/commands/sunion.js +0 -9
  141. package/esm/pkg/commands/sunionstore.js +0 -9
  142. package/esm/pkg/commands/time.js +0 -9
  143. package/esm/pkg/commands/touch.js +0 -9
  144. package/esm/pkg/commands/ttl.js +0 -9
  145. package/esm/pkg/commands/type.js +0 -9
  146. package/esm/pkg/commands/unlink.js +0 -9
  147. package/esm/pkg/commands/xadd.js +0 -26
  148. package/esm/pkg/commands/xrange.js +0 -36
  149. package/esm/pkg/commands/zadd.js +0 -26
  150. package/esm/pkg/commands/zcard.js +0 -9
  151. package/esm/pkg/commands/zcount.js +0 -9
  152. package/esm/pkg/commands/zdiffstore.js +0 -9
  153. package/esm/pkg/commands/zincrby.js +0 -9
  154. package/esm/pkg/commands/zinterstore.js +0 -27
  155. package/esm/pkg/commands/zlexcount.js +0 -9
  156. package/esm/pkg/commands/zmscore.js +0 -10
  157. package/esm/pkg/commands/zpopmax.js +0 -13
  158. package/esm/pkg/commands/zpopmin.js +0 -13
  159. package/esm/pkg/commands/zrange.js +0 -26
  160. package/esm/pkg/commands/zrank.js +0 -9
  161. package/esm/pkg/commands/zrem.js +0 -9
  162. package/esm/pkg/commands/zremrangebylex.js +0 -9
  163. package/esm/pkg/commands/zremrangebyrank.js +0 -9
  164. package/esm/pkg/commands/zremrangebyscore.js +0 -9
  165. package/esm/pkg/commands/zrevrank.js +0 -9
  166. package/esm/pkg/commands/zscan.js +0 -16
  167. package/esm/pkg/commands/zscore.js +0 -9
  168. package/esm/pkg/commands/zunion.js +0 -30
  169. package/esm/pkg/commands/zunionstore.js +0 -27
  170. package/esm/pkg/error.js +0 -9
  171. package/esm/pkg/http.js +0 -174
  172. package/esm/pkg/pipeline.js +0 -1307
  173. package/esm/pkg/redis.js +0 -1318
  174. package/esm/pkg/script.js +0 -77
  175. package/esm/pkg/types.js +0 -1
  176. package/esm/pkg/util.js +0 -31
  177. package/esm/platforms/cloudflare.js +0 -70
  178. package/esm/platforms/fastly.js +0 -46
  179. package/esm/platforms/node_with_fetch.js +0 -85
  180. package/esm/platforms/nodejs.js +0 -82
  181. package/esm/version.js +0 -1
  182. package/script/deps/deno.land/x/base64@v0.2.1/base.js +0 -104
  183. package/script/deps/deno.land/x/base64@v0.2.1/base64url.js +0 -13
  184. package/script/deps/deno.land/x/sha1@v1.0.3/deps.js +0 -6
  185. package/script/deps/deno.land/x/sha1@v1.0.3/mod.js +0 -196
  186. package/script/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.js +0 -55
  187. package/script/package.json +0 -3
  188. package/script/pkg/commands/append.js +0 -13
  189. package/script/pkg/commands/bitcount.js +0 -20
  190. package/script/pkg/commands/bitop.js +0 -13
  191. package/script/pkg/commands/bitpos.js +0 -13
  192. package/script/pkg/commands/command.js +0 -70
  193. package/script/pkg/commands/dbsize.js +0 -13
  194. package/script/pkg/commands/decr.js +0 -13
  195. package/script/pkg/commands/decrby.js +0 -13
  196. package/script/pkg/commands/del.js +0 -13
  197. package/script/pkg/commands/echo.js +0 -13
  198. package/script/pkg/commands/eval.js +0 -13
  199. package/script/pkg/commands/evalsha.js +0 -13
  200. package/script/pkg/commands/exists.js +0 -13
  201. package/script/pkg/commands/expire.js +0 -13
  202. package/script/pkg/commands/expireat.js +0 -13
  203. package/script/pkg/commands/flushall.js +0 -17
  204. package/script/pkg/commands/flushdb.js +0 -17
  205. package/script/pkg/commands/geo_add.js +0 -31
  206. package/script/pkg/commands/get.js +0 -13
  207. package/script/pkg/commands/getbit.js +0 -13
  208. package/script/pkg/commands/getdel.js +0 -13
  209. package/script/pkg/commands/getrange.js +0 -13
  210. package/script/pkg/commands/getset.js +0 -13
  211. package/script/pkg/commands/hdel.js +0 -13
  212. package/script/pkg/commands/hexists.js +0 -13
  213. package/script/pkg/commands/hget.js +0 -13
  214. package/script/pkg/commands/hgetall.js +0 -41
  215. package/script/pkg/commands/hincrby.js +0 -13
  216. package/script/pkg/commands/hincrbyfloat.js +0 -13
  217. package/script/pkg/commands/hkeys.js +0 -13
  218. package/script/pkg/commands/hlen.js +0 -13
  219. package/script/pkg/commands/hmget.js +0 -39
  220. package/script/pkg/commands/hmset.js +0 -17
  221. package/script/pkg/commands/hrandfield.js +0 -43
  222. package/script/pkg/commands/hscan.js +0 -20
  223. package/script/pkg/commands/hset.js +0 -17
  224. package/script/pkg/commands/hsetnx.js +0 -13
  225. package/script/pkg/commands/hstrlen.js +0 -13
  226. package/script/pkg/commands/hvals.js +0 -13
  227. package/script/pkg/commands/incr.js +0 -13
  228. package/script/pkg/commands/incrby.js +0 -13
  229. package/script/pkg/commands/incrbyfloat.js +0 -13
  230. package/script/pkg/commands/json_arrappend.js +0 -13
  231. package/script/pkg/commands/json_arrindex.js +0 -13
  232. package/script/pkg/commands/json_arrinsert.js +0 -13
  233. package/script/pkg/commands/json_arrlen.js +0 -13
  234. package/script/pkg/commands/json_arrpop.js +0 -13
  235. package/script/pkg/commands/json_arrtrim.js +0 -16
  236. package/script/pkg/commands/json_clear.js +0 -13
  237. package/script/pkg/commands/json_del.js +0 -13
  238. package/script/pkg/commands/json_forget.js +0 -13
  239. package/script/pkg/commands/json_get.js +0 -34
  240. package/script/pkg/commands/json_mget.js +0 -13
  241. package/script/pkg/commands/json_numincrby.js +0 -13
  242. package/script/pkg/commands/json_nummultby.js +0 -13
  243. package/script/pkg/commands/json_objkeys.js +0 -13
  244. package/script/pkg/commands/json_objlen.js +0 -13
  245. package/script/pkg/commands/json_resp.js +0 -13
  246. package/script/pkg/commands/json_set.js +0 -22
  247. package/script/pkg/commands/json_strappend.js +0 -13
  248. package/script/pkg/commands/json_strlen.js +0 -13
  249. package/script/pkg/commands/json_toggle.js +0 -13
  250. package/script/pkg/commands/json_type.js +0 -13
  251. package/script/pkg/commands/keys.js +0 -13
  252. package/script/pkg/commands/lindex.js +0 -10
  253. package/script/pkg/commands/linsert.js +0 -10
  254. package/script/pkg/commands/llen.js +0 -13
  255. package/script/pkg/commands/lmove.js +0 -13
  256. package/script/pkg/commands/lpop.js +0 -13
  257. package/script/pkg/commands/lpos.js +0 -23
  258. package/script/pkg/commands/lpush.js +0 -13
  259. package/script/pkg/commands/lpushx.js +0 -13
  260. package/script/pkg/commands/lrange.js +0 -10
  261. package/script/pkg/commands/lrem.js +0 -10
  262. package/script/pkg/commands/lset.js +0 -10
  263. package/script/pkg/commands/ltrim.js +0 -10
  264. package/script/pkg/commands/mget.js +0 -13
  265. package/script/pkg/commands/mod.js +0 -160
  266. package/script/pkg/commands/mset.js +0 -16
  267. package/script/pkg/commands/msetnx.js +0 -13
  268. package/script/pkg/commands/persist.js +0 -13
  269. package/script/pkg/commands/pexpire.js +0 -13
  270. package/script/pkg/commands/pexpireat.js +0 -13
  271. package/script/pkg/commands/ping.js +0 -17
  272. package/script/pkg/commands/psetex.js +0 -13
  273. package/script/pkg/commands/pttl.js +0 -13
  274. package/script/pkg/commands/publish.js +0 -13
  275. package/script/pkg/commands/randomkey.js +0 -13
  276. package/script/pkg/commands/rename.js +0 -13
  277. package/script/pkg/commands/renamenx.js +0 -13
  278. package/script/pkg/commands/rpop.js +0 -13
  279. package/script/pkg/commands/rpush.js +0 -13
  280. package/script/pkg/commands/rpushx.js +0 -13
  281. package/script/pkg/commands/sadd.js +0 -13
  282. package/script/pkg/commands/scan.js +0 -23
  283. package/script/pkg/commands/scard.js +0 -13
  284. package/script/pkg/commands/script_exists.js +0 -16
  285. package/script/pkg/commands/script_flush.js +0 -20
  286. package/script/pkg/commands/script_load.js +0 -13
  287. package/script/pkg/commands/sdiff.js +0 -13
  288. package/script/pkg/commands/sdiffstore.js +0 -13
  289. package/script/pkg/commands/set.js +0 -40
  290. package/script/pkg/commands/setbit.js +0 -13
  291. package/script/pkg/commands/setex.js +0 -13
  292. package/script/pkg/commands/setnx.js +0 -13
  293. package/script/pkg/commands/setrange.js +0 -13
  294. package/script/pkg/commands/sinter.js +0 -13
  295. package/script/pkg/commands/sinterstore.js +0 -13
  296. package/script/pkg/commands/sismember.js +0 -13
  297. package/script/pkg/commands/smembers.js +0 -13
  298. package/script/pkg/commands/smismember.js +0 -13
  299. package/script/pkg/commands/smove.js +0 -13
  300. package/script/pkg/commands/spop.js +0 -17
  301. package/script/pkg/commands/srandmember.js +0 -17
  302. package/script/pkg/commands/srem.js +0 -13
  303. package/script/pkg/commands/sscan.js +0 -20
  304. package/script/pkg/commands/strlen.js +0 -13
  305. package/script/pkg/commands/sunion.js +0 -13
  306. package/script/pkg/commands/sunionstore.js +0 -13
  307. package/script/pkg/commands/time.js +0 -13
  308. package/script/pkg/commands/touch.js +0 -13
  309. package/script/pkg/commands/ttl.js +0 -13
  310. package/script/pkg/commands/type.js +0 -13
  311. package/script/pkg/commands/unlink.js +0 -13
  312. package/script/pkg/commands/xadd.js +0 -30
  313. package/script/pkg/commands/xrange.js +0 -40
  314. package/script/pkg/commands/zadd.js +0 -30
  315. package/script/pkg/commands/zcard.js +0 -13
  316. package/script/pkg/commands/zcount.js +0 -13
  317. package/script/pkg/commands/zdiffstore.js +0 -13
  318. package/script/pkg/commands/zincrby.js +0 -13
  319. package/script/pkg/commands/zinterstore.js +0 -31
  320. package/script/pkg/commands/zlexcount.js +0 -13
  321. package/script/pkg/commands/zmscore.js +0 -14
  322. package/script/pkg/commands/zpopmax.js +0 -17
  323. package/script/pkg/commands/zpopmin.js +0 -17
  324. package/script/pkg/commands/zrange.js +0 -30
  325. package/script/pkg/commands/zrank.js +0 -13
  326. package/script/pkg/commands/zrem.js +0 -13
  327. package/script/pkg/commands/zremrangebylex.js +0 -13
  328. package/script/pkg/commands/zremrangebyrank.js +0 -13
  329. package/script/pkg/commands/zremrangebyscore.js +0 -13
  330. package/script/pkg/commands/zrevrank.js +0 -13
  331. package/script/pkg/commands/zscan.js +0 -20
  332. package/script/pkg/commands/zscore.js +0 -13
  333. package/script/pkg/commands/zunion.js +0 -34
  334. package/script/pkg/commands/zunionstore.js +0 -31
  335. package/script/pkg/error.js +0 -13
  336. package/script/pkg/http.js +0 -178
  337. package/script/pkg/pipeline.js +0 -1311
  338. package/script/pkg/redis.js +0 -1322
  339. package/script/pkg/script.js +0 -81
  340. package/script/pkg/types.js +0 -2
  341. package/script/pkg/util.js +0 -35
  342. package/script/platforms/cloudflare.js +0 -97
  343. package/script/platforms/fastly.js +0 -73
  344. package/script/platforms/node_with_fetch.js +0 -112
  345. package/script/platforms/nodejs.js +0 -109
  346. package/script/version.js +0 -4
  347. package/types/deps/deno.land/x/base64@v0.2.1/base.d.ts +0 -5
  348. package/types/deps/deno.land/x/base64@v0.2.1/base64url.d.ts +0 -1
  349. package/types/deps/deno.land/x/sha1@v1.0.3/deps.d.ts +0 -1
  350. package/types/deps/deno.land/x/sha1@v1.0.3/mod.d.ts +0 -26
  351. package/types/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.d.ts +0 -3
  352. package/types/pkg/commands/append.d.ts +0 -7
  353. package/types/pkg/commands/bitcount.d.ts +0 -8
  354. package/types/pkg/commands/bitop.d.ts +0 -12
  355. package/types/pkg/commands/bitpos.d.ts +0 -7
  356. package/types/pkg/commands/command.d.ts +0 -37
  357. package/types/pkg/commands/dbsize.d.ts +0 -7
  358. package/types/pkg/commands/decr.d.ts +0 -7
  359. package/types/pkg/commands/decrby.d.ts +0 -7
  360. package/types/pkg/commands/del.d.ts +0 -7
  361. package/types/pkg/commands/echo.d.ts +0 -7
  362. package/types/pkg/commands/eval.d.ts +0 -7
  363. package/types/pkg/commands/evalsha.d.ts +0 -7
  364. package/types/pkg/commands/exists.d.ts +0 -7
  365. package/types/pkg/commands/expire.d.ts +0 -7
  366. package/types/pkg/commands/expireat.d.ts +0 -7
  367. package/types/pkg/commands/flushall.d.ts +0 -9
  368. package/types/pkg/commands/flushdb.d.ts +0 -9
  369. package/types/pkg/commands/geo_add.d.ts +0 -25
  370. package/types/pkg/commands/get.d.ts +0 -7
  371. package/types/pkg/commands/getbit.d.ts +0 -7
  372. package/types/pkg/commands/getdel.d.ts +0 -7
  373. package/types/pkg/commands/getrange.d.ts +0 -7
  374. package/types/pkg/commands/getset.d.ts +0 -7
  375. package/types/pkg/commands/hdel.d.ts +0 -7
  376. package/types/pkg/commands/hexists.d.ts +0 -7
  377. package/types/pkg/commands/hget.d.ts +0 -7
  378. package/types/pkg/commands/hgetall.d.ts +0 -7
  379. package/types/pkg/commands/hincrby.d.ts +0 -7
  380. package/types/pkg/commands/hincrbyfloat.d.ts +0 -7
  381. package/types/pkg/commands/hkeys.d.ts +0 -7
  382. package/types/pkg/commands/hlen.d.ts +0 -7
  383. package/types/pkg/commands/hmget.d.ts +0 -15
  384. package/types/pkg/commands/hmset.d.ts +0 -9
  385. package/types/pkg/commands/hrandfield.d.ts +0 -9
  386. package/types/pkg/commands/hscan.d.ts +0 -24
  387. package/types/pkg/commands/hset.d.ts +0 -9
  388. package/types/pkg/commands/hsetnx.d.ts +0 -7
  389. package/types/pkg/commands/hstrlen.d.ts +0 -7
  390. package/types/pkg/commands/hvals.d.ts +0 -7
  391. package/types/pkg/commands/incr.d.ts +0 -7
  392. package/types/pkg/commands/incrby.d.ts +0 -7
  393. package/types/pkg/commands/incrbyfloat.d.ts +0 -7
  394. package/types/pkg/commands/json_arrappend.d.ts +0 -7
  395. package/types/pkg/commands/json_arrindex.d.ts +0 -13
  396. package/types/pkg/commands/json_arrinsert.d.ts +0 -7
  397. package/types/pkg/commands/json_arrlen.d.ts +0 -7
  398. package/types/pkg/commands/json_arrpop.d.ts +0 -7
  399. package/types/pkg/commands/json_arrtrim.d.ts +0 -7
  400. package/types/pkg/commands/json_clear.d.ts +0 -7
  401. package/types/pkg/commands/json_del.d.ts +0 -7
  402. package/types/pkg/commands/json_forget.d.ts +0 -7
  403. package/types/pkg/commands/json_get.d.ts +0 -15
  404. package/types/pkg/commands/json_mget.d.ts +0 -7
  405. package/types/pkg/commands/json_numincrby.d.ts +0 -7
  406. package/types/pkg/commands/json_nummultby.d.ts +0 -7
  407. package/types/pkg/commands/json_objkeys.d.ts +0 -7
  408. package/types/pkg/commands/json_objlen.d.ts +0 -7
  409. package/types/pkg/commands/json_resp.d.ts +0 -7
  410. package/types/pkg/commands/json_set.d.ts +0 -18
  411. package/types/pkg/commands/json_strappend.d.ts +0 -7
  412. package/types/pkg/commands/json_strlen.d.ts +0 -7
  413. package/types/pkg/commands/json_toggle.d.ts +0 -7
  414. package/types/pkg/commands/json_type.d.ts +0 -7
  415. package/types/pkg/commands/keys.d.ts +0 -7
  416. package/types/pkg/commands/lindex.d.ts +0 -4
  417. package/types/pkg/commands/linsert.d.ts +0 -9
  418. package/types/pkg/commands/llen.d.ts +0 -7
  419. package/types/pkg/commands/lmove.d.ts +0 -12
  420. package/types/pkg/commands/lpop.d.ts +0 -7
  421. package/types/pkg/commands/lpos.d.ts +0 -15
  422. package/types/pkg/commands/lpush.d.ts +0 -7
  423. package/types/pkg/commands/lpushx.d.ts +0 -7
  424. package/types/pkg/commands/lrange.d.ts +0 -4
  425. package/types/pkg/commands/lrem.d.ts +0 -4
  426. package/types/pkg/commands/lset.d.ts +0 -4
  427. package/types/pkg/commands/ltrim.d.ts +0 -4
  428. package/types/pkg/commands/mget.d.ts +0 -7
  429. package/types/pkg/commands/mod.d.ts +0 -144
  430. package/types/pkg/commands/mset.d.ts +0 -9
  431. package/types/pkg/commands/msetnx.d.ts +0 -9
  432. package/types/pkg/commands/persist.d.ts +0 -7
  433. package/types/pkg/commands/pexpire.d.ts +0 -7
  434. package/types/pkg/commands/pexpireat.d.ts +0 -7
  435. package/types/pkg/commands/ping.d.ts +0 -7
  436. package/types/pkg/commands/psetex.d.ts +0 -7
  437. package/types/pkg/commands/pttl.d.ts +0 -7
  438. package/types/pkg/commands/publish.d.ts +0 -7
  439. package/types/pkg/commands/randomkey.d.ts +0 -7
  440. package/types/pkg/commands/rename.d.ts +0 -7
  441. package/types/pkg/commands/renamenx.d.ts +0 -7
  442. package/types/pkg/commands/rpop.d.ts +0 -7
  443. package/types/pkg/commands/rpush.d.ts +0 -7
  444. package/types/pkg/commands/rpushx.d.ts +0 -7
  445. package/types/pkg/commands/sadd.d.ts +0 -7
  446. package/types/pkg/commands/scan.d.ts +0 -18
  447. package/types/pkg/commands/scard.d.ts +0 -7
  448. package/types/pkg/commands/script_exists.d.ts +0 -7
  449. package/types/pkg/commands/script_flush.d.ts +0 -14
  450. package/types/pkg/commands/script_load.d.ts +0 -7
  451. package/types/pkg/commands/sdiff.d.ts +0 -7
  452. package/types/pkg/commands/sdiffstore.d.ts +0 -7
  453. package/types/pkg/commands/set.d.ts +0 -55
  454. package/types/pkg/commands/setbit.d.ts +0 -7
  455. package/types/pkg/commands/setex.d.ts +0 -7
  456. package/types/pkg/commands/setnx.d.ts +0 -7
  457. package/types/pkg/commands/setrange.d.ts +0 -7
  458. package/types/pkg/commands/sinter.d.ts +0 -7
  459. package/types/pkg/commands/sinterstore.d.ts +0 -7
  460. package/types/pkg/commands/sismember.d.ts +0 -7
  461. package/types/pkg/commands/smembers.d.ts +0 -7
  462. package/types/pkg/commands/smismember.d.ts +0 -7
  463. package/types/pkg/commands/smove.d.ts +0 -7
  464. package/types/pkg/commands/spop.d.ts +0 -7
  465. package/types/pkg/commands/srandmember.d.ts +0 -7
  466. package/types/pkg/commands/srem.d.ts +0 -7
  467. package/types/pkg/commands/sscan.d.ts +0 -24
  468. package/types/pkg/commands/strlen.d.ts +0 -7
  469. package/types/pkg/commands/sunion.d.ts +0 -7
  470. package/types/pkg/commands/sunionstore.d.ts +0 -7
  471. package/types/pkg/commands/time.d.ts +0 -7
  472. package/types/pkg/commands/touch.d.ts +0 -7
  473. package/types/pkg/commands/ttl.d.ts +0 -7
  474. package/types/pkg/commands/type.d.ts +0 -8
  475. package/types/pkg/commands/unlink.d.ts +0 -7
  476. package/types/pkg/commands/xadd.d.ts +0 -31
  477. package/types/pkg/commands/xrange.d.ts +0 -9
  478. package/types/pkg/commands/zadd.d.ts +0 -35
  479. package/types/pkg/commands/zcard.d.ts +0 -7
  480. package/types/pkg/commands/zcount.d.ts +0 -7
  481. package/types/pkg/commands/zdiffstore.d.ts +0 -7
  482. package/types/pkg/commands/zincrby.d.ts +0 -7
  483. package/types/pkg/commands/zinterstore.d.ts +0 -30
  484. package/types/pkg/commands/zlexcount.d.ts +0 -7
  485. package/types/pkg/commands/zmscore.d.ts +0 -7
  486. package/types/pkg/commands/zpopmax.d.ts +0 -7
  487. package/types/pkg/commands/zpopmin.d.ts +0 -7
  488. package/types/pkg/commands/zrange.d.ts +0 -42
  489. package/types/pkg/commands/zrank.d.ts +0 -7
  490. package/types/pkg/commands/zrem.d.ts +0 -7
  491. package/types/pkg/commands/zremrangebylex.d.ts +0 -7
  492. package/types/pkg/commands/zremrangebyrank.d.ts +0 -7
  493. package/types/pkg/commands/zremrangebyscore.d.ts +0 -7
  494. package/types/pkg/commands/zrevrank.d.ts +0 -7
  495. package/types/pkg/commands/zscan.d.ts +0 -24
  496. package/types/pkg/commands/zscore.d.ts +0 -7
  497. package/types/pkg/commands/zunion.d.ts +0 -29
  498. package/types/pkg/commands/zunionstore.d.ts +0 -30
  499. package/types/pkg/error.d.ts +0 -6
  500. package/types/pkg/http.d.ts +0 -95
  501. package/types/pkg/pipeline.d.ts +0 -686
  502. package/types/pkg/redis.d.ts +0 -692
  503. package/types/pkg/script.d.ts +0 -42
  504. package/types/pkg/types.d.ts +0 -27
  505. package/types/pkg/util.d.ts +0 -1
  506. package/types/version.d.ts +0 -1
@@ -0,0 +1,1959 @@
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
+ type ZUnionCommandOptions = {
146
+ withScores?: boolean;
147
+ aggregate?: "sum" | "min" | "max";
148
+ } & ({
149
+ weight: number;
150
+ weights?: never;
151
+ } | {
152
+ weight?: never;
153
+ weights: number[];
154
+ } | {
155
+ weight?: never;
156
+ weights?: never;
157
+ });
158
+
159
+ type ZInterStoreCommandOptions = {
160
+ aggregate?: "sum" | "min" | "max";
161
+ } & ({
162
+ weight: number;
163
+ weights?: never;
164
+ } | {
165
+ weight?: never;
166
+ weights: number[];
167
+ } | {
168
+ weight?: never;
169
+ weights?: never;
170
+ });
171
+
172
+ type Type = "string" | "list" | "set" | "zset" | "hash" | "none";
173
+
174
+ type ScriptFlushCommandOptions = {
175
+ sync: true;
176
+ async?: never;
177
+ } | {
178
+ sync?: never;
179
+ async: true;
180
+ };
181
+
182
+ type ScanCommandOptions = {
183
+ match?: string;
184
+ count?: number;
185
+ type?: string;
186
+ };
187
+
188
+ type GeoAddCommandOptions = {
189
+ nx?: boolean;
190
+ xx?: never;
191
+ } | ({
192
+ nx?: never;
193
+ xx?: boolean;
194
+ } & {
195
+ ch?: boolean;
196
+ });
197
+ interface GeoMember<TMemberType> {
198
+ latitude: number;
199
+ longitude: number;
200
+ member: TMemberType;
201
+ }
202
+
203
+ /**
204
+ * @see https://redis.io/commands/bitop
205
+ */
206
+ declare class BitOpCommand extends Command<number, number> {
207
+ constructor(cmd: [op: "and" | "or" | "xor", destinationKey: string, ...sourceKeys: string[]], opts?: CommandOptions<number, number>);
208
+ constructor(cmd: [op: "not", destinationKey: string, sourceKey: string], opts?: CommandOptions<number, number>);
209
+ }
210
+
211
+ /**
212
+ * @see https://redis.io/commands/del
213
+ */
214
+ declare class DelCommand extends Command<number, number> {
215
+ constructor(cmd: [...keys: string[]], opts?: CommandOptions<number, number>);
216
+ }
217
+
218
+ /**
219
+ * @see https://redis.io/commands/exists
220
+ */
221
+ declare class ExistsCommand extends Command<number, number> {
222
+ constructor(cmd: [...keys: string[]], opts?: CommandOptions<number, number>);
223
+ }
224
+
225
+ /**
226
+ * @see https://redis.io/commands/flushall
227
+ */
228
+ declare class FlushAllCommand extends Command<"OK", "OK"> {
229
+ constructor(args?: [{
230
+ async?: boolean;
231
+ }], opts?: CommandOptions<"OK", "OK">);
232
+ }
233
+
234
+ /**
235
+ * @see https://redis.io/commands/json.get
236
+ */
237
+ declare class JsonGetCommand<TData extends (unknown | Record<string, unknown>) | (unknown | Record<string, unknown>)[]> extends Command<TData | null, TData | null> {
238
+ constructor(cmd: [
239
+ key: string,
240
+ opts?: {
241
+ indent?: string;
242
+ newline?: string;
243
+ space?: string;
244
+ },
245
+ ...path: string[]
246
+ ] | [key: string, ...path: string[]], opts?: CommandOptions<TData | null, TData | null>);
247
+ }
248
+
249
+ /**
250
+ * @see https://redis.io/commands/mget
251
+ */
252
+ declare class MGetCommand<TData extends unknown[]> extends Command<(string | null)[], TData> {
253
+ constructor(cmd: [string[]] | [...(string[] | string[])], opts?: CommandOptions<(string | null)[], TData>);
254
+ }
255
+
256
+ /**
257
+ * @see https://redis.io/commands/ping
258
+ */
259
+ declare class PingCommand extends Command<string | "PONG", string | "PONG"> {
260
+ constructor(cmd?: [message?: string], opts?: CommandOptions<string | "PONG", string | "PONG">);
261
+ }
262
+
263
+ /**
264
+ * @see https://redis.io/commands/script-exists
265
+ */
266
+ declare class ScriptExistsCommand<T extends string[]> extends Command<string[], number[]> {
267
+ constructor(hashes: T, opts?: CommandOptions<string[], number[]>);
268
+ }
269
+
270
+ type SetCommandOptions = {
271
+ get?: boolean;
272
+ } & ({
273
+ ex: number;
274
+ px?: never;
275
+ exat?: never;
276
+ pxat?: never;
277
+ keepTtl?: never;
278
+ } | {
279
+ ex?: never;
280
+ px: number;
281
+ exat?: never;
282
+ pxat?: never;
283
+ keepTtl?: never;
284
+ } | {
285
+ ex?: never;
286
+ px?: never;
287
+ exat: number;
288
+ pxat?: never;
289
+ keepTtl?: never;
290
+ } | {
291
+ ex?: never;
292
+ px?: never;
293
+ exat?: never;
294
+ pxat: number;
295
+ keepTtl?: never;
296
+ } | {
297
+ ex?: never;
298
+ px?: never;
299
+ exat?: never;
300
+ pxat?: never;
301
+ keepTtl: true;
302
+ } | {
303
+ ex?: never;
304
+ px?: never;
305
+ exat?: never;
306
+ pxat?: never;
307
+ keepTtl?: never;
308
+ }) & ({
309
+ nx: true;
310
+ xx?: never;
311
+ } | {
312
+ xx: true;
313
+ nx?: never;
314
+ } | {
315
+ xx?: never;
316
+ nx?: never;
317
+ });
318
+
319
+ /**
320
+ * @see https://redis.io/commands/touch
321
+ */
322
+ declare class TouchCommand extends Command<number, number> {
323
+ constructor(cmd: [...keys: string[]], opts?: CommandOptions<number, number>);
324
+ }
325
+
326
+ /**
327
+ * @see https://redis.io/commands/unlink
328
+ */
329
+ declare class UnlinkCommand extends Command<number, number> {
330
+ constructor(cmd: [...keys: string[]], opts?: CommandOptions<number, number>);
331
+ }
332
+
333
+ type ZAddCommandOptions = ({
334
+ nx: true;
335
+ xx?: never;
336
+ } | {
337
+ nx?: never;
338
+ xx: true;
339
+ } | {
340
+ nx?: never;
341
+ xx?: never;
342
+ }) & {
343
+ ch?: true;
344
+ };
345
+ type ZAddCommandOptionsWithIncr = ZAddCommandOptions & {
346
+ incr: true;
347
+ };
348
+ type ScoreMember<TData> = {
349
+ score: number;
350
+ member: TData;
351
+ };
352
+
353
+ type ZRangeCommandOptions = {
354
+ withScores?: boolean;
355
+ rev?: boolean;
356
+ } & ({
357
+ byScore: true;
358
+ byLex?: never;
359
+ } | {
360
+ byScore?: never;
361
+ byLex: true;
362
+ } | {
363
+ byScore?: never;
364
+ byLex?: never;
365
+ }) & ({
366
+ offset: number;
367
+ count: number;
368
+ } | {
369
+ offset?: never;
370
+ count?: never;
371
+ });
372
+
373
+ type InferResponseData<T extends unknown[]> = {
374
+ [K in keyof T]: T[K] extends Command<any, infer TData> ? TData : unknown;
375
+ };
376
+ /**
377
+ * Upstash REST API supports command pipelining to send multiple commands in
378
+ * batch, instead of sending each command one by one and waiting for a response.
379
+ * When using pipelines, several commands are sent using a single HTTP request,
380
+ * and a single JSON array response is returned. Each item in the response array
381
+ * corresponds to the command in the same order within the pipeline.
382
+ *
383
+ * **NOTE:**
384
+ *
385
+ * Execution of the pipeline is not atomic. Even though each command in
386
+ * the pipeline will be executed in order, commands sent by other clients can
387
+ * interleave with the pipeline.
388
+ *
389
+ * **Examples:**
390
+ *
391
+ * ```ts
392
+ * const p = redis.pipeline() // or redis.multi()
393
+ * p.set("key","value")
394
+ * p.get("key")
395
+ * const res = await p.exec()
396
+ * ```
397
+ *
398
+ * You can also chain commands together
399
+ * ```ts
400
+ * const p = redis.pipeline()
401
+ * const res = await p.set("key","value").get("key").exec()
402
+ * ```
403
+ *
404
+ * Return types are inferred if all commands are chained, but you can still
405
+ * override the response type manually:
406
+ * ```ts
407
+ * redis.pipeline()
408
+ * .set("key", { greeting: "hello"})
409
+ * .get("key")
410
+ * .exec<["OK", { greeting: string } ]>()
411
+ *
412
+ * ```
413
+ */
414
+ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
415
+ private client;
416
+ private commands;
417
+ private commandOptions?;
418
+ private multiExec;
419
+ constructor(opts: {
420
+ client: Requester;
421
+ commandOptions?: CommandOptions<any, any>;
422
+ multiExec?: boolean;
423
+ });
424
+ /**
425
+ * Send the pipeline request to upstash.
426
+ *
427
+ * Returns an array with the results of all pipelined commands.
428
+ *
429
+ * If all commands are statically chained from start to finish, types are inferred. You can still define a return type manually if necessary though:
430
+ * ```ts
431
+ * const p = redis.pipeline()
432
+ * p.get("key")
433
+ * const result = p.exec<[{ greeting: string }]>()
434
+ * ```
435
+ */
436
+ exec: <TCommandResults extends unknown[] = [] extends TCommands ? unknown[] : InferResponseData<TCommands>>() => Promise<TCommandResults>;
437
+ /**
438
+ * Returns the length of pipeline before the execution
439
+ */
440
+ length(): number;
441
+ /**
442
+ * Pushes a command into the pipeline and returns a chainable instance of the
443
+ * pipeline
444
+ */
445
+ private chain;
446
+ /**
447
+ * @see https://redis.io/commands/append
448
+ */
449
+ append: (key: string, value: string) => Pipeline<[...TCommands, Command<any, number>]>;
450
+ /**
451
+ * @see https://redis.io/commands/bitcount
452
+ */
453
+ bitcount: (key: string, start: number, end: number) => Pipeline<[...TCommands, Command<any, number>]>;
454
+ /**
455
+ * @see https://redis.io/commands/bitop
456
+ */
457
+ bitop: {
458
+ (op: "and" | "or" | "xor", destinationKey: string, sourceKey: string, ...sourceKeys: string[]): Pipeline<[...TCommands, BitOpCommand]>;
459
+ (op: "not", destinationKey: string, sourceKey: string): Pipeline<[...TCommands, BitOpCommand]>;
460
+ };
461
+ /**
462
+ * @see https://redis.io/commands/bitpos
463
+ */
464
+ bitpos: (key: string, bit: 0 | 1, start?: number | undefined, end?: number | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
465
+ /**
466
+ * @see https://redis.io/commands/zdiffstore
467
+ */
468
+ zdiffstore: (destination: string, numkeys: number, ...keys: string[]) => Pipeline<[...TCommands, Command<any, number>]>;
469
+ /**
470
+ * @see https://redis.io/commands/dbsize
471
+ */
472
+ dbsize: () => Pipeline<[...TCommands, Command<any, number>]>;
473
+ /**
474
+ * @see https://redis.io/commands/decr
475
+ */
476
+ decr: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
477
+ /**
478
+ * @see https://redis.io/commands/decrby
479
+ */
480
+ decrby: (key: string, decrement: number) => Pipeline<[...TCommands, Command<any, number>]>;
481
+ /**
482
+ * @see https://redis.io/commands/del
483
+ */
484
+ del: (...args: CommandArgs<typeof DelCommand>) => Pipeline<[...TCommands, Command<any, number>]>;
485
+ /**
486
+ * @see https://redis.io/commands/echo
487
+ */
488
+ echo: (message: string) => Pipeline<[...TCommands, Command<any, string>]>;
489
+ /**
490
+ * @see https://redis.io/commands/eval
491
+ */
492
+ eval: <TArgs extends unknown[], TData = unknown>(script: string, keys: string[], args: TArgs) => Pipeline<[...TCommands, Command<any, TData>]>;
493
+ /**
494
+ * @see https://redis.io/commands/evalsha
495
+ */
496
+ evalsha: <TArgs extends unknown[], TData = unknown>(sha1: string, keys: string[], args: TArgs) => Pipeline<[...TCommands, Command<any, TData>]>;
497
+ /**
498
+ * @see https://redis.io/commands/exists
499
+ */
500
+ exists: (...args: CommandArgs<typeof ExistsCommand>) => Pipeline<[...TCommands, Command<any, number>]>;
501
+ /**
502
+ * @see https://redis.io/commands/expire
503
+ */
504
+ expire: (key: string, seconds: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
505
+ /**
506
+ * @see https://redis.io/commands/expireat
507
+ */
508
+ expireat: (key: string, unix: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
509
+ /**
510
+ * @see https://redis.io/commands/flushall
511
+ */
512
+ flushall: (args?: CommandArgs<typeof FlushAllCommand>) => Pipeline<[...TCommands, Command<any, "OK">]>;
513
+ /**
514
+ * @see https://redis.io/commands/flushdb
515
+ */
516
+ flushdb: (opts?: {
517
+ async?: boolean | undefined;
518
+ } | undefined) => Pipeline<[...TCommands, Command<any, "OK">]>;
519
+ /**
520
+ * @see https://redis.io/commands/get
521
+ */
522
+ get: <TData>(key: string) => Pipeline<[...TCommands, Command<any, TData | null>]>;
523
+ /**
524
+ * @see https://redis.io/commands/getbit
525
+ */
526
+ getbit: (key: string, offset: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
527
+ /**
528
+ * @see https://redis.io/commands/getdel
529
+ */
530
+ getdel: <TData>(key: string) => Pipeline<[...TCommands, Command<any, TData | null>]>;
531
+ /**
532
+ * @see https://redis.io/commands/getrange
533
+ */
534
+ getrange: (key: string, start: number, end: number) => Pipeline<[...TCommands, Command<any, string>]>;
535
+ /**
536
+ * @see https://redis.io/commands/getset
537
+ */
538
+ getset: <TData>(key: string, value: TData) => Pipeline<[...TCommands, Command<any, TData | null>]>;
539
+ /**
540
+ * @see https://redis.io/commands/hdel
541
+ */
542
+ hdel: (key: string, ...fields: string[]) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
543
+ /**
544
+ * @see https://redis.io/commands/hexists
545
+ */
546
+ hexists: (key: string, field: string) => Pipeline<[...TCommands, Command<any, number>]>;
547
+ /**
548
+ * @see https://redis.io/commands/hget
549
+ */
550
+ hget: <TData>(key: string, field: string) => Pipeline<[...TCommands, Command<any, TData | null>]>;
551
+ /**
552
+ * @see https://redis.io/commands/hgetall
553
+ */
554
+ hgetall: <TData extends Record<string, unknown>>(key: string) => Pipeline<[...TCommands, Command<any, TData | null>]>;
555
+ /**
556
+ * @see https://redis.io/commands/hincrby
557
+ */
558
+ hincrby: (key: string, field: string, increment: number) => Pipeline<[...TCommands, Command<any, number>]>;
559
+ /**
560
+ * @see https://redis.io/commands/hincrbyfloat
561
+ */
562
+ hincrbyfloat: (key: string, field: string, increment: number) => Pipeline<[...TCommands, Command<any, number>]>;
563
+ /**
564
+ * @see https://redis.io/commands/hkeys
565
+ */
566
+ hkeys: (key: string) => Pipeline<[...TCommands, Command<any, string[]>]>;
567
+ /**
568
+ * @see https://redis.io/commands/hlen
569
+ */
570
+ hlen: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
571
+ /**
572
+ * @see https://redis.io/commands/hmget
573
+ */
574
+ hmget: <TData extends Record<string, unknown>>(key: string, ...fields: string[]) => Pipeline<[...TCommands, Command<any, TData | null>]>;
575
+ /**
576
+ * @see https://redis.io/commands/hmset
577
+ */
578
+ hmset: <TData>(key: string, kv: {
579
+ [field: string]: TData;
580
+ }) => Pipeline<[...TCommands, Command<any, "OK">]>;
581
+ /**
582
+ * @see https://redis.io/commands/hrandfield
583
+ */
584
+ hrandfield: <TData extends string | string[] | Record<string, unknown>>(key: string, count?: number, withValues?: boolean) => Pipeline<[...TCommands, Command<any, TData>]>;
585
+ /**
586
+ * @see https://redis.io/commands/hscan
587
+ */
588
+ hscan: (key: string, cursor: number, cmdOpts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [number, (string | number)[]]>]>;
589
+ /**
590
+ * @see https://redis.io/commands/hset
591
+ */
592
+ hset: <TData>(key: string, kv: {
593
+ [field: string]: TData;
594
+ }) => Pipeline<[...TCommands, Command<any, number>]>;
595
+ /**
596
+ * @see https://redis.io/commands/hsetnx
597
+ */
598
+ hsetnx: <TData>(key: string, field: string, value: TData) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
599
+ /**
600
+ * @see https://redis.io/commands/hstrlen
601
+ */
602
+ hstrlen: (key: string, field: string) => Pipeline<[...TCommands, Command<any, number>]>;
603
+ /**
604
+ * @see https://redis.io/commands/hvals
605
+ */
606
+ hvals: (key: string) => Pipeline<[...TCommands, Command<any, any>]>;
607
+ /**
608
+ * @see https://redis.io/commands/incr
609
+ */
610
+ incr: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
611
+ /**
612
+ * @see https://redis.io/commands/incrby
613
+ */
614
+ incrby: (key: string, value: number) => Pipeline<[...TCommands, Command<any, number>]>;
615
+ /**
616
+ * @see https://redis.io/commands/incrbyfloat
617
+ */
618
+ incrbyfloat: (key: string, value: number) => Pipeline<[...TCommands, Command<any, number>]>;
619
+ /**
620
+ * @see https://redis.io/commands/keys
621
+ */
622
+ keys: (pattern: string) => Pipeline<[...TCommands, Command<any, string[]>]>;
623
+ /**
624
+ * @see https://redis.io/commands/lindex
625
+ */
626
+ lindex: (key: string, index: number) => Pipeline<[...TCommands, Command<any, any>]>;
627
+ /**
628
+ * @see https://redis.io/commands/linsert
629
+ */
630
+ linsert: <TData>(key: string, direction: "before" | "after", pivot: TData, value: TData) => Pipeline<[...TCommands, Command<any, number>]>;
631
+ /**
632
+ * @see https://redis.io/commands/llen
633
+ */
634
+ llen: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
635
+ /**
636
+ * @see https://redis.io/commands/lmove
637
+ */
638
+ lmove: <TData = string>(source: string, destination: string, whereFrom: "left" | "right", whereTo: "left" | "right") => Pipeline<[...TCommands, Command<any, TData>]>;
639
+ /**
640
+ * @see https://redis.io/commands/lpop
641
+ */
642
+ lpop: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
643
+ /**
644
+ * @see https://redis.io/commands/lpos
645
+ */
646
+ lpos: <TData>(key: string, element: unknown, opts?: {
647
+ rank?: number | undefined;
648
+ count?: number | undefined;
649
+ maxLen?: number | undefined;
650
+ } | undefined) => Pipeline<[...TCommands, Command<any, TData>]>;
651
+ /**
652
+ * @see https://redis.io/commands/lpush
653
+ */
654
+ lpush: <TData>(key: string, ...elements: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
655
+ /**
656
+ * @see https://redis.io/commands/lpushx
657
+ */
658
+ lpushx: <TData>(key: string, ...elements: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
659
+ /**
660
+ * @see https://redis.io/commands/lrange
661
+ */
662
+ lrange: <TResult = string>(key: string, start: number, end: number) => Pipeline<[...TCommands, Command<any, TResult[]>]>;
663
+ /**
664
+ * @see https://redis.io/commands/lrem
665
+ */
666
+ lrem: <TData>(key: string, count: number, value: TData) => Pipeline<[...TCommands, Command<any, number>]>;
667
+ /**
668
+ * @see https://redis.io/commands/lset
669
+ */
670
+ lset: <TData>(key: string, index: number, value: TData) => Pipeline<[...TCommands, Command<any, "OK">]>;
671
+ /**
672
+ * @see https://redis.io/commands/ltrim
673
+ */
674
+ ltrim: (key: string, start: number, end: number) => Pipeline<[...TCommands, Command<any, "OK">]>;
675
+ /**
676
+ * @see https://redis.io/commands/mget
677
+ */
678
+ mget: <TData extends unknown[]>(...args: CommandArgs<typeof MGetCommand>) => Pipeline<[...TCommands, Command<any, TData>]>;
679
+ /**
680
+ * @see https://redis.io/commands/mset
681
+ */
682
+ mset: <TData>(kv: {
683
+ [key: string]: TData;
684
+ }) => Pipeline<[...TCommands, Command<any, "OK">]>;
685
+ /**
686
+ * @see https://redis.io/commands/msetnx
687
+ */
688
+ msetnx: <TData>(kv: {
689
+ [key: string]: TData;
690
+ }) => Pipeline<[...TCommands, Command<any, number>]>;
691
+ /**
692
+ * @see https://redis.io/commands/persist
693
+ */
694
+ persist: (key: string) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
695
+ /**
696
+ * @see https://redis.io/commands/pexpire
697
+ */
698
+ pexpire: (key: string, milliseconds: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
699
+ /**
700
+ * @see https://redis.io/commands/pexpireat
701
+ */
702
+ pexpireat: (key: string, unix: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
703
+ /**
704
+ * @see https://redis.io/commands/ping
705
+ */
706
+ ping: (args?: CommandArgs<typeof PingCommand>) => Pipeline<[...TCommands, Command<any, string>]>;
707
+ /**
708
+ * @see https://redis.io/commands/psetex
709
+ */
710
+ psetex: <TData>(key: string, ttl: number, value: TData) => Pipeline<[...TCommands, Command<any, string>]>;
711
+ /**
712
+ * @see https://redis.io/commands/pttl
713
+ */
714
+ pttl: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
715
+ /**
716
+ * @see https://redis.io/commands/publish
717
+ */
718
+ publish: (channel: string, message: unknown) => Pipeline<[...TCommands, Command<any, number>]>;
719
+ /**
720
+ * @see https://redis.io/commands/randomkey
721
+ */
722
+ randomkey: () => Pipeline<[...TCommands, Command<any, string | null>]>;
723
+ /**
724
+ * @see https://redis.io/commands/rename
725
+ */
726
+ rename: (source: string, destination: string) => Pipeline<[...TCommands, Command<any, "OK">]>;
727
+ /**
728
+ * @see https://redis.io/commands/renamenx
729
+ */
730
+ renamenx: (source: string, destination: string) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
731
+ /**
732
+ * @see https://redis.io/commands/rpop
733
+ */
734
+ rpop: <TData = string>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
735
+ /**
736
+ * @see https://redis.io/commands/rpush
737
+ */
738
+ rpush: <TData>(key: string, ...elements: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
739
+ /**
740
+ * @see https://redis.io/commands/rpushx
741
+ */
742
+ rpushx: <TData>(key: string, ...elements: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
743
+ /**
744
+ * @see https://redis.io/commands/sadd
745
+ */
746
+ sadd: <TData>(key: string, ...members: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
747
+ /**
748
+ * @see https://redis.io/commands/scan
749
+ */
750
+ scan: (cursor: number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [number, string[]]>]>;
751
+ /**
752
+ * @see https://redis.io/commands/scard
753
+ */
754
+ scard: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
755
+ /**
756
+ * @see https://redis.io/commands/script-exists
757
+ */
758
+ scriptExists: (...args: CommandArgs<typeof ScriptExistsCommand>) => Pipeline<[...TCommands, Command<any, number[]>]>;
759
+ /**
760
+ * @see https://redis.io/commands/script-flush
761
+ */
762
+ scriptFlush: (opts?: ScriptFlushCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, "OK">]>;
763
+ /**
764
+ * @see https://redis.io/commands/script-load
765
+ */
766
+ scriptLoad: (script: string) => Pipeline<[...TCommands, Command<any, string>]>;
767
+ sdiff: (key: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
768
+ /**
769
+ * @see https://redis.io/commands/sdiffstore
770
+ */
771
+ sdiffstore: (destination: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, number>]>;
772
+ /**
773
+ * @see https://redis.io/commands/set
774
+ */
775
+ set: <TData>(key: string, value: TData, opts?: SetCommandOptions) => Pipeline<[...TCommands, Command<any, "OK" | TData | null>]>;
776
+ /**
777
+ * @see https://redis.io/commands/setbit
778
+ */
779
+ setbit: (key: string, offset: number, value: 0 | 1) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
780
+ /**
781
+ * @see https://redis.io/commands/setex
782
+ */
783
+ setex: <TData>(key: string, ttl: number, value: TData) => Pipeline<[...TCommands, Command<any, "OK">]>;
784
+ /**
785
+ * @see https://redis.io/commands/setnx
786
+ */
787
+ setnx: <TData>(key: string, value: TData) => Pipeline<[...TCommands, Command<any, number>]>;
788
+ /**
789
+ * @see https://redis.io/commands/setrange
790
+ */
791
+ setrange: (key: string, offset: number, value: string) => Pipeline<[...TCommands, Command<any, number>]>;
792
+ /**
793
+ * @see https://redis.io/commands/sinter
794
+ */
795
+ sinter: (key: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, string[]>]>;
796
+ /**
797
+ * @see https://redis.io/commands/sinterstore
798
+ */
799
+ sinterstore: (destination: string, key: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, number>]>;
800
+ /**
801
+ * @see https://redis.io/commands/sismember
802
+ */
803
+ sismember: <TData>(key: string, member: TData) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
804
+ /**
805
+ * @see https://redis.io/commands/smembers
806
+ */
807
+ smembers: <TData extends unknown[] = string[]>(key: string) => Pipeline<[...TCommands, Command<any, TData>]>;
808
+ /**
809
+ * @see https://redis.io/commands/smismember
810
+ */
811
+ smismember: <TMembers extends unknown[]>(key: string, members: TMembers) => Pipeline<[...TCommands, Command<any, (0 | 1)[]>]>;
812
+ /**
813
+ * @see https://redis.io/commands/smove
814
+ */
815
+ smove: <TData>(source: string, destination: string, member: TData) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
816
+ /**
817
+ * @see https://redis.io/commands/spop
818
+ */
819
+ spop: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
820
+ /**
821
+ * @see https://redis.io/commands/srandmember
822
+ */
823
+ srandmember: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
824
+ /**
825
+ * @see https://redis.io/commands/srem
826
+ */
827
+ srem: <TData>(key: string, ...members: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
828
+ /**
829
+ * @see https://redis.io/commands/sscan
830
+ */
831
+ sscan: (key: string, cursor: number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [number, (string | number)[]]>]>;
832
+ /**
833
+ * @see https://redis.io/commands/strlen
834
+ */
835
+ strlen: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
836
+ /**
837
+ * @see https://redis.io/commands/sunion
838
+ */
839
+ sunion: (key: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
840
+ /**
841
+ * @see https://redis.io/commands/sunionstore
842
+ */
843
+ sunionstore: (destination: string, key: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, number>]>;
844
+ /**
845
+ * @see https://redis.io/commands/time
846
+ */
847
+ time: () => Pipeline<[...TCommands, Command<any, [number, number]>]>;
848
+ /**
849
+ * @see https://redis.io/commands/touch
850
+ */
851
+ touch: (...args: CommandArgs<typeof TouchCommand>) => Pipeline<[...TCommands, Command<any, number>]>;
852
+ /**
853
+ * @see https://redis.io/commands/ttl
854
+ */
855
+ ttl: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
856
+ /**
857
+ * @see https://redis.io/commands/type
858
+ */
859
+ type: (key: string) => Pipeline<[...TCommands, Command<any, Type>]>;
860
+ /**
861
+ * @see https://redis.io/commands/unlink
862
+ */
863
+ unlink: (...args: CommandArgs<typeof UnlinkCommand>) => Pipeline<[...TCommands, Command<any, number>]>;
864
+ /**
865
+ * @see https://redis.io/commands/zadd
866
+ */
867
+ zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [key: string, opts: ZAddCommandOptions | ZAddCommandOptionsWithIncr, ScoreMember<TData>, ...ScoreMember<TData>[]]) => Pipeline<[...TCommands, Command<any, number | null>]>;
868
+ /**
869
+ * @see https://redis.io/commands/zcard
870
+ */
871
+ zcard: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
872
+ /**
873
+ * @see https://redis.io/commands/zcount
874
+ */
875
+ zcount: (key: string, min: string | number, max: string | number) => Pipeline<[...TCommands, Command<any, number>]>;
876
+ /**
877
+ * @see https://redis.io/commands/zincrby
878
+ */
879
+ zincrby: <TData>(key: string, increment: number, member: TData) => Pipeline<[...TCommands, Command<any, number>]>;
880
+ /**
881
+ * @see https://redis.io/commands/zinterstore
882
+ */
883
+ zinterstore: (destination: string, numKeys: number, keys: string[], opts?: ZInterStoreCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
884
+ /**
885
+ * @see https://redis.io/commands/zlexcount
886
+ */
887
+ zlexcount: (key: string, min: string, max: string) => Pipeline<[...TCommands, Command<any, number>]>;
888
+ /**
889
+ * @see https://redis.io/commands/zmscore
890
+ */
891
+ zmscore: (key: string, members: unknown[]) => Pipeline<[...TCommands, Command<any, number[] | null>]>;
892
+ /**
893
+ * @see https://redis.io/commands/zpopmax
894
+ */
895
+ zpopmax: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData[]>]>;
896
+ /**
897
+ * @see https://redis.io/commands/zpopmin
898
+ */
899
+ zpopmin: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData[]>]>;
900
+ /**
901
+ * @see https://redis.io/commands/zrange
902
+ */
903
+ zrange: <TData extends unknown[]>(...args: [key: string, min: number, max: number, opts?: ZRangeCommandOptions] | [
904
+ key: string,
905
+ min: `(${string}` | `[${string}` | "-" | "+",
906
+ max: `(${string}` | `[${string}` | "-" | "+",
907
+ opts: {
908
+ byLex: true;
909
+ } & ZRangeCommandOptions
910
+ ] | [
911
+ key: string,
912
+ min: number | `(${number}` | "-inf" | "+inf",
913
+ max: number | `(${number}` | "-inf" | "+inf",
914
+ opts: {
915
+ byScore: true;
916
+ } & ZRangeCommandOptions
917
+ ]) => Pipeline<[...TCommands, Command<any, TData>]>;
918
+ /**
919
+ * @see https://redis.io/commands/zrank
920
+ */
921
+ zrank: <TData>(key: string, member: TData) => Pipeline<[...TCommands, Command<any, number | null>]>;
922
+ /**
923
+ * @see https://redis.io/commands/zrem
924
+ */
925
+ zrem: <TData>(key: string, ...members: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
926
+ /**
927
+ * @see https://redis.io/commands/zremrangebylex
928
+ */
929
+ zremrangebylex: (key: string, min: string, max: string) => Pipeline<[...TCommands, Command<any, number>]>;
930
+ /**
931
+ * @see https://redis.io/commands/zremrangebyrank
932
+ */
933
+ zremrangebyrank: (key: string, start: number, stop: number) => Pipeline<[...TCommands, Command<any, number>]>;
934
+ /**
935
+ * @see https://redis.io/commands/zremrangebyscore
936
+ */
937
+ zremrangebyscore: (key: string, min: number, max: number) => Pipeline<[...TCommands, Command<any, number>]>;
938
+ /**
939
+ * @see https://redis.io/commands/zrevrank
940
+ */
941
+ zrevrank: <TData>(key: string, member: TData) => Pipeline<[...TCommands, Command<any, number | null>]>;
942
+ /**
943
+ * @see https://redis.io/commands/zscan
944
+ */
945
+ zscan: (key: string, cursor: number, opts?: ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [number, (string | number)[]]>]>;
946
+ /**
947
+ * @see https://redis.io/commands/zscore
948
+ */
949
+ zscore: <TData>(key: string, member: TData) => Pipeline<[...TCommands, Command<any, number | null>]>;
950
+ /**
951
+ * @see https://redis.io/commands/zunionstore
952
+ */
953
+ zunionstore: (destination: string, numKeys: number, keys: string[], opts?: ZUnionStoreCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
954
+ /**
955
+ * @see https://redis.io/commands/zunion
956
+ */
957
+ zunion: (numKeys: number, keys: string[], opts?: ZUnionCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, any>]>;
958
+ /**
959
+ * @see https://redis.io/commands/?group=json
960
+ */
961
+ get json(): {
962
+ /**
963
+ * @see https://redis.io/commands/json.arrappend
964
+ */
965
+ arrappend: (key: string, path: string, ...values: unknown[]) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
966
+ /**
967
+ * @see https://redis.io/commands/json.arrindex
968
+ */
969
+ arrindex: (key: string, path: string, value: unknown, start?: number | undefined, stop?: number | undefined) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
970
+ /**
971
+ * @see https://redis.io/commands/json.arrinsert
972
+ */
973
+ arrinsert: (key: string, path: string, index: number, ...values: unknown[]) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
974
+ /**
975
+ * @see https://redis.io/commands/json.arrlen
976
+ */
977
+ arrlen: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
978
+ /**
979
+ * @see https://redis.io/commands/json.arrpop
980
+ */
981
+ arrpop: (key: string, path?: string | undefined, index?: number | undefined) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
982
+ /**
983
+ * @see https://redis.io/commands/json.arrtrim
984
+ */
985
+ arrtrim: (key: string, path?: string | undefined, start?: number | undefined, stop?: number | undefined) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
986
+ /**
987
+ * @see https://redis.io/commands/json.clear
988
+ */
989
+ clear: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
990
+ /**
991
+ * @see https://redis.io/commands/json.del
992
+ */
993
+ del: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
994
+ /**
995
+ * @see https://redis.io/commands/json.forget
996
+ */
997
+ forget: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
998
+ /**
999
+ * @see https://redis.io/commands/geoadd
1000
+ */
1001
+ geoadd: (args_0: string, args_1: GeoAddCommandOptions | GeoMember<unknown>, ...args_2: GeoMember<unknown>[]) => Promise<number | null>;
1002
+ /**
1003
+ * @see https://redis.io/commands/geodist
1004
+ */
1005
+ geodist: (key: string, member1: unknown, member2: unknown, unit?: "M" | "KM" | "FT" | "MI" | undefined) => Promise<number | null>;
1006
+ /**
1007
+ * @see https://redis.io/commands/geopos
1008
+ */
1009
+ geopos: (args_0: string, ...args_1: unknown[]) => Promise<{
1010
+ lng: number;
1011
+ lat: number;
1012
+ }[]>;
1013
+ /**
1014
+ * @see https://redis.io/commands/geohash
1015
+ */
1016
+ geohash: (args_0: string, ...args_1: unknown[]) => Promise<(string | null)[]>;
1017
+ /**
1018
+ * @see https://redis.io/commands/geosearch
1019
+ */
1020
+ geosearch: (key: string, centerPoint: {
1021
+ type: "FROMLONLAT" | "fromlonlat";
1022
+ coordinate: {
1023
+ lon: number;
1024
+ lat: number;
1025
+ };
1026
+ } | {
1027
+ type: "FROMMEMBER" | "frommember";
1028
+ member: unknown;
1029
+ }, shape: {
1030
+ type: "BYRADIUS" | "byradius";
1031
+ radius: number;
1032
+ radiusType: "M" | "KM" | "FT" | "MI";
1033
+ } | {
1034
+ type: "BYBOX" | "bybox";
1035
+ rect: {
1036
+ width: number;
1037
+ height: number;
1038
+ };
1039
+ rectType: "M" | "KM" | "FT" | "MI";
1040
+ }, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
1041
+ count?: {
1042
+ limit: number;
1043
+ any?: boolean | undefined;
1044
+ } | undefined;
1045
+ withCoord?: boolean | undefined;
1046
+ withDist?: boolean | undefined;
1047
+ withHash?: boolean | undefined;
1048
+ } | undefined) => Promise<({
1049
+ member: unknown;
1050
+ } & {
1051
+ coord?: {
1052
+ long: number;
1053
+ lat: number;
1054
+ } | undefined;
1055
+ dist?: number | undefined;
1056
+ hash?: string | undefined;
1057
+ })[]>;
1058
+ /**
1059
+ * @see https://redis.io/commands/geosearchstore
1060
+ */
1061
+ geosearchstore: (destination: string, key: string, centerPoint: {
1062
+ type: "FROMLONLAT" | "fromlonlat";
1063
+ coordinate: {
1064
+ lon: number;
1065
+ lat: number;
1066
+ };
1067
+ } | {
1068
+ type: "FROMMEMBER" | "frommember";
1069
+ member: unknown;
1070
+ }, shape: {
1071
+ type: "BYRADIUS" | "byradius";
1072
+ radius: number;
1073
+ radiusType: "M" | "KM" | "FT" | "MI";
1074
+ } | {
1075
+ type: "BYBOX" | "bybox";
1076
+ rect: {
1077
+ width: number;
1078
+ height: number;
1079
+ };
1080
+ rectType: "M" | "KM" | "FT" | "MI";
1081
+ }, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
1082
+ count?: {
1083
+ limit: number;
1084
+ any?: boolean | undefined;
1085
+ } | undefined;
1086
+ storeDist?: boolean | undefined;
1087
+ } | undefined) => Promise<number>;
1088
+ /**
1089
+ * @see https://redis.io/commands/json.get
1090
+ */
1091
+ get: (...args: CommandArgs<typeof JsonGetCommand>) => Pipeline<[...TCommands, Command<any, any>]>;
1092
+ /**
1093
+ * @see https://redis.io/commands/json.mget
1094
+ */
1095
+ mget: (keys: string[], path: string) => Pipeline<[...TCommands, Command<any, any>]>;
1096
+ /**
1097
+ * @see https://redis.io/commands/json.numincrby
1098
+ */
1099
+ numincrby: (key: string, path: string, value: number) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
1100
+ /**
1101
+ * @see https://redis.io/commands/json.nummultby
1102
+ */
1103
+ nummultby: (key: string, path: string, value: number) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
1104
+ /**
1105
+ * @see https://redis.io/commands/json.objkeys
1106
+ */
1107
+ objkeys: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, (string[] | null)[]>]>;
1108
+ /**
1109
+ * @see https://redis.io/commands/json.objlen
1110
+ */
1111
+ objlen: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
1112
+ /**
1113
+ * @see https://redis.io/commands/json.resp
1114
+ */
1115
+ resp: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, any>]>;
1116
+ /**
1117
+ * @see https://redis.io/commands/json.set
1118
+ */
1119
+ set: (key: string, path: string, value: string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown>)[], opts?: {
1120
+ nx: true;
1121
+ xx?: undefined;
1122
+ } | {
1123
+ nx?: undefined;
1124
+ xx: true;
1125
+ } | undefined) => Pipeline<[...TCommands, Command<any, "OK" | null>]>;
1126
+ /**
1127
+ * @see https://redis.io/commands/json.strappend
1128
+ */
1129
+ strappend: (key: string, path: string, value: string) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
1130
+ /**
1131
+ * @see https://redis.io/commands/json.strlen
1132
+ */
1133
+ strlen: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
1134
+ /**
1135
+ * @see https://redis.io/commands/json.toggle
1136
+ */
1137
+ toggle: (key: string, path: string) => Pipeline<[...TCommands, Command<any, number[]>]>;
1138
+ /**
1139
+ * @see https://redis.io/commands/json.type
1140
+ */
1141
+ type: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, string[]>]>;
1142
+ };
1143
+ }
1144
+
1145
+ /**
1146
+ * Creates a new script.
1147
+ *
1148
+ * Scripts offer the ability to optimistically try to execute a script without having to send the
1149
+ * entire script to the server. If the script is loaded on the server, it tries again by sending
1150
+ * the entire script. Afterwards, the script is cached on the server.
1151
+ *
1152
+ * @example
1153
+ * ```ts
1154
+ * const redis = new Redis({...})
1155
+ *
1156
+ * const script = redis.createScript<string>("return ARGV[1];")
1157
+ * const arg1 = await script.eval([], ["Hello World"])
1158
+ * expect(arg1, "Hello World")
1159
+ * ```
1160
+ */
1161
+ declare class Script<TResult = unknown> {
1162
+ readonly script: string;
1163
+ readonly sha1: string;
1164
+ private readonly redis;
1165
+ constructor(redis: Redis, script: string);
1166
+ /**
1167
+ * Send an `EVAL` command to redis.
1168
+ */
1169
+ eval(keys: string[], args: string[]): Promise<TResult>;
1170
+ /**
1171
+ * Calculates the sha1 hash of the script and then calls `EVALSHA`.
1172
+ */
1173
+ evalsha(keys: string[], args: string[]): Promise<TResult>;
1174
+ /**
1175
+ * Optimistically try to run `EVALSHA` first.
1176
+ * If the script is not loaded in redis, it will fall back and try again with `EVAL`.
1177
+ *
1178
+ * Following calls will be able to use the cached script
1179
+ */
1180
+ exec(keys: string[], args: string[]): Promise<TResult>;
1181
+ /**
1182
+ * Compute the sha1 hash of the script and return its hex representation.
1183
+ */
1184
+ private digest;
1185
+ }
1186
+
1187
+ /**
1188
+ * Serverless redis client for upstash.
1189
+ */
1190
+ declare class Redis {
1191
+ protected client: Requester;
1192
+ protected opts?: CommandOptions<any, any>;
1193
+ protected enableTelemetry: boolean;
1194
+ /**
1195
+ * Create a new redis client
1196
+ *
1197
+ * @example
1198
+ * ```typescript
1199
+ * const redis = new Redis({
1200
+ * url: "<UPSTASH_REDIS_REST_URL>",
1201
+ * token: "<UPSTASH_REDIS_REST_TOKEN>",
1202
+ * });
1203
+ * ```
1204
+ */
1205
+ constructor(client: Requester, opts?: RedisOptions);
1206
+ get json(): {
1207
+ /**
1208
+ * @see https://redis.io/commands/json.arrappend
1209
+ */
1210
+ arrappend: (key: string, path: string, ...values: unknown[]) => Promise<(number | null)[]>;
1211
+ /**
1212
+ * @see https://redis.io/commands/json.arrindex
1213
+ */
1214
+ arrindex: (key: string, path: string, value: unknown, start?: number | undefined, stop?: number | undefined) => Promise<(number | null)[]>;
1215
+ /**
1216
+ * @see https://redis.io/commands/json.arrinsert
1217
+ */
1218
+ arrinsert: (key: string, path: string, index: number, ...values: unknown[]) => Promise<(number | null)[]>;
1219
+ /**
1220
+ * @see https://redis.io/commands/json.arrlen
1221
+ */
1222
+ arrlen: (key: string, path?: string | undefined) => Promise<(number | null)[]>;
1223
+ /**
1224
+ * @see https://redis.io/commands/json.arrpop
1225
+ */
1226
+ arrpop: (key: string, path?: string | undefined, index?: number | undefined) => Promise<unknown[]>;
1227
+ /**
1228
+ * @see https://redis.io/commands/json.arrtrim
1229
+ */
1230
+ arrtrim: (key: string, path?: string | undefined, start?: number | undefined, stop?: number | undefined) => Promise<(number | null)[]>;
1231
+ /**
1232
+ * @see https://redis.io/commands/json.clear
1233
+ */
1234
+ clear: (key: string, path?: string | undefined) => Promise<number>;
1235
+ /**
1236
+ * @see https://redis.io/commands/json.del
1237
+ */
1238
+ del: (key: string, path?: string | undefined) => Promise<number>;
1239
+ /**
1240
+ * @see https://redis.io/commands/json.forget
1241
+ */
1242
+ forget: (key: string, path?: string | undefined) => Promise<number>;
1243
+ /**
1244
+ * @see https://redis.io/commands/geoadd
1245
+ */
1246
+ geoadd: (args_0: string, args_1: GeoAddCommandOptions | GeoMember<unknown>, ...args_2: GeoMember<unknown>[]) => Promise<number | null>;
1247
+ /**
1248
+ * @see https://redis.io/commands/geopos
1249
+ */
1250
+ geopos: (args_0: string, ...args_1: unknown[]) => Promise<{
1251
+ lng: number;
1252
+ lat: number;
1253
+ }[]>;
1254
+ /**
1255
+ * @see https://redis.io/commands/geodist
1256
+ */
1257
+ geodist: (key: string, member1: unknown, member2: unknown, unit?: "M" | "KM" | "FT" | "MI" | undefined) => Promise<number | null>;
1258
+ /**
1259
+ * @see https://redis.io/commands/geohash
1260
+ */
1261
+ geohash: (args_0: string, ...args_1: unknown[]) => Promise<(string | null)[]>;
1262
+ /**
1263
+ * @see https://redis.io/commands/geosearch
1264
+ */
1265
+ geosearch: (key: string, centerPoint: {
1266
+ type: "FROMLONLAT" | "fromlonlat";
1267
+ coordinate: {
1268
+ lon: number;
1269
+ lat: number;
1270
+ };
1271
+ } | {
1272
+ type: "FROMMEMBER" | "frommember";
1273
+ member: unknown;
1274
+ }, shape: {
1275
+ type: "BYRADIUS" | "byradius";
1276
+ radius: number;
1277
+ radiusType: "M" | "KM" | "FT" | "MI";
1278
+ } | {
1279
+ type: "BYBOX" | "bybox";
1280
+ rect: {
1281
+ width: number;
1282
+ height: number;
1283
+ };
1284
+ rectType: "M" | "KM" | "FT" | "MI";
1285
+ }, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
1286
+ count?: {
1287
+ limit: number;
1288
+ any?: boolean | undefined;
1289
+ } | undefined;
1290
+ withCoord?: boolean | undefined;
1291
+ withDist?: boolean | undefined;
1292
+ withHash?: boolean | undefined;
1293
+ } | undefined) => Promise<({
1294
+ member: unknown;
1295
+ } & {
1296
+ coord?: {
1297
+ long: number;
1298
+ lat: number;
1299
+ } | undefined;
1300
+ dist?: number | undefined;
1301
+ hash?: string | undefined;
1302
+ })[]>;
1303
+ /**
1304
+ * @see https://redis.io/commands/geosearchstore
1305
+ */
1306
+ geosearchstore: (destination: string, key: string, centerPoint: {
1307
+ type: "FROMLONLAT" | "fromlonlat";
1308
+ coordinate: {
1309
+ lon: number;
1310
+ lat: number;
1311
+ };
1312
+ } | {
1313
+ type: "FROMMEMBER" | "frommember";
1314
+ member: unknown;
1315
+ }, shape: {
1316
+ type: "BYRADIUS" | "byradius";
1317
+ radius: number;
1318
+ radiusType: "M" | "KM" | "FT" | "MI";
1319
+ } | {
1320
+ type: "BYBOX" | "bybox";
1321
+ rect: {
1322
+ width: number;
1323
+ height: number;
1324
+ };
1325
+ rectType: "M" | "KM" | "FT" | "MI";
1326
+ }, order: "ASC" | "DESC" | "asc" | "desc", opts?: {
1327
+ count?: {
1328
+ limit: number;
1329
+ any?: boolean | undefined;
1330
+ } | undefined;
1331
+ storeDist?: boolean | undefined;
1332
+ } | undefined) => Promise<number>;
1333
+ /**
1334
+ * @see https://redis.io/commands/json.get
1335
+ */
1336
+ get: (...args: CommandArgs<typeof JsonGetCommand>) => Promise<any>;
1337
+ /**
1338
+ * @see https://redis.io/commands/json.mget
1339
+ */
1340
+ mget: (keys: string[], path: string) => Promise<any>;
1341
+ /**
1342
+ * @see https://redis.io/commands/json.numincrby
1343
+ */
1344
+ numincrby: (key: string, path: string, value: number) => Promise<(number | null)[]>;
1345
+ /**
1346
+ * @see https://redis.io/commands/json.nummultby
1347
+ */
1348
+ nummultby: (key: string, path: string, value: number) => Promise<(number | null)[]>;
1349
+ /**
1350
+ * @see https://redis.io/commands/json.objkeys
1351
+ */
1352
+ objkeys: (key: string, path?: string | undefined) => Promise<(string[] | null)[]>;
1353
+ /**
1354
+ * @see https://redis.io/commands/json.objlen
1355
+ */
1356
+ objlen: (key: string, path?: string | undefined) => Promise<(number | null)[]>;
1357
+ /**
1358
+ * @see https://redis.io/commands/json.resp
1359
+ */
1360
+ resp: (key: string, path?: string | undefined) => Promise<any>;
1361
+ /**
1362
+ * @see https://redis.io/commands/json.set
1363
+ */
1364
+ set: (key: string, path: string, value: string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown>)[], opts?: {
1365
+ nx: true;
1366
+ xx?: undefined;
1367
+ } | {
1368
+ nx?: undefined;
1369
+ xx: true;
1370
+ } | undefined) => Promise<"OK" | null>;
1371
+ /**
1372
+ * @see https://redis.io/commands/json.strappend
1373
+ */
1374
+ strappend: (key: string, path: string, value: string) => Promise<(number | null)[]>;
1375
+ /**
1376
+ * @see https://redis.io/commands/json.strlen
1377
+ */
1378
+ strlen: (key: string, path?: string | undefined) => Promise<(number | null)[]>;
1379
+ /**
1380
+ * @see https://redis.io/commands/json.toggle
1381
+ */
1382
+ toggle: (key: string, path: string) => Promise<number[]>;
1383
+ /**
1384
+ * @see https://redis.io/commands/json.type
1385
+ */
1386
+ type: (key: string, path?: string | undefined) => Promise<string[]>;
1387
+ };
1388
+ /**
1389
+ * Wrap a new middleware around the HTTP client.
1390
+ */
1391
+ use: <TResult = unknown>(middleware: (r: UpstashRequest, next: <TResult_1 = unknown>(req: UpstashRequest) => Promise<UpstashResponse<TResult_1>>) => Promise<UpstashResponse<TResult>>) => void;
1392
+ /**
1393
+ * Technically this is not private, we can hide it from intellisense by doing this
1394
+ */
1395
+ protected addTelemetry: (telemetry: Telemetry) => void;
1396
+ createScript(script: string): Script;
1397
+ /**
1398
+ * Create a new pipeline that allows you to send requests in bulk.
1399
+ *
1400
+ * @see {@link Pipeline}
1401
+ */
1402
+ pipeline: () => Pipeline<[]>;
1403
+ /**
1404
+ * Create a new transaction to allow executing multiple steps atomically.
1405
+ *
1406
+ * All the commands in a transaction are serialized and executed sequentially. A request sent by
1407
+ * another client will never be served in the middle of the execution of a Redis Transaction. This
1408
+ * guarantees that the commands are executed as a single isolated operation.
1409
+ *
1410
+ * @see {@link Pipeline}
1411
+ */
1412
+ multi: () => Pipeline<[]>;
1413
+ /**
1414
+ * @see https://redis.io/commands/append
1415
+ */
1416
+ append: (key: string, value: string) => Promise<number>;
1417
+ /**
1418
+ * @see https://redis.io/commands/bitcount
1419
+ */
1420
+ bitcount: (key: string, start: number, end: number) => Promise<number>;
1421
+ /**
1422
+ * @see https://redis.io/commands/bitop
1423
+ */
1424
+ bitop: {
1425
+ (op: "and" | "or" | "xor", destinationKey: string, sourceKey: string, ...sourceKeys: string[]): Promise<number>;
1426
+ (op: "not", destinationKey: string, sourceKey: string): Promise<number>;
1427
+ };
1428
+ /**
1429
+ * @see https://redis.io/commands/bitpos
1430
+ */
1431
+ bitpos: (key: string, bit: 0 | 1, start?: number | undefined, end?: number | undefined) => Promise<number>;
1432
+ /**
1433
+ * @see https://redis.io/commands/dbsize
1434
+ */
1435
+ dbsize: () => Promise<number>;
1436
+ /**
1437
+ * @see https://redis.io/commands/decr
1438
+ */
1439
+ decr: (key: string) => Promise<number>;
1440
+ /**
1441
+ * @see https://redis.io/commands/decrby
1442
+ */
1443
+ decrby: (key: string, decrement: number) => Promise<number>;
1444
+ /**
1445
+ * @see https://redis.io/commands/del
1446
+ */
1447
+ del: (...args: CommandArgs<typeof DelCommand>) => Promise<number>;
1448
+ /**
1449
+ * @see https://redis.io/commands/echo
1450
+ */
1451
+ echo: (message: string) => Promise<string>;
1452
+ /**
1453
+ * @see https://redis.io/commands/eval
1454
+ */
1455
+ eval: <TArgs extends unknown[], TData = unknown>(script: string, keys: string[], args: TArgs) => Promise<TData>;
1456
+ /**
1457
+ * @see https://redis.io/commands/evalsha
1458
+ */
1459
+ evalsha: <TArgs extends unknown[], TData = unknown>(sha1: string, keys: string[], args: TArgs) => Promise<TData>;
1460
+ /**
1461
+ * @see https://redis.io/commands/exists
1462
+ */
1463
+ exists: (...args: CommandArgs<typeof ExistsCommand>) => Promise<number>;
1464
+ /**
1465
+ * @see https://redis.io/commands/expire
1466
+ */
1467
+ expire: (key: string, seconds: number) => Promise<0 | 1>;
1468
+ /**
1469
+ * @see https://redis.io/commands/expireat
1470
+ */
1471
+ expireat: (key: string, unix: number) => Promise<0 | 1>;
1472
+ /**
1473
+ * @see https://redis.io/commands/flushall
1474
+ */
1475
+ flushall: (args?: CommandArgs<typeof FlushAllCommand>) => Promise<"OK">;
1476
+ /**
1477
+ * @see https://redis.io/commands/flushdb
1478
+ */
1479
+ flushdb: (opts?: {
1480
+ async?: boolean | undefined;
1481
+ } | undefined) => Promise<"OK">;
1482
+ /**
1483
+ * @see https://redis.io/commands/get
1484
+ */
1485
+ get: <TData>(key: string) => Promise<TData | null>;
1486
+ /**
1487
+ * @see https://redis.io/commands/getbit
1488
+ */
1489
+ getbit: (key: string, offset: number) => Promise<0 | 1>;
1490
+ /**
1491
+ * @see https://redis.io/commands/getdel
1492
+ */
1493
+ getdel: <TData>(key: string) => Promise<TData | null>;
1494
+ /**
1495
+ * @see https://redis.io/commands/getrange
1496
+ */
1497
+ getrange: (key: string, start: number, end: number) => Promise<string>;
1498
+ /**
1499
+ * @see https://redis.io/commands/getset
1500
+ */
1501
+ getset: <TData>(key: string, value: TData) => Promise<TData | null>;
1502
+ /**
1503
+ * @see https://redis.io/commands/hdel
1504
+ */
1505
+ hdel: (key: string, ...fields: string[]) => Promise<0 | 1>;
1506
+ /**
1507
+ * @see https://redis.io/commands/hexists
1508
+ */
1509
+ hexists: (key: string, field: string) => Promise<number>;
1510
+ /**
1511
+ * @see https://redis.io/commands/hget
1512
+ */
1513
+ hget: <TData>(key: string, field: string) => Promise<TData | null>;
1514
+ /**
1515
+ * @see https://redis.io/commands/hgetall
1516
+ */
1517
+ hgetall: <TData extends Record<string, unknown>>(key: string) => Promise<TData | null>;
1518
+ /**
1519
+ * @see https://redis.io/commands/hincrby
1520
+ */
1521
+ hincrby: (key: string, field: string, increment: number) => Promise<number>;
1522
+ /**
1523
+ * @see https://redis.io/commands/hincrbyfloat
1524
+ */
1525
+ hincrbyfloat: (key: string, field: string, increment: number) => Promise<number>;
1526
+ /**
1527
+ * @see https://redis.io/commands/hkeys
1528
+ */
1529
+ hkeys: (key: string) => Promise<string[]>;
1530
+ /**
1531
+ * @see https://redis.io/commands/hlen
1532
+ */
1533
+ hlen: (key: string) => Promise<number>;
1534
+ /**
1535
+ * @see https://redis.io/commands/hmget
1536
+ */
1537
+ hmget: <TData extends Record<string, unknown>>(key: string, ...fields: string[]) => Promise<TData | null>;
1538
+ /**
1539
+ * @see https://redis.io/commands/hmset
1540
+ */
1541
+ hmset: <TData>(key: string, kv: {
1542
+ [field: string]: TData;
1543
+ }) => Promise<"OK">;
1544
+ /**
1545
+ * @see https://redis.io/commands/hrandfield
1546
+ */
1547
+ hrandfield: {
1548
+ (key: string): Promise<string>;
1549
+ (key: string, count: number): Promise<string[]>;
1550
+ <TData extends Record<string, unknown>>(key: string, count: number, withValues: boolean): Promise<Partial<TData>>;
1551
+ };
1552
+ /**
1553
+ * @see https://redis.io/commands/hscan
1554
+ */
1555
+ hscan: (key: string, cursor: number, cmdOpts?: ScanCommandOptions | undefined) => Promise<[number, (string | number)[]]>;
1556
+ /**
1557
+ * @see https://redis.io/commands/hset
1558
+ */
1559
+ hset: <TData>(key: string, kv: {
1560
+ [field: string]: TData;
1561
+ }) => Promise<number>;
1562
+ /**
1563
+ * @see https://redis.io/commands/hsetnx
1564
+ */
1565
+ hsetnx: <TData>(key: string, field: string, value: TData) => Promise<0 | 1>;
1566
+ /**
1567
+ * @see https://redis.io/commands/hstrlen
1568
+ */
1569
+ hstrlen: (key: string, field: string) => Promise<number>;
1570
+ /**
1571
+ * @see https://redis.io/commands/hvals
1572
+ */
1573
+ hvals: (key: string) => Promise<any>;
1574
+ /**
1575
+ * @see https://redis.io/commands/incr
1576
+ */
1577
+ incr: (key: string) => Promise<number>;
1578
+ /**
1579
+ * @see https://redis.io/commands/incrby
1580
+ */
1581
+ incrby: (key: string, value: number) => Promise<number>;
1582
+ /**
1583
+ * @see https://redis.io/commands/incrbyfloat
1584
+ */
1585
+ incrbyfloat: (key: string, value: number) => Promise<number>;
1586
+ /**
1587
+ * @see https://redis.io/commands/keys
1588
+ */
1589
+ keys: (pattern: string) => Promise<string[]>;
1590
+ /**
1591
+ * @see https://redis.io/commands/lindex
1592
+ */
1593
+ lindex: (key: string, index: number) => Promise<any>;
1594
+ /**
1595
+ * @see https://redis.io/commands/linsert
1596
+ */
1597
+ linsert: <TData>(key: string, direction: "before" | "after", pivot: TData, value: TData) => Promise<number>;
1598
+ /**
1599
+ * @see https://redis.io/commands/llen
1600
+ */
1601
+ llen: (key: string) => Promise<number>;
1602
+ /**
1603
+ * @see https://redis.io/commands/lmove
1604
+ */
1605
+ lmove: <TData = string>(source: string, destination: string, whereFrom: "left" | "right", whereTo: "left" | "right") => Promise<TData>;
1606
+ /**
1607
+ * @see https://redis.io/commands/lpop
1608
+ */
1609
+ lpop: <TData>(key: string, count?: number | undefined) => Promise<TData | null>;
1610
+ /**
1611
+ * @see https://redis.io/commands/lpos
1612
+ */
1613
+ lpos: <TData = number>(key: string, element: unknown, opts?: {
1614
+ rank?: number | undefined;
1615
+ count?: number | undefined;
1616
+ maxLen?: number | undefined;
1617
+ } | undefined) => Promise<TData>;
1618
+ /**
1619
+ * @see https://redis.io/commands/lpush
1620
+ */
1621
+ lpush: <TData>(key: string, ...elements: TData[]) => Promise<number>;
1622
+ /**
1623
+ * @see https://redis.io/commands/lpushx
1624
+ */
1625
+ lpushx: <TData>(key: string, ...elements: TData[]) => Promise<number>;
1626
+ /**
1627
+ * @see https://redis.io/commands/lrange
1628
+ */
1629
+ lrange: <TResult = string>(key: string, start: number, end: number) => Promise<TResult[]>;
1630
+ /**
1631
+ * @see https://redis.io/commands/lrem
1632
+ */
1633
+ lrem: <TData>(key: string, count: number, value: TData) => Promise<number>;
1634
+ /**
1635
+ * @see https://redis.io/commands/lset
1636
+ */
1637
+ lset: <TData>(key: string, index: number, value: TData) => Promise<"OK">;
1638
+ /**
1639
+ * @see https://redis.io/commands/ltrim
1640
+ */
1641
+ ltrim: (key: string, start: number, end: number) => Promise<"OK">;
1642
+ /**
1643
+ * @see https://redis.io/commands/mget
1644
+ */
1645
+ mget: <TData extends unknown[]>(...args: CommandArgs<typeof MGetCommand>) => Promise<TData>;
1646
+ /**
1647
+ * @see https://redis.io/commands/mset
1648
+ */
1649
+ mset: <TData>(kv: {
1650
+ [key: string]: TData;
1651
+ }) => Promise<"OK">;
1652
+ /**
1653
+ * @see https://redis.io/commands/msetnx
1654
+ */
1655
+ msetnx: <TData>(kv: {
1656
+ [key: string]: TData;
1657
+ }) => Promise<number>;
1658
+ /**
1659
+ * @see https://redis.io/commands/persist
1660
+ */
1661
+ persist: (key: string) => Promise<0 | 1>;
1662
+ /**
1663
+ * @see https://redis.io/commands/pexpire
1664
+ */
1665
+ pexpire: (key: string, milliseconds: number) => Promise<0 | 1>;
1666
+ /**
1667
+ * @see https://redis.io/commands/pexpireat
1668
+ */
1669
+ pexpireat: (key: string, unix: number) => Promise<0 | 1>;
1670
+ /**
1671
+ * @see https://redis.io/commands/ping
1672
+ */
1673
+ ping: (args?: CommandArgs<typeof PingCommand>) => Promise<string>;
1674
+ /**
1675
+ * @see https://redis.io/commands/psetex
1676
+ */
1677
+ psetex: <TData>(key: string, ttl: number, value: TData) => Promise<string>;
1678
+ /**
1679
+ * @see https://redis.io/commands/pttl
1680
+ */
1681
+ pttl: (key: string) => Promise<number>;
1682
+ /**
1683
+ * @see https://redis.io/commands/publish
1684
+ */
1685
+ publish: (channel: string, message: unknown) => Promise<number>;
1686
+ /**
1687
+ * @see https://redis.io/commands/randomkey
1688
+ */
1689
+ randomkey: () => Promise<string | null>;
1690
+ /**
1691
+ * @see https://redis.io/commands/rename
1692
+ */
1693
+ rename: (source: string, destination: string) => Promise<"OK">;
1694
+ /**
1695
+ * @see https://redis.io/commands/renamenx
1696
+ */
1697
+ renamenx: (source: string, destination: string) => Promise<0 | 1>;
1698
+ /**
1699
+ * @see https://redis.io/commands/rpop
1700
+ */
1701
+ rpop: <TData = string>(key: string, count?: number | undefined) => Promise<TData | null>;
1702
+ /**
1703
+ * @see https://redis.io/commands/rpush
1704
+ */
1705
+ rpush: <TData>(key: string, ...elements: TData[]) => Promise<number>;
1706
+ /**
1707
+ * @see https://redis.io/commands/rpushx
1708
+ */
1709
+ rpushx: <TData>(key: string, ...elements: TData[]) => Promise<number>;
1710
+ /**
1711
+ * @see https://redis.io/commands/sadd
1712
+ */
1713
+ sadd: <TData>(key: string, ...members: TData[]) => Promise<number>;
1714
+ /**
1715
+ * @see https://redis.io/commands/scan
1716
+ */
1717
+ scan: (cursor: number, opts?: ScanCommandOptions | undefined) => Promise<[number, string[]]>;
1718
+ /**
1719
+ * @see https://redis.io/commands/scard
1720
+ */
1721
+ scard: (key: string) => Promise<number>;
1722
+ /**
1723
+ * @see https://redis.io/commands/script-exists
1724
+ */
1725
+ scriptExists: (...args: CommandArgs<typeof ScriptExistsCommand>) => Promise<number[]>;
1726
+ /**
1727
+ * @see https://redis.io/commands/script-flush
1728
+ */
1729
+ scriptFlush: (opts?: ScriptFlushCommandOptions | undefined) => Promise<"OK">;
1730
+ /**
1731
+ * @see https://redis.io/commands/script-load
1732
+ */
1733
+ scriptLoad: (script: string) => Promise<string>;
1734
+ /**
1735
+ * @see https://redis.io/commands/sdiff
1736
+ */
1737
+ sdiff: (key: string, ...keys: string[]) => Promise<unknown[]>;
1738
+ /**
1739
+ * @see https://redis.io/commands/sdiffstore
1740
+ */
1741
+ sdiffstore: (destination: string, ...keys: string[]) => Promise<number>;
1742
+ /**
1743
+ * @see https://redis.io/commands/set
1744
+ */
1745
+ set: <TData>(key: string, value: TData, opts?: SetCommandOptions) => Promise<"OK" | TData | null>;
1746
+ /**
1747
+ * @see https://redis.io/commands/setbit
1748
+ */
1749
+ setbit: (key: string, offset: number, value: 0 | 1) => Promise<0 | 1>;
1750
+ /**
1751
+ * @see https://redis.io/commands/setex
1752
+ */
1753
+ setex: <TData>(key: string, ttl: number, value: TData) => Promise<"OK">;
1754
+ /**
1755
+ * @see https://redis.io/commands/setnx
1756
+ */
1757
+ setnx: <TData>(key: string, value: TData) => Promise<number>;
1758
+ /**
1759
+ * @see https://redis.io/commands/setrange
1760
+ */
1761
+ setrange: (key: string, offset: number, value: string) => Promise<number>;
1762
+ /**
1763
+ * @see https://redis.io/commands/sinter
1764
+ */
1765
+ sinter: (key: string, ...keys: string[]) => Promise<string[]>;
1766
+ /**
1767
+ * @see https://redis.io/commands/sinterstore
1768
+ */
1769
+ sinterstore: (destination: string, key: string, ...keys: string[]) => Promise<number>;
1770
+ /**
1771
+ * @see https://redis.io/commands/sismember
1772
+ */
1773
+ sismember: <TData>(key: string, member: TData) => Promise<0 | 1>;
1774
+ /**
1775
+ * @see https://redis.io/commands/smismember
1776
+ */
1777
+ smismember: <TMembers extends unknown[]>(key: string, members: TMembers) => Promise<(0 | 1)[]>;
1778
+ /**
1779
+ * @see https://redis.io/commands/smembers
1780
+ */
1781
+ smembers: <TData extends unknown[] = string[]>(key: string) => Promise<TData>;
1782
+ /**
1783
+ * @see https://redis.io/commands/smove
1784
+ */
1785
+ smove: <TData>(source: string, destination: string, member: TData) => Promise<0 | 1>;
1786
+ /**
1787
+ * @see https://redis.io/commands/spop
1788
+ */
1789
+ spop: <TData>(key: string, count?: number | undefined) => Promise<TData | null>;
1790
+ /**
1791
+ * @see https://redis.io/commands/srandmember
1792
+ */
1793
+ srandmember: <TData>(key: string, count?: number | undefined) => Promise<TData | null>;
1794
+ /**
1795
+ * @see https://redis.io/commands/srem
1796
+ */
1797
+ srem: <TData>(key: string, ...members: TData[]) => Promise<number>;
1798
+ /**
1799
+ * @see https://redis.io/commands/sscan
1800
+ */
1801
+ sscan: (key: string, cursor: number, opts?: ScanCommandOptions | undefined) => Promise<[number, (string | number)[]]>;
1802
+ /**
1803
+ * @see https://redis.io/commands/strlen
1804
+ */
1805
+ strlen: (key: string) => Promise<number>;
1806
+ /**
1807
+ * @see https://redis.io/commands/sunion
1808
+ */
1809
+ sunion: (key: string, ...keys: string[]) => Promise<unknown[]>;
1810
+ /**
1811
+ * @see https://redis.io/commands/sunionstore
1812
+ */
1813
+ sunionstore: (destination: string, key: string, ...keys: string[]) => Promise<number>;
1814
+ /**
1815
+ * @see https://redis.io/commands/time
1816
+ */
1817
+ time: () => Promise<[number, number]>;
1818
+ /**
1819
+ * @see https://redis.io/commands/touch
1820
+ */
1821
+ touch: (...args: CommandArgs<typeof TouchCommand>) => Promise<number>;
1822
+ /**
1823
+ * @see https://redis.io/commands/ttl
1824
+ */
1825
+ ttl: (key: string) => Promise<number>;
1826
+ /**
1827
+ * @see https://redis.io/commands/type
1828
+ */
1829
+ type: (key: string) => Promise<Type>;
1830
+ /**
1831
+ * @see https://redis.io/commands/unlink
1832
+ */
1833
+ unlink: (...args: CommandArgs<typeof UnlinkCommand>) => Promise<number>;
1834
+ /**
1835
+ * @see https://redis.io/commands/xadd
1836
+ */
1837
+ xadd: (key: string, id: string, entries: {
1838
+ [field: string]: unknown;
1839
+ }, opts?: {
1840
+ nomkStream?: boolean | undefined;
1841
+ trim?: (({
1842
+ type: "MAXLEN" | "maxlen";
1843
+ threshold: number;
1844
+ } | {
1845
+ type: "MINID" | "minid";
1846
+ threshold: string;
1847
+ }) & ({
1848
+ comparison: "~";
1849
+ limit?: number | undefined;
1850
+ } | {
1851
+ comparison: "=";
1852
+ limit?: undefined;
1853
+ })) | undefined;
1854
+ } | undefined) => Promise<string>;
1855
+ /**
1856
+ * @see https://redis.io/commands/xrange
1857
+ */
1858
+ xrange: (key: string, start: string, end: string, count?: number | undefined) => Promise<Record<string, Record<string, unknown>>>;
1859
+ /**
1860
+ * @see https://redis.io/commands/zadd
1861
+ */
1862
+ zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [key: string, opts: ZAddCommandOptions | ZAddCommandOptionsWithIncr, ScoreMember<TData>, ...ScoreMember<TData>[]]) => Promise<number | null>;
1863
+ /**
1864
+ * @see https://redis.io/commands/zcard
1865
+ */
1866
+ zcard: (key: string) => Promise<number>;
1867
+ /**
1868
+ * @see https://redis.io/commands/zcount
1869
+ */
1870
+ zcount: (key: string, min: string | number, max: string | number) => Promise<number>;
1871
+ /**
1872
+ * @see https://redis.io/commands/zdiffstore
1873
+ */
1874
+ zdiffstore: (destination: string, numkeys: number, ...keys: string[]) => Promise<number>;
1875
+ /**
1876
+ * @see https://redis.io/commands/zincrby
1877
+ */
1878
+ zincrby: <TData>(key: string, increment: number, member: TData) => Promise<number>;
1879
+ /**
1880
+ * @see https://redis.io/commands/zinterstore
1881
+ */
1882
+ zinterstore: (destination: string, numKeys: number, keys: string[], opts?: ZInterStoreCommandOptions | undefined) => Promise<number>;
1883
+ /**
1884
+ * @see https://redis.io/commands/zlexcount
1885
+ */
1886
+ zlexcount: (key: string, min: string, max: string) => Promise<number>;
1887
+ /**
1888
+ * @see https://redis.io/commands/zmscore
1889
+ */
1890
+ zmscore: (key: string, members: unknown[]) => Promise<number[] | null>;
1891
+ /**
1892
+ * @see https://redis.io/commands/zpopmax
1893
+ */
1894
+ zpopmax: <TData>(key: string, count?: number | undefined) => Promise<TData[]>;
1895
+ /**
1896
+ * @see https://redis.io/commands/zpopmin
1897
+ */
1898
+ zpopmin: <TData>(key: string, count?: number | undefined) => Promise<TData[]>;
1899
+ /**
1900
+ * @see https://redis.io/commands/zrange
1901
+ */
1902
+ zrange: <TData extends unknown[]>(...args: [key: string, min: number, max: number, opts?: ZRangeCommandOptions] | [
1903
+ key: string,
1904
+ min: `(${string}` | `[${string}` | "-" | "+",
1905
+ max: `(${string}` | `[${string}` | "-" | "+",
1906
+ opts: {
1907
+ byLex: true;
1908
+ } & ZRangeCommandOptions
1909
+ ] | [
1910
+ key: string,
1911
+ min: number | `(${number}` | "-inf" | "+inf",
1912
+ max: number | `(${number}` | "-inf" | "+inf",
1913
+ opts: {
1914
+ byScore: true;
1915
+ } & ZRangeCommandOptions
1916
+ ]) => Promise<TData>;
1917
+ /**
1918
+ * @see https://redis.io/commands/zrank
1919
+ */
1920
+ zrank: <TData>(key: string, member: TData) => Promise<number | null>;
1921
+ /**
1922
+ * @see https://redis.io/commands/zrem
1923
+ */
1924
+ zrem: <TData>(key: string, ...members: TData[]) => Promise<number>;
1925
+ /**
1926
+ * @see https://redis.io/commands/zremrangebylex
1927
+ */
1928
+ zremrangebylex: (key: string, min: string, max: string) => Promise<number>;
1929
+ /**
1930
+ * @see https://redis.io/commands/zremrangebyrank
1931
+ */
1932
+ zremrangebyrank: (key: string, start: number, stop: number) => Promise<number>;
1933
+ /**
1934
+ * @see https://redis.io/commands/zremrangebyscore
1935
+ */
1936
+ zremrangebyscore: (key: string, min: number, max: number) => Promise<number>;
1937
+ /**
1938
+ * @see https://redis.io/commands/zrevrank
1939
+ */
1940
+ zrevrank: <TData>(key: string, member: TData) => Promise<number | null>;
1941
+ /**
1942
+ * @see https://redis.io/commands/zscan
1943
+ */
1944
+ zscan: (key: string, cursor: number, opts?: ScanCommandOptions | undefined) => Promise<[number, (string | number)[]]>;
1945
+ /**
1946
+ * @see https://redis.io/commands/zscore
1947
+ */
1948
+ zscore: <TData>(key: string, member: TData) => Promise<number | null>;
1949
+ /**
1950
+ * @see https://redis.io/commands/zunion
1951
+ */
1952
+ zunion: (numKeys: number, keys: string[], opts?: ZUnionCommandOptions | undefined) => Promise<any>;
1953
+ /**
1954
+ * @see https://redis.io/commands/zunionstore
1955
+ */
1956
+ zunionstore: (destination: string, numKeys: number, keys: string[], opts?: ZUnionStoreCommandOptions | undefined) => Promise<number>;
1957
+ }
1958
+
1959
+ export { RedisOptions as R, UpstashRequest as U, RequesterConfig as a, Redis as b, Requester as c, UpstashResponse as d };