@upstash/redis 0.0.0-ci.efe72030 → 0.0.0-ci.f0c37f55-20231010

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 (154) hide show
  1. package/README.md +20 -18
  2. package/esm/deps/deno.land/x/base64@v0.2.1/base.js +100 -0
  3. package/esm/deps/deno.land/x/base64@v0.2.1/base64url.js +9 -0
  4. package/esm/deps/deno.land/x/sha1@v1.0.3/deps.js +1 -0
  5. package/esm/deps/deno.land/x/sha1@v1.0.3/mod.js +191 -0
  6. package/esm/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.js +50 -0
  7. package/esm/pkg/commands/command.js +12 -3
  8. package/esm/pkg/commands/getdel.js +9 -0
  9. package/esm/pkg/commands/hgetall.js +0 -4
  10. package/esm/pkg/commands/hrandfield.js +39 -0
  11. package/esm/pkg/commands/json_arrappend.js +9 -0
  12. package/esm/pkg/commands/json_arrindex.js +9 -0
  13. package/esm/pkg/commands/json_arrinsert.js +9 -0
  14. package/esm/pkg/commands/json_arrlen.js +9 -0
  15. package/esm/pkg/commands/json_arrpop.js +9 -0
  16. package/esm/pkg/commands/json_arrtrim.js +12 -0
  17. package/esm/pkg/commands/json_clear.js +9 -0
  18. package/esm/pkg/commands/json_del.js +9 -0
  19. package/esm/pkg/commands/json_forget.js +9 -0
  20. package/esm/pkg/commands/json_get.js +30 -0
  21. package/esm/pkg/commands/json_mget.js +9 -0
  22. package/esm/pkg/commands/json_numincrby.js +9 -0
  23. package/esm/pkg/commands/json_nummultby.js +9 -0
  24. package/esm/pkg/commands/json_objkeys.js +9 -0
  25. package/esm/pkg/commands/json_objlen.js +9 -0
  26. package/esm/pkg/commands/json_resp.js +9 -0
  27. package/esm/pkg/commands/json_set.js +18 -0
  28. package/esm/pkg/commands/json_strappend.js +9 -0
  29. package/esm/pkg/commands/json_strlen.js +9 -0
  30. package/esm/pkg/commands/json_toggle.js +9 -0
  31. package/esm/pkg/commands/json_type.js +9 -0
  32. package/esm/pkg/commands/lmove.js +9 -0
  33. package/esm/pkg/commands/mod.js +27 -0
  34. package/esm/pkg/commands/scan.js +3 -0
  35. package/esm/pkg/commands/set.js +16 -4
  36. package/esm/pkg/commands/smismember.js +9 -0
  37. package/esm/pkg/commands/xadd.js +26 -0
  38. package/esm/pkg/commands/xrange.js +36 -0
  39. package/esm/pkg/commands/zdiffstore.js +9 -0
  40. package/esm/pkg/commands/zmscore.js +10 -0
  41. package/esm/pkg/http.js +100 -3
  42. package/esm/pkg/pipeline.js +170 -12
  43. package/esm/pkg/redis.js +220 -2
  44. package/esm/pkg/script.js +77 -0
  45. package/esm/platforms/cloudflare.js +10 -2
  46. package/esm/platforms/fastly.js +6 -0
  47. package/esm/platforms/node_with_fetch.js +26 -1
  48. package/esm/platforms/nodejs.js +24 -1
  49. package/esm/version.js +1 -0
  50. package/package.json +53 -58
  51. package/script/deps/deno.land/x/base64@v0.2.1/base.js +104 -0
  52. package/script/deps/deno.land/x/base64@v0.2.1/base64url.js +13 -0
  53. package/script/deps/deno.land/x/sha1@v1.0.3/deps.js +6 -0
  54. package/script/deps/deno.land/x/sha1@v1.0.3/mod.js +196 -0
  55. package/script/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.js +55 -0
  56. package/script/pkg/commands/command.js +12 -3
  57. package/script/pkg/commands/getdel.js +13 -0
  58. package/script/pkg/commands/hgetall.js +0 -4
  59. package/script/pkg/commands/hrandfield.js +43 -0
  60. package/script/pkg/commands/json_arrappend.js +13 -0
  61. package/script/pkg/commands/json_arrindex.js +13 -0
  62. package/script/pkg/commands/json_arrinsert.js +13 -0
  63. package/script/pkg/commands/json_arrlen.js +13 -0
  64. package/script/pkg/commands/json_arrpop.js +13 -0
  65. package/script/pkg/commands/json_arrtrim.js +16 -0
  66. package/script/pkg/commands/json_clear.js +13 -0
  67. package/script/pkg/commands/json_del.js +13 -0
  68. package/script/pkg/commands/json_forget.js +13 -0
  69. package/script/pkg/commands/json_get.js +34 -0
  70. package/script/pkg/commands/json_mget.js +13 -0
  71. package/script/pkg/commands/json_numincrby.js +13 -0
  72. package/script/pkg/commands/json_nummultby.js +13 -0
  73. package/script/pkg/commands/json_objkeys.js +13 -0
  74. package/script/pkg/commands/json_objlen.js +13 -0
  75. package/script/pkg/commands/json_resp.js +13 -0
  76. package/script/pkg/commands/json_set.js +22 -0
  77. package/script/pkg/commands/json_strappend.js +13 -0
  78. package/script/pkg/commands/json_strlen.js +13 -0
  79. package/script/pkg/commands/json_toggle.js +13 -0
  80. package/script/pkg/commands/json_type.js +13 -0
  81. package/script/pkg/commands/lmove.js +13 -0
  82. package/script/pkg/commands/mod.js +27 -0
  83. package/script/pkg/commands/scan.js +3 -0
  84. package/script/pkg/commands/set.js +16 -4
  85. package/script/pkg/commands/smismember.js +13 -0
  86. package/script/pkg/commands/xadd.js +30 -0
  87. package/script/pkg/commands/xrange.js +40 -0
  88. package/script/pkg/commands/zdiffstore.js +13 -0
  89. package/script/pkg/commands/zmscore.js +14 -0
  90. package/script/pkg/http.js +100 -3
  91. package/script/pkg/pipeline.js +169 -11
  92. package/script/pkg/redis.js +219 -1
  93. package/script/pkg/script.js +81 -0
  94. package/script/platforms/cloudflare.js +10 -2
  95. package/script/platforms/fastly.js +6 -0
  96. package/script/platforms/node_with_fetch.js +26 -1
  97. package/script/platforms/nodejs.js +24 -1
  98. package/script/version.js +4 -0
  99. package/types/deps/deno.land/x/base64@v0.2.1/base.d.ts +5 -0
  100. package/types/deps/deno.land/x/base64@v0.2.1/base64url.d.ts +1 -0
  101. package/types/deps/deno.land/x/sha1@v1.0.3/deps.d.ts +1 -0
  102. package/types/deps/deno.land/x/sha1@v1.0.3/mod.d.ts +26 -0
  103. package/types/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.d.ts +3 -0
  104. package/types/pkg/commands/command.d.ts +5 -5
  105. package/types/pkg/commands/getdel.d.ts +7 -0
  106. package/types/pkg/commands/hdel.d.ts +1 -1
  107. package/types/pkg/commands/hrandfield.d.ts +9 -0
  108. package/types/pkg/commands/json_arrappend.d.ts +7 -0
  109. package/types/pkg/commands/json_arrindex.d.ts +13 -0
  110. package/types/pkg/commands/json_arrinsert.d.ts +7 -0
  111. package/types/pkg/commands/json_arrlen.d.ts +7 -0
  112. package/types/pkg/commands/json_arrpop.d.ts +7 -0
  113. package/types/pkg/commands/json_arrtrim.d.ts +7 -0
  114. package/types/pkg/commands/json_clear.d.ts +7 -0
  115. package/types/pkg/commands/json_del.d.ts +7 -0
  116. package/types/pkg/commands/json_forget.d.ts +7 -0
  117. package/types/pkg/commands/json_get.d.ts +15 -0
  118. package/types/pkg/commands/json_mget.d.ts +7 -0
  119. package/types/pkg/commands/json_numincrby.d.ts +7 -0
  120. package/types/pkg/commands/json_nummultby.d.ts +7 -0
  121. package/types/pkg/commands/json_objkeys.d.ts +7 -0
  122. package/types/pkg/commands/json_objlen.d.ts +7 -0
  123. package/types/pkg/commands/json_resp.d.ts +7 -0
  124. package/types/pkg/commands/json_set.d.ts +18 -0
  125. package/types/pkg/commands/json_strappend.d.ts +7 -0
  126. package/types/pkg/commands/json_strlen.d.ts +7 -0
  127. package/types/pkg/commands/json_toggle.d.ts +7 -0
  128. package/types/pkg/commands/json_type.d.ts +7 -0
  129. package/types/pkg/commands/lmove.d.ts +12 -0
  130. package/types/pkg/commands/mod.d.ts +27 -0
  131. package/types/pkg/commands/scan.d.ts +2 -1
  132. package/types/pkg/commands/script_flush.d.ts +1 -1
  133. package/types/pkg/commands/set.d.ts +31 -2
  134. package/types/pkg/commands/smembers.d.ts +2 -2
  135. package/types/pkg/commands/smismember.d.ts +7 -0
  136. package/types/pkg/commands/type.d.ts +1 -1
  137. package/types/pkg/commands/xadd.d.ts +31 -0
  138. package/types/pkg/commands/xrange.d.ts +9 -0
  139. package/types/pkg/commands/zadd.d.ts +3 -3
  140. package/types/pkg/commands/zdiffstore.d.ts +7 -0
  141. package/types/pkg/commands/zinterstore.d.ts +1 -1
  142. package/types/pkg/commands/zmscore.d.ts +7 -0
  143. package/types/pkg/commands/zrange.d.ts +1 -1
  144. package/types/pkg/commands/zunionstore.d.ts +1 -1
  145. package/types/pkg/http.d.ts +48 -7
  146. package/types/pkg/pipeline.d.ts +255 -125
  147. package/types/pkg/redis.d.ts +169 -13
  148. package/types/pkg/script.d.ts +42 -0
  149. package/types/pkg/types.d.ts +27 -1
  150. package/types/platforms/cloudflare.d.ts +9 -8
  151. package/types/platforms/fastly.d.ts +3 -7
  152. package/types/platforms/node_with_fetch.d.ts +3 -22
  153. package/types/platforms/nodejs.d.ts +4 -7
  154. 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,231 @@ 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
