@volontariapp/domain-ranking 0.0.0-stage → 0.1.0-snap-8a39acc

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 (475) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +37 -2
  3. package/dist/constants/formula.d.ts +68 -0
  4. package/dist/constants/formula.d.ts.map +1 -0
  5. package/dist/constants/formula.js +61 -0
  6. package/dist/constants/formula.js.map +1 -0
  7. package/dist/constants/index.d.ts +2 -0
  8. package/dist/constants/index.d.ts.map +1 -0
  9. package/dist/constants/index.js +2 -0
  10. package/dist/constants/index.js.map +1 -0
  11. package/dist/entities/index.d.ts +11 -0
  12. package/dist/entities/index.d.ts.map +1 -0
  13. package/dist/entities/index.js +11 -0
  14. package/dist/entities/index.js.map +1 -0
  15. package/dist/entities/ranking-event-feedback.entity.d.ts +7 -0
  16. package/dist/entities/ranking-event-feedback.entity.d.ts.map +1 -0
  17. package/dist/entities/ranking-event-feedback.entity.js +7 -0
  18. package/dist/entities/ranking-event-feedback.entity.js.map +1 -0
  19. package/dist/entities/ranking-event-mention.entity.d.ts +7 -0
  20. package/dist/entities/ranking-event-mention.entity.d.ts.map +1 -0
  21. package/dist/entities/ranking-event-mention.entity.js +7 -0
  22. package/dist/entities/ranking-event-mention.entity.js.map +1 -0
  23. package/dist/entities/ranking-event-wish.entity.d.ts +6 -0
  24. package/dist/entities/ranking-event-wish.entity.d.ts.map +1 -0
  25. package/dist/entities/ranking-event-wish.entity.js +6 -0
  26. package/dist/entities/ranking-event-wish.entity.js.map +1 -0
  27. package/dist/entities/ranking-like-log.entity.d.ts +8 -0
  28. package/dist/entities/ranking-like-log.entity.d.ts.map +1 -0
  29. package/dist/entities/ranking-like-log.entity.js +8 -0
  30. package/dist/entities/ranking-like-log.entity.js.map +1 -0
  31. package/dist/entities/ranking-post-score.entity.d.ts +13 -0
  32. package/dist/entities/ranking-post-score.entity.d.ts.map +1 -0
  33. package/dist/entities/ranking-post-score.entity.js +13 -0
  34. package/dist/entities/ranking-post-score.entity.js.map +1 -0
  35. package/dist/entities/ranking-rate-bucket.entity.d.ts +7 -0
  36. package/dist/entities/ranking-rate-bucket.entity.d.ts.map +1 -0
  37. package/dist/entities/ranking-rate-bucket.entity.js +7 -0
  38. package/dist/entities/ranking-rate-bucket.entity.js.map +1 -0
  39. package/dist/entities/ranking-request.entity.d.ts +8 -0
  40. package/dist/entities/ranking-request.entity.d.ts.map +1 -0
  41. package/dist/entities/ranking-request.entity.js +8 -0
  42. package/dist/entities/ranking-request.entity.js.map +1 -0
  43. package/dist/entities/ranking-run.entity.d.ts +17 -0
  44. package/dist/entities/ranking-run.entity.d.ts.map +1 -0
  45. package/dist/entities/ranking-run.entity.js +17 -0
  46. package/dist/entities/ranking-run.entity.js.map +1 -0
  47. package/dist/entities/ranking-score.entity.d.ts +11 -0
  48. package/dist/entities/ranking-score.entity.d.ts.map +1 -0
  49. package/dist/entities/ranking-score.entity.js +11 -0
  50. package/dist/entities/ranking-score.entity.js.map +1 -0
  51. package/dist/entities/ranking-user-location.entity.d.ts +6 -0
  52. package/dist/entities/ranking-user-location.entity.d.ts.map +1 -0
  53. package/dist/entities/ranking-user-location.entity.js +6 -0
  54. package/dist/entities/ranking-user-location.entity.js.map +1 -0
  55. package/dist/enums/index.d.ts +52 -0
  56. package/dist/enums/index.d.ts.map +1 -0
  57. package/dist/enums/index.js +42 -0
  58. package/dist/enums/index.js.map +1 -0
  59. package/dist/exceptions/feedback-batch-too-large.exception.d.ts +5 -0
  60. package/dist/exceptions/feedback-batch-too-large.exception.d.ts.map +1 -0
  61. package/dist/exceptions/feedback-batch-too-large.exception.js +8 -0
  62. package/dist/exceptions/feedback-batch-too-large.exception.js.map +1 -0
  63. package/dist/exceptions/index.d.ts +4 -0
  64. package/dist/exceptions/index.d.ts.map +1 -0
  65. package/dist/exceptions/index.js +4 -0
  66. package/dist/exceptions/index.js.map +1 -0
  67. package/dist/exceptions/invalid-location-cipher.exception.d.ts +5 -0
  68. package/dist/exceptions/invalid-location-cipher.exception.d.ts.map +1 -0
  69. package/dist/exceptions/invalid-location-cipher.exception.js +7 -0
  70. package/dist/exceptions/invalid-location-cipher.exception.js.map +1 -0
  71. package/dist/exceptions/ranking-scorer-unavailable.exception.d.ts +5 -0
  72. package/dist/exceptions/ranking-scorer-unavailable.exception.d.ts.map +1 -0
  73. package/dist/exceptions/ranking-scorer-unavailable.exception.js +7 -0
  74. package/dist/exceptions/ranking-scorer-unavailable.exception.js.map +1 -0
  75. package/dist/helpers/cursor.helpers.d.ts +22 -0
  76. package/dist/helpers/cursor.helpers.d.ts.map +1 -0
  77. package/dist/helpers/cursor.helpers.js +45 -0
  78. package/dist/helpers/cursor.helpers.js.map +1 -0
  79. package/dist/helpers/database-error.helpers.d.ts +3 -0
  80. package/dist/helpers/database-error.helpers.d.ts.map +1 -0
  81. package/dist/helpers/database-error.helpers.js +15 -0
  82. package/dist/helpers/database-error.helpers.js.map +1 -0
  83. package/dist/helpers/geo.helpers.d.ts +9 -0
  84. package/dist/helpers/geo.helpers.d.ts.map +1 -0
  85. package/dist/helpers/geo.helpers.js +29 -0
  86. package/dist/helpers/geo.helpers.js.map +1 -0
  87. package/dist/helpers/index.d.ts +6 -0
  88. package/dist/helpers/index.d.ts.map +1 -0
  89. package/dist/helpers/index.js +6 -0
  90. package/dist/helpers/index.js.map +1 -0
  91. package/dist/helpers/location-cipher.helpers.d.ts +4 -0
  92. package/dist/helpers/location-cipher.helpers.d.ts.map +1 -0
  93. package/dist/helpers/location-cipher.helpers.js +24 -0
  94. package/dist/helpers/location-cipher.helpers.js.map +1 -0
  95. package/dist/helpers/math.helpers.d.ts +5 -0
  96. package/dist/helpers/math.helpers.d.ts.map +1 -0
  97. package/dist/helpers/math.helpers.js +14 -0
  98. package/dist/helpers/math.helpers.js.map +1 -0
  99. package/dist/index.d.ts +11 -0
  100. package/dist/index.d.ts.map +1 -0
  101. package/dist/index.js +13 -0
  102. package/dist/index.js.map +1 -0
  103. package/dist/models/index.d.ts +22 -0
  104. package/dist/models/index.d.ts.map +1 -0
  105. package/dist/models/index.js +34 -0
  106. package/dist/models/index.js.map +1 -0
  107. package/dist/models/mapper.d.ts +2 -0
  108. package/dist/models/mapper.d.ts.map +1 -0
  109. package/dist/models/mapper.js +27 -0
  110. package/dist/models/mapper.js.map +1 -0
  111. package/dist/models/ranking-event-feedback.model.d.ts +7 -0
  112. package/dist/models/ranking-event-feedback.model.d.ts.map +1 -0
  113. package/dist/models/ranking-event-feedback.model.js +39 -0
  114. package/dist/models/ranking-event-feedback.model.js.map +1 -0
  115. package/dist/models/ranking-event-mention.model.d.ts +7 -0
  116. package/dist/models/ranking-event-mention.model.d.ts.map +1 -0
  117. package/dist/models/ranking-event-mention.model.js +38 -0
  118. package/dist/models/ranking-event-mention.model.js.map +1 -0
  119. package/dist/models/ranking-event-wish.model.d.ts +6 -0
  120. package/dist/models/ranking-event-wish.model.d.ts.map +1 -0
  121. package/dist/models/ranking-event-wish.model.js +33 -0
  122. package/dist/models/ranking-event-wish.model.js.map +1 -0
  123. package/dist/models/ranking-like-log.model.d.ts +8 -0
  124. package/dist/models/ranking-like-log.model.d.ts.map +1 -0
  125. package/dist/models/ranking-like-log.model.js +43 -0
  126. package/dist/models/ranking-like-log.model.js.map +1 -0
  127. package/dist/models/ranking-post-score.model.d.ts +13 -0
  128. package/dist/models/ranking-post-score.model.d.ts.map +1 -0
  129. package/dist/models/ranking-post-score.model.js +82 -0
  130. package/dist/models/ranking-post-score.model.js.map +1 -0
  131. package/dist/models/ranking-rate-bucket.model.d.ts +7 -0
  132. package/dist/models/ranking-rate-bucket.model.d.ts.map +1 -0
  133. package/dist/models/ranking-rate-bucket.model.js +38 -0
  134. package/dist/models/ranking-rate-bucket.model.js.map +1 -0
  135. package/dist/models/ranking-request.model.d.ts +8 -0
  136. package/dist/models/ranking-request.model.d.ts.map +1 -0
  137. package/dist/models/ranking-request.model.js +42 -0
  138. package/dist/models/ranking-request.model.js.map +1 -0
  139. package/dist/models/ranking-run.model.d.ts +17 -0
  140. package/dist/models/ranking-run.model.d.ts.map +1 -0
  141. package/dist/models/ranking-run.model.js +88 -0
  142. package/dist/models/ranking-run.model.js.map +1 -0
  143. package/dist/models/ranking-score.model.d.ts +11 -0
  144. package/dist/models/ranking-score.model.d.ts.map +1 -0
  145. package/dist/models/ranking-score.model.js +72 -0
  146. package/dist/models/ranking-score.model.js.map +1 -0
  147. package/dist/models/ranking-user-location.model.d.ts +6 -0
  148. package/dist/models/ranking-user-location.model.d.ts.map +1 -0
  149. package/dist/models/ranking-user-location.model.js +32 -0
  150. package/dist/models/ranking-user-location.model.js.map +1 -0
  151. package/dist/models/transformers.d.ts +3 -0
  152. package/dist/models/transformers.d.ts.map +1 -0
  153. package/dist/models/transformers.js +5 -0
  154. package/dist/models/transformers.js.map +1 -0
  155. package/dist/policies/diversity.policy.d.ts +4 -0
  156. package/dist/policies/diversity.policy.d.ts.map +1 -0
  157. package/dist/policies/diversity.policy.js +15 -0
  158. package/dist/policies/diversity.policy.js.map +1 -0
  159. package/dist/policies/event-score.policy.d.ts +30 -0
  160. package/dist/policies/event-score.policy.d.ts.map +1 -0
  161. package/dist/policies/event-score.policy.js +36 -0
  162. package/dist/policies/event-score.policy.js.map +1 -0
  163. package/dist/policies/final-score.policy.d.ts +19 -0
  164. package/dist/policies/final-score.policy.d.ts.map +1 -0
  165. package/dist/policies/final-score.policy.js +16 -0
  166. package/dist/policies/final-score.policy.js.map +1 -0
  167. package/dist/policies/index.d.ts +8 -0
  168. package/dist/policies/index.d.ts.map +1 -0
  169. package/dist/policies/index.js +8 -0
  170. package/dist/policies/index.js.map +1 -0
  171. package/dist/policies/pass-penalty.policy.d.ts +14 -0
  172. package/dist/policies/pass-penalty.policy.d.ts.map +1 -0
  173. package/dist/policies/pass-penalty.policy.js +26 -0
  174. package/dist/policies/pass-penalty.policy.js.map +1 -0
  175. package/dist/policies/popularity.policy.d.ts +12 -0
  176. package/dist/policies/popularity.policy.d.ts.map +1 -0
  177. package/dist/policies/popularity.policy.js +10 -0
  178. package/dist/policies/popularity.policy.js.map +1 -0
  179. package/dist/policies/post-score.policy.d.ts +27 -0
  180. package/dist/policies/post-score.policy.d.ts.map +1 -0
  181. package/dist/policies/post-score.policy.js +34 -0
  182. package/dist/policies/post-score.policy.js.map +1 -0
  183. package/dist/policies/reasons.policy.d.ts +12 -0
  184. package/dist/policies/reasons.policy.d.ts.map +1 -0
  185. package/dist/policies/reasons.policy.js +68 -0
  186. package/dist/policies/reasons.policy.js.map +1 -0
  187. package/dist/ports/index.d.ts +3 -0
  188. package/dist/ports/index.d.ts.map +1 -0
  189. package/dist/ports/index.js +3 -0
  190. package/dist/ports/index.js.map +1 -0
  191. package/dist/ports/noop-ranking-scorer.d.ts +5 -0
  192. package/dist/ports/noop-ranking-scorer.d.ts.map +1 -0
  193. package/dist/ports/noop-ranking-scorer.js +6 -0
  194. package/dist/ports/noop-ranking-scorer.js.map +1 -0
  195. package/dist/ports/ranking-scorer.port.d.ts +17 -0
  196. package/dist/ports/ranking-scorer.port.d.ts.map +1 -0
  197. package/dist/ports/ranking-scorer.port.js +2 -0
  198. package/dist/ports/ranking-scorer.port.js.map +1 -0
  199. package/dist/repositories/index.d.ts +14 -0
  200. package/dist/repositories/index.d.ts.map +1 -0
  201. package/dist/repositories/index.js +14 -0
  202. package/dist/repositories/index.js.map +1 -0
  203. package/dist/repositories/interfaces/index.d.ts +11 -0
  204. package/dist/repositories/interfaces/index.d.ts.map +1 -0
  205. package/dist/repositories/interfaces/index.js +11 -0
  206. package/dist/repositories/interfaces/index.js.map +1 -0
  207. package/dist/repositories/interfaces/purgeable.repository.d.ts +6 -0
  208. package/dist/repositories/interfaces/purgeable.repository.d.ts.map +1 -0
  209. package/dist/repositories/interfaces/purgeable.repository.js +2 -0
  210. package/dist/repositories/interfaces/purgeable.repository.js.map +1 -0
  211. package/dist/repositories/interfaces/ranked-list.repository.d.ts +37 -0
  212. package/dist/repositories/interfaces/ranked-list.repository.d.ts.map +1 -0
  213. package/dist/repositories/interfaces/ranked-list.repository.js +2 -0
  214. package/dist/repositories/interfaces/ranked-list.repository.js.map +1 -0
  215. package/dist/repositories/interfaces/ranking-like-log.repository.d.ts +33 -0
  216. package/dist/repositories/interfaces/ranking-like-log.repository.d.ts.map +1 -0
  217. package/dist/repositories/interfaces/ranking-like-log.repository.js +2 -0
  218. package/dist/repositories/interfaces/ranking-like-log.repository.js.map +1 -0
  219. package/dist/repositories/interfaces/ranking-location.repository.d.ts +12 -0
  220. package/dist/repositories/interfaces/ranking-location.repository.d.ts.map +1 -0
  221. package/dist/repositories/interfaces/ranking-location.repository.js +2 -0
  222. package/dist/repositories/interfaces/ranking-location.repository.js.map +1 -0
  223. package/dist/repositories/interfaces/ranking-post-score.repository.d.ts +13 -0
  224. package/dist/repositories/interfaces/ranking-post-score.repository.d.ts.map +1 -0
  225. package/dist/repositories/interfaces/ranking-post-score.repository.js +2 -0
  226. package/dist/repositories/interfaces/ranking-post-score.repository.js.map +1 -0
  227. package/dist/repositories/interfaces/ranking-rate-bucket.repository.d.ts +15 -0
  228. package/dist/repositories/interfaces/ranking-rate-bucket.repository.d.ts.map +1 -0
  229. package/dist/repositories/interfaces/ranking-rate-bucket.repository.js +2 -0
  230. package/dist/repositories/interfaces/ranking-rate-bucket.repository.js.map +1 -0
  231. package/dist/repositories/interfaces/ranking-request.repository.d.ts +29 -0
  232. package/dist/repositories/interfaces/ranking-request.repository.d.ts.map +1 -0
  233. package/dist/repositories/interfaces/ranking-request.repository.js +2 -0
  234. package/dist/repositories/interfaces/ranking-request.repository.js.map +1 -0
  235. package/dist/repositories/interfaces/ranking-run.repository.d.ts +35 -0
  236. package/dist/repositories/interfaces/ranking-run.repository.d.ts.map +1 -0
  237. package/dist/repositories/interfaces/ranking-run.repository.js +2 -0
  238. package/dist/repositories/interfaces/ranking-run.repository.js.map +1 -0
  239. package/dist/repositories/interfaces/ranking-score.repository.d.ts +14 -0
  240. package/dist/repositories/interfaces/ranking-score.repository.d.ts.map +1 -0
  241. package/dist/repositories/interfaces/ranking-score.repository.js +2 -0
  242. package/dist/repositories/interfaces/ranking-score.repository.js.map +1 -0
  243. package/dist/repositories/interfaces/ranking-signals.repository.d.ts +25 -0
  244. package/dist/repositories/interfaces/ranking-signals.repository.d.ts.map +1 -0
  245. package/dist/repositories/interfaces/ranking-signals.repository.js +2 -0
  246. package/dist/repositories/interfaces/ranking-signals.repository.js.map +1 -0
  247. package/dist/repositories/postgres-ranked-list.repository.d.ts +14 -0
  248. package/dist/repositories/postgres-ranked-list.repository.d.ts.map +1 -0
  249. package/dist/repositories/postgres-ranked-list.repository.js +88 -0
  250. package/dist/repositories/postgres-ranked-list.repository.js.map +1 -0
  251. package/dist/repositories/postgres-ranking-event-feedback.repository.d.ts +15 -0
  252. package/dist/repositories/postgres-ranking-event-feedback.repository.d.ts.map +1 -0
  253. package/dist/repositories/postgres-ranking-event-feedback.repository.js +63 -0
  254. package/dist/repositories/postgres-ranking-event-feedback.repository.js.map +1 -0
  255. package/dist/repositories/postgres-ranking-event-mention.repository.d.ts +19 -0
  256. package/dist/repositories/postgres-ranking-event-mention.repository.d.ts.map +1 -0
  257. package/dist/repositories/postgres-ranking-event-mention.repository.js +49 -0
  258. package/dist/repositories/postgres-ranking-event-mention.repository.js.map +1 -0
  259. package/dist/repositories/postgres-ranking-event-wish.repository.d.ts +15 -0
  260. package/dist/repositories/postgres-ranking-event-wish.repository.d.ts.map +1 -0
  261. package/dist/repositories/postgres-ranking-event-wish.repository.js +48 -0
  262. package/dist/repositories/postgres-ranking-event-wish.repository.js.map +1 -0
  263. package/dist/repositories/postgres-ranking-like-log.repository.d.ts +31 -0
  264. package/dist/repositories/postgres-ranking-like-log.repository.d.ts.map +1 -0
  265. package/dist/repositories/postgres-ranking-like-log.repository.js +73 -0
  266. package/dist/repositories/postgres-ranking-like-log.repository.js.map +1 -0
  267. package/dist/repositories/postgres-ranking-location.repository.d.ts +14 -0
  268. package/dist/repositories/postgres-ranking-location.repository.d.ts.map +1 -0
  269. package/dist/repositories/postgres-ranking-location.repository.js +44 -0
  270. package/dist/repositories/postgres-ranking-location.repository.js.map +1 -0
  271. package/dist/repositories/postgres-ranking-post-score.repository.d.ts +16 -0
  272. package/dist/repositories/postgres-ranking-post-score.repository.d.ts.map +1 -0
  273. package/dist/repositories/postgres-ranking-post-score.repository.js +69 -0
  274. package/dist/repositories/postgres-ranking-post-score.repository.js.map +1 -0
  275. package/dist/repositories/postgres-ranking-rate-bucket.repository.d.ts +21 -0
  276. package/dist/repositories/postgres-ranking-rate-bucket.repository.d.ts.map +1 -0
  277. package/dist/repositories/postgres-ranking-rate-bucket.repository.js +62 -0
  278. package/dist/repositories/postgres-ranking-rate-bucket.repository.js.map +1 -0
  279. package/dist/repositories/postgres-ranking-request.repository.d.ts +24 -0
  280. package/dist/repositories/postgres-ranking-request.repository.d.ts.map +1 -0
  281. package/dist/repositories/postgres-ranking-request.repository.js +67 -0
  282. package/dist/repositories/postgres-ranking-request.repository.js.map +1 -0
  283. package/dist/repositories/postgres-ranking-run.repository.d.ts +31 -0
  284. package/dist/repositories/postgres-ranking-run.repository.d.ts.map +1 -0
  285. package/dist/repositories/postgres-ranking-run.repository.js +67 -0
  286. package/dist/repositories/postgres-ranking-run.repository.js.map +1 -0
  287. package/dist/repositories/postgres-ranking-score.repository.d.ts +20 -0
  288. package/dist/repositories/postgres-ranking-score.repository.d.ts.map +1 -0
  289. package/dist/repositories/postgres-ranking-score.repository.js +74 -0
  290. package/dist/repositories/postgres-ranking-score.repository.js.map +1 -0
  291. package/dist/repositories/request-sql.d.ts +12 -0
  292. package/dist/repositories/request-sql.d.ts.map +1 -0
  293. package/dist/repositories/request-sql.js +15 -0
  294. package/dist/repositories/request-sql.js.map +1 -0
  295. package/dist/repositories/sql.d.ts +11 -0
  296. package/dist/repositories/sql.d.ts.map +1 -0
  297. package/dist/repositories/sql.js +12 -0
  298. package/dist/repositories/sql.js.map +1 -0
  299. package/dist/services/index.d.ts +12 -0
  300. package/dist/services/index.d.ts.map +1 -0
  301. package/dist/services/index.js +12 -0
  302. package/dist/services/index.js.map +1 -0
  303. package/dist/services/ranking-feedback.service.d.ts +10 -0
  304. package/dist/services/ranking-feedback.service.d.ts.map +1 -0
  305. package/dist/services/ranking-feedback.service.js +40 -0
  306. package/dist/services/ranking-feedback.service.js.map +1 -0
  307. package/dist/services/ranking-like-log.service.d.ts +26 -0
  308. package/dist/services/ranking-like-log.service.d.ts.map +1 -0
  309. package/dist/services/ranking-like-log.service.js +43 -0
  310. package/dist/services/ranking-like-log.service.js.map +1 -0
  311. package/dist/services/ranking-location.service.d.ts +10 -0
  312. package/dist/services/ranking-location.service.d.ts.map +1 -0
  313. package/dist/services/ranking-location.service.js +40 -0
  314. package/dist/services/ranking-location.service.js.map +1 -0
  315. package/dist/services/ranking-mention.service.d.ts +14 -0
  316. package/dist/services/ranking-mention.service.d.ts.map +1 -0
  317. package/dist/services/ranking-mention.service.js +40 -0
  318. package/dist/services/ranking-mention.service.js.map +1 -0
  319. package/dist/services/ranking-post-score.service.d.ts +10 -0
  320. package/dist/services/ranking-post-score.service.d.ts.map +1 -0
  321. package/dist/services/ranking-post-score.service.js +37 -0
  322. package/dist/services/ranking-post-score.service.js.map +1 -0
  323. package/dist/services/ranking-purge.service.d.ts +10 -0
  324. package/dist/services/ranking-purge.service.d.ts.map +1 -0
  325. package/dist/services/ranking-purge.service.js +62 -0
  326. package/dist/services/ranking-purge.service.js.map +1 -0
  327. package/dist/services/ranking-rate-limit.service.d.ts +9 -0
  328. package/dist/services/ranking-rate-limit.service.d.ts.map +1 -0
  329. package/dist/services/ranking-rate-limit.service.js +37 -0
  330. package/dist/services/ranking-rate-limit.service.js.map +1 -0
  331. package/dist/services/ranking-request.service.d.ts +19 -0
  332. package/dist/services/ranking-request.service.d.ts.map +1 -0
  333. package/dist/services/ranking-request.service.js +43 -0
  334. package/dist/services/ranking-request.service.js.map +1 -0
  335. package/dist/services/ranking-run.service.d.ts +28 -0
  336. package/dist/services/ranking-run.service.d.ts.map +1 -0
  337. package/dist/services/ranking-run.service.js +43 -0
  338. package/dist/services/ranking-run.service.js.map +1 -0
  339. package/dist/services/ranking-score.service.d.ts +14 -0
  340. package/dist/services/ranking-score.service.d.ts.map +1 -0
  341. package/dist/services/ranking-score.service.js +40 -0
  342. package/dist/services/ranking-score.service.js.map +1 -0
  343. package/dist/services/ranking-wish.service.d.ts +10 -0
  344. package/dist/services/ranking-wish.service.d.ts.map +1 -0
  345. package/dist/services/ranking-wish.service.js +40 -0
  346. package/dist/services/ranking-wish.service.js.map +1 -0
  347. package/dist/test/__test-utils__/factories/ranking.factory.d.ts +6 -0
  348. package/dist/test/__test-utils__/factories/ranking.factory.d.ts.map +1 -0
  349. package/dist/test/__test-utils__/factories/ranking.factory.js +35 -0
  350. package/dist/test/__test-utils__/factories/ranking.factory.js.map +1 -0
  351. package/dist/test/__test-utils__/mocks/ranking-repositories.mock.d.ts +13 -0
  352. package/dist/test/__test-utils__/mocks/ranking-repositories.mock.d.ts.map +1 -0
  353. package/dist/test/__test-utils__/mocks/ranking-repositories.mock.js +12 -0
  354. package/dist/test/__test-utils__/mocks/ranking-repositories.mock.js.map +1 -0
  355. package/dist/test/data-source.d.ts +24 -0
  356. package/dist/test/data-source.d.ts.map +1 -0
  357. package/dist/test/data-source.js +76 -0
  358. package/dist/test/data-source.js.map +1 -0
  359. package/dist/test/integration/ranking-list.int.spec.d.ts +2 -0
  360. package/dist/test/integration/ranking-list.int.spec.d.ts.map +1 -0
  361. package/dist/test/integration/ranking-list.int.spec.js +247 -0
  362. package/dist/test/integration/ranking-list.int.spec.js.map +1 -0
  363. package/dist/test/integration/ranking-request.int.spec.d.ts +2 -0
  364. package/dist/test/integration/ranking-request.int.spec.d.ts.map +1 -0
  365. package/dist/test/integration/ranking-request.int.spec.js +98 -0
  366. package/dist/test/integration/ranking-request.int.spec.js.map +1 -0
  367. package/dist/test/integration/ranking-signals.int.spec.d.ts +2 -0
  368. package/dist/test/integration/ranking-signals.int.spec.d.ts.map +1 -0
  369. package/dist/test/integration/ranking-signals.int.spec.js +313 -0
  370. package/dist/test/integration/ranking-signals.int.spec.js.map +1 -0
  371. package/dist/test/integration/rate-bucket.int.spec.d.ts +2 -0
  372. package/dist/test/integration/rate-bucket.int.spec.d.ts.map +1 -0
  373. package/dist/test/integration/rate-bucket.int.spec.js +74 -0
  374. package/dist/test/integration/rate-bucket.int.spec.js.map +1 -0
  375. package/dist/test/migrations/common/1776786226145-JobsOutboxAndEventQueue.d.ts +7 -0
  376. package/dist/test/migrations/common/1776786226145-JobsOutboxAndEventQueue.d.ts.map +1 -0
  377. package/dist/test/migrations/common/1776786226145-JobsOutboxAndEventQueue.js +12 -0
  378. package/dist/test/migrations/common/1776786226145-JobsOutboxAndEventQueue.js.map +1 -0
  379. package/dist/test/migrations/common/1776974876099-JobsOutboxAndEventQueueWithTraceId.d.ts +7 -0
  380. package/dist/test/migrations/common/1776974876099-JobsOutboxAndEventQueueWithTraceId.d.ts.map +1 -0
  381. package/dist/test/migrations/common/1776974876099-JobsOutboxAndEventQueueWithTraceId.js +12 -0
  382. package/dist/test/migrations/common/1776974876099-JobsOutboxAndEventQueueWithTraceId.js.map +1 -0
  383. package/dist/test/migrations/common/1777630647718-UpdateOutboxModels.d.ts +7 -0
  384. package/dist/test/migrations/common/1777630647718-UpdateOutboxModels.d.ts.map +1 -0
  385. package/dist/test/migrations/common/1777630647718-UpdateOutboxModels.js +12 -0
  386. package/dist/test/migrations/common/1777630647718-UpdateOutboxModels.js.map +1 -0
  387. package/dist/test/migrations/common/1777985367963-AddTargetServicesToEventQueue.d.ts +6 -0
  388. package/dist/test/migrations/common/1777985367963-AddTargetServicesToEventQueue.d.ts.map +1 -0
  389. package/dist/test/migrations/common/1777985367963-AddTargetServicesToEventQueue.js +76 -0
  390. package/dist/test/migrations/common/1777985367963-AddTargetServicesToEventQueue.js.map +1 -0
  391. package/dist/test/migrations/common/1779114963391-AddJobAudit.d.ts +7 -0
  392. package/dist/test/migrations/common/1779114963391-AddJobAudit.d.ts.map +1 -0
  393. package/dist/test/migrations/common/1779114963391-AddJobAudit.js +18 -0
  394. package/dist/test/migrations/common/1779114963391-AddJobAudit.js.map +1 -0
  395. package/dist/test/migrations/common/1779115100001-AddJobAuditStatusTrigger.d.ts +7 -0
  396. package/dist/test/migrations/common/1779115100001-AddJobAuditStatusTrigger.d.ts.map +1 -0
  397. package/dist/test/migrations/common/1779115100001-AddJobAuditStatusTrigger.js +45 -0
  398. package/dist/test/migrations/common/1779115100001-AddJobAuditStatusTrigger.js.map +1 -0
  399. package/dist/test/migrations/common/1779353596425-AddEmitterToJobAudit.d.ts +7 -0
  400. package/dist/test/migrations/common/1779353596425-AddEmitterToJobAudit.d.ts.map +1 -0
  401. package/dist/test/migrations/common/1779353596425-AddEmitterToJobAudit.js +18 -0
  402. package/dist/test/migrations/common/1779353596425-AddEmitterToJobAudit.js.map +1 -0
  403. package/dist/test/migrations/common/1779360000000-FixEventQueueStatusDefault.d.ts +7 -0
  404. package/dist/test/migrations/common/1779360000000-FixEventQueueStatusDefault.d.ts.map +1 -0
  405. package/dist/test/migrations/common/1779360000000-FixEventQueueStatusDefault.js +12 -0
  406. package/dist/test/migrations/common/1779360000000-FixEventQueueStatusDefault.js.map +1 -0
  407. package/dist/test/migrations/common/1779542033290-AddEmitterIdToOutbox.d.ts +6 -0
  408. package/dist/test/migrations/common/1779542033290-AddEmitterIdToOutbox.d.ts.map +1 -0
  409. package/dist/test/migrations/common/1779542033290-AddEmitterIdToOutbox.js +13 -0
  410. package/dist/test/migrations/common/1779542033290-AddEmitterIdToOutbox.js.map +1 -0
  411. package/dist/test/migrations/common/1779700000000-UpdateEventQueueTriggerTargetService.d.ts +6 -0
  412. package/dist/test/migrations/common/1779700000000-UpdateEventQueueTriggerTargetService.d.ts.map +1 -0
  413. package/dist/test/migrations/common/1779700000000-UpdateEventQueueTriggerTargetService.js +151 -0
  414. package/dist/test/migrations/common/1779700000000-UpdateEventQueueTriggerTargetService.js.map +1 -0
  415. package/dist/test/migrations/common/1779800000000-UpdateJobAuditStatusTrigger.d.ts +7 -0
  416. package/dist/test/migrations/common/1779800000000-UpdateJobAuditStatusTrigger.d.ts.map +1 -0
  417. package/dist/test/migrations/common/1779800000000-UpdateJobAuditStatusTrigger.js +72 -0
  418. package/dist/test/migrations/common/1779800000000-UpdateJobAuditStatusTrigger.js.map +1 -0
  419. package/dist/test/migrations/common/1781000000000-AddCorrelationIdToEventQueue.d.ts +7 -0
  420. package/dist/test/migrations/common/1781000000000-AddCorrelationIdToEventQueue.d.ts.map +1 -0
  421. package/dist/test/migrations/common/1781000000000-AddCorrelationIdToEventQueue.js +12 -0
  422. package/dist/test/migrations/common/1781000000000-AddCorrelationIdToEventQueue.js.map +1 -0
  423. package/dist/test/migrations/common/1791900000000-AddTraceparentToJobsOutboxAndEventQueue.d.ts +7 -0
  424. package/dist/test/migrations/common/1791900000000-AddTraceparentToJobsOutboxAndEventQueue.d.ts.map +1 -0
  425. package/dist/test/migrations/common/1791900000000-AddTraceparentToJobsOutboxAndEventQueue.js +12 -0
  426. package/dist/test/migrations/common/1791900000000-AddTraceparentToJobsOutboxAndEventQueue.js.map +1 -0
  427. package/dist/test/migrations/common/1792000000000-FixJobAuditStatusTriggerEmitterIdSafe.d.ts +7 -0
  428. package/dist/test/migrations/common/1792000000000-FixJobAuditStatusTriggerEmitterIdSafe.d.ts.map +1 -0
  429. package/dist/test/migrations/common/1792000000000-FixJobAuditStatusTriggerEmitterIdSafe.js +91 -0
  430. package/dist/test/migrations/common/1792000000000-FixJobAuditStatusTriggerEmitterIdSafe.js.map +1 -0
  431. package/dist/test/migrations/domain/1792200000000-CreateRankingTables.d.ts +7 -0
  432. package/dist/test/migrations/domain/1792200000000-CreateRankingTables.d.ts.map +1 -0
  433. package/dist/test/migrations/domain/1792200000000-CreateRankingTables.js +148 -0
  434. package/dist/test/migrations/domain/1792200000000-CreateRankingTables.js.map +1 -0
  435. package/dist/test/setup.d.ts +2 -0
  436. package/dist/test/setup.d.ts.map +1 -0
  437. package/dist/test/setup.js +2 -0
  438. package/dist/test/setup.js.map +1 -0
  439. package/dist/test/unit/cursor.unit.spec.d.ts +2 -0
  440. package/dist/test/unit/cursor.unit.spec.d.ts.map +1 -0
  441. package/dist/test/unit/cursor.unit.spec.js +67 -0
  442. package/dist/test/unit/cursor.unit.spec.js.map +1 -0
  443. package/dist/test/unit/event-score.unit.spec.d.ts +2 -0
  444. package/dist/test/unit/event-score.unit.spec.d.ts.map +1 -0
  445. package/dist/test/unit/event-score.unit.spec.js +150 -0
  446. package/dist/test/unit/event-score.unit.spec.js.map +1 -0
  447. package/dist/test/unit/final-score.unit.spec.d.ts +2 -0
  448. package/dist/test/unit/final-score.unit.spec.d.ts.map +1 -0
  449. package/dist/test/unit/final-score.unit.spec.js +81 -0
  450. package/dist/test/unit/final-score.unit.spec.js.map +1 -0
  451. package/dist/test/unit/location.unit.spec.d.ts +2 -0
  452. package/dist/test/unit/location.unit.spec.d.ts.map +1 -0
  453. package/dist/test/unit/location.unit.spec.js +64 -0
  454. package/dist/test/unit/location.unit.spec.js.map +1 -0
  455. package/dist/test/unit/pass-penalty.unit.spec.d.ts +2 -0
  456. package/dist/test/unit/pass-penalty.unit.spec.d.ts.map +1 -0
  457. package/dist/test/unit/pass-penalty.unit.spec.js +69 -0
  458. package/dist/test/unit/pass-penalty.unit.spec.js.map +1 -0
  459. package/dist/test/unit/post-score.unit.spec.d.ts +2 -0
  460. package/dist/test/unit/post-score.unit.spec.d.ts.map +1 -0
  461. package/dist/test/unit/post-score.unit.spec.js +86 -0
  462. package/dist/test/unit/post-score.unit.spec.js.map +1 -0
  463. package/dist/test/unit/ranking-scorer.unit.spec.d.ts +2 -0
  464. package/dist/test/unit/ranking-scorer.unit.spec.d.ts.map +1 -0
  465. package/dist/test/unit/ranking-scorer.unit.spec.js +15 -0
  466. package/dist/test/unit/ranking-scorer.unit.spec.js.map +1 -0
  467. package/dist/test/unit/ranking-services.unit.spec.d.ts +2 -0
  468. package/dist/test/unit/ranking-services.unit.spec.d.ts.map +1 -0
  469. package/dist/test/unit/ranking-services.unit.spec.js +180 -0
  470. package/dist/test/unit/ranking-services.unit.spec.js.map +1 -0
  471. package/dist/test/unit/reasons.unit.spec.d.ts +2 -0
  472. package/dist/test/unit/reasons.unit.spec.d.ts.map +1 -0
  473. package/dist/test/unit/reasons.unit.spec.js +79 -0
  474. package/dist/test/unit/reasons.unit.spec.js.map +1 -0
  475. package/package.json +72 -3
