@valkey/valkey-glide-darwin-arm64 1.2.0 → 1.2.1-rc0

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 (439) hide show
  1. package/build-ts/src/BaseClient.d.ts +27 -1
  2. package/build-ts/src/BaseClient.js +9 -1
  3. package/build-ts/src/BaseClient.js.map +1 -1
  4. package/build-ts/src/Commands.d.ts +12 -0
  5. package/build-ts/src/Commands.js.map +1 -1
  6. package/build-ts/src/GlideClient.d.ts +17 -1
  7. package/build-ts/src/GlideClient.js +3 -0
  8. package/build-ts/src/GlideClient.js.map +1 -1
  9. package/build-ts/src/GlideClusterClient.d.ts +23 -7
  10. package/build-ts/src/GlideClusterClient.js +8 -3
  11. package/build-ts/src/GlideClusterClient.js.map +1 -1
  12. package/build-ts/src/ProtobufMessage.js +46 -1
  13. package/build-ts/src/ProtobufMessage.js.map +1 -1
  14. package/node_modules/glide-rs/glide-rs.darwin-arm64.node +0 -0
  15. package/node_modules/glide-rs/index.d.ts +2 -1
  16. package/node_modules/glide-rs/index.js +4 -2
  17. package/npm/glide/index.ts +4 -3
  18. package/npm/glide/package.json +0 -1
  19. package/package.json +2 -2
  20. package/rust-client/node_modules/mingo/README.md +58 -53
  21. package/rust-client/node_modules/mingo/dist/cjs/aggregator.js +18 -20
  22. package/rust-client/node_modules/mingo/dist/cjs/core.js +179 -190
  23. package/rust-client/node_modules/mingo/dist/cjs/cursor.js +34 -34
  24. package/rust-client/node_modules/mingo/dist/cjs/index.js +11 -3
  25. package/rust-client/node_modules/mingo/dist/cjs/init/basic.js +4 -22
  26. package/rust-client/node_modules/mingo/dist/cjs/init/system.js +6 -6
  27. package/rust-client/node_modules/mingo/dist/cjs/lazy.js +58 -61
  28. package/rust-client/node_modules/mingo/dist/cjs/operators/_predicates.js +12 -25
  29. package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/_internal.js +2 -4
  30. package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/accumulator.js +1 -2
  31. package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/first.js +3 -1
  32. package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/last.js +4 -1
  33. package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/max.js +9 -6
  34. package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/mergeObjects.js +5 -1
  35. package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/min.js +9 -3
  36. package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/push.js +1 -2
  37. package/rust-client/node_modules/mingo/dist/cjs/operators/accumulator/sum.js +2 -4
  38. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/add.js +9 -10
  39. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/ceil.js +1 -2
  40. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/exp.js +1 -2
  41. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/floor.js +1 -2
  42. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/ln.js +1 -2
  43. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/log.js +1 -2
  44. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/log10.js +1 -2
  45. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/round.js +1 -2
  46. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/sqrt.js +1 -2
  47. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/subtract.js +5 -2
  48. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/arithmetic/trunc.js +1 -2
  49. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/arrayElemAt.js +2 -3
  50. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/arrayToObject.js +3 -4
  51. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/concatArrays.js +11 -5
  52. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/filter.js +1 -0
  53. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/first.js +8 -8
  54. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/firstN.js +2 -4
  55. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/in.js +1 -1
  56. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/indexOfArray.js +5 -10
  57. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/isArray.js +2 -3
  58. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/last.js +8 -8
  59. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/lastN.js +2 -4
  60. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/map.js +1 -0
  61. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/maxN.js +2 -4
  62. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/minN.js +2 -4
  63. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/reduce.js +1 -2
  64. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/reverseArray.js +1 -2
  65. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/sortArray.js +2 -4
  66. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/array/zip.js +4 -10
  67. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/bitwise/_internal.js +1 -2
  68. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/bitwise/bitNot.js +2 -4
  69. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/boolean/not.js +3 -5
  70. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/comparison/cmp.js +6 -5
  71. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/conditional/cond.js +1 -1
  72. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/conditional/ifNull.js +1 -1
  73. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/conditional/switch.js +1 -2
  74. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/_internal.js +157 -65
  75. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/dateAdd.js +1 -29
  76. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/dateDiff.js +32 -20
  77. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/dateFromParts.js +2 -4
  78. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/dateFromString.js +13 -9
  79. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/dateToString.js +2 -4
  80. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/dateTrunc.js +107 -0
  81. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/dayOfYear.js +1 -1
  82. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/index.js +2 -0
  83. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/isoWeekYear.js +1 -4
  84. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/date/week.js +1 -2
  85. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/misc/getField.js +1 -2
  86. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/object/mergeObjects.js +9 -2
  87. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/object/objectToArray.js +5 -1
  88. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/object/setField.js +11 -7
  89. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/set/setDifference.js +9 -1
  90. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/set/setEquals.js +17 -3
  91. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/set/setIntersection.js +2 -1
  92. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/set/setIsSubset.js +15 -1
  93. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/set/setUnion.js +4 -5
  94. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/_internal.js +4 -8
  95. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/concat.js +5 -2
  96. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/indexOfBytes.js +2 -4
  97. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/replaceAll.js +1 -2
  98. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/replaceOne.js +1 -2
  99. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/split.js +1 -2
  100. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/strcasecmp.js +1 -2
  101. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/substr.js +4 -14
  102. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/string/substrBytes.js +2 -4
  103. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/trignometry/atan2.js +2 -4
  104. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/trignometry/cosh.js +0 -1
  105. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/_internal.js +20 -10
  106. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/convert.js +3 -5
  107. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/toBool.js +2 -4
  108. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/toDate.js +3 -6
  109. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/toDouble.js +5 -10
  110. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/toInt.js +1 -4
  111. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/toLong.js +1 -4
  112. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/toString.js +11 -10
  113. package/rust-client/node_modules/mingo/dist/cjs/operators/expression/type/type.js +11 -14
  114. package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/addFields.js +1 -2
  115. package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/bucket.js +53 -53
  116. package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/bucketAuto.js +670 -65
  117. package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/count.js +2 -2
  118. package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/densify.js +196 -0
  119. package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/graphLookup.js +78 -0
  120. package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/group.js +6 -9
  121. package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/index.js +4 -0
  122. package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/limit.js +1 -3
  123. package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/lookup.js +47 -10
  124. package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/merge.js +7 -13
  125. package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/out.js +1 -1
  126. package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/project.js +19 -38
  127. package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/redact.js +3 -1
  128. package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/replaceWith.js +9 -2
  129. package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/sample.js +1 -2
  130. package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/setWindowFields.js +10 -20
  131. package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/skip.js +1 -1
  132. package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/sort.js +10 -19
  133. package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/sortByCount.js +5 -3
  134. package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/unionWith.js +1 -1
  135. package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/unset.js +1 -2
  136. package/rust-client/node_modules/mingo/dist/cjs/operators/pipeline/unwind.js +5 -9
  137. package/rust-client/node_modules/mingo/dist/cjs/operators/projection/elemMatch.js +2 -3
  138. package/rust-client/node_modules/mingo/dist/cjs/operators/projection/slice.js +2 -3
  139. package/rust-client/node_modules/mingo/dist/cjs/operators/query/bitwise/_internal.js +4 -4
  140. package/rust-client/node_modules/mingo/dist/cjs/operators/update/_internal.js +8 -14
  141. package/rust-client/node_modules/mingo/dist/cjs/operators/update/addToSet.js +1 -2
  142. package/rust-client/node_modules/mingo/dist/cjs/operators/update/bit.js +1 -2
  143. package/rust-client/node_modules/mingo/dist/cjs/operators/update/max.js +1 -2
  144. package/rust-client/node_modules/mingo/dist/cjs/operators/update/min.js +1 -2
  145. package/rust-client/node_modules/mingo/dist/cjs/operators/update/pop.js +1 -2
  146. package/rust-client/node_modules/mingo/dist/cjs/operators/update/pull.js +2 -4
  147. package/rust-client/node_modules/mingo/dist/cjs/operators/update/push.js +3 -9
  148. package/rust-client/node_modules/mingo/dist/cjs/operators/update/rename.js +1 -2
  149. package/rust-client/node_modules/mingo/dist/cjs/operators/update/set.js +1 -2
  150. package/rust-client/node_modules/mingo/dist/cjs/operators/update/unset.js +1 -2
  151. package/rust-client/node_modules/mingo/dist/cjs/operators/window/_internal.js +2 -3
  152. package/rust-client/node_modules/mingo/dist/cjs/operators/window/denseRank.js +8 -10
  153. package/rust-client/node_modules/mingo/dist/cjs/operators/window/derivative.js +4 -6
  154. package/rust-client/node_modules/mingo/dist/cjs/operators/window/documentNumber.js +1 -3
  155. package/rust-client/node_modules/mingo/dist/cjs/operators/window/expMovingAvg.js +4 -6
  156. package/rust-client/node_modules/mingo/dist/cjs/operators/window/integral.js +3 -4
  157. package/rust-client/node_modules/mingo/dist/cjs/operators/window/linearFill.js +4 -6
  158. package/rust-client/node_modules/mingo/dist/cjs/operators/window/locf.js +3 -4
  159. package/rust-client/node_modules/mingo/dist/cjs/operators/window/rank.js +8 -10
  160. package/rust-client/node_modules/mingo/dist/cjs/operators/window/shift.js +2 -2
  161. package/rust-client/node_modules/mingo/dist/cjs/query.js +20 -19
  162. package/rust-client/node_modules/mingo/dist/cjs/types.js +22 -0
  163. package/rust-client/node_modules/mingo/dist/cjs/updater.js +6 -5
  164. package/rust-client/node_modules/mingo/dist/cjs/util.js +265 -388
  165. package/rust-client/node_modules/mingo/dist/esm/aggregator.js +18 -21
  166. package/rust-client/node_modules/mingo/dist/esm/core.js +179 -192
  167. package/rust-client/node_modules/mingo/dist/esm/cursor.js +35 -35
  168. package/rust-client/node_modules/mingo/dist/esm/index.js +8 -2
  169. package/rust-client/node_modules/mingo/dist/esm/init/basic.js +5 -12
  170. package/rust-client/node_modules/mingo/dist/esm/init/system.js +7 -7
  171. package/rust-client/node_modules/mingo/dist/esm/lazy.js +58 -61
  172. package/rust-client/node_modules/mingo/dist/esm/operators/_predicates.js +14 -32
  173. package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/_internal.js +2 -4
  174. package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/accumulator.js +1 -2
  175. package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/first.js +7 -2
  176. package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/last.js +8 -2
  177. package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/max.js +10 -7
  178. package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/mergeObjects.js +5 -1
  179. package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/min.js +10 -4
  180. package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/push.js +1 -2
  181. package/rust-client/node_modules/mingo/dist/esm/operators/accumulator/sum.js +2 -4
  182. package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/add.js +9 -10
  183. package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/ceil.js +1 -2
  184. package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/exp.js +1 -2
  185. package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/floor.js +1 -2
  186. package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/ln.js +1 -2
  187. package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/log.js +1 -2
  188. package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/log10.js +1 -2
  189. package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/round.js +1 -2
  190. package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/sqrt.js +1 -2
  191. package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/subtract.js +5 -2
  192. package/rust-client/node_modules/mingo/dist/esm/operators/expression/arithmetic/trunc.js +1 -2
  193. package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/arrayElemAt.js +3 -4
  194. package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/arrayToObject.js +3 -4
  195. package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/concatArrays.js +12 -6
  196. package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/filter.js +2 -1
  197. package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/first.js +10 -13
  198. package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/firstN.js +2 -4
  199. package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/in.js +1 -1
  200. package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/indexOfArray.js +5 -10
  201. package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/isArray.js +2 -3
  202. package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/last.js +10 -13
  203. package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/lastN.js +2 -4
  204. package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/map.js +2 -1
  205. package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/maxN.js +2 -4
  206. package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/minN.js +2 -4
  207. package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/reduce.js +1 -2
  208. package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/reverseArray.js +1 -2
  209. package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/sortArray.js +2 -4
  210. package/rust-client/node_modules/mingo/dist/esm/operators/expression/array/zip.js +4 -10
  211. package/rust-client/node_modules/mingo/dist/esm/operators/expression/bitwise/_internal.js +1 -2
  212. package/rust-client/node_modules/mingo/dist/esm/operators/expression/bitwise/bitNot.js +2 -4
  213. package/rust-client/node_modules/mingo/dist/esm/operators/expression/boolean/not.js +4 -6
  214. package/rust-client/node_modules/mingo/dist/esm/operators/expression/comparison/cmp.js +6 -5
  215. package/rust-client/node_modules/mingo/dist/esm/operators/expression/conditional/cond.js +2 -2
  216. package/rust-client/node_modules/mingo/dist/esm/operators/expression/conditional/ifNull.js +1 -1
  217. package/rust-client/node_modules/mingo/dist/esm/operators/expression/conditional/switch.js +1 -2
  218. package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/_internal.js +140 -61
  219. package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/dateAdd.js +2 -35
  220. package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/dateDiff.js +43 -21
  221. package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/dateFromParts.js +2 -4
  222. package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/dateFromString.js +13 -11
  223. package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/dateToString.js +2 -4
  224. package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/dateTrunc.js +97 -0
  225. package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/dayOfYear.js +2 -2
  226. package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/index.js +1 -0
  227. package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/isoWeekYear.js +2 -5
  228. package/rust-client/node_modules/mingo/dist/esm/operators/expression/date/week.js +1 -2
  229. package/rust-client/node_modules/mingo/dist/esm/operators/expression/misc/getField.js +1 -2
  230. package/rust-client/node_modules/mingo/dist/esm/operators/expression/object/mergeObjects.js +10 -3
  231. package/rust-client/node_modules/mingo/dist/esm/operators/expression/object/objectToArray.js +6 -2
  232. package/rust-client/node_modules/mingo/dist/esm/operators/expression/object/setField.js +11 -7
  233. package/rust-client/node_modules/mingo/dist/esm/operators/expression/set/setDifference.js +10 -2
  234. package/rust-client/node_modules/mingo/dist/esm/operators/expression/set/setEquals.js +18 -4
  235. package/rust-client/node_modules/mingo/dist/esm/operators/expression/set/setIntersection.js +3 -2
  236. package/rust-client/node_modules/mingo/dist/esm/operators/expression/set/setIsSubset.js +16 -2
  237. package/rust-client/node_modules/mingo/dist/esm/operators/expression/set/setUnion.js +5 -6
  238. package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/_internal.js +4 -8
  239. package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/concat.js +6 -3
  240. package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/indexOfBytes.js +2 -4
  241. package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/replaceAll.js +1 -2
  242. package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/replaceOne.js +1 -2
  243. package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/split.js +1 -2
  244. package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/strcasecmp.js +1 -2
  245. package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/substr.js +4 -14
  246. package/rust-client/node_modules/mingo/dist/esm/operators/expression/string/substrBytes.js +2 -4
  247. package/rust-client/node_modules/mingo/dist/esm/operators/expression/trignometry/atan2.js +2 -4
  248. package/rust-client/node_modules/mingo/dist/esm/operators/expression/trignometry/cosh.js +0 -1
  249. package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/_internal.js +17 -11
  250. package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/convert.js +3 -5
  251. package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/toBool.js +2 -4
  252. package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/toDate.js +4 -7
  253. package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/toDouble.js +6 -11
  254. package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/toInt.js +2 -5
  255. package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/toLong.js +2 -5
  256. package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/toString.js +12 -11
  257. package/rust-client/node_modules/mingo/dist/esm/operators/expression/type/type.js +12 -15
  258. package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/addFields.js +1 -2
  259. package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/bucket.js +54 -61
  260. package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/bucketAuto.js +679 -66
  261. package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/count.js +3 -3
  262. package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/densify.js +183 -0
  263. package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/graphLookup.js +55 -0
  264. package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/group.js +6 -9
  265. package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/index.js +2 -0
  266. package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/limit.js +1 -3
  267. package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/lookup.js +55 -11
  268. package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/merge.js +9 -14
  269. package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/out.js +2 -2
  270. package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/project.js +21 -42
  271. package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/redact.js +3 -1
  272. package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/replaceWith.js +9 -2
  273. package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/sample.js +1 -2
  274. package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/setWindowFields.js +12 -23
  275. package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/skip.js +1 -1
  276. package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/sort.js +11 -20
  277. package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/sortByCount.js +5 -3
  278. package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/unionWith.js +2 -2
  279. package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/unset.js +1 -2
  280. package/rust-client/node_modules/mingo/dist/esm/operators/pipeline/unwind.js +6 -9
  281. package/rust-client/node_modules/mingo/dist/esm/operators/projection/elemMatch.js +3 -4
  282. package/rust-client/node_modules/mingo/dist/esm/operators/projection/slice.js +2 -3
  283. package/rust-client/node_modules/mingo/dist/esm/operators/query/bitwise/_internal.js +4 -4
  284. package/rust-client/node_modules/mingo/dist/esm/operators/update/_internal.js +9 -14
  285. package/rust-client/node_modules/mingo/dist/esm/operators/update/addToSet.js +1 -2
  286. package/rust-client/node_modules/mingo/dist/esm/operators/update/bit.js +1 -2
  287. package/rust-client/node_modules/mingo/dist/esm/operators/update/max.js +1 -2
  288. package/rust-client/node_modules/mingo/dist/esm/operators/update/min.js +1 -2
  289. package/rust-client/node_modules/mingo/dist/esm/operators/update/pop.js +1 -2
  290. package/rust-client/node_modules/mingo/dist/esm/operators/update/pull.js +2 -4
  291. package/rust-client/node_modules/mingo/dist/esm/operators/update/push.js +3 -9
  292. package/rust-client/node_modules/mingo/dist/esm/operators/update/rename.js +1 -2
  293. package/rust-client/node_modules/mingo/dist/esm/operators/update/set.js +1 -2
  294. package/rust-client/node_modules/mingo/dist/esm/operators/update/unset.js +1 -2
  295. package/rust-client/node_modules/mingo/dist/esm/operators/window/_internal.js +2 -3
  296. package/rust-client/node_modules/mingo/dist/esm/operators/window/denseRank.js +8 -10
  297. package/rust-client/node_modules/mingo/dist/esm/operators/window/derivative.js +4 -6
  298. package/rust-client/node_modules/mingo/dist/esm/operators/window/documentNumber.js +1 -3
  299. package/rust-client/node_modules/mingo/dist/esm/operators/window/expMovingAvg.js +4 -6
  300. package/rust-client/node_modules/mingo/dist/esm/operators/window/integral.js +3 -4
  301. package/rust-client/node_modules/mingo/dist/esm/operators/window/linearFill.js +4 -6
  302. package/rust-client/node_modules/mingo/dist/esm/operators/window/locf.js +3 -4
  303. package/rust-client/node_modules/mingo/dist/esm/operators/window/rank.js +8 -10
  304. package/rust-client/node_modules/mingo/dist/esm/operators/window/shift.js +2 -2
  305. package/rust-client/node_modules/mingo/dist/esm/query.js +22 -32
  306. package/rust-client/node_modules/mingo/dist/esm/types.js +14 -0
  307. package/rust-client/node_modules/mingo/dist/esm/updater.js +5 -5
  308. package/rust-client/node_modules/mingo/dist/esm/util.js +263 -377
  309. package/rust-client/node_modules/mingo/dist/types/aggregator.d.ts +7 -9
  310. package/rust-client/node_modules/mingo/dist/types/core.d.ts +41 -52
  311. package/rust-client/node_modules/mingo/dist/types/cursor.d.ts +6 -12
  312. package/rust-client/node_modules/mingo/dist/types/index.d.ts +8 -4
  313. package/rust-client/node_modules/mingo/dist/types/init/basic.d.ts +1 -6
  314. package/rust-client/node_modules/mingo/dist/types/lazy.d.ts +19 -15
  315. package/rust-client/node_modules/mingo/dist/types/operators/_predicates.d.ts +20 -20
  316. package/rust-client/node_modules/mingo/dist/types/operators/accumulator/accumulator.d.ts +1 -1
  317. package/rust-client/node_modules/mingo/dist/types/operators/accumulator/addToSet.d.ts +1 -1
  318. package/rust-client/node_modules/mingo/dist/types/operators/accumulator/avg.d.ts +1 -1
  319. package/rust-client/node_modules/mingo/dist/types/operators/accumulator/bottom.d.ts +2 -2
  320. package/rust-client/node_modules/mingo/dist/types/operators/accumulator/bottomN.d.ts +4 -4
  321. package/rust-client/node_modules/mingo/dist/types/operators/accumulator/count.d.ts +1 -1
  322. package/rust-client/node_modules/mingo/dist/types/operators/accumulator/covariancePop.d.ts +1 -1
  323. package/rust-client/node_modules/mingo/dist/types/operators/accumulator/covarianceSamp.d.ts +1 -1
  324. package/rust-client/node_modules/mingo/dist/types/operators/accumulator/first.d.ts +2 -2
  325. package/rust-client/node_modules/mingo/dist/types/operators/accumulator/firstN.d.ts +1 -1
  326. package/rust-client/node_modules/mingo/dist/types/operators/accumulator/last.d.ts +4 -4
  327. package/rust-client/node_modules/mingo/dist/types/operators/accumulator/lastN.d.ts +1 -1
  328. package/rust-client/node_modules/mingo/dist/types/operators/accumulator/max.d.ts +4 -5
  329. package/rust-client/node_modules/mingo/dist/types/operators/accumulator/maxN.d.ts +1 -1
  330. package/rust-client/node_modules/mingo/dist/types/operators/accumulator/mergeObjects.d.ts +1 -1
  331. package/rust-client/node_modules/mingo/dist/types/operators/accumulator/min.d.ts +4 -5
  332. package/rust-client/node_modules/mingo/dist/types/operators/accumulator/minN.d.ts +1 -1
  333. package/rust-client/node_modules/mingo/dist/types/operators/accumulator/percentile.d.ts +1 -1
  334. package/rust-client/node_modules/mingo/dist/types/operators/accumulator/push.d.ts +4 -4
  335. package/rust-client/node_modules/mingo/dist/types/operators/accumulator/stdDevPop.d.ts +1 -1
  336. package/rust-client/node_modules/mingo/dist/types/operators/accumulator/stdDevSamp.d.ts +1 -1
  337. package/rust-client/node_modules/mingo/dist/types/operators/accumulator/sum.d.ts +5 -3
  338. package/rust-client/node_modules/mingo/dist/types/operators/accumulator/top.d.ts +2 -2
  339. package/rust-client/node_modules/mingo/dist/types/operators/accumulator/topN.d.ts +4 -4
  340. package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/add.d.ts +1 -1
  341. package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/multiply.d.ts +1 -1
  342. package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/pow.d.ts +1 -1
  343. package/rust-client/node_modules/mingo/dist/types/operators/expression/arithmetic/subtract.d.ts +1 -0
  344. package/rust-client/node_modules/mingo/dist/types/operators/expression/array/arrayElemAt.d.ts +1 -1
  345. package/rust-client/node_modules/mingo/dist/types/operators/expression/array/concatArrays.d.ts +3 -3
  346. package/rust-client/node_modules/mingo/dist/types/operators/expression/array/filter.d.ts +1 -1
  347. package/rust-client/node_modules/mingo/dist/types/operators/expression/array/first.d.ts +0 -4
  348. package/rust-client/node_modules/mingo/dist/types/operators/expression/array/firstN.d.ts +1 -1
  349. package/rust-client/node_modules/mingo/dist/types/operators/expression/array/in.d.ts +2 -2
  350. package/rust-client/node_modules/mingo/dist/types/operators/expression/array/indexOfArray.d.ts +1 -1
  351. package/rust-client/node_modules/mingo/dist/types/operators/expression/array/isArray.d.ts +1 -1
  352. package/rust-client/node_modules/mingo/dist/types/operators/expression/array/last.d.ts +0 -4
  353. package/rust-client/node_modules/mingo/dist/types/operators/expression/array/lastN.d.ts +1 -1
  354. package/rust-client/node_modules/mingo/dist/types/operators/expression/array/map.d.ts +1 -1
  355. package/rust-client/node_modules/mingo/dist/types/operators/expression/array/maxN.d.ts +1 -1
  356. package/rust-client/node_modules/mingo/dist/types/operators/expression/array/minN.d.ts +1 -1
  357. package/rust-client/node_modules/mingo/dist/types/operators/expression/array/range.d.ts +1 -1
  358. package/rust-client/node_modules/mingo/dist/types/operators/expression/array/reduce.d.ts +2 -2
  359. package/rust-client/node_modules/mingo/dist/types/operators/expression/array/reverseArray.d.ts +1 -1
  360. package/rust-client/node_modules/mingo/dist/types/operators/expression/array/slice.d.ts +1 -1
  361. package/rust-client/node_modules/mingo/dist/types/operators/expression/date/_internal.d.ts +31 -9
  362. package/rust-client/node_modules/mingo/dist/types/operators/expression/date/dateFromString.d.ts +2 -2
  363. package/rust-client/node_modules/mingo/dist/types/operators/expression/date/dateToParts.d.ts +2 -2
  364. package/rust-client/node_modules/mingo/dist/types/operators/expression/date/dateTrunc.d.ts +12 -0
  365. package/rust-client/node_modules/mingo/dist/types/operators/expression/date/index.d.ts +1 -0
  366. package/rust-client/node_modules/mingo/dist/types/operators/expression/misc/rand.d.ts +2 -2
  367. package/rust-client/node_modules/mingo/dist/types/operators/expression/object/mergeObjects.d.ts +2 -2
  368. package/rust-client/node_modules/mingo/dist/types/operators/expression/percentile.d.ts +1 -1
  369. package/rust-client/node_modules/mingo/dist/types/operators/expression/set/setIsSubset.d.ts +3 -1
  370. package/rust-client/node_modules/mingo/dist/types/operators/expression/string/_internal.d.ts +4 -4
  371. package/rust-client/node_modules/mingo/dist/types/operators/expression/string/indexOfBytes.d.ts +1 -1
  372. package/rust-client/node_modules/mingo/dist/types/operators/expression/string/replaceAll.d.ts +1 -1
  373. package/rust-client/node_modules/mingo/dist/types/operators/expression/string/replaceOne.d.ts +1 -1
  374. package/rust-client/node_modules/mingo/dist/types/operators/expression/string/split.d.ts +1 -1
  375. package/rust-client/node_modules/mingo/dist/types/operators/expression/string/strLenBytes.d.ts +1 -1
  376. package/rust-client/node_modules/mingo/dist/types/operators/expression/string/strLenCP.d.ts +1 -1
  377. package/rust-client/node_modules/mingo/dist/types/operators/expression/string/substrBytes.d.ts +2 -0
  378. package/rust-client/node_modules/mingo/dist/types/operators/expression/type/_internal.d.ts +6 -2
  379. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/_internal.d.ts +4 -4
  380. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/addFields.d.ts +8 -5
  381. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/bucket.d.ts +8 -5
  382. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/bucketAuto.d.ts +8 -7
  383. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/count.d.ts +7 -5
  384. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/densify.d.ts +12 -0
  385. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/facet.d.ts +7 -1
  386. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/fill.d.ts +6 -3
  387. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/graphLookup.d.ts +13 -0
  388. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/group.d.ts +4 -2
  389. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/index.d.ts +2 -0
  390. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/limit.d.ts +3 -1
  391. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/lookup.d.ts +4 -2
  392. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/match.d.ts +4 -3
  393. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/merge.d.ts +3 -5
  394. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/out.d.ts +5 -3
  395. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/project.d.ts +4 -3
  396. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/redact.d.ts +1 -1
  397. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/replaceRoot.d.ts +5 -5
  398. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/replaceWith.d.ts +8 -1
  399. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/sample.d.ts +7 -5
  400. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/setWindowFields.d.ts +7 -5
  401. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/skip.d.ts +6 -4
  402. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/sort.d.ts +5 -3
  403. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/sortByCount.d.ts +5 -5
  404. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/unionWith.d.ts +3 -1
  405. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/unset.d.ts +2 -0
  406. package/rust-client/node_modules/mingo/dist/types/operators/pipeline/unwind.d.ts +5 -2
  407. package/rust-client/node_modules/mingo/dist/types/operators/query/evaluation/expr.d.ts +2 -2
  408. package/rust-client/node_modules/mingo/dist/types/operators/query/evaluation/jsonSchema.d.ts +2 -2
  409. package/rust-client/node_modules/mingo/dist/types/operators/query/evaluation/where.d.ts +2 -2
  410. package/rust-client/node_modules/mingo/dist/types/operators/update/_internal.d.ts +5 -5
  411. package/rust-client/node_modules/mingo/dist/types/operators/update/addToSet.d.ts +2 -2
  412. package/rust-client/node_modules/mingo/dist/types/operators/update/bit.d.ts +2 -2
  413. package/rust-client/node_modules/mingo/dist/types/operators/update/currentDate.d.ts +2 -2
  414. package/rust-client/node_modules/mingo/dist/types/operators/update/inc.d.ts +2 -2
  415. package/rust-client/node_modules/mingo/dist/types/operators/update/max.d.ts +2 -2
  416. package/rust-client/node_modules/mingo/dist/types/operators/update/min.d.ts +2 -2
  417. package/rust-client/node_modules/mingo/dist/types/operators/update/mul.d.ts +2 -2
  418. package/rust-client/node_modules/mingo/dist/types/operators/update/pop.d.ts +2 -2
  419. package/rust-client/node_modules/mingo/dist/types/operators/update/pull.d.ts +2 -2
  420. package/rust-client/node_modules/mingo/dist/types/operators/update/pullAll.d.ts +2 -2
  421. package/rust-client/node_modules/mingo/dist/types/operators/update/push.d.ts +2 -2
  422. package/rust-client/node_modules/mingo/dist/types/operators/update/rename.d.ts +2 -2
  423. package/rust-client/node_modules/mingo/dist/types/operators/update/set.d.ts +2 -2
  424. package/rust-client/node_modules/mingo/dist/types/operators/update/unset.d.ts +2 -2
  425. package/rust-client/node_modules/mingo/dist/types/operators/window/_internal.d.ts +5 -5
  426. package/rust-client/node_modules/mingo/dist/types/operators/window/denseRank.d.ts +2 -3
  427. package/rust-client/node_modules/mingo/dist/types/operators/window/derivative.d.ts +2 -3
  428. package/rust-client/node_modules/mingo/dist/types/operators/window/documentNumber.d.ts +2 -2
  429. package/rust-client/node_modules/mingo/dist/types/operators/window/expMovingAvg.d.ts +2 -2
  430. package/rust-client/node_modules/mingo/dist/types/operators/window/integral.d.ts +2 -2
  431. package/rust-client/node_modules/mingo/dist/types/operators/window/linearFill.d.ts +2 -2
  432. package/rust-client/node_modules/mingo/dist/types/operators/window/locf.d.ts +2 -2
  433. package/rust-client/node_modules/mingo/dist/types/operators/window/rank.d.ts +2 -2
  434. package/rust-client/node_modules/mingo/dist/types/operators/window/shift.d.ts +2 -2
  435. package/rust-client/node_modules/mingo/dist/types/query.d.ts +5 -7
  436. package/rust-client/node_modules/mingo/dist/types/types.d.ts +18 -15
  437. package/rust-client/node_modules/mingo/dist/types/updater.d.ts +9 -10
  438. package/rust-client/node_modules/mingo/dist/types/util.d.ts +102 -90
  439. package/rust-client/node_modules/mingo/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { Options } from "./core";
