itlab-internal-services 2.15.6 → 2.16.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 (342) hide show
  1. package/README.md +1 -187
  2. package/dist/classes/document-merger.class.js +3 -5
  3. package/dist/classes/index.d.ts +1 -0
  4. package/dist/classes/index.js +3 -1
  5. package/dist/classes/report-category.class.d.ts +55 -0
  6. package/dist/classes/report-category.class.js +120 -0
  7. package/dist/decorators/{account.decorator.d.ts → authenticated-account.decorator.d.ts} +4 -4
  8. package/dist/decorators/{account.decorator.js → authenticated-account.decorator.js} +8 -10
  9. package/dist/decorators/index.d.ts +1 -1
  10. package/dist/decorators/index.js +1 -1
  11. package/dist/exceptions/authenticated-user-required.exception.d.ts +34 -0
  12. package/dist/exceptions/authenticated-user-required.exception.js +51 -0
  13. package/dist/exceptions/bad-body.exception.d.ts +19 -8
  14. package/dist/exceptions/bad-body.exception.js +26 -10
  15. package/dist/exceptions/bad-parameter.exception.d.ts +23 -8
  16. package/dist/exceptions/bad-parameter.exception.js +41 -19
  17. package/dist/exceptions/duplicate.exception.d.ts +20 -8
  18. package/dist/exceptions/duplicate.exception.js +27 -10
  19. package/dist/exceptions/index.d.ts +1 -0
  20. package/dist/exceptions/index.js +1 -0
  21. package/dist/functions/add-views-likes-virtuals.function.d.ts +15 -0
  22. package/dist/functions/add-views-likes-virtuals.function.js +43 -0
  23. package/dist/functions/create-internal-axios-client.function.js +2 -2
  24. package/dist/functions/index.d.ts +1 -0
  25. package/dist/functions/index.js +3 -1
  26. package/dist/index.d.ts +2 -2
  27. package/dist/index.js +2 -2
  28. package/dist/likeable.interface.d.ts +1 -1
  29. package/dist/likeable.interface.js +2 -2
  30. package/dist/models/account.model.d.ts +23 -0
  31. package/dist/models/account.model.js +59 -0
  32. package/dist/models/index.d.ts +3 -1
  33. package/dist/models/index.js +7 -3
  34. package/dist/{modules/search/models → models}/search-document.model.d.ts +1 -1
  35. package/dist/{modules/search/models → models}/search-document.model.js +1 -1
  36. package/dist/models/{account-entity.model.d.ts → user.model.d.ts} +8 -21
  37. package/dist/models/{account-entity.model.js → user.model.js} +11 -25
  38. package/dist/modules/authentication/authentication-module-options.interface.d.ts +2 -8
  39. package/dist/modules/authentication/authentication-options.parameter.d.ts +4 -0
  40. package/dist/modules/authentication/{inject-auth-options.decorator.js → authentication-options.parameter.js} +5 -2
  41. package/dist/modules/authentication/authentication.module.d.ts +23 -0
  42. package/dist/modules/authentication/authentication.module.js +24 -1
  43. package/dist/modules/authentication/guards/index.d.ts +2 -2
  44. package/dist/modules/authentication/guards/index.js +7 -7
  45. package/dist/modules/authentication/guards/jwt-auth.guard.d.ts +17 -0
  46. package/dist/modules/authentication/guards/jwt-auth.guard.js +73 -0
  47. package/dist/modules/authentication/guards/permissions.guard.d.ts +5 -27
  48. package/dist/modules/authentication/guards/permissions.guard.js +26 -59
  49. package/dist/modules/authentication/guards/public.guard.d.ts +7 -13
  50. package/dist/modules/authentication/guards/public.guard.js +10 -24
  51. package/dist/modules/authentication/guards/service-auth.guard.d.ts +22 -0
  52. package/dist/modules/authentication/guards/service-auth.guard.js +65 -0
  53. package/dist/modules/authentication/index.d.ts +3 -3
  54. package/dist/modules/authentication/index.js +3 -5
  55. package/dist/modules/cache/cache-response.interceptor.d.ts +2 -2
  56. package/dist/modules/cache/cache-response.interceptor.js +2 -2
  57. package/dist/modules/cache/index.d.ts +1 -0
  58. package/dist/modules/cache/index.js +1 -0
  59. package/dist/modules/comment/comment-module-options.interface.d.ts +38 -0
  60. package/dist/modules/comment/comment.controller.d.ts +24 -30
  61. package/dist/modules/comment/comment.controller.js +59 -61
  62. package/dist/modules/comment/comment.module-definition.d.ts +1 -42
  63. package/dist/modules/comment/comment.module-definition.js +1 -2
  64. package/dist/modules/comment/comment.module.d.ts +13 -13
  65. package/dist/modules/comment/comment.module.js +15 -42
  66. package/dist/modules/comment/comment.service.d.ts +27 -37
  67. package/dist/modules/comment/comment.service.js +50 -84
  68. package/dist/modules/comment/index.d.ts +2 -3
  69. package/dist/modules/comment/index.js +16 -7
  70. package/dist/modules/database/database.module.js +2 -5
  71. package/dist/modules/database/index.d.ts +2 -5
  72. package/dist/modules/database/index.js +17 -9
  73. package/dist/modules/index.d.ts +2 -6
  74. package/dist/modules/index.js +2 -6
  75. package/dist/modules/like/index.d.ts +2 -1
  76. package/dist/modules/like/index.js +16 -3
  77. package/dist/modules/like/like-module-options.interface.d.ts +21 -0
  78. package/dist/modules/like/like.controller.d.ts +45 -37
  79. package/dist/modules/like/like.controller.js +117 -102
  80. package/dist/modules/like/like.module-definition.d.ts +1 -17
  81. package/dist/modules/like/like.module-definition.js +1 -2
  82. package/dist/modules/like/like.module.d.ts +12 -12
  83. package/dist/modules/like/like.module.js +14 -37
  84. package/dist/modules/like/like.service.d.ts +31 -27
  85. package/dist/modules/like/like.service.js +42 -35
  86. package/dist/modules/merge/index.d.ts +3 -0
  87. package/dist/modules/merge/index.js +19 -0
  88. package/dist/modules/merge/merge-module-options.interface.d.ts +21 -0
  89. package/dist/modules/merge/merge.controller.d.ts +30 -0
  90. package/dist/modules/merge/merge.controller.js +76 -0
  91. package/dist/modules/merge/merge.module.d.ts +18 -0
  92. package/dist/modules/merge/merge.module.js +41 -0
  93. package/dist/modules/merge/merge.service.interface.d.ts +17 -0
  94. package/dist/modules/services/base-http.service.d.ts +83 -0
  95. package/dist/modules/services/base-http.service.js +124 -0
  96. package/dist/modules/services/base-urls.d.ts +22 -0
  97. package/dist/modules/services/base-urls.js +121 -0
  98. package/dist/modules/services/index.d.ts +4 -0
  99. package/dist/modules/services/index.js +20 -0
  100. package/dist/modules/services/providers/accounts.service.d.ts +52 -0
  101. package/dist/modules/services/providers/accounts.service.js +82 -0
  102. package/dist/modules/services/providers/books.service.d.ts +29 -0
  103. package/dist/modules/services/providers/books.service.js +53 -0
  104. package/dist/modules/services/providers/changelog.service.d.ts +18 -0
  105. package/dist/modules/services/providers/changelog.service.js +41 -0
  106. package/dist/modules/services/providers/comments/comments.service-definition.d.ts +1 -0
  107. package/dist/modules/services/providers/comments/comments.service-definition.js +4 -0
  108. package/dist/modules/services/providers/comments/comments.service.d.ts +60 -0
  109. package/dist/modules/services/providers/comments/comments.service.js +138 -0
  110. package/dist/modules/services/providers/comments/index.d.ts +1 -0
  111. package/dist/{factories → modules/services/providers/comments}/index.js +1 -1
  112. package/dist/modules/services/providers/content/content-types.d.ts +20 -0
  113. package/dist/modules/services/providers/content/content-types.js +7 -0
  114. package/dist/modules/services/providers/content/content.service-definition.d.ts +1 -0
  115. package/dist/modules/services/providers/content/content.service-definition.js +4 -0
  116. package/dist/modules/services/providers/content/content.service.d.ts +94 -0
  117. package/dist/modules/services/providers/content/content.service.js +214 -0
  118. package/dist/modules/services/providers/content/index.d.ts +1 -0
  119. package/dist/modules/{search/models → services/providers/content}/index.js +1 -1
  120. package/dist/modules/services/providers/demo-hive.service.d.ts +29 -0
  121. package/dist/modules/services/providers/demo-hive.service.js +53 -0
  122. package/dist/modules/services/providers/events.service.d.ts +29 -0
  123. package/dist/modules/services/providers/events.service.js +53 -0
  124. package/dist/modules/services/providers/hackschool.service.d.ts +49 -0
  125. package/dist/modules/services/providers/hackschool.service.js +77 -0
  126. package/dist/modules/services/providers/ideas.service.d.ts +18 -0
  127. package/dist/modules/services/providers/ideas.service.js +41 -0
  128. package/dist/modules/services/providers/index.d.ts +19 -0
  129. package/dist/modules/services/providers/index.js +35 -0
  130. package/dist/modules/services/providers/lunch-roulette.service.d.ts +18 -0
  131. package/dist/modules/services/providers/lunch-roulette.service.js +41 -0
  132. package/dist/modules/services/providers/mail/index.d.ts +3 -0
  133. package/dist/modules/services/providers/mail/index.js +19 -0
  134. package/dist/modules/services/providers/mail/mail-types.d.ts +30 -0
  135. package/dist/modules/services/providers/mail/mail-types.js +22 -0
  136. package/dist/modules/services/providers/mail/mail.service.d.ts +99 -0
  137. package/dist/modules/{mail → services/providers/mail}/mail.service.js +54 -91
  138. package/dist/modules/services/providers/newletter.service.d.ts +29 -0
  139. package/dist/modules/services/providers/newletter.service.js +53 -0
  140. package/dist/modules/services/providers/newsroom.service.d.ts +47 -0
  141. package/dist/modules/services/providers/newsroom.service.js +71 -0
  142. package/dist/modules/services/providers/notification/dtos/schedule-notification.dto.js +2 -0
  143. package/dist/modules/services/providers/notification/index.d.ts +2 -0
  144. package/dist/modules/services/providers/notification/index.js +18 -0
  145. package/dist/modules/services/providers/notification/notification.service-definition.d.ts +1 -0
  146. package/dist/modules/services/providers/notification/notification.service-definition.js +4 -0
  147. package/dist/modules/services/providers/notification/notification.service.d.ts +50 -0
  148. package/dist/modules/services/providers/notification/notification.service.js +130 -0
  149. package/dist/modules/services/providers/pass/dtos/create-guild-member-pass.dto.js +2 -0
  150. package/dist/modules/services/providers/pass/dtos/create-team-member-pass.dto.js +2 -0
  151. package/dist/modules/services/providers/pass/index.d.ts +2 -0
  152. package/dist/modules/services/providers/pass/index.js +18 -0
  153. package/dist/modules/services/providers/pass/pass-types.d.ts +18 -0
  154. package/dist/modules/services/providers/pass/pass-types.js +7 -0
  155. package/dist/modules/{pass → services/providers/pass}/pass.service.d.ts +15 -39
  156. package/dist/modules/{pass → services/providers/pass}/pass.service.js +46 -61
  157. package/dist/modules/services/providers/podcasts.service.d.ts +29 -0
  158. package/dist/modules/services/providers/podcasts.service.js +53 -0
  159. package/dist/modules/services/providers/search/dtos/index-search-document.dto.js +2 -0
  160. package/dist/modules/services/providers/search/index.d.ts +2 -0
  161. package/dist/modules/services/providers/search/index.js +18 -0
  162. package/dist/modules/services/providers/search/search.service-definition.d.ts +1 -0
  163. package/dist/modules/services/providers/search/search.service-definition.js +4 -0
  164. package/dist/modules/services/providers/search/search.service.d.ts +66 -0
  165. package/dist/modules/services/providers/search/search.service.js +171 -0
  166. package/dist/modules/services/providers/team.service.d.ts +29 -0
  167. package/dist/modules/services/providers/team.service.js +53 -0
  168. package/dist/modules/services/providers/tech-radar.service.d.ts +39 -0
  169. package/dist/modules/services/providers/tech-radar.service.js +65 -0
  170. package/dist/modules/services/services-module-options.interface.d.ts +4 -0
  171. package/dist/modules/services/services-module-options.interface.js +2 -0
  172. package/dist/modules/services/services-options.parameter.d.ts +1 -0
  173. package/dist/modules/services/services-options.parameter.js +8 -0
  174. package/dist/modules/services/services.module-definition.d.ts +16 -0
  175. package/dist/modules/services/services.module-definition.js +21 -0
  176. package/dist/modules/services/services.module.d.ts +17 -0
  177. package/dist/modules/services/services.module.js +63 -0
  178. package/dist/pipes/index.d.ts +2 -3
  179. package/dist/pipes/index.js +2 -3
  180. package/dist/pipes/params/hub-id.pipe.d.ts +22 -0
  181. package/dist/pipes/{hub-id.pipe.js → params/hub-id.pipe.js} +14 -17
  182. package/dist/pipes/params/hub-resource.pipe.d.ts +22 -0
  183. package/dist/pipes/{hub-resource.pipe.js → params/hub-resource.pipe.js} +19 -20
  184. package/dist/pipes/params/index.d.ts +3 -0
  185. package/dist/pipes/params/index.js +19 -0
  186. package/dist/pipes/params/mongo-id.pipe.d.ts +15 -0
  187. package/dist/pipes/params/mongo-id.pipe.js +52 -0
  188. package/dist/pipes/queries/index.d.ts +3 -0
  189. package/dist/pipes/queries/index.js +19 -0
  190. package/dist/pipes/queries/mongo-ids.pipe.d.ts +22 -0
  191. package/dist/pipes/queries/mongo-ids.pipe.js +60 -0
  192. package/dist/pipes/queries/optional-boolean.pipe.d.ts +29 -0
  193. package/dist/pipes/queries/optional-boolean.pipe.js +72 -0
  194. package/dist/pipes/queries/optional-include-drafts.pipe.d.ts +28 -0
  195. package/dist/pipes/queries/optional-include-drafts.pipe.js +38 -0
  196. package/dist/properties/index.d.ts +1 -0
  197. package/dist/properties/index.js +5 -0
  198. package/dist/swagger/index.d.ts +1 -0
  199. package/dist/swagger/index.js +5 -0
  200. package/dist/swagger/remove-public-route-auth.plugin.d.ts +9 -0
  201. package/dist/swagger/remove-public-route-auth.plugin.js +25 -0
  202. package/dist/swagger/swagger-options.interface.d.ts +14 -0
  203. package/dist/swagger/swagger-options.interface.js +2 -0
  204. package/dist/swagger/swagger.function.d.ts +11 -0
  205. package/dist/swagger/swagger.function.js +47 -0
  206. package/dist/transform/boolean.transform.js +3 -3
  207. package/dist/viewable.interface.js +1 -1
  208. package/package.json +2 -2
  209. package/dist/factories/index.d.ts +0 -1
  210. package/dist/factories/virtuals.factory.d.ts +0 -79
  211. package/dist/factories/virtuals.factory.js +0 -171
  212. package/dist/modules/authentication/guards/auth.guard.d.ts +0 -36
  213. package/dist/modules/authentication/guards/auth.guard.js +0 -107
  214. package/dist/modules/authentication/guards/internal.guard.d.ts +0 -33
  215. package/dist/modules/authentication/guards/internal.guard.js +0 -72
  216. package/dist/modules/authentication/inject-auth-options.decorator.d.ts +0 -1
  217. package/dist/modules/comment/comment.model.d.ts +0 -29
  218. package/dist/modules/comment/comment.model.js +0 -43
  219. package/dist/modules/content/content.module-definition.d.ts +0 -5
  220. package/dist/modules/content/content.module-definition.js +0 -8
  221. package/dist/modules/content/content.module.d.ts +0 -31
  222. package/dist/modules/content/content.module.js +0 -60
  223. package/dist/modules/content/content.service.d.ts +0 -50
  224. package/dist/modules/content/content.service.js +0 -145
  225. package/dist/modules/content/index.d.ts +0 -3
  226. package/dist/modules/content/index.js +0 -9
  227. package/dist/modules/database/model-service/dbs/hub-account.db.d.ts +0 -28
  228. package/dist/modules/database/model-service/dbs/hub-account.db.js +0 -44
  229. package/dist/modules/database/model-service/dbs/hub-books.db.d.ts +0 -23
  230. package/dist/modules/database/model-service/dbs/hub-books.db.js +0 -45
  231. package/dist/modules/database/model-service/dbs/hub-comments.db.d.ts +0 -29
  232. package/dist/modules/database/model-service/dbs/hub-comments.db.js +0 -68
  233. package/dist/modules/database/model-service/dbs/hub-content.db.d.ts +0 -24
  234. package/dist/modules/database/model-service/dbs/hub-content.db.js +0 -49
  235. package/dist/modules/database/model-service/dbs/hub-demo-hive.db.d.ts +0 -23
  236. package/dist/modules/database/model-service/dbs/hub-demo-hive.db.js +0 -45
  237. package/dist/modules/database/model-service/dbs/hub-events.db.d.ts +0 -24
  238. package/dist/modules/database/model-service/dbs/hub-events.db.js +0 -49
  239. package/dist/modules/database/model-service/dbs/hub-hackschool.db.d.ts +0 -60
  240. package/dist/modules/database/model-service/dbs/hub-hackschool.db.js +0 -106
  241. package/dist/modules/database/model-service/dbs/hub-newsroom.db.d.ts +0 -25
  242. package/dist/modules/database/model-service/dbs/hub-newsroom.db.js +0 -53
  243. package/dist/modules/database/model-service/dbs/hub-podcasts.db.d.ts +0 -23
  244. package/dist/modules/database/model-service/dbs/hub-podcasts.db.js +0 -45
  245. package/dist/modules/database/model-service/dbs/hub-team.db.d.ts +0 -22
  246. package/dist/modules/database/model-service/dbs/hub-team.db.js +0 -41
  247. package/dist/modules/database/model-service/dbs/hub-tech-radar.db.d.ts +0 -42
  248. package/dist/modules/database/model-service/dbs/hub-tech-radar.db.js +0 -81
  249. package/dist/modules/database/model-service/model.service.d.ts +0 -6407
  250. package/dist/modules/database/model-service/model.service.js +0 -136
  251. package/dist/modules/database/populate-service/populate.service.d.ts +0 -73
  252. package/dist/modules/database/populate-service/populate.service.js +0 -163
  253. package/dist/modules/database/service-mapper-service/service-mapper.service.d.ts +0 -32
  254. package/dist/modules/database/service-mapper-service/service-mapper.service.js +0 -73
  255. package/dist/modules/fetch/fetch.module.d.ts +0 -31
  256. package/dist/modules/fetch/fetch.module.js +0 -60
  257. package/dist/modules/fetch/fetch.service.d.ts +0 -153
  258. package/dist/modules/fetch/fetch.service.js +0 -274
  259. package/dist/modules/fetch/index.d.ts +0 -2
  260. package/dist/modules/fetch/index.js +0 -7
  261. package/dist/modules/mail/index.d.ts +0 -4
  262. package/dist/modules/mail/index.js +0 -23
  263. package/dist/modules/mail/mail.module.d.ts +0 -31
  264. package/dist/modules/mail/mail.module.js +0 -60
  265. package/dist/modules/mail/mail.service.d.ts +0 -136
  266. package/dist/modules/notification/index.d.ts +0 -3
  267. package/dist/modules/notification/index.js +0 -22
  268. package/dist/modules/notification/notification.module-definition.d.ts +0 -5
  269. package/dist/modules/notification/notification.module-definition.js +0 -8
  270. package/dist/modules/notification/notification.module.d.ts +0 -34
  271. package/dist/modules/notification/notification.module.js +0 -63
  272. package/dist/modules/notification/notification.service.d.ts +0 -42
  273. package/dist/modules/notification/notification.service.js +0 -100
  274. package/dist/modules/pass/index.d.ts +0 -3
  275. package/dist/modules/pass/index.js +0 -22
  276. package/dist/modules/pass/pass.module.d.ts +0 -32
  277. package/dist/modules/pass/pass.module.js +0 -61
  278. package/dist/modules/search/index.d.ts +0 -4
  279. package/dist/modules/search/index.js +0 -23
  280. package/dist/modules/search/models/index.d.ts +0 -1
  281. package/dist/modules/search/search.module-definition.d.ts +0 -5
  282. package/dist/modules/search/search.module-definition.js +0 -8
  283. package/dist/modules/search/search.module.d.ts +0 -33
  284. package/dist/modules/search/search.module.js +0 -62
  285. package/dist/modules/search/search.service.d.ts +0 -49
  286. package/dist/modules/search/search.service.js +0 -120
  287. package/dist/pipes/hub-id.pipe.d.ts +0 -22
  288. package/dist/pipes/hub-resource.pipe.d.ts +0 -22
  289. package/dist/pipes/mongo-id.pipe.d.ts +0 -14
  290. package/dist/pipes/mongo-id.pipe.js +0 -52
  291. package/dist/swagger.config.d.ts +0 -36
  292. package/dist/swagger.config.js +0 -76
  293. /package/dist/modules/{mail/dtos/auth-login-token-mail.dto.js → comment/comment-module-options.interface.js} +0 -0
  294. /package/dist/modules/{mail/dtos/auth-password-reset-mail.dto.js → like/like-module-options.interface.js} +0 -0
  295. /package/dist/modules/{mail/dtos/event-cancel-mail.dto.js → merge/merge-module-options.interface.js} +0 -0
  296. /package/dist/modules/{mail/dtos/event-invite-mail.dto.js → merge/merge.service.interface.js} +0 -0
  297. /package/dist/modules/{mail → services/providers/mail}/dtos/auth-login-token-mail.dto.d.ts +0 -0
  298. /package/dist/modules/{mail/dtos/idea-status-updated-mail.dto.js → services/providers/mail/dtos/auth-login-token-mail.dto.js} +0 -0
  299. /package/dist/modules/{mail → services/providers/mail}/dtos/auth-password-reset-mail.dto.d.ts +0 -0
  300. /package/dist/modules/{mail/dtos/idea-submitted-mail.dto.js → services/providers/mail/dtos/auth-password-reset-mail.dto.js} +0 -0
  301. /package/dist/modules/{mail → services/providers/mail}/dtos/event-cancel-mail.dto.d.ts +0 -0
  302. /package/dist/modules/{mail/dtos/lunch-roulette-cancel-mail.dto.js → services/providers/mail/dtos/event-cancel-mail.dto.js} +0 -0
  303. /package/dist/modules/{mail → services/providers/mail}/dtos/event-invite-mail.dto.d.ts +0 -0
  304. /package/dist/modules/{mail/dtos/lunch-roulette-matched-mail.dto.js → services/providers/mail/dtos/event-invite-mail.dto.js} +0 -0
  305. /package/dist/modules/{mail → services/providers/mail}/dtos/idea-status-updated-mail.dto.d.ts +0 -0
  306. /package/dist/modules/{mail/dtos/lunch-roulette-submitted-mail.dto.js → services/providers/mail/dtos/idea-status-updated-mail.dto.js} +0 -0
  307. /package/dist/modules/{mail → services/providers/mail}/dtos/idea-submitted-mail.dto.d.ts +0 -0
  308. /package/dist/modules/{mail/dtos/lunch-roulette-unmatched-mail.dto.js → services/providers/mail/dtos/idea-submitted-mail.dto.js} +0 -0
  309. /package/dist/modules/{mail → services/providers/mail}/dtos/index.d.ts +0 -0
  310. /package/dist/modules/{mail → services/providers/mail}/dtos/index.js +0 -0
  311. /package/dist/modules/{mail → services/providers/mail}/dtos/lunch-roulette-cancel-mail.dto.d.ts +0 -0
  312. /package/dist/modules/{mail/dtos/newsletter-issue-mail.dto.js → services/providers/mail/dtos/lunch-roulette-cancel-mail.dto.js} +0 -0
  313. /package/dist/modules/{mail → services/providers/mail}/dtos/lunch-roulette-matched-mail.dto.d.ts +0 -0
  314. /package/dist/modules/{mail/dtos/newsletter-subscribed-mail.dto.js → services/providers/mail/dtos/lunch-roulette-matched-mail.dto.js} +0 -0
  315. /package/dist/modules/{mail → services/providers/mail}/dtos/lunch-roulette-submitted-mail.dto.d.ts +0 -0
  316. /package/dist/modules/{mail/dtos/newsletter-unsubscribed-mail.dto.js → services/providers/mail/dtos/lunch-roulette-submitted-mail.dto.js} +0 -0
  317. /package/dist/modules/{mail → services/providers/mail}/dtos/lunch-roulette-unmatched-mail.dto.d.ts +0 -0
  318. /package/dist/modules/{mail/dtos/notification-mail.dto.js → services/providers/mail/dtos/lunch-roulette-unmatched-mail.dto.js} +0 -0
  319. /package/dist/modules/{mail → services/providers/mail}/dtos/newsletter-issue-mail.dto.d.ts +0 -0
  320. /package/dist/modules/{notification/dtos/schedule-notification.dto.js → services/providers/mail/dtos/newsletter-issue-mail.dto.js} +0 -0
  321. /package/dist/modules/{mail → services/providers/mail}/dtos/newsletter-subscribed-mail.dto.d.ts +0 -0
  322. /package/dist/modules/{pass/dtos/create-guild-member-pass.dto.js → services/providers/mail/dtos/newsletter-subscribed-mail.dto.js} +0 -0
  323. /package/dist/modules/{mail → services/providers/mail}/dtos/newsletter-unsubscribed-mail.dto.d.ts +0 -0
  324. /package/dist/modules/{pass/dtos/create-team-member-pass.dto.js → services/providers/mail/dtos/newsletter-unsubscribed-mail.dto.js} +0 -0
  325. /package/dist/modules/{mail → services/providers/mail}/dtos/notification-mail.dto.d.ts +0 -0
  326. /package/dist/modules/{search/dtos/index-search-document.dto.js → services/providers/mail/dtos/notification-mail.dto.js} +0 -0
  327. /package/dist/modules/{mail → services/providers/mail}/models/index.d.ts +0 -0
  328. /package/dist/modules/{mail → services/providers/mail}/models/index.js +0 -0
  329. /package/dist/modules/{mail → services/providers/mail}/models/mail-recipient.model.d.ts +0 -0
  330. /package/dist/modules/{mail → services/providers/mail}/models/mail-recipient.model.js +0 -0
  331. /package/dist/modules/{notification → services/providers/notification}/dtos/index.d.ts +0 -0
  332. /package/dist/modules/{notification → services/providers/notification}/dtos/index.js +0 -0
  333. /package/dist/modules/{notification → services/providers/notification}/dtos/schedule-notification.dto.d.ts +0 -0
  334. /package/dist/modules/{pass → services/providers/pass}/dtos/create-guild-member-pass.dto.d.ts +0 -0
  335. /package/dist/modules/{pass → services/providers/pass}/dtos/create-team-member-pass.dto.d.ts +0 -0
  336. /package/dist/modules/{pass → services/providers/pass}/dtos/index.d.ts +0 -0
  337. /package/dist/modules/{pass → services/providers/pass}/dtos/index.js +0 -0
  338. /package/dist/modules/{search → services/providers/search}/dtos/index-search-document.dto.d.ts +0 -0
  339. /package/dist/modules/{search → services/providers/search}/dtos/index.d.ts +0 -0
  340. /package/dist/modules/{search → services/providers/search}/dtos/index.js +0 -0
  341. /package/dist/{modules/content → properties}/content.property.d.ts +0 -0
  342. /package/dist/{modules/content → properties}/content.property.js +0 -0
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./merge-module-options.interface"), exports);
18
+ __exportStar(require("./merge.module"), exports);
19
+ __exportStar(require("./merge.service.interface"), exports);
@@ -0,0 +1,21 @@
1
+ import { ModuleMetadata, Type } from '@nestjs/common';
2
+ import { MergeModuleService } from './merge.service.interface';
3
+ /**
4
+ * Configuration options for registering a merge module feature.
5
+ */
6
+ export interface MergeModuleOptions {
7
+ /**
8
+ * Custom service class responsible for performing merges.
9
+ * Must implement `MergeModuleService`.
10
+ */
11
+ providerClass: Type<MergeModuleService>;
12
+ /**
13
+ * Optional: other modules required by the merge service.
14
+ */
15
+ imports?: ModuleMetadata['imports'];
16
+ /**
17
+ * Optional: suffix for the route (e.g. "news" → /merge/news).
18
+ * Defaults to just `/merge`.
19
+ */
20
+ routeSuffix?: string;
21
+ }
@@ -0,0 +1,30 @@
1
+ import { InjectionToken } from '@nestjs/common';
2
+ import { MergeModuleService } from './merge.service.interface';
3
+ /**
4
+ * Factory function for creating a MergeController bound to a specific route suffix.
5
+ *
6
+ * Why: Instead of writing separate controllers for each resource type,
7
+ * we generate one dynamically. This ensures DRY principles while still
8
+ * supporting custom routes (e.g. `/merge/news` or `/merge/event`).
9
+ *
10
+ * @param {InjectionToken} serviceToken - Token used for service injection.
11
+ * @param {string} [routeSuffix] - Optional suffix appended to the "merge" route.
12
+ * @returns A dynamically generated controller class.
13
+ */
14
+ export declare function createMergeController(serviceToken: InjectionToken, routeSuffix?: string): {
15
+ new (mergeService: MergeModuleService): {
16
+ readonly mergeService: MergeModuleService;
17
+ /**
18
+ * Merge all references from an old account into a new account.
19
+ *
20
+ * Example:
21
+ * PATCH /merge/news/account/123/456
22
+ * → moves all references from account `123` to account `456`
23
+ *
24
+ * @param {string} oldAccountId - The identifier of the account being replaced.
25
+ * @param {string} newAccountId - The identifier of the account that should own all references.
26
+ * @returns {Promise<void>} - Resolves once the merge operation completes.
27
+ */
28
+ mergeAccount(oldAccountId: string, newAccountId: string): Promise<void>;
29
+ };
30
+ };
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.createMergeController = createMergeController;
16
+ const common_1 = require("@nestjs/common");
17
+ const swagger_1 = require("@nestjs/swagger");
18
+ const pipes_1 = require("../../pipes");
19
+ const authentication_1 = require("../authentication");
20
+ /**
21
+ * Factory function for creating a MergeController bound to a specific route suffix.
22
+ *
23
+ * Why: Instead of writing separate controllers for each resource type,
24
+ * we generate one dynamically. This ensures DRY principles while still
25
+ * supporting custom routes (e.g. `/merge/news` or `/merge/event`).
26
+ *
27
+ * @param {InjectionToken} serviceToken - Token used for service injection.
28
+ * @param {string} [routeSuffix] - Optional suffix appended to the "merge" route.
29
+ * @returns A dynamically generated controller class.
30
+ */
31
+ function createMergeController(serviceToken, routeSuffix) {
32
+ // Normalize route path, removing duplicate/trailing slashes
33
+ const normalizedRoute = `merge/${routeSuffix || ''}`.replace(/\/{2,}/g, '/').replace(/\/$/, '');
34
+ let MergeController = class MergeController {
35
+ constructor(mergeService) {
36
+ this.mergeService = mergeService;
37
+ }
38
+ /**
39
+ * Merge all references from an old account into a new account.
40
+ *
41
+ * Example:
42
+ * PATCH /merge/news/account/123/456
43
+ * → moves all references from account `123` to account `456`
44
+ *
45
+ * @param {string} oldAccountId - The identifier of the account being replaced.
46
+ * @param {string} newAccountId - The identifier of the account that should own all references.
47
+ * @returns {Promise<void>} - Resolves once the merge operation completes.
48
+ */
49
+ async mergeAccount(oldAccountId, newAccountId) {
50
+ await this.mergeService.mergeAccount(oldAccountId, newAccountId);
51
+ }
52
+ };
53
+ __decorate([
54
+ (0, swagger_1.ApiOperation)({
55
+ summary: 'Merge account references',
56
+ description: 'Moves all references from the old account into the new account. ' +
57
+ 'All fields that store account IDs will be updated accordingly.',
58
+ }),
59
+ (0, pipes_1.ApiMongoIdParam)('oldAccountId', 'The ID of the account being replaced.'),
60
+ (0, pipes_1.ApiMongoIdParam)('newAccountId', 'The ID of the account that should own all references.'),
61
+ (0, common_1.Patch)('account/:oldAccountId/:newAccountId'),
62
+ __param(0, (0, pipes_1.MongoIdParam)('oldAccountId')),
63
+ __param(1, (0, pipes_1.MongoIdParam)('newAccountId')),
64
+ __metadata("design:type", Function),
65
+ __metadata("design:paramtypes", [String, String]),
66
+ __metadata("design:returntype", Promise)
67
+ ], MergeController.prototype, "mergeAccount", null);
68
+ MergeController = __decorate([
69
+ (0, authentication_1.RequireServiceAuth)(),
70
+ (0, swagger_1.ApiTags)('Merge'),
71
+ (0, common_1.Controller)(normalizedRoute),
72
+ __param(0, (0, common_1.Inject)(serviceToken)),
73
+ __metadata("design:paramtypes", [Object])
74
+ ], MergeController);
75
+ return MergeController;
76
+ }
@@ -0,0 +1,18 @@
1
+ import { DynamicModule } from '@nestjs/common';
2
+ import { MergeModuleOptions } from './merge-module-options.interface';
3
+ /**
4
+ * NestJS module for registering a merge feature.
5
+ *
6
+ * Use `forFeature()` to register your merge service implementation
7
+ * and any supporting modules. This method dynamically creates and
8
+ * registers a merge controller.
9
+ */
10
+ export declare class MergeModule {
11
+ /**
12
+ * Configure MergeModule with a custom service and supporting modules.
13
+ *
14
+ * @param {MergeModuleOptions} options - Options including service and imports.
15
+ * @returns {DynamicModule} A dynamic module bound to the provided service.
16
+ */
17
+ static forFeature(options: MergeModuleOptions): DynamicModule;
18
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var MergeModule_1;
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.MergeModule = void 0;
11
+ const common_1 = require("@nestjs/common");
12
+ const merge_controller_1 = require("./merge.controller");
13
+ /**
14
+ * NestJS module for registering a merge feature.
15
+ *
16
+ * Use `forFeature()` to register your merge service implementation
17
+ * and any supporting modules. This method dynamically creates and
18
+ * registers a merge controller.
19
+ */
20
+ let MergeModule = MergeModule_1 = class MergeModule {
21
+ /**
22
+ * Configure MergeModule with a custom service and supporting modules.
23
+ *
24
+ * @param {MergeModuleOptions} options - Options including service and imports.
25
+ * @returns {DynamicModule} A dynamic module bound to the provided service.
26
+ */
27
+ static forFeature(options) {
28
+ const serviceToken = Symbol('MERGE_MODULE_SERVICE_TOKEN');
29
+ const MergeController = (0, merge_controller_1.createMergeController)(serviceToken, options.routeSuffix);
30
+ return {
31
+ module: MergeModule_1,
32
+ imports: options.imports,
33
+ providers: [{ provide: serviceToken, useClass: options.providerClass }],
34
+ controllers: [MergeController],
35
+ };
36
+ }
37
+ };
38
+ exports.MergeModule = MergeModule;
39
+ exports.MergeModule = MergeModule = MergeModule_1 = __decorate([
40
+ (0, common_1.Module)({})
41
+ ], MergeModule);
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Defines the contract for a merge service.
3
+ *
4
+ * Any service implementing this interface is expected to:
5
+ * - Transfer all references from one account to another.
6
+ * - Ensure that all account ID fields are updated.
7
+ */
8
+ export interface MergeModuleService {
9
+ /**
10
+ * Merge all references from the old account into the new account.
11
+ *
12
+ * @param {string} oldAccountId - The identifier of the account being replaced.
13
+ * @param {string} newAccountId - The identifier of the account that should own all references.
14
+ * @returns {Promise<void>} Resolves when the merge operation is complete.
15
+ */
16
+ mergeAccount(oldAccountId: string, newAccountId: string): Promise<void>;
17
+ }
@@ -0,0 +1,83 @@
1
+ import { Logger } from '@nestjs/common';
2
+ import { ConfigService } from '@nestjs/config';
3
+ import { AxiosInstance, AxiosRequestConfig } from 'axios';
4
+ import { AuthenticationModuleOptions } from '../authentication';
5
+ import { InternalExternalUrl } from './base-urls';
6
+ /**
7
+ * BaseHttpService
8
+ *
9
+ * A strongly typed, structured wrapper around Axios that standardizes outbound HTTP calls.
10
+ *
11
+ * Core Responsibilities:
12
+ * - Dynamically resolves internal vs external base URLs depending on environment.
13
+ * - Injects Kubernetes service authentication tokens into every request.
14
+ * - Adds structured logging for visibility into outbound traffic.
15
+ *
16
+ * Why use composition over inheritance with Axios?
17
+ * - Axios is both callable and constructable, leading to TypeScript conflicts when extended.
18
+ * - Wrapping avoids prototype traps, giving us full control over configuration and flow.
19
+ */
20
+ export declare abstract class BaseHttpService {
21
+ private readonly serviceName;
22
+ private readonly baseUrls;
23
+ private readonly authenticationOptions;
24
+ private readonly configService;
25
+ readonly client: AxiosInstance;
26
+ protected readonly logger: Logger;
27
+ protected readonly isProduction: boolean;
28
+ /**
29
+ * Initializes a new HTTP service client tied to a specific downstream service.
30
+ *
31
+ * @param {string} serviceName - Identifier used for contextual logging (e.g., `"Comments"`).
32
+ * @param {InternalExternalUrl} baseUrls - A tuple `[internalUrl, externalUrl]`. Production prefers internal.
33
+ * @param {AuthenticationModuleOptions} authenticationOptions - Authentication configuration containing Kubernetes token.
34
+ * @param {ConfigService} configService - NestJS config service used to resolve runtime environment.
35
+ */
36
+ constructor(serviceName: string, baseUrls: InternalExternalUrl, authenticationOptions: AuthenticationModuleOptions, configService: ConfigService);
37
+ /**
38
+ * Normalizes Axios error responses into a consistent object.
39
+ * Ensures structured error handling regardless of the downstream service implementation.
40
+ *
41
+ * @param {any} error - Raw Axios error object.
42
+ * @returns {{ status: number; data: string | Record<string, any>; message: string }}
43
+ */
44
+ protected parseError(error: any): {
45
+ status: number;
46
+ data: string | Record<string, any>;
47
+ message: string;
48
+ };
49
+ /**
50
+ * Fetches a single resource from the downstream service.
51
+ *
52
+ * This is a safe wrapper around Axios `.get` that:
53
+ * - Allows request customization through an optional `config`.
54
+ * - Logs request failures with contextual detail for easier troubleshooting.
55
+ * - Returns `undefined` instead of throwing, enabling graceful fallbacks in callers.
56
+ *
57
+ * @template T
58
+ * @param {string} endpoint - The relative endpoint to request from the downstream service.
59
+ * @param {AxiosRequestConfig} [config={}] - Optional Axios request configuration.
60
+ * Use this to pass custom headers, query parameters, authentication tokens,
61
+ * or override default client behavior for this specific request.
62
+ * @returns {Promise<T | undefined>} A promise resolving to the resource of type `T`,
63
+ * or `undefined` if the request fails.
64
+ */
65
+ protected fetchResource<T>(endpoint: string, config?: AxiosRequestConfig): Promise<T | undefined>;
66
+ /**
67
+ * Fetches a collection of resources from the downstream service.
68
+ *
69
+ * This is a safe wrapper around Axios `.get` that:
70
+ * - Allows request customization through an optional `config`.
71
+ * - Logs request failures with contextual detail for easier troubleshooting.
72
+ * - Returns `undefined` instead of throwing, enabling graceful fallbacks in callers.
73
+ *
74
+ * @template T
75
+ * @param {string} endpoint - The relative endpoint to request from the downstream service.
76
+ * @param {AxiosRequestConfig} [config={}] - Optional Axios request configuration.
77
+ * Use this to pass custom headers, query parameters, authentication tokens,
78
+ * or override default client behavior for this specific request.
79
+ * @returns {Promise<T[]>} A promise resolving to an array of resources of type `T`,
80
+ * or an empty array if the request fails.
81
+ */
82
+ protected fetchResourceCollection<T>(endpoint: string, config?: AxiosRequestConfig): Promise<T[]>;
83
+ }
@@ -0,0 +1,124 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.BaseHttpService = void 0;
7
+ const common_1 = require("@nestjs/common");
8
+ const axios_1 = __importDefault(require("axios"));
9
+ const class_validator_1 = require("class-validator");
10
+ const service_auth_guard_1 = require("../authentication/guards/service-auth.guard");
11
+ /**
12
+ * BaseHttpService
13
+ *
14
+ * A strongly typed, structured wrapper around Axios that standardizes outbound HTTP calls.
15
+ *
16
+ * Core Responsibilities:
17
+ * - Dynamically resolves internal vs external base URLs depending on environment.
18
+ * - Injects Kubernetes service authentication tokens into every request.
19
+ * - Adds structured logging for visibility into outbound traffic.
20
+ *
21
+ * Why use composition over inheritance with Axios?
22
+ * - Axios is both callable and constructable, leading to TypeScript conflicts when extended.
23
+ * - Wrapping avoids prototype traps, giving us full control over configuration and flow.
24
+ */
25
+ class BaseHttpService {
26
+ /**
27
+ * Initializes a new HTTP service client tied to a specific downstream service.
28
+ *
29
+ * @param {string} serviceName - Identifier used for contextual logging (e.g., `"Comments"`).
30
+ * @param {InternalExternalUrl} baseUrls - A tuple `[internalUrl, externalUrl]`. Production prefers internal.
31
+ * @param {AuthenticationModuleOptions} authenticationOptions - Authentication configuration containing Kubernetes token.
32
+ * @param {ConfigService} configService - NestJS config service used to resolve runtime environment.
33
+ */
34
+ constructor(serviceName, baseUrls, authenticationOptions, configService) {
35
+ this.serviceName = serviceName;
36
+ this.baseUrls = baseUrls;
37
+ this.authenticationOptions = authenticationOptions;
38
+ this.configService = configService;
39
+ this.logger = new common_1.Logger(`${this.serviceName}Service`);
40
+ this.isProduction = this.configService.get('NODE_ENV') === 'production';
41
+ // Create a scoped Axios instance bound to the appropriate base URL.
42
+ this.client = axios_1.default.create({
43
+ baseURL: this.baseUrls[this.isProduction ? 0 : 1],
44
+ headers: {
45
+ // Always include internal Kubernetes token for downstream service authentication.
46
+ [service_auth_guard_1.SERVICE_AUTH_HEADER_KEY]: this.authenticationOptions.k8sToken,
47
+ },
48
+ });
49
+ // Attach request interceptor for consistent logging of all outgoing requests.
50
+ this.client.interceptors.request.use((config) => {
51
+ var _a;
52
+ this.logger.log(`[${(_a = config.method) === null || _a === void 0 ? void 0 : _a.toUpperCase()}] ${config.url}`);
53
+ return config;
54
+ });
55
+ }
56
+ /**
57
+ * Normalizes Axios error responses into a consistent object.
58
+ * Ensures structured error handling regardless of the downstream service implementation.
59
+ *
60
+ * @param {any} error - Raw Axios error object.
61
+ * @returns {{ status: number; data: string | Record<string, any>; message: string }}
62
+ */
63
+ parseError(error) {
64
+ var _a, _b;
65
+ const status = ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.status) || 500;
66
+ const data = ((_b = error === null || error === void 0 ? void 0 : error.response) === null || _b === void 0 ? void 0 : _b.data) || 'Internal server error';
67
+ return { status, data, message: (0, class_validator_1.isObject)(data) ? JSON.stringify(data) : String(data) };
68
+ }
69
+ /**
70
+ * Fetches a single resource from the downstream service.
71
+ *
72
+ * This is a safe wrapper around Axios `.get` that:
73
+ * - Allows request customization through an optional `config`.
74
+ * - Logs request failures with contextual detail for easier troubleshooting.
75
+ * - Returns `undefined` instead of throwing, enabling graceful fallbacks in callers.
76
+ *
77
+ * @template T
78
+ * @param {string} endpoint - The relative endpoint to request from the downstream service.
79
+ * @param {AxiosRequestConfig} [config={}] - Optional Axios request configuration.
80
+ * Use this to pass custom headers, query parameters, authentication tokens,
81
+ * or override default client behavior for this specific request.
82
+ * @returns {Promise<T | undefined>} A promise resolving to the resource of type `T`,
83
+ * or `undefined` if the request fails.
84
+ */
85
+ async fetchResource(endpoint, config = {}) {
86
+ try {
87
+ const response = await this.client.get(endpoint, config);
88
+ return response.data;
89
+ }
90
+ catch (error) {
91
+ const { message } = this.parseError(error);
92
+ this.logger.error(`Failed to fetch resource at endpoint "${endpoint}": ${message}. Config: ${JSON.stringify(config)}`);
93
+ return undefined;
94
+ }
95
+ }
96
+ /**
97
+ * Fetches a collection of resources from the downstream service.
98
+ *
99
+ * This is a safe wrapper around Axios `.get` that:
100
+ * - Allows request customization through an optional `config`.
101
+ * - Logs request failures with contextual detail for easier troubleshooting.
102
+ * - Returns `undefined` instead of throwing, enabling graceful fallbacks in callers.
103
+ *
104
+ * @template T
105
+ * @param {string} endpoint - The relative endpoint to request from the downstream service.
106
+ * @param {AxiosRequestConfig} [config={}] - Optional Axios request configuration.
107
+ * Use this to pass custom headers, query parameters, authentication tokens,
108
+ * or override default client behavior for this specific request.
109
+ * @returns {Promise<T[]>} A promise resolving to an array of resources of type `T`,
110
+ * or an empty array if the request fails.
111
+ */
112
+ async fetchResourceCollection(endpoint, config = {}) {
113
+ try {
114
+ const response = await this.client.get(endpoint, config);
115
+ return response.data;
116
+ }
117
+ catch (error) {
118
+ const { message } = this.parseError(error);
119
+ this.logger.error(`Failed to fetch resource collection at endpoint "${endpoint}": ${message}. Config: ${JSON.stringify(config)}`);
120
+ return [];
121
+ }
122
+ }
123
+ }
124
+ exports.BaseHttpService = BaseHttpService;
@@ -0,0 +1,22 @@
1
+ export type InternalExternalUrl = [internalUrl: string, externalUrl: string];
2
+ export declare class BaseUrls {
3
+ static get NewsroomService(): InternalExternalUrl;
4
+ static get EventsService(): InternalExternalUrl;
5
+ static get HackschoolService(): InternalExternalUrl;
6
+ static get DemoHiveService(): InternalExternalUrl;
7
+ static get TechRadarService(): InternalExternalUrl;
8
+ static get PodcastsService(): InternalExternalUrl;
9
+ static get BooksService(): InternalExternalUrl;
10
+ static get TeamService(): InternalExternalUrl;
11
+ static get NewsletterService(): InternalExternalUrl;
12
+ static get IdeasService(): InternalExternalUrl;
13
+ static get LunchRouletteService(): InternalExternalUrl;
14
+ static get AccountsService(): InternalExternalUrl;
15
+ static get CommentsService(): InternalExternalUrl;
16
+ static get NotificationService(): InternalExternalUrl;
17
+ static get MailService(): InternalExternalUrl;
18
+ static get SearchService(): InternalExternalUrl;
19
+ static get ChangelogService(): InternalExternalUrl;
20
+ static get PassService(): InternalExternalUrl;
21
+ static get ContentService(): InternalExternalUrl;
22
+ }
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BaseUrls = void 0;
4
+ class BaseUrls {
5
+ static get NewsroomService() {
6
+ return [
7
+ 'http://organisation-hub-newsroom-backend.organisation-hub-services.svc.cluster.local:3000/',
8
+ 'https://services.svi-itlab.com/newsroom/',
9
+ ];
10
+ }
11
+ static get EventsService() {
12
+ return [
13
+ 'http://organisation-hub-events-backend.organisation-hub-services.svc.cluster.local:3000/',
14
+ 'https://services.svi-itlab.com/events/',
15
+ ];
16
+ }
17
+ static get HackschoolService() {
18
+ return [
19
+ 'http://organisation-hub-hackschool-backend.organisation-hub-services.svc.cluster.local:3000/',
20
+ 'https://services.svi-itlab.com/hackschool/',
21
+ ];
22
+ }
23
+ static get DemoHiveService() {
24
+ return [
25
+ 'http://organisation-hub-demo-hive-backend.organisation-hub-services.svc.cluster.local:3000/',
26
+ 'https://services.svi-itlab.com/demo-hive/',
27
+ ];
28
+ }
29
+ static get TechRadarService() {
30
+ return [
31
+ 'http://organisation-hub-tech-radar-backend.organisation-hub-services.svc.cluster.local:3000/',
32
+ 'https://services.svi-itlab.com/tech-radar/',
33
+ ];
34
+ }
35
+ static get PodcastsService() {
36
+ return [
37
+ 'http://organisation-hub-podcasts-backend.organisation-hub-services.svc.cluster.local:3000/',
38
+ 'https://services.svi-itlab.com/podcasts/',
39
+ ];
40
+ }
41
+ static get BooksService() {
42
+ return [
43
+ 'http://organisation-hub-books-backend.organisation-hub-services.svc.cluster.local:3000/',
44
+ 'https://services.svi-itlab.com/books/',
45
+ ];
46
+ }
47
+ static get TeamService() {
48
+ return [
49
+ 'http://organisation-hub-team-backend.organisation-hub-services.svc.cluster.local:3000/',
50
+ 'https://services.svi-itlab.com/team/',
51
+ ];
52
+ }
53
+ static get NewsletterService() {
54
+ return [
55
+ 'http://organisation-hub-newsletter-backend.organisation-hub-services.svc.cluster.local:3000/',
56
+ 'https://services.svi-itlab.com/newsletter/',
57
+ ];
58
+ }
59
+ static get IdeasService() {
60
+ return [
61
+ 'http://organisation-hub-ideas-service.organisation-hub-services.svc.cluster.local:3000/',
62
+ 'https://services.svi-itlab.com/ideas/',
63
+ ];
64
+ }
65
+ static get LunchRouletteService() {
66
+ return [
67
+ 'http://project-lunch-roulette-backend.project-lunch-roulette.svc.cluster.local:3000/',
68
+ 'https://services.svi-itlab.com/lunch-roulette/',
69
+ ];
70
+ }
71
+ // Utils
72
+ static get AccountsService() {
73
+ return [
74
+ 'http://organisation-hub-accounts-service.organisation-hub-services.svc.cluster.local:3000/',
75
+ 'https://services.svi-itlab.com/accounts/',
76
+ ];
77
+ }
78
+ static get CommentsService() {
79
+ return [
80
+ 'http://organisation-hub-comments-service.organisation-hub-services.svc.cluster.local:3000/',
81
+ 'https://services.svi-itlab.com/comments/',
82
+ ];
83
+ }
84
+ static get NotificationService() {
85
+ return [
86
+ 'http://organisation-hub-notifications-service.organisation-hub-services.svc.cluster.local:3000/',
87
+ 'https://services.svi-itlab.com/notifications/',
88
+ ];
89
+ }
90
+ static get MailService() {
91
+ return [
92
+ 'http://organisation-hub-email-service.organisation-hub-services.svc.cluster.local:3000/',
93
+ 'https://services.svi-itlab.com/email/',
94
+ ];
95
+ }
96
+ static get SearchService() {
97
+ return [
98
+ 'http://organisation-hub-search-service.organisation-hub-services.svc.cluster.local:3000/',
99
+ 'https://services.svi-itlab.com/search/',
100
+ ];
101
+ }
102
+ static get ChangelogService() {
103
+ return [
104
+ 'http://organisation-hub-changelog-service.organisation-hub-services.svc.cluster.local:3000/',
105
+ 'https://services.svi-itlab.com/changelog/',
106
+ ];
107
+ }
108
+ static get PassService() {
109
+ return [
110
+ 'http://organisation-hub-pass-service.organisation-hub-services.svc.cluster.local:3000/',
111
+ 'https://services.svi-itlab.com/pass/',
112
+ ];
113
+ }
114
+ static get ContentService() {
115
+ return [
116
+ 'http://organisation-hub-content-service.organisation-hub-services.svc.cluster.local:3000/',
117
+ 'https://services.svi-itlab.com/content/',
118
+ ];
119
+ }
120
+ }
121
+ exports.BaseUrls = BaseUrls;
@@ -0,0 +1,4 @@
1
+ export * from './services-module-options.interface';
2
+ export * from './services-options.parameter';
3
+ export * from './services.module';
4
+ export * from './providers';
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./services-module-options.interface"), exports);
18
+ __exportStar(require("./services-options.parameter"), exports);
19
+ __exportStar(require("./services.module"), exports);
20
+ __exportStar(require("./providers"), exports);
@@ -0,0 +1,52 @@
1
+ import { ConfigService } from '@nestjs/config';
2
+ import { Account, User } from '../../../models';
3
+ import { AuthenticationModuleOptions } from '../../authentication';
4
+ import { BaseHttpService } from '../base-http.service';
5
+ /**
6
+ * AccountsService
7
+ *
8
+ * Service client for interacting with the Accounts domain.
9
+ * Inherits logging, authentication, and environment-sensitive URL resolution from `BaseHttpService`.
10
+ */
11
+ export declare class AccountsService extends BaseHttpService {
12
+ /**
13
+ * Constructs a Accounts service client.
14
+ *
15
+ * @param {AuthenticationModuleOptions} authenticationOptions - Authentication options (provided by DI).
16
+ * @param {ConfigService} configService - Global NestJS config service for environment detection.
17
+ */
18
+ constructor(authenticationOptions: AuthenticationModuleOptions, configService: ConfigService);
19
+ /**
20
+ * Retrieves a single account entry by its MongoDB identifier.
21
+ *
22
+ * If the downstream call fails or the resource does not exist, the method
23
+ * will log the failure and return `undefined`.
24
+ *
25
+ * @param {string} accountId - Unique MongoDB identifier of the account item.
26
+ * @returns {Promise<Account | undefined>} Resolves to the account object if found, otherwise `undefined`.
27
+ */
28
+ getAccount(accountId: string): Promise<Account | undefined>;
29
+ /**
30
+ * Retrieves a collection of account entries by their MongoDB identifiers.
31
+ *
32
+ * If the downstream call fails, an empty array is returned.
33
+ *
34
+ * @param {string[]} accountIds - Array of MongoDB identifiers for the account items.
35
+ * @returns {Promise<Account[]>} Resolves to an array of account objects (empty if none found).
36
+ */
37
+ getAccountCollection(accountIds: string[]): Promise<Account[]>;
38
+ /**
39
+ * Retrieves a single user entry derived from an account.
40
+ *
41
+ * @param {string} userId - Unique identifier of the user (mapped from account ID).
42
+ * @returns {Promise<User | undefined>} Resolves to the user object if found, otherwise `undefined`.
43
+ */
44
+ getUser(userId: string): Promise<User | undefined>;
45
+ /**
46
+ * Retrieves multiple users in a single request.
47
+ *
48
+ * @param {string[]} userIds - Array of user identifiers (mapped from account IDs).
49
+ * @returns {Promise<User[]>} Resolves to a list of users (empty array if none found).
50
+ */
51
+ getUserCollection(userIds: string[]): Promise<User[]>;
52
+ }