+ * Pushes a command into the pipeline and returns a chainable instance of the
61
71
  * pipeline
62
72
  */
63
73
  private chain;
64
74
  /**
65
75
  * @see https://redis.io/commands/append
66
76
  */
67
- append: (key: string, value: string) => this;
77
+ append: (key: string, value: string) => Pipeline<[...TCommands, Command<any, number>]>;
68
78
  /**
69
79
  * @see https://redis.io/commands/bitcount
70
80
  */
71
- bitcount: (key: string, start: number, end: number) => this;
81
+ bitcount: (key: string, start: number, end: number) => Pipeline<[...TCommands, Command<any, number>]>;
72
82
  /**
73
83
  * @see https://redis.io/commands/bitop
74
84
  */
75
85
  bitop: {
76
- (op: "and" | "or" | "xor", destinationKey: string, sourceKey: string, ...sourceKeys: string[]): Pipeline;
77
- (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]>;
78
88
  };
79
89
  /**
80
90
  * @see https://redis.io/commands/bitpos
81
91
  */
82
- 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>]>;
93
+ /**
94
+ * @see https://redis.io/commands/zdiffstore
95
+ */
96
+ zdiffstore: (destination: string, numkeys: number, ...keys: string[]) => Pipeline<[...TCommands, Command<any, number>]>;
83
97
  /**
84
98
  * @see https://redis.io/commands/dbsize
85
99
  */
