@daiso-tech/core 0.7.0 → 0.8.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 (557) hide show
  1. package/dist/cjs/_module.js +2 -0
  2. package/dist/cjs/_module.js.map +1 -1
  3. package/dist/cjs/_shared/utilities.js +9 -0
  4. package/dist/cjs/_shared/utilities.js.map +1 -1
  5. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-chunk-iterable.js.map +1 -1
  6. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-chunk-while-iterable.js.map +1 -1
  7. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-collapse-iterable.js.map +1 -1
  8. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-count-by-iterable.js.map +1 -1
  9. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-cross-join-iterable.js.map +1 -1
  10. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-entries-iterable.js.map +1 -1
  11. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-error-handler-iterable.js.map +1 -1
  12. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-filter-iterable.js.map +1 -1
  13. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-flat-map-iterable.js.map +1 -1
  14. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-group-by-iterable.js.map +1 -1
  15. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-insert-after-iterable.js.map +1 -1
  16. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-insert-before-iterable.js.map +1 -1
  17. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-map-iterable.js.map +1 -1
  18. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-merge-iterable.js.map +1 -1
  19. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-pad-end-iterable.js.map +1 -1
  20. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-pad-start-iterable.js.map +1 -1
  21. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-partion-iterable.js.map +1 -1
  22. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-repeat-iterable.js.map +1 -1
  23. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-reverse-iterable.js.map +1 -1
  24. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-shuffle-iterable.js.map +1 -1
  25. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-skip-iterable.js.map +1 -1
  26. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-skip-until-iterable.js.map +1 -1
  27. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-slice-iterable.js.map +1 -1
  28. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-sliding-iterable.js.map +1 -1
  29. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-sort-iterable.js.map +1 -1
  30. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-split-iterable.js.map +1 -1
  31. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-take-iterable.js.map +1 -1
  32. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-take-until-iterable.js.map +1 -1
  33. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-tap-iterable.js.map +1 -1
  34. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-unique-iterable.js.map +1 -1
  35. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-update-iterable.js.map +1 -1
  36. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-when-iterable.js.map +1 -1
  37. package/dist/cjs/collection/implementations/async-iterable-collection/_shared/async-zip-iterable.js.map +1 -1
  38. package/dist/cjs/collection/implementations/async-iterable-collection/async-iterable-collection.js.map +1 -1
  39. package/dist/cjs/collection/implementations/iterable-collection/_shared/chunk-iterable.js.map +1 -1
  40. package/dist/cjs/collection/implementations/iterable-collection/_shared/chunk-while-iterable.js.map +1 -1
  41. package/dist/cjs/collection/implementations/iterable-collection/_shared/collapse-iterable.js.map +1 -1
  42. package/dist/cjs/collection/implementations/iterable-collection/_shared/count-by-iterable.js.map +1 -1
  43. package/dist/cjs/collection/implementations/iterable-collection/_shared/cross-join-iterable.js.map +1 -1
  44. package/dist/cjs/collection/implementations/iterable-collection/_shared/entries-iterable.js.map +1 -1
  45. package/dist/cjs/collection/implementations/iterable-collection/_shared/filter-iterable.js.map +1 -1
  46. package/dist/cjs/collection/implementations/iterable-collection/_shared/flat-map-iterable.js.map +1 -1
  47. package/dist/cjs/collection/implementations/iterable-collection/_shared/group-by-iterable.js.map +1 -1
  48. package/dist/cjs/collection/implementations/iterable-collection/_shared/insert-after-iterable.js.map +1 -1
  49. package/dist/cjs/collection/implementations/iterable-collection/_shared/insert-before-iterable.js.map +1 -1
  50. package/dist/cjs/collection/implementations/iterable-collection/_shared/map-iterable.js.map +1 -1
  51. package/dist/cjs/collection/implementations/iterable-collection/_shared/merge-iterable.js.map +1 -1
  52. package/dist/cjs/collection/implementations/iterable-collection/_shared/pad-end-iterable.js.map +1 -1
  53. package/dist/cjs/collection/implementations/iterable-collection/_shared/pad-start-iterable.js.map +1 -1
  54. package/dist/cjs/collection/implementations/iterable-collection/_shared/partion-iterable.js.map +1 -1
  55. package/dist/cjs/collection/implementations/iterable-collection/_shared/repeat-iterable.js.map +1 -1
  56. package/dist/cjs/collection/implementations/iterable-collection/_shared/reverse-iterable.js.map +1 -1
  57. package/dist/cjs/collection/implementations/iterable-collection/_shared/shuffle-iterable.js.map +1 -1
  58. package/dist/cjs/collection/implementations/iterable-collection/_shared/skip-iterable.js.map +1 -1
  59. package/dist/cjs/collection/implementations/iterable-collection/_shared/skip-until-iterable.js.map +1 -1
  60. package/dist/cjs/collection/implementations/iterable-collection/_shared/slice-iterable.js.map +1 -1
  61. package/dist/cjs/collection/implementations/iterable-collection/_shared/sliding-iterable.js.map +1 -1
  62. package/dist/cjs/collection/implementations/iterable-collection/_shared/sort-iterable.js.map +1 -1
  63. package/dist/cjs/collection/implementations/iterable-collection/_shared/split-iterable.js.map +1 -1
  64. package/dist/cjs/collection/implementations/iterable-collection/_shared/take-iterable.js.map +1 -1
  65. package/dist/cjs/collection/implementations/iterable-collection/_shared/take-until-iterable.js.map +1 -1
  66. package/dist/cjs/collection/implementations/iterable-collection/_shared/tap-iterable.js.map +1 -1
  67. package/dist/cjs/collection/implementations/iterable-collection/_shared/unique-iterable.js.map +1 -1
  68. package/dist/cjs/collection/implementations/iterable-collection/_shared/update-iterable.js.map +1 -1
  69. package/dist/cjs/collection/implementations/iterable-collection/_shared/when-iterable.js.map +1 -1
  70. package/dist/cjs/collection/implementations/iterable-collection/_shared/zip-iterable.js.map +1 -1
  71. package/dist/cjs/collection/implementations/iterable-collection/iterable-collection.js.map +1 -1
  72. package/dist/cjs/collection/implementations/list-collection/list-collection.js +2 -1
  73. package/dist/cjs/collection/implementations/list-collection/list-collection.js.map +1 -1
  74. package/dist/cjs/{utilities/async/backof-policies/exponential-backoff-policy → event-bus/contracts}/_module.js +4 -1
  75. package/dist/cjs/event-bus/contracts/_module.js.map +1 -0
  76. package/dist/cjs/event-bus/contracts/_shared.js +32 -0
  77. package/dist/cjs/event-bus/contracts/_shared.js.map +1 -0
  78. package/dist/cjs/event-bus/contracts/event-bus-adapter.contract.js +3 -0
  79. package/dist/cjs/event-bus/contracts/event-bus-adapter.contract.js.map +1 -0
  80. package/dist/cjs/event-bus/contracts/event-bus-manager.contract.js +3 -0
  81. package/dist/cjs/event-bus/contracts/event-bus-manager.contract.js.map +1 -0
  82. package/dist/cjs/event-bus/contracts/event-bus.contract.js +3 -0
  83. package/dist/cjs/event-bus/contracts/event-bus.contract.js.map +1 -0
  84. package/dist/cjs/{serializer → event-bus/implementations}/_module.js +5 -5
  85. package/dist/cjs/event-bus/implementations/_module.js.map +1 -0
  86. package/dist/cjs/event-bus/implementations/_shared/test-utilities/_module.js +18 -0
  87. package/dist/cjs/event-bus/implementations/_shared/test-utilities/_module.js.map +1 -0
  88. package/dist/cjs/event-bus/implementations/_shared/test-utilities/event-bus-adapter.test-suite.js +51 -0
  89. package/dist/cjs/event-bus/implementations/_shared/test-utilities/event-bus-adapter.test-suite.js.map +1 -0
  90. package/dist/cjs/event-bus/implementations/event-bus/_module.js +19 -0
  91. package/dist/cjs/event-bus/implementations/event-bus/_module.js.map +1 -0
  92. package/dist/cjs/event-bus/implementations/event-bus/event-bus-manager.js +24 -0
  93. package/dist/cjs/event-bus/implementations/event-bus/event-bus-manager.js.map +1 -0
  94. package/dist/cjs/event-bus/implementations/event-bus/event-bus.js +104 -0
  95. package/dist/cjs/event-bus/implementations/event-bus/event-bus.js.map +1 -0
  96. package/dist/cjs/event-bus/implementations/event-bus/with-namespace-event-bus-adapter.js +41 -0
  97. package/dist/cjs/event-bus/implementations/event-bus/with-namespace-event-bus-adapter.js.map +1 -0
  98. package/dist/cjs/event-bus/implementations/event-bus/with-validation-event-bus-adapter.js +35 -0
  99. package/dist/cjs/event-bus/implementations/event-bus/with-validation-event-bus-adapter.js.map +1 -0
  100. package/dist/cjs/{utilities/async-iterable/timeout-iterable → event-bus/implementations/memory-event-bus-adapter}/_module.js +1 -1
  101. package/dist/cjs/event-bus/implementations/memory-event-bus-adapter/_module.js.map +1 -0
  102. package/dist/cjs/event-bus/implementations/memory-event-bus-adapter/memory-event-bus-adapter.js +23 -0
  103. package/dist/cjs/event-bus/implementations/memory-event-bus-adapter/memory-event-bus-adapter.js.map +1 -0
  104. package/dist/cjs/event-bus/implementations/no-op-event-bus-adapter/_module.js +18 -0
  105. package/dist/cjs/event-bus/implementations/no-op-event-bus-adapter/_module.js.map +1 -0
  106. package/dist/cjs/event-bus/implementations/no-op-event-bus-adapter/no-op-event-bus-adapter.js +16 -0
  107. package/dist/cjs/event-bus/implementations/no-op-event-bus-adapter/no-op-event-bus-adapter.js.map +1 -0
  108. package/dist/cjs/{utilities/async-iterable/abortable-iterable → event-bus/implementations/redis-event-bus-adapter}/_module.js +1 -1
  109. package/dist/cjs/event-bus/implementations/redis-event-bus-adapter/_module.js.map +1 -0
  110. package/dist/cjs/event-bus/implementations/redis-event-bus-adapter/redis-event-bus-adapter.js +45 -0
  111. package/dist/cjs/event-bus/implementations/redis-event-bus-adapter/redis-event-bus-adapter.js.map +1 -0
  112. package/dist/cjs/storage/contracts/_module.js +2 -0
  113. package/dist/cjs/storage/contracts/_module.js.map +1 -1
  114. package/dist/cjs/storage/contracts/storage-events.contract.js +14 -0
  115. package/dist/cjs/storage/contracts/storage-events.contract.js.map +1 -0
  116. package/dist/cjs/storage/contracts/storage-manager.contract.js +3 -0
  117. package/dist/cjs/storage/contracts/storage-manager.contract.js.map +1 -0
  118. package/dist/cjs/storage/implementations/_shared/test-utilities/storage-adapter.test-suite.js +292 -4
  119. package/dist/cjs/storage/implementations/_shared/test-utilities/storage-adapter.test-suite.js.map +1 -1
  120. package/dist/cjs/storage/implementations/storage/_module.js +1 -0
  121. package/dist/cjs/storage/implementations/storage/_module.js.map +1 -1
  122. package/dist/cjs/storage/implementations/storage/storage-manager.js +24 -0
  123. package/dist/cjs/storage/implementations/storage/storage-manager.js.map +1 -0
  124. package/dist/cjs/storage/implementations/storage/storage.js +67 -21
  125. package/dist/cjs/storage/implementations/storage/storage.js.map +1 -1
  126. package/dist/cjs/storage/implementations/storage/with-event-storage-adapter.js +254 -0
  127. package/dist/cjs/storage/implementations/storage/with-event-storage-adapter.js.map +1 -0
  128. package/dist/cjs/storage/implementations/storage/with-namespace-storage-adapter.js +0 -3
  129. package/dist/cjs/storage/implementations/storage/with-namespace-storage-adapter.js.map +1 -1
  130. package/dist/cjs/storage/implementations/storage/with-validation-storage-adapter.js.map +1 -1
  131. package/dist/cjs/utilities/_module.js +1 -2
  132. package/dist/cjs/utilities/_module.js.map +1 -1
  133. package/dist/cjs/utilities/async/_module.js +6 -1
  134. package/dist/cjs/utilities/async/_module.js.map +1 -1
  135. package/dist/cjs/utilities/{async-iterable/retry-iterable → async/abortable-iterable}/_module.js +1 -1
  136. package/dist/cjs/utilities/async/abortable-iterable/_module.js.map +1 -0
  137. package/dist/cjs/utilities/async/abortable-iterable/abortable-iterable.js.map +1 -0
  138. package/dist/cjs/utilities/{async-iterable → async}/delay-iterable/_module.js +1 -1
  139. package/dist/cjs/utilities/async/delay-iterable/_module.js.map +1 -0
  140. package/dist/cjs/utilities/async/delay-iterable/delay-iterable.js.map +1 -0
  141. package/dist/cjs/utilities/async/retry/retry.js +1 -1
  142. package/dist/cjs/utilities/async/retry/retry.js.map +1 -1
  143. package/dist/cjs/utilities/async/retry-iterable/_module.js +18 -0
  144. package/dist/cjs/utilities/async/retry-iterable/_module.js.map +1 -0
  145. package/dist/cjs/utilities/async/retry-iterable/retry-iterable.js.map +1 -0
  146. package/dist/cjs/utilities/async/timeout-iterable/_module.js +18 -0
  147. package/dist/cjs/utilities/async/timeout-iterable/_module.js.map +1 -0
  148. package/dist/cjs/utilities/{async-iterable → async}/timeout-iterable/timeout-iterable.js +1 -1
  149. package/dist/cjs/utilities/async/timeout-iterable/timeout-iterable.js.map +1 -0
  150. package/dist/cjs/utilities/backof-policies/_module.js +21 -0
  151. package/dist/cjs/utilities/backof-policies/_module.js.map +1 -0
  152. package/dist/cjs/utilities/backof-policies/_shared.js.map +1 -0
  153. package/dist/cjs/utilities/backof-policies/constant-backoff-policy/_module.js +18 -0
  154. package/dist/cjs/utilities/backof-policies/constant-backoff-policy/_module.js.map +1 -0
  155. package/dist/cjs/utilities/{async/backof-policies → backof-policies}/constant-backoff-policy/constant-backoff-policy.js +2 -2
  156. package/dist/cjs/utilities/backof-policies/constant-backoff-policy/constant-backoff-policy.js.map +1 -0
  157. package/dist/cjs/utilities/backof-policies/exponential-backoff-policy/_module.js +18 -0
  158. package/dist/cjs/utilities/backof-policies/exponential-backoff-policy/_module.js.map +1 -0
  159. package/dist/cjs/utilities/{async/backof-policies → backof-policies}/exponential-backoff-policy/exponential-backoff-policy.js +2 -2
  160. package/dist/cjs/utilities/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js.map +1 -0
  161. package/dist/cjs/utilities/backof-policies/linear-backoff-policy/_module.js +18 -0
  162. package/dist/cjs/utilities/backof-policies/linear-backoff-policy/_module.js.map +1 -0
  163. package/dist/cjs/utilities/{async/backof-policies → backof-policies}/linear-backoff-policy/linear-backoff-policy.js +2 -2
  164. package/dist/cjs/utilities/backof-policies/linear-backoff-policy/linear-backoff-policy.js.map +1 -0
  165. package/dist/cjs/utilities/backof-policies/polynomial-backoff-policy/_module.js +18 -0
  166. package/dist/cjs/utilities/backof-policies/polynomial-backoff-policy/_module.js.map +1 -0
  167. package/dist/cjs/utilities/{async/backof-policies → backof-policies}/polynomial-backoff-policy/polynomial-backoff-policy.js +2 -2
  168. package/dist/cjs/utilities/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js.map +1 -0
  169. package/dist/cjs/utilities/time-span/time-span.js.map +1 -1
  170. package/dist/cjs/utilities/validation/_module.js.map +1 -1
  171. package/dist/esm/_module.js +2 -0
  172. package/dist/esm/_module.js.map +1 -1
  173. package/dist/esm/_shared/utilities.js +7 -0
  174. package/dist/esm/_shared/utilities.js.map +1 -1
  175. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-chunk-iterable.js.map +1 -1
  176. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-chunk-while-iterable.js.map +1 -1
  177. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-collapse-iterable.js.map +1 -1
  178. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-count-by-iterable.js.map +1 -1
  179. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-cross-join-iterable.js.map +1 -1
  180. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-entries-iterable.js.map +1 -1
  181. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-error-handler-iterable.js.map +1 -1
  182. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-filter-iterable.js.map +1 -1
  183. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-flat-map-iterable.js.map +1 -1
  184. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-group-by-iterable.js.map +1 -1
  185. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-insert-after-iterable.js.map +1 -1
  186. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-insert-before-iterable.js.map +1 -1
  187. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-map-iterable.js.map +1 -1
  188. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-merge-iterable.js.map +1 -1
  189. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-pad-end-iterable.js.map +1 -1
  190. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-pad-start-iterable.js.map +1 -1
  191. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-partion-iterable.js.map +1 -1
  192. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-repeat-iterable.js.map +1 -1
  193. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-reverse-iterable.js.map +1 -1
  194. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-shuffle-iterable.js.map +1 -1
  195. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-skip-iterable.js.map +1 -1
  196. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-skip-until-iterable.js.map +1 -1
  197. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-slice-iterable.js.map +1 -1
  198. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-sliding-iterable.js.map +1 -1
  199. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-sort-iterable.js.map +1 -1
  200. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-split-iterable.js.map +1 -1
  201. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-take-iterable.js.map +1 -1
  202. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-take-until-iterable.js.map +1 -1
  203. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-tap-iterable.js.map +1 -1
  204. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-unique-iterable.js.map +1 -1
  205. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-update-iterable.js.map +1 -1
  206. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-when-iterable.js.map +1 -1
  207. package/dist/esm/collection/implementations/async-iterable-collection/_shared/async-zip-iterable.js.map +1 -1
  208. package/dist/esm/collection/implementations/async-iterable-collection/async-iterable-collection.js.map +1 -1
  209. package/dist/esm/collection/implementations/iterable-collection/_shared/chunk-iterable.js.map +1 -1
  210. package/dist/esm/collection/implementations/iterable-collection/_shared/chunk-while-iterable.js.map +1 -1
  211. package/dist/esm/collection/implementations/iterable-collection/_shared/collapse-iterable.js.map +1 -1
  212. package/dist/esm/collection/implementations/iterable-collection/_shared/count-by-iterable.js.map +1 -1
  213. package/dist/esm/collection/implementations/iterable-collection/_shared/cross-join-iterable.js.map +1 -1
  214. package/dist/esm/collection/implementations/iterable-collection/_shared/entries-iterable.js.map +1 -1
  215. package/dist/esm/collection/implementations/iterable-collection/_shared/filter-iterable.js.map +1 -1
  216. package/dist/esm/collection/implementations/iterable-collection/_shared/flat-map-iterable.js.map +1 -1
  217. package/dist/esm/collection/implementations/iterable-collection/_shared/group-by-iterable.js.map +1 -1
  218. package/dist/esm/collection/implementations/iterable-collection/_shared/insert-after-iterable.js.map +1 -1
  219. package/dist/esm/collection/implementations/iterable-collection/_shared/insert-before-iterable.js.map +1 -1
  220. package/dist/esm/collection/implementations/iterable-collection/_shared/map-iterable.js.map +1 -1
  221. package/dist/esm/collection/implementations/iterable-collection/_shared/merge-iterable.js.map +1 -1
  222. package/dist/esm/collection/implementations/iterable-collection/_shared/pad-end-iterable.js.map +1 -1
  223. package/dist/esm/collection/implementations/iterable-collection/_shared/pad-start-iterable.js.map +1 -1
  224. package/dist/esm/collection/implementations/iterable-collection/_shared/partion-iterable.js.map +1 -1
  225. package/dist/esm/collection/implementations/iterable-collection/_shared/repeat-iterable.js.map +1 -1
  226. package/dist/esm/collection/implementations/iterable-collection/_shared/reverse-iterable.js.map +1 -1
  227. package/dist/esm/collection/implementations/iterable-collection/_shared/shuffle-iterable.js.map +1 -1
  228. package/dist/esm/collection/implementations/iterable-collection/_shared/skip-iterable.js.map +1 -1
  229. package/dist/esm/collection/implementations/iterable-collection/_shared/skip-until-iterable.js.map +1 -1
  230. package/dist/esm/collection/implementations/iterable-collection/_shared/slice-iterable.js.map +1 -1
  231. package/dist/esm/collection/implementations/iterable-collection/_shared/sliding-iterable.js.map +1 -1
  232. package/dist/esm/collection/implementations/iterable-collection/_shared/sort-iterable.js.map +1 -1
  233. package/dist/esm/collection/implementations/iterable-collection/_shared/split-iterable.js.map +1 -1
  234. package/dist/esm/collection/implementations/iterable-collection/_shared/take-iterable.js.map +1 -1
  235. package/dist/esm/collection/implementations/iterable-collection/_shared/take-until-iterable.js.map +1 -1
  236. package/dist/esm/collection/implementations/iterable-collection/_shared/tap-iterable.js.map +1 -1
  237. package/dist/esm/collection/implementations/iterable-collection/_shared/unique-iterable.js.map +1 -1
  238. package/dist/esm/collection/implementations/iterable-collection/_shared/update-iterable.js.map +1 -1
  239. package/dist/esm/collection/implementations/iterable-collection/_shared/when-iterable.js.map +1 -1
  240. package/dist/esm/collection/implementations/iterable-collection/_shared/zip-iterable.js.map +1 -1
  241. package/dist/esm/collection/implementations/iterable-collection/iterable-collection.js.map +1 -1
  242. package/dist/esm/collection/implementations/list-collection/list-collection.js +2 -1
  243. package/dist/esm/collection/implementations/list-collection/list-collection.js.map +1 -1
  244. package/dist/esm/event-bus/contracts/_module.js +5 -0
  245. package/dist/esm/event-bus/contracts/_module.js.map +1 -0
  246. package/dist/esm/event-bus/contracts/_shared.js +25 -0
  247. package/dist/esm/event-bus/contracts/_shared.js.map +1 -0
  248. package/dist/esm/event-bus/contracts/event-bus-adapter.contract.js +1 -0
  249. package/dist/esm/event-bus/contracts/event-bus-adapter.contract.js.map +1 -0
  250. package/dist/esm/event-bus/contracts/event-bus-manager.contract.js +1 -0
  251. package/dist/esm/event-bus/contracts/event-bus-manager.contract.js.map +1 -0
  252. package/dist/esm/event-bus/contracts/event-bus.contract.js +1 -0
  253. package/dist/esm/event-bus/contracts/event-bus.contract.js.map +1 -0
  254. package/dist/esm/event-bus/implementations/_module.js +6 -0
  255. package/dist/esm/event-bus/implementations/_module.js.map +1 -0
  256. package/dist/esm/event-bus/implementations/_shared/test-utilities/_module.js +2 -0
  257. package/dist/esm/event-bus/implementations/_shared/test-utilities/_module.js.map +1 -0
  258. package/dist/esm/event-bus/implementations/_shared/test-utilities/event-bus-adapter.test-suite.js +48 -0
  259. package/dist/esm/event-bus/implementations/_shared/test-utilities/event-bus-adapter.test-suite.js.map +1 -0
  260. package/dist/esm/event-bus/implementations/event-bus/_module.js +3 -0
  261. package/dist/esm/event-bus/implementations/event-bus/_module.js.map +1 -0
  262. package/dist/esm/event-bus/implementations/event-bus/event-bus-manager.js +20 -0
  263. package/dist/esm/event-bus/implementations/event-bus/event-bus-manager.js.map +1 -0
  264. package/dist/esm/event-bus/implementations/event-bus/event-bus.js +100 -0
  265. package/dist/esm/event-bus/implementations/event-bus/event-bus.js.map +1 -0
  266. package/dist/esm/event-bus/implementations/event-bus/with-namespace-event-bus-adapter.js +37 -0
  267. package/dist/esm/event-bus/implementations/event-bus/with-namespace-event-bus-adapter.js.map +1 -0
  268. package/dist/esm/event-bus/implementations/event-bus/with-validation-event-bus-adapter.js +31 -0
  269. package/dist/esm/event-bus/implementations/event-bus/with-validation-event-bus-adapter.js.map +1 -0
  270. package/dist/esm/event-bus/implementations/memory-event-bus-adapter/_module.js +2 -0
  271. package/dist/esm/event-bus/implementations/memory-event-bus-adapter/_module.js.map +1 -0
  272. package/dist/esm/event-bus/implementations/memory-event-bus-adapter/memory-event-bus-adapter.js +19 -0
  273. package/dist/esm/event-bus/implementations/memory-event-bus-adapter/memory-event-bus-adapter.js.map +1 -0
  274. package/dist/esm/event-bus/implementations/no-op-event-bus-adapter/_module.js +2 -0
  275. package/dist/esm/event-bus/implementations/no-op-event-bus-adapter/_module.js.map +1 -0
  276. package/dist/esm/event-bus/implementations/no-op-event-bus-adapter/no-op-event-bus-adapter.js +12 -0
  277. package/dist/esm/event-bus/implementations/no-op-event-bus-adapter/no-op-event-bus-adapter.js.map +1 -0
  278. package/dist/esm/event-bus/implementations/redis-event-bus-adapter/_module.js +2 -0
  279. package/dist/esm/event-bus/implementations/redis-event-bus-adapter/_module.js.map +1 -0
  280. package/dist/esm/event-bus/implementations/redis-event-bus-adapter/redis-event-bus-adapter.js +41 -0
  281. package/dist/esm/event-bus/implementations/redis-event-bus-adapter/redis-event-bus-adapter.js.map +1 -0
  282. package/dist/esm/storage/contracts/_module.js +2 -0
  283. package/dist/esm/storage/contracts/_module.js.map +1 -1
  284. package/dist/esm/storage/contracts/storage-events.contract.js +11 -0
  285. package/dist/esm/storage/contracts/storage-events.contract.js.map +1 -0
  286. package/dist/esm/storage/contracts/storage-manager.contract.js +1 -0
  287. package/dist/esm/storage/contracts/storage-manager.contract.js.map +1 -0
  288. package/dist/esm/storage/implementations/_shared/test-utilities/storage-adapter.test-suite.js +292 -4
  289. package/dist/esm/storage/implementations/_shared/test-utilities/storage-adapter.test-suite.js.map +1 -1
  290. package/dist/esm/storage/implementations/storage/_module.js +1 -0
  291. package/dist/esm/storage/implementations/storage/_module.js.map +1 -1
  292. package/dist/esm/storage/implementations/storage/storage-manager.js +20 -0
  293. package/dist/esm/storage/implementations/storage/storage-manager.js.map +1 -0
  294. package/dist/esm/storage/implementations/storage/storage.js +69 -23
  295. package/dist/esm/storage/implementations/storage/storage.js.map +1 -1
  296. package/dist/esm/storage/implementations/storage/with-event-storage-adapter.js +250 -0
  297. package/dist/esm/storage/implementations/storage/with-event-storage-adapter.js.map +1 -0
  298. package/dist/esm/storage/implementations/storage/with-namespace-storage-adapter.js +0 -3
  299. package/dist/esm/storage/implementations/storage/with-namespace-storage-adapter.js.map +1 -1
  300. package/dist/esm/storage/implementations/storage/with-validation-storage-adapter.js.map +1 -1
  301. package/dist/esm/utilities/_module.js +1 -2
  302. package/dist/esm/utilities/_module.js.map +1 -1
  303. package/dist/esm/utilities/async/_module.js +4 -1
  304. package/dist/esm/utilities/async/_module.js.map +1 -1
  305. package/dist/esm/utilities/async/abortable-iterable/_module.js +2 -0
  306. package/dist/esm/utilities/async/abortable-iterable/_module.js.map +1 -0
  307. package/dist/esm/utilities/async/abortable-iterable/abortable-iterable.js.map +1 -0
  308. package/dist/esm/utilities/async/delay-iterable/_module.js +2 -0
  309. package/dist/esm/utilities/async/delay-iterable/_module.js.map +1 -0
  310. package/dist/esm/utilities/async/delay-iterable/delay-iterable.js.map +1 -0
  311. package/dist/esm/utilities/async/retry/retry.js +1 -1
  312. package/dist/esm/utilities/async/retry/retry.js.map +1 -1
  313. package/dist/esm/utilities/async/retry-iterable/_module.js +2 -0
  314. package/dist/esm/utilities/async/retry-iterable/_module.js.map +1 -0
  315. package/dist/esm/utilities/async/retry-iterable/retry-iterable.js.map +1 -0
  316. package/dist/esm/utilities/async/timeout-iterable/_module.js +2 -0
  317. package/dist/esm/utilities/async/timeout-iterable/_module.js.map +1 -0
  318. package/dist/esm/utilities/{async-iterable → async}/timeout-iterable/timeout-iterable.js +1 -1
  319. package/dist/esm/utilities/async/timeout-iterable/timeout-iterable.js.map +1 -0
  320. package/dist/esm/utilities/backof-policies/_module.js +5 -0
  321. package/dist/esm/utilities/backof-policies/_module.js.map +1 -0
  322. package/dist/esm/utilities/backof-policies/_shared.js.map +1 -0
  323. package/dist/esm/utilities/backof-policies/constant-backoff-policy/_module.js +2 -0
  324. package/dist/esm/utilities/backof-policies/constant-backoff-policy/_module.js.map +1 -0
  325. package/dist/esm/utilities/{async/backof-policies → backof-policies}/constant-backoff-policy/constant-backoff-policy.js +2 -2
  326. package/dist/esm/utilities/backof-policies/constant-backoff-policy/constant-backoff-policy.js.map +1 -0
  327. package/dist/esm/utilities/backof-policies/exponential-backoff-policy/_module.js +2 -0
  328. package/dist/esm/utilities/backof-policies/exponential-backoff-policy/_module.js.map +1 -0
  329. package/dist/esm/utilities/{async/backof-policies → backof-policies}/exponential-backoff-policy/exponential-backoff-policy.js +2 -2
  330. package/dist/esm/utilities/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js.map +1 -0
  331. package/dist/esm/utilities/backof-policies/linear-backoff-policy/_module.js +2 -0
  332. package/dist/esm/utilities/backof-policies/linear-backoff-policy/_module.js.map +1 -0
  333. package/dist/esm/utilities/{async/backof-policies → backof-policies}/linear-backoff-policy/linear-backoff-policy.js +2 -2
  334. package/dist/esm/utilities/backof-policies/linear-backoff-policy/linear-backoff-policy.js.map +1 -0
  335. package/dist/esm/utilities/backof-policies/polynomial-backoff-policy/_module.js +2 -0
  336. package/dist/esm/utilities/backof-policies/polynomial-backoff-policy/_module.js.map +1 -0
  337. package/dist/esm/utilities/{async/backof-policies → backof-policies}/polynomial-backoff-policy/polynomial-backoff-policy.js +2 -2
  338. package/dist/esm/utilities/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js.map +1 -0
  339. package/dist/esm/utilities/time-span/time-span.js.map +1 -1
  340. package/dist/esm/utilities/validation/_module.js.map +1 -1
  341. package/dist/types/_module.d.ts +2 -0
  342. package/dist/types/_shared/types.d.ts +1 -1
  343. package/dist/types/_shared/utilities.d.ts +8 -0
  344. package/dist/types/collection/contracts/async-collection.contract.d.ts +9 -8
  345. package/dist/types/collection/contracts/collection.contract.d.ts +8 -7
  346. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-chunk-iterable.d.ts +3 -0
  347. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-chunk-while-iterable.d.ts +3 -0
  348. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-collapse-iterable.d.ts +3 -0
  349. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-count-by-iterable.d.ts +3 -0
  350. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-cross-join-iterable.d.ts +3 -0
  351. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-entries-iterable.d.ts +3 -0
  352. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-error-handler-iterable.d.ts +3 -0
  353. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-filter-iterable.d.ts +3 -0
  354. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-flat-map-iterable.d.ts +3 -0
  355. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-group-by-iterable.d.ts +3 -0
  356. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-insert-after-iterable.d.ts +3 -0
  357. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-insert-before-iterable.d.ts +3 -0
  358. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-map-iterable.d.ts +3 -0
  359. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-merge-iterable.d.ts +3 -0
  360. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-pad-end-iterable.d.ts +3 -0
  361. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-pad-start-iterable.d.ts +3 -0
  362. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-partion-iterable.d.ts +3 -0
  363. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-repeat-iterable.d.ts +3 -0
  364. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-reverse-iterable.d.ts +3 -0
  365. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-shuffle-iterable.d.ts +3 -0
  366. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-skip-iterable.d.ts +3 -0
  367. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-skip-until-iterable.d.ts +3 -0
  368. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-slice-iterable.d.ts +3 -0
  369. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-sliding-iterable.d.ts +3 -0
  370. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-sort-iterable.d.ts +3 -0
  371. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-split-iterable.d.ts +3 -0
  372. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-take-iterable.d.ts +3 -0
  373. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-take-until-iterable.d.ts +3 -0
  374. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-tap-iterable.d.ts +3 -0
  375. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-unique-iterable.d.ts +3 -0
  376. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-update-iterable.d.ts +3 -0
  377. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-when-iterable.d.ts +3 -0
  378. package/dist/types/collection/implementations/async-iterable-collection/_shared/async-zip-iterable.d.ts +3 -0
  379. package/dist/types/collection/implementations/async-iterable-collection/async-iterable-collection.d.ts +10 -9
  380. package/dist/types/collection/implementations/iterable-collection/_shared/chunk-iterable.d.ts +3 -0
  381. package/dist/types/collection/implementations/iterable-collection/_shared/chunk-while-iterable.d.ts +3 -0
  382. package/dist/types/collection/implementations/iterable-collection/_shared/collapse-iterable.d.ts +3 -0
  383. package/dist/types/collection/implementations/iterable-collection/_shared/count-by-iterable.d.ts +3 -0
  384. package/dist/types/collection/implementations/iterable-collection/_shared/cross-join-iterable.d.ts +3 -0
  385. package/dist/types/collection/implementations/iterable-collection/_shared/entries-iterable.d.ts +3 -0
  386. package/dist/types/collection/implementations/iterable-collection/_shared/filter-iterable.d.ts +3 -0
  387. package/dist/types/collection/implementations/iterable-collection/_shared/flat-map-iterable.d.ts +3 -0
  388. package/dist/types/collection/implementations/iterable-collection/_shared/group-by-iterable.d.ts +3 -0
  389. package/dist/types/collection/implementations/iterable-collection/_shared/insert-after-iterable.d.ts +3 -0
  390. package/dist/types/collection/implementations/iterable-collection/_shared/insert-before-iterable.d.ts +3 -0
  391. package/dist/types/collection/implementations/iterable-collection/_shared/map-iterable.d.ts +3 -0
  392. package/dist/types/collection/implementations/iterable-collection/_shared/merge-iterable.d.ts +3 -0
  393. package/dist/types/collection/implementations/iterable-collection/_shared/pad-end-iterable.d.ts +3 -0
  394. package/dist/types/collection/implementations/iterable-collection/_shared/pad-start-iterable.d.ts +3 -0
  395. package/dist/types/collection/implementations/iterable-collection/_shared/partion-iterable.d.ts +3 -0
  396. package/dist/types/collection/implementations/iterable-collection/_shared/repeat-iterable.d.ts +3 -0
  397. package/dist/types/collection/implementations/iterable-collection/_shared/reverse-iterable.d.ts +3 -0
  398. package/dist/types/collection/implementations/iterable-collection/_shared/shuffle-iterable.d.ts +3 -0
  399. package/dist/types/collection/implementations/iterable-collection/_shared/skip-iterable.d.ts +3 -0
  400. package/dist/types/collection/implementations/iterable-collection/_shared/skip-until-iterable.d.ts +3 -0
  401. package/dist/types/collection/implementations/iterable-collection/_shared/slice-iterable.d.ts +3 -0
  402. package/dist/types/collection/implementations/iterable-collection/_shared/sliding-iterable.d.ts +3 -0
  403. package/dist/types/collection/implementations/iterable-collection/_shared/sort-iterable.d.ts +3 -0
  404. package/dist/types/collection/implementations/iterable-collection/_shared/split-iterable.d.ts +3 -0
  405. package/dist/types/collection/implementations/iterable-collection/_shared/take-iterable.d.ts +3 -0
  406. package/dist/types/collection/implementations/iterable-collection/_shared/take-until-iterable.d.ts +3 -0
  407. package/dist/types/collection/implementations/iterable-collection/_shared/tap-iterable.d.ts +3 -0
  408. package/dist/types/collection/implementations/iterable-collection/_shared/unique-iterable.d.ts +3 -0
  409. package/dist/types/collection/implementations/iterable-collection/_shared/update-iterable.d.ts +3 -0
  410. package/dist/types/collection/implementations/iterable-collection/_shared/when-iterable.d.ts +3 -0
  411. package/dist/types/collection/implementations/iterable-collection/_shared/zip-iterable.d.ts +3 -0
  412. package/dist/types/collection/implementations/iterable-collection/iterable-collection.d.ts +7 -7
  413. package/dist/types/collection/implementations/list-collection/list-collection.d.ts +7 -7
  414. package/dist/types/event-bus/contracts/_module.d.ts +4 -0
  415. package/dist/types/event-bus/contracts/_shared.d.ts +32 -0
  416. package/dist/types/event-bus/contracts/event-bus-adapter.contract.d.ts +23 -0
  417. package/dist/types/event-bus/contracts/event-bus-manager.contract.d.ts +20 -0
  418. package/dist/types/event-bus/contracts/event-bus.contract.d.ts +91 -0
  419. package/dist/types/event-bus/implementations/_module.d.ts +5 -0
  420. package/dist/types/event-bus/implementations/_shared/test-utilities/_module.d.ts +1 -0
  421. package/dist/types/event-bus/implementations/_shared/test-utilities/event-bus-adapter.test-suite.d.ts +20 -0
  422. package/dist/types/event-bus/implementations/event-bus/_module.d.ts +2 -0
  423. package/dist/types/event-bus/implementations/event-bus/event-bus-manager.d.ts +23 -0
  424. package/dist/types/event-bus/implementations/event-bus/event-bus.d.ts +102 -0
  425. package/dist/types/event-bus/implementations/event-bus/with-namespace-event-bus-adapter.d.ts +16 -0
  426. package/dist/types/event-bus/implementations/event-bus/with-validation-event-bus-adapter.d.ts +17 -0
  427. package/dist/types/event-bus/implementations/memory-event-bus-adapter/_module.d.ts +1 -0
  428. package/dist/types/event-bus/implementations/memory-event-bus-adapter/memory-event-bus-adapter.d.ts +15 -0
  429. package/dist/types/event-bus/implementations/no-op-event-bus-adapter/_module.d.ts +1 -0
  430. package/dist/types/event-bus/implementations/no-op-event-bus-adapter/no-op-event-bus-adapter.d.ts +14 -0
  431. package/dist/types/event-bus/implementations/redis-event-bus-adapter/_module.d.ts +1 -0
  432. package/dist/types/event-bus/implementations/redis-event-bus-adapter/redis-event-bus-adapter.d.ts +28 -0
  433. package/dist/types/storage/contracts/_module.d.ts +2 -0
  434. package/dist/types/storage/contracts/storage-adapter.contract.d.ts +11 -6
  435. package/dist/types/storage/contracts/storage-events.contract.d.ts +90 -0
  436. package/dist/types/storage/contracts/storage-manager.contract.d.ts +19 -0
  437. package/dist/types/storage/contracts/storage.contract.d.ts +51 -26
  438. package/dist/types/storage/implementations/storage/_module.d.ts +1 -0
  439. package/dist/types/storage/implementations/storage/storage-manager.d.ts +23 -0
  440. package/dist/types/storage/implementations/storage/storage.d.ts +81 -8
  441. package/dist/types/storage/implementations/storage/with-event-storage-adapter.d.ts +31 -0
  442. package/dist/types/storage/implementations/storage/with-namespace-storage-adapter.d.ts +0 -1
  443. package/dist/types/storage/implementations/storage/with-validation-storage-adapter.d.ts +3 -0
  444. package/dist/types/utilities/_module.d.ts +1 -2
  445. package/dist/types/utilities/async/_module.d.ts +4 -1
  446. package/dist/types/utilities/async/_shared.d.ts +6 -6
  447. package/dist/types/utilities/async/abortable/abortable.d.ts +2 -2
  448. package/dist/types/utilities/async/abortable-iterable/_module.d.ts +1 -0
  449. package/dist/types/utilities/{async-iterable → async}/abortable-iterable/abortable-iterable.d.ts +2 -2
  450. package/dist/types/utilities/async/delay/delay.d.ts +2 -2
  451. package/dist/types/utilities/async/delay-iterable/_module.d.ts +1 -0
  452. package/dist/types/utilities/{async-iterable → async}/delay-iterable/delay-iterable.d.ts +2 -2
  453. package/dist/types/utilities/async/lazy-promise/lazy-promise.d.ts +3 -3
  454. package/dist/types/utilities/async/retry/retry.d.ts +7 -4
  455. package/dist/types/utilities/async/retry-iterable/_module.d.ts +1 -0
  456. package/dist/types/utilities/{async-iterable → async}/retry-iterable/retry-iterable.d.ts +1 -1
  457. package/dist/types/utilities/async/timeout/timeout.d.ts +2 -2
  458. package/dist/types/utilities/async/timeout-iterable/_module.d.ts +1 -0
  459. package/dist/types/utilities/{async-iterable → async}/timeout-iterable/timeout-iterable.d.ts +2 -2
  460. package/dist/types/utilities/backof-policies/_module.d.ts +5 -0
  461. package/dist/types/utilities/{async/backof-policies → backof-policies}/_shared.d.ts +2 -2
  462. package/dist/types/utilities/backof-policies/constant-backoff-policy/_module.d.ts +1 -0
  463. package/dist/types/utilities/{async/backof-policies → backof-policies}/constant-backoff-policy/constant-backoff-policy.d.ts +3 -3
  464. package/dist/types/utilities/backof-policies/exponential-backoff-policy/_module.d.ts +1 -0
  465. package/dist/types/utilities/{async/backof-policies → backof-policies}/exponential-backoff-policy/exponential-backoff-policy.d.ts +3 -3
  466. package/dist/types/utilities/backof-policies/linear-backoff-policy/_module.d.ts +1 -0
  467. package/dist/types/utilities/{async/backof-policies → backof-policies}/linear-backoff-policy/linear-backoff-policy.d.ts +3 -3
  468. package/dist/types/utilities/backof-policies/polynomial-backoff-policy/_module.d.ts +1 -0
  469. package/dist/types/utilities/{async/backof-policies → backof-policies}/polynomial-backoff-policy/polynomial-backoff-policy.d.ts +3 -3
  470. package/dist/types/utilities/time-span/time-span.d.ts +2 -1
  471. package/dist/types/utilities/validation/_module.d.ts +21 -1
  472. package/package.json +1 -1
  473. package/dist/cjs/serializer/_module.js.map +0 -1
  474. package/dist/cjs/storage/implementations/_shared/test-utilities/storage-adapter-api.test-suite.js +0 -300
  475. package/dist/cjs/storage/implementations/_shared/test-utilities/storage-adapter-api.test-suite.js.map +0 -1
  476. package/dist/cjs/storage/implementations/_shared/test-utilities/storage-adapter-value.test-suite.js +0 -1208
  477. package/dist/cjs/storage/implementations/_shared/test-utilities/storage-adapter-value.test-suite.js.map +0 -1
  478. package/dist/cjs/utilities/async/backof-policies/_module.js +0 -21
  479. package/dist/cjs/utilities/async/backof-policies/_module.js.map +0 -1
  480. package/dist/cjs/utilities/async/backof-policies/_shared.js.map +0 -1
  481. package/dist/cjs/utilities/async/backof-policies/constant-backoff-policy/_module.js +0 -18
  482. package/dist/cjs/utilities/async/backof-policies/constant-backoff-policy/_module.js.map +0 -1
  483. package/dist/cjs/utilities/async/backof-policies/constant-backoff-policy/constant-backoff-policy.js.map +0 -1
  484. package/dist/cjs/utilities/async/backof-policies/exponential-backoff-policy/_module.js.map +0 -1
  485. package/dist/cjs/utilities/async/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js.map +0 -1
  486. package/dist/cjs/utilities/async/backof-policies/linear-backoff-policy/_module.js +0 -18
  487. package/dist/cjs/utilities/async/backof-policies/linear-backoff-policy/_module.js.map +0 -1
  488. package/dist/cjs/utilities/async/backof-policies/linear-backoff-policy/linear-backoff-policy.js.map +0 -1
  489. package/dist/cjs/utilities/async/backof-policies/polynomial-backoff-policy/_module.js +0 -18
  490. package/dist/cjs/utilities/async/backof-policies/polynomial-backoff-policy/_module.js.map +0 -1
  491. package/dist/cjs/utilities/async/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js.map +0 -1
  492. package/dist/cjs/utilities/async-iterable/_module.js +0 -23
  493. package/dist/cjs/utilities/async-iterable/_module.js.map +0 -1
  494. package/dist/cjs/utilities/async-iterable/abortable-iterable/_module.js.map +0 -1
  495. package/dist/cjs/utilities/async-iterable/abortable-iterable/abortable-iterable.js.map +0 -1
  496. package/dist/cjs/utilities/async-iterable/delay-iterable/_module.js.map +0 -1
  497. package/dist/cjs/utilities/async-iterable/delay-iterable/delay-iterable.js.map +0 -1
  498. package/dist/cjs/utilities/async-iterable/retry-iterable/_module.js.map +0 -1
  499. package/dist/cjs/utilities/async-iterable/retry-iterable/retry-iterable.js.map +0 -1
  500. package/dist/cjs/utilities/async-iterable/timeout-iterable/_module.js.map +0 -1
  501. package/dist/cjs/utilities/async-iterable/timeout-iterable/timeout-iterable.js.map +0 -1
  502. package/dist/esm/serializer/_module.js +0 -6
  503. package/dist/esm/serializer/_module.js.map +0 -1
  504. package/dist/esm/storage/implementations/_shared/test-utilities/storage-adapter-api.test-suite.js +0 -297
  505. package/dist/esm/storage/implementations/_shared/test-utilities/storage-adapter-api.test-suite.js.map +0 -1
  506. package/dist/esm/storage/implementations/_shared/test-utilities/storage-adapter-value.test-suite.js +0 -1205
  507. package/dist/esm/storage/implementations/_shared/test-utilities/storage-adapter-value.test-suite.js.map +0 -1
  508. package/dist/esm/utilities/async/backof-policies/_module.js +0 -5
  509. package/dist/esm/utilities/async/backof-policies/_module.js.map +0 -1
  510. package/dist/esm/utilities/async/backof-policies/_shared.js.map +0 -1
  511. package/dist/esm/utilities/async/backof-policies/constant-backoff-policy/_module.js +0 -2
  512. package/dist/esm/utilities/async/backof-policies/constant-backoff-policy/_module.js.map +0 -1
  513. package/dist/esm/utilities/async/backof-policies/constant-backoff-policy/constant-backoff-policy.js.map +0 -1
  514. package/dist/esm/utilities/async/backof-policies/exponential-backoff-policy/_module.js +0 -2
  515. package/dist/esm/utilities/async/backof-policies/exponential-backoff-policy/_module.js.map +0 -1
  516. package/dist/esm/utilities/async/backof-policies/exponential-backoff-policy/exponential-backoff-policy.js.map +0 -1
  517. package/dist/esm/utilities/async/backof-policies/linear-backoff-policy/_module.js +0 -2
  518. package/dist/esm/utilities/async/backof-policies/linear-backoff-policy/_module.js.map +0 -1
  519. package/dist/esm/utilities/async/backof-policies/linear-backoff-policy/linear-backoff-policy.js.map +0 -1
  520. package/dist/esm/utilities/async/backof-policies/polynomial-backoff-policy/_module.js +0 -2
  521. package/dist/esm/utilities/async/backof-policies/polynomial-backoff-policy/_module.js.map +0 -1
  522. package/dist/esm/utilities/async/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.js.map +0 -1
  523. package/dist/esm/utilities/async-iterable/_module.js +0 -5
  524. package/dist/esm/utilities/async-iterable/_module.js.map +0 -1
  525. package/dist/esm/utilities/async-iterable/abortable-iterable/_module.js +0 -2
  526. package/dist/esm/utilities/async-iterable/abortable-iterable/_module.js.map +0 -1
  527. package/dist/esm/utilities/async-iterable/abortable-iterable/abortable-iterable.js.map +0 -1
  528. package/dist/esm/utilities/async-iterable/delay-iterable/_module.js +0 -2
  529. package/dist/esm/utilities/async-iterable/delay-iterable/_module.js.map +0 -1
  530. package/dist/esm/utilities/async-iterable/delay-iterable/delay-iterable.js.map +0 -1
  531. package/dist/esm/utilities/async-iterable/retry-iterable/_module.js +0 -2
  532. package/dist/esm/utilities/async-iterable/retry-iterable/_module.js.map +0 -1
  533. package/dist/esm/utilities/async-iterable/retry-iterable/retry-iterable.js.map +0 -1
  534. package/dist/esm/utilities/async-iterable/timeout-iterable/_module.js +0 -2
  535. package/dist/esm/utilities/async-iterable/timeout-iterable/_module.js.map +0 -1
  536. package/dist/esm/utilities/async-iterable/timeout-iterable/timeout-iterable.js.map +0 -1
  537. package/dist/types/serializer/_module.d.ts +0 -5
  538. package/dist/types/storage/implementations/_shared/test-utilities/storage-adapter-api.test-suite.d.ts +0 -20
  539. package/dist/types/storage/implementations/_shared/test-utilities/storage-adapter-value.test-suite.d.ts +0 -20
  540. package/dist/types/utilities/async/backof-policies/_module.d.ts +0 -5
  541. package/dist/types/utilities/async/backof-policies/constant-backoff-policy/_module.d.ts +0 -1
  542. package/dist/types/utilities/async/backof-policies/exponential-backoff-policy/_module.d.ts +0 -1
  543. package/dist/types/utilities/async/backof-policies/linear-backoff-policy/_module.d.ts +0 -1
  544. package/dist/types/utilities/async/backof-policies/polynomial-backoff-policy/_module.d.ts +0 -1
  545. package/dist/types/utilities/async-iterable/_module.d.ts +0 -4
  546. package/dist/types/utilities/async-iterable/abortable-iterable/_module.d.ts +0 -1
  547. package/dist/types/utilities/async-iterable/delay-iterable/_module.d.ts +0 -1
  548. package/dist/types/utilities/async-iterable/retry-iterable/_module.d.ts +0 -1
  549. package/dist/types/utilities/async-iterable/timeout-iterable/_module.d.ts +0 -1
  550. /package/dist/cjs/utilities/{async-iterable → async}/abortable-iterable/abortable-iterable.js +0 -0
  551. /package/dist/cjs/utilities/{async-iterable → async}/delay-iterable/delay-iterable.js +0 -0
  552. /package/dist/cjs/utilities/{async-iterable → async}/retry-iterable/retry-iterable.js +0 -0
  553. /package/dist/cjs/utilities/{async/backof-policies → backof-policies}/_shared.js +0 -0
  554. /package/dist/esm/utilities/{async-iterable → async}/abortable-iterable/abortable-iterable.js +0 -0
  555. /package/dist/esm/utilities/{async-iterable → async}/delay-iterable/delay-iterable.js +0 -0
  556. /package/dist/esm/utilities/{async-iterable → async}/retry-iterable/retry-iterable.js +0 -0
  557. /package/dist/esm/utilities/{async/backof-policies → backof-policies}/_shared.js +0 -0
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type AsyncPredicate, type AsyncMap, type IAsyncCollection, type ChangendItem } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type AsyncModifier, type IAsyncCollection } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type AsyncIterableValue } from "../../../../_shared/types";
2
5
  import { type RecordItem } from "../../../../_shared/types";
