itlab-internal-services 2.16.7 → 2.16.9

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 (224) hide show
  1. package/dist/classes/fetch-options/base-options.class.d.ts +9 -0
  2. package/dist/classes/fetch-options/comments-options.class.d.ts +3 -0
  3. package/dist/classes/fetch-options/comments-options.class.js +1 -1
  4. package/dist/classes/fetch-options/content-options.class.d.ts +3 -0
  5. package/dist/classes/fetch-options/content-options.class.js +1 -1
  6. package/dist/classes/fetch-options/drafted-options.class.d.ts +5 -1
  7. package/dist/classes/fetch-options/drafted-options.class.js +3 -2
  8. package/dist/classes/fetch-options/liked-by-options.class.d.ts +4 -0
  9. package/dist/classes/fetch-options/liked-by-options.class.js +3 -3
  10. package/dist/classes/fetch-options/timestamps-options.class.d.ts +4 -1
  11. package/dist/classes/fetch-options/timestamps-options.class.js +1 -1
  12. package/dist/classes/fetch-options/viewed-by-options.class.d.ts +5 -1
  13. package/dist/classes/fetch-options/viewed-by-options.class.js +3 -3
  14. package/dist/hub-resource.enum.d.ts +10 -10
  15. package/dist/hub-resource.enum.js +16 -16
  16. package/dist/modules/comments/comments.controller.js +1 -1
  17. package/dist/modules/comments/comments.service.d.ts +5 -5
  18. package/dist/modules/comments/comments.service.js +21 -13
  19. package/dist/modules/like/like.service.d.ts +1 -1
  20. package/dist/modules/like/like.service.js +7 -7
  21. package/dist/modules/merge/merge-module-options.interface.d.ts +2 -2
  22. package/dist/modules/merge/merge.controller.d.ts +3 -3
  23. package/dist/modules/merge/merge.service.interface.d.ts +1 -1
  24. package/dist/modules/services/base-http.service.d.ts +44 -40
  25. package/dist/modules/services/base-http.service.js +72 -47
  26. package/dist/modules/services/base-urls.d.ts +22 -19
  27. package/dist/modules/services/base-urls.js +38 -19
  28. package/dist/modules/services/providers/accounts/accounts.service.d.ts +99 -0
  29. package/dist/modules/services/providers/accounts/accounts.service.js +154 -0
  30. package/dist/modules/services/providers/accounts/fetch-account-options.dto.v1.type.d.ts +29 -0
  31. package/dist/modules/services/providers/accounts/index.d.ts +2 -0
  32. package/dist/modules/services/providers/accounts/index.js +18 -0
  33. package/dist/modules/services/providers/books/books.service.d.ts +49 -0
  34. package/dist/modules/services/providers/books/books.service.js +79 -0
  35. package/dist/modules/services/providers/books/fetch-book-options.dto.v1.type.d.ts +27 -0
  36. package/dist/modules/services/providers/books/index.d.ts +2 -0
  37. package/dist/modules/services/providers/{notification → books}/index.js +2 -2
  38. package/dist/modules/services/providers/changelog/changelog.service.d.ts +62 -0
  39. package/dist/modules/services/providers/changelog/changelog.service.js +79 -0
  40. package/dist/modules/services/providers/changelog/fetch-change-options.dto.v1.type.d.ts +15 -0
  41. package/dist/modules/services/providers/changelog/index.d.ts +2 -0
  42. package/dist/modules/services/providers/changelog/index.js +18 -0
  43. package/dist/modules/services/providers/conflicts/conflicts.service.d.ts +59 -0
  44. package/dist/modules/services/providers/conflicts/conflicts.service.js +79 -0
  45. package/dist/modules/services/providers/conflicts/fetch-conflict-options.dto.v1.type.d.ts +18 -0
  46. package/dist/modules/services/providers/conflicts/index.d.ts +2 -0
  47. package/dist/modules/services/providers/conflicts/index.js +18 -0
  48. package/dist/modules/services/providers/content/content-return-types.d.ts +3 -2
  49. package/dist/modules/services/providers/content/content-return-types.js +8 -2
  50. package/dist/modules/services/providers/content/content.service.d.ts +49 -7
  51. package/dist/modules/services/providers/content/content.service.js +61 -19
  52. package/dist/modules/services/providers/content/fetch-content-options.dto.v1.type.d.ts +15 -0
  53. package/dist/modules/services/providers/content/index.d.ts +1 -0
  54. package/dist/modules/services/providers/content/index.js +1 -0
  55. package/dist/modules/services/providers/demo-hive/demo-hive.service.d.ts +49 -0
  56. package/dist/modules/services/providers/demo-hive/demo-hive.service.js +79 -0
  57. package/dist/modules/services/providers/demo-hive/fetch-demo-options.dto.v1.type.d.ts +16 -0
  58. package/dist/modules/services/providers/demo-hive/index.d.ts +2 -0
  59. package/dist/modules/services/providers/demo-hive/index.js +18 -0
  60. package/dist/modules/services/providers/events/events.service.d.ts +49 -0
  61. package/dist/modules/services/providers/events/events.service.js +79 -0
  62. package/dist/modules/services/providers/events/fetch-event-options.dto.v1.type.d.ts +27 -0
  63. package/dist/modules/services/providers/events/index.d.ts +2 -0
  64. package/dist/modules/services/providers/events/index.js +18 -0
  65. package/dist/modules/services/providers/files/crop-image-options.dto.v1.type.d.ts +13 -0
  66. package/dist/modules/services/providers/files/fetch-file-options.dto.v1.type.d.ts +21 -0
  67. package/dist/modules/services/providers/files/fetch-folder-options.dto.v1.type.d.ts +15 -0
  68. package/dist/modules/services/providers/files/files.service.d.ts +106 -0
  69. package/dist/modules/services/providers/files/files.service.js +146 -0
  70. package/dist/modules/services/providers/files/index.d.ts +4 -0
  71. package/dist/modules/services/providers/files/index.js +20 -0
  72. package/dist/modules/services/providers/hackschool/fetch-course-options.dto.v1.type.d.ts +15 -0
  73. package/dist/modules/services/providers/hackschool/fetch-doc-options.dto.v1.type.d.ts +17 -0
  74. package/dist/modules/services/providers/hackschool/fetch-thread-options.dto.v1.type.d.ts +18 -0
  75. package/dist/modules/services/providers/hackschool/hackschool.service.d.ts +93 -0
  76. package/dist/modules/services/providers/hackschool/hackschool.service.js +135 -0
  77. package/dist/modules/services/providers/hackschool/index.d.ts +2 -0
  78. package/dist/modules/services/providers/hackschool/index.js +18 -0
  79. package/dist/modules/services/providers/ideas.service.js +1 -1
  80. package/dist/modules/services/providers/index.d.ts +15 -12
  81. package/dist/modules/services/providers/index.js +17 -12
  82. package/dist/modules/services/providers/lunch-roulette.service.js +1 -1
  83. package/dist/modules/services/providers/mail/dtos/{auth-login-token-mail.dto.d.ts → auth-login-token-mail.dto.v1.d.ts} +1 -1
  84. package/dist/modules/services/providers/mail/dtos/{auth-password-reset-mail.dto.d.ts → auth-password-reset-mail.dto.v1.d.ts} +1 -1
  85. package/dist/modules/services/providers/mail/dtos/{event-cancel-mail.dto.d.ts → event-cancel-mail.dto.v1.d.ts} +1 -1
  86. package/dist/modules/services/providers/mail/dtos/{event-invite-mail.dto.d.ts → event-invite-mail.dto.v1.d.ts} +1 -1
  87. package/dist/modules/services/providers/mail/dtos/{idea-status-updated-mail.dto.d.ts → idea-status-updated-mail.dto.v1.d.ts} +1 -1
  88. package/dist/modules/services/providers/mail/dtos/{idea-submitted-mail.dto.d.ts → idea-submitted-mail.dto.v1.d.ts} +1 -1
  89. package/dist/modules/services/providers/mail/dtos/idea-submitted-mail.dto.v1.js +2 -0
  90. package/dist/modules/services/providers/mail/dtos/index.d.ts +14 -14
  91. package/dist/modules/services/providers/mail/dtos/index.js +14 -14
  92. package/dist/modules/services/providers/mail/dtos/{lunch-roulette-cancel-mail.dto.d.ts → lunch-roulette-cancel-mail.dto.v1.d.ts} +1 -1
  93. package/dist/modules/services/providers/mail/dtos/lunch-roulette-cancel-mail.dto.v1.js +2 -0
  94. package/dist/modules/services/providers/mail/dtos/{lunch-roulette-matched-mail.dto.d.ts → lunch-roulette-matched-mail.dto.v1.d.ts} +1 -1
  95. package/dist/modules/services/providers/mail/dtos/lunch-roulette-matched-mail.dto.v1.js +2 -0
  96. package/dist/modules/services/providers/mail/dtos/{lunch-roulette-submitted-mail.dto.d.ts → lunch-roulette-submitted-mail.dto.v1.d.ts} +1 -1
  97. package/dist/modules/services/providers/mail/dtos/lunch-roulette-submitted-mail.dto.v1.js +2 -0
  98. package/dist/modules/services/providers/mail/dtos/{lunch-roulette-unmatched-mail.dto.d.ts → lunch-roulette-unmatched-mail.dto.v1.d.ts} +1 -1
  99. package/dist/modules/services/providers/mail/dtos/lunch-roulette-unmatched-mail.dto.v1.js +2 -0
  100. package/dist/modules/services/providers/mail/dtos/{newsletter-issue-mail.dto.d.ts → newsletter-issue-mail.dto.v1.d.ts} +1 -1
  101. package/dist/modules/services/providers/mail/dtos/newsletter-issue-mail.dto.v1.js +2 -0
  102. package/dist/modules/services/providers/mail/dtos/{newsletter-subscribed-mail.dto.d.ts → newsletter-subscribed-mail.dto.v1.d.ts} +1 -1
  103. package/dist/modules/services/providers/mail/dtos/newsletter-subscribed-mail.dto.v1.js +2 -0
  104. package/dist/modules/services/providers/mail/dtos/{newsletter-unsubscribed-mail.dto.d.ts → newsletter-unsubscribed-mail.dto.v1.d.ts} +1 -1
  105. package/dist/modules/services/providers/mail/dtos/newsletter-unsubscribed-mail.dto.v1.js +2 -0
  106. package/dist/modules/services/providers/mail/dtos/{notification-mail.dto.d.ts → notification-mail.dto.v1.d.ts} +1 -1
  107. package/dist/modules/services/providers/mail/dtos/notification-mail.dto.v1.js +2 -0
  108. package/dist/modules/services/providers/mail/mail-types.d.ts +17 -16
  109. package/dist/modules/services/providers/mail/mail-types.js +31 -14
  110. package/dist/modules/services/providers/mail/mail.service.d.ts +30 -31
  111. package/dist/modules/services/providers/mail/mail.service.js +49 -50
  112. package/dist/modules/services/providers/mail/models/mail-recipient.model.d.ts +2 -0
  113. package/dist/modules/services/providers/mail/models/mail-recipient.model.js +3 -0
  114. package/dist/modules/services/providers/newsletter/fetch-issue-options.dto.v1.type.d.ts +16 -0
  115. package/dist/modules/services/providers/newsletter/fetch-issue-options.dto.v1.type.js +2 -0
  116. package/dist/modules/services/providers/newsletter/index.d.ts +2 -0
  117. package/dist/modules/services/providers/newsletter/index.js +18 -0
  118. package/dist/modules/services/providers/newsletter/newsletter.service.d.ts +49 -0
  119. package/dist/modules/services/providers/newsletter/newsletter.service.js +79 -0
  120. package/dist/modules/services/providers/newsroom/fetch-news-options.dto.v1.type.d.ts +20 -0
  121. package/dist/modules/services/providers/newsroom/fetch-news-options.dto.v1.type.js +2 -0
  122. package/dist/modules/services/providers/newsroom/index.d.ts +2 -0
  123. package/dist/modules/services/providers/newsroom/index.js +18 -0
  124. package/dist/modules/services/providers/newsroom/newsroom.service.d.ts +49 -0
  125. package/dist/modules/services/providers/newsroom/newsroom.service.js +79 -0
  126. package/dist/modules/services/providers/notifications/dtos/index.d.ts +1 -0
  127. package/dist/modules/services/providers/{notification → notifications}/dtos/index.js +1 -1
  128. package/dist/modules/services/providers/{notification/dtos/schedule-notification.dto.d.ts → notifications/dtos/schedule-notification.dto.v1.d.ts} +2 -10
  129. package/dist/modules/services/providers/notifications/dtos/schedule-notification.dto.v1.js +2 -0
  130. package/dist/modules/services/providers/notifications/fetch-notification-options.dto.v1.type.d.ts +19 -0
  131. package/dist/modules/services/providers/notifications/fetch-notification-options.dto.v1.type.js +2 -0
  132. package/dist/modules/services/providers/notifications/index.d.ts +3 -0
  133. package/dist/modules/services/providers/notifications/index.js +19 -0
  134. package/dist/modules/services/providers/notifications/notifications.service-definition.d.ts +1 -0
  135. package/dist/modules/services/providers/notifications/notifications.service-definition.js +4 -0
  136. package/dist/modules/services/providers/{notification/notification.service.d.ts → notifications/notifications.service.d.ts} +41 -5
  137. package/dist/modules/services/providers/{notification/notification.service.js → notifications/notifications.service.js} +52 -26
  138. package/dist/modules/services/providers/pass/dtos/{create-guild-member-pass.dto.d.ts → create-guild-member-pass.dto.v1.d.ts} +2 -2
  139. package/dist/modules/services/providers/pass/dtos/create-guild-member-pass.dto.v1.js +2 -0
  140. package/dist/modules/services/providers/pass/dtos/{create-team-member-pass.dto.d.ts → create-team-member-pass.dto.v1.d.ts} +2 -2
  141. package/dist/modules/services/providers/pass/dtos/create-team-member-pass.dto.v1.js +2 -0
  142. package/dist/modules/services/providers/pass/dtos/index.d.ts +2 -2
  143. package/dist/modules/services/providers/pass/dtos/index.js +2 -2
  144. package/dist/modules/services/providers/pass/pass-types.d.ts +3 -3
  145. package/dist/modules/services/providers/pass/pass.service.d.ts +14 -14
  146. package/dist/modules/services/providers/pass/pass.service.js +28 -28
  147. package/dist/modules/services/providers/podcasts/fetch-episode-options.dto.v1.type.d.ts +19 -0
  148. package/dist/modules/services/providers/podcasts/fetch-episode-options.dto.v1.type.js +2 -0
  149. package/dist/modules/services/providers/podcasts/index.d.ts +2 -0
  150. package/dist/modules/services/providers/podcasts/index.js +18 -0
  151. package/dist/modules/services/providers/podcasts/podcasts.service.d.ts +49 -0
  152. package/dist/modules/services/providers/podcasts/podcasts.service.js +79 -0
  153. package/dist/modules/services/providers/quick-links/fetch-link-options.dto.v1.type.d.ts +14 -0
  154. package/dist/modules/services/providers/quick-links/fetch-link-options.dto.v1.type.js +2 -0
  155. package/dist/modules/services/providers/quick-links/index.d.ts +2 -0
  156. package/dist/modules/services/providers/quick-links/index.js +18 -0
  157. package/dist/modules/services/providers/quick-links/quick-links.service.d.ts +61 -0
  158. package/dist/modules/services/providers/quick-links/quick-links.service.js +79 -0
  159. package/dist/modules/services/providers/search/dtos/{index-search-document.dto.d.ts → index-document.dto.v1.d.ts} +2 -2
  160. package/dist/modules/services/providers/search/dtos/index-document.dto.v1.js +2 -0
  161. package/dist/modules/services/providers/search/dtos/index.d.ts +1 -1
  162. package/dist/modules/services/providers/search/dtos/index.js +1 -1
  163. package/dist/modules/services/providers/search/search.service.d.ts +6 -6
  164. package/dist/modules/services/providers/search/search.service.js +14 -17
  165. package/dist/modules/services/providers/team/fetch-member-options.dto.v1.type.d.ts +11 -0
  166. package/dist/modules/services/providers/team/fetch-member-options.dto.v1.type.js +2 -0
  167. package/dist/modules/services/providers/team/index.d.ts +2 -0
  168. package/dist/modules/services/providers/team/index.js +18 -0
  169. package/dist/modules/services/providers/team/team.service.d.ts +49 -0
  170. package/dist/modules/services/providers/team/team.service.js +79 -0
  171. package/dist/modules/services/providers/tech-radar/fetch-blip-options.dto.v1.type.d.ts +19 -0
  172. package/dist/modules/services/providers/tech-radar/fetch-blip-options.dto.v1.type.js +2 -0
  173. package/dist/modules/services/providers/tech-radar/fetch-edition-options.dto.v1.type copy.d.ts +15 -0
  174. package/dist/modules/services/providers/tech-radar/fetch-edition-options.dto.v1.type copy.js +2 -0
  175. package/dist/modules/services/providers/tech-radar/index.d.ts +3 -0
  176. package/dist/modules/services/providers/tech-radar/index.js +19 -0
  177. package/dist/modules/services/providers/tech-radar/tech-radar.service.d.ts +71 -0
  178. package/dist/modules/services/providers/tech-radar/tech-radar.service.js +107 -0
  179. package/dist/modules/services/services.module.js +6 -3
  180. package/package.json +1 -1
  181. package/dist/modules/services/providers/accounts.service.d.ts +0 -67
  182. package/dist/modules/services/providers/accounts.service.js +0 -131
  183. package/dist/modules/services/providers/books.service.d.ts +0 -29
  184. package/dist/modules/services/providers/books.service.js +0 -55
  185. package/dist/modules/services/providers/changelog.service.d.ts +0 -18
  186. package/dist/modules/services/providers/changelog.service.js +0 -43
  187. package/dist/modules/services/providers/demo-hive.service.d.ts +0 -29
  188. package/dist/modules/services/providers/demo-hive.service.js +0 -55
  189. package/dist/modules/services/providers/events.service.d.ts +0 -29
  190. package/dist/modules/services/providers/events.service.js +0 -55
  191. package/dist/modules/services/providers/hackschool.service.d.ts +0 -49
  192. package/dist/modules/services/providers/hackschool.service.js +0 -79
  193. package/dist/modules/services/providers/newletter.service.d.ts +0 -29
  194. package/dist/modules/services/providers/newletter.service.js +0 -55
  195. package/dist/modules/services/providers/newsroom.service.d.ts +0 -47
  196. package/dist/modules/services/providers/newsroom.service.js +0 -73
  197. package/dist/modules/services/providers/notification/dtos/index.d.ts +0 -1
  198. package/dist/modules/services/providers/notification/index.d.ts +0 -2
  199. package/dist/modules/services/providers/notification/notification.service-definition.d.ts +0 -1
  200. package/dist/modules/services/providers/notification/notification.service-definition.js +0 -4
  201. package/dist/modules/services/providers/podcasts.service.d.ts +0 -29
  202. package/dist/modules/services/providers/podcasts.service.js +0 -55
  203. package/dist/modules/services/providers/team.service.d.ts +0 -29
  204. package/dist/modules/services/providers/team.service.js +0 -55
  205. package/dist/modules/services/providers/tech-radar.service.d.ts +0 -39
  206. package/dist/modules/services/providers/tech-radar.service.js +0 -67
  207. /package/dist/modules/services/providers/{mail/dtos/auth-login-token-mail.dto.js → accounts/fetch-account-options.dto.v1.type.js} +0 -0
  208. /package/dist/modules/services/providers/{mail/dtos/auth-password-reset-mail.dto.js → books/fetch-book-options.dto.v1.type.js} +0 -0
  209. /package/dist/modules/services/providers/{mail/dtos/event-cancel-mail.dto.js → changelog/fetch-change-options.dto.v1.type.js} +0 -0
  210. /package/dist/modules/services/providers/{mail/dtos/event-invite-mail.dto.js → conflicts/fetch-conflict-options.dto.v1.type.js} +0 -0
  211. /package/dist/modules/services/providers/{mail/dtos/idea-status-updated-mail.dto.js → content/fetch-content-options.dto.v1.type.js} +0 -0
  212. /package/dist/modules/services/providers/{mail/dtos/idea-submitted-mail.dto.js → demo-hive/fetch-demo-options.dto.v1.type.js} +0 -0
  213. /package/dist/modules/services/providers/{mail/dtos/lunch-roulette-cancel-mail.dto.js → events/fetch-event-options.dto.v1.type.js} +0 -0
  214. /package/dist/modules/services/providers/{mail/dtos/lunch-roulette-matched-mail.dto.js → files/crop-image-options.dto.v1.type.js} +0 -0
  215. /package/dist/modules/services/providers/{mail/dtos/lunch-roulette-submitted-mail.dto.js → files/fetch-file-options.dto.v1.type.js} +0 -0
  216. /package/dist/modules/services/providers/{mail/dtos/lunch-roulette-unmatched-mail.dto.js → files/fetch-folder-options.dto.v1.type.js} +0 -0
  217. /package/dist/modules/services/providers/{mail/dtos/newsletter-issue-mail.dto.js → hackschool/fetch-course-options.dto.v1.type.js} +0 -0
  218. /package/dist/modules/services/providers/{mail/dtos/newsletter-subscribed-mail.dto.js → hackschool/fetch-doc-options.dto.v1.type.js} +0 -0
  219. /package/dist/modules/services/providers/{mail/dtos/newsletter-unsubscribed-mail.dto.js → hackschool/fetch-thread-options.dto.v1.type.js} +0 -0
  220. /package/dist/modules/services/providers/mail/dtos/{notification-mail.dto.js → auth-login-token-mail.dto.v1.js} +0 -0
  221. /package/dist/modules/services/providers/{notification/dtos/schedule-notification.dto.js → mail/dtos/auth-password-reset-mail.dto.v1.js} +0 -0
  222. /package/dist/modules/services/providers/{pass/dtos/create-guild-member-pass.dto.js → mail/dtos/event-cancel-mail.dto.v1.js} +0 -0
  223. /package/dist/modules/services/providers/{pass/dtos/create-team-member-pass.dto.js → mail/dtos/event-invite-mail.dto.v1.js} +0 -0
  224. /package/dist/modules/services/providers/{search/dtos/index-search-document.dto.js → mail/dtos/idea-status-updated-mail.dto.v1.js} +0 -0
