@redis/bloom 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ export declare const FIRST_KEY_INDEX = 1;
2
+ export declare const IS_READ_ONLY = true;
3
+ export declare function transformArguments(key: string): Array<string>;
4
+ export declare function transformReply(): number;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0;
4
+ exports.FIRST_KEY_INDEX = 1;
5
+ exports.IS_READ_ONLY = true;
6
+ function transformArguments(key) {
7
+ return ['BF.CARD', key];
8
+ }
9
+ exports.transformArguments = transformArguments;
@@ -1,7 +1,7 @@
1
1
  export declare const FIRST_KEY_INDEX = 1;
2
2
  export declare const IS_READ_ONLY = true;
3
3
  export declare function transformArguments(key: string): Array<string>;
4
- export declare type InfoRawReply = [
4
+ export type InfoRawReply = [
5
5
  _: string,
6
6
  capacity: number,
7
7
  _: string,
@@ -1,7 +1,7 @@
1
1
  export declare const FIRST_KEY_INDEX = 1;
2
2
  export declare const IS_READ_ONLY = true;
3
3
  export declare function transformArguments(key: string, iterator: number): Array<string>;
4
- declare type ScanDumpRawReply = [
4
+ type ScanDumpRawReply = [
5
5
  iterator: number,
6
6
  chunk: string
7
7
  ];
@@ -1,4 +1,5 @@
1
1
  import * as ADD from './ADD';
2
+ import * as CARD from './CARD';
2
3
  import * as EXISTS from './EXISTS';
3
4
  import * as INFO from './INFO';
4
5
  import * as INSERT from './INSERT';
@@ -10,6 +11,8 @@ import * as SCANDUMP from './SCANDUMP';
10
11
  declare const _default: {
11
12
  ADD: typeof ADD;
12
13
  add: typeof ADD;
14
+ CARD: typeof CARD;
15
+ card: typeof CARD;
13
16
  EXISTS: typeof EXISTS;
14
17
  exists: typeof EXISTS;
15
18
  INFO: typeof INFO;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const ADD = require("./ADD");
4
+ const CARD = require("./CARD");
4
5
  const EXISTS = require("./EXISTS");
5
6
  const INFO = require("./INFO");
6
7
  const INSERT = require("./INSERT");
@@ -12,6 +13,8 @@ const SCANDUMP = require("./SCANDUMP");
12
13
  exports.default = {
13
14
  ADD,
14
15
  add: ADD,
16
+ CARD,
17
+ card: CARD,
15
18
  EXISTS,
16
19
  exists: EXISTS,
17
20
  INFO,
@@ -1,7 +1,7 @@
1
1
  export declare const FIRST_KEY_INDEX = 1;
2
2
  export declare const IS_READ_ONLY = true;
3
3
  export declare function transformArguments(key: string): Array<string>;
4
- export declare type InfoRawReply = [
4
+ export type InfoRawReply = [
5
5
  _: string,
6
6
  width: number,
7
7
  _: string,
@@ -3,7 +3,7 @@ interface Sketch {
3
3
  name: string;
4
4
  weight: number;
5
5
  }
6
- declare type Sketches = Array<string> | Array<Sketch>;
6
+ type Sketches = Array<string> | Array<Sketch>;
7
7
  export declare function transformArguments(dest: string, src: Sketches): Array<string>;
8
8
  export declare function transformReply(): 'OK';
9
9
  export {};
@@ -1,7 +1,7 @@
1
1
  export declare const FIRST_KEY_INDEX = 1;
2
2
  export declare const IS_READ_ONLY = true;
3
3
  export declare function transformArguments(key: string): Array<string>;
4
- export declare type InfoRawReply = [
4
+ export type InfoRawReply = [
5
5
  _: string,
6
6
  size: number,
7
7
  _: string,
@@ -1,6 +1,6 @@
1
1
  export declare const FIRST_KEY_INDEX = 1;
2
2
  export declare function transformArguments(key: string, iterator: number): Array<string>;
3
- declare type ScanDumpRawReply = [
3
+ type ScanDumpRawReply = [
4
4
  iterator: number,
5
5
  chunk: string | null
6
6
  ];
@@ -2,6 +2,8 @@ declare const _default: {
2
2
  bf: {
3
3
  ADD: typeof import("./bloom/ADD");
4
4
  add: typeof import("./bloom/ADD");
5
+ CARD: typeof import("./bloom/CARD");
6
+ card: typeof import("./bloom/CARD");
5
7
  EXISTS: typeof import("./bloom/EXISTS");
6
8
  exists: typeof import("./bloom/EXISTS");
7
9
  INFO: typeof import("./bloom/INFO");
@@ -2,7 +2,7 @@ import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/
2
2
  export declare const FIRST_KEY_INDEX = 1;
3
3
  export declare const IS_READ_ONLY = true;
4
4
  export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments;
5
- declare type InfoRawReply = [
5
+ type InfoRawReply = [
6
6
  'Compression',
7
7
  number,
8
8
  'Capacity',
@@ -1,7 +1,7 @@
1
1
  export declare const FIRST_KEY_INDEX = 1;
2
2
  export declare const IS_READ_ONLY = true;
3
3
  export declare function transformArguments(key: string): Array<string>;
4
- export declare type InfoRawReply = [
4
+ export type InfoRawReply = [
5
5
  _: string,
6
6
  k: number,
7
7
  _: string,
@@ -1,8 +1,8 @@
1
1
  export declare const FIRST_KEY_INDEX = 1;
2
2
  export declare const IS_READ_ONLY = true;
3
3
  export declare function transformArguments(key: string): Array<string>;
4
- declare type ListWithCountRawReply = Array<string | number>;
5
- declare type ListWithCountReply = Array<{
4
+ type ListWithCountRawReply = Array<string | number>;
5
+ type ListWithCountReply = Array<{
6
6
  item: string;
7
7
  count: number;
8
8
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redis/bloom",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -18,12 +18,12 @@
18
18
  "devDependencies": {
19
19
  "@istanbuljs/nyc-config-typescript": "^1.0.2",
20
20
  "@redis/test-utils": "*",
21
- "@types/node": "^18.11.6",
21
+ "@types/node": "^18.11.18",
22
22
  "nyc": "^15.1.0",
23
- "release-it": "^15.5.0",
23
+ "release-it": "^15.6.0",
24
24
  "source-map-support": "^0.5.21",
25
25
  "ts-node": "^10.9.1",
26
- "typedoc": "^0.23.18",
27
- "typescript": "^4.8.4"
26
+ "typedoc": "^0.23.24",
27
+ "typescript": "^4.9.4"
28
28
  }
29
29
  }
@@ -1,8 +0,0 @@
1
- import { RedisCommandArgument, RedisCommandArguments } from '@redis/client/dist/lib/commands';
2
- export declare const FIRST_KEY_INDEX = 1;
3
- interface MergeStoreOptions {
4
- COMPRESSION?: number;
5
- }
6
- export declare function transformArguments(destKey: RedisCommandArgument, srcKeys: RedisCommandArgument | Array<RedisCommandArgument>, options?: MergeStoreOptions): RedisCommandArguments;
7
- export declare function transformReply(): 'OK';
8
- export {};
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.transformArguments = exports.FIRST_KEY_INDEX = void 0;
4
- const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
5
- exports.FIRST_KEY_INDEX = 1;
6
- function transformArguments(destKey, srcKeys, options) {
7
- let args = [
8
- 'TS.MERGESTORE',
9
- destKey,
10
- ];
11
- args = (0, generic_transformers_1.pushVerdictArgument)(args, srcKeys);
12
- if (options?.COMPRESSION) {
13
- args.push('COMPRESSION', options.COMPRESSION.toString());
14
- }
15
- return args;
16
- }
17
- exports.transformArguments = transformArguments;