feat: Passwordless cross-device authentication

- Arkitektur: docs/auth/passwordless-architecture.md
- Backend: iom/quixzoom-auth-service/ (FastAPI + Redis)
- Webb: quixzoom-market-pages/se/login/ (QR-kod + polling)
- App: iom/quixzoom-app/src/features/auth/ (push + deep links)

Flöde: QR-kod → app-godkännande → webb-inloggad
This commit is contained in:
Bernt
2026-07-07 07:11:50 +00:00
parent 4aa984ad74
commit 6989a98d75
61843 changed files with 5491611 additions and 872231 deletions
@@ -0,0 +1,120 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { ArrayReply, BlobStringReply, MapReply, NumberReply, RedisArgument, ReplyUnion, TypeMapping, UnwrapReply } from '@redis/client/dist/lib/RESP/types';
import { RediSearchProperty } from './CREATE';
import { FtSearchParams } from './SEARCH';
type LoadField = RediSearchProperty | {
identifier: RediSearchProperty;
AS?: RedisArgument;
};
export declare const FT_AGGREGATE_STEPS: {
readonly GROUPBY: "GROUPBY";
readonly SORTBY: "SORTBY";
readonly APPLY: "APPLY";
readonly LIMIT: "LIMIT";
readonly FILTER: "FILTER";
};
type FT_AGGREGATE_STEPS = typeof FT_AGGREGATE_STEPS;
export type FtAggregateStep = FT_AGGREGATE_STEPS[keyof FT_AGGREGATE_STEPS];
interface AggregateStep<T extends FtAggregateStep> {
type: T;
}
export declare const FT_AGGREGATE_GROUP_BY_REDUCERS: {
readonly COUNT: "COUNT";
readonly COUNT_DISTINCT: "COUNT_DISTINCT";
readonly COUNT_DISTINCTISH: "COUNT_DISTINCTISH";
readonly SUM: "SUM";
readonly MIN: "MIN";
readonly MAX: "MAX";
readonly AVG: "AVG";
readonly STDDEV: "STDDEV";
readonly QUANTILE: "QUANTILE";
readonly TOLIST: "TOLIST";
readonly FIRST_VALUE: "FIRST_VALUE";
readonly RANDOM_SAMPLE: "RANDOM_SAMPLE";
};
type FT_AGGREGATE_GROUP_BY_REDUCERS = typeof FT_AGGREGATE_GROUP_BY_REDUCERS;
export type FtAggregateGroupByReducer = FT_AGGREGATE_GROUP_BY_REDUCERS[keyof FT_AGGREGATE_GROUP_BY_REDUCERS];
interface GroupByReducer<T extends FtAggregateGroupByReducer> {
type: T;
AS?: RedisArgument;
}
interface GroupByReducerWithProperty<T extends FtAggregateGroupByReducer> extends GroupByReducer<T> {
property: RediSearchProperty;
}
type CountReducer = GroupByReducer<FT_AGGREGATE_GROUP_BY_REDUCERS['COUNT']>;
type CountDistinctReducer = GroupByReducerWithProperty<FT_AGGREGATE_GROUP_BY_REDUCERS['COUNT_DISTINCT']>;
type CountDistinctishReducer = GroupByReducerWithProperty<FT_AGGREGATE_GROUP_BY_REDUCERS['COUNT_DISTINCTISH']>;
type SumReducer = GroupByReducerWithProperty<FT_AGGREGATE_GROUP_BY_REDUCERS['SUM']>;
type MinReducer = GroupByReducerWithProperty<FT_AGGREGATE_GROUP_BY_REDUCERS['MIN']>;
type MaxReducer = GroupByReducerWithProperty<FT_AGGREGATE_GROUP_BY_REDUCERS['MAX']>;
type AvgReducer = GroupByReducerWithProperty<FT_AGGREGATE_GROUP_BY_REDUCERS['AVG']>;
type StdDevReducer = GroupByReducerWithProperty<FT_AGGREGATE_GROUP_BY_REDUCERS['STDDEV']>;
interface QuantileReducer extends GroupByReducerWithProperty<FT_AGGREGATE_GROUP_BY_REDUCERS['QUANTILE']> {
quantile: number;
}
type ToListReducer = GroupByReducerWithProperty<FT_AGGREGATE_GROUP_BY_REDUCERS['TOLIST']>;
interface FirstValueReducer extends GroupByReducerWithProperty<FT_AGGREGATE_GROUP_BY_REDUCERS['FIRST_VALUE']> {
BY?: RediSearchProperty | {
property: RediSearchProperty;
direction?: 'ASC' | 'DESC';
};
}
interface RandomSampleReducer extends GroupByReducerWithProperty<FT_AGGREGATE_GROUP_BY_REDUCERS['RANDOM_SAMPLE']> {
sampleSize: number;
}
export type GroupByReducers = CountReducer | CountDistinctReducer | CountDistinctishReducer | SumReducer | MinReducer | MaxReducer | AvgReducer | StdDevReducer | QuantileReducer | ToListReducer | FirstValueReducer | RandomSampleReducer;
interface GroupByStep extends AggregateStep<FT_AGGREGATE_STEPS['GROUPBY']> {
properties?: RediSearchProperty | Array<RediSearchProperty>;
REDUCE: GroupByReducers | Array<GroupByReducers>;
}
type SortByProperty = RedisArgument | {
BY: RediSearchProperty;
DIRECTION?: 'ASC' | 'DESC';
};
interface SortStep extends AggregateStep<FT_AGGREGATE_STEPS['SORTBY']> {
BY: SortByProperty | Array<SortByProperty>;
MAX?: number;
}
interface ApplyStep extends AggregateStep<FT_AGGREGATE_STEPS['APPLY']> {
expression: RedisArgument;
AS: RedisArgument;
}
interface LimitStep extends AggregateStep<FT_AGGREGATE_STEPS['LIMIT']> {
from: number;
size: number;
}
interface FilterStep extends AggregateStep<FT_AGGREGATE_STEPS['FILTER']> {
expression: RedisArgument;
}
export interface FtAggregateOptions {
VERBATIM?: boolean;
ADDSCORES?: boolean;
LOAD?: '*' | LoadField | Array<LoadField>;
TIMEOUT?: number;
STEPS?: Array<GroupByStep | SortStep | ApplyStep | LimitStep | FilterStep>;
PARAMS?: FtSearchParams;
DIALECT?: number;
}
export type AggregateRawReply = [
total: UnwrapReply<NumberReply>,
...results: UnwrapReply<ArrayReply<ArrayReply<BlobStringReply>>>
];
export interface AggregateReply {
total: number;
results: Array<MapReply<BlobStringReply, BlobStringReply>>;
}
declare function transformAggregateReplyResp2(rawReply: AggregateRawReply, preserve?: any, typeMapping?: TypeMapping): AggregateReply;
declare function transformAggregateReplyResp3(rawReply: ReplyUnion, preserve?: any, typeMapping?: TypeMapping): AggregateReply;
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: CommandParser, index: RedisArgument, query: RedisArgument, options?: FtAggregateOptions) => void;
readonly transformReply: {
readonly 2: typeof transformAggregateReplyResp2;
readonly 3: typeof transformAggregateReplyResp3;
};
};
export default _default;
export declare function parseAggregateOptions(parser: CommandParser, options?: FtAggregateOptions): void;
export declare function parseGroupByReducer(parser: CommandParser, reducer: GroupByReducers): void;
//# sourceMappingURL=AGGREGATE.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"AGGREGATE.d.ts","sourceRoot":"","sources":["../../../lib/commands/AGGREGATE.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,239 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseGroupByReducer = exports.parseAggregateOptions = exports.FT_AGGREGATE_GROUP_BY_REDUCERS = exports.FT_AGGREGATE_STEPS = void 0;
const SEARCH_1 = require("./SEARCH");
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
const default_1 = require("../dialect/default");
const reply_transformers_1 = require("./reply-transformers");
const decoder_1 = require("@redis/client/dist/lib/RESP/decoder");
exports.FT_AGGREGATE_STEPS = {
GROUPBY: 'GROUPBY',
SORTBY: 'SORTBY',
APPLY: 'APPLY',
LIMIT: 'LIMIT',
FILTER: 'FILTER'
};
exports.FT_AGGREGATE_GROUP_BY_REDUCERS = {
COUNT: 'COUNT',
COUNT_DISTINCT: 'COUNT_DISTINCT',
COUNT_DISTINCTISH: 'COUNT_DISTINCTISH',
SUM: 'SUM',
MIN: 'MIN',
MAX: 'MAX',
AVG: 'AVG',
STDDEV: 'STDDEV',
QUANTILE: 'QUANTILE',
TOLIST: 'TOLIST',
FIRST_VALUE: 'FIRST_VALUE',
RANDOM_SAMPLE: 'RANDOM_SAMPLE'
};
;
function transformAggregateReplyResp2(rawReply,
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- matches TransformReply contract
preserve, typeMapping) {
const results = [];
for (let i = 1; i < rawReply.length; i++) {
results.push((0, generic_transformers_1.transformTuplesReply)(rawReply[i], preserve, typeMapping));
}
return {
// https://redis.io/docs/latest/commands/ft.aggregate/#return
// FT.AGGREGATE returns an array reply where each row is an array reply and represents a single aggregate result.
// The integer reply at position 1 does not represent a valid value.
total: Number(rawReply[0]),
results
};
}
function transformAggregateReplyResp3(rawReply,
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- matches TransformReply contract
preserve, typeMapping) {
const reply = (0, reply_transformers_1.mapLikeToObject)(rawReply);
const total = Number((0, reply_transformers_1.getMapValue)(reply, ['total_results', 'total']) ?? 0);
const rawResults = (0, reply_transformers_1.mapLikeValues)((0, reply_transformers_1.getMapValue)(reply, ['results']) ?? []);
const results = [];
const mapType = typeMapping ? typeMapping[decoder_1.RESP_TYPES.MAP] : undefined;
for (const rawResult of rawResults) {
const normalized = (0, reply_transformers_1.parseAggregateResultRow)(rawResult);
switch (mapType) {
case Array: {
results.push((0, reply_transformers_1.mapLikeToFlatArray)(normalized));
break;
}
case Map: {
results.push(new Map(Object.entries(normalized)));
break;
}
default: {
results.push(normalized);
}
}
}
return {
total,
results
};
}
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: false,
parseCommand(parser, index, query, options) {
parser.push('FT.AGGREGATE', index, query);
return parseAggregateOptions(parser, options);
},
transformReply: {
2: transformAggregateReplyResp2,
3: transformAggregateReplyResp3
},
};
function parseAggregateOptions(parser, options) {
if (options?.VERBATIM) {
parser.push('VERBATIM');
}
if (options?.ADDSCORES) {
parser.push('ADDSCORES');
}
if (options?.LOAD) {
parser.push('LOAD');
if (options.LOAD === '*') {
parser.push('*');
}
else {
const args = [];
if (Array.isArray(options?.LOAD)) {
for (const load of options.LOAD) {
pushLoadField(args, load);
}
}
else {
pushLoadField(args, options?.LOAD);
}
parser.pushVariadicWithLength(args);
}
}
if (options?.TIMEOUT !== undefined) {
parser.push('TIMEOUT', options.TIMEOUT.toString());
}
if (options?.STEPS) {
for (const step of options.STEPS) {
parser.push(step.type);
switch (step.type) {
case exports.FT_AGGREGATE_STEPS.GROUPBY:
if (!step.properties) {
parser.push('0');
}
else {
parser.pushVariadicWithLength(step.properties);
}
if (Array.isArray(step.REDUCE)) {
for (const reducer of step.REDUCE) {
parseGroupByReducer(parser, reducer);
}
}
else {
parseGroupByReducer(parser, step.REDUCE);
}
break;
case exports.FT_AGGREGATE_STEPS.SORTBY: {
const args = [];
if (Array.isArray(step.BY)) {
for (const by of step.BY) {
pushSortByProperty(args, by);
}
}
else {
pushSortByProperty(args, step.BY);
}
if (step.MAX) {
args.push('MAX', step.MAX.toString());
}
parser.pushVariadicWithLength(args);
break;
}
case exports.FT_AGGREGATE_STEPS.APPLY:
parser.push(step.expression, 'AS', step.AS);
break;
case exports.FT_AGGREGATE_STEPS.LIMIT:
parser.push(step.from.toString(), step.size.toString());
break;
case exports.FT_AGGREGATE_STEPS.FILTER:
parser.push(step.expression);
break;
}
}
}
(0, SEARCH_1.parseParamsArgument)(parser, options?.PARAMS);
if (options?.DIALECT) {
parser.push('DIALECT', options.DIALECT.toString());
}
else {
parser.push('DIALECT', default_1.DEFAULT_DIALECT);
}
}
exports.parseAggregateOptions = parseAggregateOptions;
function pushLoadField(args, toLoad) {
if (typeof toLoad === 'string' || toLoad instanceof Buffer) {
args.push(toLoad);
}
else {
args.push(toLoad.identifier);
if (toLoad.AS) {
args.push('AS', toLoad.AS);
}
}
}
function parseGroupByReducer(parser, reducer) {
parser.push('REDUCE', reducer.type);
switch (reducer.type) {
case exports.FT_AGGREGATE_GROUP_BY_REDUCERS.COUNT:
parser.push('0');
break;
case exports.FT_AGGREGATE_GROUP_BY_REDUCERS.COUNT_DISTINCT:
case exports.FT_AGGREGATE_GROUP_BY_REDUCERS.COUNT_DISTINCTISH:
case exports.FT_AGGREGATE_GROUP_BY_REDUCERS.SUM:
case exports.FT_AGGREGATE_GROUP_BY_REDUCERS.MIN:
case exports.FT_AGGREGATE_GROUP_BY_REDUCERS.MAX:
case exports.FT_AGGREGATE_GROUP_BY_REDUCERS.AVG:
case exports.FT_AGGREGATE_GROUP_BY_REDUCERS.STDDEV:
case exports.FT_AGGREGATE_GROUP_BY_REDUCERS.TOLIST:
parser.push('1', reducer.property);
break;
case exports.FT_AGGREGATE_GROUP_BY_REDUCERS.QUANTILE:
parser.push('2', reducer.property, reducer.quantile.toString());
break;
case exports.FT_AGGREGATE_GROUP_BY_REDUCERS.FIRST_VALUE: {
const args = [reducer.property];
if (reducer.BY) {
args.push('BY');
if (typeof reducer.BY === 'string' || reducer.BY instanceof Buffer) {
args.push(reducer.BY);
}
else {
args.push(reducer.BY.property);
if (reducer.BY.direction) {
args.push(reducer.BY.direction);
}
}
}
parser.pushVariadicWithLength(args);
break;
}
case exports.FT_AGGREGATE_GROUP_BY_REDUCERS.RANDOM_SAMPLE:
parser.push('2', reducer.property, reducer.sampleSize.toString());
break;
}
if (reducer.AS) {
parser.push('AS', reducer.AS);
}
}
exports.parseGroupByReducer = parseGroupByReducer;
function pushSortByProperty(args, sortBy) {
if (typeof sortBy === 'string' || sortBy instanceof Buffer) {
args.push(sortBy);
}
else {
args.push(sortBy.BY);
if (sortBy.DIRECTION) {
args.push(sortBy.DIRECTION);
}
}
}
//# sourceMappingURL=AGGREGATE.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,25 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, ReplyUnion, NumberReply, TypeMapping } from '@redis/client/dist/lib/RESP/types';
import { AggregateRawReply, AggregateReply, FtAggregateOptions } from './AGGREGATE';
export interface FtAggregateWithCursorOptions extends FtAggregateOptions {
COUNT?: number;
MAXIDLE?: number;
}
type AggregateWithCursorRawReply = [
result: AggregateRawReply,
cursor: NumberReply
];
export interface AggregateWithCursorReply extends AggregateReply {
cursor: NumberReply;
}
declare function transformAggregateWithCursorReplyResp3(reply: ReplyUnion, preserve?: any, typeMapping?: TypeMapping): AggregateWithCursorReply;
declare const _default: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: CommandParser, index: RedisArgument, query: RedisArgument, options?: FtAggregateWithCursorOptions) => void;
readonly transformReply: {
readonly 2: (reply: AggregateWithCursorRawReply, preserve?: any, typeMapping?: TypeMapping) => AggregateWithCursorReply;
readonly 3: typeof transformAggregateWithCursorReplyResp3;
};
};
export default _default;
//# sourceMappingURL=AGGREGATE_WITHCURSOR.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"AGGREGATE_WITHCURSOR.d.ts","sourceRoot":"","sources":["../../../lib/commands/AGGREGATE_WITHCURSOR.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAW,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AACjH,OAAkB,EAAE,iBAAiB,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAG/F,MAAM,WAAW,4BAA6B,SAAQ,kBAAkB;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAGD,KAAK,2BAA2B,GAAG;IACjC,MAAM,EAAE,iBAAiB;IACzB,MAAM,EAAE,WAAW;CACpB,CAAC;AAEF,MAAM,WAAW,wBAAyB,SAAQ,cAAc;IAC9D,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,iBAAS,sCAAsC,CAC7C,KAAK,EAAE,UAAU,EAEjB,QAAQ,CAAC,EAAE,GAAG,EACd,WAAW,CAAC,EAAE,WAAW,GACxB,wBAAwB,CAe1B;;;gDAIsB,aAAa,SAAS,aAAa,SAAS,aAAa,YAAY,4BAA4B;;oEAgBvG,GAAG,gBACA,WAAW,KACxB,wBAAwB;;;;AApB/B,wBA4B6B"}
@@ -0,0 +1,48 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const AGGREGATE_1 = __importDefault(require("./AGGREGATE"));
const reply_transformers_1 = require("./reply-transformers");
function transformAggregateWithCursorReplyResp3(reply,
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- matches TransformReply contract
preserve, typeMapping) {
if (Array.isArray(reply)) {
return {
...AGGREGATE_1.default.transformReply[3](reply[0], preserve, typeMapping),
cursor: reply[1]
};
}
const mappedReply = (0, reply_transformers_1.mapLikeToObject)(reply);
const rawResult = (0, reply_transformers_1.getMapValue)(mappedReply, ['results', 'result']) ?? mappedReply;
return {
...AGGREGATE_1.default.transformReply[3](rawResult, preserve, typeMapping),
cursor: ((0, reply_transformers_1.getMapValue)(mappedReply, ['cursor']) ?? 0)
};
}
exports.default = {
IS_READ_ONLY: AGGREGATE_1.default.IS_READ_ONLY,
parseCommand(parser, index, query, options) {
AGGREGATE_1.default.parseCommand(parser, index, query, options);
parser.push('WITHCURSOR');
if (options?.COUNT !== undefined) {
parser.push('COUNT', options.COUNT.toString());
}
if (options?.MAXIDLE !== undefined) {
parser.push('MAXIDLE', options.MAXIDLE.toString());
}
},
transformReply: {
2: (reply,
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- matches TransformReply contract
preserve, typeMapping) => {
return {
...AGGREGATE_1.default.transformReply[2](reply[0], preserve, typeMapping),
cursor: reply[1]
};
},
3: transformAggregateWithCursorReplyResp3
},
};
//# sourceMappingURL=AGGREGATE_WITHCURSOR.js.map
@@ -0,0 +1 @@
{"version":3,"file":"AGGREGATE_WITHCURSOR.js","sourceRoot":"","sources":["../../../lib/commands/AGGREGATE_WITHCURSOR.ts"],"names":[],"mappings":";;;;;AAEA,4DAA+F;AAC/F,6DAAoE;AAiBpE,SAAS,sCAAsC,CAC7C,KAAiB;AACjB,iGAAiG;AACjG,QAAc,EACd,WAAyB;IAEzB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO;YACL,GAAI,mBAAS,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAe,EAAE,QAAQ,EAAE,WAAW,CAAoB;YACjG,MAAM,EAAE,KAAK,CAAC,CAAC,CAAgB;SAChC,CAAC;IACJ,CAAC;IAED,MAAM,WAAW,GAAG,IAAA,oCAAe,EAAC,KAAK,CAAC,CAAC;IAC3C,MAAM,SAAS,GAAG,IAAA,gCAAW,EAAC,WAAW,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,IAAI,WAAW,CAAC;IAEjF,OAAO;QACL,GAAI,mBAAS,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAuB,EAAE,QAAQ,EAAE,WAAW,CAAoB;QAClG,MAAM,EAAE,CAAC,IAAA,gCAAW,EAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAgB;KACnE,CAAC;AACJ,CAAC;AAED,kBAAe;IACb,YAAY,EAAE,mBAAS,CAAC,YAAY;IACpC,YAAY,CAAC,MAAqB,EAAE,KAAoB,EAAE,KAAoB,EAAE,OAAsC;QACpH,mBAAS,CAAC,YAAY,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QACtD,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAE1B,IAAI,OAAO,EAAE,KAAK,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;QACjD,CAAC;QAED,IAAG,OAAO,EAAE,OAAO,KAAK,SAAS,EAAE,CAAC;YAClC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QACrD,CAAC;IACH,CAAC;IACD,cAAc,EAAE;QACd,CAAC,EAAE,CACD,KAAkC;QAClC,iGAAiG;QACjG,QAAc,EACd,WAAyB,EACC,EAAE;YAC5B,OAAO;gBACL,GAAG,mBAAS,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,WAAW,CAAC;gBAC/D,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;aACjB,CAAC;QACJ,CAAC;QACD,CAAC,EAAE,sCAAsC;KAC1C;CACyB,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, Command, ReplyUnion, NumberReply, TypeMapping } from '@redis/client/dist/lib/RESP/types';\nimport AGGREGATE, { AggregateRawReply, AggregateReply, FtAggregateOptions } from './AGGREGATE';\nimport { getMapValue, mapLikeToObject } from './reply-transformers';\n\nexport interface FtAggregateWithCursorOptions extends FtAggregateOptions {\n COUNT?: number;\n MAXIDLE?: number;\n}\n\n\ntype AggregateWithCursorRawReply = [\n result: AggregateRawReply,\n cursor: NumberReply\n];\n\nexport interface AggregateWithCursorReply extends AggregateReply {\n cursor: NumberReply;\n}\n\nfunction transformAggregateWithCursorReplyResp3(\n reply: ReplyUnion,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- matches TransformReply contract\n preserve?: any,\n typeMapping?: TypeMapping\n): AggregateWithCursorReply {\n if (Array.isArray(reply)) {\n return {\n ...(AGGREGATE.transformReply[3](reply[0] as ReplyUnion, preserve, typeMapping) as AggregateReply),\n cursor: reply[1] as NumberReply\n };\n }\n\n const mappedReply = mapLikeToObject(reply);\n const rawResult = getMapValue(mappedReply, ['results', 'result']) ?? mappedReply;\n\n return {\n ...(AGGREGATE.transformReply[3](rawResult as ReplyUnion, preserve, typeMapping) as AggregateReply),\n cursor: (getMapValue(mappedReply, ['cursor']) ?? 0) as NumberReply\n };\n}\n\nexport default {\n IS_READ_ONLY: AGGREGATE.IS_READ_ONLY,\n parseCommand(parser: CommandParser, index: RedisArgument, query: RedisArgument, options?: FtAggregateWithCursorOptions) {\n AGGREGATE.parseCommand(parser, index, query, options);\n parser.push('WITHCURSOR');\n\n if (options?.COUNT !== undefined) {\n parser.push('COUNT', options.COUNT.toString());\n }\n\n if(options?.MAXIDLE !== undefined) {\n parser.push('MAXIDLE', options.MAXIDLE.toString());\n }\n },\n transformReply: {\n 2: (\n reply: AggregateWithCursorRawReply,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- matches TransformReply contract\n preserve?: any,\n typeMapping?: TypeMapping\n ): AggregateWithCursorReply => {\n return {\n ...AGGREGATE.transformReply[2](reply[0], preserve, typeMapping),\n cursor: reply[1]\n };\n },\n 3: transformAggregateWithCursorReplyResp3\n },\n} as const satisfies Command;\n"]}
@@ -0,0 +1,10 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, SimpleStringReply } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, alias: RedisArgument, index: RedisArgument) => void;
readonly transformReply: () => SimpleStringReply<'OK'>;
};
export default _default;
//# sourceMappingURL=ALIASADD.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"ALIASADD.d.ts","sourceRoot":"","sources":["../../../lib/commands/ALIASADD.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAW,MAAM,mCAAmC,CAAC;;;;gDAKvE,aAAa,SAAS,aAAa,SAAS,aAAa;mCAGhC,kBAAkB,IAAI,CAAC;;AANvE,wBAO6B"}
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
parseCommand(parser, alias, index) {
parser.push('FT.ALIASADD', alias, index);
},
transformReply: undefined
};
//# sourceMappingURL=ALIASADD.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ALIASADD.js","sourceRoot":"","sources":["../../../lib/commands/ALIASADD.ts"],"names":[],"mappings":";;AAGA,kBAAe;IACb,iBAAiB,EAAE,IAAI;IACvB,YAAY,EAAE,IAAI;IAClB,YAAY,CAAC,MAAqB,EAAE,KAAoB,EAAE,KAAoB;QAC5E,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAC3C,CAAC;IACD,cAAc,EAAE,SAAqD;CAC3C,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, SimpleStringReply, Command } from '@redis/client/dist/lib/RESP/types';\n\nexport default {\n NOT_KEYED_COMMAND: true,\n IS_READ_ONLY: true,\n parseCommand(parser: CommandParser, alias: RedisArgument, index: RedisArgument) {\n parser.push('FT.ALIASADD', alias, index);\n },\n transformReply: undefined as unknown as () => SimpleStringReply<'OK'>\n} as const satisfies Command;\n"]}
@@ -0,0 +1,10 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, SimpleStringReply } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, alias: RedisArgument) => void;
readonly transformReply: () => SimpleStringReply<'OK'>;
};
export default _default;
//# sourceMappingURL=ALIASDEL.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"ALIASDEL.d.ts","sourceRoot":"","sources":["../../../lib/commands/ALIASDEL.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAW,MAAM,mCAAmC,CAAC;;;;gDAKvE,aAAa,SAAS,aAAa;mCAGV,kBAAkB,IAAI,CAAC;;AANvE,wBAO6B"}
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
parseCommand(parser, alias) {
parser.push('FT.ALIASDEL', alias);
},
transformReply: undefined
};
//# sourceMappingURL=ALIASDEL.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ALIASDEL.js","sourceRoot":"","sources":["../../../lib/commands/ALIASDEL.ts"],"names":[],"mappings":";;AAGA,kBAAe;IACb,iBAAiB,EAAE,IAAI;IACvB,YAAY,EAAE,IAAI;IAClB,YAAY,CAAC,MAAqB,EAAE,KAAoB;QACtD,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC;IACD,cAAc,EAAE,SAAqD;CAC3C,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, SimpleStringReply, Command } from '@redis/client/dist/lib/RESP/types';\n\nexport default {\n NOT_KEYED_COMMAND: true,\n IS_READ_ONLY: true,\n parseCommand(parser: CommandParser, alias: RedisArgument) {\n parser.push('FT.ALIASDEL', alias);\n },\n transformReply: undefined as unknown as () => SimpleStringReply<'OK'>\n} as const satisfies Command;\n"]}
@@ -0,0 +1,10 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { SimpleStringReply, RedisArgument } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, alias: RedisArgument, index: RedisArgument) => void;
readonly transformReply: () => SimpleStringReply<'OK'>;
};
export default _default;
//# sourceMappingURL=ALIASUPDATE.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"ALIASUPDATE.d.ts","sourceRoot":"","sources":["../../../lib/commands/ALIASUPDATE.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAW,aAAa,EAAE,MAAM,mCAAmC,CAAC;;;;gDAKvE,aAAa,SAAS,aAAa,SAAS,aAAa;mCAGhC,kBAAkB,IAAI,CAAC;;AANvE,wBAO6B"}
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
parseCommand(parser, alias, index) {
parser.push('FT.ALIASUPDATE', alias, index);
},
transformReply: undefined
};
//# sourceMappingURL=ALIASUPDATE.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ALIASUPDATE.js","sourceRoot":"","sources":["../../../lib/commands/ALIASUPDATE.ts"],"names":[],"mappings":";;AAGA,kBAAe;IACb,iBAAiB,EAAE,IAAI;IACvB,YAAY,EAAE,IAAI;IAClB,YAAY,CAAC,MAAqB,EAAE,KAAoB,EAAE,KAAoB;QAC5E,MAAM,CAAC,IAAI,CAAC,gBAAgB,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAC9C,CAAC;IACD,cAAc,EAAE,SAAqD;CAC3C,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { SimpleStringReply, Command, RedisArgument } from '@redis/client/dist/lib/RESP/types';\n\nexport default {\n NOT_KEYED_COMMAND: true,\n IS_READ_ONLY: true,\n parseCommand(parser: CommandParser, alias: RedisArgument, index: RedisArgument) {\n parser.push('FT.ALIASUPDATE', alias, index);\n },\n transformReply: undefined as unknown as () => SimpleStringReply<'OK'>\n} as const satisfies Command;\n"]}
@@ -0,0 +1,11 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, SimpleStringReply } from '@redis/client/dist/lib/RESP/types';
import { RediSearchSchema } from './CREATE';
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, index: RedisArgument, schema: RediSearchSchema) => void;
readonly transformReply: () => SimpleStringReply<'OK'>;
};
export default _default;
//# sourceMappingURL=ALTER.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"ALTER.d.ts","sourceRoot":"","sources":["../../../lib/commands/ALTER.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAW,MAAM,mCAAmC,CAAC;AAC9F,OAAO,EAAE,gBAAgB,EAAe,MAAM,UAAU,CAAC;;;;gDAKlC,aAAa,SAAS,aAAa,UAAU,gBAAgB;mCAIpC,kBAAkB,IAAI,CAAC;;AAPvE,wBAQ6B"}
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const CREATE_1 = require("./CREATE");
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
parseCommand(parser, index, schema) {
parser.push('FT.ALTER', index, 'SCHEMA', 'ADD');
(0, CREATE_1.parseSchema)(parser, schema);
},
transformReply: undefined
};
//# sourceMappingURL=ALTER.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ALTER.js","sourceRoot":"","sources":["../../../lib/commands/ALTER.ts"],"names":[],"mappings":";;AAEA,qCAAyD;AAEzD,kBAAe;IACb,iBAAiB,EAAE,IAAI;IACvB,YAAY,EAAE,IAAI;IAClB,YAAY,CAAC,MAAqB,EAAE,KAAoB,EAAE,MAAwB;QAChF,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;QAChD,IAAA,oBAAW,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,CAAC;IACD,cAAc,EAAE,SAAqD;CAC3C,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, SimpleStringReply, Command } from '@redis/client/dist/lib/RESP/types';\nimport { RediSearchSchema, parseSchema } from './CREATE';\n\nexport default {\n NOT_KEYED_COMMAND: true,\n IS_READ_ONLY: true,\n parseCommand(parser: CommandParser, index: RedisArgument, schema: RediSearchSchema) {\n parser.push('FT.ALTER', index, 'SCHEMA', 'ADD');\n parseSchema(parser, schema);\n },\n transformReply: undefined as unknown as () => SimpleStringReply<'OK'>\n} as const satisfies Command;\n"]}
@@ -0,0 +1,10 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { ArrayReply, TuplesReply, BlobStringReply, NullReply, UnwrapReply } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, option: string) => void;
readonly transformReply: (this: void, reply: UnwrapReply<ArrayReply<TuplesReply<[BlobStringReply, BlobStringReply | NullReply]>>>) => Record<string, unknown>;
};
export default _default;
//# sourceMappingURL=CONFIG_GET.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"CONFIG_GET.d.ts","sourceRoot":"","sources":["../../../lib/commands/CONFIG_GET.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAW,MAAM,mCAAmC,CAAC;;;;gDAMvG,aAAa,UAAU,MAAM;iDAG5B,YAAY,WAAW,YAAY,CAAC,eAAe,EAAE,eAAe,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;;AAN5G,wBAe6B"}
@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const reply_transformers_1 = require("./reply-transformers");
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
parseCommand(parser, option) {
parser.push('FT.CONFIG', 'GET', option);
},
transformReply(reply) {
const transformedReply = {};
for (const [key, value] of (0, reply_transformers_1.mapLikeEntries)(reply)) {
transformedReply[key] = value;
}
return (0, reply_transformers_1.toCompatObject)(transformedReply);
}
};
//# sourceMappingURL=CONFIG_GET.js.map
@@ -0,0 +1 @@
{"version":3,"file":"CONFIG_GET.js","sourceRoot":"","sources":["../../../lib/commands/CONFIG_GET.ts"],"names":[],"mappings":";;AAEA,6DAAsE;AAEtE,kBAAe;IACb,iBAAiB,EAAE,IAAI;IACvB,YAAY,EAAE,IAAI;IAClB,YAAY,CAAC,MAAqB,EAAE,MAAc;QAChD,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;IACD,cAAc,CAAC,KAA2F;QACxG,MAAM,gBAAgB,GAAgD,EAAE,CAAC;QAEzE,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,IAAA,mCAAc,EAAC,KAAK,CAAC,EAAE,CAAC;YACjD,gBAAgB,CAAC,GAAG,CAAC,GAAG,KAAoC,CAAC;QAC/D,CAAC;QAED,OAAO,IAAA,mCAAc,EAAC,gBAAgB,CAAC,CAAC;IAC1C,CAAC;CACyB,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { ArrayReply, TuplesReply, BlobStringReply, NullReply, UnwrapReply, Command } from '@redis/client/dist/lib/RESP/types';\nimport { mapLikeEntries, toCompatObject } from './reply-transformers';\n\nexport default {\n NOT_KEYED_COMMAND: true,\n IS_READ_ONLY: true,\n parseCommand(parser: CommandParser, option: string) {\n parser.push('FT.CONFIG', 'GET', option);\n },\n transformReply(reply: UnwrapReply<ArrayReply<TuplesReply<[BlobStringReply, BlobStringReply | NullReply]>>>) {\n const transformedReply: Record<string, BlobStringReply | NullReply> = {};\n\n for (const [key, value] of mapLikeEntries(reply)) {\n transformedReply[key] = value as BlobStringReply | NullReply;\n }\n\n return toCompatObject(transformedReply);\n }\n} as const satisfies Command;\n"]}
@@ -0,0 +1,12 @@
/// <reference types="node" />
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, SimpleStringReply } from '@redis/client/dist/lib/RESP/types';
type FtConfigProperties = 'a' | 'b' | (string & {}) | Buffer;
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, property: FtConfigProperties, value: RedisArgument) => void;
readonly transformReply: () => SimpleStringReply<'OK'>;
};
export default _default;
//# sourceMappingURL=CONFIG_SET.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"CONFIG_SET.d.ts","sourceRoot":"","sources":["../../../lib/commands/CONFIG_SET.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAW,MAAM,mCAAmC,CAAC;AAI9F,KAAK,kBAAkB,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,MAAM,CAAC;;;;gDAKtC,aAAa,YAAY,kBAAkB,SAAS,aAAa;mCAGxC,kBAAkB,IAAI,CAAC;;AANvE,wBAO6B"}
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
parseCommand(parser, property, value) {
parser.push('FT.CONFIG', 'SET', property, value);
},
transformReply: undefined
};
//# sourceMappingURL=CONFIG_SET.js.map
@@ -0,0 +1 @@
{"version":3,"file":"CONFIG_SET.js","sourceRoot":"","sources":["../../../lib/commands/CONFIG_SET.ts"],"names":[],"mappings":";;AAOA,kBAAe;IACb,iBAAiB,EAAE,IAAI;IACvB,YAAY,EAAE,IAAI;IAClB,YAAY,CAAC,MAAqB,EAAE,QAA4B,EAAE,KAAoB;QACpF,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;IACnD,CAAC;IACD,cAAc,EAAE,SAAqD;CAC3C,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, SimpleStringReply, Command } from '@redis/client/dist/lib/RESP/types';\n\n// using `string & {}` to avoid TS widening the type to `string`\n// TODO\ntype FtConfigProperties = 'a' | 'b' | (string & {}) | Buffer;\n\nexport default {\n NOT_KEYED_COMMAND: true,\n IS_READ_ONLY: true,\n parseCommand(parser: CommandParser, property: FtConfigProperties, value: RedisArgument) {\n parser.push('FT.CONFIG', 'SET', property, value);\n },\n transformReply: undefined as unknown as () => SimpleStringReply<'OK'>\n} as const satisfies Command;\n"]}
@@ -0,0 +1,182 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, SimpleStringReply } from '@redis/client/dist/lib/RESP/types';
import { RedisVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers';
export declare const SCHEMA_FIELD_TYPE: {
readonly TEXT: "TEXT";
readonly NUMERIC: "NUMERIC";
readonly GEO: "GEO";
readonly TAG: "TAG";
readonly VECTOR: "VECTOR";
readonly GEOSHAPE: "GEOSHAPE";
};
export type SchemaFieldType = typeof SCHEMA_FIELD_TYPE[keyof typeof SCHEMA_FIELD_TYPE];
interface SchemaField<T extends SchemaFieldType = SchemaFieldType> {
type: T;
AS?: RedisArgument;
INDEXMISSING?: boolean;
}
interface SchemaCommonField<T extends SchemaFieldType = SchemaFieldType> extends SchemaField<T> {
SORTABLE?: boolean | 'UNF';
NOINDEX?: boolean;
}
export declare const SCHEMA_TEXT_FIELD_PHONETIC: {
readonly DM_EN: "dm:en";
readonly DM_FR: "dm:fr";
readonly DM_PT: "dm:pt";
readonly DM_ES: "dm:es";
};
export type SchemaTextFieldPhonetic = typeof SCHEMA_TEXT_FIELD_PHONETIC[keyof typeof SCHEMA_TEXT_FIELD_PHONETIC];
interface SchemaTextField extends SchemaCommonField<typeof SCHEMA_FIELD_TYPE['TEXT']> {
NOSTEM?: boolean;
WEIGHT?: number;
PHONETIC?: SchemaTextFieldPhonetic;
WITHSUFFIXTRIE?: boolean;
INDEXEMPTY?: boolean;
}
type SchemaNumericField = SchemaCommonField<typeof SCHEMA_FIELD_TYPE['NUMERIC']>;
type SchemaGeoField = SchemaCommonField<typeof SCHEMA_FIELD_TYPE['GEO']>;
interface SchemaTagField extends SchemaCommonField<typeof SCHEMA_FIELD_TYPE['TAG']> {
SEPARATOR?: RedisArgument;
CASESENSITIVE?: boolean;
WITHSUFFIXTRIE?: boolean;
INDEXEMPTY?: boolean;
}
export declare const SCHEMA_VECTOR_FIELD_ALGORITHM: {
readonly FLAT: "FLAT";
readonly HNSW: "HNSW";
/**
* available since 8.2
*/
readonly VAMANA: "SVS-VAMANA";
};
export type SchemaVectorFieldAlgorithm = typeof SCHEMA_VECTOR_FIELD_ALGORITHM[keyof typeof SCHEMA_VECTOR_FIELD_ALGORITHM];
interface SchemaVectorField extends SchemaField<typeof SCHEMA_FIELD_TYPE['VECTOR']> {
ALGORITHM: SchemaVectorFieldAlgorithm;
TYPE: 'FLOAT32' | 'FLOAT64' | 'BFLOAT16' | 'FLOAT16' | 'INT8' | 'UINT8';
DIM: number;
DISTANCE_METRIC: 'L2' | 'IP' | 'COSINE';
INITIAL_CAP?: number;
}
interface SchemaFlatVectorField extends SchemaVectorField {
ALGORITHM: typeof SCHEMA_VECTOR_FIELD_ALGORITHM['FLAT'];
BLOCK_SIZE?: number;
}
interface SchemaHNSWVectorField extends SchemaVectorField {
ALGORITHM: typeof SCHEMA_VECTOR_FIELD_ALGORITHM['HNSW'];
M?: number;
EF_CONSTRUCTION?: number;
EF_RUNTIME?: number;
}
export declare const VAMANA_COMPRESSION_ALGORITHM: {
readonly LVQ4: "LVQ4";
readonly LVQ8: "LVQ8";
readonly LVQ4x4: "LVQ4x4";
readonly LVQ4x8: "LVQ4x8";
readonly LeanVec4x8: "LeanVec4x8";
readonly LeanVec8x8: "LeanVec8x8";
};
export type VamanaCompressionAlgorithm = typeof VAMANA_COMPRESSION_ALGORITHM[keyof typeof VAMANA_COMPRESSION_ALGORITHM];
interface SchemaVAMANAVectorField extends SchemaVectorField {
ALGORITHM: typeof SCHEMA_VECTOR_FIELD_ALGORITHM['VAMANA'];
TYPE: 'FLOAT16' | 'FLOAT32';
COMPRESSION?: VamanaCompressionAlgorithm;
CONSTRUCTION_WINDOW_SIZE?: number;
GRAPH_MAX_DEGREE?: number;
SEARCH_WINDOW_SIZE?: number;
EPSILON?: number;
/**
* applicable only with COMPRESSION
*/
TRAINING_THRESHOLD?: number;
/**
* applicable only with LeanVec COMPRESSION
*/
REDUCE?: number;
}
export declare const SCHEMA_GEO_SHAPE_COORD_SYSTEM: {
readonly SPHERICAL: "SPHERICAL";
readonly FLAT: "FLAT";
};
export type SchemaGeoShapeFieldCoordSystem = typeof SCHEMA_GEO_SHAPE_COORD_SYSTEM[keyof typeof SCHEMA_GEO_SHAPE_COORD_SYSTEM];
interface SchemaGeoShapeField extends SchemaField<typeof SCHEMA_FIELD_TYPE['GEOSHAPE']> {
COORD_SYSTEM?: SchemaGeoShapeFieldCoordSystem;
}
/**
* Union type representing all possible field definition types for a RediSearch schema.
*/
export type SchemaFieldDefinition = SchemaTextField | SchemaNumericField | SchemaGeoField | SchemaTagField | SchemaFlatVectorField | SchemaHNSWVectorField | SchemaVAMANAVectorField | SchemaGeoShapeField | SchemaFieldType;
/**
* Schema definition for a RediSearch index.
*
* Each field can be either a single field definition or an array of definitions.
* Use an array to index the same field multiple times with different types or aliases.
*
* @example
* // Single field definitions
* { name: SCHEMA_FIELD_TYPE.TEXT, age: SCHEMA_FIELD_TYPE.NUMERIC }
*
* @example
* // Same field indexed as both TEXT and TAG with different aliases
* { sku: [
* { type: SCHEMA_FIELD_TYPE.TEXT, AS: 'sku_text' },
* { type: SCHEMA_FIELD_TYPE.TAG, AS: 'sku_tag', SORTABLE: true }
* ]}
*/
export interface RediSearchSchema {
[field: string]: SchemaFieldDefinition | SchemaFieldDefinition[];
}
export declare function parseSchema(parser: CommandParser, schema: RediSearchSchema): void;
export declare const REDISEARCH_LANGUAGE: {
readonly ARABIC: "Arabic";
readonly BASQUE: "Basque";
readonly CATALANA: "Catalan";
readonly DANISH: "Danish";
readonly DUTCH: "Dutch";
readonly ENGLISH: "English";
readonly FINNISH: "Finnish";
readonly FRENCH: "French";
readonly GERMAN: "German";
readonly GREEK: "Greek";
readonly HUNGARIAN: "Hungarian";
readonly INDONESAIN: "Indonesian";
readonly IRISH: "Irish";
readonly ITALIAN: "Italian";
readonly LITHUANIAN: "Lithuanian";
readonly NEPALI: "Nepali";
readonly NORWEIGAN: "Norwegian";
readonly PORTUGUESE: "Portuguese";
readonly ROMANIAN: "Romanian";
readonly RUSSIAN: "Russian";
readonly SPANISH: "Spanish";
readonly SWEDISH: "Swedish";
readonly TAMIL: "Tamil";
readonly TURKISH: "Turkish";
readonly CHINESE: "Chinese";
};
export type RediSearchLanguage = typeof REDISEARCH_LANGUAGE[keyof typeof REDISEARCH_LANGUAGE];
export type RediSearchProperty = `${'@' | '$.'}${string}`;
export interface CreateOptions {
ON?: 'HASH' | 'JSON';
PREFIX?: RedisVariadicArgument;
FILTER?: RedisArgument;
LANGUAGE?: RediSearchLanguage;
LANGUAGE_FIELD?: RediSearchProperty;
SCORE?: number;
SCORE_FIELD?: RediSearchProperty;
MAXTEXTFIELDS?: boolean;
TEMPORARY?: number;
NOOFFSETS?: boolean;
NOHL?: boolean;
NOFIELDS?: boolean;
NOFREQS?: boolean;
SKIPINITIALSCAN?: boolean;
STOPWORDS?: RedisVariadicArgument;
}
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, index: RedisArgument, schema: RediSearchSchema, options?: CreateOptions) => void;
readonly transformReply: () => SimpleStringReply<'OK'>;
};
export default _default;
//# sourceMappingURL=CREATE.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"CREATE.d.ts","sourceRoot":"","sources":["../../../lib/commands/CREATE.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,261 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.REDISEARCH_LANGUAGE = exports.parseSchema = exports.SCHEMA_GEO_SHAPE_COORD_SYSTEM = exports.VAMANA_COMPRESSION_ALGORITHM = exports.SCHEMA_VECTOR_FIELD_ALGORITHM = exports.SCHEMA_TEXT_FIELD_PHONETIC = exports.SCHEMA_FIELD_TYPE = void 0;
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
exports.SCHEMA_FIELD_TYPE = {
TEXT: 'TEXT',
NUMERIC: 'NUMERIC',
GEO: 'GEO',
TAG: 'TAG',
VECTOR: 'VECTOR',
GEOSHAPE: 'GEOSHAPE'
};
exports.SCHEMA_TEXT_FIELD_PHONETIC = {
DM_EN: 'dm:en',
DM_FR: 'dm:fr',
DM_PT: 'dm:pt',
DM_ES: 'dm:es'
};
exports.SCHEMA_VECTOR_FIELD_ALGORITHM = {
FLAT: 'FLAT',
HNSW: 'HNSW',
/**
* available since 8.2
*/
VAMANA: 'SVS-VAMANA'
};
exports.VAMANA_COMPRESSION_ALGORITHM = {
LVQ4: 'LVQ4',
LVQ8: 'LVQ8',
LVQ4x4: 'LVQ4x4',
LVQ4x8: 'LVQ4x8',
LeanVec4x8: 'LeanVec4x8',
LeanVec8x8: 'LeanVec8x8'
};
exports.SCHEMA_GEO_SHAPE_COORD_SYSTEM = {
SPHERICAL: 'SPHERICAL',
FLAT: 'FLAT'
};
function parseCommonSchemaFieldOptions(parser, fieldOptions) {
if (fieldOptions.SORTABLE) {
parser.push('SORTABLE');
if (fieldOptions.SORTABLE === 'UNF') {
parser.push('UNF');
}
}
if (fieldOptions.NOINDEX) {
parser.push('NOINDEX');
}
}
function parseSchema(parser, schema) {
for (const [field, fieldOptionsOrArray] of Object.entries(schema)) {
// Normalize to array for uniform processing
const fieldOptionsList = Array.isArray(fieldOptionsOrArray)
? fieldOptionsOrArray
: [fieldOptionsOrArray];
for (const fieldOptions of fieldOptionsList) {
parser.push(field);
if (typeof fieldOptions === 'string') {
parser.push(fieldOptions);
continue;
}
if (fieldOptions.AS) {
parser.push('AS', fieldOptions.AS);
}
parser.push(fieldOptions.type);
switch (fieldOptions.type) {
case exports.SCHEMA_FIELD_TYPE.TEXT:
if (fieldOptions.INDEXMISSING) {
parser.push('INDEXMISSING');
}
if (fieldOptions.NOSTEM) {
parser.push('NOSTEM');
}
if (fieldOptions.WEIGHT !== undefined) {
parser.push('WEIGHT', fieldOptions.WEIGHT.toString());
}
if (fieldOptions.PHONETIC) {
parser.push('PHONETIC', fieldOptions.PHONETIC);
}
if (fieldOptions.WITHSUFFIXTRIE) {
parser.push('WITHSUFFIXTRIE');
}
if (fieldOptions.INDEXEMPTY) {
parser.push('INDEXEMPTY');
}
parseCommonSchemaFieldOptions(parser, fieldOptions);
break;
case exports.SCHEMA_FIELD_TYPE.NUMERIC:
case exports.SCHEMA_FIELD_TYPE.GEO:
if (fieldOptions.INDEXMISSING) {
parser.push('INDEXMISSING');
}
parseCommonSchemaFieldOptions(parser, fieldOptions);
break;
case exports.SCHEMA_FIELD_TYPE.TAG:
if (fieldOptions.INDEXMISSING) {
parser.push('INDEXMISSING');
}
if (fieldOptions.SEPARATOR) {
parser.push('SEPARATOR', fieldOptions.SEPARATOR);
}
if (fieldOptions.CASESENSITIVE) {
parser.push('CASESENSITIVE');
}
if (fieldOptions.WITHSUFFIXTRIE) {
parser.push('WITHSUFFIXTRIE');
}
if (fieldOptions.INDEXEMPTY) {
parser.push('INDEXEMPTY');
}
parseCommonSchemaFieldOptions(parser, fieldOptions);
break;
case exports.SCHEMA_FIELD_TYPE.VECTOR: {
parser.push(fieldOptions.ALGORITHM);
const args = [];
args.push('TYPE', fieldOptions.TYPE, 'DIM', fieldOptions.DIM.toString(), 'DISTANCE_METRIC', fieldOptions.DISTANCE_METRIC);
if (fieldOptions.INITIAL_CAP !== undefined) {
args.push('INITIAL_CAP', fieldOptions.INITIAL_CAP.toString());
}
switch (fieldOptions.ALGORITHM) {
case exports.SCHEMA_VECTOR_FIELD_ALGORITHM.FLAT:
if (fieldOptions.BLOCK_SIZE !== undefined) {
args.push('BLOCK_SIZE', fieldOptions.BLOCK_SIZE.toString());
}
break;
case exports.SCHEMA_VECTOR_FIELD_ALGORITHM.HNSW:
if (fieldOptions.M !== undefined) {
args.push('M', fieldOptions.M.toString());
}
if (fieldOptions.EF_CONSTRUCTION !== undefined) {
args.push('EF_CONSTRUCTION', fieldOptions.EF_CONSTRUCTION.toString());
}
if (fieldOptions.EF_RUNTIME !== undefined) {
args.push('EF_RUNTIME', fieldOptions.EF_RUNTIME.toString());
}
break;
case exports.SCHEMA_VECTOR_FIELD_ALGORITHM['VAMANA']:
if (fieldOptions.COMPRESSION) {
args.push('COMPRESSION', fieldOptions.COMPRESSION);
}
if (fieldOptions.CONSTRUCTION_WINDOW_SIZE !== undefined) {
args.push('CONSTRUCTION_WINDOW_SIZE', fieldOptions.CONSTRUCTION_WINDOW_SIZE.toString());
}
if (fieldOptions.GRAPH_MAX_DEGREE !== undefined) {
args.push('GRAPH_MAX_DEGREE', fieldOptions.GRAPH_MAX_DEGREE.toString());
}
if (fieldOptions.SEARCH_WINDOW_SIZE !== undefined) {
args.push('SEARCH_WINDOW_SIZE', fieldOptions.SEARCH_WINDOW_SIZE.toString());
}
if (fieldOptions.EPSILON !== undefined) {
args.push('EPSILON', fieldOptions.EPSILON.toString());
}
if (fieldOptions.TRAINING_THRESHOLD !== undefined) {
args.push('TRAINING_THRESHOLD', fieldOptions.TRAINING_THRESHOLD.toString());
}
if (fieldOptions.REDUCE !== undefined) {
args.push('REDUCE', fieldOptions.REDUCE.toString());
}
break;
}
parser.pushVariadicWithLength(args);
if (fieldOptions.INDEXMISSING) {
parser.push('INDEXMISSING');
}
break;
}
case exports.SCHEMA_FIELD_TYPE.GEOSHAPE:
if (fieldOptions.COORD_SYSTEM !== undefined) {
parser.push('COORD_SYSTEM', fieldOptions.COORD_SYSTEM);
}
if (fieldOptions.INDEXMISSING) {
parser.push('INDEXMISSING');
}
break;
}
}
}
}
exports.parseSchema = parseSchema;
exports.REDISEARCH_LANGUAGE = {
ARABIC: 'Arabic',
BASQUE: 'Basque',
CATALANA: 'Catalan',
DANISH: 'Danish',
DUTCH: 'Dutch',
ENGLISH: 'English',
FINNISH: 'Finnish',
FRENCH: 'French',
GERMAN: 'German',
GREEK: 'Greek',
HUNGARIAN: 'Hungarian',
INDONESAIN: 'Indonesian',
IRISH: 'Irish',
ITALIAN: 'Italian',
LITHUANIAN: 'Lithuanian',
NEPALI: 'Nepali',
NORWEIGAN: 'Norwegian',
PORTUGUESE: 'Portuguese',
ROMANIAN: 'Romanian',
RUSSIAN: 'Russian',
SPANISH: 'Spanish',
SWEDISH: 'Swedish',
TAMIL: 'Tamil',
TURKISH: 'Turkish',
CHINESE: 'Chinese'
};
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
parseCommand(parser, index, schema, options) {
parser.push('FT.CREATE', index);
if (options?.ON) {
parser.push('ON', options.ON);
}
(0, generic_transformers_1.parseOptionalVariadicArgument)(parser, 'PREFIX', options?.PREFIX);
if (options?.FILTER) {
parser.push('FILTER', options.FILTER);
}
if (options?.LANGUAGE) {
parser.push('LANGUAGE', options.LANGUAGE);
}
if (options?.LANGUAGE_FIELD) {
parser.push('LANGUAGE_FIELD', options.LANGUAGE_FIELD);
}
if (options?.SCORE) {
parser.push('SCORE', options.SCORE.toString());
}
if (options?.SCORE_FIELD) {
parser.push('SCORE_FIELD', options.SCORE_FIELD);
}
// if (options?.PAYLOAD_FIELD) {
// parser.push('PAYLOAD_FIELD', options.PAYLOAD_FIELD);
// }
if (options?.MAXTEXTFIELDS) {
parser.push('MAXTEXTFIELDS');
}
if (options?.TEMPORARY) {
parser.push('TEMPORARY', options.TEMPORARY.toString());
}
if (options?.NOOFFSETS) {
parser.push('NOOFFSETS');
}
if (options?.NOHL) {
parser.push('NOHL');
}
if (options?.NOFIELDS) {
parser.push('NOFIELDS');
}
if (options?.NOFREQS) {
parser.push('NOFREQS');
}
if (options?.SKIPINITIALSCAN) {
parser.push('SKIPINITIALSCAN');
}
(0, generic_transformers_1.parseOptionalVariadicArgument)(parser, 'STOPWORDS', options?.STOPWORDS);
parser.push('SCHEMA');
parseSchema(parser, schema);
},
transformReply: undefined
};
//# sourceMappingURL=CREATE.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,10 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { SimpleStringReply, RedisArgument, NumberReply, UnwrapReply } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, index: RedisArgument, cursorId: UnwrapReply<NumberReply>) => void;
readonly transformReply: () => SimpleStringReply<'OK'>;
};
export default _default;
//# sourceMappingURL=CURSOR_DEL.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"CURSOR_DEL.d.ts","sourceRoot":"","sources":["../../../lib/commands/CURSOR_DEL.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAW,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;;;;gDAKjG,aAAa,SAAS,aAAa,YAAY,YAAY,WAAW,CAAC;mCAG9C,kBAAkB,IAAI,CAAC;;AANvE,wBAO6B"}
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
parseCommand(parser, index, cursorId) {
parser.push('FT.CURSOR', 'DEL', index, cursorId.toString());
},
transformReply: undefined
};
//# sourceMappingURL=CURSOR_DEL.js.map
@@ -0,0 +1 @@
{"version":3,"file":"CURSOR_DEL.js","sourceRoot":"","sources":["../../../lib/commands/CURSOR_DEL.ts"],"names":[],"mappings":";;AAGA,kBAAe;IACb,iBAAiB,EAAE,IAAI;IACvB,YAAY,EAAE,IAAI;IAClB,YAAY,CAAC,MAAqB,EAAE,KAAoB,EAAE,QAAkC;QAC1F,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC9D,CAAC;IACD,cAAc,EAAE,SAAqD;CAC3C,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { SimpleStringReply, Command, RedisArgument, NumberReply, UnwrapReply } from '@redis/client/dist/lib/RESP/types';\n\nexport default {\n NOT_KEYED_COMMAND: true,\n IS_READ_ONLY: true,\n parseCommand(parser: CommandParser, index: RedisArgument, cursorId: UnwrapReply<NumberReply>) {\n parser.push('FT.CURSOR', 'DEL', index, cursorId.toString());\n },\n transformReply: undefined as unknown as () => SimpleStringReply<'OK'>\n} as const satisfies Command;\n"]}
@@ -0,0 +1,16 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, NumberReply, UnwrapReply } from '@redis/client/dist/lib/RESP/types';
export interface FtCursorReadOptions {
COUNT?: number;
}
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, index: RedisArgument, cursor: UnwrapReply<NumberReply>, options?: FtCursorReadOptions) => void;
readonly transformReply: {
readonly 2: (reply: [result: [total: UnwrapReply<NumberReply<number>>, ...results: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>[]], cursor: NumberReply<number>], preserve?: any, typeMapping?: import("@redis/client/dist/lib/RESP/types").TypeMapping | undefined) => import("./AGGREGATE_WITHCURSOR").AggregateWithCursorReply;
readonly 3: (reply: import("@redis/client/dist/lib/RESP/types").ReplyUnion, preserve?: any, typeMapping?: import("@redis/client/dist/lib/RESP/types").TypeMapping | undefined) => import("./AGGREGATE_WITHCURSOR").AggregateWithCursorReply;
};
};
export default _default;
//# sourceMappingURL=CURSOR_READ.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"CURSOR_READ.d.ts","sourceRoot":"","sources":["../../../lib/commands/CURSOR_READ.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAW,WAAW,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAGrG,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;;;;gDAKsB,aAAa,SAAS,aAAa,UAAU,YAAY,WAAW,CAAC,YAAY,mBAAmB;;;;;;AAH3H,wBAW6B"}
@@ -0,0 +1,18 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const AGGREGATE_WITHCURSOR_1 = __importDefault(require("./AGGREGATE_WITHCURSOR"));
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
parseCommand(parser, index, cursor, options) {
parser.push('FT.CURSOR', 'READ', index, cursor.toString());
if (options?.COUNT !== undefined) {
parser.push('COUNT', options.COUNT.toString());
}
},
transformReply: AGGREGATE_WITHCURSOR_1.default.transformReply,
};
//# sourceMappingURL=CURSOR_READ.js.map
@@ -0,0 +1 @@
{"version":3,"file":"CURSOR_READ.js","sourceRoot":"","sources":["../../../lib/commands/CURSOR_READ.ts"],"names":[],"mappings":";;;;;AAEA,kFAA0D;AAM1D,kBAAe;IACb,iBAAiB,EAAE,IAAI;IACvB,YAAY,EAAE,IAAI;IAClB,YAAY,CAAC,MAAqB,EAAE,KAAoB,EAAE,MAAgC,EAAE,OAA6B;QACvH,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;QAE3D,IAAI,OAAO,EAAE,KAAK,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;IACD,cAAc,EAAE,8BAAoB,CAAC,cAAc;CACzB,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, Command, NumberReply, UnwrapReply } from '@redis/client/dist/lib/RESP/types';\nimport AGGREGATE_WITHCURSOR from './AGGREGATE_WITHCURSOR';\n\nexport interface FtCursorReadOptions {\n COUNT?: number;\n}\n\nexport default {\n NOT_KEYED_COMMAND: true,\n IS_READ_ONLY: true,\n parseCommand(parser: CommandParser, index: RedisArgument, cursor: UnwrapReply<NumberReply>, options?: FtCursorReadOptions) {\n parser.push('FT.CURSOR', 'READ', index, cursor.toString());\n\n if (options?.COUNT !== undefined) {\n parser.push('COUNT', options.COUNT.toString());\n }\n },\n transformReply: AGGREGATE_WITHCURSOR.transformReply,\n} as const satisfies Command;\n"]}
@@ -0,0 +1,11 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, NumberReply } from '@redis/client/dist/lib/RESP/types';
import { RedisVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers';
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, dictionary: RedisArgument, term: RedisVariadicArgument) => void;
readonly transformReply: () => NumberReply;
};
export default _default;
//# sourceMappingURL=DICTADD.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"DICTADD.d.ts","sourceRoot":"","sources":["../../../lib/commands/DICTADD.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAW,MAAM,mCAAmC,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;;;;gDAKtE,aAAa,cAAc,aAAa,QAAQ,qBAAqB;mCAI5C,WAAW;;AAP3D,wBAQ6B"}
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
parseCommand(parser, dictionary, term) {
parser.push('FT.DICTADD', dictionary);
parser.pushVariadic(term);
},
transformReply: undefined
};
//# sourceMappingURL=DICTADD.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DICTADD.js","sourceRoot":"","sources":["../../../lib/commands/DICTADD.ts"],"names":[],"mappings":";;AAIA,kBAAe;IACb,iBAAiB,EAAE,IAAI;IACvB,YAAY,EAAE,IAAI;IAClB,YAAY,CAAC,MAAqB,EAAE,UAAyB,EAAE,IAA2B;QACxF,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QACtC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IACD,cAAc,EAAE,SAAyC;CAC/B,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, NumberReply, Command } from '@redis/client/dist/lib/RESP/types';\nimport { RedisVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers';\n\nexport default {\n NOT_KEYED_COMMAND: true,\n IS_READ_ONLY: true,\n parseCommand(parser: CommandParser, dictionary: RedisArgument, term: RedisVariadicArgument) {\n parser.push('FT.DICTADD', dictionary);\n parser.pushVariadic(term);\n },\n transformReply: undefined as unknown as () => NumberReply\n} as const satisfies Command;\n"]}
@@ -0,0 +1,11 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, NumberReply } from '@redis/client/dist/lib/RESP/types';
import { RedisVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers';
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, dictionary: RedisArgument, term: RedisVariadicArgument) => void;
readonly transformReply: () => NumberReply;
};
export default _default;
//# sourceMappingURL=DICTDEL.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"DICTDEL.d.ts","sourceRoot":"","sources":["../../../lib/commands/DICTDEL.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAW,MAAM,mCAAmC,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;;;;gDAKtE,aAAa,cAAc,aAAa,QAAQ,qBAAqB;mCAI5C,WAAW;;AAP3D,wBAQ6B"}
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
parseCommand(parser, dictionary, term) {
parser.push('FT.DICTDEL', dictionary);
parser.pushVariadic(term);
},
transformReply: undefined
};
//# sourceMappingURL=DICTDEL.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DICTDEL.js","sourceRoot":"","sources":["../../../lib/commands/DICTDEL.ts"],"names":[],"mappings":";;AAIA,kBAAe;IACb,iBAAiB,EAAE,IAAI;IACvB,YAAY,EAAE,IAAI;IAClB,YAAY,CAAC,MAAqB,EAAE,UAAyB,EAAE,IAA2B;QACxF,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QACtC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IACD,cAAc,EAAE,SAAyC;CAC/B,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, NumberReply, Command } from '@redis/client/dist/lib/RESP/types';\nimport { RedisVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers';\n\nexport default {\n NOT_KEYED_COMMAND: true,\n IS_READ_ONLY: true,\n parseCommand(parser: CommandParser, dictionary: RedisArgument, term: RedisVariadicArgument) {\n parser.push('FT.DICTDEL', dictionary);\n parser.pushVariadic(term);\n },\n transformReply: undefined as unknown as () => NumberReply\n} as const satisfies Command;\n"]}
@@ -0,0 +1,13 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, ArrayReply, SetReply, BlobStringReply } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, dictionary: RedisArgument) => void;
readonly transformReply: {
readonly 2: () => ArrayReply<BlobStringReply>;
readonly 3: () => SetReply<BlobStringReply>;
};
};
export default _default;
//# sourceMappingURL=DICTDUMP.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"DICTDUMP.d.ts","sourceRoot":"","sources":["../../../lib/commands/DICTDUMP.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAW,MAAM,mCAAmC,CAAC;;;;gDAK3F,aAAa,cAAc,aAAa;;0BAI1B,WAAW,eAAe,CAAC;0BAC3B,SAAS,eAAe,CAAC;;;AAR9D,wBAU6B"}
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
parseCommand(parser, dictionary) {
parser.push('FT.DICTDUMP', dictionary);
},
transformReply: {
2: undefined,
3: undefined
}
};
//# sourceMappingURL=DICTDUMP.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DICTDUMP.js","sourceRoot":"","sources":["../../../lib/commands/DICTDUMP.ts"],"names":[],"mappings":";;AAGA,kBAAe;IACb,iBAAiB,EAAE,IAAI;IACvB,YAAY,EAAE,IAAI;IAClB,YAAY,CAAC,MAAqB,EAAE,UAAyB;QAC3D,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;IACzC,CAAC;IACD,cAAc,EAAE;QACd,CAAC,EAAE,SAAyD;QAC5D,CAAC,EAAE,SAAuD;KAC3D;CACyB,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, ArrayReply, SetReply, BlobStringReply, Command } from '@redis/client/dist/lib/RESP/types';\n\nexport default {\n NOT_KEYED_COMMAND: true,\n IS_READ_ONLY: true,\n parseCommand(parser: CommandParser, dictionary: RedisArgument) {\n parser.push('FT.DICTDUMP', dictionary);\n },\n transformReply: {\n 2: undefined as unknown as () => ArrayReply<BlobStringReply>,\n 3: undefined as unknown as () => SetReply<BlobStringReply>\n }\n} as const satisfies Command;\n"]}
@@ -0,0 +1,16 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, SimpleStringReply, NumberReply } from '@redis/client/dist/lib/RESP/types';
export interface FtDropIndexOptions {
DD?: true;
}
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, index: RedisArgument, options?: FtDropIndexOptions) => void;
readonly transformReply: {
readonly 2: () => SimpleStringReply<'OK'>;
readonly 3: () => NumberReply;
};
};
export default _default;
//# sourceMappingURL=DROPINDEX.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"DROPINDEX.d.ts","sourceRoot":"","sources":["../../../lib/commands/DROPINDEX.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,WAAW,EAAW,MAAM,mCAAmC,CAAC;AAE3G,MAAM,WAAW,kBAAkB;IACjC,EAAE,CAAC,EAAE,IAAI,CAAC;CACX;;;;gDAKsB,aAAa,SAAS,aAAa,YAAY,kBAAkB;;0BAQnD,kBAAkB,IAAI,CAAC;0BACvB,WAAW;;;AAZhD,wBAc6B"}
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
parseCommand(parser, index, options) {
parser.push('FT.DROPINDEX', index);
if (options?.DD) {
parser.push('DD');
}
},
transformReply: {
2: undefined,
3: undefined
}
};
//# sourceMappingURL=DROPINDEX.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DROPINDEX.js","sourceRoot":"","sources":["../../../lib/commands/DROPINDEX.ts"],"names":[],"mappings":";;AAOA,kBAAe;IACb,iBAAiB,EAAE,IAAI;IACvB,YAAY,EAAE,IAAI;IAClB,YAAY,CAAC,MAAqB,EAAE,KAAoB,EAAE,OAA4B;QACpF,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;QAEnC,IAAI,OAAO,EAAE,EAAE,EAAE,CAAC;YAChB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;IACD,cAAc,EAAE;QACd,CAAC,EAAE,SAAqD;QACxD,CAAC,EAAE,SAAyC;KAC7C;CACyB,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, SimpleStringReply, NumberReply, Command } from '@redis/client/dist/lib/RESP/types';\n\nexport interface FtDropIndexOptions {\n DD?: true;\n}\n\nexport default {\n NOT_KEYED_COMMAND: true,\n IS_READ_ONLY: true,\n parseCommand(parser: CommandParser, index: RedisArgument, options?: FtDropIndexOptions) {\n parser.push('FT.DROPINDEX', index);\n\n if (options?.DD) {\n parser.push('DD');\n }\n },\n transformReply: {\n 2: undefined as unknown as () => SimpleStringReply<'OK'>,\n 3: undefined as unknown as () => NumberReply\n }\n} as const satisfies Command;\n"]}
@@ -0,0 +1,15 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, SimpleStringReply } from '@redis/client/dist/lib/RESP/types';
import { FtSearchParams } from './SEARCH';
export interface FtExplainOptions {
PARAMS?: FtSearchParams;
DIALECT?: number;
}
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, index: RedisArgument, query: RedisArgument, options?: FtExplainOptions) => void;
readonly transformReply: () => SimpleStringReply;
};
export default _default;
//# sourceMappingURL=EXPLAIN.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"EXPLAIN.d.ts","sourceRoot":"","sources":["../../../lib/commands/EXPLAIN.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAW,MAAM,mCAAmC,CAAC;AAC9F,OAAO,EAAE,cAAc,EAAuB,MAAM,UAAU,CAAC;AAG/D,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;;;;gDAMW,aAAa,SACd,aAAa,SACb,aAAa,YACV,gBAAgB;mCAYkB,iBAAiB;;AAnBjE,wBAoB6B"}
@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const SEARCH_1 = require("./SEARCH");
const default_1 = require("../dialect/default");
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
parseCommand(parser, index, query, options) {
parser.push('FT.EXPLAIN', index, query);
(0, SEARCH_1.parseParamsArgument)(parser, options?.PARAMS);
if (options?.DIALECT) {
parser.push('DIALECT', options.DIALECT.toString());
}
else {
parser.push('DIALECT', default_1.DEFAULT_DIALECT);
}
},
transformReply: undefined
};
//# sourceMappingURL=EXPLAIN.js.map
@@ -0,0 +1 @@
{"version":3,"file":"EXPLAIN.js","sourceRoot":"","sources":["../../../lib/commands/EXPLAIN.ts"],"names":[],"mappings":";;AAEA,qCAA+D;AAC/D,gDAAqD;AAOrD,kBAAe;IACb,iBAAiB,EAAE,IAAI;IACvB,YAAY,EAAE,IAAI;IAClB,YAAY,CACV,MAAqB,EACrB,KAAoB,EACpB,KAAoB,EACpB,OAA0B;QAE1B,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QAExC,IAAA,4BAAmB,EAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAE7C,IAAI,OAAO,EAAE,OAAO,EAAE,CAAC;YACrB,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QACrD,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,yBAAe,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAA+C;CACrC,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, SimpleStringReply, Command } from '@redis/client/dist/lib/RESP/types';\nimport { FtSearchParams, parseParamsArgument } from './SEARCH';\nimport { DEFAULT_DIALECT } from '../dialect/default';\n\nexport interface FtExplainOptions {\n PARAMS?: FtSearchParams;\n DIALECT?: number;\n}\n\nexport default {\n NOT_KEYED_COMMAND: true,\n IS_READ_ONLY: true,\n parseCommand(\n parser: CommandParser,\n index: RedisArgument,\n query: RedisArgument,\n options?: FtExplainOptions\n ) {\n parser.push('FT.EXPLAIN', index, query);\n\n parseParamsArgument(parser, options?.PARAMS);\n\n if (options?.DIALECT) {\n parser.push('DIALECT', options.DIALECT.toString());\n } else {\n parser.push('DIALECT', DEFAULT_DIALECT);\n }\n },\n transformReply: undefined as unknown as () => SimpleStringReply\n} as const satisfies Command;\n"]}
@@ -0,0 +1,13 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, ArrayReply, BlobStringReply } from '@redis/client/dist/lib/RESP/types';
export interface FtExplainCLIOptions {
DIALECT?: number;
}
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, index: RedisArgument, query: RedisArgument, options?: FtExplainCLIOptions) => void;
readonly transformReply: () => ArrayReply<BlobStringReply>;
};
export default _default;
//# sourceMappingURL=EXPLAINCLI.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"EXPLAINCLI.d.ts","sourceRoot":"","sources":["../../../lib/commands/EXPLAINCLI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,eAAe,EAAW,MAAM,mCAAmC,CAAC;AAGxG,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;;;;gDAMW,aAAa,SACd,aAAa,SACb,aAAa,YACV,mBAAmB;mCAUe,WAAW,eAAe,CAAC;;AAjB3E,wBAkB6B"}
@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const default_1 = require("../dialect/default");
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
parseCommand(parser, index, query, options) {
parser.push('FT.EXPLAINCLI', index, query);
if (options?.DIALECT) {
parser.push('DIALECT', options.DIALECT.toString());
}
else {
parser.push('DIALECT', default_1.DEFAULT_DIALECT);
}
},
transformReply: undefined
};
//# sourceMappingURL=EXPLAINCLI.js.map
@@ -0,0 +1 @@
{"version":3,"file":"EXPLAINCLI.js","sourceRoot":"","sources":["../../../lib/commands/EXPLAINCLI.ts"],"names":[],"mappings":";;AAEA,gDAAqD;AAMrD,kBAAe;IACb,iBAAiB,EAAE,IAAI;IACvB,YAAY,EAAE,IAAI;IAClB,YAAY,CACV,MAAqB,EACrB,KAAoB,EACpB,KAAoB,EACpB,OAA6B;QAE7B,MAAM,CAAC,IAAI,CAAC,eAAe,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QAE3C,IAAI,OAAO,EAAE,OAAO,EAAE,CAAC;YACrB,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QACrD,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,yBAAe,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAAyD;CAC/C,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, ArrayReply, BlobStringReply, Command } from '@redis/client/dist/lib/RESP/types';\nimport { DEFAULT_DIALECT } from '../dialect/default';\n\nexport interface FtExplainCLIOptions {\n DIALECT?: number;\n}\n\nexport default {\n NOT_KEYED_COMMAND: true,\n IS_READ_ONLY: true,\n parseCommand(\n parser: CommandParser, \n index: RedisArgument, \n query: RedisArgument,\n options?: FtExplainCLIOptions\n ) {\n parser.push('FT.EXPLAINCLI', index, query);\n\n if (options?.DIALECT) {\n parser.push('DIALECT', options.DIALECT.toString());\n } else {\n parser.push('DIALECT', DEFAULT_DIALECT);\n }\n },\n transformReply: undefined as unknown as () => ArrayReply<BlobStringReply>\n} as const satisfies Command;\n"]}
@@ -0,0 +1,165 @@
/// <reference types="node" />
import { CommandParser } from "@redis/client/dist/lib/client/parser";
import { RedisArgument, TypeMapping } from "@redis/client/dist/lib/RESP/types";
import { RedisVariadicArgument } from "@redis/client/dist/lib/commands/generic-transformers";
import { GroupByReducers } from "./AGGREGATE";
/**
* Text search expression configuration for hybrid search.
*/
export interface FtHybridSearchExpression {
/** Search query string or parameter reference (e.g., "$q") */
query: RedisArgument;
/** Scoring algorithm configuration */
SCORER?: RedisArgument;
/** Alias for the text search score in results */
YIELD_SCORE_AS?: RedisArgument;
}
/**
* Vector search method configuration - either KNN or RANGE.
*/
export declare const FT_HYBRID_VECTOR_METHOD: {
/** K-Nearest Neighbors search configuration */
readonly KNN: "KNN";
/** Range-based vector search configuration */
readonly RANGE: "RANGE";
};
/** Vector search method type */
export type FtHybridVectorMethodType = (typeof FT_HYBRID_VECTOR_METHOD)[keyof typeof FT_HYBRID_VECTOR_METHOD];
interface FtHybridVectorMethodKNN {
type: (typeof FT_HYBRID_VECTOR_METHOD)["KNN"];
/** Number of nearest neighbors to find */
K: number;
/** Controls the search accuracy vs. speed tradeoff */
EF_RUNTIME?: number;
}
interface FtHybridVectorMethodRange {
type: (typeof FT_HYBRID_VECTOR_METHOD)["RANGE"];
/** Maximum distance for matches */
RADIUS: number;
/** Provides additional precision control */
EPSILON?: number;
}
/**
* Vector similarity search expression configuration.
*/
export interface FtHybridVectorExpression {
/** Vector field name (e.g., "@embedding") */
field: RedisArgument;
/** Vector parameter reference (e.g., "$v") */
vector: string;
/** Search method configuration - KNN or RANGE */
method?: FtHybridVectorMethodKNN | FtHybridVectorMethodRange;
/** Pre-filter expression applied before vector search (e.g., "@tag:{foo}") */
FILTER?: RedisArgument;
/** Alias for the vector score in results */
YIELD_SCORE_AS?: RedisArgument;
}
/**
* Score fusion method type constants for combining search results.
*/
export declare const FT_HYBRID_COMBINE_METHOD: {
/** Reciprocal Rank Fusion */
readonly RRF: "RRF";
/** Linear combination with ALPHA and BETA weights */
readonly LINEAR: "LINEAR";
};
/** Combine method type */
export type FtHybridCombineMethodType = (typeof FT_HYBRID_COMBINE_METHOD)[keyof typeof FT_HYBRID_COMBINE_METHOD];
interface FtHybridCombineMethodRRF {
type: (typeof FT_HYBRID_COMBINE_METHOD)["RRF"];
/** RRF constant for score calculation */
CONSTANT?: number;
/** Window size for score normalization */
WINDOW?: number;
}
interface FtHybridCombineMethodLinear {
type: (typeof FT_HYBRID_COMBINE_METHOD)["LINEAR"];
/** Weight for text search score */
ALPHA?: number;
/** Weight for vector search score */
BETA?: number;
/** Window size for score normalization */
WINDOW?: number;
}
/**
* Apply expression for result transformation.
*/
export interface FtHybridApply {
/** Transformation expression to apply */
expression: RedisArgument;
/** Alias for the computed value in output */
AS?: RedisArgument;
}
/**
* Options for the FT.HYBRID command.
*/
export interface FtHybridOptions {
/** Text search expression configuration */
SEARCH: FtHybridSearchExpression;
/** Vector similarity search expression configuration */
VSIM: FtHybridVectorExpression;
/** Score fusion configuration for combining SEARCH and VSIM results */
COMBINE?: {
/** Fusion method: RRF or LINEAR */
method: FtHybridCombineMethodRRF | FtHybridCombineMethodLinear;
/** Alias for the combined score in results */
YIELD_SCORE_AS?: RedisArgument;
};
/**
* Fields to load and return in results (LOAD clause).
* - Use `"*"` to load all fields from documents
* - Use a field name or array of field names to load specific fields
*/
LOAD?: RedisVariadicArgument;
/** Group by configuration for aggregation */
GROUPBY?: {
/** Fields to group by */
fields: RedisVariadicArgument;
/** Reducer(s) to apply to each group */
REDUCE?: GroupByReducers | Array<GroupByReducers>;
};
/** Apply expression(s) for result transformation */
APPLY?: FtHybridApply | Array<FtHybridApply>;
/** Sort configuration for results */
SORTBY?: {
/** Fields to sort by with optional direction */
fields: Array<{
/** Field name to sort by */
field: RedisArgument;
/** Sort direction: "ASC" (ascending) or "DESC" (descending) */
direction?: "ASC" | "DESC";
}>;
};
/** Disable sorting - returns results in arbitrary order */
NOSORT?: boolean;
/** Post-filter expression applied after scoring */
FILTER?: RedisArgument;
/** Pagination configuration */
LIMIT?: {
/** Number of results to skip */
offset: number | RedisArgument;
/** Number of results to return */
count: number | RedisArgument;
};
/** Query parameters for parameterized queries */
PARAMS?: Record<string, string | number | Buffer>;
/** Query timeout in milliseconds */
TIMEOUT?: number;
}
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, index: RedisArgument, options: FtHybridOptions) => void;
readonly transformReply: {
readonly 2: (reply: unknown, _preserve?: any, _typeMapping?: TypeMapping) => HybridSearchResult;
readonly 3: (reply: unknown, _preserve?: any, _typeMapping?: TypeMapping) => HybridSearchResult;
};
};
export default _default;
export interface HybridSearchResult {
totalResults: number;
executionTime: number;
warnings: string[];
results: Record<string, any>[];
}
//# sourceMappingURL=HYBRID.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"HYBRID.d.ts","sourceRoot":"","sources":["../../../lib/commands/HYBRID.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,268 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FT_HYBRID_COMBINE_METHOD = exports.FT_HYBRID_VECTOR_METHOD = void 0;
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
const SEARCH_1 = require("./SEARCH");
const AGGREGATE_1 = require("./AGGREGATE");
const reply_transformers_1 = require("./reply-transformers");
/**
* Vector search method configuration - either KNN or RANGE.
*/
exports.FT_HYBRID_VECTOR_METHOD = {
/** K-Nearest Neighbors search configuration */
KNN: "KNN",
/** Range-based vector search configuration */
RANGE: "RANGE",
};
/**
* Score fusion method type constants for combining search results.
*/
exports.FT_HYBRID_COMBINE_METHOD = {
/** Reciprocal Rank Fusion */
RRF: "RRF",
/** Linear combination with ALPHA and BETA weights */
LINEAR: "LINEAR",
};
function parseSearchExpression(parser, search) {
parser.push("SEARCH", search.query);
if (search.SCORER) {
parser.push("SCORER", search.SCORER);
}
if (search.YIELD_SCORE_AS) {
parser.push("YIELD_SCORE_AS", search.YIELD_SCORE_AS);
}
}
function parseVectorExpression(parser, vsim) {
parser.push("VSIM", vsim.field, vsim.vector);
if (vsim.method) {
if (vsim.method.type === exports.FT_HYBRID_VECTOR_METHOD.KNN) {
let argsCount = 2;
if (vsim.method.EF_RUNTIME !== undefined) {
argsCount += 2;
}
parser.push("KNN", argsCount.toString(), "K", vsim.method.K.toString());
if (vsim.method.EF_RUNTIME !== undefined) {
parser.push("EF_RUNTIME", vsim.method.EF_RUNTIME.toString());
}
}
if (vsim.method.type === exports.FT_HYBRID_VECTOR_METHOD.RANGE) {
let argsCount = 2;
if (vsim.method.EPSILON !== undefined) {
argsCount += 2;
}
parser.push("RANGE", argsCount.toString(), "RADIUS", vsim.method.RADIUS.toString());
if (vsim.method.EPSILON !== undefined) {
parser.push("EPSILON", vsim.method.EPSILON.toString());
}
}
}
if (vsim.FILTER) {
parser.push("FILTER", vsim.FILTER);
}
if (vsim.YIELD_SCORE_AS) {
parser.push("YIELD_SCORE_AS", vsim.YIELD_SCORE_AS);
}
}
function parseCombineMethod(parser, combine) {
if (!combine)
return;
parser.push("COMBINE");
if (combine.method.type === exports.FT_HYBRID_COMBINE_METHOD.RRF) {
// Calculate argsCount: 2 per optional (WINDOW, CONSTANT, YIELD_SCORE_AS)
let argsCount = 0;
if (combine.method.WINDOW !== undefined) {
argsCount += 2;
}
if (combine.method.CONSTANT !== undefined) {
argsCount += 2;
}
if (combine.YIELD_SCORE_AS) {
argsCount += 2;
}
parser.push("RRF", argsCount.toString());
if (combine.method.WINDOW !== undefined) {
parser.push("WINDOW", combine.method.WINDOW.toString());
}
if (combine.method.CONSTANT !== undefined) {
parser.push("CONSTANT", combine.method.CONSTANT.toString());
}
}
if (combine.method.type === exports.FT_HYBRID_COMBINE_METHOD.LINEAR) {
// Calculate argsCount: 2 per optional (ALPHA, BETA, WINDOW, YIELD_SCORE_AS)
let argsCount = 0;
if (combine.method.ALPHA !== undefined) {
argsCount += 2;
}
if (combine.method.BETA !== undefined) {
argsCount += 2;
}
if (combine.method.WINDOW !== undefined) {
argsCount += 2;
}
if (combine.YIELD_SCORE_AS) {
argsCount += 2;
}
parser.push("LINEAR", argsCount.toString());
if (combine.method.ALPHA !== undefined) {
parser.push("ALPHA", combine.method.ALPHA.toString());
}
if (combine.method.BETA !== undefined) {
parser.push("BETA", combine.method.BETA.toString());
}
if (combine.method.WINDOW !== undefined) {
parser.push("WINDOW", combine.method.WINDOW.toString());
}
}
if (combine.YIELD_SCORE_AS) {
parser.push("YIELD_SCORE_AS", combine.YIELD_SCORE_AS);
}
}
function parseApply(parser, apply) {
parser.push("APPLY", apply.expression);
if (apply.AS) {
parser.push("AS", apply.AS);
}
}
function parseHybridOptions(parser, options) {
parseSearchExpression(parser, options.SEARCH);
parseVectorExpression(parser, options.VSIM);
if (options.COMBINE) {
parseCombineMethod(parser, options.COMBINE);
}
if (options.LOAD) {
if (options.LOAD === "*") {
parser.push("LOAD", "*");
}
else {
(0, generic_transformers_1.parseOptionalVariadicArgument)(parser, "LOAD", options.LOAD);
}
}
if (options.GROUPBY) {
(0, generic_transformers_1.parseOptionalVariadicArgument)(parser, "GROUPBY", options.GROUPBY.fields);
if (options.GROUPBY.REDUCE) {
const reducers = Array.isArray(options.GROUPBY.REDUCE)
? options.GROUPBY.REDUCE
: [options.GROUPBY.REDUCE];
for (const reducer of reducers) {
(0, AGGREGATE_1.parseGroupByReducer)(parser, reducer);
}
}
}
if (options.APPLY) {
const applies = Array.isArray(options.APPLY)
? options.APPLY
: [options.APPLY];
for (const apply of applies) {
parseApply(parser, apply);
}
}
if (options.SORTBY) {
const sortByArgsCount = options.SORTBY.fields.reduce((acc, field) => {
if (field.direction) {
return acc + 2;
}
return acc + 1;
}, 0);
parser.push("SORTBY", sortByArgsCount.toString());
for (const sortField of options.SORTBY.fields) {
parser.push(sortField.field);
if (sortField.direction) {
parser.push(sortField.direction);
}
}
}
if (options.NOSORT) {
parser.push("NOSORT");
}
if (options.FILTER) {
parser.push("FILTER", options.FILTER);
}
if (options.LIMIT) {
parser.push("LIMIT", options.LIMIT.offset.toString(), options.LIMIT.count.toString());
}
const hasParams = options.PARAMS && Object.keys(options.PARAMS).length > 0;
(0, SEARCH_1.parseParamsArgument)(parser, hasParams ? options.PARAMS : undefined);
if (options.TIMEOUT !== undefined) {
parser.push("TIMEOUT", options.TIMEOUT.toString());
}
}
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
parseCommand(parser, index, options) {
parser.push("FT.HYBRID", index);
parseHybridOptions(parser, options);
},
transformReply: {
2: (reply,
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- matches TransformReply contract
_preserve, _typeMapping) => {
return transformHybridSearchResults(reply);
},
3: (reply,
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- matches TransformReply contract
_preserve, _typeMapping) => {
return transformHybridSearchResults(reply);
},
},
};
function transformHybridSearchResults(reply) {
const replyMap = parseReplyMap(reply);
const totalResults = Number((0, reply_transformers_1.getMapValue)(replyMap, ["total_results", "totalResults"]) ?? 0);
const rawResults = (0, reply_transformers_1.mapLikeValues)((0, reply_transformers_1.getMapValue)(replyMap, ["results"]) ?? []);
const warnings = (0, reply_transformers_1.mapLikeValues)((0, reply_transformers_1.getMapValue)(replyMap, ["warnings", "warning"]) ?? []);
const executionTimeValue = (0, reply_transformers_1.getMapValue)(replyMap, [
"execution_time",
"executionTime",
]);
const executionTime = executionTimeValue === undefined ? 0 : Number(executionTimeValue);
const results = [];
for (const result of rawResults) {
const resultMap = parseReplyMap(result);
const doc = {};
const id = (0, reply_transformers_1.getMapValue)(resultMap, ["id"]);
if (id != null) {
doc.id = id.toString();
}
Object.assign(doc, (0, reply_transformers_1.parseDocumentValue)((0, reply_transformers_1.getMapValue)(resultMap, ["values"])));
Object.assign(doc, (0, reply_transformers_1.parseDocumentValue)((0, reply_transformers_1.getMapValue)(resultMap, ["extra_attributes", "extraAttributes"])));
for (const [key, value] of Object.entries(resultMap)) {
if (key === "id" ||
key === "values" ||
key.toLowerCase() === "extra_attributes" ||
key === "extraAttributes") {
continue;
}
if (!Object.hasOwn(doc, key)) {
doc[key] = value;
}
}
results.push(doc);
}
return {
totalResults,
executionTime,
warnings: warnings.map(toWarningString),
results,
};
}
function parseReplyMap(reply) {
return (0, reply_transformers_1.mapLikeToObject)(reply);
}
function toWarningString(warning) {
if (typeof warning === 'string')
return warning;
if (warning instanceof Buffer)
return warning.toString();
if (warning === null || warning === undefined)
return '';
// Anything else (Map/Array/plain object) would collapse to "[object Object]"
// under a naive toString — JSON-serialize instead so the caller can read it.
try {
return JSON.stringify(warning);
}
catch {
return String(warning);
}
}
//# sourceMappingURL=HYBRID.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,63 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument } from "@redis/client";
import { ArrayReply, BlobStringReply, DoubleReply, MapReply, NullReply, NumberReply, SimpleStringReply, TypeMapping } from "@redis/client/dist/lib/RESP/types";
import { TuplesReply } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, index: RedisArgument) => void;
readonly transformReply: {
readonly 2: typeof transformV2Reply;
readonly 3: () => InfoReply;
};
};
export default _default;
export interface InfoReply {
index_name: SimpleStringReply;
index_options: ArrayReply<SimpleStringReply>;
index_definition: MapReply<SimpleStringReply, SimpleStringReply>;
attributes: Array<MapReply<SimpleStringReply, SimpleStringReply>>;
num_docs: NumberReply;
max_doc_id: NumberReply;
num_terms: NumberReply;
num_records: NumberReply;
inverted_sz_mb: DoubleReply;
vector_index_sz_mb: DoubleReply;
total_inverted_index_blocks: NumberReply;
offset_vectors_sz_mb: DoubleReply;
doc_table_size_mb: DoubleReply;
sortable_values_size_mb: DoubleReply;
key_table_size_mb: DoubleReply;
tag_overhead_sz_mb: DoubleReply;
text_overhead_sz_mb: DoubleReply;
total_index_memory_sz_mb: DoubleReply;
geoshapes_sz_mb: DoubleReply;
records_per_doc_avg: DoubleReply;
bytes_per_record_avg: DoubleReply;
offsets_per_term_avg: DoubleReply;
offset_bits_per_record_avg: DoubleReply;
hash_indexing_failures: NumberReply;
total_indexing_time: DoubleReply;
indexing: NumberReply;
percent_indexed: DoubleReply;
number_of_uses: NumberReply;
cleaning: NumberReply;
gc_stats: {
bytes_collected: DoubleReply;
total_ms_run: DoubleReply;
total_cycles: DoubleReply;
average_cycle_time_ms: DoubleReply;
last_run_time_ms: DoubleReply;
gc_numeric_trees_missed: DoubleReply;
gc_blocks_denied: DoubleReply;
};
cursor_stats: {
global_idle: NumberReply;
global_total: NumberReply;
index_capacity: NumberReply;
index_total: NumberReply;
};
stopwords_list?: ArrayReply<BlobStringReply> | TuplesReply<[NullReply]>;
}
declare function transformV2Reply(reply: Array<unknown>, preserve?: unknown, typeMapping?: TypeMapping): InfoReply;
//# sourceMappingURL=INFO.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"INFO.d.ts","sourceRoot":"","sources":["../../../lib/commands/INFO.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,eAAe,EAAW,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAExK,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;;;;gDAKzC,aAAa,SAAS,aAAa;;;0BAKrB,SAAS;;;AAR9C,wBAU6B;AAE7B,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,aAAa,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC;IAC7C,gBAAgB,EAAE,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,CAAC;IACjE,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAClE,QAAQ,EAAE,WAAW,CAAA;IACrB,UAAU,EAAE,WAAW,CAAC;IACxB,SAAS,EAAE,WAAW,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;IACzB,cAAc,EAAE,WAAW,CAAC;IAC5B,kBAAkB,EAAE,WAAW,CAAC;IAChC,2BAA2B,EAAE,WAAW,CAAC;IACzC,oBAAoB,EAAE,WAAW,CAAC;IAClC,iBAAiB,EAAE,WAAW,CAAC;IAC/B,uBAAuB,EAAE,WAAW,CAAC;IACrC,iBAAiB,EAAE,WAAW,CAAC;IAC/B,kBAAkB,EAAE,WAAW,CAAC;IAChC,mBAAmB,EAAE,WAAW,CAAC;IACjC,wBAAwB,EAAE,WAAW,CAAC;IACtC,eAAe,EAAE,WAAW,CAAC;IAC7B,mBAAmB,EAAE,WAAW,CAAC;IACjC,oBAAoB,EAAE,WAAW,CAAC;IAClC,oBAAoB,EAAE,WAAW,CAAC;IAClC,0BAA0B,EAAE,WAAW,CAAC;IACxC,sBAAsB,EAAE,WAAW,CAAC;IACpC,mBAAmB,EAAE,WAAW,CAAC;IACjC,QAAQ,EAAE,WAAW,CAAC;IACtB,eAAe,EAAE,WAAW,CAAC;IAC7B,cAAc,EAAE,WAAW,CAAC;IAC5B,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,EAAE;QACR,eAAe,EAAE,WAAW,CAAC;QAC7B,YAAY,EAAE,WAAW,CAAC;QAC1B,YAAY,EAAE,WAAW,CAAC;QAC1B,qBAAqB,EAAE,WAAW,CAAC;QACnC,gBAAgB,EAAE,WAAW,CAAC;QAC9B,uBAAuB,EAAE,WAAW,CAAC;QACrC,gBAAgB,EAAE,WAAW,CAAC;KAC/B,CAAC;IACF,YAAY,EAAE;QACZ,WAAW,EAAE,WAAW,CAAC;QACzB,YAAY,EAAE,WAAW,CAAC;QAC1B,cAAc,EAAE,WAAW,CAAC;QAC5B,WAAW,EAAE,WAAW,CAAC;KAC1B,CAAC;IACF,cAAc,CAAC,EAAE,UAAU,CAAC,eAAe,CAAC,GAAG,WAAW,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;CACzE;AAED,iBAAS,gBAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,WAAW,GAAG,SAAS,CAgGzG"}
@@ -0,0 +1,100 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
parseCommand(parser, index) {
parser.push('FT.INFO', index);
},
transformReply: {
2: transformV2Reply,
3: undefined
},
};
function transformV2Reply(reply, preserve, typeMapping) {
const myTransformFunc = (0, generic_transformers_1.createTransformTuplesReplyFunc)(preserve, typeMapping);
const ret = {};
for (let i = 0; i < reply.length; i += 2) {
const key = reply[i].toString();
switch (key) {
case 'index_name':
case 'index_options':
case 'num_docs':
case 'max_doc_id':
case 'num_terms':
case 'num_records':
case 'total_inverted_index_blocks':
case 'hash_indexing_failures':
case 'indexing':
case 'number_of_uses':
case 'cleaning':
case 'stopwords_list':
ret[key] = reply[i + 1];
break;
case 'inverted_sz_mb':
case 'vector_index_sz_mb':
case 'offset_vectors_sz_mb':
case 'doc_table_size_mb':
case 'sortable_values_size_mb':
case 'key_table_size_mb':
case 'text_overhead_sz_mb':
case 'tag_overhead_sz_mb':
case 'total_index_memory_sz_mb':
case 'geoshapes_sz_mb':
case 'records_per_doc_avg':
case 'bytes_per_record_avg':
case 'offsets_per_term_avg':
case 'offset_bits_per_record_avg':
case 'total_indexing_time':
case 'percent_indexed':
ret[key] = generic_transformers_1.transformDoubleReply[2](reply[i + 1], undefined, typeMapping);
break;
case 'index_definition':
ret[key] = myTransformFunc(reply[i + 1]);
break;
case 'attributes':
ret[key] = reply[i + 1].map(attribute => myTransformFunc(attribute));
break;
case 'gc_stats': {
const innerRet = {};
const array = reply[i + 1];
for (let i = 0; i < array.length; i += 2) {
const innerKey = array[i].toString();
switch (innerKey) {
case 'bytes_collected':
case 'total_ms_run':
case 'total_cycles':
case 'average_cycle_time_ms':
case 'last_run_time_ms':
case 'gc_numeric_trees_missed':
case 'gc_blocks_denied':
innerRet[innerKey] = generic_transformers_1.transformDoubleReply[2](array[i + 1], undefined, typeMapping);
break;
}
}
ret[key] = innerRet;
break;
}
case 'cursor_stats': {
const innerRet = {};
const array = reply[i + 1];
for (let i = 0; i < array.length; i += 2) {
const innerKey = array[i].toString();
switch (innerKey) {
case 'global_idle':
case 'global_total':
case 'index_capacity':
case 'index_total':
innerRet[innerKey] = array[i + 1];
break;
}
}
ret[key] = innerRet;
break;
}
}
}
return ret;
}
//# sourceMappingURL=INFO.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,15 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { ReplyUnion, TypeMapping, UnwrapReply } from '@redis/client/dist/lib/RESP/types';
import { FtAggregateOptions } from './AGGREGATE';
import { ProfileOptions, ProfileReplyResp2 } from './PROFILE_SEARCH';
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, index: string, query: string, options?: ProfileOptions & FtAggregateOptions) => void;
readonly transformReply: {
readonly 2: (reply: [[total: UnwrapReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number>>, ...results: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>[]], import("@redis/client/dist/lib/RESP/types").ArrayReply<ReplyUnion>], preserve?: any, typeMapping?: TypeMapping) => ProfileReplyResp2;
readonly 3: (reply: ReplyUnion, preserve?: any, typeMapping?: TypeMapping) => ProfileReplyResp2;
};
};
export default _default;
//# sourceMappingURL=PROFILE_AGGREGATE.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"PROFILE_AGGREGATE.d.ts","sourceRoot":"","sources":["../../../lib/commands/PROFILE_AGGREGATE.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAW,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAClG,OAAkB,EAAqB,kBAAkB,EAAyB,MAAM,aAAa,CAAC;AACtG,OAAO,EACL,cAAc,EAEd,iBAAiB,EAGlB,MAAM,kBAAkB,CAAC;;;;gDAMd,aAAa,SACd,MAAM,SACN,MAAM,YACH,cAAc,GAAG,kBAAkB;;+UAgBhC,GAAG,gBACA,WAAW,KACxB,iBAAiB;4BAOX,UAAU,aAEN,GAAG,gBACA,WAAW,KACxB,iBAAiB;;;AApCxB,wBA+C6B"}
@@ -0,0 +1,58 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const AGGREGATE_1 = __importStar(require("./AGGREGATE"));
const PROFILE_SEARCH_1 = require("./PROFILE_SEARCH");
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
parseCommand(parser, index, query, options) {
parser.push('FT.PROFILE', index, 'AGGREGATE');
if (options?.LIMITED) {
parser.push('LIMITED');
}
parser.push('QUERY', query);
(0, AGGREGATE_1.parseAggregateOptions)(parser, options);
},
transformReply: {
2: (reply,
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- matches TransformReply contract
preserve, typeMapping) => {
return {
results: AGGREGATE_1.default.transformReply[2](reply[0], preserve, typeMapping),
profile: reply[1]
};
},
3: (reply,
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- matches TransformReply contract
preserve, typeMapping) => {
return {
results: AGGREGATE_1.default.transformReply[3]((0, PROFILE_SEARCH_1.extractProfileResultsReply)(reply), preserve, typeMapping),
profile: (0, PROFILE_SEARCH_1.transformProfileReply)(reply)
};
}
},
};
//# sourceMappingURL=PROFILE_AGGREGATE.js.map
@@ -0,0 +1 @@
{"version":3,"file":"PROFILE_AGGREGATE.js","sourceRoot":"","sources":["../../../lib/commands/PROFILE_AGGREGATE.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAEA,yDAAsG;AACtG,qDAM0B;AAE1B,kBAAe;IACb,iBAAiB,EAAE,IAAI;IACvB,YAAY,EAAE,IAAI;IAClB,YAAY,CACV,MAAqB,EACrB,KAAa,EACb,KAAa,EACb,OAA6C;QAE7C,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;QAE9C,IAAI,OAAO,EAAE,OAAO,EAAE,CAAC;YACrB,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACzB,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAE5B,IAAA,iCAAqB,EAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACxC,CAAC;IACD,cAAc,EAAE;QACd,CAAC,EAAE,CACD,KAA2D;QAC3D,iGAAiG;QACjG,QAAc,EACd,WAAyB,EACN,EAAE;YACrB,OAAO;gBACL,OAAO,EAAE,mBAAS,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,WAAW,CAAC;gBACrE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;aAClB,CAAA;QACH,CAAC;QACD,CAAC,EAAE,CACD,KAAiB;QACjB,iGAAiG;QACjG,QAAc,EACd,WAAyB,EACN,EAAE;YACrB,OAAO;gBACL,OAAO,EAAE,mBAAS,CAAC,cAAc,CAAC,CAAC,CAAC,CAClC,IAAA,2CAA0B,EAAC,KAAK,CAAC,EACjC,QAAQ,EACR,WAAW,CACZ;gBACD,OAAO,EAAE,IAAA,sCAAqB,EAAC,KAAK,CAAC;aACtC,CAAC;QACJ,CAAC;KACF;CACyB,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { Command, ReplyUnion, TypeMapping, UnwrapReply } from '@redis/client/dist/lib/RESP/types';\nimport AGGREGATE, { AggregateRawReply, FtAggregateOptions, parseAggregateOptions } from './AGGREGATE';\nimport {\n ProfileOptions,\n ProfileRawReplyResp2,\n ProfileReplyResp2,\n extractProfileResultsReply,\n transformProfileReply\n} from './PROFILE_SEARCH';\n\nexport default {\n NOT_KEYED_COMMAND: true,\n IS_READ_ONLY: true,\n parseCommand(\n parser: CommandParser,\n index: string,\n query: string,\n options?: ProfileOptions & FtAggregateOptions\n ) {\n parser.push('FT.PROFILE', index, 'AGGREGATE');\n\n if (options?.LIMITED) {\n parser.push('LIMITED');\n }\n\n parser.push('QUERY', query);\n\n parseAggregateOptions(parser, options)\n },\n transformReply: {\n 2: (\n reply: UnwrapReply<ProfileRawReplyResp2<AggregateRawReply>>,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- matches TransformReply contract\n preserve?: any,\n typeMapping?: TypeMapping\n ): ProfileReplyResp2 => {\n return {\n results: AGGREGATE.transformReply[2](reply[0], preserve, typeMapping),\n profile: reply[1]\n }\n },\n 3: (\n reply: ReplyUnion,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- matches TransformReply contract\n preserve?: any,\n typeMapping?: TypeMapping\n ): ProfileReplyResp2 => {\n return {\n results: AGGREGATE.transformReply[3](\n extractProfileResultsReply(reply),\n preserve,\n typeMapping\n ),\n profile: transformProfileReply(reply)\n };\n }\n },\n} as const satisfies Command;\n"]}
@@ -0,0 +1,29 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { ArrayReply, RedisArgument, ReplyUnion, TuplesReply, TypeMapping } from '@redis/client/dist/lib/RESP/types';
import { AggregateReply } from './AGGREGATE';
import { FtSearchOptions, SearchRawReply, SearchReply } from './SEARCH';
export type ProfileRawReplyResp2<T> = TuplesReply<[
T,
ArrayReply<ReplyUnion>
]>;
export interface ProfileReplyResp2 {
results: SearchReply | AggregateReply;
profile: ReplyUnion;
}
export interface ProfileOptions {
LIMITED?: true;
}
export declare function extractProfileResultsReply(reply: ReplyUnion): ReplyUnion;
export declare function transformProfileReply(reply: ReplyUnion): ReplyUnion;
declare function transformProfileSearchReplyResp3(reply: ReplyUnion, preserve?: any, typeMapping?: TypeMapping): ProfileReplyResp2;
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, index: RedisArgument, query: RedisArgument, options?: ProfileOptions & FtSearchOptions) => void;
readonly transformReply: {
readonly 2: (reply: [SearchRawReply, ArrayReply<ReplyUnion>], preserve?: any, typeMapping?: TypeMapping) => ProfileReplyResp2;
readonly 3: typeof transformProfileSearchReplyResp3;
};
};
export default _default;
//# sourceMappingURL=PROFILE_SEARCH.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"PROFILE_SEARCH.d.ts","sourceRoot":"","sources":["../../../lib/commands/PROFILE_SEARCH.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,UAAU,EAAW,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAe,MAAM,mCAAmC,CAAC;AAC1I,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAe,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAsB,MAAM,UAAU,CAAC;AAGpG,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAAI,WAAW,CAAC;IAChD,CAAC;IACD,UAAU,CAAC,UAAU,CAAC;CACvB,CAAC,CAAC;AAIH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,WAAW,GAAG,cAAc,CAAC;IACtC,OAAO,EAAE,UAAU,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,IAAI,CAAC;CAChB;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,CAqBxE;AAiBD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,CAkBnE;AAED,iBAAS,gCAAgC,CACvC,KAAK,EAAE,UAAU,EAEjB,QAAQ,CAAC,EAAE,GAAG,EACd,WAAW,CAAC,EAAE,WAAW,GACxB,iBAAiB,CASnB;;;;gDAMW,aAAa,SACd,aAAa,SACb,aAAa,YACV,cAAc,GAAG,eAAe;;iFAgB7B,GAAG,gBACA,WAAW,KACxB,iBAAiB;;;;AAzBxB,wBAiC6B"}
@@ -0,0 +1,105 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformProfileReply = exports.extractProfileResultsReply = void 0;
const SEARCH_1 = __importStar(require("./SEARCH"));
const reply_transformers_1 = require("./reply-transformers");
function extractProfileResultsReply(reply) {
const replyObject = (0, reply_transformers_1.mapLikeToObject)(reply);
// Redis 8+ wraps results under `Results`.
if (Object.hasOwn(replyObject, 'Results')) {
return replyObject['Results'];
}
// Redis 7.4 RESP3 returns search/aggregate payload directly at top-level.
if ((Object.hasOwn(replyObject, 'total_results') || Object.hasOwn(replyObject, 'total')) &&
Object.hasOwn(replyObject, 'results')) {
return reply;
}
if (Object.hasOwn(replyObject, 'results')) {
return replyObject['results'];
}
return ((0, reply_transformers_1.getMapValue)(replyObject, ['results']) ?? reply);
}
exports.extractProfileResultsReply = extractProfileResultsReply;
function normalizeLegacyProfileReply(profile) {
return (0, reply_transformers_1.mapLikeEntries)(profile).map(([key, value]) => {
// Redis 7.4 often wraps iterator profiles as a single-element array containing an object.
// Tests expect the inner object normalized directly as a flat key/value list.
if (Array.isArray(value) && value.length === 1) {
const first = value[0];
if (Object.keys((0, reply_transformers_1.mapLikeToObject)(first)).length > 0) {
return [key, (0, reply_transformers_1.normalizeProfileReply)(first)];
}
}
return [key, (0, reply_transformers_1.normalizeProfileReply)(value)];
});
}
function transformProfileReply(reply) {
const replyObject = (0, reply_transformers_1.mapLikeToObject)(reply);
const profile = (Object.hasOwn(replyObject, 'Profile') ?
replyObject['Profile'] :
Object.hasOwn(replyObject, 'profile') ?
replyObject['profile'] :
(0, reply_transformers_1.getMapValue)(replyObject, ['Profile', 'profile']));
const profileObject = (0, reply_transformers_1.mapLikeToObject)(profile);
// Redis 7.2 - 7.4 profile payload is a plain map keyed by timing labels.
if (Object.hasOwn(profileObject, 'Total profile time')) {
return normalizeLegacyProfileReply(profile);
}
return (0, reply_transformers_1.normalizeProfileReply)(profile);
}
exports.transformProfileReply = transformProfileReply;
function transformProfileSearchReplyResp3(reply,
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- matches TransformReply contract
preserve, typeMapping) {
return {
results: SEARCH_1.default.transformReply[3](extractProfileResultsReply(reply), preserve, typeMapping),
profile: transformProfileReply(reply)
};
}
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
parseCommand(parser, index, query, options) {
parser.push('FT.PROFILE', index, 'SEARCH');
if (options?.LIMITED) {
parser.push('LIMITED');
}
parser.push('QUERY', query);
(0, SEARCH_1.parseSearchOptions)(parser, options);
},
transformReply: {
2: (reply,
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- matches TransformReply contract
preserve, typeMapping) => {
return {
results: SEARCH_1.default.transformReply[2](reply[0], preserve, typeMapping),
profile: reply[1]
};
},
3: transformProfileSearchReplyResp3
},
};
//# sourceMappingURL=PROFILE_SEARCH.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,67 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, ReplyUnion, TypeMapping } from '@redis/client/dist/lib/RESP/types';
import { RedisVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers';
import { RediSearchLanguage } from './CREATE';
export type FtSearchParams = Record<string, RedisArgument | number>;
export declare function parseParamsArgument(parser: CommandParser, params?: FtSearchParams): void;
export interface FtSearchOptions {
VERBATIM?: boolean;
NOSTOPWORDS?: boolean;
INKEYS?: RedisVariadicArgument;
INFIELDS?: RedisVariadicArgument;
RETURN?: RedisVariadicArgument;
SUMMARIZE?: boolean | {
FIELDS?: RedisArgument | Array<RedisArgument>;
FRAGS?: number;
LEN?: number;
SEPARATOR?: RedisArgument;
};
HIGHLIGHT?: boolean | {
FIELDS?: RedisArgument | Array<RedisArgument>;
TAGS?: {
open: RedisArgument;
close: RedisArgument;
};
};
SLOP?: number;
TIMEOUT?: number;
INORDER?: boolean;
LANGUAGE?: RediSearchLanguage;
EXPANDER?: RedisArgument;
SCORER?: RedisArgument;
SORTBY?: RedisArgument | {
BY: RedisArgument;
DIRECTION?: 'ASC' | 'DESC';
};
LIMIT?: {
from: number | RedisArgument;
size: number | RedisArgument;
};
PARAMS?: FtSearchParams;
DIALECT?: number;
}
export declare function parseSearchOptions(parser: CommandParser, options?: FtSearchOptions): void;
declare function transformSearchReplyResp2(reply: SearchRawReply, _preserve?: any, _typeMapping?: TypeMapping): SearchReply;
declare function transformSearchReplyResp3(rawReply: ReplyUnion, preserve?: any, typeMapping?: TypeMapping): SearchReply;
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, index: RedisArgument, query: RedisArgument, options?: FtSearchOptions) => void;
readonly transformReply: {
readonly 2: typeof transformSearchReplyResp2;
readonly 3: typeof transformSearchReplyResp3;
};
};
export default _default;
export type SearchRawReply = Array<unknown>;
interface SearchDocumentValue {
[key: string]: string | number | null | Array<SearchDocumentValue> | SearchDocumentValue;
}
export interface SearchReply {
total: number;
documents: Array<{
id: string;
value: SearchDocumentValue;
}>;
}
//# sourceMappingURL=SEARCH.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"SEARCH.d.ts","sourceRoot":"","sources":["../../../lib/commands/SEARCH.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,151 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseSearchOptions = exports.parseParamsArgument = void 0;
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
const default_1 = require("../dialect/default");
const reply_transformers_1 = require("./reply-transformers");
function parseParamsArgument(parser, params) {
if (params) {
parser.push('PARAMS');
const args = [];
for (const key in params) {
if (!Object.hasOwn(params, key))
continue;
const value = params[key];
args.push(key, typeof value === 'number' ? value.toString() : value);
}
parser.pushVariadicWithLength(args);
}
}
exports.parseParamsArgument = parseParamsArgument;
function parseSearchOptions(parser, options) {
if (options?.VERBATIM) {
parser.push('VERBATIM');
}
if (options?.NOSTOPWORDS) {
parser.push('NOSTOPWORDS');
}
(0, generic_transformers_1.parseOptionalVariadicArgument)(parser, 'INKEYS', options?.INKEYS);
(0, generic_transformers_1.parseOptionalVariadicArgument)(parser, 'INFIELDS', options?.INFIELDS);
(0, generic_transformers_1.parseOptionalVariadicArgument)(parser, 'RETURN', options?.RETURN);
if (options?.SUMMARIZE) {
parser.push('SUMMARIZE');
if (typeof options.SUMMARIZE === 'object') {
(0, generic_transformers_1.parseOptionalVariadicArgument)(parser, 'FIELDS', options.SUMMARIZE.FIELDS);
if (options.SUMMARIZE.FRAGS !== undefined) {
parser.push('FRAGS', options.SUMMARIZE.FRAGS.toString());
}
if (options.SUMMARIZE.LEN !== undefined) {
parser.push('LEN', options.SUMMARIZE.LEN.toString());
}
if (options.SUMMARIZE.SEPARATOR !== undefined) {
parser.push('SEPARATOR', options.SUMMARIZE.SEPARATOR);
}
}
}
if (options?.HIGHLIGHT) {
parser.push('HIGHLIGHT');
if (typeof options.HIGHLIGHT === 'object') {
(0, generic_transformers_1.parseOptionalVariadicArgument)(parser, 'FIELDS', options.HIGHLIGHT.FIELDS);
if (options.HIGHLIGHT.TAGS) {
parser.push('TAGS', options.HIGHLIGHT.TAGS.open, options.HIGHLIGHT.TAGS.close);
}
}
}
if (options?.SLOP !== undefined) {
parser.push('SLOP', options.SLOP.toString());
}
if (options?.TIMEOUT !== undefined) {
parser.push('TIMEOUT', options.TIMEOUT.toString());
}
if (options?.INORDER) {
parser.push('INORDER');
}
if (options?.LANGUAGE) {
parser.push('LANGUAGE', options.LANGUAGE);
}
if (options?.EXPANDER) {
parser.push('EXPANDER', options.EXPANDER);
}
if (options?.SCORER) {
parser.push('SCORER', options.SCORER);
}
if (options?.SORTBY) {
parser.push('SORTBY');
if (typeof options.SORTBY === 'string' || options.SORTBY instanceof Buffer) {
parser.push(options.SORTBY);
}
else {
parser.push(options.SORTBY.BY);
if (options.SORTBY.DIRECTION) {
parser.push(options.SORTBY.DIRECTION);
}
}
}
if (options?.LIMIT) {
parser.push('LIMIT', options.LIMIT.from.toString(), options.LIMIT.size.toString());
}
parseParamsArgument(parser, options?.PARAMS);
if (options?.DIALECT) {
parser.push('DIALECT', options.DIALECT.toString());
}
else {
parser.push('DIALECT', default_1.DEFAULT_DIALECT);
}
}
exports.parseSearchOptions = parseSearchOptions;
function transformSearchReplyResp2(reply,
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- matches TransformReply contract
_preserve, _typeMapping) {
// if reply[2] is array, then we have content/documents. Otherwise, only ids
const withoutDocuments = reply.length > 2 && !Array.isArray(reply[2]);
const documents = [];
let i = 1;
while (i < reply.length) {
documents.push({
id: reply[i++],
value: (withoutDocuments ? {} : documentValue(reply[i++]))
});
}
return {
total: reply[0],
documents
};
}
function transformSearchReplyResp3(rawReply,
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- matches TransformReply contract
preserve, typeMapping) {
if (Array.isArray(rawReply)) {
return transformSearchReplyResp2(rawReply, preserve, typeMapping);
}
const reply = (0, reply_transformers_1.mapLikeToObject)(rawReply);
const total = Number((0, reply_transformers_1.getMapValue)(reply, ['total_results', 'total']) ?? 0);
const results = (0, reply_transformers_1.mapLikeValues)((0, reply_transformers_1.getMapValue)(reply, ['results', 'documents']) ?? []);
const documents = results.map(result => {
const { id, value } = (0, reply_transformers_1.parseSearchResultRow)(result);
return {
id: String(id?.toString?.() ?? id ?? ''),
value: value
};
});
return {
total,
documents
};
}
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
parseCommand(parser, index, query, options) {
parser.push('FT.SEARCH', index, query);
parseSearchOptions(parser, options);
},
transformReply: {
2: transformSearchReplyResp2,
3: transformSearchReplyResp3
},
};
function documentValue(tuples) {
return (0, reply_transformers_1.parseDocumentValue)(tuples);
}
//# sourceMappingURL=SEARCH.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,17 @@
import { ReplyUnion, TypeMapping } from '@redis/client/dist/lib/RESP/types';
import { SearchRawReply } from './SEARCH';
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client/dist/lib/RESP/types").RedisArgument, query: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./SEARCH").FtSearchOptions | undefined) => void;
readonly transformReply: {
readonly 2: (reply: SearchRawReply) => SearchNoContentReply;
readonly 3: (reply: ReplyUnion, preserve?: any, typeMapping?: TypeMapping) => SearchNoContentReply;
};
};
export default _default;
export interface SearchNoContentReply {
total: number;
documents: Array<string>;
}
//# sourceMappingURL=SEARCH_NOCONTENT.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"SEARCH_NOCONTENT.d.ts","sourceRoot":"","sources":["../../../lib/commands/SEARCH_NOCONTENT.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,UAAU,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AACrF,OAAe,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;;;;;;+CAUlB,oBAAoB;4BAOvC,UAAU,aAEN,GAAG,gBACA,WAAW,KACxB,oBAAoB;;;AAnB3B,wBAiC6B;AAE7B,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC1B"}
@@ -0,0 +1,33 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const SEARCH_1 = __importDefault(require("./SEARCH"));
exports.default = {
NOT_KEYED_COMMAND: SEARCH_1.default.NOT_KEYED_COMMAND,
IS_READ_ONLY: SEARCH_1.default.IS_READ_ONLY,
parseCommand(...args) {
SEARCH_1.default.parseCommand(...args);
args[0].push('NOCONTENT');
},
transformReply: {
2: (reply) => {
return {
total: reply[0],
documents: reply.slice(1)
};
},
3: (reply,
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- matches TransformReply contract
preserve, typeMapping) => {
const transformed = SEARCH_1.default.transformReply[3](reply, preserve, typeMapping);
return {
total: transformed.total,
documents: transformed.documents.map(document => document.id)
};
}
},
};
;
//# sourceMappingURL=SEARCH_NOCONTENT.js.map
@@ -0,0 +1 @@
{"version":3,"file":"SEARCH_NOCONTENT.js","sourceRoot":"","sources":["../../../lib/commands/SEARCH_NOCONTENT.ts"],"names":[],"mappings":";;;;;AACA,sDAAkD;AAElD,kBAAe;IACb,iBAAiB,EAAE,gBAAM,CAAC,iBAAiB;IAC3C,YAAY,EAAE,gBAAM,CAAC,YAAY;IACjC,YAAY,CAAC,GAAG,IAA4C;QAC1D,gBAAM,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,CAAC;QAC7B,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC5B,CAAC;IACD,cAAc,EAAE;QACd,CAAC,EAAE,CAAC,KAAqB,EAAwB,EAAE;YACjD,OAAO;gBACL,KAAK,EAAE,KAAK,CAAC,CAAC,CAAW;gBACzB,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAkB;aAC3C,CAAA;QACH,CAAC;QACD,CAAC,EAAE,CACD,KAAiB;QACjB,iGAAiG;QACjG,QAAc,EACd,WAAyB,EACH,EAAE;YACxB,MAAM,WAAW,GAAG,gBAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,WAAW,CAKxE,CAAC;YAEF,OAAO;gBACL,KAAK,EAAE,WAAW,CAAC,KAAK;gBACxB,SAAS,EAAE,WAAW,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC;aAC9D,CAAC;QACJ,CAAC;KACF;CACyB,CAAC;AAK5B,CAAC","sourcesContent":["import { Command, ReplyUnion, TypeMapping } from '@redis/client/dist/lib/RESP/types';\nimport SEARCH, { SearchRawReply } from './SEARCH';\n\nexport default {\n NOT_KEYED_COMMAND: SEARCH.NOT_KEYED_COMMAND,\n IS_READ_ONLY: SEARCH.IS_READ_ONLY,\n parseCommand(...args: Parameters<typeof SEARCH.parseCommand>) {\n SEARCH.parseCommand(...args);\n args[0].push('NOCONTENT');\n },\n transformReply: {\n 2: (reply: SearchRawReply): SearchNoContentReply => {\n return {\n total: reply[0] as number,\n documents: reply.slice(1) as Array<string>\n }\n },\n 3: (\n reply: ReplyUnion,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- matches TransformReply contract\n preserve?: any,\n typeMapping?: TypeMapping\n ): SearchNoContentReply => {\n const transformed = SEARCH.transformReply[3](reply, preserve, typeMapping) as {\n total: number;\n documents: Array<{\n id: string;\n }>;\n };\n\n return {\n total: transformed.total,\n documents: transformed.documents.map(document => document.id)\n };\n }\n },\n} as const satisfies Command;\n\nexport interface SearchNoContentReply {\n total: number;\n documents: Array<string>;\n};\n"]}
@@ -0,0 +1,35 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, ReplyUnion } from '@redis/client/dist/lib/RESP/types';
export interface Terms {
mode: 'INCLUDE' | 'EXCLUDE';
dictionary: RedisArgument;
}
export interface FtSpellCheckOptions {
DISTANCE?: number;
TERMS?: Terms | Array<Terms>;
DIALECT?: number;
}
declare function transformSpellCheckReplyResp3(rawReply: ReplyUnion): SpellCheckReply;
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, index: RedisArgument, query: RedisArgument, options?: FtSpellCheckOptions) => void;
readonly transformReply: {
readonly 2: (rawReply: SpellCheckRawReply) => SpellCheckReply;
readonly 3: typeof transformSpellCheckReplyResp3;
};
};
export default _default;
type SpellCheckRawReply = Array<[
_: string,
term: string,
suggestions: Array<[score: string, suggestion: string]>
]>;
type SpellCheckReply = Array<{
term: string;
suggestions: Array<{
score: number;
suggestion: string;
}>;
}>;
//# sourceMappingURL=SPELLCHECK.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"SPELLCHECK.d.ts","sourceRoot":"","sources":["../../../lib/commands/SPELLCHECK.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAW,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAIvF,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;IAC5B,UAAU,EAAE,aAAa,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,iBAAS,6BAA6B,CAAC,QAAQ,EAAE,UAAU,GAAG,eAAe,CAgD5E;;;;gDAKsB,aAAa,SAAS,aAAa,SAAS,aAAa,YAAY,mBAAmB;;;;;;AAH/G,wBAsC6B;AAM7B,KAAK,kBAAkB,GAAG,KAAK,CAAC;IAC9B,CAAC,EAAE,MAAM;IACT,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,KAAK,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;CACxD,CAAC,CAAC;AAEH,KAAK,eAAe,GAAG,KAAK,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,KAAK,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAA;KACnB,CAAC,CAAA;CACH,CAAC,CAAC"}
@@ -0,0 +1,86 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const default_1 = require("../dialect/default");
const reply_transformers_1 = require("./reply-transformers");
function transformSpellCheckReplyResp3(rawReply) {
const transformed = [];
const results = (0, reply_transformers_1.getMapValue)(rawReply, ['results', 'Results']) ?? rawReply;
for (const [term, rawSuggestions] of (0, reply_transformers_1.mapLikeEntries)(results)) {
const suggestions = [];
for (const rawSuggestion of (0, reply_transformers_1.mapLikeValues)(rawSuggestions)) {
if (Array.isArray(rawSuggestion) && rawSuggestion.length >= 2) {
const first = rawSuggestion[0];
const second = rawSuggestion[1];
const numericFirst = Number(first);
if (!Number.isNaN(numericFirst)) {
suggestions.push({
score: numericFirst,
suggestion: second.toString()
});
}
else {
suggestions.push({
score: Number(second),
suggestion: first.toString()
});
}
continue;
}
const entries = (0, reply_transformers_1.mapLikeEntries)(rawSuggestion);
if (entries.length === 0)
continue;
const [suggestion, score] = entries[0];
suggestions.push({
score: Number(score),
suggestion
});
}
transformed.push({
term,
suggestions
});
}
return transformed;
}
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
parseCommand(parser, index, query, options) {
parser.push('FT.SPELLCHECK', index, query);
if (options?.DISTANCE) {
parser.push('DISTANCE', options.DISTANCE.toString());
}
if (options?.TERMS) {
if (Array.isArray(options.TERMS)) {
for (const term of options.TERMS) {
parseTerms(parser, term);
}
}
else {
parseTerms(parser, options.TERMS);
}
}
if (options?.DIALECT) {
parser.push('DIALECT', options.DIALECT.toString());
}
else {
parser.push('DIALECT', default_1.DEFAULT_DIALECT);
}
},
transformReply: {
2: (rawReply) => {
return rawReply.map(([, term, suggestions]) => ({
term,
suggestions: suggestions.map(([score, suggestion]) => ({
score: Number(score),
suggestion
}))
}));
},
3: transformSpellCheckReplyResp3,
},
};
function parseTerms(parser, { mode, dictionary }) {
parser.push('TERMS', mode, dictionary);
}
//# sourceMappingURL=SPELLCHECK.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,13 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, NumberReply } from '@redis/client/dist/lib/RESP/types';
export interface FtSugAddOptions {
INCR?: boolean;
PAYLOAD?: RedisArgument;
}
declare const _default: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, string: RedisArgument, score: number, options?: FtSugAddOptions) => void;
readonly transformReply: () => NumberReply;
};
export default _default;
//# sourceMappingURL=SUGADD.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"SUGADD.d.ts","sourceRoot":"","sources":["../../../lib/commands/SUGADD.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAW,MAAM,mCAAmC,CAAC;AAExF,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;;;gDAIsB,aAAa,OAAO,aAAa,UAAU,aAAa,SAAS,MAAM,YAAY,eAAe;mCAazE,WAAW;;AAf3D,wBAgB6B"}
@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: true,
parseCommand(parser, key, string, score, options) {
parser.push('FT.SUGADD');
parser.pushKey(key);
parser.push(string, score.toString());
if (options?.INCR) {
parser.push('INCR');
}
if (options?.PAYLOAD) {
parser.push('PAYLOAD', options.PAYLOAD);
}
},
transformReply: undefined
};
//# sourceMappingURL=SUGADD.js.map
@@ -0,0 +1 @@
{"version":3,"file":"SUGADD.js","sourceRoot":"","sources":["../../../lib/commands/SUGADD.ts"],"names":[],"mappings":";;AAQA,kBAAe;IACb,YAAY,EAAE,IAAI;IAClB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,MAAqB,EAAE,KAAa,EAAE,OAAyB;QACrH,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACzB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;QAEtC,IAAI,OAAO,EAAE,IAAI,EAAE,CAAC;YAClB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACtB,CAAC;QAED,IAAI,OAAO,EAAE,OAAO,EAAE,CAAC;YACrB,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAAyC;CAC/B,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, NumberReply, Command } from '@redis/client/dist/lib/RESP/types';\n\nexport interface FtSugAddOptions {\n INCR?: boolean;\n PAYLOAD?: RedisArgument;\n}\n\nexport default {\n IS_READ_ONLY: true,\n parseCommand(parser: CommandParser, key: RedisArgument, string: RedisArgument, score: number, options?: FtSugAddOptions) {\n parser.push('FT.SUGADD');\n parser.pushKey(key);\n parser.push(string, score.toString());\n\n if (options?.INCR) {\n parser.push('INCR');\n }\n\n if (options?.PAYLOAD) {\n parser.push('PAYLOAD', options.PAYLOAD);\n }\n },\n transformReply: undefined as unknown as () => NumberReply\n} as const satisfies Command;\n"]}
@@ -0,0 +1,9 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, NumberReply } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, string: RedisArgument) => void;
readonly transformReply: () => NumberReply<0 | 1>;
};
export default _default;
//# sourceMappingURL=SUGDEL.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"SUGDEL.d.ts","sourceRoot":"","sources":["../../../lib/commands/SUGDEL.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAW,MAAM,mCAAmC,CAAC;;;gDAIjE,aAAa,OAAO,aAAa,UAAU,aAAa;mCAK/B,YAAY,CAAC,GAAG,CAAC,CAAC;;AAPlE,wBAQ6B"}
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: true,
parseCommand(parser, key, string) {
parser.push('FT.SUGDEL');
parser.pushKey(key);
parser.push(string);
},
transformReply: undefined
};
//# sourceMappingURL=SUGDEL.js.map
@@ -0,0 +1 @@
{"version":3,"file":"SUGDEL.js","sourceRoot":"","sources":["../../../lib/commands/SUGDEL.ts"],"names":[],"mappings":";;AAGA,kBAAe;IACb,YAAY,EAAE,IAAI;IAClB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,MAAqB;QAC3E,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACzB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;IACD,cAAc,EAAE,SAAgD;CACtC,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, NumberReply, Command } from '@redis/client/dist/lib/RESP/types';\n\nexport default {\n IS_READ_ONLY: true,\n parseCommand(parser: CommandParser, key: RedisArgument, string: RedisArgument) {\n parser.push('FT.SUGDEL');\n parser.pushKey(key);\n parser.push(string);\n },\n transformReply: undefined as unknown as () => NumberReply<0 | 1>\n} as const satisfies Command;\n"]}
@@ -0,0 +1,13 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { NullReply, ArrayReply, BlobStringReply, RedisArgument } from '@redis/client/dist/lib/RESP/types';
export interface FtSugGetOptions {
FUZZY?: boolean;
MAX?: number;
}
declare const _default: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, prefix: RedisArgument, options?: FtSugGetOptions) => void;
readonly transformReply: () => NullReply | ArrayReply<BlobStringReply>;
};
export default _default;
//# sourceMappingURL=SUGGET.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"SUGGET.d.ts","sourceRoot":"","sources":["../../../lib/commands/SUGGET.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAW,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAEnH,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;;;gDAIsB,aAAa,OAAO,aAAa,UAAU,aAAa,YAAY,eAAe;mCAa1D,SAAS,GAAG,WAAW,eAAe,CAAC;;AAfvF,wBAgB6B"}
@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: true,
parseCommand(parser, key, prefix, options) {
parser.push('FT.SUGGET');
parser.pushKey(key);
parser.push(prefix);
if (options?.FUZZY) {
parser.push('FUZZY');
}
if (options?.MAX !== undefined) {
parser.push('MAX', options.MAX.toString());
}
},
transformReply: undefined
};
//# sourceMappingURL=SUGGET.js.map
@@ -0,0 +1 @@
{"version":3,"file":"SUGGET.js","sourceRoot":"","sources":["../../../lib/commands/SUGGET.ts"],"names":[],"mappings":";;AAQA,kBAAe;IACb,YAAY,EAAE,IAAI;IAClB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,MAAqB,EAAE,OAAyB;QACtG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACzB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAEpB,IAAI,OAAO,EAAE,KAAK,EAAE,CAAC;YACnB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;QAED,IAAI,OAAO,EAAE,GAAG,KAAK,SAAS,EAAE,CAAC;YAC/B,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAAqE;CAC3D,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { NullReply, ArrayReply, BlobStringReply, Command, RedisArgument } from '@redis/client/dist/lib/RESP/types';\n\nexport interface FtSugGetOptions {\n FUZZY?: boolean;\n MAX?: number;\n}\n\nexport default {\n IS_READ_ONLY: true,\n parseCommand(parser: CommandParser, key: RedisArgument, prefix: RedisArgument, options?: FtSugGetOptions) {\n parser.push('FT.SUGGET');\n parser.pushKey(key);\n parser.push(prefix);\n\n if (options?.FUZZY) {\n parser.push('FUZZY');\n }\n\n if (options?.MAX !== undefined) {\n parser.push('MAX', options.MAX.toString());\n }\n },\n transformReply: undefined as unknown as () => NullReply | ArrayReply<BlobStringReply>\n} as const satisfies Command;\n"]}
@@ -0,0 +1,11 @@
import { NullReply, ArrayReply, BlobStringReply, UnwrapReply } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, prefix: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./SUGGET").FtSugGetOptions | undefined) => void;
readonly transformReply: (this: void, reply: NullReply | UnwrapReply<ArrayReply<BlobStringReply>>) => {
suggestion: BlobStringReply;
payload: BlobStringReply;
}[] | null;
};
export default _default;
//# sourceMappingURL=SUGGET_WITHPAYLOADS.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"SUGGET_WITHPAYLOADS.d.ts","sourceRoot":"","sources":["../../../lib/commands/SUGGET_WITHPAYLOADS.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,WAAW,EAAW,MAAM,mCAAmC,CAAC;;;;iDAUzF,SAAS,GAAG,YAAY,WAAW,eAAe,CAAC,CAAC;oBAI1D,eAAe;iBAClB,eAAe;;;AAX9B,wBAwB6B"}
@@ -0,0 +1,28 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
const SUGGET_1 = __importDefault(require("./SUGGET"));
exports.default = {
IS_READ_ONLY: SUGGET_1.default.IS_READ_ONLY,
parseCommand(...args) {
SUGGET_1.default.parseCommand(...args);
args[0].push('WITHPAYLOADS');
},
transformReply(reply) {
if ((0, generic_transformers_1.isNullReply)(reply))
return null;
const transformedReply = new Array(reply.length / 2);
let replyIndex = 0, arrIndex = 0;
while (replyIndex < reply.length) {
transformedReply[arrIndex++] = {
suggestion: reply[replyIndex++],
payload: reply[replyIndex++]
};
}
return transformedReply;
}
};
//# sourceMappingURL=SUGGET_WITHPAYLOADS.js.map
@@ -0,0 +1 @@
{"version":3,"file":"SUGGET_WITHPAYLOADS.js","sourceRoot":"","sources":["../../../lib/commands/SUGGET_WITHPAYLOADS.ts"],"names":[],"mappings":";;;;;AACA,+FAAmF;AACnF,sDAA8B;AAE9B,kBAAe;IACb,YAAY,EAAE,gBAAM,CAAC,YAAY;IACjC,YAAY,CAAC,GAAG,IAA4C;QAC1D,gBAAM,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,CAAC;QAC7B,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAC/B,CAAC;IACD,cAAc,CAAC,KAA2D;QACxE,IAAI,IAAA,kCAAW,EAAC,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QAEpC,MAAM,gBAAgB,GAGjB,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACjC,IAAI,UAAU,GAAG,CAAC,EAChB,QAAQ,GAAG,CAAC,CAAC;QACf,OAAO,UAAU,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;YACjC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,GAAG;gBAC7B,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC;gBAC/B,OAAO,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC;aAC7B,CAAC;QACJ,CAAC;QAED,OAAO,gBAAgB,CAAC;IAC1B,CAAC;CACyB,CAAC","sourcesContent":["import { NullReply, ArrayReply, BlobStringReply, UnwrapReply, Command } from '@redis/client/dist/lib/RESP/types';\nimport { isNullReply } from '@redis/client/dist/lib/commands/generic-transformers';\nimport SUGGET from './SUGGET';\n\nexport default {\n IS_READ_ONLY: SUGGET.IS_READ_ONLY,\n parseCommand(...args: Parameters<typeof SUGGET.parseCommand>) {\n SUGGET.parseCommand(...args);\n args[0].push('WITHPAYLOADS');\n },\n transformReply(reply: NullReply | UnwrapReply<ArrayReply<BlobStringReply>>) {\n if (isNullReply(reply)) return null;\n\n const transformedReply: Array<{\n suggestion: BlobStringReply;\n payload: BlobStringReply;\n }> = new Array(reply.length / 2);\n let replyIndex = 0,\n arrIndex = 0;\n while (replyIndex < reply.length) {\n transformedReply[arrIndex++] = {\n suggestion: reply[replyIndex++],\n payload: reply[replyIndex++]\n };\n }\n\n return transformedReply;\n }\n} as const satisfies Command;\n"]}
@@ -0,0 +1,15 @@
import { NullReply, ArrayReply, BlobStringReply, DoubleReply, UnwrapReply, TypeMapping } from '@redis/client/dist/lib/RESP/types';
type SuggestScore = {
suggestion: BlobStringReply;
score: DoubleReply;
};
declare const _default: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, prefix: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./SUGGET").FtSugGetOptions | undefined) => void;
readonly transformReply: {
readonly 2: (reply: NullReply | UnwrapReply<ArrayReply<BlobStringReply>>, preserve?: unknown, typeMapping?: TypeMapping) => SuggestScore[] | null;
readonly 3: (reply: UnwrapReply<ArrayReply<BlobStringReply | DoubleReply>>) => SuggestScore[] | null;
};
};
export default _default;
//# sourceMappingURL=SUGGET_WITHSCORES.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"SUGGET_WITHSCORES.d.ts","sourceRoot":"","sources":["../../../lib/commands/SUGGET_WITHSCORES.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,WAAW,EAAE,WAAW,EAAW,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAI3I,KAAK,YAAY,GAAG;IAClB,UAAU,EAAE,eAAe,CAAC;IAC5B,KAAK,EAAE,WAAW,CAAC;CACpB,CAAA;;;;;4BASc,SAAS,GAAG,YAAY,WAAW,eAAe,CAAC,CAAC,aAAa,OAAO,gBAAgB,WAAW;4BAenG,YAAY,WAAW,eAAe,GAAG,WAAW,CAAC,CAAC;;;AAtBrE,wBAsC6B"}
@@ -0,0 +1,43 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
const SUGGET_1 = __importDefault(require("./SUGGET"));
exports.default = {
IS_READ_ONLY: SUGGET_1.default.IS_READ_ONLY,
parseCommand(...args) {
SUGGET_1.default.parseCommand(...args);
args[0].push('WITHSCORES');
},
transformReply: {
2: (reply, preserve, typeMapping) => {
if ((0, generic_transformers_1.isNullReply)(reply))
return null;
const transformedReply = new Array(reply.length / 2);
let replyIndex = 0, arrIndex = 0;
while (replyIndex < reply.length) {
transformedReply[arrIndex++] = {
suggestion: reply[replyIndex++],
score: generic_transformers_1.transformDoubleReply[2](reply[replyIndex++], preserve, typeMapping)
};
}
return transformedReply;
},
3: (reply) => {
if ((0, generic_transformers_1.isNullReply)(reply))
return null;
const transformedReply = new Array(reply.length / 2);
let replyIndex = 0, arrIndex = 0;
while (replyIndex < reply.length) {
transformedReply[arrIndex++] = {
suggestion: reply[replyIndex++],
score: reply[replyIndex++]
};
}
return transformedReply;
}
}
};
//# sourceMappingURL=SUGGET_WITHSCORES.js.map
@@ -0,0 +1 @@
{"version":3,"file":"SUGGET_WITHSCORES.js","sourceRoot":"","sources":["../../../lib/commands/SUGGET_WITHSCORES.ts"],"names":[],"mappings":";;;;;AACA,+FAAyG;AACzG,sDAA8B;AAO9B,kBAAe;IACb,YAAY,EAAE,gBAAM,CAAC,YAAY;IACjC,YAAY,CAAC,GAAG,IAA4C;QAC1D,gBAAM,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,CAAC;QAC7B,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC7B,CAAC;IACD,cAAc,EAAE;QACd,CAAC,EAAE,CAAC,KAA2D,EAAE,QAAkB,EAAE,WAAyB,EAAE,EAAE;YAChH,IAAI,IAAA,kCAAW,EAAC,KAAK,CAAC;gBAAE,OAAO,IAAI,CAAC;YAEpC,MAAM,gBAAgB,GAAwB,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YAC1E,IAAI,UAAU,GAAG,CAAC,EAChB,QAAQ,GAAG,CAAC,CAAC;YACf,OAAO,UAAU,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;gBACjC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,GAAG;oBAC7B,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC;oBAC/B,KAAK,EAAE,2CAAoB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,WAAW,CAAC;iBAC3E,CAAC;YACJ,CAAC;YAED,OAAO,gBAAgB,CAAC;QAC1B,CAAC;QACD,CAAC,EAAE,CAAC,KAA6D,EAAE,EAAE;YACnE,IAAI,IAAA,kCAAW,EAAC,KAAK,CAAC;gBAAE,OAAO,IAAI,CAAC;YAEpC,MAAM,gBAAgB,GAAwB,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YAC1E,IAAI,UAAU,GAAG,CAAC,EAChB,QAAQ,GAAG,CAAC,CAAC;YACf,OAAO,UAAU,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;gBACjC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,GAAG;oBAC7B,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,CAAoB;oBAClD,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,CAAgB;iBAC1C,CAAC;YACJ,CAAC;YAED,OAAO,gBAAgB,CAAC;QAC1B,CAAC;KACF;CACyB,CAAC","sourcesContent":["import { NullReply, ArrayReply, BlobStringReply, DoubleReply, UnwrapReply, Command, TypeMapping } from '@redis/client/dist/lib/RESP/types';\nimport { isNullReply, transformDoubleReply } from '@redis/client/dist/lib/commands/generic-transformers';\nimport SUGGET from './SUGGET';\n\ntype SuggestScore = {\n suggestion: BlobStringReply;\n score: DoubleReply;\n}\n\nexport default {\n IS_READ_ONLY: SUGGET.IS_READ_ONLY,\n parseCommand(...args: Parameters<typeof SUGGET.parseCommand>) {\n SUGGET.parseCommand(...args);\n args[0].push('WITHSCORES');\n },\n transformReply: {\n 2: (reply: NullReply | UnwrapReply<ArrayReply<BlobStringReply>>, preserve?: unknown, typeMapping?: TypeMapping) => {\n if (isNullReply(reply)) return null;\n\n const transformedReply: Array<SuggestScore> = new Array(reply.length / 2);\n let replyIndex = 0,\n arrIndex = 0;\n while (replyIndex < reply.length) {\n transformedReply[arrIndex++] = {\n suggestion: reply[replyIndex++],\n score: transformDoubleReply[2](reply[replyIndex++], preserve, typeMapping)\n };\n }\n\n return transformedReply;\n },\n 3: (reply: UnwrapReply<ArrayReply<BlobStringReply | DoubleReply>>) => {\n if (isNullReply(reply)) return null;\n \n const transformedReply: Array<SuggestScore> = new Array(reply.length / 2);\n let replyIndex = 0,\n arrIndex = 0;\n while (replyIndex < reply.length) {\n transformedReply[arrIndex++] = {\n suggestion: reply[replyIndex++] as BlobStringReply,\n score: reply[replyIndex++] as DoubleReply\n };\n }\n\n return transformedReply;\n }\n }\n} as const satisfies Command;\n"]}
@@ -0,0 +1,16 @@
import { NullReply, ArrayReply, BlobStringReply, DoubleReply, UnwrapReply, TypeMapping } from '@redis/client/dist/lib/RESP/types';
type SuggestScoreWithPayload = {
suggestion: BlobStringReply;
score: DoubleReply;
payload: BlobStringReply;
};
declare const _default: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, prefix: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./SUGGET").FtSugGetOptions | undefined) => void;
readonly transformReply: {
readonly 2: (reply: NullReply | UnwrapReply<ArrayReply<BlobStringReply>>, preserve?: unknown, typeMapping?: TypeMapping) => SuggestScoreWithPayload[] | null;
readonly 3: (reply: NullReply | UnwrapReply<ArrayReply<BlobStringReply | DoubleReply>>) => SuggestScoreWithPayload[] | null;
};
};
export default _default;
//# sourceMappingURL=SUGGET_WITHSCORES_WITHPAYLOADS.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"SUGGET_WITHSCORES_WITHPAYLOADS.d.ts","sourceRoot":"","sources":["../../../lib/commands/SUGGET_WITHSCORES_WITHPAYLOADS.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,WAAW,EAAE,WAAW,EAAW,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAI3I,KAAK,uBAAuB,GAAG;IAC7B,UAAU,EAAE,eAAe,CAAC;IAC5B,KAAK,EAAE,WAAW,CAAC;IACnB,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAA;;;;;4BAYc,SAAS,GAAG,YAAY,WAAW,eAAe,CAAC,CAAC,aAAa,OAAO,gBAAgB,WAAW;4BAgBnG,SAAS,GAAG,YAAY,WAAW,eAAe,GAAG,WAAW,CAAC,CAAC;;;AA1BjF,wBA2C6B"}
@@ -0,0 +1,45 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
const SUGGET_1 = __importDefault(require("./SUGGET"));
exports.default = {
IS_READ_ONLY: SUGGET_1.default.IS_READ_ONLY,
parseCommand(...args) {
SUGGET_1.default.parseCommand(...args);
args[0].push('WITHSCORES', 'WITHPAYLOADS');
},
transformReply: {
2: (reply, preserve, typeMapping) => {
if ((0, generic_transformers_1.isNullReply)(reply))
return null;
const transformedReply = new Array(reply.length / 3);
let replyIndex = 0, arrIndex = 0;
while (replyIndex < reply.length) {
transformedReply[arrIndex++] = {
suggestion: reply[replyIndex++],
score: generic_transformers_1.transformDoubleReply[2](reply[replyIndex++], preserve, typeMapping),
payload: reply[replyIndex++]
};
}
return transformedReply;
},
3: (reply) => {
if ((0, generic_transformers_1.isNullReply)(reply))
return null;
const transformedReply = new Array(reply.length / 3);
let replyIndex = 0, arrIndex = 0;
while (replyIndex < reply.length) {
transformedReply[arrIndex++] = {
suggestion: reply[replyIndex++],
score: reply[replyIndex++],
payload: reply[replyIndex++]
};
}
return transformedReply;
}
}
};
//# sourceMappingURL=SUGGET_WITHSCORES_WITHPAYLOADS.js.map
@@ -0,0 +1 @@
{"version":3,"file":"SUGGET_WITHSCORES_WITHPAYLOADS.js","sourceRoot":"","sources":["../../../lib/commands/SUGGET_WITHSCORES_WITHPAYLOADS.ts"],"names":[],"mappings":";;;;;AACA,+FAAyG;AACzG,sDAA8B;AAQ9B,kBAAe;IACb,YAAY,EAAE,gBAAM,CAAC,YAAY;IACjC,YAAY,CAAC,GAAG,IAA4C;QAC1D,gBAAM,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,CAAC;QAC7B,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CACV,YAAY,EACZ,cAAc,CACf,CAAC;IACJ,CAAC;IACD,cAAc,EAAE;QACd,CAAC,EAAE,CAAC,KAA2D,EAAE,QAAkB,EAAE,WAAyB,EAAE,EAAE;YAChH,IAAI,IAAA,kCAAW,EAAC,KAAK,CAAC;gBAAE,OAAO,IAAI,CAAC;YAEpC,MAAM,gBAAgB,GAAmC,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YACrF,IAAI,UAAU,GAAG,CAAC,EAChB,QAAQ,GAAG,CAAC,CAAC;YACf,OAAO,UAAU,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;gBACjC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,GAAG;oBAC7B,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC;oBAC/B,KAAK,EAAE,2CAAoB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,WAAW,CAAC;oBAC1E,OAAO,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC;iBAC7B,CAAC;YACJ,CAAC;YAED,OAAO,gBAAgB,CAAC;QAC1B,CAAC;QACD,CAAC,EAAE,CAAC,KAAyE,EAAE,EAAE;YAC/E,IAAI,IAAA,kCAAW,EAAC,KAAK,CAAC;gBAAE,OAAO,IAAI,CAAC;YAEpC,MAAM,gBAAgB,GAAmC,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YACrF,IAAI,UAAU,GAAG,CAAC,EAChB,QAAQ,GAAG,CAAC,CAAC;YACf,OAAO,UAAU,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;gBACjC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,GAAG;oBAC7B,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,CAAoB;oBAClD,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,CAAgB;oBACzC,OAAO,EAAE,KAAK,CAAC,UAAU,EAAE,CAAoB;iBAChD,CAAC;YACJ,CAAC;YAED,OAAO,gBAAgB,CAAC;QAC1B,CAAC;KACF;CACyB,CAAC","sourcesContent":["import { NullReply, ArrayReply, BlobStringReply, DoubleReply, UnwrapReply, Command, TypeMapping } from '@redis/client/dist/lib/RESP/types';\nimport { isNullReply, transformDoubleReply } from '@redis/client/dist/lib/commands/generic-transformers';\nimport SUGGET from './SUGGET';\n\ntype SuggestScoreWithPayload = {\n suggestion: BlobStringReply;\n score: DoubleReply;\n payload: BlobStringReply;\n}\n\nexport default {\n IS_READ_ONLY: SUGGET.IS_READ_ONLY,\n parseCommand(...args: Parameters<typeof SUGGET.parseCommand>) {\n SUGGET.parseCommand(...args);\n args[0].push(\n 'WITHSCORES',\n 'WITHPAYLOADS'\n );\n },\n transformReply: {\n 2: (reply: NullReply | UnwrapReply<ArrayReply<BlobStringReply>>, preserve?: unknown, typeMapping?: TypeMapping) => {\n if (isNullReply(reply)) return null;\n\n const transformedReply: Array<SuggestScoreWithPayload> = new Array(reply.length / 3);\n let replyIndex = 0,\n arrIndex = 0;\n while (replyIndex < reply.length) {\n transformedReply[arrIndex++] = {\n suggestion: reply[replyIndex++],\n score: transformDoubleReply[2](reply[replyIndex++], preserve, typeMapping),\n payload: reply[replyIndex++]\n };\n }\n\n return transformedReply;\n },\n 3: (reply: NullReply | UnwrapReply<ArrayReply<BlobStringReply | DoubleReply>>) => {\n if (isNullReply(reply)) return null;\n\n const transformedReply: Array<SuggestScoreWithPayload> = new Array(reply.length / 3);\n let replyIndex = 0,\n arrIndex = 0;\n while (replyIndex < reply.length) {\n transformedReply[arrIndex++] = {\n suggestion: reply[replyIndex++] as BlobStringReply,\n score: reply[replyIndex++] as DoubleReply,\n payload: reply[replyIndex++] as BlobStringReply\n };\n }\n\n return transformedReply;\n }\n }\n} as const satisfies Command;\n"]}
@@ -0,0 +1,9 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, NumberReply } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument) => void;
readonly transformReply: () => NumberReply;
};
export default _default;
//# sourceMappingURL=SUGLEN.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"SUGLEN.d.ts","sourceRoot":"","sources":["../../../lib/commands/SUGLEN.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAW,MAAM,mCAAmC,CAAC;;;gDAIjE,aAAa,OAAO,aAAa;mCAGR,WAAW;;AAL3D,wBAM6B"}
@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: true,
parseCommand(parser, key) {
parser.push('FT.SUGLEN', key);
},
transformReply: undefined
};
//# sourceMappingURL=SUGLEN.js.map
@@ -0,0 +1 @@
{"version":3,"file":"SUGLEN.js","sourceRoot":"","sources":["../../../lib/commands/SUGLEN.ts"],"names":[],"mappings":";;AAGA,kBAAe;IACb,YAAY,EAAE,IAAI;IAClB,YAAY,CAAC,MAAqB,EAAE,GAAkB;QACpD,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;IAChC,CAAC;IACD,cAAc,EAAE,SAAyC;CAC/B,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, NumberReply, Command } from '@redis/client/dist/lib/RESP/types';\n\nexport default {\n IS_READ_ONLY: true,\n parseCommand(parser: CommandParser, key: RedisArgument) {\n parser.push('FT.SUGLEN', key);\n },\n transformReply: undefined as unknown as () => NumberReply\n} as const satisfies Command;\n"]}
@@ -0,0 +1,13 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, MapReply, BlobStringReply, ArrayReply, UnwrapReply } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, index: RedisArgument) => void;
readonly transformReply: {
readonly 2: (reply: UnwrapReply<ArrayReply<BlobStringReply | ArrayReply<BlobStringReply>>>) => Record<string, ArrayReply<BlobStringReply<string>>>;
readonly 3: () => MapReply<BlobStringReply, ArrayReply<BlobStringReply>>;
};
};
export default _default;
//# sourceMappingURL=SYNDUMP.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"SYNDUMP.d.ts","sourceRoot":"","sources":["../../../lib/commands/SYNDUMP.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAW,MAAM,mCAAmC,CAAC;;;;gDAKxG,aAAa,SAAS,aAAa;;4BAI3C,YAAY,WAAW,eAAe,GAAG,WAAW,eAAe,CAAC,CAAC,CAAC;0BAUhD,SAAS,eAAe,EAAE,WAAW,eAAe,CAAC,CAAC;;;AAjB3F,wBAmB6B"}
@@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
parseCommand(parser, index) {
parser.push('FT.SYNDUMP', index);
},
transformReply: {
2: (reply) => {
const result = {};
let i = 0;
while (i < reply.length) {
const key = reply[i++].toString(), value = reply[i++];
result[key] = value;
}
return result;
},
3: undefined
}
};
//# sourceMappingURL=SYNDUMP.js.map
@@ -0,0 +1 @@
{"version":3,"file":"SYNDUMP.js","sourceRoot":"","sources":["../../../lib/commands/SYNDUMP.ts"],"names":[],"mappings":";;AAGA,kBAAe;IACb,iBAAiB,EAAE,IAAI;IACvB,YAAY,EAAE,IAAI;IAClB,YAAY,CAAC,MAAqB,EAAE,KAAoB;QACtD,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;IACnC,CAAC;IACD,cAAc,EAAE;QACd,CAAC,EAAE,CAAC,KAA6E,EAAE,EAAE;YACnF,MAAM,MAAM,GAAgD,EAAE,CAAC;YAC/D,IAAI,CAAC,GAAG,CAAC,CAAC;YACV,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;gBACxB,MAAM,GAAG,GAAI,KAAK,CAAC,CAAC,EAAE,CAA6C,CAAC,QAAQ,EAAE,EAC5E,KAAK,GAAG,KAAK,CAAC,CAAC,EAAE,CAA2C,CAAC;gBAC/D,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;YACtB,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,CAAC,EAAE,SAAoF;KACxF;CACyB,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, MapReply, BlobStringReply, ArrayReply, UnwrapReply, Command } from '@redis/client/dist/lib/RESP/types';\n\nexport default {\n NOT_KEYED_COMMAND: true,\n IS_READ_ONLY: true,\n parseCommand(parser: CommandParser, index: RedisArgument) {\n parser.push('FT.SYNDUMP', index);\n },\n transformReply: {\n 2: (reply: UnwrapReply<ArrayReply<BlobStringReply | ArrayReply<BlobStringReply>>>) => {\n const result: Record<string, ArrayReply<BlobStringReply>> = {};\n let i = 0;\n while (i < reply.length) {\n const key = (reply[i++] as unknown as UnwrapReply<BlobStringReply>).toString(),\n value = reply[i++] as unknown as ArrayReply<BlobStringReply>;\n result[key] = value;\n }\n return result;\n },\n 3: undefined as unknown as () => MapReply<BlobStringReply, ArrayReply<BlobStringReply>>\n }\n} as const satisfies Command;\n"]}
@@ -0,0 +1,14 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { SimpleStringReply, RedisArgument } from '@redis/client/dist/lib/RESP/types';
import { RedisVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers';
export interface FtSynUpdateOptions {
SKIPINITIALSCAN?: boolean;
}
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, index: RedisArgument, groupId: RedisArgument, terms: RedisVariadicArgument, options?: FtSynUpdateOptions) => void;
readonly transformReply: () => SimpleStringReply<'OK'>;
};
export default _default;
//# sourceMappingURL=SYNUPDATE.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"SYNUPDATE.d.ts","sourceRoot":"","sources":["../../../lib/commands/SYNUPDATE.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAW,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;AAE7F,MAAM,WAAW,kBAAkB;IACjC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;;;;gDAMW,aAAa,SACd,aAAa,WACX,aAAa,SACf,qBAAqB,YAClB,kBAAkB;mCAUgB,kBAAkB,IAAI,CAAC;;AAlBvE,wBAmB6B"}
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
parseCommand(parser, index, groupId, terms, options) {
parser.push('FT.SYNUPDATE', index, groupId);
if (options?.SKIPINITIALSCAN) {
parser.push('SKIPINITIALSCAN');
}
parser.pushVariadic(terms);
},
transformReply: undefined
};
//# sourceMappingURL=SYNUPDATE.js.map
@@ -0,0 +1 @@
{"version":3,"file":"SYNUPDATE.js","sourceRoot":"","sources":["../../../lib/commands/SYNUPDATE.ts"],"names":[],"mappings":";;AAQA,kBAAe;IACb,iBAAiB,EAAE,IAAI;IACvB,YAAY,EAAE,IAAI;IAClB,YAAY,CACV,MAAqB,EACrB,KAAoB,EACpB,OAAsB,EACtB,KAA4B,EAC5B,OAA4B;QAE5B,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QAE5C,IAAI,OAAO,EAAE,eAAe,EAAE,CAAC;YAC7B,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QACjC,CAAC;QAED,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IACD,cAAc,EAAE,SAAqD;CAC3C,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { SimpleStringReply, Command, RedisArgument } from '@redis/client/dist/lib/RESP/types';\nimport { RedisVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers';\n\nexport interface FtSynUpdateOptions {\n SKIPINITIALSCAN?: boolean;\n}\n\nexport default {\n NOT_KEYED_COMMAND: true,\n IS_READ_ONLY: true,\n parseCommand(\n parser: CommandParser,\n index: RedisArgument,\n groupId: RedisArgument,\n terms: RedisVariadicArgument,\n options?: FtSynUpdateOptions\n ) {\n parser.push('FT.SYNUPDATE', index, groupId);\n\n if (options?.SKIPINITIALSCAN) {\n parser.push('SKIPINITIALSCAN');\n }\n\n parser.pushVariadic(terms);\n },\n transformReply: undefined as unknown as () => SimpleStringReply<'OK'>\n} as const satisfies Command;\n"]}
@@ -0,0 +1,13 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, ArrayReply, SetReply, BlobStringReply } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, index: RedisArgument, fieldName: RedisArgument) => void;
readonly transformReply: {
readonly 2: () => ArrayReply<BlobStringReply>;
readonly 3: () => SetReply<BlobStringReply>;
};
};
export default _default;
//# sourceMappingURL=TAGVALS.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"TAGVALS.d.ts","sourceRoot":"","sources":["../../../lib/commands/TAGVALS.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAW,MAAM,mCAAmC,CAAC;;;;gDAK3F,aAAa,SAAS,aAAa,aAAa,aAAa;;0BAI/C,WAAW,eAAe,CAAC;0BAC3B,SAAS,eAAe,CAAC;;;AAR9D,wBAU6B"}
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
parseCommand(parser, index, fieldName) {
parser.push('FT.TAGVALS', index, fieldName);
},
transformReply: {
2: undefined,
3: undefined
}
};
//# sourceMappingURL=TAGVALS.js.map
@@ -0,0 +1 @@
{"version":3,"file":"TAGVALS.js","sourceRoot":"","sources":["../../../lib/commands/TAGVALS.ts"],"names":[],"mappings":";;AAGA,kBAAe;IACb,iBAAiB,EAAE,IAAI;IACvB,YAAY,EAAE,IAAI;IAClB,YAAY,CAAC,MAAqB,EAAE,KAAoB,EAAE,SAAwB;QAChF,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IAC9C,CAAC;IACD,cAAc,EAAE;QACd,CAAC,EAAE,SAAyD;QAC5D,CAAC,EAAE,SAAuD;KAC3D;CACyB,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, ArrayReply, SetReply, BlobStringReply, Command } from '@redis/client/dist/lib/RESP/types';\n\nexport default {\n NOT_KEYED_COMMAND: true,\n IS_READ_ONLY: true,\n parseCommand(parser: CommandParser, index: RedisArgument, fieldName: RedisArgument) {\n parser.push('FT.TAGVALS', index, fieldName);\n },\n transformReply: {\n 2: undefined as unknown as () => ArrayReply<BlobStringReply>,\n 3: undefined as unknown as () => SetReply<BlobStringReply>\n }\n} as const satisfies Command;\n"]}
@@ -0,0 +1,13 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { ArrayReply, SetReply, BlobStringReply } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser) => void;
readonly transformReply: {
readonly 2: () => ArrayReply<BlobStringReply>;
readonly 3: () => SetReply<BlobStringReply>;
};
};
export default _default;
//# sourceMappingURL=_LIST.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"_LIST.d.ts","sourceRoot":"","sources":["../../../lib/commands/_LIST.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAW,MAAM,mCAAmC,CAAC;;;;gDAK5E,aAAa;;0BAIC,WAAW,eAAe,CAAC;0BAC3B,SAAS,eAAe,CAAC;;;AAR9D,wBAU6B"}
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
NOT_KEYED_COMMAND: true,
IS_READ_ONLY: true,
parseCommand(parser) {
parser.push('FT._LIST');
},
transformReply: {
2: undefined,
3: undefined
}
};
//# sourceMappingURL=_LIST.js.map
@@ -0,0 +1 @@
{"version":3,"file":"_LIST.js","sourceRoot":"","sources":["../../../lib/commands/_LIST.ts"],"names":[],"mappings":";;AAGA,kBAAe;IACb,iBAAiB,EAAE,IAAI;IACvB,YAAY,EAAE,IAAI;IAClB,YAAY,CAAC,MAAqB;QAChC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC1B,CAAC;IACD,cAAc,EAAE;QACd,CAAC,EAAE,SAAyD;QAC5D,CAAC,EAAE,SAAuD;KAC3D;CACyB,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { ArrayReply, SetReply, BlobStringReply, Command } from '@redis/client/dist/lib/RESP/types';\n\nexport default {\n NOT_KEYED_COMMAND: true,\n IS_READ_ONLY: true,\n parseCommand(parser: CommandParser) {\n parser.push('FT._LIST');\n },\n transformReply: {\n 2: undefined as unknown as () => ArrayReply<BlobStringReply>,\n 3: undefined as unknown as () => SetReply<BlobStringReply>\n }\n} as const satisfies Command;\n"]}
@@ -0,0 +1,1065 @@
/// <reference types="node" />
declare const _default: {
/**
* Lists all existing indexes in the database.
*/
_LIST: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser) => void;
readonly transformReply: {
readonly 2: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>;
readonly 3: () => import("@redis/client/dist/lib/RESP/types").SetReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>;
};
};
/**
* Lists all existing indexes in the database.
*/
_list: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser) => void;
readonly transformReply: {
readonly 2: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>;
readonly 3: () => import("@redis/client/dist/lib/RESP/types").SetReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>;
};
};
/**
* Alters an existing RediSearch index schema by adding new fields.
* @param index - The index to alter
* @param schema - The schema definition containing new fields to add
*/
ALTER: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, schema: import("./CREATE").RediSearchSchema) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
/**
* Alters an existing RediSearch index schema by adding new fields.
* @param index - The index to alter
* @param schema - The schema definition containing new fields to add
*/
alter: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, schema: import("./CREATE").RediSearchSchema) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
/**
* Performs an aggregation with a cursor for retrieving large result sets.
* @param index - Name of the index to query
* @param query - The aggregation query
* @param options - Optional parameters:
* - All options supported by FT.AGGREGATE
* - COUNT: Number of results to return per cursor fetch
* - MAXIDLE: Maximum idle time for cursor in milliseconds
*/
AGGREGATE_WITHCURSOR: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, query: import("@redis/client").RedisArgument, options?: import("./AGGREGATE_WITHCURSOR").FtAggregateWithCursorOptions | undefined) => void;
readonly transformReply: {
readonly 2: (reply: [result: [total: import("@redis/client/dist/lib/RESP/types").UnwrapReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number>>, ...results: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>[]], cursor: import("@redis/client/dist/lib/RESP/types").NumberReply<number>], preserve?: any, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./AGGREGATE_WITHCURSOR").AggregateWithCursorReply;
readonly 3: (reply: import("@redis/client/dist/lib/RESP/types").ReplyUnion, preserve?: any, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./AGGREGATE_WITHCURSOR").AggregateWithCursorReply;
};
};
/**
* Performs an aggregation with a cursor for retrieving large result sets.
* @param index - Name of the index to query
* @param query - The aggregation query
* @param options - Optional parameters:
* - All options supported by FT.AGGREGATE
* - COUNT: Number of results to return per cursor fetch
* - MAXIDLE: Maximum idle time for cursor in milliseconds
*/
aggregateWithCursor: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, query: import("@redis/client").RedisArgument, options?: import("./AGGREGATE_WITHCURSOR").FtAggregateWithCursorOptions | undefined) => void;
readonly transformReply: {
readonly 2: (reply: [result: [total: import("@redis/client/dist/lib/RESP/types").UnwrapReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number>>, ...results: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>[]], cursor: import("@redis/client/dist/lib/RESP/types").NumberReply<number>], preserve?: any, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./AGGREGATE_WITHCURSOR").AggregateWithCursorReply;
readonly 3: (reply: import("@redis/client/dist/lib/RESP/types").ReplyUnion, preserve?: any, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./AGGREGATE_WITHCURSOR").AggregateWithCursorReply;
};
};
/**
* Performs an aggregation query on a RediSearch index.
* @param index - The index name to query
* @param query - The text query to use as filter, use * to indicate no filtering
* @param options - Optional parameters for aggregation:
* - VERBATIM: disable stemming in query evaluation
* - LOAD: specify fields to load from documents
* - STEPS: sequence of aggregation steps (GROUPBY, SORTBY, APPLY, LIMIT, FILTER)
* - PARAMS: bind parameters for query evaluation
* - TIMEOUT: maximum time to run the query
*/
AGGREGATE: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, query: import("@redis/client").RedisArgument, options?: import("./AGGREGATE").FtAggregateOptions | undefined) => void;
readonly transformReply: {
readonly 2: (rawReply: [total: import("@redis/client/dist/lib/RESP/types").UnwrapReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number>>, ...results: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>[]], preserve?: any, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./AGGREGATE").AggregateReply;
readonly 3: (rawReply: import("@redis/client/dist/lib/RESP/types").ReplyUnion, preserve?: any, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./AGGREGATE").AggregateReply;
};
};
/**
* Performs an aggregation query on a RediSearch index.
* @param index - The index name to query
* @param query - The text query to use as filter, use * to indicate no filtering
* @param options - Optional parameters for aggregation:
* - VERBATIM: disable stemming in query evaluation
* - LOAD: specify fields to load from documents
* - STEPS: sequence of aggregation steps (GROUPBY, SORTBY, APPLY, LIMIT, FILTER)
* - PARAMS: bind parameters for query evaluation
* - TIMEOUT: maximum time to run the query
*/
aggregate: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, query: import("@redis/client").RedisArgument, options?: import("./AGGREGATE").FtAggregateOptions | undefined) => void;
readonly transformReply: {
readonly 2: (rawReply: [total: import("@redis/client/dist/lib/RESP/types").UnwrapReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number>>, ...results: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>[]], preserve?: any, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./AGGREGATE").AggregateReply;
readonly 3: (rawReply: import("@redis/client/dist/lib/RESP/types").ReplyUnion, preserve?: any, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./AGGREGATE").AggregateReply;
};
};
/**
* Adds an alias to a RediSearch index.
* @param alias - The alias to add
* @param index - The index name to alias
*/
ALIASADD: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, alias: import("@redis/client").RedisArgument, index: import("@redis/client").RedisArgument) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
/**
* Adds an alias to a RediSearch index.
* @param alias - The alias to add
* @param index - The index name to alias
*/
aliasAdd: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, alias: import("@redis/client").RedisArgument, index: import("@redis/client").RedisArgument) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
/**
* Removes an existing alias from a RediSearch index.
* @param alias - The alias to remove
*/
ALIASDEL: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, alias: import("@redis/client").RedisArgument) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
/**
* Removes an existing alias from a RediSearch index.
* @param alias - The alias to remove
*/
aliasDel: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, alias: import("@redis/client").RedisArgument) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
/**
* Updates the index pointed to by an existing alias.
* @param alias - The existing alias to update
* @param index - The new index name that the alias should point to
*/
ALIASUPDATE: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, alias: import("@redis/client").RedisArgument, index: import("@redis/client").RedisArgument) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
/**
* Updates the index pointed to by an existing alias.
* @param alias - The existing alias to update
* @param index - The new index name that the alias should point to
*/
aliasUpdate: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, alias: import("@redis/client").RedisArgument, index: import("@redis/client").RedisArgument) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
/**
* Gets a RediSearch configuration option value.
* @param option - The name of the configuration option to retrieve
*/
CONFIG_GET: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, option: string) => void;
readonly transformReply: (this: void, reply: import("@redis/client/dist/lib/RESP/types").TuplesReply<[import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>, import("@redis/client/dist/lib/RESP/types").BlobStringReply<string> | import("@redis/client/dist/lib/RESP/types").NullReply]>[]) => Record<string, unknown>;
};
/**
* Gets a RediSearch configuration option value.
* @param option - The name of the configuration option to retrieve
*/
configGet: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, option: string) => void;
readonly transformReply: (this: void, reply: import("@redis/client/dist/lib/RESP/types").TuplesReply<[import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>, import("@redis/client/dist/lib/RESP/types").BlobStringReply<string> | import("@redis/client/dist/lib/RESP/types").NullReply]>[]) => Record<string, unknown>;
};
/**
* Sets a RediSearch configuration option value.
* @param property - The name of the configuration option to set
* @param value - The value to set for the configuration option
*/
CONFIG_SET: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, property: Buffer | (string & {}) | "a" | "b", value: import("@redis/client").RedisArgument) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
/**
* Sets a RediSearch configuration option value.
* @param property - The name of the configuration option to set
* @param value - The value to set for the configuration option
*/
configSet: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, property: Buffer | (string & {}) | "a" | "b", value: import("@redis/client").RedisArgument) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
/**
* Creates a new search index with the given schema and options.
* @param index - Name of the index to create
* @param schema - Index schema defining field names and types (TEXT, NUMERIC, GEO, TAG, VECTOR, GEOSHAPE).
* Each field can be a single definition or an array to index the same field multiple times with different configurations.
* @param options - Optional parameters:
* - ON: Type of container to index (HASH or JSON)
* - PREFIX: Prefixes for document keys to index
* - FILTER: Expression that filters indexed documents
* - LANGUAGE/LANGUAGE_FIELD: Default language for indexing
* - SCORE/SCORE_FIELD: Document ranking parameters
* - MAXTEXTFIELDS: Index all text fields without specifying them
* - TEMPORARY: Create a temporary index
* - NOOFFSETS/NOHL/NOFIELDS/NOFREQS: Index optimization flags
* - STOPWORDS: Custom stopword list
*/
CREATE: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, schema: import("./CREATE").RediSearchSchema, options?: import("./CREATE").CreateOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
/**
* Creates a new search index with the given schema and options.
* @param index - Name of the index to create
* @param schema - Index schema defining field names and types (TEXT, NUMERIC, GEO, TAG, VECTOR, GEOSHAPE).
* Each field can be a single definition or an array to index the same field multiple times with different configurations.
* @param options - Optional parameters:
* - ON: Type of container to index (HASH or JSON)
* - PREFIX: Prefixes for document keys to index
* - FILTER: Expression that filters indexed documents
* - LANGUAGE/LANGUAGE_FIELD: Default language for indexing
* - SCORE/SCORE_FIELD: Document ranking parameters
* - MAXTEXTFIELDS: Index all text fields without specifying them
* - TEMPORARY: Create a temporary index
* - NOOFFSETS/NOHL/NOFIELDS/NOFREQS: Index optimization flags
* - STOPWORDS: Custom stopword list
*/
create: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, schema: import("./CREATE").RediSearchSchema, options?: import("./CREATE").CreateOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
/**
* Deletes a cursor from an index.
* @param index - The index name that contains the cursor
* @param cursorId - The cursor ID to delete
*/
CURSOR_DEL: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, cursorId: import("@redis/client/dist/lib/RESP/types").UnwrapReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number>>) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
/**
* Deletes a cursor from an index.
* @param index - The index name that contains the cursor
* @param cursorId - The cursor ID to delete
*/
cursorDel: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, cursorId: import("@redis/client/dist/lib/RESP/types").UnwrapReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number>>) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
/**
* Reads from an existing cursor to get more results from an index.
* @param index - The index name that contains the cursor
* @param cursor - The cursor ID to read from
* @param options - Optional parameters:
* - COUNT: Maximum number of results to return
*/
CURSOR_READ: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, cursor: import("@redis/client/dist/lib/RESP/types").UnwrapReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number>>, options?: import("./CURSOR_READ").FtCursorReadOptions | undefined) => void;
readonly transformReply: {
readonly 2: (reply: [result: [total: import("@redis/client/dist/lib/RESP/types").UnwrapReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number>>, ...results: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>[]], cursor: import("@redis/client/dist/lib/RESP/types").NumberReply<number>], preserve?: any, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./AGGREGATE_WITHCURSOR").AggregateWithCursorReply;
readonly 3: (reply: import("@redis/client/dist/lib/RESP/types").ReplyUnion, preserve?: any, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./AGGREGATE_WITHCURSOR").AggregateWithCursorReply;
};
};
/**
* Reads from an existing cursor to get more results from an index.
* @param index - The index name that contains the cursor
* @param cursor - The cursor ID to read from
* @param options - Optional parameters:
* - COUNT: Maximum number of results to return
*/
cursorRead: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, cursor: import("@redis/client/dist/lib/RESP/types").UnwrapReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number>>, options?: import("./CURSOR_READ").FtCursorReadOptions | undefined) => void;
readonly transformReply: {
readonly 2: (reply: [result: [total: import("@redis/client/dist/lib/RESP/types").UnwrapReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number>>, ...results: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>[]], cursor: import("@redis/client/dist/lib/RESP/types").NumberReply<number>], preserve?: any, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./AGGREGATE_WITHCURSOR").AggregateWithCursorReply;
readonly 3: (reply: import("@redis/client/dist/lib/RESP/types").ReplyUnion, preserve?: any, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./AGGREGATE_WITHCURSOR").AggregateWithCursorReply;
};
};
/**
* Adds terms to a dictionary.
* @param dictionary - Name of the dictionary to add terms to
* @param term - One or more terms to add to the dictionary
*/
DICTADD: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, dictionary: import("@redis/client").RedisArgument, term: import("@redis/client/dist/lib/commands/generic-transformers").RedisVariadicArgument) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
};
/**
* Adds terms to a dictionary.
* @param dictionary - Name of the dictionary to add terms to
* @param term - One or more terms to add to the dictionary
*/
dictAdd: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, dictionary: import("@redis/client").RedisArgument, term: import("@redis/client/dist/lib/commands/generic-transformers").RedisVariadicArgument) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
};
/**
* Deletes terms from a dictionary.
* @param dictionary - Name of the dictionary to remove terms from
* @param term - One or more terms to delete from the dictionary
*/
DICTDEL: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, dictionary: import("@redis/client").RedisArgument, term: import("@redis/client/dist/lib/commands/generic-transformers").RedisVariadicArgument) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
};
/**
* Deletes terms from a dictionary.
* @param dictionary - Name of the dictionary to remove terms from
* @param term - One or more terms to delete from the dictionary
*/
dictDel: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, dictionary: import("@redis/client").RedisArgument, term: import("@redis/client/dist/lib/commands/generic-transformers").RedisVariadicArgument) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
};
/**
* Returns all terms in a dictionary.
* @param dictionary - Name of the dictionary to dump
*/
DICTDUMP: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, dictionary: import("@redis/client").RedisArgument) => void;
readonly transformReply: {
readonly 2: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>;
readonly 3: () => import("@redis/client/dist/lib/RESP/types").SetReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>;
};
};
/**
* Returns all terms in a dictionary.
* @param dictionary - Name of the dictionary to dump
*/
dictDump: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, dictionary: import("@redis/client").RedisArgument) => void;
readonly transformReply: {
readonly 2: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>;
readonly 3: () => import("@redis/client/dist/lib/RESP/types").SetReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>;
};
};
/**
* Deletes an index and all associated documents.
* @param index - Name of the index to delete
* @param options - Optional parameters:
* - DD: Also delete the indexed documents themselves
*/
DROPINDEX: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, options?: import("./DROPINDEX").FtDropIndexOptions | undefined) => void;
readonly transformReply: {
readonly 2: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
readonly 3: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
};
};
/**
* Deletes an index and all associated documents.
* @param index - Name of the index to delete
* @param options - Optional parameters:
* - DD: Also delete the indexed documents themselves
*/
dropIndex: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, options?: import("./DROPINDEX").FtDropIndexOptions | undefined) => void;
readonly transformReply: {
readonly 2: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
readonly 3: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
};
};
/**
* Returns the execution plan for a complex query.
* @param index - Name of the index to explain query against
* @param query - The query string to explain
* @param options - Optional parameters:
* - PARAMS: Named parameters to use in the query
* - DIALECT: Version of query dialect to use (defaults to 1)
*/
EXPLAIN: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, query: import("@redis/client").RedisArgument, options?: import("./EXPLAIN").FtExplainOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<string>;
};
/**
* Returns the execution plan for a complex query.
* @param index - Name of the index to explain query against
* @param query - The query string to explain
* @param options - Optional parameters:
* - PARAMS: Named parameters to use in the query
* - DIALECT: Version of query dialect to use (defaults to 1)
*/
explain: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, query: import("@redis/client").RedisArgument, options?: import("./EXPLAIN").FtExplainOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<string>;
};
/**
* Returns the execution plan for a complex query in a more verbose format than FT.EXPLAIN.
* @param index - Name of the index to explain query against
* @param query - The query string to explain
* @param options - Optional parameters:
* - DIALECT: Version of query dialect to use (defaults to 1)
*/
EXPLAINCLI: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, query: import("@redis/client").RedisArgument, options?: import("./EXPLAINCLI").FtExplainCLIOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>;
};
/**
* Returns the execution plan for a complex query in a more verbose format than FT.EXPLAIN.
* @param index - Name of the index to explain query against
* @param query - The query string to explain
* @param options - Optional parameters:
* - DIALECT: Version of query dialect to use (defaults to 1)
*/
explainCli: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, query: import("@redis/client").RedisArgument, options?: import("./EXPLAINCLI").FtExplainCLIOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>;
};
/**
* Performs a hybrid search combining multiple search expressions.
* Supports multiple SEARCH and VECTOR expressions with various fusion methods.
*
* @experimental
* NOTE: FT.Hybrid is still in experimental state
* It's behaviour and function signature may change
*
* @param index - The index name to search
* @param options - Hybrid search options including:
* - SEARCH: Text search expression with optional scoring
* - VSIM: Vector similarity expression with KNN/RANGE methods
* - COMBINE: Fusion method (RRF, LINEAR)
* - Post-processing operations: LOAD, GROUPBY, APPLY, SORTBY, FILTER
* - Tunable options: LIMIT, PARAMS, TIMEOUT
*/
HYBRID: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, options: import("./HYBRID").FtHybridOptions) => void;
readonly transformReply: {
readonly 2: (reply: unknown, _preserve?: any, _typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./HYBRID").HybridSearchResult;
readonly 3: (reply: unknown, _preserve?: any, _typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./HYBRID").HybridSearchResult;
};
};
/**
* Performs a hybrid search combining multiple search expressions.
* Supports multiple SEARCH and VECTOR expressions with various fusion methods.
*
* @experimental
* NOTE: FT.Hybrid is still in experimental state
* It's behaviour and function signature may change
*
* @param index - The index name to search
* @param options - Hybrid search options including:
* - SEARCH: Text search expression with optional scoring
* - VSIM: Vector similarity expression with KNN/RANGE methods
* - COMBINE: Fusion method (RRF, LINEAR)
* - Post-processing operations: LOAD, GROUPBY, APPLY, SORTBY, FILTER
* - Tunable options: LIMIT, PARAMS, TIMEOUT
*/
hybrid: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, options: import("./HYBRID").FtHybridOptions) => void;
readonly transformReply: {
readonly 2: (reply: unknown, _preserve?: any, _typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./HYBRID").HybridSearchResult;
readonly 3: (reply: unknown, _preserve?: any, _typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./HYBRID").HybridSearchResult;
};
};
/**
* Returns information and statistics about an index.
* @param index - Name of the index to get information about
*/
INFO: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument) => void;
readonly transformReply: {
readonly 2: (reply: unknown[], preserve?: unknown, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./INFO").InfoReply;
readonly 3: () => import("./INFO").InfoReply;
};
};
/**
* Returns information and statistics about an index.
* @param index - Name of the index to get information about
*/
info: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument) => void;
readonly transformReply: {
readonly 2: (reply: unknown[], preserve?: unknown, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./INFO").InfoReply;
readonly 3: () => import("./INFO").InfoReply;
};
};
/**
* Profiles the execution of a search query for performance analysis.
* @param index - Name of the index to profile query against
* @param query - The search query to profile
* @param options - Optional parameters:
* - LIMITED: Collect limited timing information only
* - All options supported by FT.SEARCH command
*/
PROFILESEARCH: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, query: import("@redis/client").RedisArgument, options?: (import("./PROFILE_SEARCH").ProfileOptions & import("./SEARCH").FtSearchOptions) | undefined) => void;
readonly transformReply: {
readonly 2: (reply: [import("./SEARCH").SearchRawReply, import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").ReplyUnion>], preserve?: any, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./PROFILE_SEARCH").ProfileReplyResp2;
readonly 3: (reply: import("@redis/client/dist/lib/RESP/types").ReplyUnion, preserve?: any, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./PROFILE_SEARCH").ProfileReplyResp2;
};
};
/**
* Profiles the execution of a search query for performance analysis.
* @param index - Name of the index to profile query against
* @param query - The search query to profile
* @param options - Optional parameters:
* - LIMITED: Collect limited timing information only
* - All options supported by FT.SEARCH command
*/
profileSearch: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, query: import("@redis/client").RedisArgument, options?: (import("./PROFILE_SEARCH").ProfileOptions & import("./SEARCH").FtSearchOptions) | undefined) => void;
readonly transformReply: {
readonly 2: (reply: [import("./SEARCH").SearchRawReply, import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").ReplyUnion>], preserve?: any, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./PROFILE_SEARCH").ProfileReplyResp2;
readonly 3: (reply: import("@redis/client/dist/lib/RESP/types").ReplyUnion, preserve?: any, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./PROFILE_SEARCH").ProfileReplyResp2;
};
};
/**
* Profiles the execution of an aggregation query for performance analysis.
* @param index - Name of the index to profile query against
* @param query - The aggregation query to profile
* @param options - Optional parameters:
* - LIMITED: Collect limited timing information only
* - All options supported by FT.AGGREGATE command
*/
PROFILEAGGREGATE: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: string, query: string, options?: (import("./PROFILE_SEARCH").ProfileOptions & import("./AGGREGATE").FtAggregateOptions) | undefined) => void;
readonly transformReply: {
readonly 2: (reply: [[total: import("@redis/client/dist/lib/RESP/types").UnwrapReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number>>, ...results: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>[]], import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").ReplyUnion>], preserve?: any, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./PROFILE_SEARCH").ProfileReplyResp2;
readonly 3: (reply: import("@redis/client/dist/lib/RESP/types").ReplyUnion, preserve?: any, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./PROFILE_SEARCH").ProfileReplyResp2;
};
};
/**
* Profiles the execution of an aggregation query for performance analysis.
* @param index - Name of the index to profile query against
* @param query - The aggregation query to profile
* @param options - Optional parameters:
* - LIMITED: Collect limited timing information only
* - All options supported by FT.AGGREGATE command
*/
profileAggregate: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: string, query: string, options?: (import("./PROFILE_SEARCH").ProfileOptions & import("./AGGREGATE").FtAggregateOptions) | undefined) => void;
readonly transformReply: {
readonly 2: (reply: [[total: import("@redis/client/dist/lib/RESP/types").UnwrapReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number>>, ...results: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>[]], import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").ReplyUnion>], preserve?: any, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./PROFILE_SEARCH").ProfileReplyResp2;
readonly 3: (reply: import("@redis/client/dist/lib/RESP/types").ReplyUnion, preserve?: any, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./PROFILE_SEARCH").ProfileReplyResp2;
};
};
/**
* Performs a search query but returns only document ids without their contents.
* @param args - Same parameters as FT.SEARCH:
* - parser: The command parser
* - index: Name of the index to search
* - query: The text query to search
* - options: Optional search parameters
*/
SEARCH_NOCONTENT: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, query: import("@redis/client").RedisArgument, options?: import("./SEARCH").FtSearchOptions | undefined) => void;
readonly transformReply: {
readonly 2: (reply: import("./SEARCH").SearchRawReply) => import("./SEARCH_NOCONTENT").SearchNoContentReply;
readonly 3: (reply: import("@redis/client/dist/lib/RESP/types").ReplyUnion, preserve?: any, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./SEARCH_NOCONTENT").SearchNoContentReply;
};
};
/**
* Performs a search query but returns only document ids without their contents.
* @param args - Same parameters as FT.SEARCH:
* - parser: The command parser
* - index: Name of the index to search
* - query: The text query to search
* - options: Optional search parameters
*/
searchNoContent: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, query: import("@redis/client").RedisArgument, options?: import("./SEARCH").FtSearchOptions | undefined) => void;
readonly transformReply: {
readonly 2: (reply: import("./SEARCH").SearchRawReply) => import("./SEARCH_NOCONTENT").SearchNoContentReply;
readonly 3: (reply: import("@redis/client/dist/lib/RESP/types").ReplyUnion, preserve?: any, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./SEARCH_NOCONTENT").SearchNoContentReply;
};
};
/**
* Searches a RediSearch index with the given query.
* @param index - The index name to search
* @param query - The text query to search. For syntax, see https://redis.io/docs/stack/search/reference/query_syntax
* @param options - Optional search parameters including:
* - VERBATIM: do not try to use stemming for query expansion
* - NOSTOPWORDS: do not filter stopwords from the query
* - INKEYS/INFIELDS: restrict the search to specific keys/fields
* - RETURN: limit which fields are returned
* - SUMMARIZE/HIGHLIGHT: create search result highlights
* - LIMIT: pagination control
* - SORTBY: sort results by a specific field
* - PARAMS: bind parameters to the query
*/
SEARCH: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, query: import("@redis/client").RedisArgument, options?: import("./SEARCH").FtSearchOptions | undefined) => void;
readonly transformReply: {
readonly 2: (reply: import("./SEARCH").SearchRawReply, _preserve?: any, _typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./SEARCH").SearchReply;
readonly 3: (rawReply: import("@redis/client/dist/lib/RESP/types").ReplyUnion, preserve?: any, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./SEARCH").SearchReply;
};
};
/**
* Searches a RediSearch index with the given query.
* @param index - The index name to search
* @param query - The text query to search. For syntax, see https://redis.io/docs/stack/search/reference/query_syntax
* @param options - Optional search parameters including:
* - VERBATIM: do not try to use stemming for query expansion
* - NOSTOPWORDS: do not filter stopwords from the query
* - INKEYS/INFIELDS: restrict the search to specific keys/fields
* - RETURN: limit which fields are returned
* - SUMMARIZE/HIGHLIGHT: create search result highlights
* - LIMIT: pagination control
* - SORTBY: sort results by a specific field
* - PARAMS: bind parameters to the query
*/
search: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, query: import("@redis/client").RedisArgument, options?: import("./SEARCH").FtSearchOptions | undefined) => void;
readonly transformReply: {
readonly 2: (reply: import("./SEARCH").SearchRawReply, _preserve?: any, _typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./SEARCH").SearchReply;
readonly 3: (rawReply: import("@redis/client/dist/lib/RESP/types").ReplyUnion, preserve?: any, typeMapping?: import("@redis/client").TypeMapping | undefined) => import("./SEARCH").SearchReply;
};
};
/**
* Performs spelling correction on a search query.
* @param index - Name of the index to use for spelling corrections
* @param query - The search query to check for spelling
* @param options - Optional parameters:
* - DISTANCE: Maximum Levenshtein distance for spelling suggestions
* - TERMS: Custom dictionary terms to include/exclude
* - DIALECT: Version of query dialect to use (defaults to 1)
*/
SPELLCHECK: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, query: import("@redis/client").RedisArgument, options?: import("./SPELLCHECK").FtSpellCheckOptions | undefined) => void;
readonly transformReply: {
readonly 2: (rawReply: [_: string, term: string, suggestions: [score: string, suggestion: string][]][]) => {
term: string;
suggestions: {
score: number;
suggestion: string;
}[];
}[];
readonly 3: (rawReply: import("@redis/client/dist/lib/RESP/types").ReplyUnion) => {
term: string;
suggestions: {
score: number;
suggestion: string;
}[];
}[];
};
};
/**
* Performs spelling correction on a search query.
* @param index - Name of the index to use for spelling corrections
* @param query - The search query to check for spelling
* @param options - Optional parameters:
* - DISTANCE: Maximum Levenshtein distance for spelling suggestions
* - TERMS: Custom dictionary terms to include/exclude
* - DIALECT: Version of query dialect to use (defaults to 1)
*/
spellCheck: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, query: import("@redis/client").RedisArgument, options?: import("./SPELLCHECK").FtSpellCheckOptions | undefined) => void;
readonly transformReply: {
readonly 2: (rawReply: [_: string, term: string, suggestions: [score: string, suggestion: string][]][]) => {
term: string;
suggestions: {
score: number;
suggestion: string;
}[];
}[];
readonly 3: (rawReply: import("@redis/client/dist/lib/RESP/types").ReplyUnion) => {
term: string;
suggestions: {
score: number;
suggestion: string;
}[];
}[];
};
};
/**
* Adds a suggestion string to an auto-complete suggestion dictionary.
* @param key - The suggestion dictionary key
* @param string - The suggestion string to add
* @param score - The suggestion score used for sorting
* @param options - Optional parameters:
* - INCR: If true, increment the existing entry's score
* - PAYLOAD: Optional payload to associate with the suggestion
*/
SUGADD: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client").RedisArgument, string: import("@redis/client").RedisArgument, score: number, options?: import("./SUGADD").FtSugAddOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
};
/**
* Adds a suggestion string to an auto-complete suggestion dictionary.
* @param key - The suggestion dictionary key
* @param string - The suggestion string to add
* @param score - The suggestion score used for sorting
* @param options - Optional parameters:
* - INCR: If true, increment the existing entry's score
* - PAYLOAD: Optional payload to associate with the suggestion
*/
sugAdd: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client").RedisArgument, string: import("@redis/client").RedisArgument, score: number, options?: import("./SUGADD").FtSugAddOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
};
/**
* Deletes a string from a suggestion dictionary.
* @param key - The suggestion dictionary key
* @param string - The suggestion string to delete
*/
SUGDEL: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client").RedisArgument, string: import("@redis/client").RedisArgument) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>;
};
/**
* Deletes a string from a suggestion dictionary.
* @param key - The suggestion dictionary key
* @param string - The suggestion string to delete
*/
sugDel: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client").RedisArgument, string: import("@redis/client").RedisArgument) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>;
};
/**
* Gets completion suggestions with their payloads from a suggestion dictionary.
* @param args - Same parameters as FT.SUGGET:
* - parser: The command parser
* - key: The suggestion dictionary key
* - prefix: The prefix to get completion suggestions for
* - options: Optional parameters for fuzzy matching and max results
*/
SUGGET_WITHPAYLOADS: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client").RedisArgument, prefix: import("@redis/client").RedisArgument, options?: import("./SUGGET").FtSugGetOptions | undefined) => void;
readonly transformReply: (this: void, reply: import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>[]) => {
suggestion: import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>;
payload: import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>;
}[] | null;
};
/**
* Gets completion suggestions with their payloads from a suggestion dictionary.
* @param args - Same parameters as FT.SUGGET:
* - parser: The command parser
* - key: The suggestion dictionary key
* - prefix: The prefix to get completion suggestions for
* - options: Optional parameters for fuzzy matching and max results
*/
sugGetWithPayloads: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client").RedisArgument, prefix: import("@redis/client").RedisArgument, options?: import("./SUGGET").FtSugGetOptions | undefined) => void;
readonly transformReply: (this: void, reply: import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>[]) => {
suggestion: import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>;
payload: import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>;
}[] | null;
};
/**
* Gets completion suggestions with their scores and payloads from a suggestion dictionary.
* @param args - Same parameters as FT.SUGGET:
* - parser: The command parser
* - key: The suggestion dictionary key
* - prefix: The prefix to get completion suggestions for
* - options: Optional parameters for fuzzy matching and max results
*/
SUGGET_WITHSCORES_WITHPAYLOADS: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client").RedisArgument, prefix: import("@redis/client").RedisArgument, options?: import("./SUGGET").FtSugGetOptions | undefined) => void;
readonly transformReply: {
readonly 2: (reply: import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>[], preserve?: unknown, typeMapping?: import("@redis/client").TypeMapping | undefined) => {
suggestion: import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>;
score: import("@redis/client/dist/lib/RESP/types").DoubleReply<number>;
payload: import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>;
}[] | null;
readonly 3: (reply: import("@redis/client/dist/lib/RESP/types").NullReply | (import("@redis/client/dist/lib/RESP/types").BlobStringReply<string> | import("@redis/client/dist/lib/RESP/types").DoubleReply<number>)[]) => {
suggestion: import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>;
score: import("@redis/client/dist/lib/RESP/types").DoubleReply<number>;
payload: import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>;
}[] | null;
};
};
/**
* Gets completion suggestions with their scores and payloads from a suggestion dictionary.
* @param args - Same parameters as FT.SUGGET:
* - parser: The command parser
* - key: The suggestion dictionary key
* - prefix: The prefix to get completion suggestions for
* - options: Optional parameters for fuzzy matching and max results
*/
sugGetWithScoresWithPayloads: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client").RedisArgument, prefix: import("@redis/client").RedisArgument, options?: import("./SUGGET").FtSugGetOptions | undefined) => void;
readonly transformReply: {
readonly 2: (reply: import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>[], preserve?: unknown, typeMapping?: import("@redis/client").TypeMapping | undefined) => {
suggestion: import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>;
score: import("@redis/client/dist/lib/RESP/types").DoubleReply<number>;
payload: import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>;
}[] | null;
readonly 3: (reply: import("@redis/client/dist/lib/RESP/types").NullReply | (import("@redis/client/dist/lib/RESP/types").BlobStringReply<string> | import("@redis/client/dist/lib/RESP/types").DoubleReply<number>)[]) => {
suggestion: import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>;
score: import("@redis/client/dist/lib/RESP/types").DoubleReply<number>;
payload: import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>;
}[] | null;
};
};
/**
* Gets completion suggestions with their scores from a suggestion dictionary.
* @param args - Same parameters as FT.SUGGET:
* - parser: The command parser
* - key: The suggestion dictionary key
* - prefix: The prefix to get completion suggestions for
* - options: Optional parameters for fuzzy matching and max results
*/
SUGGET_WITHSCORES: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client").RedisArgument, prefix: import("@redis/client").RedisArgument, options?: import("./SUGGET").FtSugGetOptions | undefined) => void;
readonly transformReply: {
readonly 2: (reply: import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>[], preserve?: unknown, typeMapping?: import("@redis/client").TypeMapping | undefined) => {
suggestion: import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>;
score: import("@redis/client/dist/lib/RESP/types").DoubleReply<number>;
}[] | null;
readonly 3: (reply: (import("@redis/client/dist/lib/RESP/types").BlobStringReply<string> | import("@redis/client/dist/lib/RESP/types").DoubleReply<number>)[]) => {
suggestion: import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>;
score: import("@redis/client/dist/lib/RESP/types").DoubleReply<number>;
}[] | null;
};
};
/**
* Gets completion suggestions with their scores from a suggestion dictionary.
* @param args - Same parameters as FT.SUGGET:
* - parser: The command parser
* - key: The suggestion dictionary key
* - prefix: The prefix to get completion suggestions for
* - options: Optional parameters for fuzzy matching and max results
*/
sugGetWithScores: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client").RedisArgument, prefix: import("@redis/client").RedisArgument, options?: import("./SUGGET").FtSugGetOptions | undefined) => void;
readonly transformReply: {
readonly 2: (reply: import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>[], preserve?: unknown, typeMapping?: import("@redis/client").TypeMapping | undefined) => {
suggestion: import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>;
score: import("@redis/client/dist/lib/RESP/types").DoubleReply<number>;
}[] | null;
readonly 3: (reply: (import("@redis/client/dist/lib/RESP/types").BlobStringReply<string> | import("@redis/client/dist/lib/RESP/types").DoubleReply<number>)[]) => {
suggestion: import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>;
score: import("@redis/client/dist/lib/RESP/types").DoubleReply<number>;
}[] | null;
};
};
/**
* Gets completion suggestions for a prefix from a suggestion dictionary.
* @param key - The suggestion dictionary key
* @param prefix - The prefix to get completion suggestions for
* @param options - Optional parameters:
* - FUZZY: Enable fuzzy prefix matching
* - MAX: Maximum number of results to return
*/
SUGGET: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client").RedisArgument, prefix: import("@redis/client").RedisArgument, options?: import("./SUGGET").FtSugGetOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>> | import("@redis/client/dist/lib/RESP/types").NullReply;
};
/**
* Gets completion suggestions for a prefix from a suggestion dictionary.
* @param key - The suggestion dictionary key
* @param prefix - The prefix to get completion suggestions for
* @param options - Optional parameters:
* - FUZZY: Enable fuzzy prefix matching
* - MAX: Maximum number of results to return
*/
sugGet: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client").RedisArgument, prefix: import("@redis/client").RedisArgument, options?: import("./SUGGET").FtSugGetOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>> | import("@redis/client/dist/lib/RESP/types").NullReply;
};
/**
* Gets the size of a suggestion dictionary.
* @param key - The suggestion dictionary key
*/
SUGLEN: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client").RedisArgument) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
};
/**
* Gets the size of a suggestion dictionary.
* @param key - The suggestion dictionary key
*/
sugLen: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, key: import("@redis/client").RedisArgument) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
};
/**
* Dumps the contents of a synonym group.
* @param index - Name of the index that contains the synonym group
*/
SYNDUMP: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument) => void;
readonly transformReply: {
readonly 2: (reply: (import("@redis/client/dist/lib/RESP/types").BlobStringReply<string> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>)[]) => Record<string, import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>>;
readonly 3: () => import("@redis/client/dist/lib/RESP/types").MapReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>, import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>>;
};
};
/**
* Dumps the contents of a synonym group.
* @param index - Name of the index that contains the synonym group
*/
synDump: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument) => void;
readonly transformReply: {
readonly 2: (reply: (import("@redis/client/dist/lib/RESP/types").BlobStringReply<string> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>)[]) => Record<string, import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>>;
readonly 3: () => import("@redis/client/dist/lib/RESP/types").MapReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>, import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>>;
};
};
/**
* Updates a synonym group with new terms.
* @param index - Name of the index that contains the synonym group
* @param groupId - ID of the synonym group to update
* @param terms - One or more synonym terms to add to the group
* @param options - Optional parameters:
* - SKIPINITIALSCAN: Skip the initial scan for existing documents
*/
SYNUPDATE: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, groupId: import("@redis/client").RedisArgument, terms: import("@redis/client/dist/lib/commands/generic-transformers").RedisVariadicArgument, options?: import("./SYNUPDATE").FtSynUpdateOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
/**
* Updates a synonym group with new terms.
* @param index - Name of the index that contains the synonym group
* @param groupId - ID of the synonym group to update
* @param terms - One or more synonym terms to add to the group
* @param options - Optional parameters:
* - SKIPINITIALSCAN: Skip the initial scan for existing documents
*/
synUpdate: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, groupId: import("@redis/client").RedisArgument, terms: import("@redis/client/dist/lib/commands/generic-transformers").RedisVariadicArgument, options?: import("./SYNUPDATE").FtSynUpdateOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
/**
* Returns the distinct values in a TAG field.
* @param index - Name of the index
* @param fieldName - Name of the TAG field to get values from
*/
TAGVALS: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, fieldName: import("@redis/client").RedisArgument) => void;
readonly transformReply: {
readonly 2: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>;
readonly 3: () => import("@redis/client/dist/lib/RESP/types").SetReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>;
};
};
/**
* Returns the distinct values in a TAG field.
* @param index - Name of the index
* @param fieldName - Name of the TAG field to get values from
*/
tagVals: {
readonly NOT_KEYED_COMMAND: true;
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client").CommandParser, index: import("@redis/client").RedisArgument, fieldName: import("@redis/client").RedisArgument) => void;
readonly transformReply: {
readonly 2: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>;
readonly 3: () => import("@redis/client/dist/lib/RESP/types").SetReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>;
};
};
};
export default _default;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/commands/index.ts"],"names":[],"mappings":";;IAqCE;;OAEG;;;;;;;;;;IAEH;;OAEG;;;;;;;;;;IAEH;;;;OAIG;;;;;;;IAEH;;;;OAIG;;;;;;;IAEH;;;;;;;;OAQG;;;;;;;;;IAEH;;;;;;;;OAQG;;;;;;;;;IAEH;;;;;;;;;;OAUG;;;;;;;;;;IAEH;;;;;;;;;;OAUG;;;;;;;;;;IAEH;;;;OAIG;;;;;;;IAEH;;;;OAIG;;;;;;;IAEH;;;OAGG;;;;;;;IAEH;;;OAGG;;;;;;;IAEH;;;;OAIG;;;;;;;IAEH;;;;OAIG;;;;;;;IAEH;;;OAGG;;;;;;;IAEH;;;OAGG;;;;;;;IAEH;;;;OAIG;;;;;;;IAEH;;;;OAIG;;;;;;;IAEH;;;;;;;;;;;;;;;OAeG;;;;;;;IAEH;;;;;;;;;;;;;;;OAeG;;;;;;;IAEH;;;;OAIG;;;;;;;IAEH;;;;OAIG;;;;;;;IAEH;;;;;;OAMG;;;;;;;;;;IAEH;;;;;;OAMG;;;;;;;;;;IAEH;;;;OAIG;;;;;;;IAEH;;;;OAIG;;;;;;;IAEH;;;;OAIG;;;;;;;IAEH;;;;OAIG;;;;;;;IAEH;;;OAGG;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;IAEH;;;;;OAKG;;;;;;;;;;IAEH;;;;;OAKG;;;;;;;;;;IAEH;;;;;;;OAOG;;;;;;;IAEH;;;;;;;OAOG;;;;;;;IAEH;;;;;;OAMG;;;;;;;IAEH;;;;;;OAMG;;;;;;;IAEH;;;;;;;;;;;;;;;OAeG;;;;;;;;;;IAEH;;;;;;;;;;;;;;;OAeG;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;IAEH;;;;;;;OAOG;;;;;;;;;;IAEH;;;;;;;OAOG;;;;;;;;;;IAEH;;;;;;;OAOG;;;;;;;;;;IAEH;;;;;;;OAOG;;;;;;;;;;IAEH;;;;;;;OAOG;;;;;;;;;;IAEH;;;;;;;OAOG;;;;;;;;;;IAEH;;;;;;;;;;;;;OAaG;;;;;;;;;;IAEH;;;;;;;;;;;;;OAaG;;;;;;;;;;IAEH;;;;;;;;OAQG;;;;;;;;;;;;;;;;;;;;;;IAEH;;;;;;;;OAQG;;;;;;;;;;;;;;;;;;;;;;IAEH;;;;;;;;OAQG;;;;;;IAEH;;;;;;;;OAQG;;;;;;IAEH;;;;OAIG;;;;;;IAEH;;;;OAIG;;;;;;IAEH;;;;;;;OAOG;;;;;;;;;IAEH;;;;;;;OAOG;;;;;;;;;IAEH;;;;;;;OAOG;;;;;;;;;;;;;;;;;IAEH;;;;;;;OAOG;;;;;;;;;;;;;;;;;IAEH;;;;;;;OAOG;;;;;;;;;;;;;;;IAEH;;;;;;;OAOG;;;;;;;;;;;;;;;IAEH;;;;;;;OAOG;;;;;;IAEH;;;;;;;OAOG;;;;;;IAEH;;;OAGG;;;;;;IAEH;;;OAGG;;;;;;IAEH;;;OAGG;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;IAEH;;;;;;;OAOG;;;;;;;IAEH;;;;;;;OAOG;;;;;;;IAEH;;;;OAIG;;;;;;;;;;IAEH;;;;OAIG;;;;;;;;;;;AArjBL,wBAujBE"}
@@ -0,0 +1,609 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const _LIST_1 = __importDefault(require("./_LIST"));
const ALTER_1 = __importDefault(require("./ALTER"));
const AGGREGATE_WITHCURSOR_1 = __importDefault(require("./AGGREGATE_WITHCURSOR"));
const AGGREGATE_1 = __importDefault(require("./AGGREGATE"));
const ALIASADD_1 = __importDefault(require("./ALIASADD"));
const ALIASDEL_1 = __importDefault(require("./ALIASDEL"));
const ALIASUPDATE_1 = __importDefault(require("./ALIASUPDATE"));
const CONFIG_GET_1 = __importDefault(require("./CONFIG_GET"));
const CONFIG_SET_1 = __importDefault(require("./CONFIG_SET"));
const CREATE_1 = __importDefault(require("./CREATE"));
const CURSOR_DEL_1 = __importDefault(require("./CURSOR_DEL"));
const CURSOR_READ_1 = __importDefault(require("./CURSOR_READ"));
const DICTADD_1 = __importDefault(require("./DICTADD"));
const DICTDEL_1 = __importDefault(require("./DICTDEL"));
const DICTDUMP_1 = __importDefault(require("./DICTDUMP"));
const DROPINDEX_1 = __importDefault(require("./DROPINDEX"));
const EXPLAIN_1 = __importDefault(require("./EXPLAIN"));
const EXPLAINCLI_1 = __importDefault(require("./EXPLAINCLI"));
const HYBRID_1 = __importDefault(require("./HYBRID"));
const INFO_1 = __importDefault(require("./INFO"));
const PROFILE_SEARCH_1 = __importDefault(require("./PROFILE_SEARCH"));
const PROFILE_AGGREGATE_1 = __importDefault(require("./PROFILE_AGGREGATE"));
const SEARCH_NOCONTENT_1 = __importDefault(require("./SEARCH_NOCONTENT"));
const SEARCH_1 = __importDefault(require("./SEARCH"));
const SPELLCHECK_1 = __importDefault(require("./SPELLCHECK"));
const SUGADD_1 = __importDefault(require("./SUGADD"));
const SUGDEL_1 = __importDefault(require("./SUGDEL"));
const SUGGET_WITHPAYLOADS_1 = __importDefault(require("./SUGGET_WITHPAYLOADS"));
const SUGGET_WITHSCORES_WITHPAYLOADS_1 = __importDefault(require("./SUGGET_WITHSCORES_WITHPAYLOADS"));
const SUGGET_WITHSCORES_1 = __importDefault(require("./SUGGET_WITHSCORES"));
const SUGGET_1 = __importDefault(require("./SUGGET"));
const SUGLEN_1 = __importDefault(require("./SUGLEN"));
const SYNDUMP_1 = __importDefault(require("./SYNDUMP"));
const SYNUPDATE_1 = __importDefault(require("./SYNUPDATE"));
const TAGVALS_1 = __importDefault(require("./TAGVALS"));
exports.default = {
/**
* Lists all existing indexes in the database.
*/
_LIST: _LIST_1.default,
/**
* Lists all existing indexes in the database.
*/
_list: _LIST_1.default,
/**
* Alters an existing RediSearch index schema by adding new fields.
* @param index - The index to alter
* @param schema - The schema definition containing new fields to add
*/
ALTER: ALTER_1.default,
/**
* Alters an existing RediSearch index schema by adding new fields.
* @param index - The index to alter
* @param schema - The schema definition containing new fields to add
*/
alter: ALTER_1.default,
/**
* Performs an aggregation with a cursor for retrieving large result sets.
* @param index - Name of the index to query
* @param query - The aggregation query
* @param options - Optional parameters:
* - All options supported by FT.AGGREGATE
* - COUNT: Number of results to return per cursor fetch
* - MAXIDLE: Maximum idle time for cursor in milliseconds
*/
AGGREGATE_WITHCURSOR: AGGREGATE_WITHCURSOR_1.default,
/**
* Performs an aggregation with a cursor for retrieving large result sets.
* @param index - Name of the index to query
* @param query - The aggregation query
* @param options - Optional parameters:
* - All options supported by FT.AGGREGATE
* - COUNT: Number of results to return per cursor fetch
* - MAXIDLE: Maximum idle time for cursor in milliseconds
*/
aggregateWithCursor: AGGREGATE_WITHCURSOR_1.default,
/**
* Performs an aggregation query on a RediSearch index.
* @param index - The index name to query
* @param query - The text query to use as filter, use * to indicate no filtering
* @param options - Optional parameters for aggregation:
* - VERBATIM: disable stemming in query evaluation
* - LOAD: specify fields to load from documents
* - STEPS: sequence of aggregation steps (GROUPBY, SORTBY, APPLY, LIMIT, FILTER)
* - PARAMS: bind parameters for query evaluation
* - TIMEOUT: maximum time to run the query
*/
AGGREGATE: AGGREGATE_1.default,
/**
* Performs an aggregation query on a RediSearch index.
* @param index - The index name to query
* @param query - The text query to use as filter, use * to indicate no filtering
* @param options - Optional parameters for aggregation:
* - VERBATIM: disable stemming in query evaluation
* - LOAD: specify fields to load from documents
* - STEPS: sequence of aggregation steps (GROUPBY, SORTBY, APPLY, LIMIT, FILTER)
* - PARAMS: bind parameters for query evaluation
* - TIMEOUT: maximum time to run the query
*/
aggregate: AGGREGATE_1.default,
/**
* Adds an alias to a RediSearch index.
* @param alias - The alias to add
* @param index - The index name to alias
*/
ALIASADD: ALIASADD_1.default,
/**
* Adds an alias to a RediSearch index.
* @param alias - The alias to add
* @param index - The index name to alias
*/
aliasAdd: ALIASADD_1.default,
/**
* Removes an existing alias from a RediSearch index.
* @param alias - The alias to remove
*/
ALIASDEL: ALIASDEL_1.default,
/**
* Removes an existing alias from a RediSearch index.
* @param alias - The alias to remove
*/
aliasDel: ALIASDEL_1.default,
/**
* Updates the index pointed to by an existing alias.
* @param alias - The existing alias to update
* @param index - The new index name that the alias should point to
*/
ALIASUPDATE: ALIASUPDATE_1.default,
/**
* Updates the index pointed to by an existing alias.
* @param alias - The existing alias to update
* @param index - The new index name that the alias should point to
*/
aliasUpdate: ALIASUPDATE_1.default,
/**
* Gets a RediSearch configuration option value.
* @param option - The name of the configuration option to retrieve
*/
CONFIG_GET: CONFIG_GET_1.default,
/**
* Gets a RediSearch configuration option value.
* @param option - The name of the configuration option to retrieve
*/
configGet: CONFIG_GET_1.default,
/**
* Sets a RediSearch configuration option value.
* @param property - The name of the configuration option to set
* @param value - The value to set for the configuration option
*/
CONFIG_SET: CONFIG_SET_1.default,
/**
* Sets a RediSearch configuration option value.
* @param property - The name of the configuration option to set
* @param value - The value to set for the configuration option
*/
configSet: CONFIG_SET_1.default,
/**
* Creates a new search index with the given schema and options.
* @param index - Name of the index to create
* @param schema - Index schema defining field names and types (TEXT, NUMERIC, GEO, TAG, VECTOR, GEOSHAPE).
* Each field can be a single definition or an array to index the same field multiple times with different configurations.
* @param options - Optional parameters:
* - ON: Type of container to index (HASH or JSON)
* - PREFIX: Prefixes for document keys to index
* - FILTER: Expression that filters indexed documents
* - LANGUAGE/LANGUAGE_FIELD: Default language for indexing
* - SCORE/SCORE_FIELD: Document ranking parameters
* - MAXTEXTFIELDS: Index all text fields without specifying them
* - TEMPORARY: Create a temporary index
* - NOOFFSETS/NOHL/NOFIELDS/NOFREQS: Index optimization flags
* - STOPWORDS: Custom stopword list
*/
CREATE: CREATE_1.default,
/**
* Creates a new search index with the given schema and options.
* @param index - Name of the index to create
* @param schema - Index schema defining field names and types (TEXT, NUMERIC, GEO, TAG, VECTOR, GEOSHAPE).
* Each field can be a single definition or an array to index the same field multiple times with different configurations.
* @param options - Optional parameters:
* - ON: Type of container to index (HASH or JSON)
* - PREFIX: Prefixes for document keys to index
* - FILTER: Expression that filters indexed documents
* - LANGUAGE/LANGUAGE_FIELD: Default language for indexing
* - SCORE/SCORE_FIELD: Document ranking parameters
* - MAXTEXTFIELDS: Index all text fields without specifying them
* - TEMPORARY: Create a temporary index
* - NOOFFSETS/NOHL/NOFIELDS/NOFREQS: Index optimization flags
* - STOPWORDS: Custom stopword list
*/
create: CREATE_1.default,
/**
* Deletes a cursor from an index.
* @param index - The index name that contains the cursor
* @param cursorId - The cursor ID to delete
*/
CURSOR_DEL: CURSOR_DEL_1.default,
/**
* Deletes a cursor from an index.
* @param index - The index name that contains the cursor
* @param cursorId - The cursor ID to delete
*/
cursorDel: CURSOR_DEL_1.default,
/**
* Reads from an existing cursor to get more results from an index.
* @param index - The index name that contains the cursor
* @param cursor - The cursor ID to read from
* @param options - Optional parameters:
* - COUNT: Maximum number of results to return
*/
CURSOR_READ: CURSOR_READ_1.default,
/**
* Reads from an existing cursor to get more results from an index.
* @param index - The index name that contains the cursor
* @param cursor - The cursor ID to read from
* @param options - Optional parameters:
* - COUNT: Maximum number of results to return
*/
cursorRead: CURSOR_READ_1.default,
/**
* Adds terms to a dictionary.
* @param dictionary - Name of the dictionary to add terms to
* @param term - One or more terms to add to the dictionary
*/
DICTADD: DICTADD_1.default,
/**
* Adds terms to a dictionary.
* @param dictionary - Name of the dictionary to add terms to
* @param term - One or more terms to add to the dictionary
*/
dictAdd: DICTADD_1.default,
/**
* Deletes terms from a dictionary.
* @param dictionary - Name of the dictionary to remove terms from
* @param term - One or more terms to delete from the dictionary
*/
DICTDEL: DICTDEL_1.default,
/**
* Deletes terms from a dictionary.
* @param dictionary - Name of the dictionary to remove terms from
* @param term - One or more terms to delete from the dictionary
*/
dictDel: DICTDEL_1.default,
/**
* Returns all terms in a dictionary.
* @param dictionary - Name of the dictionary to dump
*/
DICTDUMP: DICTDUMP_1.default,
/**
* Returns all terms in a dictionary.
* @param dictionary - Name of the dictionary to dump
*/
dictDump: DICTDUMP_1.default,
/**
* Deletes an index and all associated documents.
* @param index - Name of the index to delete
* @param options - Optional parameters:
* - DD: Also delete the indexed documents themselves
*/
DROPINDEX: DROPINDEX_1.default,
/**
* Deletes an index and all associated documents.
* @param index - Name of the index to delete
* @param options - Optional parameters:
* - DD: Also delete the indexed documents themselves
*/
dropIndex: DROPINDEX_1.default,
/**
* Returns the execution plan for a complex query.
* @param index - Name of the index to explain query against
* @param query - The query string to explain
* @param options - Optional parameters:
* - PARAMS: Named parameters to use in the query
* - DIALECT: Version of query dialect to use (defaults to 1)
*/
EXPLAIN: EXPLAIN_1.default,
/**
* Returns the execution plan for a complex query.
* @param index - Name of the index to explain query against
* @param query - The query string to explain
* @param options - Optional parameters:
* - PARAMS: Named parameters to use in the query
* - DIALECT: Version of query dialect to use (defaults to 1)
*/
explain: EXPLAIN_1.default,
/**
* Returns the execution plan for a complex query in a more verbose format than FT.EXPLAIN.
* @param index - Name of the index to explain query against
* @param query - The query string to explain
* @param options - Optional parameters:
* - DIALECT: Version of query dialect to use (defaults to 1)
*/
EXPLAINCLI: EXPLAINCLI_1.default,
/**
* Returns the execution plan for a complex query in a more verbose format than FT.EXPLAIN.
* @param index - Name of the index to explain query against
* @param query - The query string to explain
* @param options - Optional parameters:
* - DIALECT: Version of query dialect to use (defaults to 1)
*/
explainCli: EXPLAINCLI_1.default,
/**
* Performs a hybrid search combining multiple search expressions.
* Supports multiple SEARCH and VECTOR expressions with various fusion methods.
*
* @experimental
* NOTE: FT.Hybrid is still in experimental state
* It's behaviour and function signature may change
*
* @param index - The index name to search
* @param options - Hybrid search options including:
* - SEARCH: Text search expression with optional scoring
* - VSIM: Vector similarity expression with KNN/RANGE methods
* - COMBINE: Fusion method (RRF, LINEAR)
* - Post-processing operations: LOAD, GROUPBY, APPLY, SORTBY, FILTER
* - Tunable options: LIMIT, PARAMS, TIMEOUT
*/
HYBRID: HYBRID_1.default,
/**
* Performs a hybrid search combining multiple search expressions.
* Supports multiple SEARCH and VECTOR expressions with various fusion methods.
*
* @experimental
* NOTE: FT.Hybrid is still in experimental state
* It's behaviour and function signature may change
*
* @param index - The index name to search
* @param options - Hybrid search options including:
* - SEARCH: Text search expression with optional scoring
* - VSIM: Vector similarity expression with KNN/RANGE methods
* - COMBINE: Fusion method (RRF, LINEAR)
* - Post-processing operations: LOAD, GROUPBY, APPLY, SORTBY, FILTER
* - Tunable options: LIMIT, PARAMS, TIMEOUT
*/
hybrid: HYBRID_1.default,
/**
* Returns information and statistics about an index.
* @param index - Name of the index to get information about
*/
INFO: INFO_1.default,
/**
* Returns information and statistics about an index.
* @param index - Name of the index to get information about
*/
info: INFO_1.default,
/**
* Profiles the execution of a search query for performance analysis.
* @param index - Name of the index to profile query against
* @param query - The search query to profile
* @param options - Optional parameters:
* - LIMITED: Collect limited timing information only
* - All options supported by FT.SEARCH command
*/
PROFILESEARCH: PROFILE_SEARCH_1.default,
/**
* Profiles the execution of a search query for performance analysis.
* @param index - Name of the index to profile query against
* @param query - The search query to profile
* @param options - Optional parameters:
* - LIMITED: Collect limited timing information only
* - All options supported by FT.SEARCH command
*/
profileSearch: PROFILE_SEARCH_1.default,
/**
* Profiles the execution of an aggregation query for performance analysis.
* @param index - Name of the index to profile query against
* @param query - The aggregation query to profile
* @param options - Optional parameters:
* - LIMITED: Collect limited timing information only
* - All options supported by FT.AGGREGATE command
*/
PROFILEAGGREGATE: PROFILE_AGGREGATE_1.default,
/**
* Profiles the execution of an aggregation query for performance analysis.
* @param index - Name of the index to profile query against
* @param query - The aggregation query to profile
* @param options - Optional parameters:
* - LIMITED: Collect limited timing information only
* - All options supported by FT.AGGREGATE command
*/
profileAggregate: PROFILE_AGGREGATE_1.default,
/**
* Performs a search query but returns only document ids without their contents.
* @param args - Same parameters as FT.SEARCH:
* - parser: The command parser
* - index: Name of the index to search
* - query: The text query to search
* - options: Optional search parameters
*/
SEARCH_NOCONTENT: SEARCH_NOCONTENT_1.default,
/**
* Performs a search query but returns only document ids without their contents.
* @param args - Same parameters as FT.SEARCH:
* - parser: The command parser
* - index: Name of the index to search
* - query: The text query to search
* - options: Optional search parameters
*/
searchNoContent: SEARCH_NOCONTENT_1.default,
/**
* Searches a RediSearch index with the given query.
* @param index - The index name to search
* @param query - The text query to search. For syntax, see https://redis.io/docs/stack/search/reference/query_syntax
* @param options - Optional search parameters including:
* - VERBATIM: do not try to use stemming for query expansion
* - NOSTOPWORDS: do not filter stopwords from the query
* - INKEYS/INFIELDS: restrict the search to specific keys/fields
* - RETURN: limit which fields are returned
* - SUMMARIZE/HIGHLIGHT: create search result highlights
* - LIMIT: pagination control
* - SORTBY: sort results by a specific field
* - PARAMS: bind parameters to the query
*/
SEARCH: SEARCH_1.default,
/**
* Searches a RediSearch index with the given query.
* @param index - The index name to search
* @param query - The text query to search. For syntax, see https://redis.io/docs/stack/search/reference/query_syntax
* @param options - Optional search parameters including:
* - VERBATIM: do not try to use stemming for query expansion
* - NOSTOPWORDS: do not filter stopwords from the query
* - INKEYS/INFIELDS: restrict the search to specific keys/fields
* - RETURN: limit which fields are returned
* - SUMMARIZE/HIGHLIGHT: create search result highlights
* - LIMIT: pagination control
* - SORTBY: sort results by a specific field
* - PARAMS: bind parameters to the query
*/
search: SEARCH_1.default,
/**
* Performs spelling correction on a search query.
* @param index - Name of the index to use for spelling corrections
* @param query - The search query to check for spelling
* @param options - Optional parameters:
* - DISTANCE: Maximum Levenshtein distance for spelling suggestions
* - TERMS: Custom dictionary terms to include/exclude
* - DIALECT: Version of query dialect to use (defaults to 1)
*/
SPELLCHECK: SPELLCHECK_1.default,
/**
* Performs spelling correction on a search query.
* @param index - Name of the index to use for spelling corrections
* @param query - The search query to check for spelling
* @param options - Optional parameters:
* - DISTANCE: Maximum Levenshtein distance for spelling suggestions
* - TERMS: Custom dictionary terms to include/exclude
* - DIALECT: Version of query dialect to use (defaults to 1)
*/
spellCheck: SPELLCHECK_1.default,
/**
* Adds a suggestion string to an auto-complete suggestion dictionary.
* @param key - The suggestion dictionary key
* @param string - The suggestion string to add
* @param score - The suggestion score used for sorting
* @param options - Optional parameters:
* - INCR: If true, increment the existing entry's score
* - PAYLOAD: Optional payload to associate with the suggestion
*/
SUGADD: SUGADD_1.default,
/**
* Adds a suggestion string to an auto-complete suggestion dictionary.
* @param key - The suggestion dictionary key
* @param string - The suggestion string to add
* @param score - The suggestion score used for sorting
* @param options - Optional parameters:
* - INCR: If true, increment the existing entry's score
* - PAYLOAD: Optional payload to associate with the suggestion
*/
sugAdd: SUGADD_1.default,
/**
* Deletes a string from a suggestion dictionary.
* @param key - The suggestion dictionary key
* @param string - The suggestion string to delete
*/
SUGDEL: SUGDEL_1.default,
/**
* Deletes a string from a suggestion dictionary.
* @param key - The suggestion dictionary key
* @param string - The suggestion string to delete
*/
sugDel: SUGDEL_1.default,
/**
* Gets completion suggestions with their payloads from a suggestion dictionary.
* @param args - Same parameters as FT.SUGGET:
* - parser: The command parser
* - key: The suggestion dictionary key
* - prefix: The prefix to get completion suggestions for
* - options: Optional parameters for fuzzy matching and max results
*/
SUGGET_WITHPAYLOADS: SUGGET_WITHPAYLOADS_1.default,
/**
* Gets completion suggestions with their payloads from a suggestion dictionary.
* @param args - Same parameters as FT.SUGGET:
* - parser: The command parser
* - key: The suggestion dictionary key
* - prefix: The prefix to get completion suggestions for
* - options: Optional parameters for fuzzy matching and max results
*/
sugGetWithPayloads: SUGGET_WITHPAYLOADS_1.default,
/**
* Gets completion suggestions with their scores and payloads from a suggestion dictionary.
* @param args - Same parameters as FT.SUGGET:
* - parser: The command parser
* - key: The suggestion dictionary key
* - prefix: The prefix to get completion suggestions for
* - options: Optional parameters for fuzzy matching and max results
*/
SUGGET_WITHSCORES_WITHPAYLOADS: SUGGET_WITHSCORES_WITHPAYLOADS_1.default,
/**
* Gets completion suggestions with their scores and payloads from a suggestion dictionary.
* @param args - Same parameters as FT.SUGGET:
* - parser: The command parser
* - key: The suggestion dictionary key
* - prefix: The prefix to get completion suggestions for
* - options: Optional parameters for fuzzy matching and max results
*/
sugGetWithScoresWithPayloads: SUGGET_WITHSCORES_WITHPAYLOADS_1.default,
/**
* Gets completion suggestions with their scores from a suggestion dictionary.
* @param args - Same parameters as FT.SUGGET:
* - parser: The command parser
* - key: The suggestion dictionary key
* - prefix: The prefix to get completion suggestions for
* - options: Optional parameters for fuzzy matching and max results
*/
SUGGET_WITHSCORES: SUGGET_WITHSCORES_1.default,
/**
* Gets completion suggestions with their scores from a suggestion dictionary.
* @param args - Same parameters as FT.SUGGET:
* - parser: The command parser
* - key: The suggestion dictionary key
* - prefix: The prefix to get completion suggestions for
* - options: Optional parameters for fuzzy matching and max results
*/
sugGetWithScores: SUGGET_WITHSCORES_1.default,
/**
* Gets completion suggestions for a prefix from a suggestion dictionary.
* @param key - The suggestion dictionary key
* @param prefix - The prefix to get completion suggestions for
* @param options - Optional parameters:
* - FUZZY: Enable fuzzy prefix matching
* - MAX: Maximum number of results to return
*/
SUGGET: SUGGET_1.default,
/**
* Gets completion suggestions for a prefix from a suggestion dictionary.
* @param key - The suggestion dictionary key
* @param prefix - The prefix to get completion suggestions for
* @param options - Optional parameters:
* - FUZZY: Enable fuzzy prefix matching
* - MAX: Maximum number of results to return
*/
sugGet: SUGGET_1.default,
/**
* Gets the size of a suggestion dictionary.
* @param key - The suggestion dictionary key
*/
SUGLEN: SUGLEN_1.default,
/**
* Gets the size of a suggestion dictionary.
* @param key - The suggestion dictionary key
*/
sugLen: SUGLEN_1.default,
/**
* Dumps the contents of a synonym group.
* @param index - Name of the index that contains the synonym group
*/
SYNDUMP: SYNDUMP_1.default,
/**
* Dumps the contents of a synonym group.
* @param index - Name of the index that contains the synonym group
*/
synDump: SYNDUMP_1.default,
/**
* Updates a synonym group with new terms.
* @param index - Name of the index that contains the synonym group
* @param groupId - ID of the synonym group to update
* @param terms - One or more synonym terms to add to the group
* @param options - Optional parameters:
* - SKIPINITIALSCAN: Skip the initial scan for existing documents
*/
SYNUPDATE: SYNUPDATE_1.default,
/**
* Updates a synonym group with new terms.
* @param index - Name of the index that contains the synonym group
* @param groupId - ID of the synonym group to update
* @param terms - One or more synonym terms to add to the group
* @param options - Optional parameters:
* - SKIPINITIALSCAN: Skip the initial scan for existing documents
*/
synUpdate: SYNUPDATE_1.default,
/**
* Returns the distinct values in a TAG field.
* @param index - Name of the index
* @param fieldName - Name of the TAG field to get values from
*/
TAGVALS: TAGVALS_1.default,
/**
* Returns the distinct values in a TAG field.
* @param index - Name of the index
* @param fieldName - Name of the TAG field to get values from
*/
tagVals: TAGVALS_1.default
};
//# sourceMappingURL=index.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,11 @@
import { isPlainObject, mapLikeEntries, mapLikeValues, mapLikeToObject, mapLikeToFlatArray, getMapValue } from '@redis/client/dist/lib/commands/reply-utils';
export { isPlainObject, mapLikeEntries, mapLikeValues, mapLikeToObject, mapLikeToFlatArray, getMapValue };
export declare function toCompatObject(value: Record<string, unknown>): Record<string, unknown>;
export declare function parseDocumentValue(value: unknown): Record<string, unknown>;
export declare function normalizeProfileReply(profile: unknown): unknown;
export declare function parseSearchResultRow(rawRow: unknown): {
id: unknown;
value: Record<string, unknown>;
};
export declare function parseAggregateResultRow(rawRow: unknown): Record<string, unknown>;
//# sourceMappingURL=reply-transformers.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"reply-transformers.d.ts","sourceRoot":"","sources":["../../../lib/commands/reply-transformers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,cAAc,EACd,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,WAAW,EACZ,MAAM,6CAA6C,CAAC;AAErD,OAAO,EACL,aAAa,EACb,cAAc,EACd,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,WAAW,EACZ,CAAC;AAEF,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAatF;AAkBD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAQ1E;AAkBD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAE/D;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG;IACrD,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC,CAWA;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAuBhF"}
@@ -0,0 +1,94 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseAggregateResultRow = exports.parseSearchResultRow = exports.normalizeProfileReply = exports.parseDocumentValue = exports.toCompatObject = exports.getMapValue = exports.mapLikeToFlatArray = exports.mapLikeToObject = exports.mapLikeValues = exports.mapLikeEntries = exports.isPlainObject = void 0;
const reply_utils_1 = require("@redis/client/dist/lib/commands/reply-utils");
Object.defineProperty(exports, "isPlainObject", { enumerable: true, get: function () { return reply_utils_1.isPlainObject; } });
Object.defineProperty(exports, "mapLikeEntries", { enumerable: true, get: function () { return reply_utils_1.mapLikeEntries; } });
Object.defineProperty(exports, "mapLikeValues", { enumerable: true, get: function () { return reply_utils_1.mapLikeValues; } });
Object.defineProperty(exports, "mapLikeToObject", { enumerable: true, get: function () { return reply_utils_1.mapLikeToObject; } });
Object.defineProperty(exports, "mapLikeToFlatArray", { enumerable: true, get: function () { return reply_utils_1.mapLikeToFlatArray; } });
Object.defineProperty(exports, "getMapValue", { enumerable: true, get: function () { return reply_utils_1.getMapValue; } });
function toCompatObject(value) {
const descriptors = {};
for (const [key, entryValue] of Object.entries(value)) {
descriptors[key] = {
value: entryValue,
configurable: true,
enumerable: true,
writable: true
};
}
return Object.defineProperties({}, descriptors);
}
exports.toCompatObject = toCompatObject;
function assignDocumentField(target, key, value) {
if (key === '$') {
const json = value?.toString?.() ?? value;
if (typeof json === 'string') {
try {
Object.assign(target, JSON.parse(json));
return;
}
catch {
// Fallback to setting the raw value below.
}
}
}
target[key] = value;
}
function parseDocumentValue(value) {
const document = {};
for (const [key, entryValue] of (0, reply_utils_1.mapLikeEntries)(value)) {
assignDocumentField(document, key, entryValue);
}
return document;
}
exports.parseDocumentValue = parseDocumentValue;
function normalizeProfileValue(value) {
if (Array.isArray(value)) {
return value.map(normalizeProfileValue);
}
if (value instanceof Map || (0, reply_utils_1.isPlainObject)(value)) {
const normalized = [];
for (const [key, entryValue] of (0, reply_utils_1.mapLikeEntries)(value)) {
normalized.push(key, normalizeProfileValue(entryValue));
}
return normalized;
}
return value;
}
function normalizeProfileReply(profile) {
return normalizeProfileValue(profile);
}
exports.normalizeProfileReply = normalizeProfileReply;
function parseSearchResultRow(rawRow) {
const row = (0, reply_utils_1.mapLikeToObject)(rawRow);
const value = {};
Object.assign(value, parseDocumentValue((0, reply_utils_1.getMapValue)(row, ['values'])));
Object.assign(value, parseDocumentValue((0, reply_utils_1.getMapValue)(row, ['extra_attributes', 'extraAttributes'])));
return {
id: (0, reply_utils_1.getMapValue)(row, ['id', 'doc_id']),
value: toCompatObject(value)
};
}
exports.parseSearchResultRow = parseSearchResultRow;
function parseAggregateResultRow(rawRow) {
const row = (0, reply_utils_1.mapLikeToObject)(rawRow);
const result = {};
Object.assign(result, parseDocumentValue((0, reply_utils_1.getMapValue)(row, ['values'])));
Object.assign(result, parseDocumentValue((0, reply_utils_1.getMapValue)(row, ['extra_attributes', 'extraAttributes'])));
for (const [key, value] of Object.entries(row)) {
if (key === 'id' ||
key === 'values' ||
key.toLowerCase() === 'extra_attributes' ||
key === 'extraAttributes') {
continue;
}
if (!Object.hasOwn(result, key)) {
result[key] = value;
}
}
return toCompatObject(result);
}
exports.parseAggregateResultRow = parseAggregateResultRow;
//# sourceMappingURL=reply-transformers.js.map
File diff suppressed because one or more lines are too long
@@ -0,0 +1,2 @@
export declare const DEFAULT_DIALECT = "2";
//# sourceMappingURL=default.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../lib/dialect/default.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,MAAM,CAAC"}
@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DEFAULT_DIALECT = void 0;
exports.DEFAULT_DIALECT = '2';
//# sourceMappingURL=default.js.map
@@ -0,0 +1 @@
{"version":3,"file":"default.js","sourceRoot":"","sources":["../../../lib/dialect/default.ts"],"names":[],"mappings":";;;AAAa,QAAA,eAAe,GAAG,GAAG,CAAC","sourcesContent":["export const DEFAULT_DIALECT = '2';\n"]}
+7
View File
@@ -0,0 +1,7 @@
export { default } from './commands';
export { SearchReply } from './commands/SEARCH';
export { RediSearchSchema } from './commands/CREATE';
export { REDISEARCH_LANGUAGE, RediSearchLanguage, SCHEMA_FIELD_TYPE, SchemaFieldType, SCHEMA_TEXT_FIELD_PHONETIC, SchemaTextFieldPhonetic, SCHEMA_VECTOR_FIELD_ALGORITHM, SchemaVectorFieldAlgorithm } from './commands/CREATE';
export { FT_AGGREGATE_GROUP_BY_REDUCERS, FtAggregateGroupByReducer, FT_AGGREGATE_STEPS, FtAggregateStep } from './commands/AGGREGATE';
export { FtSearchOptions } from './commands/SEARCH';
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,EACH,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,0BAA0B,EAC1B,uBAAuB,EACvB,6BAA6B,EAC7B,0BAA0B,EAC7B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACH,8BAA8B,EAC9B,yBAAyB,EACzB,kBAAkB,EAClB,eAAe,EAClB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA"}
+17
View File
@@ -0,0 +1,17 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.FT_AGGREGATE_STEPS = exports.FT_AGGREGATE_GROUP_BY_REDUCERS = exports.SCHEMA_VECTOR_FIELD_ALGORITHM = exports.SCHEMA_TEXT_FIELD_PHONETIC = exports.SCHEMA_FIELD_TYPE = exports.REDISEARCH_LANGUAGE = exports.default = void 0;
var commands_1 = require("./commands");
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(commands_1).default; } });
var CREATE_1 = require("./commands/CREATE");
Object.defineProperty(exports, "REDISEARCH_LANGUAGE", { enumerable: true, get: function () { return CREATE_1.REDISEARCH_LANGUAGE; } });
Object.defineProperty(exports, "SCHEMA_FIELD_TYPE", { enumerable: true, get: function () { return CREATE_1.SCHEMA_FIELD_TYPE; } });
Object.defineProperty(exports, "SCHEMA_TEXT_FIELD_PHONETIC", { enumerable: true, get: function () { return CREATE_1.SCHEMA_TEXT_FIELD_PHONETIC; } });
Object.defineProperty(exports, "SCHEMA_VECTOR_FIELD_ALGORITHM", { enumerable: true, get: function () { return CREATE_1.SCHEMA_VECTOR_FIELD_ALGORITHM; } });
var AGGREGATE_1 = require("./commands/AGGREGATE");
Object.defineProperty(exports, "FT_AGGREGATE_GROUP_BY_REDUCERS", { enumerable: true, get: function () { return AGGREGATE_1.FT_AGGREGATE_GROUP_BY_REDUCERS; } });
Object.defineProperty(exports, "FT_AGGREGATE_STEPS", { enumerable: true, get: function () { return AGGREGATE_1.FT_AGGREGATE_STEPS; } });
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAoC;AAA3B,oHAAA,OAAO,OAAA;AAIhB,4CAS0B;AARtB,6GAAA,mBAAmB,OAAA;AAEnB,2GAAA,iBAAiB,OAAA;AAEjB,oHAAA,0BAA0B,OAAA;AAE1B,uHAAA,6BAA6B,OAAA;AAGjC,kDAK6B;AAJzB,2HAAA,8BAA8B,OAAA;AAE9B,+GAAA,kBAAkB,OAAA","sourcesContent":["export { default } from './commands'\n\nexport { SearchReply } from './commands/SEARCH'\nexport { RediSearchSchema } from './commands/CREATE'\nexport {\n REDISEARCH_LANGUAGE,\n RediSearchLanguage,\n SCHEMA_FIELD_TYPE,\n SchemaFieldType,\n SCHEMA_TEXT_FIELD_PHONETIC,\n SchemaTextFieldPhonetic,\n SCHEMA_VECTOR_FIELD_ALGORITHM,\n SchemaVectorFieldAlgorithm\n} from './commands/CREATE'\nexport {\n FT_AGGREGATE_GROUP_BY_REDUCERS,\n FtAggregateGroupByReducer,\n FT_AGGREGATE_STEPS,\n FtAggregateStep\n} from './commands/AGGREGATE'\nexport { FtSearchOptions } from './commands/SEARCH'\n"]}