itlab-internal-services 2.16.7 → 2.16.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 -3
- 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 +5 -1
- package/dist/classes/fetch-options/viewed-by-options.class.js +3 -3
- 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/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
|
@@ -0,0 +1,154 @@
|
|
|
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.AccountsService = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const config_1 = require("@nestjs/config");
|
|
18
|
+
const classes_1 = require("../../../../classes");
|
|
19
|
+
const authentication_1 = require("../../../authentication");
|
|
20
|
+
const base_http_service_1 = require("../../base-http.service");
|
|
21
|
+
const base_urls_1 = require("../../base-urls");
|
|
22
|
+
/**
|
|
23
|
+
* AccountsService
|
|
24
|
+
*
|
|
25
|
+
* Service client responsible for interacting with the Accounts microservice.
|
|
26
|
+
* Extends `BaseHttpService` to inherit:
|
|
27
|
+
* - Environment-sensitive URL resolution (internal vs. external).
|
|
28
|
+
* - Secure inter-service authentication.
|
|
29
|
+
* - Structured logging for traceability of outbound requests.
|
|
30
|
+
*
|
|
31
|
+
* Why this pattern?
|
|
32
|
+
* - Ensures all outbound calls follow a unified configuration and logging structure.
|
|
33
|
+
* - Promotes strong typing and maintainable HTTP logic.
|
|
34
|
+
* - Makes service interactions predictable and debuggable across environments.
|
|
35
|
+
*/
|
|
36
|
+
let AccountsService = class AccountsService extends base_http_service_1.BaseHttpService {
|
|
37
|
+
/**
|
|
38
|
+
* Constructs an Accounts service client instance.
|
|
39
|
+
*
|
|
40
|
+
* @param {AuthenticationModuleOptions} authenticationOptions - Injected authentication configuration.
|
|
41
|
+
* @param {ConfigService} configService - NestJS ConfigService for environment detection.
|
|
42
|
+
*/
|
|
43
|
+
constructor(authenticationOptions, configService) {
|
|
44
|
+
super('Accounts', base_urls_1.BaseUrls.accountsService, authenticationOptions, configService);
|
|
45
|
+
}
|
|
46
|
+
// ─────────────────────────────────────────────────────────────
|
|
47
|
+
// Account Resource Methods
|
|
48
|
+
// ─────────────────────────────────────────────────────────────
|
|
49
|
+
/**
|
|
50
|
+
* Retrieves a single account entry by its MongoDB identifier.
|
|
51
|
+
*
|
|
52
|
+
* This method gracefully handles downstream failures by logging
|
|
53
|
+
* and returning `undefined` instead of throwing.
|
|
54
|
+
*
|
|
55
|
+
* @param {string} accountId - Unique MongoDB identifier of the account.
|
|
56
|
+
* @param {FetchAccountOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
|
|
57
|
+
* @returns {Promise<Account | undefined>} Resolves to an Account or `undefined` on failure.
|
|
58
|
+
*/
|
|
59
|
+
async fetchAccountV1(accountId, options) {
|
|
60
|
+
return this.fetchResource(`v1/internal/account/${accountId}`, { params: options });
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Retrieves a collection of account entries.
|
|
64
|
+
*
|
|
65
|
+
* Useful for batch lookups or paginated listings.
|
|
66
|
+
* Returns an empty array if the downstream service call fails.
|
|
67
|
+
*
|
|
68
|
+
* @param {FetchAccountOptionsDtoV1} [options] - Optional filter options for narrowing results.
|
|
69
|
+
* @returns {Promise<Account[]>} Resolves to a list of accounts, or an empty array if none found.
|
|
70
|
+
*/
|
|
71
|
+
async fetchAccountCollectionV1(options) {
|
|
72
|
+
return this.fetchResourceCollection(`v1/internal/accounts`, { params: options });
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Fetches accounts for multiple groups of account IDs and returns a mapped result.
|
|
76
|
+
*
|
|
77
|
+
* This is particularly useful when aggregating accounts related to different entities
|
|
78
|
+
* (e.g., post authors, commenters, likedBy lists).
|
|
79
|
+
*
|
|
80
|
+
* The function ensures:
|
|
81
|
+
* - Each unique account is fetched only once.
|
|
82
|
+
* - The result is returned as an `EntityMap` for O(1) lookups.
|
|
83
|
+
*
|
|
84
|
+
* @param {string[][]} accountIdGroups - Nested arrays of account IDs.
|
|
85
|
+
* @returns {Promise<EntityMap<Account>>} Map of accountId → Account entity.
|
|
86
|
+
*/
|
|
87
|
+
async fetchAccountMapV1(accountIdGroups) {
|
|
88
|
+
// Aggregate all unique account IDs across groups to avoid redundant network calls.
|
|
89
|
+
const uniqueAccountIds = new Set(accountIdGroups.flat());
|
|
90
|
+
if (uniqueAccountIds.size === 0)
|
|
91
|
+
return new classes_1.EntityMap();
|
|
92
|
+
// Retrieve all accounts in one or more batched requests.
|
|
93
|
+
const accountCollection = await this.fetchAccountCollectionV1({ ids: Array.from(uniqueAccountIds) });
|
|
94
|
+
// Convert array to an entity map for efficient downstream access.
|
|
95
|
+
return new classes_1.EntityMap(accountCollection);
|
|
96
|
+
}
|
|
97
|
+
// ─────────────────────────────────────────────────────────────
|
|
98
|
+
// User Resource Methods
|
|
99
|
+
// ─────────────────────────────────────────────────────────────
|
|
100
|
+
/**
|
|
101
|
+
* Retrieves a single user entry by its MongoDB identifier.
|
|
102
|
+
*
|
|
103
|
+
* This method gracefully handles downstream failures by logging
|
|
104
|
+
* and returning `undefined` instead of throwing.
|
|
105
|
+
*
|
|
106
|
+
* @param {string} userId - Unique MongoDB identifier of the user.
|
|
107
|
+
* @param {FetchAccountOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
|
|
108
|
+
* @returns {Promise<User | undefined>} Resolves to an User or `undefined` on failure.
|
|
109
|
+
*/
|
|
110
|
+
async fetchUserV1(userId, options) {
|
|
111
|
+
return this.fetchResource(`v1/internal/user/${userId}`, { params: options });
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Retrieves a collection of user entries.
|
|
115
|
+
*
|
|
116
|
+
* Useful for batch lookups or paginated listings.
|
|
117
|
+
* Returns an empty array if the downstream service call fails.
|
|
118
|
+
*
|
|
119
|
+
* @param {FetchAccountOptionsDtoV1} [options] - Optional filter options for narrowing results.
|
|
120
|
+
* @returns {Promise<User[]>} Resolves to a list of users, or an empty array if none found.
|
|
121
|
+
*/
|
|
122
|
+
async fetchUserCollectionV1(options) {
|
|
123
|
+
return this.fetchResourceCollection(`v1/internal/users`, { params: options });
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Fetches users for multiple groups of user IDs and returns a mapped result.
|
|
127
|
+
*
|
|
128
|
+
* This is particularly useful when aggregating users related to different entities
|
|
129
|
+
* (e.g., post authors, commenters, likedBy lists).
|
|
130
|
+
*
|
|
131
|
+
* The function ensures:
|
|
132
|
+
* - Each unique user is fetched only once.
|
|
133
|
+
* - The result is returned as an `EntityMap` for O(1) lookups.
|
|
134
|
+
*
|
|
135
|
+
* @param {string[][]} userIdGroups - Nested arrays of user IDs.
|
|
136
|
+
* @returns {Promise<EntityMap<User>>} Map of userId → User entity.
|
|
137
|
+
*/
|
|
138
|
+
async fetchUserMapV1(userIdGroups) {
|
|
139
|
+
// Aggregate all unique user IDs across groups to avoid redundant network calls.
|
|
140
|
+
const uniqueUserIds = new Set(userIdGroups.flat());
|
|
141
|
+
if (uniqueUserIds.size === 0)
|
|
142
|
+
return new classes_1.EntityMap();
|
|
143
|
+
// Retrieve all users in one or more batched requests.
|
|
144
|
+
const userCollection = await this.fetchUserCollectionV1({ ids: Array.from(uniqueUserIds) });
|
|
145
|
+
// Convert array to an entity map for efficient downstream access.
|
|
146
|
+
return new classes_1.EntityMap(userCollection);
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
exports.AccountsService = AccountsService;
|
|
150
|
+
exports.AccountsService = AccountsService = __decorate([
|
|
151
|
+
(0, common_1.Injectable)(),
|
|
152
|
+
__param(0, (0, authentication_1.InjectAuthenticationOptions)()),
|
|
153
|
+
__metadata("design:paramtypes", [Object, config_1.ConfigService])
|
|
154
|
+
], AccountsService);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BaseFetchOptions, TimestampsFetchOptions } from '../../../../classes';
|
|
2
|
+
/**
|
|
3
|
+
* FetchAccountOptionsDtoV1
|
|
4
|
+
*
|
|
5
|
+
* Data Transfer Object for querying account or user collections.
|
|
6
|
+
* Inherits timestamp filtering fields and extends them with
|
|
7
|
+
* account-specific query parameters.
|
|
8
|
+
*/
|
|
9
|
+
export type FetchAccountOptionsDtoV1 = BaseFetchOptions & TimestampsFetchOptions & {
|
|
10
|
+
email?: string;
|
|
11
|
+
emails?: string[];
|
|
12
|
+
username?: string;
|
|
13
|
+
usernames?: string[];
|
|
14
|
+
perm?: string;
|
|
15
|
+
perms?: string[];
|
|
16
|
+
hasPassword?: boolean;
|
|
17
|
+
enabledNotificationType?: string;
|
|
18
|
+
enabledNotificationTypes?: string[];
|
|
19
|
+
signedUpMin?: number;
|
|
20
|
+
signedUpMax?: number;
|
|
21
|
+
signedInMin?: number;
|
|
22
|
+
signedInMax?: number;
|
|
23
|
+
createdAtMin?: number;
|
|
24
|
+
createdAtMax?: number;
|
|
25
|
+
lastSeenAtMin?: number;
|
|
26
|
+
lastSeenAtMax?: number;
|
|
27
|
+
updatedAtMin?: number;
|
|
28
|
+
updatedAtMax?: number;
|
|
29
|
+
};
|
|
@@ -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("./accounts.service"), exports);
|
|
18
|
+
__exportStar(require("./fetch-account-options.dto.v1.type"), exports);
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ConfigService } from '@nestjs/config';
|
|
2
|
+
import { LabBook } from 'itlab-functions';
|
|
3
|
+
import { AuthenticationModuleOptions } from '../../../authentication';
|
|
4
|
+
import { BaseHttpService } from '../../base-http.service';
|
|
5
|
+
import { FetchBookOptionsDtoV1 } from './fetch-book-options.dto.v1.type';
|
|
6
|
+
/**
|
|
7
|
+
* BooksService
|
|
8
|
+
*
|
|
9
|
+
* Service client responsible for interacting with the Books 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 BooksService extends BaseHttpService {
|
|
21
|
+
/**
|
|
22
|
+
* Constructs an Books 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 book 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} bookId - Unique MongoDB identifier of the book.
|
|
35
|
+
* @param {FetchBookOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
|
|
36
|
+
* @returns {Promise<LabBook | undefined>} Resolves to an Book or `undefined` on failure.
|
|
37
|
+
*/
|
|
38
|
+
fetchBookV1(bookId: string, options?: FetchBookOptionsDtoV1): Promise<LabBook | undefined>;
|
|
39
|
+
/**
|
|
40
|
+
* Retrieves a collection of book entries.
|
|
41
|
+
*
|
|
42
|
+
* Useful for batch lookups or paginated listings.
|
|
43
|
+
* Returns an empty array if the downstream service call fails.
|
|
44
|
+
*
|
|
45
|
+
* @param {FetchBookOptionsDtoV1} [options] - Optional filter options for narrowing results.
|
|
46
|
+
* @returns {Promise<LabBook[]>} Resolves to a list of books, or an empty array if none found.
|
|
47
|
+
*/
|
|
48
|
+
fetchBookCollectionV1(options?: FetchBookOptionsDtoV1): Promise<LabBook[]>;
|
|
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.BooksService = 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
|
+
* BooksService
|
|
23
|
+
*
|
|
24
|
+
* Service client responsible for interacting with the Books 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 BooksService = class BooksService extends base_http_service_1.BaseHttpService {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs an Books 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('Books', base_urls_1.BaseUrls.booksService, authenticationOptions, configService);
|
|
44
|
+
}
|
|
45
|
+
// ─────────────────────────────────────────────────────────────
|
|
46
|
+
// Book Resource Methods
|
|
47
|
+
// ─────────────────────────────────────────────────────────────
|
|
48
|
+
/**
|
|
49
|
+
* Retrieves a single book 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} bookId - Unique MongoDB identifier of the book.
|
|
55
|
+
* @param {FetchBookOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
|
|
56
|
+
* @returns {Promise<LabBook | undefined>} Resolves to an Book or `undefined` on failure.
|
|
57
|
+
*/
|
|
58
|
+
async fetchBookV1(bookId, options) {
|
|
59
|
+
return this.fetchResource(`v1/internal/book/${bookId}`, { params: options });
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Retrieves a collection of book entries.
|
|
63
|
+
*
|
|
64
|
+
* Useful for batch lookups or paginated listings.
|
|
65
|
+
* Returns an empty array if the downstream service call fails.
|
|
66
|
+
*
|
|
67
|
+
* @param {FetchBookOptionsDtoV1} [options] - Optional filter options for narrowing results.
|
|
68
|
+
* @returns {Promise<LabBook[]>} Resolves to a list of books, or an empty array if none found.
|
|
69
|
+
*/
|
|
70
|
+
async fetchBookCollectionV1(options) {
|
|
71
|
+
return this.fetchResourceCollection(`v1/internal/books`, { params: options });
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
exports.BooksService = BooksService;
|
|
75
|
+
exports.BooksService = BooksService = __decorate([
|
|
76
|
+
(0, common_1.Injectable)(),
|
|
77
|
+
__param(0, (0, authentication_1.InjectAuthenticationOptions)()),
|
|
78
|
+
__metadata("design:paramtypes", [Object, config_1.ConfigService])
|
|
79
|
+
], BooksService);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BaseFetchOptions, CommentsFetchOptions, ContentFetchOptions, DraftedFetchOptions, LikedByFetchOptions, TimestampsFetchOptions, ViewedByFetchOptions } from '../../../../classes';
|
|
2
|
+
/**
|
|
3
|
+
* FetchBookOptionsDtoV1
|
|
4
|
+
*
|
|
5
|
+
* Data Transfer Object for querying book collections.
|
|
6
|
+
* Inherits timestamp filtering fields and extends them with
|
|
7
|
+
* book-specific query parameters.
|
|
8
|
+
*/
|
|
9
|
+
export type FetchBookOptionsDtoV1 = BaseFetchOptions & TimestampsFetchOptions & DraftedFetchOptions & ContentFetchOptions & ViewedByFetchOptions & LikedByFetchOptions & CommentsFetchOptions & {
|
|
10
|
+
includeReadingList?: boolean;
|
|
11
|
+
includeReadingListIds?: boolean;
|
|
12
|
+
includeSubmitter?: boolean;
|
|
13
|
+
topic?: string;
|
|
14
|
+
topics?: string[];
|
|
15
|
+
genre?: string;
|
|
16
|
+
genres?: string[];
|
|
17
|
+
author?: string;
|
|
18
|
+
authors?: string[];
|
|
19
|
+
publisher?: string;
|
|
20
|
+
publishers?: string[];
|
|
21
|
+
submitterId?: string;
|
|
22
|
+
submitterIds?: string[];
|
|
23
|
+
releasedAtMin?: number;
|
|
24
|
+
releasedAtMax?: number;
|
|
25
|
+
timestampMin?: number;
|
|
26
|
+
timestampMax?: number;
|
|
27
|
+
};
|
|
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./books.service"), exports);
|
|
18
|
+
__exportStar(require("./fetch-book-options.dto.v1.type"), exports);
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ConfigService } from '@nestjs/config';
|
|
2
|
+
import { User } from '../../../../models';
|
|
3
|
+
import { AuthenticationModuleOptions } from '../../../authentication';
|
|
4
|
+
import { BaseHttpService } from '../../base-http.service';
|
|
5
|
+
import { FetchChangeOptionsDtoV1 } from './fetch-change-options.dto.v1.type';
|
|
6
|
+
type LabChangelogChange = {
|
|
7
|
+
id: string;
|
|
8
|
+
_year: number;
|
|
9
|
+
_month: number;
|
|
10
|
+
_date: number;
|
|
11
|
+
contactId: string;
|
|
12
|
+
timestamp: number;
|
|
13
|
+
draft: boolean;
|
|
14
|
+
silencedNotification: boolean;
|
|
15
|
+
content: string;
|
|
16
|
+
contact?: User;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* ChangelogService
|
|
20
|
+
*
|
|
21
|
+
* Service client responsible for interacting with the Changelog microservice.
|
|
22
|
+
* Extends `BaseHttpService` to inherit:
|
|
23
|
+
* - Environment-sensitive URL resolution (internal vs. external).
|
|
24
|
+
* - Secure inter-service authentication.
|
|
25
|
+
* - Structured logging for traceability of outbound requests.
|
|
26
|
+
*
|
|
27
|
+
* Why this pattern?
|
|
28
|
+
* - Ensures all outbound calls follow a unified configuration and logging structure.
|
|
29
|
+
* - Promotes strong typing and maintainable HTTP logic.
|
|
30
|
+
* - Makes service interactions predictable and debuggable across environments.
|
|
31
|
+
*/
|
|
32
|
+
export declare class ChangelogService extends BaseHttpService {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs an Changelog service client instance.
|
|
35
|
+
*
|
|
36
|
+
* @param {AuthenticationModuleOptions} authenticationOptions - Injected authentication configuration.
|
|
37
|
+
* @param {ConfigService} configService - NestJS ConfigService for environment detection.
|
|
38
|
+
*/
|
|
39
|
+
constructor(authenticationOptions: AuthenticationModuleOptions, configService: ConfigService);
|
|
40
|
+
/**
|
|
41
|
+
* Retrieves a single changelog entry by its MongoDB identifier.
|
|
42
|
+
*
|
|
43
|
+
* This method gracefully handles downstream failures by logging
|
|
44
|
+
* and returning `undefined` instead of throwing.
|
|
45
|
+
*
|
|
46
|
+
* @param {string} changelogId - Unique MongoDB identifier of the changelog.
|
|
47
|
+
* @param {FetchChangeOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
|
|
48
|
+
* @returns {Promise<LabChangelogChange | undefined>} Resolves to an Changelog or `undefined` on failure.
|
|
49
|
+
*/
|
|
50
|
+
fetchChangelogV1(changelogId: string, options?: FetchChangeOptionsDtoV1): Promise<LabChangelogChange | undefined>;
|
|
51
|
+
/**
|
|
52
|
+
* Retrieves a collection of changelog entries.
|
|
53
|
+
*
|
|
54
|
+
* Useful for batch lookups or paginated listings.
|
|
55
|
+
* Returns an empty array if the downstream service call fails.
|
|
56
|
+
*
|
|
57
|
+
* @param {FetchChangeOptionsDtoV1} [options] - Optional filter options for narrowing results.
|
|
58
|
+
* @returns {Promise<LabChangelogChange[]>} Resolves to a list of changelogs, or an empty array if none found.
|
|
59
|
+
*/
|
|
60
|
+
fetchChangelogCollectionV1(options?: FetchChangeOptionsDtoV1): Promise<LabChangelogChange[]>;
|
|
61
|
+
}
|
|
62
|
+
export {};
|
|
@@ -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.ChangelogService = 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
|
+
* ChangelogService
|
|
23
|
+
*
|
|
24
|
+
* Service client responsible for interacting with the Changelog 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 ChangelogService = class ChangelogService extends base_http_service_1.BaseHttpService {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs an Changelog 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('Changelog', base_urls_1.BaseUrls.changelogService, authenticationOptions, configService);
|
|
44
|
+
}
|
|
45
|
+
// ─────────────────────────────────────────────────────────────
|
|
46
|
+
// Changelog Resource Methods
|
|
47
|
+
// ─────────────────────────────────────────────────────────────
|
|
48
|
+
/**
|
|
49
|
+
* Retrieves a single changelog 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} changelogId - Unique MongoDB identifier of the changelog.
|
|
55
|
+
* @param {FetchChangeOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
|
|
56
|
+
* @returns {Promise<LabChangelogChange | undefined>} Resolves to an Changelog or `undefined` on failure.
|
|
57
|
+
*/
|
|
58
|
+
async fetchChangelogV1(changelogId, options) {
|
|
59
|
+
return this.fetchResource(`v1/internal/changelog/${changelogId}`, { params: options });
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Retrieves a collection of changelog entries.
|
|
63
|
+
*
|
|
64
|
+
* Useful for batch lookups or paginated listings.
|
|
65
|
+
* Returns an empty array if the downstream service call fails.
|
|
66
|
+
*
|
|
67
|
+
* @param {FetchChangeOptionsDtoV1} [options] - Optional filter options for narrowing results.
|
|
68
|
+
* @returns {Promise<LabChangelogChange[]>} Resolves to a list of changelogs, or an empty array if none found.
|
|
69
|
+
*/
|
|
70
|
+
async fetchChangelogCollectionV1(options) {
|
|
71
|
+
return this.fetchResourceCollection(`v1/internal/changelogs`, { params: options });
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
exports.ChangelogService = ChangelogService;
|
|
75
|
+
exports.ChangelogService = ChangelogService = __decorate([
|
|
76
|
+
(0, common_1.Injectable)(),
|
|
77
|
+
__param(0, (0, authentication_1.InjectAuthenticationOptions)()),
|
|
78
|
+
__metadata("design:paramtypes", [Object, config_1.ConfigService])
|
|
79
|
+
], ChangelogService);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseFetchOptions, DraftedFetchOptions, TimestampsFetchOptions } from '../../../../classes';
|
|
2
|
+
/**
|
|
3
|
+
* FetchChangeOptionsDtoV1
|
|
4
|
+
*
|
|
5
|
+
* Data Transfer Object for querying changelog collections.
|
|
6
|
+
* Inherits timestamp filtering fields and extends them with
|
|
7
|
+
* changelog-specific query parameters.
|
|
8
|
+
*/
|
|
9
|
+
export type FetchChangeOptionsDtoV1 = BaseFetchOptions & TimestampsFetchOptions & DraftedFetchOptions & {
|
|
10
|
+
includeContact?: boolean;
|
|
11
|
+
contactId?: string;
|
|
12
|
+
contactIds?: string[];
|
|
13
|
+
timestampMin?: number;
|
|
14
|
+
timestampMax?: number;
|
|
15
|
+
};
|
|
@@ -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("./changelog.service"), exports);
|
|
18
|
+
__exportStar(require("./fetch-change-options.dto.v1.type"), exports);
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ConfigService } from '@nestjs/config';
|
|
2
|
+
import { AuthenticationModuleOptions } from '../../../authentication';
|
|
3
|
+
import { BaseHttpService } from '../../base-http.service';
|
|
4
|
+
import { FetchConflictOptionsDtoV1 } from './fetch-conflict-options.dto.v1.type';
|
|
5
|
+
type LabConflict = {
|
|
6
|
+
id: string;
|
|
7
|
+
_url: string;
|
|
8
|
+
_resource: string;
|
|
9
|
+
_resourceId: string;
|
|
10
|
+
firstRecordedAt: Date;
|
|
11
|
+
lastRecordedAt: Date;
|
|
12
|
+
level: number;
|
|
13
|
+
message: number;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* ConflictsService
|
|
17
|
+
*
|
|
18
|
+
* Service client responsible for interacting with the Conflicts microservice.
|
|
19
|
+
* Extends `BaseHttpService` to inherit:
|
|
20
|
+
* - Environment-sensitive URL resolution (internal vs. external).
|
|
21
|
+
* - Secure inter-service authentication.
|
|
22
|
+
* - Structured logging for traceability of outbound requests.
|
|
23
|
+
*
|
|
24
|
+
* Why this pattern?
|
|
25
|
+
* - Ensures all outbound calls follow a unified configuration and logging structure.
|
|
26
|
+
* - Promotes strong typing and maintainable HTTP logic.
|
|
27
|
+
* - Makes service interactions predictable and debuggable across environments.
|
|
28
|
+
*/
|
|
29
|
+
export declare class ConflictsService extends BaseHttpService {
|
|
30
|
+
/**
|
|
31
|
+
* Constructs an Conflicts service client instance.
|
|
32
|
+
*
|
|
33
|
+
* @param {AuthenticationModuleOptions} authenticationOptions - Injected authentication configuration.
|
|
34
|
+
* @param {ConfigService} configService - NestJS ConfigService for environment detection.
|
|
35
|
+
*/
|
|
36
|
+
constructor(authenticationOptions: AuthenticationModuleOptions, configService: ConfigService);
|
|
37
|
+
/**
|
|
38
|
+
* Retrieves a single conflict entry by its MongoDB identifier.
|
|
39
|
+
*
|
|
40
|
+
* This method gracefully handles downstream failures by logging
|
|
41
|
+
* and returning `undefined` instead of throwing.
|
|
42
|
+
*
|
|
43
|
+
* @param {string} conflictId - Unique MongoDB identifier of the conflict.
|
|
44
|
+
* @param {FetchConflictOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
|
|
45
|
+
* @returns {Promise<LabConflict | undefined>} Resolves to an Conflict or `undefined` on failure.
|
|
46
|
+
*/
|
|
47
|
+
fetchConflictV1(conflictId: string, options?: FetchConflictOptionsDtoV1): Promise<LabConflict | undefined>;
|
|
48
|
+
/**
|
|
49
|
+
* Retrieves a collection of conflict entries.
|
|
50
|
+
*
|
|
51
|
+
* Useful for batch lookups or paginated listings.
|
|
52
|
+
* Returns an empty array if the downstream service call fails.
|
|
53
|
+
*
|
|
54
|
+
* @param {FetchConflictOptionsDtoV1} [options] - Optional filter options for narrowing results.
|
|
55
|
+
* @returns {Promise<LabConflict[]>} Resolves to a list of conflicts, or an empty array if none found.
|
|
56
|
+
*/
|
|
57
|
+
fetchConflictCollectionV1(options?: FetchConflictOptionsDtoV1): Promise<LabConflict[]>;
|
|
58
|
+
}
|
|
59
|
+
export {};
|