@@ -1,8 +1,7 @@
1
1
  import { ConfigService } from '@nestjs/config';
2
2
  import { AuthenticationModuleOptions } from '../../../authentication';
3
3
  import { BaseHttpService } from '../../base-http.service';
4
- import { AuthLoginTokenMailDto, AuthPasswordResetMailDto, EventCancelMailDto, EventInviteMailDto, IdeaStatusUpdateMailDto, IdeaSubmittedMailDto, LunchRouletteCancelMailDto, LunchRouletteMatchedMailDto, LunchRouletteSubmittedMailDto, LunchRouletteUnmatchedMailDto, NewsletterIssueMailDto, NewsletterSubscribedMailDto, NewsletterUnsubscribedMailDto, NotificationMailDto } from './dtos';
5
- import { MailType, MailTypeDtoMap } from './mail-types';
4
+ import { AuthLoginTokenMailDtoV1, AuthPasswordResetMailDtoV1, EventCancelMailDtoV1, EventInviteMailDtoV1, IdeaStatusUpdateMailDtoV1, IdeaSubmittedMailDtoV1, LunchRouletteCancelMailDtoV1, LunchRouletteMatchedMailDtoV1, LunchRouletteSubmittedMailDtoV1, LunchRouletteUnmatchedMailDtoV1, NewsletterIssueMailDtoV1, NewsletterSubscribedMailDtoV1, NewsletterUnsubscribedMailDtoV1, NotificationMailDtoV1 } from './dtos';
6
5
  /**
7
6
  * MailService
8
7
  *
@@ -25,75 +24,75 @@ export declare class MailService extends BaseHttpService {
25
24
  * @param type - The type of email to send
26
25
  * @param payload - The payload DTO corresponding to the type
27
26
  */
