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.
- package/dist/classes/document/content-document.class.d.ts +2 -2
- package/dist/classes/fetch-options/content-options.class.d.ts +2 -2
- package/dist/hub-resource.enum.d.ts +0 -23
- package/dist/hub-resource.enum.js +1 -25
- package/dist/index.d.ts +0 -6
- package/dist/index.js +0 -10
- package/dist/modules/comments/comments.controller.d.ts +3 -3
- package/dist/modules/comments/comments.controller.js +1 -1
- package/dist/modules/comments/comments.service.d.ts +3 -3
- package/dist/modules/comments/comments.service.js +1 -1
- package/dist/modules/services/providers/books/books.service.d.ts +5 -5
- package/dist/modules/services/providers/books/books.service.js +2 -2
- package/dist/modules/services/providers/changelog/changelog.service.d.ts +1 -14
- package/dist/modules/services/providers/conflicts/conflicts.service.d.ts +5 -15
- package/dist/modules/services/providers/conflicts/conflicts.service.js +2 -2
- package/dist/modules/services/providers/content/content-return-types.d.ts +5 -5
- package/dist/modules/services/providers/content/content.service.d.ts +7 -6
- package/dist/modules/services/providers/demo-hive/demo-hive.service.d.ts +5 -5
- package/dist/modules/services/providers/demo-hive/demo-hive.service.js +2 -2
- package/dist/modules/services/providers/events/events.service.d.ts +5 -5
- package/dist/modules/services/providers/events/events.service.js +2 -2
- package/dist/modules/services/providers/files/files.service.d.ts +9 -30
- package/dist/modules/services/providers/files/files.service.js +4 -4
- package/dist/modules/services/providers/mail/dtos/newsletter-issue-mail.dto.v1.d.ts +2 -2
- package/dist/modules/services/providers/newsletter/newsletter.service.d.ts +5 -5
- package/dist/modules/services/providers/newsletter/newsletter.service.js +2 -2
- package/dist/modules/services/providers/newsroom/newsroom.service.d.ts +5 -5
- package/dist/modules/services/providers/newsroom/newsroom.service.js +2 -2
- package/dist/modules/services/providers/notifications/notifications.service.d.ts +5 -18
- package/dist/modules/services/providers/notifications/notifications.service.js +5 -3
- package/dist/modules/services/providers/podcasts/podcasts.service.d.ts +5 -5
- package/dist/modules/services/providers/podcasts/podcasts.service.js +2 -2
- package/dist/modules/services/providers/quick-links/quick-links.service.d.ts +5 -17
- package/dist/modules/services/providers/quick-links/quick-links.service.js +2 -2
- package/dist/pipes/restricted-fields.pipe.js +3 -1
- package/package.json +23 -23
- package/dist/classes/document-updater.class.d.ts +0 -40
- package/dist/classes/document-updater.class.js +0 -58
- package/dist/factories/index.d.ts +0 -1
- package/dist/factories/index.js +0 -5
- package/dist/factories/virtuals.factory.d.ts +0 -80
- package/dist/factories/virtuals.factory.js +0 -172
- package/dist/functions/create-duplicate-checker.function.d.ts +0 -29
- package/dist/functions/create-duplicate-checker.function.js +0 -52
- package/dist/likeable.interface.d.ts +0 -42
- package/dist/likeable.interface.js +0 -48
- package/dist/modules/_old/comment/comment.controller.d.ts +0 -35
- package/dist/modules/_old/comment/comment.controller.js +0 -86
- package/dist/modules/_old/comment/comment.model.d.ts +0 -29
- package/dist/modules/_old/comment/comment.model.js +0 -43
- package/dist/modules/_old/comment/comment.module-definition.d.ts +0 -45
- package/dist/modules/_old/comment/comment.module-definition.js +0 -8
- package/dist/modules/_old/comment/comment.module.d.ts +0 -22
- package/dist/modules/_old/comment/comment.module.js +0 -71
- package/dist/modules/_old/comment/comment.service.d.ts +0 -54
- package/dist/modules/_old/comment/comment.service.js +0 -133
- package/dist/modules/_old/comment/index.d.ts +0 -3
- package/dist/modules/_old/comment/index.js +0 -9
- package/dist/modules/_old/content/content.module-definition.d.ts +0 -5
- package/dist/modules/_old/content/content.module-definition.js +0 -8
- package/dist/modules/_old/content/content.module.d.ts +0 -31
- package/dist/modules/_old/content/content.module.js +0 -60
- package/dist/modules/_old/content/content.service.d.ts +0 -50
- package/dist/modules/_old/content/content.service.js +0 -145
- package/dist/modules/_old/content/index.d.ts +0 -2
- package/dist/modules/_old/content/index.js +0 -7
- package/dist/modules/_old/database/database-module-options.interface.d.ts +0 -41
- package/dist/modules/_old/database/database-module-options.interface.js +0 -2
- package/dist/modules/_old/database/database.liveness-controller.d.ts +0 -27
- package/dist/modules/_old/database/database.liveness-controller.js +0 -80
- package/dist/modules/_old/database/database.module.d.ts +0 -41
- package/dist/modules/_old/database/database.module.js +0 -97
- package/dist/modules/_old/database/index.d.ts +0 -6
- package/dist/modules/_old/database/index.js +0 -13
- package/dist/modules/_old/database/lock-service/lock.schema.d.ts +0 -38
- package/dist/modules/_old/database/lock-service/lock.schema.js +0 -51
- package/dist/modules/_old/database/lock-service/lock.service.d.ts +0 -53
- package/dist/modules/_old/database/lock-service/lock.service.js +0 -103
- package/dist/modules/_old/database/model-service/dbs/hub-account.db.d.ts +0 -28
- package/dist/modules/_old/database/model-service/dbs/hub-account.db.js +0 -44
- package/dist/modules/_old/database/model-service/dbs/hub-books.db.d.ts +0 -23
- package/dist/modules/_old/database/model-service/dbs/hub-books.db.js +0 -45
- package/dist/modules/_old/database/model-service/dbs/hub-comments.db.d.ts +0 -29
- package/dist/modules/_old/database/model-service/dbs/hub-comments.db.js +0 -68
- package/dist/modules/_old/database/model-service/dbs/hub-content.db.d.ts +0 -24
- package/dist/modules/_old/database/model-service/dbs/hub-content.db.js +0 -49
- package/dist/modules/_old/database/model-service/dbs/hub-demo-hive.db.d.ts +0 -23
- package/dist/modules/_old/database/model-service/dbs/hub-demo-hive.db.js +0 -45
- package/dist/modules/_old/database/model-service/dbs/hub-events.db.d.ts +0 -24
- package/dist/modules/_old/database/model-service/dbs/hub-events.db.js +0 -49
- package/dist/modules/_old/database/model-service/dbs/hub-hackschool.db.d.ts +0 -60
- package/dist/modules/_old/database/model-service/dbs/hub-hackschool.db.js +0 -106
- package/dist/modules/_old/database/model-service/dbs/hub-newsroom.db.d.ts +0 -25
- package/dist/modules/_old/database/model-service/dbs/hub-newsroom.db.js +0 -53
- package/dist/modules/_old/database/model-service/dbs/hub-podcasts.db.d.ts +0 -23
- package/dist/modules/_old/database/model-service/dbs/hub-podcasts.db.js +0 -45
- package/dist/modules/_old/database/model-service/dbs/hub-team.db.d.ts +0 -22
- package/dist/modules/_old/database/model-service/dbs/hub-team.db.js +0 -41
- package/dist/modules/_old/database/model-service/dbs/hub-tech-radar.db.d.ts +0 -42
- package/dist/modules/_old/database/model-service/dbs/hub-tech-radar.db.js +0 -81
- package/dist/modules/_old/database/model-service/model.service.d.ts +0 -8465
- package/dist/modules/_old/database/model-service/model.service.js +0 -136
- package/dist/modules/_old/database/populate-service/populate.service.d.ts +0 -73
- package/dist/modules/_old/database/populate-service/populate.service.js +0 -163
- package/dist/modules/_old/database/service-mapper-service/service-mapper.service.d.ts +0 -32
- package/dist/modules/_old/database/service-mapper-service/service-mapper.service.js +0 -73
- package/dist/modules/_old/fetch/fetch.module.d.ts +0 -31
- package/dist/modules/_old/fetch/fetch.module.js +0 -60
- package/dist/modules/_old/fetch/fetch.service.d.ts +0 -153
- package/dist/modules/_old/fetch/fetch.service.js +0 -274
- package/dist/modules/_old/fetch/index.d.ts +0 -2
- package/dist/modules/_old/fetch/index.js +0 -7
- package/dist/modules/_old/index.d.ts +0 -5
- package/dist/modules/_old/index.js +0 -21
- package/dist/modules/_old/like/index.d.ts +0 -1
- package/dist/modules/_old/like/index.js +0 -5
- package/dist/modules/_old/like/like.controller.d.ts +0 -41
- package/dist/modules/_old/like/like.controller.js +0 -125
- package/dist/modules/_old/like/like.module-definition.d.ts +0 -20
- package/dist/modules/_old/like/like.module-definition.js +0 -8
- package/dist/modules/_old/like/like.module.d.ts +0 -21
- package/dist/modules/_old/like/like.module.js +0 -67
- package/dist/modules/_old/like/like.service.d.ts +0 -61
- package/dist/modules/_old/like/like.service.js +0 -103
- package/dist/viewable.interface.d.ts +0 -42
- package/dist/viewable.interface.js +0 -48
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConfigService } from '@nestjs/config';
|
|
2
|
-
import {
|
|
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<
|
|
36
|
+
* @returns {Promise<LabNewsletterIssue | undefined>} Resolves to an Issue or `undefined` on failure.
|
|
37
37
|
*/
|
|
38
|
-
fetchIssueV1(issueId: string, options?: FetchIssueOptionsDtoV1): Promise<
|
|
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<
|
|
46
|
+
* @returns {Promise<LabNewsletterIssue[]>} Resolves to a list of issues, or an empty array if none found.
|
|
47
47
|
*/
|
|
48
|
-
fetchIssueCollectionV1(options?: FetchIssueOptionsDtoV1): Promise<
|
|
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<
|
|
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<
|
|
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 {
|
|
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<
|
|
36
|
+
* @returns {Promise<LabNewsroomNews | undefined>} Resolves to an News or `undefined` on failure.
|
|
37
37
|
*/
|
|
38
|
-
fetchNewsV1(newsId: string, options?: FetchNewsOptionsDtoV1): Promise<
|
|
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<
|
|
46
|
+
* @returns {Promise<LabNewsroomNews[]>} Resolves to a list of news, or an empty array if none found.
|
|
47
47
|
*/
|
|
48
|
-
fetchNewsCollectionV1(options?: FetchNewsOptionsDtoV1): Promise<
|
|
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<
|
|
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<
|
|
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<
|
|
45
|
+
* @returns {Promise<LabNotificationsNotification | undefined>} Resolves to an Notification or `undefined` on failure.
|
|
58
46
|
*/
|
|
59
|
-
fetchNotificationV1(notificationId: string, options?: FetchNotificationOptionsDtoV1): Promise<
|
|
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<
|
|
55
|
+
* @returns {Promise<LabNotificationsNotification[]>} Resolves to a list of notifications, or an empty array if none found.
|
|
68
56
|
*/
|
|
69
|
-
fetchNotificationCollectionV1(options?: FetchNotificationOptionsDtoV1): Promise<
|
|
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<
|
|
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}`, {
|
|
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<
|
|
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 {
|
|
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<
|
|
36
|
+
* @returns {Promise<LabPodcastsEpisode | undefined>} Resolves to an Episode or `undefined` on failure.
|
|
37
37
|
*/
|
|
38
|
-
fetchEpisodeV1(episodeId: string, options?: FetchEpisodeOptionsDtoV1): Promise<
|
|
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<
|
|
46
|
+
* @returns {Promise<LabPodcastsEpisode[]>} Resolves to a list of episodes, or an empty array if none found.
|
|
47
47
|
*/
|
|
48
|
-
fetchEpisodeCollectionV1(options?: FetchEpisodeOptionsDtoV1): Promise<
|
|
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<
|
|
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<
|
|
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<
|
|
36
|
+
* @returns {Promise<LabQuickLinksLink | undefined>} Resolves to an Link or `undefined` on failure.
|
|
48
37
|
*/
|
|
49
|
-
fetchLinkV1(linkId: string, options?: FetchLinkOptionsDtoV1): Promise<
|
|
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<
|
|
46
|
+
* @returns {Promise<LabQuickLinksLink[]>} Resolves to a list of links, or an empty array if none found.
|
|
58
47
|
*/
|
|
59
|
-
fetchLinkCollectionV1(options?: FetchLinkOptionsDtoV1): Promise<
|
|
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<
|
|
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<
|
|
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,
|
|
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.
|
|
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.
|
|
26
|
-
"@keyv/redis": "^5.1.
|
|
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.
|
|
28
|
+
"@nestjs/common": "^11.1.8",
|
|
29
29
|
"@nestjs/config": "^4.0.2",
|
|
30
|
-
"@nestjs/core": "^11.1.
|
|
31
|
-
"@nestjs/jwt": "^11.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.
|
|
34
|
-
"axios": "^1.
|
|
35
|
-
"cache-manager": "^7.
|
|
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.
|
|
39
|
-
"mongoose": "^8.
|
|
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.
|
|
44
|
+
"@eslint/js": "^9.38.0",
|
|
45
45
|
"@nestjs/cli": "^11.0.10",
|
|
46
|
-
"@nestjs/schematics": "^11.0.
|
|
47
|
-
"@nestjs/testing": "^11.1.
|
|
48
|
-
"@types/express": "^5.0.
|
|
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
|
|
50
|
+
"@types/node": "^24.9.2",
|
|
51
51
|
"@types/supertest": "^6.0.3",
|
|
52
|
-
"eslint": "^9.
|
|
52
|
+
"eslint": "^9.38.0",
|
|
53
53
|
"eslint-config-prettier": "^10.1.8",
|
|
54
54
|
"eslint-plugin-prettier": "^5.5.4",
|
|
55
|
-
"globals": "^16.
|
|
56
|
-
"jest": "^30.0
|
|
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.
|
|
62
|
-
"ts-loader": "^9.5.
|
|
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.
|
|
66
|
-
"typescript-eslint": "^8.
|
|
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';
|
package/dist/factories/index.js
DELETED
|
@@ -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
|
-
}
|