@upstash/redis 0.0.0-ci.e256825f-20221010 → 0.0.0-ci.e4fa3be6-20231018

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/README.md +20 -18
  2. package/esm/pkg/commands/command.js +12 -3
  3. package/esm/pkg/commands/geo_add.js +27 -0
  4. package/esm/pkg/commands/getdel.js +9 -0
  5. package/esm/pkg/commands/hgetall.js +0 -4
  6. package/esm/pkg/commands/hrandfield.js +39 -0
  7. package/esm/pkg/commands/json_arrappend.js +9 -0
  8. package/esm/pkg/commands/json_arrindex.js +9 -0
  9. package/esm/pkg/commands/json_arrinsert.js +9 -0
  10. package/esm/pkg/commands/json_arrlen.js +9 -0
  11. package/esm/pkg/commands/json_arrpop.js +9 -0
  12. package/esm/pkg/commands/json_arrtrim.js +12 -0
  13. package/esm/pkg/commands/json_clear.js +9 -0
  14. package/esm/pkg/commands/json_del.js +9 -0
  15. package/esm/pkg/commands/json_forget.js +9 -0
  16. package/esm/pkg/commands/json_get.js +30 -0
  17. package/esm/pkg/commands/json_mget.js +9 -0
  18. package/esm/pkg/commands/json_numincrby.js +9 -0
  19. package/esm/pkg/commands/json_nummultby.js +9 -0
  20. package/esm/pkg/commands/json_objkeys.js +9 -0
  21. package/esm/pkg/commands/json_objlen.js +9 -0
  22. package/esm/pkg/commands/json_resp.js +9 -0
  23. package/esm/pkg/commands/json_set.js +18 -0
  24. package/esm/pkg/commands/json_strappend.js +9 -0
  25. package/esm/pkg/commands/json_strlen.js +9 -0
  26. package/esm/pkg/commands/json_toggle.js +9 -0
  27. package/esm/pkg/commands/json_type.js +9 -0
  28. package/esm/pkg/commands/lmove.js +9 -0
  29. package/esm/pkg/commands/mod.js +29 -0
  30. package/esm/pkg/commands/set.js +1 -1
  31. package/esm/pkg/commands/smismember.js +9 -0
  32. package/esm/pkg/commands/xadd.js +26 -0
  33. package/esm/pkg/commands/xrange.js +36 -0
  34. package/esm/pkg/commands/zdiffstore.js +9 -0
  35. package/esm/pkg/commands/zunion.js +30 -0
  36. package/esm/pkg/http.js +71 -25
  37. package/esm/pkg/pipeline.js +175 -12
  38. package/esm/pkg/redis.js +225 -3
  39. package/esm/platforms/cloudflare.js +10 -2
  40. package/esm/platforms/fastly.js +6 -0
  41. package/esm/platforms/node_with_fetch.js +26 -1
  42. package/esm/platforms/nodejs.js +24 -1
  43. package/esm/version.js +1 -0
  44. package/package.json +53 -20
  45. package/script/pkg/commands/command.js +12 -3
  46. package/script/pkg/commands/geo_add.js +31 -0
  47. package/script/pkg/commands/getdel.js +13 -0
  48. package/script/pkg/commands/hgetall.js +0 -4
  49. package/script/pkg/commands/hrandfield.js +43 -0
  50. package/script/pkg/commands/json_arrappend.js +13 -0
  51. package/script/pkg/commands/json_arrindex.js +13 -0
  52. package/script/pkg/commands/json_arrinsert.js +13 -0
  53. package/script/pkg/commands/json_arrlen.js +13 -0
  54. package/script/pkg/commands/json_arrpop.js +13 -0
  55. package/script/pkg/commands/json_arrtrim.js +16 -0
  56. package/script/pkg/commands/json_clear.js +13 -0
  57. package/script/pkg/commands/json_del.js +13 -0
  58. package/script/pkg/commands/json_forget.js +13 -0
  59. package/script/pkg/commands/json_get.js +34 -0
  60. package/script/pkg/commands/json_mget.js +13 -0
  61. package/script/pkg/commands/json_numincrby.js +13 -0
  62. package/script/pkg/commands/json_nummultby.js +13 -0
  63. package/script/pkg/commands/json_objkeys.js +13 -0
  64. package/script/pkg/commands/json_objlen.js +13 -0
  65. package/script/pkg/commands/json_resp.js +13 -0
  66. package/script/pkg/commands/json_set.js +22 -0
  67. package/script/pkg/commands/json_strappend.js +13 -0
  68. package/script/pkg/commands/json_strlen.js +13 -0
  69. package/script/pkg/commands/json_toggle.js +13 -0
  70. package/script/pkg/commands/json_type.js +13 -0
  71. package/script/pkg/commands/lmove.js +13 -0
  72. package/script/pkg/commands/mod.js +29 -0
  73. package/script/pkg/commands/set.js +1 -1
  74. package/script/pkg/commands/smismember.js +13 -0
  75. package/script/pkg/commands/xadd.js +30 -0
  76. package/script/pkg/commands/xrange.js +40 -0
  77. package/script/pkg/commands/zdiffstore.js +13 -0
  78. package/script/pkg/commands/zunion.js +34 -0
  79. package/script/pkg/http.js +71 -25
  80. package/script/pkg/pipeline.js +174 -11
  81. package/script/pkg/redis.js +224 -2
  82. package/script/platforms/cloudflare.js +10 -2
  83. package/script/platforms/fastly.js +6 -0
  84. package/script/platforms/node_with_fetch.js +26 -1
  85. package/script/platforms/nodejs.js +24 -1
  86. package/script/version.js +4 -0
  87. package/types/pkg/commands/command.d.ts +5 -5
  88. package/types/pkg/commands/geo_add.d.ts +25 -0
  89. package/types/pkg/commands/getdel.d.ts +7 -0
  90. package/types/pkg/commands/hdel.d.ts +1 -1
  91. package/types/pkg/commands/hrandfield.d.ts +9 -0
  92. package/types/pkg/commands/json_arrappend.d.ts +7 -0
  93. package/types/pkg/commands/json_arrindex.d.ts +13 -0
  94. package/types/pkg/commands/json_arrinsert.d.ts +7 -0
  95. package/types/pkg/commands/json_arrlen.d.ts +7 -0
  96. package/types/pkg/commands/json_arrpop.d.ts +7 -0
  97. package/types/pkg/commands/json_arrtrim.d.ts +7 -0
  98. package/types/pkg/commands/json_clear.d.ts +7 -0
  99. package/types/pkg/commands/json_del.d.ts +7 -0
  100. package/types/pkg/commands/json_forget.d.ts +7 -0
  101. package/types/pkg/commands/json_get.d.ts +15 -0
  102. package/types/pkg/commands/json_mget.d.ts +7 -0
  103. package/types/pkg/commands/json_numincrby.d.ts +7 -0
  104. package/types/pkg/commands/json_nummultby.d.ts +7 -0
  105. package/types/pkg/commands/json_objkeys.d.ts +7 -0
  106. package/types/pkg/commands/json_objlen.d.ts +7 -0
  107. package/types/pkg/commands/json_resp.d.ts +7 -0
  108. package/types/pkg/commands/json_set.d.ts +18 -0
  109. package/types/pkg/commands/json_strappend.d.ts +7 -0
  110. package/types/pkg/commands/json_strlen.d.ts +7 -0
  111. package/types/pkg/commands/json_toggle.d.ts +7 -0
  112. package/types/pkg/commands/json_type.d.ts +7 -0
  113. package/types/pkg/commands/lmove.d.ts +12 -0
  114. package/types/pkg/commands/mod.d.ts +29 -0
  115. package/types/pkg/commands/scan.d.ts +1 -1
  116. package/types/pkg/commands/script_flush.d.ts +1 -1
  117. package/types/pkg/commands/set.d.ts +3 -3
  118. package/types/pkg/commands/smembers.d.ts +2 -2
  119. package/types/pkg/commands/smismember.d.ts +7 -0
  120. package/types/pkg/commands/type.d.ts +1 -1
  121. package/types/pkg/commands/xadd.d.ts +31 -0
  122. package/types/pkg/commands/xrange.d.ts +9 -0
  123. package/types/pkg/commands/zadd.d.ts +3 -3
  124. package/types/pkg/commands/zdiffstore.d.ts +7 -0
  125. package/types/pkg/commands/zinterstore.d.ts +1 -1
  126. package/types/pkg/commands/zrange.d.ts +1 -1
  127. package/types/pkg/commands/zunion.d.ts +29 -0
  128. package/types/pkg/commands/zunionstore.d.ts +1 -1
  129. package/types/pkg/http.d.ts +48 -7
  130. package/types/pkg/pipeline.d.ts +260 -126
  131. package/types/pkg/redis.d.ts +171 -13
  132. package/types/pkg/types.d.ts +27 -1
  133. package/types/platforms/cloudflare.d.ts +9 -8
  134. package/types/platforms/fastly.d.ts +3 -7
  135. package/types/platforms/node_with_fetch.d.ts +3 -22
  136. package/types/platforms/nodejs.d.ts +4 -7
  137. package/types/version.d.ts +1 -0