28
- sendMail<Type extends MailType>(type: Type, payload: MailTypeDtoMap[Type]): void;
27
+ private sendMail;
29
28
  /**
30
29
  * Sends an email with a one-time login token.
31
- * @param {AuthLoginTokenMailDto} payload - DTO containing recipient and token.
30
+ * @param {AuthLoginTokenMailDtoV1} payload - DTO containing recipient and token.
32
31
  */
33
- sendAuthLoginTokenMail(payload: AuthLoginTokenMailDto): void;
32
+ sendAuthLoginTokenMailV1(payload: AuthLoginTokenMailDtoV1): void;
34
33
  /**
35
34
  * Sends a password reset email with a secure link.
36
- * @param {AuthPasswordResetMailDto} payload - DTO containing recipient and reset URL.
35
+ * @param {AuthPasswordResetMailDtoV1} payload - DTO containing recipient and reset URL.
37
36
  */
38
- sendAuthPasswordResetMail(payload: AuthPasswordResetMailDto): void;
37
+ sendAuthPasswordResetMailV1(payload: AuthPasswordResetMailDtoV1): void;
39
38
  /**
40
39
  * Sends an event invitation email.
41
- * @param {EventInviteMailDto} payload - DTO containing event details and recipient.
40
+ * @param {EventInviteMailDtoV1} payload - DTO containing event details and recipient.
42
41
  */