package/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Add the domain-ranking package: pure scoring services (events, posts, popularity, explanation codes, opaque cursor, PASS penalties, encrypted position), the RankingScorer port, the TypeORM models of the ranking tables and the repositories (computation requests, atomic list replacement, rate buckets, signals, like journal, account purge).
package/README.md CHANGED
@@ -1,3 +1,38 @@
1
- # Temporary Holding Version
1
+ # @volontariapp/domain-ranking
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Domaine du classement personnalisé des événements et des posts (`ms-ranking`). Il est partagé par
4
+ `ms-ranking`, `worker-ranking` et `post-processor-ranking`. Conception : `docs/matching/` du dépôt `docs`.
5
+
6
+ ## Contenu
7
+
8
+ | Dossier | Rôle |
9
+ | :--- | :--- |
10
+ | `constants/` | Poids, seuils et versions de formule (`FORMULA_VERSION`, `FEED_FORMULA_VERSION`). Toute modification d'un poids incrémente la version. |
11
+ | `enums/` | Types de liste, sources, codes d'explication, seaux, origines. |
12
+ | `entities/` | Entités du domaine (une par table), sans dépendance à TypeORM. |
13
+ | `models/` | Modèles TypeORM des tables `ranking_*` et `registerRankingMappings()` (appelé à l'import du paquet, comme `domain-post`). |
14
+ | `repositories/` | Un `Postgres...Repository` par table, qui étend `BaseRepository` de `@volontariapp/database` (`@Injectable`, `@InjectRepository`), et leurs interfaces dans `repositories/interfaces/`. Le SQL spécifique y vit. |
15
+ | `services/` | Uniquement des classes de service `@Injectable`, une par fichier, au-dessus des interfaces de repository (journalisation et erreurs `DATABASE_ERROR` comme dans les autres domaines) : demandes de calcul, runs, listes, limites de débit, passes, souhaits, mentions, journal de likes, position chiffrée, purge de compte. |
16
+ | `policies/` | Règles de score **pures**, testables sans infrastructure : événements, popularité, posts, codes d'explication, score final, diversité, pénalités `PASS`. |
17
+ | `helpers/` | Fonctions utilitaires : maths, géographie, curseur opaque, chiffrement de la position, conversion des erreurs de base. |
18
+ | `exceptions/` | Exceptions du domaine (`BadRequestError`, `InternalServerError`). |
19
+ | `ports/` | Port `RankingScorer` (scoreur sémantique, Jev) et `NoopRankingScorer`. |
20
+
21
+ ## Points à connaître
22
+
23
+ - Les dates de demande et de début de calcul viennent de l'horloge de la base (`clock_timestamp()`) et
24
+ circulent en **texte** (microsecondes conservées) : les comparer en SQL, jamais en JavaScript.
25
+ - Le remplacement d'une liste est une transaction courte avec verrou consultatif et anti-écrasement ;
26
+ son rappel `afterWrite` s'exécute dans la même transaction (job de suite).
27
+ - Les seaux à jetons exigent les conversions `::numeric`.
28
+ - Le journal de likes n'est **pas** chiffré (exception documentée, décision 30).
29
+ - La position est arrondie à 1 km puis chiffrée (`v1|userId|lat|lng`) avec une clé de 32 octets aléatoires.
30
+ - Les pénalités `PASS` renumérotent les éléments non servis : l'appelant persiste les nouveaux rangs
31
+ (`updateEventRanks`) pour que le curseur `(listVersion, lastRank)` reste exact.
32
+
33
+ ## Tests
34
+
35
+ - `yarn test` : tests unitaires des services purs.
36
+ - `yarn test:integration` : PostgreSQL réel (`postgres-ranking` de `ci-tools/docker-compose.yml`, port 5438).
37
+ Les migrations de test sont dans `src/test/migrations/` ; la migration de domaine est la copie de
38
+ `ms-ranking/src/migrations/domain/`.
@@ -0,0 +1,68 @@
1
+ export declare const FORMULA_VERSION = 1;
2
+ export declare const FEED_FORMULA_VERSION = 1;
3
+ export declare const EVENT_WEIGHTS: {
4
+ readonly proximity: 0.27;
5
+ readonly friends: 0.23;
6
+ readonly typeAffinity: 0.22;
7
+ readonly imminence: 0.18;
8
+ readonly popularity: 0.1;
9
+ };
10
+ export declare const POST_WEIGHTS: {
11
+ readonly eventTie: 0.35;
12
+ readonly authorAffinity: 0.3;
13
+ readonly recency: 0.35;
14
+ };
15
+ export declare const PROXIMITY_DECAY_KM = 15;
16
+ export declare const MAX_DISTANCE_KM = 100;
17
+ export declare const IMMINENCE_HORIZON_DAYS = 60;
18
+ export declare const NEUTRAL_TYPE_AFFINITY = 0.5;
19
+ export declare const NEUTRAL_PROXIMITY = 0.5;
20
+ export declare const POPULARITY_PRIOR_WISHES = 2;
21
+ export declare const POPULARITY_PRIOR_PASSES = 2;
22
+ export declare const POPULARITY_MENTION_SATURATION = 10;
23
+ export declare const POPULARITY_WEIGHTS: {
24
+ readonly interest: 0.4;
25
+ readonly fill: 0.3;
26
+ readonly mentions: 0.3;
27
+ };
28
+ export declare const POPULARITY_BUZZ_WINDOW_DAYS = 14;
29
+ export declare const AUTHOR_SIGNAL_WEIGHTS: {
30
+ readonly LIKE: 1;
31
+ readonly COMMENT: 2;
32
+ };
33
+ export declare const AUTHOR_SIGNAL_HALF_LIFE_DAYS = 14;
34
+ export declare const AUTHOR_SIGNAL_SATURATION = 6;
35
+ export declare const AUTHOR_FOLLOW_BONUS = 0.25;
36
+ export declare const AUTHOR_FRIEND_BONUS = 0.15;
37
+ export declare const POST_RECENCY_SCALE_HOURS = 48;
38
+ export declare const EVENT_TIE_PAST_JOINED = 0.5;
39
+ export declare const ENGAGED_POST_DEMOTION = 0.6;
40
+ export declare const DIVERSITY_WINDOW = 3;
41
+ export declare const EVENT_SEMANTIC_WEIGHT = 0.5;
42
+ export declare const POST_SEMANTIC_WEIGHT = 0.15;
43
+ export declare const MAX_REASONS = 2;
44
+ export declare const REASON_THRESHOLDS: {
45
+ readonly nearYou: 0.5;
46
+ readonly matchesInterests: 0.6;
47
+ readonly startingSoon: 0.8;
48
+ readonly trending: 0.65;
49
+ readonly engagedAuthor: 0.1;
50
+ readonly recent: 0.6;
51
+ };
52
+ export declare const DEFAULT_LIST_SIZE = 100;
53
+ export declare const DEFAULT_PASS_COOLDOWN_DAYS = 30;
54
+ export declare const DEFAULT_REQUEST_TTL_SECONDS = 120;
55
+ export declare const DEFAULT_LOCATION_REFRESH_KM = 10;
56
+ export declare const MAX_FEEDBACK_ITEMS = 50;
57
+ export declare const REFRESH_BUCKET_CAPACITY = 5;
58
+ export declare const LOCATION_BUCKET_CAPACITY = 1;
59
+ export declare const BUCKET_WINDOW_SECONDS = 60;
60
+ export declare const LIKE_LOG_RETENTION_DAYS = 90;
61
+ export declare const LIKE_TOMBSTONE_RETENTION_DAYS = 7;
62
+ export declare const FEEDBACK_RETENTION_DAYS = 90;
63
+ export declare const PASS_TYPE_PENALTY = 0.02;
64
+ export declare const PASS_TAG_PENALTY = 0.03;
65
+ export declare const PASS_MAX_PENALTY = 0.5;
66
+ export declare const DEFAULT_PAGE_LIMIT = 20;
67
+ export declare const MAX_PAGE_LIMIT = 50;
68
+ //# sourceMappingURL=formula.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formula.d.ts","sourceRoot":"","sources":["../../src/constants/formula.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAGtC,eAAO,MAAM,aAAa;;;;;;CAMhB,CAAC;AAGX,eAAO,MAAM,YAAY;;;;CAIf,CAAC;AAEX,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,eAAO,MAAM,eAAe,MAAM,CAAC;AACnC,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAGrC,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAChD,eAAO,MAAM,kBAAkB;;;;CAAuD,CAAC;AAEvF,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAG9C,eAAO,MAAM,qBAAqB;;;CAAmC,CAAC;AACtE,eAAO,MAAM,4BAA4B,KAAK,CAAC;AAC/C,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAC1C,eAAO,MAAM,mBAAmB,OAAO,CAAC;AACxC,eAAO,MAAM,mBAAmB,OAAO,CAAC;AAExC,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAGlC,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,eAAO,MAAM,oBAAoB,OAAO,CAAC;AAGzC,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,iBAAiB;;;;;;;CAOpB,CAAC;AAGX,eAAO,MAAM,iBAAiB,MAAM,CAAC;AACrC,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAC7C,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAC/C,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAC9C,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAGrC,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAC1C,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAGxC,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAC/C,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAG1C,eAAO,MAAM,iBAAiB,OAAO,CAAC;AACtC,eAAO,MAAM,gBAAgB,OAAO,CAAC;AACrC,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAGpC,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,cAAc,KAAK,CAAC"}
@@ -0,0 +1,61 @@
1
+ export const FORMULA_VERSION = 1;
2
+ export const FEED_FORMULA_VERSION = 1;
3
+ export const EVENT_WEIGHTS = {
4
+ proximity: 0.27,
5
+ friends: 0.23,
6
+ typeAffinity: 0.22,
7
+ imminence: 0.18,
8
+ popularity: 0.1,
9
+ };
10
+ export const POST_WEIGHTS = {
11
+ eventTie: 0.35,
12
+ authorAffinity: 0.3,
13
+ recency: 0.35,
14
+ };
15
+ export const PROXIMITY_DECAY_KM = 15;
16
+ export const MAX_DISTANCE_KM = 100;
17
+ export const IMMINENCE_HORIZON_DAYS = 60;
18
+ export const NEUTRAL_TYPE_AFFINITY = 0.5;
19
+ export const NEUTRAL_PROXIMITY = 0.5;
20
+ export const POPULARITY_PRIOR_WISHES = 2;
21
+ export const POPULARITY_PRIOR_PASSES = 2;
22
+ export const POPULARITY_MENTION_SATURATION = 10;
23
+ export const POPULARITY_WEIGHTS = { interest: 0.4, fill: 0.3, mentions: 0.3 };
24
+ export const POPULARITY_BUZZ_WINDOW_DAYS = 14;
25
+ export const AUTHOR_SIGNAL_WEIGHTS = { LIKE: 1, COMMENT: 2 };
26
+ export const AUTHOR_SIGNAL_HALF_LIFE_DAYS = 14;
27
+ export const AUTHOR_SIGNAL_SATURATION = 6;
28
+ export const AUTHOR_FOLLOW_BONUS = 0.25;
29
+ export const AUTHOR_FRIEND_BONUS = 0.15;
30
+ export const POST_RECENCY_SCALE_HOURS = 48;
31
+ export const EVENT_TIE_PAST_JOINED = 0.5;
32
+ export const ENGAGED_POST_DEMOTION = 0.6;
33
+ export const DIVERSITY_WINDOW = 3;
34
+ export const EVENT_SEMANTIC_WEIGHT = 0.5;
35
+ export const POST_SEMANTIC_WEIGHT = 0.15;
36
+ export const MAX_REASONS = 2;
37
+ export const REASON_THRESHOLDS = {
38
+ nearYou: 0.5,
39
+ matchesInterests: 0.6,
40
+ startingSoon: 0.8,
41
+ trending: 0.65,
42
+ engagedAuthor: 0.1,
43
+ recent: 0.6,
44
+ };
45
+ export const DEFAULT_LIST_SIZE = 100;
46
+ export const DEFAULT_PASS_COOLDOWN_DAYS = 30;
47
+ export const DEFAULT_REQUEST_TTL_SECONDS = 120;
48
+ export const DEFAULT_LOCATION_REFRESH_KM = 10;
49
+ export const MAX_FEEDBACK_ITEMS = 50;
50
+ export const REFRESH_BUCKET_CAPACITY = 5;
51
+ export const LOCATION_BUCKET_CAPACITY = 1;
52
+ export const BUCKET_WINDOW_SECONDS = 60;
53
+ export const LIKE_LOG_RETENTION_DAYS = 90;
54
+ export const LIKE_TOMBSTONE_RETENTION_DAYS = 7;
55
+ export const FEEDBACK_RETENTION_DAYS = 90;
56
+ export const PASS_TYPE_PENALTY = 0.02;
57
+ export const PASS_TAG_PENALTY = 0.03;
58
+ export const PASS_MAX_PENALTY = 0.5;
59
+ export const DEFAULT_PAGE_LIMIT = 20;
60
+ export const MAX_PAGE_LIMIT = 50;
61
+ //# sourceMappingURL=formula.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formula.js","sourceRoot":"","sources":["../../src/constants/formula.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC;AACjC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAGtC,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,IAAI;IACb,YAAY,EAAE,IAAI;IAClB,SAAS,EAAE,IAAI;IACf,UAAU,EAAE,GAAG;CACP,CAAC;AAGX,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,QAAQ,EAAE,IAAI;IACd,cAAc,EAAE,GAAG;IACnB,OAAO,EAAE,IAAI;CACL,CAAC;AAEX,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAErC,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAC;AACnC,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAEzC,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AACzC,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAGrC,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AACzC,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AACzC,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,CAAC;AAChD,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAW,CAAC;AAEvF,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,CAAC;AAG9C,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAW,CAAC;AACtE,MAAM,CAAC,MAAM,4BAA4B,GAAG,EAAE,CAAC;AAC/C,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC;AAC1C,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC;AACxC,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC;AAExC,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,CAAC;AAE3C,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAEzC,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAEzC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAGlC,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AACzC,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAGzC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC;AAC7B,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,OAAO,EAAE,GAAG;IACZ,gBAAgB,EAAE,GAAG;IACrB,YAAY,EAAE,GAAG;IACjB,QAAQ,EAAE,IAAI;IACd,aAAa,EAAE,GAAG;IAClB,MAAM,EAAE,GAAG;CACH,CAAC;AAGX,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAC;AACrC,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAC7C,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAC/C,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,CAAC;AAC9C,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAGrC,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AACzC,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC;AAC1C,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAGxC,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAC1C,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC;AAC/C,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAG1C,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AACtC,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC;AACrC,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAGpC,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AACrC,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './formula.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './formula.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -0,0 +1,11 @@
1
+ export * from './ranking-score.entity.js';
2
+ export * from './ranking-post-score.entity.js';
3
+ export * from './ranking-run.entity.js';
4
+ export * from './ranking-request.entity.js';
5
+ export * from './ranking-like-log.entity.js';
6
+ export * from './ranking-event-feedback.entity.js';
7
+ export * from './ranking-event-wish.entity.js';
8
+ export * from './ranking-event-mention.entity.js';
9
+ export * from './ranking-user-location.entity.js';
10
+ export * from './ranking-rate-bucket.entity.js';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC"}
@@ -0,0 +1,11 @@
1
+ export * from './ranking-score.entity.js';
2
+ export * from './ranking-post-score.entity.js';
3
+ export * from './ranking-run.entity.js';
4
+ export * from './ranking-request.entity.js';
5
+ export * from './ranking-like-log.entity.js';
6
+ export * from './ranking-event-feedback.entity.js';
7
+ export * from './ranking-event-wish.entity.js';
8
+ export * from './ranking-event-mention.entity.js';
9
+ export * from './ranking-user-location.entity.js';
10
+ export * from './ranking-rate-bucket.entity.js';
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare class RankingEventFeedbackEntity {
2
+ userId: string;
3
+ eventId: string;
4
+ action: string;
5
+ createdAt: Date;
6
+ }
7
+ //# sourceMappingURL=ranking-event-feedback.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ranking-event-feedback.entity.d.ts","sourceRoot":"","sources":["../../src/entities/ranking-event-feedback.entity.ts"],"names":[],"mappings":"AACA,qBAAa,0BAA0B;IACrC,MAAM,EAAG,MAAM,CAAC;IAChB,OAAO,EAAG,MAAM,CAAC;IACjB,MAAM,EAAG,MAAM,CAAC;IAChB,SAAS,EAAG,IAAI,CAAC;CAClB"}
@@ -0,0 +1,7 @@
1
+ export class RankingEventFeedbackEntity {
2
+ userId;
3
+ eventId;
4
+ action;
5
+ createdAt;
6
+ }
7
+ //# sourceMappingURL=ranking-event-feedback.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ranking-event-feedback.entity.js","sourceRoot":"","sources":["../../src/entities/ranking-event-feedback.entity.ts"],"names":[],"mappings":"AACA,MAAM,OAAO,0BAA0B;IACrC,MAAM,CAAU;IAChB,OAAO,CAAU;IACjB,MAAM,CAAU;IAChB,SAAS,CAAQ;CAClB"}
@@ -0,0 +1,7 @@
1
+ export declare class RankingEventMentionEntity {
2
+ postId: string;
3
+ eventId: string;
4
+ authorId: string;
5
+ createdAt: Date;
6
+ }
7
+ //# sourceMappingURL=ranking-event-mention.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ranking-event-mention.entity.d.ts","sourceRoot":"","sources":["../../src/entities/ranking-event-mention.entity.ts"],"names":[],"mappings":"AACA,qBAAa,yBAAyB;IACpC,MAAM,EAAG,MAAM,CAAC;IAChB,OAAO,EAAG,MAAM,CAAC;IACjB,QAAQ,EAAG,MAAM,CAAC;IAClB,SAAS,EAAG,IAAI,CAAC;CAClB"}
@@ -0,0 +1,7 @@
1
+ export class RankingEventMentionEntity {
2
+ postId;
3
+ eventId;
4
+ authorId;
5
+ createdAt;
6
+ }
7
+ //# sourceMappingURL=ranking-event-mention.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ranking-event-mention.entity.js","sourceRoot":"","sources":["../../src/entities/ranking-event-mention.entity.ts"],"names":[],"mappings":"AACA,MAAM,OAAO,yBAAyB;IACpC,MAAM,CAAU;IAChB,OAAO,CAAU;IACjB,QAAQ,CAAU;IAClB,SAAS,CAAQ;CAClB"}
@@ -0,0 +1,6 @@
1
+ export declare class RankingEventWishEntity {
2
+ userId: string;
3
+ eventId: string;
4
+ createdAt: Date;
5
+ }
6
+ //# sourceMappingURL=ranking-event-wish.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ranking-event-wish.entity.d.ts","sourceRoot":"","sources":["../../src/entities/ranking-event-wish.entity.ts"],"names":[],"mappings":"AACA,qBAAa,sBAAsB;IACjC,MAAM,EAAG,MAAM,CAAC;IAChB,OAAO,EAAG,MAAM,CAAC;IACjB,SAAS,EAAG,IAAI,CAAC;CAClB"}
@@ -0,0 +1,6 @@
1
+ export class RankingEventWishEntity {
2
+ userId;
3
+ eventId;
4
+ createdAt;
5
+ }
6
+ //# sourceMappingURL=ranking-event-wish.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ranking-event-wish.entity.js","sourceRoot":"","sources":["../../src/entities/ranking-event-wish.entity.ts"],"names":[],"mappings":"AACA,MAAM,OAAO,sBAAsB;IACjC,MAAM,CAAU;IAChB,OAAO,CAAU;IACjB,SAAS,CAAQ;CAClB"}
@@ -0,0 +1,8 @@
1
+ export declare class RankingLikeLogEntity {
2
+ userId: string;
3
+ postId: string;
4
+ occurredAt: Date;
5
+ deletedAt: Date | null;
6
+ origin: string;
7
+ }
8
+ //# sourceMappingURL=ranking-like-log.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ranking-like-log.entity.d.ts","sourceRoot":"","sources":["../../src/entities/ranking-like-log.entity.ts"],"names":[],"mappings":"AACA,qBAAa,oBAAoB;IAC/B,MAAM,EAAG,MAAM,CAAC;IAChB,MAAM,EAAG,MAAM,CAAC;IAChB,UAAU,EAAG,IAAI,CAAC;IAClB,SAAS,EAAG,IAAI,GAAG,IAAI,CAAC;IACxB,MAAM,EAAG,MAAM,CAAC;CACjB"}
@@ -0,0 +1,8 @@
1
+ export class RankingLikeLogEntity {
2
+ userId;
3
+ postId;
4
+ occurredAt;
5
+ deletedAt;
6
+ origin;
7
+ }
8
+ //# sourceMappingURL=ranking-like-log.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ranking-like-log.entity.js","sourceRoot":"","sources":["../../src/entities/ranking-like-log.entity.ts"],"names":[],"mappings":"AACA,MAAM,OAAO,oBAAoB;IAC/B,MAAM,CAAU;IAChB,MAAM,CAAU;IAChB,UAAU,CAAQ;IAClB,SAAS,CAAe;IACxB,MAAM,CAAU;CACjB"}
@@ -0,0 +1,13 @@
1
+ export declare class RankingPostScoreEntity {
2
+ userId: string;
3
+ postId: string;
4
+ authorId: string;
5
+ origin: string;
6
+ score: number;
7
+ structuralScore: number;
8
+ semanticScore: number | null;
9
+ rank: number;
10
+ reasons: string[];
11
+ computedAt: Date;
12
+ }
13
+ //# sourceMappingURL=ranking-post-score.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ranking-post-score.entity.d.ts","sourceRoot":"","sources":["../../src/entities/ranking-post-score.entity.ts"],"names":[],"mappings":"AACA,qBAAa,sBAAsB;IACjC,MAAM,EAAG,MAAM,CAAC;IAChB,MAAM,EAAG,MAAM,CAAC;IAChB,QAAQ,EAAG,MAAM,CAAC;IAElB,MAAM,EAAG,MAAM,CAAC;IAChB,KAAK,EAAG,MAAM,CAAC;IACf,eAAe,EAAG,MAAM,CAAC;IACzB,aAAa,EAAG,MAAM,GAAG,IAAI,CAAC;IAC9B,IAAI,EAAG,MAAM,CAAC;IACd,OAAO,EAAG,MAAM,EAAE,CAAC;IACnB,UAAU,EAAG,IAAI,CAAC;CACnB"}
@@ -0,0 +1,13 @@
1
+ export class RankingPostScoreEntity {
2
+ userId;
3
+ postId;
4
+ authorId;
5
+ origin;
6
+ score;
7
+ structuralScore;
8
+ semanticScore;
9
+ rank;
10
+ reasons;
11
+ computedAt;
12
+ }
13
+ //# sourceMappingURL=ranking-post-score.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ranking-post-score.entity.js","sourceRoot":"","sources":["../../src/entities/ranking-post-score.entity.ts"],"names":[],"mappings":"AACA,MAAM,OAAO,sBAAsB;IACjC,MAAM,CAAU;IAChB,MAAM,CAAU;IAChB,QAAQ,CAAU;IAElB,MAAM,CAAU;IAChB,KAAK,CAAU;IACf,eAAe,CAAU;IACzB,aAAa,CAAiB;IAC9B,IAAI,CAAU;IACd,OAAO,CAAY;IACnB,UAAU,CAAQ;CACnB"}
@@ -0,0 +1,7 @@
1
+ export declare class RankingRateBucketEntity {
2
+ userId: string;
3
+ bucket: string;
4
+ tokens: number;
5
+ updatedAt: Date;
6
+ }
7
+ //# sourceMappingURL=ranking-rate-bucket.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ranking-rate-bucket.entity.d.ts","sourceRoot":"","sources":["../../src/entities/ranking-rate-bucket.entity.ts"],"names":[],"mappings":"AACA,qBAAa,uBAAuB;IAClC,MAAM,EAAG,MAAM,CAAC;IAChB,MAAM,EAAG,MAAM,CAAC;IAChB,MAAM,EAAG,MAAM,CAAC;IAChB,SAAS,EAAG,IAAI,CAAC;CAClB"}
@@ -0,0 +1,7 @@
1
+ export class RankingRateBucketEntity {
2
+ userId;
3
+ bucket;
4
+ tokens;
5
+ updatedAt;
6
+ }
7
+ //# sourceMappingURL=ranking-rate-bucket.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ranking-rate-bucket.entity.js","sourceRoot":"","sources":["../../src/entities/ranking-rate-bucket.entity.ts"],"names":[],"mappings":"AACA,MAAM,OAAO,uBAAuB;IAClC,MAAM,CAAU;IAChB,MAAM,CAAU;IAChB,MAAM,CAAU;IAChB,SAAS,CAAQ;CAClB"}
@@ -0,0 +1,8 @@
1
+ export declare class RankingRequestEntity {
2
+ userId: string;
3
+ listKind: string;
4
+ requestedAt: Date;
5
+ reason: string;
6
+ jobEnqueuedAt: Date;
7
+ }
8
+ //# sourceMappingURL=ranking-request.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ranking-request.entity.d.ts","sourceRoot":"","sources":["../../src/entities/ranking-request.entity.ts"],"names":[],"mappings":"AACA,qBAAa,oBAAoB;IAC/B,MAAM,EAAG,MAAM,CAAC;IAChB,QAAQ,EAAG,MAAM,CAAC;IAClB,WAAW,EAAG,IAAI,CAAC;IACnB,MAAM,EAAG,MAAM,CAAC;IAChB,aAAa,EAAG,IAAI,CAAC;CACtB"}
@@ -0,0 +1,8 @@
1
+ export class RankingRequestEntity {
2
+ userId;
3
+ listKind;
4
+ requestedAt;
5
+ reason;
6
+ jobEnqueuedAt;
7
+ }
8
+ //# sourceMappingURL=ranking-request.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ranking-request.entity.js","sourceRoot":"","sources":["../../src/entities/ranking-request.entity.ts"],"names":[],"mappings":"AACA,MAAM,OAAO,oBAAoB;IAC/B,MAAM,CAAU;IAChB,QAAQ,CAAU;IAClB,WAAW,CAAQ;IACnB,MAAM,CAAU;IAChB,aAAa,CAAQ;CACtB"}
@@ -0,0 +1,17 @@
1
+ export declare class RankingRunEntity {
2
+ userId: string;
3
+ listKind: string;
4
+ listVersion: string;
5
+ startedAt: Date;
6
+ computedAt: Date;
7
+ source: string;
8
+ formulaVersion: number;
9
+ reason: string;
10
+ candidateCount: number;
11
+ jevScoredCount: number;
12
+ jevInputTokens: number | null;
13
+ jevOutputTokens: number | null;
14
+ durationMs: number;
15
+ lastError: string | null;
16
+ }
17
+ //# sourceMappingURL=ranking-run.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ranking-run.entity.d.ts","sourceRoot":"","sources":["../../src/entities/ranking-run.entity.ts"],"names":[],"mappings":"AACA,qBAAa,gBAAgB;IAC3B,MAAM,EAAG,MAAM,CAAC;IAChB,QAAQ,EAAG,MAAM,CAAC;IAElB,WAAW,EAAG,MAAM,CAAC;IACrB,SAAS,EAAG,IAAI,CAAC;IACjB,UAAU,EAAG,IAAI,CAAC;IAClB,MAAM,EAAG,MAAM,CAAC;IAChB,cAAc,EAAG,MAAM,CAAC;IACxB,MAAM,EAAG,MAAM,CAAC;IAChB,cAAc,EAAG,MAAM,CAAC;IACxB,cAAc,EAAG,MAAM,CAAC;IACxB,cAAc,EAAG,MAAM,GAAG,IAAI,CAAC;IAC/B,eAAe,EAAG,MAAM,GAAG,IAAI,CAAC;IAChC,UAAU,EAAG,MAAM,CAAC;IACpB,SAAS,EAAG,MAAM,GAAG,IAAI,CAAC;CAC3B"}
@@ -0,0 +1,17 @@
1
+ export class RankingRunEntity {
2
+ userId;
3
+ listKind;
4
+ listVersion;
5
+ startedAt;
6
+ computedAt;
7
+ source;
8
+ formulaVersion;
9
+ reason;
10
+ candidateCount;
11
+ jevScoredCount;
12
+ jevInputTokens;
13
+ jevOutputTokens;
14
+ durationMs;
15
+ lastError;
16
+ }
17
+ //# sourceMappingURL=ranking-run.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ranking-run.entity.js","sourceRoot":"","sources":["../../src/entities/ranking-run.entity.ts"],"names":[],"mappings":"AACA,MAAM,OAAO,gBAAgB;IAC3B,MAAM,CAAU;IAChB,QAAQ,CAAU;IAElB,WAAW,CAAU;IACrB,SAAS,CAAQ;IACjB,UAAU,CAAQ;IAClB,MAAM,CAAU;IAChB,cAAc,CAAU;IACxB,MAAM,CAAU;IAChB,cAAc,CAAU;IACxB,cAAc,CAAU;IACxB,cAAc,CAAiB;IAC/B,eAAe,CAAiB;IAChC,UAAU,CAAU;IACpB,SAAS,CAAiB;CAC3B"}
@@ -0,0 +1,11 @@
1
+ export declare class RankingScoreEntity {
2
+ userId: string;
3
+ eventId: string;
4
+ score: number;
5
+ structuralScore: number;
6
+ semanticScore: number | null;
7
+ rank: number;
8
+ reasons: string[];
9
+ computedAt: Date;
10
+ }
11
+ //# sourceMappingURL=ranking-score.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ranking-score.entity.d.ts","sourceRoot":"","sources":["../../src/entities/ranking-score.entity.ts"],"names":[],"mappings":"AACA,qBAAa,kBAAkB;IAC7B,MAAM,EAAG,MAAM,CAAC;IAChB,OAAO,EAAG,MAAM,CAAC;IACjB,KAAK,EAAG,MAAM,CAAC;IACf,eAAe,EAAG,MAAM,CAAC;IACzB,aAAa,EAAG,MAAM,GAAG,IAAI,CAAC;IAC9B,IAAI,EAAG,MAAM,CAAC;IAEd,OAAO,EAAG,MAAM,EAAE,CAAC;IACnB,UAAU,EAAG,IAAI,CAAC;CACnB"}
@@ -0,0 +1,11 @@
1
+ export class RankingScoreEntity {
2
+ userId;
3
+ eventId;
4
+ score;
5
+ structuralScore;
6
+ semanticScore;
7
+ rank;
8
+ reasons;
9
+ computedAt;
10
+ }
11
+ //# sourceMappingURL=ranking-score.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ranking-score.entity.js","sourceRoot":"","sources":["../../src/entities/ranking-score.entity.ts"],"names":[],"mappings":"AACA,MAAM,OAAO,kBAAkB;IAC7B,MAAM,CAAU;IAChB,OAAO,CAAU;IACjB,KAAK,CAAU;IACf,eAAe,CAAU;IACzB,aAAa,CAAiB;IAC9B,IAAI,CAAU;IAEd,OAAO,CAAY;IACnB,UAAU,CAAQ;CACnB"}
@@ -0,0 +1,6 @@
1
+ export declare class RankingUserLocationEntity {
2
+ userId: string;
3
+ locationEnc: Buffer;
4
+ updatedAt: Date;
5
+ }
6
+ //# sourceMappingURL=ranking-user-location.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ranking-user-location.entity.d.ts","sourceRoot":"","sources":["../../src/entities/ranking-user-location.entity.ts"],"names":[],"mappings":"AACA,qBAAa,yBAAyB;IACpC,MAAM,EAAG,MAAM,CAAC;IAChB,WAAW,EAAG,MAAM,CAAC;IACrB,SAAS,EAAG,IAAI,CAAC;CAClB"}
@@ -0,0 +1,6 @@
1
+ export class RankingUserLocationEntity {
2
+ userId;
3
+ locationEnc;
4
+ updatedAt;
5
+ }
6
+ //# sourceMappingURL=ranking-user-location.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ranking-user-location.entity.js","sourceRoot":"","sources":["../../src/entities/ranking-user-location.entity.ts"],"names":[],"mappings":"AACA,MAAM,OAAO,yBAAyB;IACpC,MAAM,CAAU;IAChB,WAAW,CAAU;IACrB,SAAS,CAAQ;CAClB"}
@@ -0,0 +1,52 @@
1
+ export declare const RankingListKind: {
2
+ readonly EVENT: "EVENT";
3
+ readonly POST: "POST";
4
+ };
5
+ export type RankingListKind = (typeof RankingListKind)[keyof typeof RankingListKind];
6
+ export declare const RankingRunSource: {
7
+ readonly FULL: "FULL";
8
+ readonly STRUCTURAL_ONLY: "STRUCTURAL_ONLY";
9
+ readonly COLD_START: "COLD_START";
10
+ };
11
+ export type RankingRunSource = (typeof RankingRunSource)[keyof typeof RankingRunSource];
12
+ export declare const EventRankingReason: {
13
+ readonly FRIEND_INVOLVED: "FRIEND_INVOLVED";
14
+ readonly NEAR_YOU: "NEAR_YOU";
15
+ readonly MATCHES_INTERESTS: "MATCHES_INTERESTS";
16
+ readonly STARTING_SOON: "STARTING_SOON";
17
+ readonly TRENDING: "TRENDING";
18
+ };
19
+ export type EventRankingReason = (typeof EventRankingReason)[keyof typeof EventRankingReason];
20
+ export declare const PostRankingReason: {
21
+ readonly FOLLOWED_AUTHOR: "FOLLOWED_AUTHOR";
22
+ readonly FRIEND_AUTHOR: "FRIEND_AUTHOR";
23
+ readonly ENGAGED_AUTHOR: "ENGAGED_AUTHOR";
24
+ readonly LINKED_EVENT_WISHED: "LINKED_EVENT_WISHED";
25
+ readonly LINKED_EVENT_JOINED: "LINKED_EVENT_JOINED";
26
+ readonly RECENT: "RECENT";
27
+ };
28
+ export type PostRankingReason = (typeof PostRankingReason)[keyof typeof PostRankingReason];
29
+ export type RankingReason = EventRankingReason | PostRankingReason;
30
+ export declare const PostOrigin: {
31
+ readonly FOLLOWED: "FOLLOWED";
32
+ readonly ENGAGED: "ENGAGED";
33
+ readonly EVENT: "EVENT";
34
+ readonly GLOBAL: "GLOBAL";
35
+ };
36
+ export type PostOrigin = (typeof PostOrigin)[keyof typeof PostOrigin];
37
+ export declare const FeedbackAction: {
38
+ readonly PASS: "PASS";
39
+ };
40
+ export type FeedbackAction = (typeof FeedbackAction)[keyof typeof FeedbackAction];
41
+ export declare const RateBucketName: {
42
+ readonly REFRESH: "REFRESH";
43
+ readonly LOCATION: "LOCATION";
44
+ };
45
+ export type RateBucketName = (typeof RateBucketName)[keyof typeof RateBucketName];
46
+ export declare const LikeOrigin: {
47
+ readonly STREAM: "STREAM";
48
+ readonly BACKFILL: "BACKFILL";
49
+ };
50
+ export type LikeOrigin = (typeof LikeOrigin)[keyof typeof LikeOrigin];
51
+ export type EventType = 'SOCIAL' | 'ECOLOGY';
52
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/enums/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,eAAe;;;CAGlB,CAAC;AACX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAGrF,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAExF,eAAO,MAAM,kBAAkB;;;;;;CAMrB,CAAC;AACX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC;AAE9F,eAAO,MAAM,iBAAiB;;;;;;;CAOpB,CAAC;AACX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE3F,MAAM,MAAM,aAAa,GAAG,kBAAkB,GAAG,iBAAiB,CAAC;AAGnE,eAAO,MAAM,UAAU;;;;;CAKb,CAAC;AACX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAEtE,eAAO,MAAM,cAAc;;CAEjB,CAAC;AACX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAElF,eAAO,MAAM,cAAc;;;CAGjB,CAAC;AACX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAElF,eAAO,MAAM,UAAU;;;CAGb,CAAC;AACX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAEtE,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC"}