86
- dbsize: () => this;
100
+ dbsize: () => Pipeline<[...TCommands, Command<any, number>]>;
87
101
  /**
88
102
  * @see https://redis.io/commands/decr
89
103
  */
90
- decr: (key: string) => this;
104
+ decr: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
91
105
  /**
92
106
  * @see https://redis.io/commands/decrby
93
107
  */
94
- decrby: (key: string, decrement: number) => this;
108
+ decrby: (key: string, decrement: number) => Pipeline<[...TCommands, Command<any, number>]>;
95
109
  /**
96
110
  * @see https://redis.io/commands/del
97
111
  */
98
- del: (...args: CommandArgs<typeof DelCommand>) => this;
112
+ del: (...args: CommandArgs<typeof DelCommand>) => Pipeline<[...TCommands, Command<any, number>]>;
99
113
  /**
100
114
  * @see https://redis.io/commands/echo
101
115
  */
102
- echo: (message: string) => this;
116
+ echo: (message: string) => Pipeline<[...TCommands, Command<any, string>]>;
103
117
  /**
104
118
  * @see https://redis.io/commands/eval
105
119
  */
106
- 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>]>;
107
121
  /**
108
122
  * @see https://redis.io/commands/evalsha
109
123
  */
110
- 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>]>;
111
125
  /**
112
126
  * @see https://redis.io/commands/exists
113
127
  */
114
- exists: (...args: CommandArgs<typeof ExistsCommand>) => this;
128
+ exists: (...args: CommandArgs<typeof ExistsCommand>) => Pipeline<[...TCommands, Command<any, number>]>;
115
129
  /**
116
130
  * @see https://redis.io/commands/expire
117
131
  */
118
- expire: (key: string, seconds: number) => this;
132
+ expire: (key: string, seconds: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
119
133
  /**
120
134
  * @see https://redis.io/commands/expireat
121
135
  */
122
- expireat: (key: string, unix: number) => this;
136
+ expireat: (key: string, unix: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
123
137
  /**
124
138
  * @see https://redis.io/commands/flushall
125
139
  */
126
- flushall: (args?: CommandArgs<typeof FlushAllCommand>) => this;
140
+ flushall: (args?: CommandArgs<typeof FlushAllCommand>) => Pipeline<[...TCommands, Command<any, "OK">]>;
127
141
  /**
128
142
  * @see https://redis.io/commands/flushdb
129
143
  */
130
144
  flushdb: (opts?: {
131
145
  async?: boolean | undefined;
132
- } | undefined) => this;
146
+ } | undefined) => Pipeline<[...TCommands, Command<any, "OK">]>;
133
147
  /**
134
148
  * @see https://redis.io/commands/get
135
149
  */
