@upstash/redis 0.0.0-ci.dc584c15-20231010 → 0.0.0-ci.dd02f14981f2550d21bc49959450d2588b9c4f1a-20240917073031

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 (507) hide show
  1. package/README.md +17 -6
  2. package/chunk-Q6EDGL5W.js +1 -0
  3. package/chunk-VUMOES52.mjs +1 -0
  4. package/cloudflare.d.mts +55 -0
  5. package/cloudflare.d.ts +55 -0
  6. package/cloudflare.js +1 -0
  7. package/cloudflare.mjs +1 -0
  8. package/fastly.d.mts +48 -0
  9. package/fastly.d.ts +48 -0
  10. package/fastly.js +1 -0
  11. package/fastly.mjs +1 -0
  12. package/nodejs.d.mts +73 -0
  13. package/nodejs.d.ts +73 -0
  14. package/nodejs.js +1 -0
  15. package/nodejs.mjs +1 -0
  16. package/package.json +1 -96
  17. package/zmscore-B5GggKAi.d.mts +3486 -0
  18. package/zmscore-B5GggKAi.d.ts +3486 -0
  19. package/.releaserc +0 -14
  20. package/esm/deps/deno.land/x/base64@v0.2.1/base.js +0 -100
  21. package/esm/deps/deno.land/x/base64@v0.2.1/base64url.js +0 -9
  22. package/esm/deps/deno.land/x/sha1@v1.0.3/deps.js +0 -1
  23. package/esm/deps/deno.land/x/sha1@v1.0.3/mod.js +0 -191
  24. package/esm/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.js +0 -50
  25. package/esm/package.json +0 -3
  26. package/esm/pkg/commands/append.js +0 -9
  27. package/esm/pkg/commands/bitcount.js +0 -16
  28. package/esm/pkg/commands/bitop.js +0 -9
  29. package/esm/pkg/commands/bitpos.js +0 -9
  30. package/esm/pkg/commands/command.js +0 -66
  31. package/esm/pkg/commands/dbsize.js +0 -9
  32. package/esm/pkg/commands/decr.js +0 -9
  33. package/esm/pkg/commands/decrby.js +0 -9
  34. package/esm/pkg/commands/del.js +0 -9
  35. package/esm/pkg/commands/echo.js +0 -9
  36. package/esm/pkg/commands/eval.js +0 -9
  37. package/esm/pkg/commands/evalsha.js +0 -9
  38. package/esm/pkg/commands/exists.js +0 -9
  39. package/esm/pkg/commands/expire.js +0 -9
  40. package/esm/pkg/commands/expireat.js +0 -9
  41. package/esm/pkg/commands/flushall.js +0 -13
  42. package/esm/pkg/commands/flushdb.js +0 -13
  43. package/esm/pkg/commands/get.js +0 -9
  44. package/esm/pkg/commands/getbit.js +0 -9
  45. package/esm/pkg/commands/getdel.js +0 -9
  46. package/esm/pkg/commands/getrange.js +0 -9
  47. package/esm/pkg/commands/getset.js +0 -9
  48. package/esm/pkg/commands/hdel.js +0 -9
  49. package/esm/pkg/commands/hexists.js +0 -9
  50. package/esm/pkg/commands/hget.js +0 -9
  51. package/esm/pkg/commands/hgetall.js +0 -29
  52. package/esm/pkg/commands/hincrby.js +0 -9
  53. package/esm/pkg/commands/hincrbyfloat.js +0 -9
  54. package/esm/pkg/commands/hkeys.js +0 -9
  55. package/esm/pkg/commands/hlen.js +0 -9
  56. package/esm/pkg/commands/hmget.js +0 -35
  57. package/esm/pkg/commands/hmset.js +0 -13
  58. package/esm/pkg/commands/hrandfield.js +0 -39
  59. package/esm/pkg/commands/hscan.js +0 -16
  60. package/esm/pkg/commands/hset.js +0 -13
  61. package/esm/pkg/commands/hsetnx.js +0 -9
  62. package/esm/pkg/commands/hstrlen.js +0 -9
  63. package/esm/pkg/commands/hvals.js +0 -9
  64. package/esm/pkg/commands/incr.js +0 -9
  65. package/esm/pkg/commands/incrby.js +0 -9
  66. package/esm/pkg/commands/incrbyfloat.js +0 -9
  67. package/esm/pkg/commands/json_arrappend.js +0 -9
  68. package/esm/pkg/commands/json_arrindex.js +0 -9
  69. package/esm/pkg/commands/json_arrinsert.js +0 -9
  70. package/esm/pkg/commands/json_arrlen.js +0 -9
  71. package/esm/pkg/commands/json_arrpop.js +0 -9
  72. package/esm/pkg/commands/json_arrtrim.js +0 -12
  73. package/esm/pkg/commands/json_clear.js +0 -9
  74. package/esm/pkg/commands/json_del.js +0 -9
  75. package/esm/pkg/commands/json_forget.js +0 -9
  76. package/esm/pkg/commands/json_get.js +0 -30
  77. package/esm/pkg/commands/json_mget.js +0 -9
  78. package/esm/pkg/commands/json_numincrby.js +0 -9
  79. package/esm/pkg/commands/json_nummultby.js +0 -9
  80. package/esm/pkg/commands/json_objkeys.js +0 -9
  81. package/esm/pkg/commands/json_objlen.js +0 -9
  82. package/esm/pkg/commands/json_resp.js +0 -9
  83. package/esm/pkg/commands/json_set.js +0 -18
  84. package/esm/pkg/commands/json_strappend.js +0 -9
  85. package/esm/pkg/commands/json_strlen.js +0 -9
  86. package/esm/pkg/commands/json_toggle.js +0 -9
  87. package/esm/pkg/commands/json_type.js +0 -9
  88. package/esm/pkg/commands/keys.js +0 -9
  89. package/esm/pkg/commands/lindex.js +0 -6
  90. package/esm/pkg/commands/linsert.js +0 -6
  91. package/esm/pkg/commands/llen.js +0 -9
  92. package/esm/pkg/commands/lmove.js +0 -9
  93. package/esm/pkg/commands/lpop.js +0 -9
  94. package/esm/pkg/commands/lpos.js +0 -19
  95. package/esm/pkg/commands/lpush.js +0 -9
  96. package/esm/pkg/commands/lpushx.js +0 -9
  97. package/esm/pkg/commands/lrange.js +0 -6
  98. package/esm/pkg/commands/lrem.js +0 -6
  99. package/esm/pkg/commands/lset.js +0 -6
  100. package/esm/pkg/commands/ltrim.js +0 -6
  101. package/esm/pkg/commands/mget.js +0 -9
  102. package/esm/pkg/commands/mod.js +0 -142
  103. package/esm/pkg/commands/mset.js +0 -12
  104. package/esm/pkg/commands/msetnx.js +0 -9
  105. package/esm/pkg/commands/persist.js +0 -9
  106. package/esm/pkg/commands/pexpire.js +0 -9
  107. package/esm/pkg/commands/pexpireat.js +0 -9
  108. package/esm/pkg/commands/ping.js +0 -13
  109. package/esm/pkg/commands/psetex.js +0 -9
  110. package/esm/pkg/commands/pttl.js +0 -9
  111. package/esm/pkg/commands/publish.js +0 -9
  112. package/esm/pkg/commands/randomkey.js +0 -9
  113. package/esm/pkg/commands/rename.js +0 -9
  114. package/esm/pkg/commands/renamenx.js +0 -9
  115. package/esm/pkg/commands/rpop.js +0 -9
  116. package/esm/pkg/commands/rpush.js +0 -9
  117. package/esm/pkg/commands/rpushx.js +0 -9
  118. package/esm/pkg/commands/sadd.js +0 -9
  119. package/esm/pkg/commands/scan.js +0 -19
  120. package/esm/pkg/commands/scard.js +0 -9
  121. package/esm/pkg/commands/script_exists.js +0 -12
  122. package/esm/pkg/commands/script_flush.js +0 -16
  123. package/esm/pkg/commands/script_load.js +0 -9
  124. package/esm/pkg/commands/sdiff.js +0 -9
  125. package/esm/pkg/commands/sdiffstore.js +0 -9
  126. package/esm/pkg/commands/set.js +0 -36
  127. package/esm/pkg/commands/setbit.js +0 -9
  128. package/esm/pkg/commands/setex.js +0 -9
  129. package/esm/pkg/commands/setnx.js +0 -9
  130. package/esm/pkg/commands/setrange.js +0 -9
  131. package/esm/pkg/commands/sinter.js +0 -9
  132. package/esm/pkg/commands/sinterstore.js +0 -9
  133. package/esm/pkg/commands/sismember.js +0 -9
  134. package/esm/pkg/commands/smembers.js +0 -9
  135. package/esm/pkg/commands/smismember.js +0 -9
  136. package/esm/pkg/commands/smove.js +0 -9
  137. package/esm/pkg/commands/spop.js +0 -13
  138. package/esm/pkg/commands/srandmember.js +0 -13
  139. package/esm/pkg/commands/srem.js +0 -9
  140. package/esm/pkg/commands/sscan.js +0 -16
  141. package/esm/pkg/commands/strlen.js +0 -9
  142. package/esm/pkg/commands/sunion.js +0 -9
  143. package/esm/pkg/commands/sunionstore.js +0 -9
  144. package/esm/pkg/commands/time.js +0 -9
  145. package/esm/pkg/commands/touch.js +0 -9
  146. package/esm/pkg/commands/ttl.js +0 -9
  147. package/esm/pkg/commands/type.js +0 -9
  148. package/esm/pkg/commands/unlink.js +0 -9
  149. package/esm/pkg/commands/xadd.js +0 -26
  150. package/esm/pkg/commands/xrange.js +0 -37
  151. package/esm/pkg/commands/zadd.js +0 -26
  152. package/esm/pkg/commands/zcard.js +0 -9
  153. package/esm/pkg/commands/zcount.js +0 -9
  154. package/esm/pkg/commands/zdiffstore.js +0 -9
  155. package/esm/pkg/commands/zincrby.js +0 -9
  156. package/esm/pkg/commands/zinterstore.js +0 -27
  157. package/esm/pkg/commands/zlexcount.js +0 -9
  158. package/esm/pkg/commands/zmscore.js +0 -10
  159. package/esm/pkg/commands/zpopmax.js +0 -13
  160. package/esm/pkg/commands/zpopmin.js +0 -13
  161. package/esm/pkg/commands/zrange.js +0 -26
  162. package/esm/pkg/commands/zrank.js +0 -9
  163. package/esm/pkg/commands/zrem.js +0 -9
  164. package/esm/pkg/commands/zremrangebylex.js +0 -9
  165. package/esm/pkg/commands/zremrangebyrank.js +0 -9
  166. package/esm/pkg/commands/zremrangebyscore.js +0 -9
  167. package/esm/pkg/commands/zrevrank.js +0 -9
  168. package/esm/pkg/commands/zscan.js +0 -16
  169. package/esm/pkg/commands/zscore.js +0 -9
  170. package/esm/pkg/commands/zunionstore.js +0 -27
  171. package/esm/pkg/error.js +0 -9
  172. package/esm/pkg/http.js +0 -174
  173. package/esm/pkg/pipeline.js +0 -1293
  174. package/esm/pkg/redis.js +0 -1305
  175. package/esm/pkg/script.js +0 -77
  176. package/esm/pkg/types.js +0 -1
  177. package/esm/pkg/util.js +0 -31
  178. package/esm/platforms/cloudflare.js +0 -70
  179. package/esm/platforms/fastly.js +0 -46
  180. package/esm/platforms/node_with_fetch.js +0 -85
  181. package/esm/platforms/nodejs.js +0 -82
  182. package/esm/version.js +0 -1
  183. package/script/deps/deno.land/x/base64@v0.2.1/base.js +0 -104
  184. package/script/deps/deno.land/x/base64@v0.2.1/base64url.js +0 -13
  185. package/script/deps/deno.land/x/sha1@v1.0.3/deps.js +0 -6
  186. package/script/deps/deno.land/x/sha1@v1.0.3/mod.js +0 -196
  187. package/script/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.js +0 -55
  188. package/script/package.json +0 -3
  189. package/script/pkg/commands/append.js +0 -13
  190. package/script/pkg/commands/bitcount.js +0 -20
  191. package/script/pkg/commands/bitop.js +0 -13
  192. package/script/pkg/commands/bitpos.js +0 -13
  193. package/script/pkg/commands/command.js +0 -70
  194. package/script/pkg/commands/dbsize.js +0 -13
  195. package/script/pkg/commands/decr.js +0 -13
  196. package/script/pkg/commands/decrby.js +0 -13
  197. package/script/pkg/commands/del.js +0 -13
  198. package/script/pkg/commands/echo.js +0 -13
  199. package/script/pkg/commands/eval.js +0 -13
  200. package/script/pkg/commands/evalsha.js +0 -13
  201. package/script/pkg/commands/exists.js +0 -13
  202. package/script/pkg/commands/expire.js +0 -13
  203. package/script/pkg/commands/expireat.js +0 -13
  204. package/script/pkg/commands/flushall.js +0 -17
  205. package/script/pkg/commands/flushdb.js +0 -17
  206. package/script/pkg/commands/get.js +0 -13
  207. package/script/pkg/commands/getbit.js +0 -13
  208. package/script/pkg/commands/getdel.js +0 -13
  209. package/script/pkg/commands/getrange.js +0 -13
  210. package/script/pkg/commands/getset.js +0 -13
  211. package/script/pkg/commands/hdel.js +0 -13
  212. package/script/pkg/commands/hexists.js +0 -13
  213. package/script/pkg/commands/hget.js +0 -13
  214. package/script/pkg/commands/hgetall.js +0 -33
  215. package/script/pkg/commands/hincrby.js +0 -13
  216. package/script/pkg/commands/hincrbyfloat.js +0 -13
  217. package/script/pkg/commands/hkeys.js +0 -13
  218. package/script/pkg/commands/hlen.js +0 -13
  219. package/script/pkg/commands/hmget.js +0 -39
  220. package/script/pkg/commands/hmset.js +0 -17
  221. package/script/pkg/commands/hrandfield.js +0 -43
  222. package/script/pkg/commands/hscan.js +0 -20
  223. package/script/pkg/commands/hset.js +0 -17
  224. package/script/pkg/commands/hsetnx.js +0 -13
  225. package/script/pkg/commands/hstrlen.js +0 -13
  226. package/script/pkg/commands/hvals.js +0 -13
  227. package/script/pkg/commands/incr.js +0 -13
  228. package/script/pkg/commands/incrby.js +0 -13
  229. package/script/pkg/commands/incrbyfloat.js +0 -13
  230. package/script/pkg/commands/json_arrappend.js +0 -13
  231. package/script/pkg/commands/json_arrindex.js +0 -13
  232. package/script/pkg/commands/json_arrinsert.js +0 -13
  233. package/script/pkg/commands/json_arrlen.js +0 -13
  234. package/script/pkg/commands/json_arrpop.js +0 -13
  235. package/script/pkg/commands/json_arrtrim.js +0 -16
  236. package/script/pkg/commands/json_clear.js +0 -13
  237. package/script/pkg/commands/json_del.js +0 -13
  238. package/script/pkg/commands/json_forget.js +0 -13
  239. package/script/pkg/commands/json_get.js +0 -34
  240. package/script/pkg/commands/json_mget.js +0 -13
  241. package/script/pkg/commands/json_numincrby.js +0 -13
  242. package/script/pkg/commands/json_nummultby.js +0 -13
  243. package/script/pkg/commands/json_objkeys.js +0 -13
  244. package/script/pkg/commands/json_objlen.js +0 -13
  245. package/script/pkg/commands/json_resp.js +0 -13
  246. package/script/pkg/commands/json_set.js +0 -22
  247. package/script/pkg/commands/json_strappend.js +0 -13
  248. package/script/pkg/commands/json_strlen.js +0 -13
  249. package/script/pkg/commands/json_toggle.js +0 -13
  250. package/script/pkg/commands/json_type.js +0 -13
  251. package/script/pkg/commands/keys.js +0 -13
  252. package/script/pkg/commands/lindex.js +0 -10
  253. package/script/pkg/commands/linsert.js +0 -10
  254. package/script/pkg/commands/llen.js +0 -13
  255. package/script/pkg/commands/lmove.js +0 -13
  256. package/script/pkg/commands/lpop.js +0 -13
  257. package/script/pkg/commands/lpos.js +0 -23
  258. package/script/pkg/commands/lpush.js +0 -13
  259. package/script/pkg/commands/lpushx.js +0 -13
  260. package/script/pkg/commands/lrange.js +0 -10
  261. package/script/pkg/commands/lrem.js +0 -10
  262. package/script/pkg/commands/lset.js +0 -10
  263. package/script/pkg/commands/ltrim.js +0 -10
  264. package/script/pkg/commands/mget.js +0 -13
  265. package/script/pkg/commands/mod.js +0 -158
  266. package/script/pkg/commands/mset.js +0 -16
  267. package/script/pkg/commands/msetnx.js +0 -13
  268. package/script/pkg/commands/persist.js +0 -13
  269. package/script/pkg/commands/pexpire.js +0 -13
  270. package/script/pkg/commands/pexpireat.js +0 -13
  271. package/script/pkg/commands/ping.js +0 -17
  272. package/script/pkg/commands/psetex.js +0 -13
  273. package/script/pkg/commands/pttl.js +0 -13
  274. package/script/pkg/commands/publish.js +0 -13
  275. package/script/pkg/commands/randomkey.js +0 -13
  276. package/script/pkg/commands/rename.js +0 -13
  277. package/script/pkg/commands/renamenx.js +0 -13
  278. package/script/pkg/commands/rpop.js +0 -13
  279. package/script/pkg/commands/rpush.js +0 -13
  280. package/script/pkg/commands/rpushx.js +0 -13
  281. package/script/pkg/commands/sadd.js +0 -13
  282. package/script/pkg/commands/scan.js +0 -23
  283. package/script/pkg/commands/scard.js +0 -13
  284. package/script/pkg/commands/script_exists.js +0 -16
  285. package/script/pkg/commands/script_flush.js +0 -20
  286. package/script/pkg/commands/script_load.js +0 -13
  287. package/script/pkg/commands/sdiff.js +0 -13
  288. package/script/pkg/commands/sdiffstore.js +0 -13
  289. package/script/pkg/commands/set.js +0 -40
  290. package/script/pkg/commands/setbit.js +0 -13
  291. package/script/pkg/commands/setex.js +0 -13
  292. package/script/pkg/commands/setnx.js +0 -13
  293. package/script/pkg/commands/setrange.js +0 -13
  294. package/script/pkg/commands/sinter.js +0 -13
  295. package/script/pkg/commands/sinterstore.js +0 -13
  296. package/script/pkg/commands/sismember.js +0 -13
  297. package/script/pkg/commands/smembers.js +0 -13
  298. package/script/pkg/commands/smismember.js +0 -13
  299. package/script/pkg/commands/smove.js +0 -13
  300. package/script/pkg/commands/spop.js +0 -17
  301. package/script/pkg/commands/srandmember.js +0 -17
  302. package/script/pkg/commands/srem.js +0 -13
  303. package/script/pkg/commands/sscan.js +0 -20
  304. package/script/pkg/commands/strlen.js +0 -13
  305. package/script/pkg/commands/sunion.js +0 -13
  306. package/script/pkg/commands/sunionstore.js +0 -13
  307. package/script/pkg/commands/time.js +0 -13
  308. package/script/pkg/commands/touch.js +0 -13
  309. package/script/pkg/commands/ttl.js +0 -13
  310. package/script/pkg/commands/type.js +0 -13
  311. package/script/pkg/commands/unlink.js +0 -13
  312. package/script/pkg/commands/xadd.js +0 -30
  313. package/script/pkg/commands/xrange.js +0 -41
  314. package/script/pkg/commands/zadd.js +0 -30
  315. package/script/pkg/commands/zcard.js +0 -13
  316. package/script/pkg/commands/zcount.js +0 -13
  317. package/script/pkg/commands/zdiffstore.js +0 -13
  318. package/script/pkg/commands/zincrby.js +0 -13
  319. package/script/pkg/commands/zinterstore.js +0 -31
  320. package/script/pkg/commands/zlexcount.js +0 -13
  321. package/script/pkg/commands/zmscore.js +0 -14
  322. package/script/pkg/commands/zpopmax.js +0 -17
  323. package/script/pkg/commands/zpopmin.js +0 -17
  324. package/script/pkg/commands/zrange.js +0 -30
  325. package/script/pkg/commands/zrank.js +0 -13
  326. package/script/pkg/commands/zrem.js +0 -13
  327. package/script/pkg/commands/zremrangebylex.js +0 -13
  328. package/script/pkg/commands/zremrangebyrank.js +0 -13
  329. package/script/pkg/commands/zremrangebyscore.js +0 -13
  330. package/script/pkg/commands/zrevrank.js +0 -13
  331. package/script/pkg/commands/zscan.js +0 -20
  332. package/script/pkg/commands/zscore.js +0 -13
  333. package/script/pkg/commands/zunionstore.js +0 -31
  334. package/script/pkg/error.js +0 -13
  335. package/script/pkg/http.js +0 -178
  336. package/script/pkg/pipeline.js +0 -1297
  337. package/script/pkg/redis.js +0 -1309
  338. package/script/pkg/script.js +0 -81
  339. package/script/pkg/types.js +0 -2
  340. package/script/pkg/util.js +0 -35
  341. package/script/platforms/cloudflare.js +0 -97
  342. package/script/platforms/fastly.js +0 -73
  343. package/script/platforms/node_with_fetch.js +0 -112
  344. package/script/platforms/nodejs.js +0 -109
  345. package/script/version.js +0 -4
  346. package/types/deps/deno.land/x/base64@v0.2.1/base.d.ts +0 -5
  347. package/types/deps/deno.land/x/base64@v0.2.1/base64url.d.ts +0 -1
  348. package/types/deps/deno.land/x/sha1@v1.0.3/deps.d.ts +0 -1
  349. package/types/deps/deno.land/x/sha1@v1.0.3/mod.d.ts +0 -26
  350. package/types/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.d.ts +0 -3
  351. package/types/pkg/commands/append.d.ts +0 -7
  352. package/types/pkg/commands/bitcount.d.ts +0 -8
  353. package/types/pkg/commands/bitop.d.ts +0 -12
  354. package/types/pkg/commands/bitpos.d.ts +0 -7
  355. package/types/pkg/commands/command.d.ts +0 -37
  356. package/types/pkg/commands/dbsize.d.ts +0 -7
  357. package/types/pkg/commands/decr.d.ts +0 -7
  358. package/types/pkg/commands/decrby.d.ts +0 -7
  359. package/types/pkg/commands/del.d.ts +0 -7
  360. package/types/pkg/commands/echo.d.ts +0 -7
  361. package/types/pkg/commands/eval.d.ts +0 -7
  362. package/types/pkg/commands/evalsha.d.ts +0 -7
  363. package/types/pkg/commands/exists.d.ts +0 -7
  364. package/types/pkg/commands/expire.d.ts +0 -7
  365. package/types/pkg/commands/expireat.d.ts +0 -7
  366. package/types/pkg/commands/flushall.d.ts +0 -9
  367. package/types/pkg/commands/flushdb.d.ts +0 -9
  368. package/types/pkg/commands/get.d.ts +0 -7
  369. package/types/pkg/commands/getbit.d.ts +0 -7
  370. package/types/pkg/commands/getdel.d.ts +0 -7
  371. package/types/pkg/commands/getrange.d.ts +0 -7
  372. package/types/pkg/commands/getset.d.ts +0 -7
  373. package/types/pkg/commands/hdel.d.ts +0 -7
  374. package/types/pkg/commands/hexists.d.ts +0 -7
  375. package/types/pkg/commands/hget.d.ts +0 -7
  376. package/types/pkg/commands/hgetall.d.ts +0 -7
  377. package/types/pkg/commands/hincrby.d.ts +0 -7
  378. package/types/pkg/commands/hincrbyfloat.d.ts +0 -7
  379. package/types/pkg/commands/hkeys.d.ts +0 -7
  380. package/types/pkg/commands/hlen.d.ts +0 -7
  381. package/types/pkg/commands/hmget.d.ts +0 -15
  382. package/types/pkg/commands/hmset.d.ts +0 -9
  383. package/types/pkg/commands/hrandfield.d.ts +0 -9
  384. package/types/pkg/commands/hscan.d.ts +0 -24
  385. package/types/pkg/commands/hset.d.ts +0 -9
  386. package/types/pkg/commands/hsetnx.d.ts +0 -7
  387. package/types/pkg/commands/hstrlen.d.ts +0 -7
  388. package/types/pkg/commands/hvals.d.ts +0 -7
  389. package/types/pkg/commands/incr.d.ts +0 -7
  390. package/types/pkg/commands/incrby.d.ts +0 -7
  391. package/types/pkg/commands/incrbyfloat.d.ts +0 -7
  392. package/types/pkg/commands/json_arrappend.d.ts +0 -7
  393. package/types/pkg/commands/json_arrindex.d.ts +0 -13
  394. package/types/pkg/commands/json_arrinsert.d.ts +0 -7
  395. package/types/pkg/commands/json_arrlen.d.ts +0 -7
  396. package/types/pkg/commands/json_arrpop.d.ts +0 -7
  397. package/types/pkg/commands/json_arrtrim.d.ts +0 -7
  398. package/types/pkg/commands/json_clear.d.ts +0 -7
  399. package/types/pkg/commands/json_del.d.ts +0 -7
  400. package/types/pkg/commands/json_forget.d.ts +0 -7
  401. package/types/pkg/commands/json_get.d.ts +0 -15
  402. package/types/pkg/commands/json_mget.d.ts +0 -7
  403. package/types/pkg/commands/json_numincrby.d.ts +0 -7
  404. package/types/pkg/commands/json_nummultby.d.ts +0 -7
  405. package/types/pkg/commands/json_objkeys.d.ts +0 -7
  406. package/types/pkg/commands/json_objlen.d.ts +0 -7
  407. package/types/pkg/commands/json_resp.d.ts +0 -7
  408. package/types/pkg/commands/json_set.d.ts +0 -18
  409. package/types/pkg/commands/json_strappend.d.ts +0 -7
  410. package/types/pkg/commands/json_strlen.d.ts +0 -7
  411. package/types/pkg/commands/json_toggle.d.ts +0 -7
  412. package/types/pkg/commands/json_type.d.ts +0 -7
  413. package/types/pkg/commands/keys.d.ts +0 -7
  414. package/types/pkg/commands/lindex.d.ts +0 -4
  415. package/types/pkg/commands/linsert.d.ts +0 -9
  416. package/types/pkg/commands/llen.d.ts +0 -7
  417. package/types/pkg/commands/lmove.d.ts +0 -12
  418. package/types/pkg/commands/lpop.d.ts +0 -7
  419. package/types/pkg/commands/lpos.d.ts +0 -15
  420. package/types/pkg/commands/lpush.d.ts +0 -7
  421. package/types/pkg/commands/lpushx.d.ts +0 -7
  422. package/types/pkg/commands/lrange.d.ts +0 -4
  423. package/types/pkg/commands/lrem.d.ts +0 -4
  424. package/types/pkg/commands/lset.d.ts +0 -4
  425. package/types/pkg/commands/ltrim.d.ts +0 -4
  426. package/types/pkg/commands/mget.d.ts +0 -7
  427. package/types/pkg/commands/mod.d.ts +0 -142
  428. package/types/pkg/commands/mset.d.ts +0 -9
  429. package/types/pkg/commands/msetnx.d.ts +0 -9
  430. package/types/pkg/commands/persist.d.ts +0 -7
  431. package/types/pkg/commands/pexpire.d.ts +0 -7
  432. package/types/pkg/commands/pexpireat.d.ts +0 -7
  433. package/types/pkg/commands/ping.d.ts +0 -7
  434. package/types/pkg/commands/psetex.d.ts +0 -7
  435. package/types/pkg/commands/pttl.d.ts +0 -7
  436. package/types/pkg/commands/publish.d.ts +0 -7
  437. package/types/pkg/commands/randomkey.d.ts +0 -7
  438. package/types/pkg/commands/rename.d.ts +0 -7
  439. package/types/pkg/commands/renamenx.d.ts +0 -7
  440. package/types/pkg/commands/rpop.d.ts +0 -7
  441. package/types/pkg/commands/rpush.d.ts +0 -7
  442. package/types/pkg/commands/rpushx.d.ts +0 -7
  443. package/types/pkg/commands/sadd.d.ts +0 -7
  444. package/types/pkg/commands/scan.d.ts +0 -18
  445. package/types/pkg/commands/scard.d.ts +0 -7
  446. package/types/pkg/commands/script_exists.d.ts +0 -7
  447. package/types/pkg/commands/script_flush.d.ts +0 -14
  448. package/types/pkg/commands/script_load.d.ts +0 -7
  449. package/types/pkg/commands/sdiff.d.ts +0 -7
  450. package/types/pkg/commands/sdiffstore.d.ts +0 -7
  451. package/types/pkg/commands/set.d.ts +0 -55
  452. package/types/pkg/commands/setbit.d.ts +0 -7
  453. package/types/pkg/commands/setex.d.ts +0 -7
  454. package/types/pkg/commands/setnx.d.ts +0 -7
  455. package/types/pkg/commands/setrange.d.ts +0 -7
  456. package/types/pkg/commands/sinter.d.ts +0 -7
  457. package/types/pkg/commands/sinterstore.d.ts +0 -7
  458. package/types/pkg/commands/sismember.d.ts +0 -7
  459. package/types/pkg/commands/smembers.d.ts +0 -7
  460. package/types/pkg/commands/smismember.d.ts +0 -7
  461. package/types/pkg/commands/smove.d.ts +0 -7
  462. package/types/pkg/commands/spop.d.ts +0 -7
  463. package/types/pkg/commands/srandmember.d.ts +0 -7
  464. package/types/pkg/commands/srem.d.ts +0 -7
  465. package/types/pkg/commands/sscan.d.ts +0 -24
  466. package/types/pkg/commands/strlen.d.ts +0 -7
  467. package/types/pkg/commands/sunion.d.ts +0 -7
  468. package/types/pkg/commands/sunionstore.d.ts +0 -7
  469. package/types/pkg/commands/time.d.ts +0 -7
  470. package/types/pkg/commands/touch.d.ts +0 -7
  471. package/types/pkg/commands/ttl.d.ts +0 -7
  472. package/types/pkg/commands/type.d.ts +0 -8
  473. package/types/pkg/commands/unlink.d.ts +0 -7
  474. package/types/pkg/commands/xadd.d.ts +0 -31
  475. package/types/pkg/commands/xrange.d.ts +0 -9
  476. package/types/pkg/commands/zadd.d.ts +0 -35
  477. package/types/pkg/commands/zcard.d.ts +0 -7
  478. package/types/pkg/commands/zcount.d.ts +0 -7
  479. package/types/pkg/commands/zdiffstore.d.ts +0 -7
  480. package/types/pkg/commands/zincrby.d.ts +0 -7
  481. package/types/pkg/commands/zinterstore.d.ts +0 -30
  482. package/types/pkg/commands/zlexcount.d.ts +0 -7
  483. package/types/pkg/commands/zmscore.d.ts +0 -7
  484. package/types/pkg/commands/zpopmax.d.ts +0 -7
  485. package/types/pkg/commands/zpopmin.d.ts +0 -7
  486. package/types/pkg/commands/zrange.d.ts +0 -42
  487. package/types/pkg/commands/zrank.d.ts +0 -7
  488. package/types/pkg/commands/zrem.d.ts +0 -7
  489. package/types/pkg/commands/zremrangebylex.d.ts +0 -7
  490. package/types/pkg/commands/zremrangebyrank.d.ts +0 -7
  491. package/types/pkg/commands/zremrangebyscore.d.ts +0 -7
  492. package/types/pkg/commands/zrevrank.d.ts +0 -7
  493. package/types/pkg/commands/zscan.d.ts +0 -24
  494. package/types/pkg/commands/zscore.d.ts +0 -7
  495. package/types/pkg/commands/zunionstore.d.ts +0 -30
  496. package/types/pkg/error.d.ts +0 -6
  497. package/types/pkg/http.d.ts +0 -95
  498. package/types/pkg/pipeline.d.ts +0 -678
  499. package/types/pkg/redis.d.ts +0 -684
  500. package/types/pkg/script.d.ts +0 -42
  501. package/types/pkg/types.d.ts +0 -27
  502. package/types/pkg/util.d.ts +0 -1
  503. package/types/platforms/cloudflare.d.ts +0 -43
  504. package/types/platforms/fastly.d.ts +0 -41
  505. package/types/platforms/node_with_fetch.d.ts +0 -63
  506. package/types/platforms/nodejs.d.ts +0 -78
  507. package/types/version.d.ts +0 -1
