@redis/bloom 1.1.0 → 2.0.0-next.1

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.
Files changed (224) hide show
  1. package/dist/lib/commands/bloom/ADD.d.ts +11 -0
  2. package/dist/lib/commands/bloom/ADD.js +9 -0
  3. package/dist/lib/commands/bloom/CARD.d.ts +8 -0
  4. package/dist/lib/commands/bloom/CARD.js +8 -0
  5. package/dist/lib/commands/bloom/EXISTS.d.ts +11 -0
  6. package/dist/lib/commands/bloom/EXISTS.js +9 -0
  7. package/dist/lib/commands/bloom/INFO.d.ts +8 -0
  8. package/dist/lib/commands/bloom/INFO.js +9 -0
  9. package/dist/lib/commands/bloom/INSERT.d.ts +19 -0
  10. package/dist/lib/commands/bloom/INSERT.js +27 -0
  11. package/dist/lib/commands/bloom/LOADCHUNK.d.ts +8 -0
  12. package/dist/lib/commands/bloom/LOADCHUNK.js +8 -0
  13. package/dist/lib/commands/bloom/MADD.d.ts +12 -0
  14. package/dist/lib/commands/bloom/MADD.js +10 -0
  15. package/dist/lib/commands/bloom/MEXISTS.d.ts +12 -0
  16. package/dist/lib/commands/bloom/MEXISTS.js +10 -0
  17. package/dist/lib/commands/bloom/RESERVE.d.ts +12 -0
  18. package/dist/lib/commands/bloom/RESERVE.js +15 -0
  19. package/dist/lib/commands/bloom/SCANDUMP.d.ts +11 -0
  20. package/dist/lib/commands/bloom/SCANDUMP.js +13 -0
  21. package/dist/lib/commands/bloom/index.d.ts +159 -0
  22. package/dist/lib/commands/bloom/index.js +32 -0
  23. package/dist/lib/commands/count-min-sketch/INCRBY.d.ts +12 -0
  24. package/dist/lib/commands/count-min-sketch/INCRBY.js +20 -0
  25. package/dist/lib/commands/count-min-sketch/INFO.d.ts +29 -0
  26. package/dist/lib/commands/count-min-sketch/INFO.js +15 -0
  27. package/dist/lib/commands/count-min-sketch/INITBYDIM.d.ts +8 -0
  28. package/dist/lib/commands/count-min-sketch/INITBYDIM.js +8 -0
  29. package/dist/lib/commands/count-min-sketch/INITBYPROB.d.ts +8 -0
  30. package/dist/lib/commands/count-min-sketch/INITBYPROB.js +8 -0
  31. package/dist/lib/commands/count-min-sketch/MERGE.d.ts +13 -0
  32. package/dist/lib/commands/count-min-sketch/MERGE.js +23 -0
  33. package/dist/lib/commands/count-min-sketch/QUERY.d.ts +9 -0
  34. package/dist/lib/commands/count-min-sketch/QUERY.js +9 -0
  35. package/dist/lib/commands/count-min-sketch/index.d.ts +89 -0
  36. package/dist/lib/commands/count-min-sketch/index.js +20 -0
  37. package/dist/lib/commands/cuckoo/ADD.d.ts +11 -0
  38. package/dist/lib/commands/cuckoo/ADD.js +9 -0
  39. package/dist/lib/commands/cuckoo/ADDNX.d.ts +11 -0
  40. package/dist/lib/commands/cuckoo/ADDNX.js +9 -0
  41. package/dist/lib/commands/cuckoo/COUNT.d.ts +8 -0
  42. package/dist/lib/commands/cuckoo/COUNT.js +8 -0
  43. package/dist/lib/commands/cuckoo/DEL.d.ts +11 -0
  44. package/dist/lib/commands/cuckoo/DEL.js +9 -0
  45. package/dist/lib/commands/cuckoo/EXISTS.d.ts +11 -0
  46. package/dist/lib/commands/cuckoo/EXISTS.js +9 -0
  47. package/dist/lib/commands/cuckoo/INFO.d.ts +8 -0
  48. package/dist/lib/commands/cuckoo/INFO.js +49 -0
  49. package/dist/lib/commands/cuckoo/INSERT.d.ts +17 -0
  50. package/dist/lib/commands/cuckoo/INSERT.js +18 -0
  51. package/dist/lib/commands/cuckoo/INSERTNX.d.ts +10 -0
  52. package/dist/lib/commands/cuckoo/INSERTNX.js +7 -0
  53. package/dist/lib/commands/cuckoo/LOADCHUNK.d.ts +8 -0
  54. package/dist/lib/commands/cuckoo/LOADCHUNK.js +8 -0
  55. package/dist/lib/commands/cuckoo/RESERVE.d.ts +13 -0
  56. package/dist/lib/commands/cuckoo/RESERVE.js +18 -0
  57. package/dist/lib/commands/cuckoo/SCANDUMP.d.ts +11 -0
  58. package/dist/lib/commands/cuckoo/SCANDUMP.js +13 -0
  59. package/dist/lib/commands/cuckoo/index.d.ts +177 -0
  60. package/dist/lib/commands/cuckoo/index.js +35 -0
  61. package/dist/lib/commands/index.d.ts +763 -0
  62. package/dist/lib/commands/index.js +12 -0
  63. package/dist/lib/commands/t-digest/ADD.d.ts +8 -0
  64. package/dist/lib/commands/t-digest/ADD.js +12 -0
  65. package/dist/lib/commands/t-digest/BYRANK.d.ts +12 -0
  66. package/dist/lib/commands/t-digest/BYRANK.js +14 -0
  67. package/dist/lib/commands/t-digest/BYREVRANK.d.ts +10 -0
  68. package/dist/lib/commands/t-digest/BYREVRANK.js +7 -0
  69. package/dist/lib/commands/t-digest/CDF.d.ts +11 -0
  70. package/dist/lib/commands/t-digest/CDF.js +13 -0
  71. package/dist/lib/commands/t-digest/CREATE.d.ts +11 -0
  72. package/dist/lib/commands/t-digest/CREATE.js +12 -0
  73. package/dist/lib/commands/t-digest/INFO.d.ts +8 -0
  74. package/dist/lib/commands/t-digest/INFO.js +45 -0
  75. package/dist/lib/commands/t-digest/MAX.d.ts +11 -0
  76. package/dist/lib/commands/t-digest/MAX.js +9 -0
  77. package/dist/lib/commands/t-digest/MERGE.d.ts +13 -0
  78. package/dist/lib/commands/t-digest/MERGE.js +16 -0
  79. package/dist/lib/commands/t-digest/MIN.d.ts +11 -0
  80. package/dist/lib/commands/t-digest/MIN.js +9 -0
  81. package/dist/lib/commands/t-digest/QUANTILE.d.ts +11 -0
  82. package/dist/lib/commands/t-digest/QUANTILE.js +13 -0
  83. package/dist/lib/commands/t-digest/RANK.d.ts +9 -0
  84. package/dist/lib/commands/t-digest/RANK.js +13 -0
  85. package/dist/lib/commands/t-digest/RESET.d.ts +8 -0
  86. package/dist/lib/commands/t-digest/RESET.js +8 -0
  87. package/dist/lib/commands/t-digest/REVRANK.d.ts +7 -0
  88. package/dist/lib/commands/t-digest/REVRANK.js +7 -0
  89. package/dist/lib/commands/t-digest/TRIMMED_MEAN.d.ts +11 -0
  90. package/dist/lib/commands/t-digest/TRIMMED_MEAN.js +14 -0
  91. package/dist/lib/commands/t-digest/index.d.ts +213 -0
  92. package/dist/lib/commands/t-digest/index.js +44 -0
  93. package/dist/lib/commands/top-k/ADD.d.ts +9 -0
  94. package/dist/lib/commands/top-k/ADD.js +9 -0
  95. package/dist/lib/commands/top-k/COUNT.d.ts +9 -0
  96. package/dist/lib/commands/top-k/COUNT.js +9 -0
  97. package/dist/lib/commands/top-k/INCRBY.d.ts +12 -0
  98. package/dist/lib/commands/top-k/INCRBY.js +20 -0
  99. package/dist/lib/commands/top-k/INFO.d.ts +34 -0
  100. package/dist/lib/commands/top-k/INFO.js +16 -0
  101. package/dist/lib/commands/top-k/LIST.d.ts +8 -0
  102. package/dist/lib/commands/top-k/LIST.js +8 -0
  103. package/dist/lib/commands/top-k/LIST_WITHCOUNT.d.ts +11 -0
  104. package/dist/lib/commands/top-k/LIST_WITHCOUNT.js +17 -0
  105. package/dist/lib/commands/top-k/QUERY.d.ts +12 -0
  106. package/dist/lib/commands/top-k/QUERY.js +9 -0
  107. package/dist/lib/commands/top-k/RESERVE.d.ts +13 -0
  108. package/dist/lib/commands/top-k/RESERVE.js +12 -0
  109. package/dist/lib/commands/top-k/index.d.ts +127 -0
  110. package/dist/lib/commands/top-k/index.js +26 -0
  111. package/dist/lib/index.js +1 -0
  112. package/package.json +21 -18
  113. package/dist/commands/bloom/ADD.d.ts +0 -3
  114. package/dist/commands/bloom/ADD.js +0 -10
  115. package/dist/commands/bloom/EXISTS.d.ts +0 -4
  116. package/dist/commands/bloom/EXISTS.js +0 -11
  117. package/dist/commands/bloom/INFO.d.ts +0 -23
  118. package/dist/commands/bloom/INFO.js +0 -19
  119. package/dist/commands/bloom/INSERT.d.ts +0 -11
  120. package/dist/commands/bloom/INSERT.js +0 -28
  121. package/dist/commands/bloom/LOADCHUNK.d.ts +0 -4
  122. package/dist/commands/bloom/LOADCHUNK.js +0 -8
  123. package/dist/commands/bloom/MADD.d.ts +0 -3
  124. package/dist/commands/bloom/MADD.js +0 -10
  125. package/dist/commands/bloom/MEXISTS.d.ts +0 -4
  126. package/dist/commands/bloom/MEXISTS.js +0 -11
  127. package/dist/commands/bloom/RESERVE.d.ts +0 -8
  128. package/dist/commands/bloom/RESERVE.js +0 -15
  129. package/dist/commands/bloom/SCANDUMP.d.ts +0 -13
  130. package/dist/commands/bloom/SCANDUMP.js +0 -16
  131. package/dist/commands/bloom/index.d.ts +0 -30
  132. package/dist/commands/bloom/index.js +0 -31
  133. package/dist/commands/count-min-sketch/INCRBY.d.ts +0 -8
  134. package/dist/commands/count-min-sketch/INCRBY.js +0 -20
  135. package/dist/commands/count-min-sketch/INFO.d.ts +0 -17
  136. package/dist/commands/count-min-sketch/INFO.js +0 -17
  137. package/dist/commands/count-min-sketch/INITBYDIM.d.ts +0 -3
  138. package/dist/commands/count-min-sketch/INITBYDIM.js +0 -8
  139. package/dist/commands/count-min-sketch/INITBYPROB.d.ts +0 -3
  140. package/dist/commands/count-min-sketch/INITBYPROB.js +0 -8
  141. package/dist/commands/count-min-sketch/MERGE.d.ts +0 -9
  142. package/dist/commands/count-min-sketch/MERGE.js +0 -28
  143. package/dist/commands/count-min-sketch/QUERY.d.ts +0 -5
  144. package/dist/commands/count-min-sketch/QUERY.js +0 -10
  145. package/dist/commands/count-min-sketch/index.d.ts +0 -21
  146. package/dist/commands/count-min-sketch/index.js +0 -22
  147. package/dist/commands/cuckoo/ADD.d.ts +0 -3
  148. package/dist/commands/cuckoo/ADD.js +0 -10
  149. package/dist/commands/cuckoo/ADDNX.d.ts +0 -3
  150. package/dist/commands/cuckoo/ADDNX.js +0 -10
  151. package/dist/commands/cuckoo/COUNT.d.ts +0 -3
  152. package/dist/commands/cuckoo/COUNT.js +0 -8
  153. package/dist/commands/cuckoo/DEL.d.ts +0 -3
  154. package/dist/commands/cuckoo/DEL.js +0 -10
  155. package/dist/commands/cuckoo/EXISTS.d.ts +0 -4
  156. package/dist/commands/cuckoo/EXISTS.js +0 -11
  157. package/dist/commands/cuckoo/INFO.d.ts +0 -32
  158. package/dist/commands/cuckoo/INFO.js +0 -22
  159. package/dist/commands/cuckoo/INSERT.d.ts +0 -5
  160. package/dist/commands/cuckoo/INSERT.js +0 -11
  161. package/dist/commands/cuckoo/INSERTNX.d.ts +0 -5
  162. package/dist/commands/cuckoo/INSERTNX.js +0 -11
  163. package/dist/commands/cuckoo/LOADCHUNK.d.ts +0 -4
  164. package/dist/commands/cuckoo/LOADCHUNK.js +0 -8
  165. package/dist/commands/cuckoo/RESERVE.d.ts +0 -9
  166. package/dist/commands/cuckoo/RESERVE.js +0 -18
  167. package/dist/commands/cuckoo/SCANDUMP.d.ts +0 -12
  168. package/dist/commands/cuckoo/SCANDUMP.js +0 -15
  169. package/dist/commands/cuckoo/index.d.ts +0 -42
  170. package/dist/commands/cuckoo/index.js +0 -51
  171. package/dist/commands/index.d.ts +0 -109
  172. package/dist/commands/index.js +0 -14
  173. package/dist/commands/t-digest/ADD.d.ts +0 -4
  174. package/dist/commands/t-digest/ADD.js +0 -12
  175. package/dist/commands/t-digest/BYRANK.d.ts +0 -5
  176. package/dist/commands/t-digest/BYRANK.js +0 -15
  177. package/dist/commands/t-digest/BYREVRANK.d.ts +0 -5
  178. package/dist/commands/t-digest/BYREVRANK.js +0 -15
  179. package/dist/commands/t-digest/CDF.d.ts +0 -5
  180. package/dist/commands/t-digest/CDF.js +0 -15
  181. package/dist/commands/t-digest/CREATE.d.ts +0 -5
  182. package/dist/commands/t-digest/CREATE.js +0 -9
  183. package/dist/commands/t-digest/INFO.d.ts +0 -31
  184. package/dist/commands/t-digest/INFO.js +0 -24
  185. package/dist/commands/t-digest/MAX.d.ts +0 -5
  186. package/dist/commands/t-digest/MAX.js +0 -14
  187. package/dist/commands/t-digest/MERGE.d.ts +0 -9
  188. package/dist/commands/t-digest/MERGE.js +0 -15
  189. package/dist/commands/t-digest/MERGESTORE.d.ts +0 -8
  190. package/dist/commands/t-digest/MERGESTORE.js +0 -17
  191. package/dist/commands/t-digest/MIN.d.ts +0 -5
  192. package/dist/commands/t-digest/MIN.js +0 -14
  193. package/dist/commands/t-digest/QUANTILE.d.ts +0 -5
  194. package/dist/commands/t-digest/QUANTILE.js +0 -18
  195. package/dist/commands/t-digest/RANK.d.ts +0 -5
  196. package/dist/commands/t-digest/RANK.js +0 -13
  197. package/dist/commands/t-digest/RESET.d.ts +0 -4
  198. package/dist/commands/t-digest/RESET.js +0 -8
  199. package/dist/commands/t-digest/REVRANK.d.ts +0 -5
  200. package/dist/commands/t-digest/REVRANK.js +0 -13
  201. package/dist/commands/t-digest/TRIMMED_MEAN.d.ts +0 -5
  202. package/dist/commands/t-digest/TRIMMED_MEAN.js +0 -16
  203. package/dist/commands/t-digest/index.d.ts +0 -52
  204. package/dist/commands/t-digest/index.js +0 -71
  205. package/dist/commands/top-k/ADD.d.ts +0 -4
  206. package/dist/commands/top-k/ADD.js +0 -9
  207. package/dist/commands/top-k/COUNT.d.ts +0 -5
  208. package/dist/commands/top-k/COUNT.js +0 -10
  209. package/dist/commands/top-k/INCRBY.d.ts +0 -8
  210. package/dist/commands/top-k/INCRBY.js +0 -20
  211. package/dist/commands/top-k/INFO.d.ts +0 -20
  212. package/dist/commands/top-k/INFO.js +0 -18
  213. package/dist/commands/top-k/LIST.d.ts +0 -4
  214. package/dist/commands/top-k/LIST.js +0 -9
  215. package/dist/commands/top-k/LIST_WITHCOUNT.d.ts +0 -10
  216. package/dist/commands/top-k/LIST_WITHCOUNT.js +0 -20
  217. package/dist/commands/top-k/QUERY.d.ts +0 -5
  218. package/dist/commands/top-k/QUERY.js +0 -10
  219. package/dist/commands/top-k/RESERVE.d.ts +0 -10
  220. package/dist/commands/top-k/RESERVE.js +0 -13
  221. package/dist/commands/top-k/index.d.ts +0 -27
  222. package/dist/commands/top-k/index.js +0 -28
  223. package/dist/index.js +0 -5
  224. /package/dist/{index.d.ts → lib/index.d.ts} +0 -0