136
- get: <TData>(key: string) => this;
150
+ get: <TData>(key: string) => Pipeline<[...TCommands, Command<any, TData | null>]>;
137
151
  /**
138
152
  * @see https://redis.io/commands/getbit
139
153
  */
140
- getbit: (key: string, offset: number) => this;
154
+ getbit: (key: string, offset: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
155
+ /**
156
+ * @see https://redis.io/commands/getdel
157
+ */
158
+ getdel: <TData>(key: string) => Pipeline<[...TCommands, Command<any, TData | null>]>;
141
159
  /**
142
160
  * @see https://redis.io/commands/getrange
143
161
  */
144
- getrange: (key: string, start: number, end: number) => this;
162
+ getrange: (key: string, start: number, end: number) => Pipeline<[...TCommands, Command<any, string>]>;
145
163
  /**
146
164
  * @see https://redis.io/commands/getset
147
165
  */
148
- getset: <TData>(key: string, value: TData) => this;
166
+ getset: <TData>(key: string, value: TData) => Pipeline<[...TCommands, Command<any, TData | null>]>;
149
167
  /**
150
168
  * @see https://redis.io/commands/hdel
151
169
  */
152
- hdel: (key: string, field: string) => this;
170
+ hdel: (key: string, ...fields: string[]) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
153
171
  /**
154
172
  * @see https://redis.io/commands/hexists
155
173
  */
156
- hexists: (key: string, field: string) => this;
174
+ hexists: (key: string, field: string) => Pipeline<[...TCommands, Command<any, number>]>;
157
175
  /**
158
176
  * @see https://redis.io/commands/hget
159
177
  */
160
- hget: <TData>(key: string, field: string) => this;
178
+ hget: <TData>(key: string, field: string) => Pipeline<[...TCommands, Command<any, TData | null>]>;
161
179
  /**
162
180
  * @see https://redis.io/commands/hgetall
163
181
  */
164
- hgetall: <TData extends Record<string, unknown>>(key: string) => this;
182
+ hgetall: <TData extends Record<string, unknown>>(key: string) => Pipeline<[...TCommands, Command<any, TData | null>]>;
165
183
  /**
166
184
  * @see https://redis.io/commands/hincrby
167
185
  */
168
- hincrby: (key: string, field: string, increment: number) => this;
186
+ hincrby: (key: string, field: string, increment: number) => Pipeline<[...TCommands, Command<any, number>]>;
169
187
  /**
170
188
  * @see https://redis.io/commands/hincrbyfloat
171
189
  */
172
- hincrbyfloat: (key: string, field: string, increment: number) => this;
190
+ hincrbyfloat: (key: string, field: string, increment: number) => Pipeline<[...TCommands, Command<any, number>]>;
173
191
  /**
174
192
  * @see https://redis.io/commands/hkeys
175
193
  */
176
- hkeys: (key: string) => this;
194
+ hkeys: (key: string) => Pipeline<[...TCommands, Command<any, string[]>]>;
177
195
  /**
178
196
  * @see https://redis.io/commands/hlen
179
197
  */
180
- hlen: (key: string) => this;
198
+ hlen: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
181
199
  /**
182
200
  * @see https://redis.io/commands/hmget
183
201
  */
184
- 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>]>;
185
203
  /**
186
204
  * @see https://redis.io/commands/hmset
187
205
  */
188
206
  hmset: <TData>(key: string, kv: {
189
207
  [field: string]: TData;
190
- }) => this;
208
+ }) => Pipeline<[...TCommands, Command<any, "OK">]>;
209
+ /**
210
+ * @see https://redis.io/commands/hrandfield
211
+ */
212
+ hrandfield: <TData extends string | string[] | Record<string, unknown>>(key: string, count?: number, withValues?: boolean) => Pipeline<[...TCommands, Command<any, TData>]>;
191
213
  /**
192
214
  * @see https://redis.io/commands/hscan
193
215
  */
194
- 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)[]]>]>;
195
217
  /**
196
218
  * @see https://redis.io/commands/hset
197
219
  */
198
220
  hset: <TData>(key: string, kv: {
199
221
  [field: string]: TData;
200
- }) => this;
222
+ }) => Pipeline<[...TCommands, Command<any, number>]>;
201
223
  /**
202
224
  * @see https://redis.io/commands/hsetnx
203
225
  */
204
- hsetnx: <TData>(key: string, field: string, value: TData) => this;
226
+ hsetnx: <TData>(key: string, field: string, value: TData) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
205
227
  /**
206
228
  * @see https://redis.io/commands/hstrlen
207
229
  */
208
- hstrlen: (key: string, field: string) => this;
230
+ hstrlen: (key: string, field: string) => Pipeline<[...TCommands, Command<any, number>]>;
209
231
  /**
210
232
  * @see https://redis.io/commands/hvals
211
233
  */
