itlab-internal-services 2.16.8 → 2.16.10

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 (233) hide show
  1. package/dist/classes/document/likeable-document.class.d.ts +2 -2
  2. package/dist/classes/document/likeable-document.class.js +6 -3
  3. package/dist/classes/document/viewable-document.class.d.ts +2 -2
  4. package/dist/classes/document/viewable-document.class.js +6 -3
  5. package/dist/classes/entity-map.class.d.ts +1 -1
  6. package/dist/classes/entity-map.class.js +2 -0
  7. package/dist/classes/fetch-options/base-options.class.d.ts +9 -0
  8. package/dist/classes/fetch-options/comments-options.class.d.ts +3 -0
  9. package/dist/classes/fetch-options/comments-options.class.js +1 -1
  10. package/dist/classes/fetch-options/content-options.class.d.ts +3 -0
  11. package/dist/classes/fetch-options/content-options.class.js +1 -1
  12. package/dist/classes/fetch-options/drafted-options.class.d.ts +5 -1
  13. package/dist/classes/fetch-options/drafted-options.class.js +3 -2
  14. package/dist/classes/fetch-options/liked-by-options.class.d.ts +4 -0
  15. package/dist/classes/fetch-options/liked-by-options.class.js +3 -2
  16. package/dist/classes/fetch-options/timestamps-options.class.d.ts +4 -1
  17. package/dist/classes/fetch-options/timestamps-options.class.js +1 -1
  18. package/dist/classes/fetch-options/viewed-by-options.class.d.ts +7 -2
  19. package/dist/classes/fetch-options/viewed-by-options.class.js +15 -4
  20. package/dist/hub-resource.enum.d.ts +10 -10
  21. package/dist/hub-resource.enum.js +16 -16
  22. package/dist/modules/comments/comments.controller.js +1 -1
  23. package/dist/modules/comments/comments.service.d.ts +5 -5
  24. package/dist/modules/comments/comments.service.js +21 -13
  25. package/dist/modules/like/like.service.d.ts +1 -1
  26. package/dist/modules/like/like.service.js +7 -7
  27. package/dist/modules/merge/merge-module-options.interface.d.ts +2 -2
  28. package/dist/modules/merge/merge.controller.d.ts +3 -3
  29. package/dist/modules/merge/merge.service.interface.d.ts +1 -1
  30. package/dist/modules/services/base-http.service.d.ts +44 -40
  31. package/dist/modules/services/base-http.service.js +72 -47
  32. package/dist/modules/services/base-urls.d.ts +22 -19
  33. package/dist/modules/services/base-urls.js +38 -19
  34. package/dist/modules/services/providers/accounts/accounts.service.d.ts +99 -0
  35. package/dist/modules/services/providers/accounts/accounts.service.js +154 -0
  36. package/dist/modules/services/providers/accounts/fetch-account-options.dto.v1.type.d.ts +29 -0
  37. package/dist/modules/services/providers/accounts/index.d.ts +2 -0
  38. package/dist/modules/services/providers/accounts/index.js +18 -0
  39. package/dist/modules/services/providers/books/books.service.d.ts +49 -0
  40. package/dist/modules/services/providers/books/books.service.js +79 -0
  41. package/dist/modules/services/providers/books/fetch-book-options.dto.v1.type.d.ts +27 -0
  42. package/dist/modules/services/providers/books/index.d.ts +2 -0
  43. package/dist/modules/services/providers/{notification → books}/index.js +2 -2
  44. package/dist/modules/services/providers/changelog/changelog.service.d.ts +62 -0
  45. package/dist/modules/services/providers/changelog/changelog.service.js +79 -0
  46. package/dist/modules/services/providers/changelog/fetch-change-options.dto.v1.type.d.ts +15 -0
  47. package/dist/modules/services/providers/changelog/index.d.ts +2 -0
  48. package/dist/modules/services/providers/changelog/index.js +18 -0
  49. package/dist/modules/services/providers/conflicts/conflicts.service.d.ts +59 -0
  50. package/dist/modules/services/providers/conflicts/conflicts.service.js +79 -0
  51. package/dist/modules/services/providers/conflicts/fetch-conflict-options.dto.v1.type.d.ts +18 -0
  52. package/dist/modules/services/providers/conflicts/index.d.ts +2 -0
  53. package/dist/modules/services/providers/conflicts/index.js +18 -0
  54. package/dist/modules/services/providers/content/content-return-types.d.ts +3 -2
  55. package/dist/modules/services/providers/content/content-return-types.js +8 -2
  56. package/dist/modules/services/providers/content/content.service.d.ts +49 -7
  57. package/dist/modules/services/providers/content/content.service.js +61 -19
  58. package/dist/modules/services/providers/content/fetch-content-options.dto.v1.type.d.ts +15 -0
  59. package/dist/modules/services/providers/content/index.d.ts +1 -0
  60. package/dist/modules/services/providers/content/index.js +1 -0
  61. package/dist/modules/services/providers/demo-hive/demo-hive.service.d.ts +49 -0
  62. package/dist/modules/services/providers/demo-hive/demo-hive.service.js +79 -0
  63. package/dist/modules/services/providers/demo-hive/fetch-demo-options.dto.v1.type.d.ts +16 -0
  64. package/dist/modules/services/providers/demo-hive/index.d.ts +2 -0
  65. package/dist/modules/services/providers/demo-hive/index.js +18 -0
  66. package/dist/modules/services/providers/events/events.service.d.ts +49 -0
  67. package/dist/modules/services/providers/events/events.service.js +79 -0
  68. package/dist/modules/services/providers/events/fetch-event-options.dto.v1.type.d.ts +27 -0
  69. package/dist/modules/services/providers/events/index.d.ts +2 -0
  70. package/dist/modules/services/providers/events/index.js +18 -0
  71. package/dist/modules/services/providers/files/crop-image-options.dto.v1.type.d.ts +13 -0
  72. package/dist/modules/services/providers/files/fetch-file-options.dto.v1.type.d.ts +21 -0
  73. package/dist/modules/services/providers/files/fetch-folder-options.dto.v1.type.d.ts +15 -0
  74. package/dist/modules/services/providers/files/files.service.d.ts +106 -0
  75. package/dist/modules/services/providers/files/files.service.js +146 -0
  76. package/dist/modules/services/providers/files/index.d.ts +4 -0
  77. package/dist/modules/services/providers/files/index.js +20 -0
  78. package/dist/modules/services/providers/hackschool/fetch-course-options.dto.v1.type.d.ts +15 -0
  79. package/dist/modules/services/providers/hackschool/fetch-doc-options.dto.v1.type.d.ts +17 -0
  80. package/dist/modules/services/providers/hackschool/fetch-thread-options.dto.v1.type.d.ts +18 -0
  81. package/dist/modules/services/providers/hackschool/hackschool.service.d.ts +93 -0
  82. package/dist/modules/services/providers/hackschool/hackschool.service.js +135 -0
  83. package/dist/modules/services/providers/hackschool/index.d.ts +2 -0
  84. package/dist/modules/services/providers/hackschool/index.js +18 -0
  85. package/dist/modules/services/providers/ideas.service.js +1 -1
  86. package/dist/modules/services/providers/index.d.ts +15 -12
  87. package/dist/modules/services/providers/index.js +17 -12
  88. package/dist/modules/services/providers/lunch-roulette.service.js +1 -1
  89. package/dist/modules/services/providers/mail/dtos/{auth-login-token-mail.dto.d.ts → auth-login-token-mail.dto.v1.d.ts} +1 -1
  90. package/dist/modules/services/providers/mail/dtos/{auth-password-reset-mail.dto.d.ts → auth-password-reset-mail.dto.v1.d.ts} +1 -1
  91. package/dist/modules/services/providers/mail/dtos/{event-cancel-mail.dto.d.ts → event-cancel-mail.dto.v1.d.ts} +1 -1
  92. package/dist/modules/services/providers/mail/dtos/{event-invite-mail.dto.d.ts → event-invite-mail.dto.v1.d.ts} +1 -1
  93. package/dist/modules/services/providers/mail/dtos/{idea-status-updated-mail.dto.d.ts → idea-status-updated-mail.dto.v1.d.ts} +1 -1
  94. package/dist/modules/services/providers/mail/dtos/{idea-submitted-mail.dto.d.ts → idea-submitted-mail.dto.v1.d.ts} +1 -1
  95. package/dist/modules/services/providers/mail/dtos/idea-submitted-mail.dto.v1.js +2 -0
  96. package/dist/modules/services/providers/mail/dtos/index.d.ts +14 -14
  97. package/dist/modules/services/providers/mail/dtos/index.js +14 -14
  98. package/dist/modules/services/providers/mail/dtos/{lunch-roulette-cancel-mail.dto.d.ts → lunch-roulette-cancel-mail.dto.v1.d.ts} +1 -1
  99. package/dist/modules/services/providers/mail/dtos/lunch-roulette-cancel-mail.dto.v1.js +2 -0
  100. package/dist/modules/services/providers/mail/dtos/{lunch-roulette-matched-mail.dto.d.ts → lunch-roulette-matched-mail.dto.v1.d.ts} +1 -1
  101. package/dist/modules/services/providers/mail/dtos/lunch-roulette-matched-mail.dto.v1.js +2 -0
  102. package/dist/modules/services/providers/mail/dtos/{lunch-roulette-submitted-mail.dto.d.ts → lunch-roulette-submitted-mail.dto.v1.d.ts} +1 -1
  103. package/dist/modules/services/providers/mail/dtos/lunch-roulette-submitted-mail.dto.v1.js +2 -0
  104. package/dist/modules/services/providers/mail/dtos/{lunch-roulette-unmatched-mail.dto.d.ts → lunch-roulette-unmatched-mail.dto.v1.d.ts} +1 -1
  105. package/dist/modules/services/providers/mail/dtos/lunch-roulette-unmatched-mail.dto.v1.js +2 -0
  106. package/dist/modules/services/providers/mail/dtos/{newsletter-issue-mail.dto.d.ts → newsletter-issue-mail.dto.v1.d.ts} +1 -1
  107. package/dist/modules/services/providers/mail/dtos/newsletter-issue-mail.dto.v1.js +2 -0
  108. package/dist/modules/services/providers/mail/dtos/{newsletter-subscribed-mail.dto.d.ts → newsletter-subscribed-mail.dto.v1.d.ts} +1 -1
  109. package/dist/modules/services/providers/mail/dtos/newsletter-subscribed-mail.dto.v1.js +2 -0
  110. package/dist/modules/services/providers/mail/dtos/{newsletter-unsubscribed-mail.dto.d.ts → newsletter-unsubscribed-mail.dto.v1.d.ts} +1 -1
  111. package/dist/modules/services/providers/mail/dtos/newsletter-unsubscribed-mail.dto.v1.js +2 -0
  112. package/dist/modules/services/providers/mail/dtos/{notification-mail.dto.d.ts → notification-mail.dto.v1.d.ts} +1 -1
  113. package/dist/modules/services/providers/mail/dtos/notification-mail.dto.v1.js +2 -0
  114. package/dist/modules/services/providers/mail/mail-types.d.ts +17 -16
  115. package/dist/modules/services/providers/mail/mail-types.js +31 -14
  116. package/dist/modules/services/providers/mail/mail.service.d.ts +30 -31
  117. package/dist/modules/services/providers/mail/mail.service.js +49 -50
  118. package/dist/modules/services/providers/mail/models/mail-recipient.model.d.ts +2 -0
  119. package/dist/modules/services/providers/mail/models/mail-recipient.model.js +3 -0
  120. package/dist/modules/services/providers/newsletter/fetch-issue-options.dto.v1.type.d.ts +16 -0
  121. package/dist/modules/services/providers/newsletter/fetch-issue-options.dto.v1.type.js +2 -0
  122. package/dist/modules/services/providers/newsletter/index.d.ts +2 -0
  123. package/dist/modules/services/providers/newsletter/index.js +18 -0
  124. package/dist/modules/services/providers/newsletter/newsletter.service.d.ts +49 -0
  125. package/dist/modules/services/providers/newsletter/newsletter.service.js +79 -0
  126. package/dist/modules/services/providers/newsroom/fetch-news-options.dto.v1.type.d.ts +20 -0
  127. package/dist/modules/services/providers/newsroom/fetch-news-options.dto.v1.type.js +2 -0
  128. package/dist/modules/services/providers/newsroom/index.d.ts +2 -0
  129. package/dist/modules/services/providers/newsroom/index.js +18 -0
  130. package/dist/modules/services/providers/newsroom/newsroom.service.d.ts +49 -0
  131. package/dist/modules/services/providers/newsroom/newsroom.service.js +79 -0
  132. package/dist/modules/services/providers/notifications/dtos/index.d.ts +1 -0
  133. package/dist/modules/services/providers/{notification → notifications}/dtos/index.js +1 -1
  134. package/dist/modules/services/providers/{notification/dtos/schedule-notification.dto.d.ts → notifications/dtos/schedule-notification.dto.v1.d.ts} +2 -10
  135. package/dist/modules/services/providers/notifications/dtos/schedule-notification.dto.v1.js +2 -0
  136. package/dist/modules/services/providers/notifications/fetch-notification-options.dto.v1.type.d.ts +19 -0
  137. package/dist/modules/services/providers/notifications/fetch-notification-options.dto.v1.type.js +2 -0
  138. package/dist/modules/services/providers/notifications/index.d.ts +3 -0
  139. package/dist/modules/services/providers/notifications/index.js +19 -0
  140. package/dist/modules/services/providers/notifications/notifications.service-definition.d.ts +1 -0
  141. package/dist/modules/services/providers/notifications/notifications.service-definition.js +4 -0
  142. package/dist/modules/services/providers/{notification/notification.service.d.ts → notifications/notifications.service.d.ts} +41 -5
  143. package/dist/modules/services/providers/{notification/notification.service.js → notifications/notifications.service.js} +52 -26
  144. package/dist/modules/services/providers/pass/dtos/{create-guild-member-pass.dto.d.ts → create-guild-member-pass.dto.v1.d.ts} +2 -2
  145. package/dist/modules/services/providers/pass/dtos/create-guild-member-pass.dto.v1.js +2 -0
  146. package/dist/modules/services/providers/pass/dtos/{create-team-member-pass.dto.d.ts → create-team-member-pass.dto.v1.d.ts} +2 -2
  147. package/dist/modules/services/providers/pass/dtos/create-team-member-pass.dto.v1.js +2 -0
  148. package/dist/modules/services/providers/pass/dtos/index.d.ts +2 -2
  149. package/dist/modules/services/providers/pass/dtos/index.js +2 -2
  150. package/dist/modules/services/providers/pass/pass-types.d.ts +3 -3
  151. package/dist/modules/services/providers/pass/pass.service.d.ts +14 -14
  152. package/dist/modules/services/providers/pass/pass.service.js +28 -28
  153. package/dist/modules/services/providers/podcasts/fetch-episode-options.dto.v1.type.d.ts +19 -0
  154. package/dist/modules/services/providers/podcasts/fetch-episode-options.dto.v1.type.js +2 -0
  155. package/dist/modules/services/providers/podcasts/index.d.ts +2 -0
  156. package/dist/modules/services/providers/podcasts/index.js +18 -0
  157. package/dist/modules/services/providers/podcasts/podcasts.service.d.ts +49 -0
  158. package/dist/modules/services/providers/podcasts/podcasts.service.js +79 -0
  159. package/dist/modules/services/providers/quick-links/fetch-link-options.dto.v1.type.d.ts +14 -0
  160. package/dist/modules/services/providers/quick-links/fetch-link-options.dto.v1.type.js +2 -0
  161. package/dist/modules/services/providers/quick-links/index.d.ts +2 -0
  162. package/dist/modules/services/providers/quick-links/index.js +18 -0
  163. package/dist/modules/services/providers/quick-links/quick-links.service.d.ts +61 -0
  164. package/dist/modules/services/providers/quick-links/quick-links.service.js +79 -0
  165. package/dist/modules/services/providers/search/dtos/{index-search-document.dto.d.ts → index-document.dto.v1.d.ts} +2 -2
  166. package/dist/modules/services/providers/search/dtos/index-document.dto.v1.js +2 -0
  167. package/dist/modules/services/providers/search/dtos/index.d.ts +1 -1
  168. package/dist/modules/services/providers/search/dtos/index.js +1 -1
  169. package/dist/modules/services/providers/search/search.service.d.ts +6 -6
  170. package/dist/modules/services/providers/search/search.service.js +14 -17
  171. package/dist/modules/services/providers/team/fetch-member-options.dto.v1.type.d.ts +11 -0
  172. package/dist/modules/services/providers/team/fetch-member-options.dto.v1.type.js +2 -0
  173. package/dist/modules/services/providers/team/index.d.ts +2 -0
  174. package/dist/modules/services/providers/team/index.js +18 -0
  175. package/dist/modules/services/providers/team/team.service.d.ts +49 -0
  176. package/dist/modules/services/providers/team/team.service.js +79 -0
  177. package/dist/modules/services/providers/tech-radar/fetch-blip-options.dto.v1.type.d.ts +19 -0
  178. package/dist/modules/services/providers/tech-radar/fetch-blip-options.dto.v1.type.js +2 -0
  179. package/dist/modules/services/providers/tech-radar/fetch-edition-options.dto.v1.type copy.d.ts +15 -0
  180. package/dist/modules/services/providers/tech-radar/fetch-edition-options.dto.v1.type copy.js +2 -0
  181. package/dist/modules/services/providers/tech-radar/index.d.ts +3 -0
  182. package/dist/modules/services/providers/tech-radar/index.js +19 -0
  183. package/dist/modules/services/providers/tech-radar/tech-radar.service.d.ts +71 -0
  184. package/dist/modules/services/providers/tech-radar/tech-radar.service.js +107 -0
  185. package/dist/modules/services/services.module.js +6 -3
  186. package/dist/pipes/params/hub-id.pipe.js +6 -3
  187. package/dist/types/likeable.type.d.ts +2 -2
  188. package/dist/types/viewable.type.d.ts +2 -2
  189. package/package.json +1 -1
  190. package/dist/modules/services/providers/accounts.service.d.ts +0 -67
  191. package/dist/modules/services/providers/accounts.service.js +0 -131
  192. package/dist/modules/services/providers/books.service.d.ts +0 -29
  193. package/dist/modules/services/providers/books.service.js +0 -55
  194. package/dist/modules/services/providers/changelog.service.d.ts +0 -18
  195. package/dist/modules/services/providers/changelog.service.js +0 -43
  196. package/dist/modules/services/providers/demo-hive.service.d.ts +0 -29
  197. package/dist/modules/services/providers/demo-hive.service.js +0 -55
  198. package/dist/modules/services/providers/events.service.d.ts +0 -29
  199. package/dist/modules/services/providers/events.service.js +0 -55
  200. package/dist/modules/services/providers/hackschool.service.d.ts +0 -49
  201. package/dist/modules/services/providers/hackschool.service.js +0 -79
  202. package/dist/modules/services/providers/newletter.service.d.ts +0 -29
  203. package/dist/modules/services/providers/newletter.service.js +0 -55
  204. package/dist/modules/services/providers/newsroom.service.d.ts +0 -47
  205. package/dist/modules/services/providers/newsroom.service.js +0 -73
  206. package/dist/modules/services/providers/notification/dtos/index.d.ts +0 -1
  207. package/dist/modules/services/providers/notification/index.d.ts +0 -2
  208. package/dist/modules/services/providers/notification/notification.service-definition.d.ts +0 -1
  209. package/dist/modules/services/providers/notification/notification.service-definition.js +0 -4
  210. package/dist/modules/services/providers/podcasts.service.d.ts +0 -29
  211. package/dist/modules/services/providers/podcasts.service.js +0 -55
  212. package/dist/modules/services/providers/team.service.d.ts +0 -29
  213. package/dist/modules/services/providers/team.service.js +0 -55
  214. package/dist/modules/services/providers/tech-radar.service.d.ts +0 -39
  215. package/dist/modules/services/providers/tech-radar.service.js +0 -67
  216. /package/dist/modules/services/providers/{mail/dtos/auth-login-token-mail.dto.js → accounts/fetch-account-options.dto.v1.type.js} +0 -0
  217. /package/dist/modules/services/providers/{mail/dtos/auth-password-reset-mail.dto.js → books/fetch-book-options.dto.v1.type.js} +0 -0
  218. /package/dist/modules/services/providers/{mail/dtos/event-cancel-mail.dto.js → changelog/fetch-change-options.dto.v1.type.js} +0 -0
  219. /package/dist/modules/services/providers/{mail/dtos/event-invite-mail.dto.js → conflicts/fetch-conflict-options.dto.v1.type.js} +0 -0
  220. /package/dist/modules/services/providers/{mail/dtos/idea-status-updated-mail.dto.js → content/fetch-content-options.dto.v1.type.js} +0 -0
  221. /package/dist/modules/services/providers/{mail/dtos/idea-submitted-mail.dto.js → demo-hive/fetch-demo-options.dto.v1.type.js} +0 -0
  222. /package/dist/modules/services/providers/{mail/dtos/lunch-roulette-cancel-mail.dto.js → events/fetch-event-options.dto.v1.type.js} +0 -0
  223. /package/dist/modules/services/providers/{mail/dtos/lunch-roulette-matched-mail.dto.js → files/crop-image-options.dto.v1.type.js} +0 -0
  224. /package/dist/modules/services/providers/{mail/dtos/lunch-roulette-submitted-mail.dto.js → files/fetch-file-options.dto.v1.type.js} +0 -0
  225. /package/dist/modules/services/providers/{mail/dtos/lunch-roulette-unmatched-mail.dto.js → files/fetch-folder-options.dto.v1.type.js} +0 -0
  226. /package/dist/modules/services/providers/{mail/dtos/newsletter-issue-mail.dto.js → hackschool/fetch-course-options.dto.v1.type.js} +0 -0
  227. /package/dist/modules/services/providers/{mail/dtos/newsletter-subscribed-mail.dto.js → hackschool/fetch-doc-options.dto.v1.type.js} +0 -0
  228. /package/dist/modules/services/providers/{mail/dtos/newsletter-unsubscribed-mail.dto.js → hackschool/fetch-thread-options.dto.v1.type.js} +0 -0
  229. /package/dist/modules/services/providers/mail/dtos/{notification-mail.dto.js → auth-login-token-mail.dto.v1.js} +0 -0
  230. /package/dist/modules/services/providers/{notification/dtos/schedule-notification.dto.js → mail/dtos/auth-password-reset-mail.dto.v1.js} +0 -0
  231. /package/dist/modules/services/providers/{pass/dtos/create-guild-member-pass.dto.js → mail/dtos/event-cancel-mail.dto.v1.js} +0 -0
  232. /package/dist/modules/services/providers/{pass/dtos/create-team-member-pass.dto.js → mail/dtos/event-invite-mail.dto.v1.js} +0 -0
  233. /package/dist/modules/services/providers/{search/dtos/index-search-document.dto.js → mail/dtos/idea-status-updated-mail.dto.v1.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { InjectionToken } from '@nestjs/common';
2
2
  import { MergeModuleOptions } from './merge-module-options.interface';
3
- import { MergeModuleService } from './merge.service.interface';
3
+ import { MergeServiceClass } from './merge.service.interface';
4
4
  /**
5
5
  * Factory function for creating a MergeController bound to a specific route suffix.
6
6
  *
@@ -13,8 +13,8 @@ import { MergeModuleService } from './merge.service.interface';
13
13
  * @returns A dynamically generated controller class.
14
14
  */
15
15
  export declare function createMergeController(serviceToken: InjectionToken, options: MergeModuleOptions): {
16
- new (mergeService: MergeModuleService): {
17
- readonly mergeService: MergeModuleService;
16
+ new (mergeService: MergeServiceClass): {
17
+ readonly mergeService: MergeServiceClass;
18
18
  /**
19
19
  * Merge all references from an old account into a new account.
20
20
  *
@@ -5,7 +5,7 @@
5
5
  * - Transfer all references from one account to another.
6
6
  * - Ensure that all account ID fields are updated.
7
7
  */
8
- export interface MergeModuleService {
8
+ export interface MergeServiceClass {
9
9
  /**
10
10
  * Merge all references from the old account into the new account.
11
11
  *
@@ -6,39 +6,40 @@ import { InternalExternalUrl } from './base-urls';
6
6
  /**
7
7
  * BaseHttpService
8
8
  *
9
- * A strongly typed, structured wrapper around Axios that standardizes outbound HTTP calls.
9
+ * A structured, type-safe abstraction over Axios that standardizes outbound HTTP requests
10
+ * to other internal or external microservices.
10
11
  *
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.
12
+ * ### Key Principles:
13
+ * - **Controlled Configuration:** Rather than subclassing Axios (which creates prototype issues),
14
+ * this class wraps Axios to maintain predictable behavior across environments.
15
+ * - **Environment-Aware Routing:** Selects internal vs. external base URLs automatically based on environment.
16
+ * - **Secure Communication:** Injects a Kubernetes service token into every outbound request header.
17
+ * - **Operational Transparency:** Implements structured logging for observability of inter-service communication.
19
18
  */
20
19
  export declare abstract class BaseHttpService {
21
20
  private readonly serviceName;
22
21
  private readonly baseUrls;
23
22
  private readonly authenticationOptions;
24
23
  private readonly configService;
25
- readonly client: AxiosInstance;
24
+ readonly httpClient: AxiosInstance;
26
25
  protected readonly logger: Logger;
27
26
  protected readonly isProduction: boolean;
28
27
  /**
29
- * Initializes a new HTTP service client tied to a specific downstream service.
28
+ * Constructs a base HTTP service instance configured for a downstream microservice.
30
29
  *
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.
30
+ * @param {string} serviceName - Name of the downstream service (used for contextualized logs).
31
+ * @param {InternalExternalUrl} baseUrls - Tuple `[internalUrl, externalUrl]`. In production, internal URLs are preferred for security and speed.
32
+ * @param {AuthenticationModuleOptions} authenticationOptions - Configuration containing Kubernetes token.
33
+ * @param {ConfigService} configService - NestJS configuration provider.
35
34
  */
36
35
  constructor(serviceName: string, baseUrls: InternalExternalUrl, authenticationOptions: AuthenticationModuleOptions, configService: ConfigService);
37
36
  /**
38
- * Normalizes Axios error responses into a consistent object.
39
- * Ensures structured error handling regardless of the downstream service implementation.
37
+ * Converts an Axios error into a structured and consistent error format.
38
+ *
39
+ * This allows downstream callers to rely on predictable error shapes,
40
+ * regardless of how the target service responds.
40
41
  *
41
- * @param {any} error - Raw Axios error object.
42
+ * @param {any} error - Raw Axios error object from a failed request.
42
43
  * @returns {{ status: number; data: string | Record<string, any>; message: string }}
43
44
  */
44
45
  protected parseError(error: any): {
@@ -47,37 +48,40 @@ export declare abstract class BaseHttpService {
47
48
  message: string;
48
49
  };
49
50
  /**
50
- * Fetches a single resource from the downstream service.
51
+ * Retrieves a single resource from the downstream service.
51
52
  *
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.
53
+ * Why this abstraction matters:
54
+ * - Prevents unhandled promise rejections by returning `undefined` on failure.
55
+ * - Allows optional per-request configuration without mutating the shared Axios instance.
56
56
  *
57
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.
58
+ * @param {string} endpoint - Relative path (e.g., `"/users/42"`).
59
+ * @param {AxiosRequestConfig} [config={}] - Optional request overrides (headers, params, etc.).
60
+ * @returns {Promise<T | undefined>} - The fetched resource, or `undefined` if the request fails.
64
61
  */
65
62
  protected fetchResource<T>(endpoint: string, config?: AxiosRequestConfig): Promise<T | undefined>;
66
63
  /**
67
- * Fetches a collection of resources from the downstream service.
64
+ * Retrieves a collection of resources from the downstream service.
68
65
  *
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.
66
+ * Handles cases where large sets of IDs need to be split into chunks
67
+ * to avoid exceeding query parameter length limits.
73
68
  *
74
69
  * @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.
70
+ * @param {string} endpoint - Relative API path.
71
+ * @param {AxiosRequestConfig} [config={}] - Optional request customization.
72
+ * @returns {Promise<T[]>} - Array of resources, or an empty array if all attempts fail.
81
73
  */
82
74
  protected fetchResourceCollection<T>(endpoint: string, config?: AxiosRequestConfig): Promise<T[]>;
75
+ /**
76
+ * Helper for fetching a batch (or full collection) of resources in a single request.
77
+ *
78
+ * Encapsulated separately to isolate retry/fallback behavior and keep
79
+ * the main collection method simpler.
80
+ *
81
+ * @template T
82
+ * @param {string} endpoint - Target API path.
83
+ * @param {AxiosRequestConfig} [config={}] - Optional request customization.
84
+ * @returns {Promise<T[]>} - List of retrieved resources or an empty array if failed.
85
+ */
86
+ private fetchResourceCollectionBatch;
83
87
  }
@@ -7,29 +7,29 @@ exports.BaseHttpService = void 0;
7
7
  const common_1 = require("@nestjs/common");
8
8
  const axios_1 = __importDefault(require("axios"));
9
9
  const class_validator_1 = require("class-validator");
10
+ const itlab_functions_1 = require("itlab-functions");
10
11
  const service_auth_guard_1 = require("../authentication/guards/service-auth.guard");
11
12
  /**
12
13
  * BaseHttpService
13
14
  *
14
- * A strongly typed, structured wrapper around Axios that standardizes outbound HTTP calls.
15
+ * A structured, type-safe abstraction over Axios that standardizes outbound HTTP requests
16
+ * to other internal or external microservices.
15
17
  *
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.
18
+ * ### Key Principles:
19
+ * - **Controlled Configuration:** Rather than subclassing Axios (which creates prototype issues),
20
+ * this class wraps Axios to maintain predictable behavior across environments.
21
+ * - **Environment-Aware Routing:** Selects internal vs. external base URLs automatically based on environment.
22
+ * - **Secure Communication:** Injects a Kubernetes service token into every outbound request header.
23
+ * - **Operational Transparency:** Implements structured logging for observability of inter-service communication.
24
24
  */
25
25
  class BaseHttpService {
26
26
  /**
27
- * Initializes a new HTTP service client tied to a specific downstream service.
27
+ * Constructs a base HTTP service instance configured for a downstream microservice.
28
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.
29
+ * @param {string} serviceName - Name of the downstream service (used for contextualized logs).
30
+ * @param {InternalExternalUrl} baseUrls - Tuple `[internalUrl, externalUrl]`. In production, internal URLs are preferred for security and speed.
31
+ * @param {AuthenticationModuleOptions} authenticationOptions - Configuration containing Kubernetes token.
32
+ * @param {ConfigService} configService - NestJS configuration provider.
33
33
  */
34
34
  constructor(serviceName, baseUrls, authenticationOptions, configService) {
35
35
  this.serviceName = serviceName;
@@ -38,26 +38,28 @@ class BaseHttpService {
38
38
  this.configService = configService;
39
39
  this.logger = new common_1.Logger(`${this.serviceName}Service`);
40
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({
41
+ // Initialize Axios with base URL dynamically selected per environment.
42
+ this.httpClient = axios_1.default.create({
43
43
  baseURL: this.baseUrls[this.isProduction ? 0 : 1],
44
44
  headers: {
45
- // Always include internal Kubernetes token for downstream service authentication.
45
+ // Kubernetes internal authentication for secure service-to-service calls.
46
46
  [service_auth_guard_1.SERVICE_AUTH_HEADER_KEY]: this.authenticationOptions.k8sToken,
47
47
  },
48
48
  });
49
- // Attach request interceptor for consistent logging of all outgoing requests.
50
- this.client.interceptors.request.use((config) => {
49
+ // Add a request interceptor to log outbound traffic before each request is sent.
50
+ this.httpClient.interceptors.request.use((config) => {
51
51
  var _a;
52
52
  this.logger.log(`${(_a = config.method) === null || _a === void 0 ? void 0 : _a.toUpperCase()} ${config.url}`);
53
53
  return config;
54
54
  });
55
55
  }
56
56
  /**
57
- * Normalizes Axios error responses into a consistent object.
58
- * Ensures structured error handling regardless of the downstream service implementation.
57
+ * Converts an Axios error into a structured and consistent error format.
58
+ *
59
+ * This allows downstream callers to rely on predictable error shapes,
60
+ * regardless of how the target service responds.
59
61
  *
60
- * @param {any} error - Raw Axios error object.
62
+ * @param {any} error - Raw Axios error object from a failed request.
61
63
  * @returns {{ status: number; data: string | Record<string, any>; message: string }}
62
64
  */
63
65
  parseError(error) {
@@ -67,51 +69,74 @@ class BaseHttpService {
67
69
  return { status, data, message: (0, class_validator_1.isObject)(data) ? JSON.stringify(data) : String(data) };
68
70
  }
69
71
  /**
70
- * Fetches a single resource from the downstream service.
72
+ * Retrieves a single resource from the downstream service.
71
73
  *
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.
74
+ * Why this abstraction matters:
75
+ * - Prevents unhandled promise rejections by returning `undefined` on failure.
76
+ * - Allows optional per-request configuration without mutating the shared Axios instance.
76
77
  *
77
78
  * @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.
79
+ * @param {string} endpoint - Relative path (e.g., `"/users/42"`).
80
+ * @param {AxiosRequestConfig} [config={}] - Optional request overrides (headers, params, etc.).
81
+ * @returns {Promise<T | undefined>} - The fetched resource, or `undefined` if the request fails.
84
82
  */
85
83
  async fetchResource(endpoint, config = {}) {
84
+ // Defensive cleanup: prevent leaking invalid `id` parameters to downstream services.
85
+ if (config.params) {
86
+ delete config.params.ids;
87
+ delete config.params.id;
88
+ }
86
89
  try {
87
- const response = await this.client.get(endpoint, config);
90
+ const response = await this.httpClient.get(endpoint, config);
88
91
  return response.data;
89
92
  }
90
93
  catch (error) {
91
94
  const { message } = this.parseError(error);
92
- this.logger.error(`Failed to fetch resource at endpoint "${endpoint}": ${message}. Config: ${JSON.stringify(config)}`);
95
+ this.logger.error(`Failed to fetch single resource from "${endpoint}": ${message}. Config: ${JSON.stringify(config)}`);
93
96
  return undefined;
94
97
  }
95
98
  }
96
99
  /**
97
- * Fetches a collection of resources from the downstream service.
100
+ * Retrieves a collection of resources from the downstream service.
98
101
  *
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.
102
+ * Handles cases where large sets of IDs need to be split into chunks
103
+ * to avoid exceeding query parameter length limits.
103
104
  *
104
105
  * @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.
106
+ * @param {string} endpoint - Relative API path.
107
+ * @param {AxiosRequestConfig} [config={}] - Optional request customization.
108
+ * @returns {Promise<T[]>} - Array of resources, or an empty array if all attempts fail.
111
109
  */
112
110
  async fetchResourceCollection(endpoint, config = {}) {
111
+ var _a;
112
+ const ids = (_a = config.params) === null || _a === void 0 ? void 0 : _a.ids;
113
+ if (!(ids && (0, class_validator_1.isArray)(ids) && ids.length > 50)) {
114
+ return this.fetchResourceCollectionBatch(endpoint, config);
115
+ }
116
+ // Deduplicate and chunk IDs to avoid overloading downstream query limits.
117
+ const uniqueIds = Array.from(new Set(ids));
118
+ const idChunks = (0, itlab_functions_1.createChunks)(uniqueIds, 50);
119
+ // Parallelize requests for each chunk; flatten the results into one array.
120
+ const batchPromises = idChunks.map((chunk) => {
121
+ config.params.ids = chunk;
122
+ return this.fetchResourceCollectionBatch(endpoint, config);
123
+ });
124
+ return (await Promise.all(batchPromises)).flat();
125
+ }
126
+ /**
127
+ * Helper for fetching a batch (or full collection) of resources in a single request.
128
+ *
129
+ * Encapsulated separately to isolate retry/fallback behavior and keep
130
+ * the main collection method simpler.
131
+ *
132
+ * @template T
133
+ * @param {string} endpoint - Target API path.
134
+ * @param {AxiosRequestConfig} [config={}] - Optional request customization.
135
+ * @returns {Promise<T[]>} - List of retrieved resources or an empty array if failed.
136
+ */
137
+ async fetchResourceCollectionBatch(endpoint, config = {}) {
113
138
  try {
114
- const response = await this.client.get(endpoint, config);
139
+ const response = await this.httpClient.get(endpoint, config);
115
140
  return response.data;
116
141
  }
117
142
  catch (error) {
@@ -1,22 +1,25 @@
1
1
  export type InternalExternalUrl = [internalUrl: string, externalUrl: string];
2
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;
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 filesService(): InternalExternalUrl;
15
+ static get quickLinksService(): InternalExternalUrl;
16
+ static get accountsService(): InternalExternalUrl;
17
+ static get commentsService(): InternalExternalUrl;
18
+ static get conflictsService(): InternalExternalUrl;
19
+ static get notificationsService(): InternalExternalUrl;
20
+ static get mailService(): InternalExternalUrl;
21
+ static get searchService(): InternalExternalUrl;
22
+ static get changelogService(): InternalExternalUrl;
23
+ static get passService(): InternalExternalUrl;
24
+ static get contentService(): InternalExternalUrl;
22
25
  }
@@ -2,116 +2,135 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BaseUrls = void 0;
4
4
  class BaseUrls {
5
- static get NewsroomService() {
5
+ static get newsroomService() {
6
6
  return [
7
7
  'http://organisation-hub-newsroom-backend.organisation-hub-services.svc.cluster.local:3000/',
8
8
  'https://services.svi-itlab.com/newsroom/',
9
9
  ];
10
10
  }
11
- static get EventsService() {
11
+ static get eventsService() {
12
12
  return [
13
13
  'http://organisation-hub-events-backend.organisation-hub-services.svc.cluster.local:3000/',
14
14
  'https://services.svi-itlab.com/events/',
15
15
  ];
16
16
  }
17
- static get HackschoolService() {
17
+ static get hackschoolService() {
18
18
  return [
19
19
  'http://organisation-hub-hackschool-backend.organisation-hub-services.svc.cluster.local:3000/',
20
20
  'https://services.svi-itlab.com/hackschool/',
21
21
  ];
22
22
  }
23
- static get DemoHiveService() {
23
+ static get demoHiveService() {
24
24
  return [
25
25
  'http://organisation-hub-demo-hive-backend.organisation-hub-services.svc.cluster.local:3000/',
26
26
  'https://services.svi-itlab.com/demo-hive/',
27
27
  ];
28
28
  }
29
- static get TechRadarService() {
29
+ static get techRadarService() {
30
30
  return [
31
31
  'http://organisation-hub-tech-radar-backend.organisation-hub-services.svc.cluster.local:3000/',
32
32
  'https://services.svi-itlab.com/tech-radar/',
33
33
  ];
34
34
  }
35
- static get PodcastsService() {
35
+ static get podcastsService() {
36
36
  return [
37
37
  'http://organisation-hub-podcasts-backend.organisation-hub-services.svc.cluster.local:3000/',
38
38
  'https://services.svi-itlab.com/podcasts/',
39
39
  ];
40
40
  }
41
- static get BooksService() {
41
+ static get booksService() {
42
42
  return [
43
43
  'http://organisation-hub-books-backend.organisation-hub-services.svc.cluster.local:3000/',
44
44
  'https://services.svi-itlab.com/books/',
45
45
  ];
46
46
  }
47
- static get TeamService() {
47
+ static get teamService() {
48
48
  return [
49
49
  'http://organisation-hub-team-backend.organisation-hub-services.svc.cluster.local:3000/',
50
50
  'https://services.svi-itlab.com/team/',
51
51
  ];
52
52
  }
53
- static get NewsletterService() {
53
+ static get newsletterService() {
54
54
  return [
55
55
  'http://organisation-hub-newsletter-backend.organisation-hub-services.svc.cluster.local:3000/',
56
56
  'https://services.svi-itlab.com/newsletter/',
57
57
  ];
58
58
  }
59
- static get IdeasService() {
59
+ static get ideasService() {
60
60
  return [
61
61
  'http://organisation-hub-ideas-service.organisation-hub-services.svc.cluster.local:3000/',
62
62
  'https://services.svi-itlab.com/ideas/',
63
63
  ];
64
64
  }
65
- static get LunchRouletteService() {
65
+ static get lunchRouletteService() {
66
66
  return [
67
67
  'http://project-lunch-roulette-backend.project-lunch-roulette.svc.cluster.local:3000/',
68
68
  'https://services.svi-itlab.com/lunch-roulette/',
69
69
  ];
70
70
  }
71
+ // Services
72
+ static get filesService() {
73
+ return [
74
+ 'http://organisation-hub-files-service.organisation-hub-services.svc.cluster.local:3000/',
75
+ 'https://services.svi-itlab.com/files/',
76
+ ];
77
+ }
78
+ static get quickLinksService() {
79
+ return [
80
+ 'http://organisation-hub-quick-links-service.organisation-hub-services.svc.cluster.local:3000/',
81
+ 'https://services.svi-itlab.com/quick-links/',
82
+ ];
83
+ }
71
84
  // Utils
72
- static get AccountsService() {
85
+ static get accountsService() {
73
86
  return [
74
87
  'http://organisation-hub-accounts-service.organisation-hub-services.svc.cluster.local:3000/',
75
88
  'https://services.svi-itlab.com/accounts/',
76
89
  ];
77
90
  }
78
- static get CommentsService() {
91
+ static get commentsService() {
79
92
  return [
80
93
  'http://organisation-hub-comments-service.organisation-hub-services.svc.cluster.local:3000/',
81
94
  'https://services.svi-itlab.com/comments/',
82
95
  ];
83
96
  }
84
- static get NotificationService() {
97
+ static get conflictsService() {
98
+ return [
99
+ 'http://organisation-hub-conflicts-service.organisation-hub-services.svc.cluster.local:3000/',
100
+ 'https://services.svi-itlab.com/conflicts/',
101
+ ];
102
+ }
103
+ static get notificationsService() {
85
104
  return [
86
105
  'http://organisation-hub-notifications-service.organisation-hub-services.svc.cluster.local:3000/',
87
106
  'https://services.svi-itlab.com/notifications/',
88
107
  ];
89
108
  }
90
- static get MailService() {
109
+ static get mailService() {
91
110
  return [
92
111
  'http://organisation-hub-email-service.organisation-hub-services.svc.cluster.local:3000/',
93
112
  'https://services.svi-itlab.com/email/',
94
113
  ];
95
114
  }
96
- static get SearchService() {
115
+ static get searchService() {
97
116
  return [
98
117
  'http://organisation-hub-search-service.organisation-hub-services.svc.cluster.local:3000/',
99
118
  'https://services.svi-itlab.com/search/',
100
119
  ];
101
120
  }
102
- static get ChangelogService() {
121
+ static get changelogService() {
103
122
  return [
104
123
  'http://organisation-hub-changelog-service.organisation-hub-services.svc.cluster.local:3000/',
105
124
  'https://services.svi-itlab.com/changelog/',
106
125
  ];
107
126
  }
108
- static get PassService() {
127
+ static get passService() {
109
128
  return [
110
129
  'http://organisation-hub-pass-service.organisation-hub-services.svc.cluster.local:3000/',
111
130
  'https://services.svi-itlab.com/pass/',
112
131
  ];
113
132
  }
114
- static get ContentService() {
133
+ static get contentService() {
115
134
  return [
116
135
  'http://organisation-hub-content-service.organisation-hub-services.svc.cluster.local:3000/',
117
136
  'https://services.svi-itlab.com/content/',
@@ -0,0 +1,99 @@
1
+ import { ConfigService } from '@nestjs/config';
2
+ import { EntityMap } from '../../../../classes';
3
+ import { Account, User } from '../../../../models';
4
+ import { AuthenticationModuleOptions } from '../../../authentication';
5
+ import { BaseHttpService } from '../../base-http.service';
6
+ import { FetchAccountOptionsDtoV1 } from './fetch-account-options.dto.v1.type';
7
+ /**
8
+ * AccountsService
9
+ *
10
+ * Service client responsible for interacting with the Accounts microservice.
11
+ * Extends `BaseHttpService` to inherit:
12
+ * - Environment-sensitive URL resolution (internal vs. external).
13
+ * - Secure inter-service authentication.
14
+ * - Structured logging for traceability of outbound requests.
15
+ *
16
+ * Why this pattern?
17
+ * - Ensures all outbound calls follow a unified configuration and logging structure.
18
+ * - Promotes strong typing and maintainable HTTP logic.
19
+ * - Makes service interactions predictable and debuggable across environments.
20
+ */
21
+ export declare class AccountsService extends BaseHttpService {
22
+ /**
23
+ * Constructs an Accounts service client instance.
24
+ *
25
+ * @param {AuthenticationModuleOptions} authenticationOptions - Injected authentication configuration.
26
+ * @param {ConfigService} configService - NestJS ConfigService for environment detection.
27
+ */
28
+ constructor(authenticationOptions: AuthenticationModuleOptions, configService: ConfigService);
29
+ /**
30
+ * Retrieves a single account entry by its MongoDB identifier.
31
+ *
32
+ * This method gracefully handles downstream failures by logging
33
+ * and returning `undefined` instead of throwing.
34
+ *
35
+ * @param {string} accountId - Unique MongoDB identifier of the account.
36
+ * @param {FetchAccountOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
37
+ * @returns {Promise<Account | undefined>} Resolves to an Account or `undefined` on failure.
38
+ */
39
+ fetchAccountV1(accountId: string, options?: FetchAccountOptionsDtoV1): Promise<Account | undefined>;
40
+ /**
41
+ * Retrieves a collection of account entries.
42
+ *
43
+ * Useful for batch lookups or paginated listings.
44
+ * Returns an empty array if the downstream service call fails.
45
+ *
46
+ * @param {FetchAccountOptionsDtoV1} [options] - Optional filter options for narrowing results.
47
+ * @returns {Promise<Account[]>} Resolves to a list of accounts, or an empty array if none found.
48
+ */
49
+ fetchAccountCollectionV1(options?: FetchAccountOptionsDtoV1): Promise<Account[]>;
50
+ /**
51
+ * Fetches accounts for multiple groups of account IDs and returns a mapped result.
52
+ *
53
+ * This is particularly useful when aggregating accounts related to different entities
54
+ * (e.g., post authors, commenters, likedBy lists).
55
+ *
56
+ * The function ensures:
57
+ * - Each unique account is fetched only once.
58
+ * - The result is returned as an `EntityMap` for O(1) lookups.
59
+ *
60
+ * @param {string[][]} accountIdGroups - Nested arrays of account IDs.
61
+ * @returns {Promise<EntityMap<Account>>} Map of accountId → Account entity.
62
+ */
63
+ fetchAccountMapV1(accountIdGroups: string[][]): Promise<EntityMap<Account>>;
64
+ /**
65
+ * Retrieves a single user entry by its MongoDB identifier.
66
+ *
67
+ * This method gracefully handles downstream failures by logging
68
+ * and returning `undefined` instead of throwing.
69
+ *
70
+ * @param {string} userId - Unique MongoDB identifier of the user.
71
+ * @param {FetchAccountOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
72
+ * @returns {Promise<User | undefined>} Resolves to an User or `undefined` on failure.
73
+ */
74
+ fetchUserV1(userId: string, options?: FetchAccountOptionsDtoV1): Promise<User | undefined>;
75
+ /**
76
+ * Retrieves a collection of user entries.
77
+ *
78
+ * Useful for batch lookups or paginated listings.
79
+ * Returns an empty array if the downstream service call fails.
80
+ *
81
+ * @param {FetchAccountOptionsDtoV1} [options] - Optional filter options for narrowing results.
82
+ * @returns {Promise<User[]>} Resolves to a list of users, or an empty array if none found.
83
+ */
84
+ fetchUserCollectionV1(options?: FetchAccountOptionsDtoV1): Promise<User[]>;
85
+ /**
86
+ * Fetches users for multiple groups of user IDs and returns a mapped result.
87
+ *
88
+ * This is particularly useful when aggregating users related to different entities
89
+ * (e.g., post authors, commenters, likedBy lists).
90
+ *
91
+ * The function ensures:
92
+ * - Each unique user is fetched only once.
93
+ * - The result is returned as an `EntityMap` for O(1) lookups.
94
+ *
95
+ * @param {string[][]} userIdGroups - Nested arrays of user IDs.
96
+ * @returns {Promise<EntityMap<User>>} Map of userId → User entity.
97
+ */
98
+ fetchUserMapV1(userIdGroups: string[][]): Promise<EntityMap<User>>;
99
+ }