3
6
  /**
@@ -2,13 +2,14 @@
2
2
  * @module Collection
3
3
  */
4
4
  import { type AsyncCollapse, type AsyncPredicate, type AsyncForEach, type AsyncMap, type AsyncModifier, type AsyncTap, type AsyncTransform, type Comparator, type IAsyncCollection, type ChangendItem, type AsyncReduce, type CrossJoinResult } from "../../../collection/contracts/_module";
5
- import { type AsyncIterableValue, type AsyncLazyable, type EnsureType } from "../../../_shared/types";
5
+ import { type AsyncIterableValue, type AsyncLazyable } from "../../../_shared/types";
6
6
  import { type RecordItem } from "../../../_shared/types";
7
7
  import type { TimeSpan } from "../../../utilities/_module";
8
8
  import { LazyPromise } from "../../../utilities/_module";
9
9
  /**
10
- * All methods that return <i>{@link IAsyncCollection}</i> are executed lazly which means they will be executed when the <i>AsyncIterableCollection</i> is iterated with <i>forEach</i> method or "for await of" loop.
11
- * The rest of the methods are executed eagerly.
10
+ * All methods that return <i>{@link IAsyncCollection}</i> are executed lazly.
11
+ * The methods that return <i>{@link IAsyncCollection}</i> will only be executed when <i>forEach</i> method is called or <i>for await</i> loop.
12
+ * The methods that return <i>{@link PromiseLike}</i> object will execute only when awaited or <i>then</i> method is called.
12
13
  * @group Adapters
13
14
  */