43
- sendEventInviteMail(payload: EventInviteMailDto): void;
42
+ sendEventInviteMailV1(payload: EventInviteMailDtoV1): void;
44
43
  /**
45
44
  * Sends a notification about an event cancellation.
46
- * @param {EventCancelMailDto} payload - DTO containing event title, time, and links.
45
+ * @param {EventCancelMailDtoV1} payload - DTO containing event title, time, and links.
47
46
  */
48
- sendEventCancelMail(payload: EventCancelMailDto): void;
47
+ sendEventCancelMailV1(payload: EventCancelMailDtoV1): void;
49
48
  /**
50
49
  * Sends a confirmation that an idea was submitted.
51
- * @param {IdeaSubmittedMailDto} payload - DTO containing recipient and management URL.
50
+ * @param {IdeaSubmittedMailDtoV1} payload - DTO containing recipient and management URL.
52
51
  */
53
- sendIdeaSubmittedMail(payload: IdeaSubmittedMailDto): void;
52
+ sendIdeaSubmittedMailV1(payload: IdeaSubmittedMailDtoV1): void;
54
53
  /**
55
54
  * Sends a notification that an idea's status has changed.
56
- * @param {IdeaStatusUpdateMailDto} payload - DTO containing the old and new status.
55
+ * @param {IdeaStatusUpdateMailDtoV1} payload - DTO containing the old and new status.
57
56
  */
