@upstash/redis 0.0.0-ci.fb6b986f-20221006 → 0.0.0-ci.fc1b22d0-20231019

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 (421) hide show
  1. package/.npmrc +1 -0
  2. package/README.md +21 -19
  3. package/cloudflare.d.mts +45 -0
  4. package/{types/platforms/cloudflare.d.ts → cloudflare.d.ts} +14 -11
  5. package/cloudflare.js +3062 -0
  6. package/cloudflare.js.map +1 -0
  7. package/cloudflare.mjs +3025 -0
  8. package/cloudflare.mjs.map +1 -0
  9. package/fastly.d.mts +43 -0
  10. package/{types/platforms/fastly.d.ts → fastly.d.ts} +8 -10
  11. package/fastly.js +3037 -0
  12. package/fastly.js.map +1 -0
  13. package/fastly.mjs +3000 -0
  14. package/fastly.mjs.map +1 -0
  15. package/{types/platforms/node_with_fetch.d.ts → nodejs.d.mts} +9 -11
  16. package/{types/platforms/nodejs.d.ts → nodejs.d.ts} +9 -10
  17. package/nodejs.js +3063 -0
  18. package/nodejs.js.map +1 -0
  19. package/nodejs.mjs +3026 -0
  20. package/nodejs.mjs.map +1 -0
  21. package/package.json +29 -38
  22. package/redis-e3e8473f.d.ts +1795 -0
  23. package/.releaserc +0 -14
  24. package/LICENSE +0 -21
  25. package/esm/deps/deno.land/x/base64@v0.2.1/base.js +0 -100
  26. package/esm/deps/deno.land/x/base64@v0.2.1/base64url.js +0 -9
  27. package/esm/deps/deno.land/x/sha1@v1.0.3/deps.js +0 -1
  28. package/esm/deps/deno.land/x/sha1@v1.0.3/mod.js +0 -191
  29. package/esm/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.js +0 -50
  30. package/esm/package.json +0 -3
  31. package/esm/pkg/commands/append.js +0 -9
  32. package/esm/pkg/commands/bitcount.js +0 -16
  33. package/esm/pkg/commands/bitop.js +0 -9
  34. package/esm/pkg/commands/bitpos.js +0 -9
  35. package/esm/pkg/commands/command.js +0 -57
  36. package/esm/pkg/commands/dbsize.js +0 -9
  37. package/esm/pkg/commands/decr.js +0 -9
  38. package/esm/pkg/commands/decrby.js +0 -9
  39. package/esm/pkg/commands/del.js +0 -9
  40. package/esm/pkg/commands/echo.js +0 -9
  41. package/esm/pkg/commands/eval.js +0 -9
  42. package/esm/pkg/commands/evalsha.js +0 -9
  43. package/esm/pkg/commands/exists.js +0 -9
  44. package/esm/pkg/commands/expire.js +0 -9
  45. package/esm/pkg/commands/expireat.js +0 -9
  46. package/esm/pkg/commands/flushall.js +0 -13
  47. package/esm/pkg/commands/flushdb.js +0 -13
  48. package/esm/pkg/commands/get.js +0 -9
  49. package/esm/pkg/commands/getbit.js +0 -9
  50. package/esm/pkg/commands/getrange.js +0 -9
  51. package/esm/pkg/commands/getset.js +0 -9
  52. package/esm/pkg/commands/hdel.js +0 -9
  53. package/esm/pkg/commands/hexists.js +0 -9
  54. package/esm/pkg/commands/hget.js +0 -9
  55. package/esm/pkg/commands/hgetall.js +0 -33
  56. package/esm/pkg/commands/hincrby.js +0 -9
  57. package/esm/pkg/commands/hincrbyfloat.js +0 -9
  58. package/esm/pkg/commands/hkeys.js +0 -9
  59. package/esm/pkg/commands/hlen.js +0 -9
  60. package/esm/pkg/commands/hmget.js +0 -35
  61. package/esm/pkg/commands/hmset.js +0 -13
  62. package/esm/pkg/commands/hscan.js +0 -16
  63. package/esm/pkg/commands/hset.js +0 -13
  64. package/esm/pkg/commands/hsetnx.js +0 -9
  65. package/esm/pkg/commands/hstrlen.js +0 -9
  66. package/esm/pkg/commands/hvals.js +0 -9
  67. package/esm/pkg/commands/incr.js +0 -9
  68. package/esm/pkg/commands/incrby.js +0 -9
  69. package/esm/pkg/commands/incrbyfloat.js +0 -9
  70. package/esm/pkg/commands/keys.js +0 -9
  71. package/esm/pkg/commands/lindex.js +0 -6
  72. package/esm/pkg/commands/linsert.js +0 -6
  73. package/esm/pkg/commands/llen.js +0 -9
  74. package/esm/pkg/commands/lpop.js +0 -9
  75. package/esm/pkg/commands/lpos.js +0 -19
  76. package/esm/pkg/commands/lpush.js +0 -9
  77. package/esm/pkg/commands/lpushx.js +0 -9
  78. package/esm/pkg/commands/lrange.js +0 -6
  79. package/esm/pkg/commands/lrem.js +0 -6
  80. package/esm/pkg/commands/lset.js +0 -6
  81. package/esm/pkg/commands/ltrim.js +0 -6
  82. package/esm/pkg/commands/mget.js +0 -9
  83. package/esm/pkg/commands/mod.js +0 -115
  84. package/esm/pkg/commands/mset.js +0 -12
  85. package/esm/pkg/commands/msetnx.js +0 -9
  86. package/esm/pkg/commands/persist.js +0 -9
  87. package/esm/pkg/commands/pexpire.js +0 -9
  88. package/esm/pkg/commands/pexpireat.js +0 -9
  89. package/esm/pkg/commands/ping.js +0 -13
  90. package/esm/pkg/commands/psetex.js +0 -9
  91. package/esm/pkg/commands/pttl.js +0 -9
  92. package/esm/pkg/commands/publish.js +0 -9
  93. package/esm/pkg/commands/randomkey.js +0 -9
  94. package/esm/pkg/commands/rename.js +0 -9
  95. package/esm/pkg/commands/renamenx.js +0 -9
  96. package/esm/pkg/commands/rpop.js +0 -9
  97. package/esm/pkg/commands/rpush.js +0 -9
  98. package/esm/pkg/commands/rpushx.js +0 -9
  99. package/esm/pkg/commands/sadd.js +0 -9
  100. package/esm/pkg/commands/scan.js +0 -19
  101. package/esm/pkg/commands/scard.js +0 -9
  102. package/esm/pkg/commands/script_exists.js +0 -12
  103. package/esm/pkg/commands/script_flush.js +0 -16
  104. package/esm/pkg/commands/script_load.js +0 -9
  105. package/esm/pkg/commands/sdiff.js +0 -9
  106. package/esm/pkg/commands/sdiffstore.js +0 -9
  107. package/esm/pkg/commands/set.js +0 -36
  108. package/esm/pkg/commands/setbit.js +0 -9
  109. package/esm/pkg/commands/setex.js +0 -9
  110. package/esm/pkg/commands/setnx.js +0 -9
  111. package/esm/pkg/commands/setrange.js +0 -9
  112. package/esm/pkg/commands/sinter.js +0 -9
  113. package/esm/pkg/commands/sinterstore.js +0 -9
  114. package/esm/pkg/commands/sismember.js +0 -9
  115. package/esm/pkg/commands/smembers.js +0 -9
  116. package/esm/pkg/commands/smove.js +0 -9
  117. package/esm/pkg/commands/spop.js +0 -13
  118. package/esm/pkg/commands/srandmember.js +0 -13
  119. package/esm/pkg/commands/srem.js +0 -9
  120. package/esm/pkg/commands/sscan.js +0 -16
  121. package/esm/pkg/commands/strlen.js +0 -9
  122. package/esm/pkg/commands/sunion.js +0 -9
  123. package/esm/pkg/commands/sunionstore.js +0 -9
  124. package/esm/pkg/commands/time.js +0 -9
  125. package/esm/pkg/commands/touch.js +0 -9
  126. package/esm/pkg/commands/ttl.js +0 -9
  127. package/esm/pkg/commands/type.js +0 -9
  128. package/esm/pkg/commands/unlink.js +0 -9
  129. package/esm/pkg/commands/zadd.js +0 -26
  130. package/esm/pkg/commands/zcard.js +0 -9
  131. package/esm/pkg/commands/zcount.js +0 -9
  132. package/esm/pkg/commands/zincrby.js +0 -9
  133. package/esm/pkg/commands/zinterstore.js +0 -27
  134. package/esm/pkg/commands/zlexcount.js +0 -9
  135. package/esm/pkg/commands/zmscore.js +0 -10
  136. package/esm/pkg/commands/zpopmax.js +0 -13
  137. package/esm/pkg/commands/zpopmin.js +0 -13
  138. package/esm/pkg/commands/zrange.js +0 -26
  139. package/esm/pkg/commands/zrank.js +0 -9
  140. package/esm/pkg/commands/zrem.js +0 -9
  141. package/esm/pkg/commands/zremrangebylex.js +0 -9
  142. package/esm/pkg/commands/zremrangebyrank.js +0 -9
  143. package/esm/pkg/commands/zremrangebyscore.js +0 -9
  144. package/esm/pkg/commands/zrevrank.js +0 -9
  145. package/esm/pkg/commands/zscan.js +0 -16
  146. package/esm/pkg/commands/zscore.js +0 -9
  147. package/esm/pkg/commands/zunionstore.js +0 -27
  148. package/esm/pkg/error.js +0 -9
  149. package/esm/pkg/http.js +0 -128
  150. package/esm/pkg/pipeline.js +0 -1144
  151. package/esm/pkg/redis.js +0 -1102
  152. package/esm/pkg/script.js +0 -77
  153. package/esm/pkg/types.js +0 -1
  154. package/esm/pkg/util.js +0 -31
  155. package/esm/platforms/cloudflare.js +0 -62
  156. package/esm/platforms/fastly.js +0 -40
  157. package/esm/platforms/node_with_fetch.js +0 -60
  158. package/esm/platforms/nodejs.js +0 -59
  159. package/script/deps/deno.land/x/base64@v0.2.1/base.js +0 -104
  160. package/script/deps/deno.land/x/base64@v0.2.1/base64url.js +0 -13
  161. package/script/deps/deno.land/x/sha1@v1.0.3/deps.js +0 -6
  162. package/script/deps/deno.land/x/sha1@v1.0.3/mod.js +0 -196
  163. package/script/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.js +0 -55
  164. package/script/package.json +0 -3
  165. package/script/pkg/commands/append.js +0 -13
  166. package/script/pkg/commands/bitcount.js +0 -20
  167. package/script/pkg/commands/bitop.js +0 -13
  168. package/script/pkg/commands/bitpos.js +0 -13
  169. package/script/pkg/commands/command.js +0 -61
  170. package/script/pkg/commands/dbsize.js +0 -13
  171. package/script/pkg/commands/decr.js +0 -13
  172. package/script/pkg/commands/decrby.js +0 -13
  173. package/script/pkg/commands/del.js +0 -13
  174. package/script/pkg/commands/echo.js +0 -13
  175. package/script/pkg/commands/eval.js +0 -13
  176. package/script/pkg/commands/evalsha.js +0 -13
  177. package/script/pkg/commands/exists.js +0 -13
  178. package/script/pkg/commands/expire.js +0 -13
  179. package/script/pkg/commands/expireat.js +0 -13
  180. package/script/pkg/commands/flushall.js +0 -17
  181. package/script/pkg/commands/flushdb.js +0 -17
  182. package/script/pkg/commands/get.js +0 -13
  183. package/script/pkg/commands/getbit.js +0 -13
  184. package/script/pkg/commands/getrange.js +0 -13
  185. package/script/pkg/commands/getset.js +0 -13
  186. package/script/pkg/commands/hdel.js +0 -13
  187. package/script/pkg/commands/hexists.js +0 -13
  188. package/script/pkg/commands/hget.js +0 -13
  189. package/script/pkg/commands/hgetall.js +0 -37
  190. package/script/pkg/commands/hincrby.js +0 -13
  191. package/script/pkg/commands/hincrbyfloat.js +0 -13
  192. package/script/pkg/commands/hkeys.js +0 -13
  193. package/script/pkg/commands/hlen.js +0 -13
  194. package/script/pkg/commands/hmget.js +0 -39
  195. package/script/pkg/commands/hmset.js +0 -17
  196. package/script/pkg/commands/hscan.js +0 -20
  197. package/script/pkg/commands/hset.js +0 -17
  198. package/script/pkg/commands/hsetnx.js +0 -13
  199. package/script/pkg/commands/hstrlen.js +0 -13
  200. package/script/pkg/commands/hvals.js +0 -13
  201. package/script/pkg/commands/incr.js +0 -13
  202. package/script/pkg/commands/incrby.js +0 -13
  203. package/script/pkg/commands/incrbyfloat.js +0 -13
  204. package/script/pkg/commands/keys.js +0 -13
  205. package/script/pkg/commands/lindex.js +0 -10
  206. package/script/pkg/commands/linsert.js +0 -10
  207. package/script/pkg/commands/llen.js +0 -13
  208. package/script/pkg/commands/lpop.js +0 -13
  209. package/script/pkg/commands/lpos.js +0 -23
  210. package/script/pkg/commands/lpush.js +0 -13
  211. package/script/pkg/commands/lpushx.js +0 -13
  212. package/script/pkg/commands/lrange.js +0 -10
  213. package/script/pkg/commands/lrem.js +0 -10
  214. package/script/pkg/commands/lset.js +0 -10
  215. package/script/pkg/commands/ltrim.js +0 -10
  216. package/script/pkg/commands/mget.js +0 -13
  217. package/script/pkg/commands/mod.js +0 -131
  218. package/script/pkg/commands/mset.js +0 -16
  219. package/script/pkg/commands/msetnx.js +0 -13
  220. package/script/pkg/commands/persist.js +0 -13
  221. package/script/pkg/commands/pexpire.js +0 -13
  222. package/script/pkg/commands/pexpireat.js +0 -13
  223. package/script/pkg/commands/ping.js +0 -17
  224. package/script/pkg/commands/psetex.js +0 -13
  225. package/script/pkg/commands/pttl.js +0 -13
  226. package/script/pkg/commands/publish.js +0 -13
  227. package/script/pkg/commands/randomkey.js +0 -13
  228. package/script/pkg/commands/rename.js +0 -13
  229. package/script/pkg/commands/renamenx.js +0 -13
  230. package/script/pkg/commands/rpop.js +0 -13
  231. package/script/pkg/commands/rpush.js +0 -13
  232. package/script/pkg/commands/rpushx.js +0 -13
  233. package/script/pkg/commands/sadd.js +0 -13
  234. package/script/pkg/commands/scan.js +0 -23
  235. package/script/pkg/commands/scard.js +0 -13
  236. package/script/pkg/commands/script_exists.js +0 -16
  237. package/script/pkg/commands/script_flush.js +0 -20
  238. package/script/pkg/commands/script_load.js +0 -13
  239. package/script/pkg/commands/sdiff.js +0 -13
  240. package/script/pkg/commands/sdiffstore.js +0 -13
  241. package/script/pkg/commands/set.js +0 -40
  242. package/script/pkg/commands/setbit.js +0 -13
  243. package/script/pkg/commands/setex.js +0 -13
  244. package/script/pkg/commands/setnx.js +0 -13
  245. package/script/pkg/commands/setrange.js +0 -13
  246. package/script/pkg/commands/sinter.js +0 -13
  247. package/script/pkg/commands/sinterstore.js +0 -13
  248. package/script/pkg/commands/sismember.js +0 -13
  249. package/script/pkg/commands/smembers.js +0 -13
  250. package/script/pkg/commands/smove.js +0 -13
  251. package/script/pkg/commands/spop.js +0 -17
  252. package/script/pkg/commands/srandmember.js +0 -17
  253. package/script/pkg/commands/srem.js +0 -13
  254. package/script/pkg/commands/sscan.js +0 -20
  255. package/script/pkg/commands/strlen.js +0 -13
  256. package/script/pkg/commands/sunion.js +0 -13
  257. package/script/pkg/commands/sunionstore.js +0 -13
  258. package/script/pkg/commands/time.js +0 -13
  259. package/script/pkg/commands/touch.js +0 -13
  260. package/script/pkg/commands/ttl.js +0 -13
  261. package/script/pkg/commands/type.js +0 -13
  262. package/script/pkg/commands/unlink.js +0 -13
  263. package/script/pkg/commands/zadd.js +0 -30
  264. package/script/pkg/commands/zcard.js +0 -13
  265. package/script/pkg/commands/zcount.js +0 -13
  266. package/script/pkg/commands/zincrby.js +0 -13
  267. package/script/pkg/commands/zinterstore.js +0 -31
  268. package/script/pkg/commands/zlexcount.js +0 -13
  269. package/script/pkg/commands/zmscore.js +0 -14
  270. package/script/pkg/commands/zpopmax.js +0 -17
  271. package/script/pkg/commands/zpopmin.js +0 -17
  272. package/script/pkg/commands/zrange.js +0 -30
  273. package/script/pkg/commands/zrank.js +0 -13
  274. package/script/pkg/commands/zrem.js +0 -13
  275. package/script/pkg/commands/zremrangebylex.js +0 -13
  276. package/script/pkg/commands/zremrangebyrank.js +0 -13
  277. package/script/pkg/commands/zremrangebyscore.js +0 -13
  278. package/script/pkg/commands/zrevrank.js +0 -13
  279. package/script/pkg/commands/zscan.js +0 -20
  280. package/script/pkg/commands/zscore.js +0 -13
  281. package/script/pkg/commands/zunionstore.js +0 -31
  282. package/script/pkg/error.js +0 -13
  283. package/script/pkg/http.js +0 -132
  284. package/script/pkg/pipeline.js +0 -1148
  285. package/script/pkg/redis.js +0 -1106
  286. package/script/pkg/script.js +0 -81
  287. package/script/pkg/types.js +0 -2
  288. package/script/pkg/util.js +0 -35
  289. package/script/platforms/cloudflare.js +0 -89
  290. package/script/platforms/fastly.js +0 -67
  291. package/script/platforms/node_with_fetch.js +0 -87
  292. package/script/platforms/nodejs.js +0 -86
  293. package/types/deps/deno.land/x/base64@v0.2.1/base.d.ts +0 -5
  294. package/types/deps/deno.land/x/base64@v0.2.1/base64url.d.ts +0 -1
  295. package/types/deps/deno.land/x/sha1@v1.0.3/deps.d.ts +0 -1
  296. package/types/deps/deno.land/x/sha1@v1.0.3/mod.d.ts +0 -26
  297. package/types/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.d.ts +0 -3
  298. package/types/pkg/commands/append.d.ts +0 -7
  299. package/types/pkg/commands/bitcount.d.ts +0 -8
  300. package/types/pkg/commands/bitop.d.ts +0 -12
  301. package/types/pkg/commands/bitpos.d.ts +0 -7
  302. package/types/pkg/commands/command.d.ts +0 -37
  303. package/types/pkg/commands/dbsize.d.ts +0 -7
  304. package/types/pkg/commands/decr.d.ts +0 -7
  305. package/types/pkg/commands/decrby.d.ts +0 -7
  306. package/types/pkg/commands/del.d.ts +0 -7
  307. package/types/pkg/commands/echo.d.ts +0 -7
  308. package/types/pkg/commands/eval.d.ts +0 -7
  309. package/types/pkg/commands/evalsha.d.ts +0 -7
  310. package/types/pkg/commands/exists.d.ts +0 -7
  311. package/types/pkg/commands/expire.d.ts +0 -7
  312. package/types/pkg/commands/expireat.d.ts +0 -7
  313. package/types/pkg/commands/flushall.d.ts +0 -9
  314. package/types/pkg/commands/flushdb.d.ts +0 -9
  315. package/types/pkg/commands/get.d.ts +0 -7
  316. package/types/pkg/commands/getbit.d.ts +0 -7
  317. package/types/pkg/commands/getrange.d.ts +0 -7
  318. package/types/pkg/commands/getset.d.ts +0 -7
  319. package/types/pkg/commands/hdel.d.ts +0 -7
  320. package/types/pkg/commands/hexists.d.ts +0 -7
  321. package/types/pkg/commands/hget.d.ts +0 -7
  322. package/types/pkg/commands/hgetall.d.ts +0 -7
  323. package/types/pkg/commands/hincrby.d.ts +0 -7
  324. package/types/pkg/commands/hincrbyfloat.d.ts +0 -7
  325. package/types/pkg/commands/hkeys.d.ts +0 -7
  326. package/types/pkg/commands/hlen.d.ts +0 -7
  327. package/types/pkg/commands/hmget.d.ts +0 -15
  328. package/types/pkg/commands/hmset.d.ts +0 -9
  329. package/types/pkg/commands/hscan.d.ts +0 -24
  330. package/types/pkg/commands/hset.d.ts +0 -9
  331. package/types/pkg/commands/hsetnx.d.ts +0 -7
  332. package/types/pkg/commands/hstrlen.d.ts +0 -7
  333. package/types/pkg/commands/hvals.d.ts +0 -7
  334. package/types/pkg/commands/incr.d.ts +0 -7
  335. package/types/pkg/commands/incrby.d.ts +0 -7
  336. package/types/pkg/commands/incrbyfloat.d.ts +0 -7
  337. package/types/pkg/commands/keys.d.ts +0 -7
  338. package/types/pkg/commands/lindex.d.ts +0 -4
  339. package/types/pkg/commands/linsert.d.ts +0 -9
  340. package/types/pkg/commands/llen.d.ts +0 -7
  341. package/types/pkg/commands/lpop.d.ts +0 -7
  342. package/types/pkg/commands/lpos.d.ts +0 -15
  343. package/types/pkg/commands/lpush.d.ts +0 -7
  344. package/types/pkg/commands/lpushx.d.ts +0 -7
  345. package/types/pkg/commands/lrange.d.ts +0 -4
  346. package/types/pkg/commands/lrem.d.ts +0 -4
  347. package/types/pkg/commands/lset.d.ts +0 -4
  348. package/types/pkg/commands/ltrim.d.ts +0 -4
  349. package/types/pkg/commands/mget.d.ts +0 -7
  350. package/types/pkg/commands/mod.d.ts +0 -115
  351. package/types/pkg/commands/mset.d.ts +0 -9
  352. package/types/pkg/commands/msetnx.d.ts +0 -9
  353. package/types/pkg/commands/persist.d.ts +0 -7
  354. package/types/pkg/commands/pexpire.d.ts +0 -7
  355. package/types/pkg/commands/pexpireat.d.ts +0 -7
  356. package/types/pkg/commands/ping.d.ts +0 -7
  357. package/types/pkg/commands/psetex.d.ts +0 -7
  358. package/types/pkg/commands/pttl.d.ts +0 -7
  359. package/types/pkg/commands/publish.d.ts +0 -7
  360. package/types/pkg/commands/randomkey.d.ts +0 -7
  361. package/types/pkg/commands/rename.d.ts +0 -7
  362. package/types/pkg/commands/renamenx.d.ts +0 -7
  363. package/types/pkg/commands/rpop.d.ts +0 -7
  364. package/types/pkg/commands/rpush.d.ts +0 -7
  365. package/types/pkg/commands/rpushx.d.ts +0 -7
  366. package/types/pkg/commands/sadd.d.ts +0 -7
  367. package/types/pkg/commands/scan.d.ts +0 -18
  368. package/types/pkg/commands/scard.d.ts +0 -7
  369. package/types/pkg/commands/script_exists.d.ts +0 -7
  370. package/types/pkg/commands/script_flush.d.ts +0 -14
  371. package/types/pkg/commands/script_load.d.ts +0 -7
  372. package/types/pkg/commands/sdiff.d.ts +0 -7
  373. package/types/pkg/commands/sdiffstore.d.ts +0 -7
  374. package/types/pkg/commands/set.d.ts +0 -55
  375. package/types/pkg/commands/setbit.d.ts +0 -7
  376. package/types/pkg/commands/setex.d.ts +0 -7
  377. package/types/pkg/commands/setnx.d.ts +0 -7
  378. package/types/pkg/commands/setrange.d.ts +0 -7
  379. package/types/pkg/commands/sinter.d.ts +0 -7
  380. package/types/pkg/commands/sinterstore.d.ts +0 -7
  381. package/types/pkg/commands/sismember.d.ts +0 -7
  382. package/types/pkg/commands/smembers.d.ts +0 -7
  383. package/types/pkg/commands/smove.d.ts +0 -7
  384. package/types/pkg/commands/spop.d.ts +0 -7
  385. package/types/pkg/commands/srandmember.d.ts +0 -7
  386. package/types/pkg/commands/srem.d.ts +0 -7
  387. package/types/pkg/commands/sscan.d.ts +0 -24
  388. package/types/pkg/commands/strlen.d.ts +0 -7
  389. package/types/pkg/commands/sunion.d.ts +0 -7
  390. package/types/pkg/commands/sunionstore.d.ts +0 -7
  391. package/types/pkg/commands/time.d.ts +0 -7
  392. package/types/pkg/commands/touch.d.ts +0 -7
  393. package/types/pkg/commands/ttl.d.ts +0 -7
  394. package/types/pkg/commands/type.d.ts +0 -8
  395. package/types/pkg/commands/unlink.d.ts +0 -7
  396. package/types/pkg/commands/zadd.d.ts +0 -35
  397. package/types/pkg/commands/zcard.d.ts +0 -7
  398. package/types/pkg/commands/zcount.d.ts +0 -7
  399. package/types/pkg/commands/zincrby.d.ts +0 -7
  400. package/types/pkg/commands/zinterstore.d.ts +0 -30
  401. package/types/pkg/commands/zlexcount.d.ts +0 -7
  402. package/types/pkg/commands/zmscore.d.ts +0 -7
  403. package/types/pkg/commands/zpopmax.d.ts +0 -7
  404. package/types/pkg/commands/zpopmin.d.ts +0 -7
  405. package/types/pkg/commands/zrange.d.ts +0 -42
  406. package/types/pkg/commands/zrank.d.ts +0 -7
  407. package/types/pkg/commands/zrem.d.ts +0 -7
  408. package/types/pkg/commands/zremrangebylex.d.ts +0 -7
  409. package/types/pkg/commands/zremrangebyrank.d.ts +0 -7
  410. package/types/pkg/commands/zremrangebyscore.d.ts +0 -7
  411. package/types/pkg/commands/zrevrank.d.ts +0 -7
  412. package/types/pkg/commands/zscan.d.ts +0 -24
  413. package/types/pkg/commands/zscore.d.ts +0 -7
  414. package/types/pkg/commands/zunionstore.d.ts +0 -30
  415. package/types/pkg/error.d.ts +0 -6
  416. package/types/pkg/http.d.ts +0 -54
  417. package/types/pkg/pipeline.d.ts +0 -552
  418. package/types/pkg/redis.d.ts +0 -534
  419. package/types/pkg/script.d.ts +0 -42
  420. package/types/pkg/types.d.ts +0 -1
  421. package/types/pkg/util.d.ts +0 -1