14
15
  export declare class AsyncIterableCollection<TInput> implements IAsyncCollection<TInput> {
@@ -30,16 +31,16 @@ export declare class AsyncIterableCollection<TInput> implements IAsyncCollection
30
31
  reduce(reduceFn: AsyncReduce<TInput, IAsyncCollection<TInput>, TInput>): LazyPromise<TInput>;
31
32
  reduce(reduceFn: AsyncReduce<TInput, IAsyncCollection<TInput>, TInput>, initialValue: TInput): LazyPromise<TInput>;
32
33
  reduce<TOutput>(reduceFn: AsyncReduce<TInput, IAsyncCollection<TInput>, TOutput>, initialValue: TOutput): LazyPromise<TOutput>;
33
- join(separator?: string): LazyPromise<EnsureType<TInput, string>>;
34
+ join(separator?: string): LazyPromise<Extract<TInput, string>>;
34
35
  collapse(): IAsyncCollection<AsyncCollapse<TInput>>;
35
36
  flatMap<TOutput>(mapFn: AsyncMap<TInput, IAsyncCollection<TInput>, Iterable<TOutput>>): IAsyncCollection<TOutput>;
36
37
  change<TFilterOutput extends TInput, TMapOutput>(predicateFn: AsyncPredicate<TInput, IAsyncCollection<TInput>, TFilterOutput>, mapFn: AsyncMap<TFilterOutput, IAsyncCollection<TInput>, TMapOutput>): IAsyncCollection<ChangendItem<TInput, TFilterOutput, TMapOutput>>;
37
38
  page(page: number, pageSize: number): IAsyncCollection<TInput>;
38
- sum(): LazyPromise<EnsureType<TInput, number>>;
39
- average(): LazyPromise<EnsureType<TInput, number>>;
40
- median(): LazyPromise<EnsureType<TInput, number>>;
41
- min(): LazyPromise<EnsureType<TInput, number>>;
42
- max(): LazyPromise<EnsureType<TInput, number>>;
39
+ sum(): LazyPromise<Extract<TInput, number>>;
40
+ average(): LazyPromise<Extract<TInput, number>>;
41
+ median(): LazyPromise<Extract<TInput, number>>;
42
+ min(): LazyPromise<Extract<TInput, number>>;
43
+ max(): LazyPromise<Extract<TInput, number>>;
43
44
  percentage(predicateFn: AsyncPredicate<TInput, IAsyncCollection<TInput>>): LazyPromise<number>;
44
45
  some<TOutput extends TInput>(predicateFn: AsyncPredicate<TInput, IAsyncCollection<TInput>, TOutput>): LazyPromise<boolean>;
45
46
  every<TOutput extends TInput>(predicateFn: AsyncPredicate<TInput, IAsyncCollection<TInput>, TOutput>): LazyPromise<boolean>;
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type ICollection } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type Predicate, type ICollection } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type Collapse, type ICollection } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type ICollection, type Map } from "../../../../collection/contracts/_module";
2
5
  import { type RecordItem } from "../../../../_shared/types";