58
- sendIdeaStatusUpdateMail(payload: IdeaStatusUpdateMailDto): void;
57
+ sendIdeaStatusUpdateMailV1(payload: IdeaStatusUpdateMailDtoV1): void;
59
58
  /**
60
59
  * Sends confirmation of lunch roulette participation.
61
- * @param {LunchRouletteSubmittedMailDto} payload - DTO with recipient, location, and type.
60
+ * @param {LunchRouletteSubmittedMailDtoV1} payload - DTO with recipient, location, and type.
62
61
  */
63
- sendLunchRouletteSubmittedMail(payload: LunchRouletteSubmittedMailDto): void;
62
+ sendLunchRouletteSubmittedMailV1(payload: LunchRouletteSubmittedMailDtoV1): void;
64
63
  /**
65
64
  * Sends a cancellation email for lunch roulette.
66
- * @param {LunchRouletteCancelMailDto} payload - DTO containing the recipient.
65
+ * @param {LunchRouletteCancelMailDtoV1} payload - DTO containing the recipient.
67
66
  */
68
- sendLunchRouletteCancelMail(payload: LunchRouletteCancelMailDto): void;
67
+ sendLunchRouletteCancelMailV1(payload: LunchRouletteCancelMailDtoV1): void;
69
68
  /**
70
69
  * Sends a match notification to lunch roulette participants.
71
- * @param {LunchRouletteMatchedMailDto} payload - DTO with recipients, message, and details URL.
70
+ * @param {LunchRouletteMatchedMailDtoV1} payload - DTO with recipients, message, and details URL.
72
71
  */
73
- sendLunchRouletteMatchedMail(payload: LunchRouletteMatchedMailDto): void;
72
+ sendLunchRouletteMatchedMailV1(payload: LunchRouletteMatchedMailDtoV1): void;
74
73
  /**
75
74
  * Notifies a user that they were unmatched in lunch roulette.
76
- * @param {LunchRouletteUnmatchedMailDto} payload - DTO with the unmatched recipient.
75
+ * @param {LunchRouletteUnmatchedMailDtoV1} payload - DTO with the unmatched recipient.
77
76
  */
78
- sendLunchRouletteUnmatchedMail(payload: LunchRouletteUnmatchedMailDto): void;
77
+ sendLunchRouletteUnmatchedMailV1(payload: LunchRouletteUnmatchedMailDtoV1): void;
79
78
  /**
80
79
  * Sends confirmation of a newsletter subscription.
81
- * @param {NewsletterSubscribedMailDto} payload - DTO with recipient information.
80
+ * @param {NewsletterSubscribedMailDtoV1} payload - DTO with recipient information.
82
81
  */
83
- sendNewsletterSubscribedMail(payload: NewsletterSubscribedMailDto): void;
82
+ sendNewsletterSubscribedMailV1(payload: NewsletterSubscribedMailDtoV1): void;
84
83
  /**
85
84
  * Sends confirmation of newsletter unsubscription.
86
- * @param {NewsletterUnsubscribedMailDto} payload - DTO with recipient information.
85
+ * @param {NewsletterUnsubscribedMailDtoV1} payload - DTO with recipient information.
87
86
  */
88
- sendNewsletterUnsubscribedMail(payload: NewsletterUnsubscribedMailDto): void;
87
+ sendNewsletterUnsubscribedMailV1(payload: NewsletterUnsubscribedMailDtoV1): void;
89
88
  /**
90
89
  * Sends the latest issue of the newsletter.
91
- * @param {NewsletterIssueMailDto} payload - DTO containing recipients, content, and metadata.
90
+ * @param {NewsletterIssueMailDtoV1} payload - DTO containing recipients, content, and metadata.
92
91
  */
93
- sendNewsletterIssueMail(payload: NewsletterIssueMailDto): void;
92
+ sendNewsletterIssueMailV1(payload: NewsletterIssueMailDtoV1): void;
94
93
  /**
95
94
  * Sends a general-purpose email notification.
96
- * @param {NotificationMailDto} payload - DTO with recipients, title, message, and optional URL.
95
+ * @param {NotificationMailDtoV1} payload - DTO with recipients, title, message, and optional URL.
97
96
  */
98
- sendNotificationMail(payload: NotificationMailDto): void;
97
+ sendNotificationMailV1(payload: NotificationMailDtoV1): void;
99
98
  }
@@ -18,6 +18,7 @@ const config_1 = require("@nestjs/config");
18
18
  const authentication_1 = require("../../../authentication");
19
19
  const base_http_service_1 = require("../../base-http.service");
20
20
  const base_urls_1 = require("../../base-urls");
21
+ const mail_types_1 = require("./mail-types");
21
22
  /**
22
23
  * MailService
23
24
  *
@@ -33,7 +34,7 @@ let MailService = class MailService extends base_http_service_1.BaseHttpService
33
34
  * @param configService NestJS configuration service for environment variables and URLs.
34
35
  */
35
36
  constructor(authenticationOptions, configService) {
36
- super('Mail', base_urls_1.BaseUrls.MailService, authenticationOptions, configService);
37
+ super('Mail', base_urls_1.BaseUrls.mailService, authenticationOptions, configService);
37
38
  }
38
39
  /**
39
40
  * Sends an email of the given type with the provided payload.
@@ -43,17 +44,15 @@ let MailService = class MailService extends base_http_service_1.BaseHttpService
43
44
  * @param payload - The payload DTO corresponding to the type
44
45
  */
45
46
  sendMail(type, payload) {
46
- // Email service expects paths like "auth/login-token"
47
- const endpoint = type.replace(/\./g, '/');
48
- this.logger.log(`Dispatching email to endpoint: ${endpoint}`);
49
- this.client
50
- .post(`internal/${endpoint}`, payload)
47
+ this.logger.log(`Dispatching email ${type}`);
48
+ this.httpClient
49
+ .post(mail_types_1.MailTypeEndpointMap[type], payload)
51
50
  .then(() => {
52
- this.logger.log(`Email sent successfully: ${type}`);
51
+ this.logger.log(`${type} email sent successfully`);
53
52
  })
54
53
  .catch((error) => {
55
54
  const { message } = this.parseError(error);
56
- this.logger.error(`Failed to send email: ${type}: ${message}`);
55
+ this.logger.error(`Failed to send ${type} email: ${message}`);
57
56
  });
58
57
  }
59
58
  // ─────────────────────────────────────────────
@@ -61,116 +60,116 @@ let MailService = class MailService extends base_http_service_1.BaseHttpService
61
60
  // ─────────────────────────────────────────────
