@upstash/redis 1.20.5 → 1.20.7-next.1

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.
@@ -31,7 +31,7 @@ import { ZDiffStoreCommand } from "./commands/zdiffstore.js";
31
31
  * const res = await p.set("key","value").get("key").exec()
32
32
  * ```
33
33
  *
34
- * It's not possible to infer correct types with a dynamic pipeline, so you can
34
+ * Return types are inferred if all commands are chained, but you can still
35
35
  * override the response type manually:
36
36
  * ```ts
37
37
  * redis.pipeline()
@@ -72,9 +72,11 @@ export class Pipeline {
72
72
  *
73
73
  * Returns an array with the results of all pipelined commands.
74
74
  *
75
- * You can define a return type manually to make working in typescript easier
75
+ * If all commands are statically chained from start to finish, types are inferred. You can still define a return type manually if necessary though:
76
76
  * ```ts
77
- * redis.pipeline().get("key").exec<[{ greeting: string }]>()
77
+ * const p = redis.pipeline()
78
+ * p.get("key")
79
+ * const result = p.exec<[{ greeting: string }]>()
78
80
  * ```
79
81
  */
80
82
  Object.defineProperty(this, "exec", {
@@ -1184,23 +1186,22 @@ export class Pipeline {
1184
1186
  value: (...args) => this.chain(new ZUnionStoreCommand(args, this.commandOptions))
1185
1187
  });
1186
1188
  this.client = opts.client;
1187
- this.commands = [];
1189
+ this.commands = []; // the TCommands generic in the class definition is only used for carrying through chained command types and should never be explicitly set when instantiating the class
1188
1190
  this.commandOptions = opts.commandOptions;
1189
1191
  this.multiExec = opts.multiExec ?? false;
1190
1192
  }
1191
1193
  /**
1192
- * Pushes a command into the pipelien and returns a chainable instance of the
1194
+ * Pushes a command into the pipeline and returns a chainable instance of the
1193
1195
  * pipeline
1194
1196
  */
1195
1197
  chain(command) {
1196
1198
  this.commands.push(command);
1197
- return this;
1199
+ return this; // TS thinks we're returning Pipeline<[]> here, because we're not creating a new instance of the class, hence the cast
1198
1200
  }
1199
1201
  /**
1200
1202
  * @see https://redis.io/commands/?group=json
1201
1203
  */
1202
1204
  get json() {
1203
- // For some reason we needed to define the types manually, otherwise Deno wouldn't build it
1204
1205
  return {
1205
1206
  /**
1206
1207
  * @see https://redis.io/commands/json.arrappend
@@ -42,7 +42,9 @@ export class Redis extends core.Redis {
42
42
  enableTelemetry: !process.env.UPSTASH_DISABLE_TELEMETRY,
43
43
  });
44
44
  this.addTelemetry({
45
- runtime: `node@${process.version}`,
45
+ runtime: typeof EdgeRuntime === "string"
46
+ ? "edge-light"
47
+ : `node@${process.version}`,
46
48
  platform: process.env.VERCEL
47
49
  ? "vercel"
48
50
  : process.env.AWS_REGION
package/esm/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "v1.20.5";
1
+ export const VERSION = "v0.0.0";
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "main": "./script/platforms/nodejs.js",
4
4
  "types": "./types/platforms/nodejs.d.ts",
5
5
  "name": "@upstash/redis",
6
- "version": "v1.20.5",
6
+ "version": "1.20.7-next.1",
7
7
  "description": "An HTTP/REST based Redis client built on top of Upstash REST API.",
8
8
  "repository": {
9
9
  "type": "git",
@@ -27,10 +27,18 @@
27
27
  },
28
28
  "typesVersions": {
29
29
  "*": {
30
- "nodejs": "./types/platforms/nodejs.d.ts",
31
- "cloudflare": "./types/platforms/cloudflare.d.ts",
32
- "fastly": "./types/platforms/fastly.d.ts",
33
- "with-fetch": "./types/platforms/node_with_fetch.d.ts"
30
+ "nodejs": [
31
+ "./types/platforms/nodejs.d.ts"
32
+ ],
33
+ "cloudflare": [
34
+ "./types/platforms/cloudflare.d.ts"
35
+ ],
36
+ "fastly": [
37
+ "./types/platforms/fastly.d.ts"
38
+ ],
39
+ "with-fetch": [
40
+ "./types/platforms/node_with_fetch.d.ts"
41
+ ]
34
42
  }
35
43
  },
36
44
  "exports": {
@@ -34,7 +34,7 @@ const zdiffstore_js_1 = require("./commands/zdiffstore.js");
34
34
  * const res = await p.set("key","value").get("key").exec()
35
35
  * ```
36
36
  *
37
- * It's not possible to infer correct types with a dynamic pipeline, so you can
37
+ * Return types are inferred if all commands are chained, but you can still
38
38
  * override the response type manually:
39
39
  * ```ts
40
40
  * redis.pipeline()
@@ -75,9 +75,11 @@ class Pipeline {
75
75
  *
76
76
  * Returns an array with the results of all pipelined commands.
77
77
  *
78
- * You can define a return type manually to make working in typescript easier
78
+ * If all commands are statically chained from start to finish, types are inferred. You can still define a return type manually if necessary though:
79
79
  * ```ts
80
- * redis.pipeline().get("key").exec<[{ greeting: string }]>()
80
+ * const p = redis.pipeline()
81
+ * p.get("key")
82
+ * const result = p.exec<[{ greeting: string }]>()
81
83
  * ```
82
84
  */
83
85
  Object.defineProperty(this, "exec", {
@@ -1187,23 +1189,22 @@ class Pipeline {
1187
1189
  value: (...args) => this.chain(new mod_js_1.ZUnionStoreCommand(args, this.commandOptions))
1188
1190
  });
1189
1191
  this.client = opts.client;
1190
- this.commands = [];
1192
+ this.commands = []; // the TCommands generic in the class definition is only used for carrying through chained command types and should never be explicitly set when instantiating the class
1191
1193
  this.commandOptions = opts.commandOptions;
1192
1194
  this.multiExec = opts.multiExec ?? false;
1193
1195
  }
1194
1196
  /**
1195
- * Pushes a command into the pipelien and returns a chainable instance of the
1197
+ * Pushes a command into the pipeline and returns a chainable instance of the
1196
1198
  * pipeline
1197
1199
  */
1198
1200
  chain(command) {
1199
1201
  this.commands.push(command);
1200
- return this;
1202
+ return this; // TS thinks we're returning Pipeline<[]> here, because we're not creating a new instance of the class, hence the cast
1201
1203
  }
1202
1204
  /**
1203
1205
  * @see https://redis.io/commands/?group=json
1204
1206
  */
1205
1207
  get json() {
1206
- // For some reason we needed to define the types manually, otherwise Deno wouldn't build it
1207
1208
  return {
1208
1209
  /**
1209
1210
  * @see https://redis.io/commands/json.arrappend
@@ -68,7 +68,9 @@ class Redis extends core.Redis {
68
68
  enableTelemetry: !process.env.UPSTASH_DISABLE_TELEMETRY,
69
69
  });
70
70
  this.addTelemetry({
71
- runtime: `node@${process.version}`,
71
+ runtime: typeof EdgeRuntime === "string"
72
+ ? "edge-light"
73
+ : `node@${process.version}`,
72
74
  platform: process.env.VERCEL
73
75
  ? "vercel"
74
76
  : process.env.AWS_REGION
package/script/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = "v1.20.5";
4
+ exports.VERSION = "v0.0.0";
@@ -1,7 +1,7 @@
1
1
  import { Command, CommandOptions } from "./command.js";
2
2
  export type SetCommandOptions = {
3
- get: boolean;
4
- } | ({
3
+ get?: boolean;
4
+ } & ({
5
5
  ex: number;
6
6
  px?: never;
7
7
  exat?: never;
@@ -1,7 +1,10 @@
1
- import { DelCommand, ExistsCommand, FlushAllCommand, JsonArrAppendCommand, JsonArrIndexCommand, JsonArrInsertCommand, JsonArrLenCommand, JsonArrPopCommand, JsonArrTrimCommand, JsonClearCommand, JsonDelCommand, JsonForgetCommand, JsonGetCommand, JsonMGetCommand, JsonNumIncrByCommand, JsonNumMultByCommand, JsonObjKeysCommand, JsonObjLenCommand, JsonRespCommand, JsonSetCommand, JsonStrAppendCommand, JsonStrLenCommand, JsonToggleCommand, JsonTypeCommand, MGetCommand, PingCommand, ScoreMember, ScriptExistsCommand, SetCommandOptions, TouchCommand, UnlinkCommand, ZAddCommandOptions, ZAddCommandOptionsWithIncr, ZRangeCommandOptions } from "./commands/mod.js";
2
- import { CommandOptions } from "./commands/command.js";
1
+ import { BitOpCommand, DelCommand, ExistsCommand, FlushAllCommand, JsonGetCommand, MGetCommand, PingCommand, ScoreMember, ScriptExistsCommand, SetCommandOptions, TouchCommand, UnlinkCommand, ZAddCommandOptions, ZAddCommandOptionsWithIncr, ZRangeCommandOptions } from "./commands/mod.js";
2
+ import { Command, CommandOptions } from "./commands/command.js";
3
3
  import { Requester } from "./http.js";
4
4
  import { CommandArgs } from "./types.js";
5
+ type InferResponseData<T extends unknown[]> = {
6
+ [K in keyof T]: T[K] extends Command<any, infer TData> ? TData : unknown;
7
+ };
5
8
  /**
6
9
  * Upstash REST API supports command pipelining to send multiple commands in
7
10
  * batch, instead of sending each command one by one and waiting for a response.
@@ -30,7 +33,7 @@ import { CommandArgs } from "./types.js";
30
33
  * const res = await p.set("key","value").get("key").exec()
31
34
  * ```
32
35
  *
33
- * It's not possible to infer correct types with a dynamic pipeline, so you can
36
+ * Return types are inferred if all commands are chained, but you can still
34
37
  * override the response type manually:
35
38
  * ```ts
36
39
  * redis.pipeline()
@@ -40,7 +43,7 @@ import { CommandArgs } from "./types.js";
40
43
  *
41
44
  * ```
42
45
  */
43
- export declare class Pipeline {
46
+ export declare class Pipeline<TCommands extends Command<any, any>[] = []> {
44
47
  private client;
45
48
  private commands;
46
49
  private commandOptions?;
@@ -55,214 +58,216 @@ export declare class Pipeline {
55
58
  *
56
59
  * Returns an array with the results of all pipelined commands.
57
60
  *
58
- * You can define a return type manually to make working in typescript easier
61
+ * If all commands are statically chained from start to finish, types are inferred. You can still define a return type manually if necessary though:
59
62
  * ```ts
60
- * redis.pipeline().get("key").exec<[{ greeting: string }]>()
63
+ * const p = redis.pipeline()
64
+ * p.get("key")
65
+ * const result = p.exec<[{ greeting: string }]>()
61
66
  * ```
62
67
  */
63
- exec: <TCommandResults extends unknown[] = unknown[]>() => Promise<TCommandResults>;
68
+ exec: <TCommandResults extends unknown[] = [] extends TCommands ? unknown[] : InferResponseData<TCommands>>() => Promise<TCommandResults>;
64
69
  /**
65
- * Pushes a command into the pipelien and returns a chainable instance of the
70
+ * Pushes a command into the pipeline and returns a chainable instance of the
66
71
  * pipeline
67
72
  */
68
73
  private chain;
69
74
  /**
70
75
  * @see https://redis.io/commands/append
71
76
  */
72
- append: (key: string, value: string) => this;
77
+ append: (key: string, value: string) => Pipeline<[...TCommands, Command<any, number>]>;
73
78
  /**
74
79
  * @see https://redis.io/commands/bitcount
75
80
  */
76
- bitcount: (key: string, start: number, end: number) => this;
81
+ bitcount: (key: string, start: number, end: number) => Pipeline<[...TCommands, Command<any, number>]>;
77
82
  /**
78
83
  * @see https://redis.io/commands/bitop
79
84
  */
80
85
  bitop: {
81
- (op: "and" | "or" | "xor", destinationKey: string, sourceKey: string, ...sourceKeys: string[]): Pipeline;
82
- (op: "not", destinationKey: string, sourceKey: string): Pipeline;
86
+ (op: "and" | "or" | "xor", destinationKey: string, sourceKey: string, ...sourceKeys: string[]): Pipeline<[...TCommands, BitOpCommand]>;
87
+ (op: "not", destinationKey: string, sourceKey: string): Pipeline<[...TCommands, BitOpCommand]>;
83
88
  };
84
89
  /**
85
90
  * @see https://redis.io/commands/bitpos
86
91
  */
87
- bitpos: (key: string, bit: 0 | 1, start?: number | undefined, end?: number | undefined) => this;
92
+ bitpos: (key: string, bit: 0 | 1, start?: number | undefined, end?: number | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
88
93
  /**
89
94
  * @see https://redis.io/commands/zdiffstore
90
95
  */
91
- zdiffstore: (destination: string, numkeys: number, ...keys: string[]) => this;
96
+ zdiffstore: (destination: string, numkeys: number, ...keys: string[]) => Pipeline<[...TCommands, Command<any, number>]>;
92
97
  /**
93
98
  * @see https://redis.io/commands/dbsize
94
99
  */
95
- dbsize: () => this;
100
+ dbsize: () => Pipeline<[...TCommands, Command<any, number>]>;
96
101
  /**
97
102
  * @see https://redis.io/commands/decr
98
103
  */
99
- decr: (key: string) => this;
104
+ decr: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
100
105
  /**
101
106
  * @see https://redis.io/commands/decrby
102
107
  */
103
- decrby: (key: string, decrement: number) => this;
108
+ decrby: (key: string, decrement: number) => Pipeline<[...TCommands, Command<any, number>]>;
104
109
  /**
105
110
  * @see https://redis.io/commands/del
106
111
  */
107
- del: (...args: CommandArgs<typeof DelCommand>) => this;
112
+ del: (...args: CommandArgs<typeof DelCommand>) => Pipeline<[...TCommands, Command<any, number>]>;
108
113
  /**
109
114
  * @see https://redis.io/commands/echo
110
115
  */
111
- echo: (message: string) => this;
116
+ echo: (message: string) => Pipeline<[...TCommands, Command<any, string>]>;
112
117
  /**
113
118
  * @see https://redis.io/commands/eval
114
119
  */
115
- eval: <TArgs extends unknown[], TData = unknown>(script: string, keys: string[], args: TArgs) => this;
120
+ eval: <TArgs extends unknown[], TData = unknown>(script: string, keys: string[], args: TArgs) => Pipeline<[...TCommands, Command<any, TData>]>;
116
121
  /**
117
122
  * @see https://redis.io/commands/evalsha
118
123
  */
119
- evalsha: <TArgs extends unknown[], TData = unknown>(sha1: string, keys: string[], args: TArgs) => this;
124
+ evalsha: <TArgs extends unknown[], TData = unknown>(sha1: string, keys: string[], args: TArgs) => Pipeline<[...TCommands, Command<any, TData>]>;
120
125
  /**
121
126
  * @see https://redis.io/commands/exists
122
127
  */
123
- exists: (...args: CommandArgs<typeof ExistsCommand>) => this;
128
+ exists: (...args: CommandArgs<typeof ExistsCommand>) => Pipeline<[...TCommands, Command<any, number>]>;
124
129
  /**
125
130
  * @see https://redis.io/commands/expire
126
131
  */
127
- expire: (key: string, seconds: number) => this;
132
+ expire: (key: string, seconds: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
128
133
  /**
129
134
  * @see https://redis.io/commands/expireat
130
135
  */
131
- expireat: (key: string, unix: number) => this;
136
+ expireat: (key: string, unix: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
132
137
  /**
133
138
  * @see https://redis.io/commands/flushall
134
139
  */
135
- flushall: (args?: CommandArgs<typeof FlushAllCommand>) => this;
140
+ flushall: (args?: CommandArgs<typeof FlushAllCommand>) => Pipeline<[...TCommands, Command<any, "OK">]>;
136
141
  /**
137
142
  * @see https://redis.io/commands/flushdb
138
143
  */
139
144
  flushdb: (opts?: {
140
145
  async?: boolean | undefined;
141
- } | undefined) => this;
146
+ } | undefined) => Pipeline<[...TCommands, Command<any, "OK">]>;
142
147
  /**
143
148
  * @see https://redis.io/commands/get
144
149
  */
145
- get: <TData>(key: string) => this;
150
+ get: <TData>(key: string) => Pipeline<[...TCommands, Command<any, TData | null>]>;
146
151
  /**
147
152
  * @see https://redis.io/commands/getbit
148
153
  */
149
- getbit: (key: string, offset: number) => this;
154
+ getbit: (key: string, offset: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
150
155
  /**
151
156
  * @see https://redis.io/commands/getdel
152
157
  */
153
- getdel: <TData>(key: string) => this;
158
+ getdel: <TData>(key: string) => Pipeline<[...TCommands, Command<any, TData | null>]>;
154
159
  /**
155
160
  * @see https://redis.io/commands/getrange
156
161
  */
157
- getrange: (key: string, start: number, end: number) => this;
162
+ getrange: (key: string, start: number, end: number) => Pipeline<[...TCommands, Command<any, string>]>;
158
163
  /**
159
164
  * @see https://redis.io/commands/getset
160
165
  */
161
- getset: <TData>(key: string, value: TData) => this;
166
+ getset: <TData>(key: string, value: TData) => Pipeline<[...TCommands, Command<any, TData | null>]>;
162
167
  /**
163
168
  * @see https://redis.io/commands/hdel
164
169
  */
165
- hdel: (key: string, ...fields: string[]) => this;
170
+ hdel: (key: string, ...fields: string[]) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
166
171
  /**
167
172
  * @see https://redis.io/commands/hexists
168
173
  */
169
- hexists: (key: string, field: string) => this;
174
+ hexists: (key: string, field: string) => Pipeline<[...TCommands, Command<any, number>]>;
170
175
  /**
171
176
  * @see https://redis.io/commands/hget
172
177
  */
173
- hget: <TData>(key: string, field: string) => this;
178
+ hget: <TData>(key: string, field: string) => Pipeline<[...TCommands, Command<any, TData | null>]>;
174
179
  /**
175
180
  * @see https://redis.io/commands/hgetall
176
181
  */
177
- hgetall: <TData extends Record<string, unknown>>(key: string) => this;
182
+ hgetall: <TData extends Record<string, unknown>>(key: string) => Pipeline<[...TCommands, Command<any, TData | null>]>;
178
183
  /**
179
184
  * @see https://redis.io/commands/hincrby
180
185
  */
181
- hincrby: (key: string, field: string, increment: number) => this;
186
+ hincrby: (key: string, field: string, increment: number) => Pipeline<[...TCommands, Command<any, number>]>;
182
187
  /**
183
188
  * @see https://redis.io/commands/hincrbyfloat
184
189
  */
185
- hincrbyfloat: (key: string, field: string, increment: number) => this;
190
+ hincrbyfloat: (key: string, field: string, increment: number) => Pipeline<[...TCommands, Command<any, number>]>;
186
191
  /**
187
192
  * @see https://redis.io/commands/hkeys
188
193
  */
189
- hkeys: (key: string) => this;
194
+ hkeys: (key: string) => Pipeline<[...TCommands, Command<any, string[]>]>;
190
195
  /**
191
196
  * @see https://redis.io/commands/hlen
192
197
  */
193
- hlen: (key: string) => this;
198
+ hlen: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
194
199
  /**
195
200
  * @see https://redis.io/commands/hmget
196
201
  */
197
- hmget: <TData extends Record<string, unknown>>(key: string, ...fields: string[]) => this;
202
+ hmget: <TData extends Record<string, unknown>>(key: string, ...fields: string[]) => Pipeline<[...TCommands, Command<any, TData | null>]>;
198
203
  /**
199
204
  * @see https://redis.io/commands/hmset
200
205
  */
201
206
  hmset: <TData>(key: string, kv: {
202
207
  [field: string]: TData;
203
- }) => this;
208
+ }) => Pipeline<[...TCommands, Command<any, "OK">]>;
204
209
  /**
205
210
  * @see https://redis.io/commands/hrandfield
206
211
  */
207
- hrandfield: <TData extends string | string[] | Record<string, unknown>>(key: string, count?: number, withValues?: boolean) => this;
212
+ hrandfield: <TData extends string | string[] | Record<string, unknown>>(key: string, count?: number, withValues?: boolean) => Pipeline<[...TCommands, Command<any, TData>]>;
208
213
  /**
209
214
  * @see https://redis.io/commands/hscan
210
215
  */
211
- hscan: (key: string, cursor: number, cmdOpts?: import("./commands/scan.js").ScanCommandOptions | undefined) => this;
216
+ hscan: (key: string, cursor: number, cmdOpts?: import("./commands/scan.js").ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [number, (string | number)[]]>]>;
212
217
  /**
213
218
  * @see https://redis.io/commands/hset
214
219
  */
215
220
  hset: <TData>(key: string, kv: {
216
221
  [field: string]: TData;
217
- }) => this;
222
+ }) => Pipeline<[...TCommands, Command<any, number>]>;
218
223
  /**
219
224
  * @see https://redis.io/commands/hsetnx
220
225
  */
221
- hsetnx: <TData>(key: string, field: string, value: TData) => this;
226
+ hsetnx: <TData>(key: string, field: string, value: TData) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
222
227
  /**
223
228
  * @see https://redis.io/commands/hstrlen
224
229
  */
225
- hstrlen: (key: string, field: string) => this;
230
+ hstrlen: (key: string, field: string) => Pipeline<[...TCommands, Command<any, number>]>;
226
231
  /**
227
232
  * @see https://redis.io/commands/hvals
228
233
  */
229
- hvals: (key: string) => this;
234
+ hvals: (key: string) => Pipeline<[...TCommands, Command<any, any>]>;
230
235
  /**
231
236
  * @see https://redis.io/commands/incr
232
237
  */
233
- incr: (key: string) => this;
238
+ incr: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
234
239
  /**
235
240
  * @see https://redis.io/commands/incrby
236
241
  */
237
- incrby: (key: string, value: number) => this;
242
+ incrby: (key: string, value: number) => Pipeline<[...TCommands, Command<any, number>]>;
238
243
  /**
239
244
  * @see https://redis.io/commands/incrbyfloat
240
245
  */
241
- incrbyfloat: (key: string, value: number) => this;
246
+ incrbyfloat: (key: string, value: number) => Pipeline<[...TCommands, Command<any, number>]>;
242
247
  /**
243
248
  * @see https://redis.io/commands/keys
244
249
  */
245
- keys: (pattern: string) => this;
250
+ keys: (pattern: string) => Pipeline<[...TCommands, Command<any, string[]>]>;
246
251
  /**
247
252
  * @see https://redis.io/commands/lindex
248
253
  */
249
- lindex: (key: string, index: number) => this;
254
+ lindex: (key: string, index: number) => Pipeline<[...TCommands, Command<any, any>]>;
250
255
  /**
251
256
  * @see https://redis.io/commands/linsert
252
257
  */
253
- linsert: <TData>(key: string, direction: "before" | "after", pivot: TData, value: TData) => Pipeline;
258
+ linsert: <TData>(key: string, direction: "before" | "after", pivot: TData, value: TData) => Pipeline<[...TCommands, Command<any, number>]>;
254
259
  /**
255
260
  * @see https://redis.io/commands/llen
256
261
  */
257
- llen: (key: string) => this;
262
+ llen: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
258
263
  /**
259
264
  * @see https://redis.io/commands/lmove
260
265
  */
261
- lmove: <TData = string>(source: string, destination: string, whereFrom: "left" | "right", whereTo: "left" | "right") => this;
266
+ lmove: <TData = string>(source: string, destination: string, whereFrom: "left" | "right", whereTo: "left" | "right") => Pipeline<[...TCommands, Command<any, TData>]>;
262
267
  /**
263
268
  * @see https://redis.io/commands/lpop
264
269
  */
265
- lpop: <TData>(key: string, count?: number | undefined) => this;
270
+ lpop: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
266
271
  /**
267
272
  * @see https://redis.io/commands/lpos
268
273
  */
@@ -270,256 +275,256 @@ export declare class Pipeline {
270
275
  rank?: number | undefined;
271
276
  count?: number | undefined;
272
277
  maxLen?: number | undefined;
273
- } | undefined) => this;
278
+ } | undefined) => Pipeline<[...TCommands, Command<any, TData>]>;
274
279
  /**
275
280
  * @see https://redis.io/commands/lpush
276
281
  */
277
- lpush: <TData>(key: string, ...elements: TData[]) => this;
282
+ lpush: <TData>(key: string, ...elements: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
278
283
  /**
279
284
  * @see https://redis.io/commands/lpushx
280
285
  */
281
- lpushx: <TData>(key: string, ...elements: TData[]) => this;
286
+ lpushx: <TData>(key: string, ...elements: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
282
287
  /**
283
288
  * @see https://redis.io/commands/lrange
284
289
  */
285
- lrange: <TResult = string>(key: string, start: number, end: number) => this;
290
+ lrange: <TResult = string>(key: string, start: number, end: number) => Pipeline<[...TCommands, Command<any, TResult[]>]>;
286
291
  /**
287
292
  * @see https://redis.io/commands/lrem
288
293
  */
289
- lrem: <TData>(key: string, count: number, value: TData) => this;
294
+ lrem: <TData>(key: string, count: number, value: TData) => Pipeline<[...TCommands, Command<any, number>]>;
290
295
  /**
291
296
  * @see https://redis.io/commands/lset
292
297
  */
293
- lset: <TData>(key: string, index: number, value: TData) => this;
298
+ lset: <TData>(key: string, index: number, value: TData) => Pipeline<[...TCommands, Command<any, "OK">]>;
294
299
  /**
295
300
  * @see https://redis.io/commands/ltrim
296
301
  */
297
- ltrim: (key: string, start: number, end: number) => this;
302
+ ltrim: (key: string, start: number, end: number) => Pipeline<[...TCommands, Command<any, "OK">]>;
298
303
  /**
299
304
  * @see https://redis.io/commands/mget
300
305
  */
301
- mget: <TData extends unknown[]>(...args: CommandArgs<typeof MGetCommand>) => this;
306
+ mget: <TData extends unknown[]>(...args: CommandArgs<typeof MGetCommand>) => Pipeline<[...TCommands, Command<any, TData>]>;
302
307
  /**
303
308
  * @see https://redis.io/commands/mset
304
309
  */
305
310
  mset: <TData>(kv: {
306
311
  [key: string]: TData;
307
- }) => this;
312
+ }) => Pipeline<[...TCommands, Command<any, "OK">]>;
308
313
  /**
309
314
  * @see https://redis.io/commands/msetnx
310
315
  */
311
316
  msetnx: <TData>(kv: {
312
317
  [key: string]: TData;
313
- }) => this;
318
+ }) => Pipeline<[...TCommands, Command<any, number>]>;
314
319
  /**
315
320
  * @see https://redis.io/commands/persist
316
321
  */
317
- persist: (key: string) => this;
322
+ persist: (key: string) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
318
323
  /**
319
324
  * @see https://redis.io/commands/pexpire
320
325
  */
321
- pexpire: (key: string, milliseconds: number) => this;
326
+ pexpire: (key: string, milliseconds: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
322
327
  /**
323
328
  * @see https://redis.io/commands/pexpireat
324
329
  */
325
- pexpireat: (key: string, unix: number) => this;
330
+ pexpireat: (key: string, unix: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
326
331
  /**
327
332
  * @see https://redis.io/commands/ping
328
333
  */
329
- ping: (args?: CommandArgs<typeof PingCommand>) => this;
334
+ ping: (args?: CommandArgs<typeof PingCommand>) => Pipeline<[...TCommands, Command<any, string>]>;
330
335
  /**
331
336
  * @see https://redis.io/commands/psetex
332
337
  */
333
- psetex: <TData>(key: string, ttl: number, value: TData) => this;
338
+ psetex: <TData>(key: string, ttl: number, value: TData) => Pipeline<[...TCommands, Command<any, string>]>;
334
339
  /**
335
340
  * @see https://redis.io/commands/pttl
336
341
  */
337
- pttl: (key: string) => this;
342
+ pttl: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
338
343
  /**
339
344
  * @see https://redis.io/commands/publish
340
345
  */
341
- publish: (channel: string, message: unknown) => this;
346
+ publish: (channel: string, message: unknown) => Pipeline<[...TCommands, Command<any, number>]>;
342
347
  /**
343
348
  * @see https://redis.io/commands/randomkey
344
349
  */
345
- randomkey: () => this;
350
+ randomkey: () => Pipeline<[...TCommands, Command<any, string | null>]>;
346
351
  /**
347
352
  * @see https://redis.io/commands/rename
348
353
  */
349
- rename: (source: string, destination: string) => this;
354
+ rename: (source: string, destination: string) => Pipeline<[...TCommands, Command<any, "OK">]>;
350
355
  /**
351
356
  * @see https://redis.io/commands/renamenx
352
357
  */
353
- renamenx: (source: string, destination: string) => this;
358
+ renamenx: (source: string, destination: string) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
354
359
  /**
355
360
  * @see https://redis.io/commands/rpop
356
361
  */
357
- rpop: <TData = string>(key: string, count?: number | undefined) => this;
362
+ rpop: <TData = string>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
358
363
  /**
359
364
  * @see https://redis.io/commands/rpush
360
365
  */
361
- rpush: <TData>(key: string, ...elements: TData[]) => this;
366
+ rpush: <TData>(key: string, ...elements: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
362
367
  /**
363
368
  * @see https://redis.io/commands/rpushx
364
369
  */
365
- rpushx: <TData>(key: string, ...elements: TData[]) => this;
370
+ rpushx: <TData>(key: string, ...elements: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
366
371
  /**
367
372
  * @see https://redis.io/commands/sadd
368
373
  */
369
- sadd: <TData>(key: string, ...members: TData[]) => this;
374
+ sadd: <TData>(key: string, ...members: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
370
375
  /**
371
376
  * @see https://redis.io/commands/scan
372
377
  */
373
- scan: (cursor: number, opts?: import("./commands/scan.js").ScanCommandOptions | undefined) => this;
378
+ scan: (cursor: number, opts?: import("./commands/scan.js").ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [number, string[]]>]>;
374
379
  /**
375
380
  * @see https://redis.io/commands/scard
376
381
  */
377
- scard: (key: string) => this;
382
+ scard: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
378
383
  /**
379
384
  * @see https://redis.io/commands/script-exists
380
385
  */
381
- scriptExists: (...args: CommandArgs<typeof ScriptExistsCommand>) => this;
386
+ scriptExists: (...args: CommandArgs<typeof ScriptExistsCommand>) => Pipeline<[...TCommands, Command<any, number[]>]>;
382
387
  /**
383
388
  * @see https://redis.io/commands/script-flush
384
389
  */
385
- scriptFlush: (opts?: import("./commands/script_flush.js").ScriptFlushCommandOptions | undefined) => this;
390
+ scriptFlush: (opts?: import("./commands/script_flush.js").ScriptFlushCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, "OK">]>;
386
391
  /**
387
392
  * @see https://redis.io/commands/script-load
388
393
  */
389
- scriptLoad: (script: string) => this;
390
- sdiff: (key: string, ...keys: string[]) => this;
394
+ scriptLoad: (script: string) => Pipeline<[...TCommands, Command<any, string>]>;
395
+ sdiff: (key: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
391
396
  /**
392
397
  * @see https://redis.io/commands/sdiffstore
393
398
  */
394
- sdiffstore: (destination: string, ...keys: string[]) => this;
399
+ sdiffstore: (destination: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, number>]>;
395
400
  /**
396
401
  * @see https://redis.io/commands/set
397
402
  */
398
- set: <TData>(key: string, value: TData, opts?: SetCommandOptions) => this;
403
+ set: <TData>(key: string, value: TData, opts?: SetCommandOptions) => Pipeline<[...TCommands, Command<any, "OK" | TData | null>]>;
399
404
  /**
400
405
  * @see https://redis.io/commands/setbit
401
406
  */
402
- setbit: (key: string, offset: number, value: 0 | 1) => this;
407
+ setbit: (key: string, offset: number, value: 0 | 1) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
403
408
  /**
404
409
  * @see https://redis.io/commands/setex
405
410
  */
406
- setex: <TData>(key: string, ttl: number, value: TData) => this;
411
+ setex: <TData>(key: string, ttl: number, value: TData) => Pipeline<[...TCommands, Command<any, "OK">]>;
407
412
  /**
408
413
  * @see https://redis.io/commands/setnx
409
414
  */
410
- setnx: <TData>(key: string, value: TData) => this;
415
+ setnx: <TData>(key: string, value: TData) => Pipeline<[...TCommands, Command<any, number>]>;
411
416
  /**
412
417
  * @see https://redis.io/commands/setrange
413
418
  */
414
- setrange: (key: string, offset: number, value: string) => this;
419
+ setrange: (key: string, offset: number, value: string) => Pipeline<[...TCommands, Command<any, number>]>;
415
420
  /**
416
421
  * @see https://redis.io/commands/sinter
417
422
  */
418
- sinter: (key: string, ...keys: string[]) => this;
423
+ sinter: (key: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, string[]>]>;
419
424
  /**
420
425
  * @see https://redis.io/commands/sinterstore
421
426
  */
422
- sinterstore: (destination: string, key: string, ...keys: string[]) => this;
427
+ sinterstore: (destination: string, key: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, number>]>;
423
428
  /**
424
429
  * @see https://redis.io/commands/sismember
425
430
  */
426
- sismember: <TData>(key: string, member: TData) => this;
431
+ sismember: <TData>(key: string, member: TData) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
427
432
  /**
428
433
  * @see https://redis.io/commands/smembers
429
434
  */
430
- smembers: <TData extends unknown[] = string[]>(key: string) => this;
435
+ smembers: <TData extends unknown[] = string[]>(key: string) => Pipeline<[...TCommands, Command<any, TData>]>;
431
436
  /**
432
437
  * @see https://redis.io/commands/smismember
433
438
  */
434
- smismember: <TMembers extends unknown[]>(key: string, members: TMembers) => this;
439
+ smismember: <TMembers extends unknown[]>(key: string, members: TMembers) => Pipeline<[...TCommands, Command<any, (0 | 1)[]>]>;
435
440
  /**
436
441
  * @see https://redis.io/commands/smove
437
442
  */
438
- smove: <TData>(source: string, destination: string, member: TData) => this;
443
+ smove: <TData>(source: string, destination: string, member: TData) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
439
444
  /**
440
445
  * @see https://redis.io/commands/spop
441
446
  */
442
- spop: <TData>(key: string, count?: number | undefined) => this;
447
+ spop: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
443
448
  /**
444
449
  * @see https://redis.io/commands/srandmember
445
450
  */
446
- srandmember: <TData>(key: string, count?: number | undefined) => this;
451
+ srandmember: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
447
452
  /**
448
453
  * @see https://redis.io/commands/srem
449
454
  */
450
- srem: <TData>(key: string, ...members: TData[]) => this;
455
+ srem: <TData>(key: string, ...members: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
451
456
  /**
452
457
  * @see https://redis.io/commands/sscan
453
458
  */
454
- sscan: (key: string, cursor: number, opts?: import("./commands/scan.js").ScanCommandOptions | undefined) => this;
459
+ sscan: (key: string, cursor: number, opts?: import("./commands/scan.js").ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [number, (string | number)[]]>]>;
455
460
  /**
456
461
  * @see https://redis.io/commands/strlen
457
462
  */
458
- strlen: (key: string) => this;
463
+ strlen: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
459
464
  /**
460
465
  * @see https://redis.io/commands/sunion
461
466
  */
462
- sunion: (key: string, ...keys: string[]) => this;
467
+ sunion: (key: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
463
468
  /**
464
469
  * @see https://redis.io/commands/sunionstore
465
470
  */
466
- sunionstore: (destination: string, key: string, ...keys: string[]) => this;
471
+ sunionstore: (destination: string, key: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, number>]>;
467
472
  /**
468
473
  * @see https://redis.io/commands/time
469
474
  */
470
- time: () => this;
475
+ time: () => Pipeline<[...TCommands, Command<any, [number, number]>]>;
471
476
  /**
472
477
  * @see https://redis.io/commands/touch
473
478
  */
474
- touch: (...args: CommandArgs<typeof TouchCommand>) => this;
479
+ touch: (...args: CommandArgs<typeof TouchCommand>) => Pipeline<[...TCommands, Command<any, number>]>;
475
480
  /**
476
481
  * @see https://redis.io/commands/ttl
477
482
  */
478
- ttl: (key: string) => this;
483
+ ttl: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
479
484
  /**
480
485
  * @see https://redis.io/commands/type
481
486
  */
482
- type: (key: string) => this;
487
+ type: (key: string) => Pipeline<[...TCommands, Command<any, import("./commands/type.js").Type>]>;
483
488
  /**
484
489
  * @see https://redis.io/commands/unlink
485
490
  */
486
- unlink: (...args: CommandArgs<typeof UnlinkCommand>) => this;
491
+ unlink: (...args: CommandArgs<typeof UnlinkCommand>) => Pipeline<[...TCommands, Command<any, number>]>;
487
492
  /**
488
493
  * @see https://redis.io/commands/zadd
489
494
  */
490
- zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [string, ZAddCommandOptions | ZAddCommandOptionsWithIncr, ScoreMember<TData>, ...ScoreMember<TData>[]]) => this;
495
+ zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [string, ZAddCommandOptions | ZAddCommandOptionsWithIncr, ScoreMember<TData>, ...ScoreMember<TData>[]]) => Pipeline<[...TCommands, Command<any, number | null>]>;
491
496
  /**
492
497
  * @see https://redis.io/commands/zcard
493
498
  */
494
- zcard: (key: string) => this;
499
+ zcard: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
495
500
  /**
496
501
  * @see https://redis.io/commands/zcount
497
502
  */
498
- zcount: (key: string, min: string | number, max: string | number) => this;
503
+ zcount: (key: string, min: string | number, max: string | number) => Pipeline<[...TCommands, Command<any, number>]>;
499
504
  /**
500
505
  * @see https://redis.io/commands/zincrby
501
506
  */
502
- zincrby: <TData>(key: string, increment: number, member: TData) => this;
507
+ zincrby: <TData>(key: string, increment: number, member: TData) => Pipeline<[...TCommands, Command<any, number>]>;
503
508
  /**
504
509
  * @see https://redis.io/commands/zinterstore
505
510
  */
506
- zinterstore: (destination: string, numKeys: number, keys: string[], opts?: import("./commands/zinterstore.js").ZInterStoreCommandOptions | undefined) => this;
511
+ zinterstore: (destination: string, numKeys: number, keys: string[], opts?: import("./commands/zinterstore.js").ZInterStoreCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
507
512
  /**
508
513
  * @see https://redis.io/commands/zlexcount
509
514
  */
510
- zlexcount: (key: string, min: string, max: string) => this;
515
+ zlexcount: (key: string, min: string, max: string) => Pipeline<[...TCommands, Command<any, number>]>;
511
516
  /**
512
517
  * @see https://redis.io/commands/zmscore
513
518
  */
514
- zmscore: (key: string, members: unknown[]) => this;
519
+ zmscore: (key: string, members: unknown[]) => Pipeline<[...TCommands, Command<any, number[] | null>]>;
515
520
  /**
516
521
  * @see https://redis.io/commands/zpopmax
517
522
  */
518
- zpopmax: <TData>(key: string, count?: number | undefined) => this;
523
+ zpopmax: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData[]>]>;
519
524
  /**
520
525
  * @see https://redis.io/commands/zpopmin
521
526
  */
522
- zpopmin: <TData>(key: string, count?: number | undefined) => this;
527
+ zpopmin: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData[]>]>;
523
528
  /**
524
529
  * @see https://redis.io/commands/zrange
525
530
  */
@@ -537,67 +542,137 @@ export declare class Pipeline {
537
542
  opts: {
538
543
  byScore: true;
539
544
  } & ZRangeCommandOptions
540
- ]) => this;
545
+ ]) => Pipeline<[...TCommands, Command<any, TData>]>;
541
546
  /**
542
547
  * @see https://redis.io/commands/zrank
543
548
  */
544
- zrank: <TData>(key: string, member: TData) => this;
549
+ zrank: <TData>(key: string, member: TData) => Pipeline<[...TCommands, Command<any, number | null>]>;
545
550
  /**
546
551
  * @see https://redis.io/commands/zrem
547
552
  */
548
- zrem: <TData>(key: string, ...members: TData[]) => this;
553
+ zrem: <TData>(key: string, ...members: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
549
554
  /**
550
555
  * @see https://redis.io/commands/zremrangebylex
551
556
  */
552
- zremrangebylex: (key: string, min: string, max: string) => this;
557
+ zremrangebylex: (key: string, min: string, max: string) => Pipeline<[...TCommands, Command<any, number>]>;
553
558
  /**
554
559
  * @see https://redis.io/commands/zremrangebyrank
555
560
  */
556
- zremrangebyrank: (key: string, start: number, stop: number) => this;
561
+ zremrangebyrank: (key: string, start: number, stop: number) => Pipeline<[...TCommands, Command<any, number>]>;
557
562
  /**
558
563
  * @see https://redis.io/commands/zremrangebyscore
559
564
  */
560
- zremrangebyscore: (key: string, min: number, max: number) => this;
565
+ zremrangebyscore: (key: string, min: number, max: number) => Pipeline<[...TCommands, Command<any, number>]>;
561
566
  /**
562
567
  * @see https://redis.io/commands/zrevrank
563
568
  */
564
- zrevrank: <TData>(key: string, member: TData) => this;
569
+ zrevrank: <TData>(key: string, member: TData) => Pipeline<[...TCommands, Command<any, number | null>]>;
565
570
  /**
566
571
  * @see https://redis.io/commands/zscan
567
572
  */
568
- zscan: (key: string, cursor: number, opts?: import("./commands/scan.js").ScanCommandOptions | undefined) => this;
573
+ zscan: (key: string, cursor: number, opts?: import("./commands/scan.js").ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [number, (string | number)[]]>]>;
569
574
  /**
570
575
  * @see https://redis.io/commands/zscore
571
576
  */
572
- zscore: <TData>(key: string, member: TData) => this;
577
+ zscore: <TData>(key: string, member: TData) => Pipeline<[...TCommands, Command<any, number | null>]>;
573
578
  /**
574
579
  * @see https://redis.io/commands/zunionstore
575
580
  */
576
- zunionstore: (destination: string, numKeys: number, keys: string[], opts?: import("./commands/zunionstore.js").ZUnionStoreCommandOptions | undefined) => this;
581
+ zunionstore: (destination: string, numKeys: number, keys: string[], opts?: import("./commands/zunionstore.js").ZUnionStoreCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
577
582
  /**
578
583
  * @see https://redis.io/commands/?group=json
579
584
  */
580
585
  get json(): {
581
- arrappend: (...args: CommandArgs<typeof JsonArrAppendCommand>) => Pipeline;
582
- arrindex: (...args: CommandArgs<typeof JsonArrIndexCommand>) => Pipeline;
583
- arrinsert: (...args: CommandArgs<typeof JsonArrInsertCommand>) => Pipeline;
584
- arrlen: (...args: CommandArgs<typeof JsonArrLenCommand>) => Pipeline;
585
- arrpop: (...args: CommandArgs<typeof JsonArrPopCommand>) => Pipeline;
586
- arrtrim: (...args: CommandArgs<typeof JsonArrTrimCommand>) => Pipeline;
587
- clear: (...args: CommandArgs<typeof JsonClearCommand>) => Pipeline;
588
- del: (...args: CommandArgs<typeof JsonDelCommand>) => Pipeline;
589
- forget: (...args: CommandArgs<typeof JsonForgetCommand>) => Pipeline;
590
- get: (...args: CommandArgs<typeof JsonGetCommand>) => Pipeline;
591
- mget: (...args: CommandArgs<typeof JsonMGetCommand>) => Pipeline;
592
- numincrby: (...args: CommandArgs<typeof JsonNumIncrByCommand>) => Pipeline;
593
- nummultby: (...args: CommandArgs<typeof JsonNumMultByCommand>) => Pipeline;
594
- objkeys: (...args: CommandArgs<typeof JsonObjKeysCommand>) => Pipeline;
595
- objlen: (...args: CommandArgs<typeof JsonObjLenCommand>) => Pipeline;
596
- resp: (...args: CommandArgs<typeof JsonRespCommand>) => Pipeline;
597
- set: (...args: CommandArgs<typeof JsonSetCommand>) => Pipeline;
598
- strappend: (...args: CommandArgs<typeof JsonStrAppendCommand>) => Pipeline;
599
- strlen: (...args: CommandArgs<typeof JsonStrLenCommand>) => Pipeline;
600
- toggle: (...args: CommandArgs<typeof JsonToggleCommand>) => Pipeline;
601
- type: (...args: CommandArgs<typeof JsonTypeCommand>) => Pipeline;
586
+ /**
587
+ * @see https://redis.io/commands/json.arrappend
588
+ */
589
+ arrappend: (key: string, path: string, ...values: unknown[]) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
590
+ /**
591
+ * @see https://redis.io/commands/json.arrindex
592
+ */
593
+ arrindex: (key: string, path: string, value: unknown, start?: number | undefined, stop?: number | undefined) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
594
+ /**
595
+ * @see https://redis.io/commands/json.arrinsert
596
+ */
597
+ arrinsert: (key: string, path: string, index: number, ...values: unknown[]) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
598
+ /**
599
+ * @see https://redis.io/commands/json.arrlen
600
+ */
601
+ arrlen: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
602
+ /**
603
+ * @see https://redis.io/commands/json.arrpop
604
+ */
605
+ arrpop: (key: string, path?: string | undefined, index?: number | undefined) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
606
+ /**
607
+ * @see https://redis.io/commands/json.arrtrim
608
+ */
609
+ arrtrim: (key: string, path?: string | undefined, start?: number | undefined, stop?: number | undefined) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
610
+ /**
611
+ * @see https://redis.io/commands/json.clear
612
+ */
613
+ clear: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
614
+ /**
615
+ * @see https://redis.io/commands/json.del
616
+ */
617
+ del: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
618
+ /**
619
+ * @see https://redis.io/commands/json.forget
620
+ */
621
+ forget: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
622
+ /**
623
+ * @see https://redis.io/commands/json.get
624
+ */
625
+ get: (...args: CommandArgs<typeof JsonGetCommand>) => Pipeline<[...TCommands, Command<any, any>]>;
626
+ /**
627
+ * @see https://redis.io/commands/json.mget
628
+ */
629
+ mget: (keys: string[], path: string) => Pipeline<[...TCommands, Command<any, any>]>;
630
+ /**
631
+ * @see https://redis.io/commands/json.numincrby
632
+ */
633
+ numincrby: (key: string, path: string, value: number) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
634
+ /**
635
+ * @see https://redis.io/commands/json.nummultby
636
+ */
637
+ nummultby: (key: string, path: string, value: number) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
638
+ /**
639
+ * @see https://redis.io/commands/json.objkeys
640
+ */
641
+ objkeys: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, (string[] | null)[]>]>;
642
+ /**
643
+ * @see https://redis.io/commands/json.objlen
644
+ */
645
+ objlen: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
646
+ /**
647
+ * @see https://redis.io/commands/json.resp
648
+ */
649
+ resp: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, any>]>;
650
+ /**
651
+ * @see https://redis.io/commands/json.set
652
+ */
653
+ set: (key: string, path: string, value: string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown>)[], opts?: {
654
+ nx: true;
655
+ xx?: undefined;
656
+ } | {
657
+ nx?: undefined;
658
+ xx: true;
659
+ } | undefined) => Pipeline<[...TCommands, Command<any, "OK" | null>]>;
660
+ /**
661
+ * @see https://redis.io/commands/json.strappend
662
+ */
663
+ strappend: (key: string, path: string, value: string) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
664
+ /**
665
+ * @see https://redis.io/commands/json.strlen
666
+ */
667
+ strlen: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
668
+ /**
669
+ * @see https://redis.io/commands/json.toggle
670
+ */
671
+ toggle: (key: string, path: string) => Pipeline<[...TCommands, Command<any, number[]>]>;
672
+ /**
673
+ * @see https://redis.io/commands/json.type
674
+ */
675
+ type: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, string[]>]>;
602
676
  };
603
677
  }
678
+ export {};
@@ -130,7 +130,7 @@ export declare class Redis {
130
130
  *
131
131
  * @see {@link Pipeline}
132
132
  */
133
- pipeline: () => Pipeline;
133
+ pipeline: () => Pipeline<[]>;
134
134
  /**
135
135
  * Create a new transaction to allow executing multiple steps atomically.
136
136
  *
@@ -140,7 +140,7 @@ export declare class Redis {
140
140
  *
141
141
  * @see {@link Pipeline}
142
142
  */
143
- multi: () => Pipeline;
143
+ multi: () => Pipeline<[]>;
144
144
  /**
145
145
  * @see https://redis.io/commands/append
146
146
  */
@@ -1 +1 @@
1
- export declare const VERSION = "v1.20.5";
1
+ export declare const VERSION = "v0.0.0";