3
6
  /**
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import type { CrossJoinResult, ICollection } from "../../../../collection/contracts/_module";
2
5
  export declare class CrossJoinIterable<TInput, TExtended = TInput> implements Iterable<CrossJoinResult<TInput, TExtended>> {
3
6
  private collection;
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type RecordItem } from "../../../../_shared/types";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type Predicate, type ICollection } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type ICollection, type Map } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type ICollection, type Map } from "../../../../collection/contracts/_module";
2
5
  import { type RecordItem } from "../../../../_shared/types";
3
6
  /**
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type Predicate, type ICollection } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type Predicate, type ICollection } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type ICollection, type Map } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  /**
2
5
  * @internal
3
6
  */
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type ICollection } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type ICollection } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type Predicate, type ICollection } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type ICollection } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type ICollection } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  /**
2
5
  * @internal
3
6
  */
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type ICollection } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type Predicate, type ICollection } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type ICollection } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type ICollection } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type Comparator } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type ICollection } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type ICollection } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type Predicate, type ICollection } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type ICollection, type Tap } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type ICollection, type Map } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type Predicate, type ICollection, type Map, type ChangendItem } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type ICollection, type Modifier } from "../../../../collection/contracts/_module";
2
5
  /**
3
6
  * @internal
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module Collection
3
+ */
1
4
  import { type RecordItem } from "../../../../_shared/types";