212
- hvals: (key: string) => this;
234
+ hvals: (key: string) => Pipeline<[...TCommands, Command<any, any>]>;
213
235
  /**
214
236
  * @see https://redis.io/commands/incr
215
237
  */
216
- incr: (key: string) => this;
238
+ incr: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
217
239
  /**
218
240
  * @see https://redis.io/commands/incrby
219
241
  */
220
- incrby: (key: string, value: number) => this;
242
+ incrby: (key: string, value: number) => Pipeline<[...TCommands, Command<any, number>]>;
221
243
  /**
222
244
  * @see https://redis.io/commands/incrbyfloat
223
245
  */
224
- incrbyfloat: (key: string, value: number) => this;
246
+ incrbyfloat: (key: string, value: number) => Pipeline<[...TCommands, Command<any, number>]>;
225
247
  /**
226
248
  * @see https://redis.io/commands/keys
227
249
  */
228
- keys: (pattern: string) => this;
250
+ keys: (pattern: string) => Pipeline<[...TCommands, Command<any, string[]>]>;
229
251
  /**
230
252
  * @see https://redis.io/commands/lindex
231
253
  */
232
- lindex: (key: string, index: number) => this;
254
+ lindex: (key: string, index: number) => Pipeline<[...TCommands, Command<any, any>]>;
233
255
  /**
234
256
  * @see https://redis.io/commands/linsert
235
257
  */
236
- 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>]>;
237
259
  /**
238
260
  * @see https://redis.io/commands/llen
239
261
  */
240
- llen: (key: string) => this;
262
+ llen: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
263
+ /**
264
+ * @see https://redis.io/commands/lmove
265
+ */
266
+ lmove: <TData = string>(source: string, destination: string, whereFrom: "left" | "right", whereTo: "left" | "right") => Pipeline<[...TCommands, Command<any, TData>]>;
241
267
  /**
242
268
  * @see https://redis.io/commands/lpop
243
269
  */
244
- lpop: <TData>(key: string, count?: number | undefined) => this;
270
+ lpop: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
245
271
  /**
246
272
  * @see https://redis.io/commands/lpos
247
273
  */
@@ -249,248 +275,256 @@ export declare class Pipeline {
249
275
  rank?: number | undefined;
250
276
  count?: number | undefined;
251
277
  maxLen?: number | undefined;
252
- } | undefined) => this;
278
+ } | undefined) => Pipeline<[...TCommands, Command<any, TData>]>;
253
279
  /**
254
280
  * @see https://redis.io/commands/lpush
255
281
  */
256
- lpush: <TData>(key: string, ...elements: TData[]) => this;
282
+ lpush: <TData>(key: string, ...elements: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
257
283
  /**
258
284
  * @see https://redis.io/commands/lpushx
259
285
  */
260
- lpushx: <TData>(key: string, ...elements: TData[]) => this;
286
+ lpushx: <TData>(key: string, ...elements: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
261
287
  /**
262
288
  * @see https://redis.io/commands/lrange
263
289
  */
264
- 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[]>]>;
265
291
  /**
266
292
  * @see https://redis.io/commands/lrem
267
293
  */
268
- lrem: <TData>(key: string, count: number, value: TData) => this;
294
+ lrem: <TData>(key: string, count: number, value: TData) => Pipeline<[...TCommands, Command<any, number>]>;
269
295
  /**
270
296
  * @see https://redis.io/commands/lset
271
297
  */
272
- lset: <TData>(key: string, index: number, value: TData) => this;
298
+ lset: <TData>(key: string, index: number, value: TData) => Pipeline<[...TCommands, Command<any, "OK">]>;
273
299
  /**
274
300
  * @see https://redis.io/commands/ltrim
275
301
  */
276
- ltrim: (key: string, start: number, end: number) => this;
302
+ ltrim: (key: string, start: number, end: number) => Pipeline<[...TCommands, Command<any, "OK">]>;
277
303
  /**
278
304
  * @see https://redis.io/commands/mget
279
305
  */
280
- mget: <TData extends unknown[]>(...args: CommandArgs<typeof MGetCommand>) => this;
306
+ mget: <TData extends unknown[]>(...args: CommandArgs<typeof MGetCommand>) => Pipeline<[...TCommands, Command<any, TData>]>;
281
307
  /**
282
308
  * @see https://redis.io/commands/mset
283
309
  */
284
310
  mset: <TData>(kv: {
285
311
  [key: string]: TData;
286
- }) => this;
312
+ }) => Pipeline<[...TCommands, Command<any, "OK">]>;
287
313
  /**
288
314
  * @see https://redis.io/commands/msetnx
289
315
  */
290
316
  msetnx: <TData>(kv: {
291
317
  [key: string]: TData;
292
- }) => this;
318
+ }) => Pipeline<[...TCommands, Command<any, number>]>;
293
319
  /**
294
320
  * @see https://redis.io/commands/persist
295
321
  */
