@upstash/redis 1.36.0 → 1.37.0-rc
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-4AG3JMXU.mjs → chunk-D4C7KXWT.mjs} +295 -199
- package/cloudflare.d.mts +2 -2
- package/cloudflare.d.ts +2 -2
- package/cloudflare.js +306 -214
- package/cloudflare.mjs +10 -14
- package/fastly.d.mts +2 -2
- package/fastly.d.ts +2 -2
- package/fastly.js +297 -201
- package/fastly.mjs +1 -1
- package/nodejs.d.mts +144 -3
- package/nodejs.d.ts +144 -3
- package/nodejs.js +462 -213
- package/nodejs.mjs +160 -8
- package/package.json +1 -1
- package/{zmscore-0SAuWM0q.d.mts → zmscore-BpOSd5F5.d.mts} +347 -126
- package/{zmscore-0SAuWM0q.d.ts → zmscore-BpOSd5F5.d.ts} +347 -126
|
@@ -317,39 +317,350 @@ 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
|
-
* Includes the library source code in the response.
|
|
329
|
-
*
|
|
330
|
-
* @default false
|
|
331
|
-
*/
|
|
332
|
-
withCode?: boolean;
|
|
320
|
+
declare const FIELD_TYPES: readonly ["TEXT", "U64", "I64", "F64", "BOOL", "DATE"];
|
|
321
|
+
type FieldType = (typeof FIELD_TYPES)[number];
|
|
322
|
+
type TextField = {
|
|
323
|
+
type: "TEXT";
|
|
324
|
+
noTokenize?: boolean;
|
|
325
|
+
noStem?: boolean;
|
|
326
|
+
from?: string;
|
|
333
327
|
};
|
|
334
|
-
|
|
335
|
-
type
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
328
|
+
type NumericField = {
|
|
329
|
+
type: "U64" | "I64" | "F64";
|
|
330
|
+
fast: true;
|
|
331
|
+
from?: string;
|
|
332
|
+
};
|
|
333
|
+
type BoolField = {
|
|
334
|
+
type: "BOOL";
|
|
335
|
+
fast?: boolean;
|
|
336
|
+
from?: string;
|
|
337
|
+
};
|
|
338
|
+
type DateField = {
|
|
339
|
+
type: "DATE";
|
|
340
|
+
fast?: boolean;
|
|
341
|
+
from?: string;
|
|
342
|
+
};
|
|
343
|
+
type DetailedField = TextField | NumericField | BoolField | DateField;
|
|
344
|
+
type NestedIndexSchema = {
|
|
345
|
+
[key: string]: FieldType | DetailedField | NestedIndexSchema;
|
|
346
|
+
};
|
|
347
|
+
type FlatIndexSchema = {
|
|
348
|
+
[key: string]: FieldType | DetailedField;
|
|
349
|
+
};
|
|
350
|
+
type SchemaPaths<T, Prefix extends string = ""> = {
|
|
351
|
+
[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;
|
|
352
|
+
}[keyof T];
|
|
353
|
+
type ExtractFieldType<T> = T extends FieldType ? T : T extends {
|
|
354
|
+
type: infer U;
|
|
355
|
+
} ? U extends FieldType ? U : never : never;
|
|
356
|
+
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;
|
|
357
|
+
type FieldValueType<T extends FieldType> = T extends "TEXT" ? string : T extends "U64" | "I64" | "F64" ? number : T extends "BOOL" ? boolean : T extends "DATE" ? string : never;
|
|
358
|
+
type GetFieldValueType<TSchema, Path extends string> = GetFieldAtPath<TSchema, Path> extends infer Field ? Field extends FieldType | DetailedField ? FieldValueType<ExtractFieldType<Field>> : never : never;
|
|
359
|
+
type HasFrom<T> = T extends {
|
|
360
|
+
from: string;
|
|
361
|
+
} ? true : false;
|
|
362
|
+
type InferSchemaData<TSchema> = {
|
|
363
|
+
[K in keyof TSchema as TSchema[K] extends DetailedField ? HasFrom<TSchema[K]> extends true ? never : K : K]: TSchema[K] extends FieldType ? FieldValueType<TSchema[K]> : TSchema[K] extends DetailedField ? FieldValueType<ExtractFieldType<TSchema[K]>> : TSchema[K] extends NestedIndexSchema ? InferSchemaData<TSchema[K]> : never;
|
|
364
|
+
};
|
|
365
|
+
type QueryOptions<TSchema extends NestedIndexSchema | FlatIndexSchema> = {
|
|
366
|
+
filter?: RootQueryFilter<TSchema>;
|
|
367
|
+
/** Maximum number of results to return */
|
|
368
|
+
limit?: number;
|
|
369
|
+
/** Number of results to skip */
|
|
370
|
+
offset?: number;
|
|
371
|
+
/** Sort by field (requires FAST option on field) */
|
|
372
|
+
orderBy?: {
|
|
373
|
+
[K in SchemaPaths<TSchema>]: {
|
|
374
|
+
[P in K]: "ASC" | "DESC";
|
|
375
|
+
};
|
|
376
|
+
}[SchemaPaths<TSchema>];
|
|
377
|
+
select?: Partial<{
|
|
378
|
+
[K in SchemaPaths<TSchema>]: true;
|
|
379
|
+
}>;
|
|
380
|
+
highlight?: {
|
|
381
|
+
fields: SchemaPaths<TSchema>[];
|
|
382
|
+
preTag?: string;
|
|
383
|
+
postTag?: string;
|
|
384
|
+
};
|
|
385
|
+
};
|
|
386
|
+
/**
|
|
387
|
+
* Converts dot notation paths to nested object structure type
|
|
388
|
+
* e.g. "content.title" | "content.author" becomes { content: { title: ..., author: ... } }
|
|
389
|
+
*/
|
|
390
|
+
type PathToNestedObject<TSchema, Path extends string, Value> = Path extends `${infer First}.${infer Rest}` ? {
|
|
391
|
+
[K in First]: PathToNestedObject<TSchema, Rest, Value>;
|
|
392
|
+
} : {
|
|
393
|
+
[K in Path]: Value;
|
|
394
|
+
};
|
|
395
|
+
/**
|
|
396
|
+
* Merges intersection of objects into a single object type with proper nesting
|
|
397
|
+
*/
|
|
398
|
+
type DeepMerge<T> = T extends object ? {
|
|
399
|
+
[K in keyof T]: T[K] extends object ? DeepMerge<T[K]> : T[K];
|
|
400
|
+
} : T;
|
|
401
|
+
/**
|
|
402
|
+
* Build nested result type from selected paths
|
|
403
|
+
*/
|
|
404
|
+
type BuildNestedResult<TSchema, TFields> = DeepMerge<UnionToIntersection<{
|
|
405
|
+
[Path in keyof TFields & SchemaPaths<TSchema>]: PathToNestedObject<TSchema, Path & string, GetFieldValueType<TSchema, Path & string>>;
|
|
406
|
+
}[keyof TFields & SchemaPaths<TSchema>]>>;
|
|
407
|
+
type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
408
|
+
type QueryResult<TSchema extends NestedIndexSchema | FlatIndexSchema, TOptions extends QueryOptions<TSchema> | undefined = undefined> = TOptions extends {
|
|
409
|
+
select: infer TFields;
|
|
410
|
+
} ? {} extends TFields ? {
|
|
411
|
+
key: string;
|
|
412
|
+
score: string;
|
|
413
|
+
} : {
|
|
414
|
+
key: string;
|
|
415
|
+
score: string;
|
|
416
|
+
data: BuildNestedResult<TSchema, TFields>;
|
|
417
|
+
} : {
|
|
418
|
+
key: string;
|
|
419
|
+
score: string;
|
|
420
|
+
data: InferSchemaData<TSchema>;
|
|
421
|
+
};
|
|
422
|
+
type StringOperationMap<T extends string> = {
|
|
423
|
+
$eq: T;
|
|
424
|
+
$ne: T;
|
|
425
|
+
$in: T[];
|
|
426
|
+
$fuzzy: T | {
|
|
427
|
+
value: T;
|
|
428
|
+
distance?: number;
|
|
429
|
+
transpositionCostOne?: boolean;
|
|
430
|
+
};
|
|
431
|
+
$phrase: T | {
|
|
432
|
+
value: T;
|
|
433
|
+
} | {
|
|
434
|
+
value: T;
|
|
435
|
+
slop: number;
|
|
436
|
+
prefix?: never;
|
|
437
|
+
} | {
|
|
438
|
+
value: T;
|
|
439
|
+
prefix: boolean;
|
|
440
|
+
slop?: never;
|
|
441
|
+
};
|
|
442
|
+
$regex: T;
|
|
443
|
+
};
|
|
444
|
+
type NumberOperationMap<T extends number> = {
|
|
445
|
+
$eq: T;
|
|
446
|
+
$ne: T;
|
|
447
|
+
$in: T[];
|
|
448
|
+
$gt: T;
|
|
449
|
+
$gte: T;
|
|
450
|
+
$lt: T;
|
|
451
|
+
$lte: T;
|
|
452
|
+
};
|
|
453
|
+
type BooleanOperationMap<T extends boolean> = {
|
|
454
|
+
$eq: T;
|
|
455
|
+
$ne: T;
|
|
456
|
+
$in: T[];
|
|
457
|
+
};
|
|
458
|
+
type DateOperationMap<T extends string | Date> = {
|
|
459
|
+
$eq: T;
|
|
460
|
+
$ne: T;
|
|
461
|
+
$in: T[];
|
|
462
|
+
$gt: T;
|
|
463
|
+
$gte: T;
|
|
464
|
+
$lte: T;
|
|
465
|
+
$lt: T;
|
|
466
|
+
};
|
|
467
|
+
type StringOperations = {
|
|
468
|
+
[K in keyof StringOperationMap<string>]: {
|
|
469
|
+
[P in K]: StringOperationMap<string>[K];
|
|
470
|
+
} & {
|
|
471
|
+
$boost?: number;
|
|
472
|
+
};
|
|
473
|
+
}[keyof StringOperationMap<string>];
|
|
474
|
+
type NumberOperations = {
|
|
475
|
+
[K in keyof NumberOperationMap<number>]: {
|
|
476
|
+
[P in K]: NumberOperationMap<number>[K];
|
|
477
|
+
} & {
|
|
478
|
+
$boost?: number;
|
|
479
|
+
};
|
|
480
|
+
}[keyof NumberOperationMap<number>];
|
|
481
|
+
type BooleanOperations = {
|
|
482
|
+
[K in keyof BooleanOperationMap<boolean>]: {
|
|
483
|
+
[P in K]: BooleanOperationMap<boolean>[K];
|
|
484
|
+
} & {
|
|
485
|
+
$boost?: number;
|
|
486
|
+
};
|
|
487
|
+
}[keyof BooleanOperationMap<boolean>];
|
|
488
|
+
type DateOperations = {
|
|
489
|
+
[K in keyof DateOperationMap<string | Date>]: {
|
|
490
|
+
[P in K]: DateOperationMap<string | Date>[K];
|
|
491
|
+
} & {
|
|
492
|
+
$boost?: number;
|
|
493
|
+
};
|
|
494
|
+
}[keyof DateOperationMap<string | Date>];
|
|
495
|
+
type OperationsForFieldType<T extends FieldType> = T extends "TEXT" ? StringOperations : T extends "U64" | "I64" | "F64" ? NumberOperations : T extends "BOOL" ? BooleanOperations : T extends "DATE" ? DateOperations : never;
|
|
496
|
+
type PathOperations<TSchema, TPath extends string> = GetFieldAtPath<TSchema, TPath> extends infer Field ? Field extends FieldType | DetailedField ? OperationsForFieldType<ExtractFieldType<Field>> | FieldValueType<ExtractFieldType<Field>> : never : never;
|
|
497
|
+
type QueryLeaf<TSchema> = {
|
|
498
|
+
[K in SchemaPaths<TSchema>]?: PathOperations<TSchema, K>;
|
|
499
|
+
} & {
|
|
500
|
+
$and?: never;
|
|
501
|
+
$or?: never;
|
|
502
|
+
$must?: never;
|
|
503
|
+
$should?: never;
|
|
504
|
+
$mustNot?: never;
|
|
505
|
+
$boost?: never;
|
|
506
|
+
};
|
|
507
|
+
type BoolBase<TSchema extends NestedIndexSchema | FlatIndexSchema> = {
|
|
508
|
+
[P in SchemaPaths<TSchema>]?: PathOperations<TSchema, P>;
|
|
509
|
+
};
|
|
510
|
+
type AndNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
|
|
511
|
+
$and: QueryFilter<TSchema> | QueryFilter<TSchema>[];
|
|
512
|
+
$boost?: number;
|
|
513
|
+
$or?: never;
|
|
514
|
+
$must?: never;
|
|
515
|
+
$should?: never;
|
|
516
|
+
$mustNot?: never;
|
|
517
|
+
};
|
|
518
|
+
type OrNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
|
|
519
|
+
$or: QueryFilter<TSchema> | QueryFilter<TSchema>[];
|
|
520
|
+
$boost?: number;
|
|
521
|
+
$and?: never;
|
|
522
|
+
$must?: never;
|
|
523
|
+
$should?: never;
|
|
524
|
+
$mustNot?: never;
|
|
352
525
|
};
|
|
526
|
+
type MustNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
|
|
527
|
+
$must: QueryFilter<TSchema> | QueryFilter<TSchema>[];
|
|
528
|
+
$boost?: number;
|
|
529
|
+
$and?: never;
|
|
530
|
+
$or?: never;
|
|
531
|
+
$should?: never;
|
|
532
|
+
$mustNot?: never;
|
|
533
|
+
};
|
|
534
|
+
type ShouldNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
|
|
535
|
+
$should: QueryFilter<TSchema> | QueryFilter<TSchema>[];
|
|
536
|
+
$boost?: number;
|
|
537
|
+
$and?: never;
|
|
538
|
+
$or?: never;
|
|
539
|
+
$must?: never;
|
|
540
|
+
$mustNot?: never;
|
|
541
|
+
};
|
|
542
|
+
type MustShouldNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
|
|
543
|
+
$must: QueryFilter<TSchema> | QueryFilter<TSchema>[];
|
|
544
|
+
$should: QueryFilter<TSchema> | QueryFilter<TSchema>[];
|
|
545
|
+
$and?: never;
|
|
546
|
+
$or?: never;
|
|
547
|
+
};
|
|
548
|
+
type NotNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
|
|
549
|
+
$mustNot: QueryFilter<TSchema> | QueryFilter<TSchema>[];
|
|
550
|
+
$boost?: number;
|
|
551
|
+
$and?: never;
|
|
552
|
+
$or?: never;
|
|
553
|
+
$must?: never;
|
|
554
|
+
$should?: never;
|
|
555
|
+
};
|
|
556
|
+
type AndNotNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
|
|
557
|
+
$and: QueryFilter<TSchema> | QueryFilter<TSchema>[];
|
|
558
|
+
$mustNot: QueryFilter<TSchema> | QueryFilter<TSchema>[];
|
|
559
|
+
$boost?: number;
|
|
560
|
+
$or?: never;
|
|
561
|
+
$must?: never;
|
|
562
|
+
$should?: never;
|
|
563
|
+
};
|
|
564
|
+
type OrNotNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
|
|
565
|
+
$or: QueryFilter<TSchema> | QueryFilter<TSchema>[];
|
|
566
|
+
$mustNot: QueryFilter<TSchema> | QueryFilter<TSchema>[];
|
|
567
|
+
$boost?: number;
|
|
568
|
+
$and?: never;
|
|
569
|
+
$must?: never;
|
|
570
|
+
$should?: never;
|
|
571
|
+
};
|
|
572
|
+
type ShouldNotNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
|
|
573
|
+
$should: QueryFilter<TSchema> | QueryFilter<TSchema>[];
|
|
574
|
+
$mustNot: QueryFilter<TSchema> | QueryFilter<TSchema>[];
|
|
575
|
+
$boost?: number;
|
|
576
|
+
$and?: never;
|
|
577
|
+
$or?: never;
|
|
578
|
+
$must?: never;
|
|
579
|
+
};
|
|
580
|
+
type MustNotNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
|
|
581
|
+
$must: QueryFilter<TSchema> | QueryFilter<TSchema>[];
|
|
582
|
+
$mustNot: QueryFilter<TSchema> | QueryFilter<TSchema>[];
|
|
583
|
+
$boost?: number;
|
|
584
|
+
$and?: never;
|
|
585
|
+
$or?: never;
|
|
586
|
+
$should?: never;
|
|
587
|
+
};
|
|
588
|
+
type BoolNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
|
|
589
|
+
$must: QueryFilter<TSchema> | QueryFilter<TSchema>[];
|
|
590
|
+
$should: QueryFilter<TSchema> | QueryFilter<TSchema>[];
|
|
591
|
+
$mustNot: QueryFilter<TSchema> | QueryFilter<TSchema>[];
|
|
592
|
+
$boost?: number;
|
|
593
|
+
$and?: never;
|
|
594
|
+
$or?: never;
|
|
595
|
+
};
|
|
596
|
+
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>;
|
|
597
|
+
type RootQueryFilter<TSchema extends NestedIndexSchema | FlatIndexSchema> = QueryLeaf<TSchema> | AndNode<TSchema> | RootOrNode<TSchema> | MustNode<TSchema> | ShouldNode<TSchema> | MustShouldNode<TSchema> | AndNotNode<TSchema> | ShouldNotNode<TSchema> | BoolNode<TSchema>;
|
|
598
|
+
type RootOrNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = {
|
|
599
|
+
[P in SchemaPaths<TSchema>]?: never;
|
|
600
|
+
} & {
|
|
601
|
+
$or: QueryFilter<TSchema> | QueryFilter<TSchema>[];
|
|
602
|
+
$boost?: number;
|
|
603
|
+
$and?: never;
|
|
604
|
+
$must?: never;
|
|
605
|
+
$should?: never;
|
|
606
|
+
$mustNot?: never;
|
|
607
|
+
};
|
|
608
|
+
type DescribeFieldInfo = {
|
|
609
|
+
type: FieldType;
|
|
610
|
+
noTokenize?: boolean;
|
|
611
|
+
noStem?: boolean;
|
|
612
|
+
fast?: boolean;
|
|
613
|
+
};
|
|
614
|
+
type IndexDescription<TSchema extends NestedIndexSchema | FlatIndexSchema> = {
|
|
615
|
+
name: string;
|
|
616
|
+
dataType: "hash" | "string" | "json";
|
|
617
|
+
prefixes: string[];
|
|
618
|
+
language?: Language;
|
|
619
|
+
schema: Record<SchemaPaths<TSchema>, DescribeFieldInfo>;
|
|
620
|
+
};
|
|
621
|
+
type Language = "english" | "arabic" | "danish" | "dutch" | "finnish" | "french" | "german" | "greek" | "hungarian" | "italian" | "norwegian" | "portuguese" | "romanian" | "russian" | "spanish" | "swedish" | "tamil" | "turkish";
|
|
622
|
+
|
|
623
|
+
type CreateIndexParameters<TSchema extends NestedIndexSchema | FlatIndexSchema> = {
|
|
624
|
+
name: string;
|
|
625
|
+
prefix: string | string[];
|
|
626
|
+
language?: Language;
|
|
627
|
+
skipInitialScan?: boolean;
|
|
628
|
+
existsOk?: boolean;
|
|
629
|
+
} & ({
|
|
630
|
+
dataType: "string";
|
|
631
|
+
schema: TSchema extends NestedIndexSchema ? TSchema : never;
|
|
632
|
+
} | {
|
|
633
|
+
dataType: "json";
|
|
634
|
+
schema: TSchema extends NestedIndexSchema ? TSchema : never;
|
|
635
|
+
} | {
|
|
636
|
+
dataType: "hash";
|
|
637
|
+
schema: TSchema extends FlatIndexSchema ? TSchema : never;
|
|
638
|
+
});
|
|
639
|
+
type InitIndexParameters<TSchema extends NestedIndexSchema | FlatIndexSchema> = {
|
|
640
|
+
name: string;
|
|
641
|
+
schema?: TSchema;
|
|
642
|
+
};
|
|
643
|
+
type SearchIndexParameters<TSchema extends NestedIndexSchema | FlatIndexSchema> = {
|
|
644
|
+
name: string;
|
|
645
|
+
client: Requester;
|
|
646
|
+
schema?: TSchema;
|
|
647
|
+
};
|
|
648
|
+
declare class SearchIndex<TSchema extends NestedIndexSchema | FlatIndexSchema> {
|
|
649
|
+
readonly name: SearchIndexParameters<TSchema>["name"];
|
|
650
|
+
readonly schema?: TSchema;
|
|
651
|
+
private client;
|
|
652
|
+
constructor({ name, schema, client }: SearchIndexParameters<TSchema>);
|
|
653
|
+
waitIndexing(): Promise<void>;
|
|
654
|
+
describe(): Promise<IndexDescription<TSchema>>;
|
|
655
|
+
query(options?: QueryOptions<TSchema>): Promise<QueryResult<TSchema, QueryOptions<TSchema>>[]>;
|
|
656
|
+
count({ filter }: {
|
|
657
|
+
filter: RootQueryFilter<TSchema>;
|
|
658
|
+
}): Promise<{
|
|
659
|
+
count: number;
|
|
660
|
+
}>;
|
|
661
|
+
drop(): Promise<1 | 0>;
|
|
662
|
+
}
|
|
663
|
+
type InferFilterFromSchema<TSchema extends NestedIndexSchema | FlatIndexSchema> = NonNullable<NonNullable<Parameters<SearchIndex<TSchema>["query"]>[0]>["filter"]>;
|
|
353
664
|
|
|
354
665
|
/**
|
|
355
666
|
* @see https://redis.io/commands/append
|
|
@@ -2922,52 +3233,6 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
2922
3233
|
*/
|
|
2923
3234
|
type: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, string[]>]>;
|
|
2924
3235
|
};
|
|
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
|
-
};
|
|
2971
3236
|
}
|
|
2972
3237
|
|
|
2973
3238
|
/**
|
|
@@ -3195,54 +3460,6 @@ declare class Redis {
|
|
|
3195
3460
|
*/
|
|
3196
3461
|
type: (key: string, path?: string | undefined) => Promise<string[]>;
|
|
3197
3462
|
};
|
|
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
|
-
};
|
|
3246
3463
|
/**
|
|
3247
3464
|
* Wrap a new middleware around the HTTP client.
|
|
3248
3465
|
*/
|
|
@@ -3282,6 +3499,10 @@ declare class Redis {
|
|
|
3282
3499
|
createScript<TResult = unknown, TReadonly extends boolean = false>(script: string, opts?: {
|
|
3283
3500
|
readonly?: TReadonly;
|
|
3284
3501
|
}): TReadonly extends true ? ScriptRO<TResult> : Script<TResult>;
|
|
3502
|
+
get search(): {
|
|
3503
|
+
createIndex: <TSchema extends NestedIndexSchema | FlatIndexSchema>(params: CreateIndexParameters<TSchema>) => Promise<SearchIndex<TSchema>>;
|
|
3504
|
+
index: <TSchema extends NestedIndexSchema | FlatIndexSchema>(params: InitIndexParameters<TSchema>) => SearchIndex<TSchema>;
|
|
3505
|
+
};
|
|
3285
3506
|
/**
|
|
3286
3507
|
* Create a new pipeline that allows you to send requests in bulk.
|
|
3287
3508
|
*
|
|
@@ -4187,4 +4408,4 @@ declare class ZMScoreCommand<TData> extends Command<string[] | null, number[] |
|
|
|
4187
4408
|
constructor(cmd: [key: string, members: TData[]], opts?: CommandOptions<string[] | null, number[] | null>);
|
|
4188
4409
|
}
|
|
4189
4410
|
|
|
4190
|
-
export {
|
|
4411
|
+
export { HPExpireTimeCommand 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, GeoSearchStoreCommand as I, GetCommand as J, GetBitCommand as K, GetDelCommand as L, GetExCommand as M, type NumericField as N, GetRangeCommand as O, Pipeline as P, GetSetCommand as Q, type RedisOptions as R, HDelCommand as S, HExistsCommand as T, type UpstashRequest as U, HExpireCommand as V, HExpireAtCommand as W, HExpireTimeCommand as X, HTtlCommand as Y, HPExpireCommand as Z, HPExpireAtCommand as _, type NestedIndexSchema as a, RandomKeyCommand as a$, HPTtlCommand as a0, HPersistCommand as a1, HGetCommand as a2, HGetAllCommand as a3, HIncrByCommand as a4, HIncrByFloatCommand as a5, HKeysCommand as a6, HLenCommand as a7, HMGetCommand as a8, HMSetCommand as a9, JsonSetCommand as aA, JsonStrAppendCommand as aB, JsonStrLenCommand as aC, JsonToggleCommand as aD, JsonTypeCommand as aE, KeysCommand as aF, LIndexCommand as aG, LInsertCommand as aH, LLenCommand as aI, LMoveCommand as aJ, LPopCommand as aK, LPushCommand as aL, LPushXCommand as aM, LRangeCommand as aN, LRemCommand as aO, LSetCommand as aP, LTrimCommand as aQ, MGetCommand as aR, MSetCommand as aS, MSetNXCommand as aT, PersistCommand as aU, PExpireCommand as aV, PExpireAtCommand as aW, PingCommand as aX, PSetEXCommand as aY, PTtlCommand as aZ, PublishCommand as a_, HRandFieldCommand as aa, HScanCommand as ab, HSetCommand as ac, HSetNXCommand as ad, HStrLenCommand as ae, HValsCommand as af, IncrCommand as ag, IncrByCommand as ah, IncrByFloatCommand as ai, JsonArrAppendCommand as aj, JsonArrIndexCommand as ak, JsonArrInsertCommand as al, JsonArrLenCommand as am, JsonArrPopCommand as an, JsonArrTrimCommand as ao, JsonClearCommand as ap, JsonDelCommand as aq, JsonForgetCommand as ar, JsonGetCommand as as, JsonMergeCommand as at, JsonMGetCommand as au, JsonNumIncrByCommand as av, JsonNumMultByCommand as aw, JsonObjKeysCommand as ax, JsonObjLenCommand as ay, JsonRespCommand as az, type RequesterConfig as b, ZScoreCommand as b$, RenameCommand as b0, RenameNXCommand as b1, RPopCommand as b2, RPushCommand as b3, RPushXCommand as b4, SAddCommand as b5, ScanCommand as b6, type ScanCommandOptions as b7, SCardCommand as b8, ScriptExistsCommand as b9, type Type as bA, TypeCommand as bB, UnlinkCommand as bC, XAddCommand as bD, XRangeCommand as bE, type ScoreMember as bF, type ZAddCommandOptions as bG, ZAddCommand as bH, ZCardCommand as bI, ZCountCommand as bJ, ZDiffStoreCommand as bK, ZIncrByCommand as bL, ZInterStoreCommand as bM, type ZInterStoreCommandOptions as bN, ZLexCountCommand as bO, ZMScoreCommand as bP, ZPopMaxCommand as bQ, ZPopMinCommand as bR, ZRangeCommand as bS, type ZRangeCommandOptions as bT, ZRankCommand as bU, ZRemCommand as bV, ZRemRangeByLexCommand as bW, ZRemRangeByRankCommand as bX, ZRemRangeByScoreCommand as bY, ZRevRankCommand as bZ, ZScanCommand as b_, ScriptFlushCommand as ba, ScriptLoadCommand as bb, SDiffCommand as bc, SDiffStoreCommand as bd, SetCommand as be, type SetCommandOptions as bf, SetBitCommand as bg, SetExCommand as bh, SetNxCommand as bi, SetRangeCommand as bj, SInterCommand as bk, SInterStoreCommand as bl, SIsMemberCommand as bm, SMembersCommand as bn, SMIsMemberCommand as bo, SMoveCommand as bp, SPopCommand as bq, SRandMemberCommand as br, SRemCommand as bs, SScanCommand as bt, StrLenCommand as bu, SUnionCommand as bv, SUnionStoreCommand as bw, TimeCommand as bx, TouchCommand as by, TtlCommand as bz, Redis as c, ZUnionCommand as c0, type ZUnionCommandOptions as c1, ZUnionStoreCommand as c2, type ZUnionStoreCommandOptions as c3, type SearchIndexParameters as c4, type CreateIndexParameters as c5, type InferFilterFromSchema as c6, type FlatIndexSchema as c7, type Requester as d, error as e, type UpstashResponse as f, BitOpCommand as g, BitPosCommand as h, DecrCommand as i, DecrByCommand as j, DelCommand as k, EvalROCommand as l, EvalCommand as m, EvalshaROCommand as n, EvalshaCommand as o, ExistsCommand as p, ExpireCommand as q, type ExpireOption as r, ExpireAtCommand as s, FlushDBCommand as t, type GeoAddCommandOptions as u, type GeoMember as v, GeoDistCommand as w, GeoHashCommand as x, GeoPosCommand as y, GeoSearchCommand as z };
|