itlab-internal-services 2.16.12 → 2.16.13

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 (126) hide show
  1. package/dist/classes/document/content-document.class.d.ts +2 -2
  2. package/dist/classes/fetch-options/content-options.class.d.ts +2 -2
  3. package/dist/hub-resource.enum.d.ts +0 -23
  4. package/dist/hub-resource.enum.js +1 -25
  5. package/dist/index.d.ts +0 -6
  6. package/dist/index.js +0 -10
  7. package/dist/modules/comments/comments.controller.d.ts +3 -3
  8. package/dist/modules/comments/comments.controller.js +1 -1
  9. package/dist/modules/comments/comments.service.d.ts +3 -3
  10. package/dist/modules/comments/comments.service.js +1 -1
  11. package/dist/modules/services/providers/books/books.service.d.ts +5 -5
  12. package/dist/modules/services/providers/books/books.service.js +2 -2
  13. package/dist/modules/services/providers/changelog/changelog.service.d.ts +1 -14
  14. package/dist/modules/services/providers/conflicts/conflicts.service.d.ts +5 -15
  15. package/dist/modules/services/providers/conflicts/conflicts.service.js +2 -2
  16. package/dist/modules/services/providers/content/content-return-types.d.ts +5 -5
  17. package/dist/modules/services/providers/content/content.service.d.ts +7 -6
  18. package/dist/modules/services/providers/demo-hive/demo-hive.service.d.ts +5 -5
  19. package/dist/modules/services/providers/demo-hive/demo-hive.service.js +2 -2
  20. package/dist/modules/services/providers/events/events.service.d.ts +5 -5
  21. package/dist/modules/services/providers/events/events.service.js +2 -2
  22. package/dist/modules/services/providers/files/files.service.d.ts +9 -30
  23. package/dist/modules/services/providers/files/files.service.js +4 -4
  24. package/dist/modules/services/providers/mail/dtos/newsletter-issue-mail.dto.v1.d.ts +2 -2
  25. package/dist/modules/services/providers/newsletter/newsletter.service.d.ts +5 -5
  26. package/dist/modules/services/providers/newsletter/newsletter.service.js +2 -2
  27. package/dist/modules/services/providers/newsroom/newsroom.service.d.ts +5 -5
  28. package/dist/modules/services/providers/newsroom/newsroom.service.js +2 -2
  29. package/dist/modules/services/providers/notifications/notifications.service.d.ts +5 -18
  30. package/dist/modules/services/providers/notifications/notifications.service.js +5 -3
  31. package/dist/modules/services/providers/podcasts/podcasts.service.d.ts +5 -5
  32. package/dist/modules/services/providers/podcasts/podcasts.service.js +2 -2
  33. package/dist/modules/services/providers/quick-links/quick-links.service.d.ts +5 -17
  34. package/dist/modules/services/providers/quick-links/quick-links.service.js +2 -2
  35. package/dist/pipes/restricted-fields.pipe.js +3 -1
  36. package/package.json +23 -23
  37. package/dist/classes/document-updater.class.d.ts +0 -40
  38. package/dist/classes/document-updater.class.js +0 -58
  39. package/dist/factories/index.d.ts +0 -1
  40. package/dist/factories/index.js +0 -5
  41. package/dist/factories/virtuals.factory.d.ts +0 -80
  42. package/dist/factories/virtuals.factory.js +0 -172
  43. package/dist/functions/create-duplicate-checker.function.d.ts +0 -29
  44. package/dist/functions/create-duplicate-checker.function.js +0 -52
  45. package/dist/likeable.interface.d.ts +0 -42
  46. package/dist/likeable.interface.js +0 -48
  47. package/dist/modules/_old/comment/comment.controller.d.ts +0 -35
  48. package/dist/modules/_old/comment/comment.controller.js +0 -86
  49. package/dist/modules/_old/comment/comment.model.d.ts +0 -29
  50. package/dist/modules/_old/comment/comment.model.js +0 -43
  51. package/dist/modules/_old/comment/comment.module-definition.d.ts +0 -45
  52. package/dist/modules/_old/comment/comment.module-definition.js +0 -8
  53. package/dist/modules/_old/comment/comment.module.d.ts +0 -22
  54. package/dist/modules/_old/comment/comment.module.js +0 -71
  55. package/dist/modules/_old/comment/comment.service.d.ts +0 -54
  56. package/dist/modules/_old/comment/comment.service.js +0 -133
  57. package/dist/modules/_old/comment/index.d.ts +0 -3
  58. package/dist/modules/_old/comment/index.js +0 -9
  59. package/dist/modules/_old/content/content.module-definition.d.ts +0 -5
  60. package/dist/modules/_old/content/content.module-definition.js +0 -8
  61. package/dist/modules/_old/content/content.module.d.ts +0 -31
  62. package/dist/modules/_old/content/content.module.js +0 -60
  63. package/dist/modules/_old/content/content.service.d.ts +0 -50
  64. package/dist/modules/_old/content/content.service.js +0 -145
  65. package/dist/modules/_old/content/index.d.ts +0 -2
  66. package/dist/modules/_old/content/index.js +0 -7
  67. package/dist/modules/_old/database/database-module-options.interface.d.ts +0 -41
  68. package/dist/modules/_old/database/database-module-options.interface.js +0 -2
  69. package/dist/modules/_old/database/database.liveness-controller.d.ts +0 -27
  70. package/dist/modules/_old/database/database.liveness-controller.js +0 -80
  71. package/dist/modules/_old/database/database.module.d.ts +0 -41
  72. package/dist/modules/_old/database/database.module.js +0 -97
  73. package/dist/modules/_old/database/index.d.ts +0 -6
  74. package/dist/modules/_old/database/index.js +0 -13
  75. package/dist/modules/_old/database/lock-service/lock.schema.d.ts +0 -38
  76. package/dist/modules/_old/database/lock-service/lock.schema.js +0 -51
  77. package/dist/modules/_old/database/lock-service/lock.service.d.ts +0 -53
  78. package/dist/modules/_old/database/lock-service/lock.service.js +0 -103
  79. package/dist/modules/_old/database/model-service/dbs/hub-account.db.d.ts +0 -28
  80. package/dist/modules/_old/database/model-service/dbs/hub-account.db.js +0 -44
  81. package/dist/modules/_old/database/model-service/dbs/hub-books.db.d.ts +0 -23
  82. package/dist/modules/_old/database/model-service/dbs/hub-books.db.js +0 -45
  83. package/dist/modules/_old/database/model-service/dbs/hub-comments.db.d.ts +0 -29
  84. package/dist/modules/_old/database/model-service/dbs/hub-comments.db.js +0 -68
  85. package/dist/modules/_old/database/model-service/dbs/hub-content.db.d.ts +0 -24
  86. package/dist/modules/_old/database/model-service/dbs/hub-content.db.js +0 -49
  87. package/dist/modules/_old/database/model-service/dbs/hub-demo-hive.db.d.ts +0 -23
  88. package/dist/modules/_old/database/model-service/dbs/hub-demo-hive.db.js +0 -45
  89. package/dist/modules/_old/database/model-service/dbs/hub-events.db.d.ts +0 -24
  90. package/dist/modules/_old/database/model-service/dbs/hub-events.db.js +0 -49
  91. package/dist/modules/_old/database/model-service/dbs/hub-hackschool.db.d.ts +0 -60
  92. package/dist/modules/_old/database/model-service/dbs/hub-hackschool.db.js +0 -106
  93. package/dist/modules/_old/database/model-service/dbs/hub-newsroom.db.d.ts +0 -25
  94. package/dist/modules/_old/database/model-service/dbs/hub-newsroom.db.js +0 -53
  95. package/dist/modules/_old/database/model-service/dbs/hub-podcasts.db.d.ts +0 -23
  96. package/dist/modules/_old/database/model-service/dbs/hub-podcasts.db.js +0 -45
  97. package/dist/modules/_old/database/model-service/dbs/hub-team.db.d.ts +0 -22
  98. package/dist/modules/_old/database/model-service/dbs/hub-team.db.js +0 -41
  99. package/dist/modules/_old/database/model-service/dbs/hub-tech-radar.db.d.ts +0 -42
  100. package/dist/modules/_old/database/model-service/dbs/hub-tech-radar.db.js +0 -81
  101. package/dist/modules/_old/database/model-service/model.service.d.ts +0 -8465
  102. package/dist/modules/_old/database/model-service/model.service.js +0 -136
  103. package/dist/modules/_old/database/populate-service/populate.service.d.ts +0 -73
  104. package/dist/modules/_old/database/populate-service/populate.service.js +0 -163
  105. package/dist/modules/_old/database/service-mapper-service/service-mapper.service.d.ts +0 -32
  106. package/dist/modules/_old/database/service-mapper-service/service-mapper.service.js +0 -73
  107. package/dist/modules/_old/fetch/fetch.module.d.ts +0 -31
  108. package/dist/modules/_old/fetch/fetch.module.js +0 -60
  109. package/dist/modules/_old/fetch/fetch.service.d.ts +0 -153
  110. package/dist/modules/_old/fetch/fetch.service.js +0 -274
  111. package/dist/modules/_old/fetch/index.d.ts +0 -2
  112. package/dist/modules/_old/fetch/index.js +0 -7
  113. package/dist/modules/_old/index.d.ts +0 -5
  114. package/dist/modules/_old/index.js +0 -21
  115. package/dist/modules/_old/like/index.d.ts +0 -1
  116. package/dist/modules/_old/like/index.js +0 -5
  117. package/dist/modules/_old/like/like.controller.d.ts +0 -41
  118. package/dist/modules/_old/like/like.controller.js +0 -125
  119. package/dist/modules/_old/like/like.module-definition.d.ts +0 -20
  120. package/dist/modules/_old/like/like.module-definition.js +0 -8
  121. package/dist/modules/_old/like/like.module.d.ts +0 -21
  122. package/dist/modules/_old/like/like.module.js +0 -67
  123. package/dist/modules/_old/like/like.service.d.ts +0 -61
  124. package/dist/modules/_old/like/like.service.js +0 -103
  125. package/dist/viewable.interface.d.ts +0 -42
  126. package/dist/viewable.interface.js +0 -48
