@upstash/redis 0.0.0-ci.e3757170 → 0.0.0-ci.e5c2b594-20231017
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 +42 -278
- package/esm/deps/deno.land/x/base64@v0.2.1/base.js +100 -0
- package/esm/deps/deno.land/x/base64@v0.2.1/base64url.js +9 -0
- package/esm/deps/deno.land/x/sha1@v1.0.3/deps.js +1 -0
- package/esm/deps/deno.land/x/sha1@v1.0.3/mod.js +191 -0
- package/esm/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.js +50 -0
- package/esm/pkg/commands/command.js +12 -3
- package/esm/pkg/commands/getdel.js +9 -0
- package/esm/pkg/commands/hgetall.js +0 -4
- package/esm/pkg/commands/hrandfield.js +39 -0
- package/esm/pkg/commands/json_arrappend.js +9 -0
- package/esm/pkg/commands/json_arrindex.js +9 -0
- package/esm/pkg/commands/json_arrinsert.js +9 -0
- package/esm/pkg/commands/json_arrlen.js +9 -0
- package/esm/pkg/commands/json_arrpop.js +9 -0
- package/esm/pkg/commands/json_arrtrim.js +12 -0
- package/esm/pkg/commands/json_clear.js +9 -0
- package/esm/pkg/commands/json_del.js +9 -0
- package/esm/pkg/commands/json_forget.js +9 -0
- package/esm/pkg/commands/json_get.js +30 -0
- package/esm/pkg/commands/json_mget.js +9 -0
- package/esm/pkg/commands/json_numincrby.js +9 -0
- package/esm/pkg/commands/json_nummultby.js +9 -0
- package/esm/pkg/commands/json_objkeys.js +9 -0
- package/esm/pkg/commands/json_objlen.js +9 -0
- package/esm/pkg/commands/json_resp.js +9 -0
- package/esm/pkg/commands/json_set.js +18 -0
- package/esm/pkg/commands/json_strappend.js +9 -0
- package/esm/pkg/commands/json_strlen.js +9 -0
- package/esm/pkg/commands/json_toggle.js +9 -0
- package/esm/pkg/commands/json_type.js +9 -0
- package/esm/pkg/commands/lmove.js +9 -0
- package/esm/pkg/commands/lpos.js +19 -0
- package/esm/pkg/commands/mod.js +28 -0
- package/esm/pkg/commands/scan.js +3 -0
- package/esm/pkg/commands/sdiffstore.js +1 -1
- package/esm/pkg/commands/set.js +16 -4
- package/esm/pkg/commands/smismember.js +9 -0
- package/esm/pkg/commands/xadd.js +26 -0
- package/esm/pkg/commands/xrange.js +36 -0
- package/esm/pkg/commands/zdiffstore.js +9 -0
- package/esm/pkg/commands/zmscore.js +10 -0
- package/esm/pkg/commands/zrange.js +6 -0
- package/esm/pkg/http.js +100 -3
- package/esm/pkg/pipeline.js +179 -12
- package/esm/pkg/redis.js +241 -2
- package/esm/pkg/script.js +77 -0
- package/esm/platforms/cloudflare.js +10 -2
- package/esm/platforms/fastly.js +6 -0
- package/esm/platforms/node_with_fetch.js +26 -1
- package/esm/platforms/nodejs.js +24 -1
- package/esm/version.js +1 -0
- package/package.json +53 -58
- package/script/deps/deno.land/x/base64@v0.2.1/base.js +104 -0
- package/script/deps/deno.land/x/base64@v0.2.1/base64url.js +13 -0
- package/script/deps/deno.land/x/sha1@v1.0.3/deps.js +6 -0
- package/script/deps/deno.land/x/sha1@v1.0.3/mod.js +196 -0
- package/script/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.js +55 -0
- package/script/pkg/commands/command.js +12 -3
- package/script/pkg/commands/getdel.js +13 -0
- package/script/pkg/commands/hgetall.js +0 -4
- package/script/pkg/commands/hrandfield.js +43 -0
- package/script/pkg/commands/json_arrappend.js +13 -0
- package/script/pkg/commands/json_arrindex.js +13 -0
- package/script/pkg/commands/json_arrinsert.js +13 -0
- package/script/pkg/commands/json_arrlen.js +13 -0
- package/script/pkg/commands/json_arrpop.js +13 -0
- package/script/pkg/commands/json_arrtrim.js +16 -0
- package/script/pkg/commands/json_clear.js +13 -0
- package/script/pkg/commands/json_del.js +13 -0
- package/script/pkg/commands/json_forget.js +13 -0
- package/script/pkg/commands/json_get.js +34 -0
- package/script/pkg/commands/json_mget.js +13 -0
- package/script/pkg/commands/json_numincrby.js +13 -0
- package/script/pkg/commands/json_nummultby.js +13 -0
- package/script/pkg/commands/json_objkeys.js +13 -0
- package/script/pkg/commands/json_objlen.js +13 -0
- package/script/pkg/commands/json_resp.js +13 -0
- package/script/pkg/commands/json_set.js +22 -0
- package/script/pkg/commands/json_strappend.js +13 -0
- package/script/pkg/commands/json_strlen.js +13 -0
- package/script/pkg/commands/json_toggle.js +13 -0
- package/script/pkg/commands/json_type.js +13 -0
- package/script/pkg/commands/lmove.js +13 -0
- package/script/pkg/commands/lpos.js +23 -0
- package/script/pkg/commands/mod.js +28 -0
- package/script/pkg/commands/scan.js +3 -0
- package/script/pkg/commands/sdiffstore.js +1 -1
- package/script/pkg/commands/set.js +16 -4
- package/script/pkg/commands/smismember.js +13 -0
- package/script/pkg/commands/xadd.js +30 -0
- package/script/pkg/commands/xrange.js +40 -0
- package/script/pkg/commands/zdiffstore.js +13 -0
- package/script/pkg/commands/zmscore.js +14 -0
- package/script/pkg/commands/zrange.js +6 -0
- package/script/pkg/http.js +100 -3
- package/script/pkg/pipeline.js +178 -11
- package/script/pkg/redis.js +240 -1
- package/script/pkg/script.js +81 -0
- package/script/platforms/cloudflare.js +10 -2
- package/script/platforms/fastly.js +6 -0
- package/script/platforms/node_with_fetch.js +26 -1
- package/script/platforms/nodejs.js +24 -1
- package/script/version.js +4 -0
- package/types/deps/deno.land/x/base64@v0.2.1/base.d.ts +5 -0
- package/types/deps/deno.land/x/base64@v0.2.1/base64url.d.ts +1 -0
- package/types/deps/deno.land/x/sha1@v1.0.3/deps.d.ts +1 -0
- package/types/deps/deno.land/x/sha1@v1.0.3/mod.d.ts +26 -0
- package/types/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.d.ts +3 -0
- package/types/pkg/commands/bitop.d.ts +0 -1
- package/types/pkg/commands/bitpos.d.ts +1 -1
- package/types/pkg/commands/command.d.ts +5 -5
- package/types/pkg/commands/getdel.d.ts +7 -0
- package/types/pkg/commands/hdel.d.ts +1 -1
- package/types/pkg/commands/hrandfield.d.ts +9 -0
- package/types/pkg/commands/json_arrappend.d.ts +7 -0
- package/types/pkg/commands/json_arrindex.d.ts +13 -0
- package/types/pkg/commands/json_arrinsert.d.ts +7 -0
- package/types/pkg/commands/json_arrlen.d.ts +7 -0
- package/types/pkg/commands/json_arrpop.d.ts +7 -0
- package/types/pkg/commands/json_arrtrim.d.ts +7 -0
- package/types/pkg/commands/json_clear.d.ts +7 -0
- package/types/pkg/commands/json_del.d.ts +7 -0
- package/types/pkg/commands/json_forget.d.ts +7 -0
- package/types/pkg/commands/json_get.d.ts +15 -0
- package/types/pkg/commands/json_mget.d.ts +7 -0
- package/types/pkg/commands/json_numincrby.d.ts +7 -0
- package/types/pkg/commands/json_nummultby.d.ts +7 -0
- package/types/pkg/commands/json_objkeys.d.ts +7 -0
- package/types/pkg/commands/json_objlen.d.ts +7 -0
- package/types/pkg/commands/json_resp.d.ts +7 -0
- package/types/pkg/commands/json_set.d.ts +18 -0
- package/types/pkg/commands/json_strappend.d.ts +7 -0
- package/types/pkg/commands/json_strlen.d.ts +7 -0
- package/types/pkg/commands/json_toggle.d.ts +7 -0
- package/types/pkg/commands/json_type.d.ts +7 -0
- package/types/pkg/commands/lmove.d.ts +12 -0
- package/types/pkg/commands/lpop.d.ts +1 -1
- package/types/pkg/commands/lpos.d.ts +15 -0
- package/types/pkg/commands/mget.d.ts +1 -1
- package/types/pkg/commands/mod.d.ts +28 -0
- package/types/pkg/commands/rpop.d.ts +2 -2
- package/types/pkg/commands/scan.d.ts +2 -1
- package/types/pkg/commands/script_flush.d.ts +1 -1
- package/types/pkg/commands/sdiffstore.d.ts +1 -1
- package/types/pkg/commands/set.d.ts +31 -2
- package/types/pkg/commands/smembers.d.ts +2 -2
- package/types/pkg/commands/smismember.d.ts +7 -0
- package/types/pkg/commands/spop.d.ts +2 -2
- package/types/pkg/commands/type.d.ts +1 -1
- package/types/pkg/commands/xadd.d.ts +31 -0
- package/types/pkg/commands/xrange.d.ts +9 -0
- package/types/pkg/commands/zadd.d.ts +4 -4
- package/types/pkg/commands/zdiffstore.d.ts +7 -0
- package/types/pkg/commands/zinterstore.d.ts +1 -1
- package/types/pkg/commands/zmscore.d.ts +7 -0
- package/types/pkg/commands/zrange.d.ts +8 -1
- package/types/pkg/commands/zunionstore.d.ts +1 -1
- package/types/pkg/http.d.ts +48 -7
- package/types/pkg/pipeline.d.ts +262 -124
- package/types/pkg/redis.d.ts +187 -19
- package/types/pkg/script.d.ts +42 -0
- package/types/pkg/types.d.ts +27 -1
- package/types/platforms/cloudflare.d.ts +9 -8
- package/types/platforms/fastly.d.ts +3 -7
- package/types/platforms/node_with_fetch.d.ts +3 -22
- package/types/platforms/nodejs.d.ts +4 -7
- package/types/version.d.ts +1 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/hrandfield
|
|
4
|
+
*/
|
|
5
|
+
export declare class HRandFieldCommand<TData extends string | string[] | Record<string, unknown>> extends Command<string | string[], TData> {
|
|
6
|
+
constructor(cmd: [key: string], opts?: CommandOptions<string, string>);
|
|
7
|
+
constructor(cmd: [key: string, count: number], opts?: CommandOptions<string[], string[]>);
|
|
8
|
+
constructor(cmd: [key: string, count: number, withValues: boolean], opts?: CommandOptions<string[], Partial<TData>>);
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/json.arrappend
|
|
4
|
+
*/
|
|
5
|
+
export declare class JsonArrAppendCommand<TData extends unknown[]> extends Command<(null | string)[], (null | number)[]> {
|
|
6
|
+
constructor(cmd: [key: string, path: string, ...values: TData], opts?: CommandOptions<(null | string)[], (null | number)[]>);
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/json.arrindex
|
|
4
|
+
*/
|
|
5
|
+
export declare class JsonArrIndexCommand<TValue extends unknown> extends Command<(null | string)[], (null | number)[]> {
|
|
6
|
+
constructor(cmd: [
|
|
7
|
+
key: string,
|
|
8
|
+
path: string,
|
|
9
|
+
value: TValue,
|
|
10
|
+
start?: number,
|
|
11
|
+
stop?: number
|
|
12
|
+
], opts?: CommandOptions<(null | string)[], (null | number)[]>);
|
|
13
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/json.arrinsert
|
|
4
|
+
*/
|
|
5
|
+
export declare class JsonArrInsertCommand<TData extends unknown[]> extends Command<(null | string)[], (null | number)[]> {
|
|
6
|
+
constructor(cmd: [key: string, path: string, index: number, ...values: TData], opts?: CommandOptions<(null | string)[], (null | number)[]>);
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/json.arrlen
|
|
4
|
+
*/
|
|
5
|
+
export declare class JsonArrLenCommand<TValue extends unknown> extends Command<(null | string)[], (null | number)[]> {
|
|
6
|
+
constructor(cmd: [key: string, path?: string], opts?: CommandOptions<(null | string)[], (null | number)[]>);
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/json.arrpop
|
|
4
|
+
*/
|
|
5
|
+
export declare class JsonArrPopCommand<TData extends unknown> extends Command<(null | string)[], (TData | null)[]> {
|
|
6
|
+
constructor(cmd: [key: string, path?: string, index?: number], opts?: CommandOptions<(null | string)[], (TData | null)[]>);
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/json.arrtrim
|
|
4
|
+
*/
|
|
5
|
+
export declare class JsonArrTrimCommand extends Command<(null | string)[], (null | number)[]> {
|
|
6
|
+
constructor(cmd: [key: string, path?: string, start?: number, stop?: number], opts?: CommandOptions<(null | string)[], (null | number)[]>);
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/json.clear
|
|
4
|
+
*/
|
|
5
|
+
export declare class JsonClearCommand extends Command<number, number> {
|
|
6
|
+
constructor(cmd: [key: string, path?: string], opts?: CommandOptions<number, number>);
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/json.del
|
|
4
|
+
*/
|
|
5
|
+
export declare class JsonDelCommand extends Command<number, number> {
|
|
6
|
+
constructor(cmd: [key: string, path?: string], opts?: CommandOptions<number, number>);
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/json.forget
|
|
4
|
+
*/
|
|
5
|
+
export declare class JsonForgetCommand extends Command<number, number> {
|
|
6
|
+
constructor(cmd: [key: string, path?: string], opts?: CommandOptions<number, number>);
|
|
7
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/json.get
|
|
4
|
+
*/
|
|
5
|
+
export declare class JsonGetCommand<TData extends (unknown | Record<string, unknown>) | (unknown | Record<string, unknown>)[]> extends Command<TData | null, TData | null> {
|
|
6
|
+
constructor(cmd: [
|
|
7
|
+
key: string,
|
|
8
|
+
opts?: {
|
|
9
|
+
indent?: string;
|
|
10
|
+
newline?: string;
|
|
11
|
+
space?: string;
|
|
12
|
+
},
|
|
13
|
+
...path: string[]
|
|
14
|
+
] | [key: string, ...path: string[]], opts?: CommandOptions<TData | null, TData | null>);
|
|
15
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/json.mget
|
|
4
|
+
*/
|
|
5
|
+
export declare class JsonMGetCommand<TData extends (unknown | Record<string, unknown>)[]> extends Command<TData, TData> {
|
|
6
|
+
constructor(cmd: [keys: string[], path: string], opts?: CommandOptions<TData, TData>);
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/json.numincrby
|
|
4
|
+
*/
|
|
5
|
+
export declare class JsonNumIncrByCommand extends Command<(null | string)[], (null | number)[]> {
|
|
6
|
+
constructor(cmd: [key: string, path: string, value: number], opts?: CommandOptions<(null | string)[], (null | number)[]>);
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/json.nummultby
|
|
4
|
+
*/
|
|
5
|
+
export declare class JsonNumMultByCommand extends Command<(null | string)[], (null | number)[]> {
|
|
6
|
+
constructor(cmd: [key: string, path: string, value: number], opts?: CommandOptions<(null | string)[], (null | number)[]>);
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/json.objkeys
|
|
4
|
+
*/
|
|
5
|
+
export declare class JsonObjKeysCommand extends Command<(string[] | null)[], (string[] | null)[]> {
|
|
6
|
+
constructor(cmd: [key: string, path?: string], opts?: CommandOptions<(string[] | null)[], (string[] | null)[]>);
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/json.objlen
|
|
4
|
+
*/
|
|
5
|
+
export declare class JsonObjLenCommand extends Command<(number | null)[], (number | null)[]> {
|
|
6
|
+
constructor(cmd: [key: string, path?: string], opts?: CommandOptions<(number | null)[], (number | null)[]>);
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/json.resp
|
|
4
|
+
*/
|
|
5
|
+
export declare class JsonRespCommand<TData extends unknown[]> extends Command<TData, TData> {
|
|
6
|
+
constructor(cmd: [key: string, path?: string], opts?: CommandOptions<TData, TData>);
|
|
7
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/json.set
|
|
4
|
+
*/
|
|
5
|
+
export declare class JsonSetCommand<TData extends number | string | boolean | Record<string, unknown> | (number | string | boolean | Record<string, unknown>)[]> extends Command<"OK" | null, "OK" | null> {
|
|
6
|
+
constructor(cmd: [
|
|
7
|
+
key: string,
|
|
8
|
+
path: string,
|
|
9
|
+
value: TData,
|
|
10
|
+
opts?: {
|
|
11
|
+
nx: true;
|
|
12
|
+
xx?: never;
|
|
13
|
+
} | {
|
|
14
|
+
nx?: never;
|
|
15
|
+
xx: true;
|
|
16
|
+
}
|
|
17
|
+
], opts?: CommandOptions<"OK" | null, "OK" | null>);
|
|
18
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/json.strappend
|
|
4
|
+
*/
|
|
5
|
+
export declare class JsonStrAppendCommand<TData extends unknown[]> extends Command<(null | string)[], (null | number)[]> {
|
|
6
|
+
constructor(cmd: [key: string, path: string, value: string], opts?: CommandOptions<(null | string)[], (null | number)[]>);
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/json.strlen
|
|
4
|
+
*/
|
|
5
|
+
export declare class JsonStrLenCommand extends Command<(number | null)[], (number | null)[]> {
|
|
6
|
+
constructor(cmd: [key: string, path?: string], opts?: CommandOptions<(number | null)[], (number | null)[]>);
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/json.toggle
|
|
4
|
+
*/
|
|
5
|
+
export declare class JsonToggleCommand extends Command<number[], number[]> {
|
|
6
|
+
constructor(cmd: [key: string, path: string], opts?: CommandOptions<number[], number[]>);
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/json.type
|
|
4
|
+
*/
|
|
5
|
+
export declare class JsonTypeCommand extends Command<string[], string[]> {
|
|
6
|
+
constructor(cmd: [key: string, path?: string], opts?: CommandOptions<string[], string[]>);
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/lmove
|
|
4
|
+
*/
|
|
5
|
+
export declare class LMoveCommand<TData = string> extends Command<TData, TData> {
|
|
6
|
+
constructor(cmd: [
|
|
7
|
+
source: string,
|
|
8
|
+
destination: string,
|
|
9
|
+
whereFrom: "left" | "right",
|
|
10
|
+
whereTo: "left" | "right"
|
|
11
|
+
], opts?: CommandOptions<TData, TData>);
|
|
12
|
+
}
|
|
@@ -3,5 +3,5 @@ import { Command, CommandOptions } from "./command.js";
|
|
|
3
3
|
* @see https://redis.io/commands/lpop
|
|
4
4
|
*/
|
|
5
5
|
export declare class LPopCommand<TData = string> extends Command<unknown | null, TData | null> {
|
|
6
|
-
constructor(cmd: [key: string], opts?: CommandOptions<unknown | null, TData | null>);
|
|
6
|
+
constructor(cmd: [key: string, count?: number], opts?: CommandOptions<unknown | null, TData | null>);
|
|
7
7
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/lpos
|
|
4
|
+
*/
|
|
5
|
+
export declare class LPosCommand<TData = number> extends Command<TData, TData> {
|
|
6
|
+
constructor(cmd: [
|
|
7
|
+
key: string,
|
|
8
|
+
element: unknown,
|
|
9
|
+
opts?: {
|
|
10
|
+
rank?: number;
|
|
11
|
+
count?: number;
|
|
12
|
+
maxLen?: number;
|
|
13
|
+
}
|
|
14
|
+
], opts?: CommandOptions<TData, TData>);
|
|
15
|
+
}
|
|
@@ -3,5 +3,5 @@ import { Command, CommandOptions } from "./command.js";
|
|
|
3
3
|
* @see https://redis.io/commands/mget
|
|
4
4
|
*/
|
|
5
5
|
export declare class MGetCommand<TData extends unknown[]> extends Command<(string | null)[], TData> {
|
|
6
|
-
constructor(cmd: [...keys:
|
|
6
|
+
constructor(cmd: [...keys: string[]], opts?: CommandOptions<(string | null)[], TData>);
|
|
7
7
|
}
|
|
@@ -17,6 +17,7 @@ export * from "./flushall.js";
|
|
|
17
17
|
export * from "./flushdb.js";
|
|
18
18
|
export * from "./get.js";
|
|
19
19
|
export * from "./getbit.js";
|
|
20
|
+
export * from "./getdel.js";
|
|
20
21
|
export * from "./getrange.js";
|
|
21
22
|
export * from "./getset.js";
|
|
22
23
|
export * from "./hdel.js";
|
|
@@ -29,6 +30,7 @@ export * from "./hkeys.js";
|
|
|
29
30
|
export * from "./hlen.js";
|
|
30
31
|
export * from "./hmget.js";
|
|
31
32
|
export * from "./hmset.js";
|
|
33
|
+
export * from "./hrandfield.js";
|
|
32
34
|
export * from "./hscan.js";
|
|
33
35
|
export * from "./hset.js";
|
|
34
36
|
export * from "./hsetnx.js";
|
|
@@ -37,11 +39,34 @@ export * from "./hvals.js";
|
|
|
37
39
|
export * from "./incr.js";
|
|
38
40
|
export * from "./incrby.js";
|
|
39
41
|
export * from "./incrbyfloat.js";
|
|
42
|
+
export * from "./json_arrappend.js";
|
|
43
|
+
export * from "./json_arrindex.js";
|
|
44
|
+
export * from "./json_arrinsert.js";
|
|
45
|
+
export * from "./json_arrlen.js";
|
|
46
|
+
export * from "./json_arrpop.js";
|
|
47
|
+
export * from "./json_arrtrim.js";
|
|
48
|
+
export * from "./json_clear.js";
|
|
49
|
+
export * from "./json_del.js";
|
|
50
|
+
export * from "./json_forget.js";
|
|
51
|
+
export * from "./json_get.js";
|
|
52
|
+
export * from "./json_mget.js";
|
|
53
|
+
export * from "./json_numincrby.js";
|
|
54
|
+
export * from "./json_nummultby.js";
|
|
55
|
+
export * from "./json_objkeys.js";
|
|
56
|
+
export * from "./json_objlen.js";
|
|
57
|
+
export * from "./json_resp.js";
|
|
58
|
+
export * from "./json_set.js";
|
|
59
|
+
export * from "./json_strappend.js";
|
|
60
|
+
export * from "./json_strlen.js";
|
|
61
|
+
export * from "./json_toggle.js";
|
|
62
|
+
export * from "./json_type.js";
|
|
40
63
|
export * from "./keys.js";
|
|
41
64
|
export * from "./lindex.js";
|
|
42
65
|
export * from "./linsert.js";
|
|
43
66
|
export * from "./llen.js";
|
|
67
|
+
export * from "./lmove.js";
|
|
44
68
|
export * from "./lpop.js";
|
|
69
|
+
export * from "./lpos.js";
|
|
45
70
|
export * from "./lpush.js";
|
|
46
71
|
export * from "./lpushx.js";
|
|
47
72
|
export * from "./lrange.js";
|
|
@@ -81,6 +106,7 @@ export * from "./sinter.js";
|
|
|
81
106
|
export * from "./sinterstore.js";
|
|
82
107
|
export * from "./sismember.js";
|
|
83
108
|
export * from "./smembers.js";
|
|
109
|
+
export * from "./smismember.js";
|
|
84
110
|
export * from "./smove.js";
|
|
85
111
|
export * from "./spop.js";
|
|
86
112
|
export * from "./srandmember.js";
|
|
@@ -112,3 +138,5 @@ export * from "./zrevrank.js";
|
|
|
112
138
|
export * from "./zscan.js";
|
|
113
139
|
export * from "./zscore.js";
|
|
114
140
|
export * from "./zunionstore.js";
|
|
141
|
+
export * from "./xadd.js";
|
|
142
|
+
export * from "./xrange.js";
|
|
@@ -2,6 +2,6 @@ import { Command, CommandOptions } from "./command.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/rpop
|
|
4
4
|
*/
|
|
5
|
-
export declare class RPopCommand<TData = string> extends Command<unknown | null, TData | null> {
|
|
6
|
-
constructor(cmd: [key: string], opts?: CommandOptions<unknown | null, TData | null>);
|
|
5
|
+
export declare class RPopCommand<TData extends unknown | unknown[] = string> extends Command<unknown | null, TData | null> {
|
|
6
|
+
constructor(cmd: [key: string, count?: number], opts?: CommandOptions<unknown | null, TData | null>);
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Command, CommandOptions } from "./command.js";
|
|
2
2
|
/**
|
|
3
|
-
* @see https://redis.io/commands/
|
|
3
|
+
* @see https://redis.io/commands/sdiffstore
|
|
4
4
|
*/
|
|
5
5
|
export declare class SDiffStoreCommand extends Command<number, number> {
|
|
6
6
|
constructor(cmd: [destination: string, ...keys: string[]], opts?: CommandOptions<number, number>);
|
|
@@ -1,13 +1,42 @@
|
|
|
1
1
|
import { Command, CommandOptions } from "./command.js";
|
|
2
|
-
export
|
|
2
|
+
export type SetCommandOptions = {
|
|
3
|
+
get?: boolean;
|
|
4
|
+
} & ({
|
|
3
5
|
ex: number;
|
|
4
6
|
px?: never;
|
|
7
|
+
exat?: never;
|
|
8
|
+
pxat?: never;
|
|
9
|
+
keepTtl?: never;
|
|
5
10
|
} | {
|
|
6
11
|
ex?: never;
|
|
7
12
|
px: number;
|
|
13
|
+
exat?: never;
|
|
14
|
+
pxat?: never;
|
|
15
|
+
keepTtl?: never;
|
|
8
16
|
} | {
|
|
9
17
|
ex?: never;
|
|
10
18
|
px?: never;
|
|
19
|
+
exat: number;
|
|
20
|
+
pxat?: never;
|
|
21
|
+
keepTtl?: never;
|
|
22
|
+
} | {
|
|
23
|
+
ex?: never;
|
|
24
|
+
px?: never;
|
|
25
|
+
exat?: never;
|
|
26
|
+
pxat: number;
|
|
27
|
+
keepTtl?: never;
|
|
28
|
+
} | {
|
|
29
|
+
ex?: never;
|
|
30
|
+
px?: never;
|
|
31
|
+
exat?: never;
|
|
32
|
+
pxat?: never;
|
|
33
|
+
keepTtl: true;
|
|
34
|
+
} | {
|
|
35
|
+
ex?: never;
|
|
36
|
+
px?: never;
|
|
37
|
+
exat?: never;
|
|
38
|
+
pxat?: never;
|
|
39
|
+
keepTtl?: never;
|
|
11
40
|
}) & ({
|
|
12
41
|
nx: true;
|
|
13
42
|
xx?: never;
|
|
@@ -21,6 +50,6 @@ export declare type SetCommandOptions = ({
|
|
|
21
50
|
/**
|
|
22
51
|
* @see https://redis.io/commands/set
|
|
23
52
|
*/
|
|
24
|
-
export declare class SetCommand<TData, TResult = "OK"> extends Command<TResult, TData> {
|
|
53
|
+
export declare class SetCommand<TData, TResult = TData | "OK" | null> extends Command<TResult, TData | "OK" | null> {
|
|
25
54
|
constructor([key, value, opts]: [key: string, value: TData, opts?: SetCommandOptions], cmdOpts?: CommandOptions<TResult, TData>);
|
|
26
55
|
}
|
|
@@ -2,6 +2,6 @@ import { Command, CommandOptions } from "./command.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/smembers
|
|
4
4
|
*/
|
|
5
|
-
export declare class SMembersCommand<TData = string> extends Command<unknown[], TData
|
|
6
|
-
constructor(cmd: [key: string], opts?: CommandOptions<unknown[], TData
|
|
5
|
+
export declare class SMembersCommand<TData extends unknown[] = string[]> extends Command<unknown[], TData> {
|
|
6
|
+
constructor(cmd: [key: string], opts?: CommandOptions<unknown[], TData>);
|
|
7
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/smismember
|
|
4
|
+
*/
|
|
5
|
+
export declare class SMIsMemberCommand<TMembers extends unknown[]> extends Command<("0" | "1")[], (0 | 1)[]> {
|
|
6
|
+
constructor(cmd: [key: string, members: TMembers], opts?: CommandOptions<("0" | "1")[], (0 | 1)[]>);
|
|
7
|
+
}
|
|
@@ -2,6 +2,6 @@ import { Command, CommandOptions } from "./command.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/spop
|
|
4
4
|
*/
|
|
5
|
-
export declare class SPopCommand<TData> extends Command<string | null, TData | null> {
|
|
6
|
-
constructor([key, count]: [key: string, count?: number], opts?: CommandOptions<string | null, TData | null>);
|
|
5
|
+
export declare class SPopCommand<TData> extends Command<string | string[] | null, TData | null> {
|
|
6
|
+
constructor([key, count]: [key: string, count?: number], opts?: CommandOptions<string | string[] | null, TData | null>);
|
|
7
7
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
type XAddCommandOptions = {
|
|
3
|
+
nomkStream?: boolean;
|
|
4
|
+
trim?: ({
|
|
5
|
+
type: "MAXLEN" | "maxlen";
|
|
6
|
+
threshold: number;
|
|
7
|
+
} | {
|
|
8
|
+
type: "MINID" | "minid";
|
|
9
|
+
threshold: string;
|
|
10
|
+
}) & ({
|
|
11
|
+
comparison: "~";
|
|
12
|
+
limit?: number;
|
|
13
|
+
} | {
|
|
14
|
+
comparison: "=";
|
|
15
|
+
limit?: never;
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* @see https://redis.io/commands/xadd
|
|
20
|
+
*/
|
|
21
|
+
export declare class XAddCommand extends Command<string, string> {
|
|
22
|
+
constructor([key, id, entries, opts]: [
|
|
23
|
+
key: string,
|
|
24
|
+
id: "*" | string,
|
|
25
|
+
entries: {
|
|
26
|
+
[field: string]: unknown;
|
|
27
|
+
},
|
|
28
|
+
opts?: XAddCommandOptions
|
|
29
|
+
], commandOptions?: CommandOptions<string, string>);
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
export declare class XRangeCommand<TData extends Record<string, Record<string, unknown>>> extends Command<string[][], TData> {
|
|
3
|
+
constructor([key, start, end, count]: [
|
|
4
|
+
key: string,
|
|
5
|
+
start: string,
|
|
6
|
+
end: string,
|
|
7
|
+
count?: number
|
|
8
|
+
], opts?: CommandOptions<unknown[], TData[]>);
|
|
9
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command, CommandOptions } from "./command.js";
|
|
2
|
-
export
|
|
2
|
+
export type ZAddCommandOptions = ({
|
|
3
3
|
nx: true;
|
|
4
4
|
xx?: never;
|
|
5
5
|
} | {
|
|
@@ -11,10 +11,10 @@ export declare type ZAddCommandOptions = ({
|
|
|
11
11
|
}) & {
|
|
12
12
|
ch?: true;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type ZAddCommandOptionsWithIncr = ZAddCommandOptions & {
|
|
15
15
|
incr: true;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type ScoreMember<TData> = {
|
|
18
18
|
score: number;
|
|
19
19
|
member: TData;
|
|
20
20
|
};
|
|
@@ -30,6 +30,6 @@ export declare class ZAddCommand<TData = string> extends Command<number | null,
|
|
|
30
30
|
constructor(cmd: [
|
|
31
31
|
key: string,
|
|
32
32
|
opts: ZAddCommandOptions | ZAddCommandOptionsWithIncr,
|
|
33
|
-
...scoreMemberPairs:
|
|
33
|
+
...scoreMemberPairs: ScoreMember<TData>[]
|
|
34
34
|
], opts?: CommandOptions<number | null, number | null>);
|
|
35
35
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/zdiffstore
|
|
4
|
+
*/
|
|
5
|
+
export declare class ZDiffStoreCommand extends Command<number, number> {
|
|
6
|
+
constructor(cmd: [destination: string, numkeys: number, ...keys: string[]], opts?: CommandOptions<number, number>);
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Command, CommandOptions } from "./command.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://redis.io/commands/zmscore
|
|
4
|
+
*/
|
|
5
|
+
export declare class ZMScoreCommand<TData> extends Command<string[] | null, number[] | null> {
|
|
6
|
+
constructor(cmd: [key: string, members: TData[]], opts?: CommandOptions<string[] | null, number[] | null>);
|
|
7
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Command, CommandOptions } from "./command.js";
|
|
2
|
-
export
|
|
2
|
+
export type ZRangeCommandOptions = {
|
|
3
3
|
withScores?: boolean;
|
|
4
|
+
rev?: boolean;
|
|
4
5
|
} & ({
|
|
5
6
|
byScore: true;
|
|
6
7
|
byLex?: never;
|
|
@@ -10,6 +11,12 @@ export declare type ZRangeCommandOptions = {
|
|
|
10
11
|
} | {
|
|
11
12
|
byScore?: never;
|
|
12
13
|
byLex?: never;
|
|
14
|
+
}) & ({
|
|
15
|
+
offset: number;
|
|
16
|
+
count: number;
|
|
17
|
+
} | {
|
|
18
|
+
offset?: never;
|
|
19
|
+
count?: never;
|
|
13
20
|
});
|
|
14
21
|
/**
|
|
15
22
|
* @see https://redis.io/commands/zrange
|