@@ -1,54 +0,0 @@
1
- export declare type UpstashRequest = {
2
- path?: string[];
3
- /**
4
- * Request body will be serialized to json
5
- */
6
- body?: unknown;
7
- };
8
- export declare type UpstashResponse<TResult> = {
9
- result?: TResult;
10
- error?: string;
11
- };
12
- export interface Requester {
13
- request: <TResult = unknown>(req: UpstashRequest) => Promise<UpstashResponse<TResult>>;
14
- }
15
- export declare type RetryConfig = false | {
16
- /**
17
- * The number of retries to attempt before giving up.
18
- *
19
- * @default 5
20
- */
21
- retries?: number;
22
- /**
23
- * A backoff function receives the current retry cound and returns a number in milliseconds to wait before retrying.
24
- *
25
- * @default
26
- * ```ts
27
- * Math.exp(retryCount) * 50
28
- * ```
29
- */
30
- backoff?: (retryCount: number) => number;
31
- };
32
- declare type Options = {
33
- backend?: string;
34
- };
35
- export declare type HttpClientConfig = {
36
- headers?: Record<string, string>;
37
- baseUrl: string;
38
- options?: Options;
39
- retry?: RetryConfig;
40
- };
41
- export declare class HttpClient implements Requester {
42
- baseUrl: string;
43
- headers: Record<string, string>;
44
- readonly options?: {
45
- backend?: string;
46
- };
47
- readonly retry: {
48
- attempts: number;
49
- backoff: (retryCount: number) => number;
50
- };
51
- constructor(config: HttpClientConfig);
52
- request<TResult>(req: UpstashRequest): Promise<UpstashResponse<TResult>>;
53
- }
54
- export {};
@@ -1,552 +0,0 @@
1
- import { DelCommand, ExistsCommand, FlushAllCommand, MGetCommand, PingCommand, ScoreMember, ScriptExistsCommand, SetCommandOptions, TouchCommand, UnlinkCommand, ZAddCommandOptions, ZAddCommandOptionsWithIncr, ZRangeCommandOptions } from "./commands/mod.js";
2
- import { CommandOptions } from "./commands/command.js";
3
- import { Requester } from "./http.js";
4
- import { CommandArgs } from "./types.js";
5
- /**
6
- * Upstash REST API supports command pipelining to send multiple commands in
7
- * batch, instead of sending each command one by one and waiting for a response.
8
- * When using pipelines, several commands are sent using a single HTTP request,
9
- * and a single JSON array response is returned. Each item in the response array
10
- * corresponds to the command in the same order within the pipeline.
11
- *
12
- * **NOTE:**
13
- *
14
- * Execution of the pipeline is not atomic. Even though each command in
15
- * the pipeline will be executed in order, commands sent by other clients can
16
- * interleave with the pipeline.
17
- *
18
- * **Examples:**
19
- *
20
- * ```ts
21
- * const p = redis.pipeline()
22
- * p.set("key","value")
23
- * p.get("key")
24
- * const res = await p.exec()
25
- * ```
26
- *
27
- * You can also chain commands together
28
- * ```ts
29
- * const p = redis.pipeline()
30
- * const res = await p.set("key","value").get("key").exec()
31
- * ```
32
- *
33
- * It's not possible to infer correct types with a dynamic pipeline, so you can
34
- * override the response type manually:
35
- * ```ts
36
- * redis.pipeline()
37
- * .set("key", { greeting: "hello"})
38
- * .get("key")
39
- * .exec<["OK", { greeting: string } ]>()
40
- *
41
- * ```
42
- */
43
- export declare class Pipeline {
44
- private client;
45
- private commands;
46
- private commandOptions?;
47
- constructor(client: Requester, commandOptions?: CommandOptions<any, any>);
48
- /**
49
- * Send the pipeline request to upstash.
50
- *
51
- * Returns an array with the results of all pipelined commands.
52
- *
53
- * You can define a return type manually to make working in typescript easier
54
- * ```ts
55
- * redis.pipeline().get("key").exec<[{ greeting: string }]>()
56
- * ```
57
- */
58
- exec: <TCommandResults extends unknown[] = unknown[]>() => Promise<TCommandResults>;
59
- /**
60
- * Pushes a command into the pipelien and returns a chainable instance of the
61
- * pipeline
62
- */
63
- private chain;
64
- /**
65
- * @see https://redis.io/commands/append
66
- */
67
- append: (key: string, value: string) => this;
68
- /**
69
- * @see https://redis.io/commands/bitcount
70
- */
71
- bitcount: (key: string, start: number, end: number) => this;
72
- /**
73
- * @see https://redis.io/commands/bitop
74
- */
75
- bitop: {
76
- (op: "and" | "or" | "xor", destinationKey: string, sourceKey: string, ...sourceKeys: string[]): Pipeline;
77
- (op: "not", destinationKey: string, sourceKey: string): Pipeline;
78
- };
79
- /**
80
- * @see https://redis.io/commands/bitpos
81
- */
82
- bitpos: (key: string, bit: 0 | 1, start?: number | undefined, end?: number | undefined) => this;
83
- /**
84
- * @see https://redis.io/commands/dbsize
85
- */
86
- dbsize: () => this;
87
- /**
88
- * @see https://redis.io/commands/decr
89
- */
90
- decr: (key: string) => this;
91
- /**
92
- * @see https://redis.io/commands/decrby
93
- */
94
- decrby: (key: string, decrement: number) => this;
95
- /**
96
- * @see https://redis.io/commands/del
97
- */
98
- del: (...args: CommandArgs<typeof DelCommand>) => this;
99
- /**
100
- * @see https://redis.io/commands/echo
101
- */
102
- echo: (message: string) => this;
103
- /**
104
- * @see https://redis.io/commands/eval
105
- */
106
- eval: <TArgs extends unknown[], TData = unknown>(script: string, keys: string[], args: TArgs) => this;
107
- /**
108
- * @see https://redis.io/commands/evalsha
109
- */
110
- evalsha: <TArgs extends unknown[], TData = unknown>(sha1: string, keys: string[], args: TArgs) => this;
111
- /**
112
- * @see https://redis.io/commands/exists
113
- */
114
- exists: (...args: CommandArgs<typeof ExistsCommand>) => this;
115
- /**
116
- * @see https://redis.io/commands/expire
117
- */
118
- expire: (key: string, seconds: number) => this;
119
- /**
120
- * @see https://redis.io/commands/expireat
121
- */
122
- expireat: (key: string, unix: number) => this;
123
- /**
124
- * @see https://redis.io/commands/flushall
125
- */
126
- flushall: (args?: CommandArgs<typeof FlushAllCommand>) => this;
127
- /**
128
- * @see https://redis.io/commands/flushdb
129
- */
130
- flushdb: (opts?: {
131
- async?: boolean | undefined;
132
- } | undefined) => this;
133
- /**
134
- * @see https://redis.io/commands/get
135
- */
136
- get: <TData>(key: string) => this;
137
- /**
138
- * @see https://redis.io/commands/getbit
139
- */
140
- getbit: (key: string, offset: number) => this;
141
- /**
142
- * @see https://redis.io/commands/getrange
143
- */
144
- getrange: (key: string, start: number, end: number) => this;
145
- /**
146
- * @see https://redis.io/commands/getset
147
- */
148
- getset: <TData>(key: string, value: TData) => this;
149
- /**
150
- * @see https://redis.io/commands/hdel
151
- */
152
- hdel: (key: string, field: string) => this;
153
- /**
154
- * @see https://redis.io/commands/hexists
155
- */
156
- hexists: (key: string, field: string) => this;
157
- /**
158
- * @see https://redis.io/commands/hget
159
- */
160
- hget: <TData>(key: string, field: string) => this;
161
- /**
162
- * @see https://redis.io/commands/hgetall
163
- */
164
- hgetall: <TData extends Record<string, unknown>>(key: string) => this;
165
- /**
166
- * @see https://redis.io/commands/hincrby
167
- */
168
- hincrby: (key: string, field: string, increment: number) => this;
169
- /**
170
- * @see https://redis.io/commands/hincrbyfloat
171
- */
172
- hincrbyfloat: (key: string, field: string, increment: number) => this;
173
- /**
174
- * @see https://redis.io/commands/hkeys
175
- */
176
- hkeys: (key: string) => this;
177
- /**
178
- * @see https://redis.io/commands/hlen
179
- */
180
- hlen: (key: string) => this;
181
- /**
182
- * @see https://redis.io/commands/hmget
183
- */
184
- hmget: <TData extends Record<string, unknown>>(key: string, ...fields: string[]) => this;
185
- /**
186
- * @see https://redis.io/commands/hmset
187
- */
188
- hmset: <TData>(key: string, kv: {
189
- [field: string]: TData;
190
- }) => this;
191
- /**
192
- * @see https://redis.io/commands/hscan
193
- */
194
- hscan: (key: string, cursor: number, cmdOpts?: import("./commands/scan.js").ScanCommandOptions | undefined) => this;
195
- /**
196
- * @see https://redis.io/commands/hset
197
- */
198
- hset: <TData>(key: string, kv: {
199
- [field: string]: TData;
200
- }) => this;
201
- /**
202
- * @see https://redis.io/commands/hsetnx
203
- */
204
- hsetnx: <TData>(key: string, field: string, value: TData) => this;
205
- /**
206
- * @see https://redis.io/commands/hstrlen
207
- */
208
- hstrlen: (key: string, field: string) => this;
209
- /**
210
- * @see https://redis.io/commands/hvals
211
- */
212
- hvals: (key: string) => this;
213
- /**
214
- * @see https://redis.io/commands/incr
215
- */
216
- incr: (key: string) => this;
217
- /**
218
- * @see https://redis.io/commands/incrby
219
- */
220
- incrby: (key: string, value: number) => this;
221
- /**
222
- * @see https://redis.io/commands/incrbyfloat
223
- */
224
- incrbyfloat: (key: string, value: number) => this;
225
- /**
226
- * @see https://redis.io/commands/keys
227
- */
228
- keys: (pattern: string) => this;
229
- /**
230
- * @see https://redis.io/commands/lindex
231
- */
232
- lindex: (key: string, index: number) => this;
233
- /**
234
- * @see https://redis.io/commands/linsert
235
- */
236
- linsert: <TData>(key: string, direction: "before" | "after", pivot: TData, value: TData) => Pipeline;
237
- /**
238
- * @see https://redis.io/commands/llen
239
- */
240
- llen: (key: string) => this;
241
- /**
242
- * @see https://redis.io/commands/lpop
243
- */
244
- lpop: <TData>(key: string, count?: number | undefined) => this;
245
- /**
246
- * @see https://redis.io/commands/lpos
247
- */
248
- lpos: <TData>(key: string, element: unknown, opts?: {
249
- rank?: number | undefined;
250
- count?: number | undefined;
251
- maxLen?: number | undefined;
252
- } | undefined) => this;
253
- /**
254
- * @see https://redis.io/commands/lpush
255
- */
256
- lpush: <TData>(key: string, ...elements: TData[]) => this;
257
- /**
258
- * @see https://redis.io/commands/lpushx
259
- */
260
- lpushx: <TData>(key: string, ...elements: TData[]) => this;
261
- /**
262
- * @see https://redis.io/commands/lrange
263
- */
264
- lrange: <TResult = string>(key: string, start: number, end: number) => this;
265
- /**
266
- * @see https://redis.io/commands/lrem
267
- */
268
- lrem: <TData>(key: string, count: number, value: TData) => this;
269
- /**
270
- * @see https://redis.io/commands/lset
271
- */
272
- lset: <TData>(key: string, index: number, value: TData) => this;
273
- /**
274
- * @see https://redis.io/commands/ltrim
275
- */
276
- ltrim: (key: string, start: number, end: number) => this;
277
- /**
278
- * @see https://redis.io/commands/mget
279
- */
280
- mget: <TData extends unknown[]>(...args: CommandArgs<typeof MGetCommand>) => this;
281
- /**
282
- * @see https://redis.io/commands/mset
283
- */
284
- mset: <TData>(kv: {
285
- [key: string]: TData;
286
- }) => this;
287
- /**
288
- * @see https://redis.io/commands/msetnx
289
- */
290
- msetnx: <TData>(kv: {
291
- [key: string]: TData;
292
- }) => this;
293
- /**
294
- * @see https://redis.io/commands/persist
295
- */
296
- persist: (key: string) => this;
297
- /**
298
- * @see https://redis.io/commands/pexpire
299
- */
300
- pexpire: (key: string, milliseconds: number) => this;
301
- /**
302
- * @see https://redis.io/commands/pexpireat
303
- */
304
- pexpireat: (key: string, unix: number) => this;
305
- /**
306
- * @see https://redis.io/commands/ping
307
- */
308
- ping: (args?: CommandArgs<typeof PingCommand>) => this;
309
- /**
310
- * @see https://redis.io/commands/psetex
311
- */
312
- psetex: <TData>(key: string, ttl: number, value: TData) => this;
313
- /**
314
- * @see https://redis.io/commands/pttl
315
- */
316
- pttl: (key: string) => this;
317
- /**
318
- * @see https://redis.io/commands/publish
319
- */
320
- publish: (channel: string, message: unknown) => this;
321
- /**
322
- * @see https://redis.io/commands/randomkey
323
- */
324
- randomkey: () => this;
325
- /**
326
- * @see https://redis.io/commands/rename
327
- */
328
- rename: (source: string, destination: string) => this;
329
- /**
330
- * @see https://redis.io/commands/renamenx
331
- */
332
- renamenx: (source: string, destination: string) => this;
333
- /**
334
- * @see https://redis.io/commands/rpop
335
- */
336
- rpop: <TData = string>(key: string, count?: number | undefined) => this;
337
- /**
338
- * @see https://redis.io/commands/rpush
339
- */
340
- rpush: <TData>(key: string, ...elements: TData[]) => this;
341
- /**
342
- * @see https://redis.io/commands/rpushx
343
- */
344
- rpushx: <TData>(key: string, ...elements: TData[]) => this;
345
- /**
346
- * @see https://redis.io/commands/sadd
347
- */
348
- sadd: <TData>(key: string, ...members: TData[]) => this;
349
- /**
350
- * @see https://redis.io/commands/scan
351
- */
352
- scan: (cursor: number, opts?: import("./commands/scan.js").ScanCommandOptions | undefined) => this;
353
- /**
354
- * @see https://redis.io/commands/scard
355
- */
356
- scard: (key: string) => this;
357
- /**
358
- * @see https://redis.io/commands/script-exists
359
- */
360
- scriptExists: (...args: CommandArgs<typeof ScriptExistsCommand>) => this;
361
- /**
362
- * @see https://redis.io/commands/script-flush
363
- */
364
- scriptFlush: (opts?: import("./commands/script_flush.js").ScriptFlushCommandOptions | undefined) => this;
365
- /**
366
- * @see https://redis.io/commands/script-load
367
- */
368
- scriptLoad: (script: string) => this;
369
- sdiff: (key: string, ...keys: string[]) => this;
370
- /**
371
- * @see https://redis.io/commands/sdiffstore
372
- */
373
- sdiffstore: (destination: string, ...keys: string[]) => this;
374
- /**
375
- * @see https://redis.io/commands/set
376
- */
377
- set: <TData>(key: string, value: TData, opts?: SetCommandOptions) => this;
378
- /**
379
- * @see https://redis.io/commands/setbit
380
- */
381
- setbit: (key: string, offset: number, value: 0 | 1) => this;
382
- /**
383
- * @see https://redis.io/commands/setex
384
- */
385
- setex: <TData>(key: string, ttl: number, value: TData) => this;
386
- /**
387
- * @see https://redis.io/commands/setnx
388
- */
389
- setnx: <TData>(key: string, value: TData) => this;
390
- /**
391
- * @see https://redis.io/commands/setrange
392
- */
393
- setrange: (key: string, offset: number, value: string) => this;
394
- /**
395
- * @see https://redis.io/commands/sinter
396
- */
397
- sinter: (key: string, ...keys: string[]) => this;
398
- /**
399
- * @see https://redis.io/commands/sinterstore
400
- */
401
- sinterstore: (destination: string, key: string, ...keys: string[]) => this;
402
- /**
403
- * @see https://redis.io/commands/sismember
404
- */
405
- sismember: <TData>(key: string, member: TData) => this;
406
- /**
407
- * @see https://redis.io/commands/smembers
408
- */
409
- smembers: (key: string) => this;
410
- /**
411
- * @see https://redis.io/commands/smove
412
- */
413
- smove: <TData>(source: string, destination: string, member: TData) => this;
414
- /**
415
- * @see https://redis.io/commands/spop
416
- */
417
- spop: <TData>(key: string, count?: number | undefined) => this;
418
- /**
419
- * @see https://redis.io/commands/srandmember
420
- */
421
- srandmember: <TData>(key: string, count?: number | undefined) => this;
422
- /**
423
- * @see https://redis.io/commands/srem
424
- */
425
- srem: <TData>(key: string, ...members: TData[]) => this;
426
- /**
427
- * @see https://redis.io/commands/sscan
428
- */
429
- sscan: (key: string, cursor: number, opts?: import("./commands/scan.js").ScanCommandOptions | undefined) => this;
430
- /**
431
- * @see https://redis.io/commands/strlen
432
- */
433
- strlen: (key: string) => this;
434
- /**
435
- * @see https://redis.io/commands/sunion
436
- */
437
- sunion: (key: string, ...keys: string[]) => this;
438
- /**
439
- * @see https://redis.io/commands/sunionstore
440
- */
441
- sunionstore: (destination: string, key: string, ...keys: string[]) => this;
442
- /**
443
- * @see https://redis.io/commands/time
444
- */
445
- time: () => this;
446
- /**
447
- * @see https://redis.io/commands/touch
448
- */
449
- touch: (...args: CommandArgs<typeof TouchCommand>) => this;
450
- /**
451
- * @see https://redis.io/commands/ttl
452
- */
453
- ttl: (key: string) => this;
454
- /**
455
- * @see https://redis.io/commands/type
456
- */
457
- type: (key: string) => this;
458
- /**
459
- * @see https://redis.io/commands/unlink
460
- */
461
- unlink: (...args: CommandArgs<typeof UnlinkCommand>) => this;
462
- /**
463
- * @see https://redis.io/commands/zadd
464
- */
465
- zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [string, ZAddCommandOptions | ZAddCommandOptionsWithIncr, ScoreMember<TData>, ...ScoreMember<TData>[]]) => this;
466
- /**
467
- * @see https://redis.io/commands/zcard
468
- */
469
- zcard: (key: string) => this;
470
- /**
471
- * @see https://redis.io/commands/zcount
472
- */
473
- zcount: (key: string, min: string | number, max: string | number) => this;
474
- /**
475
- * @see https://redis.io/commands/zincrby
476
- */
477
- zincrby: <TData>(key: string, increment: number, member: TData) => this;
478
- /**
479
- * @see https://redis.io/commands/zinterstore
480
- */
481
- zinterstore: (destination: string, numKeys: number, keys: string[], opts?: import("./commands/zinterstore.js").ZInterStoreCommandOptions | undefined) => this;
482
- /**
483
- * @see https://redis.io/commands/zlexcount
484
- */
485
- zlexcount: (key: string, min: string, max: string) => this;
486
- /**
487
- * @see https://redis.io/commands/zmscore
488
- */
489
- zmscore: (key: string, members: unknown[]) => this;
490
- /**
491
- * @see https://redis.io/commands/zpopmax
492
- */
493
- zpopmax: <TData>(key: string, count?: number | undefined) => this;
494
- /**
495
- * @see https://redis.io/commands/zpopmin
496
- */
497
- zpopmin: <TData>(key: string, count?: number | undefined) => this;
498
- /**
499
- * @see https://redis.io/commands/zrange
500
- */
501
- zrange: <TData extends unknown[]>(...args: [key: string, min: number, max: number, opts?: ZRangeCommandOptions] | [
502
- key: string,
503
- min: `(${string}` | `[${string}` | "-" | "+",
504
- max: `(${string}` | `[${string}` | "-" | "+",
505
- opts: {
506
- byLex: true;
507
- } & ZRangeCommandOptions
508
- ] | [
509
- key: string,
510
- min: number | `(${number}` | "-inf" | "+inf",
511
- max: number | `(${number}` | "-inf" | "+inf",
512
- opts: {
513
- byScore: true;
514
- } & ZRangeCommandOptions
515
- ]) => this;
516
- /**
517
- * @see https://redis.io/commands/zrank
518
- */
519
- zrank: <TData>(key: string, member: TData) => this;
520
- /**
521
- * @see https://redis.io/commands/zrem
522
- */
523
- zrem: <TData>(key: string, ...members: TData[]) => this;
524
- /**
525
- * @see https://redis.io/commands/zremrangebylex
526
- */
527
- zremrangebylex: (key: string, min: string, max: string) => this;
528
- /**
529
- * @see https://redis.io/commands/zremrangebyrank
530
- */
531
- zremrangebyrank: (key: string, start: number, stop: number) => this;
532
- /**
533
- * @see https://redis.io/commands/zremrangebyscore
534
- */
535
- zremrangebyscore: (key: string, min: number, max: number) => this;
536
- /**
537
- * @see https://redis.io/commands/zrevrank
538
- */
539
- zrevrank: <TData>(key: string, member: TData) => this;
540
- /**
541
- * @see https://redis.io/commands/zscan
542
- */
543
- zscan: (key: string, cursor: number, opts?: import("./commands/scan.js").ScanCommandOptions | undefined) => this;
544
- /**
545
- * @see https://redis.io/commands/zscore
546
- */
547
- zscore: <TData>(key: string, member: TData) => this;
548
- /**
549
- * @see https://redis.io/commands/zunionstore
550
- */
551
- zunionstore: (destination: string, numKeys: number, keys: string[], opts?: import("./commands/zunionstore.js").ZUnionStoreCommandOptions | undefined) => this;
552
- }