itlab-internal-services 2.16.8 → 2.16.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/classes/document/likeable-document.class.d.ts +2 -2
- package/dist/classes/document/likeable-document.class.js +6 -3
- package/dist/classes/document/viewable-document.class.d.ts +2 -2
- package/dist/classes/document/viewable-document.class.js +6 -3
- package/dist/classes/entity-map.class.d.ts +1 -1
- package/dist/classes/entity-map.class.js +2 -0
- package/dist/classes/fetch-options/base-options.class.d.ts +9 -0
- package/dist/classes/fetch-options/comments-options.class.d.ts +3 -0
- package/dist/classes/fetch-options/comments-options.class.js +1 -1
- package/dist/classes/fetch-options/content-options.class.d.ts +3 -0
- package/dist/classes/fetch-options/content-options.class.js +1 -1
- package/dist/classes/fetch-options/drafted-options.class.d.ts +5 -1
- package/dist/classes/fetch-options/drafted-options.class.js +3 -2
- package/dist/classes/fetch-options/liked-by-options.class.d.ts +4 -0
- package/dist/classes/fetch-options/liked-by-options.class.js +3 -2
- package/dist/classes/fetch-options/timestamps-options.class.d.ts +4 -1
- package/dist/classes/fetch-options/timestamps-options.class.js +1 -1
- package/dist/classes/fetch-options/viewed-by-options.class.d.ts +7 -2
- package/dist/classes/fetch-options/viewed-by-options.class.js +15 -4
- package/dist/hub-resource.enum.d.ts +10 -10
- package/dist/hub-resource.enum.js +16 -16
- package/dist/modules/comments/comments.controller.js +1 -1
- package/dist/modules/comments/comments.service.d.ts +5 -5
- package/dist/modules/comments/comments.service.js +21 -13
- package/dist/modules/like/like.service.d.ts +1 -1
- package/dist/modules/like/like.service.js +7 -7
- package/dist/modules/merge/merge-module-options.interface.d.ts +2 -2
- package/dist/modules/merge/merge.controller.d.ts +3 -3
- package/dist/modules/merge/merge.service.interface.d.ts +1 -1
- package/dist/modules/services/base-http.service.d.ts +44 -40
- package/dist/modules/services/base-http.service.js +72 -47
- package/dist/modules/services/base-urls.d.ts +22 -19
- package/dist/modules/services/base-urls.js +38 -19
- package/dist/modules/services/providers/accounts/accounts.service.d.ts +99 -0
- package/dist/modules/services/providers/accounts/accounts.service.js +154 -0
- package/dist/modules/services/providers/accounts/fetch-account-options.dto.v1.type.d.ts +29 -0
- package/dist/modules/services/providers/accounts/index.d.ts +2 -0
- package/dist/modules/services/providers/accounts/index.js +18 -0
- package/dist/modules/services/providers/books/books.service.d.ts +49 -0
- package/dist/modules/services/providers/books/books.service.js +79 -0
- package/dist/modules/services/providers/books/fetch-book-options.dto.v1.type.d.ts +27 -0
- package/dist/modules/services/providers/books/index.d.ts +2 -0
- package/dist/modules/services/providers/{notification → books}/index.js +2 -2
- package/dist/modules/services/providers/changelog/changelog.service.d.ts +62 -0
- package/dist/modules/services/providers/changelog/changelog.service.js +79 -0
- package/dist/modules/services/providers/changelog/fetch-change-options.dto.v1.type.d.ts +15 -0
- package/dist/modules/services/providers/changelog/index.d.ts +2 -0
- package/dist/modules/services/providers/changelog/index.js +18 -0
- package/dist/modules/services/providers/conflicts/conflicts.service.d.ts +59 -0
- package/dist/modules/services/providers/conflicts/conflicts.service.js +79 -0
- package/dist/modules/services/providers/conflicts/fetch-conflict-options.dto.v1.type.d.ts +18 -0
- package/dist/modules/services/providers/conflicts/index.d.ts +2 -0
- package/dist/modules/services/providers/conflicts/index.js +18 -0
- package/dist/modules/services/providers/content/content-return-types.d.ts +3 -2
- package/dist/modules/services/providers/content/content-return-types.js +8 -2
- package/dist/modules/services/providers/content/content.service.d.ts +49 -7
- package/dist/modules/services/providers/content/content.service.js +61 -19
- package/dist/modules/services/providers/content/fetch-content-options.dto.v1.type.d.ts +15 -0
- package/dist/modules/services/providers/content/index.d.ts +1 -0
- package/dist/modules/services/providers/content/index.js +1 -0
- package/dist/modules/services/providers/demo-hive/demo-hive.service.d.ts +49 -0
- package/dist/modules/services/providers/demo-hive/demo-hive.service.js +79 -0
- package/dist/modules/services/providers/demo-hive/fetch-demo-options.dto.v1.type.d.ts +16 -0
- package/dist/modules/services/providers/demo-hive/index.d.ts +2 -0
- package/dist/modules/services/providers/demo-hive/index.js +18 -0
- package/dist/modules/services/providers/events/events.service.d.ts +49 -0
- package/dist/modules/services/providers/events/events.service.js +79 -0
- package/dist/modules/services/providers/events/fetch-event-options.dto.v1.type.d.ts +27 -0
- package/dist/modules/services/providers/events/index.d.ts +2 -0
- package/dist/modules/services/providers/events/index.js +18 -0
- package/dist/modules/services/providers/files/crop-image-options.dto.v1.type.d.ts +13 -0
- package/dist/modules/services/providers/files/fetch-file-options.dto.v1.type.d.ts +21 -0
- package/dist/modules/services/providers/files/fetch-folder-options.dto.v1.type.d.ts +15 -0
- package/dist/modules/services/providers/files/files.service.d.ts +106 -0
- package/dist/modules/services/providers/files/files.service.js +146 -0
- package/dist/modules/services/providers/files/index.d.ts +4 -0
- package/dist/modules/services/providers/files/index.js +20 -0
- package/dist/modules/services/providers/hackschool/fetch-course-options.dto.v1.type.d.ts +15 -0
- package/dist/modules/services/providers/hackschool/fetch-doc-options.dto.v1.type.d.ts +17 -0
- package/dist/modules/services/providers/hackschool/fetch-thread-options.dto.v1.type.d.ts +18 -0
- package/dist/modules/services/providers/hackschool/hackschool.service.d.ts +93 -0
- package/dist/modules/services/providers/hackschool/hackschool.service.js +135 -0
- package/dist/modules/services/providers/hackschool/index.d.ts +2 -0
- package/dist/modules/services/providers/hackschool/index.js +18 -0
- package/dist/modules/services/providers/ideas.service.js +1 -1
- package/dist/modules/services/providers/index.d.ts +15 -12
- package/dist/modules/services/providers/index.js +17 -12
- package/dist/modules/services/providers/lunch-roulette.service.js +1 -1
- package/dist/modules/services/providers/mail/dtos/{auth-login-token-mail.dto.d.ts → auth-login-token-mail.dto.v1.d.ts} +1 -1
- package/dist/modules/services/providers/mail/dtos/{auth-password-reset-mail.dto.d.ts → auth-password-reset-mail.dto.v1.d.ts} +1 -1
- package/dist/modules/services/providers/mail/dtos/{event-cancel-mail.dto.d.ts → event-cancel-mail.dto.v1.d.ts} +1 -1
- package/dist/modules/services/providers/mail/dtos/{event-invite-mail.dto.d.ts → event-invite-mail.dto.v1.d.ts} +1 -1
- package/dist/modules/services/providers/mail/dtos/{idea-status-updated-mail.dto.d.ts → idea-status-updated-mail.dto.v1.d.ts} +1 -1
- package/dist/modules/services/providers/mail/dtos/{idea-submitted-mail.dto.d.ts → idea-submitted-mail.dto.v1.d.ts} +1 -1
- package/dist/modules/services/providers/mail/dtos/idea-submitted-mail.dto.v1.js +2 -0
- package/dist/modules/services/providers/mail/dtos/index.d.ts +14 -14
- package/dist/modules/services/providers/mail/dtos/index.js +14 -14
- package/dist/modules/services/providers/mail/dtos/{lunch-roulette-cancel-mail.dto.d.ts → lunch-roulette-cancel-mail.dto.v1.d.ts} +1 -1
- package/dist/modules/services/providers/mail/dtos/lunch-roulette-cancel-mail.dto.v1.js +2 -0
- package/dist/modules/services/providers/mail/dtos/{lunch-roulette-matched-mail.dto.d.ts → lunch-roulette-matched-mail.dto.v1.d.ts} +1 -1
- package/dist/modules/services/providers/mail/dtos/lunch-roulette-matched-mail.dto.v1.js +2 -0
- package/dist/modules/services/providers/mail/dtos/{lunch-roulette-submitted-mail.dto.d.ts → lunch-roulette-submitted-mail.dto.v1.d.ts} +1 -1
- package/dist/modules/services/providers/mail/dtos/lunch-roulette-submitted-mail.dto.v1.js +2 -0
- package/dist/modules/services/providers/mail/dtos/{lunch-roulette-unmatched-mail.dto.d.ts → lunch-roulette-unmatched-mail.dto.v1.d.ts} +1 -1
- package/dist/modules/services/providers/mail/dtos/lunch-roulette-unmatched-mail.dto.v1.js +2 -0
- package/dist/modules/services/providers/mail/dtos/{newsletter-issue-mail.dto.d.ts → newsletter-issue-mail.dto.v1.d.ts} +1 -1
- package/dist/modules/services/providers/mail/dtos/newsletter-issue-mail.dto.v1.js +2 -0
- package/dist/modules/services/providers/mail/dtos/{newsletter-subscribed-mail.dto.d.ts → newsletter-subscribed-mail.dto.v1.d.ts} +1 -1
- package/dist/modules/services/providers/mail/dtos/newsletter-subscribed-mail.dto.v1.js +2 -0
- package/dist/modules/services/providers/mail/dtos/{newsletter-unsubscribed-mail.dto.d.ts → newsletter-unsubscribed-mail.dto.v1.d.ts} +1 -1
- package/dist/modules/services/providers/mail/dtos/newsletter-unsubscribed-mail.dto.v1.js +2 -0
- package/dist/modules/services/providers/mail/dtos/{notification-mail.dto.d.ts → notification-mail.dto.v1.d.ts} +1 -1
- package/dist/modules/services/providers/mail/dtos/notification-mail.dto.v1.js +2 -0
- package/dist/modules/services/providers/mail/mail-types.d.ts +17 -16
- package/dist/modules/services/providers/mail/mail-types.js +31 -14
- package/dist/modules/services/providers/mail/mail.service.d.ts +30 -31
- package/dist/modules/services/providers/mail/mail.service.js +49 -50
- package/dist/modules/services/providers/mail/models/mail-recipient.model.d.ts +2 -0
- package/dist/modules/services/providers/mail/models/mail-recipient.model.js +3 -0
- package/dist/modules/services/providers/newsletter/fetch-issue-options.dto.v1.type.d.ts +16 -0
- package/dist/modules/services/providers/newsletter/fetch-issue-options.dto.v1.type.js +2 -0
- package/dist/modules/services/providers/newsletter/index.d.ts +2 -0
- package/dist/modules/services/providers/newsletter/index.js +18 -0
- package/dist/modules/services/providers/newsletter/newsletter.service.d.ts +49 -0
- package/dist/modules/services/providers/newsletter/newsletter.service.js +79 -0
- package/dist/modules/services/providers/newsroom/fetch-news-options.dto.v1.type.d.ts +20 -0
- package/dist/modules/services/providers/newsroom/fetch-news-options.dto.v1.type.js +2 -0
- package/dist/modules/services/providers/newsroom/index.d.ts +2 -0
- package/dist/modules/services/providers/newsroom/index.js +18 -0
- package/dist/modules/services/providers/newsroom/newsroom.service.d.ts +49 -0
- package/dist/modules/services/providers/newsroom/newsroom.service.js +79 -0
- package/dist/modules/services/providers/notifications/dtos/index.d.ts +1 -0
- package/dist/modules/services/providers/{notification → notifications}/dtos/index.js +1 -1
- package/dist/modules/services/providers/{notification/dtos/schedule-notification.dto.d.ts → notifications/dtos/schedule-notification.dto.v1.d.ts} +2 -10
- package/dist/modules/services/providers/notifications/dtos/schedule-notification.dto.v1.js +2 -0
- package/dist/modules/services/providers/notifications/fetch-notification-options.dto.v1.type.d.ts +19 -0
- package/dist/modules/services/providers/notifications/fetch-notification-options.dto.v1.type.js +2 -0
- package/dist/modules/services/providers/notifications/index.d.ts +3 -0
- package/dist/modules/services/providers/notifications/index.js +19 -0
- package/dist/modules/services/providers/notifications/notifications.service-definition.d.ts +1 -0
- package/dist/modules/services/providers/notifications/notifications.service-definition.js +4 -0
- package/dist/modules/services/providers/{notification/notification.service.d.ts → notifications/notifications.service.d.ts} +41 -5
- package/dist/modules/services/providers/{notification/notification.service.js → notifications/notifications.service.js} +52 -26
- package/dist/modules/services/providers/pass/dtos/{create-guild-member-pass.dto.d.ts → create-guild-member-pass.dto.v1.d.ts} +2 -2
- package/dist/modules/services/providers/pass/dtos/create-guild-member-pass.dto.v1.js +2 -0
- package/dist/modules/services/providers/pass/dtos/{create-team-member-pass.dto.d.ts → create-team-member-pass.dto.v1.d.ts} +2 -2
- package/dist/modules/services/providers/pass/dtos/create-team-member-pass.dto.v1.js +2 -0
- package/dist/modules/services/providers/pass/dtos/index.d.ts +2 -2
- package/dist/modules/services/providers/pass/dtos/index.js +2 -2
- package/dist/modules/services/providers/pass/pass-types.d.ts +3 -3
- package/dist/modules/services/providers/pass/pass.service.d.ts +14 -14
- package/dist/modules/services/providers/pass/pass.service.js +28 -28
- package/dist/modules/services/providers/podcasts/fetch-episode-options.dto.v1.type.d.ts +19 -0
- package/dist/modules/services/providers/podcasts/fetch-episode-options.dto.v1.type.js +2 -0
- package/dist/modules/services/providers/podcasts/index.d.ts +2 -0
- package/dist/modules/services/providers/podcasts/index.js +18 -0
- package/dist/modules/services/providers/podcasts/podcasts.service.d.ts +49 -0
- package/dist/modules/services/providers/podcasts/podcasts.service.js +79 -0
- package/dist/modules/services/providers/quick-links/fetch-link-options.dto.v1.type.d.ts +14 -0
- package/dist/modules/services/providers/quick-links/fetch-link-options.dto.v1.type.js +2 -0
- package/dist/modules/services/providers/quick-links/index.d.ts +2 -0
- package/dist/modules/services/providers/quick-links/index.js +18 -0
- package/dist/modules/services/providers/quick-links/quick-links.service.d.ts +61 -0
- package/dist/modules/services/providers/quick-links/quick-links.service.js +79 -0
- package/dist/modules/services/providers/search/dtos/{index-search-document.dto.d.ts → index-document.dto.v1.d.ts} +2 -2
- package/dist/modules/services/providers/search/dtos/index-document.dto.v1.js +2 -0
- package/dist/modules/services/providers/search/dtos/index.d.ts +1 -1
- package/dist/modules/services/providers/search/dtos/index.js +1 -1
- package/dist/modules/services/providers/search/search.service.d.ts +6 -6
- package/dist/modules/services/providers/search/search.service.js +14 -17
- package/dist/modules/services/providers/team/fetch-member-options.dto.v1.type.d.ts +11 -0
- package/dist/modules/services/providers/team/fetch-member-options.dto.v1.type.js +2 -0
- package/dist/modules/services/providers/team/index.d.ts +2 -0
- package/dist/modules/services/providers/team/index.js +18 -0
- package/dist/modules/services/providers/team/team.service.d.ts +49 -0
- package/dist/modules/services/providers/team/team.service.js +79 -0
- package/dist/modules/services/providers/tech-radar/fetch-blip-options.dto.v1.type.d.ts +19 -0
- package/dist/modules/services/providers/tech-radar/fetch-blip-options.dto.v1.type.js +2 -0
- package/dist/modules/services/providers/tech-radar/fetch-edition-options.dto.v1.type copy.d.ts +15 -0
- package/dist/modules/services/providers/tech-radar/fetch-edition-options.dto.v1.type copy.js +2 -0
- package/dist/modules/services/providers/tech-radar/index.d.ts +3 -0
- package/dist/modules/services/providers/tech-radar/index.js +19 -0
- package/dist/modules/services/providers/tech-radar/tech-radar.service.d.ts +71 -0
- package/dist/modules/services/providers/tech-radar/tech-radar.service.js +107 -0
- package/dist/modules/services/services.module.js +6 -3
- package/dist/pipes/params/hub-id.pipe.js +6 -3
- package/dist/types/likeable.type.d.ts +2 -2
- package/dist/types/viewable.type.d.ts +2 -2
- package/package.json +1 -1
- package/dist/modules/services/providers/accounts.service.d.ts +0 -67
- package/dist/modules/services/providers/accounts.service.js +0 -131
- package/dist/modules/services/providers/books.service.d.ts +0 -29
- package/dist/modules/services/providers/books.service.js +0 -55
- package/dist/modules/services/providers/changelog.service.d.ts +0 -18
- package/dist/modules/services/providers/changelog.service.js +0 -43
- package/dist/modules/services/providers/demo-hive.service.d.ts +0 -29
- package/dist/modules/services/providers/demo-hive.service.js +0 -55
- package/dist/modules/services/providers/events.service.d.ts +0 -29
- package/dist/modules/services/providers/events.service.js +0 -55
- package/dist/modules/services/providers/hackschool.service.d.ts +0 -49
- package/dist/modules/services/providers/hackschool.service.js +0 -79
- package/dist/modules/services/providers/newletter.service.d.ts +0 -29
- package/dist/modules/services/providers/newletter.service.js +0 -55
- package/dist/modules/services/providers/newsroom.service.d.ts +0 -47
- package/dist/modules/services/providers/newsroom.service.js +0 -73
- package/dist/modules/services/providers/notification/dtos/index.d.ts +0 -1
- package/dist/modules/services/providers/notification/index.d.ts +0 -2
- package/dist/modules/services/providers/notification/notification.service-definition.d.ts +0 -1
- package/dist/modules/services/providers/notification/notification.service-definition.js +0 -4
- package/dist/modules/services/providers/podcasts.service.d.ts +0 -29
- package/dist/modules/services/providers/podcasts.service.js +0 -55
- package/dist/modules/services/providers/team.service.d.ts +0 -29
- package/dist/modules/services/providers/team.service.js +0 -55
- package/dist/modules/services/providers/tech-radar.service.d.ts +0 -39
- package/dist/modules/services/providers/tech-radar.service.js +0 -67
- /package/dist/modules/services/providers/{mail/dtos/auth-login-token-mail.dto.js → accounts/fetch-account-options.dto.v1.type.js} +0 -0
- /package/dist/modules/services/providers/{mail/dtos/auth-password-reset-mail.dto.js → books/fetch-book-options.dto.v1.type.js} +0 -0
- /package/dist/modules/services/providers/{mail/dtos/event-cancel-mail.dto.js → changelog/fetch-change-options.dto.v1.type.js} +0 -0
- /package/dist/modules/services/providers/{mail/dtos/event-invite-mail.dto.js → conflicts/fetch-conflict-options.dto.v1.type.js} +0 -0
- /package/dist/modules/services/providers/{mail/dtos/idea-status-updated-mail.dto.js → content/fetch-content-options.dto.v1.type.js} +0 -0
- /package/dist/modules/services/providers/{mail/dtos/idea-submitted-mail.dto.js → demo-hive/fetch-demo-options.dto.v1.type.js} +0 -0
- /package/dist/modules/services/providers/{mail/dtos/lunch-roulette-cancel-mail.dto.js → events/fetch-event-options.dto.v1.type.js} +0 -0
- /package/dist/modules/services/providers/{mail/dtos/lunch-roulette-matched-mail.dto.js → files/crop-image-options.dto.v1.type.js} +0 -0
- /package/dist/modules/services/providers/{mail/dtos/lunch-roulette-submitted-mail.dto.js → files/fetch-file-options.dto.v1.type.js} +0 -0
- /package/dist/modules/services/providers/{mail/dtos/lunch-roulette-unmatched-mail.dto.js → files/fetch-folder-options.dto.v1.type.js} +0 -0
- /package/dist/modules/services/providers/{mail/dtos/newsletter-issue-mail.dto.js → hackschool/fetch-course-options.dto.v1.type.js} +0 -0
- /package/dist/modules/services/providers/{mail/dtos/newsletter-subscribed-mail.dto.js → hackschool/fetch-doc-options.dto.v1.type.js} +0 -0
- /package/dist/modules/services/providers/{mail/dtos/newsletter-unsubscribed-mail.dto.js → hackschool/fetch-thread-options.dto.v1.type.js} +0 -0
- /package/dist/modules/services/providers/mail/dtos/{notification-mail.dto.js → auth-login-token-mail.dto.v1.js} +0 -0
- /package/dist/modules/services/providers/{notification/dtos/schedule-notification.dto.js → mail/dtos/auth-password-reset-mail.dto.v1.js} +0 -0
- /package/dist/modules/services/providers/{pass/dtos/create-guild-member-pass.dto.js → mail/dtos/event-cancel-mail.dto.v1.js} +0 -0
- /package/dist/modules/services/providers/{pass/dtos/create-team-member-pass.dto.js → mail/dtos/event-invite-mail.dto.v1.js} +0 -0
- /package/dist/modules/services/providers/{search/dtos/index-search-document.dto.js → mail/dtos/idea-status-updated-mail.dto.v1.js} +0 -0
|
@@ -43,7 +43,7 @@ let SearchService = SearchService_1 = class SearchService extends base_http_serv
|
|
|
43
43
|
* @param cacheService Optional caching service for retrieving similar documents efficiently.
|
|
44
44
|
*/
|
|
45
45
|
constructor(authenticationOptions, options, configService, cacheService) {
|
|
46
|
-
super('Search', base_urls_1.BaseUrls.
|
|
46
|
+
super('Search', base_urls_1.BaseUrls.searchService, authenticationOptions, configService);
|
|
47
47
|
this.options = options;
|
|
48
48
|
this.cacheService = cacheService;
|
|
49
49
|
}
|
|
@@ -78,17 +78,16 @@ let SearchService = SearchService_1 = class SearchService extends base_http_serv
|
|
|
78
78
|
* Useful for ensuring resource changes are discoverable via search.
|
|
79
79
|
*
|
|
80
80
|
* @param {string} resourceId - Unique identifier of the resource.
|
|
81
|
-
* @param {
|
|
81
|
+
* @param {IndexDocumentDtoV1} document - Document containing searchable content.
|
|
82
82
|
*/
|
|
83
|
-
|
|
83
|
+
indexDocumentV1(resourceId, document) {
|
|
84
84
|
if (!this.options.resource) {
|
|
85
85
|
this.logger.error('Cannot index document: Resource type not provided.');
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
88
|
-
const endpoint = `internal/${this.options.resource}/${resourceId}`;
|
|
89
88
|
this.logger.log(`Indexing document for ${this.options.resource} ${resourceId}...`);
|
|
90
|
-
this.
|
|
91
|
-
.post(
|
|
89
|
+
this.httpClient
|
|
90
|
+
.post(`v1/internal/document/${this.options.resource}/${resourceId}`, document)
|
|
92
91
|
.then(() => {
|
|
93
92
|
this.logger.log(`Document sucessfully indexed for ${this.options.resource} ${resourceId}.`);
|
|
94
93
|
})
|
|
@@ -103,15 +102,14 @@ let SearchService = SearchService_1 = class SearchService extends base_http_serv
|
|
|
103
102
|
*
|
|
104
103
|
* @param {string} resourceId - Identifier of the resource to be deindexed.
|
|
105
104
|
*/
|
|
106
|
-
|
|
105
|
+
deleteDocumentV1(resourceId) {
|
|
107
106
|
if (!this.options.resource) {
|
|
108
107
|
this.logger.error('Cannot remove document: Resource type not provided.');
|
|
109
108
|
return;
|
|
110
109
|
}
|
|
111
|
-
const endpoint = `internal/${this.options.resource}/${resourceId}`;
|
|
112
110
|
this.logger.log(`Removing document for ${this.options.resource} ${resourceId}...`);
|
|
113
|
-
this.
|
|
114
|
-
.delete(
|
|
111
|
+
this.httpClient
|
|
112
|
+
.delete(`v1/internal/document/${this.options.resource}/${resourceId}`)
|
|
115
113
|
.then(() => {
|
|
116
114
|
this.logger.log(`Document removed sucessfully for ${this.options.resource} ${resourceId}.`);
|
|
117
115
|
})
|
|
@@ -127,15 +125,14 @@ let SearchService = SearchService_1 = class SearchService extends base_http_serv
|
|
|
127
125
|
* @param {string} resourceId - Identifier of the base resource for similarity matching.
|
|
128
126
|
* @returns {Promise<SearchDocument[]>} - Array of documents similar to the given resource.
|
|
129
127
|
*/
|
|
130
|
-
async
|
|
128
|
+
async fetchSimilarDocumentsV1(resourceId) {
|
|
131
129
|
if (!this.options.resource) {
|
|
132
130
|
this.logger.error('Cannot search for similar documents: Resource type not provided.');
|
|
133
131
|
return [];
|
|
134
132
|
}
|
|
135
|
-
const endpoint = `internal/${this.options.resource}/${resourceId}/similar`;
|
|
136
133
|
this.logger.log(`Fetching similar documents for ${this.options.resource} ${resourceId}...`);
|
|
137
134
|
try {
|
|
138
|
-
const { data } = await this.
|
|
135
|
+
const { data } = await this.httpClient.get(`v1/internal/document/${this.options.resource}/${resourceId}/similar`);
|
|
139
136
|
this.logger.log(`Successfully retrieved similar documents for ${this.options.resource} ${resourceId}.`);
|
|
140
137
|
return data;
|
|
141
138
|
}
|
|
@@ -151,13 +148,13 @@ let SearchService = SearchService_1 = class SearchService extends base_http_serv
|
|
|
151
148
|
* @param resourceId Unique identifier of the resource.
|
|
152
149
|
* @returns Cached or freshly retrieved similar documents.
|
|
153
150
|
*/
|
|
154
|
-
async
|
|
155
|
-
const
|
|
151
|
+
async fetchCachedSimilarDocumentsV1(resourceId) {
|
|
152
|
+
const fetchSimilarDocumentsV1 = () => this.fetchSimilarDocumentsV1(resourceId);
|
|
156
153
|
if (this.cacheService) {
|
|
157
154
|
const cacheKey = `${this.options.resource}.${resourceId}.similarDocuments`;
|
|
158
|
-
return this.cacheService.fetchOrStore(cacheKey,
|
|
155
|
+
return this.cacheService.fetchOrStore(cacheKey, fetchSimilarDocumentsV1, 18000000); // 30 Minutes
|
|
159
156
|
}
|
|
160
|
-
return
|
|
157
|
+
return fetchSimilarDocumentsV1();
|
|
161
158
|
}
|
|
162
159
|
};
|
|
163
160
|
exports.SearchService = SearchService;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseFetchOptions, ContentFetchOptions, DraftedFetchOptions, TimestampsFetchOptions, ViewedByFetchOptions } from '../../../../classes';
|
|
2
|
+
/**
|
|
3
|
+
* FetchMemberOptionsDtoV1
|
|
4
|
+
*
|
|
5
|
+
* Data Transfer Object for querying member collections.
|
|
6
|
+
* Inherits timestamp filtering fields and extends them with
|
|
7
|
+
* member-specific query parameters.
|
|
8
|
+
*/
|
|
9
|
+
export type FetchMemberOptionsDtoV1 = BaseFetchOptions & TimestampsFetchOptions & DraftedFetchOptions & ContentFetchOptions & ViewedByFetchOptions & {
|
|
10
|
+
isActive?: boolean;
|
|
11
|
+
};
|
|
@@ -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-member-options.dto.v1.type"), exports);
|
|
18
|
+
__exportStar(require("./team.service"), exports);
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ConfigService } from '@nestjs/config';
|
|
2
|
+
import { LabTeamMember } from 'itlab-functions';
|
|
3
|
+
import { AuthenticationModuleOptions } from '../../../authentication';
|
|
4
|
+
import { BaseHttpService } from '../../base-http.service';
|
|
5
|
+
import { FetchMemberOptionsDtoV1 } from './fetch-member-options.dto.v1.type';
|
|
6
|
+
/**
|
|
7
|
+
* TeamService
|
|
8
|
+
*
|
|
9
|
+
* Service client responsible for interacting with the Team 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 TeamService extends BaseHttpService {
|
|
21
|
+
/**
|
|
22
|
+
* Constructs an Team 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 member 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} memberId - Unique MongoDB identifier of the member.
|
|
35
|
+
* @param {FetchMemberOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
|
|
36
|
+
* @returns {Promise<LabTeamMember | undefined>} Resolves to an Member or `undefined` on failure.
|
|
37
|
+
*/
|
|
38
|
+
fetchMemberV1(memberId: string, options?: FetchMemberOptionsDtoV1): Promise<LabTeamMember | undefined>;
|
|
39
|
+
/**
|
|
40
|
+
* Retrieves a collection of member entries.
|
|
41
|
+
*
|
|
42
|
+
* Useful for batch lookups or paginated listings.
|
|
43
|
+
* Returns an empty array if the downstream service call fails.
|
|
44
|
+
*
|
|
45
|
+
* @param {FetchMemberOptionsDtoV1} [options] - Optional filter options for narrowing results.
|
|
46
|
+
* @returns {Promise<LabTeamMember[]>} Resolves to a list of members, or an empty array if none found.
|
|
47
|
+
*/
|
|
48
|
+
fetchMemberCollectionV1(options?: FetchMemberOptionsDtoV1): Promise<LabTeamMember[]>;
|
|
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.TeamService = 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
|
+
* TeamService
|
|
23
|
+
*
|
|
24
|
+
* Service client responsible for interacting with the Team 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 TeamService = class TeamService extends base_http_service_1.BaseHttpService {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs an Team 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('Team', base_urls_1.BaseUrls.teamService, authenticationOptions, configService);
|
|
44
|
+
}
|
|
45
|
+
// ─────────────────────────────────────────────────────────────
|
|
46
|
+
// Member Resource Methods
|
|
47
|
+
// ─────────────────────────────────────────────────────────────
|
|
48
|
+
/**
|
|
49
|
+
* Retrieves a single member 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} memberId - Unique MongoDB identifier of the member.
|
|
55
|
+
* @param {FetchMemberOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
|
|
56
|
+
* @returns {Promise<LabTeamMember | undefined>} Resolves to an Member or `undefined` on failure.
|
|
57
|
+
*/
|
|
58
|
+
async fetchMemberV1(memberId, options) {
|
|
59
|
+
return this.fetchResource(`v1/internal/member/${memberId}`, { params: options });
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Retrieves a collection of member entries.
|
|
63
|
+
*
|
|
64
|
+
* Useful for batch lookups or paginated listings.
|
|
65
|
+
* Returns an empty array if the downstream service call fails.
|
|
66
|
+
*
|
|
67
|
+
* @param {FetchMemberOptionsDtoV1} [options] - Optional filter options for narrowing results.
|
|
68
|
+
* @returns {Promise<LabTeamMember[]>} Resolves to a list of members, or an empty array if none found.
|
|
69
|
+
*/
|
|
70
|
+
async fetchMemberCollectionV1(options) {
|
|
71
|
+
return this.fetchResourceCollection(`v1/internal/members`, { params: options });
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
exports.TeamService = TeamService;
|
|
75
|
+
exports.TeamService = TeamService = __decorate([
|
|
76
|
+
(0, common_1.Injectable)(),
|
|
77
|
+
__param(0, (0, authentication_1.InjectAuthenticationOptions)()),
|
|
78
|
+
__metadata("design:paramtypes", [Object, config_1.ConfigService])
|
|
79
|
+
], TeamService);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseFetchOptions, CommentsFetchOptions, ContentFetchOptions, DraftedFetchOptions, LikedByFetchOptions, TimestampsFetchOptions, ViewedByFetchOptions } from '../../../../classes';
|
|
2
|
+
/**
|
|
3
|
+
* FetchBlipOptionsDtoV1
|
|
4
|
+
*
|
|
5
|
+
* Data Transfer Object for querying blip collections.
|
|
6
|
+
* Inherits timestamp filtering fields and extends them with
|
|
7
|
+
* blip-specific query parameters.
|
|
8
|
+
*/
|
|
9
|
+
export type FetchBlipOptionsDtoV1 = BaseFetchOptions & TimestampsFetchOptions & DraftedFetchOptions & ContentFetchOptions & ViewedByFetchOptions & LikedByFetchOptions & CommentsFetchOptions & {
|
|
10
|
+
includeSubmitter?: boolean;
|
|
11
|
+
isProductive?: boolean;
|
|
12
|
+
isPoC?: boolean;
|
|
13
|
+
category?: string;
|
|
14
|
+
categories?: string[];
|
|
15
|
+
submitterId?: string;
|
|
16
|
+
submitterIds?: string[];
|
|
17
|
+
timestampMin?: number;
|
|
18
|
+
timestampMax?: number;
|
|
19
|
+
};
|
package/dist/modules/services/providers/tech-radar/fetch-edition-options.dto.v1.type copy.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseFetchOptions, ContentFetchOptions, DraftedFetchOptions, LikedByFetchOptions, TimestampsFetchOptions, ViewedByFetchOptions } from '../../../../classes';
|
|
2
|
+
/**
|
|
3
|
+
* FetchEditionOptionsDtoV1
|
|
4
|
+
*
|
|
5
|
+
* Data Transfer Object for querying edition collections.
|
|
6
|
+
* Inherits timestamp filtering fields and extends them with
|
|
7
|
+
* edition-specific query parameters.
|
|
8
|
+
*/
|
|
9
|
+
export type FetchEditionOptionsDtoV1 = BaseFetchOptions & TimestampsFetchOptions & DraftedFetchOptions & ContentFetchOptions & ViewedByFetchOptions & LikedByFetchOptions & {
|
|
10
|
+
includeTechScouts?: boolean;
|
|
11
|
+
techScoutId?: string;
|
|
12
|
+
techScoutIds?: string[];
|
|
13
|
+
timestampMin?: number;
|
|
14
|
+
timestampMax?: number;
|
|
15
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./fetch-blip-options.dto.v1.type"), exports);
|
|
18
|
+
__exportStar(require("./fetch-edition-options.dto.v1.type copy"), exports);
|
|
19
|
+
__exportStar(require("./tech-radar.service"), exports);
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ConfigService } from '@nestjs/config';
|
|
2
|
+
import { LabTechRadarBlip, LabTechRadarEdition } from 'itlab-functions';
|
|
3
|
+
import { AuthenticationModuleOptions } from '../../../authentication';
|
|
4
|
+
import { BaseHttpService } from '../../base-http.service';
|
|
5
|
+
import { FetchBlipOptionsDtoV1 } from './fetch-blip-options.dto.v1.type';
|
|
6
|
+
import { FetchEditionOptionsDtoV1 } from './fetch-edition-options.dto.v1.type copy';
|
|
7
|
+
/**
|
|
8
|
+
* TechRadarService
|
|
9
|
+
*
|
|
10
|
+
* Service client responsible for interacting with the Tech Radar microservice.
|
|
11
|
+
* Extends `BaseHttpService` to inherit:
|
|
12
|
+
* - Environment-sensitive URL resolution (internal vs. external).
|
|
13
|
+
* - Secure inter-service authentication.
|
|
14
|
+
* - Structured logging for traceability of outbound requests.
|
|
15
|
+
*
|
|
16
|
+
* Why this pattern?
|
|
17
|
+
* - Ensures all outbound calls follow a unified configuration and logging structure.
|
|
18
|
+
* - Promotes strong typing and maintainable HTTP logic.
|
|
19
|
+
* - Makes service interactions predictable and debuggable across environments.
|
|
20
|
+
*/
|
|
21
|
+
export declare class TechRadarService extends BaseHttpService {
|
|
22
|
+
/**
|
|
23
|
+
* Constructs an Tech Radar service client instance.
|
|
24
|
+
*
|
|
25
|
+
* @param {AuthenticationModuleOptions} authenticationOptions - Injected authentication configuration.
|
|
26
|
+
* @param {ConfigService} configService - NestJS ConfigService for environment detection.
|
|
27
|
+
*/
|
|
28
|
+
constructor(authenticationOptions: AuthenticationModuleOptions, configService: ConfigService);
|
|
29
|
+
/**
|
|
30
|
+
* Retrieves a single blip entry by its MongoDB identifier.
|
|
31
|
+
*
|
|
32
|
+
* This method gracefully handles downstream failures by logging
|
|
33
|
+
* and returning `undefined` instead of throwing.
|
|
34
|
+
*
|
|
35
|
+
* @param {string} blipId - Unique MongoDB identifier of the blip.
|
|
36
|
+
* @param {FetchBlipOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
|
|
37
|
+
* @returns {Promise<LabTechRadarBlip | undefined>} Resolves to an Blip or `undefined` on failure.
|
|
38
|
+
*/
|
|
39
|
+
fetchBlipV1(blipId: string, options?: FetchBlipOptionsDtoV1): Promise<LabTechRadarBlip | undefined>;
|
|
40
|
+
/**
|
|
41
|
+
* Retrieves a collection of blip entries.
|
|
42
|
+
*
|
|
43
|
+
* Useful for batch lookups or paginated listings.
|
|
44
|
+
* Returns an empty array if the downstream service call fails.
|
|
45
|
+
*
|
|
46
|
+
* @param {FetchBlipOptionsDtoV1} [options] - Optional filter options for narrowing results.
|
|
47
|
+
* @returns {Promise<LabTechRadarBlip[]>} Resolves to a list of blips, or an empty array if none found.
|
|
48
|
+
*/
|
|
49
|
+
fetchBlipCollectionV1(options?: FetchBlipOptionsDtoV1): Promise<LabTechRadarBlip[]>;
|
|
50
|
+
/**
|
|
51
|
+
* Retrieves a single edition entry by its MongoDB identifier.
|
|
52
|
+
*
|
|
53
|
+
* This method gracefully handles downstream failures by logging
|
|
54
|
+
* and returning `undefined` instead of throwing.
|
|
55
|
+
*
|
|
56
|
+
* @param {string} editionId - Unique MongoDB identifier of the edition.
|
|
57
|
+
* @param {FetchEditionOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
|
|
58
|
+
* @returns {Promise<LabTechRadarEdition | undefined>} Resolves to an Edition or `undefined` on failure.
|
|
59
|
+
*/
|
|
60
|
+
fetchEditionV1(editionId: string, options?: FetchEditionOptionsDtoV1): Promise<LabTechRadarEdition | undefined>;
|
|
61
|
+
/**
|
|
62
|
+
* Retrieves a collection of edition entries.
|
|
63
|
+
*
|
|
64
|
+
* Useful for batch lookups or paginated listings.
|
|
65
|
+
* Returns an empty array if the downstream service call fails.
|
|
66
|
+
*
|
|
67
|
+
* @param {FetchEditionOptionsDtoV1} [options] - Optional filter options for narrowing results.
|
|
68
|
+
* @returns {Promise<LabTechRadarEdition[]>} Resolves to a list of editions, or an empty array if none found.
|
|
69
|
+
*/
|
|
70
|
+
fetchEditionCollectionV1(options?: FetchEditionOptionsDtoV1): Promise<LabTechRadarEdition[]>;
|
|
71
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
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.TechRadarService = 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
|
+
* TechRadarService
|
|
23
|
+
*
|
|
24
|
+
* Service client responsible for interacting with the Tech Radar 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 TechRadarService = class TechRadarService extends base_http_service_1.BaseHttpService {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs an Tech Radar 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('TechRadar', base_urls_1.BaseUrls.techRadarService, authenticationOptions, configService);
|
|
44
|
+
}
|
|
45
|
+
// ─────────────────────────────────────────────────────────────
|
|
46
|
+
// Blip Resource Methods
|
|
47
|
+
// ─────────────────────────────────────────────────────────────
|
|
48
|
+
/**
|
|
49
|
+
* Retrieves a single blip 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} blipId - Unique MongoDB identifier of the blip.
|
|
55
|
+
* @param {FetchBlipOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
|
|
56
|
+
* @returns {Promise<LabTechRadarBlip | undefined>} Resolves to an Blip or `undefined` on failure.
|
|
57
|
+
*/
|
|
58
|
+
async fetchBlipV1(blipId, options) {
|
|
59
|
+
return this.fetchResource(`v1/internal/blip/${blipId}`, { params: options });
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Retrieves a collection of blip entries.
|
|
63
|
+
*
|
|
64
|
+
* Useful for batch lookups or paginated listings.
|
|
65
|
+
* Returns an empty array if the downstream service call fails.
|
|
66
|
+
*
|
|
67
|
+
* @param {FetchBlipOptionsDtoV1} [options] - Optional filter options for narrowing results.
|
|
68
|
+
* @returns {Promise<LabTechRadarBlip[]>} Resolves to a list of blips, or an empty array if none found.
|
|
69
|
+
*/
|
|
70
|
+
async fetchBlipCollectionV1(options) {
|
|
71
|
+
return this.fetchResourceCollection(`v1/internal/blips`, { params: options });
|
|
72
|
+
}
|
|
73
|
+
// ─────────────────────────────────────────────────────────────
|
|
74
|
+
// Edition Resource Methods
|
|
75
|
+
// ─────────────────────────────────────────────────────────────
|
|
76
|
+
/**
|
|
77
|
+
* Retrieves a single edition entry by its MongoDB identifier.
|
|
78
|
+
*
|
|
79
|
+
* This method gracefully handles downstream failures by logging
|
|
80
|
+
* and returning `undefined` instead of throwing.
|
|
81
|
+
*
|
|
82
|
+
* @param {string} editionId - Unique MongoDB identifier of the edition.
|
|
83
|
+
* @param {FetchEditionOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
|
|
84
|
+
* @returns {Promise<LabTechRadarEdition | undefined>} Resolves to an Edition or `undefined` on failure.
|
|
85
|
+
*/
|
|
86
|
+
async fetchEditionV1(editionId, options) {
|
|
87
|
+
return this.fetchResource(`v1/internal/edition/${editionId}`, { params: options });
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Retrieves a collection of edition entries.
|
|
91
|
+
*
|
|
92
|
+
* Useful for batch lookups or paginated listings.
|
|
93
|
+
* Returns an empty array if the downstream service call fails.
|
|
94
|
+
*
|
|
95
|
+
* @param {FetchEditionOptionsDtoV1} [options] - Optional filter options for narrowing results.
|
|
96
|
+
* @returns {Promise<LabTechRadarEdition[]>} Resolves to a list of editions, or an empty array if none found.
|
|
97
|
+
*/
|
|
98
|
+
async fetchEditionCollectionV1(options) {
|
|
99
|
+
return this.fetchResourceCollection(`v1/internal/editions`, { params: options });
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
exports.TechRadarService = TechRadarService;
|
|
103
|
+
exports.TechRadarService = TechRadarService = __decorate([
|
|
104
|
+
(0, common_1.Injectable)(),
|
|
105
|
+
__param(0, (0, authentication_1.InjectAuthenticationOptions)()),
|
|
106
|
+
__metadata("design:paramtypes", [Object, config_1.ConfigService])
|
|
107
|
+
], TechRadarService);
|
|
@@ -9,11 +9,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.ServicesModule = void 0;
|
|
10
10
|
const common_1 = require("@nestjs/common");
|
|
11
11
|
const providers_1 = require("./providers");
|
|
12
|
-
const newsroom_service_1 = require("./providers/newsroom.service");
|
|
13
12
|
const services_module_definition_1 = require("./services.module-definition");
|
|
14
13
|
const serviceProviders = [
|
|
15
14
|
// Apps
|
|
16
|
-
|
|
15
|
+
providers_1.NewsroomService,
|
|
17
16
|
providers_1.EventsService,
|
|
18
17
|
providers_1.HackschoolService,
|
|
19
18
|
providers_1.DemoHiveService,
|
|
@@ -24,9 +23,13 @@ const serviceProviders = [
|
|
|
24
23
|
providers_1.NewsletterService,
|
|
25
24
|
providers_1.IdeasService,
|
|
26
25
|
providers_1.LunchRouletteService,
|
|
26
|
+
// Services
|
|
27
|
+
providers_1.FilesService,
|
|
28
|
+
providers_1.QuickLinksService,
|
|
27
29
|
// Utils
|
|
28
30
|
providers_1.AccountsService,
|
|
29
|
-
providers_1.
|
|
31
|
+
providers_1.ConflictsService,
|
|
32
|
+
providers_1.NotificationsService,
|
|
30
33
|
providers_1.MailService,
|
|
31
34
|
providers_1.SearchService,
|
|
32
35
|
providers_1.ChangelogService,
|
|
@@ -8,6 +8,9 @@ const swagger_1 = require("@nestjs/swagger");
|
|
|
8
8
|
const class_validator_1 = require("class-validator");
|
|
9
9
|
const itlab_functions_1 = require("itlab-functions");
|
|
10
10
|
const exceptions_1 = require("../../exceptions");
|
|
11
|
+
function isValidHubId(value) {
|
|
12
|
+
return (0, class_validator_1.isString)(value) && (0, itlab_functions_1.isHubId)(value.toLowerCase());
|
|
13
|
+
}
|
|
11
14
|
/**
|
|
12
15
|
* Pipe that validates and transforms a route parameter into a valid HubId string.
|
|
13
16
|
* Throws a `BadParameterException` if the input does not match the expected format.
|
|
@@ -22,8 +25,8 @@ class ParseHubIdPipe {
|
|
|
22
25
|
* @throws {BadParameterException} - If validation fails.
|
|
23
26
|
*/
|
|
24
27
|
transform(inputValue) {
|
|
25
|
-
if ((
|
|
26
|
-
return
|
|
28
|
+
if (isValidHubId(inputValue))
|
|
29
|
+
return inputValue.toLowerCase();
|
|
27
30
|
throw new exceptions_1.BadParameterException(this.parameterName);
|
|
28
31
|
}
|
|
29
32
|
}
|
|
@@ -59,7 +62,7 @@ function IsHubId(options) {
|
|
|
59
62
|
return (0, class_validator_1.ValidateBy)({
|
|
60
63
|
name: 'isHubId',
|
|
61
64
|
validator: {
|
|
62
|
-
validate: (input) => (
|
|
65
|
+
validate: (input) => isValidHubId(input),
|
|
63
66
|
defaultMessage: (0, class_validator_1.buildMessage)((each) => `${each}$property must be a valid HubId`, options),
|
|
64
67
|
},
|
|
65
68
|
}, options);
|
|
@@ -7,8 +7,8 @@ import { User } from '../models';
|
|
|
7
7
|
* - `likedBy`: optional populated list of User objects.
|
|
8
8
|
*/
|
|
9
9
|
export type IsLikeable = {
|
|
10
|
-
_likedBy
|
|
11
|
-
likes
|
|
10
|
+
_likedBy?: string[];
|
|
11
|
+
likes?: number;
|
|
12
12
|
likedBy?: User[];
|
|
13
13
|
addLike(accountId: string): Promise<number>;
|
|
14
14
|
removeLike(accountId: string): Promise<number>;
|
|
@@ -7,8 +7,8 @@ import { User } from '../models';
|
|
|
7
7
|
* - `viewedBy`: optional populated list of User objects.
|
|
8
8
|
*/
|
|
9
9
|
export type IsViewable = {
|
|
10
|
-
_viewedBy
|
|
11
|
-
views
|
|
10
|
+
_viewedBy?: string[];
|
|
11
|
+
views?: number;
|
|
12
12
|
viewedBy?: User[];
|
|
13
13
|
addView(accountId: string): Promise<number>;
|
|
14
14
|
removeView(accountId: string): Promise<number>;
|