@upstash/redis 0.0.0-ci.d46dc426-20220831 → 0.0.0-ci.d520cbfb3d6ecd9e996eec414053191d8ddacaeb

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