296
- persist: (key: string) => this;
322
+ persist: (key: string) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
297
323
  /**
298
324
  * @see https://redis.io/commands/pexpire
299
325
  */
300
- pexpire: (key: string, milliseconds: number) => this;
326
+ pexpire: (key: string, milliseconds: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
301
327
  /**
302
328
  * @see https://redis.io/commands/pexpireat
303
329
  */
304
- pexpireat: (key: string, unix: number) => this;
330
+ pexpireat: (key: string, unix: number) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
305
331
  /**
306
332
  * @see https://redis.io/commands/ping
307
333
  */
308
- ping: (args?: CommandArgs<typeof PingCommand>) => this;
334
+ ping: (args?: CommandArgs<typeof PingCommand>) => Pipeline<[...TCommands, Command<any, string>]>;
309
335
  /**
310
336
  * @see https://redis.io/commands/psetex
311
337
  */
312
- psetex: <TData>(key: string, ttl: number, value: TData) => this;
338
+ psetex: <TData>(key: string, ttl: number, value: TData) => Pipeline<[...TCommands, Command<any, string>]>;
313
339
  /**
314
340
  * @see https://redis.io/commands/pttl
315
341
  */
316
- pttl: (key: string) => this;
342
+ pttl: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
317
343
  /**
318
344
  * @see https://redis.io/commands/publish
319
345
  */
320
- publish: (channel: string, message: unknown) => this;
346
+ publish: (channel: string, message: unknown) => Pipeline<[...TCommands, Command<any, number>]>;
321
347
  /**
322
348
  * @see https://redis.io/commands/randomkey
323
349
  */
324
- randomkey: () => this;
350
+ randomkey: () => Pipeline<[...TCommands, Command<any, string | null>]>;
325
351
  /**
326
352
  * @see https://redis.io/commands/rename
327
353
  */
328
- rename: (source: string, destination: string) => this;
354
+ rename: (source: string, destination: string) => Pipeline<[...TCommands, Command<any, "OK">]>;
329
355
  /**
330
356
  * @see https://redis.io/commands/renamenx
331
357
  */
332
- renamenx: (source: string, destination: string) => this;
358
+ renamenx: (source: string, destination: string) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
333
359
  /**
334
360
  * @see https://redis.io/commands/rpop
335
361
  */
336
- rpop: <TData = string>(key: string, count?: number | undefined) => this;
362
+ rpop: <TData = string>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
337
363
  /**
338
364
  * @see https://redis.io/commands/rpush
339
365
  */
340
- rpush: <TData>(key: string, ...elements: TData[]) => this;
366
+ rpush: <TData>(key: string, ...elements: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
341
367
  /**
342
368
  * @see https://redis.io/commands/rpushx
343
369
  */
344
- rpushx: <TData>(key: string, ...elements: TData[]) => this;
370
+ rpushx: <TData>(key: string, ...elements: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
345
371
  /**
346
372
  * @see https://redis.io/commands/sadd
347
373
  */
348
- sadd: <TData>(key: string, ...members: TData[]) => this;
374
+ sadd: <TData>(key: string, ...members: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
349
375
  /**
350
376
  * @see https://redis.io/commands/scan
351
377
  */
352
- 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[]]>]>;
353
379
  /**
354
380
  * @see https://redis.io/commands/scard
355
381
  */
356
- scard: (key: string) => this;
382
+ scard: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
357
383
  /**
358
384
  * @see https://redis.io/commands/script-exists
359
385
  */
360
- scriptExists: (...args: CommandArgs<typeof ScriptExistsCommand>) => this;
386
+ scriptExists: (...args: CommandArgs<typeof ScriptExistsCommand>) => Pipeline<[...TCommands, Command<any, number[]>]>;
361
387
  /**
362
388
  * @see https://redis.io/commands/script-flush
363
389
  */
364
- 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">]>;
365
391
  /**
366
392
  * @see https://redis.io/commands/script-load
367
393
  */
368
- scriptLoad: (script: string) => this;
369
- 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[]>]>;
370
396
  /**
371
397
  * @see https://redis.io/commands/sdiffstore
372
398
  */
373
- sdiffstore: (destination: string, ...keys: string[]) => this;
399
+ sdiffstore: (destination: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, number>]>;
374
400
  /**
375
401
  * @see https://redis.io/commands/set
376
402
  */
377
- set: <TData>(key: string, value: TData, opts?: SetCommandOptions | undefined) => this;
403
+ set: <TData>(key: string, value: TData, opts?: SetCommandOptions) => Pipeline<[...TCommands, Command<any, "OK" | TData | null>]>;
378
404
  /**
379
405
  * @see https://redis.io/commands/setbit
380
406
  */
381
- setbit: (key: string, offset: number, value: 0 | 1) => this;
407
+ setbit: (key: string, offset: number, value: 0 | 1) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
382
408
  /**
383
409
  * @see https://redis.io/commands/setex
384
410
  */
385
- setex: <TData>(key: string, ttl: number, value: TData) => this;
411
+ setex: <TData>(key: string, ttl: number, value: TData) => Pipeline<[...TCommands, Command<any, "OK">]>;
386
412
  /**
387
413
  * @see https://redis.io/commands/setnx
388
414
  */
389
- setnx: <TData>(key: string, value: TData) => this;
415
+ setnx: <TData>(key: string, value: TData) => Pipeline<[...TCommands, Command<any, number>]>;
390
416
  /**
391
417
  * @see https://redis.io/commands/setrange
392
418
  */
393
- setrange: (key: string, offset: number, value: string) => this;
419
+ setrange: (key: string, offset: number, value: string) => Pipeline<[...TCommands, Command<any, number>]>;
394
420
  /**
395
421
  * @see https://redis.io/commands/sinter
396
422
  */
397
- sinter: (key: string, ...keys: string[]) => this;
423
+ sinter: (key: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, string[]>]>;
398
424
  /**
399
425
  * @see https://redis.io/commands/sinterstore
400
426
  */
401
- sinterstore: (destination: string, key: string, ...keys: string[]) => this;
427
+ sinterstore: (destination: string, key: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, number>]>;
402
428
  /**
403
429
  * @see https://redis.io/commands/sismember
404
430
  */
405
- sismember: <TData>(key: string, member: TData) => this;
431
+ sismember: <TData>(key: string, member: TData) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
406
432
  /**
407
433
  * @see https://redis.io/commands/smembers
408
434
  */
409
- smembers: (key: string) => this;
435
+ smembers: <TData extends unknown[] = string[]>(key: string) => Pipeline<[...TCommands, Command<any, TData>]>;
436
+ /**
437
+ * @see https://redis.io/commands/smismember
438
+ */
439
+ smismember: <TMembers extends unknown[]>(key: string, members: TMembers) => Pipeline<[...TCommands, Command<any, (0 | 1)[]>]>;
410
440
  /**
411
441
  * @see https://redis.io/commands/smove
412
442
  */
413
- smove: <TData>(source: string, destination: string, member: TData) => this;
443
+ smove: <TData>(source: string, destination: string, member: TData) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
414
444
  /**
415
445
  * @see https://redis.io/commands/spop
416
446
  */
417
- spop: <TData>(key: string, count?: number | undefined) => this;
447
+ spop: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
418
448
  /**
419
449
  * @see https://redis.io/commands/srandmember
420
450
  */
421
- srandmember: <TData>(key: string, count?: number | undefined) => this;
451
+ srandmember: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
422
452
  /**
423
453
  * @see https://redis.io/commands/srem
424
454
  */
425
- srem: <TData>(key: string, ...members: TData[]) => this;
455
+ srem: <TData>(key: string, ...members: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
426
456
  /**
427
457
  * @see https://redis.io/commands/sscan
428
458
  */
429
- 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)[]]>]>;
430
460
  /**
431
461
  * @see https://redis.io/commands/strlen
432
462
  */
