@upstash/redis 1.36.0-rc.4 → 1.36.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-P45C5Z47.mjs → chunk-4AG3JMXU.mjs} +215 -404
- package/cloudflare.d.mts +2 -2
- package/cloudflare.d.ts +2 -2
- package/cloudflare.js +222 -379
- package/cloudflare.mjs +14 -10
- package/fastly.d.mts +2 -2
- package/fastly.d.ts +2 -2
- package/fastly.js +209 -370
- package/fastly.mjs +1 -1
- package/nodejs.d.mts +3 -94
- package/nodejs.d.ts +3 -94
- package/nodejs.js +217 -407
- package/nodejs.mjs +9 -13
- package/package.json +1 -1
- package/{zmscore-BfRVhSFL.d.mts → zmscore-0SAuWM0q.d.mts} +125 -319
- package/{zmscore-BfRVhSFL.d.ts → zmscore-0SAuWM0q.d.ts} +125 -319
|
@@ -317,323 +317,39 @@ declare class ExpireCommand extends Command<"0" | "1", 0 | 1> {
|
|
|
317
317
|
constructor(cmd: [key: string, seconds: number, option?: ExpireOption], opts?: CommandOptions<"0" | "1", 0 | 1>);
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
fast?: boolean;
|
|
334
|
-
};
|
|
335
|
-
type DateField = {
|
|
336
|
-
type: "DATE";
|
|
337
|
-
fast?: boolean;
|
|
338
|
-
};
|
|
339
|
-
type DetailedField = TextField | NumericField | BoolField | DateField;
|
|
340
|
-
type NestedIndexSchema = {
|
|
341
|
-
[key: string]: FieldType | DetailedField | NestedIndexSchema;
|
|
342
|
-
};
|
|
343
|
-
type FlatIndexSchema = {
|
|
344
|
-
[key: string]: FieldType | DetailedField;
|
|
345
|
-
};
|
|
346
|
-
type SchemaPaths<T, Prefix extends string = ""> = {
|
|
347
|
-
[K in keyof T]: K extends string ? T[K] extends FieldType | DetailedField ? Prefix extends "" ? K : `${Prefix}${K}` : T[K] extends object ? SchemaPaths<T[K], `${Prefix}${K}.`> : never : never;
|
|
348
|
-
}[keyof T];
|
|
349
|
-
type ExtractFieldType<T> = T extends FieldType ? T : T extends {
|
|
350
|
-
type: infer U;
|
|
351
|
-
} ? U extends FieldType ? U : never : never;
|
|
352
|
-
type GetFieldAtPath<TSchema, Path extends string> = Path extends `${infer First}.${infer Rest}` ? First extends keyof TSchema ? GetFieldAtPath<TSchema[First], Rest> : never : Path extends keyof TSchema ? TSchema[Path] : never;
|
|
353
|
-
type FieldValueType<T extends FieldType> = T extends "TEXT" ? string : T extends "U64" | "I64" | "F64" ? number : T extends "BOOL" ? boolean : T extends "DATE" ? string : never;
|
|
354
|
-
type GetFieldValueType<TSchema, Path extends string> = GetFieldAtPath<TSchema, Path> extends infer Field ? Field extends FieldType | DetailedField ? FieldValueType<ExtractFieldType<Field>> : never : never;
|
|
355
|
-
type InferSchemaData<TSchema> = {
|
|
356
|
-
[K in keyof TSchema]: TSchema[K] extends FieldType ? FieldValueType<TSchema[K]> : TSchema[K] extends DetailedField ? FieldValueType<ExtractFieldType<TSchema[K]>> : TSchema[K] extends NestedIndexSchema ? InferSchemaData<TSchema[K]> : never;
|
|
357
|
-
};
|
|
358
|
-
type QueryOptions<TSchema extends NestedIndexSchema | FlatIndexSchema> = {
|
|
359
|
-
filter: RootQueryFilter<TSchema>;
|
|
360
|
-
/** Maximum number of results to return */
|
|
361
|
-
limit?: number;
|
|
362
|
-
/** Number of results to skip */
|
|
363
|
-
offset?: number;
|
|
364
|
-
/** Sort by field (requires FAST option on field) */
|
|
365
|
-
orderBy?: {
|
|
366
|
-
[K in SchemaPaths<TSchema>]: {
|
|
367
|
-
[P in K]: "ASC" | "DESC";
|
|
368
|
-
};
|
|
369
|
-
}[SchemaPaths<TSchema>];
|
|
370
|
-
select?: Partial<{
|
|
371
|
-
[K in SchemaPaths<TSchema>]: true;
|
|
372
|
-
}>;
|
|
373
|
-
highlight?: {
|
|
374
|
-
fields: SchemaPaths<TSchema>[];
|
|
375
|
-
preTag?: string;
|
|
376
|
-
postTag?: string;
|
|
377
|
-
};
|
|
378
|
-
};
|
|
379
|
-
/**
|
|
380
|
-
* Converts dot notation paths to nested object structure type
|
|
381
|
-
* e.g. "content.title" | "content.author" becomes { content: { title: ..., author: ... } }
|
|
382
|
-
*/
|
|
383
|
-
type PathToNestedObject<TSchema, Path extends string, Value> = Path extends `${infer First}.${infer Rest}` ? {
|
|
384
|
-
[K in First]: PathToNestedObject<TSchema, Rest, Value>;
|
|
385
|
-
} : {
|
|
386
|
-
[K in Path]: Value;
|
|
387
|
-
};
|
|
388
|
-
/**
|
|
389
|
-
* Merges intersection of objects into a single object type with proper nesting
|
|
390
|
-
*/
|
|
391
|
-
type DeepMerge<T> = T extends object ? {
|
|
392
|
-
[K in keyof T]: T[K] extends object ? DeepMerge<T[K]> : T[K];
|
|
393
|
-
} : T;
|
|
394
|
-
/**
|
|
395
|
-
* Build nested result type from selected paths
|
|
396
|
-
*/
|
|
397
|
-
type BuildNestedResult<TSchema, TFields> = DeepMerge<UnionToIntersection<{
|
|
398
|
-
[Path in keyof TFields & SchemaPaths<TSchema>]: PathToNestedObject<TSchema, Path & string, GetFieldValueType<TSchema, Path & string>>;
|
|
399
|
-
}[keyof TFields & SchemaPaths<TSchema>]>>;
|
|
400
|
-
type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
401
|
-
type QueryResult<TSchema extends NestedIndexSchema | FlatIndexSchema, TOptions extends QueryOptions<TSchema> | undefined = undefined> = TOptions extends {
|
|
402
|
-
select: infer TFields;
|
|
403
|
-
} ? {} extends TFields ? {
|
|
404
|
-
key: string;
|
|
405
|
-
score: string;
|
|
406
|
-
} : {
|
|
407
|
-
key: string;
|
|
408
|
-
score: string;
|
|
409
|
-
data: BuildNestedResult<TSchema, TFields>;
|
|
410
|
-
} : {
|
|
411
|
-
key: string;
|
|
412
|
-
score: string;
|
|
413
|
-
data: InferSchemaData<TSchema>;
|
|
414
|
-
};
|
|
415
|
-
type StringOperationMap<T extends string> = {
|
|
416
|
-
$eq: T;
|
|
417
|
-
$ne: T;
|
|
418
|
-
$in: T[];
|
|
419
|
-
$fuzzy: T | {
|
|
420
|
-
value: T;
|
|
421
|
-
distance?: number;
|
|
422
|
-
transpositionCostOne?: boolean;
|
|
423
|
-
};
|
|
424
|
-
$phrase: T;
|
|
425
|
-
$regex: T;
|
|
426
|
-
};
|
|
427
|
-
type NumberOperationMap<T extends number> = {
|
|
428
|
-
$eq: T;
|
|
429
|
-
$ne: T;
|
|
430
|
-
$in: T[];
|
|
431
|
-
$gt: T;
|
|
432
|
-
$gte: T;
|
|
433
|
-
$lt: T;
|
|
434
|
-
$lte: T;
|
|
435
|
-
};
|
|
436
|
-
type BooleanOperationMap<T extends boolean> = {
|
|
437
|
-
$eq: T;
|
|
438
|
-
$ne: T;
|
|
439
|
-
$in: T[];
|
|
440
|
-
};
|
|
441
|
-
type DateOperationMap<T extends string | Date> = {
|
|
442
|
-
$eq: T;
|
|
443
|
-
$ne: T;
|
|
444
|
-
$in: T[];
|
|
445
|
-
};
|
|
446
|
-
type StringOperations = {
|
|
447
|
-
[K in keyof StringOperationMap<string>]: {
|
|
448
|
-
[P in K]: StringOperationMap<string>[K];
|
|
449
|
-
} & {
|
|
450
|
-
$boost?: number;
|
|
451
|
-
};
|
|
452
|
-
}[keyof StringOperationMap<string>];
|
|
453
|
-
type NumberOperations = {
|
|
454
|
-
[K in keyof NumberOperationMap<number>]: {
|
|
455
|
-
[P in K]: NumberOperationMap<number>[K];
|
|
456
|
-
} & {
|
|
457
|
-
$boost?: number;
|
|
458
|
-
};
|
|
459
|
-
}[keyof NumberOperationMap<number>];
|
|
460
|
-
type BooleanOperations = {
|
|
461
|
-
[K in keyof BooleanOperationMap<boolean>]: {
|
|
462
|
-
[P in K]: BooleanOperationMap<boolean>[K];
|
|
463
|
-
} & {
|
|
464
|
-
$boost?: number;
|
|
465
|
-
};
|
|
466
|
-
}[keyof BooleanOperationMap<boolean>];
|
|
467
|
-
type DateOperations = {
|
|
468
|
-
[K in keyof DateOperationMap<string | Date>]: {
|
|
469
|
-
[P in K]: DateOperationMap<string | Date>[K];
|
|
470
|
-
} & {
|
|
471
|
-
$boost?: number;
|
|
472
|
-
};
|
|
473
|
-
}[keyof DateOperationMap<string | Date>];
|
|
474
|
-
type OperationsForFieldType<T extends FieldType> = T extends "TEXT" ? StringOperations : T extends "U64" | "I64" | "F64" ? NumberOperations : T extends "BOOL" ? BooleanOperations : T extends "DATE" ? DateOperations : never;
|
|
475
|
-
type PathOperations<TSchema, TPath extends string> = GetFieldAtPath<TSchema, TPath> extends infer Field ? Field extends FieldType | DetailedField ? OperationsForFieldType<ExtractFieldType<Field>> | FieldValueType<ExtractFieldType<Field>> : never : never;
|
|
476
|
-
type QueryLeaf<TSchema> = {
|
|
477
|
-
[K in SchemaPaths<TSchema>]?: PathOperations<TSchema, K>;
|
|
478
|
-
} & {
|
|
479
|
-
$and?: never;
|
|
480
|
-
$or?: never;
|
|
481
|
-
$must?: never;
|
|
482
|
-
$should?: never;
|
|
483
|
-
$mustNot?: never;
|
|
484
|
-
$boost?: never;
|
|
485
|
-
};
|
|
486
|
-
type BoolBase<TSchema extends NestedIndexSchema | FlatIndexSchema> = {
|
|
487
|
-
[P in SchemaPaths<TSchema>]?: PathOperations<TSchema, P>;
|
|
488
|
-
};
|
|
489
|
-
type AndNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
|
|
490
|
-
$and: QueryFilter<TSchema>;
|
|
491
|
-
$boost?: number;
|
|
492
|
-
$or?: never;
|
|
493
|
-
$must?: never;
|
|
494
|
-
$should?: never;
|
|
495
|
-
$mustNot?: never;
|
|
496
|
-
};
|
|
497
|
-
type OrNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
|
|
498
|
-
$or: QueryFilter<TSchema>;
|
|
499
|
-
$boost?: number;
|
|
500
|
-
$and?: never;
|
|
501
|
-
$must?: never;
|
|
502
|
-
$should?: never;
|
|
503
|
-
$mustNot?: never;
|
|
504
|
-
};
|
|
505
|
-
type MustNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
|
|
506
|
-
$must: QueryFilter<TSchema>;
|
|
507
|
-
$boost?: number;
|
|
508
|
-
$and?: never;
|
|
509
|
-
$or?: never;
|
|
510
|
-
$should?: never;
|
|
511
|
-
$mustNot?: never;
|
|
512
|
-
};
|
|
513
|
-
type ShouldNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
|
|
514
|
-
$should: QueryFilter<TSchema>;
|
|
515
|
-
$boost?: number;
|
|
516
|
-
$and?: never;
|
|
517
|
-
$or?: never;
|
|
518
|
-
$must?: never;
|
|
519
|
-
$mustNot?: never;
|
|
520
|
-
};
|
|
521
|
-
type MustShouldNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
|
|
522
|
-
$must: QueryFilter<TSchema>;
|
|
523
|
-
$should: QueryFilter<TSchema>;
|
|
524
|
-
$and?: never;
|
|
525
|
-
$or?: never;
|
|
526
|
-
};
|
|
527
|
-
type NotNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
|
|
528
|
-
$mustNot: QueryFilter<TSchema>;
|
|
529
|
-
$boost?: number;
|
|
530
|
-
$and?: never;
|
|
531
|
-
$or?: never;
|
|
532
|
-
$must?: never;
|
|
533
|
-
$should?: never;
|
|
534
|
-
};
|
|
535
|
-
type AndNotNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
|
|
536
|
-
$and: QueryFilter<TSchema>;
|
|
537
|
-
$mustNot: QueryFilter<TSchema>;
|
|
538
|
-
$boost?: number;
|
|
539
|
-
$or?: never;
|
|
540
|
-
$must?: never;
|
|
541
|
-
$should?: never;
|
|
542
|
-
};
|
|
543
|
-
type OrNotNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
|
|
544
|
-
$or: QueryFilter<TSchema>;
|
|
545
|
-
$mustNot: QueryFilter<TSchema>;
|
|
546
|
-
$boost?: number;
|
|
547
|
-
$and?: never;
|
|
548
|
-
$must?: never;
|
|
549
|
-
$should?: never;
|
|
550
|
-
};
|
|
551
|
-
type ShouldNotNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
|
|
552
|
-
$should: QueryFilter<TSchema>;
|
|
553
|
-
$mustNot: QueryFilter<TSchema>;
|
|
554
|
-
$boost?: number;
|
|
555
|
-
$and?: never;
|
|
556
|
-
$or?: never;
|
|
557
|
-
$must?: never;
|
|
558
|
-
};
|
|
559
|
-
type MustNotNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
|
|
560
|
-
$must: QueryFilter<TSchema>;
|
|
561
|
-
$mustNot: QueryFilter<TSchema>;
|
|
562
|
-
$boost?: number;
|
|
563
|
-
$and?: never;
|
|
564
|
-
$or?: never;
|
|
565
|
-
$should?: never;
|
|
566
|
-
};
|
|
567
|
-
type BoolNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
|
|
568
|
-
$must: QueryFilter<TSchema>;
|
|
569
|
-
$should: QueryFilter<TSchema>;
|
|
570
|
-
$mustNot: QueryFilter<TSchema>;
|
|
571
|
-
$boost?: number;
|
|
572
|
-
$and?: never;
|
|
573
|
-
$or?: never;
|
|
574
|
-
};
|
|
575
|
-
type QueryFilter<TSchema extends NestedIndexSchema | FlatIndexSchema> = QueryLeaf<TSchema> | AndNode<TSchema> | OrNode<TSchema> | MustNode<TSchema> | ShouldNode<TSchema> | MustShouldNode<TSchema> | NotNode<TSchema> | AndNotNode<TSchema> | OrNotNode<TSchema> | ShouldNotNode<TSchema> | MustNotNode<TSchema> | BoolNode<TSchema>;
|
|
576
|
-
type RootQueryFilter<TSchema extends NestedIndexSchema | FlatIndexSchema> = QueryLeaf<TSchema> | AndNode<TSchema> | RootOrNode<TSchema> | MustNode<TSchema> | ShouldNode<TSchema> | MustShouldNode<TSchema> | NotNode<TSchema> | AndNotNode<TSchema> | ShouldNotNode<TSchema> | MustNotNode<TSchema> | BoolNode<TSchema>;
|
|
577
|
-
type RootOrNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = {
|
|
578
|
-
[P in SchemaPaths<TSchema>]?: never;
|
|
579
|
-
} & {
|
|
580
|
-
$or: QueryFilter<TSchema>;
|
|
581
|
-
$boost?: number;
|
|
582
|
-
$and?: never;
|
|
583
|
-
$must?: never;
|
|
584
|
-
$should?: never;
|
|
585
|
-
$mustNot?: never;
|
|
586
|
-
};
|
|
587
|
-
type DescribeFieldInfo = {
|
|
588
|
-
type: FieldType;
|
|
589
|
-
noTokenize?: boolean;
|
|
590
|
-
noStem?: boolean;
|
|
591
|
-
fast?: boolean;
|
|
592
|
-
};
|
|
593
|
-
type IndexDescription<TSchema extends NestedIndexSchema | FlatIndexSchema> = {
|
|
594
|
-
name: string;
|
|
595
|
-
dataType: "hash" | "string";
|
|
596
|
-
prefixes: string[];
|
|
597
|
-
language?: Language;
|
|
598
|
-
schema: Record<SchemaPaths<TSchema>, DescribeFieldInfo>;
|
|
320
|
+
type FunctionListArgs = {
|
|
321
|
+
/**
|
|
322
|
+
* Pattern for matching library names. Supports glob patterns.
|
|
323
|
+
*
|
|
324
|
+
* Example: "my_library_*"
|
|
325
|
+
*/
|
|
326
|
+
libraryName?: string;
|
|
327
|
+
/**
|
|
328
|
+
* Includes the library source code in the response.
|
|
329
|
+
*
|
|
330
|
+
* @default false
|
|
331
|
+
*/
|
|
332
|
+
withCode?: boolean;
|
|
599
333
|
};
|
|
600
|
-
type Language = "english" | "arabic" | "danish" | "dutch" | "finnish" | "french" | "german" | "greek" | "hungarian" | "italian" | "norwegian" | "portuguese" | "romanian" | "russian" | "spanish" | "swedish" | "tamil" | "turkish";
|
|
601
334
|
|
|
602
|
-
type
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
335
|
+
type FunctionLoadArgs = {
|
|
336
|
+
/**
|
|
337
|
+
* The Lua code to load.
|
|
338
|
+
*
|
|
339
|
+
* Example:
|
|
340
|
+
* ```lua
|
|
341
|
+
* #!lua name=mylib
|
|
342
|
+
* redis.register_function('myfunc', function() return 'ok' end)
|
|
343
|
+
* ```
|
|
344
|
+
*/
|
|
345
|
+
code: string;
|
|
346
|
+
/**
|
|
347
|
+
* If true, the library will replace the existing library with the same name.
|
|
348
|
+
*
|
|
349
|
+
* @default false
|
|
350
|
+
*/
|
|
351
|
+
replace?: boolean;
|
|
618
352
|
};
|
|
619
|
-
declare class SearchIndex<TSchema extends NestedIndexSchema | FlatIndexSchema> {
|
|
620
|
-
readonly name: SearchIndexProps<TSchema>["name"];
|
|
621
|
-
readonly schema?: TSchema;
|
|
622
|
-
private client;
|
|
623
|
-
constructor({ name, schema, client }: SearchIndexProps<TSchema>);
|
|
624
|
-
waitIndexing(): Promise<string>;
|
|
625
|
-
describe(): Promise<IndexDescription<TSchema>>;
|
|
626
|
-
query(options: QueryOptions<TSchema>): Promise<QueryResult<TSchema, QueryOptions<TSchema>>[]>;
|
|
627
|
-
count({ filter }: {
|
|
628
|
-
filter: RootQueryFilter<TSchema>;
|
|
629
|
-
}): Promise<{
|
|
630
|
-
count: number;
|
|
631
|
-
}>;
|
|
632
|
-
drop(): Promise<string>;
|
|
633
|
-
}
|
|
634
|
-
declare function createIndex<TSchema extends NestedIndexSchema | FlatIndexSchema>(props: createIndexProps<TSchema>): Promise<SearchIndex<(TSchema extends NestedIndexSchema ? TSchema : never) | (TSchema extends FlatIndexSchema ? TSchema : never)>>;
|
|
635
|
-
declare function index<TSchema extends NestedIndexSchema | FlatIndexSchema>(client: Requester, name: string, schema: TSchema): SearchIndex<TSchema>;
|
|
636
|
-
declare function index(client: Requester, name: string): SearchIndex<any>;
|
|
637
353
|
|
|
638
354
|
/**
|
|
639
355
|
* @see https://redis.io/commands/append
|
|
@@ -3206,6 +2922,52 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
3206
2922
|
*/
|
|
3207
2923
|
type: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, string[]>]>;
|
|
3208
2924
|
};
|
|
2925
|
+
get functions(): {
|
|
2926
|
+
/**
|
|
2927
|
+
* @see https://redis.io/docs/latest/commands/function-load/
|
|
2928
|
+
*/
|
|
2929
|
+
load: (args: FunctionLoadArgs) => Pipeline<[...TCommands, Command<any, string>]>;
|
|
2930
|
+
/**
|
|
2931
|
+
* @see https://redis.io/docs/latest/commands/function-list/
|
|
2932
|
+
*/
|
|
2933
|
+
list: (args?: FunctionListArgs | undefined) => Pipeline<[...TCommands, Command<any, {
|
|
2934
|
+
libraryName: string;
|
|
2935
|
+
engine: string;
|
|
2936
|
+
functions: {
|
|
2937
|
+
name: string;
|
|
2938
|
+
description?: string;
|
|
2939
|
+
flags: string[];
|
|
2940
|
+
}[];
|
|
2941
|
+
libraryCode?: string;
|
|
2942
|
+
}[]>]>;
|
|
2943
|
+
/**
|
|
2944
|
+
* @see https://redis.io/docs/latest/commands/function-delete/
|
|
2945
|
+
*/
|
|
2946
|
+
delete: (libraryName: string) => Pipeline<[...TCommands, Command<any, "OK">]>;
|
|
2947
|
+
/**
|
|
2948
|
+
* @see https://redis.io/docs/latest/commands/function-flush/
|
|
2949
|
+
*/
|
|
2950
|
+
flush: () => Pipeline<[...TCommands, Command<any, "OK">]>;
|
|
2951
|
+
/**
|
|
2952
|
+
* @see https://redis.io/docs/latest/commands/function-stats/
|
|
2953
|
+
*/
|
|
2954
|
+
stats: () => Pipeline<[...TCommands, Command<any, {
|
|
2955
|
+
engines: {
|
|
2956
|
+
[k: string]: {
|
|
2957
|
+
librariesCount: unknown;
|
|
2958
|
+
functionsCount: unknown;
|
|
2959
|
+
};
|
|
2960
|
+
};
|
|
2961
|
+
}>]>;
|
|
2962
|
+
/**
|
|
2963
|
+
* @see https://redis.io/docs/latest/commands/fcall/
|
|
2964
|
+
*/
|
|
2965
|
+
call: <TData = unknown>(functionName: string, keys?: string[] | undefined, args?: string[] | undefined) => Pipeline<[...TCommands, Command<any, TData>]>;
|
|
2966
|
+
/**
|
|
2967
|
+
* @see https://redis.io/docs/latest/commands/fcall_ro/
|
|
2968
|
+
*/
|
|
2969
|
+
callRo: <TData = unknown>(functionName: string, keys?: string[] | undefined, args?: string[] | undefined) => Pipeline<[...TCommands, Command<any, TData>]>;
|
|
2970
|
+
};
|
|
3209
2971
|
}
|
|
3210
2972
|
|
|
3211
2973
|
/**
|
|
@@ -3433,6 +3195,54 @@ declare class Redis {
|
|
|
3433
3195
|
*/
|
|
3434
3196
|
type: (key: string, path?: string | undefined) => Promise<string[]>;
|
|
3435
3197
|
};
|
|
3198
|
+
get functions(): {
|
|
3199
|
+
/**
|
|
3200
|
+
* @see https://redis.io/docs/latest/commands/function-load/
|
|
3201
|
+
*/
|
|
3202
|
+
load: (args: FunctionLoadArgs) => Promise<string>;
|
|
3203
|
+
/**
|
|
3204
|
+
* @see https://redis.io/docs/latest/commands/function-list/
|
|
3205
|
+
*/
|
|
3206
|
+
list: (args?: FunctionListArgs | undefined) => Promise<{
|
|
3207
|
+
libraryName: string;
|
|
3208
|
+
engine: string;
|
|
3209
|
+
functions: {
|
|
3210
|
+
name: string;
|
|
3211
|
+
description?: string;
|
|
3212
|
+
flags: string[];
|
|
3213
|
+
}[];
|
|
3214
|
+
libraryCode?: string;
|
|
3215
|
+
}[]>;
|
|
3216
|
+
/**
|
|
3217
|
+
* @see https://redis.io/docs/latest/commands/function-delete/
|
|
3218
|
+
*/
|
|
3219
|
+
delete: (libraryName: string) => Promise<"OK">;
|
|
3220
|
+
/**
|
|
3221
|
+
* @see https://redis.io/docs/latest/commands/function-flush/
|
|
3222
|
+
*/
|
|
3223
|
+
flush: () => Promise<"OK">;
|
|
3224
|
+
/**
|
|
3225
|
+
* @see https://redis.io/docs/latest/commands/function-stats/
|
|
3226
|
+
*
|
|
3227
|
+
* Note: `running_script` field is not supported and therefore not included in the type.
|
|
3228
|
+
*/
|
|
3229
|
+
stats: () => Promise<{
|
|
3230
|
+
engines: {
|
|
3231
|
+
[k: string]: {
|
|
3232
|
+
librariesCount: unknown;
|
|
3233
|
+
functionsCount: unknown;
|
|
3234
|
+
};
|
|
3235
|
+
};
|
|
3236
|
+
}>;
|
|
3237
|
+
/**
|
|
3238
|
+
* @see https://redis.io/docs/latest/commands/fcall/
|
|
3239
|
+
*/
|
|
3240
|
+
call: <TData = unknown>(functionName: string, keys?: string[] | undefined, args?: string[] | undefined) => Promise<TData>;
|
|
3241
|
+
/**
|
|
3242
|
+
* @see https://redis.io/docs/latest/commands/fcall_ro/
|
|
3243
|
+
*/
|
|
3244
|
+
callRo: <TData = unknown>(functionName: string, keys?: string[] | undefined, args?: string[] | undefined) => Promise<TData>;
|
|
3245
|
+
};
|
|
3436
3246
|
/**
|
|
3437
3247
|
* Wrap a new middleware around the HTTP client.
|
|
3438
3248
|
*/
|
|
@@ -3472,10 +3282,6 @@ declare class Redis {
|
|
|
3472
3282
|
createScript<TResult = unknown, TReadonly extends boolean = false>(script: string, opts?: {
|
|
3473
3283
|
readonly?: TReadonly;
|
|
3474
3284
|
}): TReadonly extends true ? ScriptRO<TResult> : Script<TResult>;
|
|
3475
|
-
get search(): {
|
|
3476
|
-
createIndex: <TSchema extends NestedIndexSchema | FlatIndexSchema>(props: Omit<createIndexProps<TSchema>, "client">) => Promise<SearchIndex<(TSchema extends NestedIndexSchema ? TSchema : never) | (TSchema extends FlatIndexSchema ? TSchema : never)>>;
|
|
3477
|
-
index: <TSchema extends NestedIndexSchema | FlatIndexSchema>(name: string, schema?: TSchema extends NestedIndexSchema ? TSchema : never) => SearchIndex<TSchema>;
|
|
3478
|
-
};
|
|
3479
3285
|
/**
|
|
3480
3286
|
* Create a new pipeline that allows you to send requests in bulk.
|
|
3481
3287
|
*
|
|
@@ -4381,4 +4187,4 @@ declare class ZMScoreCommand<TData> extends Command<string[] | null, number[] |
|
|
|
4381
4187
|
constructor(cmd: [key: string, members: TData[]], opts?: CommandOptions<string[] | null, number[] | null>);
|
|
4382
4188
|
}
|
|
4383
4189
|
|
|
4384
|
-
export {
|
|
4190
|
+
export { HPersistCommand as $, AppendCommand as A, BitCountCommand as B, CopyCommand as C, DBSizeCommand as D, EchoCommand as E, FlushAllCommand as F, GeoAddCommand as G, type HttpClientConfig as H, GetCommand as I, GetBitCommand as J, GetDelCommand as K, GetExCommand as L, GetRangeCommand as M, GetSetCommand as N, HDelCommand as O, Pipeline as P, HExistsCommand as Q, type RedisOptions as R, HExpireCommand as S, HExpireAtCommand as T, type UpstashRequest as U, HExpireTimeCommand as V, HTtlCommand as W, HPExpireCommand as X, HPExpireAtCommand as Y, HPExpireTimeCommand as Z, HPTtlCommand as _, type RequesterConfig as a, RenameNXCommand as a$, HGetCommand as a0, HGetAllCommand as a1, HIncrByCommand as a2, HIncrByFloatCommand as a3, HKeysCommand as a4, HLenCommand as a5, HMGetCommand as a6, HMSetCommand as a7, HRandFieldCommand as a8, HScanCommand as a9, JsonStrLenCommand as aA, JsonToggleCommand as aB, JsonTypeCommand as aC, KeysCommand as aD, LIndexCommand as aE, LInsertCommand as aF, LLenCommand as aG, LMoveCommand as aH, LPopCommand as aI, LPushCommand as aJ, LPushXCommand as aK, LRangeCommand as aL, LRemCommand as aM, LSetCommand as aN, LTrimCommand as aO, MGetCommand as aP, MSetCommand as aQ, MSetNXCommand as aR, PersistCommand as aS, PExpireCommand as aT, PExpireAtCommand as aU, PingCommand as aV, PSetEXCommand as aW, PTtlCommand as aX, PublishCommand as aY, RandomKeyCommand as aZ, RenameCommand as a_, HSetCommand as aa, HSetNXCommand as ab, HStrLenCommand as ac, HValsCommand as ad, IncrCommand as ae, IncrByCommand as af, IncrByFloatCommand as ag, JsonArrAppendCommand as ah, JsonArrIndexCommand as ai, JsonArrInsertCommand as aj, JsonArrLenCommand as ak, JsonArrPopCommand as al, JsonArrTrimCommand as am, JsonClearCommand as an, JsonDelCommand as ao, JsonForgetCommand as ap, JsonGetCommand as aq, JsonMergeCommand as ar, JsonMGetCommand as as, JsonNumIncrByCommand as at, JsonNumMultByCommand as au, JsonObjKeysCommand as av, JsonObjLenCommand as aw, JsonRespCommand as ax, JsonSetCommand as ay, JsonStrAppendCommand as az, Redis as b, type ZUnionCommandOptions as b$, RPopCommand as b0, RPushCommand as b1, RPushXCommand as b2, SAddCommand as b3, ScanCommand as b4, type ScanCommandOptions as b5, SCardCommand as b6, ScriptExistsCommand as b7, ScriptFlushCommand as b8, ScriptLoadCommand as b9, UnlinkCommand as bA, XAddCommand as bB, XRangeCommand as bC, type ScoreMember as bD, type ZAddCommandOptions as bE, ZAddCommand as bF, ZCardCommand as bG, ZCountCommand as bH, ZDiffStoreCommand as bI, ZIncrByCommand as bJ, ZInterStoreCommand as bK, type ZInterStoreCommandOptions as bL, ZLexCountCommand as bM, ZMScoreCommand as bN, ZPopMaxCommand as bO, ZPopMinCommand as bP, ZRangeCommand as bQ, type ZRangeCommandOptions as bR, ZRankCommand as bS, ZRemCommand as bT, ZRemRangeByLexCommand as bU, ZRemRangeByRankCommand as bV, ZRemRangeByScoreCommand as bW, ZRevRankCommand as bX, ZScanCommand as bY, ZScoreCommand as bZ, ZUnionCommand as b_, SDiffCommand as ba, SDiffStoreCommand as bb, SetCommand as bc, type SetCommandOptions as bd, SetBitCommand as be, SetExCommand as bf, SetNxCommand as bg, SetRangeCommand as bh, SInterCommand as bi, SInterStoreCommand as bj, SIsMemberCommand as bk, SMembersCommand as bl, SMIsMemberCommand as bm, SMoveCommand as bn, SPopCommand as bo, SRandMemberCommand as bp, SRemCommand as bq, SScanCommand as br, StrLenCommand as bs, SUnionCommand as bt, SUnionStoreCommand as bu, TimeCommand as bv, TouchCommand as bw, TtlCommand as bx, type Type as by, TypeCommand as bz, type Requester as c, ZUnionStoreCommand as c0, type ZUnionStoreCommandOptions as c1, type UpstashResponse as d, error as e, BitOpCommand as f, BitPosCommand as g, DecrCommand as h, DecrByCommand as i, DelCommand as j, EvalROCommand as k, EvalCommand as l, EvalshaROCommand as m, EvalshaCommand as n, ExistsCommand as o, ExpireCommand as p, type ExpireOption as q, ExpireAtCommand as r, FlushDBCommand as s, type GeoAddCommandOptions as t, type GeoMember as u, GeoDistCommand as v, GeoHashCommand as w, GeoPosCommand as x, GeoSearchCommand as y, GeoSearchStoreCommand as z };
|