62
61
  /**
63
62
  * Sends an email with a one-time login token.
64
- * @param {AuthLoginTokenMailDto} payload - DTO containing recipient and token.
63
+ * @param {AuthLoginTokenMailDtoV1} payload - DTO containing recipient and token.
65
64
  */
66
- sendAuthLoginTokenMail(payload) {
67
- this.sendMail('auth.login-token', payload);
65
+ sendAuthLoginTokenMailV1(payload) {
66
+ this.sendMail('v1.auth.login-token', payload);
68
67
  }
69
68
  /**
70
69
  * Sends a password reset email with a secure link.
71
- * @param {AuthPasswordResetMailDto} payload - DTO containing recipient and reset URL.
70
+ * @param {AuthPasswordResetMailDtoV1} payload - DTO containing recipient and reset URL.
72
71
  */
73
- sendAuthPasswordResetMail(payload) {
74
- this.sendMail('auth.password-reset', payload);
72
+ sendAuthPasswordResetMailV1(payload) {
73
+ this.sendMail('v1.auth.password-reset', payload);
75
74
  }
76
75
  // ─────────────────────────────────────────────
77
76
  // Event Emails
78
77
  // ─────────────────────────────────────────────
79
78
  /**
80
79
  * Sends an event invitation email.
81
- * @param {EventInviteMailDto} payload - DTO containing event details and recipient.
80
+ * @param {EventInviteMailDtoV1} payload - DTO containing event details and recipient.
82
81
  */
83
- sendEventInviteMail(payload) {
84
- this.sendMail('event.invite', payload);
82
+ sendEventInviteMailV1(payload) {
83
+ this.sendMail('v1.event.invite', payload);
85
84
  }
86
85
  /**
87
86
  * Sends a notification about an event cancellation.
88
- * @param {EventCancelMailDto} payload - DTO containing event title, time, and links.
87
+ * @param {EventCancelMailDtoV1} payload - DTO containing event title, time, and links.
89
88
  */
90
- sendEventCancelMail(payload) {
91
- this.sendMail('event.cancel', payload);
89
+ sendEventCancelMailV1(payload) {
90
+ this.sendMail('v1.event.cancel', payload);
92
91
  }
93
92
  // ─────────────────────────────────────────────
94
93
  // Idea Submission Emails
95
94
  // ─────────────────────────────────────────────
96
95
  /**
97
96
  * Sends a confirmation that an idea was submitted.
98
- * @param {IdeaSubmittedMailDto} payload - DTO containing recipient and management URL.
97
+ * @param {IdeaSubmittedMailDtoV1} payload - DTO containing recipient and management URL.
99
98
  */
100
- sendIdeaSubmittedMail(payload) {
101
- this.sendMail('idea.submitted', payload);
99
+ sendIdeaSubmittedMailV1(payload) {
100
+ this.sendMail('v1.idea.submitted', payload);
102
101
  }
103
102
  /**
104
103
  * Sends a notification that an idea's status has changed.
105
- * @param {IdeaStatusUpdateMailDto} payload - DTO containing the old and new status.
104
+ * @param {IdeaStatusUpdateMailDtoV1} payload - DTO containing the old and new status.
106
105
  */
107
- sendIdeaStatusUpdateMail(payload) {
108
- this.sendMail('idea.status-update', payload);
106
+ sendIdeaStatusUpdateMailV1(payload) {
107
+ this.sendMail('v1.idea.status-update', payload);
109
108
  }
110
109
  // ─────────────────────────────────────────────
111
110
  // Lunch Roulette Emails
112
111
  // ─────────────────────────────────────────────
113
112
  /**
114
113
  * Sends confirmation of lunch roulette participation.
115
- * @param {LunchRouletteSubmittedMailDto} payload - DTO with recipient, location, and type.
114
+ * @param {LunchRouletteSubmittedMailDtoV1} payload - DTO with recipient, location, and type.
116
115
  */
117
- sendLunchRouletteSubmittedMail(payload) {
118
- this.sendMail('lunch-roulette.submitted', payload);
116
+ sendLunchRouletteSubmittedMailV1(payload) {
117
+ this.sendMail('v1.lunch-roulette.submitted', payload);
119
118
  }
120
119
  /**
121
120
  * Sends a cancellation email for lunch roulette.
122
- * @param {LunchRouletteCancelMailDto} payload - DTO containing the recipient.
121
+ * @param {LunchRouletteCancelMailDtoV1} payload - DTO containing the recipient.
123
122
  */
124
- sendLunchRouletteCancelMail(payload) {
125
- this.sendMail('lunch-roulette.cancel', payload);
123
+ sendLunchRouletteCancelMailV1(payload) {
124
+ this.sendMail('v1.lunch-roulette.cancel', payload);
126
125
  }
127
126
  /**
128
127
  * Sends a match notification to lunch roulette participants.
129
- * @param {LunchRouletteMatchedMailDto} payload - DTO with recipients, message, and details URL.
128
+ * @param {LunchRouletteMatchedMailDtoV1} payload - DTO with recipients, message, and details URL.
130
129
  */
131
- sendLunchRouletteMatchedMail(payload) {
132
- this.sendMail('lunch-roulette.matched', payload);
130
+ sendLunchRouletteMatchedMailV1(payload) {
131
+ this.sendMail('v1.lunch-roulette.matched', payload);
133
132
  }
134
133
  /**
135
134
  * Notifies a user that they were unmatched in lunch roulette.
136
- * @param {LunchRouletteUnmatchedMailDto} payload - DTO with the unmatched recipient.
135
+ * @param {LunchRouletteUnmatchedMailDtoV1} payload - DTO with the unmatched recipient.
137
136
  */
138
- sendLunchRouletteUnmatchedMail(payload) {
139
- this.sendMail('lunch-roulette.unmatched', payload);
137
+ sendLunchRouletteUnmatchedMailV1(payload) {
138
+ this.sendMail('v1.lunch-roulette.unmatched', payload);
140
139
  }
141
140
  // ─────────────────────────────────────────────
142
141
  // Newsletter Emails
143
142
  // ─────────────────────────────────────────────
144
143
  /**
145
144
  * Sends confirmation of a newsletter subscription.
146
- * @param {NewsletterSubscribedMailDto} payload - DTO with recipient information.
145
+ * @param {NewsletterSubscribedMailDtoV1} payload - DTO with recipient information.
147
146
  */
148
- sendNewsletterSubscribedMail(payload) {
149
- this.sendMail('newsletter.subscribed', payload);
147
+ sendNewsletterSubscribedMailV1(payload) {
148
+ this.sendMail('v1.newsletter.subscribed', payload);
150
149
  }
151
150
  /**
152
151
  * Sends confirmation of newsletter unsubscription.
153
- * @param {NewsletterUnsubscribedMailDto} payload - DTO with recipient information.
152
+ * @param {NewsletterUnsubscribedMailDtoV1} payload - DTO with recipient information.
154
153
  */
155
- sendNewsletterUnsubscribedMail(payload) {
156
- this.sendMail('newsletter.unsubscribed', payload);
154
+ sendNewsletterUnsubscribedMailV1(payload) {
155
+ this.sendMail('v1.newsletter.unsubscribed', payload);
157
156
  }
158
157
  /**
159
158
  * Sends the latest issue of the newsletter.
160
- * @param {NewsletterIssueMailDto} payload - DTO containing recipients, content, and metadata.
159
+ * @param {NewsletterIssueMailDtoV1} payload - DTO containing recipients, content, and metadata.
161
160
  */
162
- sendNewsletterIssueMail(payload) {
163
- this.sendMail('newsletter.issue', payload);
161
+ sendNewsletterIssueMailV1(payload) {
162
+ this.sendMail('v1.newsletter.issue', payload);
164
163
  }
165
164
  // ─────────────────────────────────────────────
166
165
  // Notification Emails
167
166
  // ─────────────────────────────────────────────
168
167
  /**
169
168
  * Sends a general-purpose email notification.
170
- * @param {NotificationMailDto} payload - DTO with recipients, title, message, and optional URL.
169
+ * @param {NotificationMailDtoV1} payload - DTO with recipients, title, message, and optional URL.
171
170
  */
172
- sendNotificationMail(payload) {
173
- this.sendMail('notification.notification', payload);
171
+ sendNotificationMailV1(payload) {
172
+ this.sendMail('v1.notification.notification', payload);
174
173
  }
175
174
  };
176
175
  exports.MailService = MailService;
@@ -1,3 +1,4 @@
1
+ import { User } from '../../../../../models';
1
2
  /**
2
3
  * Recipient class
3
4
  * @class Recipient
@@ -24,4 +25,5 @@ export declare class MailRecipient {
24
25
  * @returns {string} The string representation of the recipient
25
26
  */
26
27
  toString(): string;
28
+ static fromUser(user: User): MailRecipient;
27
29
  }
@@ -36,6 +36,9 @@ class MailRecipient {
36
36
  toString() {
37
37
  return `${this.username} (${this.email})`;
38
38
  }
39
+ static fromUser(user) {
40
+ return new MailRecipient(user.email, user.username);
41
+ }
39
42
  }
40
43
  exports.MailRecipient = MailRecipient;
41
44
  __decorate([
@@ -0,0 +1,16 @@
1
+ import { BaseFetchOptions, CommentsFetchOptions, ContentFetchOptions, DraftedFetchOptions, LikedByFetchOptions, TimestampsFetchOptions, ViewedByFetchOptions } from '../../../../classes';
2
+ /**
3
+ * FetchIssueOptionsDtoV1
4
+ *
5
+ * Data Transfer Object for querying issue collections.
6
+ * Inherits timestamp filtering fields and extends them with
7
+ * issue-specific query parameters.
8
+ */
9
+ export type FetchIssueOptionsDtoV1 = BaseFetchOptions & TimestampsFetchOptions & DraftedFetchOptions & ContentFetchOptions & ViewedByFetchOptions & LikedByFetchOptions & CommentsFetchOptions & {
10
+ topic?: string;
11
+ topics?: string[];
12
+ year?: number;
13
+ month?: number;
14
+ timestampMin?: number;
15
+ timestampMax?: number;
16
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from './fetch-issue-options.dto.v1.type';
2
+ export * from './newsletter.service';
@@ -0,0 +1,18 @@
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("./fetch-issue-options.dto.v1.type"), exports);
18
+ __exportStar(require("./newsletter.service"), exports);
@@ -0,0 +1,49 @@
1
+ import { ConfigService } from '@nestjs/config';
2
+ import { LabNewsletter } from 'itlab-functions';
3
+ import { AuthenticationModuleOptions } from '../../../authentication';
4
+ import { BaseHttpService } from '../../base-http.service';
5
+ import { FetchIssueOptionsDtoV1 } from './fetch-issue-options.dto.v1.type';
6
+ /**
7
+ * NewsletterService
8
+ *
9
+ * Service client responsible for interacting with the Newsletter microservice.
10
+ * Extends `BaseHttpService` to inherit:
11
+ * - Environment-sensitive URL resolution (internal vs. external).
12
+ * - Secure inter-service authentication.
13
+ * - Structured logging for traceability of outbound requests.
14
+ *
15
+ * Why this pattern?
16
+ * - Ensures all outbound calls follow a unified configuration and logging structure.
17
+ * - Promotes strong typing and maintainable HTTP logic.
18
+ * - Makes service interactions predictable and debuggable across environments.
19
+ */
20
+ export declare class NewsletterService extends BaseHttpService {
21
+ /**
22
+ * Constructs an Newsletter service client instance.
23
+ *
24
+ * @param {AuthenticationModuleOptions} authenticationOptions - Injected authentication configuration.
25
+ * @param {ConfigService} configService - NestJS ConfigService for environment detection.
26
+ */
27
+ constructor(authenticationOptions: AuthenticationModuleOptions, configService: ConfigService);
28
+ /**
29
+ * Retrieves a single issue entry by its MongoDB identifier.
30
+ *
31
+ * This method gracefully handles downstream failures by logging
32
+ * and returning `undefined` instead of throwing.
33
+ *
34
+ * @param {string} issueId - Unique MongoDB identifier of the issue.
35
+ * @param {FetchIssueOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
36
+ * @returns {Promise<LabNewsletter | undefined>} Resolves to an Issue or `undefined` on failure.
37
+ */
38
+ fetchIssueV1(issueId: string, options?: FetchIssueOptionsDtoV1): Promise<LabNewsletter | undefined>;
39
+ /**
40
+ * Retrieves a collection of issue entries.
41
+ *
42
+ * Useful for batch lookups or paginated listings.
43
+ * Returns an empty array if the downstream service call fails.
44
+ *
45
+ * @param {FetchIssueOptionsDtoV1} [options] - Optional filter options for narrowing results.
46
+ * @returns {Promise<LabNewsletter[]>} Resolves to a list of issues, or an empty array if none found.
47
+ */
48
+ fetchIssueCollectionV1(options?: FetchIssueOptionsDtoV1): Promise<LabNewsletter[]>;
49
+ }
@@ -0,0 +1,79 @@
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.NewsletterService = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const config_1 = require("@nestjs/config");
18
+ const authentication_1 = require("../../../authentication");
19
+ const base_http_service_1 = require("../../base-http.service");
20
+ const base_urls_1 = require("../../base-urls");
21
+ /**
22
+ * NewsletterService
23
+ *
24
+ * Service client responsible for interacting with the Newsletter microservice.
25
+ * Extends `BaseHttpService` to inherit:
26
+ * - Environment-sensitive URL resolution (internal vs. external).
27
+ * - Secure inter-service authentication.
28
+ * - Structured logging for traceability of outbound requests.
29
+ *
30
+ * Why this pattern?
31
+ * - Ensures all outbound calls follow a unified configuration and logging structure.
32
+ * - Promotes strong typing and maintainable HTTP logic.
33
+ * - Makes service interactions predictable and debuggable across environments.
34
+ */
35
+ let NewsletterService = class NewsletterService extends base_http_service_1.BaseHttpService {
36
+ /**
37
+ * Constructs an Newsletter service client instance.
38
+ *
39
+ * @param {AuthenticationModuleOptions} authenticationOptions - Injected authentication configuration.
40
+ * @param {ConfigService} configService - NestJS ConfigService for environment detection.
41
+ */
42
+ constructor(authenticationOptions, configService) {
43
+ super('Newsletter', base_urls_1.BaseUrls.newsletterService, authenticationOptions, configService);
44
+ }
45
+ // ─────────────────────────────────────────────────────────────
46
+ // Issue Resource Methods
47
+ // ─────────────────────────────────────────────────────────────
48
+ /**
49
+ * Retrieves a single issue entry by its MongoDB identifier.
50
+ *
51
+ * This method gracefully handles downstream failures by logging
52
+ * and returning `undefined` instead of throwing.
53
+ *
54
+ * @param {string} issueId - Unique MongoDB identifier of the issue.
55
+ * @param {FetchIssueOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
56
+ * @returns {Promise<LabNewsletter | undefined>} Resolves to an Issue or `undefined` on failure.
57
+ */
58
+ async fetchIssueV1(issueId, options) {
59
+ return this.fetchResource(`v1/internal/issue/${issueId}`, { params: options });
60
+ }
61
+ /**
62
+ * Retrieves a collection of issue entries.
63
+ *
64
+ * Useful for batch lookups or paginated listings.
65
+ * Returns an empty array if the downstream service call fails.
66
+ *
67
+ * @param {FetchIssueOptionsDtoV1} [options] - Optional filter options for narrowing results.
68
+ * @returns {Promise<LabNewsletter[]>} Resolves to a list of issues, or an empty array if none found.
69
+ */
70
+ async fetchIssueCollectionV1(options) {
71
+ return this.fetchResourceCollection(`v1/internal/issues`, { params: options });
72
+ }
73
+ };
74
+ exports.NewsletterService = NewsletterService;
75
+ exports.NewsletterService = NewsletterService = __decorate([
76
+ (0, common_1.Injectable)(),
77
+ __param(0, (0, authentication_1.InjectAuthenticationOptions)()),
78
+ __metadata("design:paramtypes", [Object, config_1.ConfigService])
79
+ ], NewsletterService);
@@ -0,0 +1,20 @@
1
+ import { BaseFetchOptions, CommentsFetchOptions, ContentFetchOptions, DraftedFetchOptions, LikedByFetchOptions, TimestampsFetchOptions, ViewedByFetchOptions } from '../../../../classes';
2
+ /**
3
+ * FetchNewsOptionsDtoV1
4
+ *
5
+ * Data Transfer Object for querying news or user collections.
6
+ * Inherits timestamp filtering fields and extends them with
7
+ * news-specific query parameters.
8
+ */
9
+ export type FetchNewsOptionsDtoV1 = BaseFetchOptions & TimestampsFetchOptions & DraftedFetchOptions & ContentFetchOptions & ViewedByFetchOptions & LikedByFetchOptions & CommentsFetchOptions & {
10
+ includeAuthors?: boolean;
11
+ isFeatured?: boolean;
12
+ topic?: string;
13
+ topics?: string[];
14
+ authorId?: string;
15
+ authorIds?: string[];
16
+ year?: number;
17
+ month?: number;
18
+ timestampMin?: number;
19
+ timestampMax?: number;
20
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from './fetch-news-options.dto.v1.type';
2
+ export * from './newsroom.service';
@@ -0,0 +1,18 @@
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("./fetch-news-options.dto.v1.type"), exports);
18
+ __exportStar(require("./newsroom.service"), exports);
@@ -0,0 +1,49 @@
1
+ import { ConfigService } from '@nestjs/config';
2
+ import { LabNews } from 'itlab-functions';
3
+ import { AuthenticationModuleOptions } from '../../../authentication';
4
+ import { BaseHttpService } from '../../base-http.service';
5
+ import { FetchNewsOptionsDtoV1 } from './fetch-news-options.dto.v1.type';
6
+ /**
7
+ * NewsroomService
8
+ *
9
+ * Service client responsible for interacting with the Newsroom microservice.
10
+ * Extends `BaseHttpService` to inherit:
11
+ * - Environment-sensitive URL resolution (internal vs. external).
12
+ * - Secure inter-service authentication.
13
+ * - Structured logging for traceability of outbound requests.
14
+ *
15
+ * Why this pattern?
16
+ * - Ensures all outbound calls follow a unified configuration and logging structure.
17
+ * - Promotes strong typing and maintainable HTTP logic.
18
+ * - Makes service interactions predictable and debuggable across environments.
19
+ */
20
+ export declare class NewsroomService extends BaseHttpService {
21
+ /**
22
+ * Constructs an Newsroom service client instance.
23
+ *
24
+ * @param {AuthenticationModuleOptions} authenticationOptions - Injected authentication configuration.
25
+ * @param {ConfigService} configService - NestJS ConfigService for environment detection.
26
+ */
27
+ constructor(authenticationOptions: AuthenticationModuleOptions, configService: ConfigService);
28
+ /**
29
+ * Retrieves a single news entry by its MongoDB identifier.
30
+ *
31
+ * This method gracefully handles downstream failures by logging
32
+ * and returning `undefined` instead of throwing.
33
+ *
34
+ * @param {string} newsId - Unique MongoDB identifier of the news.
35
+ * @param {FetchNewsOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
36
+ * @returns {Promise<LabNews | undefined>} Resolves to an News or `undefined` on failure.
37
+ */
38
+ fetchNewsV1(newsId: string, options?: FetchNewsOptionsDtoV1): Promise<LabNews | undefined>;
39
+ /**
40
+ * Retrieves a collection of news entries.
41
+ *
42
+ * Useful for batch lookups or paginated listings.
43
+ * Returns an empty array if the downstream service call fails.
44
+ *
45
+ * @param {FetchNewsOptionsDtoV1} [options] - Optional filter options for narrowing results.
46
+ * @returns {Promise<LabNews[]>} Resolves to a list of news, or an empty array if none found.
47
+ */
48
+ fetchNewsCollectionV1(options?: FetchNewsOptionsDtoV1): Promise<LabNews[]>;
49
+ }