2
2
  import { Iterator, Source } from "./lazy";
3
- import { RawObject } from "./types";
3
+ import { AnyObject } from "./types";
4
4
  /**
5
5
  * Provides functionality for the mongoDB aggregation pipeline
6
6
  *
@@ -9,21 +9,19 @@ import { RawObject } from "./types";
9
9
  * @constructor
10
10
  */
11
11
  export declare class Aggregator {
12
- private readonly pipeline;
13
- private readonly options;
14
- constructor(pipeline: Array<RawObject>, options?: Partial<Options>);
12
+ #private;
13
+ constructor(pipeline: AnyObject[], options?: Partial<Options>);
15
14
  /**
16
- * Returns an `Lazy` iterator for processing results of pipeline
15
+ * Returns an {@link Iterator} for lazy evaluation of the pipeline.
17
16
  *
18
17
  * @param {*} collection An array or iterator object
19
18
  * @returns {Iterator} an iterator object
20
19
  */
21
- stream(collection: Source): Iterator;
20
+ stream(collection: Source, options?: Options): Iterator;
22
21
  /**
23
22
  * Return the results of the aggregation as an array.
24
23
  *
25
- * @param {*} collection
26
- * @param {*} query
24
+ * @param collection
27
25
  */
28
- run<T extends RawObject>(collection: Source): T[];
26
+ run<T extends AnyObject>(collection: Source, options?: Options): T[];
29
27
  }