@@ -1,5 +1,5 @@
1
1
  import { ConfigService } from '@nestjs/config';
2
- import { LabNewsletter } from 'itlab-functions';
2
+ import { LabNewsletterIssue } from 'itlab-functions';
3
3
  import { AuthenticationModuleOptions } from '../../../authentication';
4
4
  import { BaseHttpService } from '../../base-http.service';
5
5
  import { FetchIssueOptionsDtoV1 } from './fetch-issue-options.dto.v1.type';
@@ -33,9 +33,9 @@ export declare class NewsletterService extends BaseHttpService {
33
33
  *
34
34
  * @param {string} issueId - Unique MongoDB identifier of the issue.
35
35
  * @param {FetchIssueOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
36
- * @returns {Promise<LabNewsletter | undefined>} Resolves to an Issue or `undefined` on failure.
36
+ * @returns {Promise<LabNewsletterIssue | undefined>} Resolves to an Issue or `undefined` on failure.
37
37
  */
38
- fetchIssueV1(issueId: string, options?: FetchIssueOptionsDtoV1): Promise<LabNewsletter | undefined>;
38
+ fetchIssueV1(issueId: string, options?: FetchIssueOptionsDtoV1): Promise<LabNewsletterIssue | undefined>;
39
39
  /**
40
40
  * Retrieves a collection of issue entries.
41
41
  *
@@ -43,7 +43,7 @@ export declare class NewsletterService extends BaseHttpService {
43
43
  * Returns an empty array if the downstream service call fails.
44
44
  *
45
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.
46
+ * @returns {Promise<LabNewsletterIssue[]>} Resolves to a list of issues, or an empty array if none found.
47
47
  */
48
- fetchIssueCollectionV1(options?: FetchIssueOptionsDtoV1): Promise<LabNewsletter[]>;
48
+ fetchIssueCollectionV1(options?: FetchIssueOptionsDtoV1): Promise<LabNewsletterIssue[]>;
49
49
  }
@@ -53,7 +53,7 @@ let NewsletterService = class NewsletterService extends base_http_service_1.Base
53
53
  *
54
54
  * @param {string} issueId - Unique MongoDB identifier of the issue.
55
55
  * @param {FetchIssueOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
56
- * @returns {Promise<LabNewsletter | undefined>} Resolves to an Issue or `undefined` on failure.
56
+ * @returns {Promise<LabNewsletterIssue | undefined>} Resolves to an Issue or `undefined` on failure.
57
57
  */
58
58
  async fetchIssueV1(issueId, options) {
59
59
  return this.fetchResource(`v1/internal/issue/${issueId}`, { params: options });
@@ -65,7 +65,7 @@ let NewsletterService = class NewsletterService extends base_http_service_1.Base
65
65
  * Returns an empty array if the downstream service call fails.
66
66
  *
67
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.
68
+ * @returns {Promise<LabNewsletterIssue[]>} Resolves to a list of issues, or an empty array if none found.
69
69
  */
70
70
  async fetchIssueCollectionV1(options) {
71
71
  return this.fetchResourceCollection(`v1/internal/issues`, { params: options });
@@ -1,5 +1,5 @@
1
1
  import { ConfigService } from '@nestjs/config';
2
- import { LabNews } from 'itlab-functions';
2
+ import { LabNewsroomNews } from 'itlab-functions';
3
3
  import { AuthenticationModuleOptions } from '../../../authentication';
4
4
  import { BaseHttpService } from '../../base-http.service';
5
5
  import { FetchNewsOptionsDtoV1 } from './fetch-news-options.dto.v1.type';
@@ -33,9 +33,9 @@ export declare class NewsroomService extends BaseHttpService {
33
33
  *
34
34
  * @param {string} newsId - Unique MongoDB identifier of the news.
35
35
  * @param {FetchNewsOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
36
- * @returns {Promise<LabNews | undefined>} Resolves to an News or `undefined` on failure.
36
+ * @returns {Promise<LabNewsroomNews | undefined>} Resolves to an News or `undefined` on failure.
37
37
  */
38
- fetchNewsV1(newsId: string, options?: FetchNewsOptionsDtoV1): Promise<LabNews | undefined>;
38
+ fetchNewsV1(newsId: string, options?: FetchNewsOptionsDtoV1): Promise<LabNewsroomNews | undefined>;
39
39
  /**
40
40
  * Retrieves a collection of news entries.
41
41
  *
@@ -43,7 +43,7 @@ export declare class NewsroomService extends BaseHttpService {
43
43
  * Returns an empty array if the downstream service call fails.
44
44
  *
45
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.
46
+ * @returns {Promise<LabNewsroomNews[]>} Resolves to a list of news, or an empty array if none found.
47
47
  */
48
- fetchNewsCollectionV1(options?: FetchNewsOptionsDtoV1): Promise<LabNews[]>;
48
+ fetchNewsCollectionV1(options?: FetchNewsOptionsDtoV1): Promise<LabNewsroomNews[]>;
49
49
  }
@@ -53,7 +53,7 @@ let NewsroomService = class NewsroomService extends base_http_service_1.BaseHttp
53
53
  *
54
54
  * @param {string} newsId - Unique MongoDB identifier of the news.
55
55
  * @param {FetchNewsOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
56
- * @returns {Promise<LabNews | undefined>} Resolves to an News or `undefined` on failure.
56
+ * @returns {Promise<LabNewsroomNews | undefined>} Resolves to an News or `undefined` on failure.
57
57
  */
58
58
  async fetchNewsV1(newsId, options) {
59
59
  return this.fetchResource(`v1/internal/news/${newsId}`, { params: options });
@@ -65,7 +65,7 @@ let NewsroomService = class NewsroomService extends base_http_service_1.BaseHttp
65
65
  * Returns an empty array if the downstream service call fails.
66
66
  *
67
67
  * @param {FetchNewsOptionsDtoV1} [options] - Optional filter options for narrowing results.
68
- * @returns {Promise<LabNews[]>} Resolves to a list of news, or an empty array if none found.
68
+ * @returns {Promise<LabNewsroomNews[]>} Resolves to a list of news, or an empty array if none found.
69
69
  */
70
70
  async fetchNewsCollectionV1(options) {
71
71
  return this.fetchResourceCollection(`v1/internal/news`, { params: options });
@@ -1,5 +1,6 @@
1
1
  import { DynamicModule } from '@nestjs/common';
2
2
  import { ConfigService } from '@nestjs/config';
3
+ import { LabNotificationsNotification } from 'itlab-functions';
3
4
  import { HubResource } from '../../../../hub-resource.enum';
4
5
  import { AuthenticationModuleOptions } from '../../../authentication';
5
6
  import { BaseHttpService } from '../../base-http.service';
@@ -10,19 +11,6 @@ import { FetchNotificationOptionsDtoV1 } from './fetch-notification-options.dto.
10
11
  * Parameter decorator to inject the feature-specific NotificationService.
11
12
  */
12
13
  export declare function InjectFeatureNotificationsService(): ParameterDecorator;
13
- type LabNotification = {
14
- id: string;
15
- _resource: string;
16
- _resourceId: string;
17
- url: string;
18
- type: string;
19
- title: string;
20
- message: string;
21
- timestamp: number;
22
- status: 'pending' | 'sending' | 'delivered';
23
- draft: boolean;
24
- recipientIds: string[];
25
- };
26
14
  /**
27
15
  * NotificationService
28
16
  *
@@ -54,9 +42,9 @@ export declare class NotificationsService extends BaseHttpService {
54
42
  *
55
43
  * @param {string} notificationId - Unique MongoDB identifier of the notification.
56
44
  * @param {FetchNotificationOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
57
- * @returns {Promise<LabNotification | undefined>} Resolves to an Notification or `undefined` on failure.
45
+ * @returns {Promise<LabNotificationsNotification | undefined>} Resolves to an Notification or `undefined` on failure.
58
46
  */
59
- fetchNotificationV1(notificationId: string, options?: FetchNotificationOptionsDtoV1): Promise<LabNotification | undefined>;
47
+ fetchNotificationV1(notificationId: string, options?: FetchNotificationOptionsDtoV1): Promise<LabNotificationsNotification | undefined>;
60
48
  /**
61
49
  * Retrieves a collection of notification entries.
62
50
  *
@@ -64,9 +52,9 @@ export declare class NotificationsService extends BaseHttpService {
64
52
  * Returns an empty array if the downstream service call fails.
65
53
  *
66
54
  * @param {FetchNotificationOptionsDtoV1} [options] - Optional filter options for narrowing results.
67
- * @returns {Promise<LabNotification[]>} Resolves to a list of notifications, or an empty array if none found.
55
+ * @returns {Promise<LabNotificationsNotification[]>} Resolves to a list of notifications, or an empty array if none found.
68
56
  */
69
- fetchNotificationCollectionV1(options?: FetchNotificationOptionsDtoV1): Promise<LabNotification[]>;
57
+ fetchNotificationCollectionV1(options?: FetchNotificationOptionsDtoV1): Promise<LabNotificationsNotification[]>;
70
58
  /**
71
59
  * Schedules or reschedules a notification for a given resource.
72
60
  * Updates existing notifications if necessary.
@@ -83,4 +71,3 @@ export declare class NotificationsService extends BaseHttpService {
83
71
  */
84
72
  deleteNotificationsV1(resourceId: string): void;
85
73
  }
86
- export {};
@@ -84,10 +84,12 @@ let NotificationsService = NotificationsService_1 = class NotificationsService e
84
84
  *
85
85
  * @param {string} notificationId - Unique MongoDB identifier of the notification.
86
86
  * @param {FetchNotificationOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
87
- * @returns {Promise<LabNotification | undefined>} Resolves to an Notification or `undefined` on failure.
87
+ * @returns {Promise<LabNotificationsNotification | undefined>} Resolves to an Notification or `undefined` on failure.
88
88
  */
89
89
  async fetchNotificationV1(notificationId, options) {
90
- return this.fetchResource(`v1/internal/notification/${notificationId}`, { params: options });
90
+ return this.fetchResource(`v1/internal/notification/${notificationId}`, {
91
+ params: options,
92
+ });
91
93
  }
92
94
  /**
93
95
  * Retrieves a collection of notification entries.
@@ -96,7 +98,7 @@ let NotificationsService = NotificationsService_1 = class NotificationsService e
96
98
  * Returns an empty array if the downstream service call fails.
97
99
  *
98
100
  * @param {FetchNotificationOptionsDtoV1} [options] - Optional filter options for narrowing results.
99
- * @returns {Promise<LabNotification[]>} Resolves to a list of notifications, or an empty array if none found.
101
+ * @returns {Promise<LabNotificationsNotification[]>} Resolves to a list of notifications, or an empty array if none found.
100
102
  */
101
103
  async fetchNotificationCollectionV1(options) {
102
104
  return this.fetchResourceCollection(`v1/internal/notifications`, { params: options });
@@ -1,5 +1,5 @@
1
1
  import { ConfigService } from '@nestjs/config';
2
- import { LabPodcast } from 'itlab-functions';
2
+ import { LabPodcastsEpisode } from 'itlab-functions';
3
3
  import { AuthenticationModuleOptions } from '../../../authentication';
4
4
  import { BaseHttpService } from '../../base-http.service';
5
5
  import { FetchEpisodeOptionsDtoV1 } from './fetch-episode-options.dto.v1.type';
@@ -33,9 +33,9 @@ export declare class PodcastsService extends BaseHttpService {
33
33
  *
34
34
  * @param {string} episodeId - Unique MongoDB identifier of the episode.
35
35
  * @param {FetchEpisodeOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
36
- * @returns {Promise<LabPodcast | undefined>} Resolves to an Episode or `undefined` on failure.
36
+ * @returns {Promise<LabPodcastsEpisode | undefined>} Resolves to an Episode or `undefined` on failure.
37
37
  */
38
- fetchEpisodeV1(episodeId: string, options?: FetchEpisodeOptionsDtoV1): Promise<LabPodcast | undefined>;
38
+ fetchEpisodeV1(episodeId: string, options?: FetchEpisodeOptionsDtoV1): Promise<LabPodcastsEpisode | undefined>;
39
39
  /**
40
40
  * Retrieves a collection of episode entries.
41
41
  *
@@ -43,7 +43,7 @@ export declare class PodcastsService extends BaseHttpService {
43
43
  * Returns an empty array if the downstream service call fails.
44
44
  *
45
45
  * @param {FetchEpisodeOptionsDtoV1} [options] - Optional filter options for narrowing results.
46
- * @returns {Promise<LabPodcast[]>} Resolves to a list of episodes, or an empty array if none found.
46
+ * @returns {Promise<LabPodcastsEpisode[]>} Resolves to a list of episodes, or an empty array if none found.
47
47
  */
48
- fetchEpisodeCollectionV1(options?: FetchEpisodeOptionsDtoV1): Promise<LabPodcast[]>;
48
+ fetchEpisodeCollectionV1(options?: FetchEpisodeOptionsDtoV1): Promise<LabPodcastsEpisode[]>;
49
49
  }
@@ -53,7 +53,7 @@ let PodcastsService = class PodcastsService extends base_http_service_1.BaseHttp
53
53
  *
54
54
  * @param {string} episodeId - Unique MongoDB identifier of the episode.
55
55
  * @param {FetchEpisodeOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
56
- * @returns {Promise<LabPodcast | undefined>} Resolves to an Episode or `undefined` on failure.
56
+ * @returns {Promise<LabPodcastsEpisode | undefined>} Resolves to an Episode or `undefined` on failure.
57
57
  */
58
58
  async fetchEpisodeV1(episodeId, options) {
59
59
  return this.fetchResource(`v1/internal/episode/${episodeId}`, { params: options });
@@ -65,7 +65,7 @@ let PodcastsService = class PodcastsService extends base_http_service_1.BaseHttp
65
65
  * Returns an empty array if the downstream service call fails.
66
66
  *
67
67
  * @param {FetchEpisodeOptionsDtoV1} [options] - Optional filter options for narrowing results.
68
- * @returns {Promise<LabPodcast[]>} Resolves to a list of episodes, or an empty array if none found.
68
+ * @returns {Promise<LabPodcastsEpisode[]>} Resolves to a list of episodes, or an empty array if none found.
69
69
  */
70
70
  async fetchEpisodeCollectionV1(options) {
71
71
  return this.fetchResourceCollection(`v1/internal/episodes`, { params: options });
@@ -1,19 +1,8 @@
1
1
  import { ConfigService } from '@nestjs/config';
2
+ import { LabQuickLinksLink } from 'itlab-functions';
2
3
  import { AuthenticationModuleOptions } from '../../../authentication';
3
4
  import { BaseHttpService } from '../../base-http.service';
4
5
  import { FetchLinkOptionsDtoV1 } from './fetch-link-options.dto.v1.type';
5
- type LabQuickLink = {
6
- id: string;
7
- _url: string;
8
- _qrCodeUrl: string;
9
- short: string;
10
- href: string;
11
- tags: string[];
12
- engagements: number;
13
- engagedAt?: Date;
14
- scans: number;
15
- scannedAt?: Date;
16
- };
17
6
  /**
18
7
  * QuickLinksService
19
8
  *
@@ -44,9 +33,9 @@ export declare class QuickLinksService extends BaseHttpService {
44
33
  *
45
34
  * @param {string} linkId - Unique MongoDB identifier of the link.
46
35
  * @param {FetchLinkOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
47
- * @returns {Promise<LabQuickLink | undefined>} Resolves to an Link or `undefined` on failure.
36
+ * @returns {Promise<LabQuickLinksLink | undefined>} Resolves to an Link or `undefined` on failure.
48
37
  */
49
- fetchLinkV1(linkId: string, options?: FetchLinkOptionsDtoV1): Promise<LabQuickLink | undefined>;
38
+ fetchLinkV1(linkId: string, options?: FetchLinkOptionsDtoV1): Promise<LabQuickLinksLink | undefined>;
50
39
  /**
51
40
  * Retrieves a collection of link entries.
52
41
  *
@@ -54,8 +43,7 @@ export declare class QuickLinksService extends BaseHttpService {
54
43
  * Returns an empty array if the downstream service call fails.
55
44
  *
56
45
  * @param {FetchLinkOptionsDtoV1} [options] - Optional filter options for narrowing results.
57
- * @returns {Promise<LabQuickLink[]>} Resolves to a list of links, or an empty array if none found.
46
+ * @returns {Promise<LabQuickLinksLink[]>} Resolves to a list of links, or an empty array if none found.
58
47
  */
59
- fetchLinkCollectionV1(options?: FetchLinkOptionsDtoV1): Promise<LabQuickLink[]>;
48
+ fetchLinkCollectionV1(options?: FetchLinkOptionsDtoV1): Promise<LabQuickLinksLink[]>;
60
49
  }
61
- export {};
@@ -53,7 +53,7 @@ let QuickLinksService = class QuickLinksService extends base_http_service_1.Base
53
53
  *
54
54
  * @param {string} linkId - Unique MongoDB identifier of the link.
55
55
  * @param {FetchLinkOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
56
- * @returns {Promise<LabQuickLink | undefined>} Resolves to an Link or `undefined` on failure.
56
+ * @returns {Promise<LabQuickLinksLink | undefined>} Resolves to an Link or `undefined` on failure.
57
57
  */
58
58
  async fetchLinkV1(linkId, options) {
59
59
  return this.fetchResource(`v1/internal/link/${linkId}`, { params: options });
@@ -65,7 +65,7 @@ let QuickLinksService = class QuickLinksService extends base_http_service_1.Base
65
65
  * Returns an empty array if the downstream service call fails.
66
66
  *
67
67
  * @param {FetchLinkOptionsDtoV1} [options] - Optional filter options for narrowing results.
68
- * @returns {Promise<LabQuickLink[]>} Resolves to a list of links, or an empty array if none found.
68
+ * @returns {Promise<LabQuickLinksLink[]>} Resolves to a list of links, or an empty array if none found.
69
69
  */
70
70
  async fetchLinkCollectionV1(options) {
71
71
  return this.fetchResourceCollection(`v1/internal/links`, { params: options });
@@ -48,7 +48,9 @@ let RestrictedFieldsPipe = class RestrictedFieldsPipe {
48
48
  return value;
49
49
  // Determine the permissions available to this account
50
50
  const grantedPerms = (_b = (_a = this.request.account) === null || _a === void 0 ? void 0 : _a.perms) !== null && _b !== void 0 ? _b : [];
51
- const restrictions = this.reflector.get(RESTRICTED_METADATA_KEY, (_c = metadata.metatype) === null || _c === void 0 ? void 0 : _c.prototype);
51
+ const restrictions = this.reflector.get(RESTRICTED_METADATA_KEY,
52
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
53
+ (_c = metadata.metatype) === null || _c === void 0 ? void 0 : _c.prototype);
52
54
  if (!(0, class_validator_1.isObject)(restrictions))
53
55
  return value;
54
56
  for (const [propertyKey, requiredPerms] of Object.entries(restrictions)) {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "Timo Scheuermann",
5
5
  "email": "timo.scheuermann@sv-informatik.de"
6
6
  },
7
- "version": "2.16.12",
7
+ "version": "2.16.13",
8
8
  "type": "commonjs",
9
9
  "files": [
10
10
  "dist"
@@ -22,48 +22,48 @@
22
22
  "release:patch": "npm version patch && git push origin master --follow-tags"
23
23
  },
24
24
  "dependencies": {
25
- "@azure/identity": "^4.11.1",
26
- "@keyv/redis": "^5.1.0",
25
+ "@azure/identity": "^4.13.0",
26
+ "@keyv/redis": "^5.1.3",
27
27
  "@nestjs/cache-manager": "^3.0.1",
28
- "@nestjs/common": "^11.1.6",
28
+ "@nestjs/common": "^11.1.8",
29
29
  "@nestjs/config": "^4.0.2",
30
- "@nestjs/core": "^11.1.6",
31
- "@nestjs/jwt": "^11.0.0",
30
+ "@nestjs/core": "^11.1.8",
31
+ "@nestjs/jwt": "^11.0.1",
32
32
  "@nestjs/mongoose": "^11.0.3",
33
- "@nestjs/swagger": "^11.2.0",
34
- "axios": "^1.11.0",
35
- "cache-manager": "^7.1.1",
33
+ "@nestjs/swagger": "^11.2.1",
34
+ "axios": "^1.13.1",
35
+ "cache-manager": "^7.2.4",
36
36
  "class-transformer": "^0.5.1",
37
37
  "class-validator": "^0.14.2",
38
- "itlab-functions": "^1.0.6",
39
- "mongoose": "^8.17.1",
38
+ "itlab-functions": "^1.0.10",
39
+ "mongoose": "^8.19.2",
40
40
  "rxjs": "^7.8.2"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@eslint/eslintrc": "^3.3.1",
44
- "@eslint/js": "^9.32.0",
44
+ "@eslint/js": "^9.38.0",
45
45
  "@nestjs/cli": "^11.0.10",
46
- "@nestjs/schematics": "^11.0.7",
47
- "@nestjs/testing": "^11.1.6",
48
- "@types/express": "^5.0.3",
46
+ "@nestjs/schematics": "^11.0.9",
47
+ "@nestjs/testing": "^11.1.8",
48
+ "@types/express": "^5.0.5",
49
49
  "@types/jest": "^30.0.0",
50
- "@types/node": "^24.2.0",
50
+ "@types/node": "^24.9.2",
51
51
  "@types/supertest": "^6.0.3",
52
- "eslint": "^9.32.0",
52
+ "eslint": "^9.38.0",
53
53
  "eslint-config-prettier": "^10.1.8",
54
54
  "eslint-plugin-prettier": "^5.5.4",
55
- "globals": "^16.3.0",
56
- "jest": "^30.0.5",
55
+ "globals": "^16.4.0",
56
+ "jest": "^30.2.0",
57
57
  "prettier": "^3.6.2",
58
58
  "reflect-metadata": "^0.2.2",
59
59
  "source-map-support": "^0.5.21",
60
60
  "supertest": "^7.1.4",
61
- "ts-jest": "^29.4.1",
62
- "ts-loader": "^9.5.2",
61
+ "ts-jest": "^29.4.5",
62
+ "ts-loader": "^9.5.4",
63
63
  "ts-node": "^10.9.2",
64
64
  "tsconfig-paths": "^4.2.0",
65
- "typescript": "^5.9.2",
66
- "typescript-eslint": "^8.39.0"
65
+ "typescript": "^5.9.3",
66
+ "typescript-eslint": "^8.46.2"
67
67
  },
68
68
  "jest": {
69
69
  "moduleFileExtensions": [
@@ -1,40 +0,0 @@
1
- import { Document } from 'mongoose';
2
- import { Viewable } from '../viewable.interface';
3
- /**
4
- * TODO: REMOVE
5
- * Facilitates asynchronous updates to documents by adding unique account IDs to specified
6
- * array attributes. This prevents duplication of IDs in those arrays, ensuring data integrity.
7
- *
8
- * Designed primarily for adding account references such as views or other related IDs.
9
- */
10
- export declare class DocumentUpdater {
11
- private static readonly logger;
12
- /**
13
- * Adds an account ID uniquely to a specified array attribute of a document.
14
- *
15
- * This method verifies the presence of an accountId before proceeding.
16
- * It then performs an atomic MongoDB `$addToSet` update on the document to
17
- * add the accountId to the given attribute array only if it is not already present,
18
- * preventing duplicates without needing to fetch the document first.
19
- *
20
- * Updates are saved without modifying timestamps to preserve original metadata.
21
- *
22
- * @template I - Interface representing the document’s shape.
23
- * @template T - Mongoose Document type extending `Document`.
24
- * @param document - The Mongoose document to update.
25
- * @param attribute - The document attribute (key) representing the array to update.
26
- * @param accountId - The unique account ID to add.
27
- */
28
- static addUniqueAccountId<I, T extends Document = Document>(document: T, attribute: keyof I, accountId?: string): void;
29
- /**
30
- * Adds a view record to a document by associating an account ID with the '_viewedBy' attribute.
31
- *
32
- * This method leverages `addUniqueAccountId` to add the given accountId to the '_viewedBy' array,
33
- * ensuring each viewer is recorded only once.
34
- *
35
- * @template T - Mongoose Document type that extends Document and implements Viewable interface.
36
- * @param target - The target document to record the view.
37
- * @param accountId - The account ID representing the viewer.
38
- */
39
- static addView<T extends Document & Viewable>(target: T, accountId?: string): void;
40
- }
@@ -1,58 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DocumentUpdater = void 0;
4
- const common_1 = require("@nestjs/common");
5
- /**
6
- * TODO: REMOVE
7
- * Facilitates asynchronous updates to documents by adding unique account IDs to specified
8
- * array attributes. This prevents duplication of IDs in those arrays, ensuring data integrity.
9
- *
10
- * Designed primarily for adding account references such as views or other related IDs.
11
- */
12
- class DocumentUpdater {
13
- /**
14
- * Adds an account ID uniquely to a specified array attribute of a document.
15
- *
16
- * This method verifies the presence of an accountId before proceeding.
17
- * It then performs an atomic MongoDB `$addToSet` update on the document to
18
- * add the accountId to the given attribute array only if it is not already present,
19
- * preventing duplicates without needing to fetch the document first.
20
- *
21
- * Updates are saved without modifying timestamps to preserve original metadata.
22
- *
23
- * @template I - Interface representing the document’s shape.
24
- * @template T - Mongoose Document type extending `Document`.
25
- * @param document - The Mongoose document to update.
26
- * @param attribute - The document attribute (key) representing the array to update.
27
- * @param accountId - The unique account ID to add.
28
- */
29
- static addUniqueAccountId(document, attribute, accountId) {
30
- if (!accountId)
31
- return; // Exit if no accountId provided, avoiding unnecessary operations.
32
- // Perform atomic update to add accountId uniquely to the attribute array.
33
- document
34
- .updateOne({ $addToSet: { [String(attribute)]: accountId } }, { timestamps: false })
35
- .then(() => {
36
- this.logger.log(`Added unique accountId '${accountId}' to attribute '${String(attribute)}' for document ${document._id.toString()}`);
37
- })
38
- .catch((error) => {
39
- // Log any errors during the update operation for debugging and audit.
40
- this.logger.error(`Failed to add accountId '${accountId}' to attribute '${String(attribute)}' for document ${document._id.toString()}: ${error.stack}`);
41
- });
42
- }
43
- /**
44
- * Adds a view record to a document by associating an account ID with the '_viewedBy' attribute.
45
- *
46
- * This method leverages `addUniqueAccountId` to add the given accountId to the '_viewedBy' array,
47
- * ensuring each viewer is recorded only once.
48
- *
49
- * @template T - Mongoose Document type that extends Document and implements Viewable interface.
50
- * @param target - The target document to record the view.
51
- * @param accountId - The account ID representing the viewer.
52
- */
53
- static addView(target, accountId) {
54
- this.addUniqueAccountId(target, '_viewedBy', accountId);
55
- }
56
- }
57
- exports.DocumentUpdater = DocumentUpdater;
58
- DocumentUpdater.logger = new common_1.Logger('DocumentUpdater');
@@ -1 +0,0 @@
1
- export { VirtualsFactory } from './virtuals.factory';
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VirtualsFactory = void 0;
4
- var virtuals_factory_1 = require("./virtuals.factory");
5
- Object.defineProperty(exports, "VirtualsFactory", { enumerable: true, get: function () { return virtuals_factory_1.VirtualsFactory; } });
@@ -1,80 +0,0 @@
1
- import { Schema, VirtualTypeOptions } from 'mongoose';
2
- import { HubResource } from '../hub-resource.enum';
3
- /**
4
- * TODO: Remove
5
- * VirtualsFactory
6
- *
7
- * Provides a fluent, composable API for defining reusable Mongoose virtuals on schemas.
8
- * Helps keep schema definitions clean and DRY by centralizing the logic for frequently-used
9
- * virtual references (accounts, comments, likes, etc.), derived values, and hub-based resources.
10
- */
11
- export declare class VirtualsFactory {
12
- private readonly schema;
13
- private readonly resource;
14
- /**
15
- * @param {Schema} schema - the schema to create the virtual field on
16
- * @param {HubResource} resource - the resource used for the virtual field
17
- */
18
- constructor(schema: Schema, resource: HubResource);
19
- /**
20
- * Registers a generic virtual with custom Mongoose options.
21
- *
22
- * @param {string} name - The virtual field name.
23
- * @param {VirtualTypeOptions} [options] - The Mongoose virtual options.
24
- * @returns {VirtualsFactory} - The VirtualsFactory instance for chaining.
25
- */
26
- virtual(name: string, options?: VirtualTypeOptions): VirtualsFactory;
27
- /**
28
- * Registers a virtual referencing a single Account by ID.
29
- *
30
- * @param {string} name - Virtual field name.
31
- * @param {string} localField - Field containing the Account ID.
32
- */
33
- virtualSingleAccount(name: string, localField: string): VirtualsFactory;
34
- /**
35
- * Registers a virtual referencing multiple Accounts by ID array.
36
- *
37
- * @param {string} name - Virtual field name.
38
- * @param {string} localField - Field containing array of Account IDs.
39
- */
40
- virtualMultipleAccounts(name: string, localField: string): VirtualsFactory;
41
- /** Links `accountId` → `account` (single Account) */
42
- get account(): VirtualsFactory;
43
- /** Links `accountIds` → `accounts` (multiple Accounts) */
44
- get accounts(): VirtualsFactory;
45
- /** Links `authorId` → `author` (single Account) */
46
- get author(): VirtualsFactory;
47
- /** Links `authorIds` → `authors` (multiple Accounts) */
48
- get authors(): VirtualsFactory;
49
- /** Links `submitterId` → `submitter` (single Account) */
50
- get submitter(): VirtualsFactory;
51
- /** Links `submitterIds` → `submitters` (multiple Accounts) */
52
- get submitters(): VirtualsFactory;
53
- /** Links `contactId` → `contact` (single Account) */
54
- get contact(): VirtualsFactory;
55
- /** Links `contactIds` → `contacts` (multiple Accounts) */
56
- get contacts(): VirtualsFactory;
57
- /** Links `_viewedBy` → `viewedBy` and creates derived `views` counter */
58
- get views(): VirtualsFactory;
59
- /** Links `_likedBy` → `likedBy` and creates derived `likes` counter */
60
- get likes(): VirtualsFactory;
61
- /**
62
- * Creates `comments` virtual for top-level comments on the resource.
63
- * Filters out replies.
64
- */
65
- get comments(): VirtualsFactory;
66
- /**
67
- * Creates `commentsCount` virtual for counting all related comments on this resource.
68
- */
69
- get commentsCount(): VirtualsFactory;
70
- /**
71
- * Creates an empty virtual field for general content use.
72
- * Placeholder to support virtual getter/setter extension in custom implementations.
73
- */
74
- get content(): VirtualsFactory;
75
- /**
76
- * Registers `ref-[resource]` virtuals for each known Hub resource.
77
- * Used for polymorphic document relationships in the platform.
78
- */
79
- get hubResources(): VirtualsFactory;
80
- }