433
- strlen: (key: string) => this;
463
+ strlen: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
434
464
  /**
435
465
  * @see https://redis.io/commands/sunion
436
466
  */
437
- sunion: (key: string, ...keys: string[]) => this;
467
+ sunion: (key: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, unknown[]>]>;
438
468
  /**
439
469
  * @see https://redis.io/commands/sunionstore
440
470
  */
441
- sunionstore: (destination: string, key: string, ...keys: string[]) => this;
471
+ sunionstore: (destination: string, key: string, ...keys: string[]) => Pipeline<[...TCommands, Command<any, number>]>;
442
472
  /**
443
473
  * @see https://redis.io/commands/time
444
474
  */
445
- time: () => this;
475
+ time: () => Pipeline<[...TCommands, Command<any, [number, number]>]>;
446
476
  /**
447
477
  * @see https://redis.io/commands/touch
448
478
  */
449
- touch: (...args: CommandArgs<typeof TouchCommand>) => this;
479
+ touch: (...args: CommandArgs<typeof TouchCommand>) => Pipeline<[...TCommands, Command<any, number>]>;
450
480
  /**
451
481
  * @see https://redis.io/commands/ttl
452
482
  */
453
- ttl: (key: string) => this;
483
+ ttl: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
454
484
  /**
455
485
  * @see https://redis.io/commands/type
456
486
  */
457
- type: (key: string) => this;
487
+ type: (key: string) => Pipeline<[...TCommands, Command<any, import("./commands/type.js").Type>]>;
458
488
  /**
459
489
  * @see https://redis.io/commands/unlink
460
490
  */
