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,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.NewsroomService = 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
|
+
* NewsroomService
|
|
23
|
+
*
|
|
24
|
+
* Service client responsible for interacting with the Newsroom 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 NewsroomService = class NewsroomService extends base_http_service_1.BaseHttpService {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs an Newsroom 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('Newsroom', base_urls_1.BaseUrls.newsroomService, authenticationOptions, configService);
|
|
44
|
+
}
|
|
45
|
+
// ─────────────────────────────────────────────────────────────
|
|
46
|
+
// News Resource Methods
|
|
47
|
+
// ─────────────────────────────────────────────────────────────
|
|
48
|
+
/**
|
|
49
|
+
* Retrieves a single news 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} newsId - Unique MongoDB identifier of the news.
|
|
55
|
+
* @param {FetchNewsOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
|
|
56
|
+
* @returns {Promise<LabNews | undefined>} Resolves to an News or `undefined` on failure.
|
|
57
|
+
*/
|
|
58
|
+
async fetchNewsV1(newsId, options) {
|
|
59
|
+
return this.fetchResource(`v1/internal/news/${newsId}`, { params: options });
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Retrieves a collection of news entries.
|
|
63
|
+
*
|
|
64
|
+
* Useful for batch lookups or paginated listings.
|
|
65
|
+
* Returns an empty array if the downstream service call fails.
|
|
66
|
+
*
|
|
67
|
+
* @param {FetchNewsOptionsDtoV1} [options] - Optional filter options for narrowing results.
|
|
68
|
+
* @returns {Promise<LabNews[]>} Resolves to a list of news, or an empty array if none found.
|
|
69
|
+
*/
|
|
70
|
+
async fetchNewsCollectionV1(options) {
|
|
71
|
+
return this.fetchResourceCollection(`v1/internal/news`, { params: options });
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
exports.NewsroomService = NewsroomService;
|
|
75
|
+
exports.NewsroomService = NewsroomService = __decorate([
|
|
76
|
+
(0, common_1.Injectable)(),
|
|
77
|
+
__param(0, (0, authentication_1.InjectAuthenticationOptions)()),
|
|
78
|
+
__metadata("design:paramtypes", [Object, config_1.ConfigService])
|
|
79
|
+
], NewsroomService);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './schedule-notification.dto.v1';
|
|
@@ -14,4 +14,4 @@ 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("./schedule-notification.dto"), exports);
|
|
17
|
+
__exportStar(require("./schedule-notification.dto.v1"), exports);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* ScheduleNotificationDtoV1
|
|
3
3
|
*
|
|
4
4
|
* Represents the payload used to create or update a scheduled notification
|
|
5
5
|
* within the system. It defines all required and optional fields related to
|
|
6
6
|
* notification metadata, delivery timing, and recipient targeting.
|
|
7
7
|
*/
|
|
8
|
-
export type
|
|
8
|
+
export type ScheduleNotificationDtoV1 = {
|
|
9
9
|
/**
|
|
10
10
|
* Target URL associated with the notification.
|
|
11
11
|
* This URL is intended to link the user to relevant content.
|
|
@@ -65,13 +65,5 @@ export type ScheduleNotificationDto = {
|
|
|
65
65
|
* @example false
|
|
66
66
|
*/
|
|
67
67
|
silenced?: boolean;
|
|
68
|
-
/**
|
|
69
|
-
* Optional: List of user IDs that should receive the notification.
|
|
70
|
-
* If omitted, the notification may be sent to all users subscribed to the resource.
|
|
71
|
-
*
|
|
72
|
-
* @type {string[]}
|
|
73
|
-
* @default []
|
|
74
|
-
* @example ['000000000000000000000000']
|
|
75
|
-
*/
|
|
76
68
|
recipientIds?: string[];
|
|
77
69
|
};
|
package/dist/modules/services/providers/notifications/fetch-notification-options.dto.v1.type.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseFetchOptions, DraftedFetchOptions, TimestampsFetchOptions } from '../../../../classes';
|
|
2
|
+
/**
|
|
3
|
+
* FetchNotificationOptionsDtoV1
|
|
4
|
+
*
|
|
5
|
+
* Data Transfer Object for querying notification collections.
|
|
6
|
+
* Inherits timestamp filtering fields and extends them with
|
|
7
|
+
* notification-specific query parameters.
|
|
8
|
+
*/
|
|
9
|
+
export type FetchNotificationOptionsDtoV1 = BaseFetchOptions & TimestampsFetchOptions & DraftedFetchOptions & {
|
|
10
|
+
includePending?: boolean;
|
|
11
|
+
isSilenced?: boolean;
|
|
12
|
+
isPending?: boolean;
|
|
13
|
+
type?: string;
|
|
14
|
+
types?: string[];
|
|
15
|
+
resource?: string;
|
|
16
|
+
resources?: string[];
|
|
17
|
+
timestampMin?: number;
|
|
18
|
+
timestampMax?: number;
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./dtos"), exports);
|
|
18
|
+
__exportStar(require("./fetch-notification-options.dto.v1.type"), exports);
|
|
19
|
+
__exportStar(require("./notifications.service"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FEATURE_NOTIFICATIONS_SERVICE_TOKEN: unique symbol;
|
|
@@ -4,18 +4,32 @@ import { HubResource } from '../../../../hub-resource.enum';
|
|
|
4
4
|
import { AuthenticationModuleOptions } from '../../../authentication';
|
|
5
5
|
import { BaseHttpService } from '../../base-http.service';
|
|
6
6
|
import { ServicesModuleOptions } from '../../services-module-options.interface';
|
|
7
|
-
import {
|
|
7
|
+
import { ScheduleNotificationDtoV1 } from './dtos';
|
|
8
|
+
import { FetchNotificationOptionsDtoV1 } from './fetch-notification-options.dto.v1.type';
|
|
8
9
|
/**
|
|
9
10
|
* Parameter decorator to inject the feature-specific NotificationService.
|
|
10
11
|
*/
|
|
11
|
-
export declare function
|
|
12
|
+
export declare function InjectFeatureNotificationsService(): ParameterDecorator;
|
|
13
|
+
type LabNotification = {
|
|
14
|
+
id: string;
|
|
15
|
+
_resource: string;
|
|
16
|
+
_resourceId: string;
|
|
17
|
+
url: string;
|
|
18
|
+
type: string;
|
|
19
|
+
title: string;
|
|
20
|
+
message: string;
|
|
21
|
+
timestamp: number;
|
|
22
|
+
status: 'pending' | 'sending' | 'delivered';
|
|
23
|
+
draft: boolean;
|
|
24
|
+
recipientIds: string[];
|
|
25
|
+
};
|
|
12
26
|
/**
|
|
13
27
|
* NotificationService
|
|
14
28
|
*
|
|
15
29
|
* Provides methods to schedule and unschedule notifications for specific resources.
|
|
16
30
|
* Communicates with the organisation-hub notification microservice.
|
|
17
31
|
*/
|
|
18
|
-
export declare class
|
|
32
|
+
export declare class NotificationsService extends BaseHttpService {
|
|
19
33
|
readonly options: ServicesModuleOptions;
|
|
20
34
|
/**
|
|
21
35
|
* Creates a NotificationService client for a specific resource.
|
|
@@ -32,6 +46,27 @@ export declare class NotificationService extends BaseHttpService {
|
|
|
32
46
|
* @returns A DynamicModule with a provider for the specified NotificationService instance.
|
|
33
47
|
*/
|
|
34
48
|
static forResource(resource: HubResource): DynamicModule;
|
|
49
|
+
/**
|
|
50
|
+
* Retrieves a single notification 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} notificationId - Unique MongoDB identifier of the notification.
|
|
56
|
+
* @param {FetchNotificationOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
|
|
57
|
+
* @returns {Promise<LabNotification | undefined>} Resolves to an Notification or `undefined` on failure.
|
|
58
|
+
*/
|
|
59
|
+
fetchNotificationV1(notificationId: string, options?: FetchNotificationOptionsDtoV1): Promise<LabNotification | undefined>;
|
|
60
|
+
/**
|
|
61
|
+
* Retrieves a collection of notification entries.
|
|
62
|
+
*
|
|
63
|
+
* Useful for batch lookups or paginated listings.
|
|
64
|
+
* Returns an empty array if the downstream service call fails.
|
|
65
|
+
*
|
|
66
|
+
* @param {FetchNotificationOptionsDtoV1} [options] - Optional filter options for narrowing results.
|
|
67
|
+
* @returns {Promise<LabNotification[]>} Resolves to a list of notifications, or an empty array if none found.
|
|
68
|
+
*/
|
|
69
|
+
fetchNotificationCollectionV1(options?: FetchNotificationOptionsDtoV1): Promise<LabNotification[]>;
|
|
35
70
|
/**
|
|
36
71
|
* Schedules or reschedules a notification for a given resource.
|
|
37
72
|
* Updates existing notifications if necessary.
|
|
@@ -39,12 +74,13 @@ export declare class NotificationService extends BaseHttpService {
|
|
|
39
74
|
* @param resourceId Unique identifier of the resource.
|
|
40
75
|
* @param notification Notification configuration payload.
|
|
41
76
|
*/
|
|
42
|
-
|
|
77
|
+
scheduleNotificationV1(resourceId: string, notification: ScheduleNotificationDtoV1): void;
|
|
43
78
|
/**
|
|
44
79
|
* Unschedules a previously set notification for a given resource.
|
|
45
80
|
* Typically called when the resource is deleted or the event is canceled.
|
|
46
81
|
*
|
|
47
82
|
* @param resourceId Unique identifier of the resource.
|
|
48
83
|
*/
|
|
49
|
-
|
|
84
|
+
deleteNotifications(resourceId: string): void;
|
|
50
85
|
}
|
|
86
|
+
export {};
|
|
@@ -11,10 +11,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
13
|
};
|
|
14
|
-
var
|
|
14
|
+
var NotificationsService_1;
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
16
|
+
exports.NotificationsService = void 0;
|
|
17
|
+
exports.InjectFeatureNotificationsService = InjectFeatureNotificationsService;
|
|
18
18
|
const common_1 = require("@nestjs/common");
|
|
19
19
|
const config_1 = require("@nestjs/config");
|
|
20
20
|
const authentication_1 = require("../../../authentication");
|
|
@@ -22,12 +22,12 @@ const authentication_module_definition_1 = require("../../../authentication/auth
|
|
|
22
22
|
const base_http_service_1 = require("../../base-http.service");
|
|
23
23
|
const base_urls_1 = require("../../base-urls");
|
|
24
24
|
const services_options_parameter_1 = require("../../services-options.parameter");
|
|
25
|
-
const
|
|
25
|
+
const notifications_service_definition_1 = require("./notifications.service-definition");
|
|
26
26
|
/**
|
|
27
27
|
* Parameter decorator to inject the feature-specific NotificationService.
|
|
28
28
|
*/
|
|
29
|
-
function
|
|
30
|
-
return (0, common_1.Inject)(
|
|
29
|
+
function InjectFeatureNotificationsService() {
|
|
30
|
+
return (0, common_1.Inject)(notifications_service_definition_1.FEATURE_NOTIFICATIONS_SERVICE_TOKEN);
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* NotificationService
|
|
@@ -35,7 +35,7 @@ function InjectFeatureNotificationService() {
|
|
|
35
35
|
* Provides methods to schedule and unschedule notifications for specific resources.
|
|
36
36
|
* Communicates with the organisation-hub notification microservice.
|
|
37
37
|
*/
|
|
38
|
-
let
|
|
38
|
+
let NotificationsService = NotificationsService_1 = class NotificationsService extends base_http_service_1.BaseHttpService {
|
|
39
39
|
/**
|
|
40
40
|
* Creates a NotificationService client for a specific resource.
|
|
41
41
|
*
|
|
@@ -44,7 +44,7 @@ let NotificationService = NotificationService_1 = class NotificationService exte
|
|
|
44
44
|
* @param configService NestJS configuration service for environment variables and URLs.
|
|
45
45
|
*/
|
|
46
46
|
constructor(authenticationOptions, options, configService) {
|
|
47
|
-
super('
|
|
47
|
+
super('Notifications', base_urls_1.BaseUrls.notificationsService, authenticationOptions, configService);
|
|
48
48
|
this.options = options;
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
@@ -61,18 +61,46 @@ let NotificationService = NotificationService_1 = class NotificationService exte
|
|
|
61
61
|
], SearchModule);
|
|
62
62
|
return {
|
|
63
63
|
module: SearchModule,
|
|
64
|
-
exports: [
|
|
64
|
+
exports: [notifications_service_definition_1.FEATURE_NOTIFICATIONS_SERVICE_TOKEN],
|
|
65
65
|
providers: [
|
|
66
66
|
{
|
|
67
|
-
provide:
|
|
67
|
+
provide: notifications_service_definition_1.FEATURE_NOTIFICATIONS_SERVICE_TOKEN,
|
|
68
68
|
inject: [authentication_module_definition_1.AUTHENTICATION_MODULE_OPTIONS_TOKEN, config_1.ConfigService],
|
|
69
69
|
useFactory: (authenticationOptions, configService) => {
|
|
70
|
-
return new
|
|
70
|
+
return new NotificationsService_1(authenticationOptions, { resource }, configService);
|
|
71
71
|
},
|
|
72
72
|
},
|
|
73
73
|
],
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
+
// ─────────────────────────────────────────────────────────────
|
|
77
|
+
// Notification Resource Methods
|
|
78
|
+
// ─────────────────────────────────────────────────────────────
|
|
79
|
+
/**
|
|
80
|
+
* Retrieves a single notification entry by its MongoDB identifier.
|
|
81
|
+
*
|
|
82
|
+
* This method gracefully handles downstream failures by logging
|
|
83
|
+
* and returning `undefined` instead of throwing.
|
|
84
|
+
*
|
|
85
|
+
* @param {string} notificationId - Unique MongoDB identifier of the notification.
|
|
86
|
+
* @param {FetchNotificationOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
|
|
87
|
+
* @returns {Promise<LabNotification | undefined>} Resolves to an Notification or `undefined` on failure.
|
|
88
|
+
*/
|
|
89
|
+
async fetchNotificationV1(notificationId, options) {
|
|
90
|
+
return this.fetchResource(`v1/internal/notification/${notificationId}`, { params: options });
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Retrieves a collection of notification entries.
|
|
94
|
+
*
|
|
95
|
+
* Useful for batch lookups or paginated listings.
|
|
96
|
+
* Returns an empty array if the downstream service call fails.
|
|
97
|
+
*
|
|
98
|
+
* @param {FetchNotificationOptionsDtoV1} [options] - Optional filter options for narrowing results.
|
|
99
|
+
* @returns {Promise<LabNotification[]>} Resolves to a list of notifications, or an empty array if none found.
|
|
100
|
+
*/
|
|
101
|
+
async fetchNotificationCollectionV1(options) {
|
|
102
|
+
return this.fetchResourceCollection(`v1/internal/notifications`, { params: options });
|
|
103
|
+
}
|
|
76
104
|
/**
|
|
77
105
|
* Schedules or reschedules a notification for a given resource.
|
|
78
106
|
* Updates existing notifications if necessary.
|
|
@@ -80,15 +108,14 @@ let NotificationService = NotificationService_1 = class NotificationService exte
|
|
|
80
108
|
* @param resourceId Unique identifier of the resource.
|
|
81
109
|
* @param notification Notification configuration payload.
|
|
82
110
|
*/
|
|
83
|
-
|
|
111
|
+
scheduleNotificationV1(resourceId, notification) {
|
|
84
112
|
if (!this.options.resource) {
|
|
85
113
|
this.logger.error('Cannot schedule notification: Resource type not provided.');
|
|
86
114
|
return;
|
|
87
115
|
}
|
|
88
|
-
const endpoint = `internal/${this.options.resource}/${resourceId}`;
|
|
89
116
|
this.logger.log(`Scheduling notification for ${this.options.resource} ${resourceId}...`);
|
|
90
|
-
this.
|
|
91
|
-
.post(
|
|
117
|
+
this.httpClient
|
|
118
|
+
.post(`v1/internal/notification/${this.options.resource}/${resourceId}`, notification)
|
|
92
119
|
.then(() => {
|
|
93
120
|
this.logger.log(`Successfully scheduled notification for ${this.options.resource} ${resourceId}.`);
|
|
94
121
|
})
|
|
@@ -103,28 +130,27 @@ let NotificationService = NotificationService_1 = class NotificationService exte
|
|
|
103
130
|
*
|
|
104
131
|
* @param resourceId Unique identifier of the resource.
|
|
105
132
|
*/
|
|
106
|
-
|
|
133
|
+
deleteNotifications(resourceId) {
|
|
107
134
|
if (!this.options.resource) {
|
|
108
|
-
this.logger.error('Cannot
|
|
135
|
+
this.logger.error('Cannot delete notifications: Resource type not provided.');
|
|
109
136
|
return;
|
|
110
137
|
}
|
|
111
|
-
|
|
112
|
-
this.
|
|
113
|
-
|
|
114
|
-
.delete(endpoint)
|
|
138
|
+
this.logger.log(`Deleting notifications for ${this.options.resource} (${resourceId})`);
|
|
139
|
+
this.httpClient
|
|
140
|
+
.delete(`v1/internal/notification/${this.options.resource}/${resourceId}`)
|
|
115
141
|
.then(() => {
|
|
116
|
-
this.logger.log(`Successfully
|
|
142
|
+
this.logger.log(`Successfully deleted notifications for ${this.options.resource} ${resourceId}`);
|
|
117
143
|
})
|
|
118
144
|
.catch((error) => {
|
|
119
145
|
const { message } = this.parseError(error);
|
|
120
|
-
this.logger.error(`Failed to
|
|
146
|
+
this.logger.error(`Failed to delete notifications for ${this.options.resource} ${resourceId}: ${message}`);
|
|
121
147
|
});
|
|
122
148
|
}
|
|
123
149
|
};
|
|
124
|
-
exports.
|
|
125
|
-
exports.
|
|
150
|
+
exports.NotificationsService = NotificationsService;
|
|
151
|
+
exports.NotificationsService = NotificationsService = NotificationsService_1 = __decorate([
|
|
126
152
|
(0, common_1.Injectable)(),
|
|
127
153
|
__param(0, (0, authentication_1.InjectAuthenticationOptions)()),
|
|
128
154
|
__param(1, (0, services_options_parameter_1.InjectServicesOptions)()),
|
|
129
155
|
__metadata("design:paramtypes", [Object, Object, config_1.ConfigService])
|
|
130
|
-
],
|
|
156
|
+
], NotificationsService);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* CreateGuildMemberPassDtoV1
|
|
3
3
|
*
|
|
4
4
|
* Data structure used to generate a digital Apple Wallet pass for a Technology Guild member.
|
|
5
5
|
* Captures personal identity and membership history.
|
|
6
6
|
*/
|
|
7
|
-
export type
|
|
7
|
+
export type CreateGuildMemberPassDtoV1 = {
|
|
8
8
|
/**
|
|
9
9
|
* MongoDB ObjectId uniquely identifying the guild member.
|
|
10
10
|
*
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* CreateTeamMemberPassDtoV1
|
|
3
3
|
*
|
|
4
4
|
* DTO for creating a digital Apple Wallet pass for an internal team member.
|
|
5
5
|
* Contains optional enhancements like avatar and social links for richer display.
|
|
6
6
|
*/
|
|
7
|
-
export type
|
|
7
|
+
export type CreateTeamMemberPassDtoV1 = {
|
|
8
8
|
/**
|
|
9
9
|
* MongoDB ObjectId uniquely identifying the team member.
|
|
10
10
|
*
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './create-guild-member-pass.dto';
|
|
2
|
-
export * from './create-team-member-pass.dto';
|
|
1
|
+
export * from './create-guild-member-pass.dto.v1';
|
|
2
|
+
export * from './create-team-member-pass.dto.v1';
|
|
@@ -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("./create-guild-member-pass.dto"), exports);
|
|
18
|
-
__exportStar(require("./create-team-member-pass.dto"), exports);
|
|
17
|
+
__exportStar(require("./create-guild-member-pass.dto.v1"), exports);
|
|
18
|
+
__exportStar(require("./create-team-member-pass.dto.v1"), exports);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CreateGuildMemberPassDtoV1, CreateTeamMemberPassDtoV1 } from './dtos';
|
|
2
2
|
/**
|
|
3
3
|
* Constant list of supported digital pass types.
|
|
4
4
|
*/
|
|
@@ -12,7 +12,7 @@ export type PassType = (typeof supportedPassTypes)[number];
|
|
|
12
12
|
* This enables type-safe payload handling when creating passes.
|
|
13
13
|
*/
|
|
14
14
|
export type PassTypeDtoMap = {
|
|
15
|
-
'team-member':
|
|
16
|
-
'guild-member':
|
|
15
|
+
'team-member': CreateTeamMemberPassDtoV1;
|
|
16
|
+
'guild-member': CreateGuildMemberPassDtoV1;
|
|
17
17
|
};
|
|
18
18
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ConfigService } from '@nestjs/config';
|
|
2
2
|
import { AuthenticationModuleOptions } from '../../../authentication';
|
|
3
3
|
import { BaseHttpService } from '../../base-http.service';
|
|
4
|
-
import {
|
|
4
|
+
import { CreateGuildMemberPassDtoV1, CreateTeamMemberPassDtoV1 } from './dtos';
|
|
5
5
|
import { PassType, PassTypeDtoMap } from './pass-types';
|
|
6
6
|
/**
|
|
7
7
|
* PassService
|
|
@@ -24,13 +24,13 @@ export declare class PassService extends BaseHttpService {
|
|
|
24
24
|
* @param {string} serialNumber - Unique serial number of the pass.
|
|
25
25
|
* @returns {Promise<string>} - Returns the SAS URL of the pass.
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
getPassBySerialV1(serialNumber: string): Promise<string>;
|
|
28
28
|
/**
|
|
29
29
|
* Deletes a digital pass by its serial number.
|
|
30
30
|
*
|
|
31
31
|
* @param {string} serialNumber - Unique serial number of the pass.
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
deletePassBySerialV1(serialNumber: string): void;
|
|
34
34
|
/**
|
|
35
35
|
* Fetches a pass based on its type and associated member ID.
|
|
36
36
|
*
|
|
@@ -38,14 +38,14 @@ export declare class PassService extends BaseHttpService {
|
|
|
38
38
|
* @param {string} memberId - Identifier of the associated member.
|
|
39
39
|
* @returns {Promise<string>} - Returns the SAS URL of the pass.
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
private getPassByTypeV1;
|
|
42
42
|
/**
|
|
43
43
|
* Deletes a pass based on its type and associated member ID.
|
|
44
44
|
*
|
|
45
45
|
* @param {PassType} type - Type of the pass.
|
|
46
46
|
* @param {string} memberId - Identifier of the associated member.
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
private deletePassByTypeV1;
|
|
49
49
|
/**
|
|
50
50
|
* Creates a pass using its type and corresponding payload DTO.
|
|
51
51
|
*
|
|
@@ -54,45 +54,45 @@ export declare class PassService extends BaseHttpService {
|
|
|
54
54
|
* @param {PassTypeDtoMap[Type]} payload - DTO matching the type of pass.
|
|
55
55
|
* @returns {Promise<string>} - The resulting pass URL or identifier.
|
|
56
56
|
*/
|
|
57
|
-
|
|
57
|
+
createPassV1<Type extends PassType>(type: Type, payload: PassTypeDtoMap[Type]): Promise<string>;
|
|
58
58
|
/**
|
|
59
59
|
* Retrieves the digital pass for a specific team member.
|
|
60
60
|
*
|
|
61
61
|
* @param {string} memberId - Identifier of the team member.
|
|
62
62
|
* @returns {Promise<string>} - SAS URL of the team member's pass.
|
|
63
63
|
*/
|
|
64
|
-
|
|
64
|
+
getTeamMemberPassV1(memberId: string): Promise<string>;
|
|
65
65
|
/**
|
|
66
66
|
* Creates a pass for a team member.
|
|
67
67
|
*
|
|
68
|
-
* @param {
|
|
68
|
+
* @param {CreateTeamMemberPassDtoV1} data - Required details to generate the team member pass.
|
|
69
69
|
* @returns {Promise<string>} - URL or ID of the created pass.
|
|
70
70
|
*/
|
|
71
|
-
|
|
71
|
+
createTeamMemberPassV1(data: CreateTeamMemberPassDtoV1): Promise<string>;
|
|
72
72
|
/**
|
|
73
73
|
* Deletes a team member’s pass.
|
|
74
74
|
*
|
|
75
75
|
* @param {string} memberId - Identifier of the team member.
|
|
76
76
|
*/
|
|
77
|
-
|
|
77
|
+
deleteTeamMemberPassV1(memberId: string): void;
|
|
78
78
|
/**
|
|
79
79
|
* Retrieves the digital pass for a specific guild member.
|
|
80
80
|
*
|
|
81
81
|
* @param {string} memberId - Identifier of the guild member.
|
|
82
82
|
* @returns {Promise<string>} - SAS URL of the guild member's pass.
|
|
83
83
|
*/
|
|
84
|
-
|
|
84
|
+
getGuildMemberPassV1(memberId: string): Promise<string>;
|
|
85
85
|
/**
|
|
86
86
|
* Creates a pass for a guild member.
|
|
87
87
|
*
|
|
88
|
-
* @param {
|
|
88
|
+
* @param {CreateGuildMemberPassDtoV1} data - Required details to generate the guild member pass.
|
|
89
89
|
* @returns {Promise<string>} - URL or ID of the created pass.
|
|
90
90
|
*/
|
|
91
|
-
|
|
91
|
+
createGuildMemberPassV1(data: CreateGuildMemberPassDtoV1): Promise<string>;
|
|
92
92
|
/**
|
|
93
93
|
* Deletes a guild member’s pass.
|
|
94
94
|
*
|
|
95
95
|
* @param {string} memberId - Identifier of the guild member.
|
|
96
96
|
*/
|
|
97
|
-
|
|
97
|
+
deleteGuildMemberPassV1(memberId: string): void;
|
|
98
98
|
}
|