@upstash/redis 1.38.4 → 1.39.0
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/{chunk-2JFYL2VL.mjs → chunk-4WQYU7T6.mjs} +614 -8
- package/cloudflare.d.mts +2 -2
- package/cloudflare.d.ts +2 -2
- package/cloudflare.js +613 -8
- package/cloudflare.mjs +1 -1
- package/{error-8y4qG0W2.d.mts → error-DOszGRxg.d.mts} +703 -3
- package/{error-8y4qG0W2.d.ts → error-DOszGRxg.d.ts} +703 -3
- package/fastly.d.mts +2 -2
- package/fastly.d.ts +2 -2
- package/fastly.js +613 -8
- package/fastly.mjs +1 -1
- package/nodejs.d.mts +2 -2
- package/nodejs.d.ts +2 -2
- package/nodejs.js +615 -8
- package/nodejs.mjs +3 -1
- package/package.json +1 -1
|
@@ -212,6 +212,235 @@ declare class TypeCommand extends Command<Type, Type> {
|
|
|
212
212
|
constructor(cmd: [key: string], opts?: CommandOptions<Type, Type>);
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
+
type ArInfoOptions = {
|
|
216
|
+
/**
|
|
217
|
+
* Also report per-slice statistics. This walks the whole array.
|
|
218
|
+
*/
|
|
219
|
+
full?: boolean;
|
|
220
|
+
};
|
|
221
|
+
type ArInfoResult = {
|
|
222
|
+
/** Highest occupied index plus one, as reported by `arlen`. A string, like every index. */
|
|
223
|
+
len: string;
|
|
224
|
+
/** Number of occupied slots, as reported by `arcount`. */
|
|
225
|
+
count: number;
|
|
226
|
+
/** Number of indexes covered by one slice. */
|
|
227
|
+
sliceSize: number;
|
|
228
|
+
/** Number of slices currently allocated. */
|
|
229
|
+
slices: number;
|
|
230
|
+
/** Number of entries in the slice directory. */
|
|
231
|
+
directorySize: number;
|
|
232
|
+
/** Number of entries in the top-level directory. */
|
|
233
|
+
superDirEntries: number;
|
|
234
|
+
/** Index the next `arinsert` would write to. A string, like every index. */
|
|
235
|
+
nextInsertIndex: string;
|
|
236
|
+
/** Slices stored in dense form. Only with `full`. */
|
|
237
|
+
denseSlices?: number;
|
|
238
|
+
/** Slices stored in sparse form. Only with `full`. */
|
|
239
|
+
sparseSlices?: number;
|
|
240
|
+
/** Average number of values in a dense slice. Only with `full`. */
|
|
241
|
+
avgDenseSize?: number;
|
|
242
|
+
/** Average fill ratio of a dense slice. Only with `full`. */
|
|
243
|
+
avgDenseFill?: number;
|
|
244
|
+
/** Average number of values in a sparse slice. Only with `full`. */
|
|
245
|
+
avgSparseSize?: number;
|
|
246
|
+
};
|
|
247
|
+
type RawArInfo = unknown[] | Record<string, unknown>;
|
|
248
|
+
/**
|
|
249
|
+
* Describes how an array is laid out in memory. Throws if the key does not exist.
|
|
250
|
+
*
|
|
251
|
+
* @see https://upstash.com/docs/redis/commands/array/arinfo
|
|
252
|
+
*/
|
|
253
|
+
declare class ArInfoCommand extends Command<RawArInfo, ArInfoResult> {
|
|
254
|
+
constructor([key, opts]: [key: string, opts?: ArInfoOptions], cmdOpts?: CommandOptions<RawArInfo, ArInfoResult>);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* A single `ARGREP` predicate:
|
|
259
|
+
* - `exact`: the whole value equals the pattern
|
|
260
|
+
* - `match`: the value contains the pattern as a substring
|
|
261
|
+
* - `glob`: the value matches a glob pattern (`*` and `?`)
|
|
262
|
+
* - `re`: the value matches a regular expression
|
|
263
|
+
*/
|
|
264
|
+
type ArGrepPredicate = {
|
|
265
|
+
exact: string;
|
|
266
|
+
} | {
|
|
267
|
+
match: string;
|
|
268
|
+
} | {
|
|
269
|
+
glob: string;
|
|
270
|
+
} | {
|
|
271
|
+
re: string;
|
|
272
|
+
};
|
|
273
|
+
type ArGrepOptions = {
|
|
274
|
+
/**
|
|
275
|
+
* One or more predicates (at most 250).
|
|
276
|
+
*/
|
|
277
|
+
predicates: ArGrepPredicate[];
|
|
278
|
+
/**
|
|
279
|
+
* How to combine several predicates. `OR` (the default) matches a slot when any predicate
|
|
280
|
+
* matches, `AND` requires all of them.
|
|
281
|
+
*/
|
|
282
|
+
combine?: "AND" | "OR" | "and" | "or";
|
|
283
|
+
/**
|
|
284
|
+
* Compare case-insensitively.
|
|
285
|
+
*/
|
|
286
|
+
noCase?: boolean;
|
|
287
|
+
/**
|
|
288
|
+
* Return `[index, value]` pairs instead of bare indexes.
|
|
289
|
+
*/
|
|
290
|
+
withValues?: boolean;
|
|
291
|
+
/**
|
|
292
|
+
* Maximum number of matches to return.
|
|
293
|
+
*/
|
|
294
|
+
limit?: number;
|
|
295
|
+
};
|
|
296
|
+
/**
|
|
297
|
+
* Matching indexes, or `[index, value]` pairs when `withValues` is `true`. Indexes are returned as
|
|
298
|
+
* strings; see `arlen`.
|
|
299
|
+
*/
|
|
300
|
+
type ArGrepResult<TData, TOpts extends ArGrepOptions> = TOpts extends {
|
|
301
|
+
withValues: true;
|
|
302
|
+
} ? [string, TData][] : TOpts extends {
|
|
303
|
+
withValues: false;
|
|
304
|
+
} ? string[] : "withValues" extends keyof TOpts ? string[] | [string, TData][] : string[];
|
|
305
|
+
/**
|
|
306
|
+
* Returns the indexes in `[start, end]` whose value matches the given predicates, or
|
|
307
|
+
* `[index, value]` pairs with `withValues`. `start` and `end` accept `"-"` and `"+"` for the lowest
|
|
308
|
+
* and highest possible index.
|
|
309
|
+
*
|
|
310
|
+
* @see https://upstash.com/docs/redis/commands/array/argrep
|
|
311
|
+
*/
|
|
312
|
+
declare class ArGrepCommand<TData = string, TOpts extends ArGrepOptions = ArGrepOptions> extends Command<unknown[], ArGrepResult<TData, TOpts>> {
|
|
313
|
+
constructor([key, start, end, opts]: [
|
|
314
|
+
key: string,
|
|
315
|
+
start: number | string,
|
|
316
|
+
end: number | string,
|
|
317
|
+
opts: TOpts
|
|
318
|
+
], cmdOpts?: CommandOptions<unknown[], ArGrepResult<TData, TOpts>>);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Distance metric used by a vector index.
|
|
323
|
+
*/
|
|
324
|
+
type VectorMetric = "COSINE" | "EUCLIDEAN" | "DOT";
|
|
325
|
+
/**
|
|
326
|
+
* Speed / recall trade-off for `VECTOR.QUERY`.
|
|
327
|
+
*
|
|
328
|
+
* @default "BALANCED"
|
|
329
|
+
*/
|
|
330
|
+
type VectorQueryProfile = "FAST" | "BALANCED" | "PRECISE";
|
|
331
|
+
/**
|
|
332
|
+
* A vector to add or query with. Accepts:
|
|
333
|
+
* - `number[]`: sent as `VALUES <n> <f1> ... <fn>`
|
|
334
|
+
* - `Float32Array`: encoded as little-endian FP32 and sent as `BASE64-FP32 <b64>`
|
|
335
|
+
* - `{ base64: string }`: a base64-encoded little-endian FP32 blob, sent as-is with `BASE64-FP32`
|
|
336
|
+
* (e.g. the `encoding_format: "base64"` output of embedding providers)
|
|
337
|
+
*/
|
|
338
|
+
type VectorInput = number[] | Float32Array | {
|
|
339
|
+
base64: string;
|
|
340
|
+
};
|
|
341
|
+
type VectorCreateOptions = {
|
|
342
|
+
/**
|
|
343
|
+
* Number of dimensions of the vectors stored in the index. Must be between 1 and 32768.
|
|
344
|
+
*/
|
|
345
|
+
dimension: number;
|
|
346
|
+
/**
|
|
347
|
+
* Distance metric used to compare vectors.
|
|
348
|
+
*/
|
|
349
|
+
metric: VectorMetric;
|
|
350
|
+
/**
|
|
351
|
+
* When `true`, creating an index that already exists with the same dimension and metric
|
|
352
|
+
* succeeds (returns `0`) instead of throwing.
|
|
353
|
+
*/
|
|
354
|
+
existsOk?: boolean;
|
|
355
|
+
};
|
|
356
|
+
type VectorQueryOptions = {
|
|
357
|
+
/**
|
|
358
|
+
* The query vector.
|
|
359
|
+
*/
|
|
360
|
+
vector: VectorInput;
|
|
361
|
+
/**
|
|
362
|
+
* Number of nearest neighbours to return. Must be between 1 and 1000.
|
|
363
|
+
*/
|
|
364
|
+
topK: number;
|
|
365
|
+
/**
|
|
366
|
+
* Speed / recall trade-off.
|
|
367
|
+
*
|
|
368
|
+
* @default "BALANCED"
|
|
369
|
+
*/
|
|
370
|
+
profile?: VectorQueryProfile;
|
|
371
|
+
};
|
|
372
|
+
type VectorQueryResult = {
|
|
373
|
+
id: string;
|
|
374
|
+
score: number;
|
|
375
|
+
};
|
|
376
|
+
type VectorIndexInfo = {
|
|
377
|
+
dimension: number;
|
|
378
|
+
metric: VectorMetric;
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
type CreateVectorIndexParameters = VectorCreateOptions & {
|
|
382
|
+
/**
|
|
383
|
+
* Name (key) of the index.
|
|
384
|
+
*/
|
|
385
|
+
name: string;
|
|
386
|
+
};
|
|
387
|
+
type VectorIndexParameters = {
|
|
388
|
+
name: string;
|
|
389
|
+
client: Requester;
|
|
390
|
+
commandOptions?: CommandOptions<any, any>;
|
|
391
|
+
};
|
|
392
|
+
/**
|
|
393
|
+
* A handle to a vector index. Obtain one with `redis.vector.createIndex(...)` or
|
|
394
|
+
* `redis.vector.index(name)`.
|
|
395
|
+
*
|
|
396
|
+
* @example
|
|
397
|
+
* ```typescript
|
|
398
|
+
* const index = await redis.vector.createIndex({ name: "docs", dimension: 3, metric: "COSINE" });
|
|
399
|
+
* await index.add("doc-1", [0.1, 0.2, 0.3]);
|
|
400
|
+
* const hits = await index.query({ vector: [0.1, 0.2, 0.3], topK: 5 });
|
|
401
|
+
* ```
|
|
402
|
+
*/
|
|
403
|
+
declare class VectorIndex {
|
|
404
|
+
readonly name: string;
|
|
405
|
+
private client;
|
|
406
|
+
private commandOptions?;
|
|
407
|
+
constructor({ name, client, commandOptions }: VectorIndexParameters);
|
|
408
|
+
/**
|
|
409
|
+
* Adds a vector to the index, or overwrites the vector stored under `id`.
|
|
410
|
+
*
|
|
411
|
+
* @returns `1` if a new vector was inserted, `0` if an existing one was overwritten.
|
|
412
|
+
*/
|
|
413
|
+
add(id: string, vector: VectorInput): Promise<0 | 1>;
|
|
414
|
+
/**
|
|
415
|
+
* Returns the vector stored under `id`, or `null` if it does not exist.
|
|
416
|
+
*/
|
|
417
|
+
get(id: string): Promise<number[] | null>;
|
|
418
|
+
/**
|
|
419
|
+
* Returns the `topK` nearest neighbours of the query vector.
|
|
420
|
+
*/
|
|
421
|
+
query(options: VectorQueryOptions): Promise<VectorQueryResult[]>;
|
|
422
|
+
/**
|
|
423
|
+
* Deletes the vector stored under `id`.
|
|
424
|
+
*
|
|
425
|
+
* @returns `1` if the vector existed and was removed, `0` otherwise.
|
|
426
|
+
*/
|
|
427
|
+
delete(id: string): Promise<0 | 1>;
|
|
428
|
+
/**
|
|
429
|
+
* Returns the number of vectors in the index.
|
|
430
|
+
*/
|
|
431
|
+
count(): Promise<number>;
|
|
432
|
+
/**
|
|
433
|
+
* Returns the dimension and metric of the index, or `null` if it does not exist.
|
|
434
|
+
*/
|
|
435
|
+
info(): Promise<VectorIndexInfo | null>;
|
|
436
|
+
/**
|
|
437
|
+
* Drops the index and all vectors in it.
|
|
438
|
+
*
|
|
439
|
+
* @returns `1` if the index existed and was dropped, `0` otherwise.
|
|
440
|
+
*/
|
|
441
|
+
drop(): Promise<0 | 1>;
|
|
442
|
+
}
|
|
443
|
+
|
|
215
444
|
declare const FIELD_TYPES: readonly ["TEXT", "U64", "I64", "F64", "BOOL", "DATE", "KEYWORD", "FACET"];
|
|
216
445
|
type FieldType = (typeof FIELD_TYPES)[number];
|
|
217
446
|
type TextField = {
|
|
@@ -579,7 +808,10 @@ type DescribeFieldInfo = {
|
|
|
579
808
|
};
|
|
580
809
|
type IndexDescription<TSchema extends NestedIndexSchema | FlatIndexSchema> = {
|
|
581
810
|
name: string;
|
|
582
|
-
dataType: "hash" | "string" | "json";
|
|
811
|
+
dataType: "hash" | "string" | "json" | "stream";
|
|
812
|
+
/**
|
|
813
|
+
* Key prefixes tracked by the index. For a stream index, this holds the single stream key.
|
|
814
|
+
*/
|
|
583
815
|
prefixes: string[];
|
|
584
816
|
language?: Language;
|
|
585
817
|
schema: IsDefaultSchema<TSchema> extends true ? Record<string, DescribeFieldInfo> : Record<SchemaPaths<TSchema>, DescribeFieldInfo>;
|
|
@@ -794,18 +1026,34 @@ type FacetResult = {
|
|
|
794
1026
|
|
|
795
1027
|
type CreateIndexParameters<TSchema extends NestedIndexSchema | FlatIndexSchema> = {
|
|
796
1028
|
name: string;
|
|
797
|
-
prefix: string | string[];
|
|
798
1029
|
language?: Language;
|
|
799
1030
|
skipInitialScan?: boolean;
|
|
800
1031
|
existsOk?: boolean;
|
|
801
1032
|
} & ({
|
|
802
1033
|
dataType: "string";
|
|
1034
|
+
prefix: string | string[];
|
|
803
1035
|
schema: TSchema extends NestedIndexSchema ? TSchema : never;
|
|
804
1036
|
} | {
|
|
805
1037
|
dataType: "json";
|
|
1038
|
+
prefix: string | string[];
|
|
806
1039
|
schema: TSchema extends NestedIndexSchema ? TSchema : never;
|
|
807
1040
|
} | {
|
|
808
1041
|
dataType: "hash";
|
|
1042
|
+
prefix: string | string[];
|
|
1043
|
+
schema: TSchema extends FlatIndexSchema ? TSchema : never;
|
|
1044
|
+
} | {
|
|
1045
|
+
/**
|
|
1046
|
+
* Index the entries of a single Redis stream. Each entry becomes a document whose key is
|
|
1047
|
+
* the entry ID and whose fields are the entry's fields.
|
|
1048
|
+
*
|
|
1049
|
+
* @see https://upstash.com/docs/redis/search/streams
|
|
1050
|
+
*/
|
|
1051
|
+
dataType: "stream";
|
|
1052
|
+
/**
|
|
1053
|
+
* Exact key of the stream to index. The stream does not need to exist yet.
|
|
1054
|
+
*/
|
|
1055
|
+
stream: string;
|
|
1056
|
+
prefix?: never;
|
|
809
1057
|
schema: TSchema extends FlatIndexSchema ? TSchema : never;
|
|
810
1058
|
});
|
|
811
1059
|
type InitIndexParameters<TSchema extends NestedIndexSchema | FlatIndexSchema> = {
|
|
@@ -879,6 +1127,230 @@ declare class AppendCommand extends Command<number, number> {
|
|
|
879
1127
|
constructor(cmd: [key: string, value: string], opts?: CommandOptions<number, number>);
|
|
880
1128
|
}
|
|
881
1129
|
|
|
1130
|
+
/**
|
|
1131
|
+
* Returns the number of occupied slots in an array. A missing key counts as `0`.
|
|
1132
|
+
*
|
|
1133
|
+
* @see https://upstash.com/docs/redis/commands/array/arcount
|
|
1134
|
+
*/
|
|
1135
|
+
declare class ArCountCommand extends Command<number, number> {
|
|
1136
|
+
constructor(cmd: [key: string], opts?: CommandOptions<number, number>);
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
/**
|
|
1140
|
+
* Empties one or more array slots. Later values are not shifted.
|
|
1141
|
+
*
|
|
1142
|
+
* Returns the number of slots that held a value.
|
|
1143
|
+
*
|
|
1144
|
+
* @see https://upstash.com/docs/redis/commands/array/ardel
|
|
1145
|
+
*/
|
|
1146
|
+
declare class ArDelCommand extends Command<number, number> {
|
|
1147
|
+
constructor(cmd: [key: string, ...indexes: (number | string)[]], opts?: CommandOptions<number, number>);
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
/**
|
|
1151
|
+
* Empties every occupied slot inside one or more inclusive `[start, end]` ranges.
|
|
1152
|
+
*
|
|
1153
|
+
* Returns the total number of values removed across all ranges.
|
|
1154
|
+
*
|
|
1155
|
+
* @see https://upstash.com/docs/redis/commands/array/ardelrange
|
|
1156
|
+
*/
|
|
1157
|
+
declare class ArDelRangeCommand extends Command<number, number> {
|
|
1158
|
+
constructor([key, ...ranges]: [key: string, ...ranges: [start: number | string, end: number | string][]], opts?: CommandOptions<number, number>);
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
/**
|
|
1162
|
+
* Returns the value stored at `index`, or `null` if the slot is empty or the key does not exist.
|
|
1163
|
+
*
|
|
1164
|
+
* @see https://upstash.com/docs/redis/commands/array/arget
|
|
1165
|
+
*/
|
|
1166
|
+
declare class ArGetCommand<TData = string> extends Command<unknown | null, TData | null> {
|
|
1167
|
+
constructor(cmd: [key: string, index: number | string], opts?: CommandOptions<unknown | null, TData | null>);
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
/**
|
|
1171
|
+
* Returns every slot in the inclusive range `[start, end]`, with `null` for empty slots.
|
|
1172
|
+
*
|
|
1173
|
+
* When `start` is greater than `end`, the values are returned from the higher index down.
|
|
1174
|
+
* Ranges wider than 1,000,000 indexes are rejected by the server.
|
|
1175
|
+
*
|
|
1176
|
+
* @see https://upstash.com/docs/redis/commands/array/argetrange
|
|
1177
|
+
*/
|
|
1178
|
+
declare class ArGetRangeCommand<TData = string> extends Command<unknown[], (TData | null)[]> {
|
|
1179
|
+
constructor(cmd: [key: string, start: number | string, end: number | string], opts?: CommandOptions<unknown[], (TData | null)[]>);
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
/**
|
|
1183
|
+
* Appends one or more values after the array's append cursor.
|
|
1184
|
+
*
|
|
1185
|
+
* Returns the index the last value was written to (not the number of values written).
|
|
1186
|
+
*
|
|
1187
|
+
* Indexes are returned as strings; see `arlen`.
|
|
1188
|
+
*
|
|
1189
|
+
* @see https://upstash.com/docs/redis/commands/array/arinsert
|
|
1190
|
+
*/
|
|
1191
|
+
declare class ArInsertCommand<TData = string> extends Command<number | string, string> {
|
|
1192
|
+
constructor(cmd: [key: string, ...values: TData[]], opts?: CommandOptions<number | string, string>);
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
type ArLastItemsOptions = {
|
|
1196
|
+
/**
|
|
1197
|
+
* Return the newest value first instead of last.
|
|
1198
|
+
*/
|
|
1199
|
+
rev?: boolean;
|
|
1200
|
+
};
|
|
1201
|
+
/**
|
|
1202
|
+
* Returns up to `count` of the most recently appended values, walking backwards from the append
|
|
1203
|
+
* cursor. Values come back oldest-first unless `rev` is set.
|
|
1204
|
+
*
|
|
1205
|
+
* @see https://upstash.com/docs/redis/commands/array/arlastitems
|
|
1206
|
+
*/
|
|
1207
|
+
declare class ArLastItemsCommand<TData = string> extends Command<unknown[], (TData | null)[]> {
|
|
1208
|
+
constructor([key, count, opts]: [key: string, count: number, opts?: ArLastItemsOptions], cmdOpts?: CommandOptions<unknown[], (TData | null)[]>);
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
/**
|
|
1212
|
+
* Returns the length of an array: the highest occupied index plus one. A missing key has length `0`.
|
|
1213
|
+
*
|
|
1214
|
+
* Because arrays are sparse this can be larger than the number of stored values, see `arcount`.
|
|
1215
|
+
*
|
|
1216
|
+
* Indexes are returned as strings: they run up to 2^64-2, past what a JavaScript number can hold
|
|
1217
|
+
* exactly. This matches how the SDK keeps the `scan` cursor a string, and the value can be passed
|
|
1218
|
+
* straight back into any command that takes an index.
|
|
1219
|
+
*
|
|
1220
|
+
* @see https://upstash.com/docs/redis/commands/array/arlen
|
|
1221
|
+
*/
|
|
1222
|
+
declare class ArLenCommand extends Command<number | string, string> {
|
|
1223
|
+
constructor(cmd: [key: string], opts?: CommandOptions<number | string, string>);
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
/**
|
|
1227
|
+
* Returns the values at several indexes, in the order the indexes were given, with `null` for
|
|
1228
|
+
* empty slots.
|
|
1229
|
+
*
|
|
1230
|
+
* @see https://upstash.com/docs/redis/commands/array/armget
|
|
1231
|
+
*/
|
|
1232
|
+
declare class ArMGetCommand<TData = string> extends Command<unknown[], (TData | null)[]> {
|
|
1233
|
+
constructor(cmd: [key: string, ...indexes: (number | string)[]], opts?: CommandOptions<unknown[], (TData | null)[]>);
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
/**
|
|
1237
|
+
* Index-value pairs for `ARMSET`, either as an object (`{ 0: "a", 10: "b" }`) or as a list of
|
|
1238
|
+
* `[index, value]` tuples.
|
|
1239
|
+
*/
|
|
1240
|
+
type ArMSetValues<TData> = Record<number | string, TData> | [number | string, TData][];
|
|
1241
|
+
/**
|
|
1242
|
+
* Writes several index-value pairs into an array in one atomic call.
|
|
1243
|
+
*
|
|
1244
|
+
* Returns the number of slots that were newly occupied. Overwriting an existing value contributes `0`.
|
|
1245
|
+
*
|
|
1246
|
+
* @see https://upstash.com/docs/redis/commands/array/armset
|
|
1247
|
+
*/
|
|
1248
|
+
declare class ArMSetCommand<TData = string> extends Command<number, number> {
|
|
1249
|
+
constructor([key, values]: [key: string, values: ArMSetValues<TData>], opts?: CommandOptions<number, number>);
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
/**
|
|
1253
|
+
* Returns the index the next `arinsert` would write to, without moving the cursor.
|
|
1254
|
+
*
|
|
1255
|
+
* Returns `"0"` for a missing key or one that was never appended to, and `null` when the cursor is
|
|
1256
|
+
* already at the highest supported index. Indexes are returned as strings; see `arlen`.
|
|
1257
|
+
*
|
|
1258
|
+
* @see https://upstash.com/docs/redis/commands/array/arnext
|
|
1259
|
+
*/
|
|
1260
|
+
declare class ArNextCommand extends Command<number | string | null, string | null> {
|
|
1261
|
+
constructor(cmd: [key: string], opts?: CommandOptions<number | string | null, string | null>);
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
type ArOpKeyword = "SUM" | "MIN" | "MAX" | "AND" | "OR" | "XOR" | "USED";
|
|
1265
|
+
/**
|
|
1266
|
+
* Reduction applied by `AROP`:
|
|
1267
|
+
* - `SUM`, `MIN`, `MAX`: numeric aggregates
|
|
1268
|
+
* - `AND`, `OR`, `XOR`: bitwise folds over the values as 64-bit integers
|
|
1269
|
+
* - `USED`: number of occupied slots
|
|
1270
|
+
* - `{ match: value }`: number of slots whose value equals `value`
|
|
1271
|
+
*/
|
|
1272
|
+
type ArOpOperation<TData = string> = ArOpKeyword | Lowercase<ArOpKeyword> | {
|
|
1273
|
+
match: TData;
|
|
1274
|
+
};
|
|
1275
|
+
/**
|
|
1276
|
+
* Reduces the values in the inclusive range `[start, end]` to a single number on the server.
|
|
1277
|
+
*
|
|
1278
|
+
* `SUM`, `MIN`, `MAX`, `AND`, `OR` and `XOR` skip non-numeric values and return `null` when the
|
|
1279
|
+
* range contains nothing they could use. `USED` and `match` always return a number.
|
|
1280
|
+
*
|
|
1281
|
+
* Results are returned as JavaScript numbers, so bitwise results beyond `Number.MAX_SAFE_INTEGER`
|
|
1282
|
+
* lose precision.
|
|
1283
|
+
*
|
|
1284
|
+
* @see https://upstash.com/docs/redis/commands/array/arop
|
|
1285
|
+
*/
|
|
1286
|
+
declare class ArOpCommand<TData = string> extends Command<string | number | null, number | null> {
|
|
1287
|
+
constructor([key, start, end, operation]: [
|
|
1288
|
+
key: string,
|
|
1289
|
+
start: number | string,
|
|
1290
|
+
end: number | string,
|
|
1291
|
+
operation: ArOpOperation<TData>
|
|
1292
|
+
], opts?: CommandOptions<string | number | null, number | null>);
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
/**
|
|
1296
|
+
* Appends values to a fixed-size ring of `size` slots, wrapping back to index `0` and overwriting
|
|
1297
|
+
* the oldest values once the ring is full. Calling it with a different `size` reshapes the ring.
|
|
1298
|
+
*
|
|
1299
|
+
* Returns the index the last value was written to, as a string; see `arlen`.
|
|
1300
|
+
*
|
|
1301
|
+
* @see https://upstash.com/docs/redis/commands/array/arring
|
|
1302
|
+
*/
|
|
1303
|
+
declare class ArRingCommand<TData = string> extends Command<number | string, string> {
|
|
1304
|
+
constructor(cmd: [key: string, size: number, ...values: TData[]], opts?: CommandOptions<number | string, string>);
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
type ArScanOptions = {
|
|
1308
|
+
/**
|
|
1309
|
+
* Maximum number of slots to return.
|
|
1310
|
+
*/
|
|
1311
|
+
limit?: number;
|
|
1312
|
+
};
|
|
1313
|
+
/**
|
|
1314
|
+
* Returns the occupied slots in the inclusive range `[start, end]` as `[index, value]` pairs, in
|
|
1315
|
+
* ascending index order. Empty slots are skipped.
|
|
1316
|
+
*
|
|
1317
|
+
* Indexes are returned as strings; see `arlen`.
|
|
1318
|
+
*
|
|
1319
|
+
* @see https://upstash.com/docs/redis/commands/array/arscan
|
|
1320
|
+
*/
|
|
1321
|
+
declare class ArScanCommand<TData = string> extends Command<unknown[], [string, TData][]> {
|
|
1322
|
+
constructor([key, start, end, opts]: [
|
|
1323
|
+
key: string,
|
|
1324
|
+
start: number | string,
|
|
1325
|
+
end: number | string,
|
|
1326
|
+
opts?: ArScanOptions
|
|
1327
|
+
], cmdOpts?: CommandOptions<unknown[], [string, TData][]>);
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
/**
|
|
1331
|
+
* Moves the append cursor so that the next `arinsert` writes to `index`. Stored values are not
|
|
1332
|
+
* touched.
|
|
1333
|
+
*
|
|
1334
|
+
* Returns `1` if the cursor was moved, `0` if the key does not exist.
|
|
1335
|
+
*
|
|
1336
|
+
* @see https://upstash.com/docs/redis/commands/array/arseek
|
|
1337
|
+
*/
|
|
1338
|
+
declare class ArSeekCommand extends Command<0 | 1, 0 | 1> {
|
|
1339
|
+
constructor(cmd: [key: string, index: number | string], opts?: CommandOptions<0 | 1, 0 | 1>);
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
/**
|
|
1343
|
+
* Writes one or more values into an array, starting at `index`: the first value goes to `index`,
|
|
1344
|
+
* the next to `index + 1`, and so on.
|
|
1345
|
+
*
|
|
1346
|
+
* Returns the number of slots that were newly occupied. Overwriting an existing value contributes `0`.
|
|
1347
|
+
*
|
|
1348
|
+
* @see https://upstash.com/docs/redis/commands/array/arset
|
|
1349
|
+
*/
|
|
1350
|
+
declare class ArSetCommand<TData = string> extends Command<number, number> {
|
|
1351
|
+
constructor(cmd: [key: string, index: number | string, ...values: TData[]], opts?: CommandOptions<number, number>);
|
|
1352
|
+
}
|
|
1353
|
+
|
|
882
1354
|
/**
|
|
883
1355
|
* @see https://redis.io/commands/bitcount
|
|
884
1356
|
*/
|
|
@@ -2320,6 +2792,70 @@ declare class UnlinkCommand extends Command<number, number> {
|
|
|
2320
2792
|
constructor(cmd: [...keys: string[]], opts?: CommandOptions<number, number>);
|
|
2321
2793
|
}
|
|
2322
2794
|
|
|
2795
|
+
/**
|
|
2796
|
+
* Adds a vector to an index, or overwrites the vector stored under `id`.
|
|
2797
|
+
*
|
|
2798
|
+
* Returns `1` if a new vector was inserted, `0` if an existing one was overwritten.
|
|
2799
|
+
*/
|
|
2800
|
+
declare class VectorAddCommand extends Command<0 | 1, 0 | 1> {
|
|
2801
|
+
constructor([index, id, vector]: [index: string, id: string, vector: VectorInput], cmdOpts?: CommandOptions<0 | 1, 0 | 1>);
|
|
2802
|
+
}
|
|
2803
|
+
|
|
2804
|
+
/**
|
|
2805
|
+
* Returns the number of vectors in the index. A missing index counts as `0`.
|
|
2806
|
+
*/
|
|
2807
|
+
declare class VectorCountCommand extends Command<number, number> {
|
|
2808
|
+
constructor([index]: [index: string], cmdOpts?: CommandOptions<number, number>);
|
|
2809
|
+
}
|
|
2810
|
+
|
|
2811
|
+
/**
|
|
2812
|
+
* Creates a vector index.
|
|
2813
|
+
*
|
|
2814
|
+
* Returns `1` if the index was created, `0` if it already existed (only possible with `existsOk`).
|
|
2815
|
+
*/
|
|
2816
|
+
declare class VectorCreateCommand extends Command<0 | 1, 0 | 1> {
|
|
2817
|
+
constructor([index, opts]: [index: string, opts: VectorCreateOptions], cmdOpts?: CommandOptions<0 | 1, 0 | 1>);
|
|
2818
|
+
}
|
|
2819
|
+
|
|
2820
|
+
/**
|
|
2821
|
+
* Deletes the vector stored under `id`.
|
|
2822
|
+
*
|
|
2823
|
+
* Returns `1` if the vector existed and was removed, `0` otherwise.
|
|
2824
|
+
*/
|
|
2825
|
+
declare class VectorDelCommand extends Command<0 | 1, 0 | 1> {
|
|
2826
|
+
constructor([index, id]: [index: string, id: string], cmdOpts?: CommandOptions<0 | 1, 0 | 1>);
|
|
2827
|
+
}
|
|
2828
|
+
|
|
2829
|
+
/**
|
|
2830
|
+
* Drops the index and all vectors in it.
|
|
2831
|
+
*
|
|
2832
|
+
* Returns `1` if the index existed and was dropped, `0` otherwise.
|
|
2833
|
+
*/
|
|
2834
|
+
declare class VectorDropCommand extends Command<0 | 1, 0 | 1> {
|
|
2835
|
+
constructor([index]: [index: string], cmdOpts?: CommandOptions<0 | 1, 0 | 1>);
|
|
2836
|
+
}
|
|
2837
|
+
|
|
2838
|
+
/**
|
|
2839
|
+
* Returns the vector stored under `id`, or `null` if it does not exist.
|
|
2840
|
+
*/
|
|
2841
|
+
declare class VectorGetCommand extends Command<(string | number)[] | null, number[] | null> {
|
|
2842
|
+
constructor([index, id]: [index: string, id: string], cmdOpts?: CommandOptions<(string | number)[] | null, number[] | null>);
|
|
2843
|
+
}
|
|
2844
|
+
|
|
2845
|
+
/**
|
|
2846
|
+
* Returns the dimension and metric of the index, or `null` if it does not exist.
|
|
2847
|
+
*/
|
|
2848
|
+
declare class VectorInfoCommand extends Command<(string | number)[] | Record<string, string | number> | null, VectorIndexInfo | null> {
|
|
2849
|
+
constructor([index]: [index: string], cmdOpts?: CommandOptions<(string | number)[] | Record<string, string | number> | null, VectorIndexInfo | null>);
|
|
2850
|
+
}
|
|
2851
|
+
|
|
2852
|
+
/**
|
|
2853
|
+
* Returns the `topK` nearest neighbours of the query vector as `{ id, score }` pairs.
|
|
2854
|
+
*/
|
|
2855
|
+
declare class VectorQueryCommand extends Command<[string, string | number][], VectorQueryResult[]> {
|
|
2856
|
+
constructor([index, opts]: [index: string, opts: VectorQueryOptions], cmdOpts?: CommandOptions<[string, string | number][], VectorQueryResult[]>);
|
|
2857
|
+
}
|
|
2858
|
+
|
|
2323
2859
|
/**
|
|
2324
2860
|
* @see https://redis.io/commands/xack
|
|
2325
2861
|
*/
|
|
@@ -2979,6 +3515,78 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
2979
3515
|
* @see https://redis.io/commands/append
|
|
2980
3516
|
*/
|
|
2981
3517
|
append: (...args: CommandArgs<typeof AppendCommand>) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
3518
|
+
/**
|
|
3519
|
+
* @see https://upstash.com/docs/redis/commands/array/arcount
|
|
3520
|
+
*/
|
|
3521
|
+
arcount: (...args: CommandArgs<typeof ArCountCommand>) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
3522
|
+
/**
|
|
3523
|
+
* @see https://upstash.com/docs/redis/commands/array/ardel
|
|
3524
|
+
*/
|
|
3525
|
+
ardel: (...args: CommandArgs<typeof ArDelCommand>) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
3526
|
+
/**
|
|
3527
|
+
* @see https://upstash.com/docs/redis/commands/array/ardelrange
|
|
3528
|
+
*/
|
|
3529
|
+
ardelrange: (...args: CommandArgs<typeof ArDelRangeCommand>) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
3530
|
+
/**
|
|
3531
|
+
* @see https://upstash.com/docs/redis/commands/array/arget
|
|
3532
|
+
*/
|
|
3533
|
+
arget: <TData = string>(...args: CommandArgs<typeof ArGetCommand>) => Pipeline<[...TCommands, Command<any, TData | null>]>;
|
|
3534
|
+
/**
|
|
3535
|
+
* @see https://upstash.com/docs/redis/commands/array/argetrange
|
|
3536
|
+
*/
|
|
3537
|
+
argetrange: <TData = string>(...args: CommandArgs<typeof ArGetRangeCommand>) => Pipeline<[...TCommands, Command<any, (TData | null)[]>]>;
|
|
3538
|
+
/**
|
|
3539
|
+
* @see https://upstash.com/docs/redis/commands/array/argrep
|
|
3540
|
+
*/
|
|
3541
|
+
argrep: <TData = string, TOpts extends ArGrepOptions = ArGrepOptions>(key: string, start: number | string, end: number | string, opts: TOpts) => Pipeline<[...TCommands, Command<any, ArGrepResult<TData, TOpts>>]>;
|
|
3542
|
+
/**
|
|
3543
|
+
* @see https://upstash.com/docs/redis/commands/array/arinfo
|
|
3544
|
+
*/
|
|
3545
|
+
arinfo: (...args: CommandArgs<typeof ArInfoCommand>) => Pipeline<[...TCommands, Command<any, ArInfoResult>]>;
|
|
3546
|
+
/**
|
|
3547
|
+
* @see https://upstash.com/docs/redis/commands/array/arinsert
|
|
3548
|
+
*/
|
|
3549
|
+
arinsert: <TData>(key: string, ...values: TData[]) => Pipeline<[...TCommands, Command<any, string>]>;
|
|
3550
|
+
/**
|
|
3551
|
+
* @see https://upstash.com/docs/redis/commands/array/arlastitems
|
|
3552
|
+
*/
|
|
3553
|
+
arlastitems: <TData = string>(...args: CommandArgs<typeof ArLastItemsCommand>) => Pipeline<[...TCommands, Command<any, (TData | null)[]>]>;
|
|
3554
|
+
/**
|
|
3555
|
+
* @see https://upstash.com/docs/redis/commands/array/arlen
|
|
3556
|
+
*/
|
|
3557
|
+
arlen: (...args: CommandArgs<typeof ArLenCommand>) => Pipeline<[...TCommands, Command<any, string>]>;
|
|
3558
|
+
/**
|
|
3559
|
+
* @see https://upstash.com/docs/redis/commands/array/armget
|
|
3560
|
+
*/
|
|
3561
|
+
armget: <TData = string>(...args: CommandArgs<typeof ArMGetCommand>) => Pipeline<[...TCommands, Command<any, (TData | null)[]>]>;
|
|
3562
|
+
/**
|
|
3563
|
+
* @see https://upstash.com/docs/redis/commands/array/armset
|
|
3564
|
+
*/
|
|
3565
|
+
armset: <TData>(key: string, values: ArMSetValues<TData>) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
3566
|
+
/**
|
|
3567
|
+
* @see https://upstash.com/docs/redis/commands/array/arnext
|
|
3568
|
+
*/
|
|
3569
|
+
arnext: (...args: CommandArgs<typeof ArNextCommand>) => Pipeline<[...TCommands, Command<any, string | null>]>;
|
|
3570
|
+
/**
|
|
3571
|
+
* @see https://upstash.com/docs/redis/commands/array/arop
|
|
3572
|
+
*/
|
|
3573
|
+
arop: <TData = string>(key: string, start: number | string, end: number | string, operation: ArOpOperation<TData>) => Pipeline<[...TCommands, Command<any, number | null>]>;
|
|
3574
|
+
/**
|
|
3575
|
+
* @see https://upstash.com/docs/redis/commands/array/arring
|
|
3576
|
+
*/
|
|
3577
|
+
arring: <TData>(key: string, size: number, ...values: TData[]) => Pipeline<[...TCommands, Command<any, string>]>;
|
|
3578
|
+
/**
|
|
3579
|
+
* @see https://upstash.com/docs/redis/commands/array/arscan
|
|
3580
|
+
*/
|
|
3581
|
+
arscan: <TData = string>(...args: CommandArgs<typeof ArScanCommand>) => Pipeline<[...TCommands, Command<any, [string, TData][]>]>;
|
|
3582
|
+
/**
|
|
3583
|
+
* @see https://upstash.com/docs/redis/commands/array/arseek
|
|
3584
|
+
*/
|
|
3585
|
+
arseek: (...args: CommandArgs<typeof ArSeekCommand>) => Pipeline<[...TCommands, Command<any, 0 | 1>]>;
|
|
3586
|
+
/**
|
|
3587
|
+
* @see https://upstash.com/docs/redis/commands/array/arset
|
|
3588
|
+
*/
|
|
3589
|
+
arset: <TData>(key: string, index: number | string, ...values: TData[]) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
2982
3590
|
/**
|
|
2983
3591
|
* @see https://redis.io/commands/bitcount
|
|
2984
3592
|
*/
|
|
@@ -4149,6 +4757,26 @@ declare class Redis {
|
|
|
4149
4757
|
}) => Promise<0 | 1>;
|
|
4150
4758
|
};
|
|
4151
4759
|
};
|
|
4760
|
+
/**
|
|
4761
|
+
* Vector index commands.
|
|
4762
|
+
*
|
|
4763
|
+
* @example
|
|
4764
|
+
* ```typescript
|
|
4765
|
+
* const index = await redis.vector.createIndex({ name: "docs", dimension: 3, metric: "COSINE" });
|
|
4766
|
+
* await index.add("doc-1", [0.1, 0.2, 0.3]);
|
|
4767
|
+
* const hits = await index.query({ vector: [0.1, 0.2, 0.3], topK: 5 });
|
|
4768
|
+
* ```
|
|
4769
|
+
*/
|
|
4770
|
+
get vector(): {
|
|
4771
|
+
/**
|
|
4772
|
+
* Creates a vector index and returns a handle to it.
|
|
4773
|
+
*/
|
|
4774
|
+
createIndex: (params: CreateVectorIndexParameters) => Promise<VectorIndex>;
|
|
4775
|
+
/**
|
|
4776
|
+
* Returns a handle to an existing vector index without sending any command.
|
|
4777
|
+
*/
|
|
4778
|
+
index: (name: string) => VectorIndex;
|
|
4779
|
+
};
|
|
4152
4780
|
/**
|
|
4153
4781
|
* Create a new pipeline that allows you to send requests in bulk.
|
|
4154
4782
|
*
|
|
@@ -4186,6 +4814,78 @@ declare class Redis {
|
|
|
4186
4814
|
* @see https://redis.io/commands/append
|
|
4187
4815
|
*/
|
|
4188
4816
|
append: (...args: CommandArgs<typeof AppendCommand>) => Promise<number>;
|
|
4817
|
+
/**
|
|
4818
|
+
* @see https://upstash.com/docs/redis/commands/array/arcount
|
|
4819
|
+
*/
|
|
4820
|
+
arcount: (...args: CommandArgs<typeof ArCountCommand>) => Promise<number>;
|
|
4821
|
+
/**
|
|
4822
|
+
* @see https://upstash.com/docs/redis/commands/array/ardel
|
|
4823
|
+
*/
|
|
4824
|
+
ardel: (...args: CommandArgs<typeof ArDelCommand>) => Promise<number>;
|
|
4825
|
+
/**
|
|
4826
|
+
* @see https://upstash.com/docs/redis/commands/array/ardelrange
|
|
4827
|
+
*/
|
|
4828
|
+
ardelrange: (...args: CommandArgs<typeof ArDelRangeCommand>) => Promise<number>;
|
|
4829
|
+
/**
|
|
4830
|
+
* @see https://upstash.com/docs/redis/commands/array/arget
|
|
4831
|
+
*/
|
|
4832
|
+
arget: <TData = string>(...args: CommandArgs<typeof ArGetCommand>) => Promise<TData | null>;
|
|
4833
|
+
/**
|
|
4834
|
+
* @see https://upstash.com/docs/redis/commands/array/argetrange
|
|
4835
|
+
*/
|
|
4836
|
+
argetrange: <TData = string>(...args: CommandArgs<typeof ArGetRangeCommand>) => Promise<(TData | null)[]>;
|
|
4837
|
+
/**
|
|
4838
|
+
* @see https://upstash.com/docs/redis/commands/array/argrep
|
|
4839
|
+
*/
|
|
4840
|
+
argrep: <TData = string, TOpts extends ArGrepOptions = ArGrepOptions>(key: string, start: number | string, end: number | string, opts: TOpts) => Promise<ArGrepResult<TData, TOpts>>;
|
|
4841
|
+
/**
|
|
4842
|
+
* @see https://upstash.com/docs/redis/commands/array/arinfo
|
|
4843
|
+
*/
|
|
4844
|
+
arinfo: (...args: CommandArgs<typeof ArInfoCommand>) => Promise<ArInfoResult>;
|
|
4845
|
+
/**
|
|
4846
|
+
* @see https://upstash.com/docs/redis/commands/array/arinsert
|
|
4847
|
+
*/
|
|
4848
|
+
arinsert: <TData>(key: string, ...values: TData[]) => Promise<string>;
|
|
4849
|
+
/**
|
|
4850
|
+
* @see https://upstash.com/docs/redis/commands/array/arlastitems
|
|
4851
|
+
*/
|
|
4852
|
+
arlastitems: <TData = string>(...args: CommandArgs<typeof ArLastItemsCommand>) => Promise<(TData | null)[]>;
|
|
4853
|
+
/**
|
|
4854
|
+
* @see https://upstash.com/docs/redis/commands/array/arlen
|
|
4855
|
+
*/
|
|
4856
|
+
arlen: (...args: CommandArgs<typeof ArLenCommand>) => Promise<string>;
|
|
4857
|
+
/**
|
|
4858
|
+
* @see https://upstash.com/docs/redis/commands/array/armget
|
|
4859
|
+
*/
|
|
4860
|
+
armget: <TData = string>(...args: CommandArgs<typeof ArMGetCommand>) => Promise<(TData | null)[]>;
|
|
4861
|
+
/**
|
|
4862
|
+
* @see https://upstash.com/docs/redis/commands/array/armset
|
|
4863
|
+
*/
|
|
4864
|
+
armset: <TData>(key: string, values: ArMSetValues<TData>) => Promise<number>;
|
|
4865
|
+
/**
|
|
4866
|
+
* @see https://upstash.com/docs/redis/commands/array/arnext
|
|
4867
|
+
*/
|
|
4868
|
+
arnext: (...args: CommandArgs<typeof ArNextCommand>) => Promise<string | null>;
|
|
4869
|
+
/**
|
|
4870
|
+
* @see https://upstash.com/docs/redis/commands/array/arop
|
|
4871
|
+
*/
|
|
4872
|
+
arop: <TData = string>(key: string, start: number | string, end: number | string, operation: ArOpOperation<TData>) => Promise<number | null>;
|
|
4873
|
+
/**
|
|
4874
|
+
* @see https://upstash.com/docs/redis/commands/array/arring
|
|
4875
|
+
*/
|
|
4876
|
+
arring: <TData>(key: string, size: number, ...values: TData[]) => Promise<string>;
|
|
4877
|
+
/**
|
|
4878
|
+
* @see https://upstash.com/docs/redis/commands/array/arscan
|
|
4879
|
+
*/
|
|
4880
|
+
arscan: <TData = string>(...args: CommandArgs<typeof ArScanCommand>) => Promise<[string, TData][]>;
|
|
4881
|
+
/**
|
|
4882
|
+
* @see https://upstash.com/docs/redis/commands/array/arseek
|
|
4883
|
+
*/
|
|
4884
|
+
arseek: (...args: CommandArgs<typeof ArSeekCommand>) => Promise<0 | 1>;
|
|
4885
|
+
/**
|
|
4886
|
+
* @see https://upstash.com/docs/redis/commands/array/arset
|
|
4887
|
+
*/
|
|
4888
|
+
arset: <TData>(key: string, index: number | string, ...values: TData[]) => Promise<number>;
|
|
4189
4889
|
/**
|
|
4190
4890
|
* @see https://redis.io/commands/bitcount
|
|
4191
4891
|
*/
|
|
@@ -4908,4 +5608,4 @@ declare namespace error {
|
|
|
4908
5608
|
export { error_UpstashError as UpstashError, error_UpstashJSONParseError as UpstashJSONParseError, error_UrlError as UrlError };
|
|
4909
5609
|
}
|
|
4910
5610
|
|
|
4911
|
-
export {
|
|
5611
|
+
export { GeoAddCommand as $, AppendCommand as A, type ArScanOptions as B, ArSeekCommand as C, ArSetCommand as D, BitCountCommand as E, BitOpCommand as F, BitPosCommand as G, type HttpClientConfig as H, type ClientSetInfoAttribute as I, ClientSetInfoCommand as J, CopyCommand as K, DBSizeCommand as L, DecrByCommand as M, DecrCommand as N, DelCommand as O, EchoCommand as P, EvalCommand as Q, Redis as R, EvalROCommand as S, EvalshaCommand as T, EvalshaROCommand as U, ExistsCommand as V, ExpireAtCommand as W, ExpireCommand as X, type ExpireOption as Y, FlushAllCommand as Z, FlushDBCommand as _, type RedisOptions as a, JsonStrLenCommand as a$, type GeoAddCommandOptions as a0, GeoDistCommand as a1, GeoHashCommand as a2, type GeoMember as a3, GeoPosCommand as a4, GeoSearchCommand as a5, GeoSearchStoreCommand as a6, GetBitCommand as a7, GetCommand as a8, GetDelCommand as a9, HSetExCommand as aA, HSetNXCommand as aB, HStrLenCommand as aC, HTtlCommand as aD, HValsCommand as aE, IncrByCommand as aF, IncrByFloatCommand as aG, IncrCommand as aH, JsonArrAppendCommand as aI, JsonArrIndexCommand as aJ, JsonArrInsertCommand as aK, JsonArrLenCommand as aL, JsonArrPopCommand as aM, JsonArrTrimCommand as aN, JsonClearCommand as aO, JsonDelCommand as aP, JsonForgetCommand as aQ, JsonGetCommand as aR, JsonMGetCommand as aS, JsonMergeCommand as aT, JsonNumIncrByCommand as aU, JsonNumMultByCommand as aV, JsonObjKeysCommand as aW, JsonObjLenCommand as aX, JsonRespCommand as aY, JsonSetCommand as aZ, JsonStrAppendCommand as a_, GetExCommand as aa, GetRangeCommand as ab, GetSetCommand as ac, HDelCommand as ad, HExistsCommand as ae, HExpireAtCommand as af, HExpireCommand as ag, HExpireTimeCommand as ah, HGetAllCommand as ai, HGetCommand as aj, HGetDelCommand as ak, HGetExCommand as al, HIncrByCommand as am, HIncrByFloatCommand as an, HKeysCommand as ao, HLenCommand as ap, HMGetCommand as aq, HMSetCommand as ar, HPExpireAtCommand as as, HPExpireCommand as at, HPExpireTimeCommand as au, HPTtlCommand as av, HPersistCommand as aw, HRandFieldCommand as ax, HScanCommand as ay, HSetCommand as az, type RequesterConfig as b, TouchCommand as b$, JsonToggleCommand as b0, JsonTypeCommand as b1, KeysCommand as b2, LIndexCommand as b3, LInsertCommand as b4, LLenCommand as b5, LMoveCommand as b6, LPopCommand as b7, LPushCommand as b8, LPushXCommand as b9, SInterCardCommand as bA, SInterCommand as bB, SInterStoreCommand as bC, SIsMemberCommand as bD, SMIsMemberCommand as bE, SMembersCommand as bF, SMoveCommand as bG, SPopCommand as bH, SRandMemberCommand as bI, SRemCommand as bJ, SScanCommand as bK, SUnionCommand as bL, SUnionStoreCommand as bM, ScanCommand as bN, type ScanCommandOptions as bO, type ScoreMember as bP, ScriptExistsCommand as bQ, ScriptFlushCommand as bR, ScriptLoadCommand as bS, SetBitCommand as bT, SetCommand as bU, type SetCommandOptions as bV, SetExCommand as bW, SetNxCommand as bX, SetRangeCommand as bY, StrLenCommand as bZ, TimeCommand as b_, LRangeCommand as ba, LRemCommand as bb, LSetCommand as bc, LTrimCommand as bd, MGetCommand as be, MSetCommand as bf, MSetNXCommand as bg, PExpireAtCommand as bh, PExpireCommand as bi, PSetEXCommand as bj, PTtlCommand as bk, PersistCommand as bl, PingCommand as bm, Pipeline as bn, PublishCommand as bo, RPopCommand as bp, RPushCommand as bq, RPushXCommand as br, RandomKeyCommand as bs, RenameCommand as bt, RenameNXCommand as bu, type Requester as bv, SAddCommand as bw, SCardCommand as bx, SDiffCommand as by, SDiffStoreCommand as bz, ArCountCommand as c, TtlCommand as c0, type Type as c1, TypeCommand as c2, UnlinkCommand as c3, type UpstashRequest as c4, type UpstashResponse as c5, VectorAddCommand as c6, VectorCountCommand as c7, VectorCreateCommand as c8, VectorDelCommand as c9, ZRemRangeByScoreCommand as cA, ZRevRankCommand as cB, ZScanCommand as cC, ZScoreCommand as cD, ZUnionCommand as cE, type ZUnionCommandOptions as cF, ZUnionStoreCommand as cG, type ZUnionStoreCommandOptions as cH, error as cI, type NumericField as cJ, type NestedIndexSchema as cK, type CreateIndexParameters as cL, type CreateVectorIndexParameters as cM, type FlatIndexSchema as cN, type InferFilterFromSchema as cO, type PublicQueryResult as cP, SearchIndex as cQ, type SearchIndexParameters as cR, type VectorCreateOptions as cS, VectorIndex as cT, type VectorIndexInfo as cU, type VectorIndexParameters as cV, type VectorInput as cW, type VectorMetric as cX, type VectorQueryOptions as cY, type VectorQueryProfile as cZ, type VectorQueryResult as c_, VectorDropCommand as ca, VectorGetCommand as cb, VectorInfoCommand as cc, VectorQueryCommand as cd, XAckDelCommand as ce, XAddCommand as cf, XDelExCommand as cg, XRangeCommand as ch, ZAddCommand as ci, type ZAddCommandOptions as cj, ZCardCommand as ck, ZCountCommand as cl, ZDiffStoreCommand as cm, ZIncrByCommand as cn, ZInterStoreCommand as co, type ZInterStoreCommandOptions as cp, ZLexCountCommand as cq, ZMScoreCommand as cr, ZPopMaxCommand as cs, ZPopMinCommand as ct, ZRangeCommand as cu, type ZRangeCommandOptions as cv, ZRankCommand as cw, ZRemCommand as cx, ZRemRangeByLexCommand as cy, ZRemRangeByRankCommand as cz, ArDelCommand as d, ArDelRangeCommand as e, ArGetCommand as f, ArGetRangeCommand as g, ArGrepCommand as h, type ArGrepOptions as i, type ArGrepPredicate as j, type ArGrepResult as k, ArInfoCommand as l, type ArInfoOptions as m, type ArInfoResult as n, ArInsertCommand as o, ArLastItemsCommand as p, type ArLastItemsOptions as q, ArLenCommand as r, ArMGetCommand as s, ArMSetCommand as t, type ArMSetValues as u, ArNextCommand as v, ArOpCommand as w, type ArOpOperation as x, ArRingCommand as y, ArScanCommand as z };
|