2
5
  /**
3
6
  * @internal
@@ -2,7 +2,7 @@
2
2
  * @module Collection
3
3
  */
4
4
  import { type Collapse, type Comparator, type Predicate, type ForEach, type ICollection, type Map, type Modifier, type Tap, type Transform, type ChangendItem, type Reduce, type CrossJoinResult } from "../../../collection/contracts/_module";
5
- import { type Lazyable, type EnsureType } from "../../../_shared/types";
5
+ import { type Lazyable } from "../../../_shared/types";
6
6
  import { type RecordItem } from "../../../_shared/types";
7
7
  /**
8
8
  * All methods that return <i>{@link ICollection}</i> are executed lazly which means they will be executed when the <i>IterableCollection</i> is iterated with <i>forEach</i> method or "for of" loop.
@@ -28,16 +28,16 @@ export declare class IterableCollection<TInput> implements ICollection<TInput> {
28
28
  reduce(reduceFn: Reduce<TInput, ICollection<TInput>, TInput>): TInput;
29
29
  reduce(reduceFn: Reduce<TInput, ICollection<TInput>, TInput>, initialValue: TInput): TInput;
30
30
  reduce<TOutput>(reduceFn: Reduce<TInput, ICollection<TInput>, TOutput>, initialValue: TOutput): TOutput;
31
- join(separator?: string): EnsureType<TInput, string>;
31
+ join(separator?: string): Extract<TInput, string>;
32
32
  collapse(): ICollection<Collapse<TInput>>;
33
33
  flatMap<TOutput>(mapFn: Map<TInput, ICollection<TInput>, Iterable<TOutput>>): ICollection<TOutput>;
34
34
  change<TFilterOutput extends TInput, TMapOutput>(predicateFn: Predicate<TInput, ICollection<TInput>, TFilterOutput>, mapFn: Map<TFilterOutput, ICollection<TInput>, TMapOutput>): ICollection<ChangendItem<TInput, TFilterOutput, TMapOutput>>;
35
35
  page(page: number, pageSize: number): ICollection<TInput>;
36
- sum(): EnsureType<TInput, number>;
37
- average(): EnsureType<TInput, number>;
38
- median(): EnsureType<TInput, number>;
39
- min(): EnsureType<TInput, number>;
40
- max(): EnsureType<TInput, number>;
36
+ sum(): Extract<TInput, number>;
37
+ average(): Extract<TInput, number>;
38
+ median(): Extract<TInput, number>;
39
+ min(): Extract<TInput, number>;
40
+ max(): Extract<TInput, number>;
41
41
  percentage(predicateFn: Predicate<TInput, ICollection<TInput>>): number;
42
42
  some<TOutput extends TInput>(predicateFn: Predicate<TInput, ICollection<TInput>, TOutput>): boolean;
43
43
  every<TOutput extends TInput>(predicateFn: Predicate<TInput, ICollection<TInput>, TOutput>): boolean;
@@ -2,7 +2,7 @@
2
2
  * @module Collection
3
3
  */