@@ -1,7 +1,10 @@
1
- import { DelCommand, ExistsCommand, FlushAllCommand, MGetCommand, PingCommand, ScoreMember, ScriptExistsCommand, SetCommandOptions, TouchCommand, UnlinkCommand, ZAddCommandOptions, ZAddCommandOptionsWithIncr, ZRangeCommandOptions } from "./commands/mod.js";
2
- import { CommandOptions } from "./commands/command.js";
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.
@@ -18,7 +21,7 @@ import { CommandArgs } from "./types.js";
18
21
  * **Examples:**
19
22
  *
20
23
  * ```ts
21
- * const p = redis.pipeline()
24
+ * const p = redis.pipeline() // or redis.multi()
22
25
  * p.set("key","value")
23
26
  * p.get("key")
24
27
  * const res = await p.exec()
@@ -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,208 +43,235 @@ 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?;
47
- constructor(client: Requester, commandOptions?: CommandOptions<any, any>);
50
+ private multiExec;
51
+ constructor(opts: {
52
+ client: Requester;
53
+ commandOptions?: CommandOptions<any, any>;
54
+ multiExec?: boolean;
55
+ });
48
56
  /**
49
57
  * Send the pipeline request to upstash.
50
58
  *
51
59
  * Returns an array with the results of all pipelined commands.
52
60
  *
53
- * 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:
54
62
  * ```ts
