@upstash/redis 1.3.2-alpha.2 → 1.3.3-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/esm/pkg/commands/append.js +2 -2
- package/esm/pkg/commands/bitcount.js +2 -2
- package/esm/pkg/commands/bitop.js +2 -2
- package/esm/pkg/commands/bitpos.js +2 -2
- package/esm/pkg/commands/command.js +13 -2
- package/esm/pkg/commands/dbsize.js +2 -2
- package/esm/pkg/commands/decr.js +2 -2
- package/esm/pkg/commands/decrby.js +2 -2
- package/esm/pkg/commands/del.js +2 -2
- package/esm/pkg/commands/echo.js +2 -2
- package/esm/pkg/commands/eval.js +2 -2
- package/esm/pkg/commands/evalsha.js +2 -2
- package/esm/pkg/commands/exists.js +2 -2
- package/esm/pkg/commands/expire.js +2 -2
- package/esm/pkg/commands/expireat.js +2 -2
- package/esm/pkg/commands/flushall.js +3 -3
- package/esm/pkg/commands/flushdb.js +2 -2
- package/esm/pkg/commands/get.js +2 -2
- package/esm/pkg/commands/getbit.js +2 -2
- package/esm/pkg/commands/getrange.js +2 -2
- package/esm/pkg/commands/getset.js +2 -2
- package/esm/pkg/commands/hdel.js +2 -2
- package/esm/pkg/commands/hexists.js +2 -2
- package/esm/pkg/commands/hget.js +2 -2
- package/esm/pkg/commands/hgetall.js +5 -2
- package/esm/pkg/commands/hincrby.js +2 -2
- package/esm/pkg/commands/hincrbyfloat.js +2 -2
- package/esm/pkg/commands/hkeys.js +2 -2
- package/esm/pkg/commands/hlen.js +2 -2
- package/esm/pkg/commands/hmget.js +5 -2
- package/esm/pkg/commands/hmset.js +2 -2
- package/esm/pkg/commands/hscan.js +6 -6
- package/esm/pkg/commands/hset.js +2 -2
- package/esm/pkg/commands/hsetnx.js +2 -2
- package/esm/pkg/commands/hstrlen.js +2 -2
- package/esm/pkg/commands/hvals.js +2 -2
- package/esm/pkg/commands/incr.js +2 -2
- package/esm/pkg/commands/incrby.js +2 -2
- package/esm/pkg/commands/incrbyfloat.js +2 -2
- package/esm/pkg/commands/keys.js +2 -2
- package/esm/pkg/commands/lindex.js +2 -2
- package/esm/pkg/commands/linsert.js +2 -2
- package/esm/pkg/commands/llen.js +2 -2
- package/esm/pkg/commands/lpop.js +2 -2
- package/esm/pkg/commands/lpush.js +2 -2
- package/esm/pkg/commands/lpushx.js +2 -2
- package/esm/pkg/commands/lrange.js +2 -2
- package/esm/pkg/commands/lrem.js +2 -2
- package/esm/pkg/commands/lset.js +2 -2
- package/esm/pkg/commands/ltrim.js +2 -2
- package/esm/pkg/commands/mget.js +2 -2
- package/esm/pkg/commands/mset.js +2 -2
- package/esm/pkg/commands/msetnx.js +2 -2
- package/esm/pkg/commands/persist.js +2 -2
- package/esm/pkg/commands/pexpire.js +2 -2
- package/esm/pkg/commands/pexpireat.js +2 -2
- package/esm/pkg/commands/ping.js +4 -4
- package/esm/pkg/commands/psetex.js +2 -2
- package/esm/pkg/commands/pttl.js +2 -2
- package/esm/pkg/commands/publish.js +2 -2
- package/esm/pkg/commands/randomkey.js +2 -2
- package/esm/pkg/commands/rename.js +2 -2
- package/esm/pkg/commands/renamenx.js +2 -2
- package/esm/pkg/commands/rpop.js +2 -2
- package/esm/pkg/commands/rpush.js +2 -2
- package/esm/pkg/commands/rpushx.js +2 -2
- package/esm/pkg/commands/sadd.js +2 -2
- package/esm/pkg/commands/scan.js +2 -2
- package/esm/pkg/commands/scard.js +2 -2
- package/esm/pkg/commands/script_exists.js +3 -2
- package/esm/pkg/commands/script_flush.js +2 -2
- package/esm/pkg/commands/script_load.js +2 -2
- package/esm/pkg/commands/sdiff.js +2 -2
- package/esm/pkg/commands/sdiffstore.js +2 -2
- package/esm/pkg/commands/set.js +6 -6
- package/esm/pkg/commands/setbit.js +2 -2
- package/esm/pkg/commands/setex.js +2 -2
- package/esm/pkg/commands/setnx.js +2 -2
- package/esm/pkg/commands/setrange.js +2 -2
- package/esm/pkg/commands/sinter.js +2 -2
- package/esm/pkg/commands/sinterstore.js +2 -2
- package/esm/pkg/commands/sismember.js +2 -2
- package/esm/pkg/commands/smembers.js +2 -2
- package/esm/pkg/commands/smove.js +2 -2
- package/esm/pkg/commands/spop.js +2 -2
- package/esm/pkg/commands/srandmember.js +2 -2
- package/esm/pkg/commands/srem.js +2 -2
- package/esm/pkg/commands/sscan.js +2 -2
- package/esm/pkg/commands/strlen.js +2 -2
- package/esm/pkg/commands/sunion.js +2 -2
- package/esm/pkg/commands/sunionstore.js +2 -2
- package/esm/pkg/commands/time.js +2 -2
- package/esm/pkg/commands/touch.js +2 -2
- package/esm/pkg/commands/ttl.js +2 -2
- package/esm/pkg/commands/type.js +2 -2
- package/esm/pkg/commands/unlink.js +2 -2
- package/esm/pkg/commands/zadd.js +7 -7
- package/esm/pkg/commands/zcard.js +2 -2
- package/esm/pkg/commands/zcount.js +2 -2
- package/esm/pkg/commands/zincrby.js +3 -3
- package/esm/pkg/commands/zinterstore.js +4 -4
- package/esm/pkg/commands/zlexcount.js +2 -2
- package/esm/pkg/commands/zpopmax.js +2 -2
- package/esm/pkg/commands/zpopmin.js +2 -2
- package/esm/pkg/commands/zrange.js +2 -2
- package/esm/pkg/commands/zrank.js +2 -2
- package/esm/pkg/commands/zrem.js +2 -2
- package/esm/pkg/commands/zremrangebylex.js +2 -2
- package/esm/pkg/commands/zremrangebyrank.js +2 -2
- package/esm/pkg/commands/zremrangebyscore.js +2 -2
- package/esm/pkg/commands/zrevrank.js +2 -2
- package/esm/pkg/commands/zscan.js +2 -2
- package/esm/pkg/commands/zscore.js +2 -2
- package/esm/pkg/commands/zunionstore.js +4 -4
- package/esm/pkg/pipeline.js +124 -117
- package/esm/pkg/redis.js +122 -116
- package/esm/platforms/cloudflare.js +3 -1
- package/esm/platforms/fastly.js +3 -1
- package/esm/platforms/nodejs.js +3 -1
- package/package.json +1 -2
- package/script/pkg/commands/append.js +2 -2
- package/script/pkg/commands/bitcount.js +2 -2
- package/script/pkg/commands/bitop.js +2 -2
- package/script/pkg/commands/bitpos.js +2 -2
- package/script/pkg/commands/command.js +13 -2
- package/script/pkg/commands/dbsize.js +2 -2
- package/script/pkg/commands/decr.js +2 -2
- package/script/pkg/commands/decrby.js +2 -2
- package/script/pkg/commands/del.js +2 -2
- package/script/pkg/commands/echo.js +2 -2
- package/script/pkg/commands/eval.js +2 -2
- package/script/pkg/commands/evalsha.js +2 -2
- package/script/pkg/commands/exists.js +2 -2
- package/script/pkg/commands/expire.js +2 -2
- package/script/pkg/commands/expireat.js +2 -2
- package/script/pkg/commands/flushall.js +3 -3
- package/script/pkg/commands/flushdb.js +2 -2
- package/script/pkg/commands/get.js +2 -2
- package/script/pkg/commands/getbit.js +2 -2
- package/script/pkg/commands/getrange.js +2 -2
- package/script/pkg/commands/getset.js +2 -2
- package/script/pkg/commands/hdel.js +2 -2
- package/script/pkg/commands/hexists.js +2 -2
- package/script/pkg/commands/hget.js +2 -2
- package/script/pkg/commands/hgetall.js +5 -2
- package/script/pkg/commands/hincrby.js +2 -2
- package/script/pkg/commands/hincrbyfloat.js +2 -2
- package/script/pkg/commands/hkeys.js +2 -2
- package/script/pkg/commands/hlen.js +2 -2
- package/script/pkg/commands/hmget.js +5 -2
- package/script/pkg/commands/hmset.js +2 -2
- package/script/pkg/commands/hscan.js +6 -6
- package/script/pkg/commands/hset.js +2 -2
- package/script/pkg/commands/hsetnx.js +2 -2
- package/script/pkg/commands/hstrlen.js +2 -2
- package/script/pkg/commands/hvals.js +2 -2
- package/script/pkg/commands/incr.js +2 -2
- package/script/pkg/commands/incrby.js +2 -2
- package/script/pkg/commands/incrbyfloat.js +2 -2
- package/script/pkg/commands/keys.js +2 -2
- package/script/pkg/commands/lindex.js +2 -2
- package/script/pkg/commands/linsert.js +2 -2
- package/script/pkg/commands/llen.js +2 -2
- package/script/pkg/commands/lpop.js +2 -2
- package/script/pkg/commands/lpush.js +2 -2
- package/script/pkg/commands/lpushx.js +2 -2
- package/script/pkg/commands/lrange.js +2 -2
- package/script/pkg/commands/lrem.js +2 -2
- package/script/pkg/commands/lset.js +2 -2
- package/script/pkg/commands/ltrim.js +2 -2
- package/script/pkg/commands/mget.js +2 -2
- package/script/pkg/commands/mset.js +2 -2
- package/script/pkg/commands/msetnx.js +2 -2
- package/script/pkg/commands/persist.js +2 -2
- package/script/pkg/commands/pexpire.js +2 -2
- package/script/pkg/commands/pexpireat.js +2 -2
- package/script/pkg/commands/ping.js +4 -4
- package/script/pkg/commands/psetex.js +2 -2
- package/script/pkg/commands/pttl.js +2 -2
- package/script/pkg/commands/publish.js +2 -2
- package/script/pkg/commands/randomkey.js +2 -2
- package/script/pkg/commands/rename.js +2 -2
- package/script/pkg/commands/renamenx.js +2 -2
- package/script/pkg/commands/rpop.js +2 -2
- package/script/pkg/commands/rpush.js +2 -2
- package/script/pkg/commands/rpushx.js +2 -2
- package/script/pkg/commands/sadd.js +2 -2
- package/script/pkg/commands/scan.js +2 -2
- package/script/pkg/commands/scard.js +2 -2
- package/script/pkg/commands/script_exists.js +3 -2
- package/script/pkg/commands/script_flush.js +2 -2
- package/script/pkg/commands/script_load.js +2 -2
- package/script/pkg/commands/sdiff.js +2 -2
- package/script/pkg/commands/sdiffstore.js +2 -2
- package/script/pkg/commands/set.js +6 -6
- package/script/pkg/commands/setbit.js +2 -2
- package/script/pkg/commands/setex.js +2 -2
- package/script/pkg/commands/setnx.js +2 -2
- package/script/pkg/commands/setrange.js +2 -2
- package/script/pkg/commands/sinter.js +2 -2
- package/script/pkg/commands/sinterstore.js +2 -2
- package/script/pkg/commands/sismember.js +2 -2
- package/script/pkg/commands/smembers.js +2 -2
- package/script/pkg/commands/smove.js +2 -2
- package/script/pkg/commands/spop.js +2 -2
- package/script/pkg/commands/srandmember.js +2 -2
- package/script/pkg/commands/srem.js +2 -2
- package/script/pkg/commands/sscan.js +2 -2
- package/script/pkg/commands/strlen.js +2 -2
- package/script/pkg/commands/sunion.js +2 -2
- package/script/pkg/commands/sunionstore.js +2 -2
- package/script/pkg/commands/time.js +2 -2
- package/script/pkg/commands/touch.js +2 -2
- package/script/pkg/commands/ttl.js +2 -2
- package/script/pkg/commands/type.js +2 -2
- package/script/pkg/commands/unlink.js +2 -2
- package/script/pkg/commands/zadd.js +7 -7
- package/script/pkg/commands/zcard.js +2 -2
- package/script/pkg/commands/zcount.js +2 -2
- package/script/pkg/commands/zincrby.js +5 -5
- package/script/pkg/commands/zinterstore.js +4 -4
- package/script/pkg/commands/zlexcount.js +2 -2
- package/script/pkg/commands/zpopmax.js +2 -2
- package/script/pkg/commands/zpopmin.js +2 -2
- package/script/pkg/commands/zrange.js +2 -2
- package/script/pkg/commands/zrank.js +2 -2
- package/script/pkg/commands/zrem.js +2 -2
- package/script/pkg/commands/zremrangebylex.js +2 -2
- package/script/pkg/commands/zremrangebyrank.js +2 -2
- package/script/pkg/commands/zremrangebyscore.js +2 -2
- package/script/pkg/commands/zrevrank.js +2 -2
- package/script/pkg/commands/zscan.js +2 -2
- package/script/pkg/commands/zscore.js +2 -2
- package/script/pkg/commands/zunionstore.js +4 -4
- package/script/pkg/pipeline.js +123 -116
- package/script/pkg/redis.js +121 -115
- package/script/platforms/cloudflare.js +3 -1
- package/script/platforms/fastly.js +3 -1
- package/script/platforms/nodejs.js +3 -1
- package/types/pkg/commands/append.d.ts +2 -2
- package/types/pkg/commands/bitcount.d.ts +3 -3
- package/types/pkg/commands/bitop.d.ts +8 -3
- package/types/pkg/commands/bitpos.d.ts +2 -2
- package/types/pkg/commands/command.d.ts +19 -5
- package/types/pkg/commands/dbsize.d.ts +2 -2
- package/types/pkg/commands/decr.d.ts +2 -2
- package/types/pkg/commands/decrby.d.ts +2 -2
- package/types/pkg/commands/del.d.ts +2 -3
- package/types/pkg/commands/echo.d.ts +2 -2
- package/types/pkg/commands/eval.d.ts +2 -2
- package/types/pkg/commands/evalsha.d.ts +2 -2
- package/types/pkg/commands/exists.d.ts +2 -3
- package/types/pkg/commands/expire.d.ts +3 -3
- package/types/pkg/commands/expireat.d.ts +3 -3
- package/types/pkg/commands/flushall.d.ts +3 -3
- package/types/pkg/commands/flushdb.d.ts +3 -3
- package/types/pkg/commands/get.d.ts +3 -3
- package/types/pkg/commands/getbit.d.ts +3 -3
- package/types/pkg/commands/getrange.d.ts +2 -2
- package/types/pkg/commands/getset.d.ts +3 -3
- package/types/pkg/commands/hdel.d.ts +3 -3
- package/types/pkg/commands/hexists.d.ts +2 -2
- package/types/pkg/commands/hget.d.ts +3 -3
- package/types/pkg/commands/hgetall.d.ts +3 -3
- package/types/pkg/commands/hincrby.d.ts +2 -2
- package/types/pkg/commands/hincrbyfloat.d.ts +2 -2
- package/types/pkg/commands/hkeys.d.ts +2 -2
- package/types/pkg/commands/hlen.d.ts +2 -2
- package/types/pkg/commands/hmget.d.ts +3 -3
- package/types/pkg/commands/hmset.d.ts +3 -3
- package/types/pkg/commands/hscan.d.ts +12 -2
- package/types/pkg/commands/hset.d.ts +3 -3
- package/types/pkg/commands/hsetnx.d.ts +3 -3
- package/types/pkg/commands/hstrlen.d.ts +2 -2
- package/types/pkg/commands/hvals.d.ts +3 -3
- package/types/pkg/commands/incr.d.ts +2 -2
- package/types/pkg/commands/incrby.d.ts +2 -2
- package/types/pkg/commands/incrbyfloat.d.ts +2 -2
- package/types/pkg/commands/keys.d.ts +2 -2
- package/types/pkg/commands/lindex.d.ts +3 -3
- package/types/pkg/commands/linsert.d.ts +7 -2
- package/types/pkg/commands/llen.d.ts +2 -2
- package/types/pkg/commands/lpop.d.ts +3 -3
- package/types/pkg/commands/lpush.d.ts +2 -3
- package/types/pkg/commands/lpushx.d.ts +2 -3
- package/types/pkg/commands/lrange.d.ts +3 -3
- package/types/pkg/commands/lrem.d.ts +2 -2
- package/types/pkg/commands/lset.d.ts +2 -2
- package/types/pkg/commands/ltrim.d.ts +2 -2
- package/types/pkg/commands/mget.d.ts +3 -3
- package/types/pkg/commands/mset.d.ts +3 -3
- package/types/pkg/commands/msetnx.d.ts +3 -3
- package/types/pkg/commands/persist.d.ts +3 -3
- package/types/pkg/commands/pexpire.d.ts +3 -3
- package/types/pkg/commands/pexpireat.d.ts +3 -3
- package/types/pkg/commands/ping.d.ts +2 -2
- package/types/pkg/commands/psetex.d.ts +2 -2
- package/types/pkg/commands/pttl.d.ts +2 -2
- package/types/pkg/commands/publish.d.ts +2 -2
- package/types/pkg/commands/randomkey.d.ts +2 -2
- package/types/pkg/commands/rename.d.ts +2 -2
- package/types/pkg/commands/renamenx.d.ts +3 -3
- package/types/pkg/commands/rpop.d.ts +3 -3
- package/types/pkg/commands/rpush.d.ts +2 -3
- package/types/pkg/commands/rpushx.d.ts +2 -3
- package/types/pkg/commands/sadd.d.ts +2 -3
- package/types/pkg/commands/scan.d.ts +9 -3
- package/types/pkg/commands/scard.d.ts +2 -2
- package/types/pkg/commands/script_exists.d.ts +3 -6
- package/types/pkg/commands/script_flush.d.ts +2 -2
- package/types/pkg/commands/script_load.d.ts +2 -2
- package/types/pkg/commands/sdiff.d.ts +3 -3
- package/types/pkg/commands/sdiffstore.d.ts +2 -3
- package/types/pkg/commands/set.d.ts +3 -3
- package/types/pkg/commands/setbit.d.ts +3 -3
- package/types/pkg/commands/setex.d.ts +2 -2
- package/types/pkg/commands/setnx.d.ts +2 -2
- package/types/pkg/commands/setrange.d.ts +2 -2
- package/types/pkg/commands/sinter.d.ts +3 -3
- package/types/pkg/commands/sinterstore.d.ts +3 -3
- package/types/pkg/commands/sismember.d.ts +3 -3
- package/types/pkg/commands/smembers.d.ts +3 -3
- package/types/pkg/commands/smove.d.ts +3 -3
- package/types/pkg/commands/spop.d.ts +3 -3
- package/types/pkg/commands/srandmember.d.ts +3 -3
- package/types/pkg/commands/srem.d.ts +2 -3
- package/types/pkg/commands/sscan.d.ts +12 -2
- package/types/pkg/commands/strlen.d.ts +2 -2
- package/types/pkg/commands/sunion.d.ts +3 -3
- package/types/pkg/commands/sunionstore.d.ts +2 -2
- package/types/pkg/commands/time.d.ts +2 -2
- package/types/pkg/commands/touch.d.ts +2 -3
- package/types/pkg/commands/ttl.d.ts +2 -2
- package/types/pkg/commands/type.d.ts +2 -2
- package/types/pkg/commands/unlink.d.ts +2 -2
- package/types/pkg/commands/zadd.d.ts +11 -3
- package/types/pkg/commands/zcard.d.ts +2 -2
- package/types/pkg/commands/zcount.d.ts +2 -2
- package/types/pkg/commands/zincrby.d.ts +3 -3
- package/types/pkg/commands/zinterstore.d.ts +13 -3
- package/types/pkg/commands/zlexcount.d.ts +2 -2
- package/types/pkg/commands/zpopmax.d.ts +3 -3
- package/types/pkg/commands/zpopmin.d.ts +3 -3
- package/types/pkg/commands/zrange.d.ts +19 -9
- package/types/pkg/commands/zrank.d.ts +2 -2
- package/types/pkg/commands/zrem.d.ts +2 -3
- package/types/pkg/commands/zremrangebylex.d.ts +2 -2
- package/types/pkg/commands/zremrangebyrank.d.ts +2 -2
- package/types/pkg/commands/zremrangebyscore.d.ts +2 -2
- package/types/pkg/commands/zrevrank.d.ts +2 -2
- package/types/pkg/commands/zscan.d.ts +12 -2
- package/types/pkg/commands/zscore.d.ts +3 -3
- package/types/pkg/commands/zunionstore.d.ts +13 -3
- package/types/pkg/pipeline.d.ts +20 -23
- package/types/pkg/redis.d.ts +30 -23
- package/types/pkg/types.d.ts +1 -2
- package/types/platforms/cloudflare.d.ts +1 -1
- package/types/platforms/fastly.d.ts +1 -1
- package/types/platforms/nodejs.d.ts +1 -1
|
@@ -46,7 +46,9 @@ class Redis extends core.Redis {
|
|
|
46
46
|
baseUrl: config.url,
|
|
47
47
|
headers: { authorization: `Bearer ${config.token}` },
|
|
48
48
|
});
|
|
49
|
-
super(client
|
|
49
|
+
super(client, {
|
|
50
|
+
automaticDeserialization: config.automaticDeserialization,
|
|
51
|
+
});
|
|
50
52
|
}
|
|
51
53
|
/*
|
|
52
54
|
* Create a new Upstash Redis instance from environment variables on cloudflare.
|
|
@@ -48,7 +48,9 @@ class Redis extends core.Redis {
|
|
|
48
48
|
headers: { authorization: `Bearer ${config.token}` },
|
|
49
49
|
backend: config.backend,
|
|
50
50
|
});
|
|
51
|
-
super(client
|
|
51
|
+
super(client, {
|
|
52
|
+
automaticDeserialization: config.automaticDeserialization,
|
|
53
|
+
});
|
|
52
54
|
}
|
|
53
55
|
}
|
|
54
56
|
exports.Redis = Redis;
|
|
@@ -42,7 +42,9 @@ class Redis extends core.Redis {
|
|
|
42
42
|
headers: { authorization: `Bearer ${configOrRequester.token}` },
|
|
43
43
|
agent: configOrRequester.agent,
|
|
44
44
|
});
|
|
45
|
-
super(client
|
|
45
|
+
super(client, {
|
|
46
|
+
automaticDeserialization: configOrRequester.automaticDeserialization,
|
|
47
|
+
});
|
|
46
48
|
}
|
|
47
49
|
/**
|
|
48
50
|
* Create a new Upstash Redis instance from environment variables.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/append
|
|
4
4
|
*/
|
|
5
5
|
export declare class AppendCommand extends Command<number, number> {
|
|
6
|
-
constructor(key: string, value: string);
|
|
6
|
+
constructor(cmd: [key: string, value: string], opts?: CommandOptions<number, number>);
|
|
7
7
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/bitcount
|
|
4
4
|
*/
|
|
5
5
|
export declare class BitCountCommand extends Command<number, number> {
|
|
6
|
-
constructor(key: string, start?: never, end?: never);
|
|
7
|
-
constructor(key: string, start: number, end: number);
|
|
6
|
+
constructor(cmd: [key: string, start?: never, end?: never], opts?: CommandOptions<number, number>);
|
|
7
|
+
constructor(cmd: [key: string, start: number, end: number], opts?: CommandOptions<number, number>);
|
|
8
8
|
}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/bitop
|
|
4
4
|
*/
|
|
5
5
|
export declare class BitOpCommand extends Command<number, number> {
|
|
6
|
-
constructor(
|
|
7
|
-
|
|
6
|
+
constructor(cmd: [
|
|
7
|
+
op: "and" | "or" | "xor",
|
|
8
|
+
destinationKey: string,
|
|
9
|
+
sourceKey: string,
|
|
10
|
+
...sourceKeys: string[]
|
|
11
|
+
], opts?: CommandOptions<number, number>);
|
|
12
|
+
constructor(cmd: [op: "not", destinationKey: string, sourceKey: string], opts?: CommandOptions<number, number>);
|
|
8
13
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/bitpos
|
|
4
4
|
*/
|
|
5
5
|
export declare class BitPosCommand extends Command<number, number> {
|
|
6
|
-
constructor(key: string, start: number, end: number);
|
|
6
|
+
constructor(cmd: [key: string, start: number, end: number], opts?: CommandOptions<number, number>);
|
|
7
7
|
}
|
|
@@ -1,23 +1,37 @@
|
|
|
1
1
|
import { Requester } from "../http.js";
|
|
2
|
+
declare type Serialize = (data: unknown) => string;
|
|
3
|
+
declare type Deserialize<TResult, TData> = (result: TResult) => TData;
|
|
4
|
+
export declare type CommandOptions<TResult, TData> = {
|
|
5
|
+
/**
|
|
6
|
+
* Custom deserializer
|
|
7
|
+
*/
|
|
8
|
+
deserialize?: (result: TResult) => TData;
|
|
9
|
+
/**
|
|
10
|
+
* Automatically try to deserialize the returned data from upstash using `JSON.deserialize`
|
|
11
|
+
*
|
|
12
|
+
* @default true
|
|
13
|
+
*/
|
|
14
|
+
automaticDeserialization?: boolean;
|
|
15
|
+
};
|
|
2
16
|
/**
|
|
3
17
|
* Command offers default (de)serialization and the exec method to all commands.
|
|
4
18
|
*
|
|
5
19
|
* TData represents what the user will enter or receive,
|
|
6
20
|
* TResult is the raw data returned from upstash, which may need to be transformed or parsed.
|
|
7
21
|
*/
|
|
8
|
-
export declare class Command<
|
|
22
|
+
export declare class Command<TResult, TData> {
|
|
9
23
|
readonly command: string[];
|
|
10
|
-
|
|
24
|
+
readonly serialize: Serialize;
|
|
25
|
+
readonly deserialize: Deserialize<TResult, TData>;
|
|
11
26
|
/**
|
|
12
27
|
* Create a new command instance.
|
|
13
28
|
*
|
|
14
29
|
* You can define a custom `deserialize` function. By default we try to deserialize as json.
|
|
15
30
|
*/
|
|
16
|
-
constructor(command: (string | unknown)[], opts?:
|
|
17
|
-
deserialize?: (result: TResult) => TData;
|
|
18
|
-
});
|
|
31
|
+
constructor(command: (string | unknown)[], opts?: CommandOptions<TResult, TData>);
|
|
19
32
|
/**
|
|
20
33
|
* Execute the command using a client.
|
|
21
34
|
*/
|
|
22
35
|
exec(client: Requester): Promise<TData>;
|
|
23
36
|
}
|
|
37
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/dbsize
|
|
4
4
|
*/
|
|
5
5
|
export declare class DBSizeCommand extends Command<number, number> {
|
|
6
|
-
constructor();
|
|
6
|
+
constructor(opts?: CommandOptions<number, number>);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/decr
|
|
4
4
|
*/
|
|
5
5
|
export declare class DecrCommand extends Command<number, number> {
|
|
6
|
-
constructor(key: string);
|
|
6
|
+
constructor(cmd: [key: string], opts?: CommandOptions<number, number>);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/decrby
|
|
4
4
|
*/
|
|
5
5
|
export declare class DecrByCommand extends Command<number, number> {
|
|
6
|
-
constructor(key: string, decrement: number);
|
|
6
|
+
constructor(cmd: [key: string, decrement: number], opts?: CommandOptions<number, number>);
|
|
7
7
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
3
2
|
/**
|
|
4
3
|
* @see https://redis.io/commands/del
|
|
5
4
|
*/
|
|
6
5
|
export declare class DelCommand extends Command<number, number> {
|
|
7
|
-
constructor(...keys:
|
|
6
|
+
constructor(cmd: [...keys: string[]], opts?: CommandOptions<number, number>);
|
|
8
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/echo
|
|
4
4
|
*/
|
|
5
5
|
export declare class EchoCommand extends Command<string, string> {
|
|
6
|
-
constructor(message: string);
|
|
6
|
+
constructor(cmd: [message: string], opts?: CommandOptions<string, string>);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/eval
|
|
4
4
|
*/
|
|
5
5
|
export declare class EvalCommand<TArgs extends unknown[], TData> extends Command<unknown, TData> {
|
|
6
|
-
constructor(script: string, keys: string[], args: TArgs);
|
|
6
|
+
constructor([script, keys, args]: [script: string, keys: string[], args: TArgs], opts?: CommandOptions<unknown, TData>);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/evalsha
|
|
4
4
|
*/
|
|
5
5
|
export declare class EvalshaCommand<TArgs extends unknown[], TData> extends Command<unknown, TData> {
|
|
6
|
-
constructor(sha: string, keys: string[], args?: TArgs);
|
|
6
|
+
constructor([sha, keys, args]: [sha: string, keys: string[], args?: TArgs], opts?: CommandOptions<unknown, TData>);
|
|
7
7
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
3
2
|
/**
|
|
4
3
|
* @see https://redis.io/commands/exists
|
|
5
4
|
*/
|
|
6
5
|
export declare class ExistsCommand extends Command<number, number> {
|
|
7
|
-
constructor(...keys:
|
|
6
|
+
constructor(cmd: [...keys: string[]], opts?: CommandOptions<number, number>);
|
|
8
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/expire
|
|
4
4
|
*/
|
|
5
|
-
export declare class ExpireCommand extends Command<0 | 1,
|
|
6
|
-
constructor(key: string, seconds: number);
|
|
5
|
+
export declare class ExpireCommand extends Command<"0" | "1", 0 | 1> {
|
|
6
|
+
constructor(cmd: [key: string, seconds: number], opts?: CommandOptions<"0" | "1", 0 | 1>);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/expireat
|
|
4
4
|
*/
|
|
5
|
-
export declare class ExpireAtCommand extends Command<0 | 1,
|
|
6
|
-
constructor(key: string, unix: number);
|
|
5
|
+
export declare class ExpireAtCommand extends Command<"0" | "1", 0 | 1> {
|
|
6
|
+
constructor(cmd: [key: string, unix: number], opts?: CommandOptions<"0" | "1", 0 | 1>);
|
|
7
7
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/flushall
|
|
4
4
|
*/
|
|
5
5
|
export declare class FlushAllCommand extends Command<"OK", "OK"> {
|
|
6
|
-
constructor(
|
|
6
|
+
constructor(args?: [{
|
|
7
7
|
async?: boolean;
|
|
8
|
-
});
|
|
8
|
+
}], opts?: CommandOptions<"OK", "OK">);
|
|
9
9
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/flushdb
|
|
4
4
|
*/
|
|
5
5
|
export declare class FlushDBCommand extends Command<"OK", "OK"> {
|
|
6
|
-
constructor(opts?: {
|
|
6
|
+
constructor([opts]: [opts?: {
|
|
7
7
|
async?: boolean;
|
|
8
|
-
});
|
|
8
|
+
}], cmdOpts?: CommandOptions<"OK", "OK">);
|
|
9
9
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/get
|
|
4
4
|
*/
|
|
5
|
-
export declare class GetCommand<TData = string> extends Command<
|
|
6
|
-
constructor(key: string);
|
|
5
|
+
export declare class GetCommand<TData = string> extends Command<unknown | null, TData | null> {
|
|
6
|
+
constructor(cmd: [key: string], opts?: CommandOptions<unknown | null, TData | null>);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/getbit
|
|
4
4
|
*/
|
|
5
|
-
export declare class GetBitCommand extends Command<0 | 1,
|
|
6
|
-
constructor(key: string, offset: number);
|
|
5
|
+
export declare class GetBitCommand extends Command<"0" | "1", 0 | 1> {
|
|
6
|
+
constructor(cmd: [key: string, offset: number], opts?: CommandOptions<"0" | "1", 0 | 1>);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/getrange
|
|
4
4
|
*/
|
|
5
5
|
export declare class GetRangeCommand extends Command<string, string> {
|
|
6
|
-
constructor(key: string, start: number, end: number);
|
|
6
|
+
constructor(cmd: [key: string, start: number, end: number], opts?: CommandOptions<string, string>);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/getset
|
|
4
4
|
*/
|
|
5
|
-
export declare class GetSetCommand<TData = string> extends Command<
|
|
6
|
-
constructor(key: string, value: TData);
|
|
5
|
+
export declare class GetSetCommand<TData = string> extends Command<unknown | null, TData | null> {
|
|
6
|
+
constructor(cmd: [key: string, value: TData], opts?: CommandOptions<unknown | null, TData | null>);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/hdel
|
|
4
4
|
*/
|
|
5
|
-
export declare class HDelCommand extends Command<0 | 1,
|
|
6
|
-
constructor(key: string, field: string);
|
|
5
|
+
export declare class HDelCommand extends Command<"0" | "1", 0 | 1> {
|
|
6
|
+
constructor(cmd: [key: string, field: string], opts?: CommandOptions<"0" | "1", 0 | 1>);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/hexists
|
|
4
4
|
*/
|
|
5
5
|
export declare class HExistsCommand extends Command<number, number> {
|
|
6
|
-
constructor(key: string, field: string);
|
|
6
|
+
constructor(cmd: [key: string, field: string], opts?: CommandOptions<number, number>);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/hget
|
|
4
4
|
*/
|
|
5
|
-
export declare class HGetCommand<TData> extends Command<
|
|
6
|
-
constructor(key: string, field: string);
|
|
5
|
+
export declare class HGetCommand<TData> extends Command<unknown | null, TData | null> {
|
|
6
|
+
constructor(cmd: [key: string, field: string], opts?: CommandOptions<unknown | null, TData | null>);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/hgetall
|
|
4
4
|
*/
|
|
5
|
-
export declare class HGetAllCommand<TData extends Record<string, unknown>> extends Command<
|
|
6
|
-
constructor(key: string);
|
|
5
|
+
export declare class HGetAllCommand<TData extends Record<string, unknown>> extends Command<unknown | null, TData | null> {
|
|
6
|
+
constructor(cmd: [key: string], opts?: CommandOptions<unknown | null, TData | null>);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/hincrby
|
|
4
4
|
*/
|
|
5
5
|
export declare class HIncrByCommand extends Command<number, number> {
|
|
6
|
-
constructor(key: string, field: string, increment: number);
|
|
6
|
+
constructor(cmd: [key: string, field: string, increment: number], opts?: CommandOptions<number, number>);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/hincrbyfloat
|
|
4
4
|
*/
|
|
5
5
|
export declare class HIncrByFloatCommand extends Command<number, number> {
|
|
6
|
-
constructor(key: string, field: string, increment: number);
|
|
6
|
+
constructor(cmd: [key: string, field: string, increment: number], opts?: CommandOptions<number, number>);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/hkeys
|
|
4
4
|
*/
|
|
5
5
|
export declare class HKeysCommand extends Command<string[], string[]> {
|
|
6
|
-
constructor(key: string);
|
|
6
|
+
constructor([key]: [key: string], opts?: CommandOptions<string[], string[]>);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/hlen
|
|
4
4
|
*/
|
|
5
5
|
export declare class HLenCommand extends Command<number, number> {
|
|
6
|
-
constructor(key: string);
|
|
6
|
+
constructor(cmd: [key: string], opts?: CommandOptions<number, number>);
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* hmget returns an object of all requested fields from a hash
|
|
4
4
|
* The field values are returned as an object like this:
|
|
@@ -10,6 +10,6 @@ import { Command } from "./command.js";
|
|
|
10
10
|
*
|
|
11
11
|
* @see https://redis.io/commands/hmget
|
|
12
12
|
*/
|
|
13
|
-
export declare class HMGetCommand<TData extends Record<string, unknown>> extends Command<
|
|
14
|
-
constructor(key: string, ...fields: string[]);
|
|
13
|
+
export declare class HMGetCommand<TData extends Record<string, unknown>> extends Command<(string | null)[], TData | null> {
|
|
14
|
+
constructor([key, ...fields]: [key: string, ...fields: string[]], opts?: CommandOptions<(string | null)[], TData | null>);
|
|
15
15
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/hmset
|
|
4
4
|
*/
|
|
5
5
|
export declare class HMSetCommand<TData> extends Command<number, number> {
|
|
6
|
-
constructor(key: string, kv: {
|
|
6
|
+
constructor([key, kv]: [key: string, kv: {
|
|
7
7
|
[field: string]: TData;
|
|
8
|
-
});
|
|
8
|
+
}], opts?: CommandOptions<number, number>);
|
|
9
9
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ScanCommandOptions } from "./scan.js";
|
|
2
|
-
import { Command } from "./command.js";
|
|
2
|
+
import { Command, CommandOptions } from "./command.js";
|
|
3
3
|
/**
|
|
4
4
|
* @see https://redis.io/commands/hscan
|
|
5
5
|
*/
|
|
@@ -10,5 +10,15 @@ export declare class HScanCommand extends Command<[
|
|
|
10
10
|
number,
|
|
11
11
|
(string | number)[]
|
|
12
12
|
]> {
|
|
13
|
-
constructor(key
|
|
13
|
+
constructor([key, cursor, cmdOpts]: [
|
|
14
|
+
key: string,
|
|
15
|
+
cursor: number,
|
|
16
|
+
cmdOpts?: ScanCommandOptions
|
|
17
|
+
], opts?: CommandOptions<[
|
|
18
|
+
number,
|
|
19
|
+
(string | number)[]
|
|
20
|
+
], [
|
|
21
|
+
number,
|
|
22
|
+
(string | number)[]
|
|
23
|
+
]>);
|
|
14
24
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/hset
|
|
4
4
|
*/
|
|
5
5
|
export declare class HSetCommand<TData> extends Command<number, number> {
|
|
6
|
-
constructor(key: string, kv: {
|
|
6
|
+
constructor([key, kv]: [key: string, kv: {
|
|
7
7
|
[field: string]: TData;
|
|
8
|
-
});
|
|
8
|
+
}], opts?: CommandOptions<number, number>);
|
|
9
9
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/hsetnx
|
|
4
4
|
*/
|
|
5
|
-
export declare class HSetNXCommand<TData> extends Command<0 | 1,
|
|
6
|
-
constructor(key: string, field: string, value: TData);
|
|
5
|
+
export declare class HSetNXCommand<TData> extends Command<"0" | "1", 0 | 1> {
|
|
6
|
+
constructor(cmd: [key: string, field: string, value: TData], opts?: CommandOptions<"0" | "1", 0 | 1>);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/hstrlen
|
|
4
4
|
*/
|
|
5
5
|
export declare class HStrLenCommand extends Command<number, number> {
|
|
6
|
-
constructor(key: string, field: string);
|
|
6
|
+
constructor(cmd: [key: string, field: string], opts?: CommandOptions<number, number>);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/hvals
|
|
4
4
|
*/
|
|
5
|
-
export declare class HValsCommand<TData extends unknown[]> extends Command<
|
|
6
|
-
constructor(key: string);
|
|
5
|
+
export declare class HValsCommand<TData extends unknown[]> extends Command<unknown[], TData> {
|
|
6
|
+
constructor(cmd: [key: string], opts?: CommandOptions<unknown[], TData>);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/incr
|
|
4
4
|
*/
|
|
5
5
|
export declare class IncrCommand extends Command<number, number> {
|
|
6
|
-
constructor(key: string);
|
|
6
|
+
constructor(cmd: [key: string], opts?: CommandOptions<number, number>);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/incrby
|
|
4
4
|
*/
|
|
5
5
|
export declare class IncrByCommand extends Command<number, number> {
|
|
6
|
-
constructor(key: string, value: number);
|
|
6
|
+
constructor(cmd: [key: string, value: number], opts?: CommandOptions<number, number>);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/incrbyfloat
|
|
4
4
|
*/
|
|
5
5
|
export declare class IncrByFloatCommand extends Command<number, number> {
|
|
6
|
-
constructor(key: string, value: number);
|
|
6
|
+
constructor(cmd: [key: string, value: number], opts?: CommandOptions<number, number>);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/keys
|
|
4
4
|
*/
|
|
5
5
|
export declare class KeysCommand extends Command<string[], string[]> {
|
|
6
|
-
constructor(pattern: string);
|
|
6
|
+
constructor(cmd: [pattern: string], opts?: CommandOptions<string[], string[]>);
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
2
|
-
export declare class LIndexCommand<TData = string> extends Command<
|
|
3
|
-
constructor(key: string, index: number);
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
export declare class LIndexCommand<TData = string> extends Command<unknown | null, TData | null> {
|
|
3
|
+
constructor(cmd: [key: string, index: number], opts?: CommandOptions<unknown | null, TData | null>);
|
|
4
4
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
export declare class LInsertCommand<TData = string> extends Command<number, number> {
|
|
3
|
-
constructor(
|
|
3
|
+
constructor(cmd: [
|
|
4
|
+
key: string,
|
|
5
|
+
direction: "before" | "after",
|
|
6
|
+
pivot: TData,
|
|
7
|
+
value: TData
|
|
8
|
+
], opts?: CommandOptions<number, number>);
|
|
4
9
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/llen
|
|
4
4
|
*/
|
|
5
5
|
export declare class LLenCommand extends Command<number, number> {
|
|
6
|
-
constructor(key: string);
|
|
6
|
+
constructor(cmd: [key: string], opts?: CommandOptions<number, number>);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/lpop
|
|
4
4
|
*/
|
|
5
|
-
export declare class LPopCommand<TData = string> extends Command<
|
|
6
|
-
constructor(key: string);
|
|
5
|
+
export declare class LPopCommand<TData = string> extends Command<unknown | null, TData | null> {
|
|
6
|
+
constructor(cmd: [key: string], opts?: CommandOptions<unknown | null, TData | null>);
|
|
7
7
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Command } from "./command.js";
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
3
2
|
/**
|
|
4
3
|
* @see https://redis.io/commands/lpush
|
|
5
4
|
*/
|
|
6
5
|
export declare class LPushCommand<TData = string> extends Command<number, number> {
|
|
7
|
-
constructor(key: string, ...elements:
|
|
6
|
+
constructor(cmd: [key: string, ...elements: TData[]], opts?: CommandOptions<number, number>);
|
|
8
7
|
}
|