@@ -1,11 +1,11 @@
1
1
  import { Iterator } from "./lazy";
2
- import { AnyVal, Callback, HashFunction, Predicate, RawArray, RawObject, WindowOperatorInput } from "./types";
2
+ import { Any, AnyObject, Callback, HashFunction, Predicate, WindowOperatorInput } from "./types";
3
3
  /**
4
4
  * Resolves the given string to a Collection.
5
5
  * This is useful for operators that require a second collection to use such as $lookup and $out.
6
6
  * The collection is not cached and will be resolved each time it is used.
7
7
  */
8
- export type CollectionResolver = (name: string) => Array<RawObject>;
8
+ export type CollectionResolver = (name: string) => AnyObject[];
9
9
  /** Specification for collation options */
10
10
  export interface CollationSpec {
11
11
  readonly locale: string;
@@ -20,7 +20,7 @@ export interface CollationSpec {
20
20
  /**
21
21
  * JSON schema validator
22
22
  */
23
- export type JsonSchemaValidator = (schema: RawObject) => Predicate<RawObject>;
23
+ export type JsonSchemaValidator = (schema: AnyObject) => Predicate<AnyObject>;
24
24
  /**
25
25
  * This controls how input and output documents are processed to meet different application needs.
26
26
  * Each mode has different trade offs for; immutability, reference sharing, and performance.
@@ -78,24 +78,19 @@ export interface Options {
78
78
  /** JSON schema validator to use with the '$jsonSchema' operator. Required in order to use the operator. */
79
79
  readonly jsonSchemaValidator?: JsonSchemaValidator;
80
80
  /** Global variables. */
81
- readonly variables?: Readonly<RawObject>;
81
+ readonly variables?: Readonly<AnyObject>;
82
82
  /** Extra references to operators to be used for processing. */
83
83
  readonly context: Context;
84
84
  }
85
85
  interface LocalData {
86
86
  /** The groupId computed for a group of documents. */
87
- readonly groupId?: AnyVal;
87
+ readonly groupId?: Any;
88
88
  /** Local user-defind variables. */
89
- readonly variables?: RawObject;
89
+ readonly variables?: AnyObject;
90
90
  }
91
91
  /** Custom type to facilitate type checking for global options */
92
92
  export declare class ComputeOptions implements Options {
93
- private _opts;
94
- /** Reference to the root object when processing subgraphs of the object. */
95
- private _root;
96
- private _local?;
97
- /** The current time in milliseconds. Remains the same throughout all stages of the aggregation pipeline. */
98
- readonly timestamp: number;
93
+ #private;
99
94
  private constructor();
100
95
  /**
101
96
  * Initialize new ComputeOptions.
@@ -105,9 +100,15 @@ export declare class ComputeOptions implements Options {
105
100
  * @param local
106
101
  * @returns {ComputeOptions}
107
102
  */
108
- static init(options: Options, root?: AnyVal, local?: LocalData): ComputeOptions;
109
- /** Updates the internal mutable state. */
110
- update(root?: AnyVal, local?: LocalData): ComputeOptions;
103
+ static init(options: Options, root?: Any, local?: LocalData): ComputeOptions;
104
+ /**
105
+ * Updates the internal state.
106
+ *
107
+ * @param root The new root context for this object.
108
+ * @param local The new local state to merge into current if it exists.
109
+ * @returns
110
+ */
111
+ update(root?: Any, local?: LocalData): ComputeOptions;
111
112
  getOptions(): Options;
112
113
  get root(): unknown;
113
114
  get local(): LocalData;
@@ -120,14 +121,14 @@ export declare class ComputeOptions implements Options {
120
121
  get hashFunction(): HashFunction;
121
122
  get collectionResolver(): CollectionResolver;
122
123
  get jsonSchemaValidator(): JsonSchemaValidator;
123
- get variables(): Readonly<RawObject>;
124
+ get variables(): Readonly<AnyObject>;
124
125
  get context(): Context;
125
126
  }
126
127
  /**
127
128
  * Creates an Option from another where required keys are initialized.
128
129
  * @param options Options
129
130
  */
130
- export declare function initOptions(options: Partial<Options>): Options;
131
+ export declare function initOptions(options?: Partial<Options>): Options;
131
132
  /**
132
133
  * Supported cloning modes.
133
134
  * - "deep": Performs a recursive deep clone of the object.
@@ -152,63 +153,51 @@ export declare enum OperatorType {
152
153
  QUERY = "query",
153
154
  WINDOW = "window"
154
155
  }
155
- export type AccumulatorOperator<R = AnyVal> = (collection: RawArray, expr: AnyVal, options: Options) => R;
156
- export type ExpressionOperator<R = AnyVal> = (obj: RawObject, expr: AnyVal, options: Options) => R;
157
- export type PipelineOperator = (collection: Iterator, expr: AnyVal, options: Options) => Iterator;
158
- export type ProjectionOperator = (obj: RawObject, expr: AnyVal, selector: string, options: Options) => AnyVal;
159
- export type QueryOperator = (selector: string, value: AnyVal, options: Options) => (obj: RawObject) => boolean;
160
- export type WindowOperator = (obj: RawObject, array: RawObject[], expr: WindowOperatorInput, options: Options) => AnyVal;
156
+ export type AccumulatorOperator<R = Any> = (collection: Any[], expr: Any, options: Options) => R;
157
+ export type ExpressionOperator<R = Any> = (obj: AnyObject, expr: Any, options: Options) => R;
158
+ export type PipelineOperator = (collection: Iterator, expr: Any, options: Options) => Iterator;
159
+ export type ProjectionOperator = (obj: AnyObject, expr: Any, selector: string, options: Options) => Any;
160
+ export type QueryOperator = (selector: string, value: Any, options: Options) => (obj: AnyObject) => boolean;
161
+ export type WindowOperator = (obj: AnyObject, array: AnyObject[], expr: WindowOperatorInput, options: Options) => Any;
161
162
  /** Interface for update operators */
162
- export type UpdateOperator = (obj: RawObject, expr: RawObject, arrayFilters: RawObject[], options: UpdateOptions) => string[];
163
- export type Operator = AccumulatorOperator | ExpressionOperator | PipelineOperator | ProjectionOperator | QueryOperator | WindowOperator;
164
- /** Map of operator functions */
165
- export type OperatorMap = Record<string, Operator>;
166
- type ContextMap = Partial<{
167
- [OperatorType.ACCUMULATOR]: Record<string, AccumulatorOperator>;
168
- [OperatorType.EXPRESSION]: Record<string, ExpressionOperator>;
169
- [OperatorType.PIPELINE]: Record<string, PipelineOperator>;
170
- [OperatorType.PROJECTION]: Record<string, ProjectionOperator>;
171
- [OperatorType.QUERY]: Record<string, QueryOperator>;
172
- [OperatorType.WINDOW]: Record<string, WindowOperator>;
173
- }>;
163
+ export type UpdateOperator = (obj: AnyObject, expr: AnyObject, arrayFilters: AnyObject[], options: UpdateOptions) => string[];
164
+ type Operator = AccumulatorOperator | ExpressionOperator | PipelineOperator | ProjectionOperator | QueryOperator | WindowOperator;
174
165
  type AccumulatorOps = Record<string, AccumulatorOperator>;
175
166
  type ExpressionOps = Record<string, ExpressionOperator>;
176
167
  type ProjectionOps = Record<string, ProjectionOperator>;
177
168
  type QueryOps = Record<string, QueryOperator>;
178
169
  type PipelineOps = Record<string, PipelineOperator>;
179
170
  type WindowOps = Record<string, WindowOperator>;
171
+ /** Kinds of operators that can be registered. */
172
+ export type OpType = "accumulator" | "expression" | "pipeline" | "projection" | "query" | "window";
180
173
  export declare class Context {
181
- private readonly operators;
174
+ #private;
182
175
  private constructor();
183
- static init(ops?: ContextMap): Context;
184
- static from(ctx: Context): Context;
176
+ static init(): Context;
177
+ static from(ctx?: Context): Context;
185
178
  private addOperators;
179
+ getOperator(type: OpType, name: string): Callback | null;
186
180
  addAccumulatorOps(ops: AccumulatorOps): Context;
187
181
  addExpressionOps(ops: ExpressionOps): Context;
188
182
  addQueryOps(ops: QueryOps): Context;
189
183
  addPipelineOps(ops: PipelineOps): Context;
190
184
  addProjectionOps(ops: ProjectionOps): Context;
191
185
  addWindowOps(ops: WindowOps): Context;
192
- getOperator(type: OperatorType, name: string): Callback | null;
193
186
  }
194
187
  /**
195
- * Register fully specified operators for the given operator class.
196
- *
197
- * @param type The operator type
198
- * @param operators Map of the operators
199
- */
200
- export declare function useOperators(type: OperatorType, operators: OperatorMap): void;
201
- /**
202
- * Overrides the current global context with this new one.
188
+ * Register global operators that are available when {@link Options.useGlobalContext} is enabled.
203
189
  *
204
- * @param context The new context to override the global one with.
190
+ * @param type Operator type
191
+ * @param operators Map of operator name to functions
205
192
  */
193
+ export declare function useOperators(type: OpType, operators: Record<string, Operator>): void;
206
194
  /**
207
195
  * Returns the operator function or undefined if it is not found
208
196
  * @param type Type of operator
209
- * @param operator Name of the operator
197
+ * @param name Name of the operator
198
+ * @param options
210
199
  */
211
- export declare function getOperator(type: OperatorType, operator: string, options: Pick<Options, "useGlobalContext" | "context">): Operator;
200
+ export declare function getOperator(type: OpType, name: string, options: Pick<Options, "useGlobalContext" | "context">): Operator;
212
201
  /**
213
202
  * Computes the value of the expression on the object for the given operator
214
203
  *
@@ -218,7 +207,7 @@ export declare function getOperator(type: OperatorType, operator: string, option
218
207
  * @param options {Object} extra options
219
208
  * @returns {*}
220
209
  */
221
- export declare function computeValue(obj: AnyVal, expr: AnyVal, operator: string | null, options?: Options): AnyVal;
210
+ export declare function computeValue(obj: Any, expr: Any, operator: string | null, options?: Options): Any;
222
211
  /**
223
212
  * Redact an object
224
213
  * @param {Object} obj The object to redact
@@ -226,5 +215,5 @@ export declare function computeValue(obj: AnyVal, expr: AnyVal, operator: string
226
215
  * @param {*} options Options for value
227
216
  * @return {*} returns the result of the redacted object
228
217
  */
229
- export declare function redact(obj: RawObject, expr: AnyVal, options: ComputeOptions): AnyVal;
218
+ export declare function redact(obj: AnyObject, expr: Any, options: ComputeOptions): Any;
230
219
  export {};
@@ -1,6 +1,6 @@
1
1
  import { CollationSpec, Options } from "./core";
2
2
  import { Iterator, Source } from "./lazy";
3
- import { AnyVal, Callback, Predicate, RawObject } from "./types";
3
+ import { Any, AnyObject, Callback, Predicate } from "./types";
4
4
  /**
5
5
  * Cursor to iterate and perform filtering on matched objects.
6
6
  * This object must not be used directly. A cursor may be obtaine from calling `find()` on an instance of `Query`.
@@ -12,14 +12,8 @@ import { AnyVal, Callback, Predicate, RawObject } from "./types";
12
12
  * @constructor
13
13
  */
14
14
  export declare class Cursor<T> {
15
- readonly source: Source;
16
- readonly predicate: Predicate<AnyVal>;
17
- readonly projection: RawObject;
18
- private options?;
19
- private readonly operators;
20
- private result;
21
- private buffer;
22
- constructor(source: Source, predicate: Predicate<AnyVal>, projection: RawObject, options?: Options);
15
+ #private;
16
+ constructor(source: Source, predicate: Predicate<Any>, projection: AnyObject, options?: Options);
23
17
  /** Returns the iterator from running the query */
24
18
  private fetch;
25
19
  /** Returns an iterator with the buffered data included */
@@ -48,10 +42,10 @@ export declare class Cursor<T> {
48
42
  limit(n: number): Cursor<T>;
49
43
  /**
50
44
  * Returns results ordered according to a sort specification.
51
- * @param {Object} modifier an object of key and values specifying the sort order. 1 for ascending and -1 for descending
45
+ * @param {AnyObject} modifier an object of key and values specifying the sort order. 1 for ascending and -1 for descending
52
46
  * @return {Cursor} Returns the cursor, so you can chain this call.
53
47
  */
54
- sort(modifier: RawObject): Cursor<T>;
48
+ sort(modifier: AnyObject): Cursor<T>;
55
49
  /**
56
50
  * Specifies the collation for the cursor returned by the `mingo.Query.find`
57
51
  * @param {*} spec
@@ -59,7 +53,7 @@ export declare class Cursor<T> {
59
53
  collation(spec: CollationSpec): Cursor<T>;
60
54
  /**
61
55
  * Returns the next document in a cursor.
62
- * @returns {Object | Boolean}
56
+ * @returns {AnyObject | Boolean}
63
57
  */
64
58
  next(): T;
65
59
  /**
@@ -4,9 +4,11 @@ import { Options } from "./core";
4
4
  import { Cursor } from "./cursor";
5
5
  import { Source } from "./lazy";
6
6
  import { Query } from "./query";
7
- import { RawObject } from "./types";
7
+ import { AnyObject } from "./types";
8
+ import { createUpdater } from "./updater";
8
9
  export { Aggregator } from "./aggregator";
9
10
  export { Query } from "./query";
11
+ export { createUpdater, update } from "./updater";
10
12
  /**
11
13
  * Performs a query on a collection and returns a cursor object.
12
14
  * Shorthand for `Query(criteria).find(collection, projection)`
@@ -17,7 +19,7 @@ export { Query } from "./query";
17
19
  * @param options
18
20
  * @returns {Cursor} A cursor of results
19
21
  */
20
- export declare function find<T>(collection: Source, criteria: RawObject, projection?: RawObject, options?: Partial<Options>): Cursor<T>;
22
+ export declare function find<T>(collection: Source, criteria: AnyObject, projection?: AnyObject, options?: Partial<Options>): Cursor<T>;
21
23
  /**
22
24
  * Returns a new array without objects which match the criteria
23
25
  *
@@ -26,7 +28,7 @@ export declare function find<T>(collection: Source, criteria: RawObject, project
26
28
  * @param options
27
29
  * @returns {Array} New filtered array
28
30
  */
29
- export declare function remove(collection: RawObject[], criteria: RawObject, options?: Options): RawObject[];
31
+ export declare function remove(collection: AnyObject[], criteria: AnyObject, options?: Options): AnyObject[];
30
32
  /**
31
33
  * Return the result collection after running the aggregation pipeline for the given collection.
32
34
  * Shorthand for `(new Aggregator(pipeline, options)).run(collection)`
@@ -36,12 +38,14 @@ export declare function remove(collection: RawObject[], criteria: RawObject, opt
36
38
  * @param options
37
39
  * @returns {Array} New array of results
38
40
  */
39
- export declare function aggregate(collection: Source, pipeline: RawObject[], options?: Partial<Options>): RawObject[];
41
+ export declare function aggregate(collection: Source, pipeline: AnyObject[], options?: Partial<Options>): AnyObject[];
40
42
  declare const _default: {
41
43
  Aggregator: typeof Aggregator;
42
44
  Query: typeof Query;
43
45
  aggregate: typeof aggregate;
46
+ createUpdater: typeof createUpdater;
44
47
  find: typeof find;
45
48
  remove: typeof remove;
49
+ update: import("./updater").Updater;
46
50
  };
47
51
  export default _default;
@@ -1,6 +1 @@
1
- /**
2
- * Loads all Query and Projection operators
3
- */
4
- import { Context } from "../core";
5
- /** The basic context for queries. */
6
- export declare const BASIC_CONTEXT: Context;
1
+ export {};
@@ -1,9 +1,9 @@
1
- import { AnyVal, Callback, Predicate, RawArray } from "./types";
1
+ import { Any, Callback, Predicate } from "./types";
2
2
  /**
3
3
  * A value produced by a generator
4
4
  */
5
- interface IteratorResult {
6
- readonly value?: AnyVal;
5
+ export interface IteratorResult<T = Any> {
6
+ readonly value?: T;
7
7
  readonly done: boolean;
8
8
  }
9
9
  /**
@@ -12,20 +12,24 @@ interface IteratorResult {
12
12
  interface Generator<T> {
13
13
  next: () => T;
14
14
  }
15
- export type Source = Generator<IteratorResult> | Callback<IteratorResult> | RawArray;
15
+ export type Source = Generator<IteratorResult> | Callback<IteratorResult> | Any[];
16
16
  /**
17
17
  * Returns an iterator
18
18
  * @param {*} source An iterable source (Array, Function, Generator, or Iterator)
19
19
  */
20
20
  export declare function Lazy(source: Source): Iterator;
21
- export declare function compose(...iterators: Iterator[]): Iterator;
21
+ /**
22
+ * Concatenate multiple iterators and return a new iterator.
23
+ *
24
+ * @param iterators The iterators to concatenate
25
+ * @returns {Iterator} A new iterator
26
+ */
27
+ export declare function concat(...iterators: Iterator[]): Iterator;
22
28
  /**
23
29
  * A lazy collection iterator yields a single value at a time upon request.
24
30
  */
25
31
  export declare class Iterator {
26
- private readonly iteratees;
27
- private readonly yieldedValues;
28
- private getNext;
32
+ #private;
29
33
  private isDone;
30
34
  /**
31
35
  * @param {*} source An iterable object or function.
@@ -39,17 +43,17 @@ export declare class Iterator {
39
43
  * Add an iteratee to this lazy sequence
40
44
  */
41
45
  private push;
42
- next(): IteratorResult;
46
+ next<T = Any>(): IteratorResult<T>;
43
47
  /**
44
48
  * Transform each item in the sequence to a new value
45
49
  * @param {Function} f
46
50
  */
47
- map<T = AnyVal>(f: Callback<T>): Iterator;
51
+ map<T = Any>(f: Callback<T>): Iterator;
48
52
  /**
49
53
  * Select only items matching the given predicate
50
54
  * @param {Function} pred
51
55
  */
52
- filter<T = AnyVal>(predicate: Predicate<T>): Iterator;
56
+ filter<T = Any>(predicate: Predicate<T>): Iterator;
53
57
  /**
54
58
  * Take given numbe for values from sequence
55
59
  * @param {Number} n A number greater than 0
@@ -64,9 +68,9 @@ export declare class Iterator {
64
68
  * Returns a new lazy object with results of the transformation
65
69
  * The entire sequence is realized.
66
70
  *
67
- * @param {Callback<Source, RawArray>} fn Tranform function of type (Array) => (Any)
71
+ * @param {Callback<Source, Any[]>} fn Tranform function of type (Array) => (Any)
68
72
  */
69
- transform(fn: Callback<Source, RawArray>): Iterator;
73
+ transform(fn: Callback<Source, Any[]>): Iterator;
70
74
  /**
71
75
  * Returns the fully realized values of the iterators.
72
76
  * The return value will be an array unless `lazy.first()` was used.
@@ -78,14 +82,14 @@ export declare class Iterator {
78
82
  * @param {Function} f
79
83
  * @returns {Boolean} false iff `f` return false for AnyVal execution, otherwise true
80
84
  */
81
- each<T = AnyVal>(f: Callback<T>): boolean;
85
+ each<T = Any>(f: Callback<T>): boolean;
82
86
  /**
83
87
  * Returns the reduction of sequence according the reducing function
84
88
  *
85
89
  * @param {*} f a reducing function
86
90
  * @param {*} initialValue
87
91
  */
88
- reduce<T = AnyVal>(f: Callback<T>, initialValue?: AnyVal): T;
92
+ reduce<T = Any>(f: Callback<T>, initialValue?: Any): T;
89
93
  /**
90
94
  * Returns the number of matched items in the sequence
91
95
  */
@@ -2,7 +2,7 @@
2
2
  * Predicates used for Query and Expression operators.
3
3
  */
4
4
  import { ExpressionOperator, Options, QueryOperator } from "../core";
5
- import { AnyVal, BsonType, JsType, Predicate, RawArray, RawObject } from "../types";
5
+ import { Any, AnyObject, BsonType, JsType, Predicate } from "../types";
6
6
  type PredicateOptions = Options & {
7
7
  depth: number;
8
8
  };
@@ -12,13 +12,13 @@ type ConversionType = number | JsType | BsonType;
12
12
  *
13
13
  * @param predicate Predicate function
14
14
  */
15
- export declare function createQueryOperator(predicate: Predicate<AnyVal>): QueryOperator;
15
+ export declare function createQueryOperator(predicate: Predicate<Any>): QueryOperator;
16
16
  /**
17
17
  * Returns an expression operator created from the predicate
18
18
  *
19
19
  * @param predicate Predicate function
20
20
  */
21
- export declare function createExpressionOperator(predicate: Predicate<AnyVal>): ExpressionOperator;
21
+ export declare function createExpressionOperator(predicate: Predicate<Any>): ExpressionOperator;
22
22
  /**
23
23
  * Checks that two values are equal.
24
24
  *
@@ -26,7 +26,7 @@ export declare function createExpressionOperator(predicate: Predicate<AnyVal>):
26
26
  * @param b The rhs operand provided by the user
27
27
  * @returns {*}
28
28
  */
29
- export declare function $eq(a: AnyVal, b: AnyVal, options?: PredicateOptions): boolean;
29
+ export declare function $eq(a: Any, b: Any, options?: PredicateOptions): boolean;
30
30
  /**
31
31
  * Matches all values that are not equal to the value specified in the query.
32
32
  *
@@ -34,7 +34,7 @@ export declare function $eq(a: AnyVal, b: AnyVal, options?: PredicateOptions): b
34
34
  * @param b
35
35
  * @returns {boolean}
36
36
  */
37
- export declare function $ne(a: AnyVal, b: AnyVal, options?: PredicateOptions): boolean;
37
+ export declare function $ne(a: Any, b: Any, options?: PredicateOptions): boolean;
38
38
  /**
39
39
  * Matches any of the values that exist in an array specified in the query.
40
40
  *
@@ -42,7 +42,7 @@ export declare function $ne(a: AnyVal, b: AnyVal, options?: PredicateOptions): b
42
42
  * @param b
43
43
  * @returns {*}
44
44
  */
45
- export declare function $in(a: RawArray, b: RawArray, options?: PredicateOptions): boolean;
45
+ export declare function $in(a: Any[], b: Any[], options?: PredicateOptions): boolean;
46
46
  /**
47
47
  * Matches values that do not exist in an array specified to the query.
48
48
  *
@@ -50,7 +50,7 @@ export declare function $in(a: RawArray, b: RawArray, options?: PredicateOptions
50
50
  * @param b
51
51
  * @returns {*|boolean}
52
52
  */
53
- export declare function $nin(a: RawArray, b: RawArray, options?: PredicateOptions): boolean;
53
+ export declare function $nin(a: Any[], b: Any[], options?: PredicateOptions): boolean;
54
54
  /**
55
55
  * Matches values that are less than the value specified in the query.
56
56
  *
@@ -58,7 +58,7 @@ export declare function $nin(a: RawArray, b: RawArray, options?: PredicateOption
58
58
  * @param b
59
59
  * @returns {boolean}
60
60
  */
61
- export declare function $lt(a: AnyVal, b: AnyVal, _options?: PredicateOptions): boolean;
61
+ export declare function $lt(a: Any, b: Any, _options?: PredicateOptions): boolean;
62
62
  /**
63
63
  * Matches values that are less than or equal to the value specified in the query.
64
64
  *
@@ -66,7 +66,7 @@ export declare function $lt(a: AnyVal, b: AnyVal, _options?: PredicateOptions):
66
66
  * @param b
67
67
  * @returns {boolean}
68
68
  */
69
- export declare function $lte(a: AnyVal, b: AnyVal, _options?: PredicateOptions): boolean;
69
+ export declare function $lte(a: Any, b: Any, _options?: PredicateOptions): boolean;
70
70
  /**
71
71
  * Matches values that are greater than the value specified in the query.
72
72
  *
@@ -74,7 +74,7 @@ export declare function $lte(a: AnyVal, b: AnyVal, _options?: PredicateOptions):
74
74
  * @param b
75
75
  * @returns {boolean}
76
76
  */
77
- export declare function $gt(a: AnyVal, b: AnyVal, _options?: PredicateOptions): boolean;
77
+ export declare function $gt(a: Any, b: Any, _options?: PredicateOptions): boolean;
78
78
  /**
79
79
  * Matches values that are greater than or equal to the value specified in the query.
80
80
  *
@@ -82,7 +82,7 @@ export declare function $gt(a: AnyVal, b: AnyVal, _options?: PredicateOptions):
82
82
  * @param b
83
83
  * @returns {boolean}
84
84
  */
85
- export declare function $gte(a: AnyVal, b: AnyVal, _options?: PredicateOptions): boolean;
85
+ export declare function $gte(a: Any, b: Any, _options?: PredicateOptions): boolean;
86
86
  /**
87
87
  * Performs a modulo operation on the value of a field and selects documents with a specified result.
88
88
  *
@@ -90,7 +90,7 @@ export declare function $gte(a: AnyVal, b: AnyVal, _options?: PredicateOptions):
90
90
  * @param b
91
91
  * @returns {boolean}
92
92
  */
93
- export declare function $mod(a: AnyVal, b: number[], _options?: PredicateOptions): boolean;
93
+ export declare function $mod(a: Any, b: number[], _options?: PredicateOptions): boolean;
94
94
  /**
95
95
  * Selects documents where values match a specified regular expression.
96
96
  *
@@ -98,7 +98,7 @@ export declare function $mod(a: AnyVal, b: number[], _options?: PredicateOptions
98
98
  * @param b
99
99
  * @returns {boolean}
100
100
  */
101
- export declare function $regex(a: AnyVal, b: RegExp, options?: PredicateOptions): boolean;
101
+ export declare function $regex(a: Any, b: RegExp, options?: PredicateOptions): boolean;
102
102
  /**
103
103
  * Matches documents that have the specified field.
104
104
  *
@@ -106,7 +106,7 @@ export declare function $regex(a: AnyVal, b: RegExp, options?: PredicateOptions)
106
106
  * @param b
107
107
  * @returns {boolean}
108
108
  */
109
- export declare function $exists(a: AnyVal, b: AnyVal, _options?: PredicateOptions): boolean;
109
+ export declare function $exists(a: Any, b: Any, _options?: PredicateOptions): boolean;
110
110
  /**
111
111
  * Matches arrays that contain all elements specified in the query.
112
112
  *
@@ -114,7 +114,7 @@ export declare function $exists(a: AnyVal, b: AnyVal, _options?: PredicateOption
114
114
  * @param queries
115
115
  * @returns boolean
116
116
  */
117
- export declare function $all(values: RawArray, queries: Array<RawObject>, options?: PredicateOptions): boolean;
117
+ export declare function $all(values: Any[], queries: AnyObject[], options?: PredicateOptions): boolean;
118
118
  /**
119
119
  * Selects documents if the array field is a specified size.
120
120
  *
@@ -122,14 +122,14 @@ export declare function $all(values: RawArray, queries: Array<RawObject>, option
122
122
  * @param b
123
123
  * @returns {*|boolean}
124
124
  */
125
- export declare function $size(a: RawArray, b: number, _options?: PredicateOptions): boolean;
125
+ export declare function $size(a: Any[], b: number, _options?: PredicateOptions): boolean;
126
126
  /**
127
127
  * Selects documents if element in the array field matches all the specified $elemMatch condition.
128
128
  *
129
- * @param a {Array} element to match against
130
- * @param b {Object} subquery
129
+ * @param a {Any[]} element to match against
130
+ * @param b {AnyObject} subquery
131
131
  */
132
- export declare function $elemMatch(a: RawArray, b: RawObject, options?: PredicateOptions): boolean;
132
+ export declare function $elemMatch(a: Any[], b: AnyObject, options?: PredicateOptions): boolean;
133
133
  /**
134
134
  * Selects documents if a field is of the specified type.
135
135
  *
@@ -137,5 +137,5 @@ export declare function $elemMatch(a: RawArray, b: RawObject, options?: Predicat
137
137
  * @param b
138
138
  * @returns {boolean}
139
139
  */
140
- export declare function $type(a: AnyVal, b: ConversionType | Array<ConversionType>, options?: PredicateOptions): boolean;
140
+ export declare function $type(a: Any, b: ConversionType | ConversionType[], options?: PredicateOptions): boolean;
141
141
  export {};
@@ -2,7 +2,7 @@ import { AccumulatorOperator } from "../../core";
2
2
  /**
3
3
  * Defines a custom accumulator function.
4
4
  *
5
- * @param {Array} collection The input array
5
+ * @param {Any[]} collection The input array
6
6
  * @param {*} expr The expression for the operator
7
7
  * @param {Options} options Options
8
8
  */
@@ -3,7 +3,7 @@ import { AccumulatorOperator } from "../../core";
3
3
  * Returns an array of all the unique values for the selected field among for each document in that group.
4
4
  *
5
5
  * @param {Array} collection The input array
6
- * @param {Object} expr The right-hand side expression value of the operator
6
+ * @param {AnyObject} expr The right-hand side expression value of the operator
7
7
  * @param {Options} options The options to use for this operation
8
8
  * @returns {*}
9
9
  */
@@ -3,7 +3,7 @@ import { AccumulatorOperator } from "../../core";
3
3
  * Returns an average of all the values in a group.
4
4
  *
5
5
  * @param {Array} collection The input array
6
- * @param {Object} expr The right-hand side expression value of the operator
6
+ * @param {AnyObject} expr The right-hand side expression value of the operator
7
7
  * @param {Options} options The options to use for this operation
8
8
  * @returns {Number}
9
9
  */
@@ -2,8 +2,8 @@ import { AccumulatorOperator } from "../../core";
2
2
  /**
3
3
  * Returns the bottom element within a group according to the specified sort order.
4
4
  *
5
- * @param {Array} collection The input array
6
- * @param {Object} expr The right-hand side expression value of the operator
5
+ * @param {Any[]} collection The input array
6
+ * @param {AnyObject} expr The right-hand side expression value of the operator
7
7
  * @param {Options} options The options to use for this operation
8
8
  * @returns {*}
9
9
  */
@@ -1,12 +1,12 @@
1
1
  import { AccumulatorOperator } from "../../core";
2
- import { RawArray } from "../../types";
2
+ import { Any } from "../../types";
3
3
  /**
4
4
  * Returns an aggregation of the bottom n elements within a group, according to the specified sort order.
5
5
  * If the group contains fewer than n elements, $bottomN returns all elements in the group.
6
6
  *
7
- * @param {Array} collection The input array
8
- * @param {Object} expr The right-hand side expression value of the operator
7
+ * @param {Any[]} collection The input array
8
+ * @param {AnyObject} expr The right-hand side expression value of the operator
9
9
  * @param {Options} options The options to use for this operation
10
10
  * @returns {*}
11
11
  */
12
- export declare const $bottomN: AccumulatorOperator<RawArray>;
12
+ export declare const $bottomN: AccumulatorOperator<Any[]>;
@@ -3,7 +3,7 @@ import { AccumulatorOperator } from "../../core";
3
3
  * Returns the number of documents in the group or window.
4
4
  *
5
5
  * @param {Array} collection The input array
6
- * @param {Object} expr The right-hand side expression value of the operator
6
+ * @param {AnyObject} expr The right-hand side expression value of the operator
7
7
  * @returns {*}
8
8
  */
9
9
  export declare const $count: AccumulatorOperator;
@@ -2,7 +2,7 @@ import { AccumulatorOperator } from "../../core";
2
2
  /**
3
3
  * Returns the population covariance of two numeric expressions.
4
4
  * @param {Array} collection
5
- * @param {Object} expr
5
+ * @param {AnyObject} expr
6
6
  * @return {Number|null}
7
7
  */
8
8
  export declare const $covariancePop: AccumulatorOperator;