4
4
  import { type Collapse, type Comparator, type Predicate, type ICollection, type Map, type Modifier, type Tap, type Transform, type ChangendItem, type Reduce, type ForEach, type CrossJoinResult } from "../../../collection/contracts/_module";
5
- import { type EnsureType, type Lazyable } from "../../../_shared/types";
5
+ import { type Lazyable } from "../../../_shared/types";
6
6
  import { type RecordItem } from "../../../_shared/types";
7
7
  /**
8
8
  * All methods in <i>ListCollection</i> are executed eagerly.
@@ -25,16 +25,16 @@ export declare class ListCollection<TInput> implements ICollection<TInput> {
25
25
  reduce(reduceFn: Reduce<TInput, ICollection<TInput>, TInput>): TInput;
26
26
  reduce(reduceFn: Reduce<TInput, ICollection<TInput>, TInput>, initialValue: TInput): TInput;
27
27
  reduce<TOutput>(reduceFn: Reduce<TInput, ICollection<TInput>, TOutput>, initialValue: TOutput): TOutput;
28
- join(separator?: string): EnsureType<TInput, string>;
28
+ join(separator?: string): Extract<TInput, string>;
29
29
  collapse(): ICollection<Collapse<TInput>>;
30
30
  flatMap<TOutput>(mapFn: Map<TInput, ICollection<TInput>, Iterable<TOutput>>): ICollection<TOutput>;
31
31
  change<TFilterOutput extends TInput, TMapOutput>(predicateFn: Predicate<TInput, ICollection<TInput>, TFilterOutput>, mapFn: Map<TFilterOutput, ICollection<TInput>, TMapOutput>): ICollection<ChangendItem<TInput, TFilterOutput, TMapOutput>>;
32
32
  page(page: number, pageSize: number): ICollection<TInput>;
33
- sum(): EnsureType<TInput, number>;
34
- average(): EnsureType<TInput, number>;
35
- median(): EnsureType<TInput, number>;
36
- min(): EnsureType<TInput, number>;
37
- max(): EnsureType<TInput, number>;
33
+ sum(): Extract<TInput, number>;
34
+ average(): Extract<TInput, number>;
35
+ median(): Extract<TInput, number>;
36
+ min(): Extract<TInput, number>;
37
+ max(): Extract<TInput, number>;
38
38
  percentage(predicateFn: Predicate<TInput, ICollection<TInput>>): number;
39
39
  some<TOutput extends TInput>(predicateFn: Predicate<TInput, ICollection<TInput>, TOutput>): boolean;
40
40
  every<TOutput extends TInput>(predicateFn: Predicate<TInput, ICollection<TInput>, TOutput>): boolean;
@@ -0,0 +1,4 @@
1
+ export * from "../../event-bus/contracts/_shared";
2
+ export * from "../../event-bus/contracts/event-bus.contract";
3
+ export * from "../../event-bus/contracts/event-bus-adapter.contract";
4
+ export * from "../../event-bus/contracts/event-bus-manager.contract";
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @module EventBus
3
+ */
4
+ import type { Promisable } from "../../_shared/types";
5
+ export type IBaseEvent = {
6
+ type: string;
7
+ };
8
+ export type Listener<TEvent extends IBaseEvent> = (event: TEvent) => Promisable<void>;
9
+ /**
10
+ * @group Errors
11
+ */
12
+ export declare class EventBusError extends Error {
13
+ constructor(message: string, cause?: unknown);
14
+ }
15
+ /**
16
+ * @group Errors
17
+ */
18
+ export declare class RemoveListenerEventBusError extends Error {
19
+ constructor(message: string, cause?: unknown);
20
+ }
21
+ /**
22
+ * @group Errors
23
+ */
24
+ export declare class AddListenerEventBusError extends Error {
25
+ constructor(message: string, cause?: unknown);
26
+ }
27
+ /**
28
+ * @group Errors
29
+ */
30
+ export declare class DispatchEventBusError extends Error {
31
+ constructor(message: string, cause?: unknown);
32
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @module EventBus
3
+ */
4
+ import type { IBaseEvent, Listener } from "../../event-bus/contracts/_shared";
5
+ /**
6
+ * The <i>IEventBusAdapter</i> contract defines a way for dispatching and listening to events independent of underlying technology.
7
+ * This interface is not meant to be used directly, instead you should use <i>IEventBus</i>
8
+ * @group Contracts
9
+ */
10
+ export type IEventBusAdapter = {
11
+ /**
12
+ * The <i>addListener</i> method is used for adding <i>{@link Listener | listener}</i> for certain <i>event</i>.
13
+ */
14
+ addListener(event: string, listener: Listener<IBaseEvent>): PromiseLike<void>;
15
+ /**
16
+ * The <i>removeListener</i> method is used for removing <i>{@link Listener | listener}</i> for certain <i>event</i>.
17
+ */
18
+ removeListener(event: string, listener: Listener<IBaseEvent>): PromiseLike<void>;
19
+ /**
20
+ * The <i>dispatch</i> method is used for dispatching one or multiple <i>events</i>.
21
+ */
22
+ dispatch(events: IBaseEvent[]): PromiseLike<void>;
23
+ };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @module EventBus
3
+ */
4
+ import type { Validator } from "../../utilities/_module";
5
+ import type { INamespacedEventBus } from "../../event-bus/contracts/event-bus.contract";
6
+ import type { IBaseEvent } from "../../event-bus/contracts/_shared";
7
+ /**
8
+ * @group Contracts
9
+ */
10
+ export type EventBusManagerUseSettings<TType, TAdapters extends string = string> = {
11
+ adapter?: TAdapters;
12
+ validator?: Validator<TType>;
13
+ };
14
+ /**
15
+ * The <i>IEventBusManager</i> contract makes it easy to switch between different <i>{@link IEventBusAdapter | event bus adapters}</i> dynamically.
16
+ * @group Contracts
17
+ */
18
+ export type IEventBusManager<TAdapters extends string = string> = {
19
+ use<TEvents extends IBaseEvent = IBaseEvent>(settings?: EventBusManagerUseSettings<TEvents, TAdapters>): INamespacedEventBus<TEvents>;
20
+ };
@@ -0,0 +1,91 @@
1
+ /**
2
+ * @module EventBus
3
+ */
4
+ import type { OneOrMore } from "../../_shared/types";
5
+ import type { IBaseEvent, Listener } from "../../event-bus/contracts/_shared";
6
+ export type SelectEvent<TEvents extends IBaseEvent, TEventType extends TEvents["type"]> = Extract<TEvents, {
7
+ type: IBaseEvent extends TEvents ? string : TEventType;
8
+ }>;
9
+ export type Unsubscribe = () => PromiseLike<void>;
10
+ /**
11
+ * The <i>IListenable</i> contract defines a way listening to events independent of underlying technology
12
+ * @throws {EventBusError} {@link EventBusError}
13
+ * @throws {AddListenerEventBusError} {@link AddListenerEventBusError}
14
+ * @throws {RemoveListenerEventBusError} {@link RemoveListenerEventBusError}
15
+ * @group Contracts
16
+ */
17
+ export type IListenable<TEvents extends IBaseEvent = IBaseEvent> = {
18
+ /**
19
+ * The <i>addListener</i> method is used for adding <i>{@link Listener | listener}</i> for certain <i>event</i>.
20
+ * A listener can only be added once for a specific event. Adding the same listener multiple times will have no effect and nothing will occur.
21
+ * @throws {EventBusError} {@link EventBusError}
22
+ * @throws {AddListenerEventBusError} {@link AddListenerEventBusError}
23
+ */
24
+ addListener<TEventType extends TEvents["type"]>(event: TEventType, listener: Listener<SelectEvent<TEvents, TEventType>>): PromiseLike<void>;
25
+ /**
26
+ * The <i>addListenerMany</i> method is used for adding multiple <i>{@link Listener | listeners}</i> for certain <i>events</i>.
27
+ * A listener can only be added once for a specific event. Adding the same listener multiple times will have no effect and nothing will occur.
28
+ * @throws {EventBusError} {@link EventBusError}
29
+ * @throws {AddListenerEventBusError} {@link AddListenerEventBusError}
30
+ */
31
+ addListenerMany<TEventType extends TEvents["type"]>(events: TEventType[], listener: Listener<SelectEvent<TEvents, TEventType>>): PromiseLike<void>;
32
+ /**
33
+ * The <i>removeListener</i> method is used for removing <i>{@link Listener | listener}</i> for certain <i>event</i>.
34
+ * Removing unadded listener will have no effect and nothing will occur.
35
+ * @throws {EventBusError} {@link EventBusError}
36
+ * @throws {RemoveListenerEventBusError} {@link RemoveListenerEventBusError}
37
+ */
38
+ removeListener<TEventType extends TEvents["type"]>(event: TEventType, listener: Listener<SelectEvent<TEvents, TEventType>>): PromiseLike<void>;
39
+ /**
40
+ * The <i>removeListener</i> method is used for removing multiple <i>{@link Listener | listeners}</i> for certain <i>event</i>.
41
+ * Removing unadded listener will have no effect and nothing will occur.
42
+ * @throws {EventBusError} {@link EventBusError}
43
+ * @throws {RemoveListenerEventBusError} {@link RemoveListenerEventBusError}
44
+ */
45
+ removeListenerMany<TEventType extends TEvents["type"]>(events: TEventType[], listener: Listener<SelectEvent<TEvents, TEventType>>): PromiseLike<void>;
46
+ /**
47
+ * The <i>subscribe</i> method is used for adding <i>{@link Listener | listener}</i> for certain <i>event</i>.
48
+ * A listener can only be added once for a specific event. Adding the same listener multiple times will have no effect and nothing will occur.
49
+ * @throws {EventBusError} {@link EventBusError}
50
+ * @throws {RemoveListenerEventBusError} {@link RemoveListenerEventBusError}
51
+ */
52
+ subscribe<TEventType extends TEvents["type"]>(event: TEventType, listener: Listener<SelectEvent<TEvents, TEventType>>): PromiseLike<Unsubscribe>;
53
+ subscribeMany<TEventType extends TEvents["type"]>(events: TEventType[], listener: Listener<SelectEvent<TEvents, TEventType>>): PromiseLike<Unsubscribe>;
54
+ };
55
+ /**
56
+ * The <i>IEventBus</i> contract defines a way for dispatching and listening to events independent of underlying technology.
57
+ * It commes with more convient methods compared to <i>IEventBusAdapter</i>.
58
+ * @throws {EventBusError} {@link EventBusError}
59
+ * @throws {DispatchEventBusError} {@link DispatchEventBusError}
60
+ * @throws {AddListenerEventBusError} {@link AddListenerEventBusError}
61
+ * @throws {RemoveListenerEventBusError} {@link RemoveListenerEventBusError}
62
+ * @group Contracts
63
+ */
64
+ export type IEventBus<TEvents extends IBaseEvent = IBaseEvent> = IListenable<TEvents> & {
65
+ /**
66
+ * The <i>dispatch</i> method is used for dispatching one or multiple <i>events</i>.
67
+ * @throws {EventBusError} {@link EventBusError}
68
+ * @throws {DispatchEventBusError} {@link DispatchEventBusError}
69
+ */
70
+ dispatch(events: OneOrMore<TEvents>): PromiseLike<void>;
71
+ };
72
+ /**
73
+ * The <i>INamespacedEventBus</i> contract defines a way for dispatching and listening to events independent of underlying technology.
74
+ * It commes with one extra method which is useful for multitennat applications compared to <i>IEventBus</i>.
75
+ * @throws {EventBusError} {@link EventBusError}
76
+ * @throws {DispatchEventBusError} {@link DispatchEventBusError}
77
+ * @throws {AddListenerEventBusError} {@link AddListenerEventBusError}
78
+ * @throws {RemoveListenerEventBusError} {@link RemoveListenerEventBusError}
79
+ * @group Contracts
80
+ */
81
+ export type INamespacedEventBus<TEvents extends IBaseEvent = IBaseEvent> = IEventBus<TEvents> & {
82
+ /**
83
+ * The <i>withNamespace</i> method returns new instance of <i>{@link IEventBus}</i> where all the events names will be prefixed with a given <i>namespace</i>.
84
+ * This useful for multitennat applications.
85
+ */
86
+ withNamespace(namespace: string): IEventBus<TEvents>;
87
+ /**
88
+ * The <i>getNamespace</i> method return the complete namespace.
89
+ */
90
+ getNamespace(): string;
91
+ };
@@ -0,0 +1,5 @@
1
+ export * from "../../event-bus/implementations/_shared/test-utilities/_module";
2
+ export * from "../../event-bus/implementations/event-bus/_module";
3
+ export * from "../../event-bus/implementations/memory-event-bus-adapter/_module";
4
+ export * from "../../event-bus/implementations/redis-event-bus-adapter/_module";
5
+ export * from "../../event-bus/implementations/no-op-event-bus-adapter/_module";
@@ -0,0 +1 @@
1
+ export * from "../../../../event-bus/implementations/_shared/test-utilities/event-bus-adapter.test-suite";
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @module EventBus
3
+ */
4
+ import { type TestAPI, type SuiteAPI, type ExpectStatic, type beforeEach } from "vitest";
5
+ import type { IEventBusAdapter } from "../../../../event-bus/contracts/_module";
6
+ import { type Promisable } from "../../../../_shared/types";
7
+ /**
8
+ * @group Utilities
9
+ */
10
+ export type EventBusTestSuiteSettings = {
11
+ expect: ExpectStatic;
12
+ test: TestAPI;
13
+ describe: SuiteAPI;
14
+ beforeEach: typeof beforeEach;
15
+ createAdapter: () => Promisable<IEventBusAdapter>;
16
+ };
17
+ /**
18
+ * @group Utilities
19
+ */
20
+ export declare function eventBusTestSuite(settings: EventBusTestSuiteSettings): void;
@@ -0,0 +1,2 @@
1
+ export * from "../../../event-bus/implementations/event-bus/event-bus";
2
+ export * from "../../../event-bus/implementations/event-bus/event-bus-manager";