mongodb-pipeline-builder 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (313) hide show
  1. package/CHANGELOG.md +362 -0
  2. package/LICENSE +21 -0
  3. package/Readme.md +280 -0
  4. package/constants/index.d.ts +3 -0
  5. package/constants/index.js +37 -0
  6. package/constants/index.js.map +1 -0
  7. package/decorators/index.d.ts +1 -0
  8. package/decorators/index.js +6 -0
  9. package/decorators/index.js.map +1 -0
  10. package/decorators/is-valid-name/is-valid-name.d.ts +6 -0
  11. package/decorators/is-valid-name/is-valid-name.js +54 -0
  12. package/decorators/is-valid-name/is-valid-name.js.map +1 -0
  13. package/errors/index.d.ts +1 -0
  14. package/errors/index.js +6 -0
  15. package/errors/index.js.map +1 -0
  16. package/errors/pipeline/pipeline.error.d.ts +4 -0
  17. package/errors/pipeline/pipeline.error.js +30 -0
  18. package/errors/pipeline/pipeline.error.js.map +1 -0
  19. package/helpers/bucket/group-by-payload.d.ts +5 -0
  20. package/helpers/bucket/group-by-payload.js +19 -0
  21. package/helpers/bucket/group-by-payload.js.map +1 -0
  22. package/helpers/bucket-auto/group-by-auto-payload.d.ts +6 -0
  23. package/helpers/bucket-auto/group-by-auto-payload.js +19 -0
  24. package/helpers/bucket-auto/group-by-auto-payload.js.map +1 -0
  25. package/helpers/commons/field.d.ts +3 -0
  26. package/helpers/commons/field.js +9 -0
  27. package/helpers/commons/field.js.map +1 -0
  28. package/helpers/commons/list.d.ts +1 -0
  29. package/helpers/commons/list.js +12 -0
  30. package/helpers/commons/list.js.map +1 -0
  31. package/helpers/current-op/op-payload.d.ts +9 -0
  32. package/helpers/current-op/op-payload.js +25 -0
  33. package/helpers/current-op/op-payload.js.map +1 -0
  34. package/helpers/geo-near/near-payload.d.ts +11 -0
  35. package/helpers/geo-near/near-payload.js +26 -0
  36. package/helpers/geo-near/near-payload.js.map +1 -0
  37. package/helpers/index.d.ts +14 -0
  38. package/helpers/index.js +32 -0
  39. package/helpers/index.js.map +1 -0
  40. package/helpers/lookup/condition-payload.d.ts +8 -0
  41. package/helpers/lookup/condition-payload.js +29 -0
  42. package/helpers/lookup/condition-payload.js.map +1 -0
  43. package/helpers/lookup/equality-payload.d.ts +2 -0
  44. package/helpers/lookup/equality-payload.js +17 -0
  45. package/helpers/lookup/equality-payload.js.map +1 -0
  46. package/helpers/merge/into-payload.d.ts +11 -0
  47. package/helpers/merge/into-payload.js +14 -0
  48. package/helpers/merge/into-payload.js.map +1 -0
  49. package/helpers/out/db-coll-payload.d.ts +2 -0
  50. package/helpers/out/db-coll-payload.js +14 -0
  51. package/helpers/out/db-coll-payload.js.map +1 -0
  52. package/helpers/project/ignore-payload.d.ts +3 -0
  53. package/helpers/project/ignore-payload.js +14 -0
  54. package/helpers/project/ignore-payload.js.map +1 -0
  55. package/helpers/project/ignore.d.ts +3 -0
  56. package/helpers/project/ignore.js +15 -0
  57. package/helpers/project/ignore.js.map +1 -0
  58. package/helpers/project/only-payload.d.ts +3 -0
  59. package/helpers/project/only-payload.js +18 -0
  60. package/helpers/project/only-payload.js.map +1 -0
  61. package/helpers/project/only.d.ts +3 -0
  62. package/helpers/project/only.js +15 -0
  63. package/helpers/project/only.js.map +1 -0
  64. package/helpers/sample/size-payload.d.ts +3 -0
  65. package/helpers/sample/size-payload.js +9 -0
  66. package/helpers/sample/size-payload.js.map +1 -0
  67. package/helpers/union-with/collection-payload.d.ts +2 -0
  68. package/helpers/union-with/collection-payload.js +9 -0
  69. package/helpers/union-with/collection-payload.js.map +1 -0
  70. package/index.d.ts +1 -0
  71. package/index.js +6 -0
  72. package/index.js.map +1 -0
  73. package/interfaces/core/builder-options.interface.d.ts +4 -0
  74. package/interfaces/core/builder-options.interface.js +3 -0
  75. package/interfaces/core/builder-options.interface.js.map +1 -0
  76. package/interfaces/core/debug-build.interface.d.ts +5 -0
  77. package/interfaces/core/debug-build.interface.js +3 -0
  78. package/interfaces/core/debug-build.interface.js.map +1 -0
  79. package/interfaces/core/debug-history.interface.d.ts +7 -0
  80. package/interfaces/core/debug-history.interface.js +3 -0
  81. package/interfaces/core/debug-history.interface.js.map +1 -0
  82. package/interfaces/core/get-paging-result.response.d.ts +5 -0
  83. package/interfaces/core/get-paging-result.response.js +3 -0
  84. package/interfaces/core/get-paging-result.response.js.map +1 -0
  85. package/interfaces/core/get-result.response.d.ts +4 -0
  86. package/interfaces/core/get-result.response.js +3 -0
  87. package/interfaces/core/get-result.response.js.map +1 -0
  88. package/interfaces/core/init-options.interface.d.ts +4 -0
  89. package/interfaces/core/init-options.interface.js +3 -0
  90. package/interfaces/core/init-options.interface.js.map +1 -0
  91. package/interfaces/core/stage-error.interface.d.ts +4 -0
  92. package/interfaces/core/stage-error.interface.js +3 -0
  93. package/interfaces/core/stage-error.interface.js.map +1 -0
  94. package/interfaces/core/stage-type.interface.d.ts +34 -0
  95. package/interfaces/core/stage-type.interface.js +41 -0
  96. package/interfaces/core/stage-type.interface.js.map +1 -0
  97. package/interfaces/core/stage.interface.d.ts +43 -0
  98. package/interfaces/core/stage.interface.js +3 -0
  99. package/interfaces/core/stage.interface.js.map +1 -0
  100. package/interfaces/index.d.ts +24 -0
  101. package/interfaces/index.js +7 -0
  102. package/interfaces/index.js.map +1 -0
  103. package/interfaces/stages/bucket-auto-stage.interface.d.ts +9 -0
  104. package/interfaces/stages/bucket-auto-stage.interface.js +3 -0
  105. package/interfaces/stages/bucket-auto-stage.interface.js.map +1 -0
  106. package/interfaces/stages/bucket-stage.interface.d.ts +10 -0
  107. package/interfaces/stages/bucket-stage.interface.js +3 -0
  108. package/interfaces/stages/bucket-stage.interface.js.map +1 -0
  109. package/interfaces/stages/coll-stats-stage.interface.d.ts +10 -0
  110. package/interfaces/stages/coll-stats-stage.interface.js +3 -0
  111. package/interfaces/stages/coll-stats-stage.interface.js.map +1 -0
  112. package/interfaces/stages/current-op.interface.d.ts +8 -0
  113. package/interfaces/stages/current-op.interface.js +3 -0
  114. package/interfaces/stages/current-op.interface.js.map +1 -0
  115. package/interfaces/stages/facet-stage.interface.d.ts +4 -0
  116. package/interfaces/stages/facet-stage.interface.js +3 -0
  117. package/interfaces/stages/facet-stage.interface.js.map +1 -0
  118. package/interfaces/stages/geo-near-stage.interface.d.ts +12 -0
  119. package/interfaces/stages/geo-near-stage.interface.js +3 -0
  120. package/interfaces/stages/geo-near-stage.interface.js.map +1 -0
  121. package/interfaces/stages/graph-lookup-stage.interface.d.ts +10 -0
  122. package/interfaces/stages/graph-lookup-stage.interface.js +3 -0
  123. package/interfaces/stages/graph-lookup-stage.interface.js.map +1 -0
  124. package/interfaces/stages/group-stage.interface.d.ts +4 -0
  125. package/interfaces/stages/group-stage.interface.js +3 -0
  126. package/interfaces/stages/group-stage.interface.js.map +1 -0
  127. package/interfaces/stages/lookup-condition.interface.d.ts +12 -0
  128. package/interfaces/stages/lookup-condition.interface.js +3 -0
  129. package/interfaces/stages/lookup-condition.interface.js.map +1 -0
  130. package/interfaces/stages/lookup-equality.interface.d.ts +6 -0
  131. package/interfaces/stages/lookup-equality.interface.js +3 -0
  132. package/interfaces/stages/lookup-equality.interface.js.map +1 -0
  133. package/interfaces/stages/lookup-stage.interface.d.ts +11 -0
  134. package/interfaces/stages/lookup-stage.interface.js +3 -0
  135. package/interfaces/stages/lookup-stage.interface.js.map +1 -0
  136. package/interfaces/stages/merge-stage.interface.d.ts +12 -0
  137. package/interfaces/stages/merge-stage.interface.js +3 -0
  138. package/interfaces/stages/merge-stage.interface.js.map +1 -0
  139. package/interfaces/stages/out-stage.interface.d.ts +4 -0
  140. package/interfaces/stages/out-stage.interface.js +3 -0
  141. package/interfaces/stages/out-stage.interface.js.map +1 -0
  142. package/interfaces/stages/replace-root-stage.interface.d.ts +3 -0
  143. package/interfaces/stages/replace-root-stage.interface.js +3 -0
  144. package/interfaces/stages/replace-root-stage.interface.js.map +1 -0
  145. package/interfaces/stages/sample-stage.interface.d.ts +3 -0
  146. package/interfaces/stages/sample-stage.interface.js +3 -0
  147. package/interfaces/stages/sample-stage.interface.js.map +1 -0
  148. package/interfaces/stages/union-with-stage.interface.d.ts +5 -0
  149. package/interfaces/stages/union-with-stage.interface.js +3 -0
  150. package/interfaces/stages/union-with-stage.interface.js.map +1 -0
  151. package/interfaces/stages/unwind-stage.interface.d.ts +5 -0
  152. package/interfaces/stages/unwind-stage.interface.js +3 -0
  153. package/interfaces/stages/unwind-stage.interface.js.map +1 -0
  154. package/main.d.ts +75 -0
  155. package/main.js +336 -0
  156. package/main.js.map +1 -0
  157. package/methods/get-result/get-result.d.ts +6 -0
  158. package/methods/get-result/get-result.js +126 -0
  159. package/methods/get-result/get-result.js.map +1 -0
  160. package/methods/index.d.ts +1 -0
  161. package/methods/index.js +6 -0
  162. package/methods/index.js.map +1 -0
  163. package/operators/accumulator/index.d.ts +24 -0
  164. package/operators/accumulator/index.js +20 -0
  165. package/operators/accumulator/index.js.map +1 -0
  166. package/operators/arithmetic/index.d.ts +48 -0
  167. package/operators/arithmetic/index.js +48 -0
  168. package/operators/arithmetic/index.js.map +1 -0
  169. package/operators/array/index.d.ts +67 -0
  170. package/operators/array/index.js +78 -0
  171. package/operators/array/index.js.map +1 -0
  172. package/operators/boolean/index.d.ts +9 -0
  173. package/operators/boolean/index.js +22 -0
  174. package/operators/boolean/index.js.map +1 -0
  175. package/operators/comparison/index.d.ts +21 -0
  176. package/operators/comparison/index.js +18 -0
  177. package/operators/comparison/index.js.map +1 -0
  178. package/operators/conditional/index.d.ts +18 -0
  179. package/operators/conditional/index.js +17 -0
  180. package/operators/conditional/index.js.map +1 -0
  181. package/operators/custom-aggregation/index.d.ts +18 -0
  182. package/operators/custom-aggregation/index.js +31 -0
  183. package/operators/custom-aggregation/index.js.map +1 -0
  184. package/operators/data-size/index.d.ts +6 -0
  185. package/operators/data-size/index.js +8 -0
  186. package/operators/data-size/index.js.map +1 -0
  187. package/operators/date/index.d.ts +119 -0
  188. package/operators/date/index.js +90 -0
  189. package/operators/date/index.js.map +1 -0
  190. package/operators/index.d.ts +14 -0
  191. package/operators/index.js +155 -0
  192. package/operators/index.js.map +1 -0
  193. package/operators/misc/index.d.ts +24 -0
  194. package/operators/misc/index.js +26 -0
  195. package/operators/misc/index.js.map +1 -0
  196. package/operators/set/index.d.ts +21 -0
  197. package/operators/set/index.js +36 -0
  198. package/operators/set/index.js.map +1 -0
  199. package/operators/string/index.d.ts +89 -0
  200. package/operators/string/index.js +66 -0
  201. package/operators/string/index.js.map +1 -0
  202. package/operators/trigonometry/index.d.ts +45 -0
  203. package/operators/trigonometry/index.js +34 -0
  204. package/operators/trigonometry/index.js.map +1 -0
  205. package/operators/type/index.d.ts +32 -0
  206. package/operators/type/index.js +29 -0
  207. package/operators/type/index.js.map +1 -0
  208. package/package.json +76 -0
  209. package/validators/index.d.ts +31 -0
  210. package/validators/index.js +69 -0
  211. package/validators/index.js.map +1 -0
  212. package/validators/stages/addFields-payload.validator.d.ts +3 -0
  213. package/validators/stages/addFields-payload.validator.js +19 -0
  214. package/validators/stages/addFields-payload.validator.js.map +1 -0
  215. package/validators/stages/bucket-auto-payload.validator.d.ts +2 -0
  216. package/validators/stages/bucket-auto-payload.validator.js +26 -0
  217. package/validators/stages/bucket-auto-payload.validator.js.map +1 -0
  218. package/validators/stages/bucket-payload.validator.d.ts +2 -0
  219. package/validators/stages/bucket-payload.validator.js +20 -0
  220. package/validators/stages/bucket-payload.validator.js.map +1 -0
  221. package/validators/stages/collStats-payload.validator.d.ts +2 -0
  222. package/validators/stages/collStats-payload.validator.js +23 -0
  223. package/validators/stages/collStats-payload.validator.js.map +1 -0
  224. package/validators/stages/count-payload.validator.d.ts +1 -0
  225. package/validators/stages/count-payload.validator.js +17 -0
  226. package/validators/stages/count-payload.validator.js.map +1 -0
  227. package/validators/stages/facet-payload.validator.d.ts +2 -0
  228. package/validators/stages/facet-payload.validator.js +33 -0
  229. package/validators/stages/facet-payload.validator.js.map +1 -0
  230. package/validators/stages/geoNear-payload.validator.d.ts +2 -0
  231. package/validators/stages/geoNear-payload.validator.js +11 -0
  232. package/validators/stages/geoNear-payload.validator.js.map +1 -0
  233. package/validators/stages/graphLookup-payload.validator.d.ts +2 -0
  234. package/validators/stages/graphLookup-payload.validator.js +8 -0
  235. package/validators/stages/graphLookup-payload.validator.js.map +1 -0
  236. package/validators/stages/group-payload.validator.d.ts +2 -0
  237. package/validators/stages/group-payload.validator.js +8 -0
  238. package/validators/stages/group-payload.validator.js.map +1 -0
  239. package/validators/stages/indexStats-payload.validator.d.ts +1 -0
  240. package/validators/stages/indexStats-payload.validator.js +8 -0
  241. package/validators/stages/indexStats-payload.validator.js.map +1 -0
  242. package/validators/stages/limit-payload.validator.d.ts +1 -0
  243. package/validators/stages/limit-payload.validator.js +8 -0
  244. package/validators/stages/limit-payload.validator.js.map +1 -0
  245. package/validators/stages/listSessions-payload.validator.d.ts +1 -0
  246. package/validators/stages/listSessions-payload.validator.js +8 -0
  247. package/validators/stages/listSessions-payload.validator.js.map +1 -0
  248. package/validators/stages/lookup-payload.validator.d.ts +2 -0
  249. package/validators/stages/lookup-payload.validator.js +33 -0
  250. package/validators/stages/lookup-payload.validator.js.map +1 -0
  251. package/validators/stages/match-payload.validator.d.ts +1 -0
  252. package/validators/stages/match-payload.validator.js +8 -0
  253. package/validators/stages/match-payload.validator.js.map +1 -0
  254. package/validators/stages/merge-payload.validator.d.ts +2 -0
  255. package/validators/stages/merge-payload.validator.js +8 -0
  256. package/validators/stages/merge-payload.validator.js.map +1 -0
  257. package/validators/stages/out-payload.validator.d.ts +2 -0
  258. package/validators/stages/out-payload.validator.js +8 -0
  259. package/validators/stages/out-payload.validator.js.map +1 -0
  260. package/validators/stages/planCacheStats-payload.validator.d.ts +1 -0
  261. package/validators/stages/planCacheStats-payload.validator.js +8 -0
  262. package/validators/stages/planCacheStats-payload.validator.js.map +1 -0
  263. package/validators/stages/project-payload.validator.d.ts +3 -0
  264. package/validators/stages/project-payload.validator.js +19 -0
  265. package/validators/stages/project-payload.validator.js.map +1 -0
  266. package/validators/stages/redact-payload.validator.d.ts +1 -0
  267. package/validators/stages/redact-payload.validator.js +8 -0
  268. package/validators/stages/redact-payload.validator.js.map +1 -0
  269. package/validators/stages/replaceRoot-payload.validator.d.ts +2 -0
  270. package/validators/stages/replaceRoot-payload.validator.js +8 -0
  271. package/validators/stages/replaceRoot-payload.validator.js.map +1 -0
  272. package/validators/stages/replaceWith-payload.validator.d.ts +1 -0
  273. package/validators/stages/replaceWith-payload.validator.js +8 -0
  274. package/validators/stages/replaceWith-payload.validator.js.map +1 -0
  275. package/validators/stages/sample-payload.validator.d.ts +2 -0
  276. package/validators/stages/sample-payload.validator.js +8 -0
  277. package/validators/stages/sample-payload.validator.js.map +1 -0
  278. package/validators/stages/search-payload.validator.d.ts +1 -0
  279. package/validators/stages/search-payload.validator.js +8 -0
  280. package/validators/stages/search-payload.validator.js.map +1 -0
  281. package/validators/stages/set-payload.validator.d.ts +3 -0
  282. package/validators/stages/set-payload.validator.js +19 -0
  283. package/validators/stages/set-payload.validator.js.map +1 -0
  284. package/validators/stages/skip-payload.validator.d.ts +1 -0
  285. package/validators/stages/skip-payload.validator.js +8 -0
  286. package/validators/stages/skip-payload.validator.js.map +1 -0
  287. package/validators/stages/sort-payload.validator.d.ts +3 -0
  288. package/validators/stages/sort-payload.validator.js +19 -0
  289. package/validators/stages/sort-payload.validator.js.map +1 -0
  290. package/validators/stages/sortByCount-payload.validator.d.ts +1 -0
  291. package/validators/stages/sortByCount-payload.validator.js +8 -0
  292. package/validators/stages/sortByCount-payload.validator.js.map +1 -0
  293. package/validators/stages/unionWith-payload.validator.d.ts +2 -0
  294. package/validators/stages/unionWith-payload.validator.js +8 -0
  295. package/validators/stages/unionWith-payload.validator.js.map +1 -0
  296. package/validators/stages/unset-payload.validator.d.ts +1 -0
  297. package/validators/stages/unset-payload.validator.js +8 -0
  298. package/validators/stages/unset-payload.validator.js.map +1 -0
  299. package/validators/stages/unwind-payload.validator.d.ts +2 -0
  300. package/validators/stages/unwind-payload.validator.js +8 -0
  301. package/validators/stages/unwind-payload.validator.js.map +1 -0
  302. package/validators/utils/string.validator.d.ts +4 -0
  303. package/validators/utils/string.validator.js +28 -0
  304. package/validators/utils/string.validator.js.map +1 -0
  305. package/validators/utils/undefined.validator.d.ts +9 -0
  306. package/validators/utils/undefined.validator.js +57 -0
  307. package/validators/utils/undefined.validator.js.map +1 -0
  308. package/warnings/deprecated-methods/deprecated-method-warning.d.ts +1 -0
  309. package/warnings/deprecated-methods/deprecated-method-warning.js +6 -0
  310. package/warnings/deprecated-methods/deprecated-method-warning.js.map +1 -0
  311. package/warnings/index.d.ts +1 -0
  312. package/warnings/index.js +6 -0
  313. package/warnings/index.js.map +1 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,362 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