@@ -1,1293 +0,0 @@
1
- import { AppendCommand, BitCountCommand, BitOpCommand, BitPosCommand, DBSizeCommand, DecrByCommand, DecrCommand, DelCommand, EchoCommand, EvalCommand, EvalshaCommand, ExistsCommand, ExpireAtCommand, ExpireCommand, FlushAllCommand, FlushDBCommand, GetBitCommand, GetCommand, GetDelCommand, GetRangeCommand, GetSetCommand, HDelCommand, HExistsCommand, HGetAllCommand, HGetCommand, HIncrByCommand, HIncrByFloatCommand, HKeysCommand, HLenCommand, HMGetCommand, HMSetCommand, HScanCommand, HSetCommand, HSetNXCommand, HStrLenCommand, HValsCommand, IncrByCommand, IncrByFloatCommand, IncrCommand, JsonArrAppendCommand, JsonArrIndexCommand, JsonArrInsertCommand, JsonArrLenCommand, JsonArrPopCommand, JsonArrTrimCommand, JsonClearCommand, JsonDelCommand, JsonForgetCommand, JsonGetCommand, JsonMGetCommand, JsonNumIncrByCommand, JsonNumMultByCommand, JsonObjKeysCommand, JsonObjLenCommand, JsonRespCommand, JsonSetCommand, JsonStrAppendCommand, JsonStrLenCommand, JsonToggleCommand, JsonTypeCommand, KeysCommand, LIndexCommand, LInsertCommand, LLenCommand, LMoveCommand, LPopCommand, LPosCommand, LPushCommand, LPushXCommand, LRangeCommand, LRemCommand, LSetCommand, LTrimCommand, MGetCommand, MSetCommand, MSetNXCommand, PersistCommand, PExpireAtCommand, PExpireCommand, PingCommand, PSetEXCommand, PTtlCommand, PublishCommand, RandomKeyCommand, RenameCommand, RenameNXCommand, RPopCommand, RPushCommand, RPushXCommand, SAddCommand, ScanCommand, SCardCommand, ScriptExistsCommand, ScriptFlushCommand, ScriptLoadCommand, SDiffCommand, SDiffStoreCommand, SetBitCommand, SetCommand, SetExCommand, SetNxCommand, SetRangeCommand, SInterCommand, SInterStoreCommand, SIsMemberCommand, SMembersCommand, SMIsMemberCommand, SMoveCommand, SPopCommand, SRandMemberCommand, SRemCommand, SScanCommand, StrLenCommand, SUnionCommand, SUnionStoreCommand, TimeCommand, TouchCommand, TtlCommand, TypeCommand, UnlinkCommand, ZAddCommand, ZCardCommand, ZCountCommand, ZIncrByCommand, ZInterStoreCommand, ZLexCountCommand, ZPopMaxCommand, ZPopMinCommand, ZRangeCommand, ZRankCommand, ZRemCommand, ZRemRangeByLexCommand, ZRemRangeByRankCommand, ZRemRangeByScoreCommand, ZRevRankCommand, ZScanCommand, ZScoreCommand, ZUnionStoreCommand, } from "./commands/mod.js";
2
- import { UpstashError } from "./error.js";
3
- import { ZMScoreCommand } from "./commands/zmscore.js";
4
- import { HRandFieldCommand } from "./commands/hrandfield.js";
5
- import { ZDiffStoreCommand } from "./commands/zdiffstore.js";
6
- /**
7
- * Upstash REST API supports command pipelining to send multiple commands in
8
- * batch, instead of sending each command one by one and waiting for a response.
9
- * When using pipelines, several commands are sent using a single HTTP request,
10
- * and a single JSON array response is returned. Each item in the response array
11
- * corresponds to the command in the same order within the pipeline.
12
- *
13
- * **NOTE:**
14
- *
15
- * Execution of the pipeline is not atomic. Even though each command in
16
- * the pipeline will be executed in order, commands sent by other clients can
17
- * interleave with the pipeline.
18
- *
19
- * **Examples:**
20
- *
21
- * ```ts
22
- * const p = redis.pipeline() // or redis.multi()
23
- * p.set("key","value")
24
- * p.get("key")
25
- * const res = await p.exec()
26
- * ```
27
- *
28
- * You can also chain commands together
29
- * ```ts
30
- * const p = redis.pipeline()
31
- * const res = await p.set("key","value").get("key").exec()
32
- * ```
33
- *
34
- * Return types are inferred if all commands are chained, but you can still
35
- * override the response type manually:
36
- * ```ts
37
- * redis.pipeline()
38
- * .set("key", { greeting: "hello"})
39
- * .get("key")
40
- * .exec<["OK", { greeting: string } ]>()
41
- *
42
- * ```
43
- */
44
- export class Pipeline {
45
- constructor(opts) {
46
- Object.defineProperty(this, "client", {
47
- enumerable: true,
48
- configurable: true,
49
- writable: true,
50
- value: void 0
51
- });
52
- Object.defineProperty(this, "commands", {
53
- enumerable: true,
54
- configurable: true,
55
- writable: true,
56
- value: void 0
57
- });
58
- Object.defineProperty(this, "commandOptions", {
59
- enumerable: true,
60
- configurable: true,
61
- writable: true,
62
- value: void 0
63
- });
64
- Object.defineProperty(this, "multiExec", {
65
- enumerable: true,
66
- configurable: true,
67
- writable: true,
68
- value: void 0
69
- });
70
- /**
71
- * Send the pipeline request to upstash.
72
- *
73
- * Returns an array with the results of all pipelined commands.
74
- *
75
- * If all commands are statically chained from start to finish, types are inferred. You can still define a return type manually if necessary though:
76
- * ```ts
77
- * const p = redis.pipeline()
78
- * p.get("key")
79
- * const result = p.exec<[{ greeting: string }]>()
80
- * ```
81
- */
82
- Object.defineProperty(this, "exec", {
83
- enumerable: true,
84
- configurable: true,
85
- writable: true,
86
- value: async () => {
87
- if (this.commands.length === 0) {
88
- throw new Error("Pipeline is empty");
89
- }
90
- const path = this.multiExec ? ["multi-exec"] : ["pipeline"];
91
- const res = (await this.client.request({
92
- path,
93
- body: Object.values(this.commands).map((c) => c.command),
94
- }));
95
- console.log("after req", { res });
96
- return res.map(({ error, result }, i) => {
97
- if (error) {
98
- throw new UpstashError(`Command ${i + 1} [ ${this.commands[i].command[0]} ] failed: ${error}`);
99
- }
100
- return this.commands[i].deserialize(result);
101
- });
102
- }
103
- });
104
- /**
105
- * @see https://redis.io/commands/append
106
- */
107
- Object.defineProperty(this, "append", {
108
- enumerable: true,
109
- configurable: true,
110
- writable: true,
111
- value: (...args) => this.chain(new AppendCommand(args, this.commandOptions))
112
- });
113
- /**
114
- * @see https://redis.io/commands/bitcount
115
- */
116
- Object.defineProperty(this, "bitcount", {
117
- enumerable: true,
118
- configurable: true,
119
- writable: true,
120
- value: (...args) => this.chain(new BitCountCommand(args, this.commandOptions))
121
- });
122
- /**
123
- * @see https://redis.io/commands/bitop
124
- */
125
- Object.defineProperty(this, "bitop", {
126
- enumerable: true,
127
- configurable: true,
128
- writable: true,
129
- value: (op, destinationKey, sourceKey, ...sourceKeys) => this.chain(new BitOpCommand([op, destinationKey, sourceKey, ...sourceKeys], this.commandOptions))
130
- });
131
- /**
132
- * @see https://redis.io/commands/bitpos
133
- */
134
- Object.defineProperty(this, "bitpos", {
135
- enumerable: true,
136
- configurable: true,
137
- writable: true,
138
- value: (...args) => this.chain(new BitPosCommand(args, this.commandOptions))
139
- });
140
- /**
141
- * @see https://redis.io/commands/zdiffstore
142
- */
143
- Object.defineProperty(this, "zdiffstore", {
144
- enumerable: true,
145
- configurable: true,
146
- writable: true,
147
- value: (...args) => this.chain(new ZDiffStoreCommand(args, this.commandOptions))
148
- });
149
- /**
150
- * @see https://redis.io/commands/dbsize
151
- */
152
- Object.defineProperty(this, "dbsize", {
153
- enumerable: true,
154
- configurable: true,
155
- writable: true,
156
- value: () => this.chain(new DBSizeCommand(this.commandOptions))
157
- });
158
- /**
159
- * @see https://redis.io/commands/decr
160
- */
161
- Object.defineProperty(this, "decr", {
162
- enumerable: true,
163
- configurable: true,
164
- writable: true,
165
- value: (...args) => this.chain(new DecrCommand(args, this.commandOptions))
166
- });
167
- /**
168
- * @see https://redis.io/commands/decrby
169
- */
170
- Object.defineProperty(this, "decrby", {
171
- enumerable: true,
172
- configurable: true,
173
- writable: true,
174
- value: (...args) => this.chain(new DecrByCommand(args, this.commandOptions))
175
- });
176
- /**
177
- * @see https://redis.io/commands/del
178
- */
179
- Object.defineProperty(this, "del", {
180
- enumerable: true,
181
- configurable: true,
182
- writable: true,
183
- value: (...args) => this.chain(new DelCommand(args, this.commandOptions))
184
- });
185
- /**
186
- * @see https://redis.io/commands/echo
187
- */
188
- Object.defineProperty(this, "echo", {
189
- enumerable: true,
190
- configurable: true,
191
- writable: true,
192
- value: (...args) => this.chain(new EchoCommand(args, this.commandOptions))
193
- });
194
- /**
195
- * @see https://redis.io/commands/eval
196
- */
197
- Object.defineProperty(this, "eval", {
198
- enumerable: true,
199
- configurable: true,
200
- writable: true,
201
- value: (...args) => this.chain(new EvalCommand(args, this.commandOptions))
202
- });
203
- /**
204
- * @see https://redis.io/commands/evalsha
205
- */
206
- Object.defineProperty(this, "evalsha", {
207
- enumerable: true,
208
- configurable: true,
209
- writable: true,
210
- value: (...args) => this.chain(new EvalshaCommand(args, this.commandOptions))
211
- });
212
- /**
213
- * @see https://redis.io/commands/exists
214
- */
215
- Object.defineProperty(this, "exists", {
216
- enumerable: true,
217
- configurable: true,
218
- writable: true,
219
- value: (...args) => this.chain(new ExistsCommand(args, this.commandOptions))
220
- });
221
- /**
222
- * @see https://redis.io/commands/expire
223
- */
224
- Object.defineProperty(this, "expire", {
225
- enumerable: true,
226
- configurable: true,
227
- writable: true,
228
- value: (...args) => this.chain(new ExpireCommand(args, this.commandOptions))
229
- });
230
- /**
231
- * @see https://redis.io/commands/expireat
232
- */
233
- Object.defineProperty(this, "expireat", {
234
- enumerable: true,
235
- configurable: true,
236
- writable: true,
237
- value: (...args) => this.chain(new ExpireAtCommand(args, this.commandOptions))
238
- });
239
- /**
240
- * @see https://redis.io/commands/flushall
241
- */
242
- Object.defineProperty(this, "flushall", {
243
- enumerable: true,
244
- configurable: true,
245
- writable: true,
246
- value: (args) => this.chain(new FlushAllCommand(args, this.commandOptions))
247
- });
248
- /**
249
- * @see https://redis.io/commands/flushdb
250
- */
251
- Object.defineProperty(this, "flushdb", {
252
- enumerable: true,
253
- configurable: true,
254
- writable: true,
255
- value: (...args) => this.chain(new FlushDBCommand(args, this.commandOptions))
256
- });
257
- /**
258
- * @see https://redis.io/commands/get
259
- */
260
- Object.defineProperty(this, "get", {
261
- enumerable: true,
262
- configurable: true,
263
- writable: true,
264
- value: (...args) => this.chain(new GetCommand(args, this.commandOptions))
265
- });
266
- /**
267
- * @see https://redis.io/commands/getbit
268
- */
269
- Object.defineProperty(this, "getbit", {
270
- enumerable: true,
271
- configurable: true,
272
- writable: true,
273
- value: (...args) => this.chain(new GetBitCommand(args, this.commandOptions))
274
- });
275
- /**
276
- * @see https://redis.io/commands/getdel
277
- */
278
- Object.defineProperty(this, "getdel", {
279
- enumerable: true,
280
- configurable: true,
281
- writable: true,
282
- value: (...args) => this.chain(new GetDelCommand(args, this.commandOptions))
283
- });
284
- /**
285
- * @see https://redis.io/commands/getrange
286
- */
287
- Object.defineProperty(this, "getrange", {
288
- enumerable: true,
289
- configurable: true,
290
- writable: true,
291
- value: (...args) => this.chain(new GetRangeCommand(args, this.commandOptions))
292
- });
293
- /**
294
- * @see https://redis.io/commands/getset
295
- */
296
- Object.defineProperty(this, "getset", {
297
- enumerable: true,
298
- configurable: true,
299
- writable: true,
300
- value: (key, value) => this.chain(new GetSetCommand([key, value], this.commandOptions))
301
- });
302
- /**
303
- * @see https://redis.io/commands/hdel
304
- */
305
- Object.defineProperty(this, "hdel", {
306
- enumerable: true,
307
- configurable: true,
308
- writable: true,
309
- value: (...args) => this.chain(new HDelCommand(args, this.commandOptions))
310
- });
311
- /**
312
- * @see https://redis.io/commands/hexists
313
- */
314
- Object.defineProperty(this, "hexists", {
315
- enumerable: true,
316
- configurable: true,
317
- writable: true,
318
- value: (...args) => this.chain(new HExistsCommand(args, this.commandOptions))
319
- });
320
- /**
321
- * @see https://redis.io/commands/hget
322
- */
323
- Object.defineProperty(this, "hget", {
324
- enumerable: true,
325
- configurable: true,
326
- writable: true,
327
- value: (...args) => this.chain(new HGetCommand(args, this.commandOptions))
328
- });
329
- /**
330
- * @see https://redis.io/commands/hgetall
331
- */
332
- Object.defineProperty(this, "hgetall", {
333
- enumerable: true,
334
- configurable: true,
335
- writable: true,
336
- value: (...args) => this.chain(new HGetAllCommand(args, this.commandOptions))
337
- });
338
- /**
339
- * @see https://redis.io/commands/hincrby
340
- */
341
- Object.defineProperty(this, "hincrby", {
342
- enumerable: true,
343
- configurable: true,
344
- writable: true,
345
- value: (...args) => this.chain(new HIncrByCommand(args, this.commandOptions))
346
- });
347
- /**
348
- * @see https://redis.io/commands/hincrbyfloat
349
- */
350
- Object.defineProperty(this, "hincrbyfloat", {
351
- enumerable: true,
352
- configurable: true,
353
- writable: true,
354
- value: (...args) => this.chain(new HIncrByFloatCommand(args, this.commandOptions))
355
- });
356
- /**
357
- * @see https://redis.io/commands/hkeys
358
- */
359
- Object.defineProperty(this, "hkeys", {
360
- enumerable: true,
361
- configurable: true,
362
- writable: true,
363
- value: (...args) => this.chain(new HKeysCommand(args, this.commandOptions))
364
- });
365
- /**
366
- * @see https://redis.io/commands/hlen
367
- */
368
- Object.defineProperty(this, "hlen", {
369
- enumerable: true,
370
- configurable: true,
371
- writable: true,
372
- value: (...args) => this.chain(new HLenCommand(args, this.commandOptions))
373
- });
374
- /**
375
- * @see https://redis.io/commands/hmget
376
- */
377
- Object.defineProperty(this, "hmget", {
378
- enumerable: true,
379
- configurable: true,
380
- writable: true,
381
- value: (...args) => this.chain(new HMGetCommand(args, this.commandOptions))
382
- });
383
- /**
384
- * @see https://redis.io/commands/hmset
385
- */
386
- Object.defineProperty(this, "hmset", {
387
- enumerable: true,
388
- configurable: true,
389
- writable: true,
390
- value: (key, kv) => this.chain(new HMSetCommand([key, kv], this.commandOptions))
391
- });
392
- /**
393
- * @see https://redis.io/commands/hrandfield
394
- */
395
- Object.defineProperty(this, "hrandfield", {
396
- enumerable: true,
397
- configurable: true,
398
- writable: true,
399
- value: (key, count, withValues) => this.chain(new HRandFieldCommand([key, count, withValues], this.commandOptions))
400
- });
401
- /**
402
- * @see https://redis.io/commands/hscan
403
- */
404
- Object.defineProperty(this, "hscan", {
405
- enumerable: true,
406
- configurable: true,
407
- writable: true,
408
- value: (...args) => this.chain(new HScanCommand(args, this.commandOptions))
409
- });
410
- /**
411
- * @see https://redis.io/commands/hset
412
- */
413
- Object.defineProperty(this, "hset", {
414
- enumerable: true,
415
- configurable: true,
416
- writable: true,
417
- value: (key, kv) => this.chain(new HSetCommand([key, kv], this.commandOptions))
418
- });
419
- /**
420
- * @see https://redis.io/commands/hsetnx
421
- */
422
- Object.defineProperty(this, "hsetnx", {
423
- enumerable: true,
424
- configurable: true,
425
- writable: true,
426
- value: (key, field, value) => this.chain(new HSetNXCommand([key, field, value], this.commandOptions))
427
- });
428
- /**
429
- * @see https://redis.io/commands/hstrlen
430
- */
431
- Object.defineProperty(this, "hstrlen", {
432
- enumerable: true,
433
- configurable: true,
434
- writable: true,
435
- value: (...args) => this.chain(new HStrLenCommand(args, this.commandOptions))
436
- });
437
- /**
438
- * @see https://redis.io/commands/hvals
439
- */
440
- Object.defineProperty(this, "hvals", {
441
- enumerable: true,
442
- configurable: true,
443
- writable: true,
444
- value: (...args) => this.chain(new HValsCommand(args, this.commandOptions))
445
- });
446
- /**
447
- * @see https://redis.io/commands/incr
448
- */
449
- Object.defineProperty(this, "incr", {
450
- enumerable: true,
451
- configurable: true,
452
- writable: true,
453
- value: (...args) => this.chain(new IncrCommand(args, this.commandOptions))
454
- });
455
- /**
456
- * @see https://redis.io/commands/incrby
457
- */
458
- Object.defineProperty(this, "incrby", {
459
- enumerable: true,
460
- configurable: true,
461
- writable: true,
462
- value: (...args) => this.chain(new IncrByCommand(args, this.commandOptions))
463
- });
464
- /**
465
- * @see https://redis.io/commands/incrbyfloat
466
- */
467
- Object.defineProperty(this, "incrbyfloat", {
468
- enumerable: true,
469
- configurable: true,
470
- writable: true,
471
- value: (...args) => this.chain(new IncrByFloatCommand(args, this.commandOptions))
472
- });
473
- /**
474
- * @see https://redis.io/commands/keys
475
- */
476
- Object.defineProperty(this, "keys", {
477
- enumerable: true,
478
- configurable: true,
479
- writable: true,
480
- value: (...args) => this.chain(new KeysCommand(args, this.commandOptions))
481
- });
482
- /**
483
- * @see https://redis.io/commands/lindex
484
- */
485
- Object.defineProperty(this, "lindex", {
486
- enumerable: true,
487
- configurable: true,
488
- writable: true,
489
- value: (...args) => this.chain(new LIndexCommand(args, this.commandOptions))
490
- });
491
- /**
492
- * @see https://redis.io/commands/linsert
493
- */
494
- Object.defineProperty(this, "linsert", {
495
- enumerable: true,
496
- configurable: true,
497
- writable: true,
498
- value: (key, direction, pivot, value) => this.chain(new LInsertCommand([key, direction, pivot, value], this.commandOptions))
499
- });
500
- /**
501
- * @see https://redis.io/commands/llen
502
- */
503
- Object.defineProperty(this, "llen", {
504
- enumerable: true,
505
- configurable: true,
506
- writable: true,
507
- value: (...args) => this.chain(new LLenCommand(args, this.commandOptions))
508
- });
509
- /**
510
- * @see https://redis.io/commands/lmove
511
- */
512
- Object.defineProperty(this, "lmove", {
513
- enumerable: true,
514
- configurable: true,
515
- writable: true,
516
- value: (...args) => this.chain(new LMoveCommand(args, this.commandOptions))
517
- });
518
- /**
519
- * @see https://redis.io/commands/lpop
520
- */
521
- Object.defineProperty(this, "lpop", {
522
- enumerable: true,
523
- configurable: true,
524
- writable: true,
525
- value: (...args) => this.chain(new LPopCommand(args, this.commandOptions))
526
- });
527
- /**
528
- * @see https://redis.io/commands/lpos
529
- */
530
- Object.defineProperty(this, "lpos", {
531
- enumerable: true,
532
- configurable: true,
533
- writable: true,
534
- value: (...args) => this.chain(new LPosCommand(args, this.commandOptions))
535
- });
536
- /**
537
- * @see https://redis.io/commands/lpush
538
- */
539
- Object.defineProperty(this, "lpush", {
540
- enumerable: true,
541
- configurable: true,
542
- writable: true,
543
- value: (key, ...elements) => this.chain(new LPushCommand([key, ...elements], this.commandOptions))
544
- });
545
- /**
546
- * @see https://redis.io/commands/lpushx
547
- */
548
- Object.defineProperty(this, "lpushx", {
549
- enumerable: true,
550
- configurable: true,
551
- writable: true,
552
- value: (key, ...elements) => this.chain(new LPushXCommand([key, ...elements], this.commandOptions))
553
- });
554
- /**
555
- * @see https://redis.io/commands/lrange
556
- */
557
- Object.defineProperty(this, "lrange", {
558
- enumerable: true,
559
- configurable: true,
560
- writable: true,
561
- value: (...args) => this.chain(new LRangeCommand(args, this.commandOptions))
562
- });
563
- /**
564
- * @see https://redis.io/commands/lrem
565
- */
566
- Object.defineProperty(this, "lrem", {
567
- enumerable: true,
568
- configurable: true,
569
- writable: true,
570
- value: (key, count, value) => this.chain(new LRemCommand([key, count, value], this.commandOptions))
571
- });
572
- /**
573
- * @see https://redis.io/commands/lset
574
- */
575
- Object.defineProperty(this, "lset", {
576
- enumerable: true,
577
- configurable: true,
578
- writable: true,
579
- value: (key, index, value) => this.chain(new LSetCommand([key, index, value], this.commandOptions))
580
- });
581
- /**
582
- * @see https://redis.io/commands/ltrim
583
- */
584
- Object.defineProperty(this, "ltrim", {
585
- enumerable: true,
586
- configurable: true,
587
- writable: true,
588
- value: (...args) => this.chain(new LTrimCommand(args, this.commandOptions))
589
- });
590
- /**
591
- * @see https://redis.io/commands/mget
592
- */
593
- Object.defineProperty(this, "mget", {
594
- enumerable: true,
595
- configurable: true,
596
- writable: true,
597
- value: (...args) => this.chain(new MGetCommand(args, this.commandOptions))
598
- });
599
- /**
600
- * @see https://redis.io/commands/mset
601
- */
602
- Object.defineProperty(this, "mset", {
603
- enumerable: true,
604
- configurable: true,
605
- writable: true,
606
- value: (kv) => this.chain(new MSetCommand([kv], this.commandOptions))
607
- });
608
- /**
609
- * @see https://redis.io/commands/msetnx
610
- */
611
- Object.defineProperty(this, "msetnx", {
612
- enumerable: true,
613
- configurable: true,
614
- writable: true,
615
- value: (kv) => this.chain(new MSetNXCommand([kv], this.commandOptions))
616
- });
617
- /**
618
- * @see https://redis.io/commands/persist
619
- */
620
- Object.defineProperty(this, "persist", {
621
- enumerable: true,
622
- configurable: true,
623
- writable: true,
624
- value: (...args) => this.chain(new PersistCommand(args, this.commandOptions))
625
- });
626
- /**
627
- * @see https://redis.io/commands/pexpire
628
- */
629
- Object.defineProperty(this, "pexpire", {
630
- enumerable: true,
631
- configurable: true,
632
- writable: true,
633
- value: (...args) => this.chain(new PExpireCommand(args, this.commandOptions))
634
- });
635
- /**
636
- * @see https://redis.io/commands/pexpireat
637
- */
638
- Object.defineProperty(this, "pexpireat", {
639
- enumerable: true,
640
- configurable: true,
641
- writable: true,
642
- value: (...args) => this.chain(new PExpireAtCommand(args, this.commandOptions))
643
- });
644
- /**
645
- * @see https://redis.io/commands/ping
646
- */
647
- Object.defineProperty(this, "ping", {
648
- enumerable: true,
649
- configurable: true,
650
- writable: true,
651
- value: (args) => this.chain(new PingCommand(args, this.commandOptions))
652
- });
653
- /**
654
- * @see https://redis.io/commands/psetex
655
- */
656
- Object.defineProperty(this, "psetex", {
657
- enumerable: true,
658
- configurable: true,
659
- writable: true,
660
- value: (key, ttl, value) => this.chain(new PSetEXCommand([key, ttl, value], this.commandOptions))
661
- });
662
- /**
663
- * @see https://redis.io/commands/pttl
664
- */
665
- Object.defineProperty(this, "pttl", {
666
- enumerable: true,
667
- configurable: true,
668
- writable: true,
669
- value: (...args) => this.chain(new PTtlCommand(args, this.commandOptions))
670
- });
671
- /**
672
- * @see https://redis.io/commands/publish
673
- */
674
- Object.defineProperty(this, "publish", {
675
- enumerable: true,
676
- configurable: true,
677
- writable: true,
678
- value: (...args) => this.chain(new PublishCommand(args, this.commandOptions))
679
- });
680
- /**
681
- * @see https://redis.io/commands/randomkey
682
- */
683
- Object.defineProperty(this, "randomkey", {
684
- enumerable: true,
685
- configurable: true,
686
- writable: true,
687
- value: () => this.chain(new RandomKeyCommand(this.commandOptions))
688
- });
689
- /**
690
- * @see https://redis.io/commands/rename
691
- */
692
- Object.defineProperty(this, "rename", {
693
- enumerable: true,
694
- configurable: true,
695
- writable: true,
696
- value: (...args) => this.chain(new RenameCommand(args, this.commandOptions))
697
- });
698
- /**
699
- * @see https://redis.io/commands/renamenx
700
- */
701
- Object.defineProperty(this, "renamenx", {
702
- enumerable: true,
703
- configurable: true,
704
- writable: true,
705
- value: (...args) => this.chain(new RenameNXCommand(args, this.commandOptions))
706
- });
707
- /**
708
- * @see https://redis.io/commands/rpop
709
- */
710
- Object.defineProperty(this, "rpop", {
711
- enumerable: true,
712
- configurable: true,
713
- writable: true,
714
- value: (...args) => this.chain(new RPopCommand(args, this.commandOptions))
715
- });
716
- /**
717
- * @see https://redis.io/commands/rpush
718
- */
719
- Object.defineProperty(this, "rpush", {
720
- enumerable: true,
721
- configurable: true,
722
- writable: true,
723
- value: (key, ...elements) => this.chain(new RPushCommand([key, ...elements], this.commandOptions))
724
- });
725
- /**
726
- * @see https://redis.io/commands/rpushx
727
- */
728
- Object.defineProperty(this, "rpushx", {
729
- enumerable: true,
730
- configurable: true,
731
- writable: true,
732
- value: (key, ...elements) => this.chain(new RPushXCommand([key, ...elements], this.commandOptions))
733
- });
734
- /**
735
- * @see https://redis.io/commands/sadd
736
- */
737
- Object.defineProperty(this, "sadd", {
738
- enumerable: true,
739
- configurable: true,
740
- writable: true,
741
- value: (key, ...members) => this.chain(new SAddCommand([key, ...members], this.commandOptions))
742
- });
743
- /**
744
- * @see https://redis.io/commands/scan
745
- */
746
- Object.defineProperty(this, "scan", {
747
- enumerable: true,
748
- configurable: true,
749
- writable: true,
750
- value: (...args) => this.chain(new ScanCommand(args, this.commandOptions))
751
- });
752
- /**
753
- * @see https://redis.io/commands/scard
754
- */
755
- Object.defineProperty(this, "scard", {
756
- enumerable: true,
757
- configurable: true,
758
- writable: true,
759
- value: (...args) => this.chain(new SCardCommand(args, this.commandOptions))
760
- });
761
- /**
762
- * @see https://redis.io/commands/script-exists
763
- */
764
- Object.defineProperty(this, "scriptExists", {
765
- enumerable: true,
766
- configurable: true,
767
- writable: true,
768
- value: (...args) => this.chain(new ScriptExistsCommand(args, this.commandOptions))
769
- });
770
- /**
771
- * @see https://redis.io/commands/script-flush
772
- */
773
- Object.defineProperty(this, "scriptFlush", {
774
- enumerable: true,
775
- configurable: true,
776
- writable: true,
777
- value: (...args) => this.chain(new ScriptFlushCommand(args, this.commandOptions))
778
- });
779
- /**
780
- * @see https://redis.io/commands/script-load
781
- */
782
- Object.defineProperty(this, "scriptLoad", {
783
- enumerable: true,
784
- configurable: true,
785
- writable: true,
786
- value: (...args) => this.chain(new ScriptLoadCommand(args, this.commandOptions))
787
- });
788
- /*)*
789
- * @see https://redis.io/commands/sdiff
790
- */
791
- Object.defineProperty(this, "sdiff", {
792
- enumerable: true,
793
- configurable: true,
794
- writable: true,
795
- value: (...args) => this.chain(new SDiffCommand(args, this.commandOptions))
796
- });
797
- /**
798
- * @see https://redis.io/commands/sdiffstore
799
- */
800
- Object.defineProperty(this, "sdiffstore", {
801
- enumerable: true,
802
- configurable: true,
803
- writable: true,
804
- value: (...args) => this.chain(new SDiffStoreCommand(args, this.commandOptions))
805
- });
806
- /**
807
- * @see https://redis.io/commands/set
808
- */
809
- Object.defineProperty(this, "set", {
810
- enumerable: true,
811
- configurable: true,
812
- writable: true,
813
- value: (key, value, opts) => this.chain(new SetCommand([key, value, opts], this.commandOptions))
814
- });
815
- /**
816
- * @see https://redis.io/commands/setbit
817
- */
818
- Object.defineProperty(this, "setbit", {
819
- enumerable: true,
820
- configurable: true,
821
- writable: true,
822
- value: (...args) => this.chain(new SetBitCommand(args, this.commandOptions))
823
- });
824
- /**
825
- * @see https://redis.io/commands/setex
826
- */
827
- Object.defineProperty(this, "setex", {
828
- enumerable: true,
829
- configurable: true,
830
- writable: true,
831
- value: (key, ttl, value) => this.chain(new SetExCommand([key, ttl, value], this.commandOptions))
832
- });
833
- /**
834
- * @see https://redis.io/commands/setnx
835
- */
836
- Object.defineProperty(this, "setnx", {
837
- enumerable: true,
838
- configurable: true,
839
- writable: true,
840
- value: (key, value) => this.chain(new SetNxCommand([key, value], this.commandOptions))
841
- });
842
- /**
843
- * @see https://redis.io/commands/setrange
844
- */
845
- Object.defineProperty(this, "setrange", {
846
- enumerable: true,
847
- configurable: true,
848
- writable: true,
849
- value: (...args) => this.chain(new SetRangeCommand(args, this.commandOptions))
850
- });
851
- /**
852
- * @see https://redis.io/commands/sinter
853
- */
854
- Object.defineProperty(this, "sinter", {
855
- enumerable: true,
856
- configurable: true,
857
- writable: true,
858
- value: (...args) => this.chain(new SInterCommand(args, this.commandOptions))
859
- });
860
- /**
861
- * @see https://redis.io/commands/sinterstore
862
- */
863
- Object.defineProperty(this, "sinterstore", {
864
- enumerable: true,
865
- configurable: true,
866
- writable: true,
867
- value: (...args) => this.chain(new SInterStoreCommand(args, this.commandOptions))
868
- });
869
- /**
870
- * @see https://redis.io/commands/sismember
871
- */
872
- Object.defineProperty(this, "sismember", {
873
- enumerable: true,
874
- configurable: true,
875
- writable: true,
876
- value: (key, member) => this.chain(new SIsMemberCommand([key, member], this.commandOptions))
877
- });
878
- /**
879
- * @see https://redis.io/commands/smembers
880
- */
881
- Object.defineProperty(this, "smembers", {
882
- enumerable: true,
883
- configurable: true,
884
- writable: true,
885
- value: (...args) => this.chain(new SMembersCommand(args, this.commandOptions))
886
- });
887
- /**
888
- * @see https://redis.io/commands/smismember
889
- */
890
- Object.defineProperty(this, "smismember", {
891
- enumerable: true,
892
- configurable: true,
893
- writable: true,
894
- value: (key, members) => this.chain(new SMIsMemberCommand([key, members], this.commandOptions))
895
- });
896
- /**
897
- * @see https://redis.io/commands/smove
898
- */
899
- Object.defineProperty(this, "smove", {
900
- enumerable: true,
901
- configurable: true,
902
- writable: true,
903
- value: (source, destination, member) => this.chain(new SMoveCommand([source, destination, member], this.commandOptions))
904
- });
905
- /**
906
- * @see https://redis.io/commands/spop
907
- */
908
- Object.defineProperty(this, "spop", {
909
- enumerable: true,
910
- configurable: true,
911
- writable: true,
912
- value: (...args) => this.chain(new SPopCommand(args, this.commandOptions))
913
- });
914
- /**
915
- * @see https://redis.io/commands/srandmember
916
- */
917
- Object.defineProperty(this, "srandmember", {
918
- enumerable: true,
919
- configurable: true,
920
- writable: true,
921
- value: (...args) => this.chain(new SRandMemberCommand(args, this.commandOptions))
922
- });
923
- /**
924
- * @see https://redis.io/commands/srem
925
- */
926
- Object.defineProperty(this, "srem", {
927
- enumerable: true,
928
- configurable: true,
929
- writable: true,
930
- value: (key, ...members) => this.chain(new SRemCommand([key, ...members], this.commandOptions))
931
- });
932
- /**
933
- * @see https://redis.io/commands/sscan
934
- */
935
- Object.defineProperty(this, "sscan", {
936
- enumerable: true,
937
- configurable: true,
938
- writable: true,
939
- value: (...args) => this.chain(new SScanCommand(args, this.commandOptions))
940
- });
941
- /**
942
- * @see https://redis.io/commands/strlen
943
- */
944
- Object.defineProperty(this, "strlen", {
945
- enumerable: true,
946
- configurable: true,
947
- writable: true,
948
- value: (...args) => this.chain(new StrLenCommand(args, this.commandOptions))
949
- });
950
- /**
951
- * @see https://redis.io/commands/sunion
952
- */
953
- Object.defineProperty(this, "sunion", {
954
- enumerable: true,
955
- configurable: true,
956
- writable: true,
957
- value: (...args) => this.chain(new SUnionCommand(args, this.commandOptions))
958
- });
959
- /**
960
- * @see https://redis.io/commands/sunionstore
961
- */
962
- Object.defineProperty(this, "sunionstore", {
963
- enumerable: true,
964
- configurable: true,
965
- writable: true,
966
- value: (...args) => this.chain(new SUnionStoreCommand(args, this.commandOptions))
967
- });
968
- /**
969
- * @see https://redis.io/commands/time
970
- */
971
- Object.defineProperty(this, "time", {
972
- enumerable: true,
973
- configurable: true,
974
- writable: true,
975
- value: () => this.chain(new TimeCommand(this.commandOptions))
976
- });
977
- /**
978
- * @see https://redis.io/commands/touch
979
- */
980
- Object.defineProperty(this, "touch", {
981
- enumerable: true,
982
- configurable: true,
983
- writable: true,
984
- value: (...args) => this.chain(new TouchCommand(args, this.commandOptions))
985
- });
986
- /**
987
- * @see https://redis.io/commands/ttl
988
- */
989
- Object.defineProperty(this, "ttl", {
990
- enumerable: true,
991
- configurable: true,
992
- writable: true,
993
- value: (...args) => this.chain(new TtlCommand(args, this.commandOptions))
994
- });
995
- /**
996
- * @see https://redis.io/commands/type
997
- */
998
- Object.defineProperty(this, "type", {
999
- enumerable: true,
1000
- configurable: true,
1001
- writable: true,
1002
- value: (...args) => this.chain(new TypeCommand(args, this.commandOptions))
1003
- });
1004
- /**
1005
- * @see https://redis.io/commands/unlink
1006
- */
1007
- Object.defineProperty(this, "unlink", {
1008
- enumerable: true,
1009
- configurable: true,
1010
- writable: true,
1011
- value: (...args) => this.chain(new UnlinkCommand(args, this.commandOptions))
1012
- });
1013
- /**
1014
- * @see https://redis.io/commands/zadd
1015
- */
1016
- Object.defineProperty(this, "zadd", {
1017
- enumerable: true,
1018
- configurable: true,
1019
- writable: true,
1020
- value: (...args) => {
1021
- if ("score" in args[1]) {
1022
- return this.chain(new ZAddCommand([args[0], args[1], ...args.slice(2)], this.commandOptions));
1023
- }
1024
- return this.chain(new ZAddCommand([args[0], args[1], ...args.slice(2)], this.commandOptions));
1025
- }
1026
- });
1027
- /**
1028
- * @see https://redis.io/commands/zcard
1029
- */
1030
- Object.defineProperty(this, "zcard", {
1031
- enumerable: true,
1032
- configurable: true,
1033
- writable: true,
1034
- value: (...args) => this.chain(new ZCardCommand(args, this.commandOptions))
1035
- });
1036
- /**
1037
- * @see https://redis.io/commands/zcount
1038
- */
1039
- Object.defineProperty(this, "zcount", {
1040
- enumerable: true,
1041
- configurable: true,
1042
- writable: true,
1043
- value: (...args) => this.chain(new ZCountCommand(args, this.commandOptions))
1044
- });
1045
- /**
1046
- * @see https://redis.io/commands/zincrby
1047
- */
1048
- Object.defineProperty(this, "zincrby", {
1049
- enumerable: true,
1050
- configurable: true,
1051
- writable: true,
1052
- value: (key, increment, member) => this.chain(new ZIncrByCommand([key, increment, member], this.commandOptions))
1053
- });
1054
- /**
1055
- * @see https://redis.io/commands/zinterstore
1056
- */
1057
- Object.defineProperty(this, "zinterstore", {
1058
- enumerable: true,
1059
- configurable: true,
1060
- writable: true,
1061
- value: (...args) => this.chain(new ZInterStoreCommand(args, this.commandOptions))
1062
- });
1063
- /**
1064
- * @see https://redis.io/commands/zlexcount
1065
- */
1066
- Object.defineProperty(this, "zlexcount", {
1067
- enumerable: true,
1068
- configurable: true,
1069
- writable: true,
1070
- value: (...args) => this.chain(new ZLexCountCommand(args, this.commandOptions))
1071
- });
1072
- /**
1073
- * @see https://redis.io/commands/zmscore
1074
- */
1075
- Object.defineProperty(this, "zmscore", {
1076
- enumerable: true,
1077
- configurable: true,
1078
- writable: true,
1079
- value: (...args) => this.chain(new ZMScoreCommand(args, this.commandOptions))
1080
- });
1081
- /**
1082
- * @see https://redis.io/commands/zpopmax
1083
- */
1084
- Object.defineProperty(this, "zpopmax", {
1085
- enumerable: true,
1086
- configurable: true,
1087
- writable: true,
1088
- value: (...args) => this.chain(new ZPopMaxCommand(args, this.commandOptions))
1089
- });
1090
- /**
1091
- * @see https://redis.io/commands/zpopmin
1092
- */
1093
- Object.defineProperty(this, "zpopmin", {
1094
- enumerable: true,
1095
- configurable: true,
1096
- writable: true,
1097
- value: (...args) => this.chain(new ZPopMinCommand(args, this.commandOptions))
1098
- });
1099
- /**
1100
- * @see https://redis.io/commands/zrange
1101
- */
1102
- Object.defineProperty(this, "zrange", {
1103
- enumerable: true,
1104
- configurable: true,
1105
- writable: true,
1106
- value: (...args) => this.chain(new ZRangeCommand(args, this.commandOptions))
1107
- });
1108
- /**
1109
- * @see https://redis.io/commands/zrank
1110
- */
1111
- Object.defineProperty(this, "zrank", {
1112
- enumerable: true,
1113
- configurable: true,
1114
- writable: true,
1115
- value: (key, member) => this.chain(new ZRankCommand([key, member], this.commandOptions))
1116
- });
1117
- /**
1118
- * @see https://redis.io/commands/zrem
1119
- */
1120
- Object.defineProperty(this, "zrem", {
1121
- enumerable: true,
1122
- configurable: true,
1123
- writable: true,
1124
- value: (key, ...members) => this.chain(new ZRemCommand([key, ...members], this.commandOptions))
1125
- });
1126
- /**
1127
- * @see https://redis.io/commands/zremrangebylex
1128
- */
1129
- Object.defineProperty(this, "zremrangebylex", {
1130
- enumerable: true,
1131
- configurable: true,
1132
- writable: true,
1133
- value: (...args) => this.chain(new ZRemRangeByLexCommand(args, this.commandOptions))
1134
- });
1135
- /**
1136
- * @see https://redis.io/commands/zremrangebyrank
1137
- */
1138
- Object.defineProperty(this, "zremrangebyrank", {
1139
- enumerable: true,
1140
- configurable: true,
1141
- writable: true,
1142
- value: (...args) => this.chain(new ZRemRangeByRankCommand(args, this.commandOptions))
1143
- });
1144
- /**
1145
- * @see https://redis.io/commands/zremrangebyscore
1146
- */
1147
- Object.defineProperty(this, "zremrangebyscore", {
1148
- enumerable: true,
1149
- configurable: true,
1150
- writable: true,
1151
- value: (...args) => this.chain(new ZRemRangeByScoreCommand(args, this.commandOptions))
1152
- });
1153
- /**
1154
- * @see https://redis.io/commands/zrevrank
1155
- */
1156
- Object.defineProperty(this, "zrevrank", {
1157
- enumerable: true,
1158
- configurable: true,
1159
- writable: true,
1160
- value: (key, member) => this.chain(new ZRevRankCommand([key, member], this.commandOptions))
1161
- });
1162
- /**
1163
- * @see https://redis.io/commands/zscan
1164
- */
1165
- Object.defineProperty(this, "zscan", {
1166
- enumerable: true,
1167
- configurable: true,
1168
- writable: true,
1169
- value: (...args) => this.chain(new ZScanCommand(args, this.commandOptions))
1170
- });
1171
- /**
1172
- * @see https://redis.io/commands/zscore
1173
- */
1174
- Object.defineProperty(this, "zscore", {
1175
- enumerable: true,
1176
- configurable: true,
1177
- writable: true,
1178
- value: (key, member) => this.chain(new ZScoreCommand([key, member], this.commandOptions))
1179
- });
1180
- /**
1181
- * @see https://redis.io/commands/zunionstore
1182
- */
1183
- Object.defineProperty(this, "zunionstore", {
1184
- enumerable: true,
1185
- configurable: true,
1186
- writable: true,
1187
- value: (...args) => this.chain(new ZUnionStoreCommand(args, this.commandOptions))
1188
- });
1189
- this.client = opts.client;
1190
- this.commands = []; // the TCommands generic in the class definition is only used for carrying through chained command types and should never be explicitly set when instantiating the class
1191
- this.commandOptions = opts.commandOptions;
1192
- this.multiExec = opts.multiExec ?? false;
1193
- }
1194
- /**
1195
- * Pushes a command into the pipeline and returns a chainable instance of the
1196
- * pipeline
1197
- */
1198
- chain(command) {
1199
- this.commands.push(command);
1200
- return this; // TS thinks we're returning Pipeline<[]> here, because we're not creating a new instance of the class, hence the cast
1201
- }
1202
- /**
1203
- * @see https://redis.io/commands/?group=json
1204
- */
1205
- get json() {
1206
- return {
1207
- /**
1208
- * @see https://redis.io/commands/json.arrappend
1209
- */
1210
- arrappend: (...args) => this.chain(new JsonArrAppendCommand(args, this.commandOptions)),
1211
- /**
1212
- * @see https://redis.io/commands/json.arrindex
1213
- */
1214
- arrindex: (...args) => this.chain(new JsonArrIndexCommand(args, this.commandOptions)),
1215
- /**
1216
- * @see https://redis.io/commands/json.arrinsert
1217
- */
1218
- arrinsert: (...args) => this.chain(new JsonArrInsertCommand(args, this.commandOptions)),
1219
- /**
1220
- * @see https://redis.io/commands/json.arrlen
1221
- */
1222
- arrlen: (...args) => this.chain(new JsonArrLenCommand(args, this.commandOptions)),
1223
- /**
1224
- * @see https://redis.io/commands/json.arrpop
1225
- */
1226
- arrpop: (...args) => this.chain(new JsonArrPopCommand(args, this.commandOptions)),
1227
- /**
1228
- * @see https://redis.io/commands/json.arrtrim
1229
- */
1230
- arrtrim: (...args) => this.chain(new JsonArrTrimCommand(args, this.commandOptions)),
1231
- /**
1232
- * @see https://redis.io/commands/json.clear
1233
- */
1234
- clear: (...args) => this.chain(new JsonClearCommand(args, this.commandOptions)),
1235
- /**
1236
- * @see https://redis.io/commands/json.del
1237
- */
1238
- del: (...args) => this.chain(new JsonDelCommand(args, this.commandOptions)),
1239
- /**
1240
- * @see https://redis.io/commands/json.forget
1241
- */
1242
- forget: (...args) => this.chain(new JsonForgetCommand(args, this.commandOptions)),
1243
- /**
1244
- * @see https://redis.io/commands/json.get
1245
- */
1246
- get: (...args) => this.chain(new JsonGetCommand(args, this.commandOptions)),
1247
- /**
1248
- * @see https://redis.io/commands/json.mget
1249
- */
1250
- mget: (...args) => this.chain(new JsonMGetCommand(args, this.commandOptions)),
1251
- /**
1252
- * @see https://redis.io/commands/json.numincrby
1253
- */
1254
- numincrby: (...args) => this.chain(new JsonNumIncrByCommand(args, this.commandOptions)),
1255
- /**
1256
- * @see https://redis.io/commands/json.nummultby
1257
- */
1258
- nummultby: (...args) => this.chain(new JsonNumMultByCommand(args, this.commandOptions)),
1259
- /**
1260
- * @see https://redis.io/commands/json.objkeys
1261
- */
1262
- objkeys: (...args) => this.chain(new JsonObjKeysCommand(args, this.commandOptions)),
1263
- /**
1264
- * @see https://redis.io/commands/json.objlen
1265
- */
1266
- objlen: (...args) => this.chain(new JsonObjLenCommand(args, this.commandOptions)),
1267
- /**
1268
- * @see https://redis.io/commands/json.resp
1269
- */
1270
- resp: (...args) => this.chain(new JsonRespCommand(args, this.commandOptions)),
1271
- /**
1272
- * @see https://redis.io/commands/json.set
1273
- */
1274
- set: (...args) => this.chain(new JsonSetCommand(args, this.commandOptions)),
1275
- /**
1276
- * @see https://redis.io/commands/json.strappend
1277
- */
1278
- strappend: (...args) => this.chain(new JsonStrAppendCommand(args, this.commandOptions)),
1279
- /**
1280
- * @see https://redis.io/commands/json.strlen
1281
- */
1282
- strlen: (...args) => this.chain(new JsonStrLenCommand(args, this.commandOptions)),
1283
- /**
1284
- * @see https://redis.io/commands/json.toggle
1285
- */
1286
- toggle: (...args) => this.chain(new JsonToggleCommand(args, this.commandOptions)),
1287
- /**
1288
- * @see https://redis.io/commands/json.type
1289
- */
1290
- type: (...args) => this.chain(new JsonTypeCommand(args, this.commandOptions)),
1291
- };
1292
- }
1293
- }