itlab-internal-services 2.16.8 → 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 +1 -1
- 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 +1 -1
- 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
|
@@ -1,131 +0,0 @@
|
|
|
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 itlab_functions_1 = require("itlab-functions");
|
|
19
|
-
const classes_1 = require("../../../classes");
|
|
20
|
-
const authentication_1 = require("../../authentication");
|
|
21
|
-
const base_http_service_1 = require("../base-http.service");
|
|
22
|
-
const base_urls_1 = require("../base-urls");
|
|
23
|
-
const chunkSize = 100;
|
|
24
|
-
/**
|
|
25
|
-
* AccountsService
|
|
26
|
-
*
|
|
27
|
-
* Service client for interacting with the Accounts domain.
|
|
28
|
-
* Inherits logging, authentication, and environment-sensitive URL resolution from `BaseHttpService`.
|
|
29
|
-
*/
|
|
30
|
-
let AccountsService = class AccountsService extends base_http_service_1.BaseHttpService {
|
|
31
|
-
/**
|
|
32
|
-
* Constructs a Accounts service client.
|
|
33
|
-
*
|
|
34
|
-
* @param {AuthenticationModuleOptions} authenticationOptions - Authentication options (provided by DI).
|
|
35
|
-
* @param {ConfigService} configService - Global NestJS config service for environment detection.
|
|
36
|
-
*/
|
|
37
|
-
constructor(authenticationOptions, configService) {
|
|
38
|
-
super('Accounts', base_urls_1.BaseUrls.AccountsService, authenticationOptions, configService);
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Retrieves a single account entry by its MongoDB identifier.
|
|
42
|
-
*
|
|
43
|
-
* If the downstream call fails or the resource does not exist, the method
|
|
44
|
-
* will log the failure and return `undefined`.
|
|
45
|
-
*
|
|
46
|
-
* @param {string} accountId - Unique MongoDB identifier of the account item.
|
|
47
|
-
* @returns {Promise<Account | undefined>} Resolves to the account object if found, otherwise `undefined`.
|
|
48
|
-
*/
|
|
49
|
-
async getAccount(accountId) {
|
|
50
|
-
return this.fetchResource(`internal/account/${accountId}`);
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Retrieves a collection of account entries by their MongoDB identifiers.
|
|
54
|
-
*
|
|
55
|
-
* If the downstream call fails, an empty array is returned.
|
|
56
|
-
*
|
|
57
|
-
* @param {string[]} accountIds - Array of MongoDB identifiers for the account items.
|
|
58
|
-
* @returns {Promise<Account[]>} Resolves to an array of account objects (empty if none found).
|
|
59
|
-
*/
|
|
60
|
-
async getAccountCollection(accountIds) {
|
|
61
|
-
if (accountIds.length === 0)
|
|
62
|
-
return [];
|
|
63
|
-
const chunkedAccountIds = (0, itlab_functions_1.createChunks)(accountIds, chunkSize);
|
|
64
|
-
const chunkedAccounts = chunkedAccountIds.map((accountIds) => {
|
|
65
|
-
return this.fetchResourceCollection(`internal/accounts`, { params: { ids: accountIds } });
|
|
66
|
-
});
|
|
67
|
-
return (await Promise.all(chunkedAccounts)).flat();
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Fetches all accounts for the given ID groups and returns a mapping.
|
|
71
|
-
* Ensures each account is fetched only once.
|
|
72
|
-
* @param accountIdGroups Array of arrays of account IDs (e.g., authors, likedBy, viewedBy)
|
|
73
|
-
* @returns Map of accountId -> Account
|
|
74
|
-
*/
|
|
75
|
-
async getAccountMap(accountIdGroups) {
|
|
76
|
-
// Collect all unique account IDs across all groups
|
|
77
|
-
const uniqueAccountIds = new Set(accountIdGroups.flat());
|
|
78
|
-
if (uniqueAccountIds.size === 0)
|
|
79
|
-
return new classes_1.EntityMap();
|
|
80
|
-
// Fetch all accounts once
|
|
81
|
-
const accountCollection = await this.getAccountCollection(Array.from(uniqueAccountIds));
|
|
82
|
-
// Build a map for quick lookup
|
|
83
|
-
return new classes_1.EntityMap(accountCollection);
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Retrieves a single user entry derived from an account.
|
|
87
|
-
*
|
|
88
|
-
* @param {string} userId - Unique identifier of the user (mapped from account ID).
|
|
89
|
-
* @returns {Promise<User | undefined>} Resolves to the user object if found, otherwise `undefined`.
|
|
90
|
-
*/
|
|
91
|
-
async getUser(userId) {
|
|
92
|
-
return this.fetchResource(`internal/user/${userId}`);
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Retrieves multiple users in a single request.
|
|
96
|
-
*
|
|
97
|
-
* @param {string[]} userIds - Array of user identifiers (mapped from account IDs).
|
|
98
|
-
* @returns {Promise<User[]>} Resolves to a list of users (empty array if none found).
|
|
99
|
-
*/
|
|
100
|
-
async getUserCollection(userIds) {
|
|
101
|
-
if (userIds.length === 0)
|
|
102
|
-
return [];
|
|
103
|
-
const chunkedUserIds = (0, itlab_functions_1.createChunks)(userIds, chunkSize);
|
|
104
|
-
const chunkedUsers = chunkedUserIds.map((userIds) => {
|
|
105
|
-
return this.fetchResourceCollection(`internal/users`, { params: { ids: userIds } });
|
|
106
|
-
});
|
|
107
|
-
return (await Promise.all(chunkedUsers)).flat();
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Fetches all users for the given ID groups and returns a mapping.
|
|
111
|
-
* Ensures each user is fetched only once.
|
|
112
|
-
* @param userIdGroups Array of arrays of user IDs (e.g., authors, likedBy, viewedBy)
|
|
113
|
-
* @returns Map of userId -> user
|
|
114
|
-
*/
|
|
115
|
-
async getUserMap(userIdGroups) {
|
|
116
|
-
// Collect all unique user IDs across all groups
|
|
117
|
-
const uniqueUserIds = new Set(userIdGroups.flat());
|
|
118
|
-
if (uniqueUserIds.size === 0)
|
|
119
|
-
return new classes_1.EntityMap();
|
|
120
|
-
// Fetch all users once
|
|
121
|
-
const userCollection = await this.getUserCollection(Array.from(uniqueUserIds));
|
|
122
|
-
// Build a map for quick lookup
|
|
123
|
-
return new classes_1.EntityMap(userCollection);
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
exports.AccountsService = AccountsService;
|
|
127
|
-
exports.AccountsService = AccountsService = __decorate([
|
|
128
|
-
(0, common_1.Injectable)(),
|
|
129
|
-
__param(0, (0, authentication_1.InjectAuthenticationOptions)()),
|
|
130
|
-
__metadata("design:paramtypes", [Object, config_1.ConfigService])
|
|
131
|
-
], AccountsService);
|
|
@@ -1,29 +0,0 @@
|
|
|
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
|
-
/**
|
|
6
|
-
* BooksService
|
|
7
|
-
*
|
|
8
|
-
* Service client for interacting with the Books domain.
|
|
9
|
-
* Inherits logging, authentication, and environment-sensitive URL resolution from `BaseHttpService`.
|
|
10
|
-
*/
|
|
11
|
-
export declare class BooksService extends BaseHttpService {
|
|
12
|
-
/**
|
|
13
|
-
* Constructs a Books service client.
|
|
14
|
-
*
|
|
15
|
-
* @param {AuthenticationModuleOptions} authenticationOptions - Authentication options (provided by DI).
|
|
16
|
-
* @param {ConfigService} configService - Global NestJS config service for environment detection.
|
|
17
|
-
*/
|
|
18
|
-
constructor(authenticationOptions: AuthenticationModuleOptions, configService: ConfigService);
|
|
19
|
-
/**
|
|
20
|
-
* Retrieves a single book entry by its MongoDB identifier.
|
|
21
|
-
*
|
|
22
|
-
* If the downstream call fails or the resource does not exist, the method
|
|
23
|
-
* will log the failure and return `undefined`.
|
|
24
|
-
*
|
|
25
|
-
* @param {string} bookId - Unique MongoDB identifier of the book item.
|
|
26
|
-
* @returns {Promise<LabBook | undefined>} Resolves to the book object if found, otherwise `undefined`.
|
|
27
|
-
*/
|
|
28
|
-
fetchBookById(bookId?: string): Promise<LabBook>;
|
|
29
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
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 for interacting with the Books domain.
|
|
25
|
-
* Inherits logging, authentication, and environment-sensitive URL resolution from `BaseHttpService`.
|
|
26
|
-
*/
|
|
27
|
-
let BooksService = class BooksService extends base_http_service_1.BaseHttpService {
|
|
28
|
-
/**
|
|
29
|
-
* Constructs a Books service client.
|
|
30
|
-
*
|
|
31
|
-
* @param {AuthenticationModuleOptions} authenticationOptions - Authentication options (provided by DI).
|
|
32
|
-
* @param {ConfigService} configService - Global NestJS config service for environment detection.
|
|
33
|
-
*/
|
|
34
|
-
constructor(authenticationOptions, configService) {
|
|
35
|
-
super('Books', base_urls_1.BaseUrls.BooksService, authenticationOptions, configService);
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Retrieves a single book entry by its MongoDB identifier.
|
|
39
|
-
*
|
|
40
|
-
* If the downstream call fails or the resource does not exist, the method
|
|
41
|
-
* will log the failure and return `undefined`.
|
|
42
|
-
*
|
|
43
|
-
* @param {string} bookId - Unique MongoDB identifier of the book item.
|
|
44
|
-
* @returns {Promise<LabBook | undefined>} Resolves to the book object if found, otherwise `undefined`.
|
|
45
|
-
*/
|
|
46
|
-
async fetchBookById(bookId) {
|
|
47
|
-
return this.fetchResource(`internal/book/${bookId}`);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
exports.BooksService = BooksService;
|
|
51
|
-
exports.BooksService = BooksService = __decorate([
|
|
52
|
-
(0, common_1.Injectable)(),
|
|
53
|
-
__param(0, (0, authentication_1.InjectAuthenticationOptions)()),
|
|
54
|
-
__metadata("design:paramtypes", [Object, config_1.ConfigService])
|
|
55
|
-
], BooksService);
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ConfigService } from '@nestjs/config';
|
|
2
|
-
import { AuthenticationModuleOptions } from '../../authentication';
|
|
3
|
-
import { BaseHttpService } from '../base-http.service';
|
|
4
|
-
/**
|
|
5
|
-
* ChangelogService
|
|
6
|
-
*
|
|
7
|
-
* Service client for interacting with the Changelog domain.
|
|
8
|
-
* Inherits logging, authentication, and environment-sensitive URL resolution from `BaseHttpService`.
|
|
9
|
-
*/
|
|
10
|
-
export declare class ChangelogService extends BaseHttpService {
|
|
11
|
-
/**
|
|
12
|
-
* Constructs a Changelog service client.
|
|
13
|
-
*
|
|
14
|
-
* @param {AuthenticationModuleOptions} authenticationOptions - Authentication options (provided by DI).
|
|
15
|
-
* @param {ConfigService} configService - Global NestJS config service for environment detection.
|
|
16
|
-
*/
|
|
17
|
-
constructor(authenticationOptions: AuthenticationModuleOptions, configService: ConfigService);
|
|
18
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
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 for interacting with the Changelog domain.
|
|
25
|
-
* Inherits logging, authentication, and environment-sensitive URL resolution from `BaseHttpService`.
|
|
26
|
-
*/
|
|
27
|
-
let ChangelogService = class ChangelogService extends base_http_service_1.BaseHttpService {
|
|
28
|
-
/**
|
|
29
|
-
* Constructs a Changelog service client.
|
|
30
|
-
*
|
|
31
|
-
* @param {AuthenticationModuleOptions} authenticationOptions - Authentication options (provided by DI).
|
|
32
|
-
* @param {ConfigService} configService - Global NestJS config service for environment detection.
|
|
33
|
-
*/
|
|
34
|
-
constructor(authenticationOptions, configService) {
|
|
35
|
-
super('Changelog', base_urls_1.BaseUrls.ChangelogService, authenticationOptions, configService);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
exports.ChangelogService = ChangelogService;
|
|
39
|
-
exports.ChangelogService = ChangelogService = __decorate([
|
|
40
|
-
(0, common_1.Injectable)(),
|
|
41
|
-
__param(0, (0, authentication_1.InjectAuthenticationOptions)()),
|
|
42
|
-
__metadata("design:paramtypes", [Object, config_1.ConfigService])
|
|
43
|
-
], ChangelogService);
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { ConfigService } from '@nestjs/config';
|
|
2
|
-
import { LabDemo } from 'itlab-functions';
|
|
3
|
-
import { AuthenticationModuleOptions } from '../../authentication';
|
|
4
|
-
import { BaseHttpService } from '../base-http.service';
|
|
5
|
-
/**
|
|
6
|
-
* DemoHiveService
|
|
7
|
-
*
|
|
8
|
-
* Service client for interacting with the DemoHive domain.
|
|
9
|
-
* Inherits logging, authentication, and environment-sensitive URL resolution from `BaseHttpService`.
|
|
10
|
-
*/
|
|
11
|
-
export declare class DemoHiveService extends BaseHttpService {
|
|
12
|
-
/**
|
|
13
|
-
* Constructs a DemoHive service client.
|
|
14
|
-
*
|
|
15
|
-
* @param {AuthenticationModuleOptions} authenticationOptions - Authentication options (provided by DI).
|
|
16
|
-
* @param {ConfigService} configService - Global NestJS config service for environment detection.
|
|
17
|
-
*/
|
|
18
|
-
constructor(authenticationOptions: AuthenticationModuleOptions, configService: ConfigService);
|
|
19
|
-
/**
|
|
20
|
-
* Retrieves a single demo entry by its MongoDB identifier.
|
|
21
|
-
*
|
|
22
|
-
* If the downstream call fails or the resource does not exist, the method
|
|
23
|
-
* will log the failure and return `undefined`.
|
|
24
|
-
*
|
|
25
|
-
* @param {string} demoId - Unique MongoDB identifier of the demo item.
|
|
26
|
-
* @returns {Promise<LabDemo | undefined>} Resolves to the demo object if found, otherwise `undefined`.
|
|
27
|
-
*/
|
|
28
|
-
fetchDemoById(demoId: string): Promise<LabDemo | undefined>;
|
|
29
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
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.DemoHiveService = 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
|
-
* DemoHiveService
|
|
23
|
-
*
|
|
24
|
-
* Service client for interacting with the DemoHive domain.
|
|
25
|
-
* Inherits logging, authentication, and environment-sensitive URL resolution from `BaseHttpService`.
|
|
26
|
-
*/
|
|
27
|
-
let DemoHiveService = class DemoHiveService extends base_http_service_1.BaseHttpService {
|
|
28
|
-
/**
|
|
29
|
-
* Constructs a DemoHive service client.
|
|
30
|
-
*
|
|
31
|
-
* @param {AuthenticationModuleOptions} authenticationOptions - Authentication options (provided by DI).
|
|
32
|
-
* @param {ConfigService} configService - Global NestJS config service for environment detection.
|
|
33
|
-
*/
|
|
34
|
-
constructor(authenticationOptions, configService) {
|
|
35
|
-
super('DemoHive', base_urls_1.BaseUrls.DemoHiveService, authenticationOptions, configService);
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Retrieves a single demo entry by its MongoDB identifier.
|
|
39
|
-
*
|
|
40
|
-
* If the downstream call fails or the resource does not exist, the method
|
|
41
|
-
* will log the failure and return `undefined`.
|
|
42
|
-
*
|
|
43
|
-
* @param {string} demoId - Unique MongoDB identifier of the demo item.
|
|
44
|
-
* @returns {Promise<LabDemo | undefined>} Resolves to the demo object if found, otherwise `undefined`.
|
|
45
|
-
*/
|
|
46
|
-
async fetchDemoById(demoId) {
|
|
47
|
-
return this.fetchResource(`internal/demo/${demoId}`);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
exports.DemoHiveService = DemoHiveService;
|
|
51
|
-
exports.DemoHiveService = DemoHiveService = __decorate([
|
|
52
|
-
(0, common_1.Injectable)(),
|
|
53
|
-
__param(0, (0, authentication_1.InjectAuthenticationOptions)()),
|
|
54
|
-
__metadata("design:paramtypes", [Object, config_1.ConfigService])
|
|
55
|
-
], DemoHiveService);
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { ConfigService } from '@nestjs/config';
|
|
2
|
-
import { LabEvent } from 'itlab-functions';
|
|
3
|
-
import { AuthenticationModuleOptions } from '../../authentication';
|
|
4
|
-
import { BaseHttpService } from '../base-http.service';
|
|
5
|
-
/**
|
|
6
|
-
* EventsService
|
|
7
|
-
*
|
|
8
|
-
* Service client for interacting with the Events domain.
|
|
9
|
-
* Inherits logging, authentication, and environment-sensitive URL resolution from `BaseHttpService`.
|
|
10
|
-
*/
|
|
11
|
-
export declare class EventsService extends BaseHttpService {
|
|
12
|
-
/**
|
|
13
|
-
* Constructs a Events service client.
|
|
14
|
-
*
|
|
15
|
-
* @param {AuthenticationModuleOptions} authenticationOptions - Authentication options (provided by DI).
|
|
16
|
-
* @param {ConfigService} configService - Global NestJS config service for environment detection.
|
|
17
|
-
*/
|
|
18
|
-
constructor(authenticationOptions: AuthenticationModuleOptions, configService: ConfigService);
|
|
19
|
-
/**
|
|
20
|
-
* Retrieves a single event entry by its MongoDB identifier.
|
|
21
|
-
*
|
|
22
|
-
* If the downstream call fails or the resource does not exist, the method
|
|
23
|
-
* will log the failure and return `undefined`.
|
|
24
|
-
*
|
|
25
|
-
* @param {string} eventId - Unique MongoDB identifier of the event item.
|
|
26
|
-
* @returns {Promise<LabEvent | undefined>} Resolves to the event object if found, otherwise `undefined`.
|
|
27
|
-
*/
|
|
28
|
-
fetchEventById(eventId?: string): Promise<LabEvent>;
|
|
29
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
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.EventsService = 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
|
-
* EventsService
|
|
23
|
-
*
|
|
24
|
-
* Service client for interacting with the Events domain.
|
|
25
|
-
* Inherits logging, authentication, and environment-sensitive URL resolution from `BaseHttpService`.
|
|
26
|
-
*/
|
|
27
|
-
let EventsService = class EventsService extends base_http_service_1.BaseHttpService {
|
|
28
|
-
/**
|
|
29
|
-
* Constructs a Events service client.
|
|
30
|
-
*
|
|
31
|
-
* @param {AuthenticationModuleOptions} authenticationOptions - Authentication options (provided by DI).
|
|
32
|
-
* @param {ConfigService} configService - Global NestJS config service for environment detection.
|
|
33
|
-
*/
|
|
34
|
-
constructor(authenticationOptions, configService) {
|
|
35
|
-
super('Events', base_urls_1.BaseUrls.EventsService, authenticationOptions, configService);
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Retrieves a single event entry by its MongoDB identifier.
|
|
39
|
-
*
|
|
40
|
-
* If the downstream call fails or the resource does not exist, the method
|
|
41
|
-
* will log the failure and return `undefined`.
|
|
42
|
-
*
|
|
43
|
-
* @param {string} eventId - Unique MongoDB identifier of the event item.
|
|
44
|
-
* @returns {Promise<LabEvent | undefined>} Resolves to the event object if found, otherwise `undefined`.
|
|
45
|
-
*/
|
|
46
|
-
async fetchEventById(eventId) {
|
|
47
|
-
return this.fetchResource(`internal/event/${eventId}`);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
exports.EventsService = EventsService;
|
|
51
|
-
exports.EventsService = EventsService = __decorate([
|
|
52
|
-
(0, common_1.Injectable)(),
|
|
53
|
-
__param(0, (0, authentication_1.InjectAuthenticationOptions)()),
|
|
54
|
-
__metadata("design:paramtypes", [Object, config_1.ConfigService])
|
|
55
|
-
], EventsService);
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { ConfigService } from '@nestjs/config';
|
|
2
|
-
import { LabHackschoolCourse, LabHackschoolDoc, LabHackschoolThread } from 'itlab-functions';
|
|
3
|
-
import { AuthenticationModuleOptions } from '../../authentication';
|
|
4
|
-
import { BaseHttpService } from '../base-http.service';
|
|
5
|
-
/**
|
|
6
|
-
* HackschoolService
|
|
7
|
-
*
|
|
8
|
-
* Service client for interacting with the Hackschool domain.
|
|
9
|
-
* Inherits logging, authentication, and environment-sensitive URL resolution from `BaseHttpService`.
|
|
10
|
-
*/
|
|
11
|
-
export declare class HackschoolService extends BaseHttpService {
|
|
12
|
-
/**
|
|
13
|
-
* Constructs a Hackschool service client.
|
|
14
|
-
*
|
|
15
|
-
* @param {AuthenticationModuleOptions} authenticationOptions - Authentication options (provided by DI).
|
|
16
|
-
* @param {ConfigService} configService - Global NestJS config service for environment detection.
|
|
17
|
-
*/
|
|
18
|
-
constructor(authenticationOptions: AuthenticationModuleOptions, configService: ConfigService);
|
|
19
|
-
/**
|
|
20
|
-
* Retrieves a single course entry by its MongoDB identifier.
|
|
21
|
-
*
|
|
22
|
-
* If the downstream call fails or the resource does not exist, the method
|
|
23
|
-
* will log the failure and return `undefined`.
|
|
24
|
-
*
|
|
25
|
-
* @param {string} courseId - Unique MongoDB identifier of the course item.
|
|
26
|
-
* @returns {Promise<LabHackschoolCourse | undefined>} Resolves to the course object if found, otherwise `undefined`.
|
|
27
|
-
*/
|
|
28
|
-
fetchCourseById(courseId: string): Promise<LabHackschoolCourse | undefined>;
|
|
29
|
-
/**
|
|
30
|
-
* Retrieves a single doc entry by its MongoDB identifier.
|
|
31
|
-
*
|
|
32
|
-
* If the downstream call fails or the resource does not exist, the method
|
|
33
|
-
* will log the failure and return `undefined`.
|
|
34
|
-
*
|
|
35
|
-
* @param {string} docId - Unique MongoDB identifier of the doc item.
|
|
36
|
-
* @returns {Promise<LabHackschoolDoc | undefined>} Resolves to the doc object if found, otherwise `undefined`.
|
|
37
|
-
*/
|
|
38
|
-
fetchDocById(docId: string): Promise<LabHackschoolDoc | undefined>;
|
|
39
|
-
/**
|
|
40
|
-
* Retrieves a single thread entry by its MongoDB identifier.
|
|
41
|
-
*
|
|
42
|
-
* If the downstream call fails or the resource does not exist, the method
|
|
43
|
-
* will log the failure and return `undefined`.
|
|
44
|
-
*
|
|
45
|
-
* @param {string} threadId - Unique MongoDB identifier of the thread item.
|
|
46
|
-
* @returns {Promise<LabHackschoolThread | undefined>} Resolves to the thread object if found, otherwise `undefined`.
|
|
47
|
-
*/
|
|
48
|
-
fetchThreadById(threadId: string): Promise<LabHackschoolThread | undefined>;
|
|
49
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
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.HackschoolService = 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
|
-
* HackschoolService
|
|
23
|
-
*
|
|
24
|
-
* Service client for interacting with the Hackschool domain.
|
|
25
|
-
* Inherits logging, authentication, and environment-sensitive URL resolution from `BaseHttpService`.
|
|
26
|
-
*/
|
|
27
|
-
let HackschoolService = class HackschoolService extends base_http_service_1.BaseHttpService {
|
|
28
|
-
/**
|
|
29
|
-
* Constructs a Hackschool service client.
|
|
30
|
-
*
|
|
31
|
-
* @param {AuthenticationModuleOptions} authenticationOptions - Authentication options (provided by DI).
|
|
32
|
-
* @param {ConfigService} configService - Global NestJS config service for environment detection.
|
|
33
|
-
*/
|
|
34
|
-
constructor(authenticationOptions, configService) {
|
|
35
|
-
super('Hackschool', base_urls_1.BaseUrls.HackschoolService, authenticationOptions, configService);
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Retrieves a single course entry by its MongoDB identifier.
|
|
39
|
-
*
|
|
40
|
-
* If the downstream call fails or the resource does not exist, the method
|
|
41
|
-
* will log the failure and return `undefined`.
|
|
42
|
-
*
|
|
43
|
-
* @param {string} courseId - Unique MongoDB identifier of the course item.
|
|
44
|
-
* @returns {Promise<LabHackschoolCourse | undefined>} Resolves to the course object if found, otherwise `undefined`.
|
|
45
|
-
*/
|
|
46
|
-
async fetchCourseById(courseId) {
|
|
47
|
-
return this.fetchResource(`internal/course/${courseId}`);
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Retrieves a single doc entry by its MongoDB identifier.
|
|
51
|
-
*
|
|
52
|
-
* If the downstream call fails or the resource does not exist, the method
|
|
53
|
-
* will log the failure and return `undefined`.
|
|
54
|
-
*
|
|
55
|
-
* @param {string} docId - Unique MongoDB identifier of the doc item.
|
|
56
|
-
* @returns {Promise<LabHackschoolDoc | undefined>} Resolves to the doc object if found, otherwise `undefined`.
|
|
57
|
-
*/
|
|
58
|
-
async fetchDocById(docId) {
|
|
59
|
-
return this.fetchResource(`internal/doc/${docId}`);
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Retrieves a single thread entry by its MongoDB identifier.
|
|
63
|
-
*
|
|
64
|
-
* If the downstream call fails or the resource does not exist, the method
|
|
65
|
-
* will log the failure and return `undefined`.
|
|
66
|
-
*
|
|
67
|
-
* @param {string} threadId - Unique MongoDB identifier of the thread item.
|
|
68
|
-
* @returns {Promise<LabHackschoolThread | undefined>} Resolves to the thread object if found, otherwise `undefined`.
|
|
69
|
-
*/
|
|
70
|
-
async fetchThreadById(threadId) {
|
|
71
|
-
return this.fetchResource(`internal/thread/${threadId}`);
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
exports.HackschoolService = HackschoolService;
|
|
75
|
-
exports.HackschoolService = HackschoolService = __decorate([
|
|
76
|
-
(0, common_1.Injectable)(),
|
|
77
|
-
__param(0, (0, authentication_1.InjectAuthenticationOptions)()),
|
|
78
|
-
__metadata("design:paramtypes", [Object, config_1.ConfigService])
|
|
79
|
-
], HackschoolService);
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { ConfigService } from '@nestjs/config';
|
|
2
|
-
import { LabNewsletter } from 'itlab-functions';
|
|
3
|
-
import { AuthenticationModuleOptions } from '../../authentication';
|
|
4
|
-
import { BaseHttpService } from '../base-http.service';
|
|
5
|
-
/**
|
|
6
|
-
* NewsletterService
|
|
7
|
-
*
|
|
8
|
-
* Service client for interacting with the Newsletter domain.
|
|
9
|
-
* Inherits logging, authentication, and environment-sensitive URL resolution from `BaseHttpService`.
|
|
10
|
-
*/
|
|
11
|
-
export declare class NewsletterService extends BaseHttpService {
|
|
12
|
-
/**
|
|
13
|
-
* Constructs a Newsletter service client.
|
|
14
|
-
*
|
|
15
|
-
* @param {AuthenticationModuleOptions} authenticationOptions - Authentication options (provided by DI).
|
|
16
|
-
* @param {ConfigService} configService - Global NestJS config service for environment detection.
|
|
17
|
-
*/
|
|
18
|
-
constructor(authenticationOptions: AuthenticationModuleOptions, configService: ConfigService);
|
|
19
|
-
/**
|
|
20
|
-
* Retrieves a single issue entry by its MongoDB identifier.
|
|
21
|
-
*
|
|
22
|
-
* If the downstream call fails or the resource does not exist, the method
|
|
23
|
-
* will log the failure and return `undefined`.
|
|
24
|
-
*
|
|
25
|
-
* @param {string} issueId - Unique MongoDB identifier of the issue item.
|
|
26
|
-
* @returns {Promise<LabNewsletter | undefined>} Resolves to the issue object if found, otherwise `undefined`.
|
|
27
|
-
*/
|
|
28
|
-
fetchIssueById(issueId: string): Promise<LabNewsletter | undefined>;
|
|
29
|
-
}
|