+
5
+ ## [3.3.0](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v3.2.3...v3.3.0) (2021-09-17)
6
+
7
+
8
+ ### Features
9
+
10
+ * add the GetTotalPageNumber method to the methods that can be used when paging with the GetResult method ([c885926](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/c885926eefcaa80b641f4062d5cf9e90438130fe))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * correct some array operators ([6e50682](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/6e506823967a2b28cfd4e161d6a7bf1fd102e9a4))
16
+
17
+ ### [3.2.3](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v3.2.2...v3.2.3) (2021-07-19)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * correct the path to index.js and index.d.ts files in package.json ([2ecd7a5](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/2ecd7a56462d8959b78163f697d5c576bbd39d0c))
23
+
24
+ ### [3.2.2](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v3.2.1...v3.2.2) (2021-07-18)
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * correct the value returned by the GetDocs method for a pagination result ([f83f4f0](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/f83f4f08e91c5065df1d1edb1ba79100cc231f22))
30
+
31
+ ### [3.2.1](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v3.2.0...v3.2.1) (2021-07-14)
32
+
33
+
34
+ ### Bug Fixes
35
+
36
+ * correct the interpretation of 0 as not valid when passed as an argument of the GetDocs method ([f32531d](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/f32531de6404a46270d766c2d09c927f8ffab6d5))
37
+
38
+ ## [3.2.0](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v3.1.2...v3.2.0) (2021-07-11)
39
+
40
+
41
+ ### Features
42
+
43
+ * add the ability to get a particular item when using the GetDocs, increase the reliability of the pipeline parameter of the GetResult method ([ee6d745](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/ee6d7453db77898c592be025c14a80dd934e9fb3))
44
+
45
+ ### [3.1.2](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v3.1.1...v3.1.2) (2021-07-09)
46
+
47
+ ### [3.1.1](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v3.1.0...v3.1.1) (2021-06-08)
48
+
49
+ ## [3.1.0](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v3.0.0...v3.1.0) (2021-06-02)
50
+
51
+
52
+ ### Features
53
+
54
+ * add the ability to pass a single object with multiple properties in the Facet method ([8401905](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/84019059b220d1d11681d545e2411fd6bdba563b))
55
+ * add the possibility of testing undefined values ([9afca54](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/9afca54f5ab471236fd7710b4490ae86ee30e4eb))
56
+
57
+ ## [3.0.0](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.7.7...v3.0.0) (2021-04-06)
58
+
59
+
60
+ ### ⚠ BREAKING CHANGES
61
+
62
+ * Add the possibility of using one or more Field
63
+ helper(s)
64
+
65
+ * change the Facet payload ([459bf0a](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/459bf0acc89132a595653c76e74136de786a3c2f))
66
+
67
+ ### [2.7.7](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.7.6...v2.7.7) (2021-04-06)
68
+
69
+ ### [2.7.6](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.7.5...v2.7.6) (2021-04-05)
70
+
71
+ ### [2.7.5](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.7.4...v2.7.5) (2021-04-05)
72
+
73
+ ### [2.7.4](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.7.3...v2.7.4) (2021-04-05)
74
+
75
+ ### [2.7.3](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.7.2...v2.7.3) (2021-04-01)
76
+
77
+ ### [2.7.2](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.7.1...v2.7.2) (2021-04-01)
78
+
79
+ ### [2.7.1](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.7.0...v2.7.1) (2021-04-01)
80
+
81
+ ## [2.7.0](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.6.3-1...v2.7.0) (2021-03-30)
82
+
83
+
84
+ ### Features
85
+
86
+ * add pipeline name decorator validation rules ([1370ea6](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/1370ea6bf90709ead9ca37d1cc3f9a01ac0c625d))
87
+
88
+ ### [2.6.3-1](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.6.3-0...v2.6.3-1) (2021-03-30)
89
+
90
+ ### [2.6.3-0](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.6.2...v2.6.3-0) (2021-03-30)
91
+
92
+ ### [2.6.2](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.6.1...v2.6.2) (2021-03-30)
93
+
94
+ ### [2.6.1](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.6.0...v2.6.1) (2021-03-29)
95
+
96
+ ## [2.6.0](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.5.0...v2.6.0) (2021-03-29)
97
+
98
+
99
+ ### Features
100
+
101
+ * add currentOp OpPayload helper ([b47c269](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/b47c269fe791b73ba678d12f176d75e66dd44939))
102
+
103
+ ## [2.5.0](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.4.2...v2.5.0) (2021-03-26)
104
+
105
+
106
+ ### Features
107
+
108
+ * add geoNear NearPayload helper ([9d973b0](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/9d973b0ab36e4ff6f55732713137d70f6997825f))
109
+
110
+ ### [2.4.2](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.4.1...v2.4.2) (2021-03-24)
111
+
112
+ ### [2.4.1](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.4.0...v2.4.1) (2021-03-24)
113
+
114
+ ## [2.4.0](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v22.3.2...v2.4.0) (2021-03-24)
115
+
116
+
117
+ ### Features
118
+
119
+ * add GetResult super method ([d744405](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/d744405e8da141438dbd201f47900e726037cfe7))
120
+
121
+ ### [2.3.2](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.3.1...v2.3.2) (2021-03-23)
122
+
123
+ ### [2.3.1](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.3.0...v2.3.1) (2021-03-23)
124
+
125
+ ## [2.3.0](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.2.0...v2.3.0) (2021-03-23)
126
+
127
+
128
+ ### Features
129
+
130
+ * Add a check if a Skip, Limit or Count stage is already in the pipeline ([6913cb3](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/6913cb35f730d8889ed774dd6304a4023c4d1ad2))
131
+
132
+ ## [2.2.0](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.1.0...v2.2.0) (2021-03-23)
133
+
134
+
135
+ ### Features
136
+
137
+ * add a Paging method that will automatically add the necessary stages to paginate the pipeline results ([f78cfb5](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/f78cfb51bef33a229d1e32b45dc4d1ac2f07f98d))
138
+
139
+ ## [2.1.0](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.0.4...v2.1.0) (2021-03-23)
140
+
141
+
142
+ ### Features
143
+
144
+ * add DbCollPayload helper for the Out method ([663f2bf](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/663f2bf86ec6882476bb83e3fb820ba1196396bb))
145
+
146
+ ### [2.0.4](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.0.3...v2.0.4) (2021-03-22)
147
+
148
+ ### [2.0.3](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.0.2...v2.0.3) (2021-03-22)
149
+
150
+ ### [2.0.2](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.0.1...v2.0.2) (2021-03-22)
151
+
152
+ ### [2.0.1](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v2.0.0...v2.0.1) (2021-03-22)
153
+
154
+
155
+ ### Bug Fixes
156
+
157
+ * fix to enable debug mode by modifying import of moment.js library ([a973cb0](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/a973cb076f14686e505bc90940f869b24cce9084))
158
+
159
+ ## [2.0.0](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v1.1.0...v2.0.0) (2021-03-22)
160
+
161
+
162
+ ### ⚠ BREAKING CHANGES
163
+
164
+ * modify the payload arguments by adding an optional argument containing all optional payload parameters ([b258e26](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/b258e26dfdb8897ca447af036771e09f63e4b3c0))
165
+
166
+ ## [1.1.0](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v1.0.1...v1.1.0) (2021-03-22)
167
+
168
+
169
+ ### Features
170
+
171
+ * add merge IntoPayload helper ([91b73f1](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/91b73f1a06d983836b2afdefd91ed81d78886906))
172
+
173
+ ### [1.0.1](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-72...v1.0.1) (2021-03-21)
174
+
175
+ ## [1.0.0](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-72...v1.0.0) (2021-03-21)
176
+
177
+ ### [0.0.2-72](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-71...v0.0.2-72) (2021-03-21)
178
+
179
+
180
+ ### Features
181
+
182
+ * add bucket auto GroupByAutoPayload helper ([344b46c](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/344b46c1342988cd411585ef87f12d338cfcecac))
183
+ * add sample SizePayload helper ([c8d05f7](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/c8d05f7cda38fbf96c6832e697ea634e2f04f84f))
184
+ * add unionWith CollectionPayload helper ([938bcaa](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/938bcaad9692df2cb57dd63277056cf44a900aec))
185
+
186
+ ### [0.0.2-71](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-70...v0.0.2-71) (2021-03-21)
187
+
188
+
189
+ ### Features
190
+
191
+ * add bucket GroupByPayload helper ([03fb8d6](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/03fb8d697439b154febdc29616bd8c752d0ca70e))
192
+
193
+ ### [0.0.2-70](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-69...v0.0.2-70) (2021-03-21)
194
+
195
+ ### [0.0.2-69](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-68...v0.0.2-69) (2021-03-21)
196
+
197
+
198
+ ### Bug Fixes
199
+
200
+ * github script in circleci pipeline to delete develop branch when release is ready to merge ([fd11909](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/fd11909414eb9bb0c73b6f8b002c2aa5daadfb12))
201
+
202
+ ### [0.0.2-68](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-67...v0.0.2-68) (2021-03-20)
203
+
204
+ ### [0.0.2-67](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-66...v0.0.2-67) (2021-03-20)
205
+
206
+
207
+ ### Features
208
+
209
+ * add Property helper to create a javascript object ([62855da](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/62855da58b42c0da372e2009bf514c5d66638b4f))
210
+ * add the ability to pass an object or a list to AddFields ([9c97026](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/9c97026efe2da77a98291911fea30aa8a8a599a3))
211
+
212
+ ### [0.0.2-66](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-65...v0.0.2-66) (2021-03-20)
213
+
214
+
215
+ ### Features
216
+
217
+ * add new helper List ([8dc7919](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/8dc791950e889f972941f6f152f0c38dd915ccf2))
218
+
219
+ ### [0.0.2-65](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-64...v0.0.2-65) (2021-03-20)
220
+
221
+ ### [0.0.2-64](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-63...v0.0.2-64) (2021-03-20)
222
+
223
+ ### [0.0.2-63](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-62...v0.0.2-63) (2021-03-20)
224
+
225
+
226
+ ### Features
227
+
228
+ * add payload validator ([6c243e1](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/6c243e1fe4a3c38af469371d3423649c598022fa))
229
+ * implement all the stage methods as an alias of the addStage method ([b4066e0](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/b4066e0bd8bfba11780134ce22d5c0a706a4bfd9))
230
+
231
+ ### [0.0.2-62](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-61...v0.0.2-62) (2021-03-19)
232
+
233
+
234
+ ### Features
235
+
236
+ * implement Lookup, Match and Project method of the pipeline builder ([9b859cf](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/9b859cf72b0847bd632f6bb66ebde952854e5c65))
237
+
238
+ ### [0.0.2-61](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-60...v0.0.2-61) (2021-03-19)
239
+
240
+ ### [0.0.2-60](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-59...v0.0.2-60) (2021-03-19)
241
+
242
+ ### [0.0.2-59](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-58...v0.0.2-59) (2021-03-18)
243
+
244
+ ### [0.0.2-58](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-56...v0.0.2-58) (2021-03-18)
245
+
246
+ ### [0.0.2-56](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-55...v0.0.2-56) (2021-03-18)
247
+
248
+ ### [0.0.2-55](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-54...v0.0.2-55) (2021-03-18)
249
+
250
+ ### [0.0.2-54](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-53...v0.0.2-54) (2021-03-18)
251
+
252
+ ### [0.0.2-53](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-52...v0.0.2-53) (2021-03-18)
253
+
254
+ ### [0.0.2-52](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-51...v0.0.2-52) (2021-03-18)
255
+
256
+ ### [0.0.2-51](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-50...v0.0.2-51) (2021-03-18)
257
+
258
+ ### [0.0.2-50](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-49...v0.0.2-50) (2021-03-18)
259
+
260
+ ### [0.0.2-49](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-48...v0.0.2-49) (2021-03-18)
261
+
262
+ ### [0.0.2-48](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-47...v0.0.2-48) (2021-03-18)
263
+
264
+ ### [0.0.2-47](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-46...v0.0.2-47) (2021-03-18)
265
+
266
+ ### [0.0.2-46](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-45...v0.0.2-46) (2021-03-18)
267
+
268
+ ### [0.0.2-45](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-44...v0.0.2-45) (2021-03-18)
269
+
270
+ ### [0.0.2-44](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-43...v0.0.2-44) (2021-03-18)
271
+
272
+ ### [0.0.2-43](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-42...v0.0.2-43) (2021-03-18)
273
+
274
+ ### [0.0.2-42](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-41...v0.0.2-42) (2021-03-18)
275
+
276
+ ### [0.0.2-41](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-40...v0.0.2-41) (2021-03-18)
277
+
278
+ ### [0.0.2-40](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-39...v0.0.2-40) (2021-03-18)
279
+
280
+ ### [0.0.2-39](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-38...v0.0.2-39) (2021-03-17)
281
+
282
+ ### [0.0.2-38](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-37...v0.0.2-38) (2021-03-17)
283
+
284
+ ### [0.0.2-37](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-36...v0.0.2-37) (2021-03-17)
285
+
286
+ ### [0.0.2-36](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-35...v0.0.2-36) (2021-03-17)
287
+
288
+ ### [0.0.2-35](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-34...v0.0.2-35) (2021-03-17)
289
+
290
+ ### [0.0.2-34](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-33...v0.0.2-34) (2021-03-17)
291
+
292
+ ### [0.0.2-33](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-32...v0.0.2-33) (2021-03-17)
293
+
294
+ ### [0.0.2-32](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-31...v0.0.2-32) (2021-03-17)
295
+
296
+ ### [0.0.2-31](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-30...v0.0.2-31) (2021-03-17)
297
+
298
+ ### [0.0.2-30](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-29...v0.0.2-30) (2021-03-17)
299
+
300
+ ### [0.0.2-29](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-28...v0.0.2-29) (2021-03-17)
301
+
302
+ ### [0.0.2-28](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-27...v0.0.2-28) (2021-03-17)
303
+
304
+ ### [0.0.2-27](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-26...v0.0.2-27) (2021-03-17)
305
+
306
+ ### [0.0.2-26](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-25...v0.0.2-26) (2021-03-17)
307
+
308
+ ### [0.0.2-25](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-24...v0.0.2-25) (2021-03-17)
309
+
310
+ ### [0.0.2-24](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-23...v0.0.2-24) (2021-03-17)
311
+
312
+ ### [0.0.2-23](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-22...v0.0.2-23) (2021-03-17)
313
+
314
+ ### [0.0.2-22](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-21...v0.0.2-22) (2021-03-17)
315
+
316
+ ### [0.0.2-21](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-20...v0.0.2-21) (2021-03-17)
317
+
318
+ ### [0.0.2-20](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-19...v0.0.2-20) (2021-03-17)
319
+
320
+ ### [0.0.2-19](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-18...v0.0.2-19) (2021-03-17)
321
+
322
+ ### [0.0.2-18](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-17...v0.0.2-18) (2021-03-17)
323
+
324
+ ### [0.0.2-17](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-16...v0.0.2-17) (2021-03-17)
325
+
326
+ ### [0.0.2-16](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-15...v0.0.2-16) (2021-03-17)
327
+
328
+ ### [0.0.2-15](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-14...v0.0.2-15) (2021-03-17)
329
+
330
+ ### [0.0.2-14](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-13...v0.0.2-14) (2021-03-17)
331
+
332
+ ### [0.0.2-13](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-12...v0.0.2-13) (2021-03-17)
333
+
334
+ ### [0.0.2-12](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-11...v0.0.2-12) (2021-03-17)
335
+
336
+ ### [0.0.2-11](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-10...v0.0.2-11) (2021-03-17)
337
+
338
+ ### [0.0.2-10](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-alpha.7...v0.0.2-10) (2021-03-17)
339
+
340
+
341
+ ### Bug Fixes
342
+
343
+ * change import moment to require moment ([826ac37](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/826ac37b36f2d9bc2bfb9f2f98b349a78799554c))
344
+
345
+ ### [0.0.2-alpha.7](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-alpha.5...v0.0.2-alpha.7) (2021-03-16)
346
+
347
+ ### [0.0.2-alpha.5](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-alpha.4...v0.0.2-alpha.5) (2021-03-16)
348
+
349
+ ### [0.0.2-alpha.4](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-alpha.3...v0.0.2-alpha.4) (2021-03-16)
350
+
351
+ ### [0.0.2-alpha.3](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-alpha.2...v0.0.2-alpha.3) (2021-03-16)
352
+
353
+
354
+ ### Bug Fixes
355
+
356
+ * build script ([281fb81](https://github.com/MikeDev75015/mongodb-pipeline-builder/commit/281fb81632b222a19ef0cbdbe22748a7e6fafe81))
357
+
358
+ ### [0.0.2-alpha.2](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-alpha.1...v0.0.2-alpha.2) (2021-03-16)
359
+
360
+ ### [0.0.2-alpha.1](https://github.com/MikeDev75015/mongodb-pipeline-builder/compare/v0.0.2-alpha.0...v0.0.2-alpha.1) (2021-03-16)
361
+
362
+ ### 0.0.2-alpha.0 (2021-03-15)
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Mickael Nodanche
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/Readme.md ADDED
@@ -0,0 +1,280 @@
1
+ <div style="text-align: center; width: 100%;">
2
+
3
+ <div style="display: inline-block">
4
+
5
+ [![NPM version](https://img.shields.io/npm/v/mongodb-pipeline-builder.svg)](https://www.npmjs.com/package/mongodb-pipeline-builder)
6
+ ![NPM](https://img.shields.io/npm/l/mongodb-pipeline-builder?registry_uri=https%3A%2F%2Fregistry.npmjs.com)
7
+ ![npm](https://img.shields.io/npm/dw/mongodb-pipeline-builder)
8
+ </div>
9
+
10
+ <div style="display: inline-block">
11
+
12
+ ![GitHub branch checks state](https://img.shields.io/github/checks-status/MikeDev75015/mongodb-pipeline-builder/main)
13
+ [![CircleCI](https://circleci.com/gh/MikeDev75015/mongodb-pipeline-builder.svg?style=shield)](https://app.circleci.com/pipelines/github/MikeDev75015/mongodb-pipeline-builder)
14
+ ![Sonar Quality Gate](https://img.shields.io/sonar/quality_gate/MikeDev75015_mongodb-pipeline-builder?server=https%3A%2F%2Fsonarcloud.io)
15
+ </div>
16
+ </div>
17
+
18
+ <div style="text-align: center; width: 100%;">
19
+ <div style="display: inline-block">
20
+
21
+ ![Sonar Tests](https://img.shields.io/sonar/tests/MikeDev75015_mongodb-pipeline-builder?server=https%3A%2F%2Fsonarcloud.io)
22
+ ![Sonar Coverage](https://img.shields.io/sonar/coverage/MikeDev75015_mongodb-pipeline-builder?server=https%3A%2F%2Fsonarcloud.io)
23
+ <img src="https://mikedev75015.github.io/mongodb-pipeline-builder/images/coverage-badge-documentation.svg" alt="documentation-badge">
24
+ </div>
25
+
26
+ <div style="display: inline-block">
27
+
28
+ ![GitHub top language](https://img.shields.io/github/languages/top/MikeDev75015/mongodb-pipeline-builder)
29
+ [![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=MikeDev75015_mongodb-pipeline-builder&metric=ncloc)](https://sonarcloud.io/dashboard?id=MikeDev75015_mongodb-pipeline-builder)
30
+ [![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=MikeDev75015_mongodb-pipeline-builder&metric=duplicated_lines_density)](https://sonarcloud.io/dashboard?id=MikeDev75015_mongodb-pipeline-builder)
31
+ </div>
32
+ </div>
33
+
34
+ <div style="text-align: center; width: 100%;">
35
+ <div style="display: inline-block">
36
+
37
+ ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/MikeDev75015/mongodb-pipeline-builder)
38
+ ![GitHub commit activity](https://img.shields.io/github/commit-activity/w/MikeDev75015/mongodb-pipeline-builder)
39
+ ![GitHub last commit (branch)](https://img.shields.io/github/last-commit/MikeDev75015/mongodb-pipeline-builder/main)
40
+ </div>
41
+
42
+ <div style="display: inline-block">
43
+
44
+ [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=MikeDev75015_mongodb-pipeline-builder&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=MikeDev75015_mongodb-pipeline-builder)
45
+ [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=MikeDev75015_mongodb-pipeline-builder&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=MikeDev75015_mongodb-pipeline-builder)
46
+ [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=MikeDev75015_mongodb-pipeline-builder&metric=security_rating)](https://sonarcloud.io/dashboard?id=MikeDev75015_mongodb-pipeline-builder)
47
+ </div>
48
+ </div>
49
+
50
+ <div style="text-align: center; width: 100%;">
51
+
52
+ # `mongodb-pipeline-builder`
53
+
54
+ </div>
55
+
56
+ <a id="doc-link" style="display: block; cursor: pointer;" href="https://mikedev75015.github.io/mongodb-pipeline-builder" target="_blank">Technical documentation</a>
57
+
58
+ <p style="text-align: justify; width: 100%;font-size: 15px;">
59
+ is a pipeline builder for the db.collection.aggregate method and db.aggregate method. It will simplify pipelines by making them more
60
+ readable and much easier to edit. It also allows you to test your pipelines on a dataset in order to verify them. Pipeline stages appear in an array. Documents pass
61
+ through the stages in sequence.
62
+ </p>
63
+
64
+ ## npm package <img src="https://pbs.twimg.com/media/EDoWJbUXYAArclg.png" width="24" height="24" />
65
+
66
+ ### `npm i -S mongodb-pipeline-builder`
67
+
68
+ ## Usage:
69
+
70
+
71
+ ### - with require
72
+
73
+ ```typescript
74
+ const PipelineBuilder = require("mongodb-pipeline-builder").PipelineBuilder;
75
+ const { EqualityPayload, OnlyPayload, Field } = require('mongodb-pipeline-builder/helpers');
76
+ const { LessThanEqual, ArrayElemAt, Equal, Expression } = require('mongodb-pipeline-builder/operators');
77
+ ```
78
+
79
+ ### - with import
80
+
81
+
82
+ ```typescript
83
+ import { PipelineBuilder } from 'mongodb-pipeline-builder';
84
+ import { EqualityPayload, OnlyPayload, Field } from 'mongodb-pipeline-builder/helpers';
85
+ import { LessThanEqual, ArrayElemAt, Equal, Expression } from 'mongodb-pipeline-builder/operators';
86
+ ```
87
+
88
+ ## Example with paging:
89
+
90
+
91
+ ```typescript
92
+ const myNewPipeline = new PipelineBuilder( 'myPagination', { debug: true } )
93
+ .Match( Expression( LessThanEqual( '$id', 20 ) ) )
94
+ .Project( OnlyPayload( 'name', 'weight' ) )
95
+ .Paging( 5, 3 ) // 5 per page, page 3
96
+ .getPipeline();
97
+ ```
98
+
99
+ ### is equivalent to:
100
+
101
+
102
+ ```typescript
103
+ const myNewPipeline = [ {
104
+ $facet: {
105
+ docs: [
106
+ { $match: { $expr: { $lte: ["$id", 20] } } },
107
+ { $project: { _id: 0, name: 1, weight: 1 } },
108
+ { $skip: 10 },
109
+ { $limit: 5 }
110
+ ],
111
+ count: [
112
+ { $match: { $expr: { $lte: ["$id", 20] } } },
113
+ { $project: { _id: 0, name: 1, weight: 1 } },
114
+ { $count: "totalElements" }
115
+ ]
116
+ }
117
+ } ];
118
+ ```
119
+
120
+ ## Example without paging:
121
+
122
+
123
+ ```typescript
124
+ const myNewPipeline = new PipelineBuilder( 'user-skills' )
125
+ .Match( Expression( Equal( '$id', 123456 ) ) )
126
+ .Lookup( EqualityPayload( 'profiles', 'profile', 'profileId', 'id' ) )
127
+ .Project( OnlyPayload( 'firstname', 'lastname', 'email' ) )
128
+ .AddFields(
129
+ Field( 'skills', ArrayElemAt( '$profile.skills', 0 ) ),
130
+ Field( 'availability', ArrayElemAt( '$profile.availability', 0 ) )
131
+ )
132
+ .Unset( 'profile' )
133
+ .getPipeline();
134
+ ```
135
+
136
+ ### is equivalent to:
137
+
138
+ ```typescript
139
+ const myNewPipeline = [
140
+ { $match: { $expr: { $eq: ["$id", 123456] } } },
141
+ { $lookup: { from: "profiles", as: "profile", localField: "profileId", foreignField: "id" } },
142
+ { $project: { _id: 0, firstname: 1, lastname: 1, email: 1 } },
143
+ { $addFields: {
144
+ skills: { $arrayElemAt: ["$profile.skills", 0] },
145
+ availability: { $arrayElemAt: ["$profile.availability", 0] }
146
+ } },
147
+ { $unset: "profile" }
148
+ ];
149
+ ```
150
+
151
+ ___
152
+
153
+ # The GetResult method
154
+ #### GetResult(): Promise<GetResultResponse | GetPagingResultResponse>
155
+
156
+ <p style="font-size: 15px;">
157
+ is an asynchronous method that provides a very easy way to use your aggregation pipelines on a target (collection or mongoose model having the aggregation method) with pagination or without.
158
+ <p>
159
+
160
+ ## GetResultResponse
161
+
162
+ <p style="font-size: 15px;">
163
+ When you are not using pagination, the GetResult method returns a GetResultResponse object that contains two methods:<br>
164
+ &nbsp;&nbsp;- GetDocs() to get the documents found.<br>
165
+ &nbsp;&nbsp;- GetCount() to get the total number of documents found.
166
+ </p>
167
+
168
+
169
+ ```typescript
170
+ // in an asynchronous function
171
+ const result = await GetResult( target, pipeline );
172
+ result.GetDocs(); // => any[]
173
+ result.GetCount(); // => number
174
+ ```
175
+
176
+ #### Or:
177
+ ```typescript
178
+ GetResult( target, pipeline ).then( result => {
179
+ result.GetDocs(); // => any[]
180
+ result.GetCount(); // => number
181
+ } );
182
+ ```
183
+
184
+ ### GetDocs() method possibilities:
185
+
186
+ <p style="font-size: 15px;">
187
+ You can retrieve a particular document by specifying its index as an argument of the GetDocs method.<br>Just pass "last" to get the last document. If the specified index is greater than the index of the last document, GetDocs() will return the last document.
188
+ </p>
189
+
190
+ ```typescript
191
+ // if GetDocs() returns [document0, document1, document2, document3, ..., document51]
192
+ result.GetDocs(2); // will return document to index 2, document2
193
+ result.GetDocs('last'); // will return the last document, document51
194
+ result.GetDocs(99); // will return the last document, document51
195
+ ```
196
+
197
+ ## GetPagingResultResponse
198
+
199
+ <p style="font-size: 15px;">
200
+ When you use paging, the GetResult method returns a GetPagingResultResponse object that contains three methods:<br>
201
+ &nbsp;&nbsp;- GetDocs() to get the documents found.<br>
202
+ &nbsp;&nbsp;- GetCount() to get the total number of documents found.<br>
203
+ &nbsp;&nbsp;- GetTotalPageNumber() to get the total number of pages.
204
+ </p>
205
+
206
+
207
+ ```typescript
208
+ // in an asynchronous function
209
+ const result = await GetResult( target, pipeline );
210
+ result.GetDocs(); // => any[]
211
+ result.GetCount(); // => number
212
+ result.GetTotalPageNumber(); // => number
213
+ ```
214
+
215
+ #### Or:
216
+ ```typescript
217
+ GetResult( target, pipeline ).then( result => {
218
+ result.GetDocs(); // => any[]
219
+ result.GetCount(); // => number
220
+ result.GetTotalPageNumber(); // => number
221
+ } );
222
+ ```
223
+
224
+
225
+ ___
226
+
227
+
228
+ ### [ <a href="https://npm.runkit.com/mongodb-pipeline-builder" target="_blank">Try the lib on NPM RunKit with the require method</a> ]<br>
229
+
230
+
231
+ <p style="font-size: 14px; white-space: nowrap;">[ <a href="https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline/" target="_blank">Aggregation Pipeline Stages</a> ]</p>
232
+
233
+ ## `MONGODB STAGES:`
234
+ <p style="font-size: 15px;">
235
+ AddFields | Bucket | BucketAuto | CollStats | Count | Facet | GeoNear | GraphLookup | Group | IndexStats | Limit | ListSessions | Lookup | Match | Merge | Out | PlanCacheStats | Project | Redact | ReplaceRoot | ReplaceWith | Sample | Search | Set | Skip | Sort | SortByCount | UnionWith | Unset | Unwind
236
+ </p>
237
+
238
+ ## `CUSTOM STAGE:`
239
+ <p style="font-size: 15px;">
240
+ Paging
241
+ </p>
242
+
243
+ ___
244
+
245
+ <p style="font-size: 14px; white-space: nowrap;">[ <a href="https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline/" target="_blank">Aggregation Pipeline Helpers</a> ]</p>
246
+
247
+ ## `STAGE HELPERS * :`
248
+ <p style="font-size: 15px;">
249
+ &nbsp;- Bucket ( GroupByPayload )<br>
250
+ &nbsp;- BucketAuto ( GroupByAutoPayload )<br>
251
+ &nbsp;- CurrentOp ( OpPayload )<br>
252
+ &nbsp;- GeoNear ( NearPayload )<br>
253
+ &nbsp;- Lookup ( ConditionPayload | EqualityPayload )<br>
254
+ &nbsp;- Merge ( IntoPayload )<br>
255
+ &nbsp;- Out ( DbCollPayload )<br>
256
+ &nbsp;- Project ( IgnorePayload | OnlyPayload )<br>
257
+ &nbsp;- Sample ( SizePayload )<br>
258
+ &nbsp;- UnionWith ( CollectionPayload )
259
+
260
+ ## `COMMON HELPERS:`
261
+ <p style="font-size: 15px;">
262
+ &nbsp;- Field: AddFields( Field ** ) | Facet( Field ** ) | Set( Field ** ) | Sort( Field ** )<br>
263
+ &nbsp;- List
264
+ <p>
265
+
266
+ <p style="font-style: italic">
267
+ * If no helper is available for a stage, use stage method and pass it a valid value as a parameter.<br>
268
+ ** One or more Field helper(s) separated by a comma.
269
+
270
+ ___
271
+
272
+ <p style="font-size: 14px; white-space: nowrap;">[ <a href="https://docs.mongodb.com/manual/reference/operator/aggregation/" target="_blank">Aggregation Pipeline Operators</a> ]</p>
273
+
274
+ <p style="font-size: 15px;">
275
+ Absolute | Accumulator | Acos | Acosh | Add | AddToSet | AllElementsTrue | And | AnyElementTrue | ArrayElemAt | ArrayToObject | Asin | Asinh | Atan | Atan2 | Atanh | Avg | BinarySize | BsonSize | Ceil | Compare | Concat | ConcatArrays | Cond | Convert | Cos | Cosh | DateFromParts | DateFromString | DateToParts | DateToString | DayOfMonth | DayOfWeek | DayOfYear | DegreesToRadians | Divide | Equal | Exponent | Expression | Filter | First | Floor | FunctionOperator | GreaterThan | GreaterThanEqual | Hour | IfNull | In | IndexOfArray | IndexOfBytes | IndexOfCP | IsArray | IsNumber | IsoDayOfWeek | IsoWeek | IsoWeekYear | Last | LessThan | LessThanEqual | Let | Literal | Log | Log10 | Ltrim | MapOperator | Max | MergeObjects | Meta | Millisecond | Min | Minute | Mod | Month | Multiply | NaturalLog | Not | NotEqual | ObjectToArray | Or | Pow | Push | RadiansToDegrees | Rand | Range | Reduce | RegexFind | RegexFindAll | RegexMatch | ReplaceAll | ReplaceOne | ReverseArray | Round | Rtrim | SampleRate | Second | SetDifference | SetEquals | SetIntersection | SetIsSubset | SetUnion | Sin | Sinh | Size | Slice | Split | Sqrt | StdDevPop | StdDevSamp | StrCaseCmp | StrLenBytes | StrLenCP | Substr | SubstrBytes | SubstrCP | Subtract | Sum | Switch | Tan | Tanh | ToBool | ToDate | ToDecimal | ToDouble | ToInt | ToLong | ToLower | ToObjectId | ToString | ToUpper | Trim | Trunc | Type | Week | Year | Zip
276
+ </p>
277
+ <br><br><br><br>
278
+
279
+
280
+