461
- unlink: (...args: CommandArgs<typeof UnlinkCommand>) => this;
491
+ unlink: (...args: CommandArgs<typeof UnlinkCommand>) => Pipeline<[...TCommands, Command<any, number>]>;
462
492
  /**
463
493
  * @see https://redis.io/commands/zadd
464
494
  */
465
- 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>]>;
466
496
  /**
467
497
  * @see https://redis.io/commands/zcard
468
498
  */
469
- zcard: (key: string) => this;
499
+ zcard: (key: string) => Pipeline<[...TCommands, Command<any, number>]>;
470
500
  /**
471
501
  * @see https://redis.io/commands/zcount
472
502
  */
473
- 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>]>;
474
504
  /**
475
505
  * @see https://redis.io/commands/zincrby
476
506
  */
477
- zincrby: <TData>(key: string, increment: number, member: TData) => this;
507
+ zincrby: <TData>(key: string, increment: number, member: TData) => Pipeline<[...TCommands, Command<any, number>]>;
478
508
  /**
479
509
  * @see https://redis.io/commands/zinterstore
480
510
  */
481
- 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>]>;
482
512
  /**
483
513
  * @see https://redis.io/commands/zlexcount
484
514
  */
485
- zlexcount: (key: string, min: string, max: string) => this;
515
+ zlexcount: (key: string, min: string, max: string) => Pipeline<[...TCommands, Command<any, number>]>;
516
+ /**
517
+ * @see https://redis.io/commands/zmscore
518
+ */
519
+ zmscore: (key: string, members: unknown[]) => Pipeline<[...TCommands, Command<any, number[] | null>]>;
486
520
  /**
487
521
  * @see https://redis.io/commands/zpopmax
488
522
  */
489
- zpopmax: <TData>(key: string, count?: number | undefined) => this;
523
+ zpopmax: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData[]>]>;
490
524
  /**
491
525
  * @see https://redis.io/commands/zpopmin
492
526
  */
493
- zpopmin: <TData>(key: string, count?: number | undefined) => this;
527
+ zpopmin: <TData>(key: string, count?: number | undefined) => Pipeline<[...TCommands, Command<any, TData[]>]>;
494
528
  /**
495
529
  * @see https://redis.io/commands/zrange
496
530
  */
@@ -508,41 +542,137 @@ export declare class Pipeline {
508
542
  opts: {
509
543
  byScore: true;
510
544
  } & ZRangeCommandOptions
511
- ]) => this;
545
+ ]) => Pipeline<[...TCommands, Command<any, TData>]>;
512
546
  /**
513
547
  * @see https://redis.io/commands/zrank
514
548
  */
515
- zrank: <TData>(key: string, member: TData) => this;
549
+ zrank: <TData>(key: string, member: TData) => Pipeline<[...TCommands, Command<any, number | null>]>;
516
550
  /**
517
551
  * @see https://redis.io/commands/zrem
518
552
  */
519
- zrem: <TData>(key: string, ...members: TData[]) => this;
553
+ zrem: <TData>(key: string, ...members: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
520
554
  /**
521
555
  * @see https://redis.io/commands/zremrangebylex
522
556
  */
523
- zremrangebylex: (key: string, min: string, max: string) => this;
557
+ zremrangebylex: (key: string, min: string, max: string) => Pipeline<[...TCommands, Command<any, number>]>;
524
558
  /**
525
559
  * @see https://redis.io/commands/zremrangebyrank
526
560
  */
527
- zremrangebyrank: (key: string, start: number, stop: number) => this;
561
+ zremrangebyrank: (key: string, start: number, stop: number) => Pipeline<[...TCommands, Command<any, number>]>;
528
562
  /**
529
563
  * @see https://redis.io/commands/zremrangebyscore
530
564
  */
531
- zremrangebyscore: (key: string, min: number, max: number) => this;
565
+ zremrangebyscore: (key: string, min: number, max: number) => Pipeline<[...TCommands, Command<any, number>]>;
532
566
  /**
533
567
  * @see https://redis.io/commands/zrevrank
534
568
  */
535
- zrevrank: <TData>(key: string, member: TData) => this;
569
+ zrevrank: <TData>(key: string, member: TData) => Pipeline<[...TCommands, Command<any, number | null>]>;
536
570
  /**
537
571
  * @see https://redis.io/commands/zscan
538
572
  */
539
- 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)[]]>]>;
540
574
  /**
541
575
  * @see https://redis.io/commands/zscore
542
576
  */
543
- zscore: <TData>(key: string, member: TData) => this;
577
+ zscore: <TData>(key: string, member: TData) => Pipeline<[...TCommands, Command<any, number | null>]>;
544
578
  /**
545
579
  * @see https://redis.io/commands/zunionstore
546
580
  */
547
- 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>]>;
582
+ /**
583
+ * @see https://redis.io/commands/?group=json
584
+ */
585
+ get json(): {
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[]>]>;
676
+ };
548
677
  }
678
+ export {};