55
- * redis.pipeline().get("key").exec<[{ greeting: string }]>()
63
+ * const p = redis.pipeline()
64
+ * p.get("key")
65
+ * const result = p.exec<[{ greeting: string }]>()
56
66
  * ```
57
67
  */
58
- exec: <TCommandResults extends unknown[] = unknown[]>() => Promise<TCommandResults>;
68
+ exec: <TCommandResults extends unknown[] = [] extends TCommands ? unknown[] : InferResponseData<TCommands>>() => Promise<TCommandResults>;
59
69
  /**
60
- * Pushes a command into the pipelien and returns a chainable instance of the
70
+ * Returns the length of pipeline before the execution
71
+ */
72
+ length(): number;
73
+ /**
74
+ * Pushes a command into the pipeline and returns a chainable instance of the
61
75
  * pipeline
62
76
  */
63
77
  private chain;
64
78
  /**
65
79
  * @see https://redis.io/commands/append
66
80
  */
67
- append: (key: string, value: string) => this;
81
+ append: (key: string, value: string) => Pipeline<[...TCommands, Command<any, number>]>;
68
82
  /**
69
83
  * @see https://redis.io/commands/bitcount
70
84
  */
71
- bitcount: (key: string, start: number, end: number) => this;
85
+ bitcount: (key: string, start: number, end: number) => Pipeline<[...TCommands, Command<any, number>]>;
72
86
  /**
73
87
  * @see https://redis.io/commands/bitop
74
88
  */
75
89
  bitop: {
76
- (op: "and" | "or" | "xor", destinationKey: string, sourceKey: string, ...sourceKeys: string[]): Pipeline;
77
- (op: "not", destinationKey: string, sourceKey: string): Pipeline;
90
+ (op: "and" | "or" | "xor", destinationKey: string, sourceKey: string, ...sourceKeys: string[]): Pipeline<[...TCommands, BitOpCommand]>;
91
+ (op: "not", destinationKey: string, sourceKey: string): Pipeline<[...TCommands, BitOpCommand]>;
78
92
  };
79
93
  /**
80
94
  * @see https://redis.io/commands/bitpos
81
95
  */
82
- bitpos: (key: string, bit: 0 | 1, start?: number | undefined, end?: number | undefined) => this;
96
+ bitpos: (key: string, bit: 0 | 1, start?: number | undefined, end?: number | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
97
+ /**
98
+ * @see https://redis.io/commands/zdiffstore
99
+ */
100
+ zdiffstore: (destination: string, numkeys: number, ...keys: string[]) => Pipeline<[...TCommands, Command<any, number>]>;
83
101
  /**
84
102
  * @see https://redis.io/commands/dbsize
85
103
  */
86
- dbsize: () => this;
104
+ dbsize: () => Pipeline<[...TCommands, Command<any, number>]>;
87
105
  /**
88
106
  * @see https://redis.io/commands/decr
89
107
  */
90
- decr: (key: string) => this;
108
+ decr: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
91
109
  /**
92
110
  * @see https://redis.io/commands/decrby
93
111
  */
94
- decrby: (key: string, decrement: number) => this;
112
+ decrby: (key: string, decrement: number) => Pipeline<[...TCommands, Command<any, number>]>;
95
113
  /**
96
114
  * @see https://redis.io/commands/del
97
115
  */
98
- del: (...args: CommandArgs<typeof DelCommand>) => this;
116
+ del: (...args: CommandArgs<typeof DelCommand>) => Pipeline<[...TCommands, Command<any, number>]>;
99
117
  /**
100
118
  * @see https://redis.io/commands/echo
101
119
  */
102
- echo: (message: string) => this;
120
+ echo: (message: string) => Pipeline<[...TCommands, Command<any, string>]>;
103
121
  /**
104
122
  * @see https://redis.io/commands/eval
105
123
  */
106
- eval: <TArgs extends unknown[], TData = unknown>(script: string, keys: string[], args: TArgs) => this;
124
+ eval: <TArgs extends unknown[], TData = unknown>(script: string, keys: string[], args: TArgs) => Pipeline<[...TCommands, Command<any, TData>]>;
107
125
  /**
108
126
  * @see https://redis.io/commands/evalsha
109
127
  */
110
- evalsha: <TArgs extends unknown[], TData = unknown>(sha1: string, keys: string[], args: TArgs) => this;
128
+ evalsha: <TArgs extends unknown[], TData = unknown>(sha1: string, keys: string[], args: TArgs) => Pipeline<[...TCommands, Command<any, TData>]>;
111
129
  /**
112
130
  * @see https://redis.io/commands/exists
113
131
  */
114
- exists: (...args: CommandArgs<typeof ExistsCommand>) => this;
132
+ exists: (...args: CommandArgs<typeof ExistsCommand>) => Pipeline<[...TCommands, Command<any, number>]>;
115
133
  /**
116
134
  * @see https://redis.io/commands/expire
117
135
  */
118
- expire: (key: string, seconds: number) => this;
136
+ expire: (key: string, seconds: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
119
137
  /**
120
138
  * @see https://redis.io/commands/expireat
121
139
  */
122
- expireat: (key: string, unix: number) => this;
140
+ expireat: (key: string, unix: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
123
141
  /**
124
142
  * @see https://redis.io/commands/flushall
125
143
  */
126
- flushall: (args?: CommandArgs<typeof FlushAllCommand>) => this;
144
+ flushall: (args?: CommandArgs<typeof FlushAllCommand>) => Pipeline<[...TCommands, Command<any, "OK">]>;
127
145
  /**
128
146
  * @see https://redis.io/commands/flushdb
129
147
  */
130
148
  flushdb: (opts?: {
131
149
  async?: boolean | undefined;
132
- } | undefined) => this;
150
+ } | undefined) => Pipeline<[...TCommands, Command<any, "OK">]>;
133
151
  /**
134
152
  * @see https://redis.io/commands/get
135
153
  */
136
- get: <TData>(key: string) => this;
154
+ get: <TData>(key: string) => Pipeline<[...TCommands, Command<any, TData | null>]>;
137
155
  /**
138
156
  * @see https://redis.io/commands/getbit
139
157
  */
140
- getbit: (key: string, offset: number) => this;
158
+ getbit: (key: string, offset: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
159
+ /**
160
+ * @see https://redis.io/commands/getdel
161
+ */
162
+ getdel: <TData>(key: string) => Pipeline<[...TCommands, Command<any, TData | null>]>;
141
163
  /**
142
164
  * @see https://redis.io/commands/getrange
143
165
  */
144
- getrange: (key: string, start: number, end: number) => this;
166
+ getrange: (key: string, start: number, end: number) => Pipeline<[...TCommands, Command<any, string>]>;
145
167
  /**
146
168
  * @see https://redis.io/commands/getset
147
169
  */
148
- getset: <TData>(key: string, value: TData) => this;
170
+ getset: <TData>(key: string, value: TData) => Pipeline<[...TCommands, Command<any, TData | null>]>;
149
171
  /**
150
172
  * @see https://redis.io/commands/hdel
151
173
  */
152
- hdel: (key: string, field: string) => this;
174
+ hdel: (key: string, ...fields: string[]) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
153
175
  /**
154
176
  * @see https://redis.io/commands/hexists
155
177
  */
156
- hexists: (key: string, field: string) => this;
178
+ hexists: (key: string, field: string) => Pipeline<[...TCommands, Command<any, number>]>;
157
179
  /**
158
180
  * @see https://redis.io/commands/hget
159
181
  */
160
- hget: <TData>(key: string, field: string) => this;
182
+ hget: <TData>(key: string, field: string) => Pipeline<[...TCommands, Command<any, TData | null>]>;
161
183
  /**
162
184
  * @see https://redis.io/commands/hgetall
163
185
  */
164
- hgetall: <TData extends Record<string, unknown>>(key: string) => this;
186
+ hgetall: <TData extends Record<string, unknown>>(key: string) => Pipeline<[...TCommands, Command<any, TData | null>]>;
165
187
  /**
166
188
  * @see https://redis.io/commands/hincrby
167
189
  */
168
- hincrby: (key: string, field: string, increment: number) => this;
190
+ hincrby: (key: string, field: string, increment: number) => Pipeline<[...TCommands, Command<any, number>]>;
169
191
  /**
170
192
  * @see https://redis.io/commands/hincrbyfloat
171
193
  */
172
- hincrbyfloat: (key: string, field: string, increment: number) => this;
194
+ hincrbyfloat: (key: string, field: string, increment: number) => Pipeline<[...TCommands, Command<any, number>]>;
173
195
  /**
174
196
  * @see https://redis.io/commands/hkeys
175
197
  */
176
- hkeys: (key: string) => this;
198
+ hkeys: (key: string) => Pipeline<[...TCommands, Command<any, string[]>]>;
177
199
  /**
178
200
  * @see https://redis.io/commands/hlen
179
201
  */
180
- hlen: (key: string) => this;
202
+ hlen: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
181
203
  /**
182
204
  * @see https://redis.io/commands/hmget
183
205
  */
184
- hmget: <TData extends Record<string, unknown>>(key: string, ...fields: string[]) => this;
206
+ hmget: <TData extends Record<string, unknown>>(key: string, ...fields: string[]) => Pipeline<[...TCommands, Command<any, TData | null>]>;
185
207
  /**
186
208
  * @see https://redis.io/commands/hmset
187
209
  */
188
210
  hmset: <TData>(key: string, kv: {
189
211
  [field: string]: TData;
190
- }) => this;
212
+ }) => Pipeline<[...TCommands, Command<any, "OK">]>;
213
+ /**
214
+ * @see https://redis.io/commands/hrandfield
215
+ */
216
+ hrandfield: <TData extends string | string[] | Record<string, unknown>>(key: string, count?: number, withValues?: boolean) => Pipeline<[...TCommands, Command<any, TData>]>;
191
217
  /**
192
218
  * @see https://redis.io/commands/hscan
193
219
  */
194
- hscan: (key: string, cursor: number, cmdOpts?: import("./commands/scan.js").ScanCommandOptions | undefined) => this;
220
+ hscan: (key: string, cursor: number, cmdOpts?: import("./commands/scan.js").ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [number, (string | number)[]]>]>;
195
221
  /**
196
222
  * @see https://redis.io/commands/hset
197
223
  */
198
224
  hset: <TData>(key: string, kv: {
199
225
  [field: string]: TData;
200
- }) => this;
226
+ }) => Pipeline<[...TCommands, Command<any, number>]>;
201
227
  /**
202
228
  * @see https://redis.io/commands/hsetnx
203
229
  */
204
- hsetnx: <TData>(key: string, field: string, value: TData) => this;
230
+ hsetnx: <TData>(key: string, field: string, value: TData) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
205
231
  /**
206
232
  * @see https://redis.io/commands/hstrlen
207
233
  */
208
- hstrlen: (key: string, field: string) => this;
234
+ hstrlen: (key: string, field: string) => Pipeline<[...TCommands, Command<any, number>]>;
209
235
  /**
210
236
  * @see https://redis.io/commands/hvals
211
237
  */
212
- hvals: (key: string) => this;
238
+ hvals: (key: string) => Pipeline<[...TCommands, Command<any, any>]>;
213
239
  /**
214
240
  * @see https://redis.io/commands/incr
215
241
  */
216
- incr: (key: string) => this;
242
+ incr: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
217
243
  /**
218
244
  * @see https://redis.io/commands/incrby
219
245
  */
220
- incrby: (key: string, value: number) => this;
246
+ incrby: (key: string, value: number) => Pipeline<[...TCommands, Command<any, number>]>;
221
247
  /**
222
248
  * @see https://redis.io/commands/incrbyfloat
223
249
  */
224
- incrbyfloat: (key: string, value: number) => this;
250
+ incrbyfloat: (key: string, value: number) => Pipeline<[...TCommands, Command<any, number>]>;
225
251
  /**
226
252
  * @see https://redis.io/commands/keys
227
253
  */
228
- keys: (pattern: string) => this;
254
+ keys: (pattern: string) => Pipeline<[...TCommands, Command<any, string[]>]>;
229
255
  /**
230
256
  * @see https://redis.io/commands/lindex
231
257
  */
232
- lindex: (key: string, index: number) => this;
258
+ lindex: (key: string, index: number) => Pipeline<[...TCommands, Command<any, any>]>;
233
259
  /**
234
260
  * @see https://redis.io/commands/linsert
235
261
  */
236
- linsert: <TData>(key: string, direction: "before" | "after", pivot: TData, value: TData) => Pipeline;
262
+ linsert: <TData>(key: string, direction: "before" | "after", pivot: TData, value: TData) => Pipeline<[...TCommands, Command<any, number>]>;
237
263
  /**
238
264
  * @see https://redis.io/commands/llen
239
265
  */
240
- llen: (key: string) => this;
266
+ llen: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
267
+ /**
268
+ * @see https://redis.io/commands/lmove
269
+ */
270
+ lmove: <TData = string>(source: string, destination: string, whereFrom: "left" | "right", whereTo: "left" | "right") => Pipeline<[...TCommands, Command<any, TData>]>;
241
271
  /**
242
272
  * @see https://redis.io/commands/lpop
243
273
  */
244
- lpop: <TData>(key: string, count?: number | undefined) => this;
274
+ lpop: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
245
275
  /**
246
276
  * @see https://redis.io/commands/lpos
247
277
  */
@@ -249,252 +279,256 @@ export declare class Pipeline {
249
279
  rank?: number | undefined;
250
280
  count?: number | undefined;
251
281
  maxLen?: number | undefined;
252
- } | undefined) => this;
282
+ } | undefined) => Pipeline<[...TCommands, Command<any, TData>]>;
253
283
  /**
254
284
  * @see https://redis.io/commands/lpush
255
285
  */
256
- lpush: <TData>(key: string, ...elements: TData[]) => this;
286
+ lpush: <TData>(key: string, ...elements: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
257
287
  /**
258
288
  * @see https://redis.io/commands/lpushx
259
289
  */
260
- lpushx: <TData>(key: string, ...elements: TData[]) => this;
290
+ lpushx: <TData>(key: string, ...elements: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
261
291
  /**
262
292
  * @see https://redis.io/commands/lrange
263
293
  */
264
- lrange: <TResult = string>(key: string, start: number, end: number) => this;
294
+ lrange: <TResult = string>(key: string, start: number, end: number) => Pipeline<[...TCommands, Command<any, TResult[]>]>;
265
295
  /**
266
296
  * @see https://redis.io/commands/lrem
267
297
  */
268
- lrem: <TData>(key: string, count: number, value: TData) => this;
298
+ lrem: <TData>(key: string, count: number, value: TData) => Pipeline<[...TCommands, Command<any, number>]>;
269
299
  /**
270
300
  * @see https://redis.io/commands/lset
271
301
  */
272
- lset: <TData>(key: string, index: number, value: TData) => this;
302
+ lset: <TData>(key: string, index: number, value: TData) => Pipeline<[...TCommands, Command<any, "OK">]>;
273
303
  /**
274
304
  * @see https://redis.io/commands/ltrim
275
305
  */
276
- ltrim: (key: string, start: number, end: number) => this;
306
+ ltrim: (key: string, start: number, end: number) => Pipeline<[...TCommands, Command<any, "OK">]>;
277
307
  /**
278
308
  * @see https://redis.io/commands/mget
279
309
  */
280
- mget: <TData extends unknown[]>(...args: CommandArgs<typeof MGetCommand>) => this;
310
+ mget: <TData extends unknown[]>(...args: CommandArgs<typeof MGetCommand>) => Pipeline<[...TCommands, Command<any, TData>]>;
281
311
  /**
282
312
  * @see https://redis.io/commands/mset
283
313
  */
284
314
  mset: <TData>(kv: {
285
315
  [key: string]: TData;
286
- }) => this;
316
+ }) => Pipeline<[...TCommands, Command<any, "OK">]>;
287
317
  /**
288
318
  * @see https://redis.io/commands/msetnx
289
319
  */
290
320
  msetnx: <TData>(kv: {
291
321
  [key: string]: TData;
292
- }) => this;
322
+ }) => Pipeline<[...TCommands, Command<any, number>]>;
293
323
  /**
294
324
  * @see https://redis.io/commands/persist
295
325
  */
296
- persist: (key: string) => this;
326
+ persist: (key: string) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
297
327
  /**
298
328
  * @see https://redis.io/commands/pexpire
299
329
  */
300
- pexpire: (key: string, milliseconds: number) => this;
330
+ pexpire: (key: string, milliseconds: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
301
331
  /**
302
332
  * @see https://redis.io/commands/pexpireat
303
333
  */
304
- pexpireat: (key: string, unix: number) => this;
334
+ pexpireat: (key: string, unix: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
305
335
  /**
306
336
  * @see https://redis.io/commands/ping
307
337
  */
308
- ping: (args?: CommandArgs<typeof PingCommand>) => this;
338
+ ping: (args?: CommandArgs<typeof PingCommand>) => Pipeline<[...TCommands, Command<any, string>]>;
309
339
  /**
310
340
  * @see https://redis.io/commands/psetex
311
341
  */
312
- psetex: <TData>(key: string, ttl: number, value: TData) => this;
342
+ psetex: <TData>(key: string, ttl: number, value: TData) => Pipeline<[...TCommands, Command<any, string>]>;
313
343
  /**
314
344
  * @see https://redis.io/commands/pttl
315
345
  */
316
- pttl: (key: string) => this;
346
+ pttl: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
317
347
  /**
318
348
  * @see https://redis.io/commands/publish
319
349
  */
320
- publish: (channel: string, message: unknown) => this;
350
+ publish: (channel: string, message: unknown) => Pipeline<[...TCommands, Command<any, number>]>;
321
351
  /**
322
352
  * @see https://redis.io/commands/randomkey
323
353
  */
324
- randomkey: () => this;
354
+ randomkey: () => Pipeline<[...TCommands, Command<any, string | null>]>;
325
355
  /**
326
356
  * @see https://redis.io/commands/rename
327
357
  */
328
- rename: (source: string, destination: string) => this;
358
+ rename: (source: string, destination: string) => Pipeline<[...TCommands, Command<any, "OK">]>;
329
359
  /**
330
360
  * @see https://redis.io/commands/renamenx
331
361
  */
332
- renamenx: (source: string, destination: string) => this;
362
+ renamenx: (source: string, destination: string) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
333
363
  /**
334
364
  * @see https://redis.io/commands/rpop
335
365
  */
336
- rpop: <TData = string>(key: string, count?: number | undefined) => this;
366
+ rpop: <TData = string>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
337
367
  /**
338
368
  * @see https://redis.io/commands/rpush
339
369
  */
340
- rpush: <TData>(key: string, ...elements: TData[]) => this;
370
+ rpush: <TData>(key: string, ...elements: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
341
371
  /**
342
372
  * @see https://redis.io/commands/rpushx
343
373
  */
344
- rpushx: <TData>(key: string, ...elements: TData[]) => this;
374
+ rpushx: <TData>(key: string, ...elements: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
345
375
  /**
346
376
  * @see https://redis.io/commands/sadd
347
377
  */
348
- sadd: <TData>(key: string, ...members: TData[]) => this;
378
+ sadd: <TData>(key: string, ...members: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
349
379
  /**
350
380
  * @see https://redis.io/commands/scan
351
381
  */
352
- scan: (cursor: number, opts?: import("./commands/scan.js").ScanCommandOptions | undefined) => this;
382
+ scan: (cursor: number, opts?: import("./commands/scan.js").ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [number, string[]]>]>;
353
383
  /**
354
384
  * @see https://redis.io/commands/scard
355
385
  */
356
- scard: (key: string) => this;
386
+ scard: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
357
387
  /**
358
388
  * @see https://redis.io/commands/script-exists
359
389
  */
360
- scriptExists: (...args: CommandArgs<typeof ScriptExistsCommand>) => this;
390
+ scriptExists: (...args: CommandArgs<typeof ScriptExistsCommand>) => Pipeline<[...TCommands, Command<any, number[]>]>;
361
391
  /**
362
392
  * @see https://redis.io/commands/script-flush
363
393
  */
364
- scriptFlush: (opts?: import("./commands/script_flush.js").ScriptFlushCommandOptions | undefined) => this;
394
+ scriptFlush: (opts?: import("./commands/script_flush.js").ScriptFlushCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, "OK">]>;
365
395
  /**
366
396
  * @see https://redis.io/commands/script-load
367
397
  */
368
- scriptLoad: (script: string) => this;
369
- sdiff: (key: string, ...keys: string[]) => this;
398
+ scriptLoad: (script: string) => Pipeline<[...TCommands, Command<any, string>]>;
399
+ sdiff: (key: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
370
400
  /**
371
401
  * @see https://redis.io/commands/sdiffstore
372
402
  */
373
- sdiffstore: (destination: string, ...keys: string[]) => this;
403
+ sdiffstore: (destination: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, number>]>;
374
404
  /**
375
405
  * @see https://redis.io/commands/set
376
406
  */
377
- set: <TData>(key: string, value: TData, opts?: SetCommandOptions) => this;
407
+ set: <TData>(key: string, value: TData, opts?: SetCommandOptions) => Pipeline<[...TCommands, Command<any, "OK" | TData | null>]>;
378
408
  /**
379
409
  * @see https://redis.io/commands/setbit
380
410
  */
381
- setbit: (key: string, offset: number, value: 0 | 1) => this;
411
+ setbit: (key: string, offset: number, value: 0 | 1) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
382
412
  /**
383
413
  * @see https://redis.io/commands/setex
384
414
  */
385
- setex: <TData>(key: string, ttl: number, value: TData) => this;
415
+ setex: <TData>(key: string, ttl: number, value: TData) => Pipeline<[...TCommands, Command<any, "OK">]>;
386
416
  /**
387
417
  * @see https://redis.io/commands/setnx
388
418
  */
389
- setnx: <TData>(key: string, value: TData) => this;
419
+ setnx: <TData>(key: string, value: TData) => Pipeline<[...TCommands, Command<any, number>]>;
390
420
  /**
391
421
  * @see https://redis.io/commands/setrange
392
422
  */
393
- setrange: (key: string, offset: number, value: string) => this;
423
+ setrange: (key: string, offset: number, value: string) => Pipeline<[...TCommands, Command<any, number>]>;
394
424
  /**
395
425
  * @see https://redis.io/commands/sinter
396
426
  */
397
- sinter: (key: string, ...keys: string[]) => this;
427
+ sinter: (key: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, string[]>]>;
398
428
  /**
399
429
  * @see https://redis.io/commands/sinterstore
400
430
  */
401
- sinterstore: (destination: string, key: string, ...keys: string[]) => this;
431
+ sinterstore: (destination: string, key: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, number>]>;
402
432
  /**
403
433
  * @see https://redis.io/commands/sismember
404
434
  */
405
- sismember: <TData>(key: string, member: TData) => this;
435
+ sismember: <TData>(key: string, member: TData) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
406
436
  /**
407
437
  * @see https://redis.io/commands/smembers
408
438
  */
409
- smembers: (key: string) => this;
439
+ smembers: <TData extends unknown[] = string[]>(key: string) => Pipeline<[...TCommands, Command<any, TData>]>;
440
+ /**
441
+ * @see https://redis.io/commands/smismember
442
+ */
443
+ smismember: <TMembers extends unknown[]>(key: string, members: TMembers) => Pipeline<[...TCommands, Command<any, (0 | 1)[]>]>;
410
444
  /**
411
445
  * @see https://redis.io/commands/smove
412
446
  */
413
- smove: <TData>(source: string, destination: string, member: TData) => this;
447
+ smove: <TData>(source: string, destination: string, member: TData) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
414
448
  /**
415
449
  * @see https://redis.io/commands/spop
416
450
  */
417
- spop: <TData>(key: string, count?: number | undefined) => this;
451
+ spop: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
418
452
  /**
419
453
  * @see https://redis.io/commands/srandmember
420
454
  */
421
- srandmember: <TData>(key: string, count?: number | undefined) => this;
455
+ srandmember: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
422
456
  /**
423
457
  * @see https://redis.io/commands/srem
424
458
  */
425
- srem: <TData>(key: string, ...members: TData[]) => this;
459
+ srem: <TData>(key: string, ...members: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
426
460
  /**
427
461
  * @see https://redis.io/commands/sscan
428
462
  */
429
- sscan: (key: string, cursor: number, opts?: import("./commands/scan.js").ScanCommandOptions | undefined) => this;
463
+ sscan: (key: string, cursor: number, opts?: import("./commands/scan.js").ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [number, (string | number)[]]>]>;
430
464
  /**
431
465
  * @see https://redis.io/commands/strlen
432
466
  */
433
- strlen: (key: string) => this;
467
+ strlen: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
434
468
  /**
435
469
  * @see https://redis.io/commands/sunion
436
470
  */
437
- sunion: (key: string, ...keys: string[]) => this;
471
+ sunion: (key: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
438
472
  /**
439
473
  * @see https://redis.io/commands/sunionstore
440
474
  */
441
- sunionstore: (destination: string, key: string, ...keys: string[]) => this;
475
+ sunionstore: (destination: string, key: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, number>]>;
442
476
  /**
443
477
  * @see https://redis.io/commands/time
444
478
  */
445
- time: () => this;
479
+ time: () => Pipeline<[...TCommands, Command<any, [number, number]>]>;
446
480
  /**
447
481
  * @see https://redis.io/commands/touch
448
482
  */
449
- touch: (...args: CommandArgs<typeof TouchCommand>) => this;
483
+ touch: (...args: CommandArgs<typeof TouchCommand>) => Pipeline<[...TCommands, Command<any, number>]>;
450
484
  /**
451
485
  * @see https://redis.io/commands/ttl
452
486
  */
453
- ttl: (key: string) => this;
487
+ ttl: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
454
488
  /**
455
489
  * @see https://redis.io/commands/type
456
490
  */
457
- type: (key: string) => this;
491
+ type: (key: string) => Pipeline<[...TCommands, Command<any, import("./commands/type.js").Type>]>;
458
492
  /**
459
493
  * @see https://redis.io/commands/unlink
460
494
  */
461
- unlink: (...args: CommandArgs<typeof UnlinkCommand>) => this;
495
+ unlink: (...args: CommandArgs<typeof UnlinkCommand>) => Pipeline<[...TCommands, Command<any, number>]>;
462
496
  /**
463
497
  * @see https://redis.io/commands/zadd
464
498
  */
465
- zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [string, ZAddCommandOptions | ZAddCommandOptionsWithIncr, ScoreMember<TData>, ...ScoreMember<TData>[]]) => this;
499
+ zadd: <TData>(...args: [key: string, scoreMember: ScoreMember<TData>, ...scoreMemberPairs: ScoreMember<TData>[]] | [string, ZAddCommandOptions | ZAddCommandOptionsWithIncr, ScoreMember<TData>, ...ScoreMember<TData>[]]) => Pipeline<[...TCommands, Command<any, number | null>]>;
466
500
  /**
467
501
  * @see https://redis.io/commands/zcard
468
502
  */
469
- zcard: (key: string) => this;
503
+ zcard: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
470
504
  /**
471
505
  * @see https://redis.io/commands/zcount
472
506
  */
473
- zcount: (key: string, min: string | number, max: string | number) => this;
507
+ zcount: (key: string, min: string | number, max: string | number) => Pipeline<[...TCommands, Command<any, number>]>;
474
508
  /**
475
509
  * @see https://redis.io/commands/zincrby
476
510
  */
477
- zincrby: <TData>(key: string, increment: number, member: TData) => this;
511
+ zincrby: <TData>(key: string, increment: number, member: TData) => Pipeline<[...TCommands, Command<any, number>]>;
478
512
  /**
479
513
  * @see https://redis.io/commands/zinterstore
480
514
  */
481
- zinterstore: (destination: string, numKeys: number, keys: string[], opts?: import("./commands/zinterstore.js").ZInterStoreCommandOptions | undefined) => this;
515
+ zinterstore: (destination: string, numKeys: number, keys: string[], opts?: import("./commands/zinterstore.js").ZInterStoreCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
482
516
  /**
483
517
  * @see https://redis.io/commands/zlexcount
484
518
  */
485
- zlexcount: (key: string, min: string, max: string) => this;
519
+ zlexcount: (key: string, min: string, max: string) => Pipeline<[...TCommands, Command<any, number>]>;
486
520
  /**
487
521
  * @see https://redis.io/commands/zmscore
488
522
  */
489
- zmscore: (key: string, members: unknown[]) => this;
523
+ zmscore: (key: string, members: unknown[]) => Pipeline<[...TCommands, Command<any, number[] | null>]>;
490
524
  /**
491
525
  * @see https://redis.io/commands/zpopmax
492
526
  */
493
- zpopmax: <TData>(key: string, count?: number | undefined) => this;
527
+ zpopmax: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData[]>]>;
494
528
  /**
495
529
  * @see https://redis.io/commands/zpopmin
496
530
  */
497
- zpopmin: <TData>(key: string, count?: number | undefined) => this;
531
+ zpopmin: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData[]>]>;
498
532
  /**
499
533
  * @see https://redis.io/commands/zrange
500
534
  */
@@ -512,41 +546,141 @@ export declare class Pipeline {
512
546
  opts: {
513
547
  byScore: true;
514
548
  } & ZRangeCommandOptions
515
- ]) => this;
549
+ ]) => Pipeline<[...TCommands, Command<any, TData>]>;
516
550
  /**
517
551
  * @see https://redis.io/commands/zrank
518
552
  */
519
- zrank: <TData>(key: string, member: TData) => this;
553
+ zrank: <TData>(key: string, member: TData) => Pipeline<[...TCommands, Command<any, number | null>]>;
520
554
  /**
521
555
  * @see https://redis.io/commands/zrem
522
556
  */
523
- zrem: <TData>(key: string, ...members: TData[]) => this;
557
+ zrem: <TData>(key: string, ...members: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
524
558
  /**
525
559
  * @see https://redis.io/commands/zremrangebylex
526
560
  */
527
- zremrangebylex: (key: string, min: string, max: string) => this;
561
+ zremrangebylex: (key: string, min: string, max: string) => Pipeline<[...TCommands, Command<any, number>]>;
528
562
  /**
529
563
  * @see https://redis.io/commands/zremrangebyrank
530
564
  */
531
- zremrangebyrank: (key: string, start: number, stop: number) => this;
565
+ zremrangebyrank: (key: string, start: number, stop: number) => Pipeline<[...TCommands, Command<any, number>]>;
532
566
  /**
533
567
  * @see https://redis.io/commands/zremrangebyscore
534
568
  */
535
- zremrangebyscore: (key: string, min: number, max: number) => this;
569
+ zremrangebyscore: (key: string, min: number, max: number) => Pipeline<[...TCommands, Command<any, number>]>;
536
570
  /**
537
571
  * @see https://redis.io/commands/zrevrank
538
572
  */
539
- zrevrank: <TData>(key: string, member: TData) => this;
573
+ zrevrank: <TData>(key: string, member: TData) => Pipeline<[...TCommands, Command<any, number | null>]>;
540
574
  /**
541
575
  * @see https://redis.io/commands/zscan
542
576
  */
543
- zscan: (key: string, cursor: number, opts?: import("./commands/scan.js").ScanCommandOptions | undefined) => this;
577
+ zscan: (key: string, cursor: number, opts?: import("./commands/scan.js").ScanCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, [number, (string | number)[]]>]>;
544
578
  /**
545
579
  * @see https://redis.io/commands/zscore
546
580
  */
547
- zscore: <TData>(key: string, member: TData) => this;
581
+ zscore: <TData>(key: string, member: TData) => Pipeline<[...TCommands, Command<any, number | null>]>;
548
582
  /**
549
583
  * @see https://redis.io/commands/zunionstore
550
584
  */
551
- zunionstore: (destination: string, numKeys: number, keys: string[], opts?: import("./commands/zunionstore.js").ZUnionStoreCommandOptions | undefined) => this;
585
+ zunionstore: (destination: string, numKeys: number, keys: string[], opts?: import("./commands/zunionstore.js").ZUnionStoreCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
586
+ /**
587
+ * @see https://redis.io/commands/zunion
588
+ */
589
+ zunion: (numKeys: number, keys: string[], opts?: import("./commands/zunion.js").ZUnionCommandOptions | undefined) => Pipeline<[...TCommands, Command<any, any>]>;
590
+ /**
591
+ * @see https://redis.io/commands/?group=json
592
+ */
593
+ get json(): {
594
+ /**
595
+ * @see https://redis.io/commands/json.arrappend
596
+ */
597
+ arrappend: (key: string, path: string, ...values: unknown[]) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
598
+ /**
599
+ * @see https://redis.io/commands/json.arrindex
600
+ */
601
+ arrindex: (key: string, path: string, value: unknown, start?: number | undefined, stop?: number | undefined) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
602
+ /**
603
+ * @see https://redis.io/commands/json.arrinsert
604
+ */
605
+ arrinsert: (key: string, path: string, index: number, ...values: unknown[]) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
606
+ /**
607
+ * @see https://redis.io/commands/json.arrlen
608
+ */
609
+ arrlen: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
610
+ /**
611
+ * @see https://redis.io/commands/json.arrpop
612
+ */
613
+ arrpop: (key: string, path?: string | undefined, index?: number | undefined) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
614
+ /**
615
+ * @see https://redis.io/commands/json.arrtrim
616
+ */
617
+ arrtrim: (key: string, path?: string | undefined, start?: number | undefined, stop?: number | undefined) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
618
+ /**
619
+ * @see https://redis.io/commands/json.clear
620
+ */
621
+ clear: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
622
+ /**
623
+ * @see https://redis.io/commands/json.del
624
+ */
625
+ del: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
626
+ /**
627
+ * @see https://redis.io/commands/json.forget
628
+ */
629
+ forget: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, number>]>;
630
+ /**
631
+ * @see https://redis.io/commands/json.get
632
+ */
633
+ get: (...args: CommandArgs<typeof JsonGetCommand>) => Pipeline<[...TCommands, Command<any, any>]>;
634
+ /**
635
+ * @see https://redis.io/commands/json.mget
636
+ */
637
+ mget: (keys: string[], path: string) => Pipeline<[...TCommands, Command<any, any>]>;
638
+ /**
639
+ * @see https://redis.io/commands/json.numincrby
640
+ */
641
+ numincrby: (key: string, path: string, value: number) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
642
+ /**
643
+ * @see https://redis.io/commands/json.nummultby
644
+ */
645
+ nummultby: (key: string, path: string, value: number) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
646
+ /**
647
+ * @see https://redis.io/commands/json.objkeys
648
+ */
649
+ objkeys: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, (string[] | null)[]>]>;
650
+ /**
651
+ * @see https://redis.io/commands/json.objlen
652
+ */
653
+ objlen: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
654
+ /**
655
+ * @see https://redis.io/commands/json.resp
656
+ */
657
+ resp: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, any>]>;
658
+ /**
659
+ * @see https://redis.io/commands/json.set
660
+ */
661
+ set: (key: string, path: string, value: string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown>)[], opts?: {
662
+ nx: true;
663
+ xx?: undefined;
664
+ } | {
665
+ nx?: undefined;
666
+ xx: true;
667
+ } | undefined) => Pipeline<[...TCommands, Command<any, "OK" | null>]>;
668
+ /**
669
+ * @see https://redis.io/commands/json.strappend
670
+ */
671
+ strappend: (key: string, path: string, value: string) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
672
+ /**
673
+ * @see https://redis.io/commands/json.strlen
674
+ */
675
+ strlen: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, (number | null)[]>]>;
676
+ /**
677
+ * @see https://redis.io/commands/json.toggle
678
+ */
679
+ toggle: (key: string, path: string) => Pipeline<[...TCommands, Command<any, number[]>]>;
680
+ /**
681
+ * @see https://redis.io/commands/json.type
682
+ */
683
+ type: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, string[]>]>;
684
+ };
552
685
  }
686
+ export {};