@redis/search 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -99,6 +99,7 @@ export interface AggregateOptions {
99
99
  STEPS?: Array<GroupByStep | SortStep | ApplyStep | LimitStep | FilterStep>;
100
100
  PARAMS?: Params;
101
101
  DIALECT?: number;
102
+ TIMEOUT?: number;
102
103
  }
103
104
  export declare const FIRST_KEY_INDEX = 1;
104
105
  export declare const IS_READ_ONLY = true;
@@ -92,6 +92,9 @@ function pushAggregatehOptions(args, options) {
92
92
  if (options?.DIALECT) {
93
93
  args.push('DIALECT', options.DIALECT.toString());
94
94
  }
95
+ if (options?.TIMEOUT !== undefined) {
96
+ args.push('TIMEOUT', options.TIMEOUT.toString());
97
+ }
95
98
  return args;
96
99
  }
97
100
  exports.pushAggregatehOptions = pushAggregatehOptions;
@@ -1,5 +1,8 @@
1
1
  import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands';
2
2
  export declare const FIRST_KEY_INDEX = 1;
3
3
  export declare const IS_READ_ONLY = true;
4
- export declare function transformArguments(index: RedisCommandArgument, cursor: number): RedisCommandArguments;
4
+ interface CursorReadOptions {
5
+ COUNT?: number;
6
+ }
7
+ export declare function transformArguments(index: RedisCommandArgument, cursor: number, options?: CursorReadOptions): RedisCommandArguments;
5
8
  export { transformReply } from './AGGREGATE_WITHCURSOR';
@@ -3,13 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0;
4
4
  exports.FIRST_KEY_INDEX = 1;
5
5
  exports.IS_READ_ONLY = true;
6
- function transformArguments(index, cursor) {
7
- return [
6
+ function transformArguments(index, cursor, options) {
7
+ const args = [
8
8
  'FT.CURSOR',
9
9
  'READ',
10
10
  index,
11
11
  cursor.toString()
12
12
  ];
13
+ if (options?.COUNT) {
14
+ args.push('COUNT', options.COUNT.toString());
15
+ }
16
+ return args;
13
17
  }
14
18
  exports.transformArguments = transformArguments;
15
19
  var AGGREGATE_WITHCURSOR_1 = require("./AGGREGATE_WITHCURSOR");
@@ -34,6 +34,7 @@ export interface SearchOptions {
34
34
  };
35
35
  PARAMS?: Params;
36
36
  DIALECT?: number;
37
+ TIMEOUT?: number;
37
38
  }
38
39
  export declare function transformArguments(index: string, query: string, options?: SearchOptions): RedisCommandArguments;
39
40
  export type SearchRawReply = Array<any>;
@@ -362,6 +362,9 @@ function pushSearchOptions(args, options) {
362
362
  if (options?.RETURN?.length === 0) {
363
363
  args.preserve = true;
364
364
  }
365
+ if (options?.TIMEOUT !== undefined) {
366
+ args.push('TIMEOUT', options.TIMEOUT.toString());
367
+ }
365
368
  return args;
366
369
  }
367
370
  exports.pushSearchOptions = pushSearchOptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redis/search",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -18,12 +18,24 @@
18
18
  "devDependencies": {
19
19
  "@istanbuljs/nyc-config-typescript": "^1.0.2",
20
20
  "@redis/test-utils": "*",
21
- "@types/node": "^18.14.1",
21
+ "@types/node": "^20.2.3",
22
22
  "nyc": "^15.1.0",
23
- "release-it": "^15.6.0",
23
+ "release-it": "^15.10.3",
24
24
  "source-map-support": "^0.5.21",
25
25
  "ts-node": "^10.9.1",
26
- "typedoc": "^0.23.25",
27
- "typescript": "^4.9.5"
28
- }
26
+ "typedoc": "^0.24.7",
27
+ "typescript": "^5.0.4"
28
+ },
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "git://github.com/redis/node-redis.git"
32
+ },
33
+ "bugs": {
34
+ "url": "https://github.com/redis/node-redis/issues"
35
+ },
36
+ "homepage": "https://github.com/redis/node-redis/tree/master/packages/search",
37
+ "keywords": [
38
+ "redis",
39
+ "RediSearch"
40
+ ]
29
41
  }