@@ -0,0 +1,11 @@
1
+ import { RedisArgument } from '@redis/client/dist/lib/RESP/types';
2
+ declare const _default: {
3
+ readonly FIRST_KEY_INDEX: 1;
4
+ readonly IS_READ_ONLY: false;
5
+ readonly transformArguments: (this: void, key: RedisArgument, item: RedisArgument) => RedisArgument[];
6
+ readonly transformReply: {
7
+ 2: (reply: import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>) => boolean;
8
+ 3: () => import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>;
9
+ };
10
+ };
11
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { transformBooleanReply } from '@redis/client/dist/lib/commands/generic-transformers';
2
+ export default {
3
+ FIRST_KEY_INDEX: 1,
4
+ IS_READ_ONLY: false,
5
+ transformArguments(key, item) {
6
+ return ['BF.ADD', key, item];
7
+ },
8
+ transformReply: transformBooleanReply
9
+ };
@@ -0,0 +1,8 @@
1
+ import { RedisArgument, NumberReply } from '@redis/client/dist/lib/RESP/types';
2
+ declare const _default: {
3
+ readonly FIRST_KEY_INDEX: 1;
4
+ readonly IS_READ_ONLY: true;
5
+ readonly transformArguments: (this: void, key: RedisArgument) => RedisArgument[];
6
+ readonly transformReply: () => NumberReply;
7
+ };
8
+ export default _default;
@@ -0,0 +1,8 @@
1
+ export default {
2
+ FIRST_KEY_INDEX: 1,
3
+ IS_READ_ONLY: true,
4
+ transformArguments(key) {
5
+ return ['BF.CARD', key];
6
+ },
7
+ transformReply: undefined
8
+ };
@@ -0,0 +1,11 @@
1
+ import { RedisArgument } from '@redis/client/dist/lib/RESP/types';
2
+ declare const _default: {
3
+ readonly FIRST_KEY_INDEX: 1;
4
+ readonly IS_READ_ONLY: true;
5
+ readonly transformArguments: (this: void, key: RedisArgument, item: RedisArgument) => RedisArgument[];
6
+ readonly transformReply: {
7
+ 2: (reply: import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>) => boolean;
8
+ 3: () => import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>;
9
+ };
10
+ };
11
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { transformBooleanReply } from '@redis/client/dist/lib/commands/generic-transformers';
2
+ export default {
3
+ FIRST_KEY_INDEX: 1,
4
+ IS_READ_ONLY: true,
5
+ transformArguments(key, item) {
6
+ return ['BF.EXISTS', key, item];
7
+ },
8
+ transformReply: transformBooleanReply
9
+ };
@@ -0,0 +1,8 @@
1
+ import { RedisArgument } from '@redis/client/dist/lib/RESP/types';
2
+ declare const _default: {
3
+ readonly FIRST_KEY_INDEX: 1;
4
+ readonly IS_READ_ONLY: true;
5
+ readonly transformArguments: (this: void, key: RedisArgument) => RedisArgument[];
6
+ readonly transformReply: () => any;
7
+ };
8
+ export default _default;
@@ -0,0 +1,9 @@
1
+ export default {
2
+ FIRST_KEY_INDEX: 1,
3
+ IS_READ_ONLY: true,
4
+ transformArguments(key) {
5
+ return ['BF.INFO', key];
6
+ },
7
+ // TODO
8
+ transformReply: undefined
9
+ };
@@ -0,0 +1,19 @@
1
+ import { RedisArgument } from '@redis/client/dist/lib/RESP/types';
2
+ import { RedisVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers';
3
+ export interface BfInsertOptions {
4
+ CAPACITY?: number;
5
+ ERROR?: number;
6
+ EXPANSION?: number;
7
+ NOCREATE?: boolean;
8
+ NONSCALING?: boolean;
9
+ }
10
+ declare const _default: {
11
+ readonly FIRST_KEY_INDEX: 1;
12
+ readonly IS_READ_ONLY: false;
13
+ readonly transformArguments: (this: void, key: RedisArgument, items: RedisVariadicArgument, options?: BfInsertOptions) => import("@redis/client/dist/lib/RESP/types").CommandArguments;
14
+ readonly transformReply: {
15
+ 2: (reply: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>>) => boolean[];
16
+ 3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>>;
17
+ };
18
+ };
19
+ export default _default;
@@ -0,0 +1,27 @@
1
+ import { pushVariadicArguments } from '@redis/client/dist/lib/commands/generic-transformers';
2
+ import { transformBooleanArrayReply } from '@redis/client/dist/lib/commands/generic-transformers';
3
+ export default {
4
+ FIRST_KEY_INDEX: 1,
5
+ IS_READ_ONLY: false,
6
+ transformArguments(key, items, options) {
7
+ const args = ['BF.INSERT', key];
8
+ if (options?.CAPACITY !== undefined) {
9
+ args.push('CAPACITY', options.CAPACITY.toString());
10
+ }
11
+ if (options?.ERROR !== undefined) {
12
+ args.push('ERROR', options.ERROR.toString());
13
+ }
14
+ if (options?.EXPANSION !== undefined) {
15
+ args.push('EXPANSION', options.EXPANSION.toString());
16
+ }
17
+ if (options?.NOCREATE) {
18
+ args.push('NOCREATE');
19
+ }
20
+ if (options?.NONSCALING) {
21
+ args.push('NONSCALING');
22
+ }
23
+ args.push('ITEMS');
24
+ return pushVariadicArguments(args, items);
25
+ },
26
+ transformReply: transformBooleanArrayReply
27
+ };
@@ -0,0 +1,8 @@
1
+ import { RedisArgument, SimpleStringReply } from '@redis/client/dist/lib/RESP/types';
2
+ declare const _default: {
3
+ readonly FIRST_KEY_INDEX: 1;
4
+ readonly IS_READ_ONLY: false;
5
+ readonly transformArguments: (this: void, key: RedisArgument, iterator: number, chunk: RedisArgument) => RedisArgument[];
6
+ readonly transformReply: () => SimpleStringReply<'OK'>;
7
+ };
8
+ export default _default;
@@ -0,0 +1,8 @@
1
+ export default {
2
+ FIRST_KEY_INDEX: 1,
3
+ IS_READ_ONLY: false,
4
+ transformArguments(key, iterator, chunk) {
5
+ return ['BF.LOADCHUNK', key, iterator.toString(), chunk];
6
+ },
7
+ transformReply: undefined
8
+ };
@@ -0,0 +1,12 @@
1
+ import { RedisArgument } from '@redis/client/dist/lib/RESP/types';
2
+ import { RedisVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers';
3
+ declare const _default: {
4
+ readonly FIRST_KEY_INDEX: 1;
5
+ readonly IS_READ_ONLY: false;
6
+ readonly transformArguments: (this: void, key: RedisArgument, items: RedisVariadicArgument) => import("@redis/client/dist/lib/RESP/types").CommandArguments;
7
+ readonly transformReply: {
8
+ 2: (reply: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>>) => boolean[];
9
+ 3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>>;
10
+ };
11
+ };
12
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { pushVariadicArguments } from '@redis/client/dist/lib/commands/generic-transformers';
2
+ import { transformBooleanArrayReply } from '@redis/client/dist/lib/commands/generic-transformers';
3
+ export default {
4
+ FIRST_KEY_INDEX: 1,
5
+ IS_READ_ONLY: false,
6
+ transformArguments(key, items) {
7
+ return pushVariadicArguments(['BF.MADD', key], items);
8
+ },
9
+ transformReply: transformBooleanArrayReply
10
+ };
@@ -0,0 +1,12 @@
1
+ import { RedisArgument } from '@redis/client/dist/lib/RESP/types';
2
+ import { RedisVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers';
3
+ declare const _default: {
4
+ readonly FIRST_KEY_INDEX: 1;
5
+ readonly IS_READ_ONLY: true;
6
+ readonly transformArguments: (this: void, key: RedisArgument, items: RedisVariadicArgument) => import("@redis/client/dist/lib/RESP/types").CommandArguments;
7
+ readonly transformReply: {
8
+ 2: (reply: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>>) => boolean[];
9
+ 3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>>;
10
+ };
11
+ };
12
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { pushVariadicArguments } from '@redis/client/dist/lib/commands/generic-transformers';
2
+ import { transformBooleanArrayReply } from '@redis/client/dist/lib/commands/generic-transformers';
3
+ export default {
4
+ FIRST_KEY_INDEX: 1,
5
+ IS_READ_ONLY: true,
6
+ transformArguments(key, items) {
7
+ return pushVariadicArguments(['BF.MEXISTS', key], items);
8
+ },
9
+ transformReply: transformBooleanArrayReply
10
+ };
@@ -0,0 +1,12 @@
1
+ import { RedisArgument, SimpleStringReply } from '@redis/client/dist/lib/RESP/types';
2
+ export interface BfReserveOptions {
3
+ EXPANSION?: number;
4
+ NONSCALING?: boolean;
5
+ }
6
+ declare const _default: {
7
+ readonly FIRST_KEY_INDEX: 1;
8
+ readonly IS_READ_ONLY: true;
9
+ readonly transformArguments: (this: void, key: RedisArgument, errorRate: number, capacity: number, options?: BfReserveOptions) => RedisArgument[];
10
+ readonly transformReply: () => SimpleStringReply<'OK'>;
11
+ };
12
+ export default _default;
@@ -0,0 +1,15 @@
1
+ export default {
2
+ FIRST_KEY_INDEX: 1,
3
+ IS_READ_ONLY: true,
4
+ transformArguments(key, errorRate, capacity, options) {
5
+ const args = ['BF.RESERVE', key, errorRate.toString(), capacity.toString()];
6
+ if (options?.EXPANSION) {
7
+ args.push('EXPANSION', options.EXPANSION.toString());
8
+ }
9
+ if (options?.NONSCALING) {
10
+ args.push('NONSCALING');
11
+ }
12
+ return args;
13
+ },
14
+ transformReply: undefined
15
+ };
@@ -0,0 +1,11 @@
1
+ import { RedisArgument, NumberReply, BlobStringReply } from '@redis/client/dist/lib/RESP/types';
2
+ declare const _default: {
3
+ readonly FIRST_KEY_INDEX: 1;
4
+ readonly IS_READ_ONLY: true;
5
+ readonly transformArguments: (this: void, key: RedisArgument, iterator: number) => RedisArgument[];
6
+ readonly transformReply: (this: void, reply: [NumberReply<number>, BlobStringReply<string>]) => {
7
+ iterator: NumberReply<number>;
8
+ chunk: BlobStringReply<string>;
9
+ };
10
+ };
11
+ export default _default;
@@ -0,0 +1,13 @@
1
+ export default {
2
+ FIRST_KEY_INDEX: 1,
3
+ IS_READ_ONLY: true,
4
+ transformArguments(key, iterator) {
5
+ return ['BF.SCANDUMP', key, iterator.toString()];
6
+ },
7
+ transformReply(reply) {
8
+ return {
9
+ iterator: reply[0],
10
+ chunk: reply[1]
11
+ };
12
+ }
13
+ };
@@ -0,0 +1,159 @@
1
+ declare const _default: {
2
+ readonly ADD: {
3
+ readonly FIRST_KEY_INDEX: 1;
4
+ readonly IS_READ_ONLY: false;
5
+ readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, item: import("@redis/client/dist/lib/RESP/types").RedisArgument) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
6
+ readonly transformReply: {
7
+ 2: (reply: import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>) => boolean;
8
+ 3: () => import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>;
9
+ };
10
+ };
11
+ readonly add: {
12
+ readonly FIRST_KEY_INDEX: 1;
13
+ readonly IS_READ_ONLY: false;
14
+ readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, item: import("@redis/client/dist/lib/RESP/types").RedisArgument) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
15
+ readonly transformReply: {
16
+ 2: (reply: import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>) => boolean;
17
+ 3: () => import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>;
18
+ };
19
+ };
20
+ readonly CARD: {
21
+ readonly FIRST_KEY_INDEX: 1;
22
+ readonly IS_READ_ONLY: true;
23
+ readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
24
+ readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
25
+ };
26
+ readonly card: {
27
+ readonly FIRST_KEY_INDEX: 1;
28
+ readonly IS_READ_ONLY: true;
29
+ readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
30
+ readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
31
+ };
32
+ readonly EXISTS: {
33
+ readonly FIRST_KEY_INDEX: 1;
34
+ readonly IS_READ_ONLY: true;
35
+ readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, item: import("@redis/client/dist/lib/RESP/types").RedisArgument) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
36
+ readonly transformReply: {
37
+ 2: (reply: import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>) => boolean;
38
+ 3: () => import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>;
39
+ };
40
+ };
41
+ readonly exists: {
42
+ readonly FIRST_KEY_INDEX: 1;
43
+ readonly IS_READ_ONLY: true;
44
+ readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, item: import("@redis/client/dist/lib/RESP/types").RedisArgument) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
45
+ readonly transformReply: {
46
+ 2: (reply: import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>) => boolean;
47
+ 3: () => import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>;
48
+ };
49
+ };
50
+ readonly INFO: {
51
+ readonly FIRST_KEY_INDEX: 1;
52
+ readonly IS_READ_ONLY: true;
53
+ readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
54
+ readonly transformReply: () => any;
55
+ };
56
+ readonly info: {
57
+ readonly FIRST_KEY_INDEX: 1;
58
+ readonly IS_READ_ONLY: true;
59
+ readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
60
+ readonly transformReply: () => any;
61
+ };
62
+ readonly INSERT: {
63
+ readonly FIRST_KEY_INDEX: 1;
64
+ readonly IS_READ_ONLY: false;
65
+ readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, items: import("@redis/client/dist/lib/commands/generic-transformers").RedisVariadicArgument, options?: import("./INSERT").BfInsertOptions | undefined) => import("@redis/client/dist/lib/RESP/types").CommandArguments;
66
+ readonly transformReply: {
67
+ 2: (reply: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>>) => boolean[];
68
+ 3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>>;
69
+ };
70
+ };
71
+ readonly insert: {
72
+ readonly FIRST_KEY_INDEX: 1;
73
+ readonly IS_READ_ONLY: false;
74
+ readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, items: import("@redis/client/dist/lib/commands/generic-transformers").RedisVariadicArgument, options?: import("./INSERT").BfInsertOptions | undefined) => import("@redis/client/dist/lib/RESP/types").CommandArguments;
75
+ readonly transformReply: {
76
+ 2: (reply: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>>) => boolean[];
77
+ 3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>>;
78
+ };
79
+ };
80
+ readonly LOADCHUNK: {
81
+ readonly FIRST_KEY_INDEX: 1;
82
+ readonly IS_READ_ONLY: false;
83
+ readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, iterator: number, chunk: import("@redis/client/dist/lib/RESP/types").RedisArgument) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
84
+ readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
85
+ };
86
+ readonly loadChunk: {
87
+ readonly FIRST_KEY_INDEX: 1;
88
+ readonly IS_READ_ONLY: false;
89
+ readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, iterator: number, chunk: import("@redis/client/dist/lib/RESP/types").RedisArgument) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
90
+ readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
91
+ };
92
+ readonly MADD: {
93
+ readonly FIRST_KEY_INDEX: 1;
94
+ readonly IS_READ_ONLY: false;
95
+ readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, items: import("@redis/client/dist/lib/commands/generic-transformers").RedisVariadicArgument) => import("@redis/client/dist/lib/RESP/types").CommandArguments;
96
+ readonly transformReply: {
97
+ 2: (reply: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>>) => boolean[];
98
+ 3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>>;
99
+ };
100
+ };
101
+ readonly mAdd: {
102
+ readonly FIRST_KEY_INDEX: 1;
103
+ readonly IS_READ_ONLY: false;
104
+ readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, items: import("@redis/client/dist/lib/commands/generic-transformers").RedisVariadicArgument) => import("@redis/client/dist/lib/RESP/types").CommandArguments;
105
+ readonly transformReply: {
106
+ 2: (reply: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>>) => boolean[];
107
+ 3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>>;
108
+ };
109
+ };
110
+ readonly MEXISTS: {
111
+ readonly FIRST_KEY_INDEX: 1;
112
+ readonly IS_READ_ONLY: true;
113
+ readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, items: import("@redis/client/dist/lib/commands/generic-transformers").RedisVariadicArgument) => import("@redis/client/dist/lib/RESP/types").CommandArguments;
114
+ readonly transformReply: {
115
+ 2: (reply: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>>) => boolean[];
116
+ 3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>>;
117
+ };
118
+ };
119
+ readonly mExists: {
120
+ readonly FIRST_KEY_INDEX: 1;
121
+ readonly IS_READ_ONLY: true;
122
+ readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, items: import("@redis/client/dist/lib/commands/generic-transformers").RedisVariadicArgument) => import("@redis/client/dist/lib/RESP/types").CommandArguments;
123
+ readonly transformReply: {
124
+ 2: (reply: import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<0 | 1>>) => boolean[];
125
+ 3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BooleanReply<boolean>>;
126
+ };
127
+ };
128
+ readonly RESERVE: {
129
+ readonly FIRST_KEY_INDEX: 1;
130
+ readonly IS_READ_ONLY: true;
131
+ readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, errorRate: number, capacity: number, options?: import("./RESERVE").BfReserveOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
132
+ readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
133
+ };
134
+ readonly reserve: {
135
+ readonly FIRST_KEY_INDEX: 1;
136
+ readonly IS_READ_ONLY: true;
137
+ readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, errorRate: number, capacity: number, options?: import("./RESERVE").BfReserveOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
138
+ readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
139
+ };
140
+ readonly SCANDUMP: {
141
+ readonly FIRST_KEY_INDEX: 1;
142
+ readonly IS_READ_ONLY: true;
143
+ readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, iterator: number) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
144
+ readonly transformReply: (this: void, reply: [import("@redis/client/dist/lib/RESP/types").NumberReply<number>, import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>]) => {
145
+ iterator: import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
146
+ chunk: import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>;
147
+ };
148
+ };
149
+ readonly scanDump: {
150
+ readonly FIRST_KEY_INDEX: 1;
151
+ readonly IS_READ_ONLY: true;
152
+ readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, iterator: number) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
153
+ readonly transformReply: (this: void, reply: [import("@redis/client/dist/lib/RESP/types").NumberReply<number>, import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>]) => {
154
+ iterator: import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
155
+ chunk: import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>;
156
+ };
157
+ };
158
+ };
159
+ export default _default;
@@ -0,0 +1,32 @@
1
+ import ADD from './ADD';
2
+ import CARD from './CARD';
3
+ import EXISTS from './EXISTS';
4
+ import INFO from './INFO';
5
+ import INSERT from './INSERT';
6
+ import LOADCHUNK from './LOADCHUNK';
7
+ import MADD from './MADD';
8
+ import MEXISTS from './MEXISTS';
9
+ import RESERVE from './RESERVE';
10
+ import SCANDUMP from './SCANDUMP';
11
+ export default {
12
+ ADD,
13
+ add: ADD,
14
+ CARD,
15
+ card: CARD,
16
+ EXISTS,
17
+ exists: EXISTS,
18
+ INFO,
19
+ info: INFO,
20
+ INSERT,
21
+ insert: INSERT,
22
+ LOADCHUNK,
23
+ loadChunk: LOADCHUNK,
24
+ MADD,
25
+ mAdd: MADD,
26
+ MEXISTS,
27
+ mExists: MEXISTS,
28
+ RESERVE,
29
+ reserve: RESERVE,
30
+ SCANDUMP,
31
+ scanDump: SCANDUMP
32
+ };
@@ -0,0 +1,12 @@
1
+ import { RedisArgument, ArrayReply, NumberReply } from '@redis/client/dist/lib/RESP/types';
2
+ export interface BfIncrByItem {
3
+ item: RedisArgument;
4
+ incrementBy: number;
5
+ }
6
+ declare const _default: {
7
+ readonly FIRST_KEY_INDEX: 1;
8
+ readonly IS_READ_ONLY: false;
9
+ readonly transformArguments: (this: void, key: RedisArgument, items: BfIncrByItem | Array<BfIncrByItem>) => RedisArgument[];
10
+ readonly transformReply: () => ArrayReply<NumberReply>;
11
+ };
12
+ export default _default;
@@ -0,0 +1,20 @@
1
+ export default {
2
+ FIRST_KEY_INDEX: 1,
3
+ IS_READ_ONLY: false,
4
+ transformArguments(key, items) {
5
+ const args = ['CMS.INCRBY', key];
6
+ if (Array.isArray(items)) {
7
+ for (const item of items) {
8
+ pushIncrByItem(args, item);
9
+ }
10
+ }
11
+ else {
12
+ pushIncrByItem(args, items);
13
+ }
14
+ return args;
15
+ },
16
+ transformReply: undefined
17
+ };
18
+ function pushIncrByItem(args, { item, incrementBy }) {
19
+ args.push(item, incrementBy.toString());
20
+ }
@@ -0,0 +1,29 @@
1
+ import { RedisArgument, TuplesToMapReply, BlobStringReply, NumberReply } from '@redis/client/dist/lib/RESP/types';
2
+ export type BfInfoReply = TuplesToMapReply<[
3
+ [
4
+ BlobStringReply<'width'>,
5
+ NumberReply
6
+ ],
7
+ [
8
+ BlobStringReply<'depth'>,
9
+ NumberReply
10
+ ],
11
+ [
12
+ BlobStringReply<'count'>,
13
+ NumberReply
14
+ ]
15
+ ]>;
16
+ declare const _default: {
17
+ readonly FIRST_KEY_INDEX: 1;
18
+ readonly IS_READ_ONLY: true;
19
+ readonly transformArguments: (this: void, key: RedisArgument) => RedisArgument[];
20
+ readonly transformReply: {
21
+ readonly 2: (reply: [BlobStringReply<"width">, NumberReply<number>, BlobStringReply<"depth">, NumberReply<number>, BlobStringReply<"count">, NumberReply<number>]) => {
22
+ width: NumberReply<number>;
23
+ depth: NumberReply<number>;
24
+ count: NumberReply<number>;
25
+ };
26
+ readonly 3: () => BfInfoReply;
27
+ };
28
+ };
29
+ export default _default;
@@ -0,0 +1,15 @@
1
+ export default {
2
+ FIRST_KEY_INDEX: 1,
3
+ IS_READ_ONLY: true,
4
+ transformArguments(key) {
5
+ return ['CMS.INFO', key];
6
+ },
7
+ transformReply: {
8
+ 2: (reply) => ({
9
+ width: reply[1],
10
+ depth: reply[3],
11
+ count: reply[5]
12
+ }),
13
+ 3: undefined
14
+ }
15
+ };
@@ -0,0 +1,8 @@
1
+ import { RedisArgument, SimpleStringReply } from '@redis/client/dist/lib/RESP/types';
2
+ declare const _default: {
3
+ readonly FIRST_KEY_INDEX: 1;
4
+ readonly IS_READ_ONLY: false;
5
+ readonly transformArguments: (this: void, key: RedisArgument, width: number, depth: number) => RedisArgument[];
6
+ readonly transformReply: () => SimpleStringReply<'OK'>;
7
+ };
8
+ export default _default;
@@ -0,0 +1,8 @@
1
+ export default {
2
+ FIRST_KEY_INDEX: 1,
3
+ IS_READ_ONLY: false,
4
+ transformArguments(key, width, depth) {
5
+ return ['CMS.INITBYDIM', key, width.toString(), depth.toString()];
6
+ },
7
+ transformReply: undefined
8
+ };
@@ -0,0 +1,8 @@
1
+ import { RedisArgument, SimpleStringReply } from '@redis/client/dist/lib/RESP/types';
2
+ declare const _default: {
3
+ readonly FIRST_KEY_INDEX: 1;
4
+ readonly IS_READ_ONLY: false;
5
+ readonly transformArguments: (this: void, key: RedisArgument, error: number, probability: number) => RedisArgument[];
6
+ readonly transformReply: () => SimpleStringReply<'OK'>;
7
+ };
8
+ export default _default;
@@ -0,0 +1,8 @@
1
+ export default {
2
+ FIRST_KEY_INDEX: 1,
3
+ IS_READ_ONLY: false,
4
+ transformArguments(key, error, probability) {
5
+ return ['CMS.INITBYPROB', key, error.toString(), probability.toString()];
6
+ },
7
+ transformReply: undefined
8
+ };
@@ -0,0 +1,13 @@
1
+ import { RedisArgument, SimpleStringReply } from '@redis/client/dist/lib/RESP/types';
2
+ interface BfMergeSketch {
3
+ name: RedisArgument;
4
+ weight: number;
5
+ }
6
+ export type BfMergeSketches = Array<RedisArgument> | Array<BfMergeSketch>;
7
+ declare const _default: {
8
+ readonly FIRST_KEY_INDEX: 1;
9
+ readonly IS_READ_ONLY: false;
10
+ readonly transformArguments: (this: void, destination: RedisArgument, source: BfMergeSketches) => RedisArgument[];
11
+ readonly transformReply: () => SimpleStringReply<'OK'>;
12
+ };
13
+ export default _default;
@@ -0,0 +1,23 @@
1
+ export default {
2
+ FIRST_KEY_INDEX: 1,
3
+ IS_READ_ONLY: false,
4
+ transformArguments(destination, source) {
5
+ let args = ['CMS.MERGE', destination, source.length.toString()];
6
+ if (isPlainSketches(source)) {
7
+ args = args.concat(source);
8
+ }
9
+ else {
10
+ const { length } = args;
11
+ args[length + source.length] = 'WEIGHTS';
12
+ for (let i = 0; i < source.length; i++) {
13
+ args[length + i] = source[i].name;
14
+ args[length + source.length + i + 1] = source[i].weight.toString();
15
+ }
16
+ }
17
+ return args;
18
+ },
19
+ transformReply: undefined
20
+ };
21
+ function isPlainSketches(src) {
22
+ return typeof src[0] === 'string' || src[0] instanceof Buffer;
23
+ }
@@ -0,0 +1,9 @@
1
+ import { ArrayReply, NumberReply, RedisArgument } from '@redis/client/dist/lib/RESP/types';
2
+ import { RedisVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers';
3
+ declare const _default: {
4
+ readonly FIRST_KEY_INDEX: 1;
5
+ readonly IS_READ_ONLY: true;
6
+ readonly transformArguments: (this: void, key: RedisArgument, items: RedisVariadicArgument) => import("@redis/client/dist/lib/RESP/types").CommandArguments;
7
+ readonly transformReply: () => ArrayReply<NumberReply>;
8
+ };
9
+ export default _default;