@valkey/valkey-glide 1.1.0-rc10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -0
- package/build-ts/index.d.ts +11 -0
- package/build-ts/index.js +184 -0
- package/build-ts/src/BaseClient.d.ts +5126 -0
- package/build-ts/src/Commands.d.ts +1800 -0
- package/build-ts/src/Errors.d.ts +21 -0
- package/build-ts/src/GlideClient.d.ts +737 -0
- package/build-ts/src/GlideClusterClient.d.ts +1057 -0
- package/build-ts/src/Logger.d.ts +31 -0
- package/build-ts/src/ProtobufMessage.d.ts +2 -0
- package/build-ts/src/Transaction.d.ts +2997 -0
- package/package.json +67 -0
|
@@ -0,0 +1,1800 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0
|
|
3
|
+
*/
|
|
4
|
+
import { GlideRecord, GlideString, HashDataType, ObjectType, SortedSetDataType } from "./BaseClient";
|
|
5
|
+
import { command_request } from "./ProtobufMessage";
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare function parseInfoResponse(response: string): Record<string, string>;
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare function createGet(key: GlideString): command_request.Command;
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare function createGetDel(key: GlideString): command_request.Command;
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export declare function createGetRange(key: GlideString, start: number, end: number): command_request.Command;
|
|
22
|
+
export interface SetOptions {
|
|
23
|
+
/**
|
|
24
|
+
* `onlyIfDoesNotExist` - Only set the key if it does not already exist.
|
|
25
|
+
* Equivalent to `NX` in the Valkey API. `onlyIfExists` - Only set the key if
|
|
26
|
+
* it already exist. Equivalent to `EX` in the Valkey API. if `conditional` is
|
|
27
|
+
* not set the value will be set regardless of prior value existence. If value
|
|
28
|
+
* isn't set because of the condition, return null.
|
|
29
|
+
*/
|
|
30
|
+
conditionalSet?: "onlyIfExists" | "onlyIfDoesNotExist";
|
|
31
|
+
/**
|
|
32
|
+
* Return the old string stored at key, or nil if key did not exist. An error
|
|
33
|
+
* is returned and SET aborted if the value stored at key is not a string.
|
|
34
|
+
* Equivalent to `GET` in the Valkey API.
|
|
35
|
+
*/
|
|
36
|
+
returnOldValue?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* If not set, no expiry time will be set for the value.
|
|
39
|
+
*/
|
|
40
|
+
expiry?: "keepExisting" | {
|
|
41
|
+
type: TimeUnit;
|
|
42
|
+
count: number;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
export declare function createSet(key: GlideString, value: GlideString, options?: SetOptions): command_request.Command;
|
|
49
|
+
/**
|
|
50
|
+
* INFO option: a specific section of information:
|
|
51
|
+
* When no parameter is provided, the default option is assumed.
|
|
52
|
+
*/
|
|
53
|
+
export declare enum InfoOptions {
|
|
54
|
+
/**
|
|
55
|
+
* SERVER: General information about the server
|
|
56
|
+
*/
|
|
57
|
+
Server = "server",
|
|
58
|
+
/**
|
|
59
|
+
* CLIENTS: Client connections section
|
|
60
|
+
*/
|
|
61
|
+
Clients = "clients",
|
|
62
|
+
/**
|
|
63
|
+
* MEMORY: Memory consumption related information
|
|
64
|
+
*/
|
|
65
|
+
Memory = "memory",
|
|
66
|
+
/**
|
|
67
|
+
* PERSISTENCE: RDB and AOF related information
|
|
68
|
+
*/
|
|
69
|
+
Persistence = "persistence",
|
|
70
|
+
/**
|
|
71
|
+
* STATS: General statistics
|
|
72
|
+
*/
|
|
73
|
+
Stats = "stats",
|
|
74
|
+
/**
|
|
75
|
+
* REPLICATION: Master/replica replication information
|
|
76
|
+
*/
|
|
77
|
+
Replication = "replication",
|
|
78
|
+
/**
|
|
79
|
+
* CPU: CPU consumption statistics
|
|
80
|
+
*/
|
|
81
|
+
Cpu = "cpu",
|
|
82
|
+
/**
|
|
83
|
+
* COMMANDSTATS: Valkey command statistics
|
|
84
|
+
*/
|
|
85
|
+
Commandstats = "commandstats",
|
|
86
|
+
/**
|
|
87
|
+
* LATENCYSTATS: Valkey command latency percentile distribution statistics
|
|
88
|
+
*/
|
|
89
|
+
Latencystats = "latencystats",
|
|
90
|
+
/**
|
|
91
|
+
* SENTINEL: Valkey Sentinel section (only applicable to Sentinel instances)
|
|
92
|
+
*/
|
|
93
|
+
Sentinel = "sentinel",
|
|
94
|
+
/**
|
|
95
|
+
* CLUSTER: Valkey Cluster section
|
|
96
|
+
*/
|
|
97
|
+
Cluster = "cluster",
|
|
98
|
+
/**
|
|
99
|
+
* MODULES: Modules section
|
|
100
|
+
*/
|
|
101
|
+
Modules = "modules",
|
|
102
|
+
/**
|
|
103
|
+
* KEYSPACE: Database related statistics
|
|
104
|
+
*/
|
|
105
|
+
Keyspace = "keyspace",
|
|
106
|
+
/**
|
|
107
|
+
* ERRORSTATS: Valkey error statistics
|
|
108
|
+
*/
|
|
109
|
+
Errorstats = "errorstats",
|
|
110
|
+
/**
|
|
111
|
+
* ALL: Return all sections (excluding module generated ones)
|
|
112
|
+
*/
|
|
113
|
+
All = "all",
|
|
114
|
+
/**
|
|
115
|
+
* DEFAULT: Return only the default set of sections
|
|
116
|
+
*/
|
|
117
|
+
Default = "default",
|
|
118
|
+
/**
|
|
119
|
+
* EVERYTHING: Includes all and modules
|
|
120
|
+
*/
|
|
121
|
+
Everything = "everything"
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* @internal
|
|
125
|
+
*/
|
|
126
|
+
export declare function createPing(str?: GlideString): command_request.Command;
|
|
127
|
+
/**
|
|
128
|
+
* @internal
|
|
129
|
+
*/
|
|
130
|
+
export declare function createInfo(options?: InfoOptions[]): command_request.Command;
|
|
131
|
+
/**
|
|
132
|
+
* @internal
|
|
133
|
+
*/
|
|
134
|
+
export declare function createDel(keys: GlideString[]): command_request.Command;
|
|
135
|
+
/**
|
|
136
|
+
* @internal
|
|
137
|
+
*/
|
|
138
|
+
export declare function createSelect(index: number): command_request.Command;
|
|
139
|
+
/**
|
|
140
|
+
* @internal
|
|
141
|
+
*/
|
|
142
|
+
export declare function createClientGetName(): command_request.Command;
|
|
143
|
+
/**
|
|
144
|
+
* @internal
|
|
145
|
+
*/
|
|
146
|
+
export declare function createConfigRewrite(): command_request.Command;
|
|
147
|
+
/**
|
|
148
|
+
* @internal
|
|
149
|
+
*/
|
|
150
|
+
export declare function createConfigResetStat(): command_request.Command;
|
|
151
|
+
/**
|
|
152
|
+
* @internal
|
|
153
|
+
*/
|
|
154
|
+
export declare function createMGet(keys: GlideString[]): command_request.Command;
|
|
155
|
+
/**
|
|
156
|
+
* @internal
|
|
157
|
+
*/
|
|
158
|
+
export declare function createMSet(keysAndValues: GlideRecord<GlideString>): command_request.Command;
|
|
159
|
+
/**
|
|
160
|
+
* @internal
|
|
161
|
+
*/
|
|
162
|
+
export declare function createMSetNX(keysAndValues: GlideRecord<GlideString>): command_request.Command;
|
|
163
|
+
/**
|
|
164
|
+
* @internal
|
|
165
|
+
*/
|
|
166
|
+
export declare function createIncr(key: GlideString): command_request.Command;
|
|
167
|
+
/**
|
|
168
|
+
* @internal
|
|
169
|
+
*/
|
|
170
|
+
export declare function createIncrBy(key: GlideString, amount: number): command_request.Command;
|
|
171
|
+
/**
|
|
172
|
+
* @internal
|
|
173
|
+
*/
|
|
174
|
+
export declare function createIncrByFloat(key: GlideString, amount: number): command_request.Command;
|
|
175
|
+
/**
|
|
176
|
+
* @internal
|
|
177
|
+
*/
|
|
178
|
+
export declare function createClientId(): command_request.Command;
|
|
179
|
+
/**
|
|
180
|
+
* @internal
|
|
181
|
+
*/
|
|
182
|
+
export declare function createConfigGet(parameters: string[]): command_request.Command;
|
|
183
|
+
/**
|
|
184
|
+
* @internal
|
|
185
|
+
*/
|
|
186
|
+
export declare function createConfigSet(parameters: Record<string, GlideString>): command_request.Command;
|
|
187
|
+
/**
|
|
188
|
+
* @internal
|
|
189
|
+
*/
|
|
190
|
+
export declare function createHGet(key: GlideString, field: GlideString): command_request.Command;
|
|
191
|
+
/**
|
|
192
|
+
* This function converts an input from {@link HashDataType} or `Record` types to `HashDataType`.
|
|
193
|
+
*
|
|
194
|
+
* @param fieldsAndValues - field names and their values.
|
|
195
|
+
* @returns HashDataType array containing field names and their values.
|
|
196
|
+
*/
|
|
197
|
+
export declare function convertFieldsAndValuesToHashDataType(fieldsAndValues: HashDataType | Record<string, GlideString>): HashDataType;
|
|
198
|
+
/**
|
|
199
|
+
* @internal
|
|
200
|
+
*/
|
|
201
|
+
export declare function createHSet(key: GlideString, fieldValueList: HashDataType): command_request.Command;
|
|
202
|
+
/**
|
|
203
|
+
* @internal
|
|
204
|
+
*/
|
|
205
|
+
export declare function createHKeys(key: GlideString): command_request.Command;
|
|
206
|
+
/**
|
|
207
|
+
* @internal
|
|
208
|
+
*/
|
|
209
|
+
export declare function createHSetNX(key: GlideString, field: GlideString, value: GlideString): command_request.Command;
|
|
210
|
+
/**
|
|
211
|
+
* @internal
|
|
212
|
+
*/
|
|
213
|
+
export declare function createDecr(key: GlideString): command_request.Command;
|
|
214
|
+
/**
|
|
215
|
+
* @internal
|
|
216
|
+
*/
|
|
217
|
+
export declare function createDecrBy(key: GlideString, amount: number): command_request.Command;
|
|
218
|
+
/**
|
|
219
|
+
* Enumeration defining the bitwise operation to use in the {@link BaseClient.bitop|bitop} command. Specifies the
|
|
220
|
+
* bitwise operation to perform between the passed in keys.
|
|
221
|
+
*/
|
|
222
|
+
export declare enum BitwiseOperation {
|
|
223
|
+
AND = "AND",
|
|
224
|
+
OR = "OR",
|
|
225
|
+
XOR = "XOR",
|
|
226
|
+
NOT = "NOT"
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* @internal
|
|
230
|
+
*/
|
|
231
|
+
export declare function createBitOp(operation: BitwiseOperation, destination: GlideString, keys: GlideString[]): command_request.Command;
|
|
232
|
+
/**
|
|
233
|
+
* @internal
|
|
234
|
+
*/
|
|
235
|
+
export declare function createGetBit(key: GlideString, offset: number): command_request.Command;
|
|
236
|
+
/**
|
|
237
|
+
* @internal
|
|
238
|
+
*/
|
|
239
|
+
export declare function createSetBit(key: GlideString, offset: number, value: number): command_request.Command;
|
|
240
|
+
/**
|
|
241
|
+
* Represents a signed or unsigned argument encoding for the {@link BaseClient.bitfield|bitfield} or
|
|
242
|
+
* {@link BaseClient.bitfieldReadOnly|bitfieldReadOnly} commands.
|
|
243
|
+
*/
|
|
244
|
+
export interface BitEncoding {
|
|
245
|
+
/**
|
|
246
|
+
* Returns the encoding as a string argument to be used in the {@link BaseClient.bitfield|bitfield} or
|
|
247
|
+
* {@link BaseClient.bitfieldReadOnly|bitfieldReadOnly} commands.
|
|
248
|
+
*
|
|
249
|
+
* @returns The encoding as a string argument.
|
|
250
|
+
*/
|
|
251
|
+
toArg(): string;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Represents a signed argument encoding.
|
|
255
|
+
*/
|
|
256
|
+
export declare class SignedEncoding implements BitEncoding {
|
|
257
|
+
private static readonly SIGNED_ENCODING_PREFIX;
|
|
258
|
+
private readonly encoding;
|
|
259
|
+
/**
|
|
260
|
+
* Creates an instance of SignedEncoding.
|
|
261
|
+
*
|
|
262
|
+
* @param encodingLength - The bit size of the encoding. Must be less than 65 bits long.
|
|
263
|
+
*/
|
|
264
|
+
constructor(encodingLength: number);
|
|
265
|
+
toArg(): string;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Represents an unsigned argument encoding.
|
|
269
|
+
*/
|
|
270
|
+
export declare class UnsignedEncoding implements BitEncoding {
|
|
271
|
+
private static readonly UNSIGNED_ENCODING_PREFIX;
|
|
272
|
+
private readonly encoding;
|
|
273
|
+
/**
|
|
274
|
+
* Creates an instance of UnsignedEncoding.
|
|
275
|
+
*
|
|
276
|
+
* @param encodingLength - The bit size of the encoding. Must be less than 64 bits long.
|
|
277
|
+
*/
|
|
278
|
+
constructor(encodingLength: number);
|
|
279
|
+
toArg(): string;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Represents an offset for an array of bits for the {@link BaseClient.bitfield|bitfield} or
|
|
283
|
+
* {@link BaseClient.bitfieldReadOnly|bitfieldReadOnly} commands.
|
|
284
|
+
*/
|
|
285
|
+
export interface BitFieldOffset {
|
|
286
|
+
/**
|
|
287
|
+
* Returns the offset as a string argument to be used in the {@link BaseClient.bitfield|bitfield} or
|
|
288
|
+
* {@link BaseClient.bitfieldReadOnly|bitfieldReadOnly} commands.
|
|
289
|
+
*
|
|
290
|
+
* @returns The offset as a string argument.
|
|
291
|
+
*/
|
|
292
|
+
toArg(): string;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Represents an offset in an array of bits for the {@link BaseClient.bitfield|bitfield} or
|
|
296
|
+
* {@link BaseClient.bitfieldReadOnly|bitfieldReadOnly} commands.
|
|
297
|
+
*
|
|
298
|
+
* For example, if we have the binary `01101001` with offset of 1 for an unsigned encoding of size 4, then the value
|
|
299
|
+
* is 13 from `0(1101)001`.
|
|
300
|
+
*/
|
|
301
|
+
export declare class BitOffset implements BitFieldOffset {
|
|
302
|
+
private readonly offset;
|
|
303
|
+
/**
|
|
304
|
+
* Creates an instance of BitOffset.
|
|
305
|
+
*
|
|
306
|
+
* @param offset - The bit index offset in the array of bits. Must be greater than or equal to 0.
|
|
307
|
+
*/
|
|
308
|
+
constructor(offset: number);
|
|
309
|
+
toArg(): string;
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Represents an offset in an array of bits for the {@link BaseClient.bitfield|bitfield} or
|
|
313
|
+
* {@link BaseClient.bitfieldReadOnly|bitfieldReadOnly} commands. The bit offset index is calculated as the numerical
|
|
314
|
+
* value of the offset multiplied by the encoding value.
|
|
315
|
+
*
|
|
316
|
+
* For example, if we have the binary 01101001 with offset multiplier of 1 for an unsigned encoding of size 4, then the
|
|
317
|
+
* value is 9 from `0110(1001)`.
|
|
318
|
+
*/
|
|
319
|
+
export declare class BitOffsetMultiplier implements BitFieldOffset {
|
|
320
|
+
private static readonly OFFSET_MULTIPLIER_PREFIX;
|
|
321
|
+
private readonly offset;
|
|
322
|
+
/**
|
|
323
|
+
* Creates an instance of BitOffsetMultiplier.
|
|
324
|
+
*
|
|
325
|
+
* @param offset - The offset in the array of bits, which will be multiplied by the encoding value to get the final
|
|
326
|
+
* bit index offset.
|
|
327
|
+
*/
|
|
328
|
+
constructor(offset: number);
|
|
329
|
+
toArg(): string;
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Represents subcommands for the {@link BaseClient.bitfield|bitfield} or
|
|
333
|
+
* {@link BaseClient.bitfieldReadOnly|bitfieldReadOnly} commands.
|
|
334
|
+
*/
|
|
335
|
+
export interface BitFieldSubCommands {
|
|
336
|
+
/**
|
|
337
|
+
* Returns the subcommand as a list of string arguments to be used in the {@link BaseClient.bitfield|bitfield} or
|
|
338
|
+
* {@link BaseClient.bitfieldReadOnly|bitfieldReadOnly} commands.
|
|
339
|
+
*
|
|
340
|
+
* @returns The subcommand as a list of string arguments.
|
|
341
|
+
*/
|
|
342
|
+
toArgs(): string[];
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Represents the "GET" subcommand for getting a value in the binary representation of the string stored in `key`.
|
|
346
|
+
*/
|
|
347
|
+
export declare class BitFieldGet implements BitFieldSubCommands {
|
|
348
|
+
private static readonly GET_COMMAND_STRING;
|
|
349
|
+
private readonly encoding;
|
|
350
|
+
private readonly offset;
|
|
351
|
+
/**
|
|
352
|
+
* Creates an instance of BitFieldGet.
|
|
353
|
+
*
|
|
354
|
+
* @param encoding - The bit encoding for the subcommand.
|
|
355
|
+
* @param offset - The offset in the array of bits from which to get the value.
|
|
356
|
+
*/
|
|
357
|
+
constructor(encoding: BitEncoding, offset: BitFieldOffset);
|
|
358
|
+
toArgs(): string[];
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Represents the "SET" subcommand for setting bits in the binary representation of the string stored in `key`.
|
|
362
|
+
*/
|
|
363
|
+
export declare class BitFieldSet implements BitFieldSubCommands {
|
|
364
|
+
private static readonly SET_COMMAND_STRING;
|
|
365
|
+
private readonly encoding;
|
|
366
|
+
private readonly offset;
|
|
367
|
+
private readonly value;
|
|
368
|
+
/**
|
|
369
|
+
* Creates an instance of BitFieldSet
|
|
370
|
+
*
|
|
371
|
+
* @param encoding - The bit encoding for the subcommand.
|
|
372
|
+
* @param offset - The offset in the array of bits where the value will be set.
|
|
373
|
+
* @param value - The value to set the bits in the binary value to.
|
|
374
|
+
*/
|
|
375
|
+
constructor(encoding: BitEncoding, offset: BitFieldOffset, value: number);
|
|
376
|
+
toArgs(): string[];
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Represents the "INCRBY" subcommand for increasing or decreasing bits in the binary representation of the string
|
|
380
|
+
* stored in `key`.
|
|
381
|
+
*/
|
|
382
|
+
export declare class BitFieldIncrBy implements BitFieldSubCommands {
|
|
383
|
+
private static readonly INCRBY_COMMAND_STRING;
|
|
384
|
+
private readonly encoding;
|
|
385
|
+
private readonly offset;
|
|
386
|
+
private readonly increment;
|
|
387
|
+
/**
|
|
388
|
+
* Creates an instance of BitFieldIncrBy
|
|
389
|
+
*
|
|
390
|
+
* @param encoding - The bit encoding for the subcommand.
|
|
391
|
+
* @param offset - The offset in the array of bits where the value will be incremented.
|
|
392
|
+
* @param increment - The value to increment the bits in the binary value by.
|
|
393
|
+
*/
|
|
394
|
+
constructor(encoding: BitEncoding, offset: BitFieldOffset, increment: number);
|
|
395
|
+
toArgs(): string[];
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Enumeration specifying bit overflow controls for the {@link BaseClient.bitfield|bitfield} command.
|
|
399
|
+
*/
|
|
400
|
+
export declare enum BitOverflowControl {
|
|
401
|
+
/**
|
|
402
|
+
* Performs modulo when overflows occur with unsigned encoding. When overflows occur with signed encoding, the value
|
|
403
|
+
* restarts at the most negative value. When underflows occur with signed encoding, the value restarts at the most
|
|
404
|
+
* positive value.
|
|
405
|
+
*/
|
|
406
|
+
WRAP = "WRAP",
|
|
407
|
+
/**
|
|
408
|
+
* Underflows remain set to the minimum value, and overflows remain set to the maximum value.
|
|
409
|
+
*/
|
|
410
|
+
SAT = "SAT",
|
|
411
|
+
/**
|
|
412
|
+
* Returns `None` when overflows occur.
|
|
413
|
+
*/
|
|
414
|
+
FAIL = "FAIL"
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Represents the "OVERFLOW" subcommand that determines the result of the "SET" or "INCRBY"
|
|
418
|
+
* {@link BaseClient.bitfield|bitfield} subcommands when an underflow or overflow occurs.
|
|
419
|
+
*/
|
|
420
|
+
export declare class BitFieldOverflow implements BitFieldSubCommands {
|
|
421
|
+
private static readonly OVERFLOW_COMMAND_STRING;
|
|
422
|
+
private readonly overflowControl;
|
|
423
|
+
/**
|
|
424
|
+
* Creates an instance of BitFieldOverflow.
|
|
425
|
+
*
|
|
426
|
+
* @param overflowControl - The desired overflow behavior.
|
|
427
|
+
*/
|
|
428
|
+
constructor(overflowControl: BitOverflowControl);
|
|
429
|
+
toArgs(): string[];
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* @internal
|
|
433
|
+
*/
|
|
434
|
+
export declare function createBitField(key: GlideString, subcommands: BitFieldSubCommands[], readOnly?: boolean): command_request.Command;
|
|
435
|
+
/**
|
|
436
|
+
* @internal
|
|
437
|
+
*/
|
|
438
|
+
export declare function createHDel(key: GlideString, fields: GlideString[]): command_request.Command;
|
|
439
|
+
/**
|
|
440
|
+
* @internal
|
|
441
|
+
*/
|
|
442
|
+
export declare function createHMGet(key: GlideString, fields: GlideString[]): command_request.Command;
|
|
443
|
+
/**
|
|
444
|
+
* @internal
|
|
445
|
+
*/
|
|
446
|
+
export declare function createHExists(key: GlideString, field: GlideString): command_request.Command;
|
|
447
|
+
/**
|
|
448
|
+
* @internal
|
|
449
|
+
*/
|
|
450
|
+
export declare function createHGetAll(key: GlideString): command_request.Command;
|
|
451
|
+
/**
|
|
452
|
+
* @internal
|
|
453
|
+
*/
|
|
454
|
+
export declare function createLPush(key: GlideString, elements: GlideString[]): command_request.Command;
|
|
455
|
+
/**
|
|
456
|
+
* @internal
|
|
457
|
+
*/
|
|
458
|
+
export declare function createLPushX(key: GlideString, elements: GlideString[]): command_request.Command;
|
|
459
|
+
/**
|
|
460
|
+
* @internal
|
|
461
|
+
*/
|
|
462
|
+
export declare function createLPop(key: GlideString, count?: number): command_request.Command;
|
|
463
|
+
/**
|
|
464
|
+
* @internal
|
|
465
|
+
*/
|
|
466
|
+
export declare function createLRange(key: GlideString, start: number, end: number): command_request.Command;
|
|
467
|
+
/**
|
|
468
|
+
* @internal
|
|
469
|
+
*/
|
|
470
|
+
export declare function createLLen(key: GlideString): command_request.Command;
|
|
471
|
+
/**
|
|
472
|
+
* Enumeration representing element popping or adding direction for the List Based Commands.
|
|
473
|
+
*/
|
|
474
|
+
export declare enum ListDirection {
|
|
475
|
+
/**
|
|
476
|
+
* Represents the option that elements should be popped from or added to the left side of a list.
|
|
477
|
+
*/
|
|
478
|
+
LEFT = "LEFT",
|
|
479
|
+
/**
|
|
480
|
+
* Represents the option that elements should be popped from or added to the right side of a list.
|
|
481
|
+
*/
|
|
482
|
+
RIGHT = "RIGHT"
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* @internal
|
|
486
|
+
*/
|
|
487
|
+
export declare function createLMove(source: GlideString, destination: GlideString, whereFrom: ListDirection, whereTo: ListDirection): command_request.Command;
|
|
488
|
+
/**
|
|
489
|
+
* @internal
|
|
490
|
+
*/
|
|
491
|
+
export declare function createBLMove(source: GlideString, destination: GlideString, whereFrom: ListDirection, whereTo: ListDirection, timeout: number): command_request.Command;
|
|
492
|
+
/**
|
|
493
|
+
* @internal
|
|
494
|
+
*/
|
|
495
|
+
export declare function createLSet(key: GlideString, index: number, element: GlideString): command_request.Command;
|
|
496
|
+
/**
|
|
497
|
+
* @internal
|
|
498
|
+
*/
|
|
499
|
+
export declare function createLTrim(key: GlideString, start: number, end: number): command_request.Command;
|
|
500
|
+
/**
|
|
501
|
+
* @internal
|
|
502
|
+
*/
|
|
503
|
+
export declare function createLRem(key: GlideString, count: number, element: GlideString): command_request.Command;
|
|
504
|
+
/**
|
|
505
|
+
* @internal
|
|
506
|
+
*/
|
|
507
|
+
export declare function createRPush(key: GlideString, elements: GlideString[]): command_request.Command;
|
|
508
|
+
/**
|
|
509
|
+
* @internal
|
|
510
|
+
*/
|
|
511
|
+
export declare function createRPushX(key: GlideString, elements: GlideString[]): command_request.Command;
|
|
512
|
+
/**
|
|
513
|
+
* @internal
|
|
514
|
+
*/
|
|
515
|
+
export declare function createRPop(key: GlideString, count?: number): command_request.Command;
|
|
516
|
+
/**
|
|
517
|
+
* @internal
|
|
518
|
+
*/
|
|
519
|
+
export declare function createSAdd(key: GlideString, members: GlideString[]): command_request.Command;
|
|
520
|
+
/**
|
|
521
|
+
* @internal
|
|
522
|
+
*/
|
|
523
|
+
export declare function createSRem(key: GlideString, members: GlideString[]): command_request.Command;
|
|
524
|
+
/**
|
|
525
|
+
* @internal
|
|
526
|
+
*/
|
|
527
|
+
export declare function createSScan(key: GlideString, cursor: GlideString, options?: BaseScanOptions): command_request.Command;
|
|
528
|
+
/**
|
|
529
|
+
* @internal
|
|
530
|
+
*/
|
|
531
|
+
export declare function createSMembers(key: GlideString): command_request.Command;
|
|
532
|
+
/**
|
|
533
|
+
*
|
|
534
|
+
* @internal
|
|
535
|
+
*/
|
|
536
|
+
export declare function createSMove(source: GlideString, destination: GlideString, member: GlideString): command_request.Command;
|
|
537
|
+
/**
|
|
538
|
+
* @internal
|
|
539
|
+
*/
|
|
540
|
+
export declare function createSCard(key: GlideString): command_request.Command;
|
|
541
|
+
/**
|
|
542
|
+
* @internal
|
|
543
|
+
*/
|
|
544
|
+
export declare function createSInter(keys: GlideString[]): command_request.Command;
|
|
545
|
+
/**
|
|
546
|
+
* @internal
|
|
547
|
+
*/
|
|
548
|
+
export declare function createSInterCard(keys: GlideString[], limit?: number): command_request.Command;
|
|
549
|
+
/**
|
|
550
|
+
* @internal
|
|
551
|
+
*/
|
|
552
|
+
export declare function createSInterStore(destination: GlideString, keys: GlideString[]): command_request.Command;
|
|
553
|
+
/**
|
|
554
|
+
* @internal
|
|
555
|
+
*/
|
|
556
|
+
export declare function createSDiff(keys: GlideString[]): command_request.Command;
|
|
557
|
+
/**
|
|
558
|
+
* @internal
|
|
559
|
+
*/
|
|
560
|
+
export declare function createSDiffStore(destination: GlideString, keys: GlideString[]): command_request.Command;
|
|
561
|
+
/**
|
|
562
|
+
* @internal
|
|
563
|
+
*/
|
|
564
|
+
export declare function createSUnion(keys: GlideString[]): command_request.Command;
|
|
565
|
+
/**
|
|
566
|
+
* @internal
|
|
567
|
+
*/
|
|
568
|
+
export declare function createSUnionStore(destination: GlideString, keys: GlideString[]): command_request.Command;
|
|
569
|
+
/**
|
|
570
|
+
* @internal
|
|
571
|
+
*/
|
|
572
|
+
export declare function createSIsMember(key: GlideString, member: GlideString): command_request.Command;
|
|
573
|
+
/**
|
|
574
|
+
* @internal
|
|
575
|
+
*/
|
|
576
|
+
export declare function createSMIsMember(key: GlideString, members: GlideString[]): command_request.Command;
|
|
577
|
+
/**
|
|
578
|
+
* @internal
|
|
579
|
+
*/
|
|
580
|
+
export declare function createSPop(key: GlideString, count?: number): command_request.Command;
|
|
581
|
+
/**
|
|
582
|
+
* @internal
|
|
583
|
+
*/
|
|
584
|
+
export declare function createSRandMember(key: GlideString, count?: number): command_request.Command;
|
|
585
|
+
/**
|
|
586
|
+
* @internal
|
|
587
|
+
*/
|
|
588
|
+
export declare function createCustomCommand(args: GlideString[]): command_request.Command;
|
|
589
|
+
/**
|
|
590
|
+
* @internal
|
|
591
|
+
*/
|
|
592
|
+
export declare function createHIncrBy(key: GlideString, field: GlideString, amount: number): command_request.Command;
|
|
593
|
+
/**
|
|
594
|
+
* @internal
|
|
595
|
+
*/
|
|
596
|
+
export declare function createHIncrByFloat(key: GlideString, field: GlideString, amount: number): command_request.Command;
|
|
597
|
+
/**
|
|
598
|
+
* @internal
|
|
599
|
+
*/
|
|
600
|
+
export declare function createHLen(key: GlideString): command_request.Command;
|
|
601
|
+
/**
|
|
602
|
+
* @internal
|
|
603
|
+
*/
|
|
604
|
+
export declare function createHVals(key: GlideString): command_request.Command;
|
|
605
|
+
/**
|
|
606
|
+
* @internal
|
|
607
|
+
*/
|
|
608
|
+
export declare function createExists(keys: GlideString[]): command_request.Command;
|
|
609
|
+
/**
|
|
610
|
+
* @internal
|
|
611
|
+
*/
|
|
612
|
+
export declare function createUnlink(keys: GlideString[]): command_request.Command;
|
|
613
|
+
export declare enum ExpireOptions {
|
|
614
|
+
/**
|
|
615
|
+
* `HasNoExpiry` - Sets expiry only when the key has no expiry.
|
|
616
|
+
*/
|
|
617
|
+
HasNoExpiry = "NX",
|
|
618
|
+
/**
|
|
619
|
+
* `HasExistingExpiry` - Sets expiry only when the key has an existing expiry.
|
|
620
|
+
*/
|
|
621
|
+
HasExistingExpiry = "XX",
|
|
622
|
+
/**
|
|
623
|
+
* `NewExpiryGreaterThanCurrent` - Sets expiry only when the new expiry is
|
|
624
|
+
* greater than current one.
|
|
625
|
+
*/
|
|
626
|
+
NewExpiryGreaterThanCurrent = "GT",
|
|
627
|
+
/**
|
|
628
|
+
* `NewExpiryLessThanCurrent` - Sets expiry only when the new expiry is less
|
|
629
|
+
* than current one.
|
|
630
|
+
*/
|
|
631
|
+
NewExpiryLessThanCurrent = "LT"
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* @internal
|
|
635
|
+
*/
|
|
636
|
+
export declare function createExpire(key: GlideString, seconds: number, option?: ExpireOptions): command_request.Command;
|
|
637
|
+
/**
|
|
638
|
+
* @internal
|
|
639
|
+
*/
|
|
640
|
+
export declare function createExpireAt(key: GlideString, unixSeconds: number, option?: ExpireOptions): command_request.Command;
|
|
641
|
+
/**
|
|
642
|
+
* @internal
|
|
643
|
+
*/
|
|
644
|
+
export declare function createExpireTime(key: GlideString): command_request.Command;
|
|
645
|
+
/**
|
|
646
|
+
* @internal
|
|
647
|
+
*/
|
|
648
|
+
export declare function createPExpire(key: GlideString, milliseconds: number, option?: ExpireOptions): command_request.Command;
|
|
649
|
+
/**
|
|
650
|
+
* @internal
|
|
651
|
+
*/
|
|
652
|
+
export declare function createPExpireAt(key: GlideString, unixMilliseconds: number, option?: ExpireOptions): command_request.Command;
|
|
653
|
+
/**
|
|
654
|
+
* @internal
|
|
655
|
+
*/
|
|
656
|
+
export declare function createPExpireTime(key: GlideString): command_request.Command;
|
|
657
|
+
/**
|
|
658
|
+
* @internal
|
|
659
|
+
*/
|
|
660
|
+
export declare function createTTL(key: GlideString): command_request.Command;
|
|
661
|
+
/**
|
|
662
|
+
* Options for updating elements of a sorted set key.
|
|
663
|
+
*/
|
|
664
|
+
export declare enum UpdateByScore {
|
|
665
|
+
/** Only update existing elements if the new score is less than the current score. */
|
|
666
|
+
LESS_THAN = "LT",
|
|
667
|
+
/** Only update existing elements if the new score is greater than the current score. */
|
|
668
|
+
GREATER_THAN = "GT"
|
|
669
|
+
}
|
|
670
|
+
export interface ZAddOptions {
|
|
671
|
+
/**
|
|
672
|
+
* Options for handling existing members.
|
|
673
|
+
*/
|
|
674
|
+
conditionalChange?: ConditionalChange;
|
|
675
|
+
/**
|
|
676
|
+
* Options for updating scores.
|
|
677
|
+
*/
|
|
678
|
+
updateOptions?: UpdateByScore;
|
|
679
|
+
/**
|
|
680
|
+
* Modify the return value from the number of new elements added, to the total number of elements changed.
|
|
681
|
+
*/
|
|
682
|
+
changed?: boolean;
|
|
683
|
+
}
|
|
684
|
+
/**
|
|
685
|
+
* @internal
|
|
686
|
+
* Convert input from `Record` to `SortedSetDataType` to ensure the only one type.
|
|
687
|
+
*/
|
|
688
|
+
export declare function convertElementsAndScores(membersAndScores: SortedSetDataType | Record<string, number>): SortedSetDataType;
|
|
689
|
+
/**
|
|
690
|
+
* @internal
|
|
691
|
+
*/
|
|
692
|
+
export declare function createZAdd(key: GlideString, membersAndScores: SortedSetDataType, options?: ZAddOptions, incr?: boolean): command_request.Command;
|
|
693
|
+
/**
|
|
694
|
+
* `KeyWeight` - pair of variables represents a weighted key for the `ZINTERSTORE` and `ZUNIONSTORE` sorted sets commands.
|
|
695
|
+
*/
|
|
696
|
+
export type KeyWeight = [GlideString, number];
|
|
697
|
+
/**
|
|
698
|
+
* `AggregationType` - representing aggregation types for `ZINTERSTORE` and `ZUNIONSTORE` sorted set commands.
|
|
699
|
+
*/
|
|
700
|
+
export type AggregationType = "SUM" | "MIN" | "MAX";
|
|
701
|
+
/**
|
|
702
|
+
* @internal
|
|
703
|
+
*/
|
|
704
|
+
export declare function createZInterstore(destination: GlideString, keys: GlideString[] | KeyWeight[], aggregationType?: AggregationType): command_request.Command;
|
|
705
|
+
/**
|
|
706
|
+
* @internal
|
|
707
|
+
*/
|
|
708
|
+
export declare function createZInter(keys: GlideString[] | KeyWeight[], aggregationType?: AggregationType, withScores?: boolean): command_request.Command;
|
|
709
|
+
/**
|
|
710
|
+
* @internal
|
|
711
|
+
*/
|
|
712
|
+
export declare function createZUnion(keys: GlideString[] | KeyWeight[], aggregationType?: AggregationType, withScores?: boolean): command_request.Command;
|
|
713
|
+
/**
|
|
714
|
+
* @internal
|
|
715
|
+
*/
|
|
716
|
+
export declare function createZRem(key: GlideString, members: GlideString[]): command_request.Command;
|
|
717
|
+
/**
|
|
718
|
+
* @internal
|
|
719
|
+
*/
|
|
720
|
+
export declare function createZCard(key: GlideString): command_request.Command;
|
|
721
|
+
/**
|
|
722
|
+
* @internal
|
|
723
|
+
*/
|
|
724
|
+
export declare function createZInterCard(keys: GlideString[], limit?: number): command_request.Command;
|
|
725
|
+
/**
|
|
726
|
+
* @internal
|
|
727
|
+
*/
|
|
728
|
+
export declare function createZDiff(keys: GlideString[]): command_request.Command;
|
|
729
|
+
/**
|
|
730
|
+
* @internal
|
|
731
|
+
*/
|
|
732
|
+
export declare function createZDiffWithScores(keys: GlideString[]): command_request.Command;
|
|
733
|
+
/**
|
|
734
|
+
* @internal
|
|
735
|
+
*/
|
|
736
|
+
export declare function createZDiffStore(destination: GlideString, keys: GlideString[]): command_request.Command;
|
|
737
|
+
/**
|
|
738
|
+
* @internal
|
|
739
|
+
*/
|
|
740
|
+
export declare function createZScore(key: GlideString, member: GlideString): command_request.Command;
|
|
741
|
+
/**
|
|
742
|
+
* @internal
|
|
743
|
+
*/
|
|
744
|
+
export declare function createZUnionStore(destination: GlideString, keys: GlideString[] | KeyWeight[], aggregationType?: AggregationType): command_request.Command;
|
|
745
|
+
/**
|
|
746
|
+
* @internal
|
|
747
|
+
*/
|
|
748
|
+
export declare function createZMScore(key: GlideString, members: GlideString[]): command_request.Command;
|
|
749
|
+
/**
|
|
750
|
+
* @internal
|
|
751
|
+
*/
|
|
752
|
+
export declare function createScan(cursor: GlideString, options?: ScanOptions): command_request.Command;
|
|
753
|
+
export declare enum InfBoundary {
|
|
754
|
+
/**
|
|
755
|
+
* Positive infinity bound.
|
|
756
|
+
*/
|
|
757
|
+
PositiveInfinity = "+",
|
|
758
|
+
/**
|
|
759
|
+
* Negative infinity bound.
|
|
760
|
+
*/
|
|
761
|
+
NegativeInfinity = "-"
|
|
762
|
+
}
|
|
763
|
+
/**
|
|
764
|
+
* Defines the boundaries of a range.
|
|
765
|
+
*/
|
|
766
|
+
export type Boundary<T> =
|
|
767
|
+
/**
|
|
768
|
+
* Represents an lower/upper boundary.
|
|
769
|
+
*/
|
|
770
|
+
InfBoundary
|
|
771
|
+
/**
|
|
772
|
+
* Represents a specific boundary.
|
|
773
|
+
*/
|
|
774
|
+
| {
|
|
775
|
+
/**
|
|
776
|
+
* The comparison value.
|
|
777
|
+
*/
|
|
778
|
+
value: T;
|
|
779
|
+
/**
|
|
780
|
+
* Whether the value is inclusive. Defaults to `true`.
|
|
781
|
+
*/
|
|
782
|
+
isInclusive?: boolean;
|
|
783
|
+
};
|
|
784
|
+
/**
|
|
785
|
+
* Represents a range by index (rank) in a sorted set.
|
|
786
|
+
* The `start` and `end` arguments represent zero-based indexes.
|
|
787
|
+
*/
|
|
788
|
+
export interface RangeByIndex {
|
|
789
|
+
/**
|
|
790
|
+
* The start index of the range.
|
|
791
|
+
*/
|
|
792
|
+
start: number;
|
|
793
|
+
/**
|
|
794
|
+
* The end index of the range.
|
|
795
|
+
*/
|
|
796
|
+
end: number;
|
|
797
|
+
}
|
|
798
|
+
/**
|
|
799
|
+
* Represents a range by score or a range by lex in a sorted set.
|
|
800
|
+
* The `start` and `end` arguments represent score boundaries.
|
|
801
|
+
*/
|
|
802
|
+
interface SortedSetRange<T> {
|
|
803
|
+
/**
|
|
804
|
+
* The start boundary.
|
|
805
|
+
*/
|
|
806
|
+
start: Boundary<T>;
|
|
807
|
+
/**
|
|
808
|
+
* The end boundary.
|
|
809
|
+
*/
|
|
810
|
+
end: Boundary<T>;
|
|
811
|
+
/**
|
|
812
|
+
* The limit argument for a range query.
|
|
813
|
+
* Represents a limit argument for a range query in a sorted set to
|
|
814
|
+
* be used in [ZRANGE](https://valkey.io/commands/zrange) command.
|
|
815
|
+
*
|
|
816
|
+
* The optional LIMIT argument can be used to obtain a sub-range from the
|
|
817
|
+
* matching elements (similar to SELECT LIMIT offset, count in SQL).
|
|
818
|
+
*/
|
|
819
|
+
limit?: {
|
|
820
|
+
/**
|
|
821
|
+
* The offset from the start of the range.
|
|
822
|
+
*/
|
|
823
|
+
offset: number;
|
|
824
|
+
/**
|
|
825
|
+
* The number of elements to include in the range.
|
|
826
|
+
* A negative count returns all elements from the offset.
|
|
827
|
+
*/
|
|
828
|
+
count: number;
|
|
829
|
+
};
|
|
830
|
+
}
|
|
831
|
+
export type RangeByScore = SortedSetRange<number> & {
|
|
832
|
+
type: "byScore";
|
|
833
|
+
};
|
|
834
|
+
export type RangeByLex = SortedSetRange<GlideString> & {
|
|
835
|
+
type: "byLex";
|
|
836
|
+
};
|
|
837
|
+
/**
|
|
838
|
+
* @internal
|
|
839
|
+
*/
|
|
840
|
+
export declare function createZCount(key: GlideString, minScore: Boundary<number>, maxScore: Boundary<number>): command_request.Command;
|
|
841
|
+
/**
|
|
842
|
+
* @internal
|
|
843
|
+
*/
|
|
844
|
+
export declare function createZRange(key: GlideString, rangeQuery: RangeByIndex | RangeByScore | RangeByLex, reverse?: boolean): command_request.Command;
|
|
845
|
+
/**
|
|
846
|
+
* @internal
|
|
847
|
+
*/
|
|
848
|
+
export declare function createZRangeWithScores(key: GlideString, rangeQuery: RangeByIndex | RangeByScore | RangeByLex, reverse?: boolean): command_request.Command;
|
|
849
|
+
/**
|
|
850
|
+
* @internal
|
|
851
|
+
*/
|
|
852
|
+
export declare function createZRangeStore(destination: GlideString, source: GlideString, rangeQuery: RangeByIndex | RangeByScore | RangeByLex, reverse?: boolean): command_request.Command;
|
|
853
|
+
/**
|
|
854
|
+
* @internal
|
|
855
|
+
*/
|
|
856
|
+
export declare function createType(key: GlideString): command_request.Command;
|
|
857
|
+
/**
|
|
858
|
+
* @internal
|
|
859
|
+
*/
|
|
860
|
+
export declare function createStrlen(key: GlideString): command_request.Command;
|
|
861
|
+
/**
|
|
862
|
+
* @internal
|
|
863
|
+
*/
|
|
864
|
+
export declare function createLIndex(key: GlideString, index: number): command_request.Command;
|
|
865
|
+
/**
|
|
866
|
+
* Defines where to insert new elements into a list.
|
|
867
|
+
*/
|
|
868
|
+
export declare enum InsertPosition {
|
|
869
|
+
/**
|
|
870
|
+
* Insert new element before the pivot.
|
|
871
|
+
*/
|
|
872
|
+
Before = "before",
|
|
873
|
+
/**
|
|
874
|
+
* Insert new element after the pivot.
|
|
875
|
+
*/
|
|
876
|
+
After = "after"
|
|
877
|
+
}
|
|
878
|
+
/**
|
|
879
|
+
* @internal
|
|
880
|
+
*/
|
|
881
|
+
export declare function createLInsert(key: GlideString, position: InsertPosition, pivot: GlideString, element: GlideString): command_request.Command;
|
|
882
|
+
/**
|
|
883
|
+
* @internal
|
|
884
|
+
*/
|
|
885
|
+
export declare function createZPopMin(key: GlideString, count?: number): command_request.Command;
|
|
886
|
+
/**
|
|
887
|
+
* @internal
|
|
888
|
+
*/
|
|
889
|
+
export declare function createZPopMax(key: GlideString, count?: number): command_request.Command;
|
|
890
|
+
/**
|
|
891
|
+
* @internal
|
|
892
|
+
*/
|
|
893
|
+
export declare function createEcho(message: GlideString): command_request.Command;
|
|
894
|
+
/**
|
|
895
|
+
* @internal
|
|
896
|
+
*/
|
|
897
|
+
export declare function createPTTL(key: GlideString): command_request.Command;
|
|
898
|
+
/**
|
|
899
|
+
* @internal
|
|
900
|
+
*/
|
|
901
|
+
export declare function createZRemRangeByRank(key: GlideString, start: number, end: number): command_request.Command;
|
|
902
|
+
/**
|
|
903
|
+
* @internal
|
|
904
|
+
*/
|
|
905
|
+
export declare function createZRemRangeByLex(key: GlideString, minLex: Boundary<GlideString>, maxLex: Boundary<GlideString>): command_request.Command;
|
|
906
|
+
/**
|
|
907
|
+
* @internal
|
|
908
|
+
*/
|
|
909
|
+
export declare function createZRemRangeByScore(key: GlideString, minScore: Boundary<number>, maxScore: Boundary<number>): command_request.Command;
|
|
910
|
+
/** @internal */
|
|
911
|
+
export declare function createPersist(key: GlideString): command_request.Command;
|
|
912
|
+
/**
|
|
913
|
+
* @internal
|
|
914
|
+
*/
|
|
915
|
+
export declare function createZLexCount(key: GlideString, minLex: Boundary<GlideString>, maxLex: Boundary<GlideString>): command_request.Command;
|
|
916
|
+
/** @internal */
|
|
917
|
+
export declare function createZRank(key: GlideString, member: GlideString, withScores?: boolean): command_request.Command;
|
|
918
|
+
export type StreamTrimOptions = ({
|
|
919
|
+
/**
|
|
920
|
+
* Trim the stream according to entry ID.
|
|
921
|
+
* Equivalent to `MINID` in the Valkey API.
|
|
922
|
+
*/
|
|
923
|
+
method: "minid";
|
|
924
|
+
threshold: GlideString;
|
|
925
|
+
} | {
|
|
926
|
+
/**
|
|
927
|
+
* Trim the stream according to length.
|
|
928
|
+
* Equivalent to `MAXLEN` in the Valkey API.
|
|
929
|
+
*/
|
|
930
|
+
method: "maxlen";
|
|
931
|
+
threshold: number;
|
|
932
|
+
}) & {
|
|
933
|
+
/**
|
|
934
|
+
* If `true`, the stream will be trimmed exactly. Equivalent to `=` in the
|
|
935
|
+
* Valkey API. Otherwise the stream will be trimmed in a near-exact manner,
|
|
936
|
+
* which is more efficient, equivalent to `~` in the Valkey API.
|
|
937
|
+
*/
|
|
938
|
+
exact: boolean;
|
|
939
|
+
/**
|
|
940
|
+
* If set, sets the maximal amount of entries that will be deleted.
|
|
941
|
+
*/
|
|
942
|
+
limit?: number;
|
|
943
|
+
};
|
|
944
|
+
export interface StreamAddOptions {
|
|
945
|
+
/**
|
|
946
|
+
* If set, the new entry will be added with this ID.
|
|
947
|
+
*/
|
|
948
|
+
id?: string;
|
|
949
|
+
/**
|
|
950
|
+
* If set to `false`, a new stream won't be created if no stream matches the
|
|
951
|
+
* given key. Equivalent to `NOMKSTREAM` in the Valkey API.
|
|
952
|
+
*/
|
|
953
|
+
makeStream?: boolean;
|
|
954
|
+
/**
|
|
955
|
+
* If set, the add operation will also trim the older entries in the stream.
|
|
956
|
+
*/
|
|
957
|
+
trim?: StreamTrimOptions;
|
|
958
|
+
}
|
|
959
|
+
/**
|
|
960
|
+
* @internal
|
|
961
|
+
*/
|
|
962
|
+
export declare function createXAdd(key: GlideString, values: [GlideString, GlideString][], options?: StreamAddOptions): command_request.Command;
|
|
963
|
+
/**
|
|
964
|
+
* @internal
|
|
965
|
+
*/
|
|
966
|
+
export declare function createXDel(key: GlideString, ids: string[]): command_request.Command;
|
|
967
|
+
/**
|
|
968
|
+
* @internal
|
|
969
|
+
*/
|
|
970
|
+
export declare function createXTrim(key: GlideString, options: StreamTrimOptions): command_request.Command;
|
|
971
|
+
/**
|
|
972
|
+
* @internal
|
|
973
|
+
*/
|
|
974
|
+
export declare function createXRange(key: GlideString, start: Boundary<string>, end: Boundary<string>, count?: number): command_request.Command;
|
|
975
|
+
/**
|
|
976
|
+
* @internal
|
|
977
|
+
*/
|
|
978
|
+
export declare function createXRevRange(key: GlideString, start: Boundary<string>, end: Boundary<string>, count?: number): command_request.Command;
|
|
979
|
+
/**
|
|
980
|
+
* @internal
|
|
981
|
+
*/
|
|
982
|
+
export declare function createXGroupCreateConsumer(key: GlideString, groupName: GlideString, consumerName: GlideString): command_request.Command;
|
|
983
|
+
/**
|
|
984
|
+
* @internal
|
|
985
|
+
*/
|
|
986
|
+
export declare function createXGroupDelConsumer(key: GlideString, groupName: GlideString, consumerName: GlideString): command_request.Command;
|
|
987
|
+
/**
|
|
988
|
+
* @internal
|
|
989
|
+
*/
|
|
990
|
+
export declare function createTime(): command_request.Command;
|
|
991
|
+
/**
|
|
992
|
+
* @internal
|
|
993
|
+
*/
|
|
994
|
+
export declare function createPublish(message: GlideString, channel: GlideString, sharded?: boolean): command_request.Command;
|
|
995
|
+
/**
|
|
996
|
+
* @internal
|
|
997
|
+
*/
|
|
998
|
+
export declare function createBRPop(keys: GlideString[], timeout: number): command_request.Command;
|
|
999
|
+
/**
|
|
1000
|
+
* @internal
|
|
1001
|
+
*/
|
|
1002
|
+
export declare function createBLPop(keys: GlideString[], timeout: number): command_request.Command;
|
|
1003
|
+
/**
|
|
1004
|
+
* @internal
|
|
1005
|
+
*/
|
|
1006
|
+
export declare function createFCall(func: GlideString, keys: GlideString[], args: GlideString[]): command_request.Command;
|
|
1007
|
+
/**
|
|
1008
|
+
* @internal
|
|
1009
|
+
*/
|
|
1010
|
+
export declare function createFCallReadOnly(func: GlideString, keys: GlideString[], args: GlideString[]): command_request.Command;
|
|
1011
|
+
/**
|
|
1012
|
+
* @internal
|
|
1013
|
+
*/
|
|
1014
|
+
export declare function createFunctionDelete(libraryCode: GlideString): command_request.Command;
|
|
1015
|
+
/**
|
|
1016
|
+
* @internal
|
|
1017
|
+
*/
|
|
1018
|
+
export declare function createFunctionFlush(mode?: FlushMode): command_request.Command;
|
|
1019
|
+
/**
|
|
1020
|
+
* @internal
|
|
1021
|
+
*/
|
|
1022
|
+
export declare function createFunctionLoad(libraryCode: GlideString, replace?: boolean): command_request.Command;
|
|
1023
|
+
/** Optional arguments for `FUNCTION LIST` command. */
|
|
1024
|
+
export interface FunctionListOptions {
|
|
1025
|
+
/** A wildcard pattern for matching library names. */
|
|
1026
|
+
libNamePattern?: GlideString;
|
|
1027
|
+
/** Specifies whether to request the library code from the server or not. */
|
|
1028
|
+
withCode?: boolean;
|
|
1029
|
+
}
|
|
1030
|
+
/** Type of the response of `FUNCTION LIST` command. */
|
|
1031
|
+
export type FunctionListResponse = Record<string, GlideString | Record<string, GlideString | null | GlideString[]>[]>[];
|
|
1032
|
+
/**
|
|
1033
|
+
* @internal
|
|
1034
|
+
*/
|
|
1035
|
+
export declare function createFunctionList(options?: FunctionListOptions): command_request.Command;
|
|
1036
|
+
/** Response for `FUNCTION STATS` command on a single node.
|
|
1037
|
+
* The response is a map with 2 keys:
|
|
1038
|
+
* 1. Information about the current running function/script (or null if none).
|
|
1039
|
+
* 2. Details about the execution engines.
|
|
1040
|
+
*/
|
|
1041
|
+
export type FunctionStatsSingleResponse = Record<string, null | Record<string, GlideString | GlideString[] | number> | Record<string, Record<string, number>>>;
|
|
1042
|
+
/** Full response for `FUNCTION STATS` command across multiple nodes.
|
|
1043
|
+
* It maps node addresses to the per-node response.
|
|
1044
|
+
*/
|
|
1045
|
+
export type FunctionStatsFullResponse = Record<string, // Node address
|
|
1046
|
+
FunctionStatsSingleResponse>;
|
|
1047
|
+
/** @internal */
|
|
1048
|
+
export declare function createFunctionStats(): command_request.Command;
|
|
1049
|
+
/** @internal */
|
|
1050
|
+
export declare function createFunctionKill(): command_request.Command;
|
|
1051
|
+
/** @internal */
|
|
1052
|
+
export declare function createFunctionDump(): command_request.Command;
|
|
1053
|
+
/**
|
|
1054
|
+
* Option for `FUNCTION RESTORE` command: {@link GlideClient.functionRestore} and
|
|
1055
|
+
* {@link GlideClusterClient.functionRestore}.
|
|
1056
|
+
*
|
|
1057
|
+
* @see {@link https://valkey.io/commands/function-restore/"|valkey.io} for more details.
|
|
1058
|
+
*/
|
|
1059
|
+
export declare enum FunctionRestorePolicy {
|
|
1060
|
+
/**
|
|
1061
|
+
* Appends the restored libraries to the existing libraries and aborts on collision. This is the
|
|
1062
|
+
* default policy.
|
|
1063
|
+
*/
|
|
1064
|
+
APPEND = "APPEND",
|
|
1065
|
+
/** Deletes all existing libraries before restoring the payload. */
|
|
1066
|
+
FLUSH = "FLUSH",
|
|
1067
|
+
/**
|
|
1068
|
+
* Appends the restored libraries to the existing libraries, replacing any existing ones in case
|
|
1069
|
+
* of name collisions. Note that this policy doesn't prevent function name collisions, only
|
|
1070
|
+
* libraries.
|
|
1071
|
+
*/
|
|
1072
|
+
REPLACE = "REPLACE"
|
|
1073
|
+
}
|
|
1074
|
+
/** @internal */
|
|
1075
|
+
export declare function createFunctionRestore(data: Buffer, policy?: FunctionRestorePolicy): command_request.Command;
|
|
1076
|
+
/**
|
|
1077
|
+
* Represents offsets specifying a string interval to analyze in the {@link BaseClient.bitcount|bitcount} command. The offsets are
|
|
1078
|
+
* zero-based indexes, with `0` being the first index of the string, `1` being the next index and so on.
|
|
1079
|
+
* The offsets can also be negative numbers indicating offsets starting at the end of the string, with `-1` being
|
|
1080
|
+
* the last index of the string, `-2` being the penultimate, and so on.
|
|
1081
|
+
*
|
|
1082
|
+
* See https://valkey.io/commands/bitcount/ for more details.
|
|
1083
|
+
*/
|
|
1084
|
+
export interface BitOffsetOptions {
|
|
1085
|
+
/** The starting offset index. */
|
|
1086
|
+
start: number;
|
|
1087
|
+
/** The ending offset index. Optional since Valkey version 8.0 and above.
|
|
1088
|
+
* If not provided, it will default to the end of the string
|
|
1089
|
+
*/
|
|
1090
|
+
end?: number;
|
|
1091
|
+
/**
|
|
1092
|
+
* The index offset type. This option can only be specified if you are using server version 7.0.0 or above.
|
|
1093
|
+
* Could be either {@link BitmapIndexType.BYTE} or {@link BitmapIndexType.BIT}.
|
|
1094
|
+
* If no index type is provided, the indexes will be assumed to be byte indexes.
|
|
1095
|
+
*/
|
|
1096
|
+
indexType?: BitmapIndexType;
|
|
1097
|
+
}
|
|
1098
|
+
/**
|
|
1099
|
+
* @internal
|
|
1100
|
+
*/
|
|
1101
|
+
export declare function createBitCount(key: GlideString, options?: BitOffsetOptions): command_request.Command;
|
|
1102
|
+
/**
|
|
1103
|
+
* Enumeration specifying if index arguments are BYTE indexes or BIT indexes.
|
|
1104
|
+
* Can be specified in {@link BitOffsetOptions}, which is an optional argument to the {@link BaseClient.bitcount|bitcount} command.
|
|
1105
|
+
* Can also be specified as an optional argument to the {@link BaseClient.bitposInverval|bitposInterval} command.
|
|
1106
|
+
*
|
|
1107
|
+
* since - Valkey version 7.0.0.
|
|
1108
|
+
*/
|
|
1109
|
+
export declare enum BitmapIndexType {
|
|
1110
|
+
/** Specifies that provided indexes are byte indexes. */
|
|
1111
|
+
BYTE = "BYTE",
|
|
1112
|
+
/** Specifies that provided indexes are bit indexes. */
|
|
1113
|
+
BIT = "BIT"
|
|
1114
|
+
}
|
|
1115
|
+
/**
|
|
1116
|
+
* @internal
|
|
1117
|
+
*/
|
|
1118
|
+
export declare function createBitPos(key: GlideString, bit: number, start?: number, end?: number, indexType?: BitmapIndexType): command_request.Command;
|
|
1119
|
+
/**
|
|
1120
|
+
* Defines flushing mode for {@link GlideClient.flushall}, {@link GlideClusterClient.flushall},
|
|
1121
|
+
* {@link GlideClient.functionFlush}, {@link GlideClusterClient.functionFlush},
|
|
1122
|
+
* {@link GlideClient.flushdb} and {@link GlideClusterClient.flushdb} commands.
|
|
1123
|
+
*
|
|
1124
|
+
* See https://valkey.io/commands/flushall/ and https://valkey.io/commands/flushdb/ for details.
|
|
1125
|
+
*/
|
|
1126
|
+
export declare enum FlushMode {
|
|
1127
|
+
/**
|
|
1128
|
+
* Flushes synchronously.
|
|
1129
|
+
*
|
|
1130
|
+
* since Valkey version 6.2.0.
|
|
1131
|
+
*/
|
|
1132
|
+
SYNC = "SYNC",
|
|
1133
|
+
/** Flushes asynchronously. */
|
|
1134
|
+
ASYNC = "ASYNC"
|
|
1135
|
+
}
|
|
1136
|
+
/**
|
|
1137
|
+
* @internal
|
|
1138
|
+
* This function converts an input from Record or GlideRecord types to GlideRecord.
|
|
1139
|
+
*
|
|
1140
|
+
* @param record - input record in either Record or GlideRecord types.
|
|
1141
|
+
* @returns same data in GlideRecord type.
|
|
1142
|
+
*/
|
|
1143
|
+
export declare function convertKeysAndEntries(record: Record<string, string> | GlideRecord<string>): GlideRecord<string>;
|
|
1144
|
+
/** Optional arguments for {@link BaseClient.xread|xread} command. */
|
|
1145
|
+
export interface StreamReadOptions {
|
|
1146
|
+
/**
|
|
1147
|
+
* If set, the read request will block for the set amount of milliseconds or
|
|
1148
|
+
* until the server has the required number of entries. A value of `0` will block indefinitely.
|
|
1149
|
+
* Equivalent to `BLOCK` in the Valkey API.
|
|
1150
|
+
*/
|
|
1151
|
+
block?: number;
|
|
1152
|
+
/**
|
|
1153
|
+
* The maximal number of elements requested.
|
|
1154
|
+
* Equivalent to `COUNT` in the Valkey API.
|
|
1155
|
+
*/
|
|
1156
|
+
count?: number;
|
|
1157
|
+
}
|
|
1158
|
+
/** Optional arguments for {@link BaseClient.xreadgroup|xreadgroup} command. */
|
|
1159
|
+
export type StreamReadGroupOptions = StreamReadOptions & {
|
|
1160
|
+
/**
|
|
1161
|
+
* If set, messages are not added to the Pending Entries List (PEL). This is equivalent to
|
|
1162
|
+
* acknowledging the message when it is read.
|
|
1163
|
+
*/
|
|
1164
|
+
noAck?: boolean;
|
|
1165
|
+
};
|
|
1166
|
+
/**
|
|
1167
|
+
* @internal
|
|
1168
|
+
*/
|
|
1169
|
+
export declare function createXRead(keys_and_ids: GlideRecord<string>, options?: StreamReadOptions): command_request.Command;
|
|
1170
|
+
/** @internal */
|
|
1171
|
+
export declare function createXReadGroup(group: GlideString, consumer: GlideString, keys_and_ids: GlideRecord<string>, options?: StreamReadGroupOptions): command_request.Command;
|
|
1172
|
+
/**
|
|
1173
|
+
* @internal
|
|
1174
|
+
*/
|
|
1175
|
+
export declare function createXInfoStream(key: GlideString, options: boolean | number): command_request.Command;
|
|
1176
|
+
/** @internal */
|
|
1177
|
+
export declare function createXInfoGroups(key: string): command_request.Command;
|
|
1178
|
+
/**
|
|
1179
|
+
* @internal
|
|
1180
|
+
*/
|
|
1181
|
+
export declare function createXLen(key: GlideString): command_request.Command;
|
|
1182
|
+
/** Optional arguments for {@link BaseClient.xpendingWithOptions|xpending}. */
|
|
1183
|
+
export interface StreamPendingOptions {
|
|
1184
|
+
/** Filter pending entries by their idle time - in milliseconds. Available since Valkey 6.2.0. */
|
|
1185
|
+
minIdleTime?: number;
|
|
1186
|
+
/** Starting stream ID bound for range. Exclusive range is available since Valkey 6.2.0. */
|
|
1187
|
+
start: Boundary<string>;
|
|
1188
|
+
/** Ending stream ID bound for range. Exclusive range is available since Valkey 6.2.0. */
|
|
1189
|
+
end: Boundary<string>;
|
|
1190
|
+
/** Limit the number of messages returned. */
|
|
1191
|
+
count: number;
|
|
1192
|
+
/** Filter pending entries by consumer. */
|
|
1193
|
+
consumer?: GlideString;
|
|
1194
|
+
}
|
|
1195
|
+
/** @internal */
|
|
1196
|
+
export declare function createXPending(key: GlideString, group: GlideString, options?: StreamPendingOptions): command_request.Command;
|
|
1197
|
+
/** @internal */
|
|
1198
|
+
export declare function createXInfoConsumers(key: GlideString, group: GlideString): command_request.Command;
|
|
1199
|
+
/** Optional parameters for {@link BaseClient.xclaim|xclaim} command. */
|
|
1200
|
+
export interface StreamClaimOptions {
|
|
1201
|
+
/**
|
|
1202
|
+
* Set the idle time (last time it was delivered) of the message in milliseconds. If `idle`
|
|
1203
|
+
* is not specified, an `idle` of `0` is assumed, that is, the time count is reset
|
|
1204
|
+
* because the message now has a new owner trying to process it.
|
|
1205
|
+
*/
|
|
1206
|
+
idle?: number;
|
|
1207
|
+
/**
|
|
1208
|
+
* This is the same as {@link idle} but instead of a relative amount of milliseconds, it sets the
|
|
1209
|
+
* idle time to a specific Unix time (in milliseconds). This is useful in order to rewrite the AOF
|
|
1210
|
+
* file generating `XCLAIM` commands.
|
|
1211
|
+
*/
|
|
1212
|
+
idleUnixTime?: number;
|
|
1213
|
+
/**
|
|
1214
|
+
* Set the retry counter to the specified value. This counter is incremented every time a message
|
|
1215
|
+
* is delivered again. Normally {@link BaseClient.xclaim|xclaim} does not alter this counter,
|
|
1216
|
+
* which is just served to clients when the {@link BaseClient.xpending|xpending} command is called:
|
|
1217
|
+
* this way clients can detect anomalies, like messages that are never processed for some reason
|
|
1218
|
+
* after a big number of delivery attempts.
|
|
1219
|
+
*/
|
|
1220
|
+
retryCount?: number;
|
|
1221
|
+
/**
|
|
1222
|
+
* Creates the pending message entry in the PEL even if certain specified IDs are not already in
|
|
1223
|
+
* the PEL assigned to a different client. However, the message must exist in the stream,
|
|
1224
|
+
* otherwise the IDs of non-existing messages are ignored.
|
|
1225
|
+
*/
|
|
1226
|
+
isForce?: boolean;
|
|
1227
|
+
}
|
|
1228
|
+
/** @internal */
|
|
1229
|
+
export declare function createXClaim(key: GlideString, group: GlideString, consumer: GlideString, minIdleTime: number, ids: string[], options?: StreamClaimOptions, justId?: boolean): command_request.Command;
|
|
1230
|
+
/** @internal */
|
|
1231
|
+
export declare function createXAutoClaim(key: GlideString, group: GlideString, consumer: GlideString, minIdleTime: number, start: GlideString, count?: number, justId?: boolean): command_request.Command;
|
|
1232
|
+
/**
|
|
1233
|
+
* Optional arguments for {@link BaseClient.xgroupCreate|xgroupCreate}.
|
|
1234
|
+
*
|
|
1235
|
+
* See https://valkey.io/commands/xgroup-create/ for more details.
|
|
1236
|
+
*/
|
|
1237
|
+
export interface StreamGroupOptions {
|
|
1238
|
+
/**
|
|
1239
|
+
* If `true`and the stream doesn't exist, creates a new stream with a length of `0`.
|
|
1240
|
+
*/
|
|
1241
|
+
mkStream?: boolean;
|
|
1242
|
+
/**
|
|
1243
|
+
* An arbitrary ID (that isn't the first ID, last ID, or the zero `"0-0"`. Use it to
|
|
1244
|
+
* find out how many entries are between the arbitrary ID (excluding it) and the stream's last
|
|
1245
|
+
* entry.
|
|
1246
|
+
*
|
|
1247
|
+
* since Valkey version 7.0.0.
|
|
1248
|
+
*/
|
|
1249
|
+
entriesRead?: string;
|
|
1250
|
+
}
|
|
1251
|
+
/**
|
|
1252
|
+
* @internal
|
|
1253
|
+
*/
|
|
1254
|
+
export declare function createXGroupCreate(key: GlideString, groupName: GlideString, id: string, options?: StreamGroupOptions): command_request.Command;
|
|
1255
|
+
/**
|
|
1256
|
+
* @internal
|
|
1257
|
+
*/
|
|
1258
|
+
export declare function createXGroupDestroy(key: GlideString, groupName: GlideString): command_request.Command;
|
|
1259
|
+
/**
|
|
1260
|
+
* @internal
|
|
1261
|
+
*/
|
|
1262
|
+
export declare function createRename(key: GlideString, newKey: GlideString): command_request.Command;
|
|
1263
|
+
/**
|
|
1264
|
+
* @internal
|
|
1265
|
+
*/
|
|
1266
|
+
export declare function createRenameNX(key: GlideString, newKey: GlideString): command_request.Command;
|
|
1267
|
+
/**
|
|
1268
|
+
* @internal
|
|
1269
|
+
*/
|
|
1270
|
+
export declare function createPfAdd(key: GlideString, elements: GlideString[]): command_request.Command;
|
|
1271
|
+
/**
|
|
1272
|
+
* @internal
|
|
1273
|
+
*/
|
|
1274
|
+
export declare function createPfCount(keys: GlideString[]): command_request.Command;
|
|
1275
|
+
/**
|
|
1276
|
+
* @internal
|
|
1277
|
+
*/
|
|
1278
|
+
export declare function createPfMerge(destination: GlideString, sourceKey: GlideString[]): command_request.Command;
|
|
1279
|
+
/**
|
|
1280
|
+
* @internal
|
|
1281
|
+
*/
|
|
1282
|
+
export declare function createObjectEncoding(key: GlideString): command_request.Command;
|
|
1283
|
+
/**
|
|
1284
|
+
* @internal
|
|
1285
|
+
*/
|
|
1286
|
+
export declare function createObjectFreq(key: GlideString): command_request.Command;
|
|
1287
|
+
/**
|
|
1288
|
+
* @internal
|
|
1289
|
+
*/
|
|
1290
|
+
export declare function createObjectIdletime(key: GlideString): command_request.Command;
|
|
1291
|
+
/**
|
|
1292
|
+
* @internal
|
|
1293
|
+
*/
|
|
1294
|
+
export declare function createObjectRefcount(key: GlideString): command_request.Command;
|
|
1295
|
+
/** Additional parameters for `LOLWUT` command. */
|
|
1296
|
+
export interface LolwutOptions {
|
|
1297
|
+
/**
|
|
1298
|
+
* An optional argument that can be used to specify the version of computer art to generate.
|
|
1299
|
+
*/
|
|
1300
|
+
version?: number;
|
|
1301
|
+
/**
|
|
1302
|
+
* An optional argument that can be used to specify the output:
|
|
1303
|
+
* - For version `5`, those are length of the line, number of squares per row, and number of squares per column.
|
|
1304
|
+
* - For version `6`, those are number of columns and number of lines.
|
|
1305
|
+
*/
|
|
1306
|
+
parameters?: number[];
|
|
1307
|
+
}
|
|
1308
|
+
/**
|
|
1309
|
+
* @internal
|
|
1310
|
+
*/
|
|
1311
|
+
export declare function createLolwut(options?: LolwutOptions): command_request.Command;
|
|
1312
|
+
/**
|
|
1313
|
+
* @internal
|
|
1314
|
+
*/
|
|
1315
|
+
export declare function createFlushAll(mode?: FlushMode): command_request.Command;
|
|
1316
|
+
/**
|
|
1317
|
+
* @internal
|
|
1318
|
+
*/
|
|
1319
|
+
export declare function createFlushDB(mode?: FlushMode): command_request.Command;
|
|
1320
|
+
/**
|
|
1321
|
+
* @internal
|
|
1322
|
+
*/
|
|
1323
|
+
export declare function createCopy(source: GlideString, destination: GlideString, options?: {
|
|
1324
|
+
destinationDB?: number;
|
|
1325
|
+
replace?: boolean;
|
|
1326
|
+
}): command_request.Command;
|
|
1327
|
+
/**
|
|
1328
|
+
* @internal
|
|
1329
|
+
*/
|
|
1330
|
+
export declare function createMove(key: GlideString, dbIndex: number): command_request.Command;
|
|
1331
|
+
/**
|
|
1332
|
+
* @internal
|
|
1333
|
+
*/
|
|
1334
|
+
export declare function createDump(key: GlideString): command_request.Command;
|
|
1335
|
+
/**
|
|
1336
|
+
* Optional arguments for `RESTORE` command.
|
|
1337
|
+
*
|
|
1338
|
+
* @See {@link https://valkey.io/commands/restore/|valkey.io} for details.
|
|
1339
|
+
* @remarks `IDLETIME` and `FREQ` modifiers cannot be set at the same time.
|
|
1340
|
+
*/
|
|
1341
|
+
export interface RestoreOptions {
|
|
1342
|
+
/**
|
|
1343
|
+
* Set to `true` to replace the key if it exists.
|
|
1344
|
+
*/
|
|
1345
|
+
replace?: boolean;
|
|
1346
|
+
/**
|
|
1347
|
+
* Set to `true` to specify that `ttl` argument of {@link BaseClient.restore} represents
|
|
1348
|
+
* an absolute Unix timestamp (in milliseconds).
|
|
1349
|
+
*/
|
|
1350
|
+
absttl?: boolean;
|
|
1351
|
+
/**
|
|
1352
|
+
* Set the `IDLETIME` option with object idletime to the given key.
|
|
1353
|
+
*/
|
|
1354
|
+
idletime?: number;
|
|
1355
|
+
/**
|
|
1356
|
+
* Set the `FREQ` option with object frequency to the given key.
|
|
1357
|
+
*/
|
|
1358
|
+
frequency?: number;
|
|
1359
|
+
}
|
|
1360
|
+
/**
|
|
1361
|
+
* @internal
|
|
1362
|
+
*/
|
|
1363
|
+
export declare function createRestore(key: GlideString, ttl: number, value: GlideString, options?: RestoreOptions): command_request.Command;
|
|
1364
|
+
/**
|
|
1365
|
+
* Optional arguments to LPOS command.
|
|
1366
|
+
*
|
|
1367
|
+
* See https://valkey.io/commands/lpos/ for more details.
|
|
1368
|
+
*/
|
|
1369
|
+
export interface LPosOptions {
|
|
1370
|
+
/** The rank of the match to return. */
|
|
1371
|
+
rank?: number;
|
|
1372
|
+
/** The specific number of matching indices from a list. */
|
|
1373
|
+
count?: number;
|
|
1374
|
+
/** The maximum number of comparisons to make between the element and the items in the list. */
|
|
1375
|
+
maxLength?: number;
|
|
1376
|
+
}
|
|
1377
|
+
/**
|
|
1378
|
+
* @internal
|
|
1379
|
+
*/
|
|
1380
|
+
export declare function createLPos(key: GlideString, element: GlideString, options?: LPosOptions): command_request.Command;
|
|
1381
|
+
/**
|
|
1382
|
+
* @internal
|
|
1383
|
+
*/
|
|
1384
|
+
export declare function createDBSize(): command_request.Command;
|
|
1385
|
+
/**
|
|
1386
|
+
* An optional condition to the {@link BaseClient.geoadd | geoadd},
|
|
1387
|
+
* {@link BaseClient.zadd | zadd} and {@link BaseClient.set | set} commands.
|
|
1388
|
+
*/
|
|
1389
|
+
export declare enum ConditionalChange {
|
|
1390
|
+
/**
|
|
1391
|
+
* Only update elements that already exist. Don't add new elements. Equivalent to `XX` in the Valkey API.
|
|
1392
|
+
*/
|
|
1393
|
+
ONLY_IF_EXISTS = "XX",
|
|
1394
|
+
/**
|
|
1395
|
+
* Only add new elements. Don't update already existing elements. Equivalent to `NX` in the Valkey API.
|
|
1396
|
+
*/
|
|
1397
|
+
ONLY_IF_DOES_NOT_EXIST = "NX"
|
|
1398
|
+
}
|
|
1399
|
+
/**
|
|
1400
|
+
* Represents a geographic position defined by longitude and latitude.
|
|
1401
|
+
* The exact limits, as specified by `EPSG:900913 / EPSG:3785 / OSGEO:41001` are the
|
|
1402
|
+
* following:
|
|
1403
|
+
*
|
|
1404
|
+
* Valid longitudes are from `-180` to `180` degrees.
|
|
1405
|
+
* Valid latitudes are from `-85.05112878` to `85.05112878` degrees.
|
|
1406
|
+
*/
|
|
1407
|
+
export interface GeospatialData {
|
|
1408
|
+
/** The longitude coordinate. */
|
|
1409
|
+
longitude: number;
|
|
1410
|
+
/** The latitude coordinate. */
|
|
1411
|
+
latitude: number;
|
|
1412
|
+
}
|
|
1413
|
+
/**
|
|
1414
|
+
* Optional arguments for the GeoAdd command.
|
|
1415
|
+
*
|
|
1416
|
+
* See https://valkey.io/commands/geoadd/ for more details.
|
|
1417
|
+
*/
|
|
1418
|
+
export interface GeoAddOptions {
|
|
1419
|
+
/** Options for handling existing members. See {@link ConditionalChange}. */
|
|
1420
|
+
updateMode?: ConditionalChange;
|
|
1421
|
+
/** If `true`, returns the count of changed elements instead of new elements added. */
|
|
1422
|
+
changed?: boolean;
|
|
1423
|
+
}
|
|
1424
|
+
/**
|
|
1425
|
+
* @internal
|
|
1426
|
+
*/
|
|
1427
|
+
export declare function createGeoAdd(key: GlideString, membersToGeospatialData: Map<GlideString, GeospatialData>, options?: GeoAddOptions): command_request.Command;
|
|
1428
|
+
/** Enumeration representing distance units options. */
|
|
1429
|
+
export declare enum GeoUnit {
|
|
1430
|
+
/** Represents distance in meters. */
|
|
1431
|
+
METERS = "m",
|
|
1432
|
+
/** Represents distance in kilometers. */
|
|
1433
|
+
KILOMETERS = "km",
|
|
1434
|
+
/** Represents distance in miles. */
|
|
1435
|
+
MILES = "mi",
|
|
1436
|
+
/** Represents distance in feet. */
|
|
1437
|
+
FEET = "ft"
|
|
1438
|
+
}
|
|
1439
|
+
/**
|
|
1440
|
+
* @internal
|
|
1441
|
+
*/
|
|
1442
|
+
export declare function createGeoPos(key: GlideString, members: GlideString[]): command_request.Command;
|
|
1443
|
+
/**
|
|
1444
|
+
* @internal
|
|
1445
|
+
*/
|
|
1446
|
+
export declare function createGeoDist(key: GlideString, member1: GlideString, member2: GlideString, geoUnit?: GeoUnit): command_request.Command;
|
|
1447
|
+
/**
|
|
1448
|
+
* @internal
|
|
1449
|
+
*/
|
|
1450
|
+
export declare function createGeoHash(key: GlideString, members: GlideString[]): command_request.Command;
|
|
1451
|
+
/**
|
|
1452
|
+
* Optional parameters for {@link BaseClient.geosearch|geosearch} command which defines what should be included in the
|
|
1453
|
+
* search results and how results should be ordered and limited.
|
|
1454
|
+
*/
|
|
1455
|
+
export type GeoSearchResultOptions = GeoSearchCommonResultOptions & {
|
|
1456
|
+
/** Include the coordinate of the returned items. */
|
|
1457
|
+
withCoord?: boolean;
|
|
1458
|
+
/**
|
|
1459
|
+
* Include the distance of the returned items from the specified center point.
|
|
1460
|
+
* The distance is returned in the same unit as specified for the `searchBy` argument.
|
|
1461
|
+
*/
|
|
1462
|
+
withDist?: boolean;
|
|
1463
|
+
/** Include the geohash of the returned items. */
|
|
1464
|
+
withHash?: boolean;
|
|
1465
|
+
};
|
|
1466
|
+
/**
|
|
1467
|
+
* Optional parameters for {@link BaseClient.geosearchstore|geosearchstore} command which defines what should be included in the
|
|
1468
|
+
* search results and how results should be ordered and limited.
|
|
1469
|
+
*/
|
|
1470
|
+
export type GeoSearchStoreResultOptions = GeoSearchCommonResultOptions & {
|
|
1471
|
+
/**
|
|
1472
|
+
* Determines what is stored as the sorted set score. Defaults to `false`.
|
|
1473
|
+
* - If set to `false`, the geohash of the location will be stored as the sorted set score.
|
|
1474
|
+
* - If set to `true`, the distance from the center of the shape (circle or box) will be stored as the sorted set score. The distance is represented as a floating-point number in the same unit specified for that shape.
|
|
1475
|
+
*/
|
|
1476
|
+
storeDist?: boolean;
|
|
1477
|
+
};
|
|
1478
|
+
interface GeoSearchCommonResultOptions {
|
|
1479
|
+
/** Indicates the order the result should be sorted in. */
|
|
1480
|
+
sortOrder?: SortOrder;
|
|
1481
|
+
/** Indicates the number of matches the result should be limited to. */
|
|
1482
|
+
count?: number;
|
|
1483
|
+
/** Whether to allow returning as enough matches are found. This requires `count` parameter to be set. */
|
|
1484
|
+
isAny?: boolean;
|
|
1485
|
+
}
|
|
1486
|
+
/** Defines the sort order for nested results. */
|
|
1487
|
+
export declare enum SortOrder {
|
|
1488
|
+
/** Sort by ascending order. */
|
|
1489
|
+
ASC = "ASC",
|
|
1490
|
+
/** Sort by descending order. */
|
|
1491
|
+
DESC = "DESC"
|
|
1492
|
+
}
|
|
1493
|
+
export type GeoSearchShape = GeoCircleShape | GeoBoxShape;
|
|
1494
|
+
/** Circle search shape defined by the radius value and measurement unit. */
|
|
1495
|
+
export interface GeoCircleShape {
|
|
1496
|
+
/** The radius to search by. */
|
|
1497
|
+
radius: number;
|
|
1498
|
+
/** The measurement unit of the radius. */
|
|
1499
|
+
unit: GeoUnit;
|
|
1500
|
+
}
|
|
1501
|
+
/** Rectangle search shape defined by the width and height and measurement unit. */
|
|
1502
|
+
export interface GeoBoxShape {
|
|
1503
|
+
/** The width of the rectangle to search by. */
|
|
1504
|
+
width: number;
|
|
1505
|
+
/** The height of the rectangle to search by. */
|
|
1506
|
+
height: number;
|
|
1507
|
+
/** The measurement unit of the width and height. */
|
|
1508
|
+
unit: GeoUnit;
|
|
1509
|
+
}
|
|
1510
|
+
export type SearchOrigin = CoordOrigin | MemberOrigin;
|
|
1511
|
+
/** The search origin represented by a {@link GeospatialData} position. */
|
|
1512
|
+
export interface CoordOrigin {
|
|
1513
|
+
/** The pivot location to search from. */
|
|
1514
|
+
position: GeospatialData;
|
|
1515
|
+
}
|
|
1516
|
+
/** The search origin represented by an existing member. */
|
|
1517
|
+
export interface MemberOrigin {
|
|
1518
|
+
/** Member (location) name stored in the sorted set to use as a search pivot. */
|
|
1519
|
+
member: GlideString;
|
|
1520
|
+
}
|
|
1521
|
+
/** @internal */
|
|
1522
|
+
export declare function createGeoSearch(key: GlideString, searchFrom: SearchOrigin, searchBy: GeoSearchShape, resultOptions?: GeoSearchResultOptions): command_request.Command;
|
|
1523
|
+
/** @internal */
|
|
1524
|
+
export declare function createGeoSearchStore(destination: GlideString, source: GlideString, searchFrom: SearchOrigin, searchBy: GeoSearchShape, resultOptions?: GeoSearchStoreResultOptions): command_request.Command;
|
|
1525
|
+
/**
|
|
1526
|
+
* @internal
|
|
1527
|
+
*/
|
|
1528
|
+
export declare function createZRevRank(key: GlideString, member: GlideString): command_request.Command;
|
|
1529
|
+
/**
|
|
1530
|
+
* @internal
|
|
1531
|
+
*/
|
|
1532
|
+
export declare function createZRevRankWithScore(key: GlideString, member: GlideString): command_request.Command;
|
|
1533
|
+
/**
|
|
1534
|
+
* Mandatory option for zmpop.
|
|
1535
|
+
* Defines which elements to pop from the sorted set.
|
|
1536
|
+
*/
|
|
1537
|
+
export declare enum ScoreFilter {
|
|
1538
|
+
/** Pop elements with the highest scores. */
|
|
1539
|
+
MAX = "MAX",
|
|
1540
|
+
/** Pop elements with the lowest scores. */
|
|
1541
|
+
MIN = "MIN"
|
|
1542
|
+
}
|
|
1543
|
+
/**
|
|
1544
|
+
* @internal
|
|
1545
|
+
*/
|
|
1546
|
+
export declare function createZMPop(keys: GlideString[], modifier: ScoreFilter, count?: number): command_request.Command;
|
|
1547
|
+
/**
|
|
1548
|
+
* @internal
|
|
1549
|
+
*/
|
|
1550
|
+
export declare function createBZMPop(keys: GlideString[], modifier: ScoreFilter, timeout: number, count?: number): command_request.Command;
|
|
1551
|
+
/**
|
|
1552
|
+
* @internal
|
|
1553
|
+
*/
|
|
1554
|
+
export declare function createZIncrBy(key: GlideString, increment: number, member: GlideString): command_request.Command;
|
|
1555
|
+
/**
|
|
1556
|
+
* Optional arguments to {@link BaseClient.sort|sort}, {@link BaseClient.sortStore|sortStore} and {@link BaseClient.sortReadOnly|sortReadOnly} commands.
|
|
1557
|
+
*
|
|
1558
|
+
* See https://valkey.io/commands/sort/ for more details.
|
|
1559
|
+
*
|
|
1560
|
+
* @remarks When in cluster mode, {@link SortOptions.byPattern|byPattern} and {@link SortOptions.getPatterns|getPattern} must map to the same hash
|
|
1561
|
+
* slot as the key, and this is supported only since Valkey version 8.0.
|
|
1562
|
+
*/
|
|
1563
|
+
export interface SortOptions {
|
|
1564
|
+
/**
|
|
1565
|
+
* A pattern to sort by external keys instead of by the elements stored at the key themselves. The
|
|
1566
|
+
* pattern should contain an asterisk (*) as a placeholder for the element values, where the value
|
|
1567
|
+
* from the key replaces the asterisk to create the key name. For example, if `key`
|
|
1568
|
+
* contains IDs of objects, `byPattern` can be used to sort these IDs based on an
|
|
1569
|
+
* attribute of the objects, like their weights or timestamps.
|
|
1570
|
+
* Supported in cluster mode since Valkey version 8.0 and above.
|
|
1571
|
+
*/
|
|
1572
|
+
byPattern?: GlideString;
|
|
1573
|
+
/**
|
|
1574
|
+
* Limiting the range of the query by setting offset and result count. See {@link Limit} class for
|
|
1575
|
+
* more information.
|
|
1576
|
+
*/
|
|
1577
|
+
limit?: Limit;
|
|
1578
|
+
/**
|
|
1579
|
+
* A pattern used to retrieve external keys' values, instead of the elements at `key`.
|
|
1580
|
+
* The pattern should contain an asterisk (`*`) as a placeholder for the element values, where the
|
|
1581
|
+
* value from `key` replaces the asterisk to create the `key` name. This
|
|
1582
|
+
* allows the sorted elements to be transformed based on the related keys values. For example, if
|
|
1583
|
+
* `key` contains IDs of users, `getPatterns` can be used to retrieve
|
|
1584
|
+
* specific attributes of these users, such as their names or email addresses. E.g., if
|
|
1585
|
+
* `getPatterns` is `name_*`, the command will return the values of the keys
|
|
1586
|
+
* `name_<element>` for each sorted element. Multiple `getPatterns`
|
|
1587
|
+
* arguments can be provided to retrieve multiple attributes. The special value `#` can
|
|
1588
|
+
* be used to include the actual element from `key` being sorted. If not provided, only
|
|
1589
|
+
* the sorted elements themselves are returned.
|
|
1590
|
+
* Supported in cluster mode since Valkey version 8.0 and above.
|
|
1591
|
+
*/
|
|
1592
|
+
getPatterns?: GlideString[];
|
|
1593
|
+
/** Options for sorting order of elements. */
|
|
1594
|
+
orderBy?: SortOrder;
|
|
1595
|
+
/**
|
|
1596
|
+
* When `true`, sorts elements lexicographically. When `false` (default),
|
|
1597
|
+
* sorts elements numerically. Use this when the list, set, or sorted set contains string values
|
|
1598
|
+
* that cannot be converted into double precision floating point numbers.
|
|
1599
|
+
*/
|
|
1600
|
+
isAlpha?: boolean;
|
|
1601
|
+
}
|
|
1602
|
+
/**
|
|
1603
|
+
* The `LIMIT` argument is commonly used to specify a subset of results from the
|
|
1604
|
+
* matching elements, similar to the `LIMIT` clause in SQL (e.g., `SELECT LIMIT offset, count`).
|
|
1605
|
+
*/
|
|
1606
|
+
export interface Limit {
|
|
1607
|
+
/** The starting position of the range, zero based. */
|
|
1608
|
+
offset: number;
|
|
1609
|
+
/** The maximum number of elements to include in the range. A negative count returns all elements from the offset. */
|
|
1610
|
+
count: number;
|
|
1611
|
+
}
|
|
1612
|
+
/** @internal */
|
|
1613
|
+
export declare function createSort(key: GlideString, options?: SortOptions, destination?: GlideString): command_request.Command;
|
|
1614
|
+
/** @internal */
|
|
1615
|
+
export declare function createSortReadOnly(key: GlideString, options?: SortOptions): command_request.Command;
|
|
1616
|
+
/**
|
|
1617
|
+
* @internal
|
|
1618
|
+
*/
|
|
1619
|
+
export declare function createHStrlen(key: GlideString, field: GlideString): command_request.Command;
|
|
1620
|
+
/** @internal */
|
|
1621
|
+
export declare function createHRandField(key: GlideString, count?: number, withValues?: boolean): command_request.Command;
|
|
1622
|
+
/**
|
|
1623
|
+
* @internal
|
|
1624
|
+
*/
|
|
1625
|
+
export declare function createHScan(key: GlideString, cursor: string, options?: HScanOptions): command_request.Command;
|
|
1626
|
+
/**
|
|
1627
|
+
* @internal
|
|
1628
|
+
*/
|
|
1629
|
+
export declare function createZRandMember(key: GlideString, count?: number, withscores?: boolean): command_request.Command;
|
|
1630
|
+
/** @internal */
|
|
1631
|
+
export declare function createLastSave(): command_request.Command;
|
|
1632
|
+
/** @internal */
|
|
1633
|
+
export declare function createLCS(key1: GlideString, key2: GlideString, options?: {
|
|
1634
|
+
len?: boolean;
|
|
1635
|
+
idx?: {
|
|
1636
|
+
withMatchLen?: boolean;
|
|
1637
|
+
minMatchLen?: number;
|
|
1638
|
+
};
|
|
1639
|
+
}): command_request.Command;
|
|
1640
|
+
/**
|
|
1641
|
+
* @internal
|
|
1642
|
+
*/
|
|
1643
|
+
export declare function createTouch(keys: GlideString[]): command_request.Command;
|
|
1644
|
+
/** @internal */
|
|
1645
|
+
export declare function createRandomKey(): command_request.Command;
|
|
1646
|
+
/** @internal */
|
|
1647
|
+
export declare function createWatch(keys: GlideString[]): command_request.Command;
|
|
1648
|
+
/** @internal */
|
|
1649
|
+
export declare function createUnWatch(): command_request.Command;
|
|
1650
|
+
/** @internal */
|
|
1651
|
+
export declare function createWait(numreplicas: number, timeout: number): command_request.Command;
|
|
1652
|
+
/**
|
|
1653
|
+
* This base class represents the common set of optional arguments for the SCAN family of commands.
|
|
1654
|
+
* Concrete implementations of this class are tied to specific SCAN commands (`SCAN`, `SSCAN`).
|
|
1655
|
+
*/
|
|
1656
|
+
export interface BaseScanOptions {
|
|
1657
|
+
/**
|
|
1658
|
+
* The match filter is applied to the result of the command and will only include
|
|
1659
|
+
* strings that match the pattern specified. If the sorted set is large enough for scan commands to return
|
|
1660
|
+
* only a subset of the sorted set then there could be a case where the result is empty although there are
|
|
1661
|
+
* items that match the pattern specified. This is due to the default `COUNT` being `10` which indicates
|
|
1662
|
+
* that it will only fetch and match `10` items from the list.
|
|
1663
|
+
*/
|
|
1664
|
+
match?: GlideString;
|
|
1665
|
+
/**
|
|
1666
|
+
* `COUNT` is a just a hint for the command for how many elements to fetch from the
|
|
1667
|
+
* sorted set. `COUNT` could be ignored until the sorted set is large enough for the `SCAN` commands to
|
|
1668
|
+
* represent the results as compact single-allocation packed encoding.
|
|
1669
|
+
*/
|
|
1670
|
+
readonly count?: number;
|
|
1671
|
+
}
|
|
1672
|
+
/**
|
|
1673
|
+
* Options for the SCAN command.
|
|
1674
|
+
* `match`: The match filter is applied to the result of the command and will only include keys that match the pattern specified.
|
|
1675
|
+
* `count`: `COUNT` is a just a hint for the command for how many elements to fetch from the server, the default is 10.
|
|
1676
|
+
* `type`: The type of the object to scan.
|
|
1677
|
+
* Types are the data types of Valkey: `string`, `list`, `set`, `zset`, `hash`, `stream`.
|
|
1678
|
+
*/
|
|
1679
|
+
export interface ScanOptions extends BaseScanOptions {
|
|
1680
|
+
type?: ObjectType;
|
|
1681
|
+
}
|
|
1682
|
+
/**
|
|
1683
|
+
* Options specific to the ZSCAN command, extending from the base scan options.
|
|
1684
|
+
*/
|
|
1685
|
+
export type ZScanOptions = BaseScanOptions & {
|
|
1686
|
+
/**
|
|
1687
|
+
* If true, the scores are not included in the results.
|
|
1688
|
+
* Supported from Valkey 8.0.0 and above.
|
|
1689
|
+
*/
|
|
1690
|
+
readonly noScores?: boolean;
|
|
1691
|
+
};
|
|
1692
|
+
/**
|
|
1693
|
+
* Options specific to the HSCAN command, extending from the base scan options.
|
|
1694
|
+
*/
|
|
1695
|
+
export type HScanOptions = BaseScanOptions & {
|
|
1696
|
+
/**
|
|
1697
|
+
* If true, the values of the fields are not included in the results.
|
|
1698
|
+
* Supported from Valkey 8.0.0 and above.
|
|
1699
|
+
*/
|
|
1700
|
+
readonly noValues?: boolean;
|
|
1701
|
+
};
|
|
1702
|
+
/**
|
|
1703
|
+
* @internal
|
|
1704
|
+
*/
|
|
1705
|
+
export declare function createZScan(key: GlideString, cursor: string, options?: ZScanOptions): command_request.Command;
|
|
1706
|
+
/** @internal */
|
|
1707
|
+
export declare function createSetRange(key: GlideString, offset: number, value: GlideString): command_request.Command;
|
|
1708
|
+
/** @internal */
|
|
1709
|
+
export declare function createAppend(key: GlideString, value: GlideString): command_request.Command;
|
|
1710
|
+
/**
|
|
1711
|
+
* @internal
|
|
1712
|
+
*/
|
|
1713
|
+
export declare function createLMPop(keys: GlideString[], direction: ListDirection, count?: number): command_request.Command;
|
|
1714
|
+
/**
|
|
1715
|
+
* @internal
|
|
1716
|
+
*/
|
|
1717
|
+
export declare function createBLMPop(keys: GlideString[], direction: ListDirection, timeout: number, count?: number): command_request.Command;
|
|
1718
|
+
/**
|
|
1719
|
+
* @internal
|
|
1720
|
+
*/
|
|
1721
|
+
export declare function createPubSubChannels(pattern?: GlideString): command_request.Command;
|
|
1722
|
+
/**
|
|
1723
|
+
* @internal
|
|
1724
|
+
*/
|
|
1725
|
+
export declare function createPubSubNumPat(): command_request.Command;
|
|
1726
|
+
/**
|
|
1727
|
+
* @internal
|
|
1728
|
+
*/
|
|
1729
|
+
export declare function createPubSubNumSub(channels?: GlideString[]): command_request.Command;
|
|
1730
|
+
/**
|
|
1731
|
+
* @internal
|
|
1732
|
+
*/
|
|
1733
|
+
export declare function createPubsubShardChannels(pattern?: GlideString): command_request.Command;
|
|
1734
|
+
/**
|
|
1735
|
+
* @internal
|
|
1736
|
+
*/
|
|
1737
|
+
export declare function createPubSubShardNumSub(channels?: GlideString[]): command_request.Command;
|
|
1738
|
+
/**
|
|
1739
|
+
* @internal
|
|
1740
|
+
*/
|
|
1741
|
+
export declare function createBZPopMax(keys: GlideString[], timeout: number): command_request.Command;
|
|
1742
|
+
/**
|
|
1743
|
+
* @internal
|
|
1744
|
+
*/
|
|
1745
|
+
export declare function createBZPopMin(keys: GlideString[], timeout: number): command_request.Command;
|
|
1746
|
+
/**
|
|
1747
|
+
* @internal
|
|
1748
|
+
*/
|
|
1749
|
+
export declare function createScriptShow(sha1: GlideString): command_request.Command;
|
|
1750
|
+
/**
|
|
1751
|
+
* Time unit representation which is used in optional arguments for {@link BaseClient.getex|getex} and {@link BaseClient.set|set} command.
|
|
1752
|
+
*/
|
|
1753
|
+
export declare enum TimeUnit {
|
|
1754
|
+
/**
|
|
1755
|
+
* Set the specified expire time, in seconds. Equivalent to
|
|
1756
|
+
* `EX` in the VALKEY API.
|
|
1757
|
+
*/
|
|
1758
|
+
Seconds = "EX",
|
|
1759
|
+
/**
|
|
1760
|
+
* Set the specified expire time, in milliseconds. Equivalent
|
|
1761
|
+
* to `PX` in the VALKEY API.
|
|
1762
|
+
*/
|
|
1763
|
+
Milliseconds = "PX",
|
|
1764
|
+
/**
|
|
1765
|
+
* Set the specified Unix time at which the key will expire,
|
|
1766
|
+
* in seconds. Equivalent to `EXAT` in the VALKEY API.
|
|
1767
|
+
*/
|
|
1768
|
+
UnixSeconds = "EXAT",
|
|
1769
|
+
/**
|
|
1770
|
+
* Set the specified Unix time at which the key will expire,
|
|
1771
|
+
* in milliseconds. Equivalent to `PXAT` in the VALKEY API.
|
|
1772
|
+
*/
|
|
1773
|
+
UnixMilliseconds = "PXAT"
|
|
1774
|
+
}
|
|
1775
|
+
/**
|
|
1776
|
+
* @internal
|
|
1777
|
+
*/
|
|
1778
|
+
export declare function createGetEx(key: GlideString, options?: "persist" | {
|
|
1779
|
+
type: TimeUnit;
|
|
1780
|
+
duration: number;
|
|
1781
|
+
}): command_request.Command;
|
|
1782
|
+
/**
|
|
1783
|
+
* @internal
|
|
1784
|
+
*/
|
|
1785
|
+
export declare function createXAck(key: GlideString, group: GlideString, ids: string[]): command_request.Command;
|
|
1786
|
+
/**
|
|
1787
|
+
* @internal
|
|
1788
|
+
*/
|
|
1789
|
+
export declare function createXGroupSetid(key: GlideString, groupName: GlideString, id: string, entriesRead?: number): command_request.Command;
|
|
1790
|
+
/**
|
|
1791
|
+
* @internal
|
|
1792
|
+
*/
|
|
1793
|
+
export declare function createScriptExists(sha1s: GlideString[]): command_request.Command;
|
|
1794
|
+
/**
|
|
1795
|
+
* @internal
|
|
1796
|
+
*/
|
|
1797
|
+
export declare function createScriptFlush(mode?: FlushMode): command_request.Command;
|
|
1798
|
+
/** @internal */
|
|
1799
|
+
export declare function createScriptKill(): command_request.Command;